[PATCH] Don't require dbus for libudev-core.la

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Split libsystemd-label.la into libsystemd-label-no-dbus.la and
libsystemd-label.la (which depends on the first).  Link the first into
libudev-core, and keep linking the second in everywhere else.

Fixes compilation of standalone udevd on systems that don't have dbus
installed.

Signed-Off-By: Bryan Kadzban <bryan@xxxxxxxxxxxxxxxxxxxxx>

----
(Attached since my mailer is trying to split lines if I dump the git
diff directly into the message.  Patch is against current git.)

Compile-tested only, by rerunning autogen.sh, then configuring (faking
out the dbus pkg-config dependencies), then running make systemd-udevd.
diff --git a/Makefile.am b/Makefile.am
index b62b9be..91dd363 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -606,6 +606,25 @@ libsystemd_dbus_la_LIBADD = \
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
+	libsystemd-label-no-dbus.la
+
+libsystemd_label_no_dbus_la_SOURCES = \
+	src/shared/label.c \
+	src/shared/label.h \
+	src/shared/mkdir.c \
+	src/shared/mkdir.h \
+	src/shared/dev-setup.c \
+	src/shared/dev-setup.h
+
+libsystemd_label_no_dbus_la_CFLAGS = \
+	$(AM_CFLAGS) \
+	$(SELINUX_CFLAGS)
+
+libsystemd_label_no_dbus_la_LIBADD = \
+	$(SELINUX_LIBS)
+
+# ------------------------------------------------------------------------------
+noinst_LTLIBRARIES += \
 	libsystemd-label.la
 
 libsystemd_label_la_SOURCES = \
@@ -615,14 +634,8 @@ libsystemd_label_la_SOURCES = \
 	src/shared/path-lookup.h \
 	src/shared/cgroup-label.c \
 	src/shared/socket-label.c \
-	src/shared/label.c \
-	src/shared/label.h \
-	src/shared/mkdir.c \
-	src/shared/mkdir.h \
 	src/shared/ask-password-api.c \
-	src/shared/ask-password-api.h \
-	src/shared/dev-setup.c \
-	src/shared/dev-setup.h
+	src/shared/ask-password-api.h
 
 libsystemd_label_la_CFLAGS = \
 	$(AM_CFLAGS) \
@@ -630,6 +643,7 @@ libsystemd_label_la_CFLAGS = \
 	$(SELINUX_CFLAGS)
 
 libsystemd_label_la_LIBADD = \
+	libsystemd-no-dbus.la \
 	$(SELINUX_LIBS)
 
 # ------------------------------------------------------------------------------
@@ -1505,7 +1519,7 @@ libudev_core_la_CFLAGS = \
 
 libudev_core_la_LIBADD = \
 	libudev-private.la \
-	libsystemd-label.la \
+	libsystemd-label-no-dbus.la \
 	libsystemd-shared.la \
 	$(BLKID_LIBS) \
 	$(KMOD_LIBS)

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux