diff options
author | Ondrej Kos <okos@redhat.com> | 2013-02-18 14:43:19 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-03-27 20:15:52 +0100 |
commit | 539b1be3507abdf8ac235b06eeed5011b0b5cde2 (patch) | |
tree | de8f928b6b46a95af9a1a11d6f0f7ba6d72fcc9f /src/conf_macros.m4 | |
parent | 78eba1cdd8e337d07b536afd9d6043482c88208e (diff) | |
download | sssd-539b1be3507abdf8ac235b06eeed5011b0b5cde2.tar.gz sssd-539b1be3507abdf8ac235b06eeed5011b0b5cde2.tar.xz sssd-539b1be3507abdf8ac235b06eeed5011b0b5cde2.zip |
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=<libnl3|libnl1|no> checks for the specific given
version, if not found, configure ends with error.
Diffstat (limited to 'src/conf_macros.m4')
-rw-r--r-- | src/conf_macros.m4 | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 65f4d6ce9..4ea4e9367 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 ]) |