Commit Graph

86 Commits

Author SHA1 Message Date
Akim Demaille
c4dbe5c591 Have --host=sun4 automatically look for CC=sun4-cc etc.
* acgeneral.m4 (AC_CHECK_TOOLS): New.
* aclang.m4 (AC_PROG_CXX, AC_PROG_CC, AC_PROG_F77): Use new
AC_CHECK_TOOLS macro instead of AC_CHECK_PROGS so that a cross
compiler is found by default with --host.
* doc/autoconf.texi (Generic Programs, Manual Configuration):
Describe new AC_CHECK_TOOLS macro. Fix unclear working about
AC_CHECK_PROGS.
* tests/Makefile.am (FILTER_MACROS): Adjust.
2000-05-24 15:46:12 +00:00
Akim Demaille
0fbdd96cf3 The night of the living dead...
* acspecific.m4 (AC_XENIX_DIR, AC_DYNIX_SEQ, AC_IRIX_SUN,
AC_SCO_INTL): Wake up a few zombies.
* doc/autoconf.texi: Adjust.
* tests/aclocal.m4 (AC_ENV_SAVE): Likewise.
2000-05-24 14:39:24 +00:00
Akim Demaille
7435a2e96c Simplify the interface: users shouldn't need to explicitly check
for special environments.

* acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to
nothing.  Replace them by...
(_AC_EXEEXT, _AC_OBJEXT): this.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them.
(AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as...
(_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this.
Adjust dependencies.
* tests/Makefile.am (FILTER_MACROS): Adjust.
* doc/autoconf.texi (Compilers and Preprocessors): New section,
move the documentation of AC_PROG_CC, AC_PROG_CC_C_O,
AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP,
AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here.
Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX,
AC_PROG_F77.
2000-05-23 14:54:49 +00:00
Akim Demaille
164b08eb76 Factor the AC_PROG_<compiler>_WORKS macros.
* acgeneral.m4 (_AC_INIT_DEFAULTS): Set `cross_compiling'.
(AC_TRY_COMPILER): Remove.
* aclang.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS,
AC_PROG_F77_WORKS): Removed.
(_AC_LANG_COMPILER_WORKS): New macro.
(AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust.
2000-05-22 08:38:44 +00:00
Akim Demaille
cbb8a34d48 More than one argument to `configure' builds a broken
`config.status'.  Fix and test.

* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use
`$ac_configure_args' directly, no via a tmp variable.
* tests/torture.m4 (command line interface): Test with more than
one argument.
2000-05-22 08:05:40 +00:00
Akim Demaille
beb715a12b Synchronize AC_FUNC_GETLOADAVG with the version of the shellutils
1.16f (serial 4).

* acspecific.m4 (AC_FUNC_GETLOADAVG): Check for
`pstat_getdynamic'.
Define `C_GETLOADAVG' if compiling `getloadavg.c'.
Check for NLS.
Compute `GETLOADAVG_LIBS'.
(AC_FUNC_MKTIME): Remove a forgotten `AC_SUBST(LIBOBJS)'.
2000-05-19 12:08:46 +00:00
Akim Demaille
cecf9459b8 The Associated Rewriters are even prouder to present...
.
	  |
	  |
	 /-+		/   +		)===(   U  T  O  U  P  D  A  T  E    I V
       //   \
      =========
    _//_     _\_      The ``Eiffel Tower'' Release

* autoupdate.sh: Complete rewrite.  See that file for a detailed
explanation.  Basically, simulate the name spaces thanks to
`autoconf --trace' and auxiliary files.
No longer use `autoupdate.m4', remove the dependencies.
Synchronize the options and `--help'.
* doc/autoconf.texi (Invoking autoupdate): Humanoupdate.
* autoupdate.m4: Delete.
* tests/Makefile.am (FILTER_MACROS): Add `AC_OUTPUT'.
Since `AC_OUTPUT' is now AU_DEFUN'd, it is extracted for testing,
while it was not before.
* tests/tools.m4 (autoupdate): Re-enable.  Adjust the expected
output with the right quotation (yeah!).
Pass `-m $top_srcdir': autoupdate want the `.m4' files, not the
frozen files.
* Makefile.am (nodistpkgdataDATA): Move `acversion.m4' to
(distpkgdataDATA): here, so that all the `.m4' files are in the
source hierarchy, not split across src and build.
* acversion.m4.in: Update to today's standards.
* Makefile.am: Adjust.
2000-05-11 15:45:34 +00:00
Akim Demaille
b93ddb3ab5 Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable):	Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 13:28:47 +00:00
Akim Demaille
c706f3273a Eradicate AC_TRY_COMPILE.
* aclang.m4 (AC_PROG_CC_STDC, AC_C_BIGENDIAN, AC_C_INLINE,
AC_C_CONST, AC_C_VOLATILE, AC_F77_NAME_MANGLING): Use
`AC_COMPILE_IFELSE'.
* acspecific.m4 (AC_DECL_SYS_SIGLIST, _AC_CHECK_HEADER_DIRENT,
AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_TYPE_SIGNAL,
AC_FUNC_GETLOADAVG, AC_FUNC_SELECT_ARGTYPES, AC_STRUCT_TM,
AC_CYGWIN, AC_MINGW32, AC_EMXOS2): Likewise.
* tests/semantics.m4 (C keywords): Check that AC_C_CONST,
AC_C_VOLATILE, and AC_C_INLINE function properly with GCC.
2000-05-11 13:09:05 +00:00
Akim Demaille
87c43d275c * libm4.m4 (m4_foreach): Rewritten so that it does not require
lists in between parens.
(m4_foreach_quoted): new copy of the previous `m4_foreach' which
is still used by `m4_wrap'.
* acgeneral.m4 (AC_INCLUDE, AC_INCLUDES): Removed.
(AC_FOREACH): Don't use parens with `m4_foreach'.
(AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust the
description.
* acspecific.m4 (AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE,
AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Adjust.
* autoconf.texi (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES):
Adjust their documentation.
(AC_INCLUDE): Undocument.
* tests/semantics.m4: Adjust.
* tests/actest.m4: Rename as...
* tests/aclocal.m4: this.
* tests/atspecific.m4: No longer include actest.m4.
* tests/torture.m4: Likewise.
* tests/Makefile.am: Adjust.
2000-05-10 16:16:31 +00:00
Akim Demaille
fce102c8c9 * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros.
(_AH_COUNTER): New variable.
* tests/tools.m4 (autoheader): Check their proper functioning.
2000-05-04 10:26:02 +00:00
Akim Demaille
668492f8f7 * doc/autoconf.texi (Obsolete Macros): Rename as...
(Obsoleting Macros): this.
(Old Macros): Rename as...
(Obsolete Macros): this.
Be a section of...
(Obsolete Constructs): New chapter.
(Invoking autoheader): Move the `acconfig.h' documentation to...
(acconfig.h): here, new section of `Obsolete Constructs'.
(Autoheader Macros): Document AH_VERBATIM, AH_TEMPLATE, AH_TOP and
AH_BOTTOM.
2000-05-04 09:25:43 +00:00
Akim Demaille
0e827bb4bf * tests/tools.m4 (autoheader): Don't pass `-l at_srcdir' to
`autoheader', since `acconfig.h' is created in the build dir.
There's one empty line less in `config.h.in' than before when
using `acconfig.h'.
2000-05-03 12:28:17 +00:00
Akim Demaille
cc07253b22 Support of acconfig.h was broken. Fix and test.
Reported by Jim Meyering.

* autoheader.sh: Trace AC_DEFINE and AC_DEFINE_UNQUOTED to build
the list of $syms which are defined.
* tests/tools.m4 (autoheader): New test.
2000-05-03 11:00:46 +00:00
Akim Demaille
b2c5b8a278 Provide a macro to canonicalize a configuration name.
Suggested by Ralf Corsepius.

*  acgeneral.m4 (AC_CANONICALIZE): New macro.
(_AC_CANONICAL_THING): Use it.
2000-05-03 09:53:55 +00:00
Akim Demaille
be342dbf70 Have `make check' succeed with CC=g++.
* tests/atspecific.m4 (AT_TEST_MACRO): Don't check `env-after' if
the file does not exist, which may happen when a `configure' exits
brutally.
* tests/semantics.m4 (AC_CHECK_MEMBERS, AC_CHECK_TYPES): ANSI C++
forbids members named like their hosting struct, so don't do it.
2000-04-11 12:07:45 +00:00
Akim Demaille
af8eb3314f Rewrite the autoheader chain on top of `autoconf --trace'.
* autoheader.m4: Dispatch the prototypes next to there AC_
siblings.
(AH_TEMPLATE, AH_VERBATIM): Move to...
* acgeneral.m4: here.
(AH_OUTPUT): New macro.
* autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'.
* autoheader.m4: Remove.
* Makefile.am: Adjust.
* tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense.
* tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by
the test above.
2000-03-29 16:48:00 +00:00
Akim Demaille
bdce732f0c * acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Rename back as
AC_CHECK_TOOL_PREFIX since some packages rely on it.
2000-03-27 15:47:35 +00:00
Akim Demaille
b23061fafb Move all the language dependent macros into aclang.m4.
* aclang.m4: New file.
* autoconf.m4: Include it.
* autoheader.m4: Likewise.
* autoupdate.m4: Likewise.
* Makefile.am: Adjust.
* test/Makefile.am: Likewise.
* acgeneral.m4 (AC_LANG_CASE,AC_LANG_SAVE, _AC_LANG_DISPATCH,
AC_LANG, _AC_LANG_CURRENT, AC_LANG_SOURCE, AC_LANG_PROGRAM,
AC_LANG_CALL, AC_LANG(C), AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C),
AC_LANG_CALL(C), AC_LANG(C++), AC_LANG_SOURCE(C++),
AC_LANG_PROGRAM(C++), AC_LANG_CALL(C++), AC_LANG(FORTRAN77),
AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77),
AC_LANG_CALL(FORTRAN77): Move to...
* aclang.m4: here.
* acspecific.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77,
AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS,
AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU, AC_PROG_CC_G,
AC_PROG_CXX_G, AC_PROG_F77_G, AC_PROG_GCC_TRADITIONAL,
AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_CC_STDC, AC_PROG_CPP,
AC_PROG_CXXCPP, AC_REQUIRE_CPP, AC_PROG_LEX, AC_TYPE_MODE_T,
AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_BIGENDIAN,
AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE, AC_C_STRINGIZE,
AC_C_PROTOTYPES, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING,
AC_F77_WRAPPERS): Move to...
* aclang.m4: here.
2000-03-27 12:26:33 +00:00
Akim Demaille
bb84983e28 * acgeneral.m4 (_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Fix the DOS
absolute path pattern: s/?:[[/\]]/?:[[/\]]*/.
2000-03-27 11:44:22 +00:00
Akim Demaille
d1291b2ea1 * acgeneral.m4 (AC_RUN_IFELSE): New macro.
(AC_TRY_RUN_NATIVE): Remove.
(AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE.
2000-03-25 09:12:59 +00:00
Akim Demaille
fd92d2bd3c * tests/semantics.m4 (AC_TRY_LINK_FUNC, AC_CHECK_LIB): New tests. 2000-03-25 09:06:24 +00:00
Akim Demaille
700c767833 * tests/semantics.m4 (AC_PATH_PROG, AC_PATH_PROGS): New tests. 2000-03-21 12:22:27 +00:00
Akim Demaille
2200cf61c9 Start the language support overhaul: Introduce AC_LANG().
* acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT.
(AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New
macros.
(AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed.
Adjust all callers.
* acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding
AC_LANG_RESTORE.
* tests/Makefile.am (FILTER_MACROS): Add AC_LANG.
2000-03-21 12:15:54 +00:00
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