diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2014-05-13 19:35:20 -0400 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-15 18:51:54 +0200 |
commit | 679be2a74241a70028438217bace423a1a45faa6 (patch) | |
tree | 57d09e51d43f0340622d94fbd373b75e189e2ce9 | |
parent | 301f9684e6465df5d0590f6c571fe3229ded966d (diff) |
network: fix build failure, missing KMOD_XXX flags
- Add KMOD_CFLAGS and KMOD_LIBS where appropiate
- networkd now requires kmod. make --disable-kmod --enable-networkd
to raise an error.
-rw-r--r-- | Makefile.am | 21 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 19 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 6379262ca3..ddfec1bdef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 336938ee7f..16b689e253 100644 --- a/configure.ac +++ b/configure.ac @@ -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"]) # ------------------------------------------------------------------------------ |