Re: multiarch and pkg-config
]] Hendrik Sattler
Please don't send me copies, I'm subscribed and set my mail-followup-to
as well as mail-copies-to.
| Am Dienstag 02 Februar 2010 21:43:21 schrieb Tollef Fog Heen:
| > ]] Hendrik Sattler
| > | pkg-config actually does support relocation of the libraries but for a
| > | strange reason only on Windows. That means that for cross-compiling,
| > | you have to fixup all paths it returns. The patch would be trivial.
| > Uhm, no. You make sure the generated .pc files are correct and it will
| > Just Work.
| The keyword here is _relocatable_
| With a hard-coded 'prefix', there is no "correct".
There's no way to generally support relocatable libraries and it's not
something I'm interested in supporting, particularly not inside Debian.
Just generate .pc files with the right prefix and you're good.
| > | The undocumented "pcfiledir" variable can be used to hack around it,
| > | probably better to convinve upstream to make pkg-config more
| > | cross-compile-friendly. Thus, it may be possible to a generic shell
| > | script as cross-pkg-config wrapper that does what you want (with many
| > | symlinks to make autotools happy).
| > Feel free to try to convince me.
| #find the GNU prefix
| GNU_PREFIX=`basename $0 | sed -e 's/\(.*\)-pkg-config/\\1/'`
| #set the new search path for pkg-config
| export PKG_CONFIG_LIBDIR
This bit is fairly reasonable.
| #get the location of the .pc file
| PC_NONOPTS=`echo $@ | sed -e 's/\(--[^ ]* \)*//g'`
| PC_FILEDIR=`pkg-config --variable=pcfiledir "$PC_NONOPTS"`
| test "$PC_FILEDIR" || exit $PC_RESULT
This one is not, it won't work at all.
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are