chiark / gitweb /
network: fix build failure, missing KMOD_XXX flags
authorCristian Rodríguez <crrodriguez@opensuse.org>
Tue, 13 May 2014 23:35:20 +0000 (19:35 -0400)
committerLennart Poettering <lennart@poettering.net>
Thu, 15 May 2014 16:51:54 +0000 (18:51 +0200)
- Add KMOD_CFLAGS and KMOD_LIBS where appropiate
- networkd now requires kmod. make --disable-kmod --enable-networkd
to raise an error.

Makefile.am
configure.ac

index 6379262..ddfec1b 100644 (file)
@@ -2481,6 +2481,10 @@ busctl_CFLAGS = \
 noinst_LTLIBRARIES += \
        libsystemd-network.la
 
+libsystemd_network_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(KMOD_CFLAGS)
+
 libsystemd_network_la_SOURCES = \
        src/systemd/sd-network.h \
        src/systemd/sd-dhcp-client.h \
@@ -2506,7 +2510,8 @@ libsystemd_network_la_SOURCES = \
 libsystemd_network_la_LIBADD = \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       $(KMOD_LIBS)
 
 test_dhcp_option_SOURCES = \
        src/libsystemd-network/dhcp-protocol.h \
@@ -4196,11 +4201,15 @@ systemd_networkd_SOURCES = \
 
 systemd_networkd_LDADD = \
        libsystemd-networkd-core.la \
-       -lkmod
+       $(KMOD_LIBS)
 
 noinst_LTLIBRARIES += \
        libsystemd-networkd-core.la
 
+libsystemd_networkd_core_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(KMOD_CFLAGS)
+
 libsystemd_networkd_core_la_SOURCES = \
        src/libsystemd-network/network-internal.h \
        src/network/networkd.h \
@@ -4234,6 +4243,10 @@ GENERAL_ALIASES += \
 rootlibexec_PROGRAMS += \
        systemd-networkd-wait-online
 
+systemd_networkd_wait_online_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(KMOD_CFLAGS)
+
 systemd_networkd_wait_online_SOURCES = \
        src/libsystemd-network/network-internal.h \
        src/network/networkd-wait-online.c \
@@ -4250,8 +4263,8 @@ test_network_SOURCES = \
        src/network/test-network.c
 
 test_network_LDADD = \
-       libsystemd-networkd-core.la \
-       -lkmod
+       libsystemd-networkd-core.la
+       $(KMOD_LIBS)
 
 tests += \
        test-network
index 336938e..16b689e 100644 (file)
@@ -880,6 +880,8 @@ if test "x$enable_networkd" != "xno"; then
         AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
         have_networkd=yes
 fi
+AS_IF([test "x$have_networkd" = "xyes" -a "x$have_kmod" != "xyes"],
+      [AC_MSG_ERROR([networkd requires kmod])])
 AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
 
 # ------------------------------------------------------------------------------