- Fix dnstap to use protoc.

This commit is contained in:
W.C.A. Wijngaards 2025-04-29 12:43:56 +02:00
parent c253c8367a
commit a904a3a2c2
3 changed files with 68 additions and 8 deletions

60
configure vendored
View file

@ -686,6 +686,7 @@ ENABLE_DNSTAP
PROTOBUFC_LIBS PROTOBUFC_LIBS
PROTOBUFC_CFLAGS PROTOBUFC_CFLAGS
PROTOC_C PROTOC_C
PROTOC
UBSYMS UBSYMS
EXTRALINK EXTRALINK
COMMON_OBJ_ALL_SYMBOLS COMMON_OBJ_ALL_SYMBOLS
@ -24249,7 +24250,55 @@ fi
if test "x$opt_dnstap" != "xno"; then if test "x$opt_dnstap" != "xno"; then
# Extract the first word of "protoc-c", so it can be a program name with args. # Extract the first word of "protoc", so it can be a program name with args.
set dummy protoc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PROTOC+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $PROTOC in
[\\/]* | ?:[\\/]*)
ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_PROTOC="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PROTOC=$ac_cv_path_PROTOC
if test -n "$PROTOC"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5
printf "%s\n" "$PROTOC" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
# 'protoc-c' is deprecated. We use 'protoc' instead. If it can not be
# found, try 'protoc-c'.
if test -z "$PROTOC"; then
# Extract the first word of "protoc-c", so it can be a program name with args.
set dummy protoc-c; ac_word=$2 set dummy protoc-c; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; } printf %s "checking for $ac_word... " >&6; }
@ -24294,9 +24343,12 @@ printf "%s\n" "no" >&6; }
fi fi
if test -z "$PROTOC_C"; then else
as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5 PROTOC_C="$PROTOC"
fi fi
if test -z "$PROTOC_C"; then
as_fn_error $? "The protoc or protoc-c program was not found. It is needed for dnstap, use --disable-dnstap, or install protobuf-c to provide protoc or protoc-c" "$LINENO" 5
fi
# Check whether --with-protobuf-c was given. # Check whether --with-protobuf-c was given.
if test ${with_protobuf_c+y} if test ${with_protobuf_c+y}

View file

@ -18,10 +18,17 @@ AC_DEFUN([dt_DNSTAP],
[opt_dnstap_socket_path="$1"]) [opt_dnstap_socket_path="$1"])
if test "x$opt_dnstap" != "xno"; then if test "x$opt_dnstap" != "xno"; then
AC_PATH_PROG([PROTOC_C], [protoc-c]) AC_PATH_PROG([PROTOC], [protoc])
if test -z "$PROTOC_C"; then # 'protoc-c' is deprecated. We use 'protoc' instead. If it can not be
AC_MSG_ERROR([The protoc-c program was not found. Please install protobuf-c!]) # found, try 'protoc-c'.
fi if test -z "$PROTOC"; then
AC_PATH_PROG([PROTOC_C], [protoc-c])
else
PROTOC_C="$PROTOC"
fi
if test -z "$PROTOC_C"; then
AC_MSG_ERROR([[The protoc or protoc-c program was not found. It is needed for dnstap, use --disable-dnstap, or install protobuf-c to provide protoc or protoc-c]])
fi
AC_ARG_WITH([protobuf-c], AC_ARG_WITH([protobuf-c],
AS_HELP_STRING([--with-protobuf-c=path], [Path where protobuf-c is installed, for dnstap]), AS_HELP_STRING([--with-protobuf-c=path], [Path where protobuf-c is installed, for dnstap]),
[ [

View file

@ -1,5 +1,6 @@
29 April 2025: Wouter 29 April 2025: Wouter
- Fix for parallel build of dnstap protoc-c output. - Fix for parallel build of dnstap protoc-c output.
- Fix dnstap to use protoc.
28 April 2025: Yorgos 28 April 2025: Yorgos
- Merge #1275: Use macros for the fr_check_changed* functions. - Merge #1275: Use macros for the fr_check_changed* functions.