From 977ec6c498b48f579ab7f7eb355100c2b833017f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 12 Oct 2010 05:34:41 +0000 Subject: [PATCH] shuffle addition of 'pthreads' flag so it is added before configure check --- SConstruct | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 9a3f0be2f..1d8822e71 100644 --- a/SConstruct +++ b/SConstruct @@ -893,6 +893,13 @@ if not preconfigured: if env['THREADING'] == 'multi': BOOST_LIBSHEADERS.append(['thread', 'boost/thread/mutex.hpp', True]) + # on solaris the configure checks for boost_thread + # require the -pthreads flag to be able to check for + # threading support, so we add as a global library instead + # of attaching to cxxflags after configure + if env['PLATFORM'] == 'SunOS': + env.Append(LIBS = '-pthreads') + # if requested, sort LIBPATH and CPPPATH before running CheckLibWithHeader tests if env['PRIORITIZE_LINKING']: @@ -1060,8 +1067,6 @@ if not preconfigured: # but will retain logic for future use #if platform.mac_ver()[0].startswith('10.5'): # common_cxx_flags += '-DOSX_LEOPARD ' - elif env['PLATFORM'] == 'SunOS': - pthread = '-pthreads' else: pthread = '-pthread'