mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-09 04:05:12 -04:00
Pass CFLAGS to detect.sh
Needed when cross-compiling with clang.
This commit is contained in:
parent
8081ce7853
commit
f2b401539c
2
Makefile
2
Makefile
@ -156,7 +156,7 @@ PROG_OBJ := $(PROG_COMMON_OBJ) $(PROG_SPECIFIC_OBJ)
|
||||
|
||||
# Generate autodetected configuration header
|
||||
programs/config.h:programs/detect.sh .prog-cflags
|
||||
$(QUIET_GEN) CC=$(CC) $< > $@
|
||||
$(QUIET_GEN) CC="$(CC)" CFLAGS="$(CFLAGS)" $< > $@
|
||||
|
||||
# Compile program object files
|
||||
$(PROG_OBJ): %.o: %.c $(PROG_COMMON_HEADERS) $(COMMON_HEADERS) .prog-cflags
|
||||
|
@ -17,7 +17,7 @@ check_function() {
|
||||
echo "int main() { $funcname(); }" > "$tmpfile"
|
||||
echo
|
||||
echo "/* Is the $funcname() function available? */"
|
||||
if $CC -x c $tmpfile -o /dev/null > /dev/null 2>&1; then
|
||||
if $CC $CFLAGS -x c $tmpfile -o /dev/null > /dev/null 2>&1; then
|
||||
echo "#define $macro 1"
|
||||
else
|
||||
echo "/* $macro is not set */"
|
||||
|
Loading…
x
Reference in New Issue
Block a user