SConstruct: fix configure check ogr_enabled

gdal-config --ogr-enabled writes yes/no to stdout,
but always returns 0 (unless an invalid argument is given)
This commit is contained in:
Mickey Rose 2018-06-28 14:12:13 +02:00
parent e63003a6e0
commit 4531393367

View file

@ -760,6 +760,8 @@ def ogr_enabled(context):
context.Message( 'Checking if gdal is ogr enabled... ')
context.sconf.cached = False
ret, out = config_command(env['GDAL_CONFIG'], '--ogr-enabled')
if ret and out:
ret = (out == 'yes')
if not ret:
if 'ogr' not in env['SKIPPED_DEPS']:
env['SKIPPED_DEPS'].append('ogr')