Commit Graph

124 Commits

Author SHA1 Message Date
Akim Demaille
8490bcc359 * aclang.m4 (AC_PROG_F77_C_O): define F77_NO_MINUS_C_MINUS_O
when test fails, not when it succeeds(!).
2001-03-13 12:28:19 +00:00
Akim Demaille
bdfd64b325 * aclang.m4 (AC_C_INLINE): Define "inline" to empty if the
compiler doesn't support 'static inline'.  This is needed for
Encore Umax-3.0.9.16b.
2001-02-19 15:11:52 +00:00
Akim Demaille
185f365117 * aclang.m4 (_AC_LANG_COMPILER_WORKS): Rename as...
(_AC_COMPILER_EXEEXT_WORKS): this.  Use the `a.out' or `a.exe'
left by _AC_COMPILER_EXEEXT_DEFAULT to check if the compiler works.
(_AC_COMPILER_EXEEXT_CROSS): Extract from the above macro.
(_AC_COMPILER_EXEEXT): Use them.
Adjust all the compiler looking macros to check for EXEEXT
*first*, then OBJEXT.
Set ac_exeext yourself.
(_AC_COMPILER_EXEEXT_O): Don't.
2001-02-19 15:08:58 +00:00
Akim Demaille
92dc1c5675 * aclang.m4 (AC_PROG_F77): Improve documentation of the compilers
that are tried, add a few new ones (cft77, af77, epcf90, xlf95, g95),
and put pgf90 in the right place (before the F95 compilers).
2001-01-29 11:54:43 +00:00
Akim Demaille
9d4187c855 * aclang.m4: dnl AC_ARG_VAR's newline.
(AC_PROG_CC, AC_PROG_F77, AC_PROG_CXX): AC_ARG_VAR(LDFLAGS).
* acgeneral.m4 (AC_CHECK_LIB): Don't do it.
2001-01-26 14:34:04 +00:00
Akim Demaille
544c3a4b3d Don't AC_SUBST too much, as it makes Automake include those
variables in Makefiles, and drives autoscan to require unneeded
programs.
* acgeneral.m4 (_AC_INIT_PREPARE): Don't AC_SUBST CFLAGS,
CPPFLAGS, CXXFLAGS and LDFLAGS.
(AC_ARG_VAR): AC_SUBST the var.
Document it only once, even if there are several different docs.
* aclang.m4 (AC_PROG_CPP): Declare CPP and CPPFLAGS to AC_ARG_VAR.
(AC_PROG_CXXCPP): Declare CXXCPP and CPPFLAGS.
2001-01-24 07:50:55 +00:00
Akim Demaille
bddc739371 * acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once.
(AC_DIVERT_ONCE): Move to...
* m4sugar.m4 (m4_expand_once): here.
2001-01-23 17:04:35 +00:00
Akim Demaille
8036642ee5 * aclang.m4 (_AC_LANG_SET): Turn off optimizations. 2001-01-23 16:50:19 +00:00
Akim Demaille
300e5191e0 * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use
AS_IF([AC_TRY_EVAL(ac_link)]) instead of AC_LINK_IFELSE to
avoid depending on ac_exeext before it's found.
(AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Check for the
executable extension BEFORE checking whether the compiler
works, as that test depends on a correct ac_exeext.
2001-01-23 08:44:49 +00:00
Akim Demaille
938f1a75cb * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no declaration,
then '#include <stdlib.h>', before trying the explicit declarations.
2001-01-22 14:29:24 +00:00
Akim Demaille
9a2be393e9 * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O):
Export ac_cv_exeext so ltconfig believes the value is cached and
skips its own faulty test.
2001-01-22 09:10:55 +00:00
Akim Demaille
b58abf2dab * aclang.m4 (AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C)): Use
conftest.val, not conftestval.
* acgeneral.m4 (_AC_COMPUTE_INT_RUN, _AC_COMPUTE_INT):
Likewise.
2001-01-22 09:06:11 +00:00
Akim Demaille
434092f3fb Optimizing AC_LANG was broken. Test and fix.
* aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Don't
use _AC_LANG_ABBREV so that you don't depend upon _AC_LANG.
(_AC_LANG_SET): New.
(AC_LANG, AC_LANG_PUSH, AC_LANG_POP): Use it.
* tests/compile.at: Test AC_LANG, AC_LANG_PUSH & AC_LANG_POP.
2001-01-19 14:03:14 +00:00
Akim Demaille
4bc8d19d4e * acgeneral.m4: Don't leave macro names in comments.
* aclang.m4: Likewise.
* configure.in: Likewise.
* tests/semantics.at: Likewise.
* tests/tools.at: Likewise.
2001-01-18 09:30:10 +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
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
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
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
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
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
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
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
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
Akim Demaille
bb4693991e * aclang.m4 (AC_LANG): Be `smart': don't issue the sh code if the
current language did not change.
(AC_LANG_ASSERT): New.
(AC_PROG_CPP, AC_PROG_CXXCPP): Assert the language.
(_AC_PROG_F77_V, _AC_F77_NAME_MANGLING): Don't require
AC_PROG_F77, the code you include does it.
(AC_F77_LIBRARY_LDFLAGS): Set the language.
2000-12-06 08:59:08 +00:00
Akim Demaille
482e84f65c * m4sugar.m4 (ifelse): Rename as...
(m4_if): this.
* autoconf.m4 (ifelse): Restore.
2000-12-06 08:58:41 +00:00
Akim Demaille
e77a2341a0 * aclang.m4 (AC_PROG_F77): Temporarily set ac_ext to F to run
_AC_LANG_COMPILER_GNU.
From Steven G. Johnson.
* tests/compile.at (GNU Fortran 77): New test.
2000-12-05 14:08:35 +00:00
Akim Demaille
167feac4ba When using Cygwin, in spite of all their efforts, it may happen
that `confestval' be read in binary mode.  The shell then fails to
properly strip the rn.
Reported by Lars J. Aas.
* aclang.m4 (AC_LANG_INT_SAVE): Don't add any trailing new line,
and close the file.
Suggested by Peter Eisentraut.
2000-11-30 14:49:43 +00:00
Akim Demaille
0af3f6af7b * m4sugar.m4 (ifval, ifset, ifdef, ifndef, m4_ifvanl): Rename as...
(m4_ifval, m4_ifset, m4_ifdef, m4_ifndef, m4_ifvaln): this.
(m4_n): New macro.
(m4_ifvaln): Use it.
* autoconf.m4 (ifdef): Restore it.
2000-11-29 10:09:44 +00:00
Akim Demaille
3e56675bc8 A single m4_require is enough.
* m4sugar.m4 (_m4_require): $2 defaults to $1.
Rename as...
(m4_require): this.
* acgeneral.m4 (_AC_REQUIRE): Remove, use m4_require if you want
to get into the gory details.
2000-11-14 11:06:37 +00:00
Akim Demaille
300fbf12d3 Set AC_LANG_PREPROC_REQUIRE which replaces AC_REQUIRE_CPP.
The main difference is that the former requires AC_LANG_COMPILER.
* aclang (AC_LANG_PREPROC, AC_LANG_PREPROC(C), AC_LANG_PREPROC(C++))
(AC_LANG_PREPROC(Fortran 77), AC_LANG_PREPROC_REQUIRE): New
macros.  Issue a warning when looking for the Fortran 77
preprocessor instead of an error.
(AC_LANG_COMPILER): Check that it is run before the corresponding
AC_LANG_PREPROC.
(AC_PROG_C
(AC_LANG_COMPILER_REQUIRE): Don't call directly
AC_LANG_COMPILER(_AC_LANG), rather invoke AC_LANG_COMPILER so that
the generic code in AC_LANG_COMPILER is run.
(AC_REQUIRE_CPP): Use AC_LANG_PREPROC_REQUIRE.
(AC_PROG_CC, AC_PROG_CXX): Don't require being run before the
corresponding AC_LANG_PREPROC: AC_LANG_COMPILER does it.
Propagate AC_LANG_PREPROC_REQUIRE.
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Use it instead of
AC_REQUIRE_CPP.
* acspecific.m4 (_AC_DECL_YYTEXT, AC_PATH_X): Don't
AC_REQUIRE_CPP, inner macro will do it.
* aclang.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_STRINGIZE)
(AC_C_PROTOTYPES): Likewise.
(AC_C_STRINGIZE): Yeeks!  The body of AC_CACHE_CHECK was not
quoted.  Use @%:@ do assist Emacs.
For some reason (don't ask), this revamping revealed that
AC_PROG_CC_STDC, because of the `break', does not clean its tmp
files.
* aclang.m4 (AC_PROG_CC_STDC): Extract the creation of conftest.c
out of AC_COMPILE_IFELSE.
Be sure to clean the tmp files.
2000-11-14 10:44:27 +00:00
Akim Demaille
cc2c99e90b Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 10:11:43 +00:00
Akim Demaille
371ebd560e Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it.  No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS):  Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 10:05:14 +00:00
Pavel Roskin
03d06c0d47 * acfunctions.m4: Always quote first argument of AC_MSG_ERROR,
AC_MSG_WARN, AC_MSG_CHECKING, AC_MSG_RESULT,
AC_MSG_RESULT_UNQUOTED.
* acgeneral.m4: Likewise.
* aclang.m4: Likewise.
* acspecific.m4: Likewise.
* configure.in: Likewise.
* doc/autoconf.texi: Likewise.
2000-11-11 05:59:21 +00:00
Akim Demaille
41ec08f9ed When running
AC_INIT
AC_PROG_CC
AC_LANG_COMPILER_REQUIRE
AC_PROG_CC is expanded twice, because AC_PROG_CC provides
`AC_PROG_CC', and not `AC_LANG_COMPILER(C)' as expected by
AC_LANG_COMPILER_REQUIRE.
* aclang.m4 (AC_LANG_COMPILER(C)): Instead of calling AC_PROG_CC,
require it.
(AC_LANG_COMPILER(C++), AC_LANG_COMPILER(Fortran 77)): Likewise.
2000-11-10 10:57:34 +00:00
Akim Demaille
6a1fe22942 * aclang.m4 (AC_LANG_PROGRAM(Fortran 77): Complain about $1 having
a value.
Reported by Paul Martinolich.
(_AC_LANG_COMPILER_GNU): Pass the test as the body of
AC_LANG_PROGRAM, not the prologue.
2000-11-08 17:46:24 +00:00
Akim Demaille
a9102fbdf9 * aclang.m4 (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77):
Be AU_DEFUN'd, not AU_ALIAS'd.
Reported by Ralf Corsepius.
* tests/mktests.sh (exclude_list): Skip these variables.
2000-11-07 14:16:54 +00:00
Akim Demaille
e927749bb5 * Makefile.am (.m4.m4f): Check that processing produces only
comments and empty lines.
Check that freezing produced no output.
* m4sugar.m4: Commentize what was not.
* m4sh.m4: Likewise.
* aclang.m4: Formatting changes.
2000-11-03 14:01:58 +00:00
Akim Demaille
ded24ff599 * autoconf.m4 (define): Reestablish only after having read the
`ac' files.
Adjust all the Autoconf code to use `m4_define', not `define'.
2000-11-03 13:41:40 +00:00
Akim Demaille
7e4f776a09 * autoconf.m4: Instead of reactivating the macros before reading
Autoconf's file, do it afterwards, so that Autoconf promotes the
right use, but users still can use the old names.
Of course this revealed numerous non updated uses of old macros in
Autoconf's files.  Adjust them.
But for the time being, keep `define' alive for Autoconf.
2000-11-03 11:14:48 +00:00
Akim Demaille
2353e0d366 * m4sugar.m4 (popdef, pushdef): Rename as...
(m4_popdef, m4_pushdef): these.
Adjust dependencies.
* acgeneral.m4: Adjust.
* aclang.m4: Likewise.
* autoconf.m4 (popdef, pushdef): Reactivate them.
2000-11-02 14:12:18 +00:00
Akim Demaille
4c40aa086f Move the handling of diversions into M4sugar.
* acgeneral.m4 (_AC_DIVERT, AC_DIVERT, AC_DIVERT_PUSH)
(AC_DIVERT_POP): Move to...
* m4sugar.m4 (_m4_divert, m4_divert, m4_divert_push)
(m4_divert_pop): here.
* acgeneral.m4: Adjust to use only the M4sugar macros.
Nevertheless...
(AC_DIVERT_PUSH, AC_DIVERT_POP): New wrappers around the M4sugar
macros.
(_AC_DIVERT(...)): Rename all the diversions names as...
(_m4_divert(...)): these.
2000-10-30 19:01:24 +00:00
Pavel Roskin
3ab42e94a3 * aclang.m4 (AC_REQUIRE_CPP): Don't default to C++ - call AC_FATAL
for unsupported languages.
2000-10-28 16:33:19 +00:00
Akim Demaille
b60b89ed66 * m4sugar.m4: (m4_tolower, m4_toupper): New macros.
* acgeneral.m4 (AC_PREFIX_PROGRAM): Use m4_toupper().
* aclang.m4 (AC_F77_FUNC): Use m4_toupper()/m4_tolower().
2000-10-24 17:25:18 +00:00