Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library - Mailing list pgsql-hackers

From Hugh McMaster
Subject Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library
Date
Msg-id CAN9BcdtMKR3gfsWv1YNGOu-bNJoySXZk5uNXFaz7XeonrABfsw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
On Tue, 10 Mar 2020 at 22:41, Daniel Gustafsson wrote:
>
> > On 10 Mar 2020, at 11:53, Hugh McMaster <hugh.mcmaster@outlook.com> wrote:
> > This patch uses pkg-config's PKG_CHECK_MODULES macro to detect libxml2
> > or, if pkg-config is not available, falls back to xml2-confg.
>
> This was previously discussed in 20200120204715.GA73984@msg.df7cb.de which
> ended without a real conclusion on what could/should be done (except that
> nothing *had* to be done).
>
> What is the situation on non-Debian/Ubuntu systems (BSD's, macOS etc etc)?  Is
> it worth adding pkg-config support if we still need a fallback to xml2-config?

To the best of my knowledge, FreeBSD, macOS, OpenSUSE, Solaris etc.
all support detection of libxml2 via pkg-config.

One way or another, xml2-config is going away, whether by decision of
a package maintainer or upstream.

freetype-config was deprecated upstream a few years ago. Upstream ICU
will also disable the installation of icu-config by default from April
this year. Some systems, such as Debian, have not shipped icu-config
for a year or so.

The PHP project last year switched to using pkg-config by default for
all libraries supplying a .pc file. PHP's build scripts do not fall
back to legacy scripts.

Another reason for switching is that xml2-config incorrectly outputs
static libraries when called with `--libs`. You have to call `--libs
--dynamic` to output -lxml2 only. Debian patches the script to avoid
this unusual behaviour.



pgsql-hackers by date:

Previous
From: Prabhat Sahu
Date:
Subject: SERIAL datatype column skipping values.
Next
From: Peter Eisentraut
Date:
Subject: Re: HAVE_WORKING_LINK still needed?