Skip to content
  • Simon McVittie's avatar
    build: Prefer to find libwmf using pkg-config · 00024db3
    Simon McVittie authored and Simon McVittie's avatar Simon McVittie committed
    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).
    
    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: default avatarSimon McVittie <smcv@debian.org>
    00024db3