Change to use HAVE_SELINUX build flag
diff --git a/Android.mk b/Android.mk
index 9ef4e67..4a2238c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -73,7 +73,7 @@
#LOCAL_STATIC_LIBRARIES += libselinux
#LOCAL_CFLAGS += -DHAVE_SELINUX -g
endif # HAVE_SELINUX
-ifneq ($(wildcard external/libselinux/Android.mk),)
+ifeq ($(HAVE_SELINUX), true)
LOCAL_C_INCLUDES += external/libselinux/include
LOCAL_SHARED_LIBRARIES += libselinux
LOCAL_CFLAGS += -DHAVE_SELINUX -g
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 39f702b..73432b3 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -51,8 +51,11 @@
endif
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
-ifneq ($(wildcard external/libselinux/Android.mk),)
+ifeq ($(HAVE_SELINUX), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
+ ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
+ endif
endif
ifeq ($(BUILD_ID), GINGERBREAD)
TW_NO_EXFAT := true