Commit Graph

1447 Commits

Author SHA1 Message Date
Akim Demaille
a420def412 * acgeneral.m4 (_AC_INIT_PREPARE, _AC_INIT_PARSE_ARGS): Move more
initializations to...
(_AC_INIT_DEFAULTS): here.
2000-03-21 11:13:50 +00:00
Akim Demaille
bb03a37786 Give a means to compute `srcdir' earlier in configure.
* acgeneral.m4 (_AC_INIT_SRCDIR): New macro, pulled out from...
(_AC_INIT_PREPARE): No longer compute `srcdir'.
(_AC_INIT): Use _AC_INIT_SRCDIR.
(AC_INIT): Don't forget to pass the argument to _AC_INIT.
2000-03-21 10:01:40 +00:00
Akim Demaille
cfc55ad76f * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Rename as _AC_OUTPUT_SUBDIRS.
No argument, use AC_LIST_SUBDIRS.
Adjust callers.
2000-03-21 09:20:40 +00:00
Akim Demaille
197b270708 * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Double quote the head
of the help snippet.
2000-03-21 09:18:31 +00:00
Akim Demaille
264330cef7 Give an identity to `configure' scripts.
* acgeneral.m4 (AC_PACKAGE): New macro.
(_AC_COPYRIGHT_SEPARATOR): Remove.
(AC_COPYRIGHT): Adjust.
(_AC_INIT_HELP, _AC_INIT_VERSION): Name the package you configure
when you want.
(_AC_INIT): Adjust.
* configure.in (AC_PACKAGE): Add.
2000-03-21 09:07:15 +00:00
Jim Meyering
25a01c40c0 . 2000-03-20 11:16:58 +00:00
Jim Meyering
6d877fe7a1 (AC_SYS_LONG_FILE_NAMES): Don't test for existence
of $ac_xdir.  Not only is `test -e' not portable, but the test isn't
necessary at all;  the following mkdir ends up accomplishing the
same goal.  Suggestion from Alexandre Oliva.
2000-03-20 11:16:40 +00:00
Jim Meyering
9785f1af92 . 2000-03-20 11:07:49 +00:00
Jim Meyering
2e4e43be07 (_AC_INIT_PREPARE_ENVIRONMENT) [setting IFS]: Be careful
to use space, tab and new line, in precisely that order.
2000-03-20 11:06:51 +00:00
Akim Demaille
28fadd7df1 * acgeneral.m4: Formatting changes. 2000-03-20 10:35:53 +00:00
Akim Demaille
e140e3ce82 Don't rely on RS = "0" to swallow the whole input as a single
record, this is not portable: mawk and nawk understand it as RS =
"".  gawk understands it as expected.

* autoconf.sh (translate_awk::BEGIN): No longer change RS.
(translate_awk::body): Move to the END.
Instead, accumulate the input in `request'.
2000-03-20 10:30:54 +00:00
Akim Demaille
ded9870204 * doc/autoconf.texi (Testing Values and Files): Be a subsection of
`Portable Shell Programming'.
(Shell Substitutions, Limitations of Usual Tools): New subsections.
2000-03-20 10:10:06 +00:00
Akim Demaille
affebc0e90 Use a single tool to reformat the raw `configure' script output by
m4.
Suggested by Paul Eggert.

* autoconf.sh: Stop playing with 2 seds and an AWK to finalize
`configure', a single AWK program is enough.
2000-03-20 10:06:36 +00:00
Akim Demaille
421c31c674 Add details to a ChangeLog entry 2000-03-17 10:24:06 +00:00
Akim Demaille
aac61512e0 In Autoconf 2.13, although AC_OUTPUT_COMMANDS did double quote its
arguments, AC_OUTPUT arguments 2 and 3 were not!  Currently,
AC_OUTPUT over quotes too: stop that.
Reported by Martin Buchholz.

* doc/autoconf.texi (Output): Don't expand on the ternary
AC_OUTPUT.
* acgeneral.m4 (AC_OUTPUT): Don't over quote $2 and $3.
2000-03-17 10:07:56 +00:00
Akim Demaille
ab542b1f77 * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Security fixes: create
the temp files in a private temporary directory, not directly in
TMPDIR.
2000-03-17 08:40:27 +00:00
Akim Demaille
75b5d70be3 Install the IFS we need once for all.
* acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro.
Handle the NLS envvars, and IFS.
(_AC_INIT_PREPARE): Use it, no longer set the NLS envvars.
(_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS.
* acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES):
Likewise.
2000-03-17 08:37:50 +00:00
Akim Demaille
5b50a54f8f * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_TRY_COMPILE,
AC_TRY_LINK, AC_TRY_RUN_NATIVE): Simplify the removal of the
contest files: don't remove them before running the actions, just
remove them at the end of the macro.
2000-03-17 08:31:49 +00:00
Akim Demaille
6522e14a8f * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use
: ${foo='some words'}
not
  : ${foo=some words}
