--- a/SConstruct 2011-04-13 18:25:01.436551679 +0200 +++ b/SConstruct 2011-04-13 18:25:45.387832601 +0200 @@ -668,12 +668,13 @@ if has_option( "distcc" ): env["CXX"] = "distcc " + env["CXX"] - env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) + env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) # env.Append( " -Wconversion" ) TODO: this doesn't really work yet if linux: - env.Append( CPPFLAGS=" -Werror " ) env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's + env.Append( CXXFLAGS=os.environ['CXXFLAGS']) env.Append( CXXFLAGS=" -Wnon-virtual-dtor " ) + env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) env.Append( LIBS=[] ) @@ -683,12 +684,11 @@ if linux and has_option( "sharedclient" ): env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) + env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " ) if debugBuild: env.Append( CPPFLAGS=" -O0 -fstack-protector " ); env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind - else: - env.Append( CPPFLAGS=" -O3" ) #env.Append( CPPFLAGS=" -fprofile-generate" ) #env.Append( LINKFLAGS=" -fprofile-generate" ) # then: @@ -911,8 +911,8 @@ myCheckLib( J , True ) mozHeader = "js" - if bigLibString(myenv).find( "mozjs" ) >= 0: - mozHeader = "mozjs" + env.Append( CPPPATH=["/usr/include/nspr"] ) + env.Append( CPPDEFINES=[ "XULRUNNER" ] ) if not conf.CheckHeader( mozHeader + "/jsapi.h" ): if conf.CheckHeader( "jsapi.h" ):