]>
Commit | Line | Data |
---|---|---|
fdc3ea42 RG |
1 | AC_DEFUN([PDNS_WITH_LIBCAP], [ |
2 | AC_MSG_CHECKING([whether we will be linking in libcap]) | |
3 | HAVE_LIBCAPS=0 | |
4 | AC_ARG_WITH([libcap], | |
5 | AS_HELP_STRING([--with-libcap],[use libcap @<:@default=auto@:>@]), | |
6 | [with_libcap=$withval], | |
7 | [with_libcap=auto], | |
8 | ) | |
9 | AC_MSG_RESULT([$with_libcap]) | |
10 | ||
11 | AS_IF([test "x$with_libcap" != "xno"], [ | |
12 | AS_IF([test "x$with_libcap" = "xyes" -o "x$with_libcap" = "xauto"], [ | |
13 | PKG_CHECK_MODULES([LIBCAP], [libcap] , [ | |
14 | [HAVE_LIBCAP=1] | |
15 | AC_DEFINE([HAVE_LIBCAP], [1], [Define to 1 if you have libcap]) | |
16 | ], [ : ]) | |
17 | ]) | |
18 | ]) | |
19 | AM_CONDITIONAL([HAVE_LIBCAP], [test "x$LIBCAP_LIBS" != "x"]) | |
20 | AS_IF([test "x$with_libcap" = "xyes"], [ | |
21 | AS_IF([test x"$LIBCAP_LIBS" = "x"], [ | |
22 | AC_MSG_ERROR([libcap requested but libraries were not found]) | |
23 | ]) | |
24 | ]) | |
25 | ]) |