>From 5f950437e17b4936e4a1745db23a12a11c7ace38 Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Fri, 26 Mar 2021 02:40:07 +0900 Subject: [PATCH] Adapt for system where GNU make is gmake * configure.ac: Add GNU make checker copied from configure.ac of Emacs 28.0.50. Don't use AC_CHECK_PROGS_REQUIRED for make and AC_PROG_MAKE_SET. Adapt last message to use found GNU make command. * Makefile.in (dynvars-check): Use $(MAKE) for make command. (): Don't use @SET_MAKE@. * latex/Makefile.in: (): Don't use @SET_MAKE@. * README.GIT: * doc/install.texi (Configure): Add instruction to use GNU make as gmake. --- Makefile.in | 6 +++--- README.GIT | 8 ++++++++ configure.ac | 49 ++++++++++++++++++++++++++++++++++++++++++++--- doc/install.texi | 6 ++++++ latex/Makefile.in | 2 +- 5 files changed, 64 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index c1b29c17..f430cdbc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. -@SET_MAKE@ +# @SET_MAKE@ prefix = @prefix@$(null) exec_prefix = @exec_prefix@$(null) @@ -371,10 +371,10 @@ uninstall: dynvars-check: rm -f $(AUCELC) $(STYLEELC) *.dynvars style/*.dynvars auctex-dynvars - EMACS_GENERATE_DYNVARS=1 make some > /dev/null 2>&1 + EMACS_GENERATE_DYNVARS=1 $(MAKE) some > /dev/null 2>&1 cat *.dynvars style/*.dynvars > auctex-dynvars rm -f $(AUCELC) $(STYLEELC) - EMACS_DYNVARS_FILE=auctex-dynvars make some + EMACS_DYNVARS_FILE=auctex-dynvars $(MAKE) some clean: doc/Makefile latex/Makefile rm -f $(CLEANFILES) diff --git a/README.GIT b/README.GIT index ad0bc85a..e5d331e4 100644 --- a/README.GIT +++ b/README.GIT @@ -35,3 +35,11 @@ You will need to have a working and rather current copy of `makeinfo', Running ./autogen.sh on a fresh clone of the Git repository will give you the state of the distribution tarball, except that Git-specific files are not removed. + +If your system has installed GNU make under a name different from +`make', you have to tell it to autogen.sh script through environment +variable MAKE. For example, + + env MAKE=gmake ./autogen.sh + +should work when GNU make is installed as `gmake'. diff --git a/configure.ac b/configure.ac index fe7616d5..7ef0c9f3 100644 --- a/configure.ac +++ b/configure.ac @@ -23,10 +23,53 @@ dnl MA 02110-1301, USA. AC_INIT(auctex,13.1,bug-auctex@gnu.org) -AC_CHECK_PROGS_REQUIRED(MAKECMD, make, [make not found, aborting!]) -AC_PROG_MAKE_SET +dnl AC_CHECK_PROGS_REQUIRED(MAKECMD, make, [make not found, aborting!]) +dnl AC_PROG_MAKE_SET AC_PROG_INSTALL +dnl Check for GNU Make and possibly set MAKE. +dnl Copy and adaptation of configure.ac of Emacs 28.1 +[auctex_check_gnu_make () +{ + auctex_makeout=`($1 --version) 2>/dev/null` && + # FIXME: Check whether the minimum version is correct or not. + case $auctex_makeout in + 'GNU Make '3.8[1-9]* | 'GNU Make '3.9[0-9]* | \ + 'GNU Make '3.[1-9][0-9][0-9]* | 'GNU Make '[4-9]* | 'GNU Make '[1-9][0-9]* ) + ac_path_MAKE_found=:;; + esac +}] +AC_CACHE_CHECK([for GNU Make], [ac_cv_path_MAKE], + [ac_path_MAKE_found=false + if test -n "$MAKE"; then + auctex_check_gnu_make "$MAKE" + ac_cv_path_MAKE=$MAKE + else + auctex_tried_make=false + auctex_tried_gmake=false + auctex_tried_gnumake=false + AC_PATH_PROGS_FEATURE_CHECK([MAKE], [make gmake gnumake], + [[auctex_check_gnu_make "$ac_path_MAKE" + if $ac_path_MAKE_found; then + # Use the fully-qualified program name only if the basename + # would not resolve to it. + if eval \$auctex_tried_$ac_prog; then + ac_cv_path_MAKE=$ac_path_MAKE + else + ac_cv_path_MAKE=$ac_prog + fi + fi + eval auctex_tried_$ac_prog=:]]) + fi]) +$ac_path_MAKE_found || { +# FIXME: Check whether the minimum version is correct or not. +AC_MSG_ERROR([[Building AUCTeX requires GNU Make, at least version 3.81. +If you have it installed under another name, configure with 'MAKE=...'. +For example, run '$0 MAKE=gnu-make'.]]) +} +MAKE=$ac_cv_path_MAKE +export MAKE + AC_DATE_VERSION_FROM_CHANGELOG(AUCTEXDATE,AUCTEXVERSION,ChangeLog.1) AC_SUBST(AUCTEXDATE) AC_SUBST(AUCTEXVERSION) @@ -275,5 +318,5 @@ cat >&2 <