summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog34
-rw-r--r--Makefile.am384
-rw-r--r--README144
-rwxr-xr-xbootstrap40
-rwxr-xr-xcommit4
-rw-r--r--config/.cvsignore37
-rw-r--r--configure.ac48
-rw-r--r--doc/Makefile.am43
-rw-r--r--examples/Makefile.am76
-rwxr-xr-xltdl/config/mailnotify (renamed from config/mailnotify)0
-rwxr-xr-xltdl/config/mkstamp (renamed from config/mkstamp)0
-rw-r--r--ltdl/m4/debug.m4 (renamed from acm4/debug.m4)0
-rw-r--r--ltdl/m4/gmp.m4 (renamed from acm4/gmp.m4)0
-rw-r--r--ltdl/m4/m4-error.m4 (renamed from acm4/m4-error.m4)0
-rw-r--r--ltdl/m4/m4-getopt.m441
-rw-r--r--ltdl/m4/m4-gettext.m4 (renamed from acm4/m4-gettext.m4)0
-rw-r--r--ltdl/m4/m4-gnulib.m4 (renamed from acm4/m4-gnulib.m4)0
-rw-r--r--ltdl/m4/m4-obstack.m4 (renamed from acm4/m4-obstack.m4)0
-rw-r--r--ltdl/m4/m4-regex.m4 (renamed from acm4/m4-regex.m4)0
-rw-r--r--ltdl/m4/stackovf.m4 (renamed from acm4/stackovf.m4)0
-rw-r--r--m4/Makefile.am43
-rw-r--r--modules/Makefile.am58
-rw-r--r--src/Makefile.am37
-rw-r--r--src/main.c18
-rw-r--r--tests/Makefile.am78
25 files changed, 659 insertions, 426 deletions
diff --git a/ChangeLog b/ChangeLog
index e7b5ac8c..fab2ea75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2005-05-04 Gary V. Vaughan <gary@gnu.org>
+
+ Gnulib has changed again. Reimport. Adjust. Rinse. Repeat.
+ Automake and Libtool now agree on subdir-objects and LTLIBOBJS,
+ and libtoolize does a better job of ltdl importing now too, so
+ take advantage of that while updating the tree:
+
+ * acm4, config: Moved from here...
+ * ltdl/m4, ltdl/config: ...to here.
+ * doc/Makefile.am, m4/Makefile.am, modules/Makefile.am,
+ src/Makefile.am, tests/Makefile.am: Removed...
+ * Makefile.am: ...and migrated to here, with adjustments to
+ compensate for relative path differences.
+ * commit: Adjust relative paths.
+ * configure.ac: Adjust relative paths.
+ (AC_PREREQ): 2.59 isn't strictly new enough, we also need a
+ patch.
+ (LT_PREREQ): 2.0 isn't released yet, but will work when it is! In
+ the meanwhile, CVS HEAD libtool is needed.
+ (AM_INIT_AUTOMAKE): Added subdir-objects declaration. 1.9.5 isn't
+ stricly new enough, we also need a patch.
+ (AM_PROG_CC_C_O): Required for subdir-objects in Automake.
+ (AC_WITH_LTDL): Replaced with LT_WITH_LTDL.
+ (gl_MODULES): Don't list getopt and version-etc, as they don't
+ belong in libm4.
+ * bootstrap: After running gnulib-tool to import the listed
+ modules, fetch getopt and version-etc into src manually.
+ (ltdldir): Change to ltdl.
+ * src/main.c: Adjust for changes in version-etc API.
+ * ltdl/m4/m4-getopt.m4: New macro to mirror gnulib's getopt.m4,
+ but works when the getopt module isn't to be included in the lib.
+ * README: Add note about patching autoconf and automake to
+ bootstrap CVS m4.
+
2005-05-02 Matt Kraai <kraai@debian.org> (tiny change)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
diff --git a/Makefile.am b/Makefile.am
index 0932fbad..370abfd9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
+## This file is part of GNU M4.
##
-## Copyright (C) 2000, 2003 Free Software Foundation
+## Copyright (C) 2000, 2001, 2003, 2004, 2005 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
@@ -19,23 +19,39 @@
##
## Written by Gary V. Vaughan <gary@gnu.org>
-EXTRA_DIST = bootstrap config/mkstamp
+config_aux_dir = ltdl/config
+config_macro_dir= ltdl/m4
-## There is currently no means with Automake not to run aclocal.
-ACLOCAL_AMFLAGS = -I acm4
+SUBDIRS = ltdl po gnu .
-SUBDIRS = po gnu libltdl m4 modules src tests examples doc .
-MAINTAINERCLEANFILES = ABOUT-NLS COPYING INSTALL Makefile.in aclocal.m4 \
- config-h.in configure stamp-h.in \
- po/cat-id-tbl.c po/m4.pot po/stamp-cat-id
+ACLOCAL_AMFLAGS = -I ltdl/m4
+AM_CPPFLAGS = -I. -I$(srcdir) \
+ -Ignu -I$(srcdir)/gnu \
+ -Im4 -I$(srcdir)/m4\
+ $(INTLINCL)
+AM_LDFLAGS = -no-undefined -export-dynamic
+
+EXTRA_DIST = bootstrap $(config_aux_dir)/mkstamp
+CLEANFILES =
+DISTCLEANFILES =
+MOSTLYCLEANFILES=
+MAINTAINERCLEANFILES = \
+ ABOUT-NLS COPYING INSTALL Makefile.in aclocal.m4 \
+ config-h.in configure stamp-h.in \
+ po/cat-id-tbl.c po/m4.pot po/stamp-cat-id
+
+BUILT_SOURCES =
+
+# Using `cd' in backquotes may print the directory name, use this instead:
+m4__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
# Make sure config.status is regenerated when the version timestamp changes
-MKSTAMP = $(SHELL) $(top_srcdir)/config/mkstamp
+MKSTAMP = $(SHELL) $(srcdir)/$(config_aux_dir)/mkstamp
CONFIG_STATUS_DEPENDENCIES = stamp-vcl
-stamp-vcl: vcl.tmp $(top_srcdir)/ChangeLog
+stamp-vcl: vcl.tmp $(srcdir)/ChangeLog
vcl.tmp:
@dir=.; test -f $$dir/stamp-vcl || dir=$(srcdir); \
- set `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+ set `$(MKSTAMP) < $(srcdir)/ChangeLog`; \
echo "$$1" > vcl.tmp; \
cmp -s vcl.tmp $$dir/stamp-vcl \
## If mkstamp does not match $(srcdir)/stamp-vcl, we still put the new one
@@ -45,6 +61,350 @@ vcl.tmp:
|| (echo "Updating stamp-vcl"; cp vcl.tmp ./stamp-vcl)
-@rm -f vcl.tmp
+
+## ------- ##
+## GNU M4. ##
+## ------- ##
+
+bin_PROGRAMS = src/m4
+src_m4_SOURCES = \
+ src/getopt.c \
+ src/getopt1.c \
+ src/getopt.h \
+ src/version-etc.c \
+ src/version-etc.h \
+ src/main.c \
+ src/m4.h \
+ src/freeze.c \
+ src/stackovf.c
+src_m4_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -I$(srcdir)/src $(LTDLINCL)
+src_m4_LDFLAGS = $(AM_LDFLAGS) $(DLPREOPEN)
+src_m4_LDADD = m4/libm4.la
+
+## ##
+## --- PASTED MANUALLY FROM GNULIB --- ##
+## To avoid adding unnecessary objects to libm4.la these gnulib ##
+## modules are not imported by gnulib-tool, but added manually. ##
+## (from: gnulib-tool --extract-automake-snippet getopt version-etc) ##
+## ##
+BUILT_SOURCES += src/$(GETOPT_H)
+EXTRA_DIST += src/getopt_.h src/getopt_int.h
+
+# We need the following in order to create an <getopt.h> when the
+# system doesn't have one that works with the given compiler.
+all-local: src/$(GETOPT_H)
+src/getopt.h: src/getopt_.h
+ cp $(srcdir)/src/getopt_.h $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += src/getopt.h src/getopt.h-t
+## ##
+## --- END OF PASTED GNULIB --- ##
+## ##
+
+## -------- ##
+## Modules. ##
+## -------- ##
+
+pkgmodincludedir= $(includedir)/$(PACKAGE)/modules
+pkglibexecdir = $(libexecdir)/$(PACKAGE)
+
+ETAGS_ARGS = --regex='/M4BUILTIN_HANDLER[ \t]*)\([^)]*\)/\1/'
+
+module_ldflags = -module
+module_libadd = m4/libm4.la
+
+pkgmodinclude_HEADERS = modules/m4.h
+
+pkglibexec_LTLIBRARIES = \
+ modules/gnu.la \
+ modules/load.la \
+ modules/m4.la \
+ modules/traditional.la
+
+EXTRA_modules_gnu_la_SOURCES = modules/format.c
+modules_gnu_la_LDFLAGS = $(module_ldflags)
+modules_gnu_la_LIBADD = $(module_libadd)
+EXTRA_DIST += $(EXTRA_modules_gnu_la_SOURCES)
+
+modules_load_la_LDFLAGS = $(module_ldflags)
+modules_load_la_LIBADD = $(module_libadd)
+
+EXTRA_modules_m4_la_SOURCES = modules/evalparse.c
+modules_m4_la_LDFLAGS = $(module_ldflags)
+modules_m4_la_LIBADD = $(module_libadd)
+EXTRA_DIST += $(EXTRA_modules_m4_la_SOURCES)
+
+modules_traditional_la_LDFLAGS = $(module_ldflags)
+modules_traditional_la_LIBADD = $(module_libadd)
+
+if USE_GMP
+pkglibexec_LTLIBRARIES += modules/mpeval.la
+EXTRA_modules_mpeval_la_SOURCES = modules/evalparse.c
+modules_mpeval_la_LDFLAGS = $(module_ldflags)
+modules_mpeval_la_LIBADD = $(module_libadd)
+endif
+
+## Disabled for now. It is too fragile to be useful.
+## pkglibexec_LTLIBRARIES += modules/perl.la
+## modules_perl_la_CPPFLAGS = `$(PERL) -MExtUtils::Embed -e ccopts`
+## modules_perl_la_LDFLAGS = \
+## $(module_ldflags) `$(PERL) -MExtUtils::Embed -e ldopts`
+## modules_perl_la_LIBADD = $(module_libadd)
+## BUILT_SOURCES = perlxsi.c
+## DISTCLEANFILES += $(BUILT_SOURCES)
+##
+## perlxsi.c:
+## $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c
+
+module_check = -rpath /dev/null
+check_LTLIBRARIES = \
+ modules/import.la \
+ modules/modtest.la \
+ modules/shadow.la \
+ modules/stdlib.la \
+ modules/time.la
+
+modules_import_la_LDFLAGS = $(module_ldflags) $(module_check)
+modules_import_la_LIBADD = $(module_libadd)
+
+modules_modtest_la_LDFLAGS = $(module_ldflags) $(module_check)
+modules_modtest_la_LIBADD = $(module_libadd)
+
+modules_shadow_la_LDFLAGS = $(module_ldflags) $(module_check)
+modules_shadow_la_LIBADD = $(module_libadd)
+
+modules_stdlib_la_LDFLAGS = $(module_ldflags) $(module_check)
+modules_stdlib_la_LIBADD = $(module_libadd)
+
+modules_time_la_LDFLAGS = $(module_ldflags) $(module_check)
+modules_time_la_LIBADD = $(module_libadd)
+
+EXTRA_DIST += \
+ modules/modtest.m4 \
+ modules/shadow.m4 \
+ modules/time.m4 \
+ modules/time2.m4 \
+ modules/stdlib.m4
+
+## ----- ##
+## libm4 ##
+## ----- ##
+
+lib_LTLIBRARIES = m4/libm4.la
+
+nobase_include_HEADERS = \
+ m4/m4module.h
+nobase_pkginclude_HEADERS = \
+ m4/hash.h \
+ m4/system.h
+m4_libm4_la_SOURCES = \
+ m4/builtin.c \
+ m4/debug.c \
+ m4/hash.c \
+ m4/input.c \
+ m4/m4.c \
+ m4/m4private.h \
+ m4/macro.c \
+ m4/module.c \
+ m4/output.c \
+ m4/path.c \
+ m4/pathconf.h \
+ m4/symtab.c \
+ m4/syntax.c \
+ m4/utility.c
+m4_libm4_la_LIBADD = gnu/libgnu.la \
+ $(LIBLTDL) $(LTLIBINTL) $(LIBADD_DL)
+m4_libm4_la_DEPENDENCIES = $(LIBLTDL)
+
+m4/pathconf.h:
+ echo "#define MODULE_PATH \"$(pkglibexecdir)\"" > m4/pathconf.h
+
+MOSTLYCLEANFILES += m4/pathconf.h
+BUILT_SOURCES += m4/pathconf.h
+
+# This file needs to be regenerated at configure time.
+dist-hook:
+ rm -f $(distdir)/m4/system.h
+EXTRA_DIST += m4/system_.h
+
+
+## ------- ##
+## libltdl ##
+## ------- ##
+
+ltdl/libltdlc.la:
+ cd ltdl && $(MAKE) $(MAKEFLAGS) libltdlc.la
+
+## -------------- ##
+## Documentation. ##
+## -------------- ##
+
+info_TEXINFOS = doc/m4.texinfo
+dist_man_MANS = $(srcdir)/doc/m4.1
+
+$(srcdir)/doc/m4.1: doc/helptoman.pl src/m4
+ @if test -f src/m4; then \
+ echo "Updating the \`man' page \`$@'"; \
+ $(PERL) $(srcdir)/doc/helptoman.pl src/m4 > $@-tmp; \
+ cmp -s $@-tmp $(srcdir)/doc/$@ || cp $@-tmp $(srcdir)/doc/$@; \
+ rm -f $@-tmp; \
+ else \
+ echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \
+ echo " Retry once the program executable will be ready."; \
+ fi
+
+## Disabled for now. Clashes with earlier definition.
+## TAGS_FILES = $(infos_TEXINFOS)
+## TAGS_DEPENDENCIES = $(TAGS_FILES)
+## ETAGS_ARGS = --language=none --regex='/@node \([^,]*\)/\1/' $(TAGS_FILES)
+
+EXTRA_DIST += doc/helptoman.pl
+
+MAINTAINERCLEANFILES += $(dist_man_MANS)
+
+
+## --------- ##
+## Examples. ##
+## --------- ##
+
+EXTRA_DIST += \
+ examples/WWW/Makefile \
+ examples/WWW/_footer.htm \
+ examples/WWW/_header.htm \
+ examples/WWW/man/Makefile \
+ examples/WWW/m4lib/bugs.m4 \
+ examples/WWW/m4lib/changelog.m4 \
+ examples/WWW/m4lib/download.m4 \
+ examples/WWW/m4lib/features.m4 \
+ examples/WWW/m4lib/feedback.m4 \
+ examples/WWW/m4lib/html.m4 \
+ examples/WWW/m4lib/index.m4 \
+ examples/WWW/m4lib/layout.m4 \
+ examples/WWW/m4lib/lists.m4 \
+ examples/WWW/m4lib/menu.m4 \
+ examples/WWW/m4lib/modules.m4 \
+ examples/WWW/m4lib/news.m4 \
+ examples/WWW/m4lib/readme.m4 \
+ examples/WWW/m4lib/setup.m4 \
+ examples/WWW/m4lib/test.m4 \
+ examples/WWW/m4lib/thanks.m4 \
+ examples/WWW/m4lib/thissite.m4 \
+ examples/WWW/m4lib/tmpl.m4 \
+ examples/WWW/m4lib/todo.m4 \
+ examples/WWW/m4lib/uses.m4 \
+ examples/WWW/m4lib/visions.m4 \
+ examples/WWW/m4lib/whatis.m4
+
+dist_pkgdata_DATA = \
+ examples/capitalize.m4 \
+ examples/comments.m4 \
+ examples/ddivert.m4 \
+ examples/debug.m4 \
+ examples/esyscmd.m4 \
+ examples/exp.m4 \
+ examples/foreach.m4 \
+ examples/forloop.m4 \
+ examples/fstab.m4 \
+ examples/hanoi.m4 \
+ examples/incl-test.m4 \
+ examples/include.m4 \
+ examples/indir.m4 \
+ examples/misc.m4 \
+ examples/multiquotes.m4 \
+ examples/patsubst.m4 \
+ examples/pushpop.m4 \
+ examples/regexp.m4 \
+ examples/reverse.m4 \
+ examples/sysv-args.m4 \
+ examples/trace.m4 \
+ examples/translit.m4 \
+ examples/undivert.incl \
+ examples/undivert.m4 \
+ examples/wrap.m4
+
+## ----------- ##
+## Test suite. ##
+## ----------- ##
+
+TESTSUITE = tests/testsuite
+TESTSUITE_AT = \
+ tests/builtins.at \
+ tests/generated.at \
+ tests/macros.at \
+ tests/modules.at \
+ tests/options.at \
+ tests/others.at \
+ tests/testsuite.at
+
+EXTRA_DIST += $(TESTSUITE) $(TESTSUITE_AT) $(OTHER_FILES) \
+ tests/atlocal.in \
+ tests/generate.awk \
+ tests/package.m4
+
+# Be sure to reexport important environment variables:
+TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
+ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
+ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
+ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" CONFIG_SHELL="$(SHELL)" \
+ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \
+ F77="$(F77)" FFLAGS="$(FFLAGS)" \
+ GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)"
+
+# Using variables so that this snippet is not too wide and can
+# be used as is in Texinfo @example/@end example.
+m4_texinfo = $(srcdir)/doc/m4.texinfo
+generate = $(AWK) -f $(srcdir)/tests/generate.awk
+$(srcdir)/tests/generated.at: tests/generate.awk $(m4_texinfo)
+ $(generate) $(m4_texinfo) >$@t
+ mv $@t $@
+
+check-recursive: $(srcdir)/$(TESTSUITE)
+
+# Use `$(srcdir)' for the benefit of non-GNU makes: this is
+# how `testsuite' appears in our dependencies.
+AUTOM4TE = autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(srcdir)/$(TESTSUITE): tests/package.m4 $(TESTSUITE_AT)
+ cd $(srcdir)/tests; \
+ $(AUTOTEST) -I $(srcdir)/tests testsuite.at -o testsuite
+
+$(srcdir)/tests/package.m4: configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } > $(srcdir)/tests/package.m4
+
+tests/atconfig: config.status
+ $(SHELL) ./config.status tests/atconfig
+DISTCLEANFILES += tests/atconfig
+
+CD_TESTDIR = abs_srcdir=`$(m4__cd) $(srcdir) && pwd`; cd tests
+
+# Hook the test suite into the check rule
+check-local: tests/atconfig $(srcdir)/$(TESTSUITE)
+ $(CD_TESTDIR); \
+ $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS)
+
+# Run the test suite on the *installed* tree.
+installcheck-local:
+ $(CD_TESTDIR); \
+ $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) $(TESTSUITE_FLAGS) AUTOTEST_PATH=$(exec_prefix)/bin
+
+# We need to remove any file droppings left behind by testsuite.
+clean-local:
+ -$(CD_TESTDIR); \
+ test -f $$abs_srcdir/$(TESTSUITE) && \
+ $(SHELL) $$abs_srcdir/$(TESTSUITE) --clean
+
+OTHER_FILES = tests/iso8859.m4 tests/stackovf.test
+
+DISTCLEANFILES += atconfig atlocal m4
+MAINTAINERCLEANFILES += generated.at $(TESTSUITE)
+
## ##
## --- RULES FOR THE MAINTAINER --- ##
## You shouldn't need to touch anything below here. ##
diff --git a/README b/README
index d71cf755..2e0dbf12 100644
--- a/README
+++ b/README
@@ -58,3 +58,147 @@ expected, what you got, and why this is wrong. Diffs are welcome, but
they only describe a solution, from which the problem might be uneasy to
infer. Don't forget all relevant information about your operating
system, compiler, libraries, ...
+
+
+
+## ------- ##
+## Patches ##
+## ------- ##
+
+If you wish to run bootstrap, the released versions of autoconf and automake
+are missing some functionality we need. You will need to patch automake-1.9.5
+and autoconf-2.59 according to the patches below:
+
+--- automake-1.9.5/automake.in.orig 2005-02-12 10:06:56.000000000 +0000
++++ automake-1.9.5/automake.in 2005-04-20 14:08:05.000000000 +0100
+@@ -142,6 +142,7 @@
+ use Automake::RuleDef;
+ use Automake::Wrap 'makefile_wrap';
+ use File::Basename;
++use File::Spec;
+ use Carp;
+
+ ## ----------- ##
+@@ -333,6 +334,10 @@
+ # in Makefiles.
+ my $am_config_aux_dir = '';
+
++# Directory to search for AC_LIBSOURCE file, as set by AC_CONFIG_LIBOBJ_DIR
++# in configure.ac.
++my $config_libobj_dir = '';
++
+ # Whether AM_GNU_GETTEXT has been seen in configure.ac.
+ my $seen_gettext = 0;
+ # Whether AM_GNU_GETTEXT([external]) is used.
+@@ -2067,7 +2072,7 @@
+
+ if ($iter =~ /\.h$/)
+ {
+- require_file_with_macro ($cond, $var, FOREIGN, $iter);
++ require_libobj_with_macro ($cond, $var, FOREIGN, $iter);
+ }
+ elsif ($iter ne 'alloca.c')
+ {
+@@ -2079,7 +2084,7 @@
+ my $bs = var ('BUILT_SOURCES');
+ if (! $bs || ! grep (/$rewrite/, $bs->value_as_list_recursive))
+ {
+- require_file_with_macro ($cond, $var, FOREIGN, $iter);
++ require_libobj_with_macro ($cond, $var, FOREIGN, $iter);
+ }
+ }
+ }
+@@ -2092,7 +2097,7 @@
+ $lt ||= '';
+ $var->requires_variables ("\@${lt}ALLOCA\@ used", $lt . 'ALLOCA');
+ $dep_files{'$(DEPDIR)/alloca.P' . $myobjext} = 1;
+- require_file_with_macro ($cond, $var, FOREIGN, 'alloca.c');
++ require_libobj_with_macro ($cond, $var, FOREIGN, 'alloca.c');
+ &saw_extension ('c');
+ }
+
+@@ -4636,6 +4641,7 @@
+ AC_CONFIG_AUX_DIR => 1,
+ AC_CONFIG_FILES => 1,
+ AC_CONFIG_HEADERS => 1,
++ AC_CONFIG_LIBOBJ_DIR => 1,
+ AC_CONFIG_LINKS => 1,
+ AC_INIT => 0,
+ AC_LIBSOURCE => 1,
+@@ -4731,6 +4737,12 @@
+ push @config_headers, $spec;
+ }
+ }
++ elsif ($macro eq 'AC_CONFIG_LIBOBJ_DIR')
++ {
++ $config_libobj_dir = $args[1];
++ $relative_dir = '.';
++ check_directory ($config_libobj_dir, $where);
++ }
+ elsif ($macro eq 'AC_CONFIG_LINKS')
+ {
+ foreach my $spec (split (' ', $args[1]))
+@@ -5761,6 +5773,15 @@
+ use constant IN_COMMENT => 2;
+ my $prev_state = IN_RULE_DEF;
+
++ # Calculate the relative path from this Makefile to LIBOBJDIR.
++ my $am_libobj_dir = '';
++ unless ($config_libobj_dir eq '')
++ {
++ my $dir = File::Spec->abs2rel ($config_libobj_dir, $relative_dir);
++ $am_libobj_dir = "$dir/" unless $dir eq '';
++ }
++ &define_variable ('LIBOBJDIR', "$am_libobj_dir", INTERNAL);
++
+ while ($_ = $am_file->getline)
+ {
+ $where->set ("$amfile:$.");
+@@ -6975,6 +6996,22 @@
+ require_file ($macro->rdef ($cond)->location, $mystrict, @files);
+ }
+
++# &require_libobj_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
++# -------------------------------------------------------------
++sub require_libobj_with_macro ($$$@)
++{
++ my ($cond, $macro, $mystrict, @files) = @_;
++ $macro = rvar ($macro) unless ref $macro;
++ if ($config_libobj_dir eq '')
++ {
++ require_file ($macro->rdef ($cond)->location, $mystrict, @files);
++ }
++ else
++ {
++ require_file_internal ($macro->rdef ($cond)->location, $mystrict,
++ $config_libobj_dir, @files);
++ }
++}
+
+ # &require_conf_file ($WHERE, $MYSTRICT, @FILES)
+ # ----------------------------------------------
+--- autoconf-2.59/lib/autoconf/general.m4.orig 2003-10-27 11:10:56.000000000 +0000
++++ autoconf-2.59/lib/autoconf/general.m4 2005-04-25 17:56:48.000000000 +0100
+@@ -2435,7 +2435,7 @@
+
+ # _AC_LIBOBJS_NORMALIZE
+ # ---------------------
+-# Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext,
++# Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
+ # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
+ # Used with AC_CONFIG_COMMANDS_PRE.
+ AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
+@@ -2445,9 +2445,10 @@
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+- # 2. Add them.
+- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
++ # will be set to the directory where LIBOBJS objects are built.
++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ done
+ AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+ AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
diff --git a/bootstrap b/bootstrap
index bc0c18f4..0b3e5a43 100755
--- a/bootstrap
+++ b/bootstrap
@@ -8,7 +8,11 @@
: ${RM="rm -f"}
: ${GNULIB_TOOL="gnulib-tool"}
-ltdldir=libltdl
+ltdldir=ltdl
+config_aux_dir=$ltdldir/config
+config_macro_dir=$ltdldir/m4
+
+src_modules='getopt version-etc'
dirname="s,/[^/]*$,,"
basename="s,^.*/,,g"
@@ -32,18 +36,38 @@ func_echo ()
func_echo "running: ${GNULIB_TOOL} --import"
${GNULIB_TOOL} --import
-mv acm4/regex.m4 acm4/regex-m4.old
-sed 's,lib/regex.c,gnu/regex.c,g' acm4/regex-m4.old > acm4/regex.m4 && \
- $RM acm4/regex-m4.old
-cat >> acm4/gnulib.m4 <<EOF
+
+func_echo "patching include directories in gnulib regex module"
+mv $config_macro_dir/regex.m4 $config_macro_dir/regex-m4.old
+sed 's,lib/regex.c,gnu/regex.c,g' $config_macro_dir/regex-m4.old > $config_macro_dir/regex.m4 && \
+ $RM $config_macro_dir/regex-m4.old
+
+func_echo "hiding gnulib jm_\* macros"
+cat >> $config_macro_dir/gnulib.m4 <<\EOF
AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [jm_AC_HEADER_INTTYPES_H])
AC_DEFUN([gl_AC_HEADER_STDINT_H], [jm_AC_HEADER_STDINT_H])
AC_DEFUN([gl_AC_TYPE_UINTMAX_T], [jm_AC_TYPE_UINTMAX_T])
EOF
-$RM -r "$ltdldir"
-func_echo "running: libtoolize --ltdl=\"$ltdldir\" --force --quiet --copy"
-libtoolize --ltdl="$ltdldir" --force --quiet --copy
+func_echo "fetching version_etc and getopt modules for src directory"
+gnulibdir=`which gnulib-tool | $SED "$dirname"`
+for file in `${GNULIB_TOOL} --extract-filelist $src_modules`; do
+
+ dest=`echo $file | $SED "$basename"`
+ case $file in
+ lib/*) dest=src/$dest ;;
+ m4/*) dest=$config_macro_dir/$dest ;;
+ *) func_echo "Unknown file: $file"
+ exit 1
+ ;;
+ esac
+
+ func_echo "copying file \`$dest'"
+ cp $gnulibdir/$file $dest
+done
+
+func_echo "running: libtoolize --ltdl=\"$ltdldir\" --force --copy"
+libtoolize --ltdl="$ltdldir" --force --copy
func_echo "running: autoreconf --force --verbose --install"
autoreconf --force --verbose --install
diff --git a/commit b/commit
index daad8b26..fa6666da 100755
--- a/commit
+++ b/commit
@@ -67,8 +67,8 @@
# Report bugs to <gary@gnu.org>
: ${CVS="cvs"}
-: ${MAILNOTIFY="./config/mailnotify"}
-: ${MKSTAMP="./config/mkstamp"}
+: ${MAILNOTIFY="./ltdl/config/mailnotify"}
+: ${MKSTAMP="./ltdl/config/mkstamp"}
: ${MV="mv -f"}
: ${RM="rm -f"}
: ${SED="sed"}
diff --git a/config/.cvsignore b/config/.cvsignore
deleted file mode 100644
index b76d8cc1..00000000
--- a/config/.cvsignore
+++ /dev/null
@@ -1,37 +0,0 @@
-mdate-sh
-Makefile
-Makefile.in
-config.guess config.sub
-depcomp
-install-sh
-missing
-mkinstalldirs
-texinfo.tex
-*.log
-
-auxdir.m4
-ccstdc.m4
-codeset.m4
-compile
-cond.m4
-depend.m4
-depout.m4
-dmalloc.m4
-gettext.m4
-glibc21.m4
-header.m4
-iconv.m4
-init.m4
-install-sh.m4
-isc-posix.m4
-lcmessage.m4
-make.m4
-missing.m4
-progtest.m4
-protos.m4
-sanity.m4
-strip.m4
-
-ltmain.sh
-ltdl.m4
-libtool.m4
diff --git a/configure.ac b/configure.ac
index ebe9f4df..27e87c70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
# Configure template for GNU m4. -*-Autoconf-*-
-# Copyright (C) 1991-1994, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2004, 2005
+# 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
@@ -16,17 +17,19 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
+AC_PREREQ([2.59])
## ------------------------ ##
## Autoconf initialisation. ##
## ------------------------ ##
-AC_INIT([GNU m4], [1.4q], [bug-m4@gnu.org])
+AC_INIT([GNU m4], [1.9a], [bug-m4@gnu.org])
AC_CONFIG_SRCDIR([src/m4.h])
-AC_CONFIG_AUX_DIR([config])
-AC_CONFIG_LIBOBJ_DIR([gnulib/m4])
-AC_CONFIG_HEADERS([config.h:config-h.in])
+AC_CONFIG_AUX_DIR([ltdl/config])
+AC_CONFIG_MACRO_DIR([ltdl/m4])
+AC_CONFIG_LIBOBJ_DIR([gnu])
AC_CONFIG_TESTDIR([tests])
+AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_FILES([tests/m4], [chmod +x tests/m4])
@@ -76,7 +79,7 @@ AC_MSG_CHECKING(for modules to preload)
else
if test "$use_modules" != yes; then
for module in $use_modules; do
- DLPREOPEN="$DLPREOPEN -dlpreopen ../modules/$module.la"
+ DLPREOPEN="$DLPREOPEN -dlpreopen modules/$module.la"
done
fi
fi
@@ -88,7 +91,7 @@ AC_SUBST(DLPREOPEN)
## ------------------------ ##
## Automake Initialisation. ##
## ------------------------ ##
-AM_INIT_AUTOMAKE([1.7g dist-bzip2])
+AM_INIT_AUTOMAKE([1.9.5 subdir-objects dist-bzip2])
@@ -101,7 +104,7 @@ gl_EARLY
AC_ISC_POSIX
AM_PROG_CC_STDC
AC_PROG_CPP
-AC_PROG_CC_C_O
+AM_PROG_CC_C_O
m4_CHECK_DEBUGGING
# Use gcc's -pipe option if available: for faster compilation.
@@ -119,10 +122,9 @@ esac
## ----------------------- ##
## Libtool initialisation. ##
## ----------------------- ##
+LT_PREREQ([2.0])
LT_INIT([shared dlopen win32-dll])
-AC_WITH_LTDL
-
-AC_SUBST([LTDLINCL], ["${LTDLINCL-INCLTDL}"])
+LT_WITH_LTDL([ltdl])
@@ -139,12 +141,15 @@ m4_GNU_GETTEXT
## Gnulib support, ##
## --------------- ##
gl_SOURCE_BASE(gnu)
-gl_M4_BASE(acm4)
-gl_MODULES(error exit free getopt gettext obstack progname regex stdbool strtol version-etc xalloc xalloc-die xstrndup)
+gl_M4_BASE(ltdl/m4)
+# We also use getopt and version-etc, but they are copied into
+# the project tree by bootstrap since they are used only by m4 itself.
+gl_MODULES(error exit free gettext obstack progname regex stdbool strtol xalloc xalloc-die xstrndup)
gl_INIT
# Gnulib doesn't always do things quite the way M4 would like...
m4_ERROR
+m4_GETOPT
m4_OBSTACK
m4_REGEX
@@ -154,7 +159,7 @@ m4_REGEX
## ------------------------ ##
AC_PROG_INSTALL
AC_PROG_MAKE_SET
-AC_PATH_PROG(PERL,perl)
+AC_PATH_PROG(PERL, perl)
AC_PROG_AWK
@@ -209,16 +214,11 @@ AM_CONDITIONAL([USE_GMP], [test "x$USE_GMP" = xyes])
## -------- ##
## Outputs. ##
## -------- ##
-AC_CONFIG_FILES([Makefile
- doc/Makefile
- examples/Makefile
- gnu/Makefile
- m4/Makefile
- m4/system.h:m4/system_.h
- modules/Makefile
- src/Makefile
- tests/Makefile
- tests/atlocal
+AC_CONFIG_FILES([
+Makefile
+gnu/Makefile
+m4/system.h:m4/system_.h
+tests/atlocal
])
AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index a0f54210..00000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-## This file is part of GNU m4
-## Copyright (C) 2000, 2001, 2004 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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301 USA
-
-info_TEXINFOS = m4.texinfo
-
-dist_man_MANS = m4.1
-
-EXTRA_DIST = helptoman.pl
-
-# Automake 1.4 does not support TAGS_FILES directly.
-TAGS_FILES = $(info_TEXINFOS)
-TAGS_DEPENDENCIES = $(TAGS_FILES)
-ETAGS_ARGS = --language=none --regex='/@node \([^,]*\)/\1/' $(TAGS_FILES)
-
-MAINTAINERCLEANFILES = Makefile.in m4.1
-
-PERL = @PERL@
-
-%.1: helptoman.pl $(top_builddir)/src/$*
- @if test -f $(top_builddir)/src/$*; then \
- echo "Updating the \`man' page \`$@'"; \
- $(PERL) $(srcdir)/helptoman.pl $(top_builddir)/src/$* > $@-tmp; \
- cmp -s $@-tmp $(srcdir)/$@ || cp $@-tmp $(srcdir)/$@; \
- rm -f $@-tmp; \
- else \
- echo "WARNING: The \`man' page \`$@' cannot be updated yet."; \
- echo " Retry once the program executable will be ready."; \
- fi
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index d8f2a689..00000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,76 +0,0 @@
-## This file is part of GNU m4
-## Copyright (C) 2000, 2001 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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301 USA
-
-EXTRA_DIST = $(WEB_SITE)
-
-MAINTAINERCLEANFILES = Makefile.in
-
-WEB_SITE = \
- WWW/Makefile \
- WWW/_footer.htm \
- WWW/_header.htm \
- WWW/man/Makefile \
- WWW/m4lib/bugs.m4 \
- WWW/m4lib/changelog.m4 \
- WWW/m4lib/download.m4 \
- WWW/m4lib/features.m4 \
- WWW/m4lib/feedback.m4 \
- WWW/m4lib/html.m4 \
- WWW/m4lib/index.m4 \
- WWW/m4lib/layout.m4 \
- WWW/m4lib/lists.m4 \
- WWW/m4lib/menu.m4 \
- WWW/m4lib/modules.m4 \
- WWW/m4lib/news.m4 \
- WWW/m4lib/readme.m4 \
- WWW/m4lib/setup.m4 \
- WWW/m4lib/test.m4 \
- WWW/m4lib/thanks.m4 \
- WWW/m4lib/thissite.m4 \
- WWW/m4lib/tmpl.m4 \
- WWW/m4lib/todo.m4 \
- WWW/m4lib/uses.m4 \
- WWW/m4lib/visions.m4 \
- WWW/m4lib/whatis.m4
-
-dist_pkgdata_DATA = \
- capitalize.m4 \
- comments.m4 \
- ddivert.m4 \
- debug.m4 \
- esyscmd.m4 \
- exp.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 \
- sysv-args.m4 \
- trace.m4 \
- translit.m4 \
- undivert.incl \
- undivert.m4 \
- wrap.m4
diff --git a/config/mailnotify b/ltdl/config/mailnotify
index a362f1b8..a362f1b8 100755
--- a/config/mailnotify
+++ b/ltdl/config/mailnotify
diff --git a/config/mkstamp b/ltdl/config/mkstamp
index 3c8c2d1d..3c8c2d1d 100755
--- a/config/mkstamp
+++ b/ltdl/config/mkstamp
diff --git a/acm4/debug.m4 b/ltdl/m4/debug.m4
index 83d2ae55..83d2ae55 100644
--- a/acm4/debug.m4
+++ b/ltdl/m4/debug.m4
diff --git a/acm4/gmp.m4 b/ltdl/m4/gmp.m4
index 1bdffda3..1bdffda3 100644
--- a/acm4/gmp.m4
+++ b/ltdl/m4/gmp.m4
diff --git a/acm4/m4-error.m4 b/ltdl/m4/m4-error.m4
index b70ab2f0..b70ab2f0 100644
--- a/acm4/m4-error.m4
+++ b/ltdl/m4/m4-error.m4
diff --git a/ltdl/m4/m4-getopt.m4 b/ltdl/m4/m4-getopt.m4
new file mode 100644
index 00000000..6c052dd5
--- /dev/null
+++ b/ltdl/m4/m4-getopt.m4
@@ -0,0 +1,41 @@
+# -*- Autoconf -*-
+# m4-getopt.m4 -- Use the installed version of getopt.h if available.
+# Written by Gary V. Vaughan <gary@gnu.org>
+#
+# Copyright (C) 2005 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 of the License, 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; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# serial 1
+
+# m4_GETOPT
+# ---------
+# Use the installed version of getopt.h if available.
+AC_DEFUN([m4_GETOPT],
+[GETOPT_H=
+AC_SUBST([GETOPT_H])
+
+AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h], [AC_INCLUDES_DEFAULT])
+AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
+
+dnl BSD getopt_log uses an incompatible method to reset option processing,
+dnl and (as of 2004-10-15) mishandles optional option-arguments.
+AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
+
+AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the getopt replacement function should be used.])
+
+])# m4_ERROR
diff --git a/acm4/m4-gettext.m4 b/ltdl/m4/m4-gettext.m4
index c3398e8c..c3398e8c 100644
--- a/acm4/m4-gettext.m4
+++ b/ltdl/m4/m4-gettext.m4
diff --git a/acm4/m4-gnulib.m4 b/ltdl/m4/m4-gnulib.m4
index 7cde5960..7cde5960 100644
--- a/acm4/m4-gnulib.m4
+++ b/ltdl/m4/m4-gnulib.m4
diff --git a/acm4/m4-obstack.m4 b/ltdl/m4/m4-obstack.m4
index 640288b5..640288b5 100644
--- a/acm4/m4-obstack.m4
+++ b/ltdl/m4/m4-obstack.m4
diff --git a/acm4/m4-regex.m4 b/ltdl/m4/m4-regex.m4
index 70c0de3c..70c0de3c 100644
--- a/acm4/m4-regex.m4
+++ b/ltdl/m4/m4-regex.m4
diff --git a/acm4/stackovf.m4 b/ltdl/m4/stackovf.m4
index 6eca1f3e..6eca1f3e 100644
--- a/acm4/stackovf.m4
+++ b/ltdl/m4/stackovf.m4
diff --git a/m4/Makefile.am b/m4/Makefile.am
deleted file mode 100644
index 8c57f4f6..00000000
--- a/m4/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-## This file is part of GNU m4
-## Copyright (C) 2000, 2001, 2003, 2004 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 of the License, 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; see the file COPYING. If not, write to
-## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-## Boston, MA 02110-1301, USA.
-
-AM_CPPFLAGS = -I$(top_builddir)/gnu -I$(top_srcdir)/gnu \
- -I$(top_builddir) -I$(top_srcdir) $(INCLTDL) $(INTLINCL)
-AM_LDFLAGS = -no-undefined -export-dynamic
-
-lib_LTLIBRARIES = libm4.la
-libm4_la_SOURCES = builtin.c debug.c hash.c input.c \
- m4.c m4private.h macro.c module.c output.c \
- path.c symtab.c syntax.c utility.c
-libm4_la_LIBADD = $(top_builddir)/gnu/libgnu.la \
- $(LIBLTDL) $(LTLIBINTL) $(LIBADD_DL)
-
-module.o module.lo: module.c pathconf.h
-pathconf.h: Makefile
- @echo "#define MODULE_PATH \"$(libexecdir)/$(PACKAGE)\"" > pathconf.h
-
-EXTRA_DIST = system_.h
-# This file needs to be regenerated at configure time.
-dist-hook:
- rm -f $(distdir)/system.h
-
-pkginclude_HEADERS = hash.h system.h
-include_HEADERS = m4module.h
-
-CLEANFILES = pathconf.h
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/modules/Makefile.am b/modules/Makefile.am
deleted file mode 100644
index 760aada1..00000000
--- a/modules/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-## This file is part of GNU m4
-## Copyright (C) 2000, 2001, 2003, 2004 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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301 USA
-##
-## Written by Gary V. Vaughan <gary@gnu.org>
-
-MAINTAINERCLEANFILES = Makefile.in
-
-testsubdir = testSubDir
-pkgmodincludedir = $(includedir)/$(PACKAGE)/modules
-pkglibexecdir = $(libexecdir)/$(PACKAGE)
-
-ETAGS_ARGS = --regex='/M4BUILTIN_HANDLER[ \t]*(\([^)]*\)/\1/'
-
-EXTRA_DIST = modtest.m4 shadow.m4 time.m4 time2.m4 stdlib.m4 format.c
-
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
- -I$(top_builddir)/gnu -I$(top_srcdir)/gnu \
- -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INTLINCL)
-AM_LDFLAGS = -no-undefined -module
-LIBS = $(top_builddir)/m4/libm4.la
-
-pkgmodinclude_HEADERS = m4.h
-pkglibexec_LTLIBRARIES = gnu.la load.la m4.la traditional.la \
- modtest.la shadow.la import.la stdlib.la time.la
-
-if USE_GMP
-pkglibexec_LTLIBRARIES += mpeval.la
-EXTRA_mpeval_la_SOURCES = evalparse.c
-mpeval_la_LIBADD = $(LIBADD_GMP)
-endif
-
-EXTRA_gnu_la_SOURCES = format.c
-EXTRA_m4_la_SOURCES = evalparse.c
-
-
-## Disabled for now. It is too fragile to be useful.
-## pkglibexec_LTLIBRARIES += perl.la
-##perl_la_CFLAGS = `perl -MExtUtils::Embed -e ccopts`
-##perl_la_LDFLAGS = `perl -MExtUtils::Embed -e ldopts`
-##BUILT_SOURCES = perlxsi.c
-##DISTCLEANFILES = $(BUILT_SOURCES)
-##perlxsi.c:
-## perl -MExtUtils::Embed -e xsinit -- -o perlxsi.c
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 7f855516..00000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-## This file is part of GNU m4
-## Copyright (C) 2000, 2003, 2004 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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301 USA
-##
-## Written by Gary V. Vaughan <gary@gnu.org>
-
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
- -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \
- -I$(top_builddir)/gnu -I$(top_srcdir)/gnu \
- -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INTLINCL)
-
-bin_PROGRAMS = m4
-m4_SOURCES = $(top_srcdir)/gnu/getopt.c \
- $(top_srcdir)/gnu/getopt1.c \
- $(top_srcdir)/gnu/getopt.h \
- $(top_srcdir)/gnu/version-etc.c \
- $(top_srcdir)/gnu/version-etc.h \
- main.c m4.h freeze.c stackovf.c
-m4_LDADD = $(top_builddir)/m4/libm4.la
-m4_LDFLAGS = -no-undefined -export-dynamic $(DLPREOPEN)
-
-CLEANFILES = m4$(EXEEXT)
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/main.c b/src/main.c
index d6e5e474..adb377ee 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,7 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+
+ Copyright (C) 1989-1994, 1999, 2000, 2003, 2004, 2005
+ 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
@@ -21,13 +23,18 @@
#include "m4.h"
#include "m4private.h"
-#include "gnu/getopt.h"
+#include "getopt.h"
+#include "version-etc.h"
#include "gnu/progname.h"
-#include "gnu/version-etc.h"
static void print_program_name_CB (void);
+/* Initialise gnulib version-etc module.
+ Do *not* mark this string for translation. */
+const char version_etc_copyright[] =
+ "Copyright (C) 2005 Free Software Foundation, Inc.";
+
/* Name of frozen file to digest after initialization. */
const char *frozen_file_to_read = NULL;
@@ -222,11 +229,6 @@ main (int argc, char *const *argv, char *const *envp)
set_program_name (argv[0]);
error_print_progname = print_program_name_CB;
- /* Initialise gnulib version-etc module.
- Do *not* mark this string for translation. */
- version_etc_copyright =
- "Copyright (C) 2004 Free Software Foundation, Inc.";
-
setlocale (LC_ALL, "");
#ifdef ENABLE_NLS
textdomain(PACKAGE);
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644
index ad2647c2..00000000
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-## This file is part of GNU m4
-## Copyright (C) 2000, 2001, 2005 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 of the License, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301 USA
-
-# The next line is needed by `generated.at:esyscmd'
-# Ty Coon, President of Vice
-
-EXTRA_DIST = generate.awk atlocal.in \
- $(OTHER_FILES) $(TESTSUITE_AT) $(TESTSUITE)
-
-DISTCLEANFILES = atconfig atlocal m4
-MAINTAINERCLEANFILES = Makefile.in generated.at $(TESTSUITE)
-
-OTHER_FILES = \
- iso8859.m4 stackovf.test
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- { \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-EXTRA_DIST += package.m4
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
- testsuite.at \
- macros.at builtins.at options.at others.at modules.at generated.at
-TESTSUITE = testsuite
-
-check-local: atconfig $(TESTSUITE)
- $(SHELL) $(srcdir)/$(TESTSUITE)
-
-clean-local:
- -test -f $(srcdir)/$(TESTSUITE) && \
- $(srcdir)/$(TESTSUITE) --clean
-
-# Using variables so that this snippet is not too wide and can
-# be used as is in Texinfo @example/@end example.
-m4_texinfo = $(top_srcdir)/doc/m4.texinfo
-generate = $(AWK) -f $(srcdir)/generate.awk
-$(srcdir)/generated.at: $(srcdir)/generate.awk $(m4_texinfo)
- $(generate) $(m4_texinfo) >$@t
- mv $@t $@
-
-AUTOM4TE = autom4te
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(srcdir)/$(TESTSUITE): $(srcdir)/package.m4 $(TESTSUITE_AT)
- $(AUTOTEST) -I $(srcdir) testsuite.at -o $@
-
-# Run the test suite on the *installed* tree.
-installcheck-local:
- $(SHELL) $(srcdir)/$(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin