From abe017f60d93dfc22f28e79006f58df97a0761e1 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 25 Feb 2002 14:00:57 +0000 Subject: [PATCH] * 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. --- ChangeLog | 7 +++++++ configure.in | 5 +++++ m4/Makefile.am | 1 + src/output.c | 12 +++++++----- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9689d207..e75aec85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-02-25 Akim Demaille + + * 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 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from diff --git a/configure.in b/configure.in index 2cf4e6ff..654caf29 100644 --- a/configure.in +++ b/configure.in @@ -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)], diff --git a/m4/Makefile.am b/m4/Makefile.am index 1a5d1041..0eb44e2c 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -9,6 +9,7 @@ glibc21.m4 \ iconv.m4 \ isc-posix.m4 \ lcmessage.m4 \ +m4.m4 \ malloc.m4 \ mbrtowc.m4 \ mbstate_t.m4 \ diff --git a/src/output.c b/src/output.c index 171f66cb..65a7d5b2 100644 --- a/src/output.c +++ b/src/output.c @@ -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, -- 2.45.2