]> git.puffer.fish Git - matthieu/frr.git/commitdiff
build: only build without libcap on request
authorDavid Lamparter <equinox@diac24.net>
Mon, 2 Sep 2019 18:52:56 +0000 (20:52 +0200)
committerDavid Lamparter <equinox@diac24.net>
Mon, 2 Sep 2019 18:52:56 +0000 (20:52 +0200)
Linux FRR builds without libcap are massively slow due to the
signal-based UID/GID synchronization across threads.  This disables the
automatic fallback to build without libcap;  it can still be requested
with "--disable-capabilities" but if the option isn't given in either
direction and we can't find libcap that's an error now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac

index 676c9843851c1328614257cd0d57b393d68fd23e..b30b07d8e82bb6ab53e1010f53ddfaa922982383 100755 (executable)
@@ -2007,6 +2007,20 @@ if test "${enable_capabilities}" != "no"; then
        -o x"${frr_ac_lcaps}" = x"yes"; then
     AC_DEFINE([HAVE_CAPABILITIES], [1], [capabilities])
   fi
+
+  case "$host_os" in
+  linux*)
+    if test "$frr_ac_lcaps" != "yes"; then
+      AC_MSG_ERROR([libcap and/or its headers were not found.  Running FRR without libcap support built in causes a huge performance penalty.])
+    fi
+    ;;
+  esac
+else
+  case "$host_os" in
+  linux*)
+    AC_MSG_WARN([Running FRR without libcap support built in causes a huge performance penalty.])
+    ;;
+  esac
 fi
 AC_SUBST([LIBCAP])