Commit Graph

557 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
bc37b8f562 Typos in ChangeLog. 2000-03-13 15:31:26 +00:00
Jim Meyering
cad1316125 (_AC_CHECK_TOOL_PREFIX): Correct typos in definition:
add `_' prefix to make the function name match comments and existing
uses.  Remove leading prefix from _AC_CANONICAL_HOST.
2000-03-10 11:32:08 +00:00
Akim Demaille
47f8108881 * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Added some missing
headers if they exist (needed for some missing prototypes) and
corrects the signal handler prototype/definition.  The signal
handler prototype is now prepended with an `extern "C"' for C++
compilers since some platforms explicitly require an `extern "C"'
signal handler.
2000-03-09 15:44:40 +00:00
Akim Demaille
e7ebd18602 * acgeneral.m4 (AC_PATH_PROG, AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS):
Fix quotation problems in DOS path handling.
2000-03-08 17:32:40 +00:00
Akim Demaille
f206e89cb3 * acspecific.m4 (AC_FUNC_MMAP, AC_FUNC_ALLOCA): Make them C++
safe: include the right headers, cast the allocations etc.
2000-03-08 16:44:55 +00:00
Akim Demaille
fa98a48d2f The argument of AC_COPYRIGHT should be plain text, not an sh
comment.

* libm4.m4 (m4_quote): s/$@/$*/.
* acgeneral.m4 (AC_COPYRIGHT): Prepend `# ' to the lines that goes
on the top of `configure'.  Actually, prepend `@%:@ ' so that
there are as many evaluations on both sides.
(_AC_INIT_VERSION): No longer strip `# '.
2000-03-08 16:13:32 +00:00
Akim Demaille
2e59cf5180 Provide a means to specify more Copyright information in
`configure'.  And after all, it suits to `configure --version' too.

