fix locating of pythonXX.so, with thanks to Ricardo
authorPaul <paul@claws-mail.org>
Mon, 27 May 2013 12:52:48 +0000 (13:52 +0100)
committerPaul <paul@claws-mail.org>
Mon, 27 May 2013 12:52:48 +0000 (13:52 +0100)
configure.ac

index 07cda6f48a8f7ae155cc263234b1b5a8c5a64b5e..56dd35a759bee5533d1572d7e5dad17d8b4fc108 100644 (file)
@@ -1237,15 +1237,12 @@ AM_PATH_PYTHON([2.5], [
 
        if test x"$HAVE_PYTHON" = xyes; then
                # libpython.so
+               PYTHON_SO_FILE_LOCATION=`python-config --ldflags|sed 's/-L//'|awk '{print $1}'`
                PYTHON_SO_FILE="libpython${PYTHON_VERSION}.so"
                found_libpython_so="no"
-               if test -f "$PYTHON_PREFIX/lib/$PYTHON_SO_FILE"; then
+               if test -f "$PYTHON_SO_FILE_LOCATION/$PYTHON_SO_FILE"; then
                        found_libpython_so="yes"
-                       PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_PREFIX/lib/$PYTHON_SO_FILE\"))"`
-               fi
-               if test -f "$PYTHON_PREFIX/lib64/$PYTHON_SO_FILE"; then
-                       found_libpython_so="yes"
-                       PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_PREFIX/lib64/$PYTHON_SO_FILE\"))"`
+                       PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_SO_FILE_LOCATION/$PYTHON_SO_FILE\"))"`
                fi
                if test x"$found_libpython_so" != x"yes"; then
                        AC_MSG_WARN(Could not find Python shared libary: $PYTHON_SO_FILE does not exist. Maybe you need to install development packages for Python.)