But you and I were both talking about files that get generated at link time. AC_OBJEXT
does not link, and therefore should be no problem. The problem lies in AC_EXEEXT. Your
technique needs to be modified somewhat because you are not using file globbing for
'conftest.o' and 'conftest.obj'. How about:
for ac_file in conftest.exe* conftest.*; do
case $ac_file in
*.$ac_ext | *.o | *.obj | *.xcoff) ;;
*) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`
break;;
esac
done
--
Paul
"Lars J. Aas" wrote:
> On Wed, Nov 22, 2000 at 03:50:58PM -0500, Paul Berrevoets wrote:
> : This is ok for AC_OBJEXT, but for AC_EXEEXT please take into consideration that on
> : UWIN (which uses a cc wrapper for MSVC), the compiler also generates a .pdb file,
> : which if you don't filter it out along with .obj, would be used as the extension
> : for executables.
>
> As I mentioned under another subject, Borland C++ creates a .tds file that destroys
> the current test.
>
> How about something like this?
>
> Lars J
>
> Index: acspecific.m4
> ===================================================================
> RCS file: /cvs/autoconf/acspecific.m4,v
> retrieving revision 1.316
> diff -u -r1.316 acspecific.m4
> --- acspecific.m4 2000/11/17 16:45:24 1.316
> +++ acspecific.m4 2000/11/22 21:15:18
> @@ -1228,11 +1228,15 @@
> [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
> + ac_cv_objext=not_figured_out_yet
> + for ac_file in conftest.o conftest.obj conftest.*; do
> + if test -f $ac_file; then
> + case $ac_file in
> + *.$ac_ext) ;;
> + *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
> + esac
> + test $ac_cv_objext = not_figured_out_yet || break
> + fi
> done
> else
> rm -f conftest.$ac_ext