Paul Eggert [Fri, 31 Mar 2006 18:46:47 +0000 (18:46 +0000)]
* lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): Handle ///, ////, etc.
correctly. Problem reported by Eric Blake.
(_AS_EXPR_PREPARE): Detect Tru64 expr bug. Problem reported by
Ralf Wildenhues.
Ralf Wildenhues [Thu, 30 Mar 2006 19:54:08 +0000 (19:54 +0000)]
* Makefile.maint (sc_texi_notab): New check: do not use TABs
in texinfo files outside of verbatim environments.
(syntax-check-rules): Update.
* doc/autoconf.texi (Configuration Headers): Conform to it.
Paul Eggert [Thu, 30 Mar 2006 06:42:56 +0000 (06:42 +0000)]
* doc/autoconf.texi (Programming in M4sh): Mention AS_BASENAME.
Give an example for AS_DIRNAME instead of referring to Posix..
(File System Conventions): Put discussion of // versus / here, and
modernize it a bit.
(Limitations of Usual Tools): Add basename. Remove verbiage
after dirname, since it got moved to the above sections.
All this was inspired by a patch proposed earlier by Ralf Wildenhues.
Ralf Wildenhues [Sun, 26 Mar 2006 21:27:56 +0000 (21:27 +0000)]
* bin/autoscan.in: The value of find_configure_ac should be
checked for existence, so we don't barf over a nonexisting
configure.ac. Reported by Laurence Darby <ldarby@tuffmail.com>.
Stepan Kasal [Fri, 17 Mar 2006 20:37:26 +0000 (20:37 +0000)]
* lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS):
Factor out the warning to...
(_AC_TOOL_WARN): ... this new macro; use `cross_compiling'.
* tests/local.at (AT_CHECK_MACRO_CROSS): Avoid this warning.
* tests/semantics.at (AC_C_BIGENDIAN): Likewise.
Ralf Wildenhues [Fri, 17 Mar 2006 17:09:21 +0000 (17:09 +0000)]
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Prepend
the directory `/usr/bin/posix' in the shell search, to prefer
the Posix shell not only in subsequent spawns as with `$BIN_SH'
on Tru64.
Ralf Wildenhues [Tue, 14 Mar 2006 07:20:14 +0000 (07:20 +0000)]
* tests/autotest.at (AT_NO_CMDSUBST): New macro to determine
failure condition for `$(cmd)' style command substitutions.
(Parenthetical command substition, Multiline parenthetical
command substition): Use it.
Ralf Wildenhues [Sun, 12 Mar 2006 19:58:31 +0000 (19:58 +0000)]
* lib/autotest/general.m4 (AT_INIT) <at_optarg>: Optimize
`expr' away if there is nothing to do.
< --keywords >: Simplify and robustify argument handling.
Revert erroneous comment from 2005-08-23. Extend to allow
keyword negation with `!'.
Update help message. Remove broken code to prevent running
tests multiple times.
* doc/autoconf.texi (testsuite Invocation) < --keywords >:
Update and fix the documentation accordingly.
* tests/autotest.at (Keywords): Renamed to..
(Keywords and ranges): .. this. Extended to make sure negated
keywords, keywords taken from AT_SETUP arguments, and numeric
test ranges work, and that matching is case-insensitive.
Ralf Wildenhues [Sat, 11 Mar 2006 13:22:42 +0000 (13:22 +0000)]
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Use a typedef to
allow to pass unnamed structs even in C++.
(AC_CHECK_SIZEOF): Likewise.
Also fix quoting error in `AC_MSG_FAILURE' arguments.
* tests/semantics.at (AC_CHECK_ALIGNOF struct, AC_CHECK_SIZEOF
struct): New tests for unnamed structs, each both native and
cross-compiling.
Ralf Wildenhues [Sat, 11 Mar 2006 13:21:32 +0000 (13:21 +0000)]
* lib/autoconf/c.m4 (AC_C_TYPEOF): Use typedef to avoid defining
a structure inside a cast, for C++ conformance.
* lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Likewise.
Also fix quoting error in `AC_MSG_FAILURE' arguments.
Ralf Wildenhues [Sat, 11 Mar 2006 13:20:14 +0000 (13:20 +0000)]
* lib/autoconf/c.m4 (AC_PROG_CC_STDC): If we cannot enable C99
nor C89 mode, set `$ac_cv_prog_cc_stdc' to `no' instead of
trying to execute the command `no'.
Ralf Wildenhues [Sat, 11 Mar 2006 13:15:55 +0000 (13:15 +0000)]
* doc/autoconf.texi (autoconf Invocation): Fix typos in trace
example. Do not emphasize `$%', it is hardly new and special.
Reported by Edouard Bechetoille <ebecheto@ens-lyon.fr>.
Paul Eggert [Fri, 10 Mar 2006 20:54:53 +0000 (20:54 +0000)]
* doc/autoconf.texi: Use @acronym more consistently for acronyms
like BSD, GPL, LGPL. Fix minor English typos.
(AC_STDC_HEADERS, AC_PROG_GCC_TRADITIONAL):
Mention that these macros are becoming obsolete.
(AC_STDC_HEADERS, AC_PROG_CC, AC_C_CONST, AC_C_VOLATILE):
Use more modern terminology for which standard is what.
(AC_PROG_CC): Mention gcc first, and remove obsolete references to egcs
and to ansi2knr.
(AC_PROG_CXX): Likewise.
(AC_C_PROTOTYPES, Test Functions, AC_LIBOBJ vs LIBOBJS):
Remove obsolete discussion about how to port to K&R.
(Guidelines for Test Programs): Suggest AC_HEADER_STDBOOL rather than
the obsolescent AC_HEADER_STDC.
(AC_FOO_IFELSE vs AC_TRY_FOO): Don't use #error; test programs
can't rely on it.
Ralf Wildenhues [Mon, 6 Mar 2006 22:34:34 +0000 (22:34 +0000)]
* lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): The limit for
HP-UX sed is 99 commands, not 100.
(_AC_OUTPUT_FILES_PREPARE): Do not count the `}' of an
_AC_SUBST_FILES fragment. Separate `{' and `r' commands by
newline for portability.
* tests/torture.at (Torturing config.status): Also test 100
AC_SUBST_FILE invocations. Fix test to actually verify the
AC_CONFIG_FILES output.
* doc/autoconf.texi (Limitations of Usual Tools): Document HP-UX
command, label, and read-file `r' limits. Unify HP-UX spelling.
Ralf Wildenhues [Mon, 6 Mar 2006 21:13:21 +0000 (21:13 +0000)]
* tests/Makefile.am (edit, $(wrappers)): Do not use `$<' in
non-suffix rule.
($(TESTSUITE_GENERATED_AT)): Use `$(srcdir)` for the benefit of
non-GNU make.
(autoconfdir, $(AUTOCONF_FILES)): Likewise.
* tests/mktests.sh: Small shell portability fixes.
Paul Eggert [Sun, 5 Mar 2006 08:29:49 +0000 (08:29 +0000)]
* lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): New macro.
(AT_INIT): Use it, to remove arbitrary limit of 999,999 test
cases, and to work around Tru64 expr bug.
* doc/autoconf.texi (Limitations of Usual Tools): Mention Tru64
expr bug that turns the result of a regex match into a number if
possible.
Ralf Wildenhues [Sat, 4 Mar 2006 17:28:34 +0000 (17:28 +0000)]
* lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around
HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented
in section `Specific Compiler Characteristics'.
Ralf Wildenhues [Wed, 1 Mar 2006 19:54:33 +0000 (19:54 +0000)]
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Force correct
order of variable initialization, so even the Solaris 2.6 shell
can create a config header correctly. Fixes lots of test suite
failures.
Ralf Wildenhues [Tue, 21 Feb 2006 09:30:01 +0000 (09:30 +0000)]
* lib/m4sugar/m4sh.m4 (AS_IF): Extend to allow more than one
test, as in `if tests; then cmd1; elif ...; else ...; fi'.
* doc/autoconf.texi (Programming in M4sh): Adjusted.
* tests/m4sh.at (AS_IF and AS_CASE): Test this. Also make sure
both macros are defun'ed so that required macros are evaluated
outside.
Ralf Wildenhues [Tue, 21 Feb 2006 09:28:34 +0000 (09:28 +0000)]
* doc/autoconf.texi (Prerequisite Macros): State more precisely
where a required macro will be expanded.
(Coding Style): Another reason not to use `m4_define'.
Ralf Wildenhues [Mon, 20 Feb 2006 21:43:05 +0000 (21:43 +0000)]
* doc/autoconf.texi (Looping constructs): New node, to
document m4_for, m4_foreach, m4_foreach_w, and mention
obsolete AC_FOREACH.
(Obsolete Macros): Document AC_FOREACH.
* lib/m4sugar/m4sugar.m4 (_m4_for): Fix declaration comment.
(m4_for): Fix to never loop (almost) endlessly, work correctly
with arithmetic expressions in arguments, a step of zero or
non-integer multiple of the interval, and avoid integer
overflow.
* tests/m4sugar.at: New test for m4_for, m4_foreach, and
m4_foreach_w.
Paul Eggert [Mon, 20 Feb 2006 19:45:30 +0000 (19:45 +0000)]
* lib/autoconf/erlang.m4: Rename macros from ERLANG_* to
AC_ERLANG_*. All uses changed.
* lib/freeze.mk (autoconf_m4f_dependencies): Add erlang.m4
* NEWS: Add short description of new macros.
Paul Eggert [Mon, 20 Feb 2006 08:50:33 +0000 (08:50 +0000)]
Add basic support for Erlang, both for configuring Erlang/OTP
tools, and Erlang as a conf test language.
* lib/autoconf/erlang.m4: New file.
* lib/autoconf/autoconf.m4
* lib/autoconf/Makefile.am (dist_autoconflib_DATA): Add erlang.m4.
* THANKS: Add Romain Lenglet.
Ralf Wildenhues [Wed, 15 Feb 2006 07:00:29 +0000 (07:00 +0000)]
* lib/m4sugar/m4sh.m4 (AS_CASE): New macro.
(_AS_CASE): Private helper macro.
* tests/m4sh.at: Basic tests for AS_IF and AS_CASE.
* doc/autoconf.texi (Programming in M4sh): Document AS_CASE.
Fix syntax of AS_IF description
(Prerequisite Macros): Mention AS_IF and AS_CASE as workarounds
for the AC_REQUIRE mess.
* NEWS: Mention AS_CASE, AS_BOURNE_COMPATIBLE, and
AS_SHELL_SANITIZE.
Paul Eggert [Wed, 15 Feb 2006 06:42:16 +0000 (06:42 +0000)]
* doc/autoconf.texi: Minor style cleanup.
Be consistent about spaces after commas.
Insert [] where empty args look a bit funny.
Fix some "i.e." and "e.g." usages.
Try to avoid "X/Y" usages.
Don't be pedantic about "ISO C99"; just say C99.
Prefer GNU style for spaces in front of parens.
(Function Portability): Comment about C89 versus C99
signed integer division.
(Particular Headers): Use current gnulib style for dirent
includes.
Ralf Wildenhues [Tue, 14 Feb 2006 23:18:51 +0000 (23:18 +0000)]
* bin/autoupdate.in (handle_autoconf_macros): Fix updating of
macros without parameters.
* lib/autoconf/autoupdate.m4 (AU_ALIAS): Likewise.
* doc/autoconf.texi (Obsoleting Macros): Document AU_ALIAS.
* tests/tools.at (autoupdating AU_ALIAS): New test for AU_ALIAS
`$#' bug.
(autoupdate): Updated to match AU_ALIAS fix.
Paul Eggert [Mon, 13 Feb 2006 07:45:03 +0000 (07:45 +0000)]
* lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Look at the output
of (set -o) rather than testing whether (set -o posix) succeeds,
to work around a bug in the AIX 5.3 shell.
Ralf Wildenhues [Tue, 31 Jan 2006 12:03:32 +0000 (12:03 +0000)]
* doc/install.texi (Defining Variables): Put `CONFIG_SHELL'
in environment of `configure', not the command line.
Reported by Howard Chu <hyc@highlandsun.com>.
Paul Eggert [Tue, 24 Jan 2006 00:28:29 +0000 (00:28 +0000)]
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN):
(_AC_FC_MAIN, __AC_FC_NAME_MANGLING): Use _AC_LANG in check
messages to differentiate Fortran and Fortran 77 tests.
(AC_FC_SRCEXT, AC_FC_FREEFORM): Use AC_LANG_PUSH/POP instead of
AC_LANG_ASSERT, to allow use in mixed-language projects.
Ralf Wildenhues [Sat, 21 Jan 2006 09:09:46 +0000 (09:09 +0000)]
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): Do not pass `-q' to mktemp.
* lib/Autom4te/General.pm (mktmpdir): Likewise.
(END): Improve error message a bit.
Reported by Bruce Korb <bkorb@gnu.org>.
Ralf Wildenhues [Wed, 11 Jan 2006 08:33:16 +0000 (08:33 +0000)]
* lib/autotest/general.m4 (AT_INIT): When ensuring writability
before the removals of test dirs, use `find' to avoid modification
of symlinked directories.
Ralf Wildenhues [Wed, 11 Jan 2006 08:10:50 +0000 (08:10 +0000)]
* lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT_REJECT):
Add `*.map' and `.inf' for Green Hills compiler.
Reported by Stefan Seefeld <stefan@codesourcery.com>.
Ralf Wildenhues [Wed, 11 Jan 2006 08:05:55 +0000 (08:05 +0000)]
* lib/m4sugar/m4sugar.m4 (m4_text_wrap): Handle quadrigraphs
correctly: pad with spaces after FIRST_PREFIX if necessary,
and compute string lenghts with `m4_qlen' instead of `m4_len'.
* lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Comments updated.
* tests/m4sh.at (AS_HELP_STRING): Test extended.
* NEWS: Updated.
Reported by numerous people, numerous times.