Akim Demaille [Wed, 8 Mar 2000 11:15:14 +0000 (11:15 +0000)]
Leave a diversion exclusively for Copyright notices.
* acgeneral.m4 (AC_DIVERSION_DEFAULTS): New diversion number.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Play with your diversion yourself, don't let
(AC_INIT): do it for you.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
Akim Demaille [Wed, 8 Mar 2000 11:14:09 +0000 (11:14 +0000)]
We don't need _AC_ARG_*_HELP_PROLOGUE.
* acgeneral.m4 (AC_EXPAND_ONCE): AC_PROVIDE yourself, in case
there is no AC_DEFUN associated with the text to expand.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): Remove, instead...
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): do it yourself.
Akim Demaille [Wed, 8 Mar 2000 11:13:31 +0000 (11:13 +0000)]
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix copy n' paste typos in
`--with-*', `--without-*' and `*' decoding.
Reported by Raja R Harinath.
Fixes autoconf/119.
Akim Demaille [Wed, 8 Mar 2000 11:08:29 +0000 (11:08 +0000)]
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
Akim Demaille [Wed, 8 Mar 2000 11:03:33 +0000 (11:03 +0000)]
* acgeneral.m4 (AC_INIT_PARSE_ARGS): Rename as...
(_AC_INIT_PARSE_ARGS): this.
Move the display of help and version strings to...
(_AC_INIT_HELP, _AC_INIT_VERSION): here.
(AC_INIT): Adjust. Also, fix quotation.
Akim Demaille [Tue, 7 Mar 2000 14:24:49 +0000 (14:24 +0000)]
Support absolute DOS-style paths.
Any character before the colon is accepted because network drives
can be assigned characters outside the [a-zA-Z] range. DOS-style
relative paths (?:foo/bar) are also considered absolute for
Autoconf's purposes since the path '../?:foo/bar' is invalid.
* acgeneral.m4 (AC_OUTPUT_FILES): Treat DOS-style paths (?:*') as
absolute.
(AC_OUTPUT_SUBDIRS): Likewise.
(AC_PATH_PROG): Make pattern for matching DOS-style paths the same
as that used in AC_OUTPUT_FILES and AC_OUTPUT_SUBDIRS.
Akim Demaille [Fri, 3 Mar 2000 14:15:41 +0000 (14:15 +0000)]
* acgeneral.m4 (_AC_WHICH_A): New macro.
(AC_CHECK_PROG): Use it. Use ifval.
(AC_CHECK_PROGS): Use ifval. Fix the quoting.
* tests/semantics.m4: Test AC_CHECK_PROG.
* tests/Makefile.am (EGREP_EXCLUDE): Add /AC_CHECK_PROGS?/.
Akim Demaille [Wed, 1 Mar 2000 17:01:29 +0000 (17:01 +0000)]
The empty regexp cannot be portably used in egrep's alternation.
For instance with Digital Unix v5.0:
> echo "foo" | egrep -e "^(|foo|bar)$"
> echo "|foo" | egrep -e "^(|foo|bar)$"
|foo
> echo "|bar" | egrep -e "^(|foo|bar)$"
> echo "bar" | egrep -e "^(|foo|bar)$"
bar
Reported by Nicolas Joly.
Akim Demaille [Wed, 1 Mar 2000 08:22:40 +0000 (08:22 +0000)]
Test suite: instead of using a full list of the AC macros and an
AT macro with selects which are the AC macros to test, just
produce the list of the AC macros we want to test.
* tests/atspecific.m4 (TEST_MACRO): Removed.
* tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the
selection TEST_MACRO used to do.
(macros.m4): Use it. Use AT_TEST_MACRO, not TEST_MACRO. Check
also AU macros.
Akim Demaille [Fri, 18 Feb 2000 10:01:25 +0000 (10:01 +0000)]
* tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it
makes the difference between Unix and DOS EOL. `diff' does not.
Reported by Eli Zaretski.
Also, be ready to use a diff that does not support `-u'.
Akim Demaille [Thu, 17 Feb 2000 09:31:34 +0000 (09:31 +0000)]
Fix the `missing dummy.in' reported by the test suite.
Reported by Erez Zadok.
* tests/torture.m4 (config.status under extreme conditions):
Reorganized. Because files required by this test were created
outside the pair AT_SETUP/AT_CLEANUP, when the test fails and
autotest extracts this test, the `debug' script does not contain
the files it needs. Now AT_SETUP/AT_CLEANUP encloses the full
auto contained section.
Akim Demaille [Thu, 10 Feb 2000 16:57:55 +0000 (16:57 +0000)]
* tests/actest.m4 (AC_ENV_SAVE): OpenBSD-2.3's /bin/sh defines an
envvar SECONDS which does change with time.
KMEM_GROUP is set by AC_FUNC_GETLOADAVG.
Reported by Volker Borchert.
Akim Demaille [Thu, 10 Feb 2000 16:25:47 +0000 (16:25 +0000)]
* acgeneral.m4 (AC_OUTPUT): When dispatching your arguments, use
ifval, not ifset!
Dispatch actions to AC_CONFIG_COMMANDS not AC_OUTPUT_COMMANDS, to
avoid unneeded warnings for obsolete use of AC_OUTPUT_COMMANDS.
Akim Demaille [Thu, 10 Feb 2000 13:14:58 +0000 (13:14 +0000)]
Changequote busters II.
They're back to save the world.
* acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O,
AC_PROG_MAKE_SET, AC_TYPE_GETGROUPS, AC_FUNC_GETLOADAVG,
AC_FUNC_MKTIME, AC_STRUCT_TIMEZONE, AC_F77_LIBRARY_LDFLAGS): Blast
that jelly o' changequote. Set the quotes free.
Akim Demaille [Thu, 10 Feb 2000 13:08:33 +0000 (13:08 +0000)]
* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): This is a routine of
`configure', not `config.status', hence use `conftest' for tmp
files, not `$ac_cs_root'.
Removed forgotten developer comment.
Double quoting the whole body is nicer than just the part that
needs to be.
Akim Demaille [Thu, 10 Feb 2000 10:38:59 +0000 (10:38 +0000)]
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
Akim Demaille [Thu, 10 Feb 2000 10:37:03 +0000 (10:37 +0000)]
Avoid calling `rm' without arguments.
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): It is smarter to use a
quoted here doc to output the section providing defaults for
CONFIG_*.
Don't rm the CONFIG_FILES here but in..
(AC_OUTPUT_FILES) [test -n "$CONFIG_FILES"]: here.
Hm, actually, no, just don't remove them at all, let the newly
created files replace the old ones, exactly as in
AC_OUTPUT_HEADERS.
From Graham Jenkins.
Akim Demaille [Thu, 10 Feb 2000 10:25:23 +0000 (10:25 +0000)]
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't
: ${FOO="$foo"}
but
: ${FOO=$foo}
Since Ultrix will also assign the quotes to FOO.
Reported by Harlan Stenn.
Akim Demaille [Thu, 10 Feb 2000 10:24:10 +0000 (10:24 +0000)]
Keep `AC_CHECK_TYPE' backward compatibility and provide a proper
`AC_CHECK_TYPE',
Based on ideas from Paul Eggert and Alexandre Oliva.
* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Renamed as
(_AC_CHECK_TYPE_NEW): this.
(AC_CHECK_TYPES): Adjusted.
(AC_CHECK_TYPE): Renamed as
(_AC_CHECK_TYPE_OLD): This. Adjusted to _AC_CHECK_TYPE_NEW.
No longer support extra includes, stick to 2.13's interface.
(_AC_CHECK_TYPE_BUILTIN_P): New macro.
(AC_CHECK_TYPE): New macro.
* autoheader.m4 (autoheader::AC_CHECK_TYPE): Renamed as...
(autoheader::_AC_CHECK_TYPE_OLD): this.
* tests/atspecific.m4 (TEST_MACRO): Skip /^_AC_/ macros.
* tests/semantics.m4: Test the choices of AC_CHECK_TYPE (wrt _NEW
or _OLD implemenation).
* doc/autoconf.texi (Generic Types): Reorganized. Explain
everything about AC_CHECK_TYPE and Co.
Akim Demaille [Thu, 10 Feb 2000 09:45:25 +0000 (09:45 +0000)]
The AU-glue code for AC_LINK_FILES was not fully compatible: in
AC_LINK_FILES($from, $to)
`$from' and `$to' can be lists, hence `AC_CONFIG_LINKS($to:$from)'
is wrong.
Reported by H.J. Lu.
* acgeneral.m4 (AC_LINK_FILES): Replace the m4-glue code from
AC_LINK_FILES to AC_CONFIG_LINKS, with sh-glue code.
Give a detailed update message.
(_AC_LINK_FILES_CNT): New variable. Initialize.
* tests/tools.m4 (autoupdate): No longer exercise `autoupdate'
with AC_LINK_FILES.
Akim Demaille [Thu, 10 Feb 2000 09:37:37 +0000 (09:37 +0000)]
Standardize the error messages in the options handling of
`configure' and `config.status'.
* acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Renamed as...
(_AC_OUTPUT_CONFIG_STATUS): this.
Change the error messages from
value: invalid feature name
to
invalid feature: value
Invite the user to try --help for invalid options.
(AC_INIT_PARSE_ARGS): Likewise.
Akim Demaille [Thu, 10 Feb 2000 09:35:00 +0000 (09:35 +0000)]
* acgeneral.m4 (AC_OUTPUT_COMMANDS_COMMANDS): Renamed as...
(_AC_OUTPUT_COMMANDS): This. All callers changed.
Disable the verbose message until Automake uses the new features
of `config.status'.
Reported by Jim Meyering.
Akim Demaille [Wed, 9 Feb 2000 18:24:24 +0000 (18:24 +0000)]
Fix the handling of `./configure foo=bar' and test it.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, getopt loop): Always define
ac_optarg as the rhs of the first `=', not only on `-.*=', so that
`configure var=val' defines ac_optarg=val.
Improve the robustness to shell special characters:
- Use grep when checking that shell variable names are valid.
- Quote the quotes in ac_optarg before `eval var='$ac_optarg''.
- Quote the quotes when building ac_configure_args.
* tests/torture.m4: Test that `./configure foo=bar' works properly.