]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Add '-Wall -Werror' to the compile options in the autotools makefile,
authorSimon Tatham <anakin@pobox.com>
Thu, 19 Jul 2012 04:42:34 +0000 (04:42 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 19 Jul 2012 04:42:34 +0000 (04:42 +0000)
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.)

[originally from svn r9583]

mkfiles.pl
unix/configure.ac

index b38a218b50566e829126c526cf1e7249adb627e0..7cb42fb6cc38e09bd5735cd29b0207b64f8dd0da 100755 (executable)
@@ -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";
index 930f3e379146e2135a5fb68182aa4d09b1676b30..f9fe51fed88ff9b55b21bb28bf081e48c8b65af6 100644 (file)
@@ -122,6 +122,14 @@ AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
 AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
 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 <<EOF