2015-07-14 22:20:20 +02:00
|
|
|
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
|
2015-12-16 16:21:38 +01:00
|
|
|
@@ -78,8 +78,9 @@ else
|
2015-07-14 22:20:20 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Additional libs for GNU libc.
|
|
|
|
-ifneq ($(wildcard /usr/lib*/libcrypt.a),)
|
2015-12-16 16:21:38 +01:00
|
|
|
- SULOGINLIBS += -lcrypt
|
|
|
|
+HAS_LIBCRYPT=$(shell f=`mktemp` && echo 'int main(void) {}' | $(CC) -o $$f -xc - -lcrypt >/dev/null 2>&1 && echo yes; rm -f $$f)
|
|
|
|
+ifeq ($(HAS_LIBCRYPT),yes)
|
|
|
|
+ SULOGINLIBS += -lcrypt
|
2015-07-14 22:20:20 +02:00
|
|
|
endif
|
|
|
|
|
2015-12-16 16:21:38 +01:00
|
|
|
all: $(BIN) $(SBIN) $(USRBIN)
|