]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acspecific.m4 (_AC_EXEEXT): Set extension to void if linking
authorAkim Demaille <akim@epita.fr>
Wed, 6 Sep 2000 13:03:08 +0000 (13:03 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 6 Sep 2000 13:03:08 +0000 (13:03 +0000)
creates both an unsuffixed file and suffixed ones.

ChangeLog
acspecific.m4
lib/autoconf/specific.m4

index 854f1ca89c2afabac437a07c7a7a7477b876ad68..ecc6518f93ebb3aa3bd493d1d7b6c51bac5b146c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-06  Bernard Dautrevaux  <dautrevaux@objectlive.com>
+
+       * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking
+       creates both an unsuffixed file and suffixed ones.
+
 2000-09-06  Peter Eisentraut  <peter_e@gmx.net>
 
        * autoconf.texi: English and typo fixes.
index fddfac2fab927a307487c78781e0daf5ae7299c3..d7b589f1fe01796be5f4ef9c6363ef7b3db76200 100644 (file)
@@ -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.
index fddfac2fab927a307487c78781e0daf5ae7299c3..d7b589f1fe01796be5f4ef9c6363ef7b3db76200 100644 (file)
@@ -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.