From 8b25a45df6a57318a81d2bd90d2490e8e6387ab9 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 21 Dec 1999 11:25:59 +0000 Subject: [PATCH] 1999-10-31 Akim Demaille * acspecific.m4 (AC_PROG_GNU_M4): New macro. * configure.in: Use it. --- ChangeLog | 5 +++++ TODO | 21 +++++++++++++++++---- acspecific.m4 | 13 +++++++++++++ configure.in | 14 +++++--------- lib/autoconf/specific.m4 | 13 +++++++++++++ 5 files changed, 53 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfef1fa8..f387e531 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-10-31 Akim Demaille + + * acspecific.m4 (AC_PROG_GNU_M4): New macro. + * configure.in: Use it. + 1999-10-31 Akim Demaille Provide a means to specify commands to run before config.status is diff --git a/TODO b/TODO index 1ce90c09..c7488c3c 100644 --- a/TODO +++ b/TODO @@ -13,11 +13,17 @@ These are things mandatory to fulfill before releasing 2.15. There are also suggestions we should either satisfy right now (they're easy), or remove (obsoleted since then). +** AC_PROG_GNU_M4 +Document. + +** Produce a static list of all the AC_SUBST. +This would greatly help Automake and the independence of Automake and +Autoconf. Currently Automake needs inner details of Autoconf. + ** autoconf.texi: config.status in node names. -The info mode of Emacs seems to have problems with this. If the info -reader catches that properly, we should not care. If no info reader -can handle this, we should change the affected node names. Bug -triggered by looking for `CONFIG_FILES' in the index. +The info mode of Emacs seems to have problems with this. The info +reader catches this properly, so we should report to the X?Emacs teams. +Bug triggered by looking for `CONFIG_FILES' in the index. ** AC_CONFIG_FILES, AC_CONFIG_COMMANDS. Will we need both ICMD and CMD as is the case for AC_OUTPUT_COMMANDS? @@ -133,6 +139,13 @@ From: Roland McGrath * Autoconf 3 +** Split all those &#@! files. +acgeneral and acspecific is a bad design. The split should be done +according to the families. For instance AC_CHECK_FUNCS, +AC_CHECK_FUNC, AC_FUNC_FNMATCH etc. *and* AH_CHECK_FUNCS should be in, +acfunc.m4. I suppose there should be small exceptions, e.g., the +family AC_REPLACE_FUNCS should still be in acfunc.m4. + ** Use m4 lists? I think one sad decision in Autoconf was to use white space separated lists for some arguments. For instance AC_CHECK_FUNCS(foo bar). I diff --git a/acspecific.m4 b/acspecific.m4 index cfd7ffbe..5df4be8b 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -564,6 +564,19 @@ esac ])dnl AC_PROG_CC_STDC +dnl AC_PROG_GNU_M4 +dnl -------------- +dnl Check for GNU m4. +AC_DEFUN(AC_PROG_GNU_M4, +[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) +AC_CACHE_CHECK(whether we are using GNU m4, ac_cv_prog_gnu_m4, +[ac_cv_prog_gnu_m4=no +if test x"$M4" != x; then + case `$M4 --help < /dev/null 2>&1` in + *traditional*) ac_cv_prog_gnu_m4=yes ;; + esac +fi])]) + dnl AC_PROG_MAKE_SET dnl ---------------- dnl Define SET_MAKE to set ${MAKE} if make doesn't. diff --git a/configure.in b/configure.in index 3115a0c7..df2137f1 100644 --- a/configure.in +++ b/configure.in @@ -6,17 +6,13 @@ dnl We use a path for GNU m4 so even if users have another m4 first in dnl their path, the installer can configure with a path that has GNU m4 dnl first and get that path embedded in the installed autoconf and dnl autoheader scripts. -AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) -AC_CACHE_CHECK(whether we are using GNU m4, acac_cv_gnu_m4, -[acac_cv_gnu_m4=no -if test x"$M4" != x; then - case `$M4 --help < /dev/null 2>&1` in - *traditional*) acac_cv_gnu_m4=yes ;; - esac -fi]) -if test x"$acac_cv_gnu_m4" != xyes; then +AC_PROG_GNU_M4 +if test x"$ac_cv_prog_gnu_m4" != xyes; then AC_ERROR([GNU m4 is required]) fi +dnl This is needed because Automake does not seem to realize there is +dnl an AC_SUBST inside AC_PROG_GNU_M4. Grmph! +AC_SUBST(M4) AC_PROG_AWK dnl We use a path for perl so the #! line in autoscan will work. diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index cfd7ffbe..5df4be8b 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -564,6 +564,19 @@ esac ])dnl AC_PROG_CC_STDC +dnl AC_PROG_GNU_M4 +dnl -------------- +dnl Check for GNU m4. +AC_DEFUN(AC_PROG_GNU_M4, +[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) +AC_CACHE_CHECK(whether we are using GNU m4, ac_cv_prog_gnu_m4, +[ac_cv_prog_gnu_m4=no +if test x"$M4" != x; then + case `$M4 --help < /dev/null 2>&1` in + *traditional*) ac_cv_prog_gnu_m4=yes ;; + esac +fi])]) + dnl AC_PROG_MAKE_SET dnl ---------------- dnl Define SET_MAKE to set ${MAKE} if make doesn't.