Commit Graph

65 Commits

Author SHA1 Message Date
Akim Demaille
949f06e0e8 * aclang.m4 (AC_PROG_CPP): Use double quotes in the for loop
and eliminate ac_tmp_cpp.
(AC_PROG_CXXCPP): Use double quotes in the for loop and
eliminate ac_tmp_cxxcpp.
2000-09-14 07:55:32 +00:00
Akim Demaille
ced19e1e5f * acgeneral.m4 (_AC_TRY_CPP): Don't filter out conftest.$ac_ext
from the output - it is only printed by Visual C that gives
correct exit status.
* aclang.m4 (AC_PROG_CPP): Don't try '${CC-cc} -nologo -E'
by the same reason.
2000-09-14 07:50:14 +00:00
Akim Demaille
c08bb24cf3 * aclocal.m4 (_AC_PROG_CPP_WORKS): Don't use AC_REQUIRE_CPP -
it's useless here. Rename to ...
(_AC_PROG_PREPROC_WORKS): ... this.
2000-09-12 16:05:29 +00:00
Akim Demaille
368c1810a2 The test suite fails on some hosts because for instance
AC_INIT
  AC_CHECK_FUNC(exit)
will not look for a compiler, it will just use `cc'.
Macros that need a compiler should require one.
2000-09-12 13:59:55 +00:00
Akim Demaille
58e8d5c397 * acgeneral.m4 (_AC_TRY_CPP): New macro. It runs the preprocessor
and checks whether it produces errors or warnings. Don't put grep
output into a variable, use another grep instead.
(AC_TRY_CPP): Use _AC_TRY_CPP. Copy conftest.err to config.log
if the case of an error.
* aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)):
define AC_LANG_ABBREV to the short language name.
(_AC_PROG_CPP_WORKS): New macro. It checks whether the current
preprocessor can be used to check for existance of headers.
Most code taken from ...
(AC_PROG_CPP): ... here. Use _AC_PROG_CPP_WORKS. Use shell
"for" to find working CPP. Use AC_LANG_PUSH(C) and AC_LANG_POP -
it's a macro for C only.
(AC_PROG_CXXCPP): Rewritten using _AC_PROG_CPP_WORKS.
2000-09-12 13:02:29 +00:00
Akim Demaille
d2cb51aef4 * acspecific.m4 (_AC_OBJEXT): No longer use AC_COMPILE_IFELSE,
which uses $ac_objext hence depends upon _AC_OBJEXT.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call
_AC_EXEEXT before _AC_OBJEXT since the former needs $ac_objext.
2000-09-06 13:05:58 +00:00
Akim Demaille
bddb504cff * aclang.m4 (_AC_PROG_F77_GNU): Run command from standard input so
that we can get some standard output.
2000-09-05 09:14:10 +00:00
Akim Demaille
cf3aea2302 * aclang.m4 (AC_NO_EXECUTABLES): New macro. 2000-08-11 12:41:55 +00:00
Akim Demaille
55d7dff046 * acfunctions.m4 (_AC_LIBOBJ_ALLOCA, AC_REPLACE_FUNCS): Simplify
${foo} into $foo.
* aclang.m4 (AC_LANG(C), AC_LANG(C++)): Move some internal
comments into the header comment.
* acgeneral.m4 (AC_TRY_CPP): Likewise.
2000-08-07 12:33:17 +00:00
Akim Demaille
90f0868cdd * aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Recent changes
inverted the results.  Fix that.
2000-08-02 15:15:26 +00:00
Akim Demaille
c6a72f5bf2 * aclang.m4 (AC_PROG_CC): Also try to find $target_alias-cc. 2000-08-01 13:14:42 +00:00
Akim Demaille
17bf2a2a33 * aclang.m4 (_AC_PROG_CXX_GNU, _AC_PROG_CC_GNU, _AC_PROG_F77_GNU):
Use grep instead of egrep, don't redirect stderr.
2000-08-01 10:03:41 +00:00
Akim Demaille
8914cfdd81 * acgeneral.m4 (_AC_INIT_PREPARE_FDS): New macro, pulled out of
(_AC_INIT_PREPARE): here, where it is called from.
* aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Don't test -z "`foo`".
2000-07-31 09:22:47 +00:00
Akim Demaille
898867a4f5 * aclang.m4 (AC_LANG_CONFTEST, _AC_PROG_CC_GNU, _AC_PROG_CXX_GNU,
_AC_PROG_F77_GNU): Use ac_ext.  Use _ACEOF instead of ACEOF.
2000-07-28 07:55:01 +00:00
Akim Demaille
80a7004bc3 * aclang.m4 (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU,
_AC_PROG_F77_GNU): Use ac_ext.  Use ACEOF instead of EOF.
(AC_LANG_CONFTEST): New macro.
(_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_F77_C_O,
_AC_PROG_F77_V_OUTPUT): Use it.
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_COMPILE_IFELSE,
AC_LINK_IFELSE, AC_RUN_IFELSE): Likewise.
2000-07-28 07:36:11 +00:00
Akim Demaille
1173e0e0c9 * aclang.m4 (AC_F77_FUNC): New macro to give the user a clean
way of accessing Fortran name-mangling information other than
through CPP, and without having to know the different possible
name-mangling schemes.
* autoconf.texi: Documented AC_F77_FUNC
2000-07-24 07:58:52 +00:00
Akim Demaille
f47670db70 * aclang.m4 (AC_F77_NAME_MANGLING): Obsolete, becomes
_AC_F77_NAME_MANGLING.
(_AC_F77_NAME_MANGLING): Use independent checks for the
name mangling of symbols with and without underscores.
Use algorithm with for loops instead of recursive macro calls.
(AC_F77_WRAPPERS): Adapt to changes in _AC_F77_NAME_MANGLING.
* doc/autoconf.texi (Fortran 77 Compiler Characteristics):
Remove documentation of AC_F77_NAME_MANGLING.
Remove documentation of f77_case and f77_underscore.
Replace AC_F77_FUNC_WRAPPER with AC_F77_WRAPPERS.
2000-07-19 09:56:18 +00:00
Akim Demaille
b66b88b2a0 * aclang.m4 (AC_PROG_CC): Don't require AC_PROG_F77, require
AC_PROG_CC instead.
From Martin Wilck.
(AC_PROG_F77_C_O): Require AC_PROG_F77.
Use a cache variable independent of $F77.
2000-07-19 09:06:25 +00:00
Akim Demaille
f054152a7b Fixed bug where the F77 compiler output was parsed differently
when detecting the verbose flag than when scanning for linker
options, and as a result the former test failed (under AIX/xlf).

* aclang.m4 (_AC_PROG_F77_V_OUTPUT): New macro to get the
output of linking an F77 program with a given verbose flag,
and preprocess it as required to scan for linker flags.
(_AC_PROG_F77_V): Use the above macro here...
(AC_F77_LIBRARY_LDFLAGS): ...and here, enforcing consistency.
2000-07-18 12:27:05 +00:00
Akim Demaille
b83d0eb6a8 * aclang.m4 (AC_PROG_F77): Delete AC_BEFORE(AC_PROG_CPP) that
leads to unnecessary warnings if both C and Fortran are checked.
(AC_PROG_F77_C_O): AC_REQUIRE AC_PROG_F77 instead of pretend you
need to be AC_BEFORE it.
2000-07-12 17:06:42 +00:00
Akim Demaille
9f7f09bf91 * aclang.m4 (_AC_PROG_F77_V): New macro to determine the flag that
causes the compiler to output verbose linking information.
(AC_F77_LIBRARY_LDFLAGS): Use _AC_PROG_F77_V instead of
simply "-v"
(AC_F77_LIBRARY_LDFLAGS): New algorithm to parse flags, uses
set/shift shell commands.
(AC_F77_LIBRARY_LDFLAGS): Set FLIBS at end, after determining
ac_cv_flibs.
2000-07-12 08:45:32 +00:00
Akim Demaille
bb30dd8484 Improve --help documentation of important environment variables.
* acgeneral.m4 (_AC_INIT_HELP): Direct reader to descriptions
of useful variables at the end of the --help.
(AC_ARG_VAR): Emphasize use of environment variables to override
and/or help the configure script.  Ensure that a given variable
is only documented once in the --help.
(AC_CHECK_LIB): Call AC_ARG_VAR to document and register the
LDFLAGS variable, and...
(AC_CHECK_HEADER): do the same for the CPPFLAGS variable.
* aclang.m4 (AC_PROG_CC): Call AC_ARG_VAR to document and register
the CC and CFLAGS variables, and do the same for...
(AC_PROG_CXX): CXX and CXXFLAGS, and...
(AC_PROG_F77): F77 and FFLAGS.
2000-07-10 10:37:19 +00:00
Akim Demaille
7207ae0d7b * aclang.m4: Promote s,,, over s%%%, and sed prog' over sed -e
prog'.
* acgeneral.m4: Likewise.
* acspecific.m4: Likewise.
* doc/autoconf.texi (Limitations of Usual Tools, Coding Style):
Likewise.
2000-07-10 08:43:55 +00:00
Akim Demaille
0701d615f0 * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Set
ac_gnu_compiler.
(_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute
ac_gnu_compiler.
* acgeneral.m4 (AC_LINKER_OPTION): Adjust.
2000-07-10 08:38:51 +00:00
Akim Demaille
af1c300b51 * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Move the code
processing the result of AC_PROG_CC_G, AC_PROG_CXX_G, and
AC_PROG_F77_G into them.
2000-07-10 08:34:42 +00:00
Akim Demaille
6a1acb0259 * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Keep -lm, if a Fortran
compiler needs it, it is likely to be required when linking C/C++
with Fortran.
<-YP,*>: Fix the list of arguments to loop on.
Don't mess with the user variable name space.
<ac_ld_run_path>: Prepend LD_RUN_PATH directories with -R only
when running Solaris (without this, link errors occur).
2000-07-07 08:49:18 +00:00
Akim Demaille
97fa225099 * aclang.m4: Formatting and quotations changes. 2000-07-06 13:47:04 +00:00
Akim Demaille
a4a9bf06b4 * aclang.m4 (AC_LANG_INT_SAVE(C++)): Be a copy of
AC_LANG_INT_SAVE(C), not AC_LANG_INT_SAVE_TRY(C).
Fixes Autoconf PR/133.
2000-07-06 13:19:19 +00:00
Akim Demaille
9800adfd91 * acgeneral.m4 (_AC_INIT_PARSE_ARGS, AC_CHECK_TOOLS): Change
warning message printed when only --host is given. Fix printing
of multiple compiler cache values, use PATH argument.
* aclang.m4 (AC_LANG_COMPILER_WORKS): Print the cross compile
status, fix problem where two results were printed at once.
2000-07-06 13:05:47 +00:00
Akim Demaille
8663df506b * aclang.m4 (AC_PROG_F77): Add two compilers,
lf95 (Lahey/Fujitsu Fortran) and pgf77 (Portland Group Fortran)
(_AC_PROG_F77_G): Some Fortran compilers produce stdout/stderr
output even if no errors occur - check exit status rather than
output.
2000-07-06 08:03:55 +00:00
Akim Demaille
cb2e761b8e Re-enable the old behavior of --host and --build.
* acgeneral.m4 (build_alias): Set to host_alias if --build is not
given but --host is, and enable cross-compile auto-detection.  If
both are, and are different, enable cross compilation.
(AC_CANONICAL_HOST): Adjust help message.
(cross_compiling): Enclose in quotes when testing.
* aclang.m4 (_AC_LANG_COMPILER_WORKS): If cross_compiling is
maybe, set it to yes or no depending on the result of the
execution test.
* doc/autoconf.texi: Document the change.
* doc/install.texi: Likewise.
2000-06-30 13:34:37 +00:00
Akim Demaille
5b4529d74f * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't require AC_CYGWIN.
(AC_F77_NAME_MANGLING): Removed useless comment.
(_AC_PROG_F77_GNU): Use `.f' not `.fpp' which is not properly
processed by Abysoft's Fortran compiler.
2000-06-09 11:14:05 +00:00
Akim Demaille
c39fb79403 * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Fixed bug where
compiler output to stdout was not caught and interpreted.
2000-06-09 10:57:16 +00:00
Akim Demaille
a003cd1963 * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't override FLIBS if
specified by the user.
Fix a bug: use the cached value to set FLIBS.
2000-06-08 08:23:30 +00:00
Akim Demaille
2a4ccaeb3f * aclang.m4 (AC_PROG_F77): Check for f95 and fc too. 2000-06-07 13:25:54 +00:00
Akim Demaille
3454da33b5 * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Fix problem on Cray due to
confusion from the link command getting echoed in quotes.  In the
future, a more general fix for quoted arguments with spaces might
be better.
2000-06-07 07:16:15 +00:00
Akim Demaille
b7c676e580 * aclang.m4 (AC_C_CHAR_UNSIGNED): Use the new compiler-test
technology so that we can do the test via compilations only.  Also
use (char) -1 instead of (char) 255 to check if char is unsigned.
2000-06-05 10:00:41 +00:00
Akim Demaille
89289ce2e2 Don't use f2c as a possible Fortran compiler, since by itself it
cannot produce object code.

