You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2020/01/28 14:42:29 UTC
[openoffice] 07/08: Detect Python's CFLAGS and LIBS using
pkg-config when possible.
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 2919536114762ddf4d9608d31112b8e01ef4b937
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Sat Jan 25 02:11:54 2020 +0200
Detect Python's CFLAGS and LIBS using pkg-config when possible.
This fixes linking to Python on FreeBSD with Python 3.
Patch by: me
(cherry picked from commit 00503fad63e905b0ef1d175bb9780a358bc27263)
---
main/configure.ac | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/main/configure.ac b/main/configure.ac
index 4ec5594..d6e943e 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -4010,8 +4010,11 @@ elif test -n "$with_system_python" -o -n "$with_system_libs" && \
python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
- PYTHON_CFLAGS="-I$python_include"
- PYTHON_LIBS="-lpython$python_version"
+ PKG_CHECK_MODULES(PYTHON, python-$python_version, PYTHON_PC="TRUE", PYTHON_PC="" )
+ if test "$PYTHON_PC" != "TRUE"; then
+ PYTHON_CFLAGS="-I$python_include"
+ PYTHON_LIBS="-lpython$python_version"
+ fi
fi
if test "$with_system_python" = "yes" ; then
SYSTEM_PYTHON=YES