From bbf4804d12b978413c4979bed2463e5cff827bec Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 28 Feb 2011 22:30:06 +0100 Subject: [PATCH] Obey CFLAGS and LDFLAGS when testing libs (nice when profiling.) --- Makefile | 2 +- qb/qb.libs.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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