libtiff: Ensure that installed header files are not used in the build.

https://github.com/libsdl-org/libtiff/commit/34f214a21fa1ed6b8a1f604be34c0e81cf722f0b

From 34f214a21fa1ed6b8a1f604be34c0e81cf722f0b Mon Sep 17 00:00:00 2001
From: Bob Friesenhahn <[EMAIL REDACTED]>
Date: Thu, 1 Jan 2009 18:19:53 +0000
Subject: [PATCH] Ensure that installed header files are not used in the build.

---
 contrib/acorn/Makefile.am    | 1 +
 contrib/acorn/Makefile.in    | 1 +
 contrib/addtiffo/Makefile.am | 2 +-
 contrib/addtiffo/Makefile.in | 2 +-
 contrib/dbs/Makefile.am      | 3 +--
 contrib/dbs/Makefile.in      | 2 +-
 contrib/mfs/Makefile.am      | 1 +
 contrib/mfs/Makefile.in      | 1 +
 contrib/pds/Makefile.am      | 1 +
 contrib/pds/Makefile.in      | 1 +
 contrib/ras/Makefile.am      | 1 +
 contrib/ras/Makefile.in      | 1 +
 contrib/stream/Makefile.am   | 1 +
 contrib/stream/Makefile.in   | 1 +
 contrib/tags/Makefile.am     | 1 +
 contrib/tags/Makefile.in     | 1 +
 contrib/win_dib/Makefile.am  | 1 +
 contrib/win_dib/Makefile.in  | 1 +
 tools/Makefile.am            | 2 +-
 tools/Makefile.in            | 2 +-
 20 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/contrib/acorn/Makefile.am b/contrib/acorn/Makefile.am
index 3b5be71f..ca2b1320 100644
--- a/contrib/acorn/Makefile.am
+++ b/contrib/acorn/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = Makefile.acorn ReadMe SetVars cleanlib convert install
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
diff --git a/contrib/acorn/Makefile.in b/contrib/acorn/Makefile.in
index 3589809d..ee8d95d5 100644
--- a/contrib/acorn/Makefile.in
+++ b/contrib/acorn/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = Makefile.acorn ReadMe SetVars cleanlib convert install
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/addtiffo/Makefile.am b/contrib/addtiffo/Makefile.am
index aed05b82..f3158efa 100644
--- a/contrib/addtiffo/Makefile.am
+++ b/contrib/addtiffo/Makefile.am
@@ -32,5 +32,5 @@ noinst_PROGRAMS = addtiffo
 addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h
 addtiffo_LDADD = $(LIBTIFF)
 
-INCLUDES = -I$(top_srcdir)/libtiff
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 
diff --git a/contrib/addtiffo/Makefile.in b/contrib/addtiffo/Makefile.in
index b4a4f4be..a5f08bfc 100644
--- a/contrib/addtiffo/Makefile.in
+++ b/contrib/addtiffo/Makefile.in
@@ -244,7 +244,7 @@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la
 EXTRA_DIST = README Makefile.vc
 addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h
 addtiffo_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/dbs/Makefile.am b/contrib/dbs/Makefile.am
index 03464719..608a0adf 100644
--- a/contrib/dbs/Makefile.am
+++ b/contrib/dbs/Makefile.am
@@ -40,5 +40,4 @@ tiff_palette_LDADD = $(LIBTIFF)
 tiff_rgb_SOURCES = tiff-rgb.c
 tiff_rgb_LDADD = $(LIBTIFF)
 
-INCLUDES = -I$(top_srcdir)/libtiff
-
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
diff --git a/contrib/dbs/Makefile.in b/contrib/dbs/Makefile.in
index 5ebdc974..7f580354 100644
--- a/contrib/dbs/Makefile.in
+++ b/contrib/dbs/Makefile.in
@@ -272,7 +272,7 @@ tiff_palette_SOURCES = tiff-palette.c
 tiff_palette_LDADD = $(LIBTIFF)
 tiff_rgb_SOURCES = tiff-rgb.c
 tiff_rgb_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-recursive
 
 .SUFFIXES:
