Skip to content

[2.10] build: Prefer to find libwmf using pkg-config

Simon McVittie requested to merge cherry-pick-00024db3 into gimp-2-10

!319 (merged), but for 2.10.x.


Traditional -config scripts are awkward for cross-compilation, multilib systems (lib/lib64), and multiarch systems like Debian; only one copy of the -config script can be in the PATH. As a result, some OS distributions are starting to deprecate or even remove them.

pkg-config is designed to be a replacement for traditional -config scripts, and is cross-compilation-friendly: the PKG_CHECK_MODULES macro looks for an architecture-specific executable like x86_64-linux-gnu-pkg-config, which can look in an architecture-specific search path for library metadata, before falling back to a generic pkg-config executable.

As a bonus, pkg-config also compares version numbers correctly (see #2454 (closed)).

libwmf having pkg-config metadata seems to be a relatively new thing, so I've kept the -config script code path too, using it if pkg-config does not find libwmf.

Bug-Debian: https://bugs.debian.org/956183 Signed-off-by: Simon McVittie smcv@debian.org

(cherry picked from commit 00024db3)

Merge request reports