summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-23 13:16:00 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-23 13:16:20 +0100
commita565276f66c916198dbcc70950330db292177dfc (patch)
tree6efede4f841ce63b43ea4a19136da9befc7d5450 /configure.in
parentc9550dc7f318d05769a6e6a25a5138799e76b1e6 (diff)
Enable use of older tars that uses --strip-path to strip components
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 3f084e62d03b..065c1357a851 100644
--- a/configure.in
+++ b/configure.in
@@ -2034,6 +2034,24 @@ if test -z "$GNUTAR"; then
fi
AC_SUBST(GNUTAR)
+AC_MSG_CHECKING([for tar's option to strip components])
+$GNUTAR --help 2> /dev/null | egrep "strip-components" 2>&1 >/dev/null
+if test $? -eq 0; then
+ STRIP_COMPONENTS="--strip-components"
+else
+ $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null
+ if test $? -eq 0; then
+ STRIP_COMPONENTS="--strip-path"
+ else
+ STRIP_COMPONENTS="unsupported"
+ fi
+fi
+AC_MSG_RESULT($STRIP_COMPONENTS)
+if test x$STRIP_COMPONENTS == xunsupported; then
+ AC_MSG_ERROR([you need a tar that is able to strip components.])
+fi
+AC_SUBST(STRIP_COMPONENTS)
+
dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
dnl desktop OSes from "mobile" ones.