package/libglib2: add optional dependency in libselinux
authorAdam Duskett <Aduskett@gmail.com>
Tue, 19 Mar 2019 15:31:49 +0000 (11:31 -0400)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 19 Mar 2019 21:10:52 +0000 (22:10 +0100)
If libselinux is selected, explicitly set --enable-selinux in the
configure options and build the library first.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libglib2/libglib2.mk

index d34bfabd523b8fff8d374d57a8867a82848327ad..63bfec32d6e5a07493e5e19bb1d012e113cd431b 100644 (file)
@@ -137,6 +137,13 @@ LIBGLIB2_CONF_OPTS += --with-libiconv=gnu
 LIBGLIB2_DEPENDENCIES += libiconv
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+LIBGLIB2_CONF_OPTS += --enable-selinux
+LIBGLIB2_DEPENDENCIES += libselinux
+else
+LIBGLIB2_CONF_OPTS += --disable-selinux
+endif
+
 # Purge gdb-related files
 ifneq ($(BR2_PACKAGE_GDB),y)
 define LIBGLIB2_REMOVE_GDB_FILES