]> git.saurik.com Git - bison.git/commitdiff
* m4/m4.m4: New, from CVS Autoconf.
authorAkim Demaille <akim@epita.fr>
Mon, 25 Feb 2002 14:00:57 +0000 (14:00 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 25 Feb 2002 14:00:57 +0000 (14:00 +0000)
* configure.in: Invoke it.
* src/output.c (output_skeleton): Use its result instead of the
hard coded name.

ChangeLog
configure.in
m4/Makefile.am
src/output.c

index 9689d207f0ad8f32fc1f58f7af0192949523d276..e75aec8550e233a723bf3f5f79cb8f5780280194 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-02-25  Akim Demaille  <akim@epita.fr>
+
+       * m4/m4.m4: New, from CVS Autoconf.
+       * configure.in: Invoke it.
+       * src/output.c (output_skeleton): Use its result instead of the
+       hard coded name.
+
 2002-02-25  Akim Demaille  <akim@epita.fr>
 
        * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
index 2cf4e6ffed1099d269c8ec5e81611ef4a6d27e08..654caf2914064dc155516eac226c33d0447b31f5 100644 (file)
@@ -42,6 +42,11 @@ AC_ISC_POSIX
 AM_PROG_CC_STDC
 AC_PROG_RANLIB
 AM_MISSING_PROG([AUTOM4TE], [autom4te])
+BISON_PROG_GNU_M4
+if test x"$ac_cv_prog_gnu_m4" != xyes; then
+  AC_MSG_ERROR([GNU M4 1.4 is required])
+fi
+AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
 
 AC_ARG_ENABLE(gcc-warnings,
 [  --enable-gcc-warnings   turn on lots of GCC warnings (not recommended)],
index 1a5d1041b104adb4b5ccc9d37351577592d978e0..0eb44e2c2474d3be265ab903b98151da59c09ed7 100644 (file)
@@ -9,6 +9,7 @@ glibc21.m4                                      \
 iconv.m4                                       \
 isc-posix.m4                                   \
 lcmessage.m4                                   \
+m4.m4                                          \
 malloc.m4                                      \
 mbrtowc.m4                                     \
 mbstate_t.m4                                   \
index 171f66cb3016c3211c7aedc7f8e0cf45260c970b..65a7d5b294fa1d9a3c969d01e67db74beaa12f5a 100644 (file)
@@ -1001,15 +1001,17 @@ output_skeleton (void)
   /* Invoke m4 on the definition of the muscles, and the skeleton. */
   {
     const char *bison_pkgdatadir = getenv ("BISON_PKGDATADIR");
+    const char *m4 = getenv ("M4");
+    if (!m4)
+      m4 = M4;
     if (!bison_pkgdatadir)
       bison_pkgdatadir = PKGDATADIR;
     if (trace_flag)
       fprintf (stderr,
-              "running: m4 -I %s m4sugar/m4sugar.m4 %s %s\n",
-              bison_pkgdatadir, tempfile, skeleton);
-    skel_in = readpipe ("m4",
-                       "-I",
-                       bison_pkgdatadir,
+              "running: %s -I %s m4sugar/m4sugar.m4 %s %s\n",
+              m4, bison_pkgdatadir, tempfile, skeleton);
+    skel_in = readpipe (m4,
+                       "-I", bison_pkgdatadir,
                        "m4sugar/m4sugar.m4",
                        tempfile,
                        skeleton,