Commit Graph

311 Commits

Author SHA1 Message Date
Pavel Roskin
21ca8441bc * autoconf.sh: If the "allowed" pattern is not defined set it
to "^$".
* tests/tools.at (autoconf: forbidden tokens, basic): New test.
(autoconf: forbidden tokens): Renamed to ...
(autoconf: forbidden tokens, exceptions): ... this.
2000-12-15 19:23:16 +00:00
Pavel Roskin
7173ba3da5 * autoscan.pl (init_tables): Allow spaces on the right hand side
in autoscan tables. Die if there are no spaces at all.
(scan_c_file): Use b instead of W so that keywords match at
the beginning and the end of the line.
(scan_sh_file): Likewise.
(scan_makefile): Likewise. Use B to match before `-l'.
(output): Suggest AC_CONFIG_HEADER if any C/C++ sources are
found.
* acidentifiers: Update macros for structure members st_blksize
and st_rdev.
2000-12-12 12:45:41 +00:00
Akim Demaille
9eb6e4e204 The SunOS' egrep fails to process properly the `egrep' invocations
of the test suite.
* tests/aclocal.m4 (AC_STATE_SAVE): If egrep fails, remove the
output file.
* tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't check `state-*'
if the files are not present.
* m4sugar.m4 (m4_join): Rename as...
(m4_smash): this.
* tests/aclocal.m4 (join): Move as...
* m4sugar.m4 (m4_flatten): this.
* autoconf.sh (trace.m4): Rename m4_smash as m4_flatten.
2000-12-06 14:05:46 +00:00
Akim Demaille
83e4065f15 * autoconf.sh (task trace): s/m4/$M4/.
* autoheader.sh: When loading trace.sh, catch errors and exit with
a decent error message.
* tests/tools.at: Be sure to test autoconf --trace before
autoheader.
2000-12-06 10:53:58 +00:00
Akim Demaille
e43386442e * m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 08:58:13 +00:00
Akim Demaille
5eb1d8aeb6 POSIX doesn't require s/[^/]// to work.
From Paul Eggert and Johan Danielsson.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>:
Reorganize.  Document this issue.
* autoupdate.sh (dir): Use `,' as separator instead of `/'
* autoreconf.sh: Likewise.
* autoupdate.sh: Ditto.
2000-11-16 10:12:50 +00:00
Akim Demaille
e62a041a2f Provide a means for escaping the forbidden patterns test.
* tests/tools.at (Forbidden tokens): Test m4_token_allow.
* m4sugar.m4 (m4_file_append, m4_token_allow): New macros.
* autoconf.sh (task script): Pass `tmp' and `verbose' to
finalize.awk.
(finalize.awk::check_patterns): Eve out from the body.
(finalize.awk): Read `$tmp/tokens_allowed', and don't complain for
these exceptions.
2000-11-16 08:33:46 +00:00
Pavel Roskin
fddcd13579 * autoscan.pl (scan_files): Eliminate a warning if no C files
are found.
(output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES
instead of old-style arguments for AC_INIT and AC_OUTPUT.
2000-11-10 15:49:15 +00:00
Pavel Roskin
603fad0c9c * autoconf.sh: Temporarily disable recognizing of abbreviated
long options - it's hard to maintain them by hand.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
2000-11-07 17:58:43 +00:00
Akim Demaille
f1ba26c218 * tests/tools.at (unexpanded macros): Strengthen.
* autoconf.sh (finalize.awk): Use `sub' instead of `index' +
`substr'.
More comments.
2000-11-03 15:08:28 +00:00
Pavel Roskin
48f158e039 * ifnames.sh: Put the opening brace on the same line with
patterns. Reported by Paul Martinolich.
        * tests/tools.at (AWK portability): Check ifnames.
        (ifnames): New test for ifnames.
        * THANKS: Updated.
2000-11-02 17:03:32 +00:00
Akim Demaille
5b4f860940 * autoconf.sh (trace.m4): Move all the M4 builtins into `at_'.
Catch the failures of the big pipe.
2000-11-02 16:03:58 +00:00
Akim Demaille
ff03218ac3 * tests/tools.at (Tracing M4 builtins): New test.
* autoconh.sh (trace_format): Fix its computation.
2000-11-02 15:32:23 +00:00
Akim Demaille
648bf798eb * autoconf.sh (task trace) [debug]: Instead of a long pipe, extend
trace.m4.
2000-11-02 15:06:02 +00:00
Akim Demaille
2353e0d366 * m4sugar.m4 (popdef, pushdef): Rename as...
(m4_popdef, m4_pushdef): these.
Adjust dependencies.
* acgeneral.m4: Adjust.
* aclang.m4: Likewise.
* autoconf.m4 (popdef, pushdef): Reactivate them.
2000-11-02 14:12:18 +00:00
Pavel Roskin
33de71ca28 * autoconf.sh: Using trap-safe "exit".
* autoreconf.sh: Likewise.
        * autoupdate.sh: Likewise.
        * tests/base.at: Use AS_EXIT instead of exit in configure.in.
        * tests/m4sh.at: Likewise.
        * tests/semantics.at: Likewise.
