From: Akim Demaille Date: Wed, 29 Nov 2000 18:41:14 +0000 (+0000) Subject: * acspecific.m4 (_AC_OBJEXT): Skip *.tds, special case .o and X-Git-Tag: autoconf-2.50~372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4de67f9877e4a1db21be3f21d5e5ae5f1c7eb9b;p=thirdparty%2Fautoconf.git * acspecific.m4 (_AC_OBJEXT): Skip *.tds, special case .o and .obj. Suggested by Lars. --- diff --git a/ChangeLog b/ChangeLog index fa85de50e..3d1b99be5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-11-29 Akim Demaille + + * acspecific.m4 (_AC_OBJEXT): Skip *.tds, special case .o and + .obj. + Suggested by Lars. + 2000-11-29 Akim Demaille * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the portability of diff --git a/acspecific.m4 b/acspecific.m4 index 2ef36d6dd..e46889d2d 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -1224,15 +1224,20 @@ AC_SUBST(EXEEXT)dnl # Check the object extension used by the compiler: typically .o or # .obj. If this is called, some other behaviour will change, # determined by ac_objext. +# +# When the w32 free Borland C++ command line compiler links a program +# (conftest.exe), it also produces a file named `conftest.tds' in +# addition to `conftest.obj' m4_define([_AC_OBJEXT], [AC_CACHE_CHECK([for object suffix], ac_cv_objext, [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) if AC_TRY_EVAL(ac_compile); then - for ac_file in conftest.*; do - case $ac_file in - *.$ac_ext) ;; - *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;; - esac + for ac_file in `ls conftest.o conftest.obj conftest.* 2>/dev/null`; do + case $ac_file in + *.o | *.obj ) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`;; + *.$ac_ext | *.tds ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`;; + esac done else rm -f conftest.$ac_ext diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 2ef36d6dd..e46889d2d 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -1224,15 +1224,20 @@ AC_SUBST(EXEEXT)dnl # Check the object extension used by the compiler: typically .o or # .obj. If this is called, some other behaviour will change, # determined by ac_objext. +# +# When the w32 free Borland C++ command line compiler links a program +# (conftest.exe), it also produces a file named `conftest.tds' in +# addition to `conftest.obj' m4_define([_AC_OBJEXT], [AC_CACHE_CHECK([for object suffix], ac_cv_objext, [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) if AC_TRY_EVAL(ac_compile); then - for ac_file in conftest.*; do - case $ac_file in - *.$ac_ext) ;; - *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;; - esac + for ac_file in `ls conftest.o conftest.obj conftest.* 2>/dev/null`; do + case $ac_file in + *.o | *.obj ) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`;; + *.$ac_ext | *.tds ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`;; + esac done else rm -f conftest.$ac_ext