diff --git a/SConstruct b/SConstruct index 44840d1d1..5c38657e1 100644 --- a/SConstruct +++ b/SConstruct @@ -266,6 +266,7 @@ opts.AddVariables( ('CXX', 'The C++ compiler to use to compile mapnik (defaults to g++).', 'g++'), ('CC', 'The C compiler used for configure checks of C libs (defaults to gcc).', 'gcc'), ('CUSTOM_CXXFLAGS', 'Custom C++ flags, e.g. -I if you have headers in a nonstandard directory ', ''), + ('CUSTOM_CFLAGS', 'Custom C flags, e.g. -I if you have headers in a nonstandard directory (only used for configure checks)', ''), ('CUSTOM_LDFLAGS', 'Custom linker flags, e.g. -L if you have libraries in a nonstandard directory ', ''), EnumVariable('LINKING', "Set library format for libmapnik",'shared', ['shared','static']), EnumVariable('RUNTIME_LINK', "Set preference for linking dependencies",'shared', ['shared','static']), @@ -372,7 +373,7 @@ opts.AddVariables( pickle_store = [# Scons internal variables 'CC', # compiler user to check if c deps compile during configure 'CXX', # C++ compiler to compile mapnik - 'CCFLAGS', + 'CFLAGS', 'CPPDEFINES', 'CPPFLAGS', # c preprocessor flags 'CPPPATH', @@ -382,6 +383,7 @@ pickle_store = [# Scons internal variables 'LINKFLAGS', 'CUSTOM_LDFLAGS', # user submitted 'CUSTOM_CXXFLAGS', # user submitted + 'CUSTOM_CFLAGS', # user submitted 'MAPNIK_LIB_NAME', 'LINK', 'RUNTIME_LINK', @@ -1014,6 +1016,7 @@ if not preconfigured: # set any custom cxxflags and ldflags to come first env.Append(CXXFLAGS = env['CUSTOM_CXXFLAGS']) + env.Append(CFLAGS = env['CUSTOM_CFLAGS']) env.Append(LINKFLAGS = env['CUSTOM_LDFLAGS']) ### platform specific bits