0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-29 16:47:28 +01:00
mongodb/buildscripts/hacks_ubuntu.py

48 lines
1.2 KiB
Python
Raw Normal View History

import os
def insert( env , options ):
if not foundxulrunner( env , options ):
2009-11-20 20:24:20 +01:00
if os.path.exists( "usr/include/mozjs/" ):
env.Append( CPPDEFINES=[ "MOZJS" ] )
def foundxulrunner( env , options ):
best = None
for x in os.listdir( "/usr/include" ):
if x.find( "xulrunner" ) != 0:
continue
if x == "xulrunner":
best = x
break
best = x
if best is None:
print( "warning: using ubuntu without xulrunner-dev. we reccomend installing it" )
return False
incroot = "/usr/include/" + best + "/"
libroot = "/usr/lib"
2009-10-12 20:20:52 +02:00
if options["linux64"] and os.path.exists("/usr/lib64"):
libroot += "64";
libroot += "/" + best
2009-10-12 20:20:52 +02:00
2009-08-30 03:17:34 +02:00
if not os.path.exists( libroot ):
print( "warning: found xulrunner include but not lib for: " + best )
return False
env.Prepend( LIBPATH=[ libroot ] )
env.Prepend( RPATH=[ libroot ] )
env.Prepend( CPPPATH=[ incroot + "stable/" ,
incroot + "unstable/" ] )
2009-09-03 20:48:47 +02:00
env.Append( CPPDEFINES=[ "XULRUNNER" , "OLDJS" ] )
if best.find( "1.9" ) >= 0:
env.Append( CPPDEFINES=[ "XULRUNNER190" ] )
return True