]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Allow WARN_CFLAGS override for Solaris 680/head
authorWill Fiveash <will.fiveash@oracle.com>
Tue, 18 Jul 2017 23:24:18 +0000 (18:24 -0500)
committerGreg Hudson <ghudson@mit.edu>
Mon, 24 Jul 2017 15:18:03 +0000 (11:18 -0400)
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]

src/aclocal.m4

index a6c188d2db4a8473b32bab0dfe3b53409c36c975..d6d1279c3f4f417c9222d69267b46ebe1706eb27 100644 (file)
@@ -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)