]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Macros used by AC_LANG_COMPILER macros shall not AC_REQUIRE
authorAkim Demaille <akim@epita.fr>
Thu, 12 Oct 2000 12:39:25 +0000 (12:39 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 12 Oct 2000 12:39:25 +0000 (12:39 +0000)
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.

ChangeLog
TODO
aclang.m4
acspecific.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4
lib/autoconf/specific.m4

index b60bb09ef041318f0afdabeed2872e401fdd1bc2..8a899ccaf602af86bb71a5686df7df1cb5aa79f4 100644 (file)
--- a/ChangeLog
+++ b/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.
diff --git a/TODO b/TODO
index ea15edf1a217f118683571c5231579840bdb7cfe..aa290620d8eb855a81a4765f05d6b3f4b54d75b2 100644 (file)
--- a/TODO
+++ b/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.
 
index 2382fd737e124ecd982cd0262bbb5ccb7f7661ec..2344a06731aa5c4b051d1d8d2e3397eba2cb6e44 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -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])
 ])
index 26353e2c85a8f8c65db9aadfbdf9c9b5d060a2d4..dc3587d42c737ac526106e35439318e08c82118d 100644 (file)
@@ -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
index 2382fd737e124ecd982cd0262bbb5ccb7f7661ec..2344a06731aa5c4b051d1d8d2e3397eba2cb6e44 100644 (file)
@@ -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])
 ])
index 2382fd737e124ecd982cd0262bbb5ccb7f7661ec..2344a06731aa5c4b051d1d8d2e3397eba2cb6e44 100644 (file)
@@ -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])
 ])
index 2382fd737e124ecd982cd0262bbb5ccb7f7661ec..2344a06731aa5c4b051d1d8d2e3397eba2cb6e44 100644 (file)
@@ -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])
 ])
index 26353e2c85a8f8c65db9aadfbdf9c9b5d060a2d4..dc3587d42c737ac526106e35439318e08c82118d 100644 (file)
@@ -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