autoconf
[Top][All Lists]
Advanced

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

Re: Configure/make files for cross compilers


From: Guido Draheim
Subject: Re: Configure/make files for cross compilers
Date: Thu, 28 Mar 2002 23:13:42 +0100

> Es schrieb Andrew Kiggins:
> 
> Folks,
> I need to port some UNIX based code to an embedded OS (VxWorks).
> 
> Autoconf/configure is the modus operandus for building the various 
> UNIX flavours. To keep things nice I'd like to try to
> follow this module.
> 
> Is it possible to generate configure files that will do the 
> right thing for the cross-compiler/include files/library files ?
> Can I tell autoconf to look elsewhere for the various header, if 
> so how do I set about verifying their operation in the native
> system?

not problematic - but for cross-compiling you have to avoid any 
autoconf macros that try to AC_TRY_RUN, and with vxworks I noticed
that one better avoids to AC_TRY_LINK either. That limits the
choice of autoconf-detections to check-headers and check-compiler
stuff. Most of the time it did help to create a config.site file
that answers the questions - it also helps to speedup the
configure-time and decreases turn-around times when autoconf is
used for a small range of target systems where it is worth to
add a system-wide autoconf cache file.

> 
> The whole thing smacks of a Canadian Cross, but I'm sort of at a 
> loss to figure out whether this is even possible, or whether
> I just have to #ifdef the code and supply handcrafted Makefiles.
> 

well, autoconf is lowlevel enough that there is no benefit to 
use a set of handcraftet makefiles - better use a config.site
file and a few extra ac-macros for your environment that you
can add (it's not that problematic to create new autoconf macros,
it's documented, and more examples can be downloaded from
http://ac-archive.sf.net ) - most people just don't know about
config.site, so they miss the chance to pre-answer questions
that apply to (all of your) own projects in a closed setup.

good luck,
-- guido                                    http://freespace.sf.net/guidod
GCS/E/S/P C++/++++$ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)



reply via email to

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