link python module with python library
authorFrederic Crozat <fcrozat@mandriva.com>
Thu, 24 Sep 2009 16:16:07 +0000 (18:16 +0200)
committerDaniel Veillard <veillard@redhat.com>
Thu, 24 Sep 2009 16:16:07 +0000 (18:16 +0200)
libxslt python module wasn't linked with python library
* configure.in python/Makefile.am: detect and add appropriate linking
  flags

configure.in
python/Makefile.am

index 756003d..7fef7a2 100644 (file)
@@ -341,6 +341,7 @@ except: print 0"`
                    PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
            fi
        fi
+        PYTHON_LIBS=`python$PYTHON_VERSION-config --libs`
     fi
     if test "$with_python" != ""
     then
@@ -358,6 +359,7 @@ else
 fi
 AC_SUBST(pythondir)
 AC_SUBST(PYTHON_SUBDIR)
+AC_SUBST(PYTHON_LIBS)
 
 AC_ARG_WITH(crypto, [  --with-crypto           Add crypto support to exslt (on)])
 WITH_CRYPTO=0
index 9591c11..fd3ef28 100644 (file)
@@ -36,7 +36,7 @@ all-local: libxslt.py
 python_LTLIBRARIES = libxsltmod.la
 
 libxsltmod_la_SOURCES = libxslt.c types.c libxslt-py.c
-libxsltmod_la_LIBADD = $(mylibs) 
+libxsltmod_la_LIBADD = $(mylibs) @PYTHON_LIBS@
 
 libxslt.py: $(srcdir)/libxsl.py $(srcdir)/libxsltclass.py
        cat $(srcdir)/libxsl.py $(srcdir)/libxsltclass.py > libxslt.py