From 1243f7c9813006bb65e9cdd9717c4d0673edde4c Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 29 Feb 2008 15:28:31 +0000 Subject: [PATCH] STABLE14-configure-enable-warnings-20080228 LICENSE IPL10 add a switch to turn on warnings when using gcc (cherry picked from commit 737c03a75c62b3cd0ec92b33aea84d33dc39c2e7) --- acinclude.m4 | 3 +++ src/cf/osconf.m4 | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 1cd266d68..1d50b4f78 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -82,6 +82,9 @@ AC_ARG_ENABLE(debug-lwp, AC_ARG_ENABLE(optimize-lwp, [ --disable-optimize-lwp disable optimization for compilation of the LWP code (defaults to enabled)],, enable_optimize_lwp="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 898583876..b8daa6a20 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -1091,6 +1091,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) -- 2.39.5