summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-09-02 20:01:45 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-09-02 20:01:45 (EDT)
commit5e90de32f38363fab1a296a457173294c3e09127 (patch)
tree41e21a81ef2e0fdf1b7ee09381860fbc3b786fe0
parent4201b6f84e54a19b1d2e9c31ff44f32334ab0ced (diff)
configure.ac, config.sh.in: Check for tar
-rw-r--r--config.sh.in1
-rw-r--r--configure.ac31
2 files changed, 32 insertions, 0 deletions
diff --git a/config.sh.in b/config.sh.in
index 1526b60..8d997a2 100644
--- a/config.sh.in
+++ b/config.sh.in
@@ -1,5 +1,6 @@
PACKAGE='@PACKAGE@'
PACKAGE_NAME='@PACKAGE_NAME@'
+TAR='@TAR@'
MD5SUM='@MD5SUM@'
SHA256SUM='@SHA256SUM@'
GZIP='@GZIP@'
diff --git a/configure.ac b/configure.ac
index 1e92c9c..d1f9182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,37 @@ AC_ARG_WITH(
)
AC_ARG_WITH(
+ [tar],
+ [AS_HELP_STRING([--with-tar=PATH],
+ [path to tar utility with `-x', `-z', `-O', and `-f' options
+ (e.g. tar from GNU, BusyBox, or libarchive)])],
+ dnl This `dnl' is needed to workaround Vim syntax highlighting.
+ [
+ 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
+ ]
+)
+dnl TODO: Test ${TAR} for options support? How can we do so without also
+dnl requiring -c support (missing from BusyBox tar without FEATURE_TAR_CREATE)
+dnl to create an archive for testing?
+AC_ARG_WITH(
[md5sum],
[AS_HELP_STRING([--with-md5sum=PATH], [path to md5sum utility])],
[