| 1 | Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when
|
| 2 | looking for headers and libraries.
|
| 3 |
|
| 4 | |
| 5 | |
| 6 | @@ -526,6 +526,14 @@ class PyBuildExt(build_ext):
|
| 7 | inc_dirs += ['/system/include', '/atheos/autolnk/include']
|
| 8 | inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
|
| 9 |
|
| 10 | + # Always honor these variables.
|
| 11 | + if not cross_compiling:
|
| 12 | + lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
|
| 13 | + inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
|
| 14 | + else:
|
| 15 | + lib_dirs = os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep)
|
| 16 | + inc_dirs = os.getenv('CROSS_CPATH', '').split(os.pathsep)
|
| 17 | +
|
| 18 | # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
|
| 19 | if host_platform in ['osf1', 'unixware7', 'openunix8']:
|
| 20 | lib_dirs += ['/usr/ccs/lib']
|