]> git.meshlink.io Git - meshlink/blobdiff - configure.ac
Allow compiling without support for Catta.
[meshlink] / configure.ac
index 8ef1e9ff8cc050dbb05270453ff2a3cec794731d..47656d7378987cba35eda1d7e0c16c93ad760829 100644 (file)
@@ -5,7 +5,6 @@ AC_INIT([MeshLink], [0.1])
 AM_INIT_AUTOMAKE([std-options subdir-objects nostdinc silent-rules -Wall])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SUBDIRS([catta])
 AM_SILENT_RULES([yes])
 
 # Enable GNU extensions.
@@ -79,6 +78,14 @@ AS_IF([test "x$enable_hardening" != "xno"],
   ]
 );
 
+dnl Allow building without Catta
+AC_ARG_ENABLE([catta], AS_HELP_STRING([--disable-catta], [disable linking with the Catta library]))
+AS_IF([test "x$enable_catta" != "xno"],
+  AC_DEFINE(HAVE_CATTA, 1, [Link with Catta])
+  AC_CONFIG_SUBDIRS([catta])
+)
+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"],