Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: r2.0.6-rc0
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 55 lines (40 sloc) 1.504 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

import os

def insert( env , options ):

    # now that sm is in the source tree, don't need this
    # if not foundxulrunner( env , options ):
    # if os.path.exists( "usr/include/mozjs/" ):
    # env.Append( CPPDEFINES=[ "MOZJS" ] )

    return

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 recommend installing it" )
        return False

    incroot = "/usr/include/" + best + "/"
    libroot = "/usr/lib"
    if options["linux64"] and os.path.exists("/usr/lib64"):
        libroot += "64";
    libroot += "/" + best

    
    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/" ,
                           incroot ] )
    env.Prepend( CPPPATH=[ "/usr/include/nspr/" ] )
    
    env.Append( CPPDEFINES=[ "XULRUNNER" , "OLDJS" ] )
    if best.find( "1.9.0" ) >= 0 or best.endswith("1.9"):
        if best.endswith( "1.9.1.9" ):
            pass
        else:
            env.Append( CPPDEFINES=[ "XULRUNNER190" ] )
    return True
Something went wrong with that request. Please try again.