2013-10-26 10:03:20 +00:00
|
|
|
QUNUSED_ARGUMENTS=""
|
|
|
|
WNO_SELF_ASSIGN=""
|
|
|
|
WNO_MISMATCHED_TAGS=""
|
|
|
|
WLOGICAL_OP=""
|
|
|
|
|
|
|
|
if test x"$ac_cv_compiler_is_clang" = xyes; then
|
|
|
|
QUNUSED_ARGUMENTS="-Qunused-arguments"
|
|
|
|
WNO_SELF_ASSIGN="-Wno-self-assign"
|
|
|
|
WNO_MISMATCHED_TAGS="-Wno-mismatched-tags"
|
2015-08-11 13:02:58 +00:00
|
|
|
FSTACK_PROTECTOR=""
|
2013-10-26 10:12:24 +00:00
|
|
|
|
2015-03-25 16:51:30 +00:00
|
|
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
|
|
|
AC_LANG_PUSH(C++)
|
|
|
|
|
|
|
|
CXXFLAGS="$ac_save_CXXFLAGS -Werror -Wno-inconsistent-missing-override"
|
|
|
|
AC_TRY_COMPILE([],[],[ WNO_INCONSISTENT_MISSING_OVERRIDE="-Wno-inconsistent-missing-override" ],[])
|
|
|
|
|
|
|
|
CXXFLAGS="$ac_save_CXXFLAGS -Werror -Wno-potentially-evaluated-expression"
|
|
|
|
AC_TRY_COMPILE([],[],[ WNO_POTENTIALLY_EVALUATED_EXPRESSION="-Wno-potentially-evaluated-expression" ],[])
|
|
|
|
|
|
|
|
AC_LANG_POP()
|
|
|
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
|
|
|
|
2015-05-23 17:28:57 +00:00
|
|
|
else
|
|
|
|
WNO_MAYBE_UNINITIALIZED="-Wno-maybe-uninitialized"
|
2015-08-11 13:02:58 +00:00
|
|
|
FSTACK_PROTECTOR="-fstack-protector"
|
2015-05-23 17:28:57 +00:00
|
|
|
|
2015-08-11 13:02:58 +00:00
|
|
|
if check_version 4.9.0 $ac_cv_gcc_version ; then
|
|
|
|
FSTACK_PROTECTOR="-fstack-protector-strong"
|
|
|
|
|
|
|
|
elif check_version 4.8.0 $ac_cv_gcc_version ; then
|
2015-05-23 17:28:57 +00:00
|
|
|
WLOGICAL_OP="-Wlogical-op"
|
|
|
|
fi
|
2013-10-26 10:03:20 +00:00
|
|
|
fi
|
|
|
|
|
2015-08-11 13:02:58 +00:00
|
|
|
AC_SUBST(FSTACK_PROTECTOR)
|
2013-10-26 10:03:20 +00:00
|
|
|
AC_SUBST(QUNUSED_ARGUMENTS)
|
|
|
|
AC_SUBST(WNO_SELF_ASSIGN)
|
|
|
|
AC_SUBST(WNO_MISMATCHED_TAGS)
|
|
|
|
AC_SUBST(WLOGICAL_OP)
|
2015-03-25 16:51:30 +00:00
|
|
|
AC_SUBST(WNO_INCONSISTENT_MISSING_OVERRIDE)
|
|
|
|
AC_SUBST(WNO_POTENTIALLY_EVALUATED_EXPRESSION)
|
2015-05-23 17:28:57 +00:00
|
|
|
AC_SUBST(WNO_MAYBE_UNINITIALIZED)
|