Commit 8daa3aae authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Enable more warnings when possible.

2007-03-26  William Jon McCann  <mccann@jhu.edu>

	* configure.ac: Enable more warnings when possible.


svn path=/trunk/; revision=4711
parent 96afc4f0
2007-03-26 William Jon McCann <mccann@jhu.edu>
* configure.ac: Enable more warnings when possible.
2006-03-23 Brian Cameron <brian.cameron@sun.com>
* docs/C/gdm.xml: A little more information added to Solaris
......
......@@ -1116,6 +1116,47 @@ if test "x$USER_POST_PATH" != "x"; then
GDM_USER_PATH="$GDM_USER_PATH:$USER_POST_PATH"
fi
# Turn on the additional warnings last, so they don't affect other tests.
AC_ARG_ENABLE(more-warnings,
AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
set_more_warnings="$enableval",[
if test -d $srcdir/.svn; then
set_more_warnings=yes
else
set_more_warnings=no
fi
])
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="\
-Wall \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wcast-align -Wsign-compare \
$CFLAGS"
for option in -Wno-strict-aliasing -Wno-sign-compare; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
if test $has_option = no; then
CFLAGS="$SAVE_CFLAGS"
fi
AC_MSG_RESULT($has_option)
unset has_option
unset SAVE_CFLAGS
done
unset option
else
AC_MSG_RESULT(no)
fi
# Set configuration choices.
#
AC_SUBST(HALT_COMMAND)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment