summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2014-11-20 00:00:33 +0000
committerBrad Smith <brad@cvs.openbsd.org>2014-11-20 00:00:33 +0000
commitf29b43fae40eb8e6b460614c8409c074d4e79fda (patch)
tree376e9b0496806d8724720fe9ecc56d6d62205177 /usr.sbin
parentf39f29bb3cca3c81d3f93d651fd6081c5e92143c (diff)
update to Unbound 1.5.0, ok sthen@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/unbound/dnstap/dnstap.m4114
1 files changed, 45 insertions, 69 deletions
diff --git a/usr.sbin/unbound/dnstap/dnstap.m4 b/usr.sbin/unbound/dnstap/dnstap.m4
index 80b7bc92c92..5b78b3e267c 100644
--- a/usr.sbin/unbound/dnstap/dnstap.m4
+++ b/usr.sbin/unbound/dnstap/dnstap.m4
@@ -5,76 +5,52 @@
# Check for required dnstap libraries and add dnstap configure args.
AC_DEFUN([dt_DNSTAP],
[
- AC_ARG_ENABLE([dnstap],
- AS_HELP_STRING([--enable-dnstap],
- [Enable dnstap support (requires protobuf-c)]),
- [opt_dnstap=$enableval],
- [opt_dnstap=no])
+ AC_ARG_ENABLE([dnstap],
+ AS_HELP_STRING([--enable-dnstap],
+ [Enable dnstap support (requires fstrm, protobuf-c)]),
+ [opt_dnstap=$enableval], [opt_dnstap=no])
- AC_ARG_WITH([dnstap-socket-path],
- AS_HELP_STRING([--with-dnstap-socket-path=pathname],
- [set default dnstap socket path]),
- [opt_dnstap_socket_path=$withval],
- [opt_dnstap_socket_path="$1"])
+ AC_ARG_WITH([dnstap-socket-path],
+ AS_HELP_STRING([--with-dnstap-socket-path=pathname],
+ [set default dnstap socket path]),
+ [opt_dnstap_socket_path=$withval], [opt_dnstap_socket_path="$1"])
- if test "x$opt_dnstap" != "xno"; then
- AC_PATH_PROG([PROTOC_C], [protoc-c])
- if test -z "$PROTOC_C"; then
- AC_MSG_ERROR([The protoc-c program was not found. Please install protobuf-c!])
- fi
- AC_ARG_WITH([protobuf-c],
- AS_HELP_STRING([--with-protobuf-c=path], [Path where protobuf-c is installed, for dnstap]),
- [
- # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
- if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
- CFLAGS="$CFLAGS -I$withval/include/google"
- else
- CFLAGS="$CFLAGS -I$withval/include"
- fi
- LDFLAGS="$LDFLAGS -L$withval/lib"
- ],
- [
- ifdef([PKG_CHECK_MODULES],
- [
- PKG_CHECK_MODULES([PROTOBUFC], [libprotobuf-c],
- [
- CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
- LIBS="$LIBS $PROTOBUFC_LIBS"
- ],
- [
- # pkg-config failed; try falling back to known values
- # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
- if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
- CFLAGS="$CFLAGS -I/usr/include/google"
- else
- if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
- CFLAGS="$CFLAGS -I/usr/local/include/google"
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
- else
- AC_MSG_ERROR([The protobuf-c package was not found with pkg-config. Please install protobuf-c!])
- fi
- fi
- ]
- )
- ],
- [
- # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
- if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
- CFLAGS="$CFLAGS -I/usr/include/google"
- else
- if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
- CFLAGS="$CFLAGS -I/usr/local/include/google"
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
- fi
- fi
- ]
- )
- ]
- )
- AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
- AC_MSG_ERROR([The protobuf-c library was not found. Please install the development libraries for protobuf-c!]))
- $2
- else
- $3
+ if test "x$opt_dnstap" != "xno"; then
+ AC_PATH_PROG([PROTOC_C], [protoc-c])
+ if test -z "$PROTOC_C"; then
+ AC_MSG_ERROR([The protoc-c program was not found. Please install protobuf-c!])
fi
+ AC_ARG_WITH([protobuf-c], AC_HELP_STRING([--with-protobuf-c=path],
+ [Path where protobuf-c is installed, for dnstap]), [
+ # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
+ if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I$withval/include/google"
+ else
+ CFLAGS="$CFLAGS -I$withval/include"
+ fi
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ ], [
+ # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
+ if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I/usr/include/google"
+ else
+ if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
+ CFLAGS="$CFLAGS -I/usr/local/include/google"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ fi
+ fi
+ ])
+ AC_ARG_WITH([libfstrm], AC_HELP_STRING([--with-libfstrm=path],
+ [Path where libfstrm is installed, for dnstap]), [
+ CFLAGS="$CFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ ])
+ AC_SEARCH_LIBS([fstrm_iothr_init], [fstrm], [],
+ AC_MSG_ERROR([The fstrm library was not found. Please install fstrm!]))
+ AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
+ AC_MSG_ERROR([The protobuf-c library was not found. Please install protobuf-c!]))
+ $2
+ else
+ $3
+ fi
])