$OpenBSD$ - don't link against pthreads (XXX why was it there in the first place?) - use saner libraries names Fix library naming, don't hardcode g++ usage. --- SConstruct.orig Sat Mar 13 11:59:50 2010 +++ SConstruct Mon Dec 2 16:46:17 2013 @@ -119,7 +119,7 @@ elif platform == 'mingw': env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] ) elif platform.startswith('linux-gcc'): env.Tool( 'default' ) - env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" ) + env.Append( CCFLAGS = "-Wall" ) env['SHARED_LIB_ENABLED'] = True else: print "UNSUPPORTED PLATFORM." @@ -164,7 +164,7 @@ env['SRCDIST_ADD'] = SrcDistAdder( env ) env['SRCDIST_TARGET'] = os.path.join( DIST_DIR, 'jsoncpp-src-%s.tar.gz' % env['JSONCPP_VERSION'] ) env_testing = env.Clone( ) -env_testing.Append( LIBS = ['json_${LIB_NAME_SUFFIX}'] ) +env_testing.Append( LIBS = ['jsoncpp'] ) def buildJSONExample( env, target_sources, target_name ): env = env.Clone() @@ -187,13 +187,13 @@ def buildUnitTests( env, target_sources, target_name ) env.AlwaysBuild( check_alias_target ) def buildLibrary( env, target_sources, target_name ): - static_lib = env.StaticLibrary( target=target_name + '_${LIB_NAME_SUFFIX}', - source=target_sources ) + static_lib = env.StaticLibrary( target=target_name, source=target_sources ) global lib_dir env.Install( lib_dir, static_lib ) if env['SHARED_LIB_ENABLED']: - shared_lib = env.SharedLibrary( target=target_name + '_${LIB_NAME_SUFFIX}', - source=target_sources ) + shared_lib = env.SharedLibrary( target=target_name, + source=target_sources, + SHLIBSUFFIX=".so.%s" % os.environ["LIBjsoncpp_VERSION"] ) env.Install( lib_dir, shared_lib ) env['SRCDIST_ADD']( source=[target_sources] )