SConstruct (6113:4e008e4ecc92) SConstruct (6120:4dcea6c903fa)
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'):
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('-L' + py_getvar('LIBPL'))
560 py_lib_path.append(py_getvar('LIBPL'))
561
562py_libs = []
563for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split():
561
562py_libs = []
563for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split():
564 assert lib.startswith('-l')
565 lib = lib[2:]
564 if lib not in py_libs:
565 py_libs.append(lib)
566 if lib not in py_libs:
567 py_libs.append(lib)
566py_libs.append('-l' + py_version)
568py_libs.append(py_version)
567
568env.Append(CPPPATH=py_includes)
569env.Append(LIBPATH=py_lib_path)
570
571# verify that this stuff works
572if not conf.CheckHeader('Python.h', '<>'):
573 print "Error: can't find Python.h header in", py_includes
574 Exit(1)
575
576for lib in py_libs:
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:
577 assert lib.startswith('-l')
578 lib = lib[2:]
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 ---
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 ---