Check for presence of -Wno-unused-result.

This commit is contained in:
Themaister 2012-05-01 23:00:37 +02:00
parent 202ecbb701
commit 1a744d33d6
2 changed files with 8 additions and 1 deletions

View File

@ -190,7 +190,7 @@ ifeq ($(DEBUG), 1)
OPTIMIZE_FLAG = -O0
endif
CFLAGS += -Wall -Wno-unused-result $(OPTIMIZE_FLAG) -g -I. -pedantic
CFLAGS += -Wall $(OPTIMIZE_FLAG) -g -I. -pedantic
ifeq ($(CXX_BUILD), 1)
CFLAGS += -std=c++0x -xc++ -D__STDC_CONSTANT_MACROS
else
@ -201,6 +201,10 @@ else
endif
endif
ifeq ($(NOUNUSED), yes)
CFLAGS += -Wno-unused-result
endif
all: $(TARGET) config.mk
config.mk: configure qb/*

View File

@ -3,6 +3,9 @@
check_switch_c C99 -std=gnu99
check_critical C99 "Cannot find C99 compatible compiler."
check_switch_c NOUNUSED -Wno-unused-result
add_define_make NOUNUSED $HAVE_NOUNUSED
# There are still broken 64-bit Linux distros out there. :)
if [ -d /usr/lib64 ]; then
add_library_dirs /usr/lib64