From f6fda91717d1691289d2401b4b50b27bc7a5e60f Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Sun, 1 Sep 2019 10:25:46 +0200 Subject: [PATCH] scons: define OPTIONAL_LIBSHEADERS before use Refs #4075 (cherry picked from commit 0d68464194bc32fad3f6b55eac17b31ba60ea1da) --- SConstruct | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 9e8d579ee..d35bcd1a4 100644 --- a/SConstruct +++ b/SConstruct @@ -1471,6 +1471,7 @@ if not preconfigured: [env['ICU_LIB_NAME'],'unicode/unistr.h',True,'C++'], ['harfbuzz', 'harfbuzz/hb.h',True,'C++'] ] + OPTIONAL_LIBSHEADERS = [] CHECK_PKG_CONFIG = conf.CheckPKGConfig('0.15.0') if env.get('FREETYPE_LIBS') or env.get('FREETYPE_INCLUDES'): @@ -1509,9 +1510,7 @@ if not preconfigured: except OSError as e: pass - # libxml2 should be optional but is currently not - # https://github.com/mapnik/mapnik/issues/913 - if env.get('XMLPARSER') and env['XMLPARSER'] == 'libxml2': + if env['XMLPARSER'] == 'libxml2': if env.get('XML2_LIBS') or env.get('XML2_INCLUDES'): OPTIONAL_LIBSHEADERS.insert(0,['libxml2','libxml/parser.h',True,'C']) if env.get('XML2_INCLUDES'): @@ -1531,8 +1530,6 @@ if not preconfigured: else: env['SKIPPED_DEPS'].extend(['dlfcn']) - OPTIONAL_LIBSHEADERS = [] - if env['JPEG']: OPTIONAL_LIBSHEADERS.append(['jpeg', ['stdio.h', 'jpeglib.h'], False,'C','-DHAVE_JPEG']) inc_path = env['%s_INCLUDES' % 'JPEG']