Bump URCU dependency to 0.14
[lttng-tools.git] / configure.ac
index 408b4b0e24bda7c612cad3d9b99fbb616177c45b..a34e25f21fa5a38ef622724718b52ebb6eb3741a 100644 (file)
@@ -57,31 +57,47 @@ AC_TYPE_UINT8_T
 
 # Detect warning flags supported by the C and C++ compilers and append them to
 # WARN_CFLAGS and WARN_CXXFLAGS.
-m4_define([WARN_FLAGS_LIST], [ dnl
+m4_define([WARN_FLAGS_COMMON_LIST], [ dnl
   -Wall dnl
+  -Wextra dnl
+  -Wmissing-declarations dnl
+  -Wnull-dereference dnl
+  -Wundef dnl
+  -Wredundant-decls dnl
+  -Wshadow dnl
+  -Wsuggest-attribute=format dnl
+  -Wtautological-constant-out-of-range-compare dnl Clang specific
+  -Wwrite-strings dnl
+  -Wformat=2 dnl
+  -Wstrict-aliasing dnl
+  -Wmissing-noreturn dnl
+  -Wduplicated-cond dnl
+  -Wduplicated-branches dnl
+  -Wlogical-op dnl
+  -Winit-self dnl
   dnl We currently get this warning when building with Clang:
   dnl
   dnl /usr/include/setjmp.h:54:12: error: declaration of built-in function '__sigsetjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header <setjmp.h>. [-Werror,-Wincomplete-setjmp-declaration]
   dnl extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
   dnl            ^
   -Wno-incomplete-setjmp-declaration dnl
+  -Wno-gnu-folding-constant dnl Clang specific
+])
+
+# Detect warning flags specific to the C compiler and append them to
+# WARN_CFLAGS.
+m4_define([WARN_FLAGS_C_LIST], [ dnl
   -Wdiscarded-qualifiers dnl
-  -Wmissing-declarations dnl
   -Wmissing-prototypes dnl
   -Wmissing-parameter-type dnl
-  -Wshadow dnl
-  -Wno-gnu-folding-constant dnl
-  -Wsuggest-attribute=format dnl
-  -Wformat=2 dnl
-  dnl GCC enables this with -Wall in C++, and that generates a
-  dnl lot of warnings that have on average a low value to fix.
-  -Wno-sign-compare dnl
+  -Wjump-misses-init dnl
+  -Wnested-externs dnl
 ])
 
 # Pass -Werror as an extra flag during the test: this is needed to make the
 # -Wunknown-warning-option diagnostic fatal with clang.
 AC_LANG_PUSH([C])
-AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CFLAGS], [-Werror])
+AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_COMMON_LIST WARN_FLAGS_C_LIST], [WARN_CFLAGS], [-Werror])
 AC_LANG_POP([C])
 
 # The test used in AX_APPEND_COMPILE_FLAGS, generated using AC_LANG_PROGRAM, is
@@ -106,10 +122,18 @@ AC_LANG_POP([C])
 # Find a C++11 compiler with GNU extensions (-std=gnu++11)
 AX_CXX_COMPILE_STDCXX([11], [ext], [mandatory])
 
+# Detect warning flags specific to the C++ compiler and append them to
+# WARN_CXXFLAGS.
+m4_define([WARN_FLAGS_CXX_LIST], [ dnl
+  dnl GCC enables this with -Wall in C++, and that generates a
+  dnl lot of warnings that have on average a low value to fix.
+  -Wno-sign-compare dnl
+])
+
 # Pass -Werror as an extra flag during the test: this is needed to make the
 # -Wunknown-warning-option diagnostic fatal with clang.
 AC_LANG_PUSH([C++])
-AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CXXFLAGS], [-Werror])
+AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_COMMON_LIST WARN_FLAGS_CXX_LIST], [WARN_CXXFLAGS], [-Werror])
 AC_LANG_POP([C++])
 
 # Disable 'strict aliasing' if the C++ compiler supports it.
@@ -544,8 +568,8 @@ PKG_CHECK_MODULES([libxml2], [libxml-2.0 >= 2.7.6])
 AC_CHECK_FUNC([clock_gettime], [AC_DEFINE_UNQUOTED([LTTNG_HAVE_CLOCK_GETTIME], 1, [Has clock_gettime() support.])])
 
 # URCU library version needed or newer
-PKG_CHECK_MODULES([URCU], [liburcu >= 0.11])
-PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.11])
+PKG_CHECK_MODULES([URCU], [liburcu >= 0.14])
+PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.14])
 AM_CPPFLAGS="$AM_CPPFLAGS $URCU_CFLAGS"
 
 # Check for libkmod, it will be auto-neabled if found but won't fail if it's not,
This page took 0.024456 seconds and 4 git commands to generate.