[Commits] [SCM] claws branch, master, updated. 3.17.5-21-gcf7ccc9dc
paul at claws-mail.org
paul at claws-mail.org
Mon May 18 15:01:43 CEST 2020
The branch, master has been updated
via cf7ccc9dc9c1861a6a24318280bd2560cbdc2313 (commit)
from e1cb6c9d13c09b59952d81f5d189f09a40deef9f (commit)
Summary of changes:
configure.ac | 62 +++++++++---------------------------------------------------
1 file changed, 9 insertions(+), 53 deletions(-)
- Log -----------------------------------------------------------------
commit cf7ccc9dc9c1861a6a24318280bd2560cbdc2313
Author: Paul <paul at claws-mail.org>
Date: Mon May 18 14:01:37 2020 +0100
use pkgconfig to check for python2 directly
this makes it possible to build the python plugin, for example, when using a sustem which has both python2 and python3 and defaults to the latter
diff --git a/configure.ac b/configure.ac
index 855e921a9..b39187d72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1324,60 +1324,16 @@ fi
dnl Python *********************************************************************
missing_python=""
-AM_PATH_PYTHON([2.5], [
- AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
- if test x"$PYTHON_CONFIG" = x"" ; then
- AC_PATH_PROG(PYTHON_CONFIG, python-config)
- fi
- if test x"$PYTHON_CONFIG" != x""; then
- PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
- PYTHON_LIBS=`$PYTHON_CONFIG --libs`
- PYTHON_PREFIX=`$PYTHON_CONFIG --prefix`
- HAVE_PYTHON=yes
- else
- AC_MSG_WARN(python-config not found. Maybe you need to install development packages for Python.)
- HAVE_PYTHON=no
- missing_python="python-config"
- fi
-
- if test x"$HAVE_PYTHON" = xyes; then
- _save_libs="$LIBS"
- if test x"$platform_win32" = xno; then
- # libpython.so
- PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so"
- AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl"])
- AC_MSG_CHECKING([whether to dlopen $PYTHON_SHARED_LIB works])
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <dlfcn.h>
- #define PYTHON_SO_FILE "${PYTHON_SHARED_LIB}"
- ],
- [if (!dlopen(PYTHON_SO_FILE, RTLD_NOW | RTLD_GLOBAL)) return 1; return 0;])
- ],
- [found_libpython_so="yes"],
- [found_libpython_so="no"],
- [AC_MSG_FAILURE([cross-compiling not supported])])
- fi
- if test x"$found_libpython_so" != x"yes"; then
- AC_MSG_RESULT(no)
- AC_MSG_WARN(Could not find Python shared libary: ${PYTHON_SHARED_LIB}. Maybe you need to install development packages for Python.)
- HAVE_PYTHON=no
- missing_python="libpython"
- else
- AC_MSG_RESULT(yes)
- fi
- LIBS="$_save_libs";
- fi
- if test x"$HAVE_PYTHON" = xyes; then
- PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.10.3, [AC_DEFINE(ENABLE_PYTHON, [1], [Enable Python support])], HAVE_PYTHON=no)
- if test x"$HAVE_PYTHON" = xno; then
- missing_python="pygtk-2.0 >= 2.10.3"
- fi
+PKG_CHECK_MODULES(PYTHON, python2, HAVE_PYTHON=yes, HAVE_PYTHON=no)
+if test x"$HAVE_PYTHON" = xno; then
+ missing_python="python2"
+fi
+if test x"$HAVE_PYTHON" = xyes; then
+ PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.10.3, [AC_DEFINE(ENABLE_PYTHON, [1], [Enable Python support])], HAVE_PYTHON=no)
+ if test x"$HAVE_PYTHON" = xno; then
+ missing_python="pygtk-2.0 >= 2.10.3"
fi
-], [
- HAVE_PYTHON=no
- missing_python="python interpreter"
-])
+fi
AC_SUBST(PYTHON_SHARED_LIB)
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list