summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index bac686636475..01b86c285dbd 100644
--- a/configure.in
+++ b/configure.in
@@ -6294,7 +6294,10 @@ 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'));"`
- if $PKG_CONFIG --exists python-$python_version; then
+ if test -z "$PKG_CONFIG"; then
+ PYTHON_CFLAGS="-I$python_include"
+ PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+ elif $PKG_CONFIG --exists python-$python_version; then
PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
else