summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--config.sh.in1
-rw-r--r--configure.ac46
3 files changed, 50 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2ef5f22..813d67e 100644
--- a/NEWS
+++ b/NEWS
@@ -37,8 +37,9 @@ libopkbuild:
Build system:
- * configure now checks for fakeroot and touch (preferably with the
- "-h" option).
+ * configure now checks for fakeroot, touch (preferably with the "-h"
+ option), and tar (with the "-T", "--no-recursion", and
+ "--numeric-owner" options).
Documentation:
diff --git a/config.sh.in b/config.sh.in
index ec3d34d..6ef78ca 100644
--- a/config.sh.in
+++ b/config.sh.in
@@ -3,4 +3,5 @@ PACKAGE_NAME='@PACKAGE_NAME@'
FAKEROOT='@FAKEROOT@'
OPKG='@OPKG@'
TOUCH='@TOUCH@'
+TAR='@TAR@'
HAVE_TOUCH_NODEREF='@HAVE_TOUCH_NODEREF@'
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@:>@])],