diff --git a/Makefile b/Makefile index 23f3222310..f50632ab74 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ ifneq ($(V),1) Q := @ endif -CFLAGS = -Wall -O3 -g -std=gnu99 -I. +CFLAGS += -Wall -O3 -g -std=gnu99 -I. all: $(TARGET) config.mk diff --git a/qb/qb.libs.sh b/qb/qb.libs.sh index 579c91a44d..d73cec51cd 100644 --- a/qb/qb.libs.sh +++ b/qb/qb.libs.sh @@ -50,7 +50,7 @@ check_lib() extralibs="$4" - $CC -o $TEMP_EXE $TEMP_C $INCLUDE_DIRS $LIBRARY_DIRS $extralibs $2 2>/dev/null >/dev/null && answer=yes && eval HAVE_$1=yes + $CC -o $TEMP_EXE $TEMP_C $INCLUDE_DIRS $LIBRARY_DIRS $CFLAGS $LDFLAGS $extralibs $2 2>/dev/null >/dev/null && answer=yes && eval HAVE_$1=yes echo $answer @@ -75,7 +75,7 @@ check_lib_cxx() extralibs="$4" - $CXX -o $TEMP_EXE $TEMP_CXX $INCLUDE_DIRS $LIBRARY_DIRS $extralibs $2 2>/dev/null >/dev/null && answer=yes && eval HAVE_$1=yes + $CXX -o $TEMP_EXE $TEMP_CXX $INCLUDE_DIRS $LIBRARY_DIRS $CFLAGS $LDFLAGS $extralibs $2 2>/dev/null >/dev/null && answer=yes && eval HAVE_$1=yes echo $answer