multipath-tools: Build: properly parse systemd's version
authorDominique Leuenberger <dimstar@opensuse.org>
Thu, 11 Apr 2019 10:27:12 +0000 (12:27 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 18 Apr 2019 11:05:38 +0000 (13:05 +0200)
commitc63462f10ca9e73c5682d4ace777fb4c82095e40
tree4b7ffe46fa90b0f069bc2f88d8e0f1f923c3b599
parent2cc646f8b193d3796666adf6ffb9b04800cb7b01
multipath-tools: Build: properly parse systemd's version

Since systemd 241, systemctl --version no longer 'just' prints out the
version, but gives more information like git commit ref and whatnot. In
it's shortest form, it gives something like "systemd 241 (241)", which when
passed as parameter "-DUSE_SYSTEMD=241 (241)" results in shell errors.

Try to retrieve the version from pkg-config instead, and if that fails,
discard anything after the first number in "systemctl --version" output.

Acked-by: Benjamin Marzinski <bmarzins@redhat.com>
Acked-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Makefile.inc