Commit Graph

62 Commits

Author SHA1 Message Date
Akim Demaille
41f6c57a3e * tests/tools.m4 (autoconf --trace): New test. 2000-03-21 12:08:24 +00:00
Akim Demaille
134cd844f3 * tests/actest.m4 (AC_ENV_SAVE): Don't consider RANDOM and LINENO
which some shells update.
2000-03-14 08:59:11 +00:00
Akim Demaille
bc37b8f562 Typos in ChangeLog. 2000-03-13 15:31:26 +00:00
Akim Demaille
702e183cf6 Multiple `-e' to egrep are not portable. On IRIX 6.5 and Solaris
2.5.1 only the last one is honored:
  > echo "foonbar" | egrep -e 'foo' -e 'bar'
  bar
  > echo "foonbar" | egrep -e 'bar' -e 'foo'
  foo
Reported by Nicolas Joly.
An alternative would have to use `sed', unfortunately alternation
is not portable.

* tests/actest.m4 (join): New macro.
(AC_ENV_SAVE): Join the egrep patterns into a single big one.
* tests/Makefile.am (EGREP_EXCLUDE): Rename as FILTER_MACROS.
Join the egrep patterns into a single big one.
2000-03-10 15:22:13 +00:00
Akim Demaille
9c2aba3427 Fix a typo in ChangeLog.
Regenerate configure
2000-03-08 16:58:54 +00:00
Akim Demaille
0fa2ad4e0c * tests/Makefile.am (all-local): Remove. It wastes time to have
testsuite rebuilt each time an ac*.m4 file changes.  It is enough
to build it for each `make check'.
2000-03-08 16:12:09 +00:00
Akim Demaille
b0cf240330 Some tests are failing with srcdir != builddir, because they can't
find config.guess, install-sh etc.
Reported by Erez Zadok.

* tests/atspecific.m4 (AT_TEST_MACRO): Set AC_CONFIG_AUX_DIR to
top_srcdir in configure.in, and pass the value of top_srcdir to
configure.
2000-03-08 11:02:30 +00:00
Akim Demaille
3fd820a5b5 * tests/atspecific.m4 (m4_match): Remove, no longer used. 2000-03-06 08:48:48 +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
7a628f5092 The empty regexp cannot be portably used in egrep's alternation.
For instance with Digital Unix v5.0:
   > echo "foo"  | egrep -e "^(|foo|bar)$"
   > echo "|foo" | egrep -e "^(|foo|bar)$"
   |foo
   > echo "|bar" | egrep -e "^(|foo|bar)$"
   > echo "bar"  | egrep -e "^(|foo|bar)$"
   bar
Reported by Nicolas Joly.

* src/actest.m4 (AC_ENV_SAVE): s/(|EXTRA_|PRE_)/(EXTRA_|PRE_)?/.
2000-03-01 17:01:29 +00:00
Akim Demaille
e603fedec3 * tests/actest.m4 (AC_ENV_SAVE): Use multiple -e instead of
multiple egrep.
2000-03-01 11:28:02 +00:00
Akim Demaille
2b72cac902 Test suite: instead of using a full list of the AC macros and an
AT macro with selects which are the AC macros to test, just
produce the list of the AC macros we want to test.

* tests/atspecific.m4 (TEST_MACRO): Removed.
* tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the
selection TEST_MACRO used to do.
(macros.m4): Use it.  Use AT_TEST_MACRO, not TEST_MACRO.  Check
also AU macros.
2000-03-01 08:22:40 +00:00
Akim Demaille
6b6d1788b1 Test suite: more debugging information.
* tests/atspecific.m4 (AT_TEST_MACRO): When verbose, report the
content of config.log.
2000-02-29 08:51:42 +00:00
Akim Demaille
256a3c55e2 * doc/Makefile.am (MAKEINFO): s/makefino/@MAKEINFO@/.
* missing: chmod +x.
2000-02-28 10:20:50 +00:00
Akim Demaille
1ce240fbef * tests/Makefile.am (testsuite): Use $(M4), not m4.
From Patrick Tullmann.
2000-02-28 08:54:23 +00:00
Akim Demaille
ab73229498 2000-02-25 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (Default Includes):

	Export the knowledge on disabling echo's trailing new line.

	* acspecific.m4 (AC_PROG_ECHO_N): Renamed as...
	(_AC_PROG_ECHO): this.
	Set ECHO_N, ECHO_C, ECHO_T instead of ac_n, ac_c and ac_t.
	All dependencies changed.
	* doc/autoconf.texi (Preset Output Variables): Document ECHO_C,
	ECHO_N and ECHO_T.
	* m4/atconfig.m4 (fp_PROG_ECHO): Removed.
	(AT_CONFIG): Don't use it.
2000-02-25 13:19:35 +00:00
Akim Demaille
54c26866f9 * tests/tools.m4 (syntax.sh): The logic of the previous patch was
twisted.  Fix it so that it performs what claims the entry below.
From Nicolas Joly.
2000-02-21 12:57:47 +00:00
Akim Demaille
7690cdf6d1 * tests/tools.m4 (syntax.sh): Exit 1 if you managed to kill the
child, since it means `/bin/sh -n' went loopy.
2000-02-21 09:18:01 +00:00
Akim Demaille
c34897ff86 Some `diff' refuse to diff with /dev/null, such as Tru64's.
Reported by Nicolas Joly.

* tests/atgeneral.m4 (empty): New dummy file.
Changed various `diff /dev/null' as `diff empty'.
2000-02-18 13:44:17 +00:00
Akim Demaille
4ca3c004b0 * tests/atspecific.m4 (TEST_MACRO): Don't run AC_PATH_TOOL and
AC_PATH_PROG.
2000-02-18 10:22:29 +00:00
Akim Demaille
1a31555694 * tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it
makes the difference between Unix and DOS EOL. `diff' does not.
Reported by Eli Zaretski.
Also, be ready to use a diff that does not support `-u'.
2000-02-18 10:01:25 +00:00
Akim Demaille
0cf60eb2d2 * tests/tools.m4 (Syntax of the scripts): Be robust to shells that
never return on some `/bin/sh -n foo.sh'.
Reported by Nicolas Joly.
2000-02-18 09:25:46 +00:00
Akim Demaille
c6d671566e * tests/actest.m4 (AC_ENV_SAVE): Added ALLOCA. 2000-02-17 09:50:51 +00:00
Akim Demaille
f3d6e8968d * tests/semantics.m4 (AC_CHECK_TYPES): `addr, addr' is not
portable sed: use `addr,addr'.
2000-02-17 09:38:08 +00:00
Akim Demaille
98c9da45a3 Fix the `missing dummy.in' reported by the test suite.
Reported by Erez Zadok.

