[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117265: Try harder to find GNU Make when configurin
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r117265: Try harder to find GNU Make when configuring. |
Date: |
Thu, 05 Jun 2014 08:03:55 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117265
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2014-06-05 01:03:22 -0700
message:
Try harder to find GNU Make when configuring.
* configure.ac (AC_PROG_MAKE_SET): Define a dummy.
(MAKE): Set it to GNU Make, if one can be found.
Search PATH for 'make', 'gmake', 'gnumake'.
This works better on platforms like AIX, where GNU Make
might be in /opt/freeware/bin/make, and reside
behind /usr/bin/make in the PATH.
modified:
ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1538
configure.ac
configure.in-20091113204419-o5vbwnq5f7feedwu-783
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-06-05 06:24:54 +0000
+++ b/ChangeLog 2014-06-05 08:03:22 +0000
@@ -1,3 +1,13 @@
+2014-06-05 Paul Eggert <address@hidden>
+
+ Try harder to find GNU Make when configuring.
+ * configure.ac (AC_PROG_MAKE_SET): Define a dummy.
+ (MAKE): Set it to GNU Make, if one can be found.
+ Search PATH for 'make', 'gmake', 'gnumake'.
+ This works better on platforms like AIX, where GNU Make
+ might be in /opt/freeware/bin/make, and reside
+ behind /usr/bin/make in the PATH.
+
2014-06-05 Dmitry Antipov <address@hidden>
* configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.
=== modified file 'configure.ac'
--- a/configure.ac 2014-06-05 06:24:54 +0000
+++ b/configure.ac 2014-06-05 08:03:22 +0000
@@ -92,7 +92,7 @@
if test -n "$XCRUN"; then
if test -z "$MAKE"; then
dnl Call the variable MAKE_PROG, not MAKE, to avoid confusion with
- dnl SET_MAKE and with the usual MAKE variable that 'make' itself uses.
+ dnl the usual MAKE variable that 'make' itself uses.
AC_CHECK_PROG([MAKE_PROG], [make], [yes])
if test -z "$MAKE_PROG"; then
MAKE="$XCRUN MAKE"
@@ -102,6 +102,47 @@
fi
fi
+dnl GNU Make is required, so don't test for its individual features.
+am_cv_make_support_nested_variables=yes
+AC_DEFUN([AC_PROG_MAKE_SET],
+ [SET_MAKE=
+ AC_SUBST([SET_MAKE])])
+
+dnl Check for GNU Make and possibly set MAKE before running AM_INIT_AUTOMAKE.
+AC_CACHE_CHECK([for GNU Make], [ac_cv_path_MAKE],
+ [ac_path_MAKE_found=false
+ if test -n "$MAKE"; then
+ emacs_makeout=`($MAKE --version) 2>/dev/null` &&
+ case $emacs_makeout in
+ 'GNU Make '*)
+ ac_path_MAKE_found=:;;
+ esac
+ ac_cv_path_MAKE=$MAKE
+ else
+ emacs_tried_make=false
+ emacs_tried_gmake=false
+ emacs_tried_gnumake=false
+ AC_PATH_PROGS_FEATURE_CHECK([MAKE], [make gmake gnumake],
+ [[emacs_makeout=`($ac_path_MAKE --version) 2>/dev/null` &&
+ case $emacs_makeout in
+ 'GNU Make '*)
+ # Use the fully-qualified program name only if the basename
+ # would not resolve to it.
+ if eval \$emacs_tried_$ac_prog; then
+ ac_cv_path_MAKE=$ac_path_MAKE
+ else
+ ac_cv_path_MAKE=$ac_prog
+ fi
+ ac_path_MAKE_found=:;;
+ esac
+ eval emacs_tried_$ac_prog=:]])
+ fi])
+$ac_path_MAKE_found || { AC_MSG_ERROR([[Building Emacs requires GNU Make.
+If you have it installed under another name, configure with 'MAKE=...'.
+For example, run '$0 MAKE=gnu-make'.]])
+}
+MAKE=$ac_cv_path_MAKE
+
dnl Fairly arbitrary, older versions might work too.
AM_INIT_AUTOMAKE(1.11)
@@ -659,18 +700,6 @@
fi
-AC_MSG_CHECKING([whether we are using GNU Make])
-testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
-if test "x$testval" != x; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Building Emacs requires GNU make.
-If you have it installed under another name, configure with 'MAKE=...'.
-For example, run './configure MAKE=gmake'.])
-fi
-
-
#### Choose a compiler.
dnl Don't bother to test for C89.
@@ -1531,7 +1560,6 @@
dnl AC_C_BIGENDIAN is done by gnulib.
dnl check for Make feature
-dnl AC_PROG_MAKE_SET is done by Automake.
DEPFLAGS=
MKDEPDIR=":"
@@ -5090,3 +5118,5 @@
])
AC_OUTPUT
+
+test "$MAKE" = make || AC_MSG_NOTICE([Now you can run '$MAKE'.])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117265: Try harder to find GNU Make when configuring.,
Paul Eggert <=