diff --git a/configure.ac b/configure.ac index e8dc7a92c..17d90bc85 100644 --- a/configure.ac +++ b/configure.ac @@ -1090,7 +1090,7 @@ AS_IF([test "$APP_MACHINEID_SUPPORT" = "yes"], dnl -- Look for libsystemd libraries if needed AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes" || test "$SYSTEMD_JOURNAL_SUPPORT" = "yes" || test "$APP_MACHINEID_SUPPORT" = "yes"], [ - PKG_CHECK_MODULES(SYSTEMD, [systemd], [SYSTEMD_LIBS="-lsystemd"], $bailout) + PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd], [], $bailout) ]) ################################################################################ diff --git a/daemons/lvmlockd/Makefile.in b/daemons/lvmlockd/Makefile.in index e5ba82517..dd35d5411 100644 --- a/daemons/lvmlockd/Makefile.in +++ b/daemons/lvmlockd/Makefile.in @@ -15,8 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -USE_SD_NOTIFY=yes - SOURCES = lvmlockd-core.c ifeq ("@BUILD_LOCKDSANLOCK@", "yes") @@ -51,9 +49,9 @@ INCLUDES += -I$(top_srcdir)/libdaemon/server LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS) -ifeq ($(USE_SD_NOTIFY),yes) - CFLAGS += $(SYSTEMD_CFLAGS) -DUSE_SD_NOTIFY - LIBS += $(SYSTEMD_LIBS) +ifneq (,$(firstword $(LIBSYSTEMD_LIBS))) + CFLAGS += $(LIBSYSTEMD_CFLAGS) -DUSE_SD_NOTIFY + LIBS += $(LIBSYSTEMD_LIBS) endif lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/server/libdaemonserver.a $(INTERNAL_LIBS) diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in index fb8973b6b..a731687c2 100644 --- a/libdm/make.tmpl.in +++ b/libdm/make.tmpl.in @@ -75,7 +75,7 @@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ BLKID_CFLAGS = @BLKID_CFLAGS@ BLKID_LIBS = @BLKID_LIBS@ -SYSTEMD_LIBS = @SYSTEMD_LIBS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ # Setup directory variables diff --git a/make.tmpl.in b/make.tmpl.in index 9f4ecc33f..a1fae368d 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -57,7 +57,7 @@ PYTHON3 = @PYTHON3@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS) -LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(SYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS) +LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(LIBSYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS) # Extra libraries always linked with static binaries STATIC_LIBS = $(PTHREAD_LIBS) DEFS += @DEFS@ @@ -82,12 +82,12 @@ CPG_CFLAGS = @CPG_CFLAGS@ CPG_LIBS = @CPG_LIBS@ EDITLINE_CFLAGS = @EDITLINE_CFLAGS@ EDITLINE_LIBS = @EDITLINE_LIBS@ +LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ PTHREAD_LIBS = @PTHREAD_LIBS@ READLINE_CFLAGS = @READLINE_CFLAGS@ READLINE_LIBS = @READLINE_LIBS@ SELINUX_LIBS = @SELINUX_LIBS@ -SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ -SYSTEMD_LIBS = @SYSTEMD_LIBS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@