* tests/torture.m4 (config.status under extreme conditions):
Reorganized.  Because files required by this test were created
outside the pair AT_SETUP/AT_CLEANUP, when the test fails and
autotest extracts this test, the `debug' script does not contain
the files it needs.  Now AT_SETUP/AT_CLEANUP encloses the full
auto contained section.
2000-02-17 09:31:34 +00:00
Akim Demaille
c67e931be3 * tests/actest.m4 (AC_ENV_SAVE): X_EXTRA_LIBS can be changed by
AC_PATH_EXTRA.
Reported by Erez Zadok.
2000-02-17 09:27:58 +00:00
Akim Demaille
7e4260dccb Define HAVE_DECL_FOO both to 1 if found and 0 otherwise.
* acgeneral.m4 (AC_CHECK_DECLS): Define HAVE_DECL_FOO to 1 instead
of NEED_FOO_DECL if found.  Define to 0 if not found.
* autoheader.m4 (AC_CHECK_DECLS): Template HAVE_DECL_FOO.
* tests/semantics.m4 (AC_CHECK_DECLS): Adjusted.
* doc/autoconf.texi (Generic Declarations): Adjusted.
2000-02-15 09:33:59 +00:00
Akim Demaille
86b8b0de15 autoreconf had a silly syntax error, test it and fix it.
Reported by Franc,ois Pinard and Rainer Orth.

* autoreconf.sh: Removed spurious `;;'.
Formatting changes.
* tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the
shell scripts.
2000-02-15 09:15:22 +00:00
Akim Demaille
2522903e51 CVS added tests/Makefile.in 2000-02-15 09:12:36 +00:00
Akim Demaille
728bc59408 * tests/torture.m4: Nuke the trailing space in defs. 2000-02-15 09:03:36 +00:00
Akim Demaille
037acbb765 * tests/atspecific.m4: Really added to the CVS repository. 2000-02-11 09:01:24 +00:00
Akim Demaille
920939e349 Don't use `cat -s' to single out new-lines, it is not portable.
Also remove trailing blanks.

