summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfaxguy <faxguy>2015-06-14 22:55:16 +0000
committerfaxguy <faxguy>2015-06-14 22:55:16 +0000
commitefffab3dacbf88b8b437cd43775cc404c408c2cd (patch)
treeeab7b24f31073615af5275a778b2497695d7c7ec /configure.ac
parent6298a0db7a3f5b7c5e5d6dfcc97f0aa7cf626ec1 (diff)
downloadlibtiff-efffab3dacbf88b8b437cd43775cc404c408c2cd.tar.gz
From Ludolf Holzheid on Bugzilla Bug #2498:
Attached is a patch that adds a configure option to select the file I/O style on Windows hosts. It defaults to --enable-win32-io on all windows targets other than Cygwin and to --disable-win32-io on Cygwin, and thus should be backwards-compatible. This allows programs using the Unix file I/O style (such as Netpbm's tifftopnm) to link against libtiff if configured for e.g. MinGW.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7c6459ab..608d41e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -841,17 +841,28 @@ dnl this must be after the ogl test, since that looks for windows.h and we
dnl test it
dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(win32-io,
+ AS_HELP_STRING([--disable-win32-io],
+ [disable Win32 I/O (Windows only, enabled by default except for Cygwin)]),,)
+
win32_io_ok=no
case "${host_os}" in
cygwin*)
+ if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then
+ win32_io_ok=yes
+ fi
;;
*)
- if test x"$ac_cv_header_windows_h" = xyes; then
+ if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then
win32_io_ok=yes
- AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system])
fi
;;
esac
+
+if test "$win32_io_ok" = "yes" ; then
+ AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system])
+fi
+
AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes])
dnl ---------------------------------------------------------------------------