[Libreoffice] Robert Nagy: Problems with your python library patch
Robert Nagy
robert at openbsd.org
Wed Apr 20 04:18:19 PDT 2011
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
More information about the LibreOffice
mailing list