2000-11-01 19:57:54 +00:00
Akim Demaille
701a1dde55 GNU M4 1.4 improperly handle the traces of copies of builtins.
* autoconf.sh (task trace): When tracing `BUILTIN' also trace
`m4_BUILTIN'.
2000-11-01 17:02:34 +00:00
Pavel Roskin
a63489da61 * autoconf.sh: Typo: s/m4__warnings/m4_warnings/. 2000-11-01 15:01:54 +00:00
Akim Demaille
82756f7543 Move the handling of classified warnings into M4sugar.
* m4sugar.m4 (m4_diagnose): Remove.
(m4_warning): New.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_WARNING_IFELSE)
(_AC_WARNING_ERROR_IFELSE, __AC_WARNING_ERROR_IFELSE)
(_AC_DIAGNOSE, AC_DIAGNOSE): Rename as...
* m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse)
(_m4_warning_error_ifelse, __m4_warning_error_ifelse)
(_m4_warn, m4_warn): these.
* acgeneral.m4 (AC_DIAGNOSE): Wrapper around `m4_warn'.
* autoconf.sh: Define `m4_warnings' instead of `_AC_WARNINGS'.
2000-10-31 15:20:15 +00:00
Pavel Roskin
80f8404bec * autoconf.sh: When scanning for unexpanded macros match only
words beginning with "A?_" and "m4_" or containing "_A?_".
        Strip the comments before the matching. Don't use character
        ranges.
2000-10-30 03:20:00 +00:00
Pavel Roskin
c46d9d8480 * autoconf.sh: Recognize short options followed by arguments
without separators.
        * autoheader.sh: Likewise.
        * autoreconf.sh: Likewise. Recognize abbreviations for
        "--autoconf-dir" and "--m4dir"
        * autoupdate.sh: Likewise. Recognize abbreviations for
        "--autoconf-dir"
2000-10-27 13:47:54 +00:00
Pavel Roskin
0dd3144b2e * autoconf.sh: Don't show obsolete options on "--help". Report
obsolete options to stderr. Adjust list of options. Correct
        processing of options. Process options with values separated by
        "=" first, so that abbreviations work. Don't accept "=" with
        short options.
        * autoheader.sh: Likewise.
        * autoreconf.sh: Likewise.
        * autoupdate.sh: Likewise.
        * ifnames.sh: There is no "--verbose" option.
        * doc/autoconf.texi: Option "-A" requires an argument.
        (autoreconf Invocation): Document "--install", "--symlink",
        "--m4dir" and the options passed to Automake.
