Use AC_CHECK_PROGS to find alternate make programs
authorDan Nicholson <dbn.lists@gmail.com>
Mon, 24 Mar 2008 17:01:50 +0000 (10:01 -0700)
committerDan Nicholson <dbn.lists@gmail.com>
Tue, 1 Apr 2008 00:00:00 +0000 (17:00 -0700)
The autoconf macro AC_PATH_PROGS handles the case of searching for
multiple program names already, so we don't need to open code it. Also
changed the search to AC_CHECK_PROGS so that it doesn't set the full
path unless the user specified. Finally, report back the found value at
the end for what the user should run.

configure.ac

index ac4b77cef0e41de83ee88ca2da552f14e4a84d4a..8598a0d2d8035558cc2f8d66551dddba2615173c 100644 (file)
@@ -26,11 +26,7 @@ dnl Check for progs
 AC_PROG_CPP
 AC_PROG_CC
 AC_PROG_CXX
-AC_PATH_PROG(GMAKE, gmake, [not_found])
-AC_PATH_PROG(MAKE, make)
-if test "x$GMAKE" != "xnot_found"; then
-       MAKE="$GMAKE"
-fi
+AC_CHECK_PROGS(MAKE, [gmake make])
 AC_PATH_PROG(MKDEP, makedepend)
 AC_PATH_PROG(SED, sed)
 
@@ -903,5 +899,5 @@ echo "        CXXFLAGS:        $cxxflags"
 echo "        Macros:          $defines"
 
 echo ""
-echo "        Run 'make' to build Mesa"
+echo "        Run '${MAKE-make}' to build Mesa"
 echo ""