Re: Accounting for -rpath when libtool isn't helping
"Paul \"LeoNerd\" Evans" <[email protected]>
| Newsgroups | gmane.comp.gnu.libtool.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 14 Feb 2019 23:21:26 +0000 "Paul \"LeoNerd\" Evans" <[email protected]> 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 [email protected] | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/ _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQACtfoNPkrOD+dkiu8tLZMLxwGjQUCXGamlgAKCRC8tLZMLxwG jf8hAJsG59j+4ILsTuOW+qGrb3eCMM2a1QCg57piPSz93DUtR/lY5Fjo3ZEZ4Uo= =xsSe -----END PGP SIGNATURE-----