autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross-compiling but keeping one target native


From: Christian Rössel
Subject: Re: cross-compiling but keeping one target native
Date: Mon, 17 May 2010 17:45:56 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4

Dear Natalie,

Am 5/15/2010 10:52 AM, schrieb Natalie Tasman:
> I'm working on a build system with autotools.  I'd like to 
> cross-compile, building a mingw/windows executable from linux.  So far, 
> my system works well with the --host option (and appropriate cross tools 
> installed, from the mingw-cross-env project.)
> 
> I have one target which is actually a utility used during *build* time. 
>   Is it possible to specify one target which should *not* be built with 
> the cross-compiler, but natively instead?
> 
> I've considered creating a separate config.ac/Makefile.am for this one 
> executable, but am hoping to find a simpler solution.
> 
> (It was suggested that I post here over at the automake list).

I had a similar problem, see e.g.
http://www.mail-archive.com/address@hidden/msg14826.html

My solution to the problem was to create a new macro
AC_CONIG_SUBDIR_CUSTOM([path to sub-configure], [your configure
arguments]) based on AC_CONFIG_SUBDIR. As the new macro uses some
autoconf internals I implemented it in autoconf's status.m4. To not
alter the autoconf installation, I put the modified status.m4 in my
AC_CONFIG_MACRO_DIR.

If you call the macro with an empty argument list, it will call the
sub-configure with the top-level --prefix, --disable-option-checking,
--cache-file=/dev/null and the --srcdir option.

To use some of the options provided to the toplevel configure in the
custom sub-configure, I write all user provided configure arguments to
file and process this file in a second step.

Please find attached a patch to be applied on autoconf's 2.65.
status.m4. Hope that helps.

Best regards,
Christian

Attachment: status.m4.patch
Description: Text document


reply via email to

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