From: Akim Demaille Date: Mon, 16 Sep 2002 08:38:45 +0000 (+0000) Subject: i960 compilers create `b.out' files by default. X-Git-Tag: AUTOCONF-2.54a~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13fd012e2fc70d9b42fe3ad09a0601bd72c3af65;p=thirdparty%2Fautoconf.git i960 compilers create `b.out' files by default. Reported by Ralf Corsepius. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove b.out files. (_AC_COMPILER_EXEEXT_DEFAULT): Adjust to b.out. --- diff --git a/ChangeLog b/ChangeLog index da0effbac..65a6f9fec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-09-16 Akim Demaille + + i960 compilers create `b.out' files by default. + Reported by Ralf Corsepius. + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove b.out files. + (_AC_COMPILER_EXEEXT_DEFAULT): Adjust to b.out. + 2002-09-13 Paul Eggert * doc/autoconf.texi (Particular Headers): Remove obsolete diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 65de57216..78602f868 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -9846,6 +9846,7 @@ The default executable, produced by @samp{cc foo.c}, can be @itemize @item @file{a.out} --- usual Unix convention. +@item @file{b.out} --- i960 compilers (including @command{gcc}). @item @file{a.exe} --- DJGPP port of @command{gcc}. @item @file{a_out.exe} --- GNV @command{cc} wrapper for DEC C on OpenVMS. @item @file{foo.exe} --- various MS-DOS compilers. diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index f62e32364..75fdbb837 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -426,6 +426,10 @@ AC_DEFUN([AC_OBJEXT], []) # _AC_COMPILER_EXEEXT_DEFAULT # --------------------------- # Check for the extension used for the default name for executables. +# +# We do this in order to find out what is the extension we must for +# compiling executables (see _AC_COMPILER_EXEEXT's comments). +# # 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. @@ -447,18 +451,29 @@ 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= -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do test -f "$ac_file" || continue case $ac_file in - _AC_COMPILER_EXEEXT_REJECT ) ;; - a.out ) # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` - # FIXME: I believe we export ac_cv_exeext for Libtool --akim. - export ac_cv_exeext - break;; - * ) break;; + _AC_COMPILER_EXEEXT_REJECT ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [[ab]].out ) + # We found the default executable, but exeext='' is most + # 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 + break;; + * ) + break;; esac done], [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD @@ -546,10 +561,10 @@ AC_MSG_RESULT([$ac_cv_exeext]) m4_define([_AC_COMPILER_EXEEXT], [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" +ac_clean_files="$ac_clean_files a.out a.exe b.out" _AC_COMPILER_EXEEXT_DEFAULT _AC_COMPILER_EXEEXT_WORKS -rm -f a.out a.exe conftest$ac_cv_exeext +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save _AC_COMPILER_EXEEXT_CROSS _AC_COMPILER_EXEEXT_O