[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: AC_OBJEXT again
From: |
Bernard Dautrevaux |
Subject: |
RE: AC_OBJEXT again |
Date: |
Thu, 30 Nov 2000 17:50:54 +0100 |
> -----Original Message-----
> From: Earnie Boyd [mailto:address@hidden
> Sent: Thursday, November 30, 2000 5:22 PM
> To: Akim Demaille
> Cc: Lars J. Aas; address@hidden; APatche
> Subject: Re: AC_OBJEXT again
>
>
> --- Akim Demaille <address@hidden> wrote:
> > >>>>> "Earnie" == Earnie Boyd <address@hidden> writes:
> >
> > Earnie> HTH,
> >
> > It does, thanks. But then, you are referring to EXEEXT as a *build*
> > feature, not a host feature.
> >
> > Frankly, I think we will never end having problems until we
> introduce
> > the two sets. I can't see why EXEEXT and OBJEXT should be both
> > relevant for the build process, and for when the program is
> run on its
> > host.
>
> AISI, OBJEXT is only a build feature while EXEEXT is both a
> build feature and a
> host feature.
>
Even more precisely:
OBJEXT is a feature of the host-compiler running on the build-system
EXEEXT is a host-system feature
The whole problem with the AC_EXEEXT macro is that when build==host==cygwin,
the compiler GENERATES a conftest.exe file, but "ls conftest" or "test -f
conftest" will find "conftest.exe" (and ls will report "conftest.exe"'s name
as "conftest") but, as Earnie said, "rm conftest" will FAIL...
Perhaps in fact we can write the test as:
for ac_file in `ls conftest conftest.exe conftest.* 2>/dev/null`; do
case $ac_file in
*.$ac_ext | *.o | *.obj | *.xcoff | *.tds) ;;
conftest)
if rm conftest; then
ac_cv_exeext=
break
fi
;;
*) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`
break;;
esac
done
Sure it looks UGLY, and we should document why ls could return conftest and
rm not be able to remove it, but it should work around cygwin magic :-)
Regards,
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: address@hidden
address@hidden
--------------------------------------------