]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-configure-enable-warnings-20080228
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 29 Feb 2008 15:28:31 +0000 (15:28 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 29 Feb 2008 15:28:31 +0000 (15:28 +0000)
LICENSE IPL10

add a switch to turn on warnings when using gcc

(cherry picked from commit 737c03a75c62b3cd0ec92b33aea84d33dc39c2e7)

acinclude.m4
src/cf/osconf.m4

index 1cd266d68cabcde8068bc46791c6057c66690f1d..1d50b4f786bffe78b93138790090f0a9ae42e45f 100644 (file)
@@ -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"
 
index 89858387687eb63be1323c5085114a4c06437542..b8daa6a2082560b5931b1307dac8890d4785f0d6 100644 (file)
@@ -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)