2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00

[master] better reporting of xml/json unavailability

- error if "configure --with-libxml2" but the library isn't available
- log a warning on startup if only JSON or only XML can be served
This commit is contained in:
Evan Hunt 2015-08-12 21:58:04 -07:00
parent aa6c5a3e33
commit bcf76c1fb8
3 changed files with 29 additions and 5 deletions

View File

@ -2923,7 +2923,20 @@ ns_statschannels_configure(ns_server_t *server, const cfg_obj_t *config,
NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
"statistics-channels specified but not effective "
"due to missing XML and/or JSON library");
#endif
#else /* EXTENDED_STATS */
#ifndef HAVE_LIBXML2
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
"statistics-channels: XML library missing, "
"only JSON stats will be available");
#endif /* !HAVE_LIBXML2 */
#ifndef HAVE_JSON
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
"statistics-channels: JSON library missing, "
"only XML stats will be available");
#endif /* !HAVE_JSON */
#endif /* EXTENDED_STATS */
for (element = cfg_list_first(statschannellist);
element != NULL;

10
configure vendored
View File

@ -16482,8 +16482,14 @@ case "$use_libxml2" in
libxml2_cflags=`xml2-config --cflags`
;;
*)
libxml2_libs=
libxml2_cflags=
if test "$use_libxml2" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "required libxml2 version not available" "$LINENO" 5
else
libxml2_libs=
libxml2_cflags=
fi
;;
esac
;;

View File

@ -2067,8 +2067,13 @@ case "$use_libxml2" in
libxml2_cflags=`xml2-config --cflags`
;;
*)
libxml2_libs=
libxml2_cflags=
if test "$use_libxml2" = "yes" ; then
AC_MSG_RESULT(no)
AC_MSG_ERROR(required libxml2 version not available)
else
libxml2_libs=
libxml2_cflags=
fi
;;
esac
;;