From ccdc78ec32b3cc128e062fddef6b0914640be573 Mon Sep 17 00:00:00 2001 From: Lee Howard Date: Wed, 15 Dec 2010 00:37:00 +0000 Subject: [PATCH] * configure.ac, libtiff/Makefile.am: Build tif_win32.c on Windows except on Cygwin http://bugzilla.maptools.org/show_bug.cgi?id=2224 --- ChangeLog | 6 ++++++ configure.ac | 20 ++++++++++++++++++++ libtiff/Makefile.am | 12 +++++++++--- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57865d15..c9907660 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-12-14 Lee Howard + + * configure.ac, libtiff/Makefile.am: Build tif_win32.c on + Windows except on Cygwin + http://bugzilla.maptools.org/show_bug.cgi?id=2224 + 2010-12-14 Lee Howard * tools/gif2tiff.c: fix buffer overrun diff --git a/configure.ac b/configure.ac index cd892bd9..fd4fcb4e 100644 --- a/configure.ac +++ b/configure.ac @@ -776,6 +776,25 @@ fi AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes") +dnl --------------------------------------------------------------------------- +dnl Check for Win32 IO: make sure we have windows.h but not cygwin +dnl this must be after the ogl test, since that looks for windows.h and we +dnl test it +dnl --------------------------------------------------------------------------- + +win32_io_ok=no +case "${host_os}" in + cygwin*) + ;; + *) + if test x"$ac_cv_header_windows_h" = xyes; then + win32_io_ok=yes + AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system]) + fi + ;; +esac +AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes]) + dnl --------------------------------------------------------------------------- dnl Check for X Athena Widgets dnl --------------------------------------------------------------------------- @@ -898,6 +917,7 @@ LOC_MSG([ C compiler: ${CC} ${CFLAGS}]) LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}]) LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}]) LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}]) +LOC_MSG([ Use win32 IO: ${win32_io_ok}]) LOC_MSG() LOC_MSG([ Support for internal codecs:]) LOC_MSG([ CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}]) diff --git a/libtiff/Makefile.am b/libtiff/Makefile.am index 5f4f4b93..48306a1e 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,14 @@ 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