2010.05.20 08:23 "[Tiff] [PATCH] tiff2ps: Ability to specify document title", by Thomas Jarosch

2010.06.18 17:46 "[Tiff] [PATCH] Build tif_win32.c on Windows except on Cygwin", by Adam Goode

On 06/18/2010 09:44 AM, Edward Lam wrote:

> Adam Goode wrote:
>>

>> I could put together a patch to the autotools stuff to pick tif_win32.c >> on Windows. Then we just need to fix bug 1941.

>
> That would be a nice patch.

Here's a patch, can someone apply it?

Adam

---

 configure.ac        |   12 ++++++++++++
 libtiff/Makefile.am |   13 ++++++++++---

 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 954a0c5..2d8743b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,6 +147,18 @@ AC_TYPE_SIZE_T
 AC_HEADER_TIME
 AC_STRUCT_TM

+dnl Check for Win32 IO: make sure we have windows.h but not cygwin +case "${host_os}" in

+    cygwin*)
+        win32_io_ok=no
+        ;;
+    *)
+        win32_io_ok=yes
+        ;;
+esac
+AM_CONDITIONAL([WIN32_IO], [test x"$ac_cv_header_windows_h" != x -a "$win32_io_ok" = yes])
+
+

------------------------------------------------------------------------

 dnl Compute sized types for current CPU and compiler options

------------------------------------------------------------------------

diff --git a/libtiff/Makefile.am b/libtiff/Makefile.am
index 5f4f4b9..06cb871 100644
--- a/libtiff/Makefile.am
+++ b/libtiff/Makefile.am
@@ -34,8 +34,7 @@ EXTRA_DIST = Makefile.vc \
             tif_config.wince.h \

             tiffconf.vc.h \
             tiffconf.wince.h \
-            libtiff.def \
-            tif_win32.c
+            libtiff.def

 libtiffinclude_HEADERS = \
        tiff.h \
@@ -90,7 +89,6 @@ libtiff_la_SOURCES = \
        tif_swab.c \
        tif_thunder.c \
        tif_tile.c \
- tif_unix.c \
        tif_version.c \
        tif_warning.c \
        tif_write.c \
@@ -99,6 +97,15 @@ libtiff_la_SOURCES = \
 libtiffxx_la_SOURCES = \
        tif_stream.cxx

+
+if WIN32_IO
+EXTRA_DIST += tif_unix.c
+libtiff_la_SOURCES += tif_win32.c
+else
+EXTRA_DIST += tif_win32.c
+libtiff_la_SOURCES += tif_unix.c
+endif
+
 lib_LTLIBRARIES = libtiff.la
 if HAVE_CXX
 lib_LTLIBRARIES += libtiffxx.la
--
1.7.0.1