This commit allows using a system-provided version of TinyDTLS when
building libcoap.
To do so, some potentially backwards-incompatible changes to the way
TinyDTLS is handled in the configure-script were made:
- The argument `--with-submodule-tinydtls` is added. If it is set to
yes, the configure-script will use the TinyDTLS git submodule for
DTLS functionality (assuming `--with-tinydtls` is also set).
- The configure-script will prefer using the system-provided version
of TinyDTLS as long as `--with-submodule-tinydtls` is not explicitly
set to yes.
- It will however fall back to the vendored version by default if no
system-provided version could be found and if
`--without-submodule-tinydtls` is not explicitly set.
- If a system-provided version of TinyDTLS was found, it will be used
automatically if no DTLS backend was selected explicitly (with the
lowest priority compared to the other DTLS libraries). However,
the submodule will *never* be used automatically, even if
`--with-submodule-tinydtls` is set (i.e., to use the submodule,
`--with-tinydtls` must be set as well).
If TinyDTLS is not installed system-wide (or if the installed version
is too old to contain a pkg-config file), the behaviour should be
identical to older versions.
Otherwise, use the `--with-submodule-tinydtls` option to force usage
of the git submodule version if required.
configure.ac:
Add in explicit library version checking as .pc file is not available.
m4/ac_check_cryptolibs.m4:
Add in AX_CHECK_MBEDTLS_VERSION for checking version compatibility.
configure.ac:
src/coap_mbedtls.c:
Correct brand name to Mbed TLS.
This change adds a new m4 macro AX_CHECK_A2X_TO_MANPAGE that
invokes the a2x program passed in the environment variable A2X
to create a minimal manual page. If A2X is set correctly, failing
this test is a good indicator that the docbook DTD or the
docbook XSL stylesheets are missing.
For adding further configure options about embedding DTLS support into
libcoap creating two new m4 functions AX_CHECK_GNUTLS_VERSION and
AX_CHECK_OPENSSL_VERSION.
The purpose of this new m4 functions is simply to check for the required
version of the combined library with a little bit of error handling.
As those checks are needed more than once later it's better to collect the
the logic and calls in dedicated m4 functions.
clang has dropped support for this warning and therefore emits
warnings when it is used as a compiler flag.
configure now uses AX_CHECK_COMPILE_FLAG[0] to check for compiler support.
[0] http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
Because local m4 macros are located in the sub-directory m4, autogen.sh
must not remove that directory but only clean the libtool-generated files.