]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Try to be robust to
authorAkim Demaille <akim@epita.fr>
Sat, 23 Jun 2001 13:51:39 +0000 (13:51 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 23 Jun 2001 13:51:39 +0000 (13:51 +0000)
preexisting files matching a.*.

ChangeLog
NEWS
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4

index a54d9409854545882905dc7a21f3e9648bc71ae7..19e69df6891f2ddb47e4e01e01499cb885336dbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-23  Akim Demaille  <akim@epita.fr>
+
+       * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Try to be robust to
+       preexisting files matching a.*.
+
 2001-06-23  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Output error messages on
diff --git a/NEWS b/NEWS
index 94e90e34fd9c5e9e54785b8242b21dbf97c9e6d1..792dc65baf5d4b62b6c95b914b462e7923ac2920 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@
 - AC_ARG_VAR properly propagates precious variables inherited from the
   environment to ./config.status.
 - Using --program-suffix/--program-prefix is portable.
+- Failures to detect the default compiler's output extension are less
+  likely.
 
 ** Generic macros
 - AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to
index 57aaef7747fbc8e17cc0ff40726a2e9066245c43..156c511c029d888c7c4b1012234e49fe8a86b218 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -652,18 +652,24 @@ AC_DEFUN([AC_OBJEXT],   [])
 # it compiles properly.
 m4_define([_AC_COMPILER_EXEEXT_DEFAULT],
 [# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compiler, and finding out an intuition
+# It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
 AC_MSG_CHECKING([for _AC_LANG compiler default output])
 ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
 AS_IF([AC_TRY_EVAL(ac_link_default)],
-[for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do
+[# Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
   case $ac_file in
     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
     a.out ) # We found the default executable, but exeext='' is most
             # certainly right.
             break;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
           export ac_cv_exeext
           break;;
     * ) break;;
index 57aaef7747fbc8e17cc0ff40726a2e9066245c43..156c511c029d888c7c4b1012234e49fe8a86b218 100644 (file)
@@ -652,18 +652,24 @@ AC_DEFUN([AC_OBJEXT],   [])
 # it compiles properly.
 m4_define([_AC_COMPILER_EXEEXT_DEFAULT],
 [# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compiler, and finding out an intuition
+# It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
 AC_MSG_CHECKING([for _AC_LANG compiler default output])
 ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
 AS_IF([AC_TRY_EVAL(ac_link_default)],
-[for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do
+[# Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
   case $ac_file in
     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
     a.out ) # We found the default executable, but exeext='' is most
             # certainly right.
             break;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
           export ac_cv_exeext
           break;;
     * ) break;;
index 57aaef7747fbc8e17cc0ff40726a2e9066245c43..156c511c029d888c7c4b1012234e49fe8a86b218 100644 (file)
@@ -652,18 +652,24 @@ AC_DEFUN([AC_OBJEXT],   [])
 # it compiles properly.
 m4_define([_AC_COMPILER_EXEEXT_DEFAULT],
 [# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compiler, and finding out an intuition
+# It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
 AC_MSG_CHECKING([for _AC_LANG compiler default output])
 ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
 AS_IF([AC_TRY_EVAL(ac_link_default)],
-[for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do
+[# Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
   case $ac_file in
     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
     a.out ) # We found the default executable, but exeext='' is most
             # certainly right.
             break;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
           export ac_cv_exeext
           break;;
     * ) break;;
index 57aaef7747fbc8e17cc0ff40726a2e9066245c43..156c511c029d888c7c4b1012234e49fe8a86b218 100644 (file)
@@ -652,18 +652,24 @@ AC_DEFUN([AC_OBJEXT],   [])
 # it compiles properly.
 m4_define([_AC_COMPILER_EXEEXT_DEFAULT],
 [# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compiler, and finding out an intuition
+# It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
 AC_MSG_CHECKING([for _AC_LANG compiler default output])
 ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
 AS_IF([AC_TRY_EVAL(ac_link_default)],
-[for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do
+[# Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
   case $ac_file in
     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
     a.out ) # We found the default executable, but exeext='' is most
             # certainly right.
             break;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
           export ac_cv_exeext
           break;;
     * ) break;;