maint: fix gnulib path in .gitmodules.

* .gitmodules (gnulib): Set path to build-aux/gnulib.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: fix a type coercion flagged by -Wformat.

* modules/m4.c (maketemp): Don't pass a size_t as the precission
parameter to %.*s.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: fix some warnings that break compilation with -Werror.

* m4/hash.c (ITERATOR_NEXT_NEXT): Hide unused macro.
(maybe_grow): Prevent implicit double promotion.
(m4_get_hash_length, m4_get_hash_iterator_key)
(m4_get_hash_iterator_value, m4_hash_string_hash)
(m4_hash_string_cmp): Add pure attribute for gcc.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: separate installed modules from test only modules.

* modulues/import.c, modules/modtest.c, modules/shadow.c: Move
from here...
* tests/import.c, tests/modtest.c, tests/shadow.c: ...to here.
* Makefile.am: Adjust.

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

* build-aux/gl/build-aux/bootstrap.in,
build-aux/gl/build-aux/extract-trace,
build-aux/gl/build-aux/funclib.sh,
build-aux/gl/build-aux/inline-source,
build-aux/gl/build-aux/options-parser: Sync with upstream.
* bootstrap: Regenerate.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: autogenerate THANKS.

More automation == less time wasted on menial tasks.
* build-aux/thanks-gen: script inspired by coreutils.
* Makefile.am (THANKS): Based on rule from coreutils/Makefile.am.
* NO-THANKS: New file. Configure thanks-gen output.
* THANKS: Remove.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: loadable modules do not require undefined symbol support.

For compatibility with OS/2 and cygwin, modules must be compiled
with no undefined symbols.
* Makefile.am (AM_LDFLAGS): Add -no-undefined flag.
Reported by Ko Myung-Hun

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: loadable modules files do not require version numbers.

Modules are loaded by libltdl.  Arguably, loading from the .la
pseudo-library should work irrespective of platform library object
file-naming schemes; but in reality, M4 loads modules by basename
anyway, so we shouldn't put a platform specific version number in
the module filename anyway.
* Makefile.am (module_ldflags): Add -avoid-version flag.
Reported by KO Myung-Hun

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: append $EXEEXT suffix to /bin/sh.

Without $EXEEXT, /bin/sh cannot be located on OS/2.
* build-aux/m4/m4-syscmd.m4 (M4_SYSCMD): append $EXEEXT suffix
to /bin/sh.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: add -Zargs-resp to LDFLAGS on OS/2.

-Zargs-resp enables a response file support on OS/2.
* configure.ac (OS2_LDFLAGS): Add -Zargs-resp on *-*-os2*.
* Makefile.am (AM_LDFLAGS): Add OS2_LDFLAGS.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
m4: fdopen() with a text mode explicitly on OS/2.

On OS/2 kLIBC, fdopen() creates a stream in a mode of a file
descriptor. So specify "t" to open a stream in a text mode explicitly
on OS/2.
* modules/gnu.c (m4_esyscmd): fdopen() in a text mode on OS/2.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
modules: support .dll suffix.

* m4/module.c (m4__module_open): Support .dll suffix in module
names.
* m4/path.c (FILE_SUFFIXES): Likewise for include builtin.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
modules: fall-back to system dlopen search path.

* m4/module.c (m4__module_open): If the module search function
cannot find a matching module, fall-back to the system dlopen
search path.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
modules: support _ symbol prefix requirement for dlsym.

* configure.ac (LT_FUNC_DLSYM_USCORE): Call it to set NEED_USCORE.
* m4/module.c (uscore_sym): New function.  Use this to prepend an
underscore if NEED_USCORE was set at configure time.
Reported by KO Myung-Hun

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
modules: support non-posix PATH_SEPARATOR.

* configure.ac (PATH_SEPARATOR): Propagate to config.h.
* m4/path.c (search_path_env_init): Respect PATH_SEPARATOR.
Reported by KO Myung-Hun

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: add forgotten thanks-gen script.

* .gitignore: Don't ignore build-aux/thanks-gen.
* build-aux/thanks-gen: New script.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: run update-copyright for 2014.

Add 2014 to copyright message in all files.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Revert "modules: fall-back to system dlopen search path."

The original patch had security issues, and broke loading of
frozen files including modules that are only available along
the fall-back path.

This reverts commit 1d887c9b5002d8e9a4e65c192c8a1b7355cc356a.
modules: support 8.3 truncated filenames.

* m4/path.c (TRUNCATE_FILENAME): New macro, defined on OS2.
(path_truncate): New function when TRUNCATE_FILENAME is defined,
otherwise a null-operation macro.  Trim the basename to no more
than 8 characters, followed by the extension.
(m4_path_search): Use it.
Reported by Ko Myung-Hun

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
configury: remove vestigial libltdl references.

M4 no longer uses libltdl.
* configure.ac: Call LT_LIB_DLLOAD to set LIBADD_DL correctly.
* Makefile.am (m4_libm4_la_LIBADD): Remove LIBLTDL.
(m4_libm4_la_DEPENDENCIES): Remove LTDLDEPS.
Reported by Pavel Raiskup

Signed-off-by: Gary V. Vaughan <gary@gnu.org>