]> xenbits.xensource.com Git - libvirt.git/commit
m4: readline: Use pkg-config where possible
authorAndrea Bolognani <abologna@redhat.com>
Tue, 2 Apr 2019 10:32:11 +0000 (12:32 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 12 Apr 2019 14:22:29 +0000 (16:22 +0200)
commitc98de2173e95a1066ed37b16f3932bf11f880848
tree6f10216944212321bab137366cdfc6f6545e1e14
parentc6921fd0be311bb76e21d199f1668dbb58ca6080
m4: readline: Use pkg-config where possible

With the 7.0 release, readline has finally started shipping
pkg-config support in the form of a readline.pc file.

Unfortunately, most downstreams have yet to catch up with this
change: among Linux distributions in particular, Fedora Rawhide
seems to be the only one installing it at the moment.

Non-Linux operating systems have been faring much better in
this regard: both FreeBSD (through ports) and macOS (through
homebrew) include pkg-config support in their readline package.

This is great news for us, since those are the platforms where
pkg-config is more useful on account of them installing headers
and libraries outside of the respective default search paths.

Our implementation checks whether readline is registered as a
pkg-config package, and if so obtains CFLAGS and LIBS using the
tool; if not, we just keep using the existing logic.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
m4/virt-readline.m4