diff --git a/contrib/mfs/Makefile.am b/contrib/mfs/Makefile.am
index fb8a07e2..9a398c52 100644
--- a/contrib/mfs/Makefile.am
+++ b/contrib/mfs/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = README mfs_file.c
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
\ No newline at end of file
diff --git a/contrib/mfs/Makefile.in b/contrib/mfs/Makefile.in
index 23549bde..85223668 100644
--- a/contrib/mfs/Makefile.in
+++ b/contrib/mfs/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = README mfs_file.c
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/pds/Makefile.am b/contrib/pds/Makefile.am
index b3c145d5..2ead6a7e 100644
--- a/contrib/pds/Makefile.am
+++ b/contrib/pds/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
diff --git a/contrib/pds/Makefile.in b/contrib/pds/Makefile.in
index 480e369d..265055c5 100644
--- a/contrib/pds/Makefile.in
+++ b/contrib/pds/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/ras/Makefile.am b/contrib/ras/Makefile.am
index 94809447..c80acd02 100644
--- a/contrib/ras/Makefile.am
+++ b/contrib/ras/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = README ras2tif.c tif2ras.c
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
diff --git a/contrib/ras/Makefile.in b/contrib/ras/Makefile.in
index 08efe2df..143456b9 100644
--- a/contrib/ras/Makefile.in
+++ b/contrib/ras/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = README ras2tif.c tif2ras.c
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/stream/Makefile.am b/contrib/stream/Makefile.am
index 1e7a8dab..e98ae33c 100644
--- a/contrib/stream/Makefile.am
+++ b/contrib/stream/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = README tiffstream.cpp tiffstream.h
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
diff --git a/contrib/stream/Makefile.in b/contrib/stream/Makefile.in
index 50a60cd4..c0e691b7 100644
--- a/contrib/stream/Makefile.in
+++ b/contrib/stream/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = README tiffstream.cpp tiffstream.h
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/tags/Makefile.am b/contrib/tags/Makefile.am
index 9d92444f..cab05ff0 100644
--- a/contrib/tags/Makefile.am
+++ b/contrib/tags/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = README listtif.c maketif.c xtif_dir.c xtiffio.h xtiffiop.h
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
diff --git a/contrib/tags/Makefile.in b/contrib/tags/Makefile.in
index f014852e..86a4ff5d 100644
--- a/contrib/tags/Makefile.in
+++ b/contrib/tags/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = README listtif.c maketif.c xtif_dir.c xtiffio.h xtiffiop.h
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/contrib/win_dib/Makefile.am b/contrib/win_dib/Makefile.am
index 2bdccd0f..aaf846fc 100644
--- a/contrib/win_dib/Makefile.am
+++ b/contrib/win_dib/Makefile.am
@@ -25,3 +25,4 @@
 
 EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c
 
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
\ No newline at end of file
diff --git a/contrib/win_dib/Makefile.in b/contrib/win_dib/Makefile.in
index 730959a1..3ab8d75f 100644
--- a/contrib/win_dib/Makefile.in
+++ b/contrib/win_dib/Makefile.in
@@ -220,6 +220,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c
+INCLUDES = -I../../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES:
diff --git a/tools/Makefile.am b/tools/Makefile.am
index c2b735c4..0f3be93a 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -135,7 +135,7 @@ tiffgt_SOURCES = tiffgt.c
 tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS)
 tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS)
 
-INCLUDES = -I$(top_srcdir)/libtiff
+INCLUDES = -I../libtiff -I$(top_srcdir)/libtiff
 
 echo:
 	(echo $(CFLAGS))
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 6f522724..5f63d634 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -403,7 +403,7 @@ tiffsplit_LDADD = $(LIBTIFF) $(LIBPORT)
 tiffgt_SOURCES = tiffgt.c
 tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS)
 tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS)
-INCLUDES = -I$(top_srcdir)/libtiff
+INCLUDES = -I../libtiff -I$(top_srcdir)/libtiff
 all: all-am
 
 .SUFFIXES: