[Libreoffice] Robert Nagy: Problems with your python library patch

Robert Nagy robert at openbsd.org
Wed Apr 20 03:52:37 PDT 2011


Better diff (note that this still requires a shared library and will not work static ones):

diff --git a/configure.in b/configure.in
index 470aa39..0d06542 100755
--- a/configure.in
+++ b/configure.in
@@ -4108,11 +4108,11 @@ elif test -n "$with_system_python" -o -n "$with_system_libs" && \
    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_lib=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LDLIBRARY'));" | $SED -rn 's/lib(.*)\..*
    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_LIBS="-L$python_libdir $python_lib $python_libs"
 fi
 if test "$with_system_python" = "yes" ; then
    SYSTEM_PYTHON=YES


More information about the LibreOffice mailing list