Turn on -Werror and -Wmissing-prototypes
When compiling with GCC turn on -Wmissing-prototypes, and by default turn on -Werror as well. As with most gnome modules: --enable-compile-warnings=minimum/maximum Can be used to disable -Werror (they are the same) http://bugzilla.gnome.org/show_bug.cgi?id=590998
This commit is contained in:
parent
354112fb41
commit
e89d3c7b07
34
configure.ac
34
configure.ac
@ -80,17 +80,31 @@ AC_SUBST(GIRDIR)
|
|||||||
TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||||
AC_SUBST(TYPELIBDIR)
|
AC_SUBST(TYPELIBDIR)
|
||||||
|
|
||||||
changequote(,)dnl
|
# Stay command-line compatible with the gnome-common configure option. Here
|
||||||
if test "x$GCC" = "xyes"; then
|
# minimum/yes/maximum are the same, however.
|
||||||
case " $CFLAGS " in
|
AC_ARG_ENABLE(compile_warnings,
|
||||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
|
||||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
[Turn on compiler warnings]),,
|
||||||
esac
|
enable_compile_warnings=error)
|
||||||
|
|
||||||
case " $OBJCFLAGS " in
|
changequote(,)dnl
|
||||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
if test "$enable_compile_warnings" != no ; then
|
||||||
*) OBJCFLAGS="$OBJCFLAGS -Wall" ;;
|
if test "x$GCC" = "xyes"; then
|
||||||
esac
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||||
|
esac
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
|
||||||
|
esac
|
||||||
|
if test "$enable_compile_warnings" = error ; then
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Werror[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Werror" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user