Commit Graph

10 Commits

Author SHA1 Message Date
Akim Demaille
2f752e0e19 * libm4.m4 (near m4_split): Remove the buggy additional
changequote.
Quote properly `m4_split' when registering it.
2000-02-10 09:46:57 +00:00
Akim Demaille
ba05e82224 * libm4.m4 (m4_sign, m4_cmp, m4_list_cmp): New macros.
* acgeneral.m4 (AC_UNGNITS): Renamed as...
(_AC_VERSION_UNLETTER): this.  All callers changed.
Implement the scheme proposed by Alexandre Oliva:
	Nl -> (N+1).-1.(l#)
(_AC_VERSION_COMPARE): New macro.
(AC_PREREQ): Use it.
2000-02-09 11:59:24 +00:00
Akim Demaille
5ad32e051d Fix a bug: `libm4::define' was incorrectly registered.
* libm4.m4 (libm4::define): Not only register, define too.
2000-02-08 16:51:19 +00:00
Akim Demaille
881b4d908f Because of commas and brackets, m4_split must mess with the
quotes.

* libm4.m4 (m4_split): Quote the elements of the list you produce.
* tests/base.m4: New file, testing libm4.
All callers adapted.
Test m4_wrap.
2000-02-08 13:53:32 +00:00
Akim Demaille
30387328fa * libm4.m4 (m4_namespace_push, m4_namespace_pop): Use the private
macros to be robust to name space changes.
(m4_popdef, m4_pushdef): New private macros.
2000-02-08 13:43:58 +00:00
Akim Demaille
df16b72f85 Improve support of name spaces in libm4. Put the m4 builtins
in the `libm4' name space.

* libm4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_undefine): Private copies in the global name space.  Used by
the name space mechanisms.
(m4_namespace_register): New macro.
(m4_namespace_define): Use it.
(builtin, changequote, defn, dnl, esyscmd, ifdef, ifelse, indir,
patsubst, popdef, pushdef, regexp, undefine, syscmd, sysval): Put
in the `libm4' name space.
(m4_disable, m4_enable): Use the private m4_indir, otherwise once
`libm4' closed, there is no `indir' available, and therefore no
means to reopen a name space.
2000-02-08 13:11:21 +00:00
Akim Demaille
a9b538ad79 * libm4.m4 (m4_namespace_define): Fix a bug: `m4_namespace'
instead of `$1'.
Simplify some excess in quoting.
Use NAMESPACE::MACRONAME instead of `m4_defn(NAMESPACE,
MACRONAME)'.
2000-02-08 12:43:47 +00:00
Akim Demaille
5a9da0e05e Introduce name spaces in libm4.
* libm4.m4 (m4_namespace_push, m4_namespace_pop,
m4_namespace_define, define, m4_disable, m4_enable, m4_rename):
New macros.
(_m4_foreach, _m4_for, m4_wrap): Use m4_define for temporaries.
(m4_split): Don't mess with the quotes.

* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_HEADERS): Quote
`define'.
2000-02-08 11:20:57 +00:00
Akim Demaille
0cd449970f * libm4.m4 (m4_for): New macro. 2000-02-08 08:41:52 +00:00
Akim Demaille
6b8dfc89ca Create libm4.m4.
* Makefile.am: Adjusted for libm4.m4.

* acgeneral.m4 (m4_errprint, m4_warn, m4_fatal, m4_prefix,
m4_eval, m4_shift, m4_format, m4_include_unique, m4_include,
m4_sinclude, m4_quote, m4_split, m4_join, m4_strip, m4_append,
m4_list_append, ifval, ifset, m4_default, m4_case, m4_match,
m4_foreach): Moved from here, to...
* libm4.m4: here.
* acgeneral.m4 (AC_WRAP): Moved from here, to...
* libm4.m4 (m4_wrap): here.  All callers changed.

* acgeneral.m4: Don't include acversion.m4.
* autoconf.m4: Include libm4.m4 and acversion.m4.
* autoheader.m4: Likewise.
2000-02-07 17:42:03 +00:00