Gary V. Vaughan cceb922d06 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 as (possibly frozen) m4 input.
(m4_fopen): New function with close on exec functionality.
* modules/m4.c (include, sinclude): Use m4_load_filename to
overload these builtins to work with modules too.
* 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.
* 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: Adjust test cases and calling conventions
to new semantics.
* NEWS: Updated.
2008-05-06 15:44:20 -04:00
2007-11-05 13:14:03 -07:00
2007-10-06 07:08:52 -06:00
2008-03-28 06:44:20 -06:00
2007-12-04 06:43:29 -07:00
2008-05-03 13:31:14 -06:00
2008-01-22 13:37:10 -07:00

GNU `m4' is an implementation of the traditional Unix macro
processor.  It is mostly SVR4 compatible, although it has some
extensions (for example, handling more than 9 positional parameters
to macros).  `m4' also has builtin functions for including files,
running shell commands, doing arithmetic, etc.  Autoconf needs GNU
`m4' for generating `configure' scripts, but not for running them.

GNU `m4' was originally written by Rene' Seindal, from Denmark.

GNU `m4' has a web site at http://www.gnu.org/software/m4/.

If GNU `m4' is meant to serve GNU `autoconf', beware that `m4'
should be fully installed *prior to* configuring `autoconf' itself.
Likewise, if you intend on hacking GNU `m4' from git, the bootstrap
process requires that you first install a released copy of GNU `m4'.

If you are just trying to build `m4' from a released tarball, you
should not normally need to run `./bootstrap' or `autoreconf'; just go
ahead and start with `./configure'.  If you are trying to build `m4'
from git or CVS, more information can be found in the file HACKING,
only found in a version control checkout.

In the subdirectories `tests' and `examples' you will find various m4
files, ranging from trivial test files to rather advanced macros.  If
you intend to use m4 seriously, you might find useful material down
there.

See file `COPYING' for copying conditions.
See file `INSTALL' for compilation and installation instructions.
See file `ABOUT-NLS' for how to customize this program to your language.
See file `NEWS' for a list of major changes in the current release.
See file `AUTHORS' for the names of maintainers.
See file `THANKS' for a list of contributors.

By using `./configure --with-gmp, you get multiple precision integral
and rational arithmetic using mpeval.  The implementation depends on the
GNU gmp v2 library.

By using `./configure --with-modules=`foo bar baz', you get an m4 with only
the named modules preloaded.  The default modules (preloaded if you do not
use this option) are sufficient to do the job of GNU m4-1.4.  Additional
modules may be desirable, or necessary if libltdl does not support your
host architecture.  The implementation uses libltdl interface, details of
which are in the libtool manual.  See file `modules/README' for a more
detailed description.

By using `./configure --with-dmalloc', GNU m4 is linked with Gray
Watson's dmalloc package.  It is a debugging option for finding memory
management problems.  Gray Watson's dmalloc package is available at
ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz.

GNU M4 uses GNU Libtool in order to build shared libraries on a
variety of systems.  While this is very nice for making usable
binaries, it can be a pain when trying to debug a program. For that
reason, compilation of shared libraries can be turned off by
specifying the `--disable-shared' option to `configure'.  However,
without shared libraries, modules that are not preloaded will not be
available for use.

Send bug reports, comments or ideas to `bug-m4@gnu.org'.  A bug report
is an adequate description of the problem: your input, what you
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, ...

The easiest way to remember this information is by using the
testsuite.  Any test failures are automatically logged, along with
lots of useful information about your setup; simply mailing
tests/testsuite.log to `bug-m4@gnu.org' is a good start.  If you want
to dive in and debug a failure, you may find it useful to fine-tune
the execution of the testsuite.  For example, running test 12 in
verbose mode can be done with:

make check TESTSUITEFLAGS='-v -d -x 12'

The testsuite understands --help to tell you more about the current
set of tests.

========================================================================

Copyright (C) 2000, 2005, 2006, 2007 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts.  A copy of the license is included in the ``GNU Free
Documentation License'' file as part of this distribution.
Description
No description provided
Readme 8.6 MiB