* acgeneral.m4 (AC_DIVERSION_DEFAULTS, AC_DIVERSION_INIT_PREPARE):
New diversion numbers.
(AC_DIVERSION_INIT): Renamed as...
(AC_DIVERSION_INIT_PARSE_ARGS): this.
(AC_DIVERT_POP): Instead of going into wild endless loops when
there are more pops than pushes, die with dignity.
(AC_COPYRIGHT): New macro.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Remove.
(AC_INIT): Use it to install Autoconf's Copyright.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
(AC_PREFIX_DEFAULTS): Dump in AC_DIVERSION_DEFAULTS.
(_AC_INIT_PARSE_ARGS): Dump in AC_DIVERSION_INIT_PREPARE.
2000-03-08 13:22:42 +00:00
Akim Demaille
e91ec0e779 Leave a diversion exclusively for Copyright notices.
* acgeneral.m4 (AC_DIVERSION_DEFAULTS): New diversion number.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Play with your diversion yourself, don't let
(AC_INIT): do it for you.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
2000-03-08 11:15:14 +00:00
Akim Demaille
44cedcba06 We don't need _AC_ARG_*_HELP_PROLOGUE.
* acgeneral.m4 (AC_EXPAND_ONCE): AC_PROVIDE yourself, in case
there is no AC_DEFUN associated with the text to expand.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): Remove, instead...
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): do it yourself.
2000-03-08 11:14:09 +00:00
Akim Demaille
0f81aa0974 * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix copy n' paste typos in
`--with-*', `--without-*' and `*' decoding.
Reported by Raja R Harinath.
Fixes autoconf/119.
2000-03-08 11:13:31 +00:00
Akim Demaille
025fe08770 Don't dump AC_ARG_PROGRAM help messages if not used.
* acgeneral.m4 (_AC_INIT_HELP): Don't.
(AC_ARG_PROGRAM): Do.
2000-03-08 11:11:37 +00:00
Akim Demaille
304c21e672 Don't dump X help messages when `configure' does not check for X.
* acgeneral.m4 (_AC_INIT_HELP): Don't dump X help messages.
* acspecific.m4 (AC_PATH_X): Do it.
2000-03-08 11:09:59 +00:00
Akim Demaille
2f71ba0c0b No longer rely on /bin/sh to compose the optional parts of
`configure --help'.

* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 11:08:29 +00:00
Akim Demaille
7dcca0f6f3 AC_OUTPUT_COMMANDS no longer uses a diversion.
* acgeneral.m4 (AC_DIVERSION_CMDS): Removed.
(_AC_OUTPUT_CONFIG_STATUS): Don't undivert it.
2000-03-08 11:05:26 +00:00
Akim Demaille
d7d95f9a4f * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix quoted/non quoted here
document problems.
2000-03-08 11:04:55 +00:00
Akim Demaille
65e039bdf9 * acgeneral.m4 (AC_INIT_BINSH, AC_INIT_NOTICE, AC_INIT_PREPARE):
Rename as...
(_AC_INIT_BINSH, _AC_INIT_NOTICE, _AC_INIT_PREPARE): this.
All callers adjusted.
2000-03-08 11:03:59 +00:00
Akim Demaille
a19a55bf7c * acgeneral.m4 (AC_INIT_PARSE_ARGS): Rename as...
(_AC_INIT_PARSE_ARGS): this.
Move the display of help and version strings to...
(_AC_INIT_HELP, _AC_INIT_VERSION): here.
(AC_INIT): Adjust.  Also, fix quotation.
2000-03-08 11:03:33 +00:00
Akim Demaille
b8e6467748 * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH, AC_PATH_PROG,
AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_PREFIX_PROGRAM,
AC_EGREP_CPP, AC_TRY_LINK, AC_COMPILE_CHECK, AC_TRY_RUN_NATIVE):
Use ifval instead of ifelse.
2000-03-08 11:00:10 +00:00
Akim Demaille
9a9e3dacd2 Support absolute DOS-style paths.
Any character before the colon is accepted because network drives
can be assigned characters outside the [a-zA-Z] range. DOS-style
relative paths (?:foo/bar) are also considered absolute for
Autoconf's purposes since the path '../?:foo/bar' is invalid.

* acgeneral.m4 (AC_OUTPUT_FILES): Treat DOS-style paths (?:*') as
absolute.
(AC_OUTPUT_SUBDIRS): Likewise.
(AC_PATH_PROG): Make pattern for matching DOS-style paths the same
as that used in AC_OUTPUT_FILES and AC_OUTPUT_SUBDIRS.
2000-03-07 14:24:49 +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
2585dd7c36 * acgeneral.m4 (_AC_WHICH_A): New macro.
(AC_CHECK_PROG): Use it.  Use ifval.
(AC_CHECK_PROGS): Use ifval.  Fix the quoting.
* tests/semantics.m4: Test AC_CHECK_PROG.
* tests/Makefile.am (EGREP_EXCLUDE): Add /AC_CHECK_PROGS?/.
2000-03-03 14:15:41 +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
d98e77231b * acspecific.m4 (AC_PATH_X_DIRECT): Moved all the shell variable
into the ac_ name space.
Reported by Nicolas Joly.
2000-03-02 17:03:30 +00:00
Akim Demaille
9a04f64347 * acspecific.m4: Move some macros to a better place. 2000-03-02 16:48:06 +00:00
Akim Demaille
c86888e32d Internal macros are named `_AC_'.
* acgeneral.m4 (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD,
AC_CANONICAL_THING, AC_CHECK_TOOL_PREFIX, AC_CONFIG_UNIQUE):
Prepend `_' to their names.
* acspecific.m4 (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT,
AC_PATH_X_XMKMF, AC_PATH_X_DIRECT): Prepend `_' to their names.
* doc/autoconf.texi (Macro Names): Adjusted.
2000-03-02 16:36:16 +00:00
Akim Demaille
3f31064d8d * acgeneral.m4: Formatting changes.
* acspecific.m4: Likewise.
2000-03-02 16:27:51 +00:00
Akim Demaille
f59041e9ac Fixed a mistake in ChangeLog, and moved a few more addresses from acspecific to THANKS. 2000-03-01 15:54:37 +00:00
Akim Demaille
c3a47ec7ad * acspecific.m4: Removed a few addresses, the correspondence is...
* THANKS: here.
2000-03-01 12:29:26 +00:00