1 Make the libcrypt test somewhat cross-compilation compliant
3 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6 ===================================================================
12 # Additional libs for GNU libc.
13 -ifneq ($(wildcard /usr/lib*/libcrypt.a),)
14 - SULOGINLIBS += -lcrypt
15 +HAS_LIBCRYPT=$(shell f=`mktemp` && echo 'int main(void) {}' | $(CC) -o $$f -xc - -lcrypt >/dev/null 2>&1 && echo yes; rm -f $$f)
16 +ifeq ($(HAS_LIBCRYPT),yes)
17 + SULOGINLIBS += -lcrypt
20 all: $(BIN) $(SBIN) $(USRBIN)