Add '-Wall -Werror' to the compile options in the autotools makefile,
[u/mdw/putty] / unix / configure.ac
index a518540..f9fe51f 100644 (file)
@@ -119,6 +119,16 @@ AC_CHECK_LIB(X11, XOpenDisplay,
               AC_DEFINE([HAVE_LIBX11],[],[Define if libX11.a is available])])
 
 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