diff options
author | Andreas Bießmann <andreas@biessmann.de> | 2011-12-02 08:51:48 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-12-02 16:08:54 +0100 |
commit | 39a4819220328d12b5cd38f7f65791b935a1a7e0 (patch) | |
tree | 6c86ac3296d2f2c9ab0c0e9e8cc4ae3e791b5683 /configure.ac | |
parent | 6bcc0feb09f524a912789aa2ddd60c43e2e908c8 (diff) | |
download | ptxdist-39a4819220328d12b5cd38f7f65791b935a1a7e0.tar.gz ptxdist-39a4819220328d12b5cd38f7f65791b935a1a7e0.tar.xz |
configure.ac: add check for GNU coreutils
Some scripts require GNU coreutils (especially the -- argument split is
problematical on some BSD systems).
This patch adds a macro to detect GNU coreutils version of these tools.
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7a34e7a8a..30441887c 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,20 @@ 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], + [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"` + 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_SUBST([GNU_$1], [$ac_cv_path_gnu_$1])]) + +GNU_COREUTILS(chmod) +GNU_COREUTILS(mv) +GNU_COREUTILS(rm) +GNU_COREUTILS(md5sum) + dnl Check for egrep AC_PROG_EGREP |