make libxml2 optional dependency (XMLPARSER=libxml2)
This commit is contained in:
parent
f8fd60dc69
commit
ffcacf3509
2 changed files with 14 additions and 13 deletions
25
SConstruct
25
SConstruct
|
@ -1266,18 +1266,19 @@ if not preconfigured:
|
||||||
|
|
||||||
# libxml2 should be optional but is currently not
|
# libxml2 should be optional but is currently not
|
||||||
# https://github.com/mapnik/mapnik/issues/913
|
# https://github.com/mapnik/mapnik/issues/913
|
||||||
if env.get('XML2_LIBS') or env.get('XML2_INCLUDES'):
|
if env.get('XMLPARSER') and env['XMLPARSER'] == 'libxml2':
|
||||||
REQUIRED_LIBSHEADERS.insert(0,['libxml2','libxml/parser.h',True,'C'])
|
if env.get('XML2_LIBS') or env.get('XML2_INCLUDES'):
|
||||||
if env.get('XML2_INCLUDES'):
|
OPTIONAL_LIBSHEADERS.insert(0,['libxml2','libxml/parser.h',True,'C'])
|
||||||
inc_path = env['XML2_INCLUDES']
|
if env.get('XML2_INCLUDES'):
|
||||||
env.AppendUnique(CPPPATH = fix_path(inc_path))
|
inc_path = env['XML2_INCLUDES']
|
||||||
if env.get('XML2_LIBS'):
|
env.AppendUnique(CPPPATH = fix_path(inc_path))
|
||||||
lib_path = env['XML2_LIBS']
|
if env.get('XML2_LIBS'):
|
||||||
env.AppendUnique(LIBPATH = fix_path(lib_path))
|
lib_path = env['XML2_LIBS']
|
||||||
elif conf.parse_config('XML2_CONFIG',checks='--cflags'):
|
env.AppendUnique(LIBPATH = fix_path(lib_path))
|
||||||
env['HAS_LIBXML2'] = True
|
elif conf.parse_config('XML2_CONFIG',checks='--cflags'):
|
||||||
else:
|
env['HAS_LIBXML2'] = True
|
||||||
env['MISSING_DEPS'].append('libxml2')
|
else:
|
||||||
|
env['MISSING_DEPS'].append('libxml2')
|
||||||
|
|
||||||
if not env['HOST']:
|
if not env['HOST']:
|
||||||
if conf.CheckHasDlfcn():
|
if conf.CheckHasDlfcn():
|
||||||
|
|
|
@ -84,7 +84,7 @@ if '-DHAVE_WEBP' in env['CPPDEFINES']:
|
||||||
lib_env['LIBS'].append('webp')
|
lib_env['LIBS'].append('webp')
|
||||||
enabled_imaging_libraries.append('webp_reader.cpp')
|
enabled_imaging_libraries.append('webp_reader.cpp')
|
||||||
|
|
||||||
lib_env['LIBS'].append('xml2')
|
if '-DHAVE_LIBXML2' in env['CPPDEFINES'] : lib_env['LIBS'].append('xml2')
|
||||||
|
|
||||||
if '-DBOOST_REGEX_HAS_ICU' in env['CPPDEFINES']:
|
if '-DBOOST_REGEX_HAS_ICU' in env['CPPDEFINES']:
|
||||||
lib_env['LIBS'].append('icui18n')
|
lib_env['LIBS'].append('icui18n')
|
||||||
|
|
Loading…
Reference in a new issue