Cross compiling with pkg-config

Sven Neumann sven at
Sun Oct 5 14:38:28 EEST 2003


Keith Packard <keithp at> writes:

> Yeah, yeah, I know there are some hacks in pkg-config for cross
> compiling, but they're not sufficient.  The problem is that prefix
> needs to point at the target installation directory so that file
> names in the package will work correctly while the package is
> running.  However, prefix must also point at the files on the build
> host so that the header files and .la files will be found while
> compiling.
> Essentially, we need to prepend whatever DESTDIR was used to install
> the development pieces of the packages.  A simple kludge is to add a
> environment variable which does precisely this -- edits the prefix
> entry.

Since people are successfully cross-compiling software based on
pkg-config, there seems to exist a sufficient solution already. I can
ask the build-sys people at convergence how they are doing it...


More information about the xdg mailing list