From 5e90de32f38363fab1a296a457173294c3e09127 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 02 Sep 2018 20:01:45 -0400 Subject: configure.ac, config.sh.in: Check for tar --- 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])], [ -- cgit v0.9.1