chiark / gitweb /
cope with gcc which does not support -Wno-pointer-sign
authorian <ian>
Sun, 22 Jan 2006 15:59:25 +0000 (15:59 +0000)
committerian <ian>
Sun, 22 Jan 2006 15:59:25 +0000 (15:59 +0000)
base/common.make

index 2ebd133..1a42772 100644 (file)
@@ -4,8 +4,11 @@ TCL_MEM_DEBUG ?=       -DTCL_MEM_DEBUG
 TCMDIFGEN ?=   $(BASE_DIR)/tcmdifgen
 BASE_TCT ?=    $(BASE_DIR)/base.tct
 
+ifeq ($(shell $(CC) -Wno-pointer-sign -E -x c /dev/null >/dev/null || echo x),)
+CFLAGS +=      -Wno-pointer-sign
+endif
+
 CFLAGS +=      -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \
-               -Wno-pointer-sign \
                $(OPTIMISE)
 CPPFLAGS +=    -I$(BASE_DIR)
 CPPFLAGS +=    $(TCL_MEM_DEBUG)