DEVEL15-configure-enable-warnings-20080228

LICENSE IPL10

add a switch to turn on warnings when using gcc


(cherry picked from commit 737c03a75c62b3cd0ec92b33aea84d33dc39c2e7)
This commit is contained in:
Simon Wilkinson 2008-02-29 15:13:04 +00:00 committed by Derrick Brashear
parent 47064e9243
commit 20136421a0
2 changed files with 9 additions and 0 deletions

View File

@ -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"

View File

@ -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)