Don't overlink with libxml2's dependencies.
--- a/acinclude.m4	2020-09-30 00:15:55.000000000 -0500
+++ b/acinclude.m4	2024-01-10 07:05:58.000000000 -0600
@@ -2582,7 +2582,7 @@
     LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
--- a/configure	2020-09-30 00:15:55.000000000 -0500
+++ b/configure	2024-01-10 07:05:58.000000000 -0600
@@ -17098,7 +17098,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -29399,7 +29399,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -75840,7 +75840,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -77384,7 +77384,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -85784,7 +85784,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -86658,7 +86658,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -87475,7 +87475,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -88216,7 +88216,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
@@ -90542,7 +90542,7 @@
     LIBXML_VERSION=`expr $1 \* 1000000 + $2 \* 1000 + $3`
     if test "$LIBXML_VERSION" -ge "2006011"; then
       found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
+      LIBXML_LIBS=`$XML2_CONFIG --libs --dynamic`
       LIBXML_INCS=`$XML2_CONFIG --cflags`
     else
       as_fn_error $? "libxml2 version 2.6.11 or greater required." "$LINENO" 5
