diff --git a/ChangeLog b/ChangeLog index 8ccd422d..21008ee3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-05-26 Stepan Kasal + and Ralf Wildenhues + + * 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) : + Document that this test may be overridden by setting + `ac_cv_exeext'. + 2006-05-26 Ralf Wildenhues Revert these two patches: diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 45c4be7d..2f160334 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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 diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index d45540d9..7fca8947 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -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