2000-10-26 22:27:48 +00:00
Akim Demaille
161112fd78 In order to check that all the CPP symbols which are AC_DEFINE'd
are properly templated, autoheader traces
AC_DEFINE/AC_DEFINE_UNQUOTED.  Only literals can be traced, and
actually tracing non literals produces invalid autoheader input.
Hence, provide a means to trace calls to
AC_DEFINE/AC_DEFINE_UNQUOTED with literals.
* acgeneral.m4 (AC_DEFINE_TRACE, AC_DEFINE_TRACE_LITERAL): New
macros.
(AC_DEFINE, AC_DEFINE_UNQUOTED): Use AC_DEFINE_TRACE.
* autoheader.sh: Trace AC_DEFINE_TRACE_LITERAL, not
AC_DEFINE/AC_DEFINE_UNQUOTED.
2000-10-23 18:32:17 +00:00
Akim Demaille
1e3cdfe0a3 * acgeneral.m4: Adjust copyright notice.
* acspecific.m4: Likewise.
* acoldnames.m4: Likewise.
* acversion.m4.in: Likewise.
* autoconf.sh: Likewise.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoscan.pl: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
2000-10-16 18:25:55 +00:00
Akim Demaille
e6600f6485 * autoconf.sh: Report full macro name for missing macros. 2000-09-27 10:29:30 +00:00
Akim Demaille
c916e13f94 * autoheader.sh: Fix trap (EXIT) status.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoconf.sh: Change `exit' to `{ (exit 1); exit; }' after m4 and
awk commands to ensure exit state is in a defined state.
2000-09-27 10:02:27 +00:00
Pavel Roskin
480bbc8376 * autoheader.sh: Don't check status of variable assignments -
* it's undefined in ash 0.2.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoconf.sh: Likewise. Also eliminated command substitution
inside variable expansion - ash 0.2 coredumps on it.
2000-09-25 13:24:45 +00:00
Akim Demaille
66dcecdf2f * autoconf.sh (optarg): More robust expr invocation.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoheader.sh: Likewise.
Reported by Bernard Dautrevaux.
2000-09-19 12:35:01 +00:00
Akim Demaille
63ff24b580 * autoconf.sh: Proprerly report names of unexpanded macros that
begin with an underscore
2000-09-11 07:16:34 +00:00
Akim Demaille
82bbd6fe4e * autoconf.sh: Consider undefined macros as errors.
* tests/base.m4 (unexpanded macros): Expect error, not warning
2000-09-05 10:19:01 +00:00
Akim Demaille
287ac9cdb8 * autoscan.pl: Repair broken Getopt::Long use. 2000-09-04 14:50:50 +00:00
Akim Demaille
9fe002dcf5 * autoconf.sh: Change exit N' to (exit N); exit' to provide
the correct exit status when an exit trap is taken.
2000-08-11 08:51:34 +00:00
Akim Demaille
a950c6810a * autoreconf.sh (Installing Autoconf extensions files): Remove. 2000-08-09 09:56:30 +00:00
Akim Demaille
4df82da14e * autoconf.sh (finalize.awk): Don't leave spaces before the user
function calls.
Reported by John David Anglin.
* doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
section.
* tests/tools.m4 (AWK portability): New test.
2000-08-09 06:53:07 +00:00
Akim Demaille
6b9ecd5669 * autoconf.sh (finalize.awk): New subtool, eved from the previous
literal AWK program that performed the `oline' and quadrigraphs
substitution.
Fix its `oline' computation which was dead wrong when there are
empty lines (i.e., always).
Enhance it in order to look for and report unexpanded macro.
Don't let it pretend there are bugs in Autoconf (c:, the test
suite makes this scenario pretty unlikely as opposed to an actual
user bug.
Catch `m4_' too.
Remove the shell snippet which used to do this.
2000-08-07 12:07:17 +00:00
Akim Demaille
89ffc0a2f2 * autoheader.sh (_ac_warnings): Be robust to LC_COLLATE.
`IFS=,; echo ,' will give a comma.  Take this into account.
2000-08-01 13:59:51 +00:00
Akim Demaille
6e867eb5ee * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Neutralize also
LC_COLLATE and LC_NUMERIC.
* autoconf.m4: Don't rely on character ranges with tr.
* doc/autoconf.texi (Special Shell Variables): Adjust.
2000-08-01 11:22:42 +00:00
Akim Demaille
83afb4f7ce * autoscan.pl: Be ready to handle AC_CHECK_TYPES requests.
Quote properly the output.
Remove useless backslashes.
2000-08-01 11:12:12 +00:00
Akim Demaille
4d600514e0 * autoscan.pl: Use Getopt::Long;
* acidentifiers: Classify, sort.
2000-08-01 10:05:11 +00:00
Akim Demaille
b64f36dee1 * autoconf.sh (--warnings): Catch no-category', not nocategory'.
* autoheader.sh: Likewise.
* acgeneral.m4 (_AC_WARNING_IFELSE): Adjust.
2000-07-28 07:41:52 +00:00
Akim Demaille
20078ad516 * autoreconf.sh (dir): When verbose, say what are the tools you
will use.
2000-07-19 09:24:10 +00:00
Akim Demaille
b240f802f9 * autoreconf.sh: Accept --symbolic and -s. 2000-07-19 09:04:26 +00:00
Akim Demaille
9150c0ede6 Make it clear that the regular user does not need --macrodir.
In fact, rename this option as -A, --autoconf-dir.

