[PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

Hugh McMaster <hugh.mcmaster@outlook.com>

From: Hugh McMaster <hugh.mcmaster@outlook.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-03-10T10:53:14Z
Lists: pgsql-hackers

Attachments

Dear developers,

Debian (and Ubuntu) are beginning to remove foo-config legacy scripts.
Already, xml2-config has been flagged for removal, with packages being
asked to switch to pkg-config.

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.

The patch was created against the master branch of git.

I have built PostgreSQL and run `make check`. All 196 tests passed.

Hugh

Commits

  1. Use pkg-config, if available, to locate libxml2 during configure.