diff --git a/configure b/configure index 9cf76fe484..a3a878c241 100755 --- a/configure +++ b/configure @@ -16725,6 +16725,22 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64bit file io" >&5 $as_echo_n "checking for 64bit file io... " >&6; } + case "${host_os}" in + *mingw*) + with_unix_stdio_64=no + +cat >>confdefs.h <<_ACEOF +#define VSI_STAT64 _stat64 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VSI_STAT64_T __stat64 +_ACEOF + + ;; + esac + if test x"$with_unix_stdio_64" = x"yes" ; then VSI_FTELL64=ftell64 VSI_FSEEK64=fseek64 @@ -22751,6 +22767,7 @@ $as_echo_n "checking for Xerces C++ Parser... " >&6; } HAVE_XERCES="yes" else + XERCES_CFLAGS="" HAVE_XERCES="no" fi @@ -25676,6 +25693,10 @@ else fi + if test x"$HAVE_GEOS" = "xno"; then + GEOS_CFLAGS="" + fi + CFLAGS="${ax_save_CFLAGS}" LIBS="${ax_save_LIBS}" diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index b3ad8d0658..8f24a919ed 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -95,6 +95,15 @@ AC_DEFUN([AC_UNIX_STDIO_64], AC_MSG_CHECKING([for 64bit file io]) + dnl Special case when using mingw cross compiler. + case "${host_os}" in + *mingw*) + with_unix_stdio_64=no + AC_DEFINE_UNQUOTED(VSI_STAT64,_stat64, [Define to name of 64bit stat function]) + AC_DEFINE_UNQUOTED(VSI_STAT64_T,__stat64, [Define to name of 64bit stat structure]) + ;; + esac + if test x"$with_unix_stdio_64" = x"yes" ; then VSI_FTELL64=ftell64 VSI_FSEEK64=fseek64 diff --git a/m4/ax_lib_xerces.m4 b/m4/ax_lib_xerces.m4 index 99d9cadbaf..d2cc745136 100644 --- a/m4/ax_lib_xerces.m4 +++ b/m4/ax_lib_xerces.m4 @@ -196,7 +196,8 @@ XMLPlatformUtils::Initialize(); AC_SUBST([XERCES_LDFLAGS]) HAVE_XERCES="yes" - else + else + XERCES_CFLAGS="" HAVE_XERCES="no" fi diff --git a/m4/geos.m4 b/m4/geos.m4 index 4f332474ef..c3f5067e58 100644 --- a/m4/geos.m4 +++ b/m4/geos.m4 @@ -137,6 +137,10 @@ AC_DEFUN([GEOS_INIT],[ [] ) + if test x"$HAVE_GEOS" = "xno"; then + GEOS_CFLAGS="" + fi + CFLAGS="${ax_save_CFLAGS}" LIBS="${ax_save_LIBS}"