* aclang.m4 (AC_PROG_F77): Remove f2c from the search list.
* doc/autoconf.texi: Excise mentions of f2c in AC_PROG_F77 docs.
2000-05-26 17:30:07 +00:00
Akim Demaille
0e26510db8 Fix the archive: some parts of the following patches were missing:
- CC < aCC
- unquote the argument of case
- AC_FUNC_STRERROR_R
- AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
- typos in autoconf.texi
2000-05-26 17:12:01 +00:00
Akim Demaille
ca10061659 Find a means to extract integers from the compiler.
Use this technology to compute `sizeof' even when cross-compiling.
Ideas and initial suggestion by Kaveh Ghazi.
Binary search by Bruno Haible.

* aclang.m4 (AC_LANG_BOOL_COMPILE_TRY,
AC_LANG_BOOL_COMPILE_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C++),
AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C), AC_LANG_INT_SAVE(C++)): New
macros.
* acgeneral.m4 (_AC_COMPUTE_INT_COMPILE, _AC_COMPUTE_INT_RUN,
_AC_COMPUTE_INT): New.
(AC_CHECK_SIZEOF): Use them.
Check whether the type exists beforehand.
* tests/semantics.m4 (AC_CHECK_SIZEOF): Strengthen.
2000-05-26 11:33:54 +00:00
Akim Demaille
3bfdd156e9 * aclang.m4 (AC_PROG_CXX): Look for aCC KCC RCC xlC_r xlC.
s/c++ g++/g++ c++/.
* doc/autoconf.texi (Compilers and Preprocessors): Adjust.
2000-05-26 09:42:13 +00:00
Akim Demaille
a72866dbfe * aclang.m4 (AC_LANG(C++)): Change ac_ext' from from C' to `cc'
to avoid potential ambiguities on case-insensitive shells.
2000-05-24 15:50:19 +00:00
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
5800da26cd * acgeneral.m4 (AC_LANG_FUNC_LINK_TRY, AC_LANG_FUNC_LINK_TRY(C),
AC_LANG_FUNC_LINK_TRY(C++)): New macros.
(AC_CHECK_FUNC): Use it, together with AC_LINK_ELSE.
2000-05-24 14:22:39 +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
dc8d091541 * acgeneral.m4: Quote the names being m4-defined.
* acspecific.m4: Likewise.
* aclang.m4: Likewise.
2000-05-22 08:41:36 +00:00
Akim Demaille
51c52fbf65 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:45 +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
465f8f2b1e * aclang.m4: Formatting changes. 2000-05-22 08:06:51 +00:00
Akim Demaille
5db6a4b156 * acgeneral.m4: Simplify all the unjustified `[\$]foo' into
`\$foo', the quotes are needed only for `\$[1]', `\$[@]' etc.
Prefer `$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1' etc.
* aclang.m4: Likewise.
* acspecific.m4: Likewise.
2000-05-19 13:07:13 +00:00