On Sat, Aug 11, 2018 at 01:12:09PM -0500, Nico Williams wrote: > I'm willing to write a patch after lunch. In ./configure.in this: > > for pgac_option in `$XML2_CONFIG --libs`; do > case $pgac_option in > -L*) LDFLAGS="$LDFLAGS $pgac_option";; > esac > done > > should change to: > > for pgac_option in `$XML2_CONFIG --libs`; do > case $pgac_option in > -l*) LDLIBS="$LDLIBS $pgac_option";; > *) LDFLAGS="$LDFLAGS $pgac_option";; > esac > done > > More changes are needed to stop hard-coding -lxml2.
Actually, no, no more changes are needed. The -lxml2 comes from: 1193 if test "$with_libxml" = yes ; then 1194 AC_CHECK_LIB(xml2, xmlSaveToBuffer, [], [AC_MSG_ERROR([library 'xml2' (version >= 2.6.23) is required for XML support])]) 1195 fi in configure.in, and I think contrib/xml2/Makefile needs to hardcode it. So the above quoted change is all that is needed, plus re-run autoconf. See attached. (I'm not including unrelated changes made to configure by autoconf.) Nico --
>From 995ee1dbbc0ee9af7bbb24728f09ec022696bba0 Mon Sep 17 00:00:00 2001 From: Nicolas Williams <n...@cryptonector.com> Date: Sat, 11 Aug 2018 15:52:19 -0500 Subject: [PATCH] Keep rpath et. al. from xml2-config --libs Instead of looking for -L* words to put in to LDFLAGS and everthing else into LIBS, look for -l* words to put into LIBS and everything else into LDFLAGS. --- configure | 3 ++- configure.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 2665213..210f739 100755 --- a/configure +++ b/configure @@ -8009,7 +8009,8 @@ fi done for pgac_option in `$XML2_CONFIG --libs`; do case $pgac_option in - -L*) LDFLAGS="$LDFLAGS $pgac_option";; + -l*) LIBS="$LIBS $pgac_option";; + *) LDFLAGS="$LDFLAGS $pgac_option";; esac done fi diff --git a/configure.in b/configure.in index 397f6bc..b3f5c6c 100644 --- a/configure.in +++ b/configure.in @@ -902,7 +902,8 @@ if test "$with_libxml" = yes ; then done for pgac_option in `$XML2_CONFIG --libs`; do case $pgac_option in - -L*) LDFLAGS="$LDFLAGS $pgac_option";; + -l*) LIBS="$LIBS $pgac_option";; + *) LDFLAGS="$LDFLAGS $pgac_option";; esac done fi -- 2.7.4