From: Akim Demaille Date: Wed, 6 Sep 2000 13:03:08 +0000 (+0000) Subject: * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking X-Git-Tag: autoconf-2.50~645 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aa6b910cead4e65c4e945dd98ea342eeb6af6c2;p=thirdparty%2Fautoconf.git * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking creates both an unsuffixed file and suffixed ones. --- diff --git a/ChangeLog b/ChangeLog index 854f1ca89..ecc6518f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-09-06 Bernard Dautrevaux + + * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking + creates both an unsuffixed file and suffixed ones. + 2000-09-06 Peter Eisentraut * autoconf.texi: English and typo fixes. diff --git a/acspecific.m4 b/acspecific.m4 index fddfac2fa..d7b589f1f 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -1548,7 +1548,7 @@ AC_DEFUN([AC_OBJEXT], []) # _AC_EXEEXT -# -_-------- +# ---------- # Check for the extension used for executables. This knows that we # add .exe for Cygwin or mingw32. Otherwise, it compiles a test # executable. If this is called, the executable extensions will be @@ -1558,19 +1558,21 @@ define([_AC_EXEEXT], _AC_MINGW32 _AC_EMXOS2 AC_CACHE_CHECK([for executable suffix], ac_cv_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then - ac_cv_exeext=.exe -else +[case "$CYGWIN $MINGW32 $EMXOS2" in + *yes*) ac_cv_exeext=.exe ;; + *) AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [for ac_file in conftest.*; do - case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff) ;; - *) ac_cv_exeext=`echo $ac_file | sed s/conftest//` ;; - esac - done], + [if test ! -f conftest; then + for ac_file in conftest.*; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff) ;; + *) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`;; + esac + done + fi], [AC_MSG_ERROR([cannot compile and link])]) - test -n "$ac_cv_exeext" && ac_cv_exeext=no -fi]) + test -n "$ac_cv_exeext" && ac_cv_exeext=no;; +esac]) EXEEXT= test "$ac_cv_exeext" != no && EXEEXT=$ac_cv_exeext dnl Setting ac_exeext will implicitly change the ac_link command. diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index fddfac2fa..d7b589f1f 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -1548,7 +1548,7 @@ AC_DEFUN([AC_OBJEXT], []) # _AC_EXEEXT -# -_-------- +# ---------- # Check for the extension used for executables. This knows that we # add .exe for Cygwin or mingw32. Otherwise, it compiles a test # executable. If this is called, the executable extensions will be @@ -1558,19 +1558,21 @@ define([_AC_EXEEXT], _AC_MINGW32 _AC_EMXOS2 AC_CACHE_CHECK([for executable suffix], ac_cv_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then - ac_cv_exeext=.exe -else +[case "$CYGWIN $MINGW32 $EMXOS2" in + *yes*) ac_cv_exeext=.exe ;; + *) AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [for ac_file in conftest.*; do - case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff) ;; - *) ac_cv_exeext=`echo $ac_file | sed s/conftest//` ;; - esac - done], + [if test ! -f conftest; then + for ac_file in conftest.*; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff) ;; + *) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`;; + esac + done + fi], [AC_MSG_ERROR([cannot compile and link])]) - test -n "$ac_cv_exeext" && ac_cv_exeext=no -fi]) + test -n "$ac_cv_exeext" && ac_cv_exeext=no;; +esac]) EXEEXT= test "$ac_cv_exeext" != no && EXEEXT=$ac_cv_exeext dnl Setting ac_exeext will implicitly change the ac_link command.