[PATCH] configure: Check for libnl-route-3 package



NM not only depends on libnl but also on libnl-route. Therefore check for the
corresponding pkg-config file and use its CFLAGS and LIBS. Otherwise fall
back to using libnl-2 or libnl-1.

Signed-off-by: Thomas Graf <tgraf redhat com>
---
 configure.ac |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8b6782a..932164b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,10 +315,11 @@ AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
 
 have_libnl="no"
 PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
-if (test "${have_libnl3}" = "yes"); then
+PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
+if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then
 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
-	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
-	LIBNL_LIBS="$LIBNL3_LIBS"
+	LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS"
+	LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS"
 	libnl_version="3"
 	have_libnl="yes"
 else
-- 
1.7.6



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]