Hello,
On Sat, Apr 28, 2007 at 10:51:11PM -0700, Paul Eggert wrote:
> Stepan Kasal <[EMAIL PROTECTED]> writes:
> > So my wild guess it that it might have been introduced by mistake;
> > and all future editors copied it worshipfully...
>
> Yes, that sounds right to me. Thanks for the history-searching, and
> thanks, Ralf, for the bug report.
I finally found time to read the old discussion, and verified that
it does not contain any reason which would justify the a.* pattern.
Thanks for the fix.
When we are at this, the comments in this macro should be reordered.
Attached please find a patch.
Reviews welcome.
Moreover, the order of the file names in ac_files should be fixed,
too:
- "conftest.*" should be at the end of the list, as the comment says.
- "a.out" should be first, beacuse it is the most common output name
(There is no need to have "a.exe" before it, because Cygwin magic
is not _that_ clever.)
- "a_out.exe" is not a variant for dos-like systems, it is for
OpenVMS, as a comment above explains. So we can safely move it
near the end.
So the resulting list would be:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
What would you think about this?
Have a nice day,
Stepan
2007-05-03 Stepan Kasal <[EMAIL PROTECTED]>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Reorganize
the comments before and in the macro.
Index: ./lib/autoconf/lang.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.187
diff -u -r1.187 lang.m4
--- ./lib/autoconf/lang.m4 29 Apr 2007 05:50:27 -0000 1.187
+++ ./lib/autoconf/lang.m4 2 May 2007 12:00:34 -0000
@@ -462,28 +462,34 @@
# 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.exe a.exe conftest.exe a.out conftest conftest.* b.out'
+
ac_rmfiles=
for ac_file in $ac_files
do