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 <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2019-09-02 20:52:56 +02:00
parent 9095976830
commit 7bfe765ae0

View file

@ -2007,6 +2007,20 @@ if test "${enable_capabilities}" != "no"; then
-o x"${frr_ac_lcaps}" = x"yes"; then -o x"${frr_ac_lcaps}" = x"yes"; then
AC_DEFINE([HAVE_CAPABILITIES], [1], [capabilities]) AC_DEFINE([HAVE_CAPABILITIES], [1], [capabilities])
fi 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 fi
AC_SUBST([LIBCAP]) AC_SUBST([LIBCAP])