autoconf
[Top][All Lists]
Advanced

[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: Wed, 13 Dec 2000 19:20:07 +0100

> -----Original Message-----
> From: Akim Demaille [mailto:address@hidden
> Sent: Wednesday, December 13, 2000 1:40 PM
> To: Alexandre Oliva
> Cc: Peter Eisentraut; Morten Eriksen; address@hidden
> Subject: Re: AC_OBJEXT again
> 

                <snipped> 
> | But I'm also a bit unsure as to whether we should use 
> _AC_LINK_IFELSE,
> | given that this macro will tell the compiler to create an executable
> | named `conftest', and this may disable whatever default 
> extension the
> | compiler might have selected.
> 
> Good point.
> 
> | The bad side of this is that, if we
> | leave the decision up to the compiler, we'll get a.out or 
> a.exe, which
> | is out of autoconf's file namespace.
> 
> Bad point.
> 
> So the real question is, what happens when you use -o conftest?  Will
> the cross-compiler and native Win compilers produce conftest, or/and
> conftest.exe?  As long as conftest.exe is created when one `-o
> conftest', we're doing good.


Problem in fact is that, IMNSHO, EXEEXT is a HOST OS characteristic; I think
it's not too difficult to think of a Win32 cross-compiler hosted on UNIX
that obey strictly the '-o conftest' options, expecting its user to *know*
that Win32 *needs* the file to be named conftest.exe, and thus thinking it
will use '-o conftest.exe' :-)

Remember the need for AC_EXEEXT is mainly in generating the Makefile so that
we can put the right extension in the rules targets so that the '-o $@' and
install rulles will be correct.

In fact as long as the compiler accepts to generate 'conftest.foobar' when
given '-o conftest.foobar' and the HOST needs a file to be named
'xxx.foobar' so that to execute it then all is OK; OTOH, if '-o
conftest.foobar' fails or generate plain 'conftest' fo such a host, then the
compiler is broken (and we thus may need to rewrite the compile rule to use
'-o `basename $@ .foobar`' and add an "mv `basename $@ .foobar` $@"...
(don't laugh! I've had to do this kind of trick trying to work with some
braindead cross-compiler :-])

So I think EXEEXT should use the HOST name and a (config.exeext?) table
knowing that some known hosts link "*-cygwin*" or "*-mingw*"... *need*
".exe", *then* check that "-o conftest.exe" really creates conftest.exe.

On the contrary OBJEXT is really a BUILD (in fact compiler) characteristic,
so the proposed patch is fine.

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
-------------------------------------------- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]