Subject: Re: rpath flags vs wrapper scripts
To: Joerg Sonnenberger <firstname.lastname@example.org>
From: Dan McMahill <dmcmahill@NetBSD.org>
Date: 10/30/2005 20:51:57
Joerg Sonnenberger wrote:
> On Sun, Oct 30, 2005 at 05:19:16PM -0500, Dan McMahill wrote:
>>So, whats the best way to fix this?
>>1) maybe wcalc-config should't try to include any rpath flags and leave
>>it up to the programs which link to it. Of course since the wrapper
>>scripts seem to get tripped up sometimes during my rpath tests, I'm not
>>sure this will work right.
>>2) some magic variable in cad/libwcalc/Makefile or
>>cad/gtk-wcalc/Makefile that causes either the first autoconf test to
>>give more accurate results or to fix up the command on the second?
> 3) Use libtool for what it is intended to do.
> I think that is the easiest and most portable solution. Just don't
> hard-wire any strange conditionals in configure based on libtool.m4
> please :-)
I think I'm missing something here. libtool is used for building
libwcalc already. If someone wants to link to libwcalc, it seems like
they should be able to just do
cc -o foo foo.c `wcalc-config --libs`
but that doesn't quite work unless you can get the correct rpath flags
into wcalc-config. I took a look at x11/gtk/patch-af and the -Wl,-Rpath
is just hard patched into gtk-config, but I wonder if that is a portable
thing or not.
It seems that `pkg-config gtk+-2.0 --libs` also gives rpath flags
because they are listed in /usr/pkg/lib/pkgconfig/gtk+-2.0.pc. Further
digging shows that the magic variable PKGCONFIG_OVERRIDE is what adds
the rpath flags. So I guess I could use pkg-config for libwcalc instead