From 64d98453f8f61cc5378280673ff22a85b94519d4 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sat, 29 Oct 2011 22:34:38 -0700 Subject: [PATCH] scons: make second freetype check conditional on freetype-config availability --- SConstruct | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/SConstruct b/SConstruct index 00c45e5ea..e02adfc99 100644 --- a/SConstruct +++ b/SConstruct @@ -1069,15 +1069,17 @@ if not preconfigured: env.AppendUnique(CPPPATH = os.path.realpath(inc_path)) env.AppendUnique(LIBPATH = os.path.realpath(lib_path)) - conf.parse_config('FREETYPE_CONFIG') - - # check if freetype links to bz2 - if env['RUNTIME_LINK'] == 'static': - temp_env = env.Clone() - temp_env['LIBS'] = [] - temp_env.ParseConfig('%s --libs' % env['FREETYPE_CONFIG']) - if 'bz2' in temp_env['LIBS']: - env['EXTRA_FREETYPE_LIBS'].append('bz2') + if conf.parse_config('FREETYPE_CONFIG'): + # check if freetype links to bz2 + if env['RUNTIME_LINK'] == 'static': + temp_env = env.Clone() + temp_env['LIBS'] = [] + try: + temp_env.ParseConfig('%s --libs' % env['FREETYPE_CONFIG']) + if 'bz2' in temp_env['LIBS']: + env['EXTRA_FREETYPE_LIBS'].append('bz2') + except OSError,e: + pass # libxml2 should be optional but is currently not # https://github.com/mapnik/mapnik/issues/913