From: Simon Wilkinson Date: Fri, 29 Feb 2008 15:13:04 +0000 (+0000) Subject: DEVEL15-configure-enable-warnings-20080228 X-Git-Tag: openafs-devel-1_5_34~81 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=20136421a0fb75636de80f4134cbbc3f6508ad4e;p=packages%2Fo%2Fopenafs.git DEVEL15-configure-enable-warnings-20080228 LICENSE IPL10 add a switch to turn on warnings when using gcc (cherry picked from commit 737c03a75c62b3cd0ec92b33aea84d33dc39c2e7) --- diff --git a/acinclude.m4 b/acinclude.m4 index 64699d632..f80df55a3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -90,6 +90,9 @@ AC_ARG_ENABLE(debug-pam, AC_ARG_ENABLE(optimize-pam, [ --disable-optimize-pam disable optimization for compilation of the PAM code (defaults to enabled)],, enable_optimize_pam="yes" ) +AC_ARG_ENABLE(warnings, +[ --enable-warnings enable compilation warnings when building with gcc (defaults to disabled)],, enable_warnings="no" +) enable_login="no" diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 1a5197dac..0161f1f0d 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -1114,6 +1114,12 @@ else NO_STRIP_KRB=-ns fi +if test "x$enable_warnings" = "xyes"; then + if test "x$GCC" = "xyes"; then + XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition" + fi +fi + AC_SUBST(CCXPG2) AC_SUBST(CCOBJ) AC_SUBST(AFSD_LIBS)