Commit Graph

174 Commits

Author SHA1 Message Date
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 François 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