Issue 1231

This commit is contained in:
Thomas Nagy 2013-02-17 14:29:41 +01:00
parent 582a1a59f1
commit 526fe68773
2 changed files with 11 additions and 4 deletions

View File

@ -4,6 +4,7 @@ NEW IN WAF 1.7.10
* Codelite plugin by Christian Klein
* Validate the versioned library number #1180
* New export_defines keyword for C/C++/Fortran libraries
* Python config tests enhancements #1231
NEW IN WAF 1.7.9
----------------

View File

@ -355,13 +355,19 @@ def check_python_headers(conf):
except conf.errors.ConfigurationError:
# python3.2, oh yeah
xx = conf.env.CXX_NAME and 'cxx' or 'c'
conf.check_cfg(msg='Asking python-config for the flags (pyembed)',
path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=['--cflags', '--libs', '--ldflags'])
flags = ['--cflags', '--libs', '--ldflags']
for f in flags:
conf.check_cfg(msg='Asking python-config for pyembed %s flags' % f,
path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=[f])
conf.check(header_name='Python.h', define_name='HAVE_PYTHON_H', msg='Getting pyembed flags from python-config',
fragment=FRAG, errmsg='Could not build a python embedded interpreter',
features='%s %sprogram pyembed' % (xx, xx))
conf.check_cfg(msg='Asking python-config for the flags (pyext)',
path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEXT', args=['--cflags', '--libs', '--ldflags'])
for f in flags:
conf.check_cfg(msg='Asking python-config for pyext %s flags' % f,
path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEXT', args=[f])
conf.check(header_name='Python.h', define_name='HAVE_PYTHON_H', msg='Getting pyext flags from python-config',
features='%s %sshlib pyext' % (xx, xx), fragment=FRAG, errmsg='Could not build python extensions')