From 5a55e14f982fcc842ad562c3eacff5e1bb5adcd5 Mon Sep 17 00:00:00 2001 From: hagen Date: Tue, 23 Sep 2014 01:44:09 +0000 Subject: [PATCH] * Makefile.linux : detect gcc version --- Makefile.linux | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.linux b/Makefile.linux index d6149a54..a4b63847 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,5 +1,16 @@ CC = g++ -CFLAGS = -g -Wall -std=c++0x +CFLAGS = -g -Wall +CXXVER := $(shell ${CC} -dumpversion) +ifeq ($(shell expr match ${CXXVER} "4\.[0-5]"),3) + $(error Compiler too old) +endif + +ifeq (${CXXVER},"4.6") + CFLAGS += -std=c++0x +else + CFLAGS += -std=c++11 +endif + include filelist.mk INCFLAGS = LDFLAGS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread