mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-29 22:15:49 +03:00
The environment variable TLS now controls the DTLS-specific configuration options. The following values are defined: no turn off DTLS support openssl use OpenSSL library gnutls use GnuTLS library tinydtls use tinydtls library Any other value will be mapped to gnutls which is the default.
44 lines
1.2 KiB
Bash
Executable File
44 lines
1.2 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
|
|
WITH_TESTS="`scripts/fix-cunit.sh` --enable-tests"
|
|
test -f `pwd`/cunit.pc && echo cat `pwd`/cunit.pc
|
|
fi
|
|
|
|
case "x${TLS}" in
|
|
xno) WITH_TLS="--disable-dtls"
|
|
;;
|
|
xopenssl) WITH_TLS="--with-openssl"
|
|
;;
|
|
xtinydtls) WITH_TLS="--with-tinydtls"
|
|
;;
|
|
*) WITH_TLS="--with-gnutls"
|
|
;;
|
|
esac
|
|
|
|
config() {
|
|
echo "./configure $*"
|
|
./configure $* || cat config.log
|
|
}
|
|
|
|
case "${PLATFORM}" in
|
|
contiki) config "--disable-tests --disable-documentation --disable-examples $WITH_TLS" && \
|
|
make -C examples/contiki
|
|
;;
|
|
lwip) config "--disable-tests --disable-documentation --disable-examples $WITH_TLS" && \
|
|
make -C examples/lwip lwip lwip-contrib
|
|
make -C examples/lwip LDLIBS=`grep ac_cv_search_clock_gettime=- config.log|cut -d= -f2`
|
|
;;
|
|
posix|*) config "$WITH_TESTS --enable-documentation --enable-examples $WITH_TLS" && \
|
|
make
|
|
;;
|
|
esac
|
|
|
|
err=$?
|
|
if test $err = 0 -a -n "$WITH_TESTS" ; then
|
|
tests/testdriver
|
|
err=$?
|
|
fi
|
|
|
|
exit $err
|