1 AC_DEFUN([PDNS_WITH_LIBCAP], [
2 AC_MSG_CHECKING([whether we will be linking in libcap])
5 AS_HELP_STRING([--with-libcap],[use libcap @<:@default=auto@:>@]),
6 [with_libcap=$withval],
9 AC_MSG_RESULT([$with_libcap])
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] , [
15 AC_DEFINE([HAVE_LIBCAP], [1], [Define to 1 if you have libcap])
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])