From: Ruben Kerkhof Date: Sun, 5 Mar 2017 15:46:47 +0000 (+0100) Subject: Check for the CAP_IS_SUPPORTED macro X-Git-Tag: collectd-5.7.2~10^2~2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3160f66c76385312f5ab9e584bcbb6ce76f526c0;p=collectd.git Check for the CAP_IS_SUPPORTED macro On EPEL6: src/daemon/common.c: In function 'check_capability': src/daemon/common.c:1571: error: implicit declaration of function 'CAP_IS_SUPPORTED' make[1]: *** [src/daemon/common.lo] Error 1 --- diff --git a/configure.ac b/configure.ac index 3d74fd05..5a265c75 100644 --- a/configure.ac +++ b/configure.ac @@ -817,6 +817,12 @@ AC_CHECK_LIB(cap, cap_get_proc, [have_capability="yes"], [have_capability="no (cap_get_proc() not found)"]) fi +if test "x$have_capability" = "xyes"; then +AC_CHECK_DECL([CAP_IS_SUPPORTED], + [have_capability="yes"], + [have_capability="no (CAP_IS_SUPPORTED not found)"], + [[#include ]]) +fi if test "x$have_capability" = "xyes"; then AC_DEFINE(HAVE_CAPABILITY, 1, [Define to 1 if you have cap_get_proc() (-lcap).]) fi