Commit Graph

140 Commits

Author SHA1 Message Date
Akim Demaille
990ee90231 * autoheader.sh (config_h): Added templates sort. Under NetBSD 1.4.1
/bin/sh `set' command do not return a sorted variables list.
2000-05-03 15:43:40 +00:00
Akim Demaille
49ec438253 Simplify the handling of `acconfig.h'.
* autoheader.sh: No longer try to select the needed paragraphs of
`acconfig.h', just dump everything into `config.h.in'.
Implement support for `--warnings'.
Warn the users that these auxiliary files are obsolete when `-W
obsolete'.
* doc/autoconf.texi (Invoking autoheader): Adjust.
2000-05-03 11:22:50 +00:00
Akim Demaille
cc07253b22 Support of acconfig.h was broken. Fix and test.
Reported by Jim Meyering.

* autoheader.sh: Trace AC_DEFINE and AC_DEFINE_UNQUOTED to build
the list of $syms which are defined.
* tests/tools.m4 (autoheader): New test.
2000-05-03 11:00:46 +00:00
Akim Demaille
27aaac5d86 Don't double quote in AC_MSG_*.
* acgeneral.m4 (_AC_SH_QUOTE): Don't double quote.  Escape the
double quotes too.
(_AC_ECHO_UNQUOTED): Don't double quote :).
(_AC_ECHO, _AC_ECHO_N): Quote the call to _AC_SH_QUOTE.

The autoheader chain needs to be adjusted.

* acgeneral.m4 (AH_VERBATIM): Just pass two arguments to AH_OUTPUT
instead of trying to build what `autoheader' needs: let it handle
the format by itself.
* autoheader.m4: Adjust.
s,tmp/config.h,tmp/config.hin.

The adjustment revealed that `autoconf --trace' is not robust to
single quotes in its argument.

* autoconf.sh: Fix this issue.
Rename the escape `$*' as `$%'.  Implement `$@'.
* doc/autoconf.texi: Adjust.
2000-05-03 08:53:06 +00:00
Akim Demaille
2df476bb0c mawk suffers a severe performance loss when using `sub' with a
changing value.  On the `configure' script of the fileutils:
mawk '{ sub (/foo/, foo++) }'                  -> 14s.
mawk '{ if ($0 ~ /foo/) sub (/foo/, foo++) }'  -> 0.03s.
mawk '{ sub (/foo/, foo) }'                    -> 0.03s.

