mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-29 21:46:59 +03:00
Fix Python build on Windows
Build Python bindings with -no-undefined on Windows. Remove libs that should already be set by PKG_CHECK_MODULE.
This commit is contained in:
parent
22b82d14d1
commit
ad6f10a81b
18
configure.ac
18
configure.ac
@ -790,25 +790,17 @@ AS_IF([test "x$with_python" != "xno"], [
|
|||||||
AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"])
|
AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Extra Python flags for Windows (is this still needed now that we use
|
dnl Extra Python flags for Windows
|
||||||
dnl AM_PATH_PYTHON/PKG_CHECK_MODULES to detect and set up Python?)
|
|
||||||
dnl
|
dnl
|
||||||
EXTRA_PYTHON_LIBADD=
|
PYTHON_LDFLAGS=
|
||||||
if test "${PYTHON}" != ""; then
|
if test "${PYTHON}" != ""; then
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*-w64-mingw*)
|
*-*-cygwin* | *-*-mingw* | *-*-msys* )
|
||||||
EXTRA_PYTHON_LIBADD="-shrext .pyd -L${pythondir}/../../lib -lpython${PYTHON_VERSION}"
|
PYTHON_LDFLAGS="-no-undefined"
|
||||||
;;
|
|
||||||
*-*-mingw*)
|
|
||||||
EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
|
|
||||||
;;
|
|
||||||
*-*-cygwin*)
|
|
||||||
EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(PYTHON_LDFLAGS)
|
||||||
AC_SUBST(EXTRA_PYTHON_LIBADD)
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check for DSO support
|
dnl Check for DSO support
|
||||||
|
@ -20,8 +20,8 @@ pyexec_LTLIBRARIES = libxml2mod.la
|
|||||||
|
|
||||||
libxml2mod_la_SOURCES = libxml.c libxml_wrap.h types.c
|
libxml2mod_la_SOURCES = libxml.c libxml_wrap.h types.c
|
||||||
nodist_libxml2mod_la_SOURCES = libxml2-py.h libxml2-py.c
|
nodist_libxml2mod_la_SOURCES = libxml2-py.h libxml2-py.c
|
||||||
libxml2mod_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version
|
libxml2mod_la_LDFLAGS = $(AM_LDFLAGS) $(PYTHON_LDFLAGS) -module -avoid-version
|
||||||
libxml2mod_la_LIBADD = $(top_builddir)/libxml2.la $(EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
|
libxml2mod_la_LIBADD = $(top_builddir)/libxml2.la $(PYTHON_LIBS)
|
||||||
|
|
||||||
BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
|
BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user