From d226b908c5974815e70289b51f173a807dea5e2c Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 18 Jun 2019 00:55:08 -0400 Subject: configure.ac, config.sh.in: Check for tar with options --- (limited to 'configure.ac') 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@:>@])], -- cgit v0.9.1