summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-12 00:39:15 (GMT)
committerGitHub <noreply@github.com>2023-06-12 00:39:15 (GMT)
commit37990e63c4751493f9c2af8c46e0c230a49e286f (patch)
treedbe241604568f4372ab7ee3948335010c309b2d0 /configure.ac
parenta64d3a989adc512305c8f2bbdd1cb29ff16a192a (diff)
downloadhdf5-37990e63c4751493f9c2af8c46e0c230a49e286f.zip
hdf5-37990e63c4751493f9c2af8c46e0c230a49e286f.tar.gz
hdf5-37990e63c4751493f9c2af8c46e0c230a49e286f.tar.bz2
Make some changes to configure.ac to suppor MinGW (#3096)
Adds some H5pubconf.h entries and cpp flags for building on MinGW using the Autotools. Also updates the Windows-related H5pubconf.h comments to be more accurate in CMake.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a545435..7e4addc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1461,7 +1461,12 @@ case "$host_cpu-$host_vendor-$host_os" in
## VFD on Linux systems.
H5_CPPFLAGS="-D_GNU_SOURCE $H5_CPPFLAGS"
;;
-
+ *mingw*)
+ AC_DEFINE([HAVE_WINDOWS], [1], [Define if this is a Windows machine])
+ AC_DEFINE([HAVE_WIN32_API], [1], [Define if on the Windows platform using the Win32 API])
+ AC_DEFINE([HAVE_MINGW], [1], [Define if using MinGW])
+ H5_CPPFLAGS="-D_GNU_SOURCE -D__USE_MINGW_ANSI_STDIO $H5_CPPFLAGS"
+ ;;
esac
## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible