Commit Graph

86 Commits

Author SHA1 Message Date
Paul Eggert
f27d2995ab (AS_SHELL_SANITIZE): Use AS_UNSET instead
of rolling our own unset.
(_AS_PREPARE): $as_unset CDPATH instead of AS_UNSETting it, since
in practice we needn't worry about CDPATH if unset doesn't work.
2002-08-31 05:48:04 +00:00
Paul Eggert
a8ead8a326 (_AS_PATH_SEPARATOR_PREPARE):
Use PATH="/nonexistent;.", not PATH=".;.", as FreeBSD ksh2002
apparently treats PATH="nonexistent" as if it contained ".".
Bug reported by Stefan `Sec' Zehl.
2002-07-23 22:17:19 +00:00
Paul Eggert
dd756ac977 Minor spelling and grammar fixes. 2002-04-20 06:09:01 +00:00
Akim Demaille
ac07b92899 Comment changes. 2002-04-10 17:36:45 +00:00
Akim Demaille
9d658eddd9 * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh
workaround for ${1+"$@"}.
* doc/autoconf.texi (Shell Substitutions): Explain it.
From Oliver Kiddle and Peter Stephenson.
Have M4sh perform minimal shell sanitizing.
* lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*'
part into...
(_AS_PREPARE): this new macro.
(AS_PREPARE): New.
(AS_INIT): Invoke AS_SHELL_SANITIZE.
* tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE.
Adjust Autoconf and Autotest.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke
AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
Invoke _AS_PREPARE (not AS_PREPARE) in addition to
AS_SHELL_SANITIZE.
Use this M4sh to generate Autoconf's shell scripts.
* tests/wrapsh.as: New, precursor of wrapsh.in.
* tests/Makefile.am: Include lib/freeze.mk to get the dependencies
on Autotest and M4sh.
($(TESTSUITE)): Use $(autotest_m4f_dependencies).
(wrapsh.in): New target.
* bin/autoconf.as: New, precursor of autoconf.in.
(autoconf.in): New target.
2002-04-10 15:58:19 +00:00
Andreas Schwab
193f800800 * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Only simplify if path
contains no literal separators.
2002-04-04 13:35:05 +00:00
Akim Demaille
3aec90e1cb * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke
_AS_MKDIR_P_PREPARE.
2002-04-02 15:14:09 +00:00
Paul Eggert
4f473142a8 (_AS_BASENAME_PREPARE): New macro.
(AS_SHELL_SANITIZE): Invoke it.
(AS_BASENAME): AS_REQUIRE it, and use $as_basename.
2002-03-27 20:33:03 +00:00
Akim Demaille
3168ea4c07 * doc/autoconf.texi (Introduction): The GNATS base moved. 2002-03-26 09:19:51 +00:00
Paul Eggert
b07b6a5b8e (_AS_LINENO_PREPARE): Unset ENV and BASH_ENV when reinvoking the
shell, to work around problems with installers who put strange things
like "cd" commands in their environments.
2002-03-22 05:35:53 +00:00
Paul Eggert
8064dd81b2 (_AS_MKDIR_P_PREPARE): New macro.
(AS_MKDIR_P): Require it.  Use mkdir -p if available, falling
back on AS_DIRNAME to compute prefixes otherwise; this is
roughly what mkinstalldirs does.  That way, we need not have
our own filename disassembler.  The old disassembler did not
work with Solaris 8 dtksh, which is ksh Version M-12/28/93d.
2002-03-19 06:23:15 +00:00
Akim Demaille
782c620d3b * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): AS_REQUIRE, not
m4_require.
2002-03-12 16:08:01 +00:00
Akim Demaille
0913170fae Fix Autoconf PR/209.
Also reported by Frank Denis.
* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Don't over quote.
2002-02-07 15:49:31 +00:00
Akim Demaille
b0f1186048 Implement `autom4te --freeze'.
* bin/autom4te.in (&freeze): New.
* lib/autoconf/autoconf.m4, lib/autotest/general.m4,
* lib/m4sugar/m4sh.m4: Don't include files given by autom4te.
2002-02-05 08:12:46 +00:00
Akim Demaille
fa91df12dd * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Use PATH_SEPARATOR.
(_AS_PATH_SEPARATOR_PREPARE): Don't expect $SHELL to be
Bourne. Use /bin/sh.
From Andreas Buening.
2002-01-24 17:53:52 +00:00
Paul Eggert
e39b2117e3 (AS_SHELL_SANITIZE): _AS_CR_PREPARE needs to be invoked before
_AS_LINENO_PREPARE.

