dont stop on first make found
authorMarko Kreen <markokr@gmail.com>
Mon, 16 Apr 2007 12:44:33 +0000 (12:44 +0000)
committerMarko Kreen <markokr@gmail.com>
Mon, 16 Apr 2007 12:44:33 +0000 (12:44 +0000)
configure.ac

index 7307a824c853bda90623834b0ab0ec09412e9f4b..c669997396c68a365a7ea71189bd04e1ac4aef8b 100644 (file)
@@ -20,13 +20,21 @@ AC_ARG_WITH(pgconfig, [  --with-pgconfig=PG_CONFIG    path to pg_config (default
 test -n "$PG_CONFIG" || AC_MSG_ERROR([Cannot continue without pg_config])
 
 dnl Find GNU make
-AC_PATH_PROGS(MAKE, gmake make)
-AC_MSG_CHECKING(if $MAKE is GNU make)
-if $MAKE --version 2>&1 | grep -q GNU; then
-  AC_MSG_RESULT(yes)
+AC_MSG_CHECKING(for GNU make)
+if test -n "$MAKE"; then
+  for a in make gmake gnumake; do
+    if "$a" --version 2>&1 | grep -q GNU; then
+      MAKE="$a"
+      break
+    fi
+  done
+fi
+if test -n "$MAKE"; then
+  AC_MSG_ERROR([GNU make is not found])
 else
-  AC_MSG_ERROR(no, cannot proceed)
+  AC_MSG_RESULT($MAKE)
 fi
+AC_SUBST(MAKE)
 
 dnl Find location of /contrib SQL
 AC_MSG_CHECKING(where PostgreSQL SQL extensions are installed)