diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:34:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:34:30 +0000 |
commit | 4fc2f55f761d71aae1f145d5aa94ba929cc39676 (patch) | |
tree | 5c1e1db3b46dd4edbe11f612d93cb94b96891ce3 /m4/pdns_with_libcap.m4 | |
parent | Initial commit. (diff) | |
download | dnsdist-4fc2f55f761d71aae1f145d5aa94ba929cc39676.tar.xz dnsdist-4fc2f55f761d71aae1f145d5aa94ba929cc39676.zip |
Adding upstream version 1.7.3.upstream/1.7.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | m4/pdns_with_libcap.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/m4/pdns_with_libcap.m4 b/m4/pdns_with_libcap.m4 new file mode 100644 index 0000000..0dba5da --- /dev/null +++ b/m4/pdns_with_libcap.m4 @@ -0,0 +1,25 @@ +AC_DEFUN([PDNS_WITH_LIBCAP], [ + AC_MSG_CHECKING([whether we will be linking in libcap]) + HAVE_LIBCAPS=0 + AC_ARG_WITH([libcap], + AS_HELP_STRING([--with-libcap],[use libcap @<:@default=auto@:>@]), + [with_libcap=$withval], + [with_libcap=auto], + ) + AC_MSG_RESULT([$with_libcap]) + + AS_IF([test "x$with_libcap" != "xno"], [ + AS_IF([test "x$with_libcap" = "xyes" -o "x$with_libcap" = "xauto"], [ + PKG_CHECK_MODULES([LIBCAP], [libcap] , [ + [HAVE_LIBCAP=1] + AC_DEFINE([HAVE_LIBCAP], [1], [Define to 1 if you have libcap]) + ], [ : ]) + ]) + ]) + AM_CONDITIONAL([HAVE_LIBCAP], [test "x$LIBCAP_LIBS" != "x"]) + AS_IF([test "x$with_libcap" = "xyes"], [ + AS_IF([test x"$LIBCAP_LIBS" = "x"], [ + AC_MSG_ERROR([libcap requested but libraries were not found]) + ]) + ]) +]) |