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>
+
+ 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.
* 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.
# -----------------------
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
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])
])
# 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
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
# -----------------------
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
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])
])
# -----------------------
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
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])
])
# -----------------------
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
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])
])
# 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
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