diff options
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | configure.ac | 58 |
2 files changed, 54 insertions, 14 deletions
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-06-05 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Try harder to find GNU Make when configuring. | ||
| 4 | * configure.ac (AC_PROG_MAKE_SET): Define a dummy. | ||
| 5 | (MAKE): Set it to GNU Make, if one can be found. | ||
| 6 | Search PATH for 'make', 'gmake', 'gnumake'. | ||
| 7 | This works better on platforms like AIX, where GNU Make | ||
| 8 | might be in /opt/freeware/bin/make, and reside | ||
| 9 | behind /usr/bin/make in the PATH. | ||
| 10 | |||
| 1 | 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru> | 11 | 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 12 | ||
| 3 | * configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM. | 13 | * configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM. |
diff --git a/configure.ac b/configure.ac index f5485942bd8..0beeedf47ae 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -92,7 +92,7 @@ AC_CHECK_PROGS(XCRUN, [xcrun]) | |||
| 92 | if test -n "$XCRUN"; then | 92 | if test -n "$XCRUN"; then |
| 93 | if test -z "$MAKE"; then | 93 | if test -z "$MAKE"; then |
| 94 | dnl Call the variable MAKE_PROG, not MAKE, to avoid confusion with | 94 | dnl Call the variable MAKE_PROG, not MAKE, to avoid confusion with |
| 95 | dnl SET_MAKE and with the usual MAKE variable that 'make' itself uses. | 95 | dnl the usual MAKE variable that 'make' itself uses. |
| 96 | AC_CHECK_PROG([MAKE_PROG], [make], [yes]) | 96 | AC_CHECK_PROG([MAKE_PROG], [make], [yes]) |
| 97 | if test -z "$MAKE_PROG"; then | 97 | if test -z "$MAKE_PROG"; then |
| 98 | MAKE="$XCRUN MAKE" | 98 | MAKE="$XCRUN MAKE" |
| @@ -102,6 +102,47 @@ if test -n "$XCRUN"; then | |||
| 102 | fi | 102 | fi |
| 103 | fi | 103 | fi |
| 104 | 104 | ||
| 105 | dnl GNU Make is required, so don't test for its individual features. | ||
| 106 | am_cv_make_support_nested_variables=yes | ||
| 107 | AC_DEFUN([AC_PROG_MAKE_SET], | ||
| 108 | [SET_MAKE= | ||
| 109 | AC_SUBST([SET_MAKE])]) | ||
| 110 | |||
| 111 | dnl Check for GNU Make and possibly set MAKE before running AM_INIT_AUTOMAKE. | ||
| 112 | AC_CACHE_CHECK([for GNU Make], [ac_cv_path_MAKE], | ||
| 113 | [ac_path_MAKE_found=false | ||
| 114 | if test -n "$MAKE"; then | ||
| 115 | emacs_makeout=`($MAKE --version) 2>/dev/null` && | ||
| 116 | case $emacs_makeout in | ||
| 117 | 'GNU Make '*) | ||
| 118 | ac_path_MAKE_found=:;; | ||
| 119 | esac | ||
| 120 | ac_cv_path_MAKE=$MAKE | ||
| 121 | else | ||
| 122 | emacs_tried_make=false | ||
| 123 | emacs_tried_gmake=false | ||
| 124 | emacs_tried_gnumake=false | ||
| 125 | AC_PATH_PROGS_FEATURE_CHECK([MAKE], [make gmake gnumake], | ||
| 126 | [[emacs_makeout=`($ac_path_MAKE --version) 2>/dev/null` && | ||
| 127 | case $emacs_makeout in | ||
| 128 | 'GNU Make '*) | ||
| 129 | # Use the fully-qualified program name only if the basename | ||
| 130 | # would not resolve to it. | ||
| 131 | if eval \$emacs_tried_$ac_prog; then | ||
| 132 | ac_cv_path_MAKE=$ac_path_MAKE | ||
| 133 | else | ||
| 134 | ac_cv_path_MAKE=$ac_prog | ||
| 135 | fi | ||
| 136 | ac_path_MAKE_found=:;; | ||
| 137 | esac | ||
| 138 | eval emacs_tried_$ac_prog=:]]) | ||
| 139 | fi]) | ||
| 140 | $ac_path_MAKE_found || { AC_MSG_ERROR([[Building Emacs requires GNU Make. | ||
| 141 | If you have it installed under another name, configure with 'MAKE=...'. | ||
| 142 | For example, run '$0 MAKE=gnu-make'.]]) | ||
| 143 | } | ||
| 144 | MAKE=$ac_cv_path_MAKE | ||
| 145 | |||
| 105 | dnl Fairly arbitrary, older versions might work too. | 146 | dnl Fairly arbitrary, older versions might work too. |
| 106 | AM_INIT_AUTOMAKE(1.11) | 147 | AM_INIT_AUTOMAKE(1.11) |
| 107 | 148 | ||
| @@ -659,18 +700,6 @@ Check `etc/MACHINES' for recognized configuration names.]) | |||
| 659 | fi | 700 | fi |
| 660 | 701 | ||
| 661 | 702 | ||
| 662 | AC_MSG_CHECKING([whether we are using GNU Make]) | ||
| 663 | testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` | ||
| 664 | if test "x$testval" != x; then | ||
| 665 | AC_MSG_RESULT([yes]) | ||
| 666 | else | ||
| 667 | AC_MSG_RESULT([no]) | ||
| 668 | AC_MSG_ERROR([Building Emacs requires GNU make. | ||
| 669 | If you have it installed under another name, configure with 'MAKE=...'. | ||
| 670 | For example, run './configure MAKE=gmake'.]) | ||
| 671 | fi | ||
| 672 | |||
| 673 | |||
| 674 | #### Choose a compiler. | 703 | #### Choose a compiler. |
| 675 | 704 | ||
| 676 | dnl Don't bother to test for C89. | 705 | dnl Don't bother to test for C89. |
| @@ -1531,7 +1560,6 @@ dnl Check for endianness. | |||
| 1531 | dnl AC_C_BIGENDIAN is done by gnulib. | 1560 | dnl AC_C_BIGENDIAN is done by gnulib. |
| 1532 | 1561 | ||
| 1533 | dnl check for Make feature | 1562 | dnl check for Make feature |
| 1534 | dnl AC_PROG_MAKE_SET is done by Automake. | ||
| 1535 | 1563 | ||
| 1536 | DEPFLAGS= | 1564 | DEPFLAGS= |
| 1537 | MKDEPDIR=":" | 1565 | MKDEPDIR=":" |
| @@ -5090,3 +5118,5 @@ fi | |||
| 5090 | ]) | 5118 | ]) |
| 5091 | 5119 | ||
| 5092 | AC_OUTPUT | 5120 | AC_OUTPUT |
| 5121 | |||
| 5122 | test "$MAKE" = make || AC_MSG_NOTICE([Now you can run '$MAKE'.]) | ||