Initial revision
Resynchronise with my local tree.
Modularization of all builtins by extenstion of libm4.
* config/ltmain.sh:  This needs to be checked in to match the
libtool macros copied to acinclude.m4 (until a released
libtool copes with m4's needs).
* bootstrap:  Run gettextize.
mv m4.c main.c
typo.
* po/POTFILES.in: List files in their new positions.
These files are generated, and needn't be in CVS.
* configure.in: Figure out whether to use the installed
getopt.h or the supplied one.
* src/Makefile.am: ditto.
* m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.
Regenerated.
* src/main.c (main):  It is now safe to
``m4_module_install("m4")'', without tripping over the m4
binary itself!
* m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
versions having fixed the insidious module search order bug.
* modules/perl.c (builtin_perleval):  Use PL_na for
compatibility with perl-5.6.
* po/POTFILES.in: Take account of these file movements.
* src/Makefile.am (m4_SOURCES): removed eval.c.
(EXTRA_m4_SOURCES): removed numb.c and numb.h.
* m4/Makefile.am (libm4_la_SOURCES): added eval.c.
(EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
* modules/m4.c (builtin_eval): Use m4_evaluate().
* m4/eval.c: Moved here from src/eval.c to facilitate
implementation of eval() builtin as part of the `m4' loadable
module.
(m4_evaluate): renamed from evaluate for namespace cleanliness.
* m4/numb.c: Moved here from src/numb.c, since it is #included
into eval.c at compile time.
* m4/m4module.h (m4_evaluate): Added prototype.
* src/m4.h (evaluate): Removed prototype.
Should have been cvs rm'ed a while back...
* m4/ltdl.c: Upgraded to latest bleeding edge version again.
On Solaris-2.5 (at least) the native dlopen implementation
gets confused about m4.o when looking for module "m4".  This
version always looks for .la an .$lib_ext suffixed names first
to work around the problem.  Sigh.
Clear up the file droppings from a cvs -nq up.
* m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
comes up on demand in LTLIBOBJS now.
* configure.in (getopt_long):  Creating and relying on a link for
getopt.h on hosts with no getopt_long() of thier own works
correctly now.  This is necessary so that callers of getopt_long()
can simply `#include <getopt.h>': the naive way of doing this
would end up using our own getopt.h and the installed
getopt_long(), which is asking for trouble!
(obstack_init): A similar argument applies to obstack.h and
obstack_init().
* configure.in (--with-modules): Changed semantics.  This
option is now used to list modules to be preopened.
* src/m4.h: #include "ltdl.h" unconditionally.
* src/main.c: Removed all dependencies on WITH_MODULES.
* src/freeze.c: ditto.
* modules/Makefile.am: ditto.
* m4/m4.c (builtin_m4exit): ditto.
* modules/modpath1.test: ditto.
* modules/modpath2.test: ditto.
* modules/modpath3.test: ditto.
* modules/modpath4.test: ditto.
* modules/modtest.test: ditto.
* modules/shadow.test: ditto.
* modules/unload.test: ditto.

* m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
comes up on demand in LTLIBOBJS now.
* configure.in (getopt_long):  Creating and relying on a link for
getopt.h on hosts with no getopt_long() of thier own works
correctly now.  This is necessary so that callers of getopt_long()
can simply `#include <getopt.h>': the naive way of doing this
would end up using our own getopt.h and the installed
getopt_long(), which is asking for trouble!
(obstack_init): A similar argument applies to obstack.h and
obstack_init().
* src/main.c (main): Fixed a particularly nasty bug is
user_search_path setting -- the -M flag processing must be
extremely careful with search path ordering, or else the default
installed module directory (possibly containing modules from a
previous release) is placed earlier in the search path than any -M
arguments (which are relied upon to load uninstalled modules with
most of the tests in the regresion suite).

* modules/load.c (builtin_load):  Nasty hack to prevent adding
symbols to symtab again if a module is loaded more than once.
* modules/m4.c (builtin_ifelse): removed unused variable argv0.

* m4/symtab.c (m4_remove_table_reference_symbols):  Fixed a
possible NULL pointer dereference.

* m4/module.c (m4_module_find_by_modname): Renamed from
m4_module_modname_find.   Fixed all references.
(m4_module_find_by_builtin):  New function.

* modules/modfreeze.test: load the `load' module with each
invocation.
* src/freeze.c (produce_frozen_state): Simplified in light of
module field in m4_symbol.  Allow a third argument for text macros
to name the originating module.
(reload_frozen_state): ditto.
* m4/m4module.h:  Fixup prototypes.
* m4/builtin.h (m4_builtin_define): Add a module argument so
that symbols can be registered against the defining module.
(m4_macro_define): ditto.
* m4/m4private.h (m4_symbol): Make the module field const to save
on casting in the rest of the code.
(SYMBOL_MODULE): New macro.

* m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
symbol reference maintenance bugs when removing a symbol from the
symtab.

* src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.

* configure.in (m4_cv_func_obstack): A better check for whether
libc has an obstack implementation.
* m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.