(_AS_LINENO_PREPARE): Use as_cr_digits and as_cr_alnum rather than
character ranges.
2001-11-01 22:41:54 +00:00
Paul Eggert
9fe512db2b (AS_SHELL_SANITIZE): Fix NLS before invoking AS_BASENAME. Set the
locale variables to 'C' if possible, as POSIX requires this to get the
traditional behavior.
2001-11-01 19:44:57 +00:00
Paul Eggert
0dfeb49d8e (_AS_LINENO_WORKS): Do not surround body with {}, as that triggers a
bug in Bash 2.05.
2001-10-31 20:07:48 +00:00
Paul Eggert
4c359a4349 (_AS_LINENO_PREPARE): Use Sed rather than Awk. Fix the sed prepass to
work even if there are multiple instances of $LINENO on the same line.
Do not substitute for other variables like $LINENOT.  Do not check
file dates; such a check is unreliable on sufficiently fast machines,
and removing the check makes the code simpler and more reliable.
Check for output and chmod failures.
2001-10-31 19:23:37 +00:00
Paul Eggert
a4cb525873 (_AS_LINENO_WORKS): New macro.
(_AS_LINENO_PREPARE): Use it instead of shell eval, since
eval $LINENO is not portable in practice.
2001-10-26 19:52:43 +00:00
Paul Eggert
4d264d5a3e (as_me): Shell-quote the argument of AS_BASENAME, in case $0 contains
white space.
2001-10-19 00:20:03 +00:00
Paul Eggert
f99f108748 (AS_DIRNAME): Use 'dirname' if that works.
(AS_BASENAME_EXPR): New macro.
(AS_BASENAME_SED): Do not assume GNU sed semantics.
(AS_BASENAME): Use 'basename' if that works; then try 'expr';
and fall back on 'sed' only if the other two fail.  This makes
AS_BASENAME act more like AS_DIRNAME.
2001-10-18 23:43:52 +00:00
Akim Demaille
6710e125c4 * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): m4_defun, not
m4_define, since...
(_AS_ECHO_N): AS_REQUIREs it.
2001-10-10 12:59:27 +00:00
Akim Demaille
141b85d788 * lib/autoconf/autoconf.m4, lib/autoconf/general.m4,
* lib/autoconf/libs.m4, lib/autoconf/status.m4,
* lib/autoconf/types.m4, lib/autotest/general.m4,
* lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, tests/atspecific.m4,
* tests/torture.at: Rename m4_regexp, m4_patsubst, and m4_match to
m4_bregexp, m4_bpatsubst, and m4_bmatch.
* doc/autoconf.texi (Redefined M4 Macros): Adjust.
2001-10-08 08:22:33 +00:00
Akim Demaille
dda641324f * lib/m4sugar/m4sh.m4: Use AS_REQUIRE. 2001-10-08 08:22:09 +00:00
Akim Demaille
0717332aed * lib/m4sugar/m4sh.m4 (AS_DIRNAME_EXPR): Use AS_REQUIRE.
* tests/tools.at (AT_DATA_FORBIDDEN): Rename/move/duplicate to...
* tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH): here.
* tests/tools.at, tests/m4sh.at: Use it.
* tests/m4sh.at: Don't rely on Autoconf macros.
(DIRNAME_TEST): Also exercise the expr variant.
* tests/m4sugar.at, tests/atspecific.m4 (AT_CHECK_M4SUGAR): The
preferred M4sugar extension is now `.4s'.
* tests/README: Remove.
2001-10-08 08:21:54 +00:00
Akim Demaille
201baaa8df * lib/m4sugar/m4sugar.m4 (m4_provide_ifelse): Rename as...
(m4_provide_if): this.
* lib/m4sugar/m4sh.m4 (AS_REQUIRE): New.
* lib/autoconf/general.m4 (AS_DEFUN, AC_DEFUN_ONCE, AC_BEFORE)
(AC_REQUIRE, AC_PROVIDE, AC_PROVIDE_IFELSE): Be exact copy of the
M4sugar peer, i.e., drop the `AC_PROVIDE_$1' broken marker.
2001-10-08 08:21:34 +00:00
Akim Demaille
8e048c0492 * lib/autoconf/general.m4 (_m4_divert(BODY)): Move to...
* lib/m4sugar/m4sh.m4: here.
(AS_INIT): Push the BODY diversion, set the #! /bin/sh line.
* lib/autoconf/general.m4 (AC_PLAIN_SCRIPT) : Remove.
(AT_INIT): Replace AC_PLAIN_SCRIPT with AS_INIT invocation,
include handle the m4_pattern_*, no longer push the
BODY diversion nor set the /bin/sh line, AS_INIT does it.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* tests/base.at: Adjust the tests to use AS_INIT.
* tests/tools.at (AT_DATA_FORBIDDEN): New.
(autoconf: forbidden tokens): Adjust to work on M4sh instead of
Autoconf.
2001-10-08 08:20:59 +00:00
Paul Eggert
03b5875793 (_AS_LINENO_PREPARE): If the current shell does not support LINENO,
and if CONFIG_SHELL is unset or empty, and if we can find a shell that
does support LINENO, then set CONFIG_SHELL to that shell and then
re-execute ourselves with CONFIG_SHELL.
2001-10-08 04:10:32 +00:00
Akim Demaille
41da374f67 * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Look in the path
iff we are a bareword.
Reported by Raja R Harinath.
2001-10-05 17:46:46 +00:00
Akim Demaille
a7b9f60081 * tests/m4sh.at (LINENO): New.
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Be sure to set
PATH_SEPARATOR before using it.
Fix the absolute path case/esac pattern.
Provide $0 as fallback for as_myself.
Reported by Raja R Harinath.
2001-10-05 16:12:22 +00:00
Akim Demaille
b3594d53cb * Makefile.am, config/Makefile.am, lib/emacs/Makefile.am,
* m4/Makefile.am, man/Makefile.am: Add/adjust MAINTAINERCLEANFILES.
2001-10-05 16:12:06 +00:00
Akim Demaille
42b48aec23 * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use a portable
combination of Awk and sed to replace $LINENO.
2001-10-04 15:24:31 +00:00
Paul Eggert
79d702d8bc (AS_SHELL_SANITIZE): "source" -> ".", for compatibility with POSIX shells. 2001-10-02 23:14:30 +00:00
Akim Demaille
a89e34ea3d * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Just source 40.lineno
instead of exec'ing to preserve $0 and $@.
2001-10-02 14:37:07 +00:00
Akim Demaille
fa75ee4b94 * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix bugs spotted by
Raja R Harinath:
Be sure to detect when $LINENO always returns the same value.
Look for the original script, basename($0) is certainly not
enough.
Pass the CLI arguments to `$as_me.lineno'.
2001-09-27 08:27:55 +00:00
Akim Demaille
a9bd52773e Rely on $LINENO' when possible instead of __oline__'.
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Provide some form of
`$LINENO' support replacement when not supported.
(_AS_CR_PREPARE, _AS_TR_CPP_PREPARE, _AS_TR_SH_PREPARE): Invoke
them explicitly to be sure they are not output before this section
(via m4_require).  Cosmetic only.
* lib/autoconf/c.m4, lib/autoconf/general.m4,
* lib/autoconf/programs.m4: Replace all the occurrences of
`__oline__' with `$LINENO'.
* doc/autoconf.texi (Special Shell Variables): Document LINENO.
2001-09-22 15:20:44 +00:00
Tim Van Holder
1422430f54 Default CDPATH to $PATH_SEPARATOR, not ':'. 2001-09-20 15:51:04 +00:00
Akim Demaille
bfa90014d7 * tests/m4sh.at: Ensure that AS_DIRNAME handles '/', '//' and '///'
correctly.
Add test for AS_BASENAME.
* lib/m4sugar/m4sh.m4: Fix AS_BASENAME so that it passes the previous
added test. It now correctly handles /1/2/3/, returning '3' not ''.
Added AS_BASENAME_SED to make the interface the same as AS_DIRNAME.
* tests/base.at: Fixed the expected responses. The old ones were
one line out...
* lib/autoconf/general.m4: Fixed AC_PREFIX_PROGRAM, it now behaves as
the documentation claims it should (and how it behaved in 2.13).
2001-09-18 12:26:36 +00:00
Akim Demaille
fcd2734d6a * lib/m4sugar/m4sugar.m4 (_AS_QUOTE_IFELSE, _AS_BOX_INDIR): Use
m4_match.
(m4_re_escape): New.
* lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER): Use it.
* lib/autoconf/general.m4 (AC_CACHE_SAVE): Use m4_match.
* lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER, AC_CONFIG_LINKS):
Likewise.
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P)
(_AC_CHECK_TYPE_MAYBE_TYPE_P, AC_CHECK_MEMBER): Likewise.
* lib/autotest/general.m4 (AT_INIT): Rename AT_TESTS_ALL as
AT_tests_all for consistency.
Set at_victims.
(AT_VICTIMS): Similar to AT_KEYWORDS.
(_AT_CLEANUP_FILE_IF): Use m4_match and m4_re_escape.
2001-09-13 06:57:29 +00:00
Akim Demaille
b13885b690 * lib/autotest/general.m4 (AT_INIT): Create and remove
`$as_me.[0-9]+' instead of `debug-[0-9]+.sh', so that multiple
test suites can cohabit.
2001-09-13 06:57:01 +00:00
Akim Demaille
5216ece6a8 Test suites can be run independently of configure.
* lib/m4sugar/m4sh.m4 (_AS_ECHO, _AS_ECHO_N_PREPARE): New.
* lib/autoconf/programs.m4 (_AC_PROG_ECHO): Remove.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust: AC_SUBST
ECHO_N etc.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't ask for at_n
and at_c.
* lib/autotest/general.m4: Use ECHO_*.
2001-09-13 06:56:31 +00:00
Akim Demaille
4494f57cd6 * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't pass
PATH_SEPARATOR, let M4sh compute it.
* lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): New.
* lib/autoconf/programs.m4 (AC_SHELL_PATH_WALK): Use PATH_SEPARATOR.
Move to...
* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Here.
Simplify when the path is not a literal.
(AS_UNAME): Use it to report PATH.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Remove.
(_AC_INIT_DEFAULTS): AC_SUBST PATH_SEPARATOR.
* lib/autoconf/programs.m4 (AC_PROG_INSTALL): Use _AS_PATH_WALK.
* lib/autotest/general.m4 (AT_INIT): Use _AS_PATH_WALK to
normalize the path, and to look for victims.
* tests/semantics.at (AC_PATH_PROG & AC_PATH_PROGS)
(AC_CHECK_PROG & AC_CHECK_PROGS): Use PATH_SEPARATOR.
2001-09-10 07:17:41 +00:00
Akim Demaille
c7ae939c1d Move toward possibly stand-alone test suites.
* lib/autotest/general.m4: Stop displaying srcdir everywhere as,
in addition, it introduces useless differences in logs.
(AT_INIT): Let atconfig and atlocal be both optional.
Adjust PATH computation.
* lib/m4sugar/m4sh.m4 (AS_UNAME): More readable display of PATH.
2001-09-07 07:20:26 +00:00
Akim Demaille
d5c038a64b testsuite.log should include config.log.
* lib/autotest/autotest.m4: New.
* lib/autotest/general.m4, tests/atspecific.m4:	Adjust.
* tests/suite.at : Adjust.
(AT_INIT): Log config.log.
* lib/m4sugar/m4sugar.m4 (m4_text_box): New.
* lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Adjust.
* lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Use them.
(_AC_INIT_PREPARE): Fix the incredibly messy and buggy completion
of config.log on traps.
(_AC_OUTPUT_CONFIG_STATUS): Use AS_BOX.
Use consistently `_ACEOF' for configure's here docs, and `_CSEOF'
for config.status'.
Open the log as soon as possible.
Use the same log introduction as configure's.
2001-08-27 07:03:48 +00:00
Akim Demaille
ebca389eda * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Fail if fails.
* lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Adjust.
(AC_SITE_LOAD): Better logging of config.site.
2001-08-22 06:24:29 +00:00
Akim Demaille
e0c375ab26 Let M4sh have its own diversions.
* lib/autoconf/general.m4 (_m4_divert(BINSH), _m4_divert(REVISION))
(_m4_divert(NOTICE)): Rename as...
* lib/m4sugar/m4msh.m4 (_m4_divert(BINSH), _m4_divert(HEADER-REVISION))
(_m4_divert(HEADER-COMMENT)): these.
(_m4_divert(HEADER-COPYRIGHT), _m4_divert(HEADER-COPYRIGHT)): New.
(_m4_divert(NOTICE)): New, for Libtool.
* lib/autoconf/general.m4 (_m4_divert(PREPARE)): Remove, replaced
long ago with `_m4_divert(GROW)'.
(AC_COPYRIGHT, AC_REVISION, _AC_INIT_NOTICE): Adjust.
2001-08-20 14:44:48 +00:00
Akim Demaille
b21ca4dd20 * acfunctions.m4: Rename as...
* lib/autoconf/functions.m4: this.
* acgeneral.m4: Rename as...
* lib/autoconf/general.m4: this.
* acheaders.m4: Rename as...
* lib/autoconf/headers.m4: this.
* aclang.m4: Rename as...
* lib/autoconf/lang.m4: this.
* acoldnames.m4: Rename as...
* lib/autoconf/oldnames.m4: this.
* acspecific.m4: Rename as...
* lib/autoconf/specific.m4: this.
* actypes.m4: Rename as...
* lib/autoconf/types.m4: this.
* autoconf.m4: Rename as...
* lib/autoconf/autoconf.m4: this.
* m4sugar.m4: Rename as...
* lib/m4sugar/m4sugar.m4: this.
* m4sh.m4: Rename as...
* lib/m4sugar/m4sh.m4: this.
* tests/atgeneral.m4: Rename as...
* lib/autotest/general.m4: this.
* acfunctions: Rename as...
* lib/autoscan/functions: this.
* acheaders: Rename as...
* lib/autoscan/headers: this.
* acidentifiers: Rename as...
* lib/autoscan/identifiers: this.
* aclibraries: Rename as...
* lib/autoscan/libraries: this.
* acmakevars: Rename as...
* lib/autoscan/makevars: this.
* acprograms: Rename as...
* lib/autoscan/programs: this.
2001-08-01 13:46:22 +00:00
Akim Demaille
45929722e1 Let autoconf use autom4te to create configure.
* autoconf.in ($automate): New var.
(task script): Use autom4te.
* autom4te.in (File::Spec): Use it.
(&find_file): New.
(&parse_args): --warning is -W, not -w.
Find the top level files.
(&handle_m4): Pass the warnings flags.
Don't report verbosely m4's failures, unless requested.
(&handle_output): Don't complain for forbidden tokens in comments.
Be sure to report all the forbidden tokens within a single line.
(&trace_format_to_m4): Preserve `$_'.
(&handle_traces): Sort the output macros.
(&up_to_date_p): Find the files before trying to get its time stamp.
2001-07-24 08:57:55 +00:00
Akim Demaille
21c5ee474b ./configure --program-suffix=foo produces `transform=s,$$,foo,;',
but some sed choke on multiple `;', and other tools (e.g.,
Automake), include the separator themselves.
* acgeneral.m4 (AC_ARG_VAR): Be sure not to leave extra `;'.
2001-06-21 09:18:16 +00:00