summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING9
-rw-r--r--ChangeLog98
-rw-r--r--INSTALL4
-rw-r--r--Makefile.am18
-rw-r--r--Makefile.in73
-rw-r--r--NEWS2
-rw-r--r--TODO6
-rw-r--r--acconfig.h2
-rw-r--r--acinclude.m4418
-rw-r--r--aclocal.m4534
-rw-r--r--acm4/Makefile.am12
-rw-r--r--acm4/Makefile.in (renamed from checks/Makefile.in)53
-rw-r--r--acm4/error.m411
-rw-r--r--acm4/gettext.m4 (renamed from gettext.m4)0
-rw-r--r--acm4/regex.m423
-rw-r--r--c-boxes.el406
-rw-r--r--checks/01.define5
-rw-r--r--checks/02.define13
-rw-r--r--checks/03.arguments5
-rw-r--r--checks/04.arguments7
-rw-r--r--checks/05.arguments5
-rw-r--r--checks/06.arguments5
-rw-r--r--checks/07.pseudo_argu9
-rw-r--r--checks/08.pseudo_argu5
-rw-r--r--checks/09.pseudo_argu5
-rw-r--r--checks/10.pseudo_argu11
-rw-r--r--checks/11.pseudo_argu5
-rw-r--r--checks/12.undefine11
-rw-r--r--checks/13.defn7
-rw-r--r--checks/14.defn9
-rw-r--r--checks/15.pushdef17
-rw-r--r--checks/16.pushdef17
-rw-r--r--checks/17.indir7
-rw-r--r--checks/18.ifdef7
-rw-r--r--checks/19.ifelse9
-rw-r--r--checks/20.ifelse3
-rw-r--r--checks/21.loops7
-rw-r--r--checks/22.loops10
-rw-r--r--checks/23.dumpdef9
-rw-r--r--checks/24.trace13
-rw-r--r--checks/25.dnl4
-rw-r--r--checks/26.changequote7
-rw-r--r--checks/27.changequote7
-rw-r--r--checks/28.changequote9
-rw-r--r--checks/29.changecom11
-rw-r--r--checks/30.changecom7
-rw-r--r--checks/31.changesynta11
-rw-r--r--checks/32.changesynta11
-rw-r--r--checks/33.changesynta9
-rw-r--r--checks/34.changesynta9
-rw-r--r--checks/35.changesynta15
-rw-r--r--checks/36.changesynta5
-rw-r--r--checks/37.changesynta13
-rw-r--r--checks/38.m4wrap9
-rw-r--r--checks/39.include6
-rw-r--r--checks/40.include8
-rw-r--r--checks/41.include8
-rw-r--r--checks/42.divert9
-rw-r--r--checks/43.divert6
-rw-r--r--checks/44.undivert11
-rw-r--r--checks/45.undivert13
-rw-r--r--checks/46.undivert9
-rw-r--r--checks/47.divnum13
-rw-r--r--checks/48.cleardiv7
-rw-r--r--checks/49.cleardiv4
-rw-r--r--checks/50.len5
-rw-r--r--checks/51.index5
-rw-r--r--checks/52.regexp5
-rw-r--r--checks/53.regexp3
-rw-r--r--checks/54.substr5
-rw-r--r--checks/55.translit7
-rw-r--r--checks/56.patsubst11
-rw-r--r--checks/58.format5
-rw-r--r--checks/59.incr5
-rw-r--r--checks/60.eval18
-rw-r--r--checks/61.eval11
-rw-r--r--checks/62.esyscmd6
-rw-r--r--checks/63.sysval9
-rw-r--r--checks/64.errprint5
-rw-r--r--checks/65.errprint5
-rw-r--r--checks/66.m4exit6
-rw-r--r--checks/Makefile.am29
-rwxr-xr-xchecks/check-them51
-rwxr-xr-xchecks/get-them70
-rw-r--r--config.h.in18
-rwxr-xr-xconfig.sub99
-rwxr-xr-xconfigure636
-rw-r--r--configure.in24
-rw-r--r--doc/Makefile.am17
-rw-r--r--doc/Makefile.in86
-rw-r--r--doc/helptoman.pl249
-rw-r--r--doc/m4.1121
-rw-r--r--doc/m4.info164
-rw-r--r--doc/m4.info-1238
-rw-r--r--doc/m4.info-2277
-rw-r--r--doc/m4.info-3133
-rw-r--r--doc/m4.texinfo125
-rw-r--r--doc/stamp-vti6
-rw-r--r--doc/texinfo.tex299
-rw-r--r--doc/version.texi6
-rw-r--r--examples/Makefile.am10
-rw-r--r--examples/Makefile.in62
-rwxr-xr-xexamples/comments.test24
-rwxr-xr-xexamples/ddivert.test18
-rwxr-xr-xexamples/debug.test33
-rw-r--r--examples/defs54
-rwxr-xr-xexamples/iso8859.test33
-rwxr-xr-xexamples/reverse.test20
-rwxr-xr-xexamples/sysv-args.test53
-rwxr-xr-xexamples/wrap.test22
-rwxr-xr-xinstall-sh2
-rw-r--r--lib/Makefile.am10
-rw-r--r--lib/Makefile.in42
-rw-r--r--lib/alloca.c504
-rw-r--r--lib/getdate.h22
-rw-r--r--lib/regex.c225
-rw-r--r--lib/regex.h66
-rwxr-xr-xmissing18
-rw-r--r--po/cat-id-tbl.c43
-rw-r--r--po/de.gmobin12340 -> 11731 bytes
-rw-r--r--po/de.po39
-rw-r--r--po/fr.gmobin12506 -> 11890 bytes
-rw-r--r--po/fr.po39
-rw-r--r--po/it.gmobin6118 -> 6118 bytes
-rw-r--r--po/it.po38
-rw-r--r--po/ja.gmobin13443 -> 12649 bytes
-rw-r--r--po/ja.po39
-rw-r--r--po/m4.pot38
-rw-r--r--po/nl.gmobin12219 -> 11766 bytes
-rw-r--r--po/nl.po59
-rw-r--r--po/ru.gmobin12035 -> 11431 bytes
-rw-r--r--po/ru.po39
-rw-r--r--po/sv.gmobin356 -> 356 bytes
-rw-r--r--po/sv.po42
-rw-r--r--src/Makefile.am3
-rw-r--r--src/Makefile.in56
-rw-r--r--tests/Makefile.am35
-rw-r--r--tests/Makefile.in235
-rwxr-xr-xtests/argument.1.test21
-rwxr-xr-xtests/argument.2.test23
-rwxr-xr-xtests/argument.3.test21
-rwxr-xr-xtests/argument.4.test21
-rwxr-xr-xtests/changeco.1.test27
-rwxr-xr-xtests/changeco.2.test23
-rwxr-xr-xtests/changequ.1.test23
-rwxr-xr-xtests/changequ.2.test23
-rwxr-xr-xtests/changequ.3.test25
-rwxr-xr-xtests/changesy.1.test27
-rwxr-xr-xtests/changesy.2.test27
-rwxr-xr-xtests/changesy.3.test25
-rwxr-xr-xtests/changesy.4.test25
-rwxr-xr-xtests/changesy.5.test31
-rwxr-xr-xtests/changesy.6.test21
-rwxr-xr-xtests/changesy.7.test29
-rwxr-xr-xtests/cleardiv.1.test23
-rwxr-xr-xtests/cleardiv.2.test20
-rwxr-xr-xtests/define.1.test21
-rwxr-xr-xtests/define.2.test29
-rwxr-xr-xtests/defn.1.test23
-rwxr-xr-xtests/defn.2.test25
-rw-r--r--tests/defs54
-rwxr-xr-xtests/divert.1.test25
-rwxr-xr-xtests/divert.2.test22
-rwxr-xr-xtests/divnum.1.test29
-rwxr-xr-xtests/dnl.1.test20
-rwxr-xr-xtests/dumpdef.1.test29
-rwxr-xr-xtests/errprint.1.test25
-rwxr-xr-xtests/errprint.2.test25
-rwxr-xr-xtests/esyscmd.1.test22
-rwxr-xr-xtests/eval.1.test38
-rwxr-xr-xtests/eval.2.test27
-rw-r--r--tests/foo (renamed from checks/foo)0
-rwxr-xr-xtests/format.1.test21
-rwxr-xr-xtests/get-them112
-rwxr-xr-xtests/ifdef.1.test23
-rwxr-xr-xtests/ifelse.1.test25
-rwxr-xr-xtests/ifelse.2.test19
-rw-r--r--tests/incl.m4 (renamed from checks/incl.m4)0
-rwxr-xr-xtests/include.1.test26
-rwxr-xr-xtests/include.2.test24
-rwxr-xr-xtests/include.3.test24
-rwxr-xr-xtests/incr.1.test21
-rwxr-xr-xtests/index.1.test21
-rwxr-xr-xtests/indir.1.test23
-rwxr-xr-xtests/len.1.test21
-rwxr-xr-xtests/loops.1.test23
-rwxr-xr-xtests/loops.2.test26
-rwxr-xr-xtests/m4exit.1.test26
-rwxr-xr-xtests/m4wrap.1.test25
-rwxr-xr-xtests/patsubst.1.test27
-rwxr-xr-x[-rw-r--r--]tests/patsubst.2.test (renamed from checks/57.patsubst)20
-rwxr-xr-xtests/pseudoar.1.test25
-rwxr-xr-xtests/pseudoar.2.test21
-rwxr-xr-xtests/pseudoar.3.test21
-rwxr-xr-xtests/pseudoar.4.test27
-rwxr-xr-xtests/pseudoar.5.test21
-rwxr-xr-xtests/pushdef.1.test33
-rwxr-xr-xtests/pushdef.2.test33
-rwxr-xr-xtests/regexp.1.test21
-rwxr-xr-xtests/regexp.2.test19
-rw-r--r--tests/stamp-TESTS (renamed from checks/stamp-checks)0
-rwxr-xr-xtests/substr.1.test21
-rwxr-xr-xtests/sysval.1.test25
-rwxr-xr-xtests/trace.1.test33
-rwxr-xr-xtests/translit.1.test23
-rwxr-xr-xtests/undefine.1.test27
-rwxr-xr-xtests/undivert.1.test27
-rwxr-xr-xtests/undivert.2.test29
-rwxr-xr-xtests/undivert.3.test25
209 files changed, 5439 insertions, 3121 deletions
diff --git a/COPYING b/COPYING
index ee0775ea..60549be5 100644
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
- Appendix: How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -304,8 +304,9 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
Also add information on how to contact you by electronic and paper mail.
diff --git a/ChangeLog b/ChangeLog
index 6175db70..f65b4a67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,83 @@
+1998-09-06 Erick Branderhorst <Erick.Branderhorst@asml.nl>
+
+ * examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
+ wrap}.test: Added a few testcases.
+
+1998-08-21 Erick Branderhorst <Erick.Branderhorst@asml.nl>
+
+ * Prerelease 1.4h.
+
+ * lib/Makefile.am (noinst_HEADERS): regex.h added
+
+ * configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
+ acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
+
+ * acm4/Makefile.am: created providing rules to create
+ $(top_srcdir)/acinclude.m4 to be used by aclocal.
+
+ * tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
+ `C'. Reported by Ulrich Drepper.
+
+ * Makefile.am (SUBDIRS): Removed checks directory
+ * configure.in (AC_OUTPUT): Removed checks/Makefile
+
+ * doc/m4.texinfo (Patsubst,example): @comment added to preserve
+ the space when m4.texinfo is edited and whitespace.el is active.
+ (Defn,example): idem.
+
+1998-08-20 Erick Branderhorst <Erick.Branderhorst@asml.nl>
+
+ * doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
+ ../COPYING. ../Makefile is a file which is certainly present when
+ test is executed in testSubDir. One can't be sure that the COPYING
+ file is in .. or ../.. in all situations, the ../Makefile is
+ always there.
+
+ * doc/m4.texinfo (Include): adjusted expected test output
+ according to new tests, i.e. the input will always come from the
+ file `in' created by the test.
+
+ * tests/Makefile.am: Added three lines at the top to get
+ esyscmd.1.test working.
+
+ * tests/get-them: modified to generate clearer tests who will need
+ less maintenance when new test examples are created in
+ `doc/m4.texinfo'. All tests are small (nearly stand-alone, they
+ need the generic file `defs') shell scripts creating `in', `ok',
+ `out' and when apropriate `okerr' and `err' in the directory
+ `testSubDir' when executed. The compare of `ok' and `out'
+ (and of `okerr' and `err') will be the exit status of the test.
+ `out' must match `ok' (and `okerr' must match `err') for the test
+ to be succesful.
+
+ * tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
+ the tests generated by tests/get-them getting it input normally
+ from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
+ (dot) before the numeric part) is reserved for all other (hand
+ written) tests. The `+' means one or more times.
+
+1998-08-12 Erick Branderhorst <Erick.Branderhorst@asml.nl>
+
+ * doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
+ supported short man page to refer to info documentation
+ * helptoman.pl: added
+ * configure.in: AC_PATH_PROG(PERL,perl)
+ * Makefile.am (SUBDIRS): doc after src
+
+ * libitized with libit 0.5 from
+ ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
+
+ * configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
+ * lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
+ replacement functions, (libm4_a_LIBADD): @LIBOBJS@
+ * configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
+ lib/rx.{c,h}: added
+ * configure.in (AC_CHECK_FUNC): getopt_long
+
+ * src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
+
+ * TODO: added entry about dependencies
+
1998-08-10 Rene' Seindal <rene@seindal.dk>
* Prerelease 1.4f
@@ -404,7 +484,7 @@ Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
Reported by David MacKenzie.
Freeze diversions:
- * output.c (freeze_diversions): New function.
+ * output.c (freeze_diversions): New function.
* m4.h: Declare freeze_diversions.
* freeze.c: Document frozen file format, revise it, call
freeze_diversions to add diversions to frozen format, and code to
@@ -528,7 +608,7 @@ Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
* stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
error message, for when no code possibility exists. Even if this
- line is completely #ifdef'ed out, it brings a syntax error.
+ line is completely #ifdef'ed out, it brings a syntax error.
Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
* Makefile.in (install): Have install depend on all too, for lib
@@ -567,7 +647,7 @@ Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
* stackovf.c: Isolated OS-dependent sections; Improved portability,
adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
- handlers), and a default error message if the fault address is not
+ handlers), and a default error message if the fault address is not
available (when neither siginfo.h nor BSD sigcontext are supported).
* configure.in: Changes for stackovf.h: Check for sigcontext,
sigaction, sigstack, and define rlim_t as int if necessary.
@@ -623,11 +703,11 @@ Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
(ntoa): Declare value as eval_t instead of int. Declare uvalue as
unsigned_eval_t instead of unsigned int. Change casts accordingly.
(shipout_int): Cast first argument of ntoa to eval_t.
- Reported by Thorsten Ohl.
+ Reported by Thorsten Ohl.
* macro.c: Complete the prototypes of forwarded expand_macro and
expand_token.
- Reported by Thorsten Ohl.
+ Reported by Thorsten Ohl.
* m4.h: Define voidstar as void * or char * depending on __STDC__.
The Ultrix 3.1 compiler cannot do much with void pointers.
@@ -664,7 +744,7 @@ Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
* configure.in: Substitute CFLAGS and LDFLAGS, taking their value
from the environment. Default CFLAGS to -g if not set.
* Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
- * lib/Makefile.in: Have CFLAGS substituted from configure.
+ * lib/Makefile.in: Have CFLAGS substituted from configure.
Reported by Eric Backus and Tom McConnell.
* configure.in: m4_undefine changeword before using AC_ENABLE.
@@ -702,7 +782,7 @@ Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
[These modifs all depend upon ENABLE_CHANGEWORD and are adapted
from code provided by Pete Chown]
* m4.h: Add original_text field to u_t variant of union u.
- Declare TOKEN_DATA_FUNC macro.
+ Declare TOKEN_DATA_FUNC macro.
* builtin.c: Declare changeword.
(m4_changeword): New function.
* input.c: Include "regex.h", define variables with word regexps.
@@ -1124,7 +1204,7 @@ Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
* m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
Merge parse_args into main. Declare argv to be `char *const *',
- then remove superfluous casts.
+ then remove superfluous casts.
* m4.c: Rename --no-gnu-extensions to --traditional.
Reported by Ben A. Mesander.
@@ -1464,7 +1544,7 @@ Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
* Many *.[hc] files: Correct intra-line spacing here and there,
according to GNU indent 1.6 advice.
-
+
* configure.in: New, using Autoconf 1.2.
* m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
* Delete old configure.in, configure, etc/configure.in,
diff --git a/INSTALL b/INSTALL
index a2c8722c..50dbe439 100644
--- a/INSTALL
+++ b/INSTALL
@@ -167,7 +167,9 @@ operates.
`--quiet'
`--silent'
`-q'
- Do not print messages saying which checks are being made.
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
diff --git a/Makefile.am b/Makefile.am
index 68d1a667..83a58432 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,18 @@
-SUBDIRS=intl po doc lib src checks examples
+AUTOMAKE_OPTIONS = 1.3b gnits
-EXTRA_DIST = gettext.m4 c-boxes.el # Franc,ois, is this still needed? (EB)
+SUBDIRS = acm4 intl po lib src doc examples tests
+# Tag before making distribution. Also, don't make a distribution if
+# checks fail. Also, make sure the NEWS file is up-to-date.
+cvs-dist: # distcheck # maintainer-check
+ cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
+ $(MAKE) dist
+
+cvs-diff:
+ thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
+ if test -z "$$OLDVERSION"; then \
+ prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
+ else prevno="$$OLDVERSION"; fi; \
+ prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
+ cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
+ > $(PACKAGE)-$$prevno-$(VERSION).diff
diff --git a/Makefile.in b/Makefile.in
index 59e6733c..7531ee7c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,7 +32,7 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DISTDIR =
+DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -77,6 +77,7 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
+PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
@@ -87,17 +88,17 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
-SUBDIRS=intl po doc lib src checks examples
+AUTOMAKE_OPTIONS = 1.3b gnits
-EXTRA_DIST = gettext.m4 c-boxes.el # Franc,ois, is this still needed? (EB)
+SUBDIRS = acm4 intl po lib src doc examples tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README ABOUT-NLS AUTHORS BACKLOG COPYING ChangeLog \
-INSTALL Makefile.am Makefile.in NEWS THANKS TODO acconfig.h aclocal.m4 \
-config.guess config.h.in config.sub configure configure.in install-sh \
-missing mkinstalldirs stamp-h.in
+INSTALL Makefile.am Makefile.in NEWS THANKS TODO acconfig.h \
+acinclude.m4 aclocal.m4 config.guess config.h.in config.sub configure \
+configure.in install-sh missing mkinstalldirs stamp-h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -108,16 +109,16 @@ all: all-recursive-am all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
+ cd $(top_srcdir) && $(AUTOMAKE) --gnits --include-deps Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): configure.in
+$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
-config.status: $(srcdir)/configure
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
@@ -159,7 +160,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $$target) \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
@@ -172,12 +173,12 @@ maintainer-clean-recursive:
for subdir in $$rev; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $$target) \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) tags); \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
@@ -222,12 +223,12 @@ distcheck: dist
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) dvi \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) installcheck \
- && $(MAKE) dist
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@echo "========================"; \
echo "$(distdir).tar.gz is ready for distribution"; \
@@ -241,6 +242,10 @@ dist-all: distdir
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
+ @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
+ echo "NEWS not updated; not releasing" 1>&2; \
+ exit 1; \
+ fi
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@@ -255,16 +260,16 @@ distdir: $(DISTFILES)
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
done
info: info-recursive
dvi: dvi-recursive
check: all-am
- $(MAKE) check-recursive
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
installcheck: installcheck-recursive
all-recursive-am: config.h
- $(MAKE) all-recursive
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
all-am: Makefile config.h
@@ -280,24 +285,19 @@ install: install-recursive
uninstall: uninstall-recursive
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs: installdirs-recursive
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
@@ -332,6 +332,21 @@ clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
+# Tag before making distribution. Also, don't make a distribution if
+# checks fail. Also, make sure the NEWS file is up-to-date.
+cvs-dist: # distcheck # maintainer-check
+ cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
+ $(MAKE) dist
+
+cvs-diff:
+ thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
+ if test -z "$$OLDVERSION"; then \
+ prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
+ else prevno="$$OLDVERSION"; fi; \
+ prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
+ cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
+ > $(PACKAGE)-$$prevno-$(VERSION).diff
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/NEWS b/NEWS
index 6d229276..22dd22a1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
GNU m4 NEWS - History of user-visible changes. -*-indented-text-*-
Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
-Version 1.5 - August 1998, Erick Branderhorst and Rene' Seindal
+Version 1.5 (1.4h) - August 1998, Erick Branderhorst and Rene' Seindal
* GNU m4 now uses gettext to support internationalization.
diff --git a/TODO b/TODO
index 3da61db6..136ff5d7 100644
--- a/TODO
+++ b/TODO
@@ -10,6 +10,10 @@ Some TODO items are implicit from received email. See file BACKLOG.
. + Study synclines at the very beginning of each diverted sequence
. + Make eval work on bignums - the 32 bits limit is artificial
From Krste Asanovic <krste@icsi.berkeley.edu>, 1993-03-20
+. + Make show include dependencies like gcc so targets are updated
+ when their (included) input files are updated (Erick B).
+. + Ask FSF to create m4-bugs@gnu.org for bug reports (Erick B).
+. + m4wrap.1.test fail on Solaris 2.6 using egcs 1.1a compiler (Erick B).
.* Optimization and clean up
. + Check for memory leaks and uninitialized reads
@@ -31,7 +35,7 @@ Some TODO items are implicit from received email. See file BACKLOG.
GNU m4 is lousy regarding NULs in streams (this would require
maintaining the string lengths, and avoiding strlen, strcpy,
- etc.).
+ etc.).
. + Clean up the obstack.[ch] code
. + Use rx.[ch] instead of regex.[ch]
From Hal Peterson <hrp@ironwood.cray.com>, 1994-04-22
diff --git a/acconfig.h b/acconfig.h
index efc4649d..280125ae 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -67,3 +67,5 @@
/* Define to 1 if using the `glocale' package for message catalogs. */
#undef WITH_CATALOGS
+
+#undef WITH_REGEX
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..a670f1cb
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,418 @@
+#serial 1
+
+dnl FIXME: put these prerequisite-only *.m4 files in a separate
+dnl directory -- otherwise, they'll conflict with existing files.
+
+dnl These are the prerequisite macros for GNU's error.c file.
+AC_DEFUN(jm_PREREQ_ERROR,
+[
+ AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
+ AC_HEADER_STDC
+])
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# Modified for GNU m4 by René Seindal (rene@seindal.dk)
+
+# serial 5
+
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, gettext,
+ [LIBS="$LIBS -lintl"
+ gt_cv_func_gettext_libintl=yes],
+ [gt_cv_func_gettext_libintl=no])])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi])
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next])
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ AC_CHECK_FUNCS(stpcpy)
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ AC_DEFINE(HAVE_STPCPY)
+ fi
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+
+#serial 2
+
+dnl Derived from code in GNU grep.
+
+AC_DEFUN(jm_WITH_REGEX,
+ [
+ dnl Even packages that don't use regex.c can use this macro.
+ dnl Of course, for them it doesn't do anything.
+
+ syscmd([test -f lib/regex.c])
+ ifelse(sysval, 0,
+ [
+ AC_ARG_WITH(included-regex,
+ [ --without-included-regex don't compile regex (use with caution)],
+ jm_with_regex=$withval,
+ jm_with_regex=yes)
+ if test "$jm_with_regex" = yes; then
+ LIBOBJS="$LIBOBJS regex.o"
+ fi
+ ],
+ )
+ ]
+)
diff --git a/aclocal.m4 b/aclocal.m4
index c0651f72..a61990a6 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-dnl aclocal.m4 generated automatically by aclocal 1.3
+dnl aclocal.m4 generated automatically by aclocal 1.3b
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
+dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,258 +10,17 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
+#serial 1
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
+dnl FIXME: put these prerequisite-only *.m4 files in a separate
+dnl directory -- otherwise, they'll conflict with existing files.
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-
-# serial 1
-
-AC_DEFUN(AM_C_PROTOTYPES,
-[AC_REQUIRE([AM_PROG_CC_STDC])
-AC_REQUIRE([AC_PROG_CPP])
-AC_MSG_CHECKING([for function prototypes])
-if test "$am_cv_prog_cc_stdc" != no; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(PROTOTYPES)
- U= ANSI2KNR=
-else
- AC_MSG_RESULT(no)
- U=_ ANSI2KNR=./ansi2knr
- # Ensure some checks needed by ansi2knr itself.
+dnl These are the prerequisite macros for GNU's error.c file.
+AC_DEFUN(jm_PREREQ_ERROR,
+[
+ AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
AC_HEADER_STDC
- AC_CHECK_HEADERS(string.h)
-fi
-AC_SUBST(U)dnl
-AC_SUBST(ANSI2KNR)dnl
-])
-
-
-# serial 1
-
-# @defmac AC_PROG_CC_STDC
-# @maindex PROG_CC_STDC
-# @ovindex CC
-# If the C compiler in not in ANSI C mode by default, try to add an option
-# to output variable @code{CC} to make it so. This macro tries various
-# options that select ANSI C on some system or another. It considers the
-# compiler to be in ANSI C mode if it handles function prototypes correctly.
-#
-# If you use this macro, you should check after calling it whether the C
-# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
-# program @code{ansi2knr}, which comes with Ghostscript.
-# @end defmac
-
-AC_DEFUN(AM_PROG_CC_STDC,
-[AC_REQUIRE([AC_PROG_CC])
-AC_BEFORE([$0], [AC_C_INLINE])
-AC_BEFORE([$0], [AC_C_CONST])
-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
-dnl a magic option to avoid problems with ANSI preprocessor commands
-dnl like #elif.
-dnl FIXME: can't do this because then AC_AIX won't work due to a
-dnl circular dependency.
-dnl AC_BEFORE([$0], [AC_PROG_CPP])
-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
-AC_CACHE_VAL(am_cv_prog_cc_stdc,
-[am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- AC_TRY_COMPILE(
-[#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-], [
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
-],
-[am_cv_prog_cc_stdc="$ac_arg"; break])
-done
-CC="$ac_save_CC"
])
-if test -z "$am_cv_prog_cc_stdc"; then
- AC_MSG_RESULT([none needed])
-else
- AC_MSG_RESULT($am_cv_prog_cc_stdc)
-fi
-case "x$am_cv_prog_cc_stdc" in
- x|xno) ;;
- *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-])
-
-
-# serial 1
-
-AC_DEFUN(AM_WITH_DMALLOC,
-[AC_MSG_CHECKING(if malloc debugging is wanted)
-AC_ARG_WITH(dmalloc,
-[ --with-dmalloc use dmalloc, as in
- ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
-[if test "$withval" = yes; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_DMALLOC)
- LIBS="$LIBS -ldmalloc"
- LDFLAGS="$LDFLAGS -g"
-else
- AC_MSG_RESULT(no)
-fi], [AC_MSG_RESULT(no)])
-])
-
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
@@ -646,4 +405,279 @@ AC_DEFUN(AM_LC_MESSAGES,
fi
fi])
+#serial 2
+
+dnl Derived from code in GNU grep.
+
+AC_DEFUN(jm_WITH_REGEX,
+ [
+ dnl Even packages that don't use regex.c can use this macro.
+ dnl Of course, for them it doesn't do anything.
+
+ syscmd([test -f lib/regex.c])
+ ifelse(sysval, 0,
+ [
+ AC_ARG_WITH(included-regex,
+ [ --without-included-regex don't compile regex (use with caution)],
+ jm_with_regex=$withval,
+ jm_with_regex=yes)
+ if test "$jm_with_regex" = yes; then
+ LIBOBJS="$LIBOBJS regex.o"
+ fi
+ ],
+ )
+ ]
+)
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AM_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+
+# serial 1
+
+AC_DEFUN(AM_PROG_INSTALL,
+[AC_REQUIRE([AC_PROG_INSTALL])
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+AC_SUBST(INSTALL_SCRIPT)dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+
+# serial 1
+
+AC_DEFUN(AM_C_PROTOTYPES,
+[AC_REQUIRE([AM_PROG_CC_STDC])
+AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([for function prototypes])
+if test "$am_cv_prog_cc_stdc" != no; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(PROTOTYPES)
+ U= ANSI2KNR=
+else
+ AC_MSG_RESULT(no)
+ U=_ ANSI2KNR=./ansi2knr
+ # Ensure some checks needed by ansi2knr itself.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(string.h)
+fi
+AC_SUBST(U)dnl
+AC_SUBST(ANSI2KNR)dnl
+])
+
+
+# serial 1
+
+# @defmac AC_PROG_CC_STDC
+# @maindex PROG_CC_STDC
+# @ovindex CC
+# If the C compiler in not in ANSI C mode by default, try to add an option
+# to output variable @code{CC} to make it so. This macro tries various
+# options that select ANSI C on some system or another. It considers the
+# compiler to be in ANSI C mode if it handles function prototypes correctly.
+#
+# If you use this macro, you should check after calling it whether the C
+# compiler has been set to accept ANSI C; if not, the shell variable
+# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+# code in ANSI C, you can make an un-ANSIfied copy of it by using the
+# program @code{ansi2knr}, which comes with Ghostscript.
+# @end defmac
+
+AC_DEFUN(AM_PROG_CC_STDC,
+[AC_REQUIRE([AC_PROG_CC])
+AC_BEFORE([$0], [AC_C_INLINE])
+AC_BEFORE([$0], [AC_C_CONST])
+dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+dnl a magic option to avoid problems with ANSI preprocessor commands
+dnl like #elif.
+dnl FIXME: can't do this because then AC_AIX won't work due to a
+dnl circular dependency.
+dnl AC_BEFORE([$0], [AC_PROG_CPP])
+AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+AC_CACHE_VAL(am_cv_prog_cc_stdc,
+[am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ AC_TRY_COMPILE(
+[#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+], [
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+],
+[am_cv_prog_cc_stdc="$ac_arg"; break])
+done
+CC="$ac_save_CC"
+])
+if test -z "$am_cv_prog_cc_stdc"; then
+ AC_MSG_RESULT([none needed])
+else
+ AC_MSG_RESULT($am_cv_prog_cc_stdc)
+fi
+case "x$am_cv_prog_cc_stdc" in
+ x|xno) ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
+esac
+])
+
+
+# serial 1
+
+AC_DEFUN(AM_WITH_DMALLOC,
+[AC_MSG_CHECKING(if malloc debugging is wanted)
+AC_ARG_WITH(dmalloc,
+[ --with-dmalloc use dmalloc, as in
+ ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
+[if test "$withval" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WITH_DMALLOC)
+ LIBS="$LIBS -ldmalloc"
+ LDFLAGS="$LDFLAGS -g"
+else
+ AC_MSG_RESULT(no)
+fi], [AC_MSG_RESULT(no)])
+])
diff --git a/acm4/Makefile.am b/acm4/Makefile.am
new file mode 100644
index 00000000..1d2df7af
--- /dev/null
+++ b/acm4/Makefile.am
@@ -0,0 +1,12 @@
+EXTRA_DIST = $(ACINCLUDES_M4)
+
+ACINCLUDES_M4 = error.m4 gettext.m4 regex.m4
+
+ACINCLUDE_M4 = $(top_srcdir)/acinclude.m4
+
+all: $(ACINCLUDE_M4)
+
+$(ACINCLUDE_M4): $(ACINCLUDES_M4)
+ cat $(ACINCLUDES_M4) > $@
+ cd $(top_srcdir) && $(ACLOCAL)
+# cd $(top_srcdir) && $(MAKE)
diff --git a/checks/Makefile.in b/acm4/Makefile.in
index a347a799..77d1cdd7 100644
--- a/checks/Makefile.in
+++ b/acm4/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,7 +32,7 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DISTDIR =
+DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -77,6 +77,7 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
+PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
@@ -87,21 +88,11 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
-EXTRA_DIST = check-them foo get-them incl.m4 stamp-checks $(CHECKS)
-
-CHECKS = 01.define 02.define 03.arguments 04.arguments 05.arguments \
- 06.arguments 07.pseudo_argu 08.pseudo_argu 09.pseudo_argu \
- 10.pseudo_argu 11.pseudo_argu 12.undefine 13.defn 14.defn \
- 15.pushdef 16.pushdef 17.indir 18.ifdef 19.ifelse 20.ifelse \
- 21.loops 22.loops 23.dumpdef 24.trace 25.dnl 26.changequote \
- 27.changequote 28.changequote 29.changecom 30.changecom \
- 31.changesynta 32.changesynta 33.changesynta 34.changesynta \
- 35.changesynta 36.changesynta 37.changesynta 38.m4wrap \
- 39.include 40.include 41.include 42.divert 43.divert 44.undivert \
- 45.undivert 46.undivert 47.divnum 48.cleardiv 49.cleardiv 50.len \
- 51.index 52.regexp 53.regexp 54.substr 55.translit 56.patsubst \
- 57.patsubst 58.format 59.incr 60.eval 61.eval 62.esyscmd \
- 63.sysval 64.errprint 65.errprint 66.m4exit
+EXTRA_DIST = $(ACINCLUDES_M4)
+
+ACINCLUDES_M4 = error.m4 gettext.m4 regex.m4
+
+ACINCLUDE_M4 = $(top_srcdir)/acinclude.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@@ -116,7 +107,7 @@ all: Makefile
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps checks/Makefile
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps acm4/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
@@ -128,7 +119,7 @@ TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-subdir = checks
+subdir = acm4
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
@@ -140,7 +131,6 @@ distdir: $(DISTFILES)
info:
dvi:
check: all
- $(MAKE)
installcheck:
install-exec:
@$(NORMAL_INSTALL)
@@ -154,24 +144,19 @@ install: install-exec install-data all
uninstall:
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-generic
clean: clean-generic mostlyclean
@@ -189,16 +174,12 @@ clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
-all: stamp-checks
-
-stamp-checks: get-them ../doc/m4.texinfo
- rm -f $(srcdir)/$(CHECKS)
- cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
- touch $(srcdir)/stamp-checks
+all: $(ACINCLUDE_M4)
-check: stamp-checks
- PATH=`pwd`/../src:$$PATH; export PATH; \
- cd $(srcdir) && ./check-them $(CHECKS)
+$(ACINCLUDE_M4): $(ACINCLUDES_M4)
+ cat $(ACINCLUDES_M4) > $@
+ cd $(top_srcdir) && $(ACLOCAL)
+# cd $(top_srcdir) && $(MAKE)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/acm4/error.m4 b/acm4/error.m4
new file mode 100644
index 00000000..eb0f776b
--- /dev/null
+++ b/acm4/error.m4
@@ -0,0 +1,11 @@
+#serial 1
+
+dnl FIXME: put these prerequisite-only *.m4 files in a separate
+dnl directory -- otherwise, they'll conflict with existing files.
+
+dnl These are the prerequisite macros for GNU's error.c file.
+AC_DEFUN(jm_PREREQ_ERROR,
+[
+ AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
+ AC_HEADER_STDC
+])
diff --git a/gettext.m4 b/acm4/gettext.m4
index 969d0922..969d0922 100644
--- a/gettext.m4
+++ b/acm4/gettext.m4
diff --git a/acm4/regex.m4 b/acm4/regex.m4
new file mode 100644
index 00000000..e5468c65
--- /dev/null
+++ b/acm4/regex.m4
@@ -0,0 +1,23 @@
+#serial 2
+
+dnl Derived from code in GNU grep.
+
+AC_DEFUN(jm_WITH_REGEX,
+ [
+ dnl Even packages that don't use regex.c can use this macro.
+ dnl Of course, for them it doesn't do anything.
+
+ syscmd([test -f lib/regex.c])
+ ifelse(sysval, 0,
+ [
+ AC_ARG_WITH(included-regex,
+ [ --without-included-regex don't compile regex (use with caution)],
+ jm_with_regex=$withval,
+ jm_with_regex=yes)
+ if test "$jm_with_regex" = yes; then
+ LIBOBJS="$LIBOBJS regex.o"
+ fi
+ ],
+ )
+ ]
+)
diff --git a/c-boxes.el b/c-boxes.el
deleted file mode 100644
index c1b80e33..00000000
--- a/c-boxes.el
+++ /dev/null
@@ -1,406 +0,0 @@
-;;; Boxed comments for C mode.
-;;; Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-;;; Francois Pinard <pinard@iro.umontreal.ca>, April 1991.
-;;;
-;;; I often refill paragraphs inside C comments, while stretching or
-;;; shrinking the surrounding box as needed. This is a real pain to
-;;; do by hand. Here is the code I made to ease my life on this,
-;;; usable from within GNU Emacs. It would not be fair giving all
-;;; sources for a product without also giving the means for nicely
-;;; modifying them.
-;;;
-;;; The function rebox-c-comment adjust comment boxes without
-;;; refilling comment paragraphs, while reindent-c-comment adjust
-;;; comment boxes after refilling. Numeric prefixes are used to add,
-;;; remove, or change the style of the box surrounding the comment.
-;;; Since refilling paragraphs in C mode does make sense only for
-;;; comments, this code redefines the M-q command in C mode. I use
-;;; this hack by putting, in my .emacs file:
-;;;
-;;; (setq c-mode-hook
-;;; '(lambda ()
-;;; (define-key c-mode-map "\M-q" 'reindent-c-comment)))
-;;; (autoload 'rebox-c-comment "c-boxes" nil t)
-;;; (autoload 'reindent-c-comment "c-boxes" nil t)
-;;;
-;;; The cursor should be within a comment before any of these
-;;; commands, or else it should be between two comments, in which case
-;;; the command applies to the next comment. When the command is
-;;; given without prefix, the current comment box type is recognized
-;;; and preserved. Given 0 as a prefix, the comment box disappears
-;;; and the comment stays between a single opening `/*' and a single
-;;; closing `*/'. Given 1 or 2 as a prefix, a single or doubled lined
-;;; comment box is forced. Given 3 as a prefix, a Taarna style box is
-;;; forced, but you do not even want to hear about those. When a
-;;; negative prefix is given, the absolute value is used, but the
-;;; default style is changed. Any other value (like C-u alone) forces
-;;; the default box style.
-;;;
-;;; I observed rounded corners first in some code from Warren Tucker
-;;; <wht@n4hgf.mt-park.ga.us>.
-
-(defvar c-box-default-style 'single "*Preferred style for box comments.")
-(defvar c-mode-taarna-style nil "*Non-nil for Taarna team C-style.")
-
-;;; Set or reset the Taarna team's own way for a C style.
-
-(defun taarna-mode ()
- (interactive)
- (if c-mode-taarna-style
- (progn
-
- (setq c-mode-taarna-style nil)
- (setq c-indent-level 2)
- (setq c-continued-statement-offset 2)
- (setq c-brace-offset 0)
- (setq c-argdecl-indent 5)
- (setq c-label-offset -2)
- (setq c-tab-always-indent t)
- (setq c-box-default-style 'single)
- (message "C mode: GNU style"))
-
- (setq c-mode-taarna-style t)
- (setq c-indent-level 4)
- (setq c-continued-statement-offset 4)
- (setq c-brace-offset -4)
- (setq c-argdecl-indent 4)
- (setq c-label-offset -4)
- (setq c-tab-always-indent t)
- (setq c-box-default-style 'taarna)
- (message "C mode: Taarna style")))
-
-;;; Return the minimum value of the left margin of all lines, or -1 if
-;;; all lines are empty.
-
-(defun buffer-left-margin ()
- (let ((margin -1))
- (goto-char (point-min))
- (while (not (eobp))
- (skip-chars-forward " \t")
- (if (not (looking-at "\n"))
- (setq margin
- (if (< margin 0)
- (current-column)
- (min margin (current-column)))))
- (forward-line 1))
- margin))
-
-;;; Return the maximum value of the right margin of all lines. Any
-;;; sentence ending a line has a space guaranteed before the margin.
-
-(defun buffer-right-margin ()
- (let ((margin 0) period)
- (goto-char (point-min))
- (while (not (eobp))
- (end-of-line)
- (if (bobp)
- (setq period 0)
- (backward-char 1)
- (setq period (if (looking-at "[.?!]") 1 0))
- (forward-char 1))
- (setq margin (max margin (+ (current-column) period)))
- (forward-char 1))
- margin))
-
-;;; Add, delete or adjust a C comment box. If FLAG is nil, the
-;;; current boxing style is recognized and preserved. When 0, the box
-;;; is removed; when 1, a single lined box is forced; when 2, a double
-;;; lined box is forced; when 3, a Taarna style box is forced. If
-;;; negative, the absolute value is used, but the default style is
-;;; changed. For any other value (like C-u), the default style is
-;;; forced. If REFILL is not nil, refill the comment paragraphs prior
-;;; to reboxing.
-
-(defun rebox-c-comment-engine (flag refill)
- (save-restriction
- (let ((undo-list buffer-undo-list)
- (marked-point (point-marker))
- (saved-point (point))
- box-style left-margin right-margin)
-
- ;; First, find the limits of the block of comments following or
- ;; enclosing the cursor, or return an error if the cursor is not
- ;; within such a block of comments, narrow the buffer, and
- ;; untabify it.
-
- ;; - insure the point is into the following comment, if any
-
- (skip-chars-forward " \t\n")
- (if (looking-at "/\\*")
- (forward-char 2))
-
- (let ((here (point)) start end temp)
-
- ;; - identify a minimal comment block
-
- (search-backward "/*")
- (setq temp (point))
- (beginning-of-line)
- (setq start (point))
- (skip-chars-forward " \t")
- (if (< (point) temp)
- (progn
- (goto-char saved-point)
- (error "text before comment's start")))
- (search-forward "*/")
- (setq temp (point))
- (end-of-line)
- (if (looking-at "\n")
- (forward-char 1))
- (setq end (point))
- (skip-chars-backward " \t\n")
- (if (> (point) temp)
- (progn
- (goto-char saved-point)
- (error "text after comment's end")))
- (if (< end here)
- (progn
- (goto-char saved-point)
- (error "outside any comment block")))
-
- ;; - try to extend the comment block backwards
-
- (goto-char start)
- (while (and (not (bobp))
- (progn (previous-line 1)
- (beginning-of-line)
- (looking-at "[ \t]*/\\*.*\\*/[ \t]*$")))
- (setq start (point)))
-
- ;; - try to extend the comment block forward
-
- (goto-char end)
- (while (looking-at "[ \t]*/\\*.*\\*/[ \t]*$")
- (forward-line 1)
- (beginning-of-line)
- (setq end (point)))
-
- ;; - narrow to the whole block of comments
-
- (narrow-to-region start end))
-
- ;; Second, remove all the comment marks, and move all the text
- ;; rigidly to the left to insure the left margin stays at the
- ;; same place. At the same time, recognize and save the box
- ;; style in BOX-STYLE.
-
- (let ((previous-margin (buffer-left-margin))
- actual-margin)
-
- ;; - remove all comment marks
-
- (goto-char (point-min))
- (replace-regexp "^\\([ \t]*\\)/\\*" "\\1 ")
- (goto-char (point-min))
- (replace-regexp "^\\([ \t]*\\)|" "\\1 ")
- (goto-char (point-min))
- (replace-regexp "\\(\\*/\\||\\)[ \t]*" "")
- (goto-char (point-min))
- (replace-regexp "\\*/[ \t]*/\\*" " ")
-
- ;; - remove the first and last dashed lines
-
- (setq box-style 'plain)
- (goto-char (point-min))
- (if (looking-at "^[ \t]*-*[.\+\\]?[ \t]*\n")
- (progn
- (setq box-style 'single)
- (replace-match ""))
- (if (looking-at "^[ \t]*=*[.\+\\]?[ \t]*\n")
- (progn
- (setq box-style 'double)
- (replace-match ""))))
- (goto-char (point-max))
- (previous-line 1)
- (beginning-of-line)
- (if (looking-at "^[ \t]*[`\+\\]?*[-=]+[ \t]*\n")
- (progn
- (if (eq box-style 'plain)
- (setq box-style 'taarna))
- (replace-match "")))
-
- ;; - remove all spurious whitespace
-
- (goto-char (point-min))
- (replace-regexp "[ \t]+$" "")
- (goto-char (point-min))
- (if (looking-at "\n+")
- (replace-match ""))
- (goto-char (point-max))
- (skip-chars-backward "\n")
- (if (looking-at "\n\n+")
- (replace-match "\n"))
- (goto-char (point-min))
- (replace-regexp "\n\n\n+" "\n\n")
-
- ;; - move the text left is adequate
-
- (setq actual-margin (buffer-left-margin))
- (if (not (= previous-margin actual-margin))
- (indent-rigidly (point-min) (point-max)
- (- previous-margin actual-margin))))
-
- ;; Third, select the new box style from the old box style and
- ;; the argument, choose the margins for this style and refill
- ;; each paragraph.
-
- ;; - modify box-style only if flag is defined
-
- (if flag
- (setq box-style
- (cond ((eq flag 0) 'plain)
- ((eq flag 1) 'single)
- ((eq flag 2) 'double)
- ((eq flag 3) 'taarna)
- ((eq flag '-) (setq c-box-default-style 'plain) 'plain)
- ((eq flag -1) (setq c-box-default-style 'single) 'single)
- ((eq flag -2) (setq c-box-default-style 'double) 'double)
- ((eq flag -3) (setq c-box-default-style 'taarna) 'taarna)
- (t c-box-default-style))))
-
- ;; - compute the left margin
-
- (setq left-margin (buffer-left-margin))
-
- ;; - temporarily set the fill prefix and column, then refill
-
- (untabify (point-min) (point-max))
-
- (if refill
- (let ((fill-prefix (make-string left-margin ? ))
- (fill-column (- fill-column
- (if (memq box-style '(single double)) 4 6))))
- (fill-region (point-min) (point-max))))
-
- ;; - compute the right margin after refill
-
- (setq right-margin (buffer-right-margin))
-
- ;; Fourth, put the narrowed buffer back into a comment box,
- ;; according to the value of box-style. Values may be:
- ;; plain: insert between a single pair of comment delimiters
- ;; single: complete box, overline and underline with dashes
- ;; double: complete box, overline and underline with equal signs
- ;; taarna: comment delimiters on each line, underline with dashes
-
- ;; - move the right margin to account for left inserts
-
- (setq right-margin (+ right-margin
- (if (memq box-style '(single double))
- 2
- 3)))
-
- ;; - construct the box comment, from top to bottom
-
- (goto-char (point-min))
- (cond ((eq box-style 'plain)
-
- ;; - construct a plain style comment
-
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "/* ")
- (end-of-line)
- (forward-char 1)
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- " ")
- (end-of-line)
- (forward-char 1))
- (backward-char 1)
- (insert " */"))
- ((eq box-style 'single)
-
- ;; - construct a single line style comment
-
- (indent-to left-margin)
- (insert "/*")
- (insert (make-string (- right-margin (current-column)) ?-)
- "-.\n")
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "| ")
- (end-of-line)
- (indent-to right-margin)
- (insert " |")
- (forward-char 1))
- (indent-to left-margin)
- (insert "`")
- (insert (make-string (- right-margin (current-column)) ?-)
- "*/\n"))
- ((eq box-style 'double)
-
- ;; - construct a double line style comment
-
- (indent-to left-margin)
- (insert "/*")
- (insert (make-string (- right-margin (current-column)) ?=)
- "=\\\n")
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "| ")
- (end-of-line)
- (indent-to right-margin)
- (insert " |")
- (forward-char 1))
- (indent-to left-margin)
- (insert "\\")
- (insert (make-string (- right-margin (current-column)) ?=)
- "*/\n"))
- ((eq box-style 'taarna)
-
- ;; - construct a Taarna style comment
-
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "/* ")
- (end-of-line)
- (indent-to right-margin)
- (insert " */")
- (forward-char 1))
- (indent-to left-margin)
- (insert "/* ")
- (insert (make-string (- right-margin (current-column)) ?-)
- " */\n"))
- (t (error "unknown box style")))
-
- ;; Fifth, retabify, restore the point position, then cleanup the
- ;; undo list of any boundary since we started.
-
- ;; - retabify before left margin only (adapted from tabify.el)
-
- (goto-char (point-min))
- (while (re-search-forward "^[ \t][ \t][ \t]*" nil t)
- (let ((column (current-column))
- (indent-tabs-mode t))
- (delete-region (match-beginning 0) (point))
- (indent-to column)))
-
- ;; - restore the point position
-
- (goto-char (marker-position marked-point))
-
- ;; - remove all intermediate boundaries from the undo list
-
- (if (not (eq buffer-undo-list undo-list))
- (let ((cursor buffer-undo-list))
- (while (not (eq (cdr cursor) undo-list))
- (if (car (cdr cursor))
- (setq cursor (cdr cursor))
- (rplacd cursor (cdr (cdr cursor))))))))))
-
-;;; Rebox a C comment without refilling it.
-
-(defun rebox-c-comment (flag)
- (interactive "P")
- (rebox-c-comment-engine flag nil))
-
-;;; Rebox a C comment after refilling.
-
-(defun reindent-c-comment (flag)
- (interactive "P")
- (rebox-c-comment-engine flag t))
diff --git a/checks/01.define b/checks/01.define
deleted file mode 100644
index 7645704f..00000000
--- a/checks/01.define
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:885: Origin of test
-define(`foo', `Hello world.')
-dnl @result{}
-foo
-dnl @result{}Hello world.
diff --git a/checks/02.define b/checks/02.define
deleted file mode 100644
index de8bc66d..00000000
--- a/checks/02.define
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:905: Origin of test
-define(`array', `defn(format(``array[%d]'', `$1'))')
-dnl @result{}
-define(`array_set', `define(format(``array[%d]'', `$1'), `$2')')
-dnl @result{}
-array_set(4, `array element no. 4')
-dnl @result{}
-array_set(17, `array element no. 17')
-dnl @result{}
-array(4)
-dnl @result{}array element no. 4
-array(eval(10+7))
-dnl @result{}array element no. 17
diff --git a/checks/03.arguments b/checks/03.arguments
deleted file mode 100644
index 47360463..00000000
--- a/checks/03.arguments
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:934: Origin of test
-define(`exch', `$2, $1')
-dnl @result{}
-exch(arg1, arg2)
-dnl @result{}arg2, arg1
diff --git a/checks/04.arguments b/checks/04.arguments
deleted file mode 100644
index 4cbfbca8..00000000
--- a/checks/04.arguments
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:944: Origin of test
-define(`exch', `$2, $1')
-dnl @result{}
-define(exch(``expansion text'', ``macro''))
-dnl @result{}
-macro
-dnl @result{}expansion text
diff --git a/checks/05.arguments b/checks/05.arguments
deleted file mode 100644
index 2a9ac33f..00000000
--- a/checks/05.arguments
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:964: Origin of test
-define(`test', ``Macro name: $0'')
-dnl @result{}
-test
-dnl @result{}Macro name: test
diff --git a/checks/06.arguments b/checks/06.arguments
deleted file mode 100644
index b866e6c9..00000000
--- a/checks/06.arguments
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:974: Origin of test
-define(`foo', `This is macro `foo'.')
-dnl @result{}
-foo
-dnl @result{}This is macro foo.
diff --git a/checks/07.pseudo_argu b/checks/07.pseudo_argu
deleted file mode 100644
index d03159ca..00000000
--- a/checks/07.pseudo_argu
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:998: Origin of test
-define(`nargs', `$#')
-dnl @result{}
-nargs
-dnl @result{}0
-nargs()
-dnl @result{}1
-nargs(arg1, arg2, arg3)
-dnl @result{}3
diff --git a/checks/08.pseudo_argu b/checks/08.pseudo_argu
deleted file mode 100644
index bbc26f5d..00000000
--- a/checks/08.pseudo_argu
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:1012: Origin of test
-define(`echo', `$*')
-dnl @result{}
-echo(arg1, arg2, arg3 , arg4)
-dnl @result{}arg1,arg2,arg3 ,arg4
diff --git a/checks/09.pseudo_argu b/checks/09.pseudo_argu
deleted file mode 100644
index 9fa15eba..00000000
--- a/checks/09.pseudo_argu
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:1023: Origin of test
-define(`echo', `$@')
-dnl @result{}
-echo(arg1, arg2, arg3 , arg4)
-dnl @result{}arg1,arg2,arg3 ,arg4
diff --git a/checks/10.pseudo_argu b/checks/10.pseudo_argu
deleted file mode 100644
index 049af0a2..00000000
--- a/checks/10.pseudo_argu
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:1033: Origin of test
-define(`echo1', `$*')
-dnl @result{}
-define(`echo2', `$@')
-dnl @result{}
-define(`foo', `This is macro `foo'.')
-dnl @result{}
-echo1(foo)
-dnl @result{}This is macro This is macro foo..
-echo2(foo)
-dnl @result{}This is macro foo.
diff --git a/checks/11.pseudo_argu b/checks/11.pseudo_argu
deleted file mode 100644
index dd46c979..00000000
--- a/checks/11.pseudo_argu
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:1053: Origin of test
-define(`foo', `$$$ hello $$$')
-dnl @result{}
-foo
-dnl @result{}$$$ hello $$$
diff --git a/checks/12.undefine b/checks/12.undefine
deleted file mode 100644
index 1f61131d..00000000
--- a/checks/12.undefine
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:1084: Origin of test
-foo
-dnl @result{}foo
-define(`foo', `expansion text')
-dnl @result{}
-foo
-dnl @result{}expansion text
-undefine(`foo')
-dnl @result{}
-foo
-dnl @result{}foo
diff --git a/checks/13.defn b/checks/13.defn
deleted file mode 100644
index 1deb3f44..00000000
--- a/checks/13.defn
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1128: Origin of test
-define(`zap', defn(`undefine'))
-dnl @result{}
-zap(`undefine')
-dnl @result{}
-undefine(`zap')
-dnl @result{}undefine(zap)
diff --git a/checks/14.defn b/checks/14.defn
deleted file mode 100644
index 11ece953..00000000
--- a/checks/14.defn
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1148: Origin of test
-define(`string', `The macro dnl is very useful
-')
-dnl @result{}
-string
-dnl @result{}The macro
-defn(`string')
-dnl @result{}The macro dnl is very useful
-dnl @result{}
diff --git a/checks/15.pushdef b/checks/15.pushdef
deleted file mode 100644
index df2859af..00000000
--- a/checks/15.pushdef
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl ../doc/m4.texinfo:1192: Origin of test
-define(`foo', `Expansion one.')
-dnl @result{}
-foo
-dnl @result{}Expansion one.
-pushdef(`foo', `Expansion two.')
-dnl @result{}
-foo
-dnl @result{}Expansion two.
-popdef(`foo')
-dnl @result{}
-foo
-dnl @result{}Expansion one.
-popdef(`foo')
-dnl @result{}
-foo
-dnl @result{}foo
diff --git a/checks/16.pushdef b/checks/16.pushdef
deleted file mode 100644
index 48c0cec6..00000000
--- a/checks/16.pushdef
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl ../doc/m4.texinfo:1216: Origin of test
-define(`foo', `Expansion one.')
-dnl @result{}
-foo
-dnl @result{}Expansion one.
-pushdef(`foo', `Expansion two.')
-dnl @result{}
-foo
-dnl @result{}Expansion two.
-define(`foo', `Second expansion two.')
-dnl @result{}
-foo
-dnl @result{}Second expansion two.
-undefine(`foo')
-dnl @result{}
-foo
-dnl @result{}foo
diff --git a/checks/17.indir b/checks/17.indir
deleted file mode 100644
index d573a386..00000000
--- a/checks/17.indir
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1267: Origin of test
-define(`$$internal$macro', `Internal macro (name `$0')')
-dnl @result{}
-$$internal$macro
-dnl @result{}$$internal$macro
-indir(`$$internal$macro')
-dnl @result{}Internal macro (name $$internal$macro)
diff --git a/checks/18.ifdef b/checks/18.ifdef
deleted file mode 100644
index 40c355ca..00000000
--- a/checks/18.ifdef
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1338: Origin of test
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-dnl @result{}foo is not defined
-define(`foo', `')
-dnl @result{}
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-dnl @result{}foo is defined
diff --git a/checks/19.ifelse b/checks/19.ifelse
deleted file mode 100644
index 0886f6db..00000000
--- a/checks/19.ifelse
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1376: Origin of test
-ifelse(`foo', `bar', `true')
-dnl @result{}
-ifelse(`foo', `foo', `true')
-dnl @result{}true
-ifelse(`foo', `bar', `true', `false')
-dnl @result{}false
-ifelse(`foo', `foo', `true', `false')
-dnl @result{}true
diff --git a/checks/20.ifelse b/checks/20.ifelse
deleted file mode 100644
index aff53225..00000000
--- a/checks/20.ifelse
+++ /dev/null
@@ -1,3 +0,0 @@
-dnl ../doc/m4.texinfo:1395: Origin of test
-ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
-dnl @result{}seventh
diff --git a/checks/21.loops b/checks/21.loops
deleted file mode 100644
index 2b0290b1..00000000
--- a/checks/21.loops
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1432: Origin of test
-shift
-dnl @result{}
-shift(bar)
-dnl @result{}
-shift(foo, bar, baz)
-dnl @result{}bar,baz
diff --git a/checks/22.loops b/checks/22.loops
deleted file mode 100644
index 1ecdc076..00000000
--- a/checks/22.loops
+++ /dev/null
@@ -1,10 +0,0 @@
-dnl ../doc/m4.texinfo:1444: Origin of test
-define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
- `reverse(shift($@)), `$1'')')
-dnl @result{}
-reverse
-dnl @result{}
-reverse(foo)
-dnl @result{}foo
-reverse(foo, bar, gnats, and gnus)
-dnl @result{}and gnus, gnats, bar, foo
diff --git a/checks/23.dumpdef b/checks/23.dumpdef
deleted file mode 100644
index c65f6934..00000000
--- a/checks/23.dumpdef
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1558: Origin of test
-define(`foo', `Hello world.')
-dnl @result{}
-dumpdef(`foo')
-dnl @error{}foo: `Hello world.'
-dnl @result{}
-dumpdef(`define')
-dnl @error{}define: <define>
-dnl @result{}
diff --git a/checks/24.trace b/checks/24.trace
deleted file mode 100644
index 491eef27..00000000
--- a/checks/24.trace
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:1603: Origin of test
-define(`foo', `Hello World.')
-dnl @result{}
-define(`echo', `$@')
-dnl @result{}
-traceon(`foo', `echo')
-dnl @result{}
-foo
-dnl @error{}m4trace: -1- foo -> `Hello World.'
-dnl @result{}Hello World.
-echo(gnus, and gnats)
-dnl @error{}m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
-dnl @result{}gnus,and gnats
diff --git a/checks/25.dnl b/checks/25.dnl
deleted file mode 100644
index ecdb9b24..00000000
--- a/checks/25.dnl
+++ /dev/null
@@ -1,4 +0,0 @@
-dnl ../doc/m4.texinfo:1755: Origin of test
-define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
-foo
-dnl @result{}Macro foo.
diff --git a/checks/26.changequote b/checks/26.changequote
deleted file mode 100644
index a523f2e9..00000000
--- a/checks/26.changequote
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1793: Origin of test
-changequote([, ])
-dnl @result{}
-define([foo], [Macro [foo].])
-dnl @result{}
-foo
-dnl @result{}Macro foo.
diff --git a/checks/27.changequote b/checks/27.changequote
deleted file mode 100644
index bd71cb96..00000000
--- a/checks/27.changequote
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1805: Origin of test
-changequote([[, ]])
-dnl @result{}
-define([[foo]], [[Macro [[[foo]]].]])
-dnl @result{}
-foo
-dnl @result{}Macro [foo].
diff --git a/checks/28.changequote b/checks/28.changequote
deleted file mode 100644
index ed067f50..00000000
--- a/checks/28.changequote
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1817: Origin of test
-define(`foo', `Macro `FOO'.')
-dnl @result{}
-changequote(, )
-dnl @result{}
-foo
-dnl @result{}Macro `FOO'.
-`foo'
-dnl @result{}`Macro `FOO'.'
diff --git a/checks/29.changecom b/checks/29.changecom
deleted file mode 100644
index 7a1dfa60..00000000
--- a/checks/29.changecom
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:1857: Origin of test
-define(`comment', `COMMENT')
-dnl @result{}
-# A normal comment
-dnl @result{}# A normal comment
-changecom(`/*', `*/')
-dnl @result{}
-# Not a comment anymore
-dnl @result{}# Not a COMMENT anymore
-But: /* this is a comment now */ while this is not a comment
-dnl @result{}But: /* this is a comment now */ while this is not a COMMENT
diff --git a/checks/30.changecom b/checks/30.changecom
deleted file mode 100644
index fce2579c..00000000
--- a/checks/30.changecom
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1878: Origin of test
-define(`comment', `COMMENT')
-dnl @result{}
-changecom
-dnl @result{}
-# Not a comment anymore
-dnl @result{}# Not a COMMENT anymore
diff --git a/checks/31.changesynta b/checks/31.changesynta
deleted file mode 100644
index 02f0ac23..00000000
--- a/checks/31.changesynta
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:2023: Origin of test
-define(`test.1', `TEST ONE')
-dnl @result{}
-__file__
-dnl @result{}31.changesynta
-changesyntax(`O_', `W.')
-dnl @result{}
-__file__
-dnl @result{}__file__
-test.1
-dnl @result{}TEST ONE
diff --git a/checks/32.changesynta b/checks/32.changesynta
deleted file mode 100644
index 8bd2f388..00000000
--- a/checks/32.changesynta
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:2039: Origin of test
-define(`test', `$#')
-dnl @result{}
-test(a, b, c)
-dnl @result{}3
-changesyntax(`(<', `,|', `)>', `O(,)')
-dnl @result{}
-test(a, b, c)
-dnl @result{}0(a, b, c)
-test<a|b|c>
-dnl @result{}3
diff --git a/checks/33.changesynta b/checks/33.changesynta
deleted file mode 100644
index e4f76f71..00000000
--- a/checks/33.changesynta
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2056: Origin of test
-define(`test', `$1$2$3')
-dnl @result{}
-test(a, b, c)
-dnl @result{}abc
-changesyntax(`O ')
-dnl @result{}
-test(a, b, c)
-dnl @result{}a b c
diff --git a/checks/34.changesynta b/checks/34.changesynta
deleted file mode 100644
index 7b430d69..00000000
--- a/checks/34.changesynta
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2075: Origin of test
-define(`@', `TEST')
-dnl @result{}
-@
-dnl @result{}@
-changesyntax(`A@')
-dnl @result{}
-@
-dnl @result{}TEST
diff --git a/checks/35.changesynta b/checks/35.changesynta
deleted file mode 100644
index d2ab2d3f..00000000
--- a/checks/35.changesynta
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl ../doc/m4.texinfo:2099: Origin of test
-define(`test', `TEST')
-dnl @result{}
-changesyntax(`L<', `R>')
-dnl @result{}
-<test>
-dnl @result{}test
-`test>
-dnl @result{}test
-changequote(<[>, `]')
-dnl @result{}
-<test>
-dnl @result{}<TEST>
-[test]
-dnl @result{}test
diff --git a/checks/36.changesynta b/checks/36.changesynta
deleted file mode 100644
index db3f46f2..00000000
--- a/checks/36.changesynta
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2121: Origin of test
-changesyntax(`({<', `)}>', `,;:', `O(,)')
-dnl @result{}
-eval{2**4-1; 2 : 8>
-dnl @result{}00001111
diff --git a/checks/37.changesynta b/checks/37.changesynta
deleted file mode 100644
index 378d6d51..00000000
--- a/checks/37.changesynta
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:2132: Origin of test
-define(`test', `==$1==')
-dnl @result{}
-changequote(`<<', `>>')
-dnl @result{}
-changesyntax(<<L[>>, <<R]>>)
-dnl @result{}
-test(<<testing]>>)
-dnl @result{}==testing]==
-test([testing>>])
-dnl @result{}==testing>>==
-test([<<testing>>])
-dnl @result{}==<<testing>>==
diff --git a/checks/38.m4wrap b/checks/38.m4wrap
deleted file mode 100644
index 95fb12dd..00000000
--- a/checks/38.m4wrap
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2293: Origin of test
-define(`cleanup', `This is the `cleanup' actions.
-')
-dnl @result{}
-m4wrap(`cleanup')
-dnl @result{}
-This is the first and last normal input line.
-dnl @result{}This is the first and last normal input line.
-dnl @result{}This is the cleanup actions.
diff --git a/checks/39.include b/checks/39.include
deleted file mode 100644
index 68cba854..00000000
--- a/checks/39.include
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:2352: Origin of test
-include(`no-such-file')
-dnl @result{}
-dnl @error{}39.include:2: m4: Cannot open no-such-file: No such file or directory
-sinclude(`no-such-file')
-dnl @result{}
diff --git a/checks/40.include b/checks/40.include
deleted file mode 100644
index 1afae8e2..00000000
--- a/checks/40.include
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl ../doc/m4.texinfo:2372: Origin of test
-define(`foo', `FOO')
-dnl @result{}
-include(`incl.m4')
-dnl @result{}Include file start
-dnl @result{}FOO
-dnl @result{}Include file end
-dnl @result{}
diff --git a/checks/41.include b/checks/41.include
deleted file mode 100644
index e5965be9..00000000
--- a/checks/41.include
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl ../doc/m4.texinfo:2387: Origin of test
-define(`bar', include(`incl.m4'))
-dnl @result{}
-This is `bar': >>>bar<<<
-dnl @result{}This is bar: >>>Include file start
-dnl @result{}foo
-dnl @result{}Include file end
-dnl @result{}<<<
diff --git a/checks/42.divert b/checks/42.divert
deleted file mode 100644
index 9c86c5de..00000000
--- a/checks/42.divert
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2478: Origin of test
-divert(1)
-This text is diverted.
-divert
-dnl @result{}
-This text is not diverted.
-dnl @result{}This text is not diverted.
-dnl @result{}
-dnl @result{}This text is diverted.
diff --git a/checks/43.divert b/checks/43.divert
deleted file mode 100644
index 252fc982..00000000
--- a/checks/43.divert
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:2498: Origin of test
-divert(-1)
-define(`foo', `Macro `foo'.')
-define(`bar', `Macro `bar'.')
-divert
-dnl @result{}
diff --git a/checks/44.undivert b/checks/44.undivert
deleted file mode 100644
index f99162c6..00000000
--- a/checks/44.undivert
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:2529: Origin of test
-divert(1)
-This text is diverted.
-divert
-dnl @result{}
-This text is not diverted.
-dnl @result{}This text is not diverted.
-undivert(1)
-dnl @result{}
-dnl @result{}This text is diverted.
-dnl @result{}
diff --git a/checks/45.undivert b/checks/45.undivert
deleted file mode 100644
index 8835f78e..00000000
--- a/checks/45.undivert
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:2553: Origin of test
-divert(1)
-This text is diverted first.
-divert(0)undivert(1)dnl
-dnl @result{}
-dnl @result{}This text is diverted first.
-undivert(1)
-dnl @result{}
-divert(1)
-This text is also diverted but not appended.
-divert(0)undivert(1)dnl
-dnl @result{}
-dnl @result{}This text is also diverted but not appended.
diff --git a/checks/46.undivert b/checks/46.undivert
deleted file mode 100644
index f951d011..00000000
--- a/checks/46.undivert
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2579: Origin of test
-define(`bar', `BAR')
-dnl @result{}
-undivert(`foo')
-dnl @result{}bar
-dnl @result{}
-include(`foo')
-dnl @result{}BAR
-dnl @result{}
diff --git a/checks/47.divnum b/checks/47.divnum
deleted file mode 100644
index c64945f8..00000000
--- a/checks/47.divnum
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:2605: Origin of test
-Initial divnum
-dnl @result{}Initial 0
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert
-dnl @result{}
-dnl @result{}
-dnl @result{}Diversion one: 1
-dnl @result{}
-dnl @result{}Diversion two: 2
diff --git a/checks/48.cleardiv b/checks/48.cleardiv
deleted file mode 100644
index cd779109..00000000
--- a/checks/48.cleardiv
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:2636: Origin of test
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert(-1)
-undivert
diff --git a/checks/49.cleardiv b/checks/49.cleardiv
deleted file mode 100644
index 8d4b7501..00000000
--- a/checks/49.cleardiv
+++ /dev/null
@@ -1,4 +0,0 @@
-dnl ../doc/m4.texinfo:2651: Origin of test
-define(`cleardivert',
-`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
-dnl @result{}
diff --git a/checks/50.len b/checks/50.len
deleted file mode 100644
index 37c7cf72..00000000
--- a/checks/50.len
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2693: Origin of test
-len()
-dnl @result{}0
-len(`abcdef')
-dnl @result{}6
diff --git a/checks/51.index b/checks/51.index
deleted file mode 100644
index e540cdd8..00000000
--- a/checks/51.index
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2719: Origin of test
-index(`gnus, gnats, and armadillos', `nat')
-dnl @result{}7
-index(`gnus, gnats, and armadillos', `dag')
-dnl @result{}-1
diff --git a/checks/52.regexp b/checks/52.regexp
deleted file mode 100644
index 27ad63d5..00000000
--- a/checks/52.regexp
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2751: Origin of test
-regexp(`GNUs not Unix', `\<[a-z]\w+')
-dnl @result{}5
-regexp(`GNUs not Unix', `\<Q\w*')
-dnl @result{}-1
diff --git a/checks/53.regexp b/checks/53.regexp
deleted file mode 100644
index b9263838..00000000
--- a/checks/53.regexp
+++ /dev/null
@@ -1,3 +0,0 @@
-dnl ../doc/m4.texinfo:2763: Origin of test
-regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
-dnl @result{}*** Unix *** nix ***
diff --git a/checks/54.substr b/checks/54.substr
deleted file mode 100644
index b2ad41ff..00000000
--- a/checks/54.substr
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2789: Origin of test
-substr(`gnus, gnats, and armadillos', 6)
-dnl @result{}gnats, and armadillos
-substr(`gnus, gnats, and armadillos', 6, 5)
-dnl @result{}gnats
diff --git a/checks/55.translit b/checks/55.translit
deleted file mode 100644
index d0c1a522..00000000
--- a/checks/55.translit
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:2830: Origin of test
-translit(`GNUs not Unix', `A-Z')
-dnl @result{}s not nix
-translit(`GNUs not Unix', `a-z', `A-Z')
-dnl @result{}GNUS NOT UNIX
-translit(`GNUs not Unix', `A-Z', `z-a')
-dnl @result{}tmfs not fnix
diff --git a/checks/56.patsubst b/checks/56.patsubst
deleted file mode 100644
index 5da8e3c7..00000000
--- a/checks/56.patsubst
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:2881: Origin of test
-patsubst(`GNUs not Unix', `^', `OBS: ')
-dnl @result{}OBS: GNUs not Unix
-patsubst(`GNUs not Unix', `\<', `OBS: ')
-dnl @result{}OBS: GNUs OBS: not OBS: Unix
-patsubst(`GNUs not Unix', `\w*', `(\&)')
-dnl @result{}(GNUs)() (not)() (Unix)
-patsubst(`GNUs not Unix', `\w+', `(\&)')
-dnl @result{}(GNUs) (not) (Unix)
-patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-dnl @result{}GN not
diff --git a/checks/58.format b/checks/58.format
deleted file mode 100644
index edeefd7e..00000000
--- a/checks/58.format
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2933: Origin of test
-define(`foo', `The brown fox jumped over the lazy dog')
-dnl @result{}
-format(`The string "%s" is %d characters long', foo, len(foo))
-dnl @result{}The string "The brown fox jumped over the lazy dog" is 38 characters long
diff --git a/checks/59.incr b/checks/59.incr
deleted file mode 100644
index a6c4f6f2..00000000
--- a/checks/59.incr
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:3003: Origin of test
-incr(4)
-dnl @result{}5
-decr(7)
-dnl @result{}6
diff --git a/checks/60.eval b/checks/60.eval
deleted file mode 100644
index 89490b2e..00000000
--- a/checks/60.eval
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl ../doc/m4.texinfo:3097: Origin of test
-eval(-3 * 5)
-dnl @result{}-15
-eval(index(`Hello world', `llo') >= 0)
-dnl @result{}1
-define(`square', `eval(($1)**2)')
-dnl @result{}
-square(9)
-dnl @result{}81
-square(square(5)+1)
-dnl @result{}676
-define(`foo', `666')
-dnl @result{}
-eval(`foo'/6)
-dnl @error{}60.eval:14: m4: Bad expression in eval: foo/6
-dnl @result{}
-eval(foo/6)
-dnl @result{}111
diff --git a/checks/61.eval b/checks/61.eval
deleted file mode 100644
index 64594c57..00000000
--- a/checks/61.eval
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:3128: Origin of test
-eval(666, 10)
-dnl @result{}666
-eval(666, 11)
-dnl @result{}556
-eval(666, 6)
-dnl @result{}3030
-eval(666, 6, 10)
-dnl @result{}0000003030
-eval(-666, 6, 10)
-dnl @result{}-000003030
diff --git a/checks/62.esyscmd b/checks/62.esyscmd
deleted file mode 100644
index 27c3bda4..00000000
--- a/checks/62.esyscmd
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:3213: Origin of test
-define(`vice', `esyscmd(grep Vice ../COPYING)')
-dnl @result{}
-vice
-dnl @result{} Ty Coon, President of Vice
-dnl @result{}
diff --git a/checks/63.sysval b/checks/63.sysval
deleted file mode 100644
index 1b7b110a..00000000
--- a/checks/63.sysval
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:3244: Origin of test
-syscmd(`false')
-dnl @result{}
-ifelse(sysval, 0, zero, non-zero)
-dnl @result{}non-zero
-syscmd(`true')
-dnl @result{}
-sysval
-dnl @result{}0
diff --git a/checks/64.errprint b/checks/64.errprint
deleted file mode 100644
index b0cfbffd..00000000
--- a/checks/64.errprint
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:3324: Origin of test
-errprint(`Illegal arguments to forloop
-')
-dnl @error{}Illegal arguments to forloop
-dnl @result{}
diff --git a/checks/65.errprint b/checks/65.errprint
deleted file mode 100644
index 230093e8..00000000
--- a/checks/65.errprint
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:3349: Origin of test
-errprint(`m4:'__file__:__line__: `Input error
-')
-dnl @error{}m4:65.errprint:2: Input error
-dnl @result{}
diff --git a/checks/66.m4exit b/checks/66.m4exit
deleted file mode 100644
index eccef14b..00000000
--- a/checks/66.m4exit
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:3372: Origin of test
-define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
-')m4exit(1)')
-dnl @result{}
-fatal_error(`This is a BAD one, buster')
-dnl @error{}m4: 66.m4exit: 5: fatal error: This is a BAD one, buster
diff --git a/checks/Makefile.am b/checks/Makefile.am
deleted file mode 100644
index b3d7ffda..00000000
--- a/checks/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-EXTRA_DIST = check-them foo get-them incl.m4 stamp-checks $(CHECKS)
-
-CHECKS = 01.define 02.define 03.arguments 04.arguments 05.arguments \
- 06.arguments 07.pseudo_argu 08.pseudo_argu 09.pseudo_argu \
- 10.pseudo_argu 11.pseudo_argu 12.undefine 13.defn 14.defn \
- 15.pushdef 16.pushdef 17.indir 18.ifdef 19.ifelse 20.ifelse \
- 21.loops 22.loops 23.dumpdef 24.trace 25.dnl 26.changequote \
- 27.changequote 28.changequote 29.changecom 30.changecom \
- 31.changesynta 32.changesynta 33.changesynta 34.changesynta \
- 35.changesynta 36.changesynta 37.changesynta 38.m4wrap \
- 39.include 40.include 41.include 42.divert 43.divert 44.undivert \
- 45.undivert 46.undivert 47.divnum 48.cleardiv 49.cleardiv 50.len \
- 51.index 52.regexp 53.regexp 54.substr 55.translit 56.patsubst \
- 57.patsubst 58.format 59.incr 60.eval 61.eval 62.esyscmd \
- 63.sysval 64.errprint 65.errprint 66.m4exit
-
-
-all: stamp-checks
-
-stamp-checks: get-them ../doc/m4.texinfo
- rm -f $(srcdir)/$(CHECKS)
- cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
- touch $(srcdir)/stamp-checks
-
-check: stamp-checks
- PATH=`pwd`/../src:$$PATH; export PATH; \
- cd $(srcdir) && ./check-them $(CHECKS)
-
-
diff --git a/checks/check-them b/checks/check-them
deleted file mode 100755
index 5dd205b9..00000000
--- a/checks/check-them
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-# Check GNU m4 against examples from the manual source.
-# Copyright (C) 1992 Free Software Foundation, Inc.
-
-out=/tmp/m4-out.$$
-err=/tmp/m4-err.$$
-xout=/tmp/m4-xout.$$
-xerr=/tmp/m4-xerr.$$
-
-trap "rm -f $out $err $xout $xerr; exit 1" 1 2 15
-
-m4 --version
-
-for file
-do
- echo "Checking $file"
- m4 -d $file >$out 2>$err
-
- sed -e '/^dnl @result{}/!d' -e 's///' $file > $xout
-
- if cmp -s $out $xout; then
- :
- else
- failed="$failed $file:out"
- echo `sed -e 's/^dnl //' -e 1q $file`
- echo "$file: stdout mismatch"
- diff $xout $out
- fi
-
- sed -e '/^dnl @error{}/!d' -e 's///' $file > $xerr
-
- if cmp -s $err $xerr; then
- :
- else
- failed="$failed $file:err"
- echo `sed -e 's/^dnl //' -e 1q $file`
- echo "$file: stderr mismatch"
- diff $xerr $err
- fi
-
-done
-
-rm -f $out $err $xout $xerr
-
-echo
-if test -z "$failed"; then
- echo "All checks successful"
-else
- echo "Failed checks were:"
- echo " $failed"
-fi
diff --git a/checks/get-them b/checks/get-them
deleted file mode 100755
index 932cbb77..00000000
--- a/checks/get-them
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-# Extract all examples from the manual source.
-# Copyright (C) 1992 Free Software Foundation, Inc.
-
-# This script is for use with GNU awk.
-
-FILE=${1-/dev/null}
-
-$AWK '
-
-BEGIN {
- node = "";
- seq = -1;
- count = 0;
- file = "NONE";
-}
-
-/^@node / {
- if (seq > 0)
- printf(" -- %d file%s", seq, seq == 1 ? "" : "s");
- if (seq >= 0)
- printf("\n");
-
- split($0, tmp, ",");
- node = substr(tmp[1], 7);
- if (length(node) > 11)
- printf("Node: %s - truncated", node);
- else
- printf("Node: %s ", node);
- gsub(" ", "_", node);
- node = tolower(substr(node, 1, 11));
- seq = 0;
-}
-
-/^@comment ignore$/ {
- getline;
- next;
-}
-
-/^@example$/, /^@end example$/ {
- if (seq < 0)
- next;
- if ($0 ~ /^@example$/) {
- if (count > 0)
- close (file);
- seq++;
- count++;
- file = sprintf("%02d.%s", count, node);
- printf("dnl %s:%d: Origin of test\n", FILENAME, NR) > file;
- next;
- }
- if ($0 ~ /^@end example$/) {
- next;
- }
- if ($0 ~ /^\^D$/)
- next;
- if ($0 ~ /^@result\{\}/ || $0 ~ /^@error\{\}/)
- prefix = "dnl ";
- else
- prefix = "";
- gsub("@{", "{", $0);
- gsub("@}", "}", $0);
- gsub("@@", "@", $0);
- printf("%s%s\n", prefix, $0) >> file;
-}
-
-END {
- printf("\n");
-}
-' $FILE
diff --git a/config.h.in b/config.h.in
index 352f5685..f33be788 100644
--- a/config.h.in
+++ b/config.h.in
@@ -134,6 +134,9 @@
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
+/* Define if you have the doprnt function. */
+#undef HAVE_DOPRNT
+
/* Define if you have the ecvt function. */
#undef HAVE_ECVT
@@ -149,6 +152,9 @@
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
+/* Define if you have the obstack function. */
+#undef HAVE_OBSTACK
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -185,12 +191,24 @@
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
+/* Define if you have the strerror_r function. */
+#undef HAVE_STRERROR_R
+
/* Define if you have the strtol function. */
#undef HAVE_STRTOL
/* Define if you have the tmpfile function. */
#undef HAVE_TMPFILE
+/* Define if you have the vprintf function. */
+#undef HAVE_VPRINTF
+
+/* Define if you have the xmalloc function. */
+#undef HAVE_XMALLOC
+
+/* Define if you have the xstrdup function. */
+#undef HAVE_XSTRDUP
+
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
diff --git a/config.sub b/config.sub
index e24b8504..0131946b 100755
--- a/config.sub
+++ b/config.sub
@@ -1,6 +1,6 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -149,20 +149,19 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | pyramid | mn10200 | mn10300 \
+ tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arm \
+ | arme[lb] | pyramid | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
- | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
- | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
- | mipstx39 | mipstx39el \
- | sparc | sparclet | sparclite | sparc64 | v850)
+ | alpha | we32k | ns16k | clipper | i370 | sh \
+ | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
+ | pdp11 | mips64el | mips64orion | mips64orionel \
+ | sparc | sparclet | sparclite | sparc64)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
- i[34567]86)
+ i[3456]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -171,18 +170,14 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
- | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
- | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
- | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
- | sparc64-* | mips64-* | mipsel-* \
- | mips64el-* | mips64orion-* | mips64orionel-* \
- | mipstx39-* | mipstx39el-* \
- | f301-*)
+ vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
+ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
+ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
+ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -209,9 +204,9 @@ case $basic_machine in
amiga | amiga-*)
basic_machine=m68k-cbm
;;
- amigaos | amigados)
+ amigados)
basic_machine=m68k-cbm
- os=-amigaos
+ os=-amigados
;;
amigaunix | amix)
basic_machine=m68k-cbm
@@ -350,19 +345,19 @@ case $basic_machine in
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i[34567]86v32)
+ i[3456]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
- i[34567]86v4*)
+ i[3456]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
- i[34567]86v)
+ i[3456]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
- i[34567]86sol2)
+ i[3456]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
@@ -396,11 +391,11 @@ case $basic_machine in
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
- os=-linux-gnu
+ os=-linux
;;
mips*-linux*)
basic_machine=mips-unknown
- os=-linux-gnu
+ os=-linux
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
@@ -469,23 +464,25 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | nexen)
- basic_machine=i586-pc
+ pentium | p5)
+ basic_machine=i586-intel
;;
- pentiumpro | p6 | k6 | 6x86)
- basic_machine=i686-pc
+ pentiumpro | p6)
+ basic_machine=i686-intel
;;
- pentiumii | pentium2)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | nexen-*)
+ pentium-* | p5-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumpro-* | p6-* | k6-* | 6x86-*)
+ pentiumpro-* | p6-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ k5)
+ # We don't have specific support for AMD's K5 yet, so just call it a Pentium
+ basic_machine=i586-amd
+ ;;
+ nexen)
+ # We don't have specific support for Nexgen yet, so just call it a Pentium
+ basic_machine=i586-nexgen
;;
pn)
basic_machine=pn-gould
@@ -569,12 +566,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@@ -594,7 +585,7 @@ case $basic_machine in
basic_machine=vax-dec
os=-vms
;;
- vpp*|vx|vx-*)
+ vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
@@ -624,7 +615,7 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
- if [ x$os = x-linux-gnu ]; then
+ if [ x$os = x-linux ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
@@ -689,12 +680,9 @@ case $os in
-solaris)
os=-solaris2
;;
- -svr4*)
+ -unixware* | svr4*)
os=-sysv4
;;
- -unixware*)
- os=-sysv4.2uw
- ;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
@@ -705,8 +693,7 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
@@ -714,7 +701,7 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv*)
+ | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
@@ -840,7 +827,7 @@ case $basic_machine in
os=-sysv
;;
*-cbm)
- os=-amigaos
+ os=-amigados
;;
*-dg)
os=-dgux
diff --git a/configure b/configure
index 79ed1cdb..96c8582e 100755
--- a/configure
+++ b/configure
@@ -12,6 +12,8 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
+ --without-included-regex don't compile regex (use with caution)"
+ac_help="$ac_help
--enable-changeword enable -W and changeword() builtin"
ac_help="$ac_help
--with-gmp use gmp for extended and fractional arithmetic"
@@ -584,7 +586,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:588: checking for a BSD compatible install" >&5
+echo "configure:590: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -637,7 +639,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:641: checking whether build environment is sane" >&5
+echo "configure:643: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -675,7 +677,7 @@ fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:679: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:681: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -704,7 +706,7 @@ fi
PACKAGE=m4
-VERSION=1.4f
+VERSION=1.4h
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -721,7 +723,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:725: checking for working aclocal" >&5
+echo "configure:727: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -734,7 +736,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:738: checking for working autoconf" >&5
+echo "configure:740: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -747,7 +749,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:751: checking for working automake" >&5
+echo "configure:753: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -760,7 +762,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:764: checking for working autoheader" >&5
+echo "configure:766: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -773,7 +775,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:777: checking for working makeinfo" >&5
+echo "configure:779: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -793,7 +795,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:797: checking for $ac_word" >&5
+echo "configure:799: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -824,7 +826,7 @@ done
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:828: checking for $ac_word" >&5
+echo "configure:830: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -853,7 +855,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:857: checking for $ac_word" >&5
+echo "configure:859: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -901,7 +903,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:907: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -911,11 +913,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 915 "configure"
+#line 917 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -935,12 +937,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:944: checking whether we are using GNU C" >&5
+echo "configure:946: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -949,7 +951,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -964,7 +966,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:968: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:970: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1002,7 +1004,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1006: checking for a BSD compatible install" >&5
+echo "configure:1008: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1052,7 +1054,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1056: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1058: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1081,7 +1083,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1085: checking for $ac_word" >&5
+echo "configure:1087: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1107,9 +1109,40 @@ else
echo "$ac_t""no" 1>&6
fi
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1116: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PERL" in
+ /*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PERL="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+ echo "$ac_t""$PERL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1113: checking how to run the C preprocessor" >&5
+echo "configure:1146: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1124,13 +1157,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1128 "configure"
+#line 1161 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1141,13 +1174,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1145 "configure"
+#line 1178 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1170,9 +1203,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1174: checking for AIX" >&5
+echo "configure:1207: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 1176 "configure"
+#line 1209 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -1194,7 +1227,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1198: checking for POSIXized ISC" >&5
+echo "configure:1231: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1216,17 +1249,17 @@ fi
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1220: checking for minix/config.h" >&5
+echo "configure:1253: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1225 "configure"
+#line 1258 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1267,7 +1300,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:1271: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:1304: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1283,7 +1316,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 1287 "configure"
+#line 1320 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1320,7 +1353,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1346,7 +1379,7 @@ esac
echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
-echo "configure:1350: checking for function prototypes" >&5
+echo "configure:1383: checking for function prototypes" >&5
if test "$am_cv_prog_cc_stdc" != no; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -1359,12 +1392,12 @@ else
U=_ ANSI2KNR=./ansi2knr
# Ensure some checks needed by ansi2knr itself.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1363: checking for ANSI C header files" >&5
+echo "configure:1396: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1368 "configure"
+#line 1401 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1372,7 +1405,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1389,7 +1422,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1393 "configure"
+#line 1426 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1407,7 +1440,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1411 "configure"
+#line 1444 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1428,7 +1461,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1432 "configure"
+#line 1465 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1439,7 +1472,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1466,17 +1499,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1470: checking for $ac_hdr" >&5
+echo "configure:1503: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1475 "configure"
+#line 1508 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1505,12 +1538,12 @@ done
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1509: checking for working const" >&5
+echo "configure:1542: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1514 "configure"
+#line 1547 "configure"
#include "confdefs.h"
int main() {
@@ -1559,7 +1592,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1584,17 +1617,17 @@ for ac_hdr in limits.h locale.h memory.h siginfo.h string.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1588: checking for $ac_hdr" >&5
+echo "configure:1621: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1593 "configure"
+#line 1626 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1621,12 +1654,12 @@ fi
done
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1625: checking for ANSI C header files" >&5
+echo "configure:1658: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1630 "configure"
+#line 1663 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1634,7 +1667,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1651,7 +1684,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1655 "configure"
+#line 1688 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1669,7 +1702,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1673 "configure"
+#line 1706 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1690,7 +1723,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1694 "configure"
+#line 1727 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1701,7 +1734,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1725,12 +1758,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1729: checking return type of signal handlers" >&5
+echo "configure:1762: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1734 "configure"
+#line 1767 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1747,7 +1780,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1766,12 +1799,12 @@ EOF
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1770: checking for size_t" >&5
+echo "configure:1803: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1775 "configure"
+#line 1808 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1802,12 +1835,12 @@ fi
for ac_func in mkstemp sigaction sigaltstack sigstack sigvec strerror tmpfile
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1806: checking for $ac_func" >&5
+echo "configure:1839: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1811 "configure"
+#line 1844 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1830,7 +1863,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1854,22 +1887,23 @@ else
fi
done
+
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1861: checking for working alloca.h" >&5
+echo "configure:1895: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1866 "configure"
+#line 1900 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1890,12 +1924,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1894: checking for alloca" >&5
+echo "configure:1928: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1899 "configure"
+#line 1933 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1918,7 +1952,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1950,12 +1984,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1954: checking whether alloca needs Cray hooks" >&5
+echo "configure:1988: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1959 "configure"
+#line 1993 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1980,12 +2014,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1984: checking for $ac_func" >&5
+echo "configure:2018: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1989 "configure"
+#line 2023 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2008,7 +2042,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2035,7 +2069,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2039: checking stack direction for C alloca" >&5
+echo "configure:2073: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2043,7 +2077,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2047 "configure"
+#line 2081 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2062,7 +2096,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2084,12 +2118,12 @@ EOF
fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2088: checking for vprintf" >&5
+echo "configure:2122: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2093 "configure"
+#line 2127 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@@ -2112,7 +2146,7 @@ vprintf();
; return 0; }
EOF
-if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@@ -2136,12 +2170,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2140: checking for _doprnt" >&5
+echo "configure:2174: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
+#line 2179 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@@ -2164,7 +2198,7 @@ _doprnt();
; return 0; }
EOF
-if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@@ -2188,15 +2222,15 @@ fi
fi
-for ac_func in strtol
+for ac_func in strtol obstack xmalloc xstrdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2195: checking for $ac_func" >&5
+echo "configure:2229: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2200 "configure"
+#line 2234 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2219,7 +2253,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2245,10 +2279,239 @@ fi
done
+echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
+echo "configure:2284: checking for getopt_long" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2289 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getopt_long(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getopt_long();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
+choke me
+#else
+getopt_long();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_getopt_long=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_getopt_long=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS getopt1.o getopt.o"
+fi
+
+
+
+
+
+ # Check whether --with-included-regex or --without-included-regex was given.
+if test "${with_included_regex+set}" = set; then
+ withval="$with_included_regex"
+ jm_with_regex=$withval
+else
+ jm_with_regex=yes
+fi
+
+ if test "$jm_with_regex" = yes; then
+ LIBOBJS="$LIBOBJS regex.o"
+ fi
+
+
+
+
+ for ac_func in strerror strerror_r vprintf doprnt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2354: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2359 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2407: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2412 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2437 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2455 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2476 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+
+
echo $ac_n "checking ecvt declaration""... $ac_c" 1>&6
-echo "configure:2250: checking ecvt declaration" >&5
+echo "configure:2513: checking ecvt declaration" >&5
cat > conftest.$ac_ext <<EOF
-#line 2252 "configure"
+#line 2515 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2264,12 +2527,12 @@ else
echo "$ac_t""no" 1>&6; for ac_func in ecvt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2268: checking for $ac_func" >&5
+echo "configure:2531: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2273 "configure"
+#line 2536 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2292,7 +2555,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2321,7 +2584,7 @@ rm -f conftest*
echo $ac_n "checking if stack overflow is detectable""... $ac_c" 1>&6
-echo "configure:2325: checking if stack overflow is detectable" >&5
+echo "configure:2588: checking if stack overflow is detectable" >&5
# Code from Jim Avera <jima@netcom.com>.
# stackovf.c requires:
# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
@@ -2331,7 +2594,7 @@ use_stackovf=no
if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 2335 "configure"
+#line 2598 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <sys/resource.h>
@@ -2344,7 +2607,7 @@ choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
#endif
; return 0; }
EOF
-if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
use_stackovf=yes
else
@@ -2363,7 +2626,7 @@ EOF
STACKOVF=stackovf.${U}o
cat > conftest.$ac_ext <<EOF
-#line 2367 "configure"
+#line 2630 "configure"
#include "confdefs.h"
#include <sys/resource.h>
EOF
@@ -2380,7 +2643,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2384 "configure"
+#line 2647 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
@@ -2397,7 +2660,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2401 "configure"
+#line 2664 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
@@ -2414,7 +2677,7 @@ rm -f conftest*
fi
echo $ac_n "checking if changeword is wanted""... $ac_c" 1>&6
-echo "configure:2418: checking if changeword is wanted" >&5
+echo "configure:2681: checking if changeword is wanted" >&5
# Check whether --enable-changeword or --disable-changeword was given.
if test "${enable_changeword+set}" = set; then
enableval="$enable_changeword"
@@ -2433,7 +2696,7 @@ fi
echo $ac_n "checking if extended and fractional arithmetic is wanted""... $ac_c" 1>&6
-echo "configure:2437: checking if extended and fractional arithmetic is wanted" >&5
+echo "configure:2700: checking if extended and fractional arithmetic is wanted" >&5
# Check whether --with-gmp or --without-gmp was given.
if test "${with_gmp+set}" = set; then
withval="$with_gmp"
@@ -2448,17 +2711,17 @@ if test "$use_gmp" = yes; then
LIBS="$LIBS -lgmp"
ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
-echo "configure:2452: checking for gmp.h" >&5
+echo "configure:2715: checking for gmp.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
+#line 2720 "configure"
#include "confdefs.h"
#include <gmp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2475,19 +2738,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for mpq_init in libgmp""... $ac_c" 1>&6
-echo "configure:2479: checking for mpq_init in libgmp" >&5
+echo "configure:2742: checking for mpq_init in libgmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_mpq_init_libgmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2484 "configure"
+#line 2747 "configure"
#include "confdefs.h"
#include <gmp.h>
int main() {
mpq_t x; (void)mpq_init(x)
; return 0; }
EOF
-if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_mpq_init_libgmp=yes
else
@@ -2520,7 +2783,7 @@ fi
if test "$use_gmp" != yes; then
echo $ac_n "checking size of long long int""... $ac_c" 1>&6
-echo "configure:2524: checking size of long long int" >&5
+echo "configure:2787: checking size of long long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2528,7 +2791,7 @@ else
ac_cv_sizeof_long_long_int=0
else
cat > conftest.$ac_ext <<EOF
-#line 2532 "configure"
+#line 2795 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2539,7 +2802,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long_int=`cat conftestval`
else
@@ -2561,7 +2824,7 @@ EOF
fi
echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
-echo "configure:2565: checking if malloc debugging is wanted" >&5
+echo "configure:2828: checking if malloc debugging is wanted" >&5
# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
withval="$with_dmalloc"
@@ -2582,21 +2845,21 @@ fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2586: checking for inline" >&5
+echo "configure:2849: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2593 "configure"
+#line 2856 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2622,12 +2885,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2626: checking for off_t" >&5
+echo "configure:2889: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2631 "configure"
+#line 2894 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2658,17 +2921,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2662: checking for $ac_hdr" >&5
+echo "configure:2925: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2667 "configure"
+#line 2930 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2697,12 +2960,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2701: checking for $ac_func" >&5
+echo "configure:2964: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2706 "configure"
+#line 2969 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2725,7 +2988,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2750,7 +3013,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2754: checking for working mmap" >&5
+echo "configure:3017: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2758,7 +3021,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
+#line 3025 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2898,7 +3161,7 @@ main()
}
EOF
-if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2926,17 +3189,17 @@ unistd.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2930: checking for $ac_hdr" >&5
+echo "configure:3193: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2935 "configure"
+#line 3198 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2966,12 +3229,12 @@ done
strdup __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2970: checking for $ac_func" >&5
+echo "configure:3233: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2975 "configure"
+#line 3238 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2994,7 +3257,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3023,12 +3286,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3027: checking for $ac_func" >&5
+echo "configure:3290: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3032 "configure"
+#line 3295 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3051,7 +3314,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3085,19 +3348,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3089: checking for LC_MESSAGES" >&5
+echo "configure:3352: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3094 "configure"
+#line 3357 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3118,7 +3381,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3122: checking whether NLS is requested" >&5
+echo "configure:3385: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3138,7 +3401,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3142: checking whether included gettext is requested" >&5
+echo "configure:3405: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3157,17 +3420,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3161: checking for libintl.h" >&5
+echo "configure:3424: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3166 "configure"
+#line 3429 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3184,19 +3447,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3188: checking for gettext in libc" >&5
+echo "configure:3451: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3193 "configure"
+#line 3456 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3212,7 +3475,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3216: checking for bindtextdomain in -lintl" >&5
+echo "configure:3479: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3220,7 +3483,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3224 "configure"
+#line 3487 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3231,7 +3494,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3247,7 +3510,7 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:3251: checking for gettext in -lintl" >&5
+echo "configure:3514: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3255,7 +3518,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3259 "configure"
+#line 3522 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3266,7 +3529,7 @@ int main() {
gettext()
; return 0; }
EOF
-if { (eval echo configure:3270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3303,7 +3566,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3307: checking for $ac_word" >&5
+echo "configure:3570: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3337,12 +3600,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3341: checking for $ac_func" >&5
+echo "configure:3604: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3346 "configure"
+#line 3609 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3365,7 +3628,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3392,7 +3655,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3396: checking for $ac_word" >&5
+echo "configure:3659: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3424,7 +3687,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3428: checking for $ac_word" >&5
+echo "configure:3691: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3456,7 +3719,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3460 "configure"
+#line 3723 "configure"
#include "confdefs.h"
int main() {
@@ -3464,7 +3727,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3487,7 +3750,7 @@ fi
if test "$CATOBJEXT" = "NONE"; then
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
-echo "configure:3491: checking whether catgets can be used" >&5
+echo "configure:3754: checking whether catgets can be used" >&5
# Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then
withval="$with_catgets"
@@ -3500,7 +3763,7 @@ fi
if test "$nls_cv_use_catgets" = "yes"; then
echo $ac_n "checking for main in -li""... $ac_c" 1>&6
-echo "configure:3504: checking for main in -li" >&5
+echo "configure:3767: checking for main in -li" >&5
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3508,14 +3771,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-li $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3512 "configure"
+#line 3775 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3543,12 +3806,12 @@ else
fi
echo $ac_n "checking for catgets""... $ac_c" 1>&6
-echo "configure:3547: checking for catgets" >&5
+echo "configure:3810: checking for catgets" >&5
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3552 "configure"
+#line 3815 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char catgets(); below. */
@@ -3571,7 +3834,7 @@ catgets();
; return 0; }
EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_catgets=yes"
else
@@ -3593,7 +3856,7 @@ EOF
# Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3597: checking for $ac_word" >&5
+echo "configure:3860: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3625,7 +3888,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3629: checking for $ac_word" >&5
+echo "configure:3892: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3658,7 +3921,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3662: checking for $ac_word" >&5
+echo "configure:3925: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3693,7 +3956,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3697: checking for $ac_word" >&5
+echo "configure:3960: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3751,7 +4014,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3755: checking for $ac_word" >&5
+echo "configure:4018: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3785,7 +4048,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3789: checking for $ac_word" >&5
+echo "configure:4052: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3817,7 +4080,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3821: checking for $ac_word" >&5
+echo "configure:4084: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3910,7 +4173,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3914: checking for catalogs to be installed" >&5
+echo "configure:4177: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3938,17 +4201,17 @@ echo "configure:3914: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3942: checking for linux/version.h" >&5
+echo "configure:4205: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3947 "configure"
+#line 4210 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4114,8 +4377,8 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile intl/Makefile po/Makefile.in doc/Makefile lib/Makefile \
-src/Makefile checks/Makefile examples/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile acm4/Makefile intl/Makefile po/Makefile.in doc/Makefile \
+lib/Makefile src/Makefile tests/Makefile examples/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -4159,6 +4422,7 @@ s%@SET_MAKE@%$SET_MAKE%g
s%@AWK@%$AWK%g
s%@CC@%$CC%g
s%@RANLIB@%$RANLIB%g
+s%@PERL@%$PERL%g
s%@CPP@%$CPP%g
s%@U@%$U%g
s%@ANSI2KNR@%$ANSI2KNR%g
@@ -4227,8 +4491,8 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile intl/Makefile po/Makefile.in doc/Makefile lib/Makefile \
-src/Makefile checks/Makefile examples/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile acm4/Makefile intl/Makefile po/Makefile.in doc/Makefile \
+lib/Makefile src/Makefile tests/Makefile examples/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -4459,3 +4723,5 @@ chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
diff --git a/configure.in b/configure.in
index 0e5043ba..e3635beb 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
# Configure template for GNU m4.
-# Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1991-1998 Free Software Foundation, Inc.
# Process this file with autoconf to produce a configure script.
undefine([changeword])
@@ -8,7 +8,7 @@ AC_INIT(src/m4.c)
AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE(m4,1.4f)
+AM_INIT_AUTOMAKE(m4,1.4h)
ALL_LINGUAS="de fr it ja nl ru sv"
AC_PROG_AWK
@@ -17,6 +17,7 @@ AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl AM_PROG_LIBTOOL
+AC_PATH_PROG(PERL,perl)
AC_AIX
AC_ISC_POSIX
@@ -30,12 +31,17 @@ AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_CHECK_FUNCS(mkstemp sigaction sigaltstack sigstack sigvec strerror tmpfile)
+
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
-AC_REPLACE_FUNCS(strtol)
+AC_REPLACE_FUNCS(strtol obstack xmalloc xstrdup)
+AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1.o getopt.o"])
+jm_WITH_REGEX
+jm_PREREQ_ERROR
+
AC_MSG_CHECKING(ecvt declaration)
AC_EGREP_HEADER(ecvt, stdlib.h,
- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_EFGCVT, 2)],
+ [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_EFGCVT, 2)],
[AC_MSG_RESULT(no); AC_CHECK_FUNCS(ecvt)])
AC_MSG_CHECKING(if stack overflow is detectable)
@@ -80,13 +86,13 @@ fi], [AC_MSG_RESULT(no)])
AC_MSG_CHECKING(if extended and fractional arithmetic is wanted)
AC_ARG_WITH(gmp,
-[ --with-gmp use gmp for extended and fractional arithmetic],
+[ --with-gmp use gmp for extended and fractional arithmetic],
[use_gmp=$withval], [use_gmp=no])
AC_MSG_RESULT($use_gmp)
if test "$use_gmp" = yes; then
LIBS="$LIBS -lgmp"
- AC_CHECK_HEADER([gmp.h],
+ AC_CHECK_HEADER([gmp.h],
[AC_CACHE_CHECK([for mpq_init in libgmp], ac_cv_func_mpq_init_libgmp,
[AC_TRY_LINK([#include <gmp.h>],
[mpq_t x; (void)mpq_init(x)],
@@ -111,7 +117,9 @@ AM_WITH_DMALLOC
AM_GNU_GETTEXT
dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
-AC_OUTPUT(Makefile intl/Makefile po/Makefile.in doc/Makefile lib/Makefile \
-src/Makefile checks/Makefile examples/Makefile, \
+AC_OUTPUT(Makefile acm4/Makefile intl/Makefile po/Makefile.in doc/Makefile \
+lib/Makefile src/Makefile tests/Makefile examples/Makefile, \
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; \
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
+
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ff3bdaf9..0631611a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1 +1,18 @@
info_TEXINFOS = m4.texinfo
+
+man_MANS = m4.1
+
+EXTRA_DIST = helptoman.pl $(MANS)
+
+PERL = @PERL@
+
+%.1: helptoman.pl ../src/$*
+ @if test -f ../src/$*; then \
+ echo "Updating the \`man' page \`$@'"; \
+ $(PERL) $(srcdir)/helptoman.pl ../src/$* > $@-tmp; \
+ mv $@-tmp $(srcdir)/$@; \
+ else \
+ echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \
+ echo " Retry once the program executable will be ready."; \
+ fi
+
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 0dcaefda..321ea5c1 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,7 +32,7 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DISTDIR =
+DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -88,6 +88,12 @@ VERSION = @VERSION@
l = @l@
info_TEXINFOS = m4.texinfo
+
+man_MANS = m4.1
+
+EXTRA_DIST = helptoman.pl $(MANS)
+
+PERL = @PERL@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@@ -96,6 +102,10 @@ TEXINFO_TEX = $(srcdir)/texinfo.tex
INFO_DEPS = m4.info
DVIS = m4.dvi
TEXINFOS = m4.texinfo
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
+
+NROFF = nroff
DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
version.texi
@@ -104,7 +114,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
-all: Makefile $(INFO_DEPS)
+all: Makefile $(INFO_DEPS) $(MANS)
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
@@ -249,6 +259,45 @@ maintainer-clean-aminfo:
rm -f $$i-[0-9]*; \
fi; \
done
+
+install-man1:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+
+uninstall-man1:
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+install-man: $(MANS)
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+ @$(NORMAL_UNINSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS
TAGS:
@@ -264,43 +313,37 @@ distdir: $(DISTFILES)
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
- $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
info: $(INFO_DEPS)
dvi: $(DVIS)
check: all
- $(MAKE)
installcheck:
install-exec:
@$(NORMAL_INSTALL)
-install-data: install-info-am
+install-data: install-info-am install-man
@$(NORMAL_INSTALL)
install: install-exec install-data all
@:
-uninstall: uninstall-info
+uninstall: uninstall-info uninstall-man
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(infodir)
+ $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
clean: clean-vti clean-aminfo clean-generic mostlyclean
@@ -315,12 +358,23 @@ maintainer-clean: maintainer-clean-vti maintainer-clean-aminfo \
.PHONY: mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
-clean-aminfo maintainer-clean-aminfo tags distdir info dvi installcheck \
+clean-aminfo maintainer-clean-aminfo install-man1 uninstall-man1 \
+install-man uninstall-man tags distdir info dvi installcheck \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+%.1: helptoman.pl ../src/$*
+ @if test -f ../src/$*; then \
+ echo "Updating the \`man' page \`$@'"; \
+ $(PERL) $(srcdir)/helptoman.pl ../src/$* > $@-tmp; \
+ mv $@-tmp $(srcdir)/$@; \
+ else \
+ echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \
+ echo " Retry once the program executable will be ready."; \
+ fi
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/doc/helptoman.pl b/doc/helptoman.pl
new file mode 100644
index 00000000..91f9abd1
--- /dev/null
+++ b/doc/helptoman.pl
@@ -0,0 +1,249 @@
+#!/usr/bin/perl -w
+
+# Generate a short man page from --help and --version output.
+# Copyright 1997, 98 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require 5.003;
+
+use strict;
+use Getopt::Long;
+use POSIX 'strftime';
+
+my $RCS_Id = '$Id: helptoman.pl,v 1.1.1.1 2000/02/17 03:07:21 jbailey Exp $';
+my $this_program = 'help2man';
+my $this_version = '0.0';
+
+if ($RCS_Id =~ /\$Id:\s+(\S+)\s+(\S+)/)
+{
+ $this_version = $2;
+ ($this_program = $1) =~ s/(\.pl)?,v$//;
+}
+
+my $version_info = <<EOT;
+$this_program $this_version
+
+Copyright (C) 1997, 98 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+EOT
+
+my $help_info = <<EOT;
+`$this_program' generates a man page out of `--help' and `--version' output.
+
+Usage: $this_program [OPTION]... EXECUTABLE
+
+ --name=STRING use `STRING' as the description for the NAME paragraph
+ --help print this help, then exit
+ --version print $this_program program version number, then exit
+
+EXECUTABLE should accept `--help' and `version' options.
+EOT
+
+my ($name, $opt_help, $opt_version);
+
+# Parse options.
+GetOptions (
+ 'name=s' => \$name,
+ help => \$opt_help,
+ version => \$opt_version,
+) or die $help_info;
+
+print $help_info and exit if $opt_help;
+print $version_info and exit if $opt_version;
+
+die $help_info unless @ARGV == 1;
+
+# Turn off localisation of executable's ouput.
+@ENV{qw(LANGUAGE LANG LC_ALL)} = qw(C C C);
+
+# Grab help and version paragraphs from executable
+my @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
+ or die "$this_program: can't get `--help' info from $ARGV[0]\n";
+
+my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
+ or die "$this_program: can't get `--version' info from $ARGV[0]\n";
+
+my $date = strftime "%B %Y", localtime;
+my $program = $ARGV[0]; $program =~ s!.*/!!;
+my $package = $program;
+my $version;
+
+# The first line of the --version information is assumed to be in one
+# of the following formats:
+#
+# <version>
+# <program> <version>
+# GNU <program> <version>
+# <program> (GNU <package>) <version>
+# <program> - GNU <package> <version>
+#
+
+$_ = shift @version;
+
+if (/^(\S+)\s+\((GNU\s+[^)]+)\)\s+(.*)/ ||
+ /^(\S+)\s+-\s*(GNU\s+\S+)\s+(.*)/)
+{
+ $program = $1;
+ $package = $2;
+ $version = $3;
+}
+elsif (/^(GNU\s+)?(\S+)\s+(.*)/)
+{
+ $program = $2;
+ $package = $1 ? "$1$2" : $2;
+ $version = $3;
+}
+else
+{
+ $version = $_;
+}
+
+# Default description for NAME paragraph
+$name ||= "short documentation for $program $version";
+
+# Man pages traditionally have the page title in caps.
+my $PROGRAM = uc $program;
+
+# Header.
+print <<EOT;
+.\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
+.TH $PROGRAM 1 "$date" "$package $version" "GNU User's Manual"
+.SH NAME
+$program \\- $name
+EOT
+
+my $accumulate = 1;
+my @description = ();
+
+sub convert_option;
+
+# Output converted --help information.
+for (@help)
+{
+ chomp;
+
+ if (s/^Usage:\s+\S+\s+(.*)\n?//)
+ {
+ # Turn the usage clause into a synopsis.
+ print ".SH SYNOPSIS\n.B $program\n";
+
+ my $syn = $1;
+ $syn =~ s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
+ s/^/\\fI/ unless $syn =~ s/^\\fR//;
+
+ print "$syn\\fR\n";
+
+ # Dump any accumulated description text.
+ $accumulate = 0;
+ print ".SH DESCRITION\n";
+ print @description;
+
+ next unless $_;
+ }
+
+ # Accumulate text if the synopsis has not been produced yet.
+ if ($accumulate)
+ {
+ push @description, ".PP\n" if @description;
+ push @description, "$_\n";
+ next;
+ }
+
+ # Catch bug report text.
+ if (/^Report bugs /)
+ {
+ print ".SH BUGS\n$_\n";
+ next;
+ }
+
+ # Special case for tar 1.12: --label=NAME\nPATTERN.
+ s{(\n[ \t]*)(-V,[ \t]+--label=NAME.*)\n[ \t]+PATTERN[ \t]+}
+ {$1$2$1\\&...=PATTERN };
+
+ # Convert options.
+ s/(\s)(-[][\w=-]+|\\&\S+)/$1.convert_option $2/ge;
+
+ # Option subsections have second line indented.
+ print qq(.SS "$1"\n) if s/^(\S.*)\n(\s)/$2/;
+
+ # Lines indented more than about 10 spaces may be assumed to be
+ # continuations of the previous line.
+ s/\n {10,}/ /g;
+
+ # Indented paragraph.
+ if (/^\s/)
+ {
+ for (split /\n/)
+ {
+ s/^\s+//;
+ s/([^,])\s+/$1\n/;
+ print ".TP\n$_\n";
+ }
+ }
+ # Anything else.
+ else
+ {
+ print ".PP\n$_\n";
+ }
+}
+
+# Refer to the real documentation.
+
+print <<EOT;
+.SH SEE ALSO
+The full documentation for
+.B $program
+is maintained as a Texinfo manual. If the
+.B info
+and
+.B $program
+programs are properly installed at your site, the command
+.IP
+.B info $program
+.PP
+should allow you to access the manual as an hypertext.
+EOT
+
+# Output converted --version information.
+for (@version)
+{
+ chomp;
+
+ if (/^Copyright\s+\(C/) { print ".SH COPYRIGHT\n" }
+ elsif (/^Written\s+by/) { print ".SH AUTHOR\n" }
+ else { print ".PP\n"; }
+
+ print "$_\n";
+}
+
+exit;
+
+# Convert option dashes to \- to stop nroff from hyphenating 'em, and
+# embolden. Option arguments get italicised.
+sub convert_option
+{
+ my $option = '\fB' . shift;
+
+ $option =~ s/-/\\-/g;
+ unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
+ {
+ $option =~ s/=(.)/\\fR=\\fI$1/;
+ $option .= '\fR';
+ }
+
+ $option;
+}
diff --git a/doc/m4.1 b/doc/m4.1
new file mode 100644
index 00000000..beb6a584
--- /dev/null
+++ b/doc/m4.1
@@ -0,0 +1,121 @@
+." DO NOT MODIFY THIS FILE! It was generated by helptoman 1.1.1.1.
+.TH M4 1 "October 1998" "GNU m4 1.4h" "GNU User's Manual"
+.SH NAME
+m4 \- short documentation for m4 1.4h
+.SH SYNOPSIS
+.B m4
+[\fIOPTION\fR]...\fI \fR[\fIFILE\fR]...\fI\fR
+.SH DESCRITION
+.PP
+Mandatory or optional arguments to long options are mandatory or optional
+for short options too.
+.SS "Operation modes:"
+.TP
+\fB\-\-help\fR
+display this help and exit
+.TP
+\fB\-\-version\fR
+output version information and exit
+.TP
+\fB\-e\fR, \fB\-\-interactive\fR
+unbuffer output, ignore interrupts
+.TP
+\fB\-E\fR, \fB\-\-fatal\-warnings\fR
+stop execution after first warning
+.TP
+\fB\-Q\fR, \fB\-\-quiet\fR, \fB\-\-silent\fR
+suppress some warnings for builtins
+.TP
+\fB\-P\fR, \fB\-\-prefix\-builtins\fR
+force a `m4_' prefix to all builtins
+.SS "Preprocessor features:"
+.TP
+\fB\-I\fR, \fB\-\-include\fR=\fIDIRECTORY\fR
+search this directory second for includes
+.TP
+\fB\-D\fR, \fB\-\-define=NAME\fR[=\fIVALUE\fR]
+enter NAME has having VALUE, or empty
+.TP
+\fB\-U\fR, \fB\-\-undefine\fR=\fINAME\fR
+delete builtin NAME
+.TP
+\fB\-s\fR, \fB\-\-synclines\fR
+generate `#line NO "FILE"' lines
+.SS "Limits control:"
+.TP
+\fB\-G\fR, \fB\-\-traditional\fR
+suppress all GNU extensions
+.TP
+\fB\-H\fR, \fB\-\-hashsize\fR=\fIPRIME\fR
+set symbol lookup hash table size
+.TP
+\fB\-L\fR, \fB\-\-nesting\-limit\fR=\fINUMBER\fR
+change artificial nesting limit
+.SS "Frozen state files:"
+.TP
+\fB\-F\fR, \fB\-\-freeze\-state\fR=\fIFILE\fR
+produce a frozen state on FILE at end
+.TP
+\fB\-R\fR, \fB\-\-reload\-state\fR=\fIFILE\fR
+reload a frozen state from FILE at start
+.SS "Debugging:"
+.TP
+\fB\-d\fR, \fB\-\-debug\fR=\fI[FLAGS]\fR
+set debug level (no FLAGS implies `aeq')
+.TP
+\fB\-t\fR, \fB\-\-trace\fR=\fINAME\fR
+trace NAME when it will be defined
+.TP
+\fB\-l\fR, \fB\-\-arglength\fR=\fINUM\fR
+restrict macro tracing size
+.TP
+\fB\-o\fR, \fB\-\-error\-output\fR=\fIFILE\fR
+redirect debug and trace output
+.SS "FLAGS is any of:"
+.TP
+t
+trace for all macro calls, not only traceon'ed
+.TP
+a
+show actual arguments
+.TP
+e
+show expansion
+.TP
+q
+quote values as necessary, with a or e flag
+.TP
+c
+show before collect, after collect and after call
+.TP
+x
+add a unique macro call id, useful with c flag
+.TP
+f
+say current input file name
+.TP
+l
+say current input line number
+.TP
+p
+show results of path searches
+.TP
+i
+show changes in input files
+.TP
+V
+shorthand for all of the above flags
+.PP
+If no FILE or if FILE is `-', standard input is read.
+.SH SEE ALSO
+The full documentation for
+.B m4
+is maintained as a Texinfo manual. If the
+.B info
+and
+.B m4
+programs are properly installed at your site, the command
+.IP
+.B info m4
+.PP
+should allow you to access the manual as an hypertext.
diff --git a/doc/m4.info b/doc/m4.info
index cfa88df1..bc06f08c 100644
--- a/doc/m4.info
+++ b/doc/m4.info
@@ -27,91 +27,91 @@ translation approved by the Foundation.

Indirect:
m4.info-1: 973
-m4.info-2: 50487
-m4.info-3: 99627
+m4.info-2: 50059
+m4.info-3: 97908

Tag Table:
(Indirect)
Node: Top973
-Node: Preliminaries3070
-Node: Intro3795
-Node: History5403
-Node: Invoking m46324
-Node: Bugs13188
-Node: Manual14456
-Node: Syntax15822
-Node: Names16660
-Node: Quoted strings17273
-Node: Other tokens17857
-Node: Comments18074
-Node: Input processing18761
-Node: Macros19914
-Node: Invocation20407
-Node: Inhibiting Invocation21218
-Node: Macro Arguments24363
-Node: Quoting Arguments25678
-Node: Macro expansion26483
-Node: Definitions27146
-Node: Define27923
-Node: Arguments29477
-Node: Pseudo Arguments30958
-Node: Undefine32809
-Node: Defn33471
-Node: Pushdef34946
-Node: Indir37005
-Node: Builtin37783
-Node: Conditionals38227
-Node: Ifdef38934
-Node: Ifelse39703
-Node: Loops41485
-Node: Debugging44777
-Node: Dumpdef45355
-Node: Trace46203
-Node: Debug Levels47582
-Node: Debug Output49967
-Node: Input Control50487
-Node: Dnl51100
-Node: Changequote52226
-Node: Changecom53590
-Node: Changesyntax54876
-Node: Changeword61162
-Node: M4wrap64397
-Node: File Inclusion65599
-Node: Include65915
-Node: Search Path67942
-Node: Diversions68729
-Node: Divert69966
-Node: Undivert71098
-Node: Divnum73069
-Node: Cleardiv73614
-Node: Text handling74669
-Node: Len75389
-Node: Index75787
-Node: Regexp76372
-Node: Substr77463
-Node: Translit78083
-Node: Patsubst79526
-Node: Format81617
-Node: Arithmetic83106
-Node: Incr83563
-Node: Eval84067
-Node: UNIX commands87679
-Node: Syscmd88150
-Node: Esyscmd88863
-Node: Sysval89809
-Node: Maketemp90216
-Node: Miscellaneous91273
-Node: Errprint91704
-Node: M4exit92695
-Node: Syncoutput93500
-Node: Frozen files94092
-Node: Compatibility99011
-Node: Extensions99627
-Node: Incompatibilities102097
-Node: Other Incompat102539
-Node: Experiments104702
-Node: Answers106209
-Node: Concept index106841
-Node: Macro index114262
+Node: Preliminaries6931
+Node: Intro7656
+Node: History9264
+Node: Invoking m410185
+Node: Bugs17049
+Node: Manual18317
+Node: Syntax19683
+Node: Names20521
+Node: Quoted strings21134
+Node: Other tokens21718
+Node: Comments21935
+Node: Input processing22622
+Node: Macros23775
+Node: Invocation24268
+Node: Inhibiting Invocation25079
+Node: Macro Arguments28224
+Node: Quoting Arguments29539
+Node: Macro expansion30344
+Node: Definitions31007
+Node: Define31784
+Node: Arguments33338
+Node: Pseudo Arguments34819
+Node: Undefine36670
+Node: Defn37332
+Node: Pushdef38802
+Node: Indir40861
+Node: Builtin41639
+Node: Conditionals42083
+Node: Ifdef42790
+Node: Ifelse43559
+Node: Loops45341
+Node: Debugging48633
+Node: Dumpdef49211
+Node: Trace50059
+Node: Debug Levels51438
+Node: Debug Output53823
+Node: Input Control54343
+Node: Dnl54956
+Node: Changequote56082
+Node: Changecom57446
+Node: Changesyntax58732
+Node: Changeword65006
+Node: M4wrap68241
+Node: File Inclusion69443
+Node: Include69759
+Node: Search Path71778
+Node: Diversions72565
+Node: Divert73802
+Node: Undivert74934
+Node: Divnum76905
+Node: Cleardiv77450
+Node: Text handling78505
+Node: Len79225
+Node: Index79623
+Node: Regexp80208
+Node: Substr81299
+Node: Translit81919
+Node: Patsubst83362
+Node: Format85453
+Node: Arithmetic86942
+Node: Incr87399
+Node: Eval87903
+Node: UNIX commands91509
+Node: Syscmd91980
+Node: Esyscmd92693
+Node: Sysval93641
+Node: Maketemp94048
+Node: Miscellaneous95105
+Node: Errprint95536
+Node: M4exit96518
+Node: Syncoutput97316
+Node: Frozen files97908
+Node: Compatibility102827
+Node: Extensions103443
+Node: Incompatibilities105913
+Node: Other Incompat106355
+Node: Experiments108518
+Node: Answers110025
+Node: Concept index110657
+Node: Macro index118078

End Tag Table
diff --git a/doc/m4.info-1 b/doc/m4.info-1
index e0622667..46fcdc7c 100644
--- a/doc/m4.info-1
+++ b/doc/m4.info-1
@@ -42,7 +42,7 @@ changes by Franc,ois Pinard and other volunteers on the Internet. All
names and email addresses can be found in the file `THANKS' from the
GNU `m4' distribution.
- This is release 1.4f. It is now to be considered stable, future
+ This is release 1.4h. It is now to be considered stable, future
releases are only meant to fix bugs, increase speed, or improve
documentation. However...
@@ -73,10 +73,111 @@ documentation. However...
* Concept index:: Index for many concepts
* Macro index:: Index for all m4 macros
- -- The Detailed Node Listing --
Introduction and preliminaries
+* Intro:: Introduction to `m4'
+* History:: Historical references
+* Invoking m4:: Invoking `m4'
+* Bugs:: Problems and bugs
+* Manual:: Using this manual
+
+Lexical and syntactic conventions
+
+* Names:: Macro names
+* Quoted strings:: Quoting input to m4
+* Other tokens:: Other kinds of input tokens
+* Comments:: Comments in m4 input
+* Input processing:: How m4 copies input to output
+
+How to invoke macros
+
+* Invocation:: Macro invocation
+* Inhibiting Invocation:: Preventing macro invocation
+* Macro Arguments:: Macro arguments
+* Quoting Arguments:: On Quoting Arguments to macros
+* Macro expansion:: Expanding macros
+
+How to define new macros
+
+* Define:: Defining a new macro
+* Arguments:: Arguments to macros
+* Pseudo Arguments:: Pseudo arguments to macros
+* Undefine:: Deleting a macro
+* Defn:: Renaming macros
+* Pushdef:: Temporarily redefining macros
+
+* Indir:: Indirect call of macros
+* Builtin:: Indirect call of builtins
+
+Conditionals, loops and recursion
+
+* Ifdef:: Testing if a macro is defined
+* Ifelse:: If-else construct, or multibranch
+* Loops:: Loops and recursion in m4
+
+How to debug macros and input
+
+* Dumpdef:: Displaying macro definitions
+* Trace:: Tracing macro calls
+* Debug Levels:: Controlling debugging output
+* Debug Output:: Saving debugging output
+
+Input control
+
+* Dnl:: Deleting whitespace in input
+* Changequote:: Changing the quote characters
+* Changecom:: Changing the comment delimiters
+* Changesyntax:: Changing the lexical structure of the input
+* Changeword:: Changing the lexical structure of words
+* M4wrap:: Saving input until end of input
+
+File inclusion
+
+* Include:: Including named files
+* Search Path:: Searching for include files
+
+Diverting and undiverting output
+
+* Divert:: Diverting output
+* Undivert:: Undiverting output
+* Divnum:: Diversion numbers
+* Cleardiv:: Discarding diverted text
+
+Macros for text handling
+
+* Len:: Calculating length of strings
+* Index:: Searching for substrings
+* Regexp:: Searching for regular expressions
+* Substr:: Extracting substrings
+* Translit:: Translating characters
+* Patsubst:: Substituting text by regular expression
+* Format:: Formatting strings (printf-like)
+
+Macros for doing arithmetic
+
+* Incr:: Decrement and increment operators
+* Eval:: Evaluating integer or rational expressions
+
+Running UNIX commands
+
+* Syscmd:: Executing simple commands
+* Esyscmd:: Reading the output of commands
+* Sysval:: Exit codes
+* Maketemp:: Making names for temporary files
+
+Miscellaneous builtin macros
+
+* Errprint:: Printing error messages
+* M4exit:: Exiting from m4
+* Syncoutput:: Turning on and off sync lines
+
+Compatibility with other versions of `m4'
+
+* Extensions:: Extensions in GNU m4
+* Incompatibilities:: Facilities in System V m4 not in GNU m4
+* Other Incompat:: Other incompatibilities
+

File: m4.info, Node: Preliminaries, Next: Syntax, Prev: Top, Up: Top
@@ -1006,8 +1107,7 @@ to avoid unwanted expansion of the text:
')
=>
string
- =>The macro
- defn(`string')
+ =>The macro defn(`string')
=>The macro dnl is very useful
=>
@@ -1364,133 +1464,3 @@ the standard error output.
*Note Debug Levels:: for information on controlling the details of
the display.
-
-File: m4.info, Node: Trace, Next: Debug Levels, Prev: Dumpdef, Up: Debugging
-
-Tracing macro calls
-===================
-
- It is possible to trace macro calls and expansions through the
-builtins `traceon' and `traceoff':
-
- traceon(...)
- traceoff(...)
-
-When called without any arguments, `traceon' and `traceoff' will turn
-tracing on and off, respectively, for all defined macros. When called
-with arguments, only the named macros are affected.
-
- The expansion of `traceon' and `traceoff' is void.
-
- Whenever a traced macro is called and the arguments have been
-collected, the call is displayed. If the expansion of the macro call
-is not void, the expansion can be displayed after the call. The output
-is printed directly on the standard error output.
-
- define(`foo', `Hello World.')
- =>
- define(`echo', `$@')
- =>
- traceon(`foo', `echo')
- =>
- foo
- error-->m4trace: -1- foo -> `Hello World.'
- =>Hello World.
- echo(gnus, and gnats)
- error-->m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
- =>gnus,and gnats
-
- The number between dashes is the depth of the expansion. It is one
-most of the time, signifying an expansion at the outermost level, but it
-increases when macro arguments contain unquoted macro calls.
-
- *Note Debug Levels:: for information on controlling the details of
-the display.
-
-
-File: m4.info, Node: Debug Levels, Next: Debug Output, Prev: Trace, Up: Debugging
-
-Controlling debugging output
-============================
-
- The `-d' option to `m4' controls the amount of details presented,
-when using the macros described in the preceding sections.
-
- The FLAGS following the option can be one or more of the following:
-
-`t'
- Trace all macro calls made in this invocation of `m4'.
-
-`a'
- Show the actual arguments in each macro call. This applies to all
- macro calls if the `t' flag is used, otherwise only the macros
- covered by calls of `traceon'.
-
-`e'
- Show the expansion of each macro call, if it is not void. This
- applies to all macro calls if the `t' flag is used, otherwise only
- the macros covered by calls of `traceon'.
-
-`q'
- Quote actual arguments and macro expansions in the display with the
- current quotes.
-
-`c'
- Show several trace lines for each macro call. A line is shown
- when the macro is seen, but before the arguments are collected; a
- second line when the arguments have been collected and a third
- line after the call has completed.
-
-`x'
- Add a unique `macro call id' to each line of the trace output.
- This is useful in connection with the `c' flag above.
-
-`f'
- Show the name of the current input file in each trace output line.
-
-`l'
- Show the the current input line number in each trace output line.
-
-`p'
- Print a message when a named file is found through the path search
- mecanism (*note Search Path::.), giving the actual filename used.
-
-`i'
- Print a message each time the current input file is changed,
- giving file name and input line number.
-
-`V'
- A shorthand for all of the above flags.
-
- If no flags are specified with the `-d' option, the default is
-`aeq'. The examples in the previous two sections assumed the default
-flags.
-
- There is a builtin macro `debugmode', which allows on-the-fly
-control of the debugging output format:
-
- debugmode(opt FLAGS)
-
-The argument FLAGS should be a subset of the letters listed above. As
-special cases, if the argument starts with a `+', the flags are added
-to the current debug flags, and if it starts with a `-', they are
-removed. If no argument is present, the debugging flags are set to
-zero (as if no `-d' was given), and with an empty argument the flags
-are reset to the default.
-
-
-File: m4.info, Node: Debug Output, Prev: Debug Levels, Up: Debugging
-
-Saving debugging output
-=======================
-
- Debug and tracing output can be redirected to files using either the
-`-o' option to `m4', or with the builtin macro `debugfile':
-
- debugfile(opt FILENAME)
-
-will send all further debug and trace output to FILENAME. If FILENAME
-is empty, debug and trace output are discarded and if `debugfile' is
-called without any arguments, debug and trace output are sent to the
-standard error output.
-
diff --git a/doc/m4.info-2 b/doc/m4.info-2
index 0e47ee8e..f31e53e7 100644
--- a/doc/m4.info-2
+++ b/doc/m4.info-2
@@ -25,6 +25,136 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: m4.info, Node: Trace, Next: Debug Levels, Prev: Dumpdef, Up: Debugging
+
+Tracing macro calls
+===================
+
+ It is possible to trace macro calls and expansions through the
+builtins `traceon' and `traceoff':
+
+ traceon(...)
+ traceoff(...)
+
+When called without any arguments, `traceon' and `traceoff' will turn
+tracing on and off, respectively, for all defined macros. When called
+with arguments, only the named macros are affected.
+
+ The expansion of `traceon' and `traceoff' is void.
+
+ Whenever a traced macro is called and the arguments have been
+collected, the call is displayed. If the expansion of the macro call
+is not void, the expansion can be displayed after the call. The output
+is printed directly on the standard error output.
+
+ define(`foo', `Hello World.')
+ =>
+ define(`echo', `$@')
+ =>
+ traceon(`foo', `echo')
+ =>
+ foo
+ error-->m4trace: -1- foo -> `Hello World.'
+ =>Hello World.
+ echo(gnus, and gnats)
+ error-->m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
+ =>gnus,and gnats
+
+ The number between dashes is the depth of the expansion. It is one
+most of the time, signifying an expansion at the outermost level, but it
+increases when macro arguments contain unquoted macro calls.
+
+ *Note Debug Levels:: for information on controlling the details of
+the display.
+
+
+File: m4.info, Node: Debug Levels, Next: Debug Output, Prev: Trace, Up: Debugging
+
+Controlling debugging output
+============================
+
+ The `-d' option to `m4' controls the amount of details presented,
+when using the macros described in the preceding sections.
+
+ The FLAGS following the option can be one or more of the following:
+
+`t'
+ Trace all macro calls made in this invocation of `m4'.
+
+`a'
+ Show the actual arguments in each macro call. This applies to all
+ macro calls if the `t' flag is used, otherwise only the macros
+ covered by calls of `traceon'.
+
+`e'
+ Show the expansion of each macro call, if it is not void. This
+ applies to all macro calls if the `t' flag is used, otherwise only
+ the macros covered by calls of `traceon'.
+
+`q'
+ Quote actual arguments and macro expansions in the display with the
+ current quotes.
+
+`c'
+ Show several trace lines for each macro call. A line is shown
+ when the macro is seen, but before the arguments are collected; a
+ second line when the arguments have been collected and a third
+ line after the call has completed.
+
+`x'
+ Add a unique `macro call id' to each line of the trace output.
+ This is useful in connection with the `c' flag above.
+
+`f'
+ Show the name of the current input file in each trace output line.
+
+`l'
+ Show the the current input line number in each trace output line.
+
+`p'
+ Print a message when a named file is found through the path search
+ mecanism (*note Search Path::.), giving the actual filename used.
+
+`i'
+ Print a message each time the current input file is changed,
+ giving file name and input line number.
+
+`V'
+ A shorthand for all of the above flags.
+
+ If no flags are specified with the `-d' option, the default is
+`aeq'. The examples in the previous two sections assumed the default
+flags.
+
+ There is a builtin macro `debugmode', which allows on-the-fly
+control of the debugging output format:
+
+ debugmode(opt FLAGS)
+
+The argument FLAGS should be a subset of the letters listed above. As
+special cases, if the argument starts with a `+', the flags are added
+to the current debug flags, and if it starts with a `-', they are
+removed. If no argument is present, the debugging flags are set to
+zero (as if no `-d' was given), and with an empty argument the flags
+are reset to the default.
+
+
+File: m4.info, Node: Debug Output, Prev: Debug Levels, Up: Debugging
+
+Saving debugging output
+=======================
+
+ Debug and tracing output can be redirected to files using either the
+`-o' option to `m4', or with the builtin macro `debugfile':
+
+ debugfile(opt FILENAME)
+
+will send all further debug and trace output to FILENAME. If FILENAME
+is empty, debug and trace output are discarded and if `debugfile' is
+called without any arguments, debug and trace output are sent to the
+standard error output.
+
+
File: m4.info, Node: Input Control, Next: File Inclusion, Prev: Debugging, Up: Top
Input control
@@ -296,7 +426,7 @@ With `changesyntax' we can modify the meaning of a word.
define(`test.1', `TEST ONE')
=>
__file__
- =>31.changesynta
+ =>in
changesyntax(`O_', `W.')
=>
__file__
@@ -568,7 +698,7 @@ include a file, if it exists, expanding to nothing if it does not.
include(`no-such-file')
=>
- error-->39.include:2: m4: Cannot open no-such-file: No such file or directory
+ error-->in:1: m4: Cannot open no-such-file: No such file or directory
sinclude(`no-such-file')
=>
@@ -1224,7 +1354,7 @@ relation return `0'.
define(`foo', `666')
=>
eval(`foo'/6)
- error-->60.eval:14: m4: Bad expression in eval: foo/6
+ error-->in:7: m4: Bad expression in eval: foo/6
=>
eval(foo/6)
=>111
@@ -1314,10 +1444,10 @@ of the expansion: it will appear along with the error output of `m4'.
Assume you are positioned into the `checks' directory of GNU `m4'
distribution, then:
- define(`vice', `esyscmd(grep Vice ../COPYING)')
+ define(`vice', `esyscmd(grep Vice ../Makefile)')
=>
vice
- => Ty Coon, President of Vice
+ =># Ty Coon, President of Vice
=>
Note how the expansion of `esyscmd' has a trailing newline.
@@ -1425,7 +1555,7 @@ current input line number in that file.
errprint(`m4:'__file__:__line__: `Input error
')
- error-->m4:65.errprint:2: Input error
+ error-->m4:in:1: Input error
=>

@@ -1446,7 +1576,7 @@ the exit code is zero.
')m4exit(1)')
=>
fatal_error(`This is a BAD one, buster')
- error-->m4: 66.m4exit: 5: fatal error: This is a BAD one, buster
+ error-->m4: in: 3: fatal error: This is a BAD one, buster
After this macro call, `m4' will exit with exit code 1. This macro
is only intended for error exits, since the normal exit procedures are
@@ -1471,136 +1601,3 @@ off.
All other arguments are ignored as is `syncoutput' without
parenthesis.
-
-File: m4.info, Node: Frozen files, Next: Compatibility, Prev: Miscellaneous, Up: Top
-
-Fast loading of frozen states
-*****************************
-
- Some bigger `m4' applications may be built over a common base
-containing hundreds of definitions and other costly initializations.
-Usually, the common base is kept in one or more declarative files,
-which files are listed on each `m4' invocation prior to the user's
-input file, or else, `include''d from this input file.
-
- Reading the common base of a big application, over and over again,
-may be time consuming. GNU `m4' offers some machinery to speed up the
-start of an application using lengthy common bases. Presume the user
-repeatedly uses:
-
- m4 base.m4 input.m4
-
-with a varying contents of `input.m4', but a rather fixed contents for
-`base.m4'. Then, the user might rather execute:
-
- m4 -F base.m4f base.m4
-
-once, and further execute, as often as needed:
-
- m4 -R base.m4f input.m4
-
-with the varying input. The first call, containing the `-F' option,
-only reads and executes file `base.m4', so defining various application
-macros and computing other initializations. Only once the input file
-`base.m4' has been completely processed, GNU `m4' produces on
-`base.m4f' a "frozen" file, that is, a file which contains a kind of
-snapshot of the `m4' internal state.
-
- Later calls, containing the `-R' option, are able to reload the
-internal state of `m4''s memory, from `base.m4f', *prior* to reading
-any other input files. By this mean, instead of starting with a virgin
-copy of `m4', input will be read after having effectively recovered the
-effect of a prior run. In our example, the effect is the same as if
-file `base.m4' has been read anew. However, this effect is achieved a
-lot faster.
-
- Only one frozen file may be created or read in any one `m4'
-invocation. It is not possible to recover two frozen files at once.
-However, frozen files may be updated incrementally, through using `-R'
-and `-F' options simultaneously. For example, if some care is taken,
-the command:
-
- m4 file1.m4 file2.m4 file3.m4 file4.m4
-
-could be broken down in the following sequence, accumulating the same
-output:
-
- m4 -F file1.m4f file1.m4
- m4 -R file1.m4f -F file2.m4f file2.m4
- m4 -R file2.m4f -F file3.m4f file3.m4
- m4 -R file3.m4f file4.m4
-
- Some care is necessary because not every effort has been made for
-this to work in all cases. In particular, the trace attribute of
-macros is not handled, nor the current setting of `changeword'. Also,
-interactions for some options of `m4' being used in one call and not
-for the next, have not been fully analyzed yet. On the other end, you
-may be confident that stacks of `pushdef''ed definitions are handled
-correctly, so are `undefine''d or renamed builtins, changed strings for
-quotes or comments.
-
- When an `m4' run is to be frozen, the automatic undiversion which
-takes place at end of execution is inhibited. Instead, all positively
-numbered diversions are saved into the frozen file. The active
-diversion number is also transmitted.
-
- A frozen file to be reloaded need not reside in the current
-directory. It is looked up the same way as an `include' file (*note
-Search Path::.).
-
- Frozen files are sharable across architectures. It is safe to write
-a frozen file on one machine and read it on another, given that the
-second machine uses the same, or a newer version of GNU `m4'. These
-are simple (editable) text files, made up of directives, each starting
-with a capital letter and ending with a newline (<NL>). Wherever a
-directive is expected, the character `#' introduces a comment line,
-empty lines are also ignored. In the following descriptions, LENGTHs
-always refer to corresponding STRINGs. Numbers are always expressed in
-decimal. The directives are:
-
-`V NUMBER <NL>'
- Confirms the format of the file. NUMBER should be 1.
-
-`C LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
- Uses STRING1 and STRING2 as the beginning comment and end comment
- strings.
-
-`Q LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
- Uses STRING1 and STRING2 as the beginning quote and end quote
- strings.
-
-`F LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
- Defines, through `pushdef', a definition for STRING1 expanding to
- the function whose builtin name is STRING2.
-
-`T LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
- Defines, though `pushdef', a definition for STRING1 expanding to
- the text given by STRING2.
-
-`D NUMBER, LENGTH <NL> STRING <NL>'
- Selects diversion NUMBER, making it current, then copy STRING in
- the current diversion. NUMBER may be a negative number for a
- non-existing diversion. To merely specify an active selection,
- use this command with an empty STRING. With 0 as the diversion
- NUMBER, STRING will be issued on standard output at reload time,
- however this may not be produced from within `m4'.
-
-
-File: m4.info, Node: Compatibility, Next: Experiments, Prev: Frozen files, Up: Top
-
-Compatibility with other versions of `m4'
-*****************************************
-
- This chapter describes the differences between this implementation of
-`m4', and the implementation found under UNIX, notably System V,
-Release 3.
-
- There are also differences in BSD flavors of `m4'. No attempt is
-made to summarize these here.
-
-* Menu:
-
-* Extensions:: Extensions in GNU m4
-* Incompatibilities:: Facilities in System V m4 not in GNU m4
-* Other Incompat:: Other incompatibilities
-
diff --git a/doc/m4.info-3 b/doc/m4.info-3
index 28bf9c5b..5a4e8ca6 100644
--- a/doc/m4.info-3
+++ b/doc/m4.info-3
@@ -25,6 +25,139 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: m4.info, Node: Frozen files, Next: Compatibility, Prev: Miscellaneous, Up: Top
+
+Fast loading of frozen states
+*****************************
+
+ Some bigger `m4' applications may be built over a common base
+containing hundreds of definitions and other costly initializations.
+Usually, the common base is kept in one or more declarative files,
+which files are listed on each `m4' invocation prior to the user's
+input file, or else, `include''d from this input file.
+
+ Reading the common base of a big application, over and over again,
+may be time consuming. GNU `m4' offers some machinery to speed up the
+start of an application using lengthy common bases. Presume the user
+repeatedly uses:
+
+ m4 base.m4 input.m4
+
+with a varying contents of `input.m4', but a rather fixed contents for
+`base.m4'. Then, the user might rather execute:
+
+ m4 -F base.m4f base.m4
+
+once, and further execute, as often as needed:
+
+ m4 -R base.m4f input.m4
+
+with the varying input. The first call, containing the `-F' option,
+only reads and executes file `base.m4', so defining various application
+macros and computing other initializations. Only once the input file
+`base.m4' has been completely processed, GNU `m4' produces on
+`base.m4f' a "frozen" file, that is, a file which contains a kind of
+snapshot of the `m4' internal state.
+
+ Later calls, containing the `-R' option, are able to reload the
+internal state of `m4''s memory, from `base.m4f', *prior* to reading
+any other input files. By this mean, instead of starting with a virgin
+copy of `m4', input will be read after having effectively recovered the
+effect of a prior run. In our example, the effect is the same as if
+file `base.m4' has been read anew. However, this effect is achieved a
+lot faster.
+
+ Only one frozen file may be created or read in any one `m4'
+invocation. It is not possible to recover two frozen files at once.
+However, frozen files may be updated incrementally, through using `-R'
+and `-F' options simultaneously. For example, if some care is taken,
+the command:
+
+ m4 file1.m4 file2.m4 file3.m4 file4.m4
+
+could be broken down in the following sequence, accumulating the same
+output:
+
+ m4 -F file1.m4f file1.m4
+ m4 -R file1.m4f -F file2.m4f file2.m4
+ m4 -R file2.m4f -F file3.m4f file3.m4
+ m4 -R file3.m4f file4.m4
+
+ Some care is necessary because not every effort has been made for
+this to work in all cases. In particular, the trace attribute of
+macros is not handled, nor the current setting of `changeword'. Also,
+interactions for some options of `m4' being used in one call and not
+for the next, have not been fully analyzed yet. On the other end, you
+may be confident that stacks of `pushdef''ed definitions are handled
+correctly, so are `undefine''d or renamed builtins, changed strings for
+quotes or comments.
+
+ When an `m4' run is to be frozen, the automatic undiversion which
+takes place at end of execution is inhibited. Instead, all positively
+numbered diversions are saved into the frozen file. The active
+diversion number is also transmitted.
+
+ A frozen file to be reloaded need not reside in the current
+directory. It is looked up the same way as an `include' file (*note
+Search Path::.).
+
+ Frozen files are sharable across architectures. It is safe to write
+a frozen file on one machine and read it on another, given that the
+second machine uses the same, or a newer version of GNU `m4'. These
+are simple (editable) text files, made up of directives, each starting
+with a capital letter and ending with a newline (<NL>). Wherever a
+directive is expected, the character `#' introduces a comment line,
+empty lines are also ignored. In the following descriptions, LENGTHs
+always refer to corresponding STRINGs. Numbers are always expressed in
+decimal. The directives are:
+
+`V NUMBER <NL>'
+ Confirms the format of the file. NUMBER should be 1.
+
+`C LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
+ Uses STRING1 and STRING2 as the beginning comment and end comment
+ strings.
+
+`Q LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
+ Uses STRING1 and STRING2 as the beginning quote and end quote
+ strings.
+
+`F LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
+ Defines, through `pushdef', a definition for STRING1 expanding to
+ the function whose builtin name is STRING2.
+
+`T LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
+ Defines, though `pushdef', a definition for STRING1 expanding to
+ the text given by STRING2.
+
+`D NUMBER, LENGTH <NL> STRING <NL>'
+ Selects diversion NUMBER, making it current, then copy STRING in
+ the current diversion. NUMBER may be a negative number for a
+ non-existing diversion. To merely specify an active selection,
+ use this command with an empty STRING. With 0 as the diversion
+ NUMBER, STRING will be issued on standard output at reload time,
+ however this may not be produced from within `m4'.
+
+
+File: m4.info, Node: Compatibility, Next: Experiments, Prev: Frozen files, Up: Top
+
+Compatibility with other versions of `m4'
+*****************************************
+
+ This chapter describes the differences between this implementation of
+`m4', and the implementation found under UNIX, notably System V,
+Release 3.
+
+ There are also differences in BSD flavors of `m4'. No attempt is
+made to summarize these here.
+
+* Menu:
+
+* Extensions:: Extensions in GNU m4
+* Incompatibilities:: Facilities in System V m4 not in GNU m4
+* Other Incompat:: Other incompatibilities
+
+
File: m4.info, Node: Extensions, Next: Incompatibilities, Prev: Compatibility, Up: Compatibility
Extensions in GNU `m4'
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index ba12f8b2..077a7387 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -122,10 +122,113 @@ documentation. However@dots{}
* Concept index:: Index for many concepts
* Macro index:: Index for all m4 macros
- --- The Detailed Node Listing ---
+@detailmenu --- The Detailed Node Listing ---
Introduction and preliminaries
+* Intro:: Introduction to @code{m4}
+* History:: Historical references
+* Invoking m4:: Invoking @code{m4}
+* Bugs:: Problems and bugs
+* Manual:: Using this manual
+
+Lexical and syntactic conventions
+
+* Names:: Macro names
+* Quoted strings:: Quoting input to m4
+* Other tokens:: Other kinds of input tokens
+* Comments:: Comments in m4 input
+* Input processing:: How m4 copies input to output
+
+How to invoke macros
+
+* Invocation:: Macro invocation
+* Inhibiting Invocation:: Preventing macro invocation
+* Macro Arguments:: Macro arguments
+* Quoting Arguments:: On Quoting Arguments to macros
+* Macro expansion:: Expanding macros
+
+How to define new macros
+
+* Define:: Defining a new macro
+* Arguments:: Arguments to macros
+* Pseudo Arguments:: Pseudo arguments to macros
+* Undefine:: Deleting a macro
+* Defn:: Renaming macros
+* Pushdef:: Temporarily redefining macros
+
+* Indir:: Indirect call of macros
+* Builtin:: Indirect call of builtins
+
+Conditionals, loops and recursion
+
+* Ifdef:: Testing if a macro is defined
+* Ifelse:: If-else construct, or multibranch
+* Loops:: Loops and recursion in m4
+
+How to debug macros and input
+
+* Dumpdef:: Displaying macro definitions
+* Trace:: Tracing macro calls
+* Debug Levels:: Controlling debugging output
+* Debug Output:: Saving debugging output
+
+Input control
+
+* Dnl:: Deleting whitespace in input
+* Changequote:: Changing the quote characters
+* Changecom:: Changing the comment delimiters
+* Changesyntax:: Changing the lexical structure of the input
+* Changeword:: Changing the lexical structure of words
+* M4wrap:: Saving input until end of input
+
+File inclusion
+
+* Include:: Including named files
+* Search Path:: Searching for include files
+
+Diverting and undiverting output
+
+* Divert:: Diverting output
+* Undivert:: Undiverting output
+* Divnum:: Diversion numbers
+* Cleardiv:: Discarding diverted text
+
+Macros for text handling
+
+* Len:: Calculating length of strings
+* Index:: Searching for substrings
+* Regexp:: Searching for regular expressions
+* Substr:: Extracting substrings
+* Translit:: Translating characters
+* Patsubst:: Substituting text by regular expression
+* Format:: Formatting strings (printf-like)
+
+Macros for doing arithmetic
+
+* Incr:: Decrement and increment operators
+* Eval:: Evaluating integer or rational expressions
+
+Running UNIX commands
+
+* Syscmd:: Executing simple commands
+* Esyscmd:: Reading the output of commands
+* Sysval:: Exit codes
+* Maketemp:: Making names for temporary files
+
+Miscellaneous builtin macros
+
+* Errprint:: Printing error messages
+* M4exit:: Exiting from m4
+* Syncoutput:: Turning on and off sync lines
+
+Compatibility with other versions of @code{m4}
+
+* Extensions:: Extensions in GNU m4
+* Incompatibilities:: Facilities in System V m4 not in GNU m4
+* Other Incompat:: Other incompatibilities
+
+@end detailmenu
@end menu
@end ifinfo
@@ -1150,7 +1253,7 @@ define(`string', `The macro dnl is very useful
')
@result{}
string
-@result{}The macro
+@result{}The macro @comment
defn(`string')
@result{}The macro dnl is very useful
@result{}
@@ -2024,7 +2127,7 @@ With @code{changesyntax} we can modify the meaning of a word.
define(`test.1', `TEST ONE')
@result{}
__file__
-@result{}31.changesynta
+@result{}in
changesyntax(`O_', `W.')
@result{}
__file__
@@ -2352,7 +2455,7 @@ does not.
@example
include(`no-such-file')
@result{}
-@error{}39.include:2: m4: Cannot open no-such-file: No such file or directory
+@error{}in:1: m4: Cannot open no-such-file: No such file or directory
sinclude(`no-such-file')
@result{}
@end example
@@ -2888,7 +2991,7 @@ patsubst(`GNUs not Unix', `\w*', `(\&)')
patsubst(`GNUs not Unix', `\w+', `(\&)')
@result{}(GNUs) (not) (Unix)
patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-@result{}GN not
+@result{}GN not @comment
@end example
Here is a slightly more realistic example, which capitalizes individual
@@ -3108,7 +3211,7 @@ square(square(5)+1)
define(`foo', `666')
@result{}
eval(`foo'/6)
-@error{}60.eval:14: m4: Bad expression in eval: foo/6
+@error{}in:7: m4: Bad expression in eval: foo/6
@result{}
eval(foo/6)
@result{}111
@@ -3211,10 +3314,10 @@ Assume you are positioned into the @file{checks} directory of GNU
@code{m4} distribution, then:
@example
-define(`vice', `esyscmd(grep Vice ../COPYING)')
+define(`vice', `esyscmd(grep Vice ../Makefile)')
@result{}
vice
-@result{} Ty Coon, President of Vice
+@result{}# Ty Coon, President of Vice
@result{}
@end example
@@ -3349,7 +3452,7 @@ current input line number in that file.
@example
errprint(`m4:'__file__:__line__: `Input error
')
-@error{}m4:65.errprint:2: Input error
+@error{}m4:in:1: Input error
@result{}
@end example
@@ -3374,7 +3477,7 @@ define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
')m4exit(1)')
@result{}
fatal_error(`This is a BAD one, buster')
-@error{}m4: 66.m4exit: 5: fatal error: This is a BAD one, buster
+@error{}m4: in: 3: fatal error: This is a BAD one, buster
@end example
After this macro call, @code{m4} will exit with exit code 1. This macro
@@ -3547,7 +3650,7 @@ at reload time, however this may not be produced from within @code{m4}.
@cindex compatibility
This chapter describes the differences between this implementation of
@code{m4}, and the implementation found under UNIX, notably System V,
-Release 3.
+Release 3.
There are also differences in BSD flavors of @code{m4}. No attempt
is made to summarize these here.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 6e7e7911..c2e9c7e1 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 10 August 1998
-@set EDITION 1.4f
-@set VERSION 1.4f
+@set UPDATED 8 September 1998
+@set EDITION 1.4h
+@set VERSION 1.4h
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 3105f3b1..9652c779 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -118,33 +118,37 @@
\showboxbreadth\maxdimen\showboxdepth\maxdimen
}%
-%---------------------Begin change-----------------------
+% For @cropmarks command.
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
%
-%%%% For @cropmarks command.
-% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
%
\newdimen\cornerlong \newdimen\cornerthick
-\newdimen \topandbottommargin
-\newdimen \outerhsize \newdimen \outervsize
+\newdimen\topandbottommargin
+\newdimen\outerhsize \newdimen\outervsize
\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
\outerhsize=7in
%\outervsize=9.5in
% Alternative @smallbook page size is 9.25in
\outervsize=9.25in
\topandbottommargin=.75in
-%
-%---------------------End change-----------------------
% Main output routine.
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
-\newbox\headlinebox \newbox\footlinebox
+\newbox\headlinebox
+\newbox\footlinebox
% \onepageout takes a vbox as an argument. Note that \pagecontents
% does insertions, but you have to call it yourself.
\def\onepageout#1{%
- \hoffset=\normaloffset
+ \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+ %
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
%
@@ -163,53 +167,46 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
\shipout\vbox{%
+ \ifcropmarks \vbox to \outervsize\bgroup
+ \hsize = \outerhsize
+ \line{\ewtop\hfil\ewtop}%
+ \nointerlineskip
+ \line{%
+ \vbox{\moveleft\cornerthick\nstop}%
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}%
+ }%
+ \vskip\topandbottommargin
+ \line\bgroup
+ \hfil % center the page within the outer (page) hsize.
+ \ifodd\pageno\hskip\bindingoffset\fi
+ \vbox\bgroup
+ \fi
+ %
\unvbox\headlinebox
\pagebody{#1}%
\unvbox\footlinebox
- }%
- }%
+ %
+ \ifcropmarks
+ \egroup % end of \vbox\bgroup
+ \hfil\egroup % end of (centering) \line\bgroup
+ \vskip\topandbottommargin plus1fill minus1fill
+ \boxmaxdepth = \cornerthick
+ \line{%
+ \vbox{\moveleft\cornerthick\nsbot}%
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}%
+ }%
+ \nointerlineskip
+ \line{\ewbot\hfil\ewbot}%
+ \egroup % \vbox from first cropmarks clause
+ \fi
+ }% end of \shipout\vbox
+ }% end of group with \turnoffactive
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
-%%%% For @cropmarks command %%%%
-
-% Here is a modification of the main output routine for Near East Publications
-% This provides right-angle cropmarks at all four corners.
-% The contents of the page are centerlined into the cropmarks,
-% and any desired binding offset is added as an \hskip on either
-% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
-%
-\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
-{\escapechar=`\\\relax % makes sure backslash is used in output files.
- \shipout
- \vbox to \outervsize{\hsize=\outerhsize
- \vbox{\line{\ewtop\hfill\ewtop}}
- \nointerlineskip
- \line{\vbox{\moveleft\cornerthick\nstop}
- \hfill
- \vbox{\moveright\cornerthick\nstop}}
- \vskip \topandbottommargin
- \centerline{\ifodd\pageno\hskip\bindingoffset\fi
- \vbox{
- {\let\hsize=\pagewidth \makeheadline}
- \pagebody{#1}
- {\let\hsize=\pagewidth \makefootline}}
- \ifodd\pageno\else\hskip\bindingoffset\fi}
- \vskip \topandbottommargin plus1fill minus1fill
- \boxmaxdepth\cornerthick
- \line{\vbox{\moveleft\cornerthick\nsbot}
- \hfill
- \vbox{\moveright\cornerthick\nsbot}}
- \nointerlineskip
- \vbox{\line{\ewbot\hfill\ewbot}}
- }}
- \advancepageno
- \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
-%
-% Do @cropmarks to get crop marks
-\def\cropmarks{\let\onepageout=\croppageout }
-
\newinsert\margin \dimen\margin=\maxdimen
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
@@ -223,7 +220,6 @@
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
}
-%
% Here are the rules for the cropmarks. Note that they are
% offset so that the space between them is truly \outerhsize or \outervsize
% (P. A. MacKay, 12 November, 1986)
@@ -2240,6 +2236,7 @@ width0pt\relax} \fi
\def\r##1{\realbackslash r {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\b##1{\realbackslash b {##1}}%
+\def\sc##1{\realbackslash sc {##1}}%
\def\cite##1{\realbackslash cite {##1}}%
\def\key##1{\realbackslash key {##1}}%
\def\file##1{\realbackslash file {##1}}%
@@ -2411,27 +2408,16 @@ width0pt\relax} \fi
% Define the macros used in formatting output of the sorted index material.
-% This is what you call to cause a particular index to get printed.
-% Write
-% @unnumbered Function Index
-% @printindex fn
-
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
\def\printindex{\parsearg\doprintindex}
-
\def\doprintindex#1{\begingroup
\dobreak \chapheadingskip{10000}%
%
\indexfonts \rm
\tolerance = 9500
\indexbreaks
- \def\indexbackslash{\rawbackslashxx}%
- % Index files are almost Texinfo source, but we use \ as the escape
- % character. It would be better to use @, but that's too big a change
- % to make right now.
- \catcode`\\ = 0
- \catcode`\@ = 11
- \escapechar = `\\
- \begindoublecolumns
%
% See if the index file exists and is nonempty.
\openin 1 \jobname.#1s
@@ -2450,11 +2436,19 @@ width0pt\relax} \fi
\ifeof 1
(Index is empty)
\else
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \def\indexbackslash{\rawbackslashxx}%
+ \catcode`\\ = 0
+ \catcode`\@ = 11
+ \escapechar = `\\
+ \begindoublecolumns
\input \jobname.#1s
+ \enddoublecolumns
\fi
\fi
\closein 1
- \enddoublecolumns
\endgroup}
% These macros are used by the sorted index file itself.
@@ -2556,24 +2550,39 @@ width0pt\relax} \fi
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
- \output = {\global\setbox\partialpage
- =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
+ \output = {\global\setbox\partialpage = \vbox{%
+ %
+ % Here is a possibility not foreseen in manmac: if we accumulate a
+ % whole lot of material, we might end up calling this \output
+ % routine twice in a row (see the doublecol-lose test, which is
+ % essentially a couple of indexes with @setchapternewpage off). In
+ % that case, we must prevent the second \partialpage from
+ % simply overwriting the first, causing us to lose the page.
+ % This will preserve it until a real output routine can ship it
+ % out. Generally, \partialpage will be empty when this runs and
+ % this will be a no-op.
+ \unvbox\partialpage
+ %
+ % Unvbox the main output page.
+ \unvbox255
+ \kern-\topskip \kern\baselineskip
+ }}%
\eject
%
- % Now switch to the double-column output routine.
- \output={\doublecolumnout}%
+ % Use the double-column output routine for subsequent pages.
+ \output = {\doublecolumnout}%
%
% Change the page size parameters. We could do this once outside this
% routine, in each of @smallbook, @afourpaper, and the default 8.5x11
% format, but then we repeat the same computation. Repeating a couple
% of assignments once per index is clearly meaningless for the
- % execution time, so we may as well do it once.
+ % execution time, so we may as well do it in one place.
%
% First we halve the line length, less a little for the gutter between
% the columns. We compute the gutter based on the line length, so it
% changes automatically with the paper format. The magic constant
- % below is chosen so that the gutter has the same value (well, +- <
- % 1pt) as it did when we hard-coded it.
+ % below is chosen so that the gutter has the same value (well, +-<1pt)
+ % as it did when we hard-coded it.
%
% We put the result in a separate register, \doublecolumhsize, so we
% can restore it in \pagesofar, after \hsize itself has (potentially)
@@ -2594,100 +2603,103 @@ width0pt\relax} \fi
% (undoubled) page height minus any material left over from the
% previous page.
\dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
- % box0 will be the left-hand column, box1 the right.
+ % box0 will be the left-hand column, box2 the right.
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
\onepageout\pagesofar
- \unvbox255 \penalty\outputpenalty
+ \unvbox255
+ \penalty\outputpenalty
}
\def\pagesofar{%
- % The contents of the output page -- any previous material,
+ % Re-output the contents of the output page -- any previous material,
% followed by the two boxes we just split.
\unvbox\partialpage
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
}
\def\enddoublecolumns{%
- \output={\balancecolumns}\eject % split what we have
- \endgroup
+ \output = {\balancecolumns}\eject % split what we have
+ \endgroup % started in \begindoublecolumns
+ %
% Back to normal single-column typesetting, but take account of the
% fact that we just accumulated some stuff on the output page.
- \pagegoal=\vsize
+ \pagegoal = \vsize
}
\def\balancecolumns{%
- % Called on the last page of the double column material.
- \setbox0=\vbox{\unvbox255}%
+ % Called at the end of the double column material.
+ \setbox0 = \vbox{\unvbox255}%
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\divide\dimen@ by 2
\splittopskip = \topskip
% Loop until we get a decent breakpoint.
- {\vbadness=10000 \loop \global\setbox3=\copy0
+ {\vbadness=10000 \loop
+ \global\setbox3=\copy0
\global\setbox1=\vsplit3 to\dimen@
- \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}%
+ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt
+ \repeat}%
\setbox0=\vbox to\dimen@{\unvbox1}%
\setbox2=\vbox to\dimen@{\unvbox3}%
\pagesofar
}
-\catcode `\@=\other
+\catcode`\@ = \other
\message{sectioning,}
% Define chapters, sections, etc.
-\newcount \chapno
-\newcount \secno \secno=0
-\newcount \subsecno \subsecno=0
-\newcount \subsubsecno \subsubsecno=0
+\newcount\chapno
+\newcount\secno \secno=0
+\newcount\subsecno \subsecno=0
+\newcount\subsubsecno \subsubsecno=0
% This counter is funny since it counts through charcodes of letters A, B, ...
-\newcount \appendixno \appendixno = `\@
+\newcount\appendixno \appendixno = `\@
\def\appendixletter{\char\the\appendixno}
-\newwrite \contentsfile
+\newwrite\contentsfile
% This is called from \setfilename.
-\def\opencontents{\openout \contentsfile = \jobname.toc}
+\def\opencontents{\openout\contentsfile = \jobname.toc }
% Each @chapter defines this as the name of the chapter.
% page headings and footings can use it. @section does likewise
\def\thischapter{} \def\thissection{}
-\def\seccheck#1{\if \pageno<0 %
-\errmessage{@#1 not allowed after generating table of contents}\fi
-%
-}
+\def\seccheck#1{\ifnum \pageno<0
+ \errmessage{@#1 not allowed after generating table of contents}%
+\fi}
\def\chapternofonts{%
-\let\rawbackslash=\relax%
-\let\frenchspacing=\relax%
-\def\result{\realbackslash result}
-\def\equiv{\realbackslash equiv}
-\def\expansion{\realbackslash expansion}
-\def\print{\realbackslash print}
-\def\TeX{\realbackslash TeX}
-\def\dots{\realbackslash dots}
-\def\copyright{\realbackslash copyright}
-\def\tt{\realbackslash tt}
-\def\bf{\realbackslash bf }
-\def\w{\realbackslash w}
-\def\less{\realbackslash less}
-\def\gtr{\realbackslash gtr}
-\def\hat{\realbackslash hat}
-\def\char{\realbackslash char}
-\def\tclose##1{\realbackslash tclose {##1}}
-\def\code##1{\realbackslash code {##1}}
-\def\samp##1{\realbackslash samp {##1}}
-\def\r##1{\realbackslash r {##1}}
-\def\b##1{\realbackslash b {##1}}
-\def\key##1{\realbackslash key {##1}}
-\def\file##1{\realbackslash file {##1}}
-\def\kbd##1{\realbackslash kbd {##1}}
-% These are redefined because @smartitalic wouldn't work inside xdef.
-\def\i##1{\realbackslash i {##1}}
-\def\cite##1{\realbackslash cite {##1}}
-\def\var##1{\realbackslash var {##1}}
-\def\emph##1{\realbackslash emph {##1}}
-\def\dfn##1{\realbackslash dfn {##1}}
+ \let\rawbackslash=\relax
+ \let\frenchspacing=\relax
+ \def\result{\realbackslash result}%
+ \def\equiv{\realbackslash equiv}%
+ \def\expansion{\realbackslash expansion}%
+ \def\print{\realbackslash print}%
+ \def\TeX{\realbackslash TeX}%
+ \def\dots{\realbackslash dots}%
+ \def\copyright{\realbackslash copyright}%
+ \def\tt{\realbackslash tt}%
+ \def\bf{\realbackslash bf}%
+ \def\w{\realbackslash w}%
+ \def\less{\realbackslash less}%
+ \def\gtr{\realbackslash gtr}%
+ \def\hat{\realbackslash hat}%
+ \def\char{\realbackslash char}%
+ \def\tclose##1{\realbackslash tclose{##1}}%
+ \def\code##1{\realbackslash code{##1}}%
+ \def\samp##1{\realbackslash samp{##1}}%
+ \def\r##1{\realbackslash r{##1}}%
+ \def\b##1{\realbackslash b{##1}}%
+ \def\key##1{\realbackslash key{##1}}%
+ \def\file##1{\realbackslash file{##1}}%
+ \def\kbd##1{\realbackslash kbd{##1}}%
+ % These are redefined because @smartitalic wouldn't work inside xdef.
+ \def\i##1{\realbackslash i{##1}}%
+ \def\cite##1{\realbackslash cite{##1}}%
+ \def\var##1{\realbackslash var{##1}}%
+ \def\emph##1{\realbackslash emph{##1}}%
+ \def\dfn##1{\realbackslash dfn{##1}}%
}
\newcount\absseclevel % used to calculate proper heading level
@@ -2774,7 +2786,8 @@ width0pt\relax} \fi
% because we don't want its macros evaluated now.
\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
{\chapternofonts%
-\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\donoderef %
@@ -2793,8 +2806,9 @@ width0pt\relax} \fi
\gdef\thischaptername{#1}%
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
{\chapternofonts%
-\edef\temp{{\realbackslash chapentry
- {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash chapentry{\the\toks0}%
+ {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\appendixnoderef %
@@ -2828,7 +2842,8 @@ width0pt\relax} \fi
\unnumbchapmacro {#1}%
\gdef\thischapter{#1}\gdef\thissection{#1}%
{\chapternofonts%
-\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\unnumbnoderef %
@@ -2843,8 +2858,9 @@ width0pt\relax} \fi
\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
{\chapternofonts%
+\toks0 = {#1}%
\edef\temp{{\realbackslash secentry %
-{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
+{\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\donoderef %
@@ -2858,8 +2874,9 @@ width0pt\relax} \fi
\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
{\chapternofonts%
+\toks0 = {#1}%
\edef\temp{{\realbackslash secentry %
-{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
+{\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\appendixnoderef %
@@ -2871,7 +2888,8 @@ width0pt\relax} \fi
\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
\plainsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts%
-\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\unnumbnoderef %
@@ -2884,8 +2902,9 @@ width0pt\relax} \fi
\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
{\chapternofonts%
+\toks0 = {#1}%
\edef\temp{{\realbackslash subsecentry %
-{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+{\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\donoderef %
@@ -2898,8 +2917,9 @@ width0pt\relax} \fi
\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
{\chapternofonts%
+\toks0 = {#1}%
\edef\temp{{\realbackslash subsecentry %
-{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+{\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\appendixnoderef %
@@ -2911,7 +2931,8 @@ width0pt\relax} \fi
\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
\plainsubsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts%
-\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\unnumbnoderef %
@@ -2925,8 +2946,8 @@ width0pt\relax} \fi
\subsubsecheading {#1}
{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
{\chapternofonts%
-\edef\temp{{\realbackslash subsubsecentry %
- {#1}
+\toks0 = {#1}%
+\edef\temp{{\realbackslash subsubsecentry{\the\toks0}
{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}
{\noexpand\folio}}}%
\escapechar=`\\%
@@ -2942,7 +2963,8 @@ width0pt\relax} \fi
\subsubsecheading {#1}
{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
{\chapternofonts%
-\edef\temp{{\realbackslash subsubsecentry{#1}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash subsubsecentry{\the\toks0}%
{\appendixletter}
{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%
\escapechar=`\\%
@@ -2956,7 +2978,8 @@ width0pt\relax} \fi
\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
\plainsubsubsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts%
-\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
+\toks0 = {#1}%
+\edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}%
\escapechar=`\\%
\write \contentsfile \temp %
\unnumbnoderef %
diff --git a/doc/version.texi b/doc/version.texi
index 6e7e7911..c2e9c7e1 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 10 August 1998
-@set EDITION 1.4f
-@set VERSION 1.4f
+@set UPDATED 8 September 1998
+@set EDITION 1.4h
+@set VERSION 1.4h
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 5011cf7f..18891610 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,7 +1,15 @@
-EXTRA_DIST = $(pkgdata_DATA)
+EXTRA_DIST = $(pkgdata_DATA) $(TESTS) defs
pkgdata_DATA = capitalize.m4 comments.m4 ddivert.m4 debug.m4 esyscmd.m4 \
exp.m4 file.m4 foreach.m4 forloop.m4 fstab.m4 hanoi.m4 incl-test.m4 \
include.m4 indir.m4 misc.m4 multiquotes.m4 patsubst.m4 pushpop.m4 \
regexp.m4 reverse.m4 stackovf.sh sync-lines.m4 sysv-args.m4 trace.m4 \
translit.m4 undivert.incl undivert.m4 wrap.m4 iso8859.m4
+
+TESTS = comments.test ddivert.test debug.test iso8859.test \
+ reverse.test sysv-args.test wrap.test
+
+all:
+
+defs: $(top_srcdir)/tests/defs
+ cp $(top_srcdir)/tests/defs $@
diff --git a/examples/Makefile.in b/examples/Makefile.in
index a1bbc357..629253a6 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,7 +32,7 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DISTDIR =
+DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -77,6 +77,7 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
+PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
@@ -87,13 +88,16 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
-EXTRA_DIST = $(pkgdata_DATA)
+EXTRA_DIST = $(pkgdata_DATA) $(TESTS) defs
pkgdata_DATA = capitalize.m4 comments.m4 ddivert.m4 debug.m4 esyscmd.m4 \
exp.m4 file.m4 foreach.m4 forloop.m4 fstab.m4 hanoi.m4 incl-test.m4 \
include.m4 indir.m4 misc.m4 multiquotes.m4 patsubst.m4 pushpop.m4 \
regexp.m4 reverse.m4 stackovf.sh sync-lines.m4 sysv-args.m4 trace.m4 \
translit.m4 undivert.incl undivert.m4 wrap.m4 iso8859.m4
+
+TESTS = comments.test ddivert.test debug.test iso8859.test \
+ reverse.test sysv-args.test wrap.test
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@@ -150,10 +154,35 @@ distdir: $(DISTFILES)
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
+check-TESTS: $(TESTS)
+ @failed=0; all=0; \
+ srcdir=$(srcdir); export srcdir; \
+ for tst in $(TESTS); do \
+ if test -f $$tst; then dir=.; \
+ else dir="$(srcdir)"; fi; \
+ if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+ all=`expr $$all + 1`; \
+ echo "PASS: $$tst"; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="$$failed of $$all tests failed"; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0
info:
dvi:
check: all
- $(MAKE)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
installcheck:
install-exec:
@$(NORMAL_INSTALL)
@@ -167,25 +196,20 @@ install: install-exec install-data all
uninstall: uninstall-pkgdataDATA
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
- $(mkinstalldirs) $(DATADIR)$(pkgdatadir)
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-generic
clean: clean-generic mostlyclean
@@ -197,11 +221,17 @@ maintainer-clean: maintainer-clean-generic distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-.PHONY: uninstall-pkgdataDATA install-pkgdataDATA tags distdir info dvi \
-installcheck install-exec install-data install uninstall all \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+.PHONY: uninstall-pkgdataDATA install-pkgdataDATA tags distdir \
+check-TESTS info dvi installcheck install-exec install-data install \
+uninstall all installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
+
+
+all:
+defs: $(top_srcdir)/tests/defs
+ cp $(top_srcdir)/tests/defs $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/comments.test b/examples/comments.test
new file mode 100755
index 00000000..63161dc2
--- /dev/null
+++ b/examples/comments.test
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# comments.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(comments.m4)dnl
+EOF
+
+cat <<\EOF >ok
+# An ordinary comment
+
+# A comment in a macro
+Macro foo expansion
+
+
+# A *** Macro comment expansion *** in a macro
+Macro foo expansion
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
diff --git a/examples/ddivert.test b/examples/ddivert.test
new file mode 100755
index 00000000..5db82e90
--- /dev/null
+++ b/examples/ddivert.test
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# ddivert.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(ddivert.m4)dnl
+EOF
+
+cat <<\EOF >ok
+Text diverted a first time.
+Text diverted a second time.
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
diff --git a/examples/debug.test b/examples/debug.test
new file mode 100755
index 00000000..0260641e
--- /dev/null
+++ b/examples/debug.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# debug.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(debug.m4)dnl
+EOF
+
+cat <<\EOF >ok
+
+
+
+2 1 0 Liftoff
+EOF
+
+cat <<\EOF >okerr
+m4trace: -1- countdown ...
+m4trace: -1- countdown(`2') -> ???
+m4trace: -1- countdown(...) -> `2 ifelse(eval(2 > 0), 1, `countdown(decr(2))', `Liftoff')'
+m4trace: -1- countdown ...
+m4trace: -1- countdown(`1') -> ???
+m4trace: -1- countdown(...) -> `1 ifelse(eval(1 > 0), 1, `countdown(decr(1))', `Liftoff')'
+m4trace: -1- countdown ...
+m4trace: -1- countdown(`0') -> ???
+m4trace: -1- countdown(...) -> `0 ifelse(eval(0 > 0), 1, `countdown(decr(0))', `Liftoff')'
+EOF
+
+M4PATH=$srcdir $M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/defs b/examples/defs
new file mode 100644
index 00000000..cf97e3b3
--- /dev/null
+++ b/examples/defs
@@ -0,0 +1,54 @@
+# -*- ksh -*-
+# Defines for GNU m4 testing environment.
+# Erick Branderhorst <Erick.Branderhorst@asml.nl>
+
+# Ensure $srcdir set correctly.
+test -f ${srcdir}/defs || {
+ echo "defs: installation error" 1>&2
+ exit 1
+}
+
+# If srcdir is relative, we need to modify it.
+case "$srcdir" in
+ /*)
+ ;;
+
+ *)
+ srcdir="../$srcdir"
+ ;;
+esac
+
+rm -rf testSubDir > /dev/null 2>&1
+mkdir testSubDir
+cd testSubDir
+
+# Build appropriate environment in test directory. Eg create
+# configure.in, touch all necessary files, etc.
+
+# nothing yet
+
+# See how redirections should work. User can set VERBOSE to see all
+# output.
+test -z "$VERBOSE" && {
+ exec > /dev/null 2>&1
+}
+
+# User can set MAKE to choose which make to use. Must use GNU make.
+test -z "$MAKE" && MAKE=make
+
+echo "=== Running test $0"
+
+# See how GNU m4 should be run. No options as default.
+test -z "$M4" && M4=../../src/m4
+
+# See how cmp should be run.
+test -z "$CMP" && CMP=cmp
+
+# Setting nls related vars. Override them in the test when needed.
+LANGUAGE=C
+export LANGUAGE
+LC_ALL=C
+export LC_ALL
+LANG=C
+export LANG
+
diff --git a/examples/iso8859.test b/examples/iso8859.test
new file mode 100755
index 00000000..3cca92e1
--- /dev/null
+++ b/examples/iso8859.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# iso8859.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(iso8859.m4)dnl
+EOF
+
+cat <<\EOF >ok
+# Texting quotes
+DEFINE
+CHANGEQUOTE(«,»)
+0 TEST # TEST
+1 test # test
+2 «test» # «test»
+3 ««test»» # ««test»»
+CHANGEQUOTE(«««,»»»)
+0 TEST # TEST
+1 «TEST» # «TEST»
+2 ««TEST»» # ««TEST»»
+3 test # test
+# Test use of all iso8859 characters except NUL ` '
+Length of string is: 253
+Comparing strings: MATCH
+# NUL does not pass through
+This will be seen.
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
diff --git a/examples/reverse.test b/examples/reverse.test
new file mode 100755
index 00000000..63b4cefa
--- /dev/null
+++ b/examples/reverse.test
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# reverse.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(reverse.m4)dnl
+EOF
+
+cat <<\EOF >ok
+
+`' =>
+`hej' => hej
+`hej, med, dig' => dig, med, hej
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
diff --git a/examples/sysv-args.test b/examples/sysv-args.test
new file mode 100755
index 00000000..ceb68c9a
--- /dev/null
+++ b/examples/sysv-args.test
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# sysv-args.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(sysv-args.m4)dnl
+EOF
+
+cat <<\EOF >ok
+
+
+0
+1
+6
+
+
+hej med dig
+hej med dig en gang igen
+an awful lot of argument at least more that ten silly arguments
+EOF
+
+cat <<\EOF >okerr
+m4trace: -1- nargs
+m4trace: -1- nargs
+m4trace: -1- nargs
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+m4trace: -1- concat
+EOF
+
+M4PATH=$srcdir $M4 in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/wrap.test b/examples/wrap.test
new file mode 100755
index 00000000..a6bba3c2
--- /dev/null
+++ b/examples/wrap.test
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# wrap.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(wrap.m4)dnl
+EOF
+
+cat <<\EOF >ok
+
+No. 33: The End.
+Wrapper no. 2
+Wrapper no. 1
+Wrapper no. 3
+Wrapper no. 4
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
diff --git a/install-sh b/install-sh
index ebc66913..e8436696 100755
--- a/install-sh
+++ b/install-sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 93945a7a..634253f1 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,12 +1,8 @@
## Process this file with automake to produce Makefile.in
noinst_LIBRARIES = libm4.a
-libm4_a_SOURCES = getopt.h obstack.h regex.h regex.c getopt.c \
- getopt1.c error.c obstack.c xmalloc.c \
- xstrdup.c alloca.c strtol.c
+libm4_a_SOURCES = error.c
-noinst_HEADERS = getopt.h error.h getdate.h
-
-# libm4_a_LIBADD =
-# libm4_a_DEPENDENCIES = # $(libfu_a_LIBADD)
+noinst_HEADERS = getopt.h error.h getdate.h obstack.h regex.h
+libm4_a_LIBADD = @LIBOBJS@
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 05712c14..4f6e7de1 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,7 +32,7 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DISTDIR =
+DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -77,6 +77,7 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
+PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
@@ -89,11 +90,11 @@ l = @l@
noinst_LIBRARIES = libm4.a
-libm4_a_SOURCES = getopt.h obstack.h regex.h regex.c getopt.c \
- getopt1.c error.c obstack.c xmalloc.c \
- xstrdup.c alloca.c strtol.c
+libm4_a_SOURCES = error.c
-noinst_HEADERS = getopt.h error.h getdate.h
+noinst_HEADERS = getopt.h error.h getdate.h obstack.h regex.h
+
+libm4_a_LIBADD = @LIBOBJS@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@@ -104,16 +105,16 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libm4_a_LIBADD =
-libm4_a_OBJECTS = regex.o getopt.o getopt1.o error.o obstack.o \
-xmalloc.o xstrdup.o alloca.o strtol.o
+libm4_a_DEPENDENCIES = @LIBOBJS@
+libm4_a_OBJECTS = error.o
AR = ar
CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
HEADERS = $(noinst_HEADERS)
-DIST_COMMON = COPYING.LIB Makefile.am Makefile.in
+DIST_COMMON = COPYING.LIB Makefile.am Makefile.in getopt.c getopt1.c \
+obstack.c regex.c strtol.c xmalloc.c xstrdup.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -204,20 +205,15 @@ distdir: $(DISTFILES)
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
-alloca.o: alloca.c ../config.h
error.o: error.c ../config.h error.h
-getopt.o: getopt.c ../config.h getopt.h
-getopt1.o: getopt1.c ../config.h getopt.h
obstack.o: obstack.c obstack.h ../config.h
regex.o: regex.c ../config.h regex.h
-strtol.o: strtol.c ../config.h
xmalloc.o: xmalloc.c ../config.h error.h
xstrdup.o: xstrdup.c ../config.h
info:
dvi:
check: all
- $(MAKE)
installcheck:
install-exec:
@$(NORMAL_INSTALL)
@@ -231,24 +227,19 @@ install: install-exec install-data all
uninstall:
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
@@ -275,9 +266,6 @@ mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-# libm4_a_LIBADD =
-# libm4_a_DEPENDENCIES = # $(libfu_a_LIBADD)
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/lib/alloca.c b/lib/alloca.c
deleted file mode 100644
index c1699c42..00000000
--- a/lib/alloca.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/* alloca.c -- allocate automatically reclaimed memory
- (Mostly) portable public-domain implementation -- D A Gwyn
-
- This implementation of the PWB library alloca function,
- which is used to allocate space off the run-time stack so
- that it is automatically reclaimed upon procedure exit,
- was inspired by discussions with J. Q. Johnson of Cornell.
- J.Otto Tennant <jot@cray.com> contributed the Cray support.
-
- There are some preprocessor constants that can
- be defined when compiling for your specific system, for
- improved efficiency; however, the defaults should be okay.
-
- The general concept of this implementation is to keep
- track of all alloca-allocated blocks, and reclaim any
- that are found to be deeper in the stack than the current
- invocation. This heuristic does not reclaim storage as
- soon as it becomes invalid, but it will do so eventually.
-
- As a special case, alloca(0) reclaims storage without
- allocating any. It is a good idea to use alloca(0) in
- your main control loop, etc. to force garbage collection. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef emacs
-#include "blockinput.h"
-#endif
-
-/* If compiling with GCC 2, this file's not needed. */
-#if !defined (__GNUC__) || __GNUC__ < 2
-
-/* If someone has defined alloca as a macro,
- there must be some other way alloca is supposed to work. */
-#ifndef alloca
-
-#ifdef emacs
-#ifdef static
-/* actually, only want this if static is defined as ""
- -- this is for usg, in which emacs must undefine static
- in order to make unexec workable
- */
-#ifndef STACK_DIRECTION
-you
-lose
--- must know STACK_DIRECTION at compile-time
-#endif /* STACK_DIRECTION undefined */
-#endif /* static */
-#endif /* emacs */
-
-/* If your stack is a linked list of frames, you have to
- provide an "address metric" ADDRESS_FUNCTION macro. */
-
-#if defined (CRAY) && defined (CRAY_STACKSEG_END)
-long i00afunc ();
-#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
-#else
-#define ADDRESS_FUNCTION(arg) &(arg)
-#endif
-
-#if __STDC__
-typedef void *pointer;
-#else
-typedef char *pointer;
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/* Different portions of Emacs need to call different versions of
- malloc. The Emacs executable needs alloca to call xmalloc, because
- ordinary malloc isn't protected from input signals. On the other
- hand, the utilities in lib-src need alloca to call malloc; some of
- them are very simple, and don't have an xmalloc routine.
-
- Non-Emacs programs expect this to call xmalloc.
-
- Callers below should use malloc. */
-
-#ifndef emacs
-#define malloc xmalloc
-#endif
-extern pointer malloc ();
-
-/* Define STACK_DIRECTION if you know the direction of stack
- growth for your system; otherwise it will be automatically
- deduced at run-time.
-
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-
-#ifndef STACK_DIRECTION
-#define STACK_DIRECTION 0 /* Direction unknown. */
-#endif
-
-#if STACK_DIRECTION != 0
-
-#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
-
-#else /* STACK_DIRECTION == 0; need run-time code. */
-
-static int stack_dir; /* 1 or -1 once known. */
-#define STACK_DIR stack_dir
-
-static void
-find_stack_direction ()
-{
- static char *addr = NULL; /* Address of first `dummy', once known. */
- auto char dummy; /* To get stack address. */
-
- if (addr == NULL)
- { /* Initial entry. */
- addr = ADDRESS_FUNCTION (dummy);
-
- find_stack_direction (); /* Recurse once. */
- }
- else
- {
- /* Second entry. */
- if (ADDRESS_FUNCTION (dummy) > addr)
- stack_dir = 1; /* Stack grew upward. */
- else
- stack_dir = -1; /* Stack grew downward. */
- }
-}
-
-#endif /* STACK_DIRECTION == 0 */
-
-/* An "alloca header" is used to:
- (a) chain together all alloca'ed blocks;
- (b) keep track of stack depth.
-
- It is very important that sizeof(header) agree with malloc
- alignment chunk size. The following default should work okay. */
-
-#ifndef ALIGN_SIZE
-#define ALIGN_SIZE sizeof(double)
-#endif
-
-typedef union hdr
-{
- char align[ALIGN_SIZE]; /* To force sizeof(header). */
- struct
- {
- union hdr *next; /* For chaining headers. */
- char *deep; /* For stack depth measure. */
- } h;
-} header;
-
-static header *last_alloca_header = NULL; /* -> last alloca header. */
-
-/* Return a pointer to at least SIZE bytes of storage,
- which will be automatically reclaimed upon exit from
- the procedure that called alloca. Originally, this space
- was supposed to be taken from the current stack frame of the
- caller, but that method cannot be made to work for some
- implementations of C, for example under Gould's UTX/32. */
-
-pointer
-alloca (size)
- unsigned size;
-{
- auto char probe; /* Probes stack depth: */
- register char *depth = ADDRESS_FUNCTION (probe);
-
-#if STACK_DIRECTION == 0
- if (STACK_DIR == 0) /* Unknown growth direction. */
- find_stack_direction ();
-#endif
-
- /* Reclaim garbage, defined as all alloca'd storage that
- was allocated from deeper in the stack than currently. */
-
- {
- register header *hp; /* Traverses linked list. */
-
-#ifdef emacs
- BLOCK_INPUT;
-#endif
-
- for (hp = last_alloca_header; hp != NULL;)
- if ((STACK_DIR > 0 && hp->h.deep > depth)
- || (STACK_DIR < 0 && hp->h.deep < depth))
- {
- register header *np = hp->h.next;
-
- free ((pointer) hp); /* Collect garbage. */
-
- hp = np; /* -> next header. */
- }
- else
- break; /* Rest are not deeper. */
-
- last_alloca_header = hp; /* -> last valid storage. */
-
-#ifdef emacs
- UNBLOCK_INPUT;
-#endif
- }
-
- if (size == 0)
- return NULL; /* No allocation required. */
-
- /* Allocate combined header + user data storage. */
-
- {
- register pointer new = malloc (sizeof (header) + size);
- /* Address of header. */
-
- if (new == 0)
- abort();
-
- ((header *) new)->h.next = last_alloca_header;
- ((header *) new)->h.deep = depth;
-
- last_alloca_header = (header *) new;
-
- /* User storage begins just after header. */
-
- return (pointer) ((char *) new + sizeof (header));
- }
-}
-
-#if defined (CRAY) && defined (CRAY_STACKSEG_END)
-
-#ifdef DEBUG_I00AFUNC
-#include <stdio.h>
-#endif
-
-#ifndef CRAY_STACK
-#define CRAY_STACK
-#ifndef CRAY2
-/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
-struct stack_control_header
- {
- long shgrow:32; /* Number of times stack has grown. */
- long shaseg:32; /* Size of increments to stack. */
- long shhwm:32; /* High water mark of stack. */
- long shsize:32; /* Current size of stack (all segments). */
- };
-
-/* The stack segment linkage control information occurs at
- the high-address end of a stack segment. (The stack
- grows from low addresses to high addresses.) The initial
- part of the stack segment linkage control information is
- 0200 (octal) words. This provides for register storage
- for the routine which overflows the stack. */
-
-struct stack_segment_linkage
- {
- long ss[0200]; /* 0200 overflow words. */
- long sssize:32; /* Number of words in this segment. */
- long ssbase:32; /* Offset to stack base. */
- long:32;
- long sspseg:32; /* Offset to linkage control of previous
- segment of stack. */
- long:32;
- long sstcpt:32; /* Pointer to task common address block. */
- long sscsnm; /* Private control structure number for
- microtasking. */
- long ssusr1; /* Reserved for user. */
- long ssusr2; /* Reserved for user. */
- long sstpid; /* Process ID for pid based multi-tasking. */
- long ssgvup; /* Pointer to multitasking thread giveup. */
- long sscray[7]; /* Reserved for Cray Research. */
- long ssa0;
- long ssa1;
- long ssa2;
- long ssa3;
- long ssa4;
- long ssa5;
- long ssa6;
- long ssa7;
- long sss0;
- long sss1;
- long sss2;
- long sss3;
- long sss4;
- long sss5;
- long sss6;
- long sss7;
- };
-
-#else /* CRAY2 */
-/* The following structure defines the vector of words
- returned by the STKSTAT library routine. */
-struct stk_stat
- {
- long now; /* Current total stack size. */
- long maxc; /* Amount of contiguous space which would
- be required to satisfy the maximum
- stack demand to date. */
- long high_water; /* Stack high-water mark. */
- long overflows; /* Number of stack overflow ($STKOFEN) calls. */
- long hits; /* Number of internal buffer hits. */
- long extends; /* Number of block extensions. */
- long stko_mallocs; /* Block allocations by $STKOFEN. */
- long underflows; /* Number of stack underflow calls ($STKRETN). */
- long stko_free; /* Number of deallocations by $STKRETN. */
- long stkm_free; /* Number of deallocations by $STKMRET. */
- long segments; /* Current number of stack segments. */
- long maxs; /* Maximum number of stack segments so far. */
- long pad_size; /* Stack pad size. */
- long current_address; /* Current stack segment address. */
- long current_size; /* Current stack segment size. This
- number is actually corrupted by STKSTAT to
- include the fifteen word trailer area. */
- long initial_address; /* Address of initial segment. */
- long initial_size; /* Size of initial segment. */
- };
-
-/* The following structure describes the data structure which trails
- any stack segment. I think that the description in 'asdef' is
- out of date. I only describe the parts that I am sure about. */
-
-struct stk_trailer
- {
- long this_address; /* Address of this block. */
- long this_size; /* Size of this block (does not include
- this trailer). */
- long unknown2;
- long unknown3;
- long link; /* Address of trailer block of previous
- segment. */
- long unknown5;
- long unknown6;
- long unknown7;
- long unknown8;
- long unknown9;
- long unknown10;
- long unknown11;
- long unknown12;
- long unknown13;
- long unknown14;
- };
-
-#endif /* CRAY2 */
-#endif /* not CRAY_STACK */
-
-#ifdef CRAY2
-/* Determine a "stack measure" for an arbitrary ADDRESS.
- I doubt that "lint" will like this much. */
-
-static long
-i00afunc (long *address)
-{
- struct stk_stat status;
- struct stk_trailer *trailer;
- long *block, size;
- long result = 0;
-
- /* We want to iterate through all of the segments. The first
- step is to get the stack status structure. We could do this
- more quickly and more directly, perhaps, by referencing the
- $LM00 common block, but I know that this works. */
-
- STKSTAT (&status);
-
- /* Set up the iteration. */
-
- trailer = (struct stk_trailer *) (status.current_address
- + status.current_size
- - 15);
-
- /* There must be at least one stack segment. Therefore it is
- a fatal error if "trailer" is null. */
-
- if (trailer == 0)
- abort ();
-
- /* Discard segments that do not contain our argument address. */
-
- while (trailer != 0)
- {
- block = (long *) trailer->this_address;
- size = trailer->this_size;
- if (block == 0 || size == 0)
- abort ();
- trailer = (struct stk_trailer *) trailer->link;
- if ((block <= address) && (address < (block + size)))
- break;
- }
-
- /* Set the result to the offset in this segment and add the sizes
- of all predecessor segments. */
-
- result = address - block;
-
- if (trailer == 0)
- {
- return result;
- }
-
- do
- {
- if (trailer->this_size <= 0)
- abort ();
- result += trailer->this_size;
- trailer = (struct stk_trailer *) trailer->link;
- }
- while (trailer != 0);
-
- /* We are done. Note that if you present a bogus address (one
- not in any segment), you will get a different number back, formed
- from subtracting the address of the first block. This is probably
- not what you want. */
-
- return (result);
-}
-
-#else /* not CRAY2 */
-/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
- Determine the number of the cell within the stack,
- given the address of the cell. The purpose of this
- routine is to linearize, in some sense, stack addresses
- for alloca. */
-
-static long
-i00afunc (long address)
-{
- long stkl = 0;
-
- long size, pseg, this_segment, stack;
- long result = 0;
-
- struct stack_segment_linkage *ssptr;
-
- /* Register B67 contains the address of the end of the
- current stack segment. If you (as a subprogram) store
- your registers on the stack and find that you are past
- the contents of B67, you have overflowed the segment.
-
- B67 also points to the stack segment linkage control
- area, which is what we are really interested in. */
-
- stkl = CRAY_STACKSEG_END ();
- ssptr = (struct stack_segment_linkage *) stkl;
-
- /* If one subtracts 'size' from the end of the segment,
- one has the address of the first word of the segment.
-
- If this is not the first segment, 'pseg' will be
- nonzero. */
-
- pseg = ssptr->sspseg;
- size = ssptr->sssize;
-
- this_segment = stkl - size;
-
- /* It is possible that calling this routine itself caused
- a stack overflow. Discard stack segments which do not
- contain the target address. */
-
- while (!(this_segment <= address && address <= stkl))
- {
-#ifdef DEBUG_I00AFUNC
- fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
-#endif
- if (pseg == 0)
- break;
- stkl = stkl - pseg;
- ssptr = (struct stack_segment_linkage *) stkl;
- size = ssptr->sssize;
- pseg = ssptr->sspseg;
- this_segment = stkl - size;
- }
-
- result = address - this_segment;
-
- /* If you subtract pseg from the current end of the stack,
- you get the address of the previous stack segment's end.
- This seems a little convoluted to me, but I'll bet you save
- a cycle somewhere. */
-
- while (pseg != 0)
- {
-#ifdef DEBUG_I00AFUNC
- fprintf (stderr, "%011o %011o\n", pseg, size);
-#endif
- stkl = stkl - pseg;
- ssptr = (struct stack_segment_linkage *) stkl;
- size = ssptr->sssize;
- pseg = ssptr->sspseg;
- result += size;
- }
- return (result);
-}
-
-#endif /* not CRAY2 */
-#endif /* CRAY */
-
-#endif /* no alloca */
-#endif /* not GCC version 2 */
diff --git a/lib/getdate.h b/lib/getdate.h
index db2dba4b..b937250e 100644
--- a/lib/getdate.h
+++ b/lib/getdate.h
@@ -14,33 +14,33 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
-# ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
+#ifndef PARAMS
+# if defined (__GNUC__) || __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
# endif
+#endif
-#if defined (vms)
+#ifdef vms
# include <types.h>
# include <time.h>
#else
# include <sys/types.h>
-# ifdef TIME_WITH_SYS_TIME
+# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
-# ifdef HAVE_SYS_TIME_H
+# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
-#endif /* defined (vms) */
+#endif
time_t get_date PARAMS ((const char *p, const time_t *now));
diff --git a/lib/regex.c b/lib/regex.c
index c75177cc..bd91ea15 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -15,9 +15,10 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
/* AIX requires this to be the first thing in the file. */
#if defined (_AIX) && !defined (REGEX_MALLOC)
@@ -500,7 +501,7 @@ typedef enum
} while (0)
#ifdef DEBUG
-static void extract_number _RE_ARGS ((int *dest, unsigned char *source));
+static void extract_number _RE_ARGS((int *dest, unsigned char *source));
static void
extract_number (dest, source)
int *dest;
@@ -528,8 +529,8 @@ extract_number (dest, source)
} while (0)
#ifdef DEBUG
-static void extract_number_and_incr _RE_ARGS ((int *destination,
- unsigned char **source));
+static void extract_number_and_incr _RE_ARGS((int *destination,
+ unsigned char **source));
static void
extract_number_and_incr (destination, source)
int *destination;
@@ -614,7 +615,6 @@ print_partial_compiled_pattern (start, end)
unsigned char *end;
{
int mcnt, mcnt2;
- unsigned char *p1;
unsigned char *p = start;
unsigned char *pend = end;
@@ -756,23 +756,20 @@ print_partial_compiled_pattern (start, end)
case succeed_n:
extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
+ printf ("/succeed_n to %d, %d times", p + mcnt - start, mcnt2);
break;
case jump_n:
extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
+ printf ("/jump_n to %d, %d times", p + mcnt - start, mcnt2);
break;
case set_number_at:
extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
+ printf ("/set_number_at location %d to %d", p + mcnt - start, mcnt2);
break;
case wordbound:
@@ -850,8 +847,7 @@ print_compiled_pattern (bufp)
unsigned char *buffer = bufp->buffer;
print_partial_compiled_pattern (buffer, buffer + bufp->used);
- printf ("%ld bytes used/%ld bytes allocated.\n",
- bufp->used, bufp->allocated);
+ printf ("%d bytes used/%d bytes allocated.\n", bufp->used, bufp->allocated);
if (bufp->fastmap_accurate && bufp->fastmap)
{
@@ -866,7 +862,7 @@ print_compiled_pattern (bufp)
printf ("no_sub: %d\t", bufp->no_sub);
printf ("not_bol: %d\t", bufp->not_bol);
printf ("not_eol: %d\t", bufp->not_eol);
- printf ("syntax: %lx\n", bufp->syntax);
+ printf ("syntax: %d\n", bufp->syntax);
/* Perhaps we should print the translate table? */
}
@@ -879,7 +875,7 @@ print_double_string (where, string1, size1, string2, size2)
int size1;
int size2;
{
- int this_char;
+ unsigned this_char;
if (where == NULL)
printf ("(null)");
@@ -900,9 +896,9 @@ print_double_string (where, string1, size1, string2, size2)
void
printchar (c)
- int c;
+ int c;
{
- putc (c, stderr);
+ putc(c, stderr);
}
#else /* not DEBUG */
@@ -942,6 +938,12 @@ re_set_syntax (syntax)
reg_syntax_t ret = re_syntax_options;
re_syntax_options = syntax;
+#ifdef DEBUG
+ if (syntax & RE_DEBUG)
+ debug = 1;
+ else if (debug) /* was on but now is not */
+ debug = 0;
+#endif /* DEBUG */
return ret;
}
@@ -1022,13 +1024,15 @@ static const char *re_error_msgid[] =
#endif
/* Roughly the maximum number of failure points on the stack. Would be
- exactly that if always used MAX_FAILURE_SPACE each time we failed.
+ exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
This is a variable only so users of regex can assign to it; we never
change it ourselves. */
#ifdef INT_IS_16BIT
#if defined (MATCH_MAY_ALLOCATE)
+/* 4400 was enough to cause a crash on Alpha OSF/1,
+ whose default stack limit is 2mb. */
long re_max_failures = 4000;
#else
long re_max_failures = 2000;
@@ -1046,7 +1050,7 @@ typedef struct
{
fail_stack_elt_t *stack;
unsigned long size;
- unsigned long avail; /* Offset of next open position. */
+ unsigned long avail; /* Offset of next open position. */
} fail_stack_type;
#else /* not INT_IS_16BIT */
@@ -1054,7 +1058,7 @@ typedef struct
#if defined (MATCH_MAY_ALLOCATE)
/* 4400 was enough to cause a crash on Alpha OSF/1,
whose default stack limit is 2mb. */
-int re_max_failures = 4000;
+int re_max_failures = 20000;
#else
int re_max_failures = 2000;
#endif
@@ -1187,8 +1191,8 @@ typedef struct
char *destination; \
/* Must be int, so when we don't save any registers, the arithmetic \
of 0 + -1 isn't done as unsigned. */ \
- /* Can't be int, since there is not a shred of a guarantee that int \
- is wide enough to hold a value of something to which pointer can \
+ /* Can't be int, since there is not a shred of a guarantee that int \
+ is wide enough to hold a value of something to which pointer can \
be assigned */ \
s_reg_t this_reg; \
\
@@ -1246,7 +1250,7 @@ typedef struct
DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\
PUSH_FAILURE_INT (highest_active_reg); \
\
- DEBUG_PRINT2 (" Pushing pattern 0x%x:\n", pattern_place); \
+ DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \
DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
PUSH_FAILURE_POINTER (pattern_place); \
\
@@ -1330,7 +1334,7 @@ typedef struct
DEBUG_PRINT1 ("'\n"); \
\
pat = (unsigned char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" Popping pattern 0x%x:\n", pat); \
+ DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \
DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
\
/* Restore register info. */ \
@@ -1433,25 +1437,25 @@ static char reg_unset_dummy;
/* Subroutine declarations and macros for regex_compile. */
-static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-static void store_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, int arg));
-static void store_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2));
-static void insert_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg, unsigned char *end));
-static void insert_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2, unsigned char *end));
-static boolean at_begline_loc_p _RE_ARGS ((const char *pattern, const char *p,
- reg_syntax_t syntax));
-static boolean at_endline_loc_p _RE_ARGS ((const char *p, const char *pend,
- reg_syntax_t syntax));
-static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
- const char *pend,
- char *translate,
- reg_syntax_t syntax,
- unsigned char *b));
+static reg_errcode_t regex_compile _RE_ARGS((const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp));
+static void store_op1 _RE_ARGS((re_opcode_t op, unsigned char *loc, int arg));
+static void store_op2 _RE_ARGS((re_opcode_t op, unsigned char *loc,
+ int arg1, int arg2));
+static void insert_op1 _RE_ARGS((re_opcode_t op, unsigned char *loc,
+ int arg, unsigned char *end));
+static void insert_op2 _RE_ARGS((re_opcode_t op, unsigned char *loc,
+ int arg1, int arg2, unsigned char *end));
+static boolean at_begline_loc_p _RE_ARGS((const char *pattern, const char *p,
+ reg_syntax_t syntax));
+static boolean at_endline_loc_p _RE_ARGS((const char *p, const char *pend,
+ reg_syntax_t syntax));
+static reg_errcode_t compile_range _RE_ARGS((const char **p_ptr,
+ const char *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ unsigned char *b));
/* Fetch the next character in the uncompiled pattern---translating it
if necessary. Also cast from a signed character in the constant
@@ -1526,19 +1530,19 @@ static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
/* Store a jump with opcode OP at LOC to location TO. We store a
relative address offset by the three bytes the jump itself occupies. */
#define STORE_JUMP(op, loc, to) \
- store_op1 (op, loc, (int) ((to) - (loc) - 3))
+ store_op1 (op, loc, (int)((to) - (loc) - 3))
/* Likewise, for a two-argument jump. */
#define STORE_JUMP2(op, loc, to, arg) \
- store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
+ store_op2 (op, loc, (int)((to) - (loc) - 3), arg)
/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP(op, loc, to) \
- insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
+ insert_op1 (op, loc, (int)((to) - (loc) - 3), b)
/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP2(op, loc, to, arg) \
- insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
+ insert_op2 (op, loc, (int)((to) - (loc) - 3), arg, b)
/* This is not an arbitrary limit: the arguments which represent offsets
@@ -1554,7 +1558,7 @@ static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
The REALLOC define eliminates a flurry of conversion warnings,
but is not required. */
#define MAX_BUF_SIZE 65500L
-#define REALLOC(p,s) realloc ((p), (size_t) (s))
+#define REALLOC(p,s) realloc((p), (size_t) (s))
#else
#define MAX_BUF_SIZE (1L << 16)
#define REALLOC(p,s) realloc ((p), (s))
@@ -1572,7 +1576,7 @@ static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
bufp->allocated <<= 1; \
if (bufp->allocated > MAX_BUF_SIZE) \
bufp->allocated = MAX_BUF_SIZE; \
- bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
+ bufp->buffer = (unsigned char *) REALLOC(bufp->buffer, bufp->allocated);\
if (bufp->buffer == NULL) \
return REG_ESPACE; \
/* If the buffer moved, move all the pointers into it. */ \
@@ -1715,9 +1719,9 @@ regex_grow_registers (num_regs)
#endif /* not MATCH_MAY_ALLOCATE */
-static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
- compile_stack,
- regnum_t regnum));
+static boolean group_in_compile_stack _RE_ARGS((compile_stack_type
+ compile_stack,
+ regnum_t regnum));
/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
Returns one of error codes defined in `regex.h', or zero for success.
@@ -2185,8 +2189,8 @@ regex_compile (pattern, size, syntax, bufp)
|| (is_upper && ISUPPER (ch))
|| (is_xdigit && ISXDIGIT (ch)))
SET_LIST_BIT (ch);
- if ( translate && (is_upper || is_lower)
- && (ISUPPER (ch) || ISLOWER (ch)))
+ if ( translate && (is_upper || is_lower)
+ && (ISUPPER(ch) || ISLOWER(ch)))
SET_LIST_BIT (ch);
}
had_char_class = true;
@@ -2614,7 +2618,7 @@ regex_compile (pattern, size, syntax, bufp)
case 'w':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
laststart = b;
BUF_PUSH (wordchar);
break;
@@ -2622,7 +2626,7 @@ regex_compile (pattern, size, syntax, bufp)
case 'W':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
laststart = b;
BUF_PUSH (notwordchar);
break;
@@ -2630,37 +2634,37 @@ regex_compile (pattern, size, syntax, bufp)
case '<':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
BUF_PUSH (wordbeg);
break;
case '>':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
BUF_PUSH (wordend);
break;
case 'b':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
BUF_PUSH (wordbound);
break;
case 'B':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
BUF_PUSH (notwordbound);
break;
case '`':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
BUF_PUSH (begbuf);
break;
case '\'':
if (re_syntax_options & RE_NO_GNU_OPS)
- goto normal_char;
+ goto normal_char;
BUF_PUSH (endbuf);
break;
@@ -2675,7 +2679,7 @@ regex_compile (pattern, size, syntax, bufp)
FREE_STACK_RETURN (REG_ESUBREG);
/* Can't back reference to a subexpression if inside of it. */
- if (group_in_compile_stack (compile_stack, (regnum_t) c1))
+ if (group_in_compile_stack (compile_stack, (regnum_t)c1))
goto normal_char;
laststart = b;
@@ -3547,12 +3551,14 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
: (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
== Sword)
+/* Disabled due to a compiler bug -- see comment at case wordbound */
+#if 0
/* Test if the character before D and the one at D differ with respect
to being word-constituent. */
#define AT_WORD_BOUNDARY(d) \
(AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
|| WORDCHAR_P (d - 1) != WORDCHAR_P (d))
-
+#endif
/* Free everything we malloc. */
#ifdef MATCH_MAY_ALLOCATE
@@ -3607,17 +3613,17 @@ re_match (bufp, string, size, pos, regs)
}
#endif /* not emacs */
-static boolean group_match_null_string_p _RE_ARGS ((unsigned char **p,
- unsigned char *end,
- register_info_type *reg_info));
-static boolean alt_match_null_string_p _RE_ARGS ((unsigned char *p,
- unsigned char *end,
+static boolean group_match_null_string_p _RE_ARGS((unsigned char **p,
+ unsigned char *end,
+ register_info_type *reg_info));
+static boolean alt_match_null_string_p _RE_ARGS((unsigned char *p,
+ unsigned char *end,
+ register_info_type *reg_info));
+static boolean common_op_match_null_string_p _RE_ARGS((unsigned char **p,
+ unsigned char *end,
register_info_type *reg_info));
-static boolean common_op_match_null_string_p _RE_ARGS ((unsigned char **p,
- unsigned char *end,
- register_info_type *reg_info));
-static int bcmp_translate _RE_ARGS ((const char *s1, const char *s2,
- int len, char *translate));
+static int bcmp_translate _RE_ARGS((const char *s1, const char *s2,
+ int len, char *translate));
/* re_match_2 matches the compiled pattern in BUFP against the
the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
@@ -3883,7 +3889,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
dend = end_match_2;
}
- DEBUG_PRINT1 ("The compiled pattern is:\n");
+ DEBUG_PRINT1 ("The compiled pattern is: ");
DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
DEBUG_PRINT1 ("The string to match is: `");
DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
@@ -3894,11 +3900,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
fails at this starting point in the input data. */
for (;;)
{
-#ifdef _LIBC
- DEBUG_PRINT2 ("\n%p: ", p);
-#else
DEBUG_PRINT2 ("\n0x%x: ", p);
-#endif
if (p == pend)
{ /* End of pattern means we might have succeeded. */
@@ -4477,11 +4479,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
-#else
DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
-#endif
PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
break;
@@ -4504,11 +4502,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT1 ("EXECUTING on_failure_jump");
EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
-#else
DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
-#endif
/* If this on_failure_jump comes right before a group (i.e.,
the original * applied to a group), save the information
@@ -4721,25 +4715,16 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
dummy_low_reg, dummy_high_reg,
reg_dummy, reg_dummy, reg_info_dummy);
}
-
- unconditional_jump:
-#ifdef _LIBC
- DEBUG_PRINT2 ("\n%p: ", p);
-#else
- DEBUG_PRINT2 ("\n0x%x: ", p);
-#endif
/* Note fall through. */
+
/* Unconditionally jump (without popping any failure points). */
case jump:
+ unconditional_jump:
EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
p += mcnt; /* Do the jump. */
-#ifdef _LIBC
- DEBUG_PRINT2 ("(to %p).\n", p);
-#else
DEBUG_PRINT2 ("(to 0x%x).\n", p);
-#endif
break;
@@ -4788,19 +4773,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
mcnt--;
p += 2;
STORE_NUMBER_AND_INCR (p, mcnt);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p - 2, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - 2, mcnt);
-#endif
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p, mcnt);
}
else if (mcnt == 0)
{
-#ifdef _LIBC
- DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n", p+2);
-#else
DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2);
-#endif
p[2] = (unsigned char) no_op;
p[3] = (unsigned char) no_op;
goto on_failure;
@@ -4816,11 +4793,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
{
mcnt--;
STORE_NUMBER (p + 2, mcnt);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p + 2, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + 2, mcnt);
-#endif
goto unconditional_jump;
}
/* If don't have to jump any more, skip over the rest of command. */
@@ -4835,11 +4807,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
EXTRACT_NUMBER_AND_INCR (mcnt, p);
p1 = p + mcnt;
EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
-#else
DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
-#endif
STORE_NUMBER (p1, mcnt);
break;
}
@@ -5351,7 +5319,13 @@ re_compile_pattern (pattern, length, bufp)
/* BSD has one and only one pattern buffer. */
static struct re_pattern_buffer re_comp_buf;
-char * weak_function
+char *
+#ifdef _LIBC
+/* Make these definitions weak in libc, so POSIX programs can redefine
+ these names if they don't use our functions, and still use
+ regcomp/regexec below without link errors. */
+weak_function
+#endif
re_comp (s)
const char *s;
{
@@ -5392,7 +5366,10 @@ re_comp (s)
}
-int weak_function
+int
+#ifdef _LIBC
+weak_function
+#endif
re_exec (s)
const char *s;
{
@@ -5646,3 +5623,11 @@ regfree (preg)
}
#endif /* not emacs */
+
+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/
diff --git a/lib/regex.h b/lib/regex.h
index 63eef10d..28bb5038 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,7 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
- Copyright (C) 1985,89,90,91,92,93,95,96,97 Free Software Foundation, Inc.
+
+ Copyright (C) 1985, 89,90,91,92,93,95,96,97 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,18 +13,14 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
#ifndef __REGEXP_LIBRARY_H__
#define __REGEXP_LIBRARY_H__
-/* Allow the use in C++ code. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* POSIX says that <sys/types.h> must be included (by the caller) before
<regex.h>. */
@@ -33,23 +30,24 @@ extern "C" {
#include <stddef.h>
#endif
+
/* The following two types have to be signed and unsigned integer type
wide enough to hold a value of a pointer. For most ANSI compilers
ptrdiff_t and size_t should be likely OK. Still size of these two
types is 2 for Microsoft C. Ugh... */
-typedef long int s_reg_t;
-typedef unsigned long int active_reg_t;
+typedef long s_reg_t;
+typedef unsigned long active_reg_t;
/* The following bits are used to determine the regexp syntax we
recognize. The set/not-set meanings are chosen so that Emacs syntax
remains the value 0. The bits are given in alphabetical order, and
the definitions shifted by one from the previous bit; thus, when we
add or remove a bit, only one other definition need change. */
-typedef unsigned long int reg_syntax_t;
+typedef unsigned long reg_syntax_t;
/* If this bit is not set, then \ inside a bracket expression is literal.
If set, then such a \ quotes the following character. */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+#define RE_BACKSLASH_ESCAPE_IN_LISTS (1L)
/* If this bit is not set, then + and ? are operators, and \+ and \? are
literals.
@@ -140,13 +138,21 @@ typedef unsigned long int reg_syntax_t;
If not set, then an unmatched ) is invalid. */
#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+/* If this bit is set, do not process the GNU regex operators.
+ IF not set, then the GNU regex operators are recognized. */
+#define RE_NO_GNU_OPS (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
/* If this bit is set, succeed as soon as we match the whole pattern,
without further backtracking. */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+#define RE_NO_POSIX_BACKTRACKING (RE_NO_GNU_OPS << 1)
-/* If this bit is set, do not process the GNU regex operators.
- If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+#define RE_DEBUG (RE_NO_POSIX_BACKTRACKING << 1)
/* This global variable defines the particular regexp syntax to use (for
some interfaces). When a regexp is compiled, the syntax used is
@@ -161,18 +167,19 @@ extern reg_syntax_t re_syntax_options;
#define RE_SYNTAX_EMACS 0
#define RE_SYNTAX_AWK \
- (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
- | RE_DOT_NEWLINE \
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
| RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-#define RE_SYNTAX_GNU_AWK \
- ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) \
- & ~(RE_DOT_NOT_NULL | RE_INTERVALS))
+#define RE_SYNTAX_GNU_AWK \
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
+ & ~(RE_DOT_NOT_NULL|RE_INTERVALS|RE_CONTEXT_INDEP_OPS))
#define RE_SYNTAX_POSIX_AWK \
- (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_NO_GNU_OPS)
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INTERVALS | RE_NO_GNU_OPS)
#define RE_SYNTAX_GREP \
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
@@ -228,8 +235,8 @@ extern reg_syntax_t re_syntax_options;
#ifdef RE_DUP_MAX
#undef RE_DUP_MAX
#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
-#define RE_DUP_MAX (0x7fff)
+/* if sizeof(int) == 2, then ((1 << 15) - 1) overflows */
+#define RE_DUP_MAX (0x7fff)
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
@@ -506,11 +513,6 @@ extern size_t regerror
size_t errbuf_size));
extern void regfree _RE_ARGS ((regex_t *preg));
-
-#ifdef __cplusplus
-}
-#endif /* C++ */
-
#endif /* not __REGEXP_LIBRARY_H__ */
/*
diff --git a/missing b/missing
index e4b838ca..5441d42f 100755
--- a/missing
+++ b/missing
@@ -58,7 +58,7 @@ Supported PROGRAM values:
aclocal)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. It should be needed only if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@@ -67,7 +67,7 @@ WARNING: \`$1' is missing on your system. It should be needed only if
autoconf)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. It should be needed only if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@@ -76,7 +76,7 @@ WARNING: \`$1' is missing on your system. It should be needed only if
autoheader)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. It should be needed only if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -85,7 +85,7 @@ WARNING: \`$1' is missing on your system. It should be needed only if
automake)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. It should be needed only if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -96,16 +96,16 @@ WARNING: \`$1' is missing on your system. It should be needed only if
bison|yacc)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. It should be needed only if
- your modified any \`.y' file. For being effective, your
- modifications might require the \`Bison' package. Grab it from
- any GNU archive site."
+WARNING: \`$1' is missing on your system. You should only need it if
+ your modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
touch y.tab.c
;;
makeinfo)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. It should be needed only if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
index bb285e20..1dbefc60 100644
--- a/po/cat-id-tbl.c
+++ b/po/cat-id-tbl.c
@@ -77,7 +77,7 @@ Preprocessor features:\n\
-I, --include=DIRECTORY search this directory second for includes\n\
-D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n\
-U, --undefine=NAME delete builtin NAME\n\
- -s, --synclines generate `#line NO \"FILE\"' lines\n", 55},
+#ifdef SHOW_DEPENDENCIES", 55},
{"\
\n\
Limits control:\n\
@@ -113,26 +113,29 @@ FLAGS is any of:\n\
{"\
\n\
If no FILE or if FILE is `-', standard input is read.\n", 60},
- {"Bad debug flags: `%s'", 61},
- {"INTERNAL ERROR: Bad code in deferred arguments", 62},
- {"INTERNAL ERROR: Bad token type in expand_token ()", 63},
- {"ERROR: EOF in argument list", 64},
- {"INTERNAL ERROR: Bad token type in expand_argument ()", 65},
- {"INTERNAL ERROR: Bad symbol type in call_macro ()", 66},
- {"ERROR: Recursion limit of %d exceeded, use -L<N> to change it", 67},
- {"ERROR: Cannot create temporary file for diversion", 68},
- {"ERROR: Cannot flush diversion to temporary file", 69},
- {"ERROR: Copying inserted file", 70},
- {"ERROR: Reading inserted file", 71},
- {"Cannot stat diversion", 72},
- {"Path search for `%s' found `%s'", 73},
- {"VMEM limit exceeded?\n", 74},
+ {"\
+\n\
+Report bugs to <m4-bugs@gnu.org>.\n", 61},
+ {"Bad debug flags: `%s'", 62},
+ {"INTERNAL ERROR: Bad code in deferred arguments", 63},
+ {"INTERNAL ERROR: Bad token type in expand_token ()", 64},
+ {"ERROR: EOF in argument list", 65},
+ {"INTERNAL ERROR: Bad token type in expand_argument ()", 66},
+ {"INTERNAL ERROR: Bad symbol type in call_macro ()", 67},
+ {"ERROR: Recursion limit of %d exceeded, use -L<N> to change it", 68},
+ {"ERROR: Cannot create temporary file for diversion", 69},
+ {"ERROR: Cannot flush diversion to temporary file", 70},
+ {"ERROR: Copying inserted file", 71},
+ {"ERROR: Reading inserted file", 72},
+ {"Cannot stat diversion", 73},
+ {"Path search for `%s' found `%s'", 74},
+ {"VMEM limit exceeded?\n", 75},
{"\
Memory bounds violation detected (SIGSEGV). Either a stack overflow\n\
-occurred, or there is a bug in ", 75},
- {". Check for possible infinite recursion.\n", 76},
- {"INTERNAL ERROR: Illegal mode to symbol_lookup ()", 77},
- {"Name `%s' is unknown\n", 78},
+occurred, or there is a bug in ", 76},
+ {". Check for possible infinite recursion.\n", 77},
+ {"INTERNAL ERROR: Illegal mode to symbol_lookup ()", 78},
+ {"Name `%s' is unknown\n", 79},
};
-int _msg_tbl_length = 78;
+int _msg_tbl_length = 79;
diff --git a/po/de.gmo b/po/de.gmo
index 9932a400..3a5546d9 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index ef5017b1..6f5b7745 100644
--- a/po/de.po
+++ b/po/de.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"PO-Revision-Date: 1996-09-30 10:38 GMT+0100\n"
"Last-Translator: Martin von Löwis <martin@mira.isdn.cs.tu-berlin.de>\n"
"Language-Team: German <de@li.org>\n"
@@ -240,21 +240,21 @@ msgstr "NONE"
msgid "ERROR: EOF in string"
msgstr "FEHLER: Dateiende in Zeichenkette"
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr "FEHLER: Keller voll. (Unendliche `define' Rekursion?)"
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "`%s --help' zeigt weitere Informationen.\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "Aufruf: %s [OPTION]... [DATEI]...\n"
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -280,18 +280,19 @@ msgstr ""
" -P, --prefix-builtins erzwinge `m4_' Präfix für eingebaute "
"Funktionen\n"
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr " -W, --word-regexp=REGEXP benutze REGEXP für Makronamensyntax\n"
-#: src/m4.c:155
+#: src/m4.c:160
+#, fuzzy
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
"\n"
"Präprozessoreigenschaften:\n"
@@ -301,7 +302,7 @@ msgstr ""
" -U, --undefine=NAME lösche eingebaute Funktion NAME\n"
" -s, --synclines erzeuge `#line NR \"DATEI\"' Zeilen\n"
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -316,7 +317,7 @@ msgstr ""
" -L, --nesting-limit=NUMMER setze künstliche Grenze für "
"Schachtelungstiefe\n"
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -330,7 +331,7 @@ msgstr ""
" -R, --reload-state=DATEI lade zu Beginn Zustand von eingefrorener "
"DATEI\n"
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -348,7 +349,7 @@ msgstr ""
" -o, --error-output=DATEI leite Debug- und Verfolgungsausgaben nach "
"DATEI\n"
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -378,7 +379,7 @@ msgstr ""
" i gebe Veränderungen der Eingabedatei aus\n"
" V Kurzform für alle Flags oben zusammen\n"
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
@@ -386,12 +387,18 @@ msgstr ""
"\n"
"Ohne DATEI oder wenn DATEI `-' ist, wird die Standardeingabe gelesen\n"
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr "Falsche Debug Flags: `%s'"
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "INTERNER FEHLER: Falscher Kode in zurückgestellten Argumenten"
@@ -437,7 +444,7 @@ msgstr "FEHLER: Während Lesen einer eingefügten Datei"
msgid "Cannot stat diversion"
msgstr "Kann `stat' nicht auf Umleitung anwenden"
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr "Pfad für Suche nach `%s' hat `%s' gefunden"
diff --git a/po/fr.gmo b/po/fr.gmo
index 1d7d37ee..8ffb5029 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 3ac46321..67550d2b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4d\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"PO-Revision-Date: 1998-05-23 11:53+02:00\n"
"Last-Translator: Erick Branderhorst <Erick.Branderhorst@asml.nl>\n"
"Language-Team: dutch <nl@li.org>\n"
@@ -237,21 +237,21 @@ msgstr "AUCUN"
msgid "ERROR: EOF in string"
msgstr "ERREUR: Fin-de-fichier dans la chaîne"
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr "ERREUR INTERNE: Mauvais type de lexème dans expand_token ()"
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Pour plus d'information, essayez «%s --help».\\n\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "Usage: %s [OPTION]... [FICHIER]...\\n\n"
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -277,19 +277,20 @@ msgstr ""
" -Q, --quiet, --silent inhiber certains diagnostics prédéfinis\n"
" -P, --prefix-builtins préfixer tous les prédéfinis par «m4_»\n"
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr ""
" -W, --word-regexp=REGEXP utiliser REGEXP pour les noms de macro\n"
-#: src/m4.c:155
+#: src/m4.c:160
+#, fuzzy
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
"\n"
"Capacités de préprocesseur:\n"
@@ -299,7 +300,7 @@ msgstr ""
" -s, --synclines engendrer des lignes «#line NNN "
"\\\"FICHIER\\\"»\n"
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -314,7 +315,7 @@ msgstr ""
" -L, --nesting-limit=NOMBRE modifier la limite artificielle "
"d'imbrication\n"
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -326,7 +327,7 @@ msgstr ""
" -F, --freeze-state=FICHIER produire un FICHIER figé à la fin\n"
" -R, --reload-state=FICHIER recharger un FICHIER figé au départ\n"
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -344,7 +345,7 @@ msgstr ""
" -o, --error-output=FICHIER rediriger la sortie de trace et "
"mise-au-point\n"
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -374,7 +375,7 @@ msgstr ""
" i afficher les modifications dans les fichiers d'entrée\n"
" V abbréviation commode pour toutes les options précédentes à la fois\n"
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
@@ -382,12 +383,18 @@ msgstr ""
"\n"
"Si aucun FICHIER ou si FICHIER vaut «-», lit l'entrée standard.\n"
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr "Mauvais indicateurs de mise-au-point: «%s»"
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "ERREUR INTERNE: Mauvais code dans les arguments différés"
@@ -433,7 +440,7 @@ msgstr "ERREUR: Pendant la lecture d'un fichier inséré"
msgid "Cannot stat diversion"
msgstr "Incapable d'opérer «stat» pour la diversion"
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr "La fouille du chemin pour «%s» trouve «%s»"
diff --git a/po/it.gmo b/po/it.gmo
index dac9a641..24ddae32 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 96fd6429..39b816d1 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"Version: \n"
"Date: 1995-06-30 21:00:12+0200\n"
"From: Ulrich Drepper <drepper@myware>\n"
@@ -231,21 +231,21 @@ msgstr "NESSUNO"
msgid "ERROR: EOF in string"
msgstr "ERRORE: Fine prematura di una stringa"
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr "ERRORE: Stack overflow. (Ricorsione infinita in `define'?)"
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Per ulteriori informazioni provare `%s --help'.\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "Usage: %s [OPZIONE]... [ARCHIVIO]...\n"
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -259,21 +259,21 @@ msgid ""
" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
msgstr ""
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr ""
-#: src/m4.c:155
+#: src/m4.c:160
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -282,7 +282,7 @@ msgid ""
" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
msgstr ""
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -290,7 +290,7 @@ msgid ""
" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
msgstr ""
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -300,7 +300,7 @@ msgid ""
" -o, --error-output=FILE redirect debug and trace output\n"
msgstr ""
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -317,18 +317,24 @@ msgid ""
" V shorthand for all of the above flags\n"
msgstr ""
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
msgstr ""
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr "Indicatori di debug errati: `%s'"
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "ERRORE INTERNO: Codice errato in argomenti differiti"
@@ -373,7 +379,7 @@ msgstr "ERRORE: Leggendo archivio inserito"
msgid "Cannot stat diversion"
msgstr "Impossibile effettuare la `stat' per la deviazione"
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr "La ricerca del percorso per `%s' ha trovato `%s'"
diff --git a/po/ja.gmo b/po/ja.gmo
index f0f20883..ab065d06 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index 84f8fae3..cfe23d0a 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"PO-Revision-Date: 1996-03-28 11:52 EST\n"
"Last-Translator: Akiko Matsushita <matusita@sra.co.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
@@ -237,23 +237,23 @@ msgstr "¤Ê¤·"
msgid "ERROR: EOF in string"
msgstr "¥¨¥é¡¼: ʸ»úÎóÆâ¤Ë¥Õ¥¡¥¤¥ë¤Î½ªÃ¼µ­¹æ¤¬¤¢¤ê¤Þ¤¹¡£"
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr ""
"¥¨¥é¡¼: ¥¹¥¿¥Ã¥¯¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤òµ¯¤³¤·¤Æ¤¤¤Þ¤¹¡£\n"
" (̵¸Â¤ËºÆµ¢ÅªÄêµÁ¤ò¤·¤Æ¤¤¤Þ¤»¤ó¤«¡©)"
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "¾Ü¤·¤¯¤Ï `%s --help' ¤Î½ÐÎϤò¸æÍ÷²¼¤µ¤¤¡£\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "»ÈÍÑÊýË¡: %s [¥ª¥×¥·¥ç¥ó]...[¥Õ¥¡¥¤¥ë̾]\n"
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -279,20 +279,21 @@ msgstr ""
" -P, --prefix-builtins Á´¤Æ¤Î¥Ó¥ë¥È¥¤¥ó¥Þ¥¯¥í¤Ë `m4_' ¤È¤¤¤¦ÀÜƬ¼­¤ò "
" ¶¯À©Åª¤ËÄɲä·¤Þ¤¹¡£\n"
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr ""
"-W, --word-regexp=REGEXP ¥Þ¥¯¥í̾¤Î¥·¥ó¥¿¥Ã¥¯¥¹¤Ë REGEXP ¤ò "
" Àµµ¬É½¸½¤È¤·¤ÆÍѤ¤¤Þ¤¹¡£\n"
-#: src/m4.c:155
+#: src/m4.c:160
+#, fuzzy
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
"\n"
"¥×¥ê¥×¥í¥»¥Ã¥µµ¡Ç½:\n"
@@ -304,7 +305,7 @@ msgstr ""
" -U, --undefine=NAME NAME ¤ÎÄêµÁ¤ò¼è¤ê¾Ã¤·¤Þ¤¹¡£\n"
" -s, --synclines ¹ÔÈÖ¹æ¤È¥Õ¥¡¥¤¥ë̾¤Î¹Ô¤òÀ¸À®¤·¤Þ¤¹¡£\n"
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -320,7 +321,7 @@ msgstr ""
" -L, --nesting-limit=NUNBER "
"¥Þ¥¯¥í¤Î¥Í¥¹¥È²ó¿ô¤Î¾å¸ÂÃͤò¿Í°ÙŪ¤ËÊѹ¹¤·¤Þ¤¹¡£\n"
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -333,7 +334,7 @@ msgstr ""
" -R, --reload-state=FILE ºÇ½é¤Ë»ØÄꤵ¤ì¤¿ FILE ¤«¤é\n"
" Åà·ë¤µ¤ì¤¿ÄêµÁ¤ò¥í¡¼¥É¤·¤Þ¤¹\n"
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -351,7 +352,7 @@ msgstr ""
" -o, --error-output=FILE ¥Ç¥Ð¥Ã¥°¤È¥È¥ì¡¼¥¹¤Î½ÐÎϤò FILE ¤Ë\n"
" ¥ê¥À¥¤¥ì¥¯¥È¤·¤Þ¤¹¡£\n"
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -383,7 +384,7 @@ msgstr ""
" i ÆþÎÏ¥Õ¥¡¥¤¥ë¤ËÀ¸¤¸¤¿ÊѲ½¤òɽ¼¨¤·¤Þ¤¹¡£\n"
" V ¾åµ­¤ÎÁ´¤Æ¤Î FLAG ¤ò»ØÄꤹ¤ë¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£\n"
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
@@ -392,12 +393,18 @@ msgstr ""
"FILE ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤ª¤è¤Ó»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬ `-' ¤Î¾ì¹ç¤Ï\n"
" ɸ½àÆþÎϤ¬Æɤ߹þ¤Þ¤ì¤Þ¤¹¡£\n"
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr "`%s' ¤ÏÉÔÀµ¤Ê¥Ç¥Ð¥Ã¥°¥ª¥×¥·¥ç¥ó°ú¿ô¤Ç¤¹¡£"
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "ÆâÉô¥¨¥é¡¼¡§¥ª¥×¥·¥ç¥ó¤Î¸å½èÍý¤Ç¡¢ÉÔÀµ¥³¡¼¥É¤¬¸¡½Ð¤µ¤ì¤Þ¤·¤¿¡£"
@@ -446,7 +453,7 @@ msgstr ""
"divert ¤Î¤¿¤á¤Î¥Õ¥¡¥¤¥ë¤Î¥¹¥Æ¡¼¥¿¥¹¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£\n"
" (stat ¤Ç¤­¤Þ¤»¤ó¡£)"
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr "`%s' ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê¤«¤é `%s' ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò¸«¤Ä¤±¤Þ¤·¤¿¡£"
diff --git a/po/m4.pot b/po/m4.pot
index e52d23cd..9763aaa0 100644
--- a/po/m4.pot
+++ b/po/m4.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -231,21 +231,21 @@ msgstr ""
msgid "ERROR: EOF in string"
msgstr ""
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr ""
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr ""
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -259,21 +259,21 @@ msgid ""
" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
msgstr ""
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr ""
-#: src/m4.c:155
+#: src/m4.c:160
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -282,7 +282,7 @@ msgid ""
" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
msgstr ""
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -290,7 +290,7 @@ msgid ""
" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
msgstr ""
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -300,7 +300,7 @@ msgid ""
" -o, --error-output=FILE redirect debug and trace output\n"
msgstr ""
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -317,18 +317,24 @@ msgid ""
" V shorthand for all of the above flags\n"
msgstr ""
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
msgstr ""
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr ""
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr ""
@@ -373,7 +379,7 @@ msgstr ""
msgid "Cannot stat diversion"
msgstr ""
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr ""
diff --git a/po/nl.gmo b/po/nl.gmo
index 0898b840..1fcb4a41 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index 8d72d241..b0201804 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4d\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"PO-Revision-Date: 1998-05-23 09:27+02:00\n"
"Last-Translator: Erick Branderhorst <Erick.Branderhorst@asml.nl>\n"
"Language-Team: dutch <nl@li.org>\n"
@@ -80,9 +80,9 @@ msgid "Cannot undivert %s"
msgstr "Cannot undivert %s"
#: src/builtin.c:1066
-#, fuzzy, c-format
+#, c-format
msgid "Undefined syntax code %c"
-msgstr "Ongedefinieerde naam %s"
+msgstr "Ongedefinieerde syntax code %c"
#: src/builtin.c:1116 src/freeze.c:207
#, c-format
@@ -233,21 +233,21 @@ msgstr "GEEN"
msgid "ERROR: EOF in string"
msgstr "FOUT: Einde van bestand teken in string"
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr "FOUT: Stapel overflow. (Infinite define recursion?)"
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Probeer `%s --help' voor meer informatie.\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "Gebruik: %s [OPTIE]... [BESTAND]...\n"
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -273,18 +273,19 @@ msgstr ""
" -P, --prefix-builtins forceer een `m4_' voorvoegsel voor alle \n"
" ingebouwde functies\n"
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr " -W, --word-regexp=REGEXP gebruik REGEXP voor macro naam syntax\n"
-#: src/m4.c:155
+#: src/m4.c:160
+#, fuzzy
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
"\n"
"Voorbewerkings features:\n"
@@ -295,7 +296,7 @@ msgstr ""
" -U, --undefine=NAME verwijder ingebouwde functie NAME\n"
" -s, --synclines genereer `#line NO \"FILE\"' regel\n"
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -309,7 +310,7 @@ msgstr ""
" -H, --hashsize=PRIME stel symbolen opzoek hash tabel grootte\n"
" -L, --nesting-limit=NUMBER verander kunstmatige nesting limiet\n"
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -323,7 +324,7 @@ msgstr ""
" -R, --reload-state=FILE herlaad een gefixeerde staat van BESTAND\n"
" aan het begin\n"
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -340,7 +341,7 @@ msgstr ""
" -l, --arglength=NUM restrict macro traceer grootte\n"
" -o, --error-output=FILE redirect debug en traceer uitvoer\n"
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -357,10 +358,10 @@ msgid ""
" V shorthand for all of the above flags\n"
msgstr ""
"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
+"VLAG is een van:\n"
+" t traceer voor alle macro aanroepen, niet alleen `traceon'ed\n"
+" a toon huidige argumenten\n"
+" e toon expansie\n"
" q quote values as necessary, with a or e flag\n"
" c show before collect, after collect and after call\n"
" x add a unique macro call id, useful with c flag\n"
@@ -370,7 +371,7 @@ msgstr ""
" i show changes in input files\n"
" V shorthand for all of the above flags\n"
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
@@ -378,12 +379,20 @@ msgstr ""
"\n"
"Als geen BESTAND of als BESTAND `-' is, standaard invoer wordt gelezen.\n"
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+"\n"
+"Meld fouten via <m4-bugs@gnu.org>.\n"
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr "Onjuiste debug vlaggen: `%s'"
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "INTERNE FOUT: Onjuiste code in afgeleide argumenten"
@@ -429,7 +438,7 @@ msgstr "FOUT: Lezen ingevoegd bestand"
msgid "Cannot stat diversion"
msgstr "Cannot stat diversion"
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr "Zoeken naar `%s' via PATH levert `%s'"
@@ -460,9 +469,3 @@ msgstr "INTERNE FOUT: Ongeldige mode voor symbol_lookup ()"
#, c-format
msgid "Name `%s' is unknown\n"
msgstr "Naam `%s' is niet bekend\n"
-
-#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-#~ msgstr "INTERNE FOUT: Invoer stapel botch in pop_input ()"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Onjuiste reguliere expressie: `%s': %s"
diff --git a/po/ru.gmo b/po/ru.gmo
index 9642582e..0aeea95c 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index c7843792..670e5b67 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
"PO-Revision-Date: 1997-07-12 20:58\n"
"Last-Translator: Denis Y. Pershin <dyp@siblug.org>\n"
"Language-Team: Russian <ru@li.org>\n"
@@ -231,21 +231,21 @@ msgstr "îéþåçï"
msgid "ERROR: EOF in string"
msgstr "ïûéâëá: ëÏÎÅà ÆÁÊÌÁ × ÓÔÒÏËÅ"
-#: src/m4.c:106
+#: src/m4.c:111
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr "ïûéâëá: ðÅÒÅÐÏÌÎÅÎÉÅ ÓÔÅËÁ. (âÅÓËÏÎÅÞÎÏÅ ÒÅËÕÒÓÉ×ÎÏÅ ÏÐÒÅÄÅÌÅÎÉÅ?)"
-#: src/m4.c:133
+#: src/m4.c:138
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "ðÏÐÒÏÂÕÊÔÅ '%s --help' ÄÌÑ ÉÎÆÏÒÍÁÃÉÉ.\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [OPTION]... [FILE]...\n"
-#: src/m4.c:138
+#: src/m4.c:143
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
"for short options too.\n"
@@ -272,20 +272,21 @@ msgstr ""
" -P, --prefix-builtins ÄÏÂÁ×ÌÑÔØ ÐÒÅÆÉËÓ `m4_' ÄÌÑ ×ÓÅÈ ×ÓÔÒÏÅÎÎÙÈ "
"ÆÕÎËÃÉÊ\n"
-#: src/m4.c:151
+#: src/m4.c:156
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr ""
" -W, --word-regexp=REGEXP ÉÓÐÏÌØÚÏ×ÁÔØ REGEXP ÄÌÑ ÓÉÎÔÁËÓÉÓÁ ÉÍÅÎ "
"ÍÁËÒÏÓÏ×\n"
-#: src/m4.c:155
+#: src/m4.c:160
+#, fuzzy
msgid ""
"\n"
"Preprocessor features:\n"
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
"\n"
"ïÐÃÉÉ ÐÒÅÐÒÏÃÅÓÓÏÒÁ:\n"
@@ -294,7 +295,7 @@ msgstr ""
" -U, --undefine=NAME ÕÄÁÌÉÔØ ×ÓÔÒÏÅÎÎÕÀ ÆÕÎËÃÉÀ NAME\n"
" -s, --synclines ÇÅÎÅÒÉÒÏ×ÁÔØ ÓÔÒÏËÉ `#line NO \"FILE\"'\n"
-#: src/m4.c:163
+#: src/m4.c:171
msgid ""
"\n"
"Limits control:\n"
@@ -310,7 +311,7 @@ msgstr ""
" -L, --nesting-limit=NUMBER ÉÚÍÅÎÉÔØ ÐÒÅÄÅÌ ÇÌÕÂÉÎÙ ÉÎÔÅÌÅËÔÕÁÌØÎÏÇÏ "
"ÐÏÉÓËÁ\n"
-#: src/m4.c:170
+#: src/m4.c:178
msgid ""
"\n"
"Frozen state files:\n"
@@ -322,7 +323,7 @@ msgstr ""
" -F, --freeze-state=FILE × ËÏÎÃÅ ÓÏÚÄÁÔØ ÏÂÒÁÚ ÐÁÍÑÔÉ ÄÌÑ FILE\n"
" -R, --reload-state=FILE × ÎÁÞÁÌÅ ÚÁÇÒÕÖÁÔØ ÏÂÒÁÚ ÐÁÍÑÔÉ ÄÌÑ FILE\n"
-#: src/m4.c:176
+#: src/m4.c:184
msgid ""
"\n"
"Debugging:\n"
@@ -340,7 +341,7 @@ msgstr ""
" -o, --error-output=FILE ÐÅÒÅÎÁÐÒÁ×ÉÔØ ÏÔÌÁÄÏÞÎÙÊ É ÔÒÁÓÓÉÒÏ×ÏÞÎÙÊ "
"×Ù×ÏÄ × ÆÁÊÌ FILE\n"
-#: src/m4.c:184
+#: src/m4.c:192
msgid ""
"\n"
"FLAGS is any of:\n"
@@ -371,7 +372,7 @@ msgstr ""
" i ÐÏËÁÚÙ×ÁÔØ ÉÚÍÅÎÅÎÉÑ ×Ï ×ÈÏÄÎÙÈ ÆÁÊÌÁÈ\n"
" V ÓÏËÒÁÝÅÎÉÅ ÄÌÑ ×ÓÅÈ ÆÌÁÇÏ× ×ÍÅÓÔÅ\n"
-#: src/m4.c:199
+#: src/m4.c:207
msgid ""
"\n"
"If no FILE or if FILE is `-', standard input is read.\n"
@@ -379,12 +380,18 @@ msgstr ""
"\n"
"åÓÌÉ FILE ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÉÌÉ FILE ÜÔÏ `-', ÉÓÐÏÌØÚÕÅÔÓÑ ÓÔÁÎÄÁÒÔÎÙÊ ×ÈÏÄ.\n"
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, c-format
msgid "Bad debug flags: `%s'"
msgstr "îÅ×ÅÒÎÙÊ ÆÌÁÇ ÏÔÌÁÄËÉ: '%s'"
-#: src/m4.c:437
+#: src/m4.c:458
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ËÏÄ × ËÏÓ×ÅÎÎÙÈ ÁÒÇÕÍÅÎÔÁÈ"
@@ -430,7 +437,7 @@ msgstr "ïûéâëá: þÉÔÁÀ ×ÓÔÁ×ÌÅÎÎÙÊ ÆÁÊÌ"
msgid "Cannot stat diversion"
msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÄÓÞÉÔÁÔØ ÒÁÚ×ÅÔ×ÌÅÎÉÅ"
-#: src/path.c:131
+#: src/path.c:138
#, c-format
msgid "Path search for `%s' found `%s'"
msgstr "ðÕÔØ ÐÏÉÓËÁ ÄÌÑ `%s' ÎÁÊÄÅÎ `%s'"
diff --git a/po/sv.gmo b/po/sv.gmo
index 1a47c5ff..f01c6505 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 25e7f65d..c9c5714e 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,13 +1,13 @@
# Swedish messages for m4
# Copyright (C) 1996 Free Software Foundation, Inc.
# <Jan.Djarv@mbox200.swipnet.se>, 1996.
-# $Revision: 1.1.1.2 $
+# $Revision: 1.1.1.3 $
#
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-10 06:45+0200\n"
-"PO-Revision-Date: $Date: 2000/02/17 03:07:04 $\n"
+"POT-Creation-Date: 1998-09-08 09:33+0200\n"
+"PO-Revision-Date: $Date: 2000/02/17 03:07:20 $\n"
"Last-Translator: Jan Djärv <Jan.Djarv@mbox200.swipnet.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
@@ -254,22 +254,22 @@ msgstr "INGET"
msgid "ERROR: EOF in string"
msgstr "FEL: Filslut i sträng"
-#: src/m4.c:106
+#: src/m4.c:111
#, fuzzy
msgid "ERROR: Stack overflow. (Infinite define recursion?)"
msgstr "FEL: Stacken flödar över. (Oändlig rekursion?)"
-#: src/m4.c:133
+#: src/m4.c:138
#, fuzzy, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Försök med \"%s --help\" för mer information.\n"
-#: src/m4.c:137
+#: src/m4.c:142
#, fuzzy, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr "Användning: %s [FLAGGA]... [FIL]...\n"
-#: src/m4.c:138
+#: src/m4.c:143
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are mandatory or optional\n"
@@ -295,12 +295,12 @@ msgstr ""
"makron\n"
" -P, --prefix-builtins alla inbyggda makron börjar med `m4_'\n"
-#: src/m4.c:151
+#: src/m4.c:156
#, fuzzy
msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
msgstr " -W, --word-regexp=REGEXP använd REGEXP som makronamnsyntax\n"
-#: src/m4.c:155
+#: src/m4.c:160
#, fuzzy
msgid ""
"\n"
@@ -308,7 +308,7 @@ msgid ""
" -I, --include=DIRECTORY search this directory second for includes\n"
" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+"#ifdef SHOW_DEPENDENCIES"
msgstr ""
"\n"
"Förprocessorstyrning:\n"
@@ -317,7 +317,7 @@ msgstr ""
" -U, --undefine=NAMN ta bort inbyggt makro\n"
" -s, --synclines generera `#line NNN \"FIL\"' rader\n"
-#: src/m4.c:163
+#: src/m4.c:171
#, fuzzy
msgid ""
"\n"
@@ -332,7 +332,7 @@ msgstr ""
" -H, --hashsize=PRIMTAL sätt storlek på symboltabellen\n"
" -L, --nesting-limit=NUMMER ändra artificiell nästningsnivå\n"
-#: src/m4.c:170
+#: src/m4.c:178
#, fuzzy
msgid ""
"\n"
@@ -345,7 +345,7 @@ msgstr ""
" -F, --freeze-state=FIL spara fryst tillstånd i FIL i slutet\n"
" -R, --reload-state=FIL läs fryst tillstånd från FIL i början\n"
-#: src/m4.c:176
+#: src/m4.c:184
#, fuzzy
msgid ""
"\n"
@@ -364,7 +364,7 @@ msgstr ""
" -o, --error-output=FIL avled felsöknings och spårutskrifter till "
"FIL\n"
-#: src/m4.c:184
+#: src/m4.c:192
#, fuzzy
msgid ""
"\n"
@@ -395,7 +395,7 @@ msgstr ""
" i visa byten av infil\n"
" V förkortning för alla ovanstående flaggor\n"
-#: src/m4.c:199
+#: src/m4.c:207
#, fuzzy
msgid ""
"\n"
@@ -404,12 +404,18 @@ msgstr ""
"\n"
"Om ingen FIL anges eller om FIL är `-', så läses standard in.\n"
-#: src/m4.c:358
+#: src/m4.c:211
+msgid ""
+"\n"
+"Report bugs to <m4-bugs@gnu.org>.\n"
+msgstr ""
+
+#: src/m4.c:379
#, fuzzy, c-format
msgid "Bad debug flags: `%s'"
msgstr "Okänd felsökningsflagga \"%s\""
-#: src/m4.c:437
+#: src/m4.c:458
#, fuzzy
msgid "INTERNAL ERROR: Bad code in deferred arguments"
msgstr "INTERNT FEL: Otillåten kod i argument"
@@ -464,7 +470,7 @@ msgstr "FEL: Läsning av insatt fil"
msgid "Cannot stat diversion"
msgstr "Kan inte ta status på avledningen"
-#: src/path.c:131
+#: src/path.c:138
#, fuzzy, c-format
msgid "Path search for `%s' found `%s'"
msgstr "\"%s\" hittades som \"%s\" i sökvägen"
diff --git a/src/Makefile.am b/src/Makefile.am
index d70aa081..53aa39ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,11 +1,12 @@
AUTOMAKE_OPTIONS = ansi2knr
LIBS = @LIBS@
+
CFLAGS = -Wall @CFLAGS@
bin_PROGRAMS = m4
-INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/lib
m4_SOURCES = m4.c m4.h builtin.c debug.c eval.c numb.c numb.h format.c \
freeze.c input.c macro.c output.c path.c symtab.c stackovf.c
diff --git a/src/Makefile.in b/src/Makefile.in
index c09bdcdf..de5840c9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -32,7 +32,7 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DISTDIR =
+DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -77,6 +77,7 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
+PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
@@ -90,11 +91,12 @@ l = @l@
AUTOMAKE_OPTIONS = ansi2knr
LIBS = @LIBS@
+
CFLAGS = -Wall @CFLAGS@
bin_PROGRAMS = m4
-INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/lib
m4_SOURCES = m4.c m4.h builtin.c debug.c eval.c numb.c numb.h format.c \
freeze.c input.c macro.c output.c path.c symtab.c stackovf.c
@@ -115,8 +117,8 @@ freeze$U.o input$U.o macro$U.o output$U.o path$U.o symtab$U.o \
stackovf$U.o
m4_DEPENDENCIES = ../lib/libm4.a
m4_LDFLAGS =
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c
@@ -153,15 +155,15 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.c.o:
@@ -209,31 +211,31 @@ m4: $(m4_OBJECTS) $(m4_DEPENDENCIES)
@rm -f m4
$(LINK) $(m4_LDFLAGS) $(m4_OBJECTS) $(m4_LDADD) $(LIBS)
builtin_.c: builtin.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/builtin.c; then echo $(srcdir)/builtin.c; else echo builtin.c; fi` | $(ANSI2KNR) builtin_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/builtin.c; then echo $(srcdir)/builtin.c; else echo builtin.c; fi` | $(ANSI2KNR) > builtin_.c
debug_.c: debug.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/debug.c; then echo $(srcdir)/debug.c; else echo debug.c; fi` | $(ANSI2KNR) debug_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/debug.c; then echo $(srcdir)/debug.c; else echo debug.c; fi` | $(ANSI2KNR) > debug_.c
eval_.c: eval.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/eval.c; then echo $(srcdir)/eval.c; else echo eval.c; fi` | $(ANSI2KNR) eval_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eval.c; then echo $(srcdir)/eval.c; else echo eval.c; fi` | $(ANSI2KNR) > eval_.c
format_.c: format.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/format.c; then echo $(srcdir)/format.c; else echo format.c; fi` | $(ANSI2KNR) format_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/format.c; then echo $(srcdir)/format.c; else echo format.c; fi` | $(ANSI2KNR) > format_.c
freeze_.c: freeze.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/freeze.c; then echo $(srcdir)/freeze.c; else echo freeze.c; fi` | $(ANSI2KNR) freeze_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/freeze.c; then echo $(srcdir)/freeze.c; else echo freeze.c; fi` | $(ANSI2KNR) > freeze_.c
input_.c: input.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/input.c; then echo $(srcdir)/input.c; else echo input.c; fi` | $(ANSI2KNR) input_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/input.c; then echo $(srcdir)/input.c; else echo input.c; fi` | $(ANSI2KNR) > input_.c
m4_.c: m4.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/m4.c; then echo $(srcdir)/m4.c; else echo m4.c; fi` | $(ANSI2KNR) m4_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/m4.c; then echo $(srcdir)/m4.c; else echo m4.c; fi` | $(ANSI2KNR) > m4_.c
macro_.c: macro.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/macro.c; then echo $(srcdir)/macro.c; else echo macro.c; fi` | $(ANSI2KNR) macro_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/macro.c; then echo $(srcdir)/macro.c; else echo macro.c; fi` | $(ANSI2KNR) > macro_.c
numb_.c: numb.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/numb.c; then echo $(srcdir)/numb.c; else echo numb.c; fi` | $(ANSI2KNR) numb_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/numb.c; then echo $(srcdir)/numb.c; else echo numb.c; fi` | $(ANSI2KNR) > numb_.c
output_.c: output.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/output.c; then echo $(srcdir)/output.c; else echo output.c; fi` | $(ANSI2KNR) output_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/output.c; then echo $(srcdir)/output.c; else echo output.c; fi` | $(ANSI2KNR) > output_.c
path_.c: path.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/path.c; then echo $(srcdir)/path.c; else echo path.c; fi` | $(ANSI2KNR) path_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/path.c; then echo $(srcdir)/path.c; else echo path.c; fi` | $(ANSI2KNR) > path_.c
stackovf_.c: stackovf.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/stackovf.c; then echo $(srcdir)/stackovf.c; else echo stackovf.c; fi` | $(ANSI2KNR) stackovf_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stackovf.c; then echo $(srcdir)/stackovf.c; else echo stackovf.c; fi` | $(ANSI2KNR) > stackovf_.c
symtab_.c: symtab.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | $(ANSI2KNR) symtab_.c
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | $(ANSI2KNR) > symtab_.c
builtin_.o debug_.o eval_.o format_.o freeze_.o input_.o m4_.o macro_.o \
numb_.o output_.o path_.o stackovf_.o symtab_.o : $(ANSI2KNR)
@@ -290,7 +292,6 @@ symtab.o: symtab.c m4.h ../config.h ../lib/obstack.h
info:
dvi:
check: all
- $(MAKE)
installcheck:
install-exec: install-binPROGRAMS
@$(NORMAL_INSTALL)
@@ -304,25 +305,20 @@ install: install-exec install-data all
uninstall: uninstall-binPROGRAMS
install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
- $(mkinstalldirs) $(DATADIR)$(bindir)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-krextra mostlyclean-kr mostlyclean-tags \
mostlyclean-generic
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 00000000..7aed6dc3
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,35 @@
+# The next line is needed by `./esyscmd.1.test'
+# Ty Coon, President of Vice
+# The previous line is needed by `./esyscmd.1.test'
+
+EXTRA_DIST = get-them foo incl.m4 stamp-TESTS $(TESTS) defs m4wrap.1.test
+
+TESTS = $(OTHER_TESTS) $(GENERATED_TESTS)
+
+GENERATED_TESTS = \
+ argument.1.test argument.2.test argument.3.test argument.4.test \
+ changeco.1.test changeco.2.test changequ.1.test changequ.2.test \
+ changequ.3.test changesy.1.test changesy.2.test changesy.3.test \
+ changesy.4.test changesy.5.test changesy.6.test changesy.7.test \
+ cleardiv.1.test cleardiv.2.test define.1.test define.2.test \
+ defn.1.test defn.2.test divert.1.test divert.2.test divnum.1.test \
+ dnl.1.test dumpdef.1.test errprint.1.test errprint.2.test \
+ esyscmd.1.test eval.1.test eval.2.test format.1.test ifdef.1.test \
+ ifelse.1.test ifelse.2.test include.1.test include.2.test \
+ include.3.test incr.1.test index.1.test indir.1.test len.1.test \
+ loops.1.test loops.2.test m4exit.1.test patsubst.1.test \
+ patsubst.2.test pseudoar.1.test pseudoar.2.test pseudoar.3.test \
+ pseudoar.4.test pseudoar.5.test pushdef.1.test pushdef.2.test \
+ regexp.1.test regexp.2.test substr.1.test sysval.1.test trace.1.test \
+ translit.1.test undefine.1.test undivert.1.test undivert.2.test \
+ undivert.3.test
+
+OTHER_TESTS =
+
+all: stamp-TESTS
+
+stamp-TESTS: $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo
+ cd $(srcdir) \
+ && rm -f *.[0-9].test \
+ && AWK=$(AWK) $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo \
+ && > $@
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 00000000..e8f24129
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,235 @@
+# Makefile.in generated automatically by automake 1.3b from Makefile.am
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# The next line is needed by `./esyscmd.1.test'
+# Ty Coon, President of Vice
+# The previous line is needed by `./esyscmd.1.test'
+
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CPP = @CPP@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+STACKOVF = @STACKOVF@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
+
+EXTRA_DIST = get-them foo incl.m4 stamp-TESTS $(TESTS) defs m4wrap.1.test
+
+TESTS = $(OTHER_TESTS) $(GENERATED_TESTS)
+
+GENERATED_TESTS = \
+ argument.1.test argument.2.test argument.3.test argument.4.test \
+ changeco.1.test changeco.2.test changequ.1.test changequ.2.test \
+ changequ.3.test changesy.1.test changesy.2.test changesy.3.test \
+ changesy.4.test changesy.5.test changesy.6.test changesy.7.test \
+ cleardiv.1.test cleardiv.2.test define.1.test define.2.test \
+ defn.1.test defn.2.test divert.1.test divert.2.test divnum.1.test \
+ dnl.1.test dumpdef.1.test errprint.1.test errprint.2.test \
+ esyscmd.1.test eval.1.test eval.2.test format.1.test ifdef.1.test \
+ ifelse.1.test ifelse.2.test include.1.test include.2.test \
+ include.3.test incr.1.test index.1.test indir.1.test len.1.test \
+ loops.1.test loops.2.test m4exit.1.test patsubst.1.test \
+ patsubst.2.test pseudoar.1.test pseudoar.2.test pseudoar.3.test \
+ pseudoar.4.test pseudoar.5.test pushdef.1.test pushdef.2.test \
+ regexp.1.test regexp.2.test substr.1.test sysval.1.test trace.1.test \
+ translit.1.test undefine.1.test undivert.1.test undivert.2.test \
+ undivert.3.test
+
+OTHER_TESTS =
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP = --best
+all: Makefile
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps tests/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = tests
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done
+check-TESTS: $(TESTS)
+ @failed=0; all=0; \
+ srcdir=$(srcdir); export srcdir; \
+ for tst in $(TESTS); do \
+ if test -f $$tst; then dir=.; \
+ else dir="$(srcdir)"; fi; \
+ if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+ all=`expr $$all + 1`; \
+ echo "PASS: $$tst"; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="$$failed of $$all tests failed"; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0
+info:
+dvi:
+check: all
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+installcheck:
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data:
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall:
+
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean: mostlyclean-generic
+
+clean: clean-generic mostlyclean
+
+distclean: distclean-generic clean
+ -rm -f config.status
+
+maintainer-clean: maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: tags distdir check-TESTS info dvi installcheck install-exec \
+install-data install uninstall all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+all: stamp-TESTS
+
+stamp-TESTS: $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo
+ cd $(srcdir) \
+ && rm -f *.[0-9].test \
+ && AWK=$(AWK) $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo \
+ && > $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/argument.1.test b/tests/argument.1.test
new file mode 100755
index 00000000..9398608f
--- /dev/null
+++ b/tests/argument.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# argument.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1037
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`exch', `$2, $1')
+exch(arg1, arg2)
+EOF
+
+cat <<\EOF >ok
+
+arg2, arg1
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/argument.2.test b/tests/argument.2.test
new file mode 100755
index 00000000..abd434f3
--- /dev/null
+++ b/tests/argument.2.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# argument.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1047
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`exch', `$2, $1')
+define(exch(``expansion text'', ``macro''))
+macro
+EOF
+
+cat <<\EOF >ok
+
+
+expansion text
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/argument.3.test b/tests/argument.3.test
new file mode 100755
index 00000000..0231981b
--- /dev/null
+++ b/tests/argument.3.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# argument.3.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1067
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`test', ``Macro name: $0'')
+test
+EOF
+
+cat <<\EOF >ok
+
+Macro name: test
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/argument.4.test b/tests/argument.4.test
new file mode 100755
index 00000000..a0c5cbfd
--- /dev/null
+++ b/tests/argument.4.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# argument.4.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1077
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `This is macro `foo'.')
+foo
+EOF
+
+cat <<\EOF >ok
+
+This is macro foo.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changeco.1.test b/tests/changeco.1.test
new file mode 100755
index 00000000..d1a60b0c
--- /dev/null
+++ b/tests/changeco.1.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# changeco.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1960
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`comment', `COMMENT')
+# A normal comment
+changecom(`/*', `*/')
+# Not a comment anymore
+But: /* this is a comment now */ while this is not a comment
+EOF
+
+cat <<\EOF >ok
+
+# A normal comment
+
+# Not a COMMENT anymore
+But: /* this is a comment now */ while this is not a COMMENT
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changeco.2.test b/tests/changeco.2.test
new file mode 100755
index 00000000..21854f26
--- /dev/null
+++ b/tests/changeco.2.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# changeco.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1981
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`comment', `COMMENT')
+changecom
+# Not a comment anymore
+EOF
+
+cat <<\EOF >ok
+
+
+# Not a COMMENT anymore
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changequ.1.test b/tests/changequ.1.test
new file mode 100755
index 00000000..4e6f1fa6
--- /dev/null
+++ b/tests/changequ.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# changequ.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1896
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+changequote([, ])
+define([foo], [Macro [foo].])
+foo
+EOF
+
+cat <<\EOF >ok
+
+
+Macro foo.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changequ.2.test b/tests/changequ.2.test
new file mode 100755
index 00000000..45fd0dbe
--- /dev/null
+++ b/tests/changequ.2.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# changequ.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1908
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+changequote([[, ]])
+define([[foo]], [[Macro [[[foo]]].]])
+foo
+EOF
+
+cat <<\EOF >ok
+
+
+Macro [foo].
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changequ.3.test b/tests/changequ.3.test
new file mode 100755
index 00000000..d9432142
--- /dev/null
+++ b/tests/changequ.3.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# changequ.3.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1920
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Macro `FOO'.')
+changequote(, )
+foo
+`foo'
+EOF
+
+cat <<\EOF >ok
+
+
+Macro `FOO'.
+`Macro `FOO'.'
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.1.test b/tests/changesy.1.test
new file mode 100755
index 00000000..76512aae
--- /dev/null
+++ b/tests/changesy.1.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# changesy.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2126
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`test.1', `TEST ONE')
+__file__
+changesyntax(`O_', `W.')
+__file__
+test.1
+EOF
+
+cat <<\EOF >ok
+
+in
+
+__file__
+TEST ONE
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.2.test b/tests/changesy.2.test
new file mode 100755
index 00000000..d34dbb29
--- /dev/null
+++ b/tests/changesy.2.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# changesy.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2142
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`test', `$#')
+test(a, b, c)
+changesyntax(`(<', `,|', `)>', `O(,)')
+test(a, b, c)
+test<a|b|c>
+EOF
+
+cat <<\EOF >ok
+
+3
+
+0(a, b, c)
+3
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.3.test b/tests/changesy.3.test
new file mode 100755
index 00000000..15a51f77
--- /dev/null
+++ b/tests/changesy.3.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# changesy.3.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2159
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`test', `$1$2$3')
+test(a, b, c)
+changesyntax(`O ')
+test(a, b, c)
+EOF
+
+cat <<\EOF >ok
+
+abc
+
+a b c
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.4.test b/tests/changesy.4.test
new file mode 100755
index 00000000..5dcde934
--- /dev/null
+++ b/tests/changesy.4.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# changesy.4.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2178
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`@', `TEST')
+@
+changesyntax(`A@')
+@
+EOF
+
+cat <<\EOF >ok
+
+@
+
+TEST
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.5.test b/tests/changesy.5.test
new file mode 100755
index 00000000..1156668f
--- /dev/null
+++ b/tests/changesy.5.test
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# changesy.5.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2202
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`test', `TEST')
+changesyntax(`L<', `R>')
+<test>
+`test>
+changequote(<[>, `]')
+<test>
+[test]
+EOF
+
+cat <<\EOF >ok
+
+
+test
+test
+
+<TEST>
+test
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.6.test b/tests/changesy.6.test
new file mode 100755
index 00000000..cae2ee23
--- /dev/null
+++ b/tests/changesy.6.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# changesy.6.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2224
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+changesyntax(`({<', `)}>', `,;:', `O(,)')
+eval{2**4-1; 2 : 8>
+EOF
+
+cat <<\EOF >ok
+
+00001111
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/changesy.7.test b/tests/changesy.7.test
new file mode 100755
index 00000000..9d4b4b08
--- /dev/null
+++ b/tests/changesy.7.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# changesy.7.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2235
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`test', `==$1==')
+changequote(`<<', `>>')
+changesyntax(<<L[>>, <<R]>>)
+test(<<testing]>>)
+test([testing>>])
+test([<<testing>>])
+EOF
+
+cat <<\EOF >ok
+
+
+
+==testing]==
+==testing>>==
+==<<testing>>==
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/cleardiv.1.test b/tests/cleardiv.1.test
new file mode 100755
index 00000000..40f09405
--- /dev/null
+++ b/tests/cleardiv.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# cleardiv.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2739
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+divert(1)
+Diversion one: divnum
+divert(2)
+Diversion two: divnum
+divert(-1)
+undivert
+EOF
+
+cat <<\EOF >ok
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/cleardiv.2.test b/tests/cleardiv.2.test
new file mode 100755
index 00000000..1f5df3ac
--- /dev/null
+++ b/tests/cleardiv.2.test
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# cleardiv.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2754
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`cleardivert',
+`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
+EOF
+
+cat <<\EOF >ok
+
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/define.1.test b/tests/define.1.test
new file mode 100755
index 00000000..cffdbacb
--- /dev/null
+++ b/tests/define.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# define.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 988
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Hello world.')
+foo
+EOF
+
+cat <<\EOF >ok
+
+Hello world.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/define.2.test b/tests/define.2.test
new file mode 100755
index 00000000..e4df34eb
--- /dev/null
+++ b/tests/define.2.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# define.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1008
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`array', `defn(format(``array[%d]'', `$1'))')
+define(`array_set', `define(format(``array[%d]'', `$1'), `$2')')
+array_set(4, `array element no. 4')
+array_set(17, `array element no. 17')
+array(4)
+array(eval(10+7))
+EOF
+
+cat <<\EOF >ok
+
+
+
+
+array element no. 4
+array element no. 17
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/defn.1.test b/tests/defn.1.test
new file mode 100755
index 00000000..bf54769c
--- /dev/null
+++ b/tests/defn.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# defn.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1231
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`zap', defn(`undefine'))
+zap(`undefine')
+undefine(`zap')
+EOF
+
+cat <<\EOF >ok
+
+
+undefine(zap)
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/defn.2.test b/tests/defn.2.test
new file mode 100755
index 00000000..33ea48bd
--- /dev/null
+++ b/tests/defn.2.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# defn.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1251
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`string', `The macro dnl is very useful
+')
+string
+defn(`string')
+EOF
+
+cat <<\EOF >ok
+
+The macro
+The macro dnl is very useful
+
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/defs b/tests/defs
new file mode 100644
index 00000000..cf97e3b3
--- /dev/null
+++ b/tests/defs
@@ -0,0 +1,54 @@
+# -*- ksh -*-
+# Defines for GNU m4 testing environment.
+# Erick Branderhorst <Erick.Branderhorst@asml.nl>
+
+# Ensure $srcdir set correctly.
+test -f ${srcdir}/defs || {
+ echo "defs: installation error" 1>&2
+ exit 1
+}
+
+# If srcdir is relative, we need to modify it.
+case "$srcdir" in
+ /*)
+ ;;
+
+ *)
+ srcdir="../$srcdir"
+ ;;
+esac
+
+rm -rf testSubDir > /dev/null 2>&1
+mkdir testSubDir
+cd testSubDir
+
+# Build appropriate environment in test directory. Eg create
+# configure.in, touch all necessary files, etc.
+
+# nothing yet
+
+# See how redirections should work. User can set VERBOSE to see all
+# output.
+test -z "$VERBOSE" && {
+ exec > /dev/null 2>&1
+}
+
+# User can set MAKE to choose which make to use. Must use GNU make.
+test -z "$MAKE" && MAKE=make
+
+echo "=== Running test $0"
+
+# See how GNU m4 should be run. No options as default.
+test -z "$M4" && M4=../../src/m4
+
+# See how cmp should be run.
+test -z "$CMP" && CMP=cmp
+
+# Setting nls related vars. Override them in the test when needed.
+LANGUAGE=C
+export LANGUAGE
+LC_ALL=C
+export LC_ALL
+LANG=C
+export LANG
+
diff --git a/tests/divert.1.test b/tests/divert.1.test
new file mode 100755
index 00000000..3a2a82ac
--- /dev/null
+++ b/tests/divert.1.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# divert.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2581
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+divert(1)
+This text is diverted.
+divert
+This text is not diverted.
+EOF
+
+cat <<\EOF >ok
+
+This text is not diverted.
+
+This text is diverted.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/divert.2.test b/tests/divert.2.test
new file mode 100755
index 00000000..2f22d845
--- /dev/null
+++ b/tests/divert.2.test
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# divert.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2601
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+divert(-1)
+define(`foo', `Macro `foo'.')
+define(`bar', `Macro `bar'.')
+divert
+EOF
+
+cat <<\EOF >ok
+
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/divnum.1.test b/tests/divnum.1.test
new file mode 100755
index 00000000..c1c2638d
--- /dev/null
+++ b/tests/divnum.1.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# divnum.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2708
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+Initial divnum
+divert(1)
+Diversion one: divnum
+divert(2)
+Diversion two: divnum
+divert
+EOF
+
+cat <<\EOF >ok
+Initial 0
+
+
+Diversion one: 1
+
+Diversion two: 2
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/dnl.1.test b/tests/dnl.1.test
new file mode 100755
index 00000000..ecfa0077
--- /dev/null
+++ b/tests/dnl.1.test
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# dnl.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1858
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
+foo
+EOF
+
+cat <<\EOF >ok
+Macro foo.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/dumpdef.1.test b/tests/dumpdef.1.test
new file mode 100755
index 00000000..45a21ddd
--- /dev/null
+++ b/tests/dumpdef.1.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# dumpdef.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1661
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Hello world.')
+dumpdef(`foo')
+dumpdef(`define')
+EOF
+
+cat <<\EOF >ok
+
+
+
+EOF
+
+cat <<\EOF >okerr
+foo: `Hello world.'
+define: <define>
+EOF
+
+$M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/errprint.1.test b/tests/errprint.1.test
new file mode 100755
index 00000000..b1d6145c
--- /dev/null
+++ b/tests/errprint.1.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# errprint.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3427
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+errprint(`Illegal arguments to forloop
+')
+EOF
+
+cat <<\EOF >ok
+
+EOF
+
+cat <<\EOF >okerr
+Illegal arguments to forloop
+EOF
+
+$M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/errprint.2.test b/tests/errprint.2.test
new file mode 100755
index 00000000..8f44ca0a
--- /dev/null
+++ b/tests/errprint.2.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# errprint.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3452
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+errprint(`m4:'__file__:__line__: `Input error
+')
+EOF
+
+cat <<\EOF >ok
+
+EOF
+
+cat <<\EOF >okerr
+m4:in:1: Input error
+EOF
+
+$M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/esyscmd.1.test b/tests/esyscmd.1.test
new file mode 100755
index 00000000..b32c6ced
--- /dev/null
+++ b/tests/esyscmd.1.test
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# esyscmd.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3316
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`vice', `esyscmd(grep Vice ../Makefile)')
+vice
+EOF
+
+cat <<\EOF >ok
+
+# Ty Coon, President of Vice
+
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/eval.1.test b/tests/eval.1.test
new file mode 100755
index 00000000..ef9a3ca3
--- /dev/null
+++ b/tests/eval.1.test
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# eval.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3200
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+eval(-3 * 5)
+eval(index(`Hello world', `llo') >= 0)
+define(`square', `eval(($1)**2)')
+square(9)
+square(square(5)+1)
+define(`foo', `666')
+eval(`foo'/6)
+eval(foo/6)
+EOF
+
+cat <<\EOF >ok
+-15
+1
+
+81
+676
+
+
+111
+EOF
+
+cat <<\EOF >okerr
+in:7: m4: Bad expression in eval: foo/6
+EOF
+
+$M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/eval.2.test b/tests/eval.2.test
new file mode 100755
index 00000000..374b7039
--- /dev/null
+++ b/tests/eval.2.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# eval.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3231
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+eval(666, 10)
+eval(666, 11)
+eval(666, 6)
+eval(666, 6, 10)
+eval(-666, 6, 10)
+EOF
+
+cat <<\EOF >ok
+666
+556
+3030
+0000003030
+-000003030
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/checks/foo b/tests/foo
index 5716ca59..5716ca59 100644
--- a/checks/foo
+++ b/tests/foo
diff --git a/tests/format.1.test b/tests/format.1.test
new file mode 100755
index 00000000..0434ff23
--- /dev/null
+++ b/tests/format.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# format.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3036
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `The brown fox jumped over the lazy dog')
+format(`The string "%s" is %d characters long', foo, len(foo))
+EOF
+
+cat <<\EOF >ok
+
+The string "The brown fox jumped over the lazy dog" is 38 characters long
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/get-them b/tests/get-them
new file mode 100755
index 00000000..ca42991a
--- /dev/null
+++ b/tests/get-them
@@ -0,0 +1,112 @@
+#!/bin/sh
+# Extract all examples from the manual source.
+# Copyright (C) 1992 Free Software Foundation, Inc.
+
+# This script is for use with GNU awk.
+
+FILE=${1-/dev/null}
+
+${AWK-gawk} '
+
+BEGIN {
+ node = "";
+ seq = -1;
+ count = 0;
+ file = "NONE";
+}
+
+/^@node / {
+ if (seq > 0)
+ printf(" -- %d test%s", seq, seq == 1 ? "" : "s");
+ if (seq >= 0)
+ printf("\n");
+
+ split($0, tmp, ",");
+ Node = substr(tmp[1], 7);
+ node = tolower(Node);
+ gsub(" ", "", node);
+ if (length(node) > 8)
+ printf("Node: %s - truncated", node);
+ else
+ printf("Node: %s ", node);
+ node = substr(node, 1, 8);
+ seq = 0;
+}
+
+/^@comment ignore$/ {
+ getline;
+ next;
+}
+
+/^@example$/, /^@end example$/ {
+ if (seq < 0)
+ next;
+ if ($0 ~ /^@example$/) {
+ if (count > 0)
+ close (file);
+ seq++;
+ count++;
+ o = 0;
+ e = 0;
+ error_flag = 0;
+ i = 0;
+ include_flag = 0;
+ file = sprintf("%s.%d.test", node, seq);
+ printf ("#!/bin/sh\n\n") > file;
+ printf ("# %s is part of the GNU m4 testsuite\n", file) >> file;
+ printf ("# generated from example in %s line %d\n\n", FILENAME, NR) >>file;
+ printf (". ${srcdir}/defs\n") >> file;
+ next;
+ }
+ if ($0 ~ /^@end example$/) {
+ printthem(input, i, "in");
+ printthem(output, o, "ok");
+ printthem(error, e, "okerr");
+ printf ("\n") >> file;
+ if (include_flag == 1) printf ("M4PATH=$srcdir ") >> file;
+ printf ("$M4 -d in >out") >> file;
+ if (error_flag == 1) printf (" 2>err") >> file;
+ if (error_flag == 1) printf ("\nsed -e \"s, ../../src/m4:, m4:,\" err >sederr && mv sederr err") >> file;
+ printf ("\n\n$CMP -s out ok") >> file;
+ if (error_flag == 1) printf (" && $CMP -s err okerr") >> file;
+ printf ("\n\n") >> file;
+ next;
+ }
+ if ($0 ~ /^\^D$/)
+ next;
+ if ($0 ~ /^@result\{\}/) {
+ gsub(/^@result\{\}/, "", $0);
+ output[o++] = $0;
+ }
+ else if ($0 ~ /^@error\{\}/) {
+ gsub(/^@error\{\}/, "", $0);
+ error[e++] = $0;
+ error_flag = 1;
+ }
+ else {
+ input[i++] = $0;
+ if ($0 ~ /s*include\(/) include_flag = 1;
+ }
+}
+
+END {
+ printf("\n");
+}
+
+function printthem(thearray, thecounter, thefile) {
+ if ((thecounter>0) || (thefile=="ok")) {
+ printf ("\ncat <<\\EOF >%s\n", thefile) >> file;
+ for (j=0; j<thecounter; j++) {
+ gsub("@{", "{", thearray[j]);
+ gsub("@}", "}", thearray[j]);
+ gsub("@@", "@", thearray[j]);
+ gsub("@comment.*", "", thearray[j]);
+ printf ("%s\n", thearray[j]) >> file;
+ }
+ printf ("EOF\n") >> file;
+ }
+}
+
+' $FILE >/dev/null
+
+chmod +x *.[0-9].test
diff --git a/tests/ifdef.1.test b/tests/ifdef.1.test
new file mode 100755
index 00000000..9cb0935b
--- /dev/null
+++ b/tests/ifdef.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# ifdef.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1441
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+ifdef(`foo', ``foo' is defined', ``foo' is not defined')
+define(`foo', `')
+ifdef(`foo', ``foo' is defined', ``foo' is not defined')
+EOF
+
+cat <<\EOF >ok
+foo is not defined
+
+foo is defined
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/ifelse.1.test b/tests/ifelse.1.test
new file mode 100755
index 00000000..7942a0c2
--- /dev/null
+++ b/tests/ifelse.1.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# ifelse.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1479
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+ifelse(`foo', `bar', `true')
+ifelse(`foo', `foo', `true')
+ifelse(`foo', `bar', `true', `false')
+ifelse(`foo', `foo', `true', `false')
+EOF
+
+cat <<\EOF >ok
+
+true
+false
+true
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/ifelse.2.test b/tests/ifelse.2.test
new file mode 100755
index 00000000..d2049f5d
--- /dev/null
+++ b/tests/ifelse.2.test
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# ifelse.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1498
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
+EOF
+
+cat <<\EOF >ok
+seventh
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/checks/incl.m4 b/tests/incl.m4
index ab9572eb..ab9572eb 100644
--- a/checks/incl.m4
+++ b/tests/incl.m4
diff --git a/tests/include.1.test b/tests/include.1.test
new file mode 100755
index 00000000..535a1292
--- /dev/null
+++ b/tests/include.1.test
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# include.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2455
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+include(`no-such-file')
+sinclude(`no-such-file')
+EOF
+
+cat <<\EOF >ok
+
+
+EOF
+
+cat <<\EOF >okerr
+in:1: m4: Cannot open no-such-file: No such file or directory
+EOF
+
+M4PATH=$srcdir $M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/include.2.test b/tests/include.2.test
new file mode 100755
index 00000000..1e0c428f
--- /dev/null
+++ b/tests/include.2.test
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# include.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2475
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `FOO')
+include(`incl.m4')
+EOF
+
+cat <<\EOF >ok
+
+Include file start
+FOO
+Include file end
+
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/include.3.test b/tests/include.3.test
new file mode 100755
index 00000000..edf228d0
--- /dev/null
+++ b/tests/include.3.test
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# include.3.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2490
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`bar', include(`incl.m4'))
+This is `bar': >>>bar<<<
+EOF
+
+cat <<\EOF >ok
+
+This is bar: >>>Include file start
+foo
+Include file end
+<<<
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/incr.1.test b/tests/incr.1.test
new file mode 100755
index 00000000..d20be4df
--- /dev/null
+++ b/tests/incr.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# incr.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3106
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+incr(4)
+decr(7)
+EOF
+
+cat <<\EOF >ok
+5
+6
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/index.1.test b/tests/index.1.test
new file mode 100755
index 00000000..1cee65fa
--- /dev/null
+++ b/tests/index.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# index.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2822
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+index(`gnus, gnats, and armadillos', `nat')
+index(`gnus, gnats, and armadillos', `dag')
+EOF
+
+cat <<\EOF >ok
+7
+-1
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/indir.1.test b/tests/indir.1.test
new file mode 100755
index 00000000..3cbc0511
--- /dev/null
+++ b/tests/indir.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# indir.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1370
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`$$internal$macro', `Internal macro (name `$0')')
+$$internal$macro
+indir(`$$internal$macro')
+EOF
+
+cat <<\EOF >ok
+
+$$internal$macro
+Internal macro (name $$internal$macro)
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/len.1.test b/tests/len.1.test
new file mode 100755
index 00000000..a60bb1b0
--- /dev/null
+++ b/tests/len.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# len.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2796
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+len()
+len(`abcdef')
+EOF
+
+cat <<\EOF >ok
+0
+6
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/loops.1.test b/tests/loops.1.test
new file mode 100755
index 00000000..3a872fc9
--- /dev/null
+++ b/tests/loops.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# loops.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1535
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+shift
+shift(bar)
+shift(foo, bar, baz)
+EOF
+
+cat <<\EOF >ok
+
+
+bar,baz
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/loops.2.test b/tests/loops.2.test
new file mode 100755
index 00000000..35e4db17
--- /dev/null
+++ b/tests/loops.2.test
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# loops.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1547
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
+ `reverse(shift($@)), `$1'')')
+reverse
+reverse(foo)
+reverse(foo, bar, gnats, and gnus)
+EOF
+
+cat <<\EOF >ok
+
+
+foo
+and gnus, gnats, bar, foo
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/m4exit.1.test b/tests/m4exit.1.test
new file mode 100755
index 00000000..c721d434
--- /dev/null
+++ b/tests/m4exit.1.test
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# m4exit.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3475
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
+')m4exit(1)')
+fatal_error(`This is a BAD one, buster')
+EOF
+
+cat <<\EOF >ok
+
+EOF
+
+cat <<\EOF >okerr
+m4: in: 3: fatal error: This is a BAD one, buster
+EOF
+
+$M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/m4wrap.1.test b/tests/m4wrap.1.test
new file mode 100755
index 00000000..1a27ac3c
--- /dev/null
+++ b/tests/m4wrap.1.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# m4wrap.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2396
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`cleanup', `This is the `cleanup' actions.
+')
+m4wrap(`cleanup')
+This is the first and last normal input line.
+EOF
+
+cat <<\EOF >ok
+
+
+This is the first and last normal input line.
+This is the cleanup actions.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/patsubst.1.test b/tests/patsubst.1.test
new file mode 100755
index 00000000..152d961d
--- /dev/null
+++ b/tests/patsubst.1.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# patsubst.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2984
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+patsubst(`GNUs not Unix', `^', `OBS: ')
+patsubst(`GNUs not Unix', `\<', `OBS: ')
+patsubst(`GNUs not Unix', `\w*', `(\&)')
+patsubst(`GNUs not Unix', `\w+', `(\&)')
+patsubst(`GNUs not Unix', `[A-Z][a-z]+')
+EOF
+
+cat <<\EOF >ok
+OBS: GNUs not Unix
+OBS: GNUs OBS: not OBS: Unix
+(GNUs)() (not)() (Unix)
+(GNUs) (not) (Unix)
+GN not
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/checks/57.patsubst b/tests/patsubst.2.test
index 36f0f315..47ce0b77 100644..100755
--- a/checks/57.patsubst
+++ b/tests/patsubst.2.test
@@ -1,4 +1,11 @@
-dnl ../doc/m4.texinfo:2898: Origin of test
+#!/bin/sh
+
+# patsubst.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3001
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl
define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
define(`capitalize1',
@@ -6,4 +13,13 @@ define(`capitalize1',
define(`capitalize',
`patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
capitalize(`GNUs not Unix')
-dnl @result{}Gnus Not Unix
+EOF
+
+cat <<\EOF >ok
+Gnus Not Unix
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pseudoar.1.test b/tests/pseudoar.1.test
new file mode 100755
index 00000000..060af181
--- /dev/null
+++ b/tests/pseudoar.1.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# pseudoar.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1101
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`nargs', `$#')
+nargs
+nargs()
+nargs(arg1, arg2, arg3)
+EOF
+
+cat <<\EOF >ok
+
+0
+1
+3
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pseudoar.2.test b/tests/pseudoar.2.test
new file mode 100755
index 00000000..765e73b2
--- /dev/null
+++ b/tests/pseudoar.2.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# pseudoar.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1115
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`echo', `$*')
+echo(arg1, arg2, arg3 , arg4)
+EOF
+
+cat <<\EOF >ok
+
+arg1,arg2,arg3 ,arg4
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pseudoar.3.test b/tests/pseudoar.3.test
new file mode 100755
index 00000000..ef7bae06
--- /dev/null
+++ b/tests/pseudoar.3.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# pseudoar.3.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1126
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`echo', `$@')
+echo(arg1, arg2, arg3 , arg4)
+EOF
+
+cat <<\EOF >ok
+
+arg1,arg2,arg3 ,arg4
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pseudoar.4.test b/tests/pseudoar.4.test
new file mode 100755
index 00000000..b95fade9
--- /dev/null
+++ b/tests/pseudoar.4.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# pseudoar.4.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1136
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`echo1', `$*')
+define(`echo2', `$@')
+define(`foo', `This is macro `foo'.')
+echo1(foo)
+echo2(foo)
+EOF
+
+cat <<\EOF >ok
+
+
+
+This is macro This is macro foo..
+This is macro foo.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pseudoar.5.test b/tests/pseudoar.5.test
new file mode 100755
index 00000000..c739ef51
--- /dev/null
+++ b/tests/pseudoar.5.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# pseudoar.5.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1156
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `$$$ hello $$$')
+foo
+EOF
+
+cat <<\EOF >ok
+
+$$$ hello $$$
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pushdef.1.test b/tests/pushdef.1.test
new file mode 100755
index 00000000..fecfa31a
--- /dev/null
+++ b/tests/pushdef.1.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# pushdef.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1295
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Expansion one.')
+foo
+pushdef(`foo', `Expansion two.')
+foo
+popdef(`foo')
+foo
+popdef(`foo')
+foo
+EOF
+
+cat <<\EOF >ok
+
+Expansion one.
+
+Expansion two.
+
+Expansion one.
+
+foo
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/pushdef.2.test b/tests/pushdef.2.test
new file mode 100755
index 00000000..d391e5da
--- /dev/null
+++ b/tests/pushdef.2.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# pushdef.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1319
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Expansion one.')
+foo
+pushdef(`foo', `Expansion two.')
+foo
+define(`foo', `Second expansion two.')
+foo
+undefine(`foo')
+foo
+EOF
+
+cat <<\EOF >ok
+
+Expansion one.
+
+Expansion two.
+
+Second expansion two.
+
+foo
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/regexp.1.test b/tests/regexp.1.test
new file mode 100755
index 00000000..a83a2228
--- /dev/null
+++ b/tests/regexp.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# regexp.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2854
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+regexp(`GNUs not Unix', `\<[a-z]\w+')
+regexp(`GNUs not Unix', `\<Q\w*')
+EOF
+
+cat <<\EOF >ok
+5
+-1
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/regexp.2.test b/tests/regexp.2.test
new file mode 100755
index 00000000..6ed53dd8
--- /dev/null
+++ b/tests/regexp.2.test
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# regexp.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2866
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
+EOF
+
+cat <<\EOF >ok
+*** Unix *** nix ***
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/checks/stamp-checks b/tests/stamp-TESTS
index e69de29b..e69de29b 100644
--- a/checks/stamp-checks
+++ b/tests/stamp-TESTS
diff --git a/tests/substr.1.test b/tests/substr.1.test
new file mode 100755
index 00000000..ebfc000f
--- /dev/null
+++ b/tests/substr.1.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# substr.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2892
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+substr(`gnus, gnats, and armadillos', 6)
+substr(`gnus, gnats, and armadillos', 6, 5)
+EOF
+
+cat <<\EOF >ok
+gnats, and armadillos
+gnats
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/sysval.1.test b/tests/sysval.1.test
new file mode 100755
index 00000000..e79a0ef5
--- /dev/null
+++ b/tests/sysval.1.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# sysval.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 3347
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+syscmd(`false')
+ifelse(sysval, 0, zero, non-zero)
+syscmd(`true')
+sysval
+EOF
+
+cat <<\EOF >ok
+
+non-zero
+
+0
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/trace.1.test b/tests/trace.1.test
new file mode 100755
index 00000000..7d103f7f
--- /dev/null
+++ b/tests/trace.1.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# trace.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1706
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`foo', `Hello World.')
+define(`echo', `$@')
+traceon(`foo', `echo')
+foo
+echo(gnus, and gnats)
+EOF
+
+cat <<\EOF >ok
+
+
+
+Hello World.
+gnus,and gnats
+EOF
+
+cat <<\EOF >okerr
+m4trace: -1- foo -> `Hello World.'
+m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
+EOF
+
+$M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+
+$CMP -s out ok && $CMP -s err okerr
+
diff --git a/tests/translit.1.test b/tests/translit.1.test
new file mode 100755
index 00000000..51a4396a
--- /dev/null
+++ b/tests/translit.1.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# translit.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2933
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+translit(`GNUs not Unix', `A-Z')
+translit(`GNUs not Unix', `a-z', `A-Z')
+translit(`GNUs not Unix', `A-Z', `z-a')
+EOF
+
+cat <<\EOF >ok
+s not nix
+GNUS NOT UNIX
+tmfs not fnix
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/undefine.1.test b/tests/undefine.1.test
new file mode 100755
index 00000000..e2450f79
--- /dev/null
+++ b/tests/undefine.1.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# undefine.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 1187
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+foo
+define(`foo', `expansion text')
+foo
+undefine(`foo')
+foo
+EOF
+
+cat <<\EOF >ok
+foo
+
+expansion text
+
+foo
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/undivert.1.test b/tests/undivert.1.test
new file mode 100755
index 00000000..10c6625e
--- /dev/null
+++ b/tests/undivert.1.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# undivert.1.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2632
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+divert(1)
+This text is diverted.
+divert
+This text is not diverted.
+undivert(1)
+EOF
+
+cat <<\EOF >ok
+
+This text is not diverted.
+
+This text is diverted.
+
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/undivert.2.test b/tests/undivert.2.test
new file mode 100755
index 00000000..d49f7fc4
--- /dev/null
+++ b/tests/undivert.2.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# undivert.2.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2656
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+divert(1)
+This text is diverted first.
+divert(0)undivert(1)dnl
+undivert(1)
+divert(1)
+This text is also diverted but not appended.
+divert(0)undivert(1)dnl
+EOF
+
+cat <<\EOF >ok
+
+This text is diverted first.
+
+
+This text is also diverted but not appended.
+EOF
+
+$M4 -d in >out
+
+$CMP -s out ok
+
diff --git a/tests/undivert.3.test b/tests/undivert.3.test
new file mode 100755
index 00000000..146374d9
--- /dev/null
+++ b/tests/undivert.3.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# undivert.3.test is part of the GNU m4 testsuite
+# generated from example in ../doc/m4.texinfo line 2682
+
+. ${srcdir}/defs
+
+cat <<\EOF >in
+define(`bar', `BAR')
+undivert(`foo')
+include(`foo')
+EOF
+
+cat <<\EOF >ok
+
+bar
+
+BAR
+
+EOF
+
+M4PATH=$srcdir $M4 -d in >out
+
+$CMP -s out ok
+