* autoconf.sh (task script, AWK script): Run `sub (__oline__,
oline)' only in the lines that match `__oline__'.
Suggested by Paul Eggert.
2000-04-28 09:46:55 +00:00
Akim Demaille
87108bf282 * autoconf.sh (options handling::-W*): Strip two leading chars, not
just one.
2000-04-28 09:07:21 +00:00
Akim Demaille
cc748d17e8 Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 08:25:11 +00:00
Akim Demaille
63d0122eb0 * autoscan.pl: Reindent using 2 spaces, not 4.
Use `#' to denote Autoconf comments, not `dnl'.
Put a few `' here and there to avoid misfontification and
misindentation.
Use your base name when reporting errors.
(parse_args::usage): Use $0, use the same order as the other
executables.
(parse_args): Don't dump `--help' on cmd line errors.
2000-04-11 12:06:12 +00:00
Akim Demaille
e727a08732 * autoheader.sh: Catch up with the `mktemp -d' changes in
autoconf.sh.
* autoupdate.sh: Likewise.
2000-03-31 08:20:09 +00:00
Akim Demaille
af8eb3314f Rewrite the autoheader chain on top of `autoconf --trace'.
* autoheader.m4: Dispatch the prototypes next to there AC_
siblings.
(AH_TEMPLATE, AH_VERBATIM): Move to...
* acgeneral.m4: here.
(AH_OUTPUT): New macro.
* autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'.
* autoheader.m4: Remove.
* Makefile.am: Adjust.
* tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense.
* tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by
the test above.
2000-03-29 16:48:00 +00:00
Akim Demaille
8e30614b9a silent.m4 depends upon the current quotation in m4, which changes
if `-i' is used or not.

* autoconf.sh (trace::silent.m4): Removed.
(trace::run_m4_trace): Pass -Derrprint.
2000-03-29 16:18:52 +00:00
Akim Demaille
d629254b79 Fix the call to umask in the previous checkin. 2000-03-29 16:15:22 +00:00
Akim Demaille
15fc2d9ecb Use `mktemp -d' when possible to create securely a tmp work dir.
* autoconf.sh: Use it when possible to create the dir $tmp.
Stop using variables for tmp files, use their names in $tmp.
[install]: Use the new features of autoconf --trace.
2000-03-29 11:09:59 +00:00
Akim Demaille
9a26587828 * autoconf.sh (trace): Let translate_awk do the whole translation
from `$trace' to the m4 program.
2000-03-27 12:19:01 +00:00
Akim Demaille
4b6a9f36ba * autoconf.sh (translate_awk): `> "/dev/stderr"' is not portable
to systems without a real /dev/stderr in the file system or if not
using one of the three free awks.  Use
print message | "cat >&2"
...
END { close("cat >&2") }
From Aharon Robbins.
2000-03-25 09:17:40 +00:00
Akim Demaille
f684a9be3d * autoheader.sh (checking completeness): Be ready to recognize
patterns with a value, and spaces between `#' and the directive, e.g.
# define FOO FIXME:
Reported by John Fortin.
2000-03-25 09:16:53 +00:00
Akim Demaille
424aa5a02f * autoconf.sh (task trace): Pipe the output of the first m4 into
the second one, instead of saving to a tmp file, so that we can
trace endless configure.in expansion.
2000-03-21 12:06:30 +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
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
dab489eba6 * autoheader.sh: Use run_m4f, not run_m4. 2000-03-14 09:34:42 +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
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
Jim Meyering
f590fb6249 Use rm -f', not just rm' when removing temporaries.
Preserve exit status in trap handler.
Based on suggestions from Paul Eggert.
2000-03-04 08:46:31 +00:00
Akim Demaille
c33696519a Move the quadrigraphs out of the user name space.
* acgeneral.m4: 's/@BKL@/@<:@/g', 's/@BKR@/@:>@/g',
's/@DLR@/@S|@/g', 's/@PND@/@%:@/g'.
* acspecific.m4: Likewise.
* autoconf.sh: Likewise.
2000-03-03 14:25:03 +00:00
Akim Demaille
f765eb228e * autoscan.pl (parse_args): Add support for -m <macrodir>. 2000-03-02 18:25:34 +00:00
Akim Demaille
ab07ba8e08 The whole family supports -V = --version.
* acgeneral.m4 (AC_INIT_PARSE_ARGS): Report and support -V.
* autoconf.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoheader.sh: Likewise.
* autoscan.pl: Likewise.
* ifnames.sh: Likewise.
In addition, don't dump --help on invalid options.
* doc/autoconf.texi: Adjusted.
* doc/install.texi: Likewise.
2000-03-02 18:17:26 +00:00
Akim Demaille
4cab1fd7fe * autoconf.sh (AC_ACLOCALDIR): Use (aclocal) 2>/dev/null, not
`aclocal 2>/dev/null` if you want no complains for missing
aclocal.
From Nicolas Joly.
2000-02-24 18:25:03 +00:00
Akim Demaille
86b8b0de15 autoreconf had a silly syntax error, test it and fix it.
Reported by Franc,ois Pinard and Rainer Orth.

* autoreconf.sh: Removed spurious `;;'.
Formatting changes.
* tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the
shell scripts.
2000-02-15 09:15:22 +00:00
Akim Demaille
7920aff8d2 * autoconf.sh (options handling): --v* of --version was shadowing
--verbose.
2000-02-15 09:10:23 +00:00
Akim Demaille
920939e349 Don't use `cat -s' to single out new-lines, it is not portable.
Also remove trailing blanks.

* tests/Makefile.am (testsuite): Use sed instead of cat.
* tests/torture.m4: No longer check for a trailing space.
* autoconf.sh: Likewise.
2000-02-11 08:59:52 +00:00
Akim Demaille
81b33dc801 * autoheader.sh: Remove the duplicate trap code. 2000-02-10 16:27:35 +00:00
Akim Demaille
a9628b9e93 Interrupting autoheader left temp files.
From Jim Meyering.

