Commit Graph

997 Commits

Author SHA1 Message Date
Akim Demaille
a7010bd78c * acgeneral.m4 (AC_INCLUDES_DEFAULT): Force the newline to avoid
bad surprises.
Reported by Jim.
2001-01-18 09:16:25 +00:00
Akim Demaille
722c1a86a0 Require a perfect divert push/pop balance.
* m4sugar.m4 (m4_divert, m4_divert_push, m4_divert_pop): Keep
track of them in m4_divert_stack.
(m4_divert_pop): Accept the expected current diversion as
argument and m4_fatal if incorrect, or if there is nothing to pop.
(globally): Specify the known m4_divert_pop.
Preserve symbolic values when possible.
* acgeneral.m4: No longer push the first diversion.
Specify the known m4_divert_pop.
(AC_PLAIN_SCRIPT): When m4_divert_push a diversion, m4_wrap its
pop.
(AC_INIT): Run AC_PLAIN_SCRIPT first, not last.
* tests/m4sh.at (AS_DIRNAME & AS_DIRNAME_SED): Can't use m4_defun
without m4_init.
* m4sugar.m4: Likewise.
2001-01-18 09:16:08 +00:00
Akim Demaille
f81b72c915 * m4sugar.m4 (m4_defn, m4_undefine, m4_popdef): Unlike the
builtin, fail on undefined symbols.
* tests/torture.at (Torturing config.status): Stop playing nasty
tricks with changequote.
(AC_DEFUBST): Move here from...
* tests/aclocal.m4: there.
2001-01-18 09:15:52 +00:00
Akim Demaille
70b6f5cc93 Various cleanups and consistency checks.
* m4sugar.m4: Formatting changes.
* acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE)
(AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR):
Use m4_copy to define them, in order to keep a good $0.
(AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack.
* aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros.
(AC_LANG_POP): Admit an argument specifying the language we quit
when popping.
Adjust Autoconf's AC_LANG_POPs.
* tests/tools.at (AWK portability): Don't depend on AC_INIT.
(autoconf --trace: user macros): Obviously I
meant TRACE1, not AC_TRACE1.
2001-01-18 09:15:31 +00:00
Akim Demaille
8a3c7070bd * m4sugar.m4 (m4_undefine, m4_popdef): Don't tolerate undefined
arguments.
(_m4_expansion_stack): Rename as...
(m4_expansion_stack): this, and change its value: instead of using
the pushdef stack to stack each *line* of the stack, each
definition contains the whole stack.  I.e., to display the whole
stack, instead of popdefing and displaying each definition, just
display the current definition.
(m4_expansion_stack_push, m4_expansion_stack_pop): New.
* tests/atspecific.m4 (AT_CHECK_AUTOCONF): Let $2 be the expected
exit status.
* tests/m4sugar.m4 (m4_require: circular dependencies): New test.
2001-01-17 15:26:42 +00:00
Pavel Roskin
23ef1d703a * m4sugar.m4 (m4_normalize): New macro - superposition of
m4_flatten and m4_strip.
(m4_join): Use m4_normalize.
* acgeneral.m4 (AC_FOREACH): Use m4_normalize.
(AC_CONFIG_HEADERS): Normalize the first argument.
(AC_CONFIG_LINKS): Likewise.
(AC_CONFIG_SUBDIRS): Likewise.
2001-01-17 15:23:31 +00:00
Akim Demaille
6da34540fe * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Quote $ac_sub_srcdir in case
it has IFS characters.
2001-01-17 08:54:52 +00:00
Akim Demaille
9cb72c7248 Work around the Ultrix limitations on ``multiple redirections''.
Reported by Harlan Stenn.
* acgeneral.m4 (_AC_EVAL_STDERR): New.
(_AC_PREPROC_IFELSE): Use it.
2001-01-16 20:46:00 +00:00
Akim Demaille
8448b8f911 * tests/atgeneral.m4 (AT_data_files): Fix the computation of PATH. 2001-01-16 13:48:55 +00:00
Akim Demaille
b0f816c05c * acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Eve out from AC_OUTPUT.
(_AC_INIT_DEFAULTS, AC_OUTPUT): Use it.
2001-01-16 10:46:37 +00:00
Akim Demaille
10498c169e * doc/autoconf.texi: Lots of additions and changes.
(File Descriptors): New.
(Limitations of Make): New.
2001-01-16 10:45:22 +00:00
Akim Demaille
4c6ce32f58 * m4sh.m4 (AS_EXIT): Don't rely on exit == exit $?.
Reported by Tim Van Holder.
2001-01-16 10:27:19 +00:00
Akim Demaille
e2e36c55ce * Makefile.am (editpl, editsh): Merge into...
(edit).
* m4sh.m4 (AS_UNAME): Eved out from...
* acgeneral.m4 (_AC_INIT_DEFAULTS): here.
(_AC_INIT_PACKAGE): Define AC_PACKAGE_NAME.
(_AC_INIT_PARSE_ARGS): AC_SUBST the PACKAGE_ variables.
Propagate their use in the executables and the test suite.
* tests/atgeneral.m4 (PATH): Include only absolute paths.
(AT_INIT): Use AS_UNAME.
2001-01-16 10:25:57 +00:00
Akim Demaille
3becb30f56 When default headers are used, check for their presence.
Suggested by Jim.
* acgeneral.m4 (_AC_INIT_DEFAULTS): Don't define
ac_includes_default, since...
(_AC_INCLUDES_DEFAULT_REQUIREMENTS): this new macro does.
(AC_INCLUDES_DEFAULT): Require the former when default includes
are used.
(AC_CHECK_MEMBERS, _AC_CHECK_TYPE_NEW): Don't require
AC_HEADERS_STDC, that's a job for stupendous AC_INCLUDES_DEFAULT.
* acfunctions.m4 (AC_FUNC_MALLOC): Check for stdlib.h.
2001-01-16 10:21:44 +00:00
Akim Demaille
05ee2bf953 * tests/atgeneral.m4 (AT_INIT): Simplify the hairy display of the
identity of the tests.
2001-01-15 07:38:35 +00:00
Akim Demaille
b508b51fb8 * tests/atgeneral.m4 (AT_INIT): When the suite failed, complain
before creating the debug scripts.
Create a log file.
When ignoring a test, display a reassuring `ok' for stressed
users, and say `skipped' instead.
Simply run `testsuite' with the failed tests instead of running
the debug scripts, this avoids having zillions of banners `Testing
Blabla 2.13' (another means to avoid these banners is to have the
test suite succeed :-).
2001-01-15 07:35:36 +00:00
Akim Demaille
bd16bfa0e3 * sh.m4 (AS_BOX, _AS_BOX_LITERAL, _AS_BOX_INDIR): New.
* tests/atgeneral.m4: Use it.
2001-01-15 07:29:48 +00:00
Akim Demaille
59ecd7666a * acgeneral.m4 (AC_VAR_INDIR_IFELSE): Move as...
* m4sh.m4 (AS_LITERAL_IF): this.
(AS_IFELSE): Rename as...
(AS_IF): this.
2001-01-15 07:29:24 +00:00
Akim Demaille
55953c9b14 With expr's that return 0' on failures, the executable suffix is
`0'.  Test and fix.
Reported by Assar Westerlund.

* Makefile.am (maintainer-check): New target.
* tests/Makefile.am (maintainer-check, maintainer-check-posix)
(maintainer-check-c++, expr): Likewise.
* configure.in (EXPR): Look for it.
* tests/atgeneral.m4 (AT_CHECK): Propagate $2's default value.
* tests/compile.at (Extensions): New test.
* aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O):
Distinguish files with or without a dot.
2001-01-12 09:39:26 +00:00
Akim Demaille
5058e82d54 * acgeneral.m4: Last changes for `configure.ac'.
(_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Take `configure.ac' into
account.
* autoreconf.sh: Likewise.
2001-01-12 09:19:59 +00:00
Akim Demaille
bd132b191d * acfunctions.m4 (AC_FUNC_MEMCMP): Missing comma in AC_TRY_RUN
invocation.
2001-01-11 16:12:00 +00:00
Akim Demaille
e20443008d * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): New.
(AC_PROG_CC, AC_PROG_CXX): Use it.
(AC_PROG_CC_STDC): Be sure to remove tmp files.
* tests/compile.at (AC_TRY_LINK_FUNC): Don't use exit to test it,
since it produces a prototype which conflicts with the one
computed by _AC_PROG_CXX_EXIT_DECLARATION.
* tests/semantics.at (AC_CHECK_FUNCS, AC_HAVE_FUNCS): Likewise.
(AC_HAVE_FUNCS): Test AC_HAVE_FUNCS!
2001-01-11 15:17:13 +00:00
Akim Demaille
36535d5360 * aclang.m4 (AC_PROG_F77): Add pgf90 to the list of compilers to
look for, after the other Fortran 90 compilers.
2001-01-11 14:13:59 +00:00
Akim Demaille
616dba6d84 * aclang.m4: Use m4_copy to duplicate macros.
(AC_LANG_PUSH): In order to have AC_LANG's simplifications
effective, be sure to let _AC_LANG be the old language before
calling AC_LANG.
2001-01-11 10:06:39 +00:00
Akim Demaille
af3f563429 * acgeneral.m4 (_AC_EVAL, AC_TRY_EVAL, AC_TRY_COMMAND): Be a
single statement, so that one can make pipes with AC_TRYs, just as
in 2.13.
2000-12-22 10:12:26 +00:00
Akim Demaille
9282441bdb * aclang.m4 (_AC_COMPILER_OBJEXT, _AC_COMPILER_EXEEXT_O):
Make the order of arguments for ls count by splitting the ls
command into a sequence of ls commands.
2000-12-20 18:41:10 +00:00
Akim Demaille
edad08c3b2 * aclang.m4 (_AC_LANG_COMPILER_GNU): Use a tabulation to indent
`choke me' so that the SGI Fortran compiler really chokes on it.
From Ezra Peisach.
2000-12-20 17:31:22 +00:00
Akim Demaille
be42075f17 * tests/atgeneral.m4 (AT_CLEANUP_FILE_IFELSE): Fix the regexp: the
pattern ` state* ' was added many times for `*' was improperly
escaped.
(AT_INIT): Remove the data files before running the tests.
Define AT_data_files and output it.
(AT_SETUP): Don't.
(_m4_divert(TEST)): Remove, now useless.
2000-12-20 09:15:59 +00:00
Akim Demaille
fcd3a4ac50 * aclang.m4: `dnl' the AC_LANG_PUSH and AC_LANG_POP.
(AC_PROG_CXXCPP, AC_PROG_CPP): Set the current language instead of
just asserting it, since these macros can be called directly.
Reported by Raja R. Harinath.
2000-12-20 09:13:54 +00:00
Akim Demaille
9d8c8ee03c * aclang.m4 (_AC_COMPILER_OBJEXT): Don't rely on
_AC_COMPILE_IFELSE which uses ac_objext in a `test -s'.
Reported by Lars J. Aas.
2000-12-19 11:02:36 +00:00
Akim Demaille
ccd5ae270c * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): New.
(_AC_COMPILER_EXEEXT_O): Extracted from...
(_AC_COMPILER_EXEEXT): here.  Adjust.
2000-12-19 09:32:54 +00:00
Akim Demaille
6804b0e12a * tests/atgeneral.m4 (AT_CHECK): Make exit status report more
visible.
* tests/atspecific.m4 (AT_CHECK_AUTOCONF): Support FLAGS, STDOUT
and STDERR.
(AT_CHECK_CONFIGURE): Support plenty, cleanup defs when needed.
Spread their use in the whole suite.
Simplify a few AT_CLEANUPs.
2000-12-19 08:15:48 +00:00
Akim Demaille
7fd0f6597d * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and
if-not-failed.
* tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to
dump config.log when configure failed.  Before, the log was
reported only on success.
2000-12-19 08:15:20 +00:00
Akim Demaille
ce736ccd6e * tests/atgeneral.m4 (AT_BANNER, AT_CLEANUP): Formatting changes. 2000-12-19 08:09:38 +00:00
Akim Demaille
a3b490cccf * aclang.m4 (AC_PROG_CXXCPP, AC_PROG_CPP): Require AC_PROG_CXX/CC. 2000-12-15 11:50:18 +00:00
Akim Demaille
2b6bd63255 * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77))
(AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_GCC_TRADITIONAL)
(_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_CC_STDC):
Don't use `${CC-cc}' since now the AC_REQUIRE machinery guarantees
that $CC is defined.  And if not, it's a bug which must be
observable.
* acspecific.m4 (AC_SYS_LARGEFILE): Likewise.
2000-12-15 07:49:13 +00:00
Akim Demaille
d1b71fdc7f * acgeneral.m4 (_AC_PREPROC_IFELSE): Use ac_status as set by
AC_TRY_EVAL.
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE): More alike,
using AS_IFELSE, and systematically AC_TRY_COMMAND when testing
something (for the logs).
2000-12-15 07:48:41 +00:00
Akim Demaille
dfe7f821d1 * aclang.m4 (_AC_PROG_PREPROC_WORKS): Use _AC_PREPROC_IFELSE.
* acgeneral.m4 (_AC_TRY_CPP): Its last use was that above, so
inline it into...
(_AC_PREPROC_IFELSE): here.
2000-12-15 07:48:17 +00:00
Akim Demaille
112b68ac15 * tests/atgeneral.m4 (AT_INIT): Forget about `-n'.
Adjust so that `./testsuite -h 1 2' explains only tests 1 & 2.
2000-12-15 07:47:45 +00:00
Akim Demaille
81bd474542 * acgeneral.m4 (_AC_EVAL): New.
(AC_TRY_EVAL, AC_TRY_COMMAND): Use it.
2000-12-15 07:47:29 +00:00
Akim Demaille
9dc8609370 * acgeneral.m4 (_AC_PREPROC_IFELSE, AC_PREPROC_IFELSE): New.
(AC_TRY_CPP): Use AC_PREPROC_IFELSE.
(AC_CHECK_MEMBER, AC_CHECK_DECL, _AC_CHECK_TYPE_NEW): Quote
properly.
* acheaders.m4 (AC_CHECK_HEADER): Quote properly, use
AC_PREPROC_IFELSE.
* acspecific.m4 (_AC_PATH_X_DIRECT): Use AC_PREPROC_IFELSE.
2000-12-15 07:47:02 +00:00
Akim Demaille
feec4913d1 * m4sugar.m4 (m4_init): Catch `dnl'. 2000-12-15 07:46:47 +00:00
Pavel Roskin
26ce6814c0 * m4sh.sh (AS_ERROR): Restore dnl at the end of the macro. 2000-12-15 07:09:41 +00:00
Akim Demaille
6c3edbb4c4 Put back AC_CYGWIN etc. under the responsibility of the
configure.in maintainer, but discourage its use.
* acspecific.m4 (_AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2): Rename as...
(AC_CYGWIN, AC_MINGW32, AC_EMXOS2): these.
AU defined on top of AC_CANONICAL_HOST and $host_os.
* tests/mktests.sh (update_exclude_list): Add AC_CYGWIN,
AC_MINGW32, and AC_EMXOS2.
2000-12-14 09:39:33 +00:00
Pavel Roskin
27853939be * m4sugar.m4 (m4_file_append): Add a newline after _m4eof,
otherwise _m4eof is appended to the output on FreeBSD 4.0.
* tests/atgeneral.m4 (AT_INIT): Avoid using unbalanced "y"
in sed, use "s" instead.
* tests/mktests.sh: Don't use ? in sed - it's a GNU extension.
Use separate patterns for A[CU]_DEFUN and AC_DEFUN_ONCE.
2000-12-13 14:53:51 +00:00
Akim Demaille
61231f5399 EXEEXT and OBJEXT don't need to know $CYGWIN etc.
* acspecific.m4 (AC_EXEEXT, AC_OBJEXT, _AC_EXEEXT, _AC_OBJEXT):
Move as...
* aclang.m4 (AC_EXEEXT, AC_OBJEXT, _AC_COMPILER_EXEEXT)
(_AC_COMPILER_OBJEXT): these.
(_AC_COMPILER_EXEEXT): Use _AC_LINK_IFELSE.
Don't depend upon $CYGWIN and the like.
(_AC_COMPILER_OBJEXT): Model after _AC_COMPILER_EXEEXT.
Skip more extensions.
Use _AC_COMPILE_IFELSE.
2000-12-13 12:36:54 +00:00
Pavel Roskin
7173ba3da5 * autoscan.pl (init_tables): Allow spaces on the right hand side
in autoscan tables. Die if there are no spaces at all.
(scan_c_file): Use b instead of W so that keywords match at
the beginning and the end of the line.
(scan_sh_file): Likewise.
(scan_makefile): Likewise. Use B to match before `-l'.
(output): Suggest AC_CONFIG_HEADER if any C/C++ sources are
found.
* acidentifiers: Update macros for structure members st_blksize
and st_rdev.
2000-12-12 12:45:41 +00:00
Akim Demaille
1088d101b2 AS_ERROR was not properly saving data in the log file.
* sh.m4 (AS_WARN, AS_ERROR): Use AS_MESSAGE.
(_AS_ECHO): Fix quotation.
(AS_MESSAGE): Use `as_me'.
* acgeneral.m4: More banners in the log.
(_AC_INIT_DEFAULTS): Compute as_me before using it.
2000-12-12 10:53:41 +00:00
Akim Demaille
1e5ec2a947 * tests/atgeneral.m4 (AT_INIT): More robust computation of
ac_tests_pattern.
Reported by  Andrej Borsenkow.
2000-12-07 16:21:58 +00:00
Akim Demaille
cce1813e74 * acspecific.m4 (_AC_EXEEXT): Skip *.pdb.
From Paul Berrevoets <paul@swi.com>.
2000-12-07 16:09:12 +00:00