From 539b1be3507abdf8ac235b06eeed5011b0b5cde2 Mon Sep 17 00:00:00 2001 From: Ondrej Kos Date: Mon, 18 Feb 2013 14:43:19 +0100 Subject: Provide libnl3 support https://fedorahosted.org/sssd/ticket/812 Update the monitor code to be using the new libnl3 API. Changed configure option --with-libnl By default, it tries to build with libnl3, if not found, then with libnl1, if this isn't found either, build proceeds without libnl, just with warning. Specifing --with-libnl= checks for the specific given version, if not found, configure ends with error. --- src/conf_macros.m4 | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/conf_macros.m4') diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 65f4d6ce..4ea4e936 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -371,15 +371,40 @@ AC_DEFUN([WITH_SEMANAGE], AC_DEFUN([WITH_LIBNL], [ AC_ARG_WITH([libnl], [AC_HELP_STRING([--with-libnl], - [Whether to build with libnetlink support [AUTO]] + [Whether to build with libnetlink support (libnl3, libnl1, no) [auto]] ) ], [], with_libnl=yes ) + if test x"$with_libnl" = xyes; then - BUILD_LIBNL=1 - AC_SUBST(BUILD_LIBNL) + + AM_CHECK_LIBNL3 + + if test x"$HAVE_LIBNL" != x1; then + AM_CHECK_LIBNL1 + fi + + if test x"$HAVE_LIBNL" != x1; then + AC_MSG_WARN([Building without netlink]) + fi + + elif test x"$with_libnl" = xlibnl3; then + + AM_CHECK_LIBNL3 + + if test x"$HAVE_LIBNL" != x1; then + AC_MSG_ERROR([Libnl3 required, but not available]) + fi + + elif test x"$with_libnl" = xlibnl1; then + + AM_CHECK_LIBNL1 + + if test x"$HAVE_LIBNL" != x1; then + AC_MSG_ERROR([Libnl required, but not available]) + fi fi ]) -- cgit