about summary refs log tree commit diff
path: root/m4
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-02-09 03:22:03 +0100
committerMichael Biebl <biebl@debian.org>2013-02-09 03:22:03 +0100
commit78efcd2dfec5b6c56c50b1f8e44ed7c61c14553d (patch)
treec21aecab13151f626c3b2230ca21cda818c99484 /m4
parent681370ed77af598691a15eba55b17beb2edc9459 (diff)
parente17c5736fc3722ce51cb33f3edb203960125a4c1 (diff)
Merge tag 'upstream/0.9.7.997' into experimental
Upstream version 0.9.7.997
Diffstat (limited to 'm4')
-rw-r--r--m4/libnl-check.m462
1 files changed, 0 insertions, 62 deletions
diff --git a/m4/libnl-check.m4 b/m4/libnl-check.m4
deleted file mode 100644
index 8eef576f..00000000
--- a/m4/libnl-check.m4
+++ /dev/null
@@ -1,62 +0,0 @@
-AC_DEFUN([NM_LIBNL_CHECK], [
-    AC_MSG_CHECKING([for libnl address caching bug])
-    save_CFLAGS="$CFLAGS"
-    save_LDFLAGS="$LDFLAGS"
-    CFLAGS="$CFLAGS $LIBNL_CFLAGS"
-    LDFLAGS="$LDFLAGS $LIBNL_LIBS"
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <netlink/route/addr.h>
-#include <netlink/object-api.h>
-]],
-[[
-	struct nl_handle *nlh;
-	struct nl_cache *cache;
-	struct nl_object *obj;
-
-	nlh = nl_handle_alloc ();
-	if (nl_connect (nlh, NETLINK_ROUTE) < 0) {
-		fprintf (stderr, "couldn't connect to netlink: %s", nl_geterror ());
-		return 3;
-	}
-
-	cache = rtnl_addr_alloc_cache (nlh);
-	if (!cache || nl_cache_nitems (cache) == 0) {
-		fprintf (stderr, "couldn't fill address cache: %s", nl_geterror ());
-		return 3;
-	}
-
-	obj = nl_cache_get_first (cache);
-	if (nl_object_identical (obj, obj))
-		return 0;
-
-	nl_cache_get_ops (cache)->co_obj_ops->oo_id_attrs &= ~0x80;
-	if (nl_object_identical (obj, obj))
-		return 1;
-	else
-		return 2;
-]])], libnl_bug=$?, libnl_bug=$?, libnl_bug=cross)
-
-    CFLAGS="$save_CFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-
-    case $libnl_bug in
-    0) AC_MSG_RESULT([no])
-       ;;
-
-    1) AC_MSG_RESULT([yes, using workaround])
-       AC_DEFINE(LIBNL_NEEDS_ADDR_CACHING_WORKAROUND, 1, [Define this to hack around buggy libnl rtnl_addr caching])
-       ;;
-
-    2) AC_MSG_RESULT([yes, and workaround doesn't work])
-       AC_MSG_ERROR([Installed libnl has broken address caching; please patch or upgrade])
-       ;;
-
-    cross) AC_MSG_RESULT([cross-compiling... assuming it works!])
-           ;;
-
-    *) AC_MSG_RESULT([?])
-       AC_MSG_ERROR([libnl test program failed])
-       ;;
-esac
-])