Hi Hendrik,
> > only because Debian thinks this is the right way, it must not be true.
> > Where is the pkg-config documentation that shows this is the correct way
> > to achieve this?
>
> Just as a side note: installing the .la file creates the same problem when
> using libtool to build.
>
> I give you an example: obexftp uses libtool and thus links against libusb:
> $ readelf -d obexftp | grep NEEDED
> 0x00000001 (NEEDED) Shared library: [libopenobex.so.1]
> 0x00000001 (NEEDED) Shared library: [libusb-0.1.so.4]
> 0x00000001 (NEEDED) Shared library: [libbluetooth.so.2]
> 0x00000001 (NEEDED) Shared library: [libc.so.6]
>
> However, removing the .la file prevents it from doing so:
> $ readelf -d apps/obexftp | grep NEEDED
> 0x00000001 (NEEDED) Shared library: [libopenobex.so.1]
> 0x00000001 (NEEDED) Shared library: [libbluetooth.so.2]
> 0x00000001 (NEEDED) Shared library: [libc.so.6]
>
> And it still compiles and runs without problems. This is because all usb
> functions are wrapped by libopenobex (which correctly links to libusb).
> However, with libtool, there is no way around this except not installing
> the .la file or patching it before installation (I do not propose this but do
> it in my package).
> E.g. on MacOS X, the linker always needs all dependencies and thus needs
> the .la file.
> Pkg-config is supposed do the right thing on both systems, even if you mark
> libusb as private. However, MacOS X has its own implementation of OBEX.
>
> The openobex.pc.in files now could look like this (and does here):
> ------------------------------snip------------------------------
> [EMAIL PROTECTED]@
> [EMAIL PROTECTED]@
> [EMAIL PROTECTED]@
> [EMAIL PROTECTED]@
>
> Name: OpenOBEX
> Description: Free implementation of the Object Exchange protocol
> Version: @VERSION@
> Requires.private: libusb
> Libs: -L${libdir} -lopenobex
> Cflags: -I${includedir}
> ------------------------------snip------------------------------
> The only difference to the Libs.private is that the Libs: field from
> libusb.pc
> is used (with whatever -L it has).
this means that the attached patch should do the right things. Remember
that IrDA, Bluetooth and USB support are optional.
Regards
Marcel
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/openobex/openobex/acinclude.m4,v
retrieving revision 1.16
diff -u -r1.16 acinclude.m4
--- acinclude.m4 27 Aug 2006 20:10:25 -0000 1.16
+++ acinclude.m4 29 Sep 2006 07:36:21 -0000
@@ -136,12 +136,11 @@
if (test "${bluetooth_enable}" = "yes" && test "${bluez_found}" = "yes"); then
AC_DEFINE(HAVE_BLUETOOTH, 1, [Define if system supports Bluetooth and it's enabled])
- REQUIRES="bluez"
fi
if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then
AC_DEFINE(HAVE_USB, 1, [Define if system supports USB and it's enabled])
- AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="$REQUIRES libusb")
+ AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb")
fi
AM_CONDITIONAL(GLIB, test "${glib_enable}" = "yes" && test "${glib_found}" = "yes")
Index: openobex.pc.in
===================================================================
RCS file: /cvsroot/openobex/openobex/openobex.pc.in,v
retrieving revision 1.3
diff -u -r1.3 openobex.pc.in
--- openobex.pc.in 25 Dec 2005 13:45:32 -0000 1.3
+++ openobex.pc.in 29 Sep 2006 07:36:21 -0000
@@ -6,6 +6,6 @@
Name: OpenOBEX
Description: Free implementation of the Object Exchange protocol
Version: @VERSION@
-Requires: @REQUIRES@
+Requires.private: @REQUIRES@
Libs: -L${libdir} -lopenobex
Cflags: -I${includedir}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users