blob: f8a0ed178cccbc0639b7ab02343d7054e4015faa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
dnl Checks for libcap.so
dnl
AC_DEFUN([AC_LIBCAP], [
dnl look for prctl
AC_CHECK_FUNC([prctl], , AC_MSG_ERROR([prctl syscall is not available]))
AC_ARG_ENABLE([caps],
[AS_HELP_STRING([--disable-caps], [Disable capabilities support])])
LIBCAP=
if test "x$enable_caps" != "xno" ; then
dnl look for the library; do not add to LIBS if found
AC_CHECK_LIB([cap], [cap_get_proc], [LIBCAP=-lcap], ,)
AC_CHECK_HEADERS([sys/capability.h], ,
[test "x$enable_caps" = "xyes" && AC_MSG_ERROR([libcap headers not found.])])
fi
AC_SUBST(LIBCAP)
])dnl
|