#define CLANG_VERSION \
(__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
-#if GCC_VERSION < 40600 && CLANG_VERSION < 10000
+#if GCC_VERSION < 40700 && CLANG_VERSION < 10000
#error Sorry, your compiler is too old - please upgrade it
#endif
]])], [valid_compiler=yes], [valid_compiler=no])
# See if we support thread-local storage.
LXC_CHECK_TLS
+CFLAGS="$CFLAGS -Wvla -std=gnu11"
if test "x$enable_werror" = "xyes"; then
- CFLAGS="$CFLAGS -Werror -Wvla -std=gnu11"
+ CFLAGS="$CFLAGS -Werror"
fi
AC_ARG_ENABLE([thread-safety],
[], [enable_thread_safety=yes])
AM_CONDITIONAL([ENFORCE_THREAD_SAFETY], [test "x$enable_thread_safety" = "xyes"])
+AC_ARG_ENABLE([dlog],
+ [AC_HELP_STRING([--enable-dlog], [enable dlog support [default=no]])],
+ [], [enable_dlog=no])
+AM_CONDITIONAL([ENABLE_DLOG], [test "x$enable_dlog" = "xyes"])
+
+AM_COND_IF([ENABLE_DLOG],
+ [PKG_CHECK_MODULES([DLOG],[dlog],[],[
+ AC_CHECK_HEADER([dlog.h],[],[AC_MSG_ERROR([You must install the dlog development package in order to compile lxc])])
+ AC_CHECK_LIB([dlog], [dlog_print],[],[AC_MSG_ERROR([You must install the dlog development package in order to compile lxc])])
+ AC_SUBST([DLOG_LIBS], [-ldlog])
+ ])
+ ])
+
# Files requiring some variable expansion
AC_CONFIG_FILES([
Makefile
Thread-safety:
- enforce: $enable_thread_safety
+
+Dlog:
+ - enable: $enable_dlog
EOF