On Wed, 11 Mar 2020 at 07:49, Daniel Gustafsson wrote:
> > On 10 Mar 2020, at 18:38, Peter Eisentraut wrote:
> > Btw., here is an older thread for the same issue 
> > <https://www.postgresql.org/message-id/flat/1358164265.29612.7.camel%40vanquo.pezone.net>.
> >   Might be worth reflecting on the issues discussed there.
>
> Thanks, didn't realize that the subject had been up for discussion earlier as
> well.

Interesting thread. The issue of precedence (e.g. pkg-config over
xml2-config) is still relevant, although arguably less so today, due
to the far greater availability of pkg-config. Some packages choose to
fall back to xml2-config, say, if they need to support old or
soon-to-be EOL systems lacking pkg-config. These situations are
increasingly rare.

The thread is correct on multi-arch header and library directories.
That said, pkg-config can handle this easily.

> For me, the duplication aspect is the most troubling, since we'd still need 
> the
> xml2-config fallback and thus won't be able to simplify the code.

configure.in shows that ICU only uses the PKG_CHECK_MODULES macro.
libxml2, libxslt and other dependencies could also switch.

Using AC_CHECK_LIB to add libraries (such as -lxml2) to $LIBS isn't
probably the most ideal method (I'd recommend adding pkg-config's
native X_CFLAGS and X_LIBS variables as necessary to $LIBS, $CPPFLAGS
etc.), but that's a topic for another thread.


Reply via email to