]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgcobol: Add --with-target-libxml2{,-lib,-include}= configure options [PR122839]
authorJakub Jelinek <jakub@redhat.com>
Sat, 14 Feb 2026 17:05:38 +0000 (18:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 14 Feb 2026 17:05:38 +0000 (18:05 +0100)
The following patch adds new configure options similar to ObjC/Algol68
--with-bdw-gc{,-lib,-include}= configure options where one can override
the default of -I /usr/include/libxml2 and -lxml2 for finding libxml2
headers and library.  Similarly to the bdw-gc options, the override can
be for all multilibs or just specific to each multilib.

Tested also with
../configure --enable-languages=c,c++,cobol --with-target-libxml2=/tmp/libxml2 \
--disable-bootstrap --disable-libsanitizer --disable-libgomp

2026-02-14  Jakub Jelinek  <jakub@redhat.com>

PR cobol/122839
* configure.ac (--with-target-libxml2, --with-target-libxml2-include,
--with-target-libxml2-lib): New configure options, use those to find
libxml2.
(LIBXML2_CPPFLAGS, LIBXML2_LIBS): New AC_SUBSTs.
* Makefile.am (AM_CPPFLAGS): Add $(LIBXML2_CPPFLAGS) rather than
-I /usr/include/libxml2.
(libgcobol_la_LDFLAGS): Add $(LIBXML2_LIBS).
* configure: Regenerate.
* config.h.in: Regenerate.
* Makefile.in: Regenerate.

* doc/install.texi (COBOL-Specific Options): New.

gcc/doc/install.texi
libgcobol/Makefile.am
libgcobol/Makefile.in
libgcobol/config.h.in
libgcobol/configure
libgcobol/configure.ac

index 03039141d24fa9f299bdeb8e0f3ae99ecc991dfc..d40f0c3a11df9f8b714b0dbe4fb67d8b1bb18e3d 100644 (file)
@@ -3063,6 +3063,31 @@ to be available for each multilib variant, unless configured with
 @samp{zlib} is only used when the system installed library is not available.
 @end table
 
+@subheading COBOL-Specific Options
+
+The following options apply to the build of the COBOL runtime library.
+
+@table @code
+@item --with-target-libxml2=@var{list}
+@itemx --with-target-libxml2-include=@var{list}
+@itemx --with-target-libxml2-lib=@var{list}
+Specify search directories for the libxml2 header files and
+libraries.  @var{list} is a comma separated list of key value pairs of the
+form @samp{@var{multilibdir}=@var{path}}, where the default multilib key
+is named as @samp{.} (dot), or is omitted (e.g.@:
+@samp{--with-target-libxml2=/opt/libxml2,32=/opt-libxml2-32}).
+
+The options @option{--with-target-libxml2-include} and
+@option{--with-target-libxml2-lib} must always be specified together
+for each multilib variant and they take precedence over
+@option{--with-target-libxml2}.  If @option{--with-target-libxml2-include}
+is missing values for a multilib, then the value for the default
+multilib is used (e.g.@: @samp{--with-target-libxml2-include=/opt/libxml2/include}
+@samp{--with-target-libxml2-lib=/opt/libxml2/lib64,32=/opt-libxml2/lib32}).
+If none of these options are specified, the library is assumed in
+default locations.
+@end table
+
 @html
 <hr />
 <p>
index 79310647b3e62c4079f12da5f6d08fb2391914d5..de9ee0e3539174e894b8455d8f8cc7703dea88f4 100644 (file)
@@ -85,7 +85,7 @@ nobase_libsubinclude_HEADERS =                        \
 WARN_CFLAGS = -W -Wall -Wwrite-strings
 
 AM_CPPFLAGS = -I. -I posix/shim $(LIBQUADINCLUDE)
-AM_CPPFLAGS += -I /usr/include/libxml2
+AM_CPPFLAGS += $(LIBXML2_CPPFLAGS)
 
 AM_CFLAGS = $(XCFLAGS)
 AM_CXXFLAGS = $(XCFLAGS)
@@ -103,7 +103,7 @@ endif
 libgcobol_la_LINK = $(CXXLINK) $(libgcobol_la_LDFLAGS)
 version_arg = -version-info $(LIBGCOBOL_VERSION)
 libgcobol_la_LDFLAGS = $(LTLDFLAGS) $(LIBQUADLIB) $(LTLIBICONV) \
-       $(extra_ldflags_libgcobol) $(LIBS) $(version_arg)
+       $(extra_ldflags_libgcobol) $(LIBS) $(LIBXML2_LIBS) $(version_arg)
 libgcobol_la_DEPENDENCIES = libgcobol.spec $(LIBQUADLIB_DEP)
 
 endif BUILD_LIBGCOBOL
index fa8b7bdf4ebf8655b5978f59e853b0498847e8e4..687fda2a5083fa92e41edaa9c6b16d81d4ff71f7 100644 (file)
@@ -312,6 +312,8 @@ LIBQUADLIB_DEP = @LIBQUADLIB_DEP@
 LIBQUADSPEC = @LIBQUADSPEC@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
 LIPO = @LIPO@
 LLVM_CONFIG = @LLVM_CONFIG@
 LN_S = @LN_S@
@@ -454,8 +456,7 @@ gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 @BUILD_LIBGCOBOL_TRUE@WARN_CFLAGS = -W -Wall -Wwrite-strings
 @BUILD_LIBGCOBOL_TRUE@AM_CPPFLAGS = -I. -I posix/shim \
-@BUILD_LIBGCOBOL_TRUE@ $(LIBQUADINCLUDE) -I \
-@BUILD_LIBGCOBOL_TRUE@ /usr/include/libxml2
+@BUILD_LIBGCOBOL_TRUE@ $(LIBQUADINCLUDE) $(LIBXML2_CPPFLAGS)
 @BUILD_LIBGCOBOL_TRUE@AM_CFLAGS = $(XCFLAGS)
 @BUILD_LIBGCOBOL_TRUE@AM_CXXFLAGS = $(XCFLAGS) $(WARN_CFLAGS) \
 @BUILD_LIBGCOBOL_TRUE@ -DIN_TARGET_LIBS -fstrict-aliasing \
@@ -465,7 +466,7 @@ gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 @BUILD_LIBGCOBOL_TRUE@libgcobol_la_LINK = $(CXXLINK) $(libgcobol_la_LDFLAGS)
 @BUILD_LIBGCOBOL_TRUE@version_arg = -version-info $(LIBGCOBOL_VERSION)
 @BUILD_LIBGCOBOL_TRUE@libgcobol_la_LDFLAGS = $(LTLDFLAGS) $(LIBQUADLIB) $(LTLIBICONV) \
-@BUILD_LIBGCOBOL_TRUE@ $(extra_ldflags_libgcobol) $(LIBS) $(version_arg)
+@BUILD_LIBGCOBOL_TRUE@ $(extra_ldflags_libgcobol) $(LIBS) $(LIBXML2_LIBS) $(version_arg)
 
 @BUILD_LIBGCOBOL_TRUE@libgcobol_la_DEPENDENCIES = libgcobol.spec $(LIBQUADLIB_DEP)
 all: config.h
index 9f988369febc9149a77eeb0b998e3b192ca93669..1b511d0330d5e4b0da53a7ed44c1e0bad5d9ae46 100644 (file)
@@ -55,9 +55,6 @@
 /* Define to 1 if you have the `random_r' function. */
 #undef HAVE_RANDOM_R
 
-/* Define to 1 if you have the `xmlParseChunk' function. */
-#undef HAVE_SAX_XML_PARSER
-
 /* Define to 1 if you have the `setstate_r' function. */
 #undef HAVE_SETSTATE_R
 
index 18676aafa942f6278eb53146b0afffca27df676d..950b1e2626226ec0c67680f0a1db3a6a7e34f1c9 100755 (executable)
@@ -644,6 +644,8 @@ LIBQUADINCLUDE
 LIBQUADLIB_DEP
 LIBQUADLIB
 LIBQUADSPEC
+LIBXML2_LIBS
+LIBXML2_CPPFLAGS
 extra_ldflags_libgcobol
 LIBGCOBOL_VERSION
 BUILD_LIBGCOBOL_FALSE
@@ -803,6 +805,9 @@ with_toolexeclibdir
 enable_rpath
 with_libiconv_prefix
 with_libiconv_type
+with_target_libxml2
+with_target_libxml2_include
+with_target_libxml2_lib
 enable_libquadmath
 with_gcc_major_version_only
 '
@@ -1472,6 +1477,16 @@ Optional Packages:
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --with-libiconv-type=TYPE     type of library to search for (auto/static/shared)
+  --with-target-libxml2=PATHLIST
+                          specify prefix directory for installed libxml2
+                          package. Equivalent to
+                          --with-target-libxml2-include=PATH/include plus
+                          --with-target-libxml2-lib=PATH/lib
+  --with-target-libxml2-include=PATHLIST
+                          specify directories for installed libxml2 include
+                          files
+  --with-target-libxml2-lib=PATHLIST
+                          specify directories for installed libxml2 library
   --with-gcc-major-version-only
                           use only GCC major number in filesystem paths
 
@@ -12199,7 +12214,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12202 "configure"
+#line 12217 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12305,7 +12320,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12308 "configure"
+#line 12323 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 # These are libxml2.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSAXUserParseMemory in -lxml2" >&5
-$as_echo_n "checking for xmlSAXUserParseMemory in -lxml2... " >&6; }
-if ${ac_cv_lib_xml2_xmlSAXUserParseMemory+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2  $LIBS"
-if test x$gcc_no_link = xyes; then
-  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlSAXUserParseMemory ();
-int
-main ()
-{
-return xmlSAXUserParseMemory ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_xml2_xmlSAXUserParseMemory=yes
-else
-  ac_cv_lib_xml2_xmlSAXUserParseMemory=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+# Check whether --with-target-libxml2 was given.
+if test "${with_target_libxml2+set}" = set; then :
+  withval=$with_target_libxml2;
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSAXUserParseMemory" >&5
-$as_echo "$ac_cv_lib_xml2_xmlSAXUserParseMemory" >&6; }
-if test "x$ac_cv_lib_xml2_xmlSAXUserParseMemory" = xyes; then :
-  LIBS="-lxml2 $LIBS"
 
-$as_echo "#define HAVE_SAX_XML_PARSER 1" >>confdefs.h
 
+# Check whether --with-target-libxml2-include was given.
+if test "${with_target_libxml2_include+set}" = set; then :
+  withval=$with_target_libxml2_include;
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlParseChunk in -lxml2" >&5
-$as_echo_n "checking for xmlParseChunk in -lxml2... " >&6; }
-if ${ac_cv_lib_xml2_xmlParseChunk+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2  $LIBS"
-if test x$gcc_no_link = xyes; then
-  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlParseChunk ();
-int
-main ()
-{
-return xmlParseChunk ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_xml2_xmlParseChunk=yes
-else
-  ac_cv_lib_xml2_xmlParseChunk=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+# Check whether --with-target-libxml2-lib was given.
+if test "${with_target_libxml2_lib+set}" = set; then :
+  withval=$with_target_libxml2_lib;
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlParseChunk" >&5
-$as_echo "$ac_cv_lib_xml2_xmlParseChunk" >&6; }
-if test "x$ac_cv_lib_xml2_xmlParseChunk" = xyes; then :
-  LIBS="-lxml2 $LIBS"
 
-$as_echo "#define HAVE_SAX_XML_PARSER 1" >>confdefs.h
 
+if test "x$use_libgcobol" = xyes && test "x$libgcobol_cv_have_int128" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2" >&5
+$as_echo_n "checking for libxml2... " >&6; }
+  if test "x$with_target_libxml2$with_target_libxml2_include$with_target_libxml2_lib" = x; then
+        LIBXML2_CPPFLAGS="-I /usr/include/libxml2"
+    LIBXML2_LIBS="-lxml2"
+  else
+        if test "x$with_target_libxml2_include" = x && test "x$with_target_libxml2_lib" != x; then
+      as_fn_error $? "found --with-target-libxml2-lib but --with-target-libxml2-include missing" "$LINENO" 5
+    elif test "x$with_target_libxml2_include" != x && test "x$with_target_libxml2_lib" = x; then
+      as_fn_error $? "found --with-target-libxml2-include but --with-target-libxml2-lib missing" "$LINENO" 5
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: using paths configured with --with-target-libxml2 options" >&5
+$as_echo "using paths configured with --with-target-libxml2 options" >&6; }
+    fi
+    mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+    libxml2_val=
+    if test "x$with_target_libxml2" != x; then
+      for i in `echo $with_target_libxml2 | tr ',' ' '`; do
+        case "$i" in
+          *=*) sd=${i%%=*}; d=${i#*=} ;;
+          *) sd=.; d=$i ;;
+        esac
+        if test "$mldir" = "$sd"; then
+          libxml2_val=$d
+        fi
+      done
+      if test "x$libxml2_val" = x; then
+        as_fn_error $? "no multilib path ($mldir) found in --with-target-libxml2" "$LINENO" 5
+      fi
+      libxml2_inc_dir="$libxml2_val/include"
+      libxml2_lib_dir="$libxml2_val/lib"
+    fi
+    libxml2_val=
+    if test "x$with_target_libxml2_include" != x; then
+      for i in `echo $with_target_libxml2_include | tr ',' ' '`; do
+        case "$i" in
+          *=*) sd=${i%%=*}; d=${i#*=} ;;
+          *) sd=.; d=$i; fallback=$i ;;
+        esac
+        if test "$mldir" = "$sd"; then
+          libxml2_val=$d
+        fi
+      done
+      if test "x$libxml2_val" = x && test "x$libxml2_inc_dir" = x && test "x$fallback" != x; then
+        libxml2_inc_dir="$fallback"
+      elif test "x$libxml2_val" = x; then
+        as_fn_error $? "no multilib path ($mldir) found in --with-target-libxml2-include" "$LINENO" 5
+      else
+        libxml2_inc_dir="$libxml2_val"
+      fi
+    fi
+    libxml2_val=
+    if test "x$with_target_libxml2_lib" != x; then
+      for i in `echo $with_target_libxml2_lib | tr ',' ' '`; do
+        case "$i" in
+          *=*) sd=${i%%=*}; d=${i#*=} ;;
+          *) sd=.; d=$i ;;
+        esac
+        if test "$mldir" = "$sd"; then
+          libxml2_val=$d
+        fi
+      done
+      if test "x$libxml2_val" = x; then
+        as_fn_error $? "no multilib path ($mldir) found in --with-target-libxml2-lib" "$LINENO" 5
+      fi
+      libxml2_lib_dir="$libxml2_val"
+    fi
+    if test "x$libxml2_inc_dir" = x; then
+      as_fn_error $? "no multilib path ($mldir) found in --with-target-libxml2-include" "$LINENO" 5
+    fi
+    if test "x$libxml2_lib_dir" = x; then
+      as_fn_error $? "no multilib path ($mldir) found in --with-target-libxml2-lib" "$LINENO" 5
+    fi
+    LIBXML2_CPPFLAGS="-I$libxml2_inc_dir"
+    LIBXML2_LIBS="-L$libxml2_lib_dir -lxml2"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+  fi
+else
+  LIBXML2_CPPFLAGS=
+  LIBXML2_LIBS=
 fi
 
 
