1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

configure.ac: use LIBSYSTEMD

Convert naming SYSTEMD_CFLAGS/LIB -> LIBSYSTEMD_CFLAGS/LIBS
to better fit library check for libsystemd.

Build lvmlockd with SD_NOTIFY when we have defined LIBSYSTEMD_LIBS.
This commit is contained in:
Zdenek Kabelac 2023-02-16 23:34:25 +01:00
parent 3ef26494f2
commit d106ac04ab
4 changed files with 8 additions and 10 deletions

View File

@ -1090,7 +1090,7 @@ AS_IF([test "$APP_MACHINEID_SUPPORT" = "yes"],
dnl -- Look for libsystemd libraries if needed dnl -- Look for libsystemd libraries if needed
AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes" || test "$SYSTEMD_JOURNAL_SUPPORT" = "yes" || test "$APP_MACHINEID_SUPPORT" = "yes"], [ 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)
]) ])
################################################################################ ################################################################################

View File

@ -15,8 +15,6 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
USE_SD_NOTIFY=yes
SOURCES = lvmlockd-core.c SOURCES = lvmlockd-core.c
ifeq ("@BUILD_LOCKDSANLOCK@", "yes") ifeq ("@BUILD_LOCKDSANLOCK@", "yes")
@ -51,9 +49,9 @@ INCLUDES += -I$(top_srcdir)/libdaemon/server
LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS) LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS)
ifeq ($(USE_SD_NOTIFY),yes) ifneq (,$(firstword $(LIBSYSTEMD_LIBS)))
CFLAGS += $(SYSTEMD_CFLAGS) -DUSE_SD_NOTIFY CFLAGS += $(LIBSYSTEMD_CFLAGS) -DUSE_SD_NOTIFY
LIBS += $(SYSTEMD_LIBS) LIBS += $(LIBSYSTEMD_LIBS)
endif endif
lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/server/libdaemonserver.a $(INTERNAL_LIBS) lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/server/libdaemonserver.a $(INTERNAL_LIBS)

View File

@ -75,7 +75,7 @@ UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@ UDEV_LIBS = @UDEV_LIBS@
BLKID_CFLAGS = @BLKID_CFLAGS@ BLKID_CFLAGS = @BLKID_CFLAGS@
BLKID_LIBS = @BLKID_LIBS@ BLKID_LIBS = @BLKID_LIBS@
SYSTEMD_LIBS = @SYSTEMD_LIBS@ LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
# Setup directory variables # Setup directory variables

View File

@ -57,7 +57,7 @@ PYTHON3 = @PYTHON3@
PYCOMPILE = $(top_srcdir)/autoconf/py-compile PYCOMPILE = $(top_srcdir)/autoconf/py-compile
LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS) 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 # Extra libraries always linked with static binaries
STATIC_LIBS = $(PTHREAD_LIBS) STATIC_LIBS = $(PTHREAD_LIBS)
DEFS += @DEFS@ DEFS += @DEFS@
@ -82,12 +82,12 @@ CPG_CFLAGS = @CPG_CFLAGS@
CPG_LIBS = @CPG_LIBS@ CPG_LIBS = @CPG_LIBS@
EDITLINE_CFLAGS = @EDITLINE_CFLAGS@ EDITLINE_CFLAGS = @EDITLINE_CFLAGS@
EDITLINE_LIBS = @EDITLINE_LIBS@ EDITLINE_LIBS = @EDITLINE_LIBS@
LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
PTHREAD_LIBS = @PTHREAD_LIBS@ PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_CFLAGS = @READLINE_CFLAGS@ READLINE_CFLAGS = @READLINE_CFLAGS@
READLINE_LIBS = @READLINE_LIBS@ READLINE_LIBS = @READLINE_LIBS@
SELINUX_LIBS = @SELINUX_LIBS@ SELINUX_LIBS = @SELINUX_LIBS@
SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
SYSTEMD_LIBS = @SYSTEMD_LIBS@
UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@ UDEV_LIBS = @UDEV_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@