3 To use NoBug, one needs to include the 'nobug.h' header and link with
4 its approbiate libararies. Compiling must select a
5 xref:buildlevel[build level], else a error will be reported.
6 Many aspects of NoBug can be configured by overriding macros before
7 'nobug.h' gets included.
9 A project using NoBug may use autoconf to check for execinfo and
12 AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H))
13 PKG_HAVE_DEFINE_WITH_MODULES(VALGRIND, [valgrind])
15 For Multithreaded programs, you should also check for pthreads
16 availability and flavor
20 When the resulting `HAVE_PTHREAD`, `HAVE_EXECINFO_H` and
21 `HAVE_VALGRIND_H` are defined by the configure script, the
22 corresponding features become available.
24 NoBug then defines `NOBUG_USE_PTHREAD`, `NOBUG_USE_VALGRIND` and
25 `NOBUG_USE_EXECINFO` to 1. If you do not want to use any of these features in
26 NoBug, you can override these macros to 0 before including nobug.h.
28 If `NVALGRIND` is defined, valgrind support will not be available.
30 There are many other macros which can be set and overridden by the user to
31 control behavior. Please help completing this documentation if you
34 To use NoBug with single threaded programmes, link 'libnobug' to your project;
35 multi-threaded programmes should link with 'libnobugmt'. The both libraries must
36 be initialized with `NOBUG_INIT` before any features can be used or a thread is
37 created. This is discussed in more detail at the
38 xref:multithreading[multithreading] chapter.
40 .Using Nobug from a Project using autoconf
43 PKG_CHECK_MODULES(NOBUGMT_LUMIERA, [nobugmt >= 0.3rc1],
44 AC_DEFINE(HAVE_NOBUGMT_H),
45 AC_MSG_ERROR([NoBug pkg-config metadata missing])