Add --enable-Werror configure switch
[userspace-rcu.git] / configure.ac
index f026c6d60ffa44156abec1a633c6289779a151ea..4ffe8689c133c1ad64453f867f7889db7a5d399c 100644 (file)
@@ -124,6 +124,8 @@ AC_LANG_PUSH([C])
 AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CFLAGS], [-Werror])
 AC_LANG_POP([C])
 
+AE_IF_FEATURE_ENABLED([Werror], [WARN_CFLAGS="${WARN_CFLAGS} -Werror"])
+
 
 ##               ##
 ## Header checks ##
@@ -192,9 +194,9 @@ AC_SEARCH_LIBS([clock_gettime], [rt], [
 ])
 
 
-##                              ##
-## Optionnal features selection ##
-##                              ##
+##                             ##
+## Optional features selection ##
+##                             ##
 
 # Allow to fallback to FIXME if the membarrier syscall is unavailable on the
 # running kernel, when disabled, abort if the syscall is unavailable. Applies
@@ -223,6 +225,10 @@ AE_FEATURE([rcu-debug], [Enable internal debugging self-checks. Introduces a per
 AE_FEATURE_DEFAULT_DISABLE
 AE_FEATURE([cds-lfht-iter-debug], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.])
 
+# When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS.
+# Disabled by default
+AE_FEATURE_DEFAULT_DISABLE
+AE_FEATURE([Werror],[Treat compiler warnings as errors.])
 
 ##                                                                    ##
 ## Set defines for optional features conditionnals in the source code ##
This page took 0.023162 seconds and 4 git commands to generate.