From d5e3dba3dfcd1babb9e119db67418ed4b3298263 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 4 Mar 2015 16:25:15 -0800 Subject: [PATCH] scons: cross compilation fixes --- SConstruct | 11 ++++++----- src/build.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index 66e771006..18e95f477 100644 --- a/SConstruct +++ b/SConstruct @@ -1283,10 +1283,11 @@ if not preconfigured: else: env['MISSING_DEPS'].append('libxml2') - if conf.CheckHasDlfcn(): - env.Append(CPPDEFINES = '-DMAPNIK_HAS_DLCFN') - else: - env['SKIPPED_DEPS'].extend(['dlfcn']) + if not env['HOST']: + if conf.CheckHasDlfcn(): + env.Append(CPPDEFINES = '-DMAPNIK_HAS_DLCFN') + else: + env['SKIPPED_DEPS'].extend(['dlfcn']) OPTIONAL_LIBSHEADERS = [] @@ -1340,7 +1341,7 @@ if not preconfigured: conf.prioritize_paths(silent=True) # test for C++11 support, which is required - if not conf.supports_cxx11(): + if not env['HOST'] and not conf.supports_cxx11(): color_print(1,"C++ compiler does not support C++11 standard (-std=c++11), which is required. Please upgrade your compiler to at least g++ 4.7 (ideally 4.8)") Exit(1) diff --git a/src/build.py b/src/build.py index fca14e4b2..5311d6068 100644 --- a/src/build.py +++ b/src/build.py @@ -251,7 +251,7 @@ if env['PLUGIN_LINKING'] == 'static': lib_env.AppendUnique(CPPPATH='../plugins/') for plugin in env['REQUESTED_PLUGINS']: details = env['PLUGINS'][plugin] - if details['lib'] in env['LIBS'] or not details['lib']: + if not details['lib'] or details['lib'] in env['LIBS']: plugin_env = SConscript('../plugins/input/%s/build.py' % plugin) if not plugin_env: print("Notice: no 'plugin_env' variable found for plugin: '%s'" % plugin)