[libxslt] python: Fix build on Windows



commit 1dd4a2285f9bc6d9ae79787214561411d71e1c45
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 6 13:46:57 2022 +0200

    python: Fix build on Windows
    
    - Don't pollute LDFLAGS
    - Also check for MSYS

 configure.ac       | 13 ++++++-------
 python/Makefile.am |  2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 873be77d..d401e1de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,7 +186,13 @@ AC_ARG_WITH(python,
 AS_IF([test "x$with_python" != "xno"], [
     AM_PATH_PYTHON
     PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
+    case "$host" in
+        *-*-cygwin* | *-*-mingw* | *-*-msys* )
+            PYTHON_LDFLAGS="-no-undefined"
+            ;;
+    esac
 ])
+AC_SUBST(PYTHON_LDFLAGS)
 AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"])
 
 AC_ARG_WITH(crypto, [  --with-crypto           Add crypto support to exslt (on)])
@@ -485,13 +491,6 @@ expanded_libdir=$(
 LIBXSLT_DEFAULT_PLUGINS_PATH="$expanded_libdir/libxslt-plugins"
 AC_SUBST(LIBXSLT_DEFAULT_PLUGINS_PATH)
 
-case "$host" in
- *-*-cygwin*|*-*-mingw*)
- LDFLAGS="$LDFLAGS -no-undefined"
- ;;
-esac
-
-
 AC_SUBST(XML_CONFIG)
 AC_SUBST(LIBXML_LIBS)
 AC_SUBST(LIBXML_CFLAGS)
diff --git a/python/Makefile.am b/python/Makefile.am
index fa7ed00b..3c99217b 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -26,7 +26,7 @@ libxsltmod_la_LIBADD = \
        $(top_builddir)/libxslt/libxslt.la \
        $(top_builddir)/libexslt/libexslt.la \
        $(PYTHON_LIBS) $(LIBXML_LIBS)
-libxsltmod_la_LDFLAGS = -module -avoid-version
+libxsltmod_la_LDFLAGS = $(AM_LDFLAGS) $(PYTHON_LDFLAGS) -module -avoid-version
 
 libxslt.py: $(srcdir)/libxsl.py libxsltclass.py
        cat $(srcdir)/libxsl.py libxsltclass.py > $@


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]