[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EXEEXT: `cc -o' (Was: AC_CYGWIN etc.)
From: |
Mo DeJong |
Subject: |
Re: EXEEXT: `cc -o' (Was: AC_CYGWIN etc.) |
Date: |
Fri, 15 Dec 2000 03:08:18 -0800 (PST) |
On 15 Dec 2000, Akim Demaille wrote:
>
> Here is my proposal. Mo, could you give it a try? Thanks!
>
> Index: ChangeLog
> from Akim Demaille <address@hidden>
> * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): New.
> (_AC_COMPILER_EXEEXT_O): Extracted from...
> (_AC_COMPILER_EXEEXT): here. Adjust.
Humm, no luck.
checking build system type... i686-pc-linux-gnu
checking host system type... i386-pc-mingw32msvc
checking for i386-mingw32msvc-g++... i386-mingw32msvc-g++
checking whether the C++ compiler works... yes
checking whether we are cross compiling... yes
checking whether we are using the GNU C++ compiler... yes
checking for object suffix... o
checking for executable suffix...
checking whether i386-mingw32msvc-g++ accepts -g... yes
>From config.log
configure:1518: checking for executable suffix
configure:1546: i386-mingw32msvc-g++ conftest.cc >&5
configure:1549: $? = 0
configure:1569: i386-mingw32msvc-g++ -o conftest conftest.cc >&5
configure:1572: $? = 0
configure:1573: test -s conftest
configure:1576: $? = 0
configure:1601: result:
configure:1608: checking whether i386-mingw32msvc-g++ accepts -g
configure:1629: i386-mingw32msvc-g++ -c -g conftest.cc >&5
This patch (applied after you patch) seems to fix it:
--- akim_aclang.m4 Fri Dec 15 01:44:44 2000
+++ aclang.m4 Fri Dec 15 02:03:29 2000
@@ -668,7 +668,7 @@
[for ac_file in `ls a.exe a.* 2>/dev/null`; do
case $ac_file in
*.$ac_ext | *.out | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
- *) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`
+ *) ac_cv_exeext=`expr "$ac_file" : 'a\(.*\)'`
break;;
esac
done],
@@ -687,7 +687,11 @@
# Check for the extension used when `-o foo'. Try to see if
ac_cv_exeext,
# as computed by _AC_COMPILER_EXEEXT_DEFAULT is OK.
m4_define([_AC_COMPILER_EXEEXT_O],
-[_AC_LINK_IFELSE([],
+[# Note that we have not set ac_exeext yet, so we do that here
+# because linking a file depends on ac_exeext not ac_cv_exeext
+ac_exeext_save=$ac_exeext
+ac_exeext=$ac_cv_exeext
+_AC_LINK_IFELSE([],
[# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -702,6 +706,7 @@
done],
[AC_MSG_ERROR([cannot compute EXEEXT: cannot compile and
link])])
rm -f conftest.$ac_ext conftest$ac_cv_exeext
+ac_exeext=$ac_exeext_save
])# _AC_COMPILER_EXEEXT_O
checking build system type... i686-pc-linux-gnu
checking host system type... i386-pc-mingw32msvc
checking for i386-mingw32msvc-g++... i386-mingw32msvc-g++
checking whether the C++ compiler works... yes
checking whether we are cross compiling... yes
checking whether we are using the GNU C++ compiler... yes
checking for object suffix... o
checking for executable suffix... .exe
checking whether i386-mingw32msvc-g++ accepts -g... yes
Mo DeJong
Red Hat Inc