* tests/Makefile.am (testsuite): Use sed instead of cat.
* tests/torture.m4: No longer check for a trailing space.
* autoconf.sh: Likewise.
2000-02-11 08:59:52 +00:00
Akim Demaille
18bcad9b51 * tests/actest.m4 (AC_ENV_SAVE): OpenBSD-2.3's /bin/sh defines an
envvar SECONDS which does change with time.
KMEM_GROUP is set by AC_FUNC_GETLOADAVG.
Reported by Volker Borchert.
2000-02-10 16:57:55 +00:00
Akim Demaille
97bf777083 * tests/Makefile.am (macros.m4): Better regex to build `macro'.
Depend upon acgeneral.m4.
2000-02-10 16:30:17 +00:00
Akim Demaille
a3b3fe8516 * tests/torture.m4: Also check the value of @DEFS@ when no
CONFIG_HEADER is used.
2000-02-10 10:41:52 +00:00
Akim Demaille
08de8c9f93 Honor properly the `#define' config.h.in templates.
Test it.

* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this.  All callers changed.
Don't mess with changequote, just quote properly.
Bug 1.  Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'.  Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2.  Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top').  This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3.  Don't try to preserve what was behind the value in the
template, since on
	#define NAME "bar baz"
it leads to
	#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 10:38:59 +00:00
Akim Demaille
c7bd04fb16 Keep `AC_CHECK_TYPE' backward compatibility and provide a proper
`AC_CHECK_TYPE',
Based on ideas from Paul Eggert and Alexandre Oliva.

* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Renamed as
(_AC_CHECK_TYPE_NEW): this.
(AC_CHECK_TYPES): Adjusted.
(AC_CHECK_TYPE): Renamed as
(_AC_CHECK_TYPE_OLD): This.  Adjusted to _AC_CHECK_TYPE_NEW.
No longer support extra includes, stick to 2.13's interface.
(_AC_CHECK_TYPE_BUILTIN_P): New macro.
(AC_CHECK_TYPE): New macro.
* autoheader.m4 (autoheader::AC_CHECK_TYPE): Renamed as...
(autoheader::_AC_CHECK_TYPE_OLD): this.
* tests/atspecific.m4 (TEST_MACRO): Skip /^_AC_/ macros.
* tests/semantics.m4: Test the choices of AC_CHECK_TYPE (wrt _NEW
or _OLD implemenation).
* doc/autoconf.texi (Generic Types): Reorganized.  Explain
everything about AC_CHECK_TYPE and Co.
2000-02-10 10:24:10 +00:00
Akim Demaille
dc6fcad969 The AU-glue code for AC_LINK_FILES was not fully compatible: in
AC_LINK_FILES($from, $to)
`$from' and `$to' can be lists, hence `AC_CONFIG_LINKS($to:$from)'
is wrong.
Reported by H.J. Lu.

* acgeneral.m4 (AC_LINK_FILES): Replace the m4-glue code from
AC_LINK_FILES to AC_CONFIG_LINKS, with sh-glue code.
Give a detailed update message.
(_AC_LINK_FILES_CNT): New variable.  Initialize.
* tests/tools.m4 (autoupdate): No longer exercise `autoupdate'
with AC_LINK_FILES.
2000-02-10 09:45:25 +00:00
Akim Demaille
d6ef78697d AC_CHECK_FILES has never worked properly.
* acgeneral.m4 (AC_CHECK_FILE): Use AC_CACHE_CHECK.
* autoheader.m4 (AC_CHECK_FILES): AH-define.
* tests/semantics.m4: Test AC_CHECK_FILES.
* tests/atspecific.m4 (TEST_MACRO): Don't.
2000-02-10 09:40:55 +00:00
Akim Demaille
e1b31f306e Fix the handling of `./configure foo=bar' and test it.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, getopt loop): Always define
ac_optarg as the rhs of the first `=', not only on `-.*=', so that
`configure var=val' defines ac_optarg=val.
Improve the robustness to shell special characters:
 - Use grep when checking that shell variable names are valid.
 - Quote the quotes in ac_optarg before `eval var='$ac_optarg''.
 - Quote the quotes when building ac_configure_args.

