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>
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