]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Avoid compiling autoconf test programs with -Wall -Werror; doing so causes
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 30 Aug 2009 13:16:50 +0000 (13:16 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 30 Aug 2009 13:16:50 +0000 (13:16 +0000)
trouble on Ubuntu, where the Gtk test programs don't check the return value
from system() and thus fall foul of the combination of our -Werror and
<https://wiki.ubuntu.com/CompilerFlags#-D_FORTIFY_SOURCE=2>.

[originally from svn r8638]

mkfiles.pl
unix/configure.ac

index 75cb538bf11e89f59b3f102b7a730bdb47161e83..9466ffecab3b99ad6086530375cae7176f31fb79 100755 (executable)
@@ -1078,7 +1078,8 @@ if (defined $makefiles{'ac'}) {
     "\n".
     "CC = \@CC\@\n".
     "\n".
-    &splitline("CFLAGS = \@CFLAGS\@ \@CPPFLAGS\@ \@DEFS\@ \@GTK_CFLAGS\@ " .
+    &splitline("CFLAGS = \@CFLAGS\@ \@PUTTYCFLAGS\@ \@CPPFLAGS\@ " .
+               "\@DEFS\@ \@GTK_CFLAGS\@ " .
               (join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
     "XLDFLAGS = \@LDFLAGS\@ \@LIBS\@ \@GTK_LIBS\@\n".
     "ULDFLAGS = \@LDFLAGS\@ \@LIBS\@\n".
index fc16350ce925475c2781501d93cc37d277ada7a6..dcbc15353b4913510457d5997e8ca0e11dc9716d 100644 (file)
@@ -11,8 +11,11 @@ AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
 AC_PROG_INSTALL
 AC_PROG_CC
 if test "X$GCC" = Xyes; then
-    CFLAGS="$CFLAGS -Wall -Werror"
+    PUTTYCFLAGS="-Wall -Werror"
+else
+    PUTTYCFLAGS=""
 fi
+AC_SUBST(PUTTYCFLAGS)
 
 AC_ARG_WITH(gssapi,
 [  --without-gssapi        disable GSS-API support])