]> git.proxmox.com Git - mirror_lxc.git/blobdiff - configure.ac
Merge pull request #2607 from brauner/2018-09-11/sysfs_mixed
[mirror_lxc.git] / configure.ac
index 0139a746b1a734fd04716447d94dfdce07bc2c7d..92d6601d7591804a15e4c2ad4a373ed4f24e5f5b 100644 (file)
@@ -53,7 +53,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #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])
@@ -611,7 +611,7 @@ AC_CHECK_DECLS([PR_SET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
 AC_CHECK_DECLS([PR_GET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
 
 # Check for some headers
-AC_CHECK_HEADERS([sys/signalfd.h pty.h sys/memfd.h sys/personality.h utmpx.h sys/timerfd.h sys/resource.h])
+AC_CHECK_HEADERS([pty.h sys/memfd.h sys/personality.h sys/resource.h sys/signalfd.h sys/timerfd.h utmpx.h])
 
 AC_CHECK_HEADER([ifaddrs.h],
        AM_CONDITIONAL(HAVE_IFADDRS_H, true)
@@ -683,8 +683,9 @@ AC_PROG_SED
 # 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],
@@ -692,6 +693,19 @@ 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
@@ -938,4 +952,7 @@ Paths:
 
 Thread-safety:
  - enforce: $enable_thread_safety
+
+Dlog:
+ - enable: $enable_dlog
 EOF