• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:gcov +full:- +full:options

3 # Copyright (C) 2010-2023 Olaf Bergmann <bergmann@tzi.org>
4 # Copyright (C) 2015-2018 Carsten Schoenert <c.schoenert@t-online.de>
5 # Copyright (C) 2018-2023 Jon Shallow <supjps-libcoap@jpshallow.com>
7 # SPDX-License-Identifier: BSD-2-Clause
20 # define an appending release state if needed, for example for pre-releases
27 AC_INIT([libcoap], [libcoap_version], [libcoap-developers@lists.sourceforge.net], [libcoap], [https…
29 AM_INIT_AUTOMAKE([1.10 -Wall no-define no-dist-gzip dist-bzip2])
56 # To set the version of the library, libtool provides the -version-info #
84 # --> Increase the 'LT_LIBCOAP_REVISION' value with *every* new software release
93 # --> Increase the 'LT_LIBCOAP_CURRENT' value whenever as an interface has been added
96 # --> Set 'LT_LIBCOAP_REVISION' to 0.
106 # --> Increase the 'LT_LIBCOAP_AGE' value only if the changes made to the ABI are
114 # --> Set 'LT_LIBCOAP_AGE' to 0.
120 # 1. Programs using the previous version may use the new version as drop-in
127 # as drop-in replacement, but programs using the new version may use APIs not
138 # .so version naming ends up as 2.1.0 (c-a:a:r) (as decided by libtool).
164 LT_TEMP=`expr $LT_TEMP - $LT_LIBCOAP_AGE`
181 # Adding some default warning options for code QS
182 # see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
183 # and http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
185 -pedantic \
186 -Wall \
187 -Wcast-qual \
188 -Wextra \
189 -Wformat-security \
190 -Winline \
191 -Wmissing-declarations \
192 -Wmissing-prototypes \
193 -Wnested-externs \
194 -Wpointer-arith \
195 -Wshadow \
196 -Wstrict-prototypes \
197 -Wswitch-default \
198 -Wswitch-enum \
199 -Wunused \
200 -Wwrite-strings \
203 # check whether or not the compiler supports -Wlogical-op (clang does not...)
204 AX_CHECK_COMPILE_FLAG([-Wlogical-op], [WARNING_CFLAGS="$WARNING_CFLAGS -Wlogical-op"],,[-Werror])
205 AX_CHECK_COMPILE_FLAG([-fdiagnostics-color], [CFLAGS="$CFLAGS -fdiagnostics-color"],,[-Werror])
206 AX_CHECK_COMPILE_FLAG([-Wunused-result], [WARNING_CFLAGS="$WARNING_CFLAGS -Wunused-result"])
208 # clang 14+ generates dwarf-5, which is not currently supported by valgrind
210 WARNING_CFLAGS="$WARNING_CFLAGS -gdwarf-4"
215 AX_CHECK_LINK_FLAG([-Wl,--version-script=${srcdir}/libcoap-${LIBCOAP_API_VERSION}.map],
216 … [libcoap_SYMBOLS="-Wl,--version-script=\$(srcdir)/libcoap-\$(LIBCOAP_API_VERSION).map"],
217 … [libcoap_SYMBOLS="-export-symbols \$(top_builddir)/libcoap-\$(LIBCOAP_API_VERSION).sym"])
221 # configure options
225 [AS_HELP_STRING([--enable-documentation],
236 [AS_HELP_STRING([--enable-doxygen],
241 if test -z "$enable_doxygen"; then
250 if test -z "$DOXYGEN"; then
253 …the package that contains doxygen or disable the doxygen documentation using '--disable-doxygen'.])
257 doxygen_version=`$DOXYGEN --version`
264 if test "x$DOXYGEN" = "x" -a "x$build_doxygen" = "xyes"; then
266 … Install required doxygen version or disable the doxygen documentation using '--disable-doxygen'.])
272 AC_MSG_WARN([==> dot not found - continuing without DOT support])
279 *-freebsd1*)
285 # Using an explicit call with the default always available C-shell on FreeBSD,
287 dot_version=`export DOT=$DOT && csh -c '$DOT -V |& cut -f5 -d" "'`
291 dot_version=`$DOT -V 2>&1 | cut -f5 -d" "`
301 if test "x$DOT" = "x" -a "x$build_doxygen" = "xyes"; then
303 …Install required graphviz version or disable the doxygen documentation using '--disable-doxygen'.])
319 AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
325 [AS_HELP_STRING([--enable-manpages],
330 if test -z "$enable_manpages"; then
341 …t contains a2x (mostly asciidoc) or disable the build of the manpages using '--disable-manpages'.])
347 …d XSL stylesheets (presumably docbook, docbook-xml) or disable the build of the manpages using '--
354 # configure options
359 # the cryptography library that should be used by adding '--with-gnutls' or
360 # '--with-openssl'.
370 [AS_HELP_STRING([--enable-dtls],
376 [AS_HELP_STRING([--with-gnutls],
382 [AS_HELP_STRING([--with-openssl],
388 [AS_HELP_STRING([--with-mbedtls],
394 [AS_HELP_STRING([--with-tinydtls],
399 AC_ARG_WITH([submodule-tinydtls],
400 [AS_HELP_STRING([--with-submodule-tinydtls],
401 … submodule over the system-provided version [default=fallback to submodule if --with-tinydtls is e…
405 if test "x$with_gnutls" = "xyes" -o "x$with_openssl" = "xyes" -o "x$with_mbedtls" = "xyes" -o "x$wi…
407 …# Give an advice that '--with_gnutls', '--with_openssl', '--with-mbedtls' or '--with-tinydtls' was…
409 …N([==> Using the configure options '--with-gnutls', '--with-openssl', '--with-mbedtls' or '--with-
414 … # Give an advice that '--with-submodule-tinydtls' is useless if tinydtls is not also enabled.
415 …AC_MSG_WARN([==> Using the configure option '--with-submodule-tinydtls' without '--with-tinydtls' …
419 # O.K. the user hasn't de-selected DTLS
435 if test "$TLSCOUNT" -gt 1; then
436 …more than 1 of the options '--with-gnutls', '--with-openssl', '--with-mbedtls' or '--with-tinydtls…
437 … ==> Please note, the option '--enable-dtls' is turned on by default if not explicitly disabled!])
453 # Mbed TLS [does not have mbedtls.pc pkg-config file]
455 … [have_mbedtls="yes"; MbedTLS_CFLAGS="" ; MbedTLS_LIBS="-lmbedtls -lmbedcrypto -lmbedx509"],
456 [have_mbedtls="no"], -lmbedx509 -lmbedcrypto)
498 # The user wants to use explicit GnuTLS if '--with-gnutls' was set.
502 …=> You want to build libcoap with DTLS support by the GnuTLS library but pkg-config file 'gnutls.p…
504 … or select a different TLS library or disable the DTLS support using '--disable-dtls'.])
506 … AC_MSG_NOTICE([The use of GnuTLS was explicitly requested with configure option '--with-gnutls'!])
509 gnutls_version=`$PKG_CONFIG --modversion gnutls`
516 # The user wants to use explicit OpenSSL if '--with-openssl was set'.
520 …> You want to build libcoap with DTLS support by the OpenSSL library but pkg-config file 'openssl.…
522 … or select a different TLS library or disable the DTLS support using '--disable-dtls'.])
524 …AC_MSG_NOTICE([The use of OpenSSL was explicitly requested with configure option '--with-openssl'!…
527 openssl_version=`$PKG_CONFIG --modversion openssl`
534 # The user wants to use explicit Mbed TLS if '--with-mbedtls was set'.
540 … or select a different TLS library or disable the DTLS support using '--disable-dtls'.])
542 …AC_MSG_NOTICE([The use of Mbed TLS was explicitly requested with configure option '--with-mbedtls'…
544 # check for valid Mbed TLS version (mbedtls.pc does not exist - hmm)
552 # The user wants to use explicit TinyDTLS if '--with-tinydtls was set'.
554 …AC_MSG_NOTICE([The use of TinyDTLS was explicitly requested with configure option '--with-tinydtls…
556 …sing TinyDTLS submodule over system-provided version because either "--with-submodule-tinydtls" wa…
557 if test -e "$srcdir/ext/tinydtls/dtls.h"; then
560 auto_TinyDTLS_LIBS="-L\$(top_builddir)/ext/tinydtls -ltinydtls"
562 # Needed as TinyDTLS compiling does not recognize --disable-shared
564 auto_TinyDTLS_LIBS="-L\$(top_builddir)/ext/tinydtls -l:libtinydtls.a"
568 auto_TinyDTLS_CFLAGS="-I \$(top_srcdir)/ext -I \$(top_srcdir)/ext/tinydtls"
580 …pdated the TinyDTLS git submodule, use the system-provided version if available (set '--with-submo…
581 … select a different TLS library or disable the DTLS support using '--disable-dtls'.])
586 AC_MSG_NOTICE([Using system-provided TinyDTLS])
587 tinydtls_version=`$PKG_CONFIG --modversion tinydtls`
592 …Use the submodule TinyDTLS version (set '--with-submodule-tinydtls=yes' and update the git submodu…
593 …ensure that you have a system-provided version of TinyDTLS that can be found using pkg-config (old…
594 … select a different TLS library or disable the DTLS support using '--disable-dtls'.])
603 if test "$TLSCOUNT" -eq 0; then
607 gnutls_version=`$PKG_CONFIG --modversion gnutls`
617 openssl_version=`$PKG_CONFIG --modversion openssl`
627 # Mbed TLS [does not have mbedtls.pc pkg-config file]
638 tinydtls_version=`$PKG_CONFIG --modversion tinydtls`
649 …AC_MSG_ERROR([==> Option '--enable-dtls' is set but none of the needed cryptography libraries GnuT…
651 or disable the DTLS support using '--disable-dtls'.])
656 if test "x$with_gnutls" = "xyes" -o "x$with_gnutls_auto" = "xyes"; then
661 if test "x$with_openssl" = "xyes" -o "x$with_openssl_auto" = "xyes"; then
666 if test "x$with_mbedtls" = "xyes" -o "x$with_mbedtls_auto" = "xyes"; then
671 if test "x$with_tinydtls" = "xyes" -o "x$with_tinydtls_auto" = "xyes"; then
681 if test "x$with_openssl" = "xyes" -o "x$with_openssl_auto" = "xyes"; then
682 LIBCOAP_DTLS_LIB_EXTENSION_NAME=-openssl
683 elif test "x$with_gnutls" = "xyes" -o "x$with_gnutls_auto" = "xyes"; then
684 LIBCOAP_DTLS_LIB_EXTENSION_NAME=-gnutls
685 elif test "x$with_mbedtls" = "xyes" -o "x$with_mbedtls_auto" = "xyes"; then
686 LIBCOAP_DTLS_LIB_EXTENSION_NAME=-mbedtls
688 LIBCOAP_DTLS_LIB_EXTENSION_NAME=-tinydtls
690 LIBCOAP_DTLS_LIB_EXTENSION_NAME=-notls
693 AM_CONDITIONAL(HAVE_NOTLS, [test "x$LIBCOAP_DTLS_LIB_EXTENSION_NAME" = "x-notls"])
701 # configure options
705 [AS_HELP_STRING([--enable-oscore],
711 if test "x$LIBCOAP_DTLS_LIB_EXTENSION_NAME" = "x-notls"; then
712 AC_MSG_WARN([==> --enable-oscore requires crypto support from TLS library or OS])
721 # configure options
724 [AS_HELP_STRING([--enable-tests],
725 … [Enable building the binary testsuite. Requires --enable-static [default=no]])],
735 …AC_MSG_WARN([==> You want to build the testing binary but the pkg-config file cunit.pc could not b…
736 …t contains the development files for CUnit or disable the testing binary using '--disable-tests'.])
740 AC_MSG_WARN([--enable-tests requires --enable-static which is now enabled.])
745 # configure options
748 [AS_HELP_STRING([--enable-examples],
755 # configure options
756 # __examples-source
757 AC_ARG_ENABLE([examples-source],
758 [AS_HELP_STRING([--enable-examples-source],
765 # configure options
767 AC_ARG_ENABLE([gcov], optenable
768 [AS_HELP_STRING([--enable-gcov],
769 [Enable building with gcov test coverage support [default=no]])],
772 AC_MSG_WARN([gcov is disabled])
777 AC_MSG_ERROR([Currently, gcov is assumed to work with GCC-compatible compilers only.])
779 AX_CHECK_COMPILE_FLAG([-fprofile-arcs], [CFLAGS="$CFLAGS -fprofile-arcs"])
780 AX_CHECK_COMPILE_FLAG([-ftest-coverage], [CFLAGS="$CFLAGS -ftest-coverage"])
781 # FIXME: clang complains about '--coverage'
782 …AX_CHECK_COMPILE_FLAG([--coverage], [CFLAGS="$CFLAGS --coverage -O0" LDFLAGS="$LDFLAGS --coverage"…
786 # configure options
787 # __license-install__
788 AC_ARG_ENABLE([license-install],
789 [AS_HELP_STRING([--enable-license-install],
796 # configure options
799 [AS_HELP_STRING([--enable-ipv4-support],
807 # configure options
810 [AS_HELP_STRING([--enable-ipv6-support],
818 # configure options
821 [AS_HELP_STRING([--enable-af-unix-support],
829 # configure options
832 [AS_HELP_STRING([--enable-tcp],
841 # configure options
844 [AS_HELP_STRING([--enable-websockets],
852 AC_MSG_WARN([--enable-websockets requires --enable-tcp, so --enable-websockets ignored.])
860 # configure options
863 [AS_HELP_STRING([--enable-async],
871 # configure options
874 [AS_HELP_STRING([--enable-observe-persist],
882 # configure options
884 # Support for Q-Block according to RFC 9177.
885 AC_ARG_ENABLE([q-block],
886 [AS_HELP_STRING([--enable-q-block],
887 [Enable building with Q-Block support [default=yes]])],
892 [AC_DEFINE(COAP_Q_BLOCK_SUPPORT, [1], [Define to 1 to build with Q-Block support.])])
894 # configure options
896 AC_ARG_ENABLE([add-default-names],
897 [AS_HELP_STRING([--enable-add-default-names],
904 # end configure options
908 # from configure options independent checks
915 *-freebsd1*)
916 AC_ARG_VAR([CTAGS_PROG],[the 'exctags' program to use for make target 'update-map-file'])
921 # Linux distributions have exuberant-ctags
922 AC_ARG_VAR([CTAGS_PROG],[the 'ctags' program to use for make target 'update-map-file'])
930 AC_MSG_WARN([==> Without ctags you will be unable to run the target 'update-map-file'!])
933 if test "`$CTAGS_PROG --help | grep '\--<LANG>-kinds'`" = ""; then
934 AC_MSG_NOTICE([==> Note: Your ctags binary does not support '--c-kinds'!])
936 AC_MSG_WARN([==> This option is required for the target 'update-map-file'.])
950 if test "x$ac_cv_header_sys_epoll_h" = "xyes" -a "x$ac_cv_header_sys_timerfd_h" = "xyes"; then
953 [AS_HELP_STRING([--with-epoll],
960 AC_MSG_WARN([==> Underlying O/S does not support epoll - --with-epoll ignored.])
969 AC_ARG_ENABLE([small-stack],
970 [AS_HELP_STRING([--enable-small-stack],
971 [Use small-stack if the available stack space is restricted [default=no]])],
979 AC_ARG_ENABLE([server-mode],
980 [AS_HELP_STRING([--enable-server-mode],
990 AC_ARG_ENABLE([client-mode],
991 [AS_HELP_STRING([--enable-client-mode],
1000 if test "x$enable_server_mode" != "xyes" -a "x$enable_client_mode" != "xyes" ; then
1001 …AC_MSG_ERROR([==> One or both of '--enable-server-mode' and '--enable-client-mode' need to be set!…
1004 AC_ARG_ENABLE([max-logging-level],
1005 [AS_HELP_STRING([--enable-max-logging-level],
1021 AC_MSG_ERROR([--emable-max-logging-level must have a value of 0 through 8 inclusive])
1035 # Check if -lsocket -lnsl is required (specifically Solaris)
1050 # The "ADDITIONAL_CFLAGS" is need as this stand-alone definition
1053 *-linux* | *-uclinux*)
1055 ADDITIONAL_CFLAGS="-D_GNU_SOURCE"
1062 *-cygwin*)
1064 ADDITIONAL_CFLAGS="-D_GNU_SOURCE -D_CYGWIN_ENV"
1065 LDFLAGS="-no-undefined $LDFLAGS"
1068 *-solaris*)
1071 # set __EXTENSION__ to shut up feature test macros that restrict -std=c99
1073 ADDITIONAL_CFLAGS="-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=600 -D__EXTENSIONS__=1"
1076 *-darwin*)
1078 ADDITIONAL_CFLAGS="-D_GNU_SOURCE"
1087 *-freebsd1*)
1088 AC_MSG_RESULT([FreeBSD-1x])
1089 ADDITIONAL_CFLAGS="-D_GNU_SOURCE"
1094 ADDITIONAL_CFLAGS="-D_GNU_SOURCE"
1099 ADDITIONAL_CFLAGS="-D_GNU_SOURCE -Wno-format -Wno-format-security"
1100 LIBS="${LIBS} -lws2_32"
1105 …an provide patches to support your operating system please write to 'libcoap-developers@lists.sour…
1109 PREDEFINED_CFLAGS=`echo $ADDITIONAL_CFLAGS | $SED -e 's/-D//g'`
1118 # libcoap-$LIBCOAP_API_VERSION.pc.in file too!! You will have to change
1120 # Cflags: -I${includedir}/coap-@LIBCOAP_API_VERSION@
1161 man/coap-client.txt
1162 man/coap-oscore-conf.txt
1163 man/coap-server.txt
1164 man/coap-rd.txt
1168 tests/oss-fuzz/Makefile.ci
1169 libcoap-$LIBCOAP_NAME_SUFFIX.pc:libcoap-$LIBCOAP_API_VERSION.pc.in
1174 LIBCOAP_BUILD=`git describe --tags --dirty --always`
1218 if test "x$with_gnutls" = "xyes" -o "x$with_gnutls_auto" = "xyes"; then
1220 AC_MSG_RESULT([ --> GnuTLS around : "yes" (found GnuTLS $gnutls_version)])
1224 if test "x$with_openssl" = "xyes" -o "x$with_openssl_auto" = "xyes"; then
1226 AC_MSG_RESULT([ --> OpenSSL around : "yes" (found OpenSSL $openssl_version)])
1230 if test "x$with_mbedtls" = "xyes" -o "x$with_mbedtls_auto" = "xyes"; then
1232 AC_MSG_RESULT([ --> Mbed TLS around : "yes" (found Mbed TLS $mbedtls_version)])
1239 AC_MSG_RESULT([ --> TinyDTLS around : "yes" (submodule)])
1241 … AC_MSG_RESULT([ --> TinyDTLS around : "yes (found TinyDTLS $tinydtls_version)"])
1274 AC_MSG_RESULT([ enable Q-Block support : "yes"])
1276 AC_MSG_RESULT([ enable Q-Block support : "no"])
1285 AC_MSG_RESULT([ --> Doxygen around : "yes" ($DOXYGEN $doxygen_version)])
1287 AC_MSG_RESULT([ --> dot around : "no" (DOT not found!)])
1289 AC_MSG_RESULT([ --> dot around : "yes" ($DOT $dot_version)])
1317 AC_MSG_RESULT([ build with gcov support : "yes"])
1319 AC_MSG_RESULT([ build with gcov support : "no"])