1# -*- mode:python -*- 2 3# Copyright (c) 2009 The Hewlett-Packard Development Company 4# Copyright (c) 2004-2005 The Regents of The University of Michigan 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions are --- 543 unchanged lines hidden (view full) --- 552py_includes = [ py_general_include ] 553if py_platform_include != py_general_include: 554 py_includes.append(py_platform_include) 555 556py_lib_path = [ py_getvar('LIBDIR') ] 557# add the prefix/lib/pythonX.Y/config dir, but only if there is no 558# shared library in prefix/lib/. 559if not py_getvar('Py_ENABLE_SHARED'): |
560 py_lib_path.append(py_getvar('LIBPL')) |
561 562py_libs = [] 563for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split(): |
564 assert lib.startswith('-l') 565 lib = lib[2:] |
566 if lib not in py_libs: 567 py_libs.append(lib) |
568py_libs.append(py_version) |
569 570env.Append(CPPPATH=py_includes) 571env.Append(LIBPATH=py_lib_path) 572 573# verify that this stuff works 574if not conf.CheckHeader('Python.h', '<>'): 575 print "Error: can't find Python.h header in", py_includes 576 Exit(1) 577 578for lib in py_libs: |
579 if not conf.CheckLib(lib): 580 print "Error: can't find library %s required by python" % lib 581 Exit(1) 582 583# On Solaris you need to use libsocket for socket ops 584if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C++', 'accept(0,0,0);'): 585 if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C++', 'accept(0,0,0);'): 586 print "Can't find library with socket calls (e.g. accept())" --- 319 unchanged lines hidden --- |