[systemd-devel] [PATCH] network: fix build failure, missing KMOD_XXX flags
Lennart Poettering
lennart at poettering.net
Thu May 15 09:52:06 PDT 2014
On Tue, 13.05.14 19:35, Cristian Rodríguez (crrodriguez at opensuse.org) wrote:
Quite frankly, I'd much rather see the kmod logic remvoed from netword
entirely... We shouldn't work around kernel brokeness...
Please try to follow the usual identation style of the code, in this
case, please always break the words into individual lines in the
makefile, like the rest of it...
Anyway, commited this now.
> - Add KMOD_CFLAGS and KMOD_LIBS where appropiate
> - networkd now requires kmod. make --disable-kmod --enable-networkd
> to raise an error.
> ---
> Makefile.am | 7 ++++++-
> configure.ac | 2 ++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index b8ff732..0d08975 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -2479,6 +2479,7 @@ 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 \
> @@ -2504,7 +2505,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 \
> @@ -4185,6 +4187,7 @@ systemd_networkd_LDADD = \
> 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 \
> @@ -4218,6 +4221,8 @@ 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 \
> diff --git a/configure.ac b/configure.ac
> index 972fc2f..4e78bf8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -875,6 +875,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"])
>
> # ------------------------------------------------------------------------------
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list