+
 # Copied from gcc/configure.ac. 2025-06-05 R.J.Dubner
 # At least for glibc, clock_gettime is in librt.  But don't pull that
 # in if it still doesn't give us the function we want.
index 9b6ea7ebbf35c7d40207160b8c45c16e817d238d..2675ed8e961f55a8ca3f8a796ee02e02d21d84bf 100644 (file)
@@ -233,14 +233,102 @@ libgcobol_have_cacosf128=no
 AC_SEARCH_LIBS([cacosf128], [c m], libgcobol_have_cacosf128=yes)
 
 # These are libxml2.
-AC_CHECK_LIB(xml2, xmlSAXUserParseMemory,
-  [LIBS="-lxml2 $LIBS"
-   AC_DEFINE(HAVE_SAX_XML_PARSER, 1,
-            [Define to 1 if you have the `xmlSAXUserParseMemory' function.])])
-AC_CHECK_LIB(xml2, xmlParseChunk,
-  [LIBS="-lxml2 $LIBS"
-   AC_DEFINE(HAVE_SAX_XML_PARSER, 1,
-            [Define to 1 if you have the `xmlParseChunk' function.])])
+AC_ARG_WITH([target-libxml2],
+[AS_HELP_STRING([--with-target-libxml2=PATHLIST],
+               [specify prefix directory for installed libxml2 package.
+                Equivalent to --with-target-libxml2-include=PATH/include
+                plus --with-target-libxml2-lib=PATH/lib])])
+AC_ARG_WITH([target-libxml2-include],
+[AS_HELP_STRING([--with-target-libxml2-include=PATHLIST],
+               [specify directories for installed libxml2 include files])])
+AC_ARG_WITH([target-libxml2-lib],
+[AS_HELP_STRING([--with-target-libxml2-lib=PATHLIST],
+               [specify directories for installed libxml2 library])])
+
+if test "x$use_libgcobol" = xyes && test "x$libgcobol_cv_have_int128" = xyes; then
+  AC_MSG_CHECKING([for libxml2])
+  if test "x$with_target_libxml2$with_target_libxml2_include$with_target_libxml2_lib" = x; then
+    dnl no libxml2 options, assuming libxml2 in default locations
+    LIBXML2_CPPFLAGS="-I /usr/include/libxml2"
+    LIBXML2_LIBS="-lxml2"
+  else
+    dnl libxml2 options passed by configure flags
+    if test "x$with_target_libxml2_include" = x && test "x$with_target_libxml2_lib" != x; then
+      AC_MSG_ERROR([found --with-target-libxml2-lib but --with-target-libxml2-include missing])
+    elif test "x$with_target_libxml2_include" != x && test "x$with_target_libxml2_lib" = x; then
+      AC_MSG_ERROR([found --with-target-libxml2-include but --with-target-libxml2-lib missing])
+    else
+      AC_MSG_RESULT([using paths configured with --with-target-libxml2 options])
+    fi
+    mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+    libxml2_val=
+    if test "x$with_target_libxml2" != x; then
+      for i in `echo $with_target_libxml2 | tr ',' ' '`; do
+        case "$i" in
+          *=*) sd=${i%%=*}; d=${i#*=} ;;
+          *) sd=.; d=$i ;;
+        esac
+        if test "$mldir" = "$sd"; then
+          libxml2_val=$d
+        fi
+      done
+      if test "x$libxml2_val" = x; then
+        AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2])
+      fi
+      libxml2_inc_dir="$libxml2_val/include"
+      libxml2_lib_dir="$libxml2_val/lib"
+    fi
+    libxml2_val=
+    if test "x$with_target_libxml2_include" != x; then
+      for i in `echo $with_target_libxml2_include | tr ',' ' '`; do
+        case "$i" in
+          *=*) sd=${i%%=*}; d=${i#*=} ;;
+          *) sd=.; d=$i; fallback=$i ;;
+        esac
+        if test "$mldir" = "$sd"; then
+          libxml2_val=$d
+        fi
+      done
+      if test "x$libxml2_val" = x && test "x$libxml2_inc_dir" = x && test "x$fallback" != x; then
+        libxml2_inc_dir="$fallback"
+      elif test "x$libxml2_val" = x; then
+        AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-include])
+      else
+        libxml2_inc_dir="$libxml2_val"
+      fi
+    fi
+    libxml2_val=
+    if test "x$with_target_libxml2_lib" != x; then
+      for i in `echo $with_target_libxml2_lib | tr ',' ' '`; do
+        case "$i" in
+          *=*) sd=${i%%=*}; d=${i#*=} ;;
+          *) sd=.; d=$i ;;
+        esac
+        if test "$mldir" = "$sd"; then
+          libxml2_val=$d
+        fi
+      done
+      if test "x$libxml2_val" = x; then
+        AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-lib])
+      fi
+      libxml2_lib_dir="$libxml2_val"
+    fi
+    if test "x$libxml2_inc_dir" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-include])
+    fi
+    if test "x$libxml2_lib_dir" = x; then
+      AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-lib])
+    fi
+    LIBXML2_CPPFLAGS="-I$libxml2_inc_dir"
+    LIBXML2_LIBS="-L$libxml2_lib_dir -lxml2"
+    AC_MSG_RESULT([found])
+  fi
+else
+  LIBXML2_CPPFLAGS=
+  LIBXML2_LIBS=
+fi
+AC_SUBST(LIBXML2_CPPFLAGS)
+AC_SUBST(LIBXML2_LIBS)
 
 # Copied from gcc/configure.ac. 2025-06-05 R.J.Dubner
 # At least for glibc, clock_gettime is in librt.  But don't pull that