* tests/torture.m4: Test that `./configure foo=bar' works properly.
2000-02-09 18:24:24 +00:00
Akim Demaille
d7e3c874ea * Makefile.am (CLEANFILES): Added autoupdate.m4f and autoconf.tmp. 2000-02-09 18:08:37 +00:00
Akim Demaille
8ba96e391b Test `autoupdate'.
* tests/tools.m4 (AH_DEFUN): Fix the comments.
Quote properly.
(autoupdate): New test.
2000-02-09 18:02:18 +00:00
Akim Demaille
d21aeb1510 * tests/base.m4: Really added to the CVS repository.
* tests/tools.m4: Likewise.
2000-02-09 08:36:01 +00:00
Akim Demaille
b54d44e0c3 Open the access to AH_ to users.
* autoheader.m4 (autoheader::AH_DEFUN): New macro.
* tests/tools.m4: New file, in charge of testing the scripts.
All the dependencies adapted.
* tests/actest.m4 (autoheader::AC_TATOOINE): New macro, used while
testing autoheader.
* tests/atspecific.m4: Create config.hin instead of config.h.in.
2000-02-08 13:54:48 +00:00
Akim Demaille
881b4d908f Because of commas and brackets, m4_split must mess with the
quotes.

* libm4.m4 (m4_split): Quote the elements of the list you produce.
* tests/base.m4: New file, testing libm4.
All callers adapted.
Test m4_wrap.
2000-02-08 13:53:32 +00:00
Akim Demaille
c7eb9bd99e Revamp the autoupdate/AC_OBSOLETE chain. All the details are
given in the prologue of acobsolete.m4.

* acgeneral.m4 (Prologue): Enter the `autoconf' name space.
(AU_DEFUN): New macro.

* autoupdate.m4: New file.
Disable the name spaces `autoconf', and `libm4'.  Disable libm4.
* Makefile.am: Tuned to support the changes above.

* autoupdate.sh: Model after autoconf.sh.
Can run on several files at once (for instance m4/*.m4).
Don't touch files that are up to date.
Run m4 on autoupdate.m4f instead of playing with sed.


Use AU_DEFUN.

* acgeneral.m4 (AC_LINK_FILES, AC_ENABLE, AC_WITH): Use AU_DEFUN,
remove the call to AC_OBSOLETE.
* acspecific.m4 (AC_CYGWIN32): Likewise.
* acoldnames.m4: Replaced all the definitions via `define' or
`AC_DEFUN' to use `AU_DEFUN'.
2000-02-08 13:25:49 +00:00
Akim Demaille
9729954f66 Stay in Autoconf's name space.
* acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Prefixed with 'ac_':
arg, save_arg, i, seen, previous_arg, ld_run_path.
Renamed f77_link_output as ac_link_output.
* tests/actest.m4 (AC_ENV_SAVE): Don't note F77, FFLAGS, FLIBS,
G77, f77_case, f77_underscore.
2000-02-07 18:09:54 +00:00
Akim Demaille
b519547b61 AC_CHECK_SIZEOF: Fix a bug, use standard default headers, and
test.

* acgeneral.m4 (AC_CHECK_SIZEOF): Don't over quote $1, some []
were left in the C code, and had the macro fail.
Use AC_INCLUDES_DEFAULT.
* doc/autoconf.texi: Mention default includes.  Explain stdio.h
must always be given.

* tests/atspecific.m4 (TEST_MACRO): Updated the list of
exceptions.
(AT_CHECK_DEFINES): New macro, to check the content of config.h.
* tests/semantics.m4: All the tests are updated to use
AT_CHECK_DEFINES.
Test AC_CHECK_SIZEOF, AC_CHECK_HEADERS, and AC_CHECK_FUNCS.
2000-02-07 17:28:43 +00:00
Akim Demaille
c699fab52c Torture test config.status, AC_SUBST and AC_DEFINE.
* tests/torture.m4: New file.
* tests/suite.m4: Include it.
2000-02-07 17:15:51 +00:00