X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=configure.ac;h=6067a57f57840ef00ed6dbc5dfd0850462e26adc;hp=dc0dc0231d4d54078881be01b6f5775d1cb0dd55;hb=3a50dfc27e0ae7e28ed9861646eb4a2ba63a67a6;hpb=f0124a5a28a2a9c00a46190a6fa329ba66d5abf1 diff --git a/configure.ac b/configure.ac index dc0dc02..6067a57 100644 --- a/configure.ac +++ b/configure.ac @@ -14,9 +14,9 @@ m4_define([urcu_version], urcu_version_major[.]urcu_version_minor[.]urcu_version # Library version information of "liburcu" # Following the numbering scheme proposed by libtool for the library version # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -m4_define([urcu_lib_version_current], [7]) +m4_define([urcu_lib_version_current], [8]) m4_define([urcu_lib_version_revision], [0]) -m4_define([urcu_lib_version_age], [1]) +m4_define([urcu_lib_version_age], [0]) m4_define([urcu_lib_version], urcu_lib_version_current[:]urcu_lib_version_revision[:]urcu_lib_version_age) @@ -79,11 +79,6 @@ AS_IF([test "x$ax_cv___attribute__" != "xyes"], # Make sure we have pthread support AX_PTHREAD([], [AC_MSG_ERROR([Could not configure pthread support])]) -# Make sure the C compiler supports weak symbols -AX_SYS_WEAK_ALIAS -AS_IF([test "x$ax_cv_sys_weak_alias" = "xno"], - [AC_MSG_ERROR([Your platform doesn't support weak symbols.])]) - # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE AC_C_TYPEOF @@ -96,6 +91,39 @@ AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T +# Detect warning flags supported by the C compiler and append them to +# WARN_CFLAGS. +m4_define([WARN_FLAGS_LIST], [ dnl + -Wall dnl + -Wextra dnl + -Wmissing-prototypes dnl + -Wmissing-declarations dnl + -Wnull-dereference dnl + -Wundef dnl + -Wshadow dnl + -Wjump-misses-init dnl + -Wsuggest-attribute=format dnl + -Wtautological-constant-out-of-range-compare dnl + -Wnested-externs dnl + -Wwrite-strings dnl + -Wformat=2 dnl + -Wstrict-aliasing dnl + -Wmissing-noreturn dnl + -Winit-self dnl + -Wduplicated-cond dnl + -Wduplicated-branches dnl + -Wlogical-op dnl + dnl + dnl-Wredundant-decls dnl + -Wno-null-dereference 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]) +AC_LANG_POP([C]) + ## ## ## Header checks ## @@ -244,7 +272,7 @@ AC_SUBST(LT_NO_UNDEFINED) AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -include config.h" AC_SUBST(AM_CPPFLAGS) -AM_CFLAGS="-Wall -Wextra -Wno-unused-parameter $PTHREAD_CFLAGS" +AM_CFLAGS="$WARN_CFLAGS $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS)