Subject: Re: rpath flags vs wrapper scripts
To: Dan McMahill <dmcmahill@NetBSD.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-pkg
Date: 10/31/2005 19:13:00
On Sun, Oct 30, 2005 at 08:51:57PM -0500, Dan McMahill wrote:
> 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.

It sounds as though you have a single wcalc-config for all architectures.
Maybe you could try a wcalc.pc.in (moving from wcalc-config to pkg-config
in the process) which autoconf can create a wcalc.pc from, using libtool's
${wl} - it worked out the correct -rpath by then..

> >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`

or foo itself could let its configure script find wcalc and the correct flags..

Cheers,

Patrick