[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accounting for -rpath when libtool isn't helping
From: |
Paul \"LeoNerd\" Evans |
Subject: |
Re: Accounting for -rpath when libtool isn't helping |
Date: |
Fri, 15 Feb 2019 11:46:30 +0000 |
On Thu, 14 Feb 2019 23:21:26 +0000
"Paul \"LeoNerd\" Evans" <address@hidden> wrote:
> My earlier suggested approach of trying to hunt down the .la files and
> generate/append extra -Wl,-rpath arguments appears to be working
> reliably though, so it may be that's the best approach. It does feel
> rather fragile however, as I'm second-guessing around what libtool
> would do.
Alternatively, am I looking at this from the wrong direction? Maybe the
problem is that the exporting library isn't providing -Wl,-rpath in
its .pc file, to assist anyone else who wasn't using libtool to link it
(such as is the case here).
With that in mind, I now generate those if required, in the little
shell fragment I use to create the .pc file:
#!/bin/sh
LIBS='-L${libdir} -ltickit'
CFLAGS='-I${includedir}'
case "$LIBDIR" in
/usr/lib) ;;
/usr/local/lib) ;;
*)
LIBS="$LIBS -Wl,-rpath -Wl,$LIBDIR"
;;
esac
cat <<EOF
libdir=$LIBDIR
includedir=$INCDIR
Name: tickit
Description: Terminal Interface Construction KIT
Version: 0.2
Libs: $LIBS
Cflags: $CFLAGS
EOF
--
Paul "LeoNerd" Evans
address@hidden | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
pgpbdgQjAFl7G.pgp
Description: OpenPGP digital signature