scons: expose CUSTOM_CFLAGS to enable custom CFLAGS to be used during the configure stage
This commit is contained in:
parent
fa46f97b73
commit
5df056ae4c
1 changed files with 4 additions and 1 deletions
|
@ -266,6 +266,7 @@ opts.AddVariables(
|
||||||
('CXX', 'The C++ compiler to use to compile mapnik (defaults to g++).', 'g++'),
|
('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'),
|
('CC', 'The C compiler used for configure checks of C libs (defaults to gcc).', 'gcc'),
|
||||||
('CUSTOM_CXXFLAGS', 'Custom C++ flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>', ''),
|
('CUSTOM_CXXFLAGS', 'Custom C++ flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>', ''),
|
||||||
|
('CUSTOM_CFLAGS', 'Custom C flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> (only used for configure checks)', ''),
|
||||||
('CUSTOM_LDFLAGS', 'Custom linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>', ''),
|
('CUSTOM_LDFLAGS', 'Custom linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>', ''),
|
||||||
EnumVariable('LINKING', "Set library format for libmapnik",'shared', ['shared','static']),
|
EnumVariable('LINKING', "Set library format for libmapnik",'shared', ['shared','static']),
|
||||||
EnumVariable('RUNTIME_LINK', "Set preference for linking dependencies",'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
|
pickle_store = [# Scons internal variables
|
||||||
'CC', # compiler user to check if c deps compile during configure
|
'CC', # compiler user to check if c deps compile during configure
|
||||||
'CXX', # C++ compiler to compile mapnik
|
'CXX', # C++ compiler to compile mapnik
|
||||||
'CCFLAGS',
|
'CFLAGS',
|
||||||
'CPPDEFINES',
|
'CPPDEFINES',
|
||||||
'CPPFLAGS', # c preprocessor flags
|
'CPPFLAGS', # c preprocessor flags
|
||||||
'CPPPATH',
|
'CPPPATH',
|
||||||
|
@ -382,6 +383,7 @@ pickle_store = [# Scons internal variables
|
||||||
'LINKFLAGS',
|
'LINKFLAGS',
|
||||||
'CUSTOM_LDFLAGS', # user submitted
|
'CUSTOM_LDFLAGS', # user submitted
|
||||||
'CUSTOM_CXXFLAGS', # user submitted
|
'CUSTOM_CXXFLAGS', # user submitted
|
||||||
|
'CUSTOM_CFLAGS', # user submitted
|
||||||
'MAPNIK_LIB_NAME',
|
'MAPNIK_LIB_NAME',
|
||||||
'LINK',
|
'LINK',
|
||||||
'RUNTIME_LINK',
|
'RUNTIME_LINK',
|
||||||
|
@ -1014,6 +1016,7 @@ if not preconfigured:
|
||||||
|
|
||||||
# set any custom cxxflags and ldflags to come first
|
# set any custom cxxflags and ldflags to come first
|
||||||
env.Append(CXXFLAGS = env['CUSTOM_CXXFLAGS'])
|
env.Append(CXXFLAGS = env['CUSTOM_CXXFLAGS'])
|
||||||
|
env.Append(CFLAGS = env['CUSTOM_CFLAGS'])
|
||||||
env.Append(LINKFLAGS = env['CUSTOM_LDFLAGS'])
|
env.Append(LINKFLAGS = env['CUSTOM_LDFLAGS'])
|
||||||
|
|
||||||
### platform specific bits
|
### platform specific bits
|
||||||
|
|
Loading…
Reference in a new issue