~ubuntu-branches/ubuntu/saucy/sssd/saucy

« back to all changes in this revision

Viewing changes to src/external/libnl.m4

  • Committer: Stéphane Graber
  • Date: 2011-06-15 16:23:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: stgraber@ubuntu.com-20110615162314-rbhoppnpaxfqo5q7
Merge 1.5.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl A macro to check the availability and version of libnetlink
 
2
 
 
3
AC_DEFUN([AM_CHECK_LIBNL],
 
4
[
 
5
    PKG_CHECK_MODULES(libnl, libnl-1 >= 1.1,[
 
6
        HAVE_LIBNL=1
 
7
        AC_SUBST(HAVE_LIBNL)
 
8
        AC_DEFINE_UNQUOTED(HAVE_LIBNL, 1, [Build with libnetlink support])
 
9
 
 
10
            AC_CHECK_HEADERS(netlink.h)
 
11
            AC_CHECK_LIB(nl, nl_connect, [ LIBNL_LIBS="-lnl" ], [AC_MSG_ERROR([libnl is required])])
 
12
 
 
13
            dnl Check if this particular version of libnl supports particular functions
 
14
            AC_CHECK_LIB([nl],
 
15
                         [nl_socket_add_membership],
 
16
                         [AC_DEFINE([HAVE_NL_SOCKET_ADD_MEMBERSHIP], 1, [Does libnl have nl_socket_add_membership?])
 
17
                         ],
 
18
            )
 
19
 
 
20
            AC_CHECK_LIB([nl],
 
21
                         [nl_socket_modify_cb],
 
22
                         [AC_DEFINE([HAVE_NL_SOCKET_MODIFY_CB], 1, [Does libnl have nl_socket_modify_cb?])
 
23
                         ],
 
24
            )
 
25
 
 
26
            AC_CHECK_LIB([nl],
 
27
                         [nl_set_passcred],
 
28
                         [AC_DEFINE([HAVE_NL_SET_PASSCRED], 1, [Does libnl have nl_set_passcred?])
 
29
                         ],
 
30
            )
 
31
    ],[AC_MSG_WARN([Netlink support unavailable or too old])])
 
32
 
 
33
    AC_SUBST(LIBNL_CFLAGS)
 
34
    AC_SUBST(LIBNL_LIBS)
 
35
])