Don't overlink with libxml2's dependencies.
--- a/acinclude.m4	2019-10-22 11:59:41.000000000 -0500
+++ b/acinclude.m4	2024-01-10 06:56:09.000000000 -0600
@@ -2594,7 +2594,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	2019-10-22 11:59:36.000000000 -0500
+++ b/configure	2024-01-10 06:57:27.000000000 -0600
@@ -16914,7 +16914,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
@@ -29004,7 +29004,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
@@ -76915,7 +76915,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
@@ -78517,7 +78517,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
@@ -86436,7 +86436,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
@@ -87349,7 +87349,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
@@ -88205,7 +88205,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
@@ -88985,7 +88985,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
@@ -91376,7 +91376,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
