package/libglib2: add optional support for elfutils
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 21 Feb 2016 09:50:06 +0000 (10:50 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 21 Feb 2016 11:40:57 +0000 (12:40 +0100)
When elfutils was compiled before, libglib2 will use it as optional
dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/bin/gresource | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgmodule-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libelf.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libintl.so.8]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]

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

index 881c5cedf6ec00d14819fed8e7a2e0dc3395b305..ea45f4aa85a12f8602c3865a1d72a9a6640c33fd 100644 (file)
@@ -107,6 +107,13 @@ ifneq ($(BR2_ENABLE_LOCALE),y)
 LIBGLIB2_DEPENDENCIES += libiconv
 endif
 
+ifeq ($(BR2_PACKAGE_ELFUTILS),y)
+LIBGLIB2_CONF_OPTS += --enable-libelf
+LIBGLIB2_DEPENDENCIES += elfutils
+else
+LIBGLIB2_CONF_OPTS += --disable-libelf
+endif
+
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 LIBGLIB2_CONF_OPTS += --with-libiconv=gnu
 LIBGLIB2_DEPENDENCIES += libiconv