summaryrefslogtreecommitdiffstats
path: root/m4/pdns_check_dnstap.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
commit4fc2f55f761d71aae1f145d5aa94ba929cc39676 (patch)
tree5c1e1db3b46dd4edbe11f612d93cb94b96891ce3 /m4/pdns_check_dnstap.m4
parentInitial commit. (diff)
downloaddnsdist-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_check_dnstap.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/m4/pdns_check_dnstap.m4 b/m4/pdns_check_dnstap.m4
new file mode 100644
index 0000000..1be83c6
--- /dev/null
+++ b/m4/pdns_check_dnstap.m4
@@ -0,0 +1,31 @@
+AC_DEFUN([PDNS_CHECK_DNSTAP], [
+ AC_MSG_CHECKING([whether we will have dnstap])
+ AC_ARG_ENABLE([dnstap],
+ AS_HELP_STRING([--enable-dnstap],[enable dnstap support @<:@default=$1@:>@]),
+ [enable_dnstap=$enableval],
+ [enable_dnstap=$1],
+ )
+ AC_MSG_RESULT([$enable_dnstap])
+
+ AS_IF([test "x$enable_dnstap" != "xno"], [
+ AS_IF([test "x$enable_dnstap" = "xyes" -o "x$enable_dnstap" = "xauto"], [
+ PKG_CHECK_MODULES([FSTRM], [libfstrm], [
+ AC_DEFINE([HAVE_FSTRM], [1], [Define to 1 if you have libfstrm])
+ save_CFLAGS=$CFLAGS
+ save_LIBS=$LIBS
+ CFLAGS="$FSTRM_CFLAGS $CFLAGS"
+ LIBS="$FSTRM_LIBS $LIBS"
+ AC_CHECK_FUNCS([fstrm_tcp_writer_init])
+ CFLAGS=$save_CFLAGS
+ LIBS=$save_LIBS
+ ], [ : ])
+ ])
+ ])
+
+ AM_CONDITIONAL([FSTRM], [test "x$FSTRM_LIBS" != "x"])
+ AS_IF([test "x$enable_dnstap" = "xyes"], [
+ AS_IF([test x"$FSTRM_LIBS" = "x"], [
+ AC_MSG_ERROR([dnstap requested but libfstrm was not found])
+ ])
+ ])
+])