[Libreoffice-commits] .: configure.in

René Engelhard rene at kemper.freedesktop.org
Mon Jul 25 09:14:34 PDT 2011


 configure.in |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 74e8a058e54abd69bf5ac321b767f47e2f46e31d
Author: Rene Engelhard <rene at debian.org>
Date:   Mon Jul 25 18:05:18 2011 +0200

    use python-x.y.pc if existing for setting PYTHON_{CFLAGS,LIBS}

diff --git a/configure.in b/configure.in
index cc89278..501983a 100755
--- a/configure.in
+++ b/configure.in
@@ -4391,8 +4391,13 @@ if test $enable_python = system; then
         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"
+	if $PKG_CONFIG --exists python-$python_version; then
+		PYTHON_CLAGS="`$PKG_CONFIG --cflags python-$python_version`"
+		PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version`"
+	else
+        	PYTHON_CFLAGS="-I$python_include"
+        	PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+	fi
     elif test "$cross_compiling" = yes; then
         dnl How to find out the cross-compilation Python installation path?
         dnl Let's hardocode what we know for different distributions for now...


More information about the Libreoffice-commits mailing list