* lib/autotest/general.m4 (Defaults): Validate input ranges ...
<at_func_validate_ranges>: ... using this new function.
* tests/autotest.at (Keywords and ranges): Test invalid ranges.
Test --list with ranges and keywords.
(Banners): Remove one now-failing test.
* lib/autotest/general.m4 (AT_INIT) <at_list_p>: Swap newlines
back to spaces, before listing subset of tests.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (BANNERS): New named diversion.
(TESTS_END): Diversion no longer used.
(AT_INIT) <at_func_banner, BANNERS>: Factor all banners into a
shell function, which prints only as needed, using an associative
array of banner text from a special diversion.
<PARSE_ARGS_END>: No longer need awk to find banners.
<TESTS>: Banners are no longer processed by main driver loop, so
we no longer need case statement.
(AT_BANNER): Rewrite to populate new diversion.
(AT_SETUP): Each test invokes its own banner. No output is needed
to the TESTS diversion.
* doc/autoconf.texi (Writing Testsuites): Document slight
semantics change.
* tests/autotest.at (AT_BANNERS): Enhance test.
* NEWS: Document AT_BANNER.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_append_uniq): Warn if separator
occurs in string, as duplicates may be added.
(_m4_append_uniq): New helper macro.
(m4_append_uniq_w): New macro.
* lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Fix
duplication bug by using new macro.
(AT_INIT) <at_tested>: Restore newline separators. Invoke tested
programs with stdin redirected, so programs that don't
understand --version won't try to behave interactively.
* tests/autotest.at (Tested programs): Catch this bug.
* tests/m4sugar.at (m4@&t@_append): Test new macro.
* tests/local.at (AT_TESTED): Add m4, perl.
* doc/autoconf.texi (Text processing Macros): Document
m4_append_uniq_w, and update text on m4_append.
* NEWS: Document the addition.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Convert
from m4 macro...
(AT_INIT) <at_func_create_debugging_script>: ...to shell
function.
(AT_INIT): Defer function declarations until after --help,
--version. Format functions consistently, trying to fit in 80
columns.
(TEST_FUNCTIONS): Based on recent changes, rename...
(TEST_GROUPS): ...to this.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <at_func_test>: Merely
extract the source test source, do not invoke it.
(AT_SETUP, AT_CLEANUP): Source test code outside shell function.
* tests/autotest.at (Fallacy): Actually let the inner suite fail,
expect exit status of 1.
* tests/autotest.at (Skip): New test, for bogus zsh exit status.
* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Avoid errors when `.'
is not writable, use 'cp -p' in this case, in the hope that it
will not actually be needed. Still try removing files, in case
of other write errors.
* lib/autoconf/general.m4 (_AC_INIT_SRCDIR): For ac_confdir,
use $as_myself, not $0.
(_AC_INIT_HELP): For --help=recursive, if the subdir does not
exist, try again in the the source tree. This change assumes
that the subpackage configure script is capable of running
--help=recursive in the source tree.
* tests/torture.at (Configuring subdirectories, Deep Package):
Adjust tests to expose both issues, also try invocation as
`sh configure ...' and plain `configure ...' with PATH adjusted.
* NEWS, THANKS: Update.
Report by Hans Ulrich Niedermann.
* lib/m4sugar/m4sugar.m4 (m4_apply, m4_count, m4_dquote_elt)
(m4_echo, m4_make_list): New documented macros.
(_m4_quote, _m4_shift2): New helper macros.
(m4_map): Change semantics to allow calling macro without
arguments.
(m4_map_sep): Likewise. Also change semantics to quote separator,
to match m4_join and m4_append.
(m4_version_unletter): Fix use of m4_map.
* doc/autoconf.texi (Evaluation Macros): Document m4_apply,
m4_count, m4_dquote_elt, m4_echo, m4_make_list.
(Text processing Macros): Mention m4_dquote as a faster
alternative to joining with commas.
(Looping constructs): Document m4_map, m4_map_sep.
* NEWS: Mention new macros.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_bpatsubsts, _m4_shiftn): Reduce size
of expansion by avoiding extra uses of $@.
(m4_shiftn): Avoid extra dnl, and forbid shifting by 0.
(_m4_cdr): New helper macro.
(_m4_map, m4_map_sep): Use it to reduce size of expansion.
(_m4_shift3): New helper macro.
(_m4_foreach): Swap argument order, and use new macro to reduce
size of expansion.
* doc/autoconf.texi (Looping constructs) <m4_shiftn>: Mention that
count must be positive.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't expand arguments,
and reduce number of expansions.
* lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Rework to use m4_expand,
and to take indent and wrap column numbers.
* tests/m4sh.at (AS@&t@_HELP_STRING): Update the test.
* doc/autoconf.texi (Pretty Help Strings): Document details about
arguments.
(Text processing Macros): Minor tweaks.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_expand): New macro.
* lib/autotest/general.m4 (AT_SETUP): Use it to preserve
whitespace after single-quoted comma.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Test this.
* NEWS: Revert caveat about semantics change on comma.
* doc/autoconf.texi (Programming in M4): Lighten the warning on
using m4sugar; it is stabilizing.
(Redefined M4 Macros): Touch up wording on M4 builtins.
(Evaluation Macros): Document m4_expand.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_join): Just define this, not defun.
Ignore empty arguments, using...
(_m4_join): ...this new helper.
* tests/m4sugar.at (m4@&t@_join): New test.
* doc/autoconf.texi (Text processing Macros): Document new
semantics of m4_join.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_ignore, m4_unquote): New macros.
(m4_version_prereq): Inline constant expansions.
(m4_list_cmp): Reduce number of expansions, by avoiding m4_case.
Rewrite in terms of [] list, not () list.
(_m4_list_cmp, _m4_version_unletter): New helper macros.
(m4_version_unletter): Write wrapper around new implementation to
preserve old semantics.
(m4_version_compare): Pass correct type of list, and avoid
overhead of flattening expressions too early.
(m4_do): Move to be near other quoting macros.
(m4_max, m4_min): Always result in decimal output.
* doc/autoconf.texi (Looping constructs): Add m4_car, m4_cdr.
Move m4_do...
(Evaluation Macros): ...here. Add m4_ignore, m4_unquote.
(Text processing Macros): Move m4_version_compare...
(Number processing Macros): ...to this new node; document m4_cmp,
m4_list_cmp, m4_sign, m4_max, m4_min.
* tests/m4sugar.at (m4@&t@_version_compare): Enhance test, to pick
up on bugs fixed by this patch.
* NEWS: Document new macros.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4: Clean up macro order.
* doc/autoconf.texi (Programming in M4): Lighten the warning on
using m4sugar; it is stabilizing and useful.
(Redefined M4 Macros): Touch up wording on M4 builtins; sort. Add
m4_divert, m4_undivert, __file__, __line__, __oline__.
(Diagnostics): New node, documenting m4_assert, m4_errprintn,
m4_fatal, m4_location, m4_warn.
(Diversion support): New node, documenting m4_divert_push,
m4_divert_pop, m4_divert_text, m4_divert_once.
(Text processing Macros): Sort. Add m4_flatten, m4_join,
m4_newline, m4_strip, m4_text_box, m4_text_wrap.
(Programming in M4sh, Macro Names): Document namespace
limitations. Mention that non-Automake macros should not begin
with `AM_'.
(Reporting Messages): Mark AC_DIAGNOSE, AC_WARNING, and AC_FATAL
as obsolescent.
(Printing Messages): Change cross-reference.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (TEST_FUNCTIONS): New diversion.
(AT_INIT) <at_func_test>: New shell function.
(AT_INIT) <at_myself>: New variable, set to absolute $as_myself.
(AT_INIT) <at_test_source> New variable, names file that holds
current test function definition.
(AT_SETUP): Start the shell function at_func_test_#, into the
TEST_FUNCTIONS diversion.
(AT_CLEANUP): End the shell function. Simplify the TESTS
diversion to invoke the function.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/general.m4 (_AC_DEFINE_Q): Check for raw newlines,
which won't work with the preprocessor nor with the awk
implementation.
* tests/torture.at (Define a newline): Test raw newline detection,
removing the XFAIL.
* doc/autoconf.texi (Defining Symbols): Document recent change to
allow backslash-newline.
* THANKS: Update.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Only
pass on first argument, since we are documented that way.
(m4_for, m4_append_uniq, m4_text_wrap): Optimize out defined-ness
check where it is safe to do so.
(m4_append): Likewise, and quote the separator.
(m4_text_box): Likewise, and avoid regex, also be robust to
expansion and quadrigraphs.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix comments.
(_AC_OUTPUT_HEADERS_PREPARE): New macro. Rewrite of the config
header machinery for use with awk and placement outside the main
config.status instantiation loop. Retain multi-line defines
through backslash-newline combinations, do not split the script
any more.
(_AC_OUTPUT_HEADER): Simplify accordingly, use $AWK.
(_AC_OUTPUT_MAIN_LOOP): Call _AC_OUTPUT_HEADERS_PREPARE if
needed.
(AC_OUTPUT_MAKE_DEFS): Remove backslash-newline combinations
from define values.
* NEWS: Update.
* tests/torture.at (#define header templates): Extend test by
several more cases: white space before and after `#', macros
with parameters in config.hin and as defines, multi-line macro
values.
(Torturing config.status): Use a define value twice the length
in order to exercise the awk literal string limit.
(Substitute and define special characters): Also try special
delimiter, to exercise the special-case code.
Suggestion by Eric Lemings.
* lib/m4sugar/m4sh.m4 (AS_INIT): Add a 'generated from' notice.
* lib/autoconf/general.m4 (_AC_INIT_NOTICE): Override new notice
from M4sh.
* bin/autoconf.as: Put copyright up front in generated file.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_max, m4_min): New macros.
(m4_sign): Sort.
(m4_text_wrap): Fix off-by-one error in rewrite from m4_for to
m4_format.
* lib/autotest/general.m4 (AT_SETUP): Avoid negative width.
* tests/autotest.at (Long test title, Longer test title): Test
this fix, beyond what AS_HELP_STRING already tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_text_wrap): Use %*s, in case width
evaulates to 0.
* lib/autotest/general.m4 (AT_ordinal): Likewise; also ensure that
enough arguments are provided.
Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-06 Paolo Bonzini <bonzini@gnu.org>
* lib/autotest/general.m4 (AT_INIT): Add at_func_diff_devnull,
at_func_check_skip, at_func_check_status, at_func_filter_trace,
at_func_log_failure shell functions. Use test -s to avoid
useless diff invocations.
(AT_SETUP): Define AT_captured_files to empty.
(AT_DIFF_STDERR(*), AT_DIFF_STDOUT(*)): New, extracted from _AT_CHECK.
(_AT_CHECK): Replace m4_case with m4_ifdef/m4_indir. Use all
the shell functions.
Signed-Off-By: Paolo Bonzini <bonzini@gnu.org>
* lib/m4sugar/m4sugar.m4 (m4_cond, m4_newline): New macros.
(m4_text_wrap): Use it. Also avoid useless m4_for.
* lib/m4sugar/m4sh.m4 (_AS_QUOTE_IFELSE, AS_LITERAL_IF): Use
new macro.
(_AS_IDENTIFIER_IF): Likewise, and fix bug when $1 is [,].
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Use new macros
to avoid regexps.
* doc/autoconf.texi (Redefined M4 Macros): Expand m4_if
documentation. Sort m4_mkstemp, m4_undefine. Move m4_ifndef...
(Conditional constructs): ...here, to new section. Also document
m4_cond, m4_ifval, m4_n, m4_ifvaln, m4_ifset, m4_case, m4_bmatch,
m4_bpatsubsts, and m4_default.
(Looping constructs): Document m4_shiftn, m4_shift2, m4_shift3,
m4_do.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT, AT_SETUP): Double-quote text
that must not be re-expanded after AS_ESCAPE.
* lib/m4sugar/m4sh.m4 (_AS_IDENTIFIER_IF): Don't expand $1 when
checking if it is an identifier.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Avoid
leading whitespace, as it caused space-tab in testsuite.
(AT_INIT): Avoid trailing newlines in testsuite.
Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-04 Paolo Bonzini <bonzini@gnu.org>
* general.m4 (AT_INIT): Add at_check_newline function.
(_AT_DECIDE_TRACEABLE): Include at_traceon test, use shell function.
(_AT_CHECK): Don't use at_trace_this.
Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
* lib/m4sugar/m4sugar.m4 (m4_flatten): Only use regex if newline
is present.
(_m4_split): Avoid useless expansions inside definition. Move
argument defaulting...
(m4_split): ...here. Change alternate quote to something less
likely to appear in $1. Also, special case space as regexp...
(m4_foreach_w): ...to avoid regexp on single-term list.
(m4_default, m4_defn, m4_popdef, m4_undefine, _m4_foreach): Avoid
useless expansions inside definition.
* tests/m4sugar.at (m4@&t@_split): Add tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sh.m4 (AS_IDENTIFIER_IF, _AS_IDENTIFIER_IF): New
macros, more efficient than regex on m4_re_word.
* lib/autoconf/general.m4 (AC_SUBST, AC_DEFINE_TRACE_LITERAL):
Rewrite in terms of new macro. As a side-effect, AC_DEFINE can
now use @&t@.
* configure: Regenerate.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_SETUP): Only expand description
once; thereafter, use its expansion, properly quoted.
* tests/autotest.at (AT_CHECK_AT_TITLE): Also check macro
expansion with arguments, and check for aligned output.
(AT_CHECK_AT_TITLE_CHAR): Remove XFAILs for tests that now pass.
Add a test for macros with parameters.
* NEWS: Document the semantics change.
* tests/base.at: Fix test titles containing commas.
* tests/compile.at: Likewise.
* tests/tools.at: Likewise.
* tests/torture.at: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_cr_alnum, m4_cr_all)
(_m4_define_cr_not, m4_cr_not_letters, m4_cr_not_LETTERS)
(m4_cr_not_Letters, m4_cr_not_digits, m4_cr_not_alnum)
(m4_cr_not_symbols1, m4_cr_not_symbols2): New macros, implementing
character ranges useful in m4_translit.
(m4_toupper, m4_tolower): Optimize the constant portion of
definition.
* lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Also reject @S|@ because it
creates $, and reject [] thanks to AS_TR_SH rewrite.
(AS_TR_SH, AS_TR_CPP): Use just translit, not bpatsubst.
(AS_ESCAPE): Factor...
(_AS_ESCAPE): ...into new macro, with second argument required.
Avoid regex in common case.
(_AS_QUOTE): Use new macro.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_shiftn): This macro is called in a
lot of hot spots; optimize it for 2 and 3 shifts.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_sign): Write with m4_eval.
(m4_cmp): Compare arbitrary expressions, without overflow.
(m4_version_unletter): Also recognize capital letters.
(m4_version_compare): Avoid regex when splitting version number
string.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Rewrite without regex.
(_AS_QUOTE_IFELSE): Likewise.
* lib/m4sugar/m4sugar.m4 (m4_strip): Reduce from 3 to 2 regex.
(m4_bpatsubsts): Split...
(_m4_bpatsubsts): ...so that recursion can avoid patsubst on empty
regex.
(_m4_divert()): Define, to avoid m4 warning on `m4_divert'.
(m4_qlen): Optimize on short strings, to avoid regex.
(m4_sign): Avoid regex, and fix bug with `01' and `-0'.
* lib/autoconf/general.m4 (AC_CACHE_VAL): Rewrite without regex.
(AC_DEFINE_TRACE): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/general.m4 (AC_CACHE_VAL): Warn if cache variable
lacks '_cv_', or if AC_SUBST appears in body.
* tests/base.at (AC_CACHE_CHECK): Test this change.
* doc/autoconf.texi (Writing testsuite.at): Remove the
limitation that the first parameter of AT_CHECK cannot
contain redirection.
(File Descriptors): Mention that Ultrix limitation is no longer a
show-stopper in modern code.
* tests/local.at (AT_CHECK_M4): Fix for cases when the fourth
parameter is `stderr' or `experr'. Optimize if it was `ignore'.
* lib/autotest/general.m4 (AT_CHECK): Update comment.
* lib/autotest/general.m4 (HELP_TUNING): Avoid TAB in terminal
output.
(PATH): Simplify computation of new PATH.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Add support for HP cc, and
avoid deprecation warning with icc.
* THANKS: Update.
Reported by Ted Bullock.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/functions.m4 (GETLOADAVG_LIBS) [AC_FUNC_GETLOADAVG]:
Use "|", not "!".
* lib/autoconf/status.m4 (_AC_SRCDIRS) [ac_top_builddir_sub]:
[ac_dir_suffix]: Use "|", not "," as sed delimiter.
* tests/mktests.sh (as_me): Likewise.
* lib/freeze.mk (check-forbidden-patterns): Likewise.
* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Likewise.
* configure: Regenerate.
* doc/autoconf.texi (Shell Substitutions): Use "|", not "," in examples.
* lib/autotest/general.m4 (AT_INIT): Use "|", not "&" as sed delimiter
in the : -> $PATH_SEPARATOR transformation of $AUTOTEST_PATH. This is fine,
as long as $PATH_SEPARATOR doesn't contain "|".
* doc/autoconf.texi (Text processing Macros): Remove mention of
m4_AUTOCONF_VERSION, and leave m4_PACKAGE_VERSION undocumented
once again.
(Notices): Move AC_PREREQ...
(Versioning): ...to this new section, alongside the new AC_VERSION
alias for the undocumented m4_PACKAGE_VERSION.
* lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): Revert change.
* lib/autoconf/general.m4 (AC_VERSION): New macro.
* NEWS: Update to match this rename.
* tests/m4sugar.at (m4@&t@_version_compare): Remove tests of
m4_PACKAGE_VERSION.
* tests/tools.at (autoconf: AC_VERSION): New test.
Suggested by Paolo Bonzini and Benoit Sigoure.
* doc/autoconf.texi (Text processing Macros): Document
m4_version_compare, m4_AUTOCONF_VERSION, m4_PACKAGE_VERSION.
(Redefined M4 Macros): Document m4_ifndef.
* lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): New macro; we
can't obsolete m4_PACKAGE_VERSION at this time since Autoconf 1.10
used it while it was undocumented.
* NEWS: Document this change.
* lib/m4sugar/Makefile.am (version.m4): Update copyright dates.
* lib/m4sugar/Makefile.in: Regenerate.
* tests/m4sugar.at (m4@&t@_version_compare): New test.
Reported by Bruno Haible.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Inline code
from AC_AIX, AC_GNU_SOURCE, AC_MINIX. Add Interix support.
(AC_AIX, AC_GNU_SOURCE, AC_MINIX): Obsolete, and point to
AC_USE_SYSTEM_EXTENSIONS.
(AC_ISC_POSIX): Obsolete, and point to AC_SEARCH_LIBS.
(AC_XENIX_DIR, AC_IRIX_SUN): Promote proper quoting in AU_DEFUN.
* doc/autoconf.texi (Posix Variants): Reword this section,
emphasizing that AC_USE_SYSTEM_EXTENSIONS is the preferred method,
rather than a series of system-specific checks.
(Obsolete Macros): Add AC_AIX, AC_GNU_SOURCE, AC_ISC_POSIX,
AC_MINIX.
* NEWS: Document this change.
* THANKS: Update.
Reported by Martin Koeppe.
here, this macro is expanded by AC_INIT. Fixes 2.60 regression.
* tests/base.at (configure arguments): New test.
* THANKS: Update.
Report by Olaf Lenz.
file to itself if source and build trees coincide.
* tests/torture.at (AC_CONFIG_LINKS and identical files): New
test.
Report by Sebastian Freundt <hroptatyr@gna.org>.
Problem reported by Fred Kreek in
<http://lists.gnu.org/archive/html/bug-autoconf/2007-06/msg00009.html>.
* doc/autoconf.texi (Special Shell Variables): Warn about FPATH.
(Macro Names, Defining Directories): Don't mention PATH as a name
for a fully qualified file name, as this usage violates the GNU
coding standards and we shouldn't recommend it.
* lib/autotest/general.m4 (AT_INIT): Don't set PATH to the empty
string and then assume shell builtins like "test" will work.
not a valid shell variable name.
* tests/mktests.sh (ac_exclude_list): Add AC_ARG_VAR.
* tests/torture.at (AC_SUBST: variable name validation): New test.
Reported by Andreas Schwab.
choice, since that's what we do with --enable-largefile etc.
Redo indenting and assignments to simplify things a bit, and make
the parens work with Emacs.
AC_CHECK_TYPE, AC_CHECK_TYPES.
* doc/autoconf.texi (Generic types): C types must be type-names
(the C terminology), not type-ids (the C++ term). C++ types
must not be anonymous.
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Remove special case
for C++; this drops support for anonymous struct and union types,
which were problematic anyway.
* tests/semantics.at (AC_CHECK_HEADERS_NEW): Adjust test to work even
for C++.
on types imposed by AC_CHECK_TYPE, AC_CHECK_TYPES.
(Generic Compiler Characteristics): AC_CHECK_SIZEOF now works
with objects too. Document the restrictions on its use.
Document the restrictions on AC_CHECK_ALIGNOF's type argument.
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW):
For C, just try sizeof (TYPE) and sizeof ((TYPE)); if the former
works but the latter doesn't, then it's a valid type.
This lets people use function types and so forth.
For C++ there doesn't seem to be a simple solution, so leave it alone.
(AC_CHECK_SIZEOF): Allow argument to be a variable.
(AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Don't bother to invoke
AC_CHECK_TYPE; that wasn't documented or necessary.
* doc/autoconf.texi (C Compiler): Document this. There is a new
extra argument ACTION-IF-UNIVERSAL.
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Implement this.
Add support for Solaris-style _LITTLE_ENDIAN and _BIG_ENDIAN.
Reindent for sanity's sake.
status of rm so we know when it failed.
If cleaning of test dir failed before running the test, warn.
Output the line separator in verbose mode before the warning
to make clear the warning belongs to the following test.
an actual carriage return. Use "ac_cr" to contain the actual
carriage return.
* doc/autoconf.texi (Limitations of Usual Tools): Document problem
with traditional Awk and begin.
* tests/torture.at (Limitations of Builtins): Document the problem
with Bash 2.03 printf.
(Substitute and define special characters):
Remove trailing white space. Work around a bug in Solaris 8 /bin/bash.
AC_SUBST([MKDIR_P]), so that Automake < 1.10 will pick up its
trace, if a package uses AC_PROG_MKDIR_P explicitly. The actual
substitution will still be done by the special code.
Report by Jim Meyering.
all non-NUL characters are ok in substituted values.
* lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Fix comment typo.
(_AC_OUTPUT_FILES_PREPARE): Test and use backslash escaping of
carriage return for $AWK, needed for BSD awk.
* tests/torture.at (Substitute and define special characters):
Test all 8 bit non-NUL characters.
Report against Automake by Patrick Welche.
early on the reader side, drop stderr of the input to avoid
`broken pipe' error output; this may happen even with shell
builtin `echo' of some bash versions. Reports by Ian Macdonald
<iamacdo@telkomsa.net> and Sam Sexton <Sam.Sexton@reuters.com>.
preprocessor macro arguments in traced name.
* doc/autoconf.texi (Defining symbols): Document longstanding
support for AC_DEFINE-ing macros with arguments, and document
behavior when the same variable has multiple AC_DEFINEs.
* lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Revert to the
old implementation which AC_DEFINEs the FC_FUNC and FC_FUNC_
macros directly, giving much shorter and simpler code.
space before "$ac_configure_args" to prevent a 'config.status
--recheck' failure if ac_configure_args doesn't contain a leading
space. This works around a problem with the XEmacs configure.ac,
which uses the (undocumented) ac_configure_args variable
inconsistently with Autoconf.
Include <limits.h>, and use its INT_MAX to rewrite the
j loop so that it does not overflow 'int'. Problem reported by
Ralf Wildenhues in
<http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
Play it safe by shifting left by 1 rather than multiplying by 2,
as GCC is less likely to optimize this away when the value
is signed (when it assumes overflow leads to undefined behavior).
Also, don't assume time_t uses two's complement.
--disable-option-checking to --help output even when
AC_PRESERVE_HELP_ORDER is not used.
(_AC_INIT_PARSE_ENABLE2): Print warnings using actual --enable or
--with argument, rather than argument with [-.] replaced by
underscores.
* NEWS: Fix typo in previous change; the news was in the
wrong section.
--enable-* and --with-* options.
* doc/autoconf.texi (Option Checking): Renamed from
(Configure Option Checking). Tighten up the wording a bit.
(External Software, Package Options): Cross-reference to Option
Checking, and use this to shorten our section.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Prefer test -n
"$x" to test "x$foo" != x.
* lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
Don't warn if $enable_option_checking is "no".
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Initialize
ac_unrecognized_opts to the empty string.
Don't echo the unrecognized opts, as this might mishandle
backslashes or leading -.
(AC_PRESERVE_HELP_ORDER): Put the --disable-option-checking
usage next to the other --disable-FEATURE options in the
help string.
2006-12-18 Steven G. Johnson <stevenj@alum.mit.edu>
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS):
(_AC_INIT_PARSE_ENABLE2, _AC_INIT_HELP, _AC_ENABLE_IF):
Print warning for unrecognized --with and --enable options
(AC_DISABLE_OPTION_CHECKING): New macro to disable warnings.
* lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS):
Disable option checking when subdirs are configured.
(AC_OUTPUT): If warnings are enabled, print warning about
unrecognized --with and --enable options at the end of
the configure output (as well as at the beginning).
* doc/autoconf.texi (Option Checking): New node.
Document new option warning functionality.
<http://lists.gnu.org/archive/html/bug-autoconf/2006-12/msg00026.html>.
* doc/autoconf.texi (Defining Symbols): AC_DEFINE works for
object-like macros only, in the traditional portable character
set.
* lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL):
Warn about attempts to define things that are not identifiers.
* lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Rewrite to avoid
awful hack that AC_DEFINEd macro names containing parentheses.
`CEOF$ac_eof' special marker, the awk script cannot contain a
line matching `^CEOF', so this is not needed any more.
* tests/torture.at (Substitute a newline): Expose the `%!_!# '
special marker in the test.
creating the awk substitution script, handle one input line at a
time, so that the maximum length of a substituted (multi-line)
value is not limited by the size of the sed pattern space.
The trade-off is a slightly repetitive sed script.
* doc/autoconf.texi (Limitations of Usual Tools): Branch labels
can only have up to 7 characters, due to Solaris 10 /bin/sed.
* tests/torture.at (Substitute a 2000-byte string): Increase the
test with several long lines, they should not be caught by sed
limits any more.
instead of `awk' consistently.
(_AC_OUTPUT_CONFIG_STATUS): Initialize $AWK.
* tests/torture.at (Torturing config.status): Test both the
result of AC_PROG_AWK and plain awk.
(Substitute a 2000-byte string): Likewise.
(Substitute and define special characters): Likewise.
(Substitute a newline): Likewise.
can be assigned to a function pointer. Problem reported by
Peter Palfrader in <http://bugs.debian.org/401377>. Based on
part of a patch by Ralf Wildenhues in that same bug report.
cross-compiling from cygwin to mingw.
Reported by Bob Rossi. This resurrects the 2000-11-30 patch to
aclang.m4, which was mistakenly removed in the 2001-09-17 patch
to lib/autoconf/c.m4.
string for more reliable failure. Wrap the entire test that
causes the broken Solaris printf to dump core, in a subshell,
so the segmentation fault message is reliably suppressed.
Fix shell expansion errors by using /usr/ucb/echo always;
avoid an error on systems without it by another subshell.
Avoid m4 expansion of `$1'. Set the zeroth argument of the
subshell-$as_echo to `as_echo', for better error message.
years and is too hard to maintain now. The last straw was
reported by Jerker Baeck in
<http://lists.gnu.org/archive/html/autoconf/2006-11/msg00102.html>.
* NEWS: AC_FUNC_SETVBUF_REVERSED is now obsolete.
* doc/autoconf.texi (Particular Functions): Move
AC_FUNC_SETVBUF_REVERSED from here...
(Obsolete Macros): ... to here. Say that it does nothing now.
* lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED):
Turn into (almost) a no-op.
in the sed script that mangles the awk script: delete up to the
first exclamation mark only.
* tests/torture.at (Substitute and define special characters):
Test '!' too.
the number of substituted variables by using awk instead of sed
for the bulk of the substitutions.
* NEWS: Mention this.
* doc/autoconf.texi (Setting Output Variables): `|#_!!_#|' is also
forbidden in the output (and thus input) file.
* lib/autoconf/status.m4 (_AC_AWK_LITERAL_LIMIT): New macro.
(_AC_OUTPUT_FILES_PREPARE): Instead of several sed scripts,
generate just one large awk script for substitutions,
eliminating much of the earlier complexity, while adding some
new complexity. Only expand the substitution templates at
configure time, for smaller configure script size. If
_AC_SUBST_FILES are used, test 'awk' for working getline support
at config.status time. If absent, interpolate through the
shell. The awk script was written with much help
from Paolo Bonzini and Paul Eggert.
(_AC_SED_CMD_NUM, _AC_SED_DELIM_NUM, _AC_SED_FRAG): Removed.
(_AC_SED_FRAG_NUM): Likewise.
(_AC_SUBST_CMDS): Renamed from...
(_AC_SED_CMDS): ...this.
(_AC_OUTPUT_FILE): Use _AC_SUBST_CMDS.
* tests/torture.at (Substitute a 2000-byte string): Also
substitute a line with 1000 words, and a variable with several
long lines.
(Substitute and define special characters): Test awk special
characters, and put substitution input strings `@foo@' in the
output, to test that no recursion happens; test several other
combinations from Paolo Bonzini.
that replaced echo with AS_ECHO where this wasn't necessary.
Problem reportd by Ralf Wildenhues.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Port to Solaris 7,
where "/usr/bin/printf '%s\n' S" dumps core if S is long.
This is Sun bug 4206210. Problem reportd by Ralf Wildenhues.
with a leading '-', or when given any argument containing '\'.
Avoid using 'echo' in these cases.
* bin/Makefile.am $(bin_SCRIPTS): Rewrite to avoid 'echo' entirely.
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Likewise.
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* bin/autoconf.as: Use AS_ECHO rather than plain echo, when the
argument might be unportable.
* lib/autoconf/c.m4 (AC_PROG_CC_C_O): Likewise.
* lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Likewise.
* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT):
(_AC_FC_LIBRARY_LDFLAGS): Likewise.
* lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE, _AC_INIT_PREPARE):
(_AC_ARG_VAR_VALIDATE, AC_ARG_PROGRAM, _AC_MSG_LOG_CONFTEST):
(AC_RUN_LOG, _AC_RUN_IFELSE, _AC_LIBOBJS_NORMALIZE): Likewise.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Likewise.
* lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Likewise.
* lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH):
(AC_PROG_MAKE_SET): Likewise.
* lib/autoconf/status.m4 (_AC_SRCDIRS, _AC_OUTPUT_HEADER):
(_AC_OUTPUT_SUBDIRS, _AC_OUTPUT_CONFIG_STATUS): Likewise.
* lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT, AT_INIT):
(AT_CLEANUP, _AT_DECIDE_TRACEABLE, _AT_CHECK): Likewise.
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE, _AS_ECHO_UNQUOTED):
(_AS_BASENAME_SED, _AS_DIRNAME_SED, AS_MKDIR_P, AS_TMPDIR, AS_UNAME):
(AS_TR_SH, AS_TR_CPP, AS_VAR_GET): Likewise.
* bin/autoconf.as: Redo verbose flag implementation, as the old
scheme wouldn't work with AS_ECHO.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/general.m4 (AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED):
Don't use ECHO_T, since ECHO_N is now reliable.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use sed "$script"
rather than using a here-document to put the script into a file.
(_AC_DO_ECHO): Hoist the eval out of the echo, so that we can
use AS_ECHO.
* lib/m4sugar/m4sh.m4 (AS_VAR_GET): Likewise.
* lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Use
AS_ECHO_N rather than ECHO_N and ECHO_C. This doesn't fix any
bug, but we might as well stop using ECHO_N and ECHO_C internally.
* lib/autotest/general.m4 (AT_SETUP): Likewise.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_N): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS):
(_AC_OUTPUT_MAIN_LOOP): Rework echo so that it has just one
operand, as AS_ECHO requires. Avoid double file name expansion.
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke _AS_ECHO_PREPARE.
Don't set as_nl, since _AS_ECHO_PREPARE does that now.
(_AS_PREPARE): Comment that _AS_ECHO_N_PREPARE is just for user code.
(AS_ECHO, AS_ECHO_N, _AS_ECHO_PREPARE): New macros.
* tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC):
Double-quote strings that would otherwise contain M4 comments.
* tests/m4sh.at (AS_ECHO and AS_ECHO_N): New test.
code for --enable, --disable, --with, and --without to...
(_AC_INIT_PARSE_ENABLE): ... a new macro.
* doc/autoconf.texi (Package Options):
* NEWS: Document that AC_ARG_ENABLE allows dots, too.
2006-11-13 Bruno Haible <bruno@clisp.org>
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): For --with, --without
options, transliterate also dots to underscores.
(_AC_ENABLE_IF): Transliterate also dots to underscores.
* doc/autoconf.texi (External Software): Document that AC_ARG_WITH's
first argument may also contain dots.
ac_cv_type_long_long_int to 'yes' instead of 'cross-compiling'.
Imported from a similar patch to gnulib by Bruno Haible.
2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
* lib/autotest/general.m4 (AT_INIT): M4-quote and AS_ESCAPE AT_help_all
properly.
(AT_SETUP): M4-quote and AS_ESCAPE the title properly everywhere.
* tests/autotest.at (AT_CHECK_AT_TITLE): Add EXPANDED-TITLE-TO-TEST
argument. Extend to check titles printed by ./micro-suite and
./micro-suite -l and the title in micro-suite.log.
(Backquote in a test title,
Single-quote in a test title,
Double-quote in a test title): Don't expect failure anymore.
(Backslash in a test title): Put a non-whitespace character after the
backslash so that Bourne shells might actually see it as an escape
sequence.
(Brackets in a test title,
Pound in a test title,
Comma in a test title,
Quoted Macro in a test title,
Macro in a test title,
Macro with single-quote in a test title): New tests.
(Macro with backquote in a test title,
Macro with double-quote in a test title,
Macro with backslash in a test title): New tests expected to fail.
* tests/torture.at (#define header templates): M4-quote this title in
AT_SETUP call so that no M4 code is commented inadvertently somewhere.
The visible effect was a stray [] in the testsuite output.
If FUNCTION-BODY is nonempty, use AC_LINK_IFELSE rather than
AC_COMPILE_IFELSE, to work around problem with OSF/1 4.0F fseeko
reported by Nelson H. F. Beebe for Coreutils 6.4.
* doc/autoconf.texi (Caching Results): Likewise.
* lib/autoconf/general.m4 (_AC_CACHE_CHECK_INT): Renamed from
AC_CACHE_CHECK_INT, since it's no longer public.
* lib/autoconf/types.m4: All uses of AC_CACHE_CHECK_INT changed.
* tests/base.at (AC_COMPUTE_INT): Test this, not AC_CACHE_CHECK_INT.
looking for special shell characters.
* lib/autoconf/functions.m4 (AC_CHECK_FUNC): Do not expand the
macro defined by AS_VAR_PUSHDEF before passing it as a
parameter.
* lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL):
* lib/autoconf/libs.m4 (AC_SEARCH_LIBS, AC_CHECK_LIB):
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER):
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL):
(_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_DIRENT):
Likewise.
* lib/autotest/general.m4 (AT_INIT): Quote parameters of
AS_VAR_* properly.
* tests/m4sh.at (AS_LITERAL_IF): New test.
* build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
which incorrectly sets the mode of an existing destination
directory. In some cases the unpatched install-sh could do the
equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
system. We hope this is rare in practice, but it's clearly worth
fixing. Problem reported by Alex Unleashed in
<http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
Also, don't bother to check for -m bugs unless we're using -m;
suggested by Stepan Kasal.
2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
Import this change from Automake:
2006-08-23 Alexandre Duret-Lutz <adl@gnu.org>
* lib/Autom4te/ChannelDefs.pm (usage): Mention that -Wportability
is enabled by default with gnu and gnits strictness.
Report from Bruno Haible.
2006-03-10 Alexandre Duret-Lutz <adl@gnu.org>
* lib/Autom4te/ChannelDefs.pm: Make -Wportability the default in
gnu and gnits modes.
Import this change from Config:
2006-09-20 Ben Elliston <bje@gnu.org>
* build-aux/config.sub (score, score-*): New.
Import this change from Gnulib:
2006-09-16 Karl Berry <karl@gnu.org>
* doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
to avoid sectioning errors.
Import these changes from Texinfo:
2006-10-04 Karl Berry <karl@gnu.org>
* build-aux/texinfo.tex (\singlequotechar): rename to \codequoteright.
(\quoteexpand): rename to \rquoteexpand.
(\codequoteleft): new def, to look for @set codequotebacktick.
(\lquoteexpand, \quoteexpand): new defs.
(\lquoteChar, \rquoteChar, \dashChar, \underChar: new \chardef's.
(\code): must use new \...Char values, since now ` is active.
2006-08-26 Karl Berry <karl@gnu.org>
* build-aux/texinfo.tex (\textdegree): New command.
2006-08-12 Karl Berry <karl@gnu.org>
* build-aux/texinfo.tex (error \box0): smaller font.
(AS_EXECUTABLE_P): Use as_test_x rather than as_executable_p.
(_AS_TEST_PREPARE): Set as_test_x rather than as_executable_p.
Use a better substitute, by inspecting the output of "ls"
rather than just using ":".
* lib/autoconf/general.m4 (_AC_LINK_IFELSE): Use AS_TEST_X
rather than AS_EXECUTABLE_P, since we needn't worry about
non-regular files here.
due to configuration hassles with this. See Tonya Underwood's report
<http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00003.html>.
* doc/autoconf.texi (Special Shell Variables): Likewise.
2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
Stepan Kasal <kasal@ucw.cz>
* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH.
(_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix.
2006-10-11 Stepan Kasal <kasal@ucw.cz>
* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Move the
initialization which is not inherited through the environment
(_AS_BOURNE_COMPATIBLE): ... to this new macro.
(_AS_RUN): Call _AS_BOURNE_COMPATIBLE, not AS_BOURNE_COMPATIBLE.
comment about ac_cpp_err; it was incorrect, and anyway
ac_cpp_err is being removed below.
* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE): Don't
set ac_cpp_err to 'yesyes' if preproc_warn_flag and werror_flag
are both 'yes'. In fact, don't bother setting ac_cpp_err at all;
nobody uses it.
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't log our funky tests
with werror_flag and conftest.err and so forth. This is more
compatible with how _AC_PROG_PREPROC_WORKS_IFELSE behaves,
and anyway the user shouldn't normally want to see this gorp logged.
Problem reported by Ralf Wildenhues.
* lib/autoconf/lang.m4 (AC_LANG_WERROR): werror_flag's default is
empty, not 'no', since the rest of the code uses 'test -z'.
shel scripts no longer export BIN_SH, due to configuration
hassles with this.
* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH
or DUALCASE.
(_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix.
Use AS_EXECUTABLE_P rather than test -f.
(AS_SHELL_SANITIZE): Set DUALCASE.
(AS_EXECUTABLE_P): Just invoke as_executable_p.
(_AS_TEST_PREPARE): Default to test -f, rather than to nothing.
fseeko testing program twice; just use the earlier result.
* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE):
Set cache var to 'unknown' (not 'no') if leaving the macro unset
still doesn't let the program compile.
(AC_SYS_LARGEFILE): Test for _LARGE_FILES only if earlier tests
failed.
* lib/autoconf/functions.m4: Fix problems reported by Ralf Wildenhues.
(AC_FUNC_ERROR_AT_LINE): Don't bother to check for error.h. Just
include it, without including anything else.
(AC_FUNC_FSEEKO): Avoid gcc -Wall warnings about constant
expressions.
(AC_FUNC_STRNLEN): Require AC_USE_SYSTEM_EXTENSIONS.
* lib/autoconf/functions.m4 (AC_FUNC_ERROR_AT_LINE): Check for
`error.h', and include it, for a `error_at_line' prototype.
Use a nonempty format string in the link test.
* lib/autoconf/functions.m4 (AC_FUNC_WAIT3): Include <sys/wait.h>,
for a declaration of wait3.
warnings (uninitialized value).
(AC_FUNC_UTIME_NULL): Likewise, test for and include <utime.h> if
present.
* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Likewise, add
parentheses.
(AC_STRUCT_TM): Likewise, avoid unused variables.
argument to `--prefix' for sub-configure scripts.
Pass `--silent' to sub-configure scripts.
* tests/torture.at (Configuring subdirectories): Add tests
for both changes.
* doc/autoconf.texi (Setting Output Variables): Fix example to
not show `--silent' being passed to a `configure' re-run.
* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Do not check
for the existence of the directory at configure-time. That's
too late, anyway, and possibly the directory isn't part of the
distribution. Problem reported by Stefan Seefeld.
to catch glibc bug 2821
<http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
Merge from gnulib as follows: Use AC_CHECK_HEADERS_ONCE instead of
AC_CHECK_HEADERS, and likewise for AC_CHECK_FUNCS_ONCE and
AC_CHECK_FUNCS. Don't check for stdlib.h, since we now
assume C89.
f90/f95 because the latter drivers of AIX Fortran 9.1 do not
accept files with extension `.f'. For consistency, also prefer
xlf over f77.
* doc/autoconf.texi (Fortran Compiler): Remove mention of bug
from last patch.
old AC_COMPUTE_INT, which now behaves like _AC_COMPUTE_INT
except the first two arguments are reversed.
* doc/autoconf.texi (Caching Results): New macro AC_CACHE_CHECK_INT.
(Generic Compiler Characteristics): AC_COMPUTE_INT no longer
caches nor outputs a diagnostic. Suggested by Bruno Haible.
* lib/autoconf/general.m4 (AC_CACHE_CHECK_INT): New macro,
equivalent to the old AC_COMPUTE_INT.
(AC_COMPUTE_INT): No longer caches or reports. New signature.
All uses changed to AC_CACHE_CHECK_INT.
* tests/base.at (AC_CACHE_CHECK_INT): New test.
* tests/mktests.sh (ac_exclude_lsit): Add AC_CACHE_CHECK_INT.
* doc/autoconf.texi (Particular Programs): YYTEXT_POINTER is
for the default, which the user can override.
* lib/autoconf/programs.m4 (AC_PROG_LEX): Let _AC_PROG_LEX_YYTEXT_DECL
deal with LEXLIB.
(_AC_PROG_LEX_YYTEXT_DECL): Handle caching correctly; the old code
didn't work if some values were cached but not others. Test for
broken lex libraries like native ia64-hp-hpux11.22; see
<http://sources.redhat.com/ml/binutils/2003-12/msg00337.html>, and
work around the problem by preferring an empty LEXLIB to -lfl or
-ll. Let the user set LEXLIB='' to indicate no library needed.
Many files are renamed; all uses of their names were changed.
* .x-sc_trailing_blank: Renamed from .x-sc_trailing_blank.
* .x-sc_useless_cpp_parens: New file.
* build-aux/config.guess: Renamed from config/config.guess. Update.
* build-aux/config.sub: Renamed from config/config.sub. Update.
* build-aux/elisp-comp: Renamed from config/elisp-comp.
* build-aux/install-sh: Renamed from config/install-sh. Update.
* build-aux/mdate-sh: Renamed from config/mdate-sh.
* build-aux/missing: Renamed from config/missing.
* build-aux/texinfo.tex: Renamed from config/texinfo.tex. Update.
* build-aux/vc-list-files: Renamed from config/vc-list-files.
* config/Makefile.am: Removed.
* config/mkinstalldirs: Removed.
* config/move-if-change: Removed.
* m4/m4.m4: Renamed from config/m4.m4. Add (C) to copyright notice.
* Makefile.am (SUBDIRS): Remove config.
(ACLOCAL_AMFLAGS): Include from m4, not config.
(EXTRA_DIST): Add config/announce-gen, config/prev-version.txt.
(WGET, WGETFLAGS): New macros, since Makefile.maint no longer does this.
(autom4te-update): Rewrite with a loop. Get from gnulib, not automake.
Fail if there's an error.
* Makefile.cfg (move_if_change): Remove.
(wget_files): Remove.
(cvs_executable_files): New macro.
(cvs_files): Use it. Remove mkinstalldirs. Add fdl.texi.
(executable-update): Use $(cvs_executable_files).
(local-checks-to-skip): Remove.
* Makefile.maint: Merge from coreutils, plus add our own changes
(gzip_rsyncable): New macro.
(GZIP_ENV): Use it.
(CVS_LIST): Use build-aux/vc-list-files.
(VERSION_REGEXP): New macro.
(local-checks-available): Add patch-check, $(syntax-check-rules),
check-AUTHORS.
(syntax-check-rules): Compute dynamically.
(sc_cast_of_x_alloc_return_value): Work even if no source files.
(sc_cast_of_alloca_return_value): Likewise.
(sc_prohibit_atoi_atof): Simplify regexp.
(sc_no_if_have_config_h, sc_require_config_h):
(sc_prohibit_assert_without_use,
(sc_obsolete_symbols): Check for O_NDELAY.
(sc_texi_notab): Remove.
(sc-changelog): Don't make an exception for '----' lines.
(.re-list): Remove, so we don't have a junk file behind.
(sc_system_h_headers): Remove the need for .re-list.
(sc_the_the): New rule.
(sc_tight_scope): Simplify.
(sc_trailing_space): Renamed from sc_trailing_blank.
(longopt_re): New macro.
(sc_two_space_separator_in_usage): New rule.
(sc_unmarked_diagnostics): Look at all files under CVS.
(sc_useless_cpp_parens, patch-check, check-AUTHORS): New rules.
(news-date-check, changelog-check): Version is OK.
(po-check): Look for lib files even if not in CVS.
(copyright-check): Use $() not ``.
(maintainer-distcheck): Do not depend on changelog-check.
(my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
Also check for -Wpointer-arith.
(WGET, WGETFLAGS, tgz-md5, tgz-sha1, bz2-md5, bz2-sha1):
(xdelta-md5, xdelta-sha1, tgz-size, bz2-size, xd-size, rel-check):
Remove.
(announcement): Add --gpg-key-id arg.
(cvs-sv): Remove.
(move_if_change): Just use mv.
(local_updates: Remove wget-update, po-update.
(po_repo, do-po-update, po-update, wget_files, get-targets): Remove.
(config.guess-url_prefix, config.sub-url_prefix): Remove.
(ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
(standards.texi-url_prefix, make-stds.texi-url_prefix, target, url):
($(get-targets)): Remove.
(cvs_files): Remove missing, mkinstalldirs, ansi2knr.c.
(gnulib_repo): Renamed from automake_repo. Get from gnulib now.
(cvs-update): Get from gnulib.
(emut_upload_commands): gnupload is in build-aux now.
(alpha beta major): Add changelog-check. Check version.
* configure.ac (AC_CONFIG_AUX_DIR): Renamed from config to build-aux.
(AC_CONFIG_FILES): Remove.
* bin/autoconf.as: Add spaces to avoid distcheck warning.
* config/announce-gen: Sync from coreutils.
* doc/make-stds.texi: Sync from gnulib.
* doc/standards.texi: Likewise.
* man/Makefile.am: Adjust for config -> build-aux renaming.
* tests/Makefile.am: Prefer $(FOO) to @FOO@.
* tests/local.at: Adjust from config -> build-aux renaming.
* tests/tools.at: Likewise.
* tests/torture.at: Likewise.
rather than "#if HAVE_STDLIB_H", so that it now works with "gcc
-Wundef -Werror". Problem reported by David Fang in
<http://lists.gnu.org/archive/html/autoconf/2006-08/msg00045.html>.
* doc/autoconf.texi (Header Templates, Default Includes):
(Particular Functions, Generic Functions, Header Portability):
(Particular Headers, Generic Headers, Generic Declarations, Guidelines):
(Obsolete Macros, AC_FOO_IFELSE vs AC_TRY_FOO):
(Present But Cannot Be Compiled, Preprocessor Symbol Index):
Prefer #ifdef to #if.
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prefer #ifdef to #if.
* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, _AC_FUNC_MALLOC_IF):
(AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF):
(AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETVBUF_REVERSED, _AC_FUNC_VFORK):
Likewise.
* lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
(AC_HEADER_RESOLV, AC_HEADER_STAT): Likewise.
* lib/autoconf/specific.m4 (AC_DECL_SYS_SYGLIST):
(AC_SYS_RESTARTABLE_SYSCALLS): Likewise.
* lib/autoconf/types.m4 (AC_STRUCT_TIMEZONE): Likewise.
* lib/autoconf/headers.m4 (AC_HEADER_STAT): Don't assume that
S_ISDIR etc. are valid for use in #if; POSIX doesn't guarantee
this.
<http://lists.gnu.org/archive/html/bug-autoconf/2006-08/msg00005.html>.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't claim
the compiler created a file "b.out" when it didn't create anything
at all.
* lib/autoconf/specific.m4 (AC_SYS_INTERPRETER):
Discard stderr too, when invoking the test script.
datarootdir-related errors only if AC_DATAROOTDIR_CHECKED is
not defined.
* doc/autoconf.texi (Changed Directory Variables): New node,
to document the whole `datarootdir' business a bit better.
* NEWS: Update.
* tests/torture.at (datarootdir workaround): Extend test.
Prompted by report by Alexandre Julliard.
calls, so that we do not care whether they are LIFO or FIFO;
in the m4_wrap, do not check which diversion is the topmost
one, just check that the stack is balanced at the end.
* lib/m4sugar/m4sh.m4 (AS_INIT): We are going to change the
base diversion forever--pop the previous diversion before
opening the new one; consequently, remove the m4_wrap call.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* tests/m4sugar.at: Do not use
m4_wrap([m4_diversion_pop([..])]), for educational purposes.
to `yes' instead of `int$1_t' if the type is found, for more
consistent configure output (where $1 is the number of bits).
(_AC_TYPE_UINT): Likewise for `uint$1_t'.
Suggested by Bruno Haible.
message issued by AC_REQUIRE.
* tests/m4sugar.at: Check m4_require's error message.
* tests/base.at: Check AC_REQUIRE's error message.
* tests/local.at (AT_CHECK_M4): New macro, almost identical
to...
(AT_CHECK_AUTOM4TE): ... which is now a thin wrapper around
AT_CHECK_M4.
(AT_CHECK_AUTOCONF): Use AT_CHECK_M4; no longer support
`expout' as the last parameter.
* tests/tools.at: Adapt to the above change.
about quoting the case statement, just in case.
* doc/autoconf.texi (Particular Programs) <AC_PROG_MKDIR_P>:
Document that ${MKDIR_P} understands --.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the
comment.
since evidently some packages rely on the old, broken behavior.
Problem reported by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00160.html>.
(AC_TRY_EVAL, AC_TRY_COMMAND, _AC_EVAL): Go back to the
pre-2006-05-26 definitions, but leave in the comments that
these macros are dangerous and should not be used.
(_AC_DO_ECHO): Renamed from _AC_EVAL_ECHO. All callers changed.
(_AC_DO): Renamed from _AC_EVAL. All callers changed.
(_AC_DO_STDERR): Renamed from _AC_EVAL_STDERR. All callers changed.
(_AC_DO_VAR): Renamed from AC_TRY_EVAL.
(_AC_DO_TOKENS): Renamed from AC_TRY_COMMAND.
mention of `datarootdir' in the input file(s), but literal
`${datarootdir}' in the output file, and we haven't warned yet,
then warn as well: the user may have (erroneously) used
`AC_SUBST([mydatadir], [$datadir/my])' instead of the correct
`AC_SUBST([mydatadir], ['${datadir}/my'])'.
* tests/torture.at (datarootdir workaround): Extend this test.
* NEWS: Update.
Use better wording to talk about AC_PROG_MKDIR_P's thread-safety.
Don't use the term "thread-safe" to talk about mkdir race
conditions, since the problem is more a process than a thread
issue. Problem reported by Stepan Kasal in:
http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00088.html
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Use code that mimics
the test for 'install' more closely. Look at MKDIR_P first.
Look in the PATH, and at /opt/sfw/bin.
Look for a 'gmkdir' program as well (Solaris 10 /opt/sfw/bin/gmkdir).
Don't bother to try mkdir -p, since we already check mkdir --version;
just look at the version number. (There's no easy way to check
for race-free implementations.)
* tests/tools.at (autoconf: subdirectories): Adjust to above
changes, since MKDIR_P now might end in "/mkdir -p".
* doc/autoconf.texi (Special Chars in Variables): New section.
(Preset Output Variables): Warn about special chars in CPPFLAGS.
(Installation Directory Variables): Quote $(datadir) better.
(Limitations of Builtins): Describe some of eval's trickiness.
* lib/autoconf/c.m4 (AC_PROG_CC_C_O): Simplify quoting.
* lib/autoconf/fortram.m4 (_AC_PROG_FC_V_OUTPUT): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put leading space
in front of every arg, not just trailing args. Quote apostrophes.
(_AC_EVAL_ECHO): New macro.
(_AC_EVAL, AC_EVAL_STDERR): Use it. Quote arg of eval.
(AC_TRY_EVAL, AC_TRY_COMMAND): Mention that these macros might get
removed.
(_AC_LINK_IFELSE): Use proper rule for shell continuation lines,
exposed by quoting of eval argument. Put the command on line line
so it logs better.
* lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Use eval more safely.
(_AC_PATH_X, AC_PATH_X): Quote more safely.
* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Use eval more safely.
* lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Don't use eval.
* lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Minor style change.
Handle special chars in prefix, ac_srcdir, ac_aux_dir.
Use eval more safely.
(_AC_OUTPUT_CONFIG_STATUS): Adjust to above changes.
* lib/m4sugar/m4sh.m4 (AS_VAR_GET): Note that this API needs
to be replaced.
* tests/base.at (AC_TRY_COMMAND): Use proper rule for shell continuation
lines, exposed by quoting of eval argument.
initialization of `ac_cv_exeext', do not override it if it was
already set, unless it was set to `no', for compatibility with
Autoconf-2.13, and comment this.
Do not export `ac_cv_exeext', Libtool hasn't needed this for years.
(_AC_COMPILER_EXEEXT_DEFAULT): Likewise, do not export it.
(_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_CROSS): Typos.
* doc/autoconf.texi (Compilers and Preprocessors) <EXEEXT>:
Document that this test may be overridden by setting
`ac_cv_exeext'.
2006-04-06 Eric Blake <ebb9@byu.net>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache
check, s/ac_exeext/ac_cv_exeext/. Fixes regression introduced
2006-04-01.
2006-04-01 Stepan Kasal <kasal@ucw.cz>
Clean up _AC_COMPILER_EXEEXT* macros.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't try to
detect exeext, it will be done by _AC_COMPILER_EXEEXT_O; just set
ac_file to the name of the default output file and call
_AC_COMPILER_EXEEXT_WORKS. Move the definition of ac_files and the
initial `rm' of the candidate files...
(_AC_COMPILER_EXEEXT): ... here and simplify them. Moreover, use
the same list in subsequent `rm' calls, and for the temporary
redefinition of ac_clean_files; call _AC_COMPILER_OBJEXT at the end,
and don't call the other _AC_COMPILER_EXEEXT_* macros directly, use...
(_AC_COMPILER_EXEEXT_TESTS): ... this new macro.
(_AC_COMPILER_EXEEXT_O): Don't export ac_cv_exeext, it's not needed (or
no longer needed) by libtool. Make it a cache check.
(_AC_COMPILER_EXEEXT_CROSS): Remove the comment, it was obviously
copied here by mistake.
(AC_NO_EXECUTABLES): Redefine _AC_COMPILER_EXEEXT_TESTS, not
_AC_COMPILER_EXEEXT.
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Do not call
_AC_COMPILER_OBJEXT directly.
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
* lib/Autom4te/XFile.pm (lock): Allow EOPNOTSUPP, besides
ENOLCK. Only mention `make -j' when applicable. Only raise
fatal errors when `make -j' is involved. Improve error message.
expansion in the here-documents used by config.status, as that
runs afoul of the Korn shell version M-12/28/93d bug described in
the Autoconf manual, and this in turn causes a Coreutils 5.95 build to
fail as described by Tim Rice and diagnosed by Ralf Wildenhues in
<http://lists.gnu.org/archive/html/bug-autoconf/2006-05/msg00082.html>.
ac_dB slightly, to save bytes in the script.
Max out at 50 lines, rather than 96; this is more likely
(though not guaranteed) to avoid obscure 'sed' failures.