From 7bfe765ae06fcc0a5570fdd793237e5fa828f7e7 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 2 Sep 2019 20:52:56 +0200 Subject: [PATCH] build: only build without libcap on request 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 --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 676c984385..b30b07d8e8 100755 --- a/configure.ac +++ b/configure.ac @@ -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]) -- 2.39.5