[Genabel-commits] r1414 - pkg/filevector
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 22 10:22:13 CET 2013
Author: lckarssen
Date: 2013-11-22 10:22:13 +0100 (Fri, 22 Nov 2013)
New Revision: 1414
Modified:
pkg/filevector/Makefile
Log:
In the Makefile of filevector I added a check for gcc minor version > 7. Before gcc 4.7 the option for -std=c++11 was named -std=c++0x. This, of course, assumes the major version number is 4, which is OK for the moment.
On Ubuntu 12.04 LTS gcc is a version 4.6, which is why this check is needed.
Modified: pkg/filevector/Makefile
===================================================================
--- pkg/filevector/Makefile 2013-11-21 20:01:30 UTC (rev 1413)
+++ pkg/filevector/Makefile 2013-11-22 09:22:13 UTC (rev 1414)
@@ -29,7 +29,17 @@
# use for Solaris
# CPP = CC
-CFLAGS = -I $(LIBDIR) -I $(SRCDIR) -g -Wall -std=c++11 -D_NOT_R_FILEVECTOR #-m64
+CFLAGS = -I $(LIBDIR) -I $(SRCDIR) -g -Wall -D_NOT_R_FILEVECTOR #-m64
+
+# Get the gcc version and check if the minor version number is above
+# 7. Before gcc 4.7 the option for -std=c++11 was named -std=c++0x.
+GCCVERSIONGTEQ47 := $(shell expr `gcc -dumpversion | cut -f2 -d.` \>= 7)
+ifeq "$(GCCVERSIONGTEQ47)" "1"
+ CFLAGS += -std=c++11
+else
+ CFLAGS += -std=c++0x
+endif
+
CPPUNITFLAGS = -lcppunit
EXECS = $(TEXT2FVF) $(MERGEVARS) ${CONVERT}
More information about the Genabel-commits
mailing list