Ticket #24241: patch-SConstruct.diff

File patch-SConstruct.diff, 2.0 KB (added by asp742@…, 15 years ago)
  • SConstruct

    old new  
    481481    if not nojni:
    482482        env.Append( FRAMEWORKS=["JavaVM"] )
    483483
    484     if env["CXX"] is None:
    485         if os.path.exists( "/usr/bin/g++-4.2" ):
    486             env["CXX"] = "g++-4.2"
    487 
    488484    nix = True
    489485
    490     if force64:
    491         env.Append( CPPPATH=["/usr/64/include"] )
    492         env.Append( LIBPATH=["/usr/64/lib"] )
    493         if installDir == DEFAULT_INSTALl_DIR and not distBuild:
    494             installDir = "/usr/64/"
    495     else:
    496         env.Append( CPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
    497         env.Append( LIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) )
     486    env.Append( CPPPATH=["@@PREFIX@@/include"] )
     487    env.Append( LIBPATH=["@@PREFIX@@/lib/"] )
     488    env["CFLAGS"] = os.getenv("CFLAGS")
     489    env["CXXFLAGS"] = os.getenv("CXXFLAGS")
     490    env["LINKFLAGS"] = os.getenv("LINKFLAGS")
    498491
    499492elif "linux2" == os.sys.platform:
    500493    linux = True
     
    923916        haveReadLine = False
    924917        if darwin:
    925918            myenv.Append( CPPDEFINES=[ "USE_READLINE" ] )
    926             if force64:
    927                 myCheckLib( "readline" , True )
    928                 myCheckLib( "ncurses" , True )
    929             else:
    930                 myenv.Append( LINKFLAGS=" /usr/lib/libreadline.dylib " )
     919            myenv.Append( LINKFLAGS=" @@PREFIX@@/lib/libreadline.dylib " )
    931920        elif myCheckLib( "readline" , release and nix , staticOnly=release ):
    932921            myenv.Append( CPPDEFINES=[ "USE_READLINE" ] )
    933922            myCheckLib( "ncurses" , staticOnly=release )
     
    11521141        shellEnv["LINKFLAGS"].remove("-m64")
    11531142        shellEnv["CPPPATH"].remove( "/usr/64/include" )
    11541143        shellEnv["LIBPATH"].remove( "/usr/64/lib" )
    1155         shellEnv.Append( CPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
    1156         shellEnv.Append( LIBPATH=filterExists(["/sw/lib/", "/opt/local/lib" , "/usr/lib"]) )
    11571144
    11581145    l = shellEnv["LIBS"]
    11591146    if linux64: