diff --git a/configure b/configure index 1b3fe7080..7f55569b0 100755 --- a/configure +++ b/configure @@ -1856,6 +1856,10 @@ Some influential environment variables: BLKID_CFLAGS C compiler flags for BLKID, overriding pkg-config BLKID_LIBS linker flags for BLKID, overriding pkg-config + SYSTEMD_CFLAGS + C compiler flags for SYSTEMD, overriding pkg-config + SYSTEMD_LIBS + linker flags for SYSTEMD, overriding pkg-config UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config UDEV_LIBS linker flags for UDEV, overriding pkg-config PYTHON the Python interpreter @@ -11643,10 +11647,8 @@ $as_echo "#define APP_MACHINEID_SUPPORT 1" >>confdefs.h fi if test -n "SYSTEMD_MIN_VERSION"; then : - SYSTEMD_CFLAGS - C compiler flags for SYSTEMD, overriding pkg-config - SYSTEMD_LIBS - linker flags for SYSTEMD, overriding pkg-config + + pkg_config_init pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 diff --git a/configure.ac b/configure.ac index 2cff45fdc..0ec8d6b7d 100644 --- a/configure.ac +++ b/configure.ac @@ -1145,9 +1145,10 @@ AS_IF([test "$APP_MACHINEID_SUPPORT" = yes], SYSTEMD_MIN_VERSION=234) dnl -- Look for libsystemd libraries -AS_IF([test -n "SYSTEMD_MIN_VERSION"], +AS_IF([test -n "SYSTEMD_MIN_VERSION"],[ + pkg_config_init PKG_CHECK_MODULES(SYSTEMD, systemd >= "$SYSTEMD_MIN_VERSION", [], $bailout) - SYSTEMD_LIBS="-lsystemd") + SYSTEMD_LIBS="-lsystemd"]) ################################################################################