summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2011-07-25 18:05:18 +0200
committerRene Engelhard <rene@debian.org>2011-07-25 18:05:18 +0200
commitab86384f68479ed0c00f3b25e4e60787da94cd4c (patch)
tree9bb4aec2c24721038ab56f786c2007f17d51171b /configure.in
parent0368ac2adb11fb61dcdadee411b397cb9b0431d2 (diff)
use python-x.y.pc if existing for setting PYTHON_{CFLAGS,LIBS}
Diffstat (limited to 'configure.in')
-rwxr-xr-xconfigure.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index cc89278efefb..501983aaadfd 100755
--- a/configure.in
+++ b/configure.in
@@ -4391,8 +4391,13 @@ if test $enable_python = system; then
python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
- PYTHON_CFLAGS="-I$python_include"
- PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+ if $PKG_CONFIG --exists python-$python_version; then
+ PYTHON_CLAGS="`$PKG_CONFIG --cflags python-$python_version`"
+ PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version`"
+ else
+ PYTHON_CFLAGS="-I$python_include"
+ PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+ fi
elif test "$cross_compiling" = yes; then
dnl How to find out the cross-compilation Python installation path?
dnl Let's hardocode what we know for different distributions for now...