Dear sirs,
While trying to use autoconf-2.13 on our cross-compiler toolkit, we
get in a small glitch in AC_EXEEXT implementation. If it was not CYGWIN or
MINGW32 (where .exe is assumed), the macro link a small program and looks to
see if it found conftest.XXX where XXX is neither '.o' nor '.obj' nor '.c'.
The problem we have is that we generate side-by-side with a
non-suffixed executable both a map file suffixed ".map" and a debugger
symbol table suffixed ".xdb"; then AC_EXEEXT says the executables are
suffixed by ".xdb" if we configure with CC="sxc -g" (sxc is our cross
compiler) and ".map" if we configure with CC=sxc :-(
I then propose the following patch that in this case (if the
compiler creates a file without any suffix) consider the executable is the
un-suffixed file. We purposely do not check for executable as it seems that
"test -x" is not so portable and because a cross-compiler has no interest in
setting the execute permission (and may not be able to for example if hosted
on Windows).
Proposed Changelog entry:
2000-09-05 Bernard Dautrevaux <[EMAIL PROTECTED]>
* acspecific.m4 (AC_EXEEXT): Set extension to void if linking
creates both an unsuffixed file and suffixed ones.
The patch is then here:
*** autoconf.old/acspecific.m4 1999/01/06 15:33:26
--- autoconf.new/acspecific.m4 2000/09/05 17:24:46
***************
*** 2658,2667 ****
ac_cv_exeext=
if AC_TRY_EVAL(ac_link); then
! for file in conftest.*; do
! case $file in
! *.c | *.o | *.obj) ;;
! *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
! esac
! done
else
AC_MSG_ERROR([installation or configuration problem: compiler cannot
create executables.])
--- 2658,2669 ----
ac_cv_exeext=
if AC_TRY_EVAL(ac_link); then
! if test ! -x conftest; then
! for file in conftest.*; do
! case $file in
! *.c | *.o | *.obj) ;;
! *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
! esac
! done
! fi
else
AC_MSG_ERROR([installation or configuration problem: compiler cannot
create executables.])
Hope this could make its way in the next release (I do not like too much to
have to maintain patched versions of tools locally).
TIA
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
--------------------------------------------