]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Move the -I options for all our source subdirectories out of AM_CFLAGS
authorSimon Tatham <anakin@pobox.com>
Mon, 7 Jan 2013 19:08:33 +0000 (19:08 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 7 Jan 2013 19:08:33 +0000 (19:08 +0000)
and into AM_CPPFLAGS. This is more conceptually sensible according to
my reading of the automake manual, and also has the specific desirable
effect that they move to the front of the command line, ahead of any
'system' type -I options that autoconf might have felt a need for.

A user reported that autoconf had added -I/usr/local/include to their
command line for the sake of a required header file, but their
/usr/local/include also turned out to include a thing called 'proxy.h'
(from libproxy, nothing to do with us) which shadowed our own proxy.h
and caused a build failure. This should fix that.

[originally from svn r9736]

mkfiles.pl

index b52bf91d95fc977330e9f4f93931686032354f7c..fd543eb0da1a4392100917c506fffbe3d68a8ee0 100755 (executable)
@@ -1155,7 +1155,10 @@ if (defined $makefiles{'am'}) {
       $objtosrc{$d->{obj}} = $d->{deps}->[0];
     }
 
-    @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", "\$(WARNINGOPTS)", map {"-I$dirpfx$_"} @srcdirs);
+    print &splitline(join " ", "AM_CPPFLAGS", "=",
+                     map {"-I$dirpfx$_"} @srcdirs), "\n";
+
+    @amcflags = ("\$(COMPAT)", "\$(XFLAGS)", "\$(WARNINGOPTS)");
     print "if HAVE_GTK\n";
     print &splitline(join " ", "AM_CFLAGS", "=",
                      "\$(GTK_CFLAGS)", @amcflags), "\n";