File: libcap.m4

package info (click to toggle)
nfs-utils 1%3A2.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,380 kB
  • sloc: ansic: 52,371; sh: 5,775; python: 2,166; makefile: 973
file content (23 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (7)
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