autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a.* in autoconf 2.50 configure script


From: Akim Demaille
Subject: Re: a.* in autoconf 2.50 configure script
Date: 23 Jun 2001 15:55:51 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor)

| If the directory where an autoconf 2.50 configure script is run
| has a pre-exisiting file with a name like a.ins, the script gets
| confused about compiler extensions:
| 
| /home/bil/cl/ ./configure
| checking build system type... i686-pc-linux-gnu
| checking host system type... i686-pc-linux-gnu
| checking for gcc... gcc
| checking for C compiler default output... a.ins
| checking whether the C compiler works... configure: error: cannot run C 
compiled programs.
| If you meant to cross compile, use `--host'.
| /home/bil/cl/ ls -la a.ins
| -rw-r--r--    1 bil      bil          5795 Jul 24  1999 a.ins

I'm applying this patch.  According to your log, I guess a.out was to
be caught first, right?

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Try to be robust to
        preexisting files matching a.*.

Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.135
diff -u -u -r1.135 aclang.m4
--- aclang.m4 2001/06/12 14:46:13 1.135
+++ aclang.m4 2001/06/23 13:48:51
@@ -652,18 +652,24 @@
 # 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;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]