lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master b21f123 01/14: Don't link ws2_32 lib for nati


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b21f123 01/14: Don't link ws2_32 lib for native Linux build of XML libraries
Date: Sat, 10 Oct 2020 11:07:10 -0400 (EDT)

branch: master
commit b21f1237aa9cab52f33cf7e66aa8b9370837065b
Author: Ilya Sinitsyn <isinitsyn@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Don't link ws2_32 lib for native Linux build of XML libraries
---
 install_xml_libraries.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/install_xml_libraries.sh b/install_xml_libraries.sh
index cc50ac0..94306eb 100755
--- a/install_xml_libraries.sh
+++ b/install_xml_libraries.sh
@@ -96,6 +96,13 @@ xmlsoft_common_cflags=$(echo '
   -Wno-unused-variable
 ' | tr '\n' ' ' | tr -s ' ' )
 
+xmlsoft_common_ldflags=""
+case "$LMI_TRIPLET" in
+    *-*-cygwin*|*-*-mingw*)
+        xmlsoft_common_ldflags="$xmlsoft_common_ldflags -lws2_32"
+        ;;
+esac
+
 third_party_libraries_common_options="
   --prefix=$prefix
   --exec-prefix=$exec_prefix
@@ -183,7 +190,7 @@ for lib in libxml2 libxslt; do
     # 'configure' options must not be double-quoted
     # shellcheck disable=SC2046
     "$libdir/configure" \
-        LDFLAGS='-lws2_32' \
+        LDFLAGS="$xmlsoft_common_ldflags" \
         CPPFLAGS='-w' \
         CFLAGS="-g -O2 $xmlsoft_common_cflags" \
         $(eval "echo \$${lib}_options")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]