fix #2185
This commit is contained in:
parent
080b8e174c
commit
68aaec5ac7
1 changed files with 16 additions and 14 deletions
30
SConstruct
30
SConstruct
|
@ -610,10 +610,12 @@ def parse_config(context, config, checks='--libs --cflags'):
|
||||||
if not parsed:
|
if not parsed:
|
||||||
if config in ('GDAL_CONFIG'):
|
if config in ('GDAL_CONFIG'):
|
||||||
# optional deps...
|
# optional deps...
|
||||||
env['SKIPPED_DEPS'].append(tool)
|
if tool not in env['SKIPPED_DEPS']:
|
||||||
|
env['SKIPPED_DEPS'].append(tool)
|
||||||
conf.rollback_option(config)
|
conf.rollback_option(config)
|
||||||
else: # freetype and libxml2, not optional
|
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 )
|
context.Result( ret )
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@ -669,7 +671,8 @@ def ogr_enabled(context):
|
||||||
context.Message( 'Checking if gdal is ogr enabled... ')
|
context.Message( 'Checking if gdal is ogr enabled... ')
|
||||||
ret = context.TryAction('%s --ogr-enabled' % env['GDAL_CONFIG'])[0]
|
ret = context.TryAction('%s --ogr-enabled' % env['GDAL_CONFIG'])[0]
|
||||||
if not ret:
|
if not ret:
|
||||||
env['SKIPPED_DEPS'].append('ogr')
|
if 'ogr' not in env['SKIPPED_DEPS']:
|
||||||
|
env['SKIPPED_DEPS'].append('ogr')
|
||||||
context.Result( ret )
|
context.Result( ret )
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@ -1385,18 +1388,17 @@ if not preconfigured:
|
||||||
conf.parse_pg_config('PG_CONFIG')
|
conf.parse_pg_config('PG_CONFIG')
|
||||||
elif plugin == 'ogr':
|
elif plugin == 'ogr':
|
||||||
if conf.ogr_enabled():
|
if conf.ogr_enabled():
|
||||||
if not 'gdal' in env['REQUESTED_PLUGINS']:
|
if conf.parse_config('GDAL_CONFIG',checks='--libs'):
|
||||||
conf.parse_config('GDAL_CONFIG',checks='--libs')
|
|
||||||
conf.parse_config('GDAL_CONFIG',checks='--cflags')
|
conf.parse_config('GDAL_CONFIG',checks='--cflags')
|
||||||
libname = conf.get_pkg_lib('GDAL_CONFIG','ogr')
|
libname = conf.get_pkg_lib('GDAL_CONFIG','ogr')
|
||||||
if libname:
|
if libname:
|
||||||
if not conf.CheckLibWithHeader(libname, details['inc'], details['lang']):
|
if not conf.CheckLibWithHeader(libname, details['inc'], details['lang']):
|
||||||
if 'gdal' not in env['SKIPPED_DEPS']:
|
if 'gdal' not in env['SKIPPED_DEPS']:
|
||||||
env['SKIPPED_DEPS'].append('gdal')
|
env['SKIPPED_DEPS'].append('gdal')
|
||||||
if libname in env['LIBS']:
|
if libname in env['LIBS']:
|
||||||
env['LIBS'].remove(libname)
|
env['LIBS'].remove(libname)
|
||||||
else:
|
else:
|
||||||
details['lib'] = libname
|
details['lib'] = libname
|
||||||
elif details['path'] and details['lib'] and details['inc']:
|
elif details['path'] and details['lib'] and details['inc']:
|
||||||
backup = env.Clone().Dictionary()
|
backup = env.Clone().Dictionary()
|
||||||
# Note, the 'delete_existing' keyword makes sure that these paths are prepended
|
# Note, the 'delete_existing' keyword makes sure that these paths are prepended
|
||||||
|
|
Loading…
Reference in a new issue