summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2009-11-12 18:02:29 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2009-11-12 18:02:29 +0100
commitcb0b6548c5be6f36ac0610de3c04dd7905006f32 (patch)
tree438bbaafe708d9c89b8b64a0a855569cd7be07de
parentb3d85283a2cd3e02e9f301206a120d5193d3f366 (diff)
downloadptxdist-cb0b6548c5be6f36ac0610de3c04dd7905006f32.tar.gz
ptxdist-cb0b6548c5be6f36ac0610de3c04dd7905006f32.tar.xz
[configure.ac] add test for make version >= 3.81
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c910edb41..dc3f50ce9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,15 @@ AC_PATH_PROGS(MAKE, gmake gnumake make,, $PATH)
if test -z "$MAKE"; then
AC_MSG_ERROR([make could not be found, please install])
fi
+MAKE_VERSION=`$MAKE --version 2>/dev/null | $SED -ne "s/^GNU Make \([[0-9]]\+\.[[0-9.]]\+\).*$/\1/p"`
+MINOR_MAKE_VERSION="${MAKE_VERSION#*.}"
+MAJOR_MAKE_VERSION="${MAKE_VERSION%.*}"
+if test -z "${MAJOR_MAKE_VERSION}" -o -z "${MINOR_MAKE_VERSION}" ; then
+ AC_MSG_ERROR([could not parse make version. GNU make >= 3.81 required])
+fi
+if test $MAJOR_MAKE_VERSION -eq 3 -a $MINOR_MAKE_VERSION -lt 81 -o $MAJOR_MAKE_VERSION -lt 3 ; then
+ AC_MSG_ERROR([GNU make >= 2.81 required ($MAKE_VERSION found)])
+fi
dnl Check for file
AC_PATH_PROGS(FILE, file,, $PATH)