/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 957 by johnpye, Sun Dec 10 02:21:06 2006 UTC revision 958 by johnpye, Sun Dec 10 02:39:09 2006 UTC
# Line 961  def CheckPythonLib(context): Line 961  def CheckPythonLib(context):
961          python_lib='python%d%d'          python_lib='python%d%d'
962      else:      else:
963          python_lib='python%d.%d'          python_lib='python%d.%d'
964      python_lib = python_lib % (sys.version_info[0],sys.version_info[1])      python_libs = [python_lib % (sys.version_info[0],sys.version_info[1])]
965    
966      python_cpppath = [distutils.sysconfig.get_python_inc()]      python_cpppath = [distutils.sysconfig.get_python_inc()]
967      cfig = distutils.sysconfig.get_config_vars()          cfig = distutils.sysconfig.get_config_vars()    
# Line 971  def CheckPythonLib(context): Line 971  def CheckPythonLib(context):
971      lastCPPPATH = context.env.get('CPPPATH')      lastCPPPATH = context.env.get('CPPPATH')
972    
973      python_libpath = []      python_libpath = []
   
974      if cfig['LDLIBRARY']==cfig['LIBRARY']:      if cfig['LDLIBRARY']==cfig['LIBRARY']:
975          print "static library only?"          sys.stdout.write("(static)")
976          python_libpath += [cfig['LIBPL']]          python_libpath += [cfig['LIBPL']]
977            python_libs += cfig['LIBS']
978    
979      context.env.AppendUnique(LIBS=[python_lib])      context.env.AppendUnique(LIBS=python_libs)
980      context.env.AppendUnique(LIBPATH=python_libpath)      context.env.AppendUnique(LIBPATH=python_libpath)
981      context.env.AppendUnique(CPPPATH=python_cpppath)      context.env.AppendUnique(CPPPATH=python_cpppath)
982      result = context.TryLink(libpython_test_text,".c");      result = context.TryLink(libpython_test_text,".c");
983    
984      context.Result(result)      context.Result(result)  
985    
986      if(result):      if(result):
987          context.env.Append(PYTHON_LIBPATH=python_libpath)          context.env['PYTHON_LIBPATH']=python_libpath
988          context.env.Append(PYTHON_LIB=[python_lib])          context.env['PYTHON_LIB']=python_libs
989          context.env.Append(PYTHON_CPPPATH=python_cpppath)          context.env['PYTHON_CPPPATH']=python_cpppath
990    
991      context.env['LIBS'] = lastLIBS      context.env['LIBS'] = lastLIBS
992      context.env['LIBPATH'] = lastLIBPATH      context.env['LIBPATH'] = lastLIBPATH

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

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