mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-23 14:09:51 +08:00
Macros used by AC_LANG_COMPILER macros shall not AC_REQUIRE
AC_LANG_COMPILER by the way of AC_COMPILE_IFELSE etc. * acspecific.m4 (_AC_EXEEXT): Use _AC_LINK_IFELSE, not AC_LINK_IFELSE to avoid AC_REQUIREing AC_PROG_CC which precisely requires _AC_EXEEXT. Don't run _AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2. * aclang.m4 (_AC_PROG_F77_G): Use _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE. (_AC_LANG_COMPILER_WORKS): Use _AC_LINK_IFELSE, not AC_LINK_IFELSE.
This commit is contained in:
parent
55ee762412
commit
2499688c24
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2000-10-12 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Macros used by AC_LANG_COMPILER macros shall not AC_REQUIRE
|
||||
AC_LANG_COMPILER by the way of AC_COMPILE_IFELSE etc.
|
||||
|
||||
* acspecific.m4 (_AC_EXEEXT): Use _AC_LINK_IFELSE, not
|
||||
AC_LINK_IFELSE to avoid AC_REQUIREing AC_PROG_CC which precisely
|
||||
requires _AC_EXEEXT.
|
||||
Don't run _AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2.
|
||||
* aclang.m4 (_AC_PROG_F77_G): Use _AC_COMPILE_IFELSE, not
|
||||
AC_COMPILE_IFELSE.
|
||||
(_AC_LANG_COMPILER_WORKS): Use _AC_LINK_IFELSE, not
|
||||
AC_LINK_IFELSE.
|
||||
|
||||
2000-10-12 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Diagnose AC_REQUIRE circular dependencies.
|
||||
|
4
TODO
4
TODO
@ -9,6 +9,10 @@ these suggestions... their presence here doesn't imply my endorsement.
|
||||
|
||||
* Autoconf 2.50
|
||||
|
||||
** AC_EXEEXT, AC_OBJEXT
|
||||
We need a good implement. As much as possible, they should not depend
|
||||
upon AC_EMXOS2 etc.
|
||||
|
||||
** More tests
|
||||
Check that AC_REQUIRE circular dependencies are caught.
|
||||
|
||||
|
@ -519,7 +519,7 @@ AC_DEFUN([AC_REQUIRE_CPP],
|
||||
# -----------------------
|
||||
define([_AC_LANG_COMPILER_WORKS],
|
||||
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
|
||||
# If not cross compiling, check that we can run a simple program.
|
||||
if test "$cross_compiling" != yes; then
|
||||
@ -1051,7 +1051,7 @@ ac_save_FFLAGS=$FFLAGS
|
||||
FFLAGS=
|
||||
AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
|
||||
[FFLAGS=-g
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_f77_g=yes],
|
||||
[ac_cv_prog_f77_g=no])
|
||||
])
|
||||
|
@ -1559,14 +1559,11 @@ AC_DEFUN([AC_OBJEXT], [])
|
||||
# executable. If this is called, the executable extensions will be
|
||||
# automatically used by link commands run by the configure script.
|
||||
define([_AC_EXEEXT],
|
||||
[_AC_CYGWIN
|
||||
_AC_MINGW32
|
||||
_AC_EMXOS2
|
||||
AC_CACHE_CHECK([for executable suffix], ac_cv_exeext,
|
||||
[AC_CACHE_CHECK([for executable suffix], ac_cv_exeext,
|
||||
[case "$CYGWIN $MINGW32 $EMXOS2" in
|
||||
*yes*) ac_cv_exeext=.exe ;;
|
||||
*)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[if test ! -f conftest; then
|
||||
for ac_file in conftest.*; do
|
||||
case $ac_file in
|
||||
@ -1594,18 +1591,17 @@ AC_SUBST(EXEEXT)dnl
|
||||
define([_AC_OBJEXT],
|
||||
[AC_CACHE_CHECK([for object suffix], ac_cv_objext,
|
||||
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
for ac_file in conftest.*; do
|
||||
case $ac_file in
|
||||
*.$ac_ext) ;;
|
||||
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
rm -f conftest.$ac_ext
|
||||
AC_MSG_ERROR([cannot compile])
|
||||
fi
|
||||
])
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
for ac_file in conftest.*; do
|
||||
case $ac_file in
|
||||
*.$ac_ext) ;;
|
||||
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
rm -f conftest.$ac_ext
|
||||
AC_MSG_ERROR([cannot compile])
|
||||
fi])
|
||||
AC_SUBST(OBJEXT, $ac_cv_objext)dnl
|
||||
ac_objext=$ac_cv_objext
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
|
@ -519,7 +519,7 @@ AC_DEFUN([AC_REQUIRE_CPP],
|
||||
# -----------------------
|
||||
define([_AC_LANG_COMPILER_WORKS],
|
||||
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
|
||||
# If not cross compiling, check that we can run a simple program.
|
||||
if test "$cross_compiling" != yes; then
|
||||
@ -1051,7 +1051,7 @@ ac_save_FFLAGS=$FFLAGS
|
||||
FFLAGS=
|
||||
AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
|
||||
[FFLAGS=-g
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_f77_g=yes],
|
||||
[ac_cv_prog_f77_g=no])
|
||||
])
|
||||
|
@ -519,7 +519,7 @@ AC_DEFUN([AC_REQUIRE_CPP],
|
||||
# -----------------------
|
||||
define([_AC_LANG_COMPILER_WORKS],
|
||||
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
|
||||
# If not cross compiling, check that we can run a simple program.
|
||||
if test "$cross_compiling" != yes; then
|
||||
@ -1051,7 +1051,7 @@ ac_save_FFLAGS=$FFLAGS
|
||||
FFLAGS=
|
||||
AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
|
||||
[FFLAGS=-g
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_f77_g=yes],
|
||||
[ac_cv_prog_f77_g=no])
|
||||
])
|
||||
|
@ -519,7 +519,7 @@ AC_DEFUN([AC_REQUIRE_CPP],
|
||||
# -----------------------
|
||||
define([_AC_LANG_COMPILER_WORKS],
|
||||
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
|
||||
# If not cross compiling, check that we can run a simple program.
|
||||
if test "$cross_compiling" != yes; then
|
||||
@ -1051,7 +1051,7 @@ ac_save_FFLAGS=$FFLAGS
|
||||
FFLAGS=
|
||||
AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
|
||||
[FFLAGS=-g
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_f77_g=yes],
|
||||
[ac_cv_prog_f77_g=no])
|
||||
])
|
||||
|
@ -1559,14 +1559,11 @@ AC_DEFUN([AC_OBJEXT], [])
|
||||
# executable. If this is called, the executable extensions will be
|
||||
# automatically used by link commands run by the configure script.
|
||||
define([_AC_EXEEXT],
|
||||
[_AC_CYGWIN
|
||||
_AC_MINGW32
|
||||
_AC_EMXOS2
|
||||
AC_CACHE_CHECK([for executable suffix], ac_cv_exeext,
|
||||
[AC_CACHE_CHECK([for executable suffix], ac_cv_exeext,
|
||||
[case "$CYGWIN $MINGW32 $EMXOS2" in
|
||||
*yes*) ac_cv_exeext=.exe ;;
|
||||
*)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
[if test ! -f conftest; then
|
||||
for ac_file in conftest.*; do
|
||||
case $ac_file in
|
||||
@ -1594,18 +1591,17 @@ AC_SUBST(EXEEXT)dnl
|
||||
define([_AC_OBJEXT],
|
||||
[AC_CACHE_CHECK([for object suffix], ac_cv_objext,
|
||||
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
for ac_file in conftest.*; do
|
||||
case $ac_file in
|
||||
*.$ac_ext) ;;
|
||||
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
rm -f conftest.$ac_ext
|
||||
AC_MSG_ERROR([cannot compile])
|
||||
fi
|
||||
])
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
for ac_file in conftest.*; do
|
||||
case $ac_file in
|
||||
*.$ac_ext) ;;
|
||||
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
rm -f conftest.$ac_ext
|
||||
AC_MSG_ERROR([cannot compile])
|
||||
fi])
|
||||
AC_SUBST(OBJEXT, $ac_cv_objext)dnl
|
||||
ac_objext=$ac_cv_objext
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
|
Loading…
Reference in New Issue
Block a user