After discussing this with Michael it seems the best solution
would be to use python-config, it even makes configure.in smaller ;)
Please test it with python3 too.
diff --git a/configure.in b/configure.in
index 470aa39..4dd7a4e 100755
--- a/configure.in
+++ b/configure.in
@@ -4107,12 +4107,9 @@ elif test -n "$with_system_python" -o -n "$with_system_libs" && \
AC_MSG_RESULT([external])
AM_PATH_PYTHON([2.2])
- 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_libs=`$PYTHON -c "import distutils.sysconfig;
print(distutils.sysconfig.get_config_var('LIBS'));"`
- python_libdir=`$PYTHON -c "import distutils.sysconfig;
print(distutils.sysconfig.get_config_var('LIBDIR'));"`
- PYTHON_CFLAGS="-I$python_include"
- PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+ python_config="$PYTHON-config"
+ PYTHON_CFLAGS=`$python_config --includes`
+ PYTHON_LIBS=`$python_config --ldflags`
fi
if test "$with_system_python" = "yes" ; then
SYSTEM_PYTHON=YES
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.