diff --git a/.gitignore b/.gitignore index 4787fb19550692375bf4db6f2935264dd17bbcc0..0137290d3674ceb2d768cf537792a46e99fffe37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # ignore patterns # Auto generated files +cppcheck_report.txt HallCDict.cxx HallCDict.C HallCDict.h diff --git a/SConstruct.py b/SConstruct.py index 69474cfe7e8f00f73f0adc8c353cc186e284ef53..2c963a234655c48e65b8ea8c147c47909e4f3121 100644 --- a/SConstruct.py +++ b/SConstruct.py @@ -64,6 +64,7 @@ ivercode = 65536*int(float(baseenv.subst('$SOVERSION')))+ 256*int(10*(float(base baseenv.Append(VERCODE = ivercode) baseenv.Append(CPPPATH = ['$HC_SRC','$HA_SRC','$HA_DC','$HA_SCALER']) +proceed = "1" or "y" or "yes" or "Yes" or "Y" ######## Configure Section ####### import configure @@ -81,6 +82,14 @@ if not conf.CheckFunc('printf'): print('!! Your compiler and/or environment is not correctly configured.') Exit(0) +if baseenv.subst('$CHECKHEADERS')==proceed: + system_header_list = ['arpa/inet.h','errno.h','assert.h','netdb.h','netinet/in.h','pthread.h','signal.h','stddef.h','stdio.h','stdlib.h','string.h','strings.h','sys/ioctl.h','sys/socket.h','sys/time.h','sys/types.h','time.h','unistd.h','memory.h','math.h','limits.h'] + + for header_file in system_header_list: + if not conf.CheckHeader(header_file): + print('!! Header file %s not found.' % header_file) + Exit(0) + baseenv = conf.Finish() ######## ROOT Dictionaries ######### @@ -124,7 +133,6 @@ def which(program): return exe_file return None -proceed = "1" or "y" or "yes" or "Yes" or "Y" if baseenv.subst('$CPPCHECK')==proceed: is_cppcheck = which('cppcheck') print "Path to cppcheck is %s\n" % is_cppcheck diff --git a/darwin64.py b/darwin64.py index 08c690b351ecb9418f0ef4f5d4381ec8d89c9ccb..e56f8de0a01ba7082b6708349d6f4931cb15af85 100644 --- a/darwin64.py +++ b/darwin64.py @@ -6,6 +6,7 @@ def config(env,args): debug = args.get('debug',0) standalone = args.get('standalone',0) cppcheck = args.get('cppcheck',0) + checkheaders = args.get('checkheaders',0) if int(debug): env.Append(CXXFLAGS = '-g -O0') @@ -18,6 +19,9 @@ def config(env,args): if int(cppcheck): env.Append(CPPCHECK= '1') + + if int(checkheaders): + env.Append(CHECKHEADERS= '1') #env.Append(CXXFLAGS = '-Wall -Woverloaded-virtual -pthread -rdynamic') env.Append(CXXFLAGS = '-Wall -Woverloaded-virtual -pthread') diff --git a/linux32.py b/linux32.py index 6ba4b174d36925800b5c8ecae27231c58c692f1f..8d664b85aa6ca7be3e829106088219cee4be5ec6 100644 --- a/linux32.py +++ b/linux32.py @@ -6,6 +6,7 @@ def config(env,args): debug = args.get('debug',0) standalone = args.get('standalone',0) cppcheck = args.get('cppcheck',0) + checkheaders = args.get('checkheaders',0) if int(debug): env.Append(CXXFLAGS = '-g -O0') @@ -18,6 +19,9 @@ def config(env,args): if int(cppcheck): env.Append(CPPCHECK= '1') + + if int(checkheaders): + env.Append(CHECKHEADERS= '1') env.Append(CXXFLAGS = '-m32 -Wall -Woverloaded-virtual') env.Append(CPPDEFINES = '-DLINUXVERS') diff --git a/linux64.py b/linux64.py index ae012d6de736a944c47d8440cf807f57ccf4b68e..2a2e1234681e8f222889fc1b4dbf659d7d6b4125 100644 --- a/linux64.py +++ b/linux64.py @@ -6,6 +6,7 @@ def config(env,args): debug = args.get('debug',0) standalone = args.get('standalone',0) cppcheck = args.get('cppcheck',0) + checkheaders = args.get('checkheaders',0) if int(debug): env.Append(CXXFLAGS = '-g -O0') @@ -19,6 +20,9 @@ def config(env,args): if int(cppcheck): env.Append(CPPCHECK= '1') + if int(checkheaders): + env.Append(CHECKHEADERS= '1') + env.Append(CXXFLAGS = '-Wall -Woverloaded-virtual') env.Append(CPPDEFINES = '-DLINUXVERS')