diff --git a/SConstruct b/SConstruct index 99951efea..55c5df95a 100644 --- a/SConstruct +++ b/SConstruct @@ -251,7 +251,7 @@ pickle_store = [# Scons internal variables 'PYTHON_INSTALL_LOCATION', 'PYTHON_SYS_PREFIX', 'COLOR_PRINT', - 'BOOST_SYSTEM_REQUIRED', + 'HAS_BOOST_SYSTEM', ] # Add all other user configurable options to pickle pickle_store @@ -304,6 +304,13 @@ if not force_configure: else: preconfigured = False +# check for missing keys in pickled settings +# which can occur when keys are added or changed between +# rebuilds, e.g. for folks following trunk +for opt in pickle_store: + if not opt in env: + preconfigured = False + # if custom arguments are supplied make sure to accept them if opts.args: # since we have custom arguments update environment with all opts to @@ -731,22 +738,21 @@ if not preconfigured: conf.FindBoost(BOOST_SEARCH_PREFIXES,thread_flag) - # get boost version from boost headers rather than previous approach - # of fetching from the user provided INCLUDE path - boost_system_required = False + # boost system is used in boost 1.35 and greater + has_boost_system = False boost_lib_version_from_header = conf.GetBoostLibVersion() if boost_lib_version_from_header: boost_version_from_header = int(boost_lib_version_from_header.split('_')[1]) - if boost_version_from_header >= 35 and env['PLATFORM'] == 'Darwin': - boost_system_required = True - env['BOOST_SYSTEM_REQUIRED'] = True + if boost_version_from_header >= 35: + has_boost_system = True + env['HAS_BOOST_SYSTEM'] = True else: - boost_system_required = False - env['BOOST_SYSTEM_REQUIRED'] = False + has_boost_system = False + env['HAS_BOOST_SYSTEM'] = False # The other required boost headers. BOOST_LIBSHEADERS = [ - ['system', 'boost/system/system_error.hpp', boost_system_required], + ['system', 'boost/system/system_error.hpp', has_boost_system], ['filesystem', 'boost/filesystem/operations.hpp', True], ['regex', 'boost/regex.hpp', True], ['iostreams','boost/iostreams/device/mapped_file.hpp',True], diff --git a/plugins/input/ogr/SConscript b/plugins/input/ogr/SConscript index c73277b12..8eddd9907 100644 --- a/plugins/input/ogr/SConscript +++ b/plugins/input/ogr/SConscript @@ -36,7 +36,7 @@ ogr_src = Split( libraries = [env['PLUGINS']['ogr']['lib']] if env['PLATFORM'] == 'Darwin': - if env['BOOST_SYSTEM_REQUIRED']: + if env['HAS_BOOST_SYSTEM']: boost_system = 'boost_system%s' % env['BOOST_APPEND'] libraries.append(boost_system) libraries.append('mapnik') diff --git a/src/SConscript b/src/SConscript index 47dde1bb1..98bf8019d 100644 --- a/src/SConscript +++ b/src/SConscript @@ -49,7 +49,7 @@ if env['THREADING'] == 'multi': libraries.append('boost_thread%s' % env['BOOST_APPEND']) if env['PLATFORM'] == 'Darwin': - if env['BOOST_SYSTEM_REQUIRED']: + if env['HAS_BOOST_SYSTEM']: libraries.append('boost_system%s' % env['BOOST_APPEND']) if env['INTERNAL_LIBAGG']: diff --git a/utils/ogrindex/SConscript b/utils/ogrindex/SConscript index 5118ac0d0..c209f7994 100644 --- a/utils/ogrindex/SConscript +++ b/utils/ogrindex/SConscript @@ -40,7 +40,7 @@ boost_filesystem = 'boost_filesystem%s' % env['BOOST_APPEND'] libraries = [boost_program_options,boost_iostreams,boost_filesystem,env['PLUGINS']['ogr']['lib'],'mapnik'] if env['PLATFORM'] == 'Darwin': - if env['BOOST_SYSTEM_REQUIRED']: + if env['HAS_BOOST_SYSTEM']: boost_system = 'boost_system%s' % env['BOOST_APPEND'] libraries.append(boost_system) libraries.append(env['ICU_LIB_NAME']) diff --git a/utils/shapeindex/SConscript b/utils/shapeindex/SConscript index f97afab9e..30509c330 100644 --- a/utils/shapeindex/SConscript +++ b/utils/shapeindex/SConscript @@ -43,10 +43,7 @@ libraries = [boost_program_options,boost_iostreams,boost_filesystem] boost_system = 'boost_system%s' % env['BOOST_APPEND'] -if env['SUNCC']: - libraries.append(boost_system) - -if env['PLATFORM'] == 'Darwin' and env['BOOST_SYSTEM_REQUIRED']: +if env['HAS_BOOST_SYSTEM']: libraries.append(boost_system)