From e618a654985194a95f7cf9c8d48f82e2d1062057 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 20 Mar 2014 16:02:08 -0700 Subject: [PATCH] fix #2185 --- SConstruct | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/SConstruct b/SConstruct index 8efe726ac..4bed73702 100644 --- a/SConstruct +++ b/SConstruct @@ -615,10 +615,12 @@ def parse_config(context, config, checks='--libs --cflags'): if not parsed: if config in ('GDAL_CONFIG'): # optional deps... - env['SKIPPED_DEPS'].append(tool) + if tool not in env['SKIPPED_DEPS']: + env['SKIPPED_DEPS'].append(tool) conf.rollback_option(config) else: # freetype and libxml2, not optional - env['MISSING_DEPS'].append(tool) + if tool not in env['MISSING_DEPS']: + env['MISSING_DEPS'].append(tool) context.Result( ret ) return ret @@ -674,7 +676,8 @@ def ogr_enabled(context): context.Message( 'Checking if gdal is ogr enabled... ') ret = context.TryAction('%s --ogr-enabled' % env['GDAL_CONFIG'])[0] if not ret: - env['SKIPPED_DEPS'].append('ogr') + if 'ogr' not in env['SKIPPED_DEPS']: + env['SKIPPED_DEPS'].append('ogr') context.Result( ret ) return ret @@ -1425,18 +1428,17 @@ if not preconfigured: conf.parse_pg_config('PG_CONFIG') elif plugin == 'ogr': if conf.ogr_enabled(): - if not 'gdal' in env['REQUESTED_PLUGINS']: - conf.parse_config('GDAL_CONFIG',checks='--libs') + if conf.parse_config('GDAL_CONFIG',checks='--libs'): conf.parse_config('GDAL_CONFIG',checks='--cflags') - libname = conf.get_pkg_lib('GDAL_CONFIG','ogr') - if libname: - if not conf.CheckLibWithHeader(libname, details['inc'], details['lang']): - if 'gdal' not in env['SKIPPED_DEPS']: - env['SKIPPED_DEPS'].append('gdal') - if libname in env['LIBS']: - env['LIBS'].remove(libname) - else: - details['lib'] = libname + libname = conf.get_pkg_lib('GDAL_CONFIG','ogr') + if libname: + if not conf.CheckLibWithHeader(libname, details['inc'], details['lang']): + if 'gdal' not in env['SKIPPED_DEPS']: + env['SKIPPED_DEPS'].append('gdal') + if libname in env['LIBS']: + env['LIBS'].remove(libname) + else: + details['lib'] = libname elif details['path'] and details['lib'] and details['inc']: backup = env.Clone().Dictionary() # Note, the 'delete_existing' keyword makes sure that these paths are prepended