ctx.c contains a workaround for systems without va_copy() support.
Improve this workaround in the way which is described in the autoconf
manual.
Also check for va_copy declaration in configure time.
Fixes#160.
Introduced UNUSED macro with cast to void in commoh.h for internal
use. Used cast to void directly in those files which do not
include common.h. Although this change doesn't fix semantic issues
with unused function parameters, it does explicitly mark all those
places, which might require attention in future.
src/snprinf.[ch] rely on HAVE_SNPRINTF macro. The check is missed in
configure script and libstrophe always use internal implementation
of snprinf() which may be inefficient. Add check to configure.ac.
The arguments of AC_ARG_WITH are (package, help-string, [action-if-given], [action-if-not-given]).
action-if-given takes effect when the flag is given in **either** form (--with or --without).
The proper code for action-if-given would thus be with_libxml2=$withval, which is already the default.
Thus leaving this argument empty is the proper course of action.
cf. https://autotools.io/autoconf/arguments.html
A small typo in the detection of libxml2 leads to a successful
pkg-config discovery of libxml2 to be ignored. As a consequence,
configure.ac falls back to detecting the host libxml2, which does not
work in cross-compilation situation. This commit fixes this small
typo.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
nameser_compat.h is required on Darwin, but doesn't exist on
OpenBSD. Also, OpenBSD doesn't support the ns_c_in or ns_t_srv enums,
so the C_IN and T_SRV macros are required.
expat is still the default parser, but libxml2 can also be used
via an option to the configure script. New parsers can easily be
added by implementing a parser_foo.c that uses the interface defined
in parser.h.