gnulib: sync with upstream.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap: sync with upstream.

* bootstrap.conf: New file.
* gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
gl/build-aux/funclib.sh, gl/build-aux/options-parser: Update from
upstream to pick up recent improvements.
* bootstrap: Regenerate.
* ltdl/m4/gnulib-cache.m4: Regenerate.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: don't install modules to pkglibexecdir.

Modern Automake (correctly) errors out when trying to install
modules to pkglibexecdir; we should be using pkglibdir here.
* Makefile.am (pkglibexec_LTLIBRARIES): Rename from this...
(pkglib_LTLIBRARIES): ...to this.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: don't check in generated files.

* COPYING: Install explicitly to avoid confusion over M4 license.
* INSTALL, build-aux/compile, build-aux/config.guess,
build-aux/config.sub, build-aux/depcomp, build-aux/install-sh,
build-aux/mdate-sh, build-aux/missing, build-aux/texinfo.tex:
Remove.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap: set copyright_holder explicitly.

* bootstrap.conf (copyright_holder): Explicitly set to the FSF.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
doc: use .texi extension consistently.

* doc/m4.texinfo: Rename from this...
* doc/m4.texi: ...to this.
* Makefile.am (m4_texinfo): Rename from this...
(m4_texi): ...to this. Adjust all callers.
* doc/Makeflie.am (m4_TEXINFOS): Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: move to gitlog-to-changelog.

* ChangeLog: Move from here...
* ChangeLog.old: ...to here.
* .gitignore: Add ChangeLog.
* ltdl/m4/gnulib-cache.m4: Add gitlog-to-changelog.
* Makefile.am (ChangeLog): New rule to generate a ChangeLog on
demand.
(EXTRA_DIST): Distribute gitlog-to-changelog.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
tests: update `x' quotes to 'x' to match gnulib outputs.

In the (extremely!) long time since this branch was last active,
GNU is moving towards upright quotes exclusively, including
several of the files we use from gnulib -- which breaks many of
the test cases.
* doc/m4.texi: Fix quotes in many example tests extracted to
tests/generated.m4.
* tests/builtins.at, tests/freeze.at, tests/macros.at,
tests/modules.at, tests/null.at, tests/options.at,
tests/others.at: Fix quotes in many expected output comparisons.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
gnulib: remove obsolete gnulib exit module references.

* ltdl/m4/gnulib-cache.m4: Remove exit.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap: sync with upstream.

* gl/build-aux/bootstrap.in: Sync with upstream.
* bootstrap: Regenerate.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Factor load functionality into include builtin.

* m4/module.c (m4__module_open): Instead of calling lt_dlopenext
right away, use the preload hint first incase path searching has
been disabled by POSIXLY_CORRECT.  Otherwise fallback to a
manual path search to override libltdl's algorithm.
* m4/m4module.h: Adjust.
* m4/path.c (FILE_SUFFIXES): Order to try suffixes in our path
search algorithm.
(NO_SUFFIXES): Alternatively, how to to search a path without
adding file suffixes.
(m4_path_search): Add a new suffixes parameter defaulting to
NO_SUFFIXES.  Adjust all callers.
(m4_load_filename): New generic load function that tries to
open a matched file first as a module, and if that fails fall
back to a (possibly frozen) m4 input file.
(m4_fopen): New function with close on exec functionality.
* modules/m4.c (include): Use m4_load_filename to with modules
or m4 files. Adjust all callers.
* modules/load.c (load): Removed this builtin.
* src/main.c: Remove Dynamic loading features section, and
M4MODPATH support.
(long_options): Remove "load-module", "unload-module" and
"module-directory" options.
(OPTSTRING): Remove 'M' and 'm' options.
(process_file): Use m4_load_filename to support module names
on the command line.
* tests/generate.awk (new_test): Output AT_CHECK_DYNAMIC_MODULE
and AT_CHECK_GMP without relying on the (deleted!) -m option.
* Makefile.am (TESTS_ENVIRONMENT): No need for abs_top_builddir
any more.
* doc/m4.texinfo: Update examples.
(Dynamic loading features, Load): Removed.
(Command line files): Describe how non-option arguments are
treated to try to find a matching macro file or dso.
(Include): Describe additional dso loading features if a
suitable text file cannot be found.
(Modules): Updated.
* tests/builtins.at, tests/m4.in, tests/modules.at,
tests/options.at, others.at: Adjust test cases and calling conventions
to new semantics.
* modules/modtest.m4, modules/shadow.m4, modules/stdlib.m4,
modules/time.m4, modules/time2.m4: Move from here...
* examples/modtest.m4, examples/shadow.m4, examples/stdlib.m4,
examples/time.m4, examples/time2.m4: ...to here, to prevent a
namespace clash with similarly named loadable modules in the
modules directory.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: default to automake silent rules if available.

* Makeflie.am (FORCE): Add missing placeholder.
* configure.ac (AM_SILENT_RULES): Use it if possible.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: fix build on newer glibc.

POSIX allows, but does not require, that <fcntl.h> implicitly
includes <sys/stat.h>.  Until recent glibc, most systems did
this implicit inclusion, and m4 was mistakenly relying on it.
* m4/output.c (includes): Add <sys/stat.h>.
* THANKS: Update.
Reported by Todd Rinaldo.

Signed-off-by: Eric Blake <eblake@redhat.com>
maint: enable additional c++ tests with make dist.

* configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
tests be disabled...
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
building package.
* ltdl/m4/gnulib-cache.m4: Regenerate.

Signed-off-by: Eric Blake <eblake@redhat.com>
maint: add recent copyright assignments.

* AUTHORS: Add Joel Denny and David Warme.

Signed-off-by: Eric Blake <eblake@redhat.com>
texinfo: drop obsolete @acronym invocations.

* doc/m4.texi: Remove all uses of @acronym.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
gnulib: fix use of link libraries.

* Makefile.am (m4_LDADD): Update link libraries accordingly.
* THANKS: Update.
Reported by Rainer Tammer.

Signed-off-by: Eric Blake <eblake@redhat.com>
maint: import release notes from branch-1.4.

* NEWS: Add entries from releases 1.4.15 thru 1.4.17.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: test bad format string crash.

* doc/m4.texi (Format): Add a test.

Signed-off-by: Eric Blake <eblake@redhat.com>
m4: avoid a crash with bad format string.

* src/format.c (expand_format): Fix off-by-one error.
* THANKS: Add Carlo Teubner.

Copyright-paperwork-exempt: Yes
Signed-off-by: Eric Blake <eblake@redhat.com>