diff options
author | Patrick Monnerat <[email protected]> | 2019-06-17 14:13:04 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-09-12 18:00:20 +0200 |
commit | a45c2c0b81c04e6305fa063e70de9930910f4e9a (patch) | |
tree | 032cce6bc455418bb3b372e92b4f708e5df81ab6 | |
parent | fb4ed614990d04e53804bc3601bb96e559676ad1 (diff) | |
download | python-caja-a45c2c0b81c04e6305fa063e70de9930910f4e9a.tar.bz2 python-caja-a45c2c0b81c04e6305fa063e70de9930910f4e9a.tar.xz |
Add support for building with Python 3.8
Embedding Python >= 3.8 requires to use the pkgconfig profile python-*-embed.
Try to use it and fallback to non-suffixed name on error.
-rw-r--r-- | configure.ac | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 1aacdd2..4e23b59 100644 --- a/configure.ac +++ b/configure.ac @@ -39,8 +39,14 @@ dnl ************************************************** dnl * Check for Python dnl ************************************************** AM_PATH_PYTHON([2.7]) -PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) -PYTHON_LIB_LOC="`pkg-config python-${PYTHON_VERSION} --variable=libdir`" +PYTHON_PKG="python-${PYTHON_VERSION}-embed" +PKG_CHECK_MODULES([PYTHON], [${PYTHON_PKG}],, + [ + PYTHON_PKG=python-${PYTHON_VERSION} + PKG_CHECK_MODULES([PYTHON], [${PYTHON_PKG}]) + ] +) +PYTHON_LIB_LOC="`pkg-config ${PYTHON_PKG} --variable=libdir`" PYTHON_ABIFLAGS=`$PYTHON -c 'import sys; exec("try: print (sys.abiflags)\nexcept: pass")'` AC_SUBST(PYTHON_LIBS) AC_SUBST(PYTHON_CFLAGS) |