From 0d68464194bc32fad3f6b55eac17b31ba60ea1da 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 Fixes #4075 --- SConstruct | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index b8eda3c9b..3a09b86ea 100644 --- a/SConstruct +++ b/SConstruct @@ -1392,6 +1392,7 @@ if not preconfigured: [env['ICU_LIB_NAME'],'unicode/unistr.h',True,'C++'], ['harfbuzz', 'harfbuzz/hb.h',True,'C++'] ] + OPTIONAL_LIBSHEADERS = [] if env.get('FREETYPE_LIBS') or env.get('FREETYPE_INCLUDES'): REQUIRED_LIBSHEADERS.insert(0,['freetype','ft2build.h',True,'C']) @@ -1414,9 +1415,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'): @@ -1436,8 +1435,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']