-AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h],
- [], [], [#include "src/have.h"]
+AM_CONDITIONAL(CATTA, test "x$enable_catta" != "xno")
+
+dnl UTCP debug flags
+AC_ARG_ENABLE([utcp_debug], AS_HELP_STRING([--enable-utcp-debug], [compile utcp with debug output]))
+AS_IF([test "x$enable_utcp_debug" = "xyes"],
+ [AX_CHECK_COMPILE_FLAG([-DUTCP_DEBUG], [CPPFLAGS="$CPPFLAGS -DUTCP_DEBUG"])
+ ]
+);
+
+dnl Blackbox test suite
+PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.1.0], [cmocka=true], [cmocka=false])
+PKG_CHECK_MODULES([LXC], [lxc >= 2.0.0], [lxc=true], [lxc=false])
+AM_CONDITIONAL(BLACKBOX_TESTS, test "$cmocka" = true -a "$lxc" = true)
+
+
+dnl Additional example code
+PKG_CHECK_MODULES([NCURSES], [ncurses >= 5], [curses=true], [curses=false])
+AC_ARG_ENABLE([monitor_code],
+ [AS_HELP_STRING([--enable-monitor-code], [Add monitor example code to the build])],
+ [AS_IF([test "x$enable_monitor_code" = "xyes"], [monitor_code=true], [monitor_code=false])],
+ [monitor_code=false]