* autoconf.sh: Complain when -m, --macrodir is used.
Accept -A, --autoconf-dir.
Use $autoconf_dir instead of $AC_MACRODIR.
Adjust --help.
* autoheader.sh: Likewise.
* autoscan.sh: Likewise.
* autoupdate.sh: Likewise.
Use $optarg.
* autoreconf.sh: Likewise.
* doc/autoconf.texi: Adjust.
* tests: Adjust the test suite.
2000-07-19 09:03:53 +00:00
Akim Demaille
80ad59d16d * autoreconf.sh: Forward --debug to sub tools.
Let them share the same tmp dir.
2000-07-19 08:54:44 +00:00
Akim Demaille
71773fbd5f * acspecific.m4 (AC_MING32): Rename as AC_MINGW32. 2000-07-19 08:22:58 +00:00
Akim Demaille
a057e62853 Make it easier to trace what autoreconf does.
* autoheader.sh: Be more verbose, and always report your name in
verbose messages.
* autoconf.sh: Likewise.
* autoreconf.sh: Likewise.
(update.sh): Redirect ls's stderr to /dev/null.
2000-07-13 13:38:45 +00:00
Akim Demaille
17680fe3fb * autoconf.sh (_ac_warnings): Fix call to tr.
Reported by Johan Danielsson.
2000-07-12 16:33:38 +00:00
Akim Demaille
609835a22f Alexandre's suggestions.
* autoreconf.sh (update.sh): Use `ls -1dt' instead of `-lt'.
Use test instead of sed.
<automake>: If automake is used, always run it: it has its own
mechanism not to update if unneeded.
2000-07-10 14:03:12 +00:00
Akim Demaille
d899114564 Set autoconf's default warnings to `syntax'.
In fact, honor the most recent specification in the concatenation
of `syntax',$WARNINGS,<options> in that order.
Implement support for `none' and `noCATEGORY' so that the options
may override the previous choices.
Suggested by Didier Verna.