since this is not portable: Digital Unix v5.0: `bad substitution'.
From Nicolas Joly.
2000-03-16 18:12:58 +00:00
Akim Demaille
7da2f6d008 * libm4.m4 (m4_assert, m4_shiftn): New macros.
(m4_case,m4_match): Rewrite to use m4_shiftn (for readability reasons).
(m4_for): Add the STEP argument and some argument-verifying asserts.
(m4_split): Correct spaces to tabulator in regexp.
2000-03-16 15:17:26 +00:00
Akim Demaille
cbccb222a2 Revamp AC_FUNC_SELECT_ARGTYPES.
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use a single cache
variable instead of three.
Use AC_CACHE_CHECK.
Shorten the name of the var loops, they are no longer cached.
Include sys/types.h unconditionally.
`select' returns an int, fixes Autoconf/46.
Don't display parens in the user messages.
2000-03-15 09:55:21 +00:00
Akim Demaille
dab489eba6 * autoheader.sh: Use run_m4f, not run_m4. 2000-03-14 09:34:42 +00:00
Akim Demaille
583ed252d7 Typos in ChangeLog. 2000-03-14 09:32:11 +00:00
Akim Demaille
134cd844f3 * tests/actest.m4 (AC_ENV_SAVE): Don't consider RANDOM and LINENO
which some shells update.
2000-03-14 08:59:11 +00:00
Akim Demaille
92cd322dc1 * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): No use for @%:@ here,
no need to over quote $1 in the comments.
2000-03-14 08:47:48 +00:00
Akim Demaille
9da44165aa * acgeneral.m4: Replace some ifelse with ifval or m4_default, or
even nothing when not needed.
* acspecific.m4: Likewise.
2000-03-14 08:41:15 +00:00
Akim Demaille
324a1d71da * acgeneral.m4 (_AC_INIT_PREPARE): Insert the Autoconf version in
config.log, and the command line which ran configure.
Kill a couple of useless quote around dollars.
2000-03-14 08:37:27 +00:00
Akim Demaille
073f2c710a * acgeneral.m4 (_AC_INIT_PREPARE): Kill a changequote in the
building of `ac_configure_args'.
2000-03-14 08:34:21 +00:00
Akim Demaille
89bcb6496e * acgeneral.m4 (AC_DIVERT): Rename _AC_DIVERT.
(AC_DIVERT): New macro.
Spread its use where better than a pair of AC_DIVERT_PUSH/POP.
2000-03-14 08:33:21 +00:00
Akim Demaille
870e58847d * acgeneral.m4 (_AC_INIT_BINSH): Remove, useless now that...
(AC_REVISION): Require AC_INIT, not _AC_INIT_BINSH.
(AC_INIT): Do what _AC_INIT_BINSH used to.
Don't require _AC_INIT_VERSION, just call it.
Rename as _AC_INIT.
(AC_INIT): New macro, single expansion wrapper around _AC_INIT.
(_AC_COPYRIGHT_SEPARATOR): New.
(AC_COPYRIGHT): Use it.
Require AC_INIT, not _AC_INIT_VERSION.
* doc/autoconf.texi (Versions): Promote as first section of
`Setup'.
Rename as `Notices'.
Document AC_COPYRIGHT.
Don't give false reasons for placing AC_REVISION before AC_INIT,
the place no longer matters.
2000-03-14 08:32:35 +00:00
Akim Demaille
af8421f6c5 * autoconf.sh (trace_m4::smash): Double quote, we don't want the
result to be evaluated.
2000-03-14 08:30:41 +00:00
Akim Demaille
22e43e84f4 * acgeneral.m4: s/@%:@line __oline__/#line __oline__/g. __oline__
is not a macro, so there is just no use in avoiding `#'.
2000-03-14 08:28:20 +00:00
Akim Demaille
00121046aa * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): When there were no
CONFIG_FILES, we had to expand _AC_OUTPUT_FILES into the KILL
diversion, because it is AC_OUTPUT_FILES which undiverted the
AC_SUBST sed script at its proper place, otherwise it would have
been undiverted at the end of `configure', leading to an sh syntax
error.
Now that we no longer use a diversion, we don't need to call
AC_OUTPUT_FILES if useless.
(AC_OUTPUT_FILES): Rename as _AC_OUTPUT_FILES.
(AC_OUTPUT_LINKS): Rename as _AC_OUTPUT_LINKS.
2000-03-14 08:27:19 +00:00
Akim Demaille
970d30e4c6 Formatting changes. 2000-03-14 08:21:48 +00:00
Akim Demaille
a892defcb3 AC_ARG_PROGRAM must not be expanded twice, which is likely since
Automake calls it, and usually users do too.  If it happens,
`--program-prefix=g' actually prepend two (or more) `g'.

