mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix dnstap to use protoc.
This commit is contained in:
parent
c253c8367a
commit
a904a3a2c2
3 changed files with 68 additions and 8 deletions
54
configure
vendored
54
configure
vendored
|
|
@ -686,6 +686,7 @@ ENABLE_DNSTAP
|
|||
PROTOBUFC_LIBS
|
||||
PROTOBUFC_CFLAGS
|
||||
PROTOC_C
|
||||
PROTOC
|
||||
UBSYMS
|
||||
EXTRALINK
|
||||
COMMON_OBJ_ALL_SYMBOLS
|
||||
|
|
@ -24249,6 +24250,54 @@ fi
|
|||
|
||||
|
||||
if test "x$opt_dnstap" != "xno"; then
|
||||
# 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
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
|
|
@ -24294,8 +24343,11 @@ printf "%s\n" "no" >&6; }
|
|||
fi
|
||||
|
||||
|
||||
else
|
||||
PROTOC_C="$PROTOC"
|
||||
fi
|
||||
if test -z "$PROTOC_C"; then
|
||||
as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -18,9 +18,16 @@ AC_DEFUN([dt_DNSTAP],
|
|||
[opt_dnstap_socket_path="$1"])
|
||||
|
||||
if test "x$opt_dnstap" != "xno"; then
|
||||
AC_PATH_PROG([PROTOC], [protoc])
|
||||
# 'protoc-c' is deprecated. We use 'protoc' instead. If it can not be
|
||||
# found, try 'protoc-c'.
|
||||
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-c program was not found. Please install protobuf-c!])
|
||||
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],
|
||||
AS_HELP_STRING([--with-protobuf-c=path], [Path where protobuf-c is installed, for dnstap]),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
29 April 2025: Wouter
|
||||
- Fix for parallel build of dnstap protoc-c output.
|
||||
- Fix dnstap to use protoc.
|
||||
|
||||
28 April 2025: Yorgos
|
||||
- Merge #1275: Use macros for the fr_check_changed* functions.
|
||||
|
|
|
|||
Loading…
Reference in a new issue