cross-compile and autotools howto missing
Erik de Castro Lopo
mle+tools at mega-nerd.com
Wed Oct 8 12:30:40 PDT 2008
Matěj Týč wrote:
> Thank you for your reply,
> I have read the article and I have realized two things:
> 1. That guy
That guys is me :-).
> invokes pkg-config in the makefile instead of using pkg-config
> macros in configure.ac (This is a very bad practice, for instance the user
> doesn't get warning if a package is missing)
That was for a simple example. When I'm using the autotools I
use pkg-config in the configure script.
For a full example, using autotools, grab this:
http://www.mega-nerd.com/tmp/libsndfile-1.0.18pre23b.tar.gz
which cross compiles from Linux to windows quite happily with
./configure --host=i586-mingw32msvc --target=i586-pc-mingw32msvc \
--build=i686-pc-linux-gnu
> The
> pkg-config autoconf macro should set the libdir according to $prefix or
> $host that are known.
That would require the configure script to pass that information
to pkg-config.
> I think that this is not implemented at this moment.
Exactly.
> What do you think?
I would rather use what works now, than wait for something that
may never be implemented.
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Every method you use to prevent or find bugs leaves a residue of
subtler bugs against which those methods are ineffectual."
-- Bruce Beizer's Pesticide Paradox
More information about the pkg-config
mailing list