From: Will Fiveash Date: Tue, 18 Jul 2017 23:24:18 +0000 (-0500) Subject: Allow WARN_CFLAGS override for Solaris X-Git-Tag: krb5-1.16-beta1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96d049903bdf465147f74b24cf5f8e8f5843e11e;p=thirdparty%2Fkrb5.git Allow WARN_CFLAGS override for Solaris In aclocal.m4, do not set WARN_CFLAGS and WARN_CXXFLAGS for the Solaris native compiler if those variables were already set by the user. (We already did the same for gcc warning flags.) [ghudson@mit.edu: rewrote commit message] --- diff --git a/src/aclocal.m4 b/src/aclocal.m4 index a6c188d2db..d6d1279c3f 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -630,8 +630,16 @@ else # works, but it also means that declaration-in-code warnings won't # be issued. # -v -fd -errwarn=E_DECLARATION_IN_CODE ... - WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED" - WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64" + if test "x$krb5_ac_warn_cflags_set" = xset ; then + AC_MSG_NOTICE(not adding extra warning flags because WARN_CFLAGS was set) + else + WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION,E_BAD_PTR_INT_COMB_ARG,E_PTR_TO_VOID_IN_ARITHMETIC,E_NO_IMPLICIT_DECL_ALLOWED,E_ATTRIBUTE_PARAM_UNDEFINED" + fi + if test "x$krb5_ac_warn_cxxflags_set" = xset ; then + AC_MSG_NOTICE(not adding extra warning flags because WARN_CXXFLAGS was set) + else + WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64" + fi fi fi AC_SUBST(WARN_CFLAGS)