From 18d78d3a5571522420174b22fb5aba162eece406 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 3 May 2007 17:23:39 +0000 Subject: [PATCH] * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Put a.out first. Reorganize the comments before and in the macro. --- ChangeLog | 5 +++++ lib/autoconf/lang.m4 | 30 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2293ffba..34ad5c09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-03 Stepan Kasal + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Put a.out first. + Reorganize the comments before and in the macro. + 2007-05-02 Stepan Kasal * lib/autoconf/lang.m4, lib/autoconf/c.m4, diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index acfb81ff..c781d5c3 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -436,28 +436,34 @@ AC_DEFUN([AC_OBJEXT], []) # We do this in order to find out what is the extension we must add for # creating executables (see _AC_COMPILER_EXEEXT's comments). # +# On OpenVMS 7.1 system, the DEC C 5.5 compiler when called through a +# GNV (gnv.sourceforge.net) cc wrapper, produces the output file named +# `a_out.exe'. +# b.out is created by i960 compilers. +# +# Start with the most likely output file names, but: +# 1) Beware the clever `test -f' on Cygwin, try the DOS-like .exe names +# before the counterparts without the extension. +# 2) The algorithm is not robust to junk in `.', hence go to wildcards +# (conftest.*) only as a last resort. # Beware of `expr' that may return `0' or `'. Since this macro is # the first one in touch with the compiler, it should also check that # it compiles properly. # -# On OpenVMS 7.1 system, the DEC C 5.5 compiler when called through a -# GNV (gnv.sourceforge.net) cc wrapper, produces the output file named -# `a_out.exe'. +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +# m4_define([_AC_COMPILER_EXEEXT_DEFAULT], [# Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. AC_MSG_CHECKING([for _AC_LANG compiler default output file name]) ac_link_default=`AS_ECHO(["$ac_link"]) | sed ['s/ -o *conftest[^ ]*//']` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards -# (conftest.*) only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do -- 2.47.2