aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-09-07 23:37:26 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-09-07 23:37:26 +0300
commita8720e5606ae0e9a44958024c51c4f0d6232befc (patch)
treed82b25c6bf05e3210b79e3262482f2d4bf6fabf5
parent910bb6929246d79d84e8c6bceb4b1b3faa8a446f (diff)
downloaddico-a8720e5606ae0e9a44958024c51c4f0d6232befc.tar.gz
dico-a8720e5606ae0e9a44958024c51c4f0d6232befc.tar.bz2
Fix compilation with python >=3.8
* modules/python/module.ac: Try python-config --libs --embed first.
-rw-r--r--modules/python/module.ac4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/python/module.ac b/modules/python/module.ac
index 35993b8..418caef 100644
--- a/modules/python/module.ac
+++ b/modules/python/module.ac
@@ -32,7 +32,9 @@ if test "$status_python" = yes; then
AC_ARG_VAR([PYTHON_CONFIG], [The name of python-config binary])
AC_PATH_PROG([PYTHON_CONFIG], python-config)
if test -n "$PYTHON_CONFIG"; then
- AC_SUBST(PYTHON_LIBS,`$PYTHON_CONFIG --libs`)
+ AC_SUBST(PYTHON_LIBS)
+ PYTHON_LIBS=`$PYTHON_CONFIG --libs --embed 2>/dev/null` || \
+ PYTHON_LIBS=`$PYTHON_CONFIG --libs`
AC_SUBST(PYTHON_INCLUDES,`$PYTHON_CONFIG --includes`)
$PYTHON <<EOT
import sys

Return to:

Send suggestions and report system problems to the System administrator.