scons: make second freetype check conditional on freetype-config availability
This commit is contained in:
parent
bcf4c2967e
commit
867cc3bd59
1 changed files with 11 additions and 9 deletions
|
@ -1069,15 +1069,17 @@ if not preconfigured:
|
||||||
env.AppendUnique(CPPPATH = os.path.realpath(inc_path))
|
env.AppendUnique(CPPPATH = os.path.realpath(inc_path))
|
||||||
env.AppendUnique(LIBPATH = os.path.realpath(lib_path))
|
env.AppendUnique(LIBPATH = os.path.realpath(lib_path))
|
||||||
|
|
||||||
conf.parse_config('FREETYPE_CONFIG')
|
if conf.parse_config('FREETYPE_CONFIG'):
|
||||||
|
|
||||||
# check if freetype links to bz2
|
# check if freetype links to bz2
|
||||||
if env['RUNTIME_LINK'] == 'static':
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
temp_env = env.Clone()
|
temp_env = env.Clone()
|
||||||
temp_env['LIBS'] = []
|
temp_env['LIBS'] = []
|
||||||
|
try:
|
||||||
temp_env.ParseConfig('%s --libs' % env['FREETYPE_CONFIG'])
|
temp_env.ParseConfig('%s --libs' % env['FREETYPE_CONFIG'])
|
||||||
if 'bz2' in temp_env['LIBS']:
|
if 'bz2' in temp_env['LIBS']:
|
||||||
env['EXTRA_FREETYPE_LIBS'].append('bz2')
|
env['EXTRA_FREETYPE_LIBS'].append('bz2')
|
||||||
|
except OSError,e:
|
||||||
|
pass
|
||||||
|
|
||||||
# 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
|
||||||
|
|
Loading…
Reference in a new issue