link against libsystemd, not libsystemd-daemon
authorHannes Reinecke <hare@suse.de>
Thu, 13 Mar 2014 11:50:11 +0000 (12:50 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 13 Mar 2014 21:28:13 +0000 (22:28 +0100)
With systemd version 210 libsystemd-daemon has been merged
into libsystemd.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/Makefile
multipathd/Makefile

index 6364364..4b4f707 100644 (file)
@@ -9,7 +9,11 @@ DEVLIB = libmultipath.so
 LIBS = $(DEVLIB).$(SONAME)
 LIBDEPS = -lpthread -ldl -ldevmapper -ludev
 ifdef SYSTEMD
-       LIBDEPS += -lsystemd-daemon
+       ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1)
+               LIBDEPS += -lsystemd
+       else
+               LIBDEPS += -lsystemd-daemon
+       endif
 endif
 
 OBJS = memory.o parser.o vector.o devmapper.o callout.o \
index 781122a..901d1e4 100644 (file)
@@ -11,7 +11,11 @@ ifdef SYSTEMD
 endif
 LDFLAGS += -lpthread -ldevmapper -lreadline
 ifdef SYSTEMD
-       LDFLAGS += -lsystemd-daemon
+       ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1)
+               LDFLAGS += -lsystemd
+       else
+               LDFLAGS += -lsystemd-daemon
+       endif
 endif
 LDFLAGS += -ludev -ldl \
        -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist