| 1 |
From d6fd1cf98a617aaf78ee98ec0a3ac5c468ac666f Mon Sep 17 00:00:00 2001
|
| 2 |
From: Alexandre Rostovtsev <tetromino@gentoo.org>
|
| 3 |
Date: Sun, 13 Nov 2011 17:51:47 -0500
|
| 4 |
Subject: [PATCH] Allow building against libnl:1.1 only
|
| 5 |
|
| 6 |
Allow building against libnl:1.1 only for wimax. Otherwise, networkmanager
|
| 7 |
will link to libnl-3.so and to libiWmxSdk (from wimax-1.5.2) which links
|
| 8 |
to libnl.so, and then explode spectacularly at runtime due to symbol
|
| 9 |
collisions.
|
| 10 |
---
|
| 11 |
configure.ac | 47 +++++++++++++++++++----------------------------
|
| 12 |
1 files changed, 19 insertions(+), 28 deletions(-)
|
| 13 |
|
| 14 |
diff --git a/configure.ac b/configure.ac
|
| 15 |
index ed66b3d..c88cbe4 100644
|
| 16 |
--- a/configure.ac
|
| 17 |
+++ b/configure.ac
|
| 18 |
@@ -379,32 +379,27 @@ AM_CONDITIONAL(SESSION_TRACKING_SYSTEMD, test "x$with_session_tracking" = "xsyst
|
| 19 |
|
| 20 |
|
| 21 |
have_libnl="no"
|
| 22 |
-PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
|
| 23 |
-PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
|
| 24 |
-PKG_CHECK_MODULES(LIBNL_GENL3, libnl-genl-3.0, [have_libnl_genl3=yes], [have_libnl_genl3=no])
|
| 25 |
-if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes" -a "${have_libnl_genl3}" = "yes"); then
|
| 26 |
- AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
|
| 27 |
- LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS $LIBNL_GENL3_CFLAGS"
|
| 28 |
- LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS $LIBNL_GENL3_LIBS"
|
| 29 |
- libnl_version="3"
|
| 30 |
- have_libnl="yes"
|
| 31 |
+AC_ARG_WITH(libnl-1, AS_HELP_STRING([--with-libnl-1], [use legacy libnl-1 instead of libnl-3]), ,[with_libnl_1=no])
|
| 32 |
+if (test "${with_libnl_1}" = "yes"); then
|
| 33 |
+ PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
|
| 34 |
+ if (test "${have_libnl1}" = "yes"); then
|
| 35 |
+ AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
|
| 36 |
+ LIBNL_CFLAGS="$LIBNL1_CFLAGS"
|
| 37 |
+ LIBNL_LIBS="$LIBNL1_LIBS"
|
| 38 |
+ libnl_version="1"
|
| 39 |
+ have_libnl="yes"
|
| 40 |
+ NM_LIBNL_CHECK
|
| 41 |
+ fi
|
| 42 |
else
|
| 43 |
- PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
|
| 44 |
- if (test "${have_libnl2}" = "yes"); then
|
| 45 |
- AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
|
| 46 |
- LIBNL_CFLAGS="$LIBNL2_CFLAGS"
|
| 47 |
- LIBNL_LIBS="$LIBNL2_LIBS"
|
| 48 |
- libnl_version="2"
|
| 49 |
+ PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
|
| 50 |
+ PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
|
| 51 |
+ PKG_CHECK_MODULES(LIBNL_GENL3, libnl-genl-3.0, [have_libnl_genl3=yes], [have_libnl_genl3=no])
|
| 52 |
+ if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes" -a "${have_libnl_genl3}" = "yes"); then
|
| 53 |
+ AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
|
| 54 |
+ LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS $LIBNL_GENL3_CFLAGS"
|
| 55 |
+ LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS $LIBNL_GENL3_LIBS"
|
| 56 |
+ libnl_version="3"
|
| 57 |
have_libnl="yes"
|
| 58 |
- else
|
| 59 |
- PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
|
| 60 |
- if (test "${have_libnl1}" = "yes"); then
|
| 61 |
- AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
|
| 62 |
- LIBNL_CFLAGS="$LIBNL1_CFLAGS"
|
| 63 |
- LIBNL_LIBS="$LIBNL1_LIBS"
|
| 64 |
- libnl_version="1"
|
| 65 |
- have_libnl="yes"
|
| 66 |
- fi
|
| 67 |
fi
|
| 68 |
fi
|
| 69 |
|
| 70 |
@@ -414,10 +409,6 @@ fi
|
| 71 |
AC_SUBST(LIBNL_CFLAGS)
|
| 72 |
AC_SUBST(LIBNL_LIBS)
|
| 73 |
|
| 74 |
-if (test "${libnl_version}" = "1"); then
|
| 75 |
- NM_LIBNL_CHECK
|
| 76 |
-fi
|
| 77 |
-
|
| 78 |
PKG_CHECK_MODULES(UUID, uuid)
|
| 79 |
AC_SUBST(UUID_CFLAGS)
|
| 80 |
AC_SUBST(UUID_LIBS)
|
| 81 |
--
|
| 82 |
1.7.8.5
|
| 83 |
|