Skip to content

Commit 8e11724

Browse files
committed
src/Makefile: include CFLAGS in probe macros
When cross-building we need to pass the correct paths via CFLAGS to be able to find extra libraries. We could convert to using pkg-config to resolve library availability but as the rest of the build doesn't need it we can just ensure the same CFLAGS used for building are used in the probe macros. Signed-off-by: Alex Bennée <[email protected]>
1 parent 6053ca9 commit 8e11724

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
H := \#
22

33
HAVE_C_HEADER = $(shell if echo "$(H)include <$(1)>" | \
4-
$(CC) -E - > /dev/null 2>&1; then echo "$(2)"; \
4+
$(CC) $(CFLAGS) -E - > /dev/null 2>&1; then echo "$(2)"; \
55
else echo "$(3)"; fi)
66

77
HAVE_C_MACRO = $(shell if echo "$(H)include <$(1)>" | \
8-
$(CC) -E - 2>&1 /dev/null | grep $(2) > /dev/null 2>&1; \
8+
$(CC) $(CFLAGS) -E - 2>&1 /dev/null | grep $(2) > /dev/null 2>&1; \
99
then echo 1;else echo 0; fi)
1010

1111
C_TARGETS := \

0 commit comments

Comments
 (0)