package/dbus: Add optional dependency to xlib_libSM
authorBernd Kuhls <bernd.kuhls@t-online.de>
Mon, 12 Oct 2015 19:21:03 +0000 (21:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 12 Oct 2015 19:55:30 +0000 (21:55 +0200)
commit50963b165d574cf8b7aedf677c60ddb9fe851489
tree5664d844a69eaa137e6a11ef1339a9ca87a4b2fc
parent281cbdd0ae70db923922d333213aecca74e5a77d
package/dbus: Add optional dependency to xlib_libSM

To detect X11 support dbus uses the autoconf macro AC_PATH_XTRA
http://cgit.freedesktop.org/dbus/dbus/tree/configure.ac#n1264

This macro checks for the optional presence of libICE:
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob;f=lib/autoconf/libs.m4;h=d2040d731f81fc1693e01d118c45d51ad169d56a;hb=HEAD#l472

quoting dbus configure with libICE not present:
checking for IceConnectionNumber in -lICE... no

quoting dbus configure with libICE being present:
checking for IceConnectionNumber in -lICE... yes

The binary usr/bin/dbus-launch is being linked to libICE and libSM if
the packages are available:

$ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a
  output/target/usr/bin/dbus-launch | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libdbus-1.so.3]
 0x00000001 (NEEDED)                     Shared library: [libSM.so.6]
 0x00000001 (NEEDED)                     Shared library: [libICE.so.6]
 0x00000001 (NEEDED)                     Shared library: [libX11.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.1]

To get a reproducable build add libSM as optional dependency to dbus,
libSM pulls in the dependency to libICE.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/dbus/dbus.mk