* autoheader.sh (usage): The usage is to use $0 here.
(ah_base): Be in TMPDIR.
Install the `trap' before creating the first tmp file.
Also trap on 0.
2000-02-10 13:12:04 +00:00
Akim Demaille
b62028d508 * autoheader.sh (debug): Initialize to `false', not 0. 2000-02-08 17:23:25 +00:00
Akim Demaille
ed706fc1bf * autoupdate.sh: Don't dump --help on --wrong-option.
* autoconf.sh: Reformating, and use >&2 instead of 1>&2.
* autoreconf.sh: Likewise.
* autoheader.sh: Likewise.
2000-02-08 13:45:24 +00:00
Akim Demaille
0ba85ee10a Clean up autoconf.
* autoconf.sh: Minor reorganizations to clearly separate the
prologue, which is almost common to all the shell scripts of
Autoconf, and the body.
2000-02-08 13:12:49 +00:00
Akim Demaille
a443a89e84 Clean up a bit the user interface.
* autoconf.sh: Give your name while reporting errors.
Don't spit --help for errors on arguments.
* autoreconf.sh: Likewise.
* autoheader.sh: Likewise.
More temporary files that one can browse when debugging.
Don't ${var}, just $var.
Don't dump --help when the arguments are invalid.
(config_h): Use the empty value instead of `undefined' to check
that it is defined.
* acspecific.m4: Formatting changes.
2000-02-08 11:39:46 +00:00
Akim Demaille
00f447ee06 * acspecific.m4 (AC_C_INLINE): Proceed as for AC_C_CONST:
condition out the test case if __cpluscplus.
Don't document the autoheader template twice, one is enough.
* autoheader.m4 (AC_CONFIG_HEADER): don't hook on this guy, but
on...
(AC_CONFIG_HEADERS), since the former is defined on the latter.
2000-02-07 15:39:16 +00:00
Akim Demaille
ddfcae90fa 1999-11-10 Akim Demaille <akim@epita.fr>
* autoconf.sh: Formatting changes.
	Removed development junk.
	* acspecific.m4: Formatting changes.
	* autoconf.m4: Likewise.
	* autoheader.m4: Likewise.
2000-01-29 11:37:48 +00:00
Akim Demaille
a8b1835003 1999-11-10 Akim Demaille <akim@epita.fr>
Make autoconf support --install.

	* autoconf.sh (task install): New task.  Extract the set of
	auxiliary m4 files a configure.in depends upon.  Install links
	from library files to the local dir so that the packages depends
	only on local extensions.  Check that the user includes exactly
	the files she needs.
2000-01-29 09:54:27 +00:00
Akim Demaille
a47826499c 1999-11-10 Akim Demaille <akim@epita.fr>
Require GNU m4 1.4 (well 1.3 in fact).

	Because we are ready to handle the case where there are no frozen
	files, we *have* to pass a -I, which is dangerous in conjunction
	with the silent including of `aclocal.m4': you may include things
	that were not expected.  Since anyway handling pre 1.3 complicates
	the task, just require an m4 which supports reloading of frozen
	files.

	* acspecific.m4 (AC_PROG_GNU_M4): Check for --reload.
	* autoconf.sh: Likewise
	* autoheader.sh: Likewise.
	* configure.in: Explicitly state the m4 version you want.
2000-01-29 09:51:17 +00:00
Akim Demaille
394a96e50d 1999-11-10 Akim Demaille <akim@epita.fr>
No need for foo="`bar`", foo=`bar` is fine.
	Simplify ${foo} and ${1} into $foo and $1.

	* acgeneral.m4 (ac_LF_and_DOT): Remove the double quotes.
	* acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O): Likewise.
	* autoconf.sh: Likewise.
	* autoheader.sh: Likewise.
	* autoreconf.sh: Likewise.
	* autoupdate.sh: Likewise.
	* ifnames.sh: Remove all the code and messages related to
	AC_MACRODIR, since ifnames is not related to macros in anyway.
2000-01-29 09:46:28 +00:00
Akim Demaille
48b898876a 2000-01-29 Akim Demaille <akim@epita.fr>
* autoheader.sh: No longer rely on a system acconfig.h.
2000-01-29 09:24:30 +00:00
Akim Demaille
13692cadbc 1999-11-01 Akim Demaille <akim@epita.fr>
Be kind to Automake: list the arguments of selected macros
	(for instance AC_SUBST will list each variable which may be
 	substitued).

	* autoconf.sh (--trace, --output): New options.
	Implement tracing of macros.
	trap also on 0, so that there is no need to rm here and there.
	* autoconf.texi (Output): Document --trace and --output.
2000-01-29 09:22:53 +00:00
Akim Demaille
d2750f1138 1999-10-31 Akim Demaille <akim@epita.fr>
Fix the --version of all the executables.

	* Makefile.am (editsh, editpl): Substitute also PACKAGE and
	VERSION.
	* autoconf.sh (version): New string.
	(--version): Use it.
	(--help) Output on stdout, not stderr.
	* autoheader.sh: Likewise.
	* autoreconf.sh: Likewise.
	* autoscan.pl: Likewise.
	* autoupdate.sh: Likewise.
	* ifnames.sh: Likewise.
2000-01-10 10:11:57 +00:00
Akim Demaille
ecb19983da 1999-10-31 Akim Demaille <akim@epita.fr>
Perform a better checking for missing templates in autoheader.

	* autoheader.m4 (AH_HOOK): When hook AC_FOO on AH_FOO, define the
	new AC_FOO to be the expansion of both AH_FOO *and* AC_FOO.  See
	its definition for the motivations.

	* autoheader.m4 (AH_FUNC_ALLOCA): Remove the now useless
	additional templates.
2000-01-10 10:06:51 +00:00
Akim Demaille
de65ecc7bb 1999-10-31 Akim Demaille <akim@epita.fr>
* autoconf.sh (Looking for bugs): In addition to AC_, match AH_
	and AM_.
1999-12-20 12:10:47 +00:00
Ben Elliston
7e49021235 * Merged from the experimental branch. 1999-10-30 14:17:20 +00:00