diff options
Diffstat (limited to 'distsrc')
-rw-r--r-- | distsrc/client/SConstruct | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/distsrc/client/SConstruct b/distsrc/client/SConstruct index 450f3bc1ff0..f2d5e655a59 100644 --- a/distsrc/client/SConstruct +++ b/distsrc/client/SConstruct @@ -12,9 +12,10 @@ env = Environment() def addExtraLibs( s ): for x in s.split(","): - env.Append( CPPPATH=[ x + "/include" ] ) - env.Append( LIBPATH=[ x + "/lib" ] ) - env.Append( LIBPATH=[ x + "/lib64" ] ) + if os.path.exists( x ): + env.Append( CPPPATH=[ x + "/include" ] ) + env.Append( LIBPATH=[ x + "/lib" ] ) + env.Append( LIBPATH=[ x + "/lib64" ] ) if GetOption( "extrapath" ) is not None: addExtraLibs( GetOption( "extrapath" ) ) @@ -23,6 +24,17 @@ env.Append( CPPPATH=[ "mongo/" ] ) env.Append( CPPDEFINES=[ "_SCONS" , "MONGO_EXPOSE_MACROS" ] ) +nix = False + +if "darwin" == os.sys.platform: + addExtraLibs( "/opt/local/" ) + nix = True +elif "linux2" == os.sys.platform: + nix = True + +if nix: + env.Append( CPPFLAGS=" -O3" ) + allClientFiles = [] allClientFiles += Glob( "mongo/*.cpp" ) allClientFiles += Glob( "mongo/client/*.cpp" ) |