Avoid compiling autoconf test programs with -Wall -Werror; doing so causes
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 30 Aug 2009 13:16:50 +0000 (13:16 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
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>.

git-svn-id: svn://svn.tartarus.org/sgt/putty@8638 cda61777-01e9-0310-a592-d414129be87e

mkfiles.pl
unix/configure.ac

index 75cb538..9466ffe 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 fc16350..dcbc153 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])