2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-04 16:25:31 +00:00

make: use cflags/ldflags for config.h detection mechanism

The config.h detection scripts should use the provided CFLAGS/LDFLAGS
as it tries to link libnl, libnet, and others.

Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
This commit is contained in:
Nicolas Viennot
2020-03-20 23:12:59 +00:00
committed by Andrei Vagin
parent e0fca8ba7a
commit 9433b7b9db

View File

@@ -3,7 +3,7 @@ ifndef ____nmk_defined__utils
#
# Usage: option := $(call try-compile,language,source-to-build,cc-options,cc-defines)
try-compile = $(shell sh -c 'echo "$(2)" | \
$(CC) $(4) -x $(1) - $(3) -o /dev/null > /dev/null 2>&1 && \
$(CC) $(CFLAGS) $(LDFLAGS) $(4) -x $(1) - $(3) -o /dev/null > /dev/null 2>&1 && \
echo true || echo false')
#