Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 1 | # |
Reid Spencer | 4f5f140 | 2004-11-25 04:43:54 +0000 | [diff] [blame] | 2 | # Check for GNU Make. This is originally from |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 3 | # http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html |
| 4 | # |
| 5 | AC_DEFUN([AC_CHECK_GNU_MAKE], |
Reid Spencer | 4f5f140 | 2004-11-25 04:43:54 +0000 | [diff] [blame] | 6 | [AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command], |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 7 | dnl Search all the common names for GNU make |
Reid Spencer | 4f5f140 | 2004-11-25 04:43:54 +0000 | [diff] [blame] | 8 | [llvm_cv_gnu_make_command='' |
| 9 | for a in "$MAKE" make gmake gnumake ; do |
| 10 | if test -z "$a" ; then continue ; fi ; |
| 11 | if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) |
| 12 | then |
| 13 | llvm_cv_gnu_make_command=$a ; |
| 14 | break; |
| 15 | fi |
| 16 | done]) |
| 17 | dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, |
| 18 | dnl '#' otherwise |
| 19 | if test "x$llvm_cv_gnu_make_command" != "x" ; then |
| 20 | ifGNUmake='' ; |
| 21 | else |
| 22 | ifGNUmake='#' ; |
| 23 | AC_MSG_RESULT("Not found"); |
| 24 | fi |
| 25 | AC_SUBST(ifGNUmake) |
Reid Spencer | 491f681 | 2004-09-07 06:56:14 +0000 | [diff] [blame] | 26 | ]) |