Re: NetBSD vs libxml2 - Mailing list pgsql-hackers

From Nico Williams
Subject Re: NetBSD vs libxml2
Date
Msg-id 20180811205718.GH5695@localhost
Whole thread Raw
In response to Re: NetBSD vs libxml2  (Nico Williams <nico@cryptonector.com>)
List pgsql-hackers
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
--

Attachment

pgsql-hackers by date:

Previous
From: Nico Williams
Date:
Subject: Re: Facility for detecting insecure object naming
Next
From: Noah Misch
Date:
Subject: Re: Facility for detecting insecure object naming