--- /dev/null
+Make the libcrypt test somewhat cross-compilation compliant
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/src/Makefile
+===================================================================
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -78,7 +78,7 @@
+ endif
+
+ # Additional libs for GNU libc.
+-ifneq ($(wildcard /usr/lib*/libcrypt.a),)
++ifneq ($(wildcard $(SYSROOT)/usr/lib*/libcrypt.a),)
+ SULOGINLIBS += -lcrypt
+ endif
+
SYSVINIT_LICENSE = GPLv2+
SYSVINIT_LICENSE_FILES = COPYING
+SYSVINIT_MAKE_OPTS = SYSROOT=$(STAGING_DIR)
+
# Override BusyBox implementations if BusyBox is enabled.
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
SYSVINIT_DEPENDENCIES = busybox
endif
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+SYSVINIT_DEPENDENCIES += libselinux
+SYSVINIT_MAKE_OPTS += WITH_SELINUX="yes"
+endif
+
define SYSVINIT_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
$(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \
define SYSVINIT_BUILD_CMDS
# Force sysvinit to link against libcrypt as it otherwise
# use an incorrect test to see if it's available
- $(MAKE) $(TARGET_CONFIGURE_OPTS) SULOGINLIBS="-lcrypt" -C $(@D)/src
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) $(SYSVINIT_MAKE_OPTS) -C $(@D)/src
endef
define SYSVINIT_INSTALL_TARGET_CMDS