* acgeneral.m4 (_AC_WARNING_IFELSE): New macro.
(AC_WARNING_IFELSE): Use this macro to implement the new specs.
(AC_WARNING): The empty category must not be used, default to
`syntax'.
* doc/autoconf.texi (autoconf Invocation, Reporting Messages): Adjust.
* autoconf.sh: Adjust.
Use `optarg' to fetch the arguments of options.
Fix a bug in the handling of `--trace='.

* acgeneral.m4 (AC_CACHE_VAL): Typo: the macro was complaining iff
it shouldn't have.
2000-07-10 10:23:08 +00:00
Akim Demaille
27b442f347 * autoreconf.sh (--install, --symlink): New options. 2000-07-10 10:22:06 +00:00
Akim Demaille
af73cb1d65 * autoreconf.sh (dots, aclocal_m4, acconfig_h): Remove.
Adjust dependencies.
When using $verbose, redirect to stderr.
2000-07-10 10:19:55 +00:00
Akim Demaille
6ab1be44a6 * autoreconf.sh: Clarify the difference between the location of
`aclocal.m4' and that of the location Autoconf extensions.
(-M, --m4dir): New option.
(aclocal_flags): Do not use $localdir, but $m4dir.
(localdir_opt): Remove, since $autoconf, $autoheader already
include `-l $localdir'.
2000-07-10 10:18:57 +00:00
Akim Demaille
289b6c7a22 * autoconf.sh (task install): We no longer use AC_INCLUDE. 2000-07-10 10:12:44 +00:00
Akim Demaille
00ac4eb3f1 * autoreconf.sh (debug): New variable.
(tmp): s/ac/ar/.
<options handling>: Support --debug.
* doc/autoconf.texi: Adjust.
2000-07-10 10:08:29 +00:00
Akim Demaille
8c56486b58 Fix the bugs recently introduced in autoreconf.
* autoreconf.sh: Don't run automake when the package is not using
it.
When checking whether autoheader should be rerun, don't ask
config.h to be newer than stamp-h and vice-versa.
Remove an unbalanced `fi'.
2000-07-10 10:07:41 +00:00
Akim Demaille
4e2f72941d * autoreconf.sh (run_aclocal): Rename as `uses_aclocal' to avoid
the convention clash with autoconf.sh where `run_foo' is the
command to run `foo'.
(uses_autoheader): New variable.
2000-07-10 10:06:48 +00:00
Akim Demaille
d0caf6df76 * autoreconf.sh (update.sh): New sub program.
Use it in the whole process.
(acconfig_h): New variable.
2000-07-10 10:01:42 +00:00
Akim Demaille
09c8c7c398 * autoreconf.sh <run_aclocal>: Use false/: instead of no/yes.
Formatting and factoring changes.
2000-07-10 08:59:11 +00:00
Akim Demaille
d70f10d81b * autoreconf.sh: You too can have a $tmp dir if you wish.
(alflags.sed): New sub sed program.
Compute the flags of aclocal from Makefile.am instead of
Makefile.in, it is unlikely that aclocal be used but not automake,
while it is convenient to be able to run autoreconf even if
automake was not run yet.
Use `autoconf --trace' to get the list of configuration headers.
2000-07-10 08:57:16 +00:00
Akim Demaille
d9c7337e87 * acgeneral.m4 (AC_PLAIN_SCRIPT): New macro.
* tests/base.m4 (m4_wrap, AC_REQUIRE, AC_SHELL_MKDIR_P): Use it.
* autoconf.sh: Properly handle the case where `$output' is `-'
(i.e., stdout).
Handle `-ofile', not only `-o file'.
2000-07-10 08:56:19 +00:00
Akim Demaille
c75d1d1975 * autoreconf.sh: Formatting changes.
When verbose, display exactly what you do, not just a synopsis.
When using `$verbose' don't use quotes to avoid spurious spaces
for empty arguments.
2000-07-10 08:55:48 +00:00
Akim Demaille
9cdafb9b2b * autoreconf.sh (force): Instead of yes/no, use :/false.
Adjust the code.
(automake_deps, automake_force): No longer used.
2000-07-10 08:54:41 +00:00
Akim Demaille
821185fa6b * autoconf.sh: When using `mktemp -d', be sure that the directory
was created.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
2000-07-10 08:41:59 +00:00
Akim Demaille
94939fa6c1 * autoreconf.sh (automake, aclocal): New variables. Import
$AUTOMAKE and $ACLOCAL.
Pass --verbose to the tools.
Avoid using plenty of variables, just append to existing
variables.
* doc/autoconf.texi: List options in the order --help, --version,
--verbose, --debug, and then specific options.
2000-06-26 10:51:17 +00:00
Akim Demaille
f3ace9be03 * autoconf.sh (option handling): Give a more understandable
message when an option is missing its argument.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoheader.sh: Likewise.
2000-06-15 11:33:04 +00:00
Akim Demaille
1708332550 autoconf --trace' dies on filenames with :'.
Reported by Mark Elbrecht.

* autoconf.sh <trace> (trace2m4.sed): Use `..*' instead of
`[^:][^:]*' to catch file names.  The rest of regex is probably
precise enough to avoid incorrect parsing.
2000-06-09 10:02:19 +00:00
Akim Demaille
7f448b314c Formatting changes. 2000-06-09 10:00:36 +00:00
Akim Demaille
66262a6fb1 * autoreconf.sh (autoconf, autoheader): Be more conscientious when
looking for the executable.
* autoupdate.sh: Likewise.
* autoheader.sh: Likewise.
Suggested by Alexandre Oliva.
2000-05-26 18:09:43 +00:00
Akim Demaille
1b6f086514 Thanks to --program-transform-name, `autoconf' might be install as
`yo-man-i-am-the-all-mighty-AVt0c0nF-eh-eh'.  But when
`yo-man-i-am-the-all-mighty-AVt0h3Ad3R-eh-eh' and the other tools
want to trace, they might stupidly invoke the program named
`autoconf' instead.  Pfff, stupid scripts :)

* Makefile.am (editsh): Transfer the names of the install
`autoconf' and `autoheader'.
* autoconf.sh: Add a missing period at the end of the comment
# Parse command line
Make sure to have a ChangeLog much longer than the patch.
* autoheader.sh: Use the right `autoconf'.
* autoupdate.sh: Likewise.
* autoreconf.sh: Likewise, and for `autoheader' too.
Simplify the handling of localdir and AC_MACRODIR.
* ifnames.sh: Formatting changes.
2000-05-26 17:45:10 +00:00
Akim Demaille
bbd3b7f40c Load the additions *before* running AC_INIT.
This is important if you want to redefine AC_INIT or some of its
sub macros (eeerk!), or if you want to use user defined macros
before AC_INIT.
Suggested by Didier Verna.

