From ab2ce3e541793b96ba2a2c82799cceed711d6d56 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 23 Jul 2019 22:18:23 +0100 Subject: [PATCH] Support python 3.8 (#1676) Fix #1675 --- CMakeLists.txt | 5 ++++- configure.ac | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa8bf180..c126a9aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,7 +172,10 @@ if(WANT_PERL) endif() if (WANT_PYTHON) find_package(Perl 5.10 REQUIRED) - pkg_check_modules(PYTHON "${WANT_PYTHON_VERSION}" REQUIRED) + pkg_check_modules(PYTHON "${WANT_PYTHON_VERSION}-embed") + if (NOT PYTHON_FOUND) + pkg_check_modules(PYTHON "${WANT_PYTHON_VERSION}" REQUIRED) + endif() endif() set(WANT_TCL false CACHE BOOL "Support Tcl modules") diff --git a/configure.ac b/configure.ac index 7334c14c..40f07c02 100644 --- a/configure.ac +++ b/configure.ac @@ -570,7 +570,9 @@ if test "x$PYTHON" != "xno"; then if test -z "$PKG_CONFIG"; then AC_MSG_ERROR([pkg-config is required for modpython.]) fi - PKG_CHECK_MODULES([python], [$PYTHON >= 3.0],, AC_MSG_ERROR([$PYTHON.pc not found or is wrong. Try --disable-python or install python3.])) + PKG_CHECK_MODULES([python], [$PYTHON-embed >= 3.0],, [ + PKG_CHECK_MODULES([python], [$PYTHON >= 3.0],, AC_MSG_ERROR([$PYTHON.pc not found or is wrong. Try --disable-python or install python3.])) + ]) my_saved_LIBS="$LIBS" my_saved_CXXFLAGS="$CXXFLAGS" appendLib $python_LIBS