* acgeneral.m4 (AC_DEFUN_ONCE): New macro.
(AC_ARG_PROGRAM): AC_DEFUNed_ONCE.  Or is it AC_DEFUN_ONCE'd? :).
No longer AC_EXPAND_ONCE the help string, the macro itself is
expanded at most once.
Rename the here-doc tag EOF_SED as EOF.
2000-03-14 08:20:25 +00:00
Akim Demaille
fca3f1b6f3 Get rid of the ICMDS diversion.
* acgeneral.m4 (AC_DIVERT): Remove ICMDS.
(_AC_OUTPUT_COMMANDS_INIT): New growing string.
(_AC_CONFIG_COMMANDS_INIT, _AC_OUTPUT_CONFIG_STATUS): Adjust.
2000-03-14 08:19:53 +00:00
Akim Demaille
bd53adc4fc Typo in ChangeLog. 2000-03-14 08:14:41 +00:00
Akim Demaille
72807cc237 * autoheader.sh: Use run_m4f, not run_m4.
* autoheader.sh (syms):
2000-03-14 08:11:55 +00:00
Akim Demaille
29df07981f Introduce AC_SUBST(VAR, VAL).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): Stop global double quoting,
failed experiment.
Merge all the var=val AC_SUBST(var) into AC_SUBST(var, val).
(AC_SUBST): Implement support for 2nd arg.
* doc/autoconf.texi (Setting Output Variables): Adjust.
2000-03-14 08:09:32 +00:00
Akim Demaille
6b95f3a59e Simplify the diversions naming system.
Suggested by Alexandre Oliva and Lars J. Aas

* libm4.m4 (ifndef): New macro.
* acgeneral.m4 (AC_DIVERT): New macro, maps a diversion name to
its value.  The diversions now have a short name, e.g., `NOTICE',
instead of the former macros which had long names, e.g.,
`AC_DIVERSION_NOTICE'.
(AC_DIVERT_PUSH): Adjust.
(AC_DIVERT_POP): Use ifndef.
(AC_DIVERSION_CURRENT): Rename as `AC_DIVERT_DIVERSION' to stay
within the `AC_DIVERT' name domain.
Adjust all callers.
* acspecific.m4: Adjust all callers.
2000-03-13 17:52:26 +00:00
Akim Demaille
3e6fee0e3b * doc/autoconf.texi (Invoking autoconf): Update documentation of
`autoconf --trace'.
2000-03-13 17:39:23 +00:00
Akim Demaille
b07221dd0f Typos in ChangeLog. 2000-03-13 17:32:10 +00:00
Akim Demaille
5c521a0948 * autoconf.sh (tmpbase): New var. Adjust trap code and other tmp
file names.
(translate_awk::BEGIN): Set RS to "0" so that the whole file be a
single record.
(translate_awk::trans): Convert from array to function.
(translate_awk::error): New function.
(translate_awk::main action): Implement support for ${sep}@ and
${sep}*.  Use trans() and error().
(translate_awk): Don't put space before user functions call, it is
not portable.
Remove trailing `;', this is not C :).
(task trace): Quote `$traces' when you eval it, to protect the
white spaces.
Propagate `translate_awk' failures to `autoconf.sh'.
Translate the quadrigraphs.
2000-03-13 17:30:32 +00:00
Akim Demaille
5e6f17e1f2 Trap on 0 is not executed when `exit' is called without argument.
* autoheader.sh (trap 1 2 13 15): s/exit/exit $?/.
* autoconf.sh: Likewise.
Remove translate_awk too.
* autoupdate.sh: Likewise.
Handle `--debug'.
2000-03-13 17:28:06 +00:00
Akim Demaille
c1c5314017 More uniform style is scripts.
* autoheader.sh: s/-eq/=/.
Uniform ordering of variable initializations, option handling.
Don't use quotes where useless (foo=$1, not foo="$1").
Propagate `run_m4' and `run_m4f'.
Use `$0' in --help.
* autoconf.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
* autoupdate.m4: Small bug: at the end `dnl' is disabled, so use
`m4_dnl'.
2000-03-13 17:26:21 +00:00
Akim Demaille
bc37b8f562 Typos in ChangeLog. 2000-03-13 15:31:26 +00:00
Akim Demaille
ebd8a5488d `autoconf --trace': faster.
* autoconf.sh (initialization): New var, new option.
(option loop): When you need an arg, make sure there is one.
(run_m4f): New var, which content is that of the former...
(run_m4): Don't use m4 frozen state files.
Change all callers.
Don't pass AC_LOCALDIR, not documented, and unused.
(task trace): Honor `--verbose' and `--initialization'.
(globally): Send `--verbose' messages in stderr.
Fix random typos.
2000-03-13 15:28:55 +00:00
Akim Demaille
2b2d05addd * acspecific.m4 (AC_PROG_BINSH): Removed. 2000-03-13 15:25:36 +00:00
Akim Demaille
68f71528ef Start revamping `autoconf --trace'.
* autoconf.sh (debug): New var, new option.
Adjust the trap code.
(task trace): Instead of decoding `m4 --trace' with sed, decode it
with m4 itself.
($silent_m4): New file, which disables m4's `errprint'.
($trace_m4): New file.  Logistic for the m4 which is in charge of
decoding the traces of the first.
($translate_awk): Transform a user trace request into $trace_m4
code.
2000-03-13 15:18:20 +00:00
Akim Demaille
64655cb862 Fix typos in ChangeLog. 2000-03-10 16:10:34 +00:00