/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 958 by johnpye, Sun Dec 10 02:39:09 2006 UTC revision 959 by johnpye, Sun Dec 10 02:59:42 2006 UTC
# Line 969  def CheckPythonLib(context): Line 969  def CheckPythonLib(context):
969      lastLIBS = context.env.get('LIBS')      lastLIBS = context.env.get('LIBS')
970      lastLIBPATH = context.env.get('LIBPATH')      lastLIBPATH = context.env.get('LIBPATH')
971      lastCPPPATH = context.env.get('CPPPATH')      lastCPPPATH = context.env.get('CPPPATH')
972        lastLINKFLAGS = context.env.get('LINKFLAGS')
973    
974      python_libpath = []      python_libpath = []
975        python_linkflags = []
976      if cfig['LDLIBRARY']==cfig['LIBRARY']:      if cfig['LDLIBRARY']==cfig['LIBRARY']:
977          sys.stdout.write("(static)")          sys.stdout.write("(static)")
978          python_libpath += [cfig['LIBPL']]          python_libpath += [cfig['LIBPL']]
979          python_libs += cfig['LIBS']          python_linkflags += cfig['LIBS']
980    
981      context.env.AppendUnique(LIBS=python_libs)      context.env.AppendUnique(LIBS=python_libs)
982      context.env.AppendUnique(LIBPATH=python_libpath)      context.env.AppendUnique(LIBPATH=python_libpath)
983      context.env.AppendUnique(CPPPATH=python_cpppath)      context.env.AppendUnique(CPPPATH=python_cpppath)
984        context.env.AppendUnique(LINKFLAGS=python_linkflags)
985      result = context.TryLink(libpython_test_text,".c");      result = context.TryLink(libpython_test_text,".c");
986    
987      context.Result(result)        context.Result(result)  
# Line 987  def CheckPythonLib(context): Line 990  def CheckPythonLib(context):
990          context.env['PYTHON_LIBPATH']=python_libpath          context.env['PYTHON_LIBPATH']=python_libpath
991          context.env['PYTHON_LIB']=python_libs          context.env['PYTHON_LIB']=python_libs
992          context.env['PYTHON_CPPPATH']=python_cpppath          context.env['PYTHON_CPPPATH']=python_cpppath
993            context.env['PYTHON_LINKFLAGS']=python_linkflags
994    
995      context.env['LIBS'] = lastLIBS      context.env['LIBS'] = lastLIBS
996      context.env['LIBPATH'] = lastLIBPATH      context.env['LIBPATH'] = lastLIBPATH
997      context.env['CPPPATH'] = lastCPPPATH      context.env['CPPPATH'] = lastCPPPATH
998        context.env['LINKFLAGS'] = lastLINKFLAGS
999    
1000      return result      return result
1001    

Legend:
Removed from v.958  
changed lines
  Added in v.959

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22