mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-11 11:20:40 +03:00
The link step for the native lwip build fails on platforms that use a glibc version prior 2.17. The reason is that librt is needed for clock_gettime() in that environment. configure detects this correctly but the lwip example comes with a simple hand-craftet Makefile that does not use the configure results. This quick hack checks for the output of the check for clock_gettime() and includes the required libraries in order to fix the travis build.
32 lines
811 B
Bash
Executable File
32 lines
811 B
Bash
Executable File
#! /bin/sh
|
|
|
|
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
|
|
WITH_TESTS=--enable-tests
|
|
fi
|
|
|
|
config() {
|
|
echo "./configure $*"
|
|
./configure $*
|
|
}
|
|
|
|
case "${PLATFORM}" in
|
|
contiki) config "--disable-tests --disable-documentation --disable-examples" && \
|
|
make -C examples/contiki
|
|
;;
|
|
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
|
|
make -C examples/lwip lwip lwip-contrib
|
|
make -C examples/lwip LDFLAGS=`grep ac_cv_search_clock_gettime=- config.log|cut -d= -f2`
|
|
;;
|
|
posix|*) config "$WITH_TESTS --enable-documentation --enable-examples" && \
|
|
make
|
|
;;
|
|
esac
|
|
|
|
err=$?
|
|
if test $err = 0 -a -n "$WITH_TESTS" ; then
|
|
tests/testdriver
|
|
err=$?
|
|
fi
|
|
|
|
exit $err
|