(svn r1570) Make the gcc version test work with old versions of test (i.e. don't use the < operator)
authortron
Wed, 19 Jan 2005 20:22:10 +0000
changeset 1069 922f5c7be173
parent 1068 2a9f53e0a5e6
child 1070 bef634a62323
(svn r1570) Make the gcc version test work with old versions of test (i.e. don't use the < operator)
Makefile
--- a/Makefile	Wed Jan 19 19:32:33 2005 +0000
+++ b/Makefile	Wed Jan 19 20:22:10 2005 +0000
@@ -294,17 +294,17 @@
 # -O	optimize or -O2 fully optimize (O's above 2 are not recommended)
 # -pg	profile - generate profiling data.  See "man gprof" to use this.
 
-CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1-3)
+CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1,3)
 
 # GNU make can only test for (in)equality
 # this is a workaround to test for >=
-ifeq ($(shell if test ! $(CC_VERSION) \< 2.9; then echo true; fi), true)
+ifeq ($(shell if test $(CC_VERSION) -ge 29; then echo true; fi), true)
   CFLAGS += -O -Wall -Wno-multichar -Wsign-compare
 endif
-ifeq ($(shell if test ! $(CC_VERSION) \< 3.0; then echo true; fi), true)
+ifeq ($(shell if test $(CC_VERSION) -ge 30; then echo true; fi), true)
   CFLAGS += -W -Wno-unused-parameter
 endif
-ifeq ($(shell if test ! $(CC_VERSION) \< 3.4; then echo true; fi), true)
+ifeq ($(shell if test $(CC_VERSION) -ge 34; then echo true; fi), true)
   CFLAGS += -Wdeclaration-after-statement
 endif