Skip to content

Commit

Permalink
Improved the checking for libnl3 in configure.ac.
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyu committed Jun 28, 2014
1 parent 00983a2 commit 451c3b6
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -813,10 +813,13 @@ Network isolator is only supported on Linux!
])])

# Check for libnl (both headers and libraries).
AC_CHECK_LIB([nl-3], [nl_connect], [],
AC_CHECK_LIB([nl-3], [nl_has_capability], [],
[AC_MSG_ERROR([cannot find libnl-3
-------------------------------------------------------------------
We need libnl-3 for building network isolator!
Please install libnl3 (version 3.2.24 or higher):
http://www.infradead.org/~tgr/libnl/
-------------------------------------------------------------------
])])

Expand All @@ -825,22 +828,31 @@ We need libnl-3 for building network isolator!
[AC_MSG_ERROR([cannot find libnl-3 headers
-------------------------------------------------------------------
We need libnl-3 headers for building network isolator!
Please install libnl3 (version 3.2.24 or higher):
http://www.infradead.org/~tgr/libnl/
-------------------------------------------------------------------
])])

# Check for libnl-route (both headers and libraries).
AC_CHECK_LIB([nl-route-3], [rtnl_cls_alloc], [],
AC_CHECK_LIB([nl-route-3], [rtnl_link_veth_add], [],
[AC_MSG_ERROR([cannot find libnl-route-3
-------------------------------------------------------------------
We need libnl-route-3 for building network isolator!
Please install libnl3 (version 3.2.24 or higher):
http://www.infradead.org/~tgr/libnl/
-------------------------------------------------------------------
])])

AC_CHECK_HEADERS([netlink/route/rtnl.h libnl3/netlink/route/rtnl.h],
AC_CHECK_HEADERS([netlink/route/link/veth.h libnl3/netlink/route/link/veth.h],
[break]
[AC_MSG_ERROR([cannot find libnl-route-3 headers
-------------------------------------------------------------------
We need libnl-route-3 headers for building network isolator!
Please install libnl3 (version 3.2.24 or higher):
http://www.infradead.org/~tgr/libnl/
-------------------------------------------------------------------
])])

Expand Down

0 comments on commit 451c3b6

Please sign in to comment.