* acgeneral.m4 (_AC_INIT): Don't include `acsite.m4' and
`aclocal.m4'.
* autoconf.sh (run_m4, run_m4f): Do it.
2000-05-23 09:52:05 +00:00
Akim Demaille
7c8f0f7a69 * acgeneral.m4 (AC_MSG_WARN): s/warning/WARNING/.
* autoheader.sh: Likewise.
From Franois Pinard.
2000-05-19 13:21:05 +00:00
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
Ben Elliston
13c2d5fb65 1999-09-21 Akim Demaille <akim@epita.fr>
* autoconf.sh (Checking for Bugs): Remove the indirection that
	made the `sort -u' useless.

1999-09-21  Akim Demaille  <akim@epita.fr>

	* autoconf.sh (Last sed cmd): Change also @PND@ to `#', since this
	is also a symbol very hard to quote in m4.

1999-09-13  Akim Demaille  <akim@epita.fr>

	* autoconf.sh: Substitute also /@BKL@/[/ /@BKR@/]/ /@DLR@/$/ so
	that these characters are more easily accessible from m4 without
	turning changequote juggling into a nightmare.
1999-10-17 11:38:55 +00:00
Ben Elliston
db93a8d50b 1999-09-27 Ben Elliston <bje@cygnus.com>
* autoscan.pl (scan_files): Emit an AC_PROG_CC invocation to
	configure.scan if there are any C files present. Fix for
	autoconf/19.
1999-09-26 21:31:29 +00:00
Ben Elliston
2c5609f43b 1999-09-24 Ben Elliston <bje@cygnus.com>
* autoreconf.sh: Do not run autoheader if AC_CONFIG_HEADER is
	commented out in configure.in. Reported by Erez Zadok
	<ezk@cs.columbia.edu> as a fix for autoconf/21.
1999-09-24 04:45:36 +00:00
Ben Elliston
4af17bffbe 1999-09-20 Ben Elliston <bje@cygnus.com>
* autoheader.sh: Bourne shell compatibility fix. From Pavel Roskin
	<pavel_roskin@geocities.com>.
1999-09-20 12:39:46 +00:00
Ben Elliston
26d35b5f5a 1999-09-15 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Fix for autoconf/28.
	* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, use
	`echo` followed by a non-blank, within quotes.
	* autoheader.sh (syms): Likewise.
	* configure: Rebuilt.
1999-09-15 04:23:15 +00:00
Ben Elliston
4fc395c93e 1999-09-07 Ben Elliston <bje@cygnus.com>
* autoreconf.sh: Recognise -v as a synonym for --verbose.
1999-09-07 13:21:40 +00:00
Ben Elliston
117cd369d4 1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br>
* autoreconf.sh: Run aclocal with the -I option only if
	aclocal_dir != `.'.  Fix for autoconf/44.
1999-08-25 13:44:46 +00:00
Ben Elliston
14c9c0e52f 1999-01-11 Akim Demaille <demaille@inf.enst.fr>
* autoreconf.sh (verbose): use either `:' or `echo'.
	(aclocal_m4): Renamed from aclocal.
	(aclocal_flags): New var.
	Run aclocal using $aclocal_flags.
	Redirect ls' stderr to /dev/null to avoid spurious messages.
1999-04-10 06:18:49 +00:00
Ben Elliston
e0ffe3d070 1999-03-22 Pavel Roskin <pavel_roskin@geocities.com>
* autoheader.sh: Report an error if AC_CONFIG_HEADER is not
	present in the configure input file.
1999-03-21 13:54:14 +00:00
Ben Elliston
99759c687a 1999-02-26 Ben Elliston <bje@cygnus.com>
* autoscan.pl (parse_args): Make compatible with Perl version 4.
1999-02-25 18:15:07 +00:00
Ben Elliston
1e2a4abc7a 1999-01-23 Ben Elliston <bje@cygnus.com>
* autoheader.sh: Force $tmpout to close to avoid Windows file
	sharing conflicts. From Mark Elbrecht <snowball3@usa.net>.
1999-01-23 05:39:52 +00:00
Ben Elliston
4d134a089b 1999-01-19 Pavel Roskin <pavel_roskin@geocities.com>
* ifnames.sh: Source lines ending with backslash are prepended to
	the following line before further processing.
