From: simon Date: Thu, 19 Jul 2012 04:42:34 +0000 (+0000) Subject: Add '-Wall -Werror' to the compile options in the autotools makefile, X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/b8487fe0a21369fbb9e97616532f8395130bf18c?hp=f0f0ae7f27c50b0bc586d360da17f3cb05e9c467 Add '-Wall -Werror' to the compile options in the autotools makefile, having just noticed that Makefile.gtk had it and this one doesn't. (Of course, this being autoconf, we can easily enough make it conditional on the compiler actually being gcc.) git-svn-id: svn://svn.tartarus.org/sgt/putty@9583 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/mkfiles.pl b/mkfiles.pl index b38a218b..7cb42fb6 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -1155,7 +1155,7 @@ if (defined $makefiles{'am'}) { $objtosrc{$d->{obj}} = $d->{deps}->[0]; } - @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", map {"-I$dirpfx$_"} @srcdirs); + @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", "\$(WARNINGOPTS)", map {"-I$dirpfx$_"} @srcdirs); print "if HAVE_GTK\n"; print &splitline(join " ", "AM_CFLAGS", "=", "\$(GTK_CFLAGS)", @amcflags), "\n"; diff --git a/unix/configure.ac b/unix/configure.ac index 930f3e37..f9fe51fe 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -122,6 +122,14 @@ AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx]) AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include ]]) AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME],[],[Define if clock_gettime() is available])]) +if test "x$GCC" = "xyes"; then + : + AC_SUBST(WARNINGOPTS, ['-Wall -Werror']) +else + : + AC_SUBST(WARNINGOPTS, []) +fi + AC_OUTPUT if test "$gtk_version_desired" = "no"; then cat <