autoconf-patches
[Top][All Lists]
Advanced

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

Fix EXEEXT mechanism


From: Tim Van Holder
Subject: Fix EXEEXT mechanism
Date: Sat, 20 Jan 2001 11:50:15 +0100

Changes:
 - moved AC_COMPILER_(OBJ|EXE)EXT before AC_LANG_COMPILER_WORKS,
   as the latter requires a correct ac_exeext to function
 - use AS_IF(AC_TRY_EVAL(ac_link)) instead of AC_LINK_IFELSE
   in AC_EXEEXT_O, as the latter also requires a correct ac_exeext

Also fixed a small typo in a comment.

2001-01-20  Tim Van Holder  <address@hidden>

        * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use
        AS_IF([AC_TRY_EVAL(ac_link)] instead of AC_LINK_IFELSE to
        avoid depending on ac_exeext being valid.
        (AC_PROG_CC): Check for the executable extension BEFORE
        checking whether the compiler works, as that test depends
        on a correct ac_exeext.


Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.112
diff -u -r1.112 aclang.m4
--- aclang.m4   2001/01/19 14:03:14     1.112
+++ aclang.m4   2001/01/20 10:42:55
@@ -651,7 +651,7 @@
 # addition to `conftest.obj'
 
 
-# We must not AU define them, because autoupdate would them remove
+# We must not AU define them, because autoupdate would then remove
 # them, which is right, but Automake 1.4 would remove the support for
 # $(EXEEXT) etc.
 # FIXME: Remove this once Automake fixed.
@@ -688,7 +688,7 @@
 m4_define([_AC_COMPILER_EXEEXT_O],
 [# We have not set ac_exeext yet which is needed by `ac_link'.
 ac_exeext=$ac_cv_exeext
-_AC_LINK_IFELSE([],
+AS_IF([AC_TRY_EVAL(ac_link)],
 [# 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
@@ -876,11 +876,11 @@
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
+AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
+AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
 _AC_PROG_CC_G
 # Some people use a C++ compiler to compile C.  Since we use `exit',
 # in C++ we need to declare it.  In case someone uses the same compiler




reply via email to

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