summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-18 00:55:08 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-18 00:55:08 (EDT)
commitd226b908c5974815e70289b51f173a807dea5e2c (patch)
treefee2d8b77893cb5570307058e9288be6c07834e0 /configure.ac
parenta7cc745ac3cfdea23798cdb8b7ca72d41f8b319c (diff)
configure.ac, config.sh.in: Check for tar with options
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 46 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 49bf5b8..d43aaf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,52 @@ else
fi
AC_ARG_WITH(
+ [tar],
+ [AS_HELP_STRING([--with-tar=PATH], [path to tar utility])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-tar requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([tar is required])
+ ;;
+ *)
+ TAR="${withval}"
+ AC_SUBST([TAR])
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([TAR], [tar])
+ if test -z "${TAR}"; then
+ AC_MSG_ERROR([tar not found])
+ fi
+ ]
+)
+AC_MSG_CHECKING([whether tar accepts -T, --no-recursion, and --numeric-owner])
+rm -Rf conftest.dir
+mkdir conftest.dir
+touch conftest.dir/foo conftest.dir/bar
+if printf '%s\n' conftest.dir/ conftest.dir/foo | ${TAR} -cf conftest.tar \
+ --no-recursion -T - --numeric-owner; then
+ if ${TAR} -tf conftest.tar | grep -Fq 'foo' && \
+ ${TAR} -tf conftest.tar | grep -Fvq 'bar'
+ then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([tar with -T, --no-recursion, and --numeric-owner
+ is required])
+ fi
+else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([tar with -T, --no-recursion, and --numeric-owner is
+ required])
+fi
+
+AC_ARG_WITH(
[metadata],
[AS_HELP_STRING([--with-metadata=SYSTEM],
[use SYSTEM metadata plugin @<:@default: proteanos@:>@])],