Re: NetBSD vs libxml2

From: Nico Williams <nico(at)cryptonector(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: NetBSD vs libxml2
Date: 2018-08-11 20:57:19
Message-ID: 20180811205718.GH5695@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
0001-Keep-rpath-et.-al.-from-xml2-config-libs.patch text/x-diff 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2018-08-11 21:08:47 Re: Facility for detecting insecure object naming
Previous Message Nico Williams 2018-08-11 20:35:14 Re: Facility for detecting insecure object naming