- AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_use_Wredundant_decls_=yes],
- [ac_cv_safe_to_use_Wredundant_decls_=no])
- CXXFLAGS="${save_CXXFLAGS}"
- AC_LANG_POP()])
- AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"],
- [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"],
- [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"])
-
- NO_REDUNDANT_DECLS="-Wno-redundant-decls"
- PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow"
-
+ AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_use_Wredundant_decls_=yes],
+ [ac_cv_safe_to_use_Wredundant_decls_=no])
+ CXXFLAGS="${save_CXXFLAGS}"
+ AC_LANG_POP()])
+ AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"],
+ [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"],
+ [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"])
+
+ AC_CACHE_CHECK([whether it is safe to use -Wattributes from C++],
+ [ac_cv_safe_to_use_Wattributes_],
+ [AC_LANG_PUSH(C++)
+ save_CXXFLAGS="${CXXFLAGS}"
+ CXXFLAGS="${W_FAIL} -pedantic -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+#include <google/protobuf/message.h>
+#include <google/protobuf/descriptor.h>
+
+
+const ::google::protobuf::EnumDescriptor* Table_TableOptions_RowType_descriptor();
+enum Table_TableOptions_RowType {
+ Table_TableOptions_RowType_ROW_TYPE_DEFAULT = 0,
+ Table_TableOptions_RowType_ROW_TYPE_FIXED = 1,
+ Table_TableOptions_RowType_ROW_TYPE_DYNAMIC = 2,
+ Table_TableOptions_RowType_ROW_TYPE_COMPRESSED = 3,
+ Table_TableOptions_RowType_ROW_TYPE_REDUNDANT = 4,
+ Table_TableOptions_RowType_ROW_TYPE_COMPACT = 5,
+ Table_TableOptions_RowType_ROW_TYPE_PAGE = 6
+};
+
+namespace google {
+namespace protobuf {
+template <>
+inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
+ return Table_TableOptions_RowType_descriptor();
+}
+}
+}
+ ])],
+ [ac_cv_safe_to_use_Wattributes_=yes],
+ [ac_cv_safe_to_use_Wattributes_=no])
+ CXXFLAGS="${save_CXXFLAGS}"
+ AC_LANG_POP()])
+ AC_CACHE_CHECK([whether it is safe to use -Wno-attributes],
+ [ac_cv_safe_to_use_Wno_attributes_],
+ [save_CFLAGS="$CFLAGS"
+ CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+ ]], [[]])
+ ],
+ [ac_cv_safe_to_use_Wno_attributes_=yes],
+ [ac_cv_safe_to_use_Wno_attributes_=no])
+ CFLAGS="$save_CFLAGS"])
+
+ dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off
+ dnl by using that.
+ AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[
+ AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[
+ CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
+ NO_ATTRIBUTES="-Wno-attributes"])])
+
+
+ NO_REDUNDANT_DECLS="-Wno-redundant-decls"
+ dnl TODO: Figure out a better way to deal with this:
+ PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
+ NO_WERROR="-Wno-error"
+ PERMISSIVE_WARNINGS="-Wno-error -Wno-unused-function -fpermissive"
+ PERMISSIVE_C_WARNINGS="-Wno-error -Wno-redundant-decls"
+ AS_IF([test "$host_vendor" = "apple"],[
+ BOOSTSKIP_WARNINGS="-Wno-uninitialized"
+ ])
+ ])