X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_warnings.m4;h=fef7bd74bd6261926e8ab05c93c73faa0c3880bc;hb=7b548d21a8eafec0b830ad1bd6429cecd4eaeba8;hp=55e9e0bbdd30439c133c7c2df36b3b2515949b3a;hpb=36c6f6f7178cd69c4c0746dfee06e67f8e83cb0a;p=awesomized%2Flibmemcached diff --git a/m4/pandora_warnings.m4 b/m4/pandora_warnings.m4 index 55e9e0bb..fef7bd74 100644 --- a/m4/pandora_warnings.m4 +++ b/m4/pandora_warnings.m4 @@ -6,11 +6,16 @@ dnl with or without modifications, as long as this notice is preserved. dnl AC_PANDORA_WARNINGS([less-warnings|warnings-always-on]) dnl less-warnings turn on a limited set of warnings dnl warnings-always-on always set warnings=error regardless of tarball/vc + +dnl @TODO: remove less-warnings option as soon as Drizzle is clean enough to +dnl allow it AC_DEFUN([PANDORA_WARNINGS],[ m4_define([PW_LESS_WARNINGS],[no]) m4_define([PW_WARN_ALWAYS_ON],[no]) - m4_foreach_w([pw_arg],$@,[ + ifdef([m4_define],,[define([m4_define], defn([define]))]) + ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))]) + m4_foreach([pw_arg],$*,[ m4_case(pw_arg, [less-warnings],[ m4_undefine([PW_LESS_WARNINGS]) @@ -79,7 +84,9 @@ AC_DEFUN([PANDORA_WARNINGS],[ AC_CACHE_CHECK([whether it is safe to use -Wconversion], [ac_cv_safe_to_use_wconversion_], [save_CFLAGS="$CFLAGS" - CFLAGS="-Wconversion ${W_FAIL} -pedantic ${AM_CFLAGS}" + dnl Use -Werror here instead of ${W_FAIL} so that we don't spew + dnl conversion warnings to all the tarball folks + CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS}" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ #include @@ -99,7 +106,9 @@ foo(0); AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons], [ac_cv_safe_to_use_Wconversion_], [save_CFLAGS="$CFLAGS" - CFLAGS="-Wconversion ${W_FAIL} -pedantic ${AM_CFLAGS}" + dnl Use -Werror here instead of ${W_FAIL} so that we don't spew + dnl conversion warnings to all the tarball folks + CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS}" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[