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