3 # dt_DNSTAP(default_dnstap_socket_path, [action-if-true], [action-if-false])
4 # --------------------------------------------------------------------------
5 # Check for required dnstap libraries and add dnstap configure args.
8 AC_ARG_ENABLE([dnstap],
9 AS_HELP_STRING([--enable-dnstap],
10 [Enable dnstap support (requires protobuf-c)]),
11 [opt_dnstap=$enableval], [opt_dnstap=no])
13 AC_ARG_WITH([dnstap-socket-path],
14 AS_HELP_STRING([--with-dnstap-socket-path=pathname],
15 [set default dnstap socket path]),
16 [opt_dnstap_socket_path=$withval], [opt_dnstap_socket_path="$1"])
18 if test "x$opt_dnstap" != "xno"; then
19 AC_PATH_PROG([PROTOC_C], [protoc-c])
20 if test -z "$PROTOC_C"; then
21 AC_MSG_ERROR([The protoc-c program was not found. Please install protobuf-c!])
23 AC_ARG_WITH([protobuf-c], AC_HELP_STRING([--with-protobuf-c=path],
24 [Path where protobuf-c is installed, for dnstap]), [
25 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
26 if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
27 CFLAGS="$CFLAGS -I$withval/include/google"
29 CFLAGS="$CFLAGS -I$withval/include"
31 LDFLAGS="$LDFLAGS -L$withval/lib"
33 # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
34 if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
35 CFLAGS="$CFLAGS -I/usr/include/google"
37 if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
38 CFLAGS="$CFLAGS -I/usr/local/include/google"
39 LDFLAGS="$LDFLAGS -L/usr/local/lib"
43 AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
44 AC_MSG_ERROR([The protobuf-c library was not found. Please install protobuf-c!]))