1999-01-19 06:58:47 +00:00
Ben Elliston
064764930f 1999-01-13 Ben Elliston <bje@cygnus.com>
* autoconf.sh: Remove -v and --verbose from the command line usage
	help. They do not exist.
1999-01-13 04:38:34 +00:00
Ben Elliston
a0cf83b890 1999-01-08 Ben Elliston <bje@cygnus.com>
* autoconf.sh: More useful and up-to-date help from the --help
	option. Contributed by Akim Demaille <demaille@inf.enst.fr>.
	* autoheader.sh: Likewise.
	* autoreconf.sh: Likewise.
	* autoscan.pl: Likewise.
	* autoupdate.sh: Likewise.
	* ifnames.sh: Likewise.
1999-01-08 03:38:59 +00:00
Ben Elliston
df646e7699 Merge from autoconf-2-13-rc1. 1999-01-05 03:18:40 +00:00
Ben Elliston
8e80a0b40d 1998-10-29 Alexandre Oliva <oliva@dcc.unicamp.br>
* autoreconf.sh: Support several automake command line options,
	and run aclocal and automake when needed. Also, create stamp files
	just like automake's Makefiles would do for config headers.
	Additional contributions from Tom Tromey <tromey@cygnus.com>.
1998-10-29 00:53:33 +00:00
Ben Elliston
013957a4ce Sun Oct 4 21:57:20 1998 Tom Tromey <tromey@cygnus.com>
* autoconf.texi (Defining Symbols): Documented third argument to
	AC_DEFINE.
	* autoheader.m4 (AC_DEFINE_UNQUOTED): Generate `verbatim'
	assignment if third argument given.
	(AC_DEFINE): Likewise.
	* acgeneral.m4 (AC_DEFINE): Handle case where $# is 3.
	(AC_DEFINE_UNQUOTED): Likewise.
	* autoheader.sh: Echo $verbatim if not empty.
1998-10-09 07:44:10 +00:00
Ben Elliston
3aff0fe3ab Thu May 28 18:37:36 1998 Ian Lance Taylor <ian@cygnus.com>
* autoconf.sh: Change initial /bin/sh to @SHELL@.
1998-09-03 00:47:24 +00:00
Ben Elliston
d176bfd8f7 Thu May 28 18:37:36 1998 Ian Lance Taylor <ian@cygnus.com>
* autoreconf.sh: Change initial /bin/sh to @SHELL@.
Tue Nov 18 14:21:38 1997  Eric Mumpower  <nocturne@cygnus.com>
        * autoreconf.sh: Do the right thing when AC_CONFIG_HEADER is
        given more than one filename. As noted in the "Invoking
        autoheader" node of the info files, autoheader will use the first
        file argument given to AC_CONFIG_HEADER. Prior to this patch,
        autoreconf would end up executing incorrect shell code (e.g.
        "test ! -f 1.h 2.h.in") in such cases.
        Patch submitted in parallel to bug-gnu-utils@prep.ai.mit.edu.
1998-09-03 00:37:37 +00:00
Ben Elliston
7846c78829 Thu May 28 18:37:36 1998 Ian Lance Taylor <ian@cygnus.com>
* autoheader.sh: Change initial /bin/sh to @SHELL@.
1998-09-03 00:32:51 +00:00
Ben Elliston
7bfcfbcfe2 Thu May 28 18:37:36 1998 Ian Lance Taylor <ian@cygnus.com>
* ifnames.sh: Change initial /bin/sh to @SHELL@.
1998-09-02 23:39:30 +00:00
David MacKenzie
8801bfce14 cleanups 1996-11-20 21:27:29 +00:00
David MacKenzie
f989a49ded bug fixes for quoting and locales 1996-11-20 19:13:42 +00:00
David MacKenzie
b1e18dbda8 more tweaks 1996-11-15 00:04:39 +00:00
David MacKenzie
81a0a80172 more tweaks 1996-11-14 18:03:47 +00:00
David MacKenzie
4ecef17a07 tweaks; test release 2.10.3 1996-11-13 17:24:58 +00:00
David MacKenzie
8fb56d8ec4 more bug fixes 1996-11-12 04:48:04 +00:00
David MacKenzie
e579d06b61 many bug fixes and a few additions, mostly derived from bug-gnu-utils 1996-11-09 22:19:24 +00:00
David MacKenzie
19f8338d7e various bug fixes and small improvements 1996-11-09 00:44:49 +00:00