summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBernhard Walle <bernhard@bwalle.de>2012-02-26 19:44:28 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-03-06 08:34:20 +0100
commit62cd03ee6c684fd5969f0e712134aaf5909584ef (patch)
tree4384934f0ef622f52f67f6c27ffa79a3479053fa /configure.ac
parent7c61fe29c58143bc58144f56d2f4e7163c5c36ef (diff)
downloadptxdist-62cd03ee6c684fd5969f0e712134aaf5909584ef.tar.gz
ptxdist-62cd03ee6c684fd5969f0e712134aaf5909584ef.tar.xz
configure.ac: Check for GNU tar
ptxd_make_world_extract uses the option --remove-files which is a GNU extension to tar. Because GNU tar is not in GNU coreutils, I changed the GNU_COREUTILS macro to GNU_TOOL and added a second parameter: the package where the tool is found. I think that's better than providing a new macro just for GNU tar. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 19 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index ca068796a..37a01ae9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,26 +133,29 @@ case "$SED_VERSION" in
esac
AC_MSG_RESULT([$SED_VERSION])
-dnl check for gnu coreutils
-AC_DEFUN([GNU_COREUTILS],
- [AC_CACHE_CHECK([for $1 from GNU coreutils], [ac_cv_path_gnu_$1],
+dnl check for gnu tools
+dnl $1: tool to search for
+dnl $2: package where the tool is (e.g. 'coreutils')
+AC_DEFUN([GNU_TOOL],
+ [AC_CACHE_CHECK([for GNU $1], [ac_cv_path_gnu_$1],
[AC_PATH_PROGS_FEATURE_CHECK([gnu_$1], [g$1 $1.gnu $1],
- [[out=`$ac_path_gnu_$1 --version 2>/dev/null | $SED -ne "s/.*\(GNU\) coreutils.*/\1/p"`
+ [[out=`$ac_path_gnu_$1 --version 2>/dev/null | $SED -ne "s/.*\(GNU\) $2.*/\1/p"`
test "x$out" = xGNU && ac_cv_path_gnu_$1=$ac_path_gnu_$1 ac_path_gnu_$1_found=:]],
- [AC_MSG_ERROR([could not find $1 from GNU coreutils])])])
+ [AC_MSG_ERROR([could not find GNU $1])])])
AC_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])])
-GNU_COREUTILS(chmod)
-GNU_COREUTILS(chown)
-GNU_COREUTILS(mv)
-GNU_COREUTILS(cp)
-GNU_COREUTILS(rm)
-GNU_COREUTILS(rmdir)
-GNU_COREUTILS(md5sum)
-GNU_COREUTILS(mkdir)
-GNU_COREUTILS(install)
-GNU_COREUTILS(stat)
-GNU_COREUTILS(mknod)
+GNU_TOOL(chmod, coreutils)
+GNU_TOOL(chown, coreutils)
+GNU_TOOL(mv, coreutils)
+GNU_TOOL(cp, coreutils)
+GNU_TOOL(rm, coreutils)
+GNU_TOOL(rmdir, coreutils)
+GNU_TOOL(md5sum, coreutils)
+GNU_TOOL(mkdir, coreutils)
+GNU_TOOL(install, coreutils)
+GNU_TOOL(stat, coreutils)
+GNU_TOOL(mknod, coreutils)
+GNU_TOOL(tar, tar)
dnl Check for egrep
AC_PROG_EGREP
@@ -261,12 +264,6 @@ if test -z "$WGET"; then
AC_MSG_ERROR([wget could not be found, please install])
fi
-dnl Check for tar
-AC_PATH_PROGS(TAR, tar,, $PATH)
-if test -z "$TAR"; then
- AC_MSG_ERROR([tar could not be found, please install])
-fi
-
dnl Check for dirname
AC_PATH_PROGS(DIRNAME, dirname,, $PATH)
if test -z "$DIRNAME"; then