]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Drop the
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 26 May 2006 17:25:35 +0000 (17:25 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 26 May 2006 17:25:35 +0000 (17:25 +0000)
initialization of `ac_cv_exeext', do not override it if it was
already set, unless it was set to `no', for compatibility with
Autoconf-2.13, and comment this.
Do not export `ac_cv_exeext', Libtool hasn't needed this for years.
(_AC_COMPILER_EXEEXT_DEFAULT): Likewise, do not export it.
(_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_CROSS): Typos.
* doc/autoconf.texi (Compilers and Preprocessors) <EXEEXT>:
Document that this test may be overridden by setting
`ac_cv_exeext'.

ChangeLog
doc/autoconf.texi
lib/autoconf/lang.m4

index 8ccd422de5f84eb0f5ee306a717b245d77199435..21008ee3128076ce3760c8b10a9768f6be992dd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-05-26  Stepan Kasal  <kasal@ucw.cz>
+       and Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+       
+       * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Drop the
+       initialization of `ac_cv_exeext', do not override it if it was
+       already set, unless it was set to `no', for compatibility with
+       Autoconf-2.13, and comment this.
+       Do not export `ac_cv_exeext', Libtool hasn't needed this for years.
+       (_AC_COMPILER_EXEEXT_DEFAULT): Likewise, do not export it.
+       (_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_CROSS): Typos.
+       * doc/autoconf.texi (Compilers and Preprocessors) <EXEEXT>:
+       Document that this test may be overridden by setting
+       `ac_cv_exeext'.
+
 2006-05-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Revert these two patches:
index 45c4be7de90f3c346a962311199b47db1392d8a2..2f160334f92681d9f5a0c7d2ecd6ff2a95bdbc61 100644 (file)
@@ -5911,7 +5911,9 @@ implemented.  In case of doubt, read the documentation of the former
 All the tests for compilers (@code{AC_PROG_CC}, @code{AC_PROG_CXX},
 @code{AC_PROG_F77}) define the output variable @code{EXEEXT} based on
 the output of the compiler, typically to the empty string if
-Posix and @samp{.exe} if a @acronym{DOS} variant.
+Posix and @samp{.exe} if a @acronym{DOS} variant.  It can be overridden
+by passing the argument @samp{ac_cv_exeext=@var{ext}} to
+@command{configure}.
 
 @ovindex OBJEXT
 They also define the output variable @code{OBJEXT} based on the
index d45540d99f2ba2011855e4ab7cf942f1378d8f5c..7fca894715433593b2f0a828577bb2ba1ed8ed4c 100644 (file)
@@ -495,9 +495,11 @@ done
 rm -f $ac_rmfiles
 
 AS_IF([AC_TRY_EVAL(ac_link_default)],
-[# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
+[# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
 for ac_file in $ac_files
 do
   test -f "$ac_file" || continue
@@ -509,16 +511,22 @@ do
        # certainly right.
        break;;
     *.* )
-       ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
-       # FIXME: I believe we export ac_cv_exeext for Libtool,
-       # but it would be cool to find out if it's true.  Does anybody
-       # maintain Libtool? --akim.
-       export ac_cv_exeext
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
        break;;
     * )
        break;;
   esac
-done],
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+],
       [_AC_MSG_LOG_CONFTEST
 AC_MSG_FAILURE([_AC_LANG compiler cannot create executables], 77)])
 ac_exeext=$ac_cv_exeext
@@ -529,7 +537,7 @@ AC_MSG_RESULT([$ac_file])
 # _AC_COMPILER_EXEEXT_WORKS
 # -------------------------
 m4_define([_AC_COMPILER_EXEEXT_WORKS],
-[# Check the compiler produces executables we can run.  If not, either
+[# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
 AC_MSG_CHECKING([whether the _AC_LANG compiler works])
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
@@ -553,7 +561,7 @@ AC_MSG_RESULT([yes])
 # _AC_COMPILER_EXEEXT_CROSS
 # -------------------------
 m4_define([_AC_COMPILER_EXEEXT_CROSS],
-[# Check the compiler produces executables we can run.  If not, either
+[# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
 AC_MSG_CHECKING([whether we are cross compiling])
 AC_MSG_RESULT([$cross_compiling])
@@ -576,7 +584,6 @@ for ac_file in conftest.exe conftest conftest.*; do
   case $ac_file in
     _AC_COMPILER_EXEEXT_REJECT ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
-         export ac_cv_exeext
          break;;
     * ) break;;
   esac