diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-12 00:39:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 00:39:15 (GMT) |
commit | 37990e63c4751493f9c2af8c46e0c230a49e286f (patch) | |
tree | dbe241604568f4372ab7ee3948335010c309b2d0 | |
parent | a64d3a989adc512305c8f2bbdd1cb29ff16a192a (diff) | |
download | hdf5-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.
-rw-r--r-- | config/cmake/H5pubconf.h.in | 4 | ||||
-rw-r--r-- | configure.ac | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 4c80cd3..a5f0b05 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -14,13 +14,13 @@ #ifndef H5_CONFIG_H_ #define H5_CONFIG_H_ -/* Define if the Windows virtual file driver should be compiled */ +/* Define if this is a Windows machine */ #cmakedefine H5_HAVE_WINDOWS @H5_HAVE_WINDOWS@ /* Define if using MinGW */ #cmakedefine H5_HAVE_MINGW @H5_HAVE_MINGW@ -/* Define if on the Windows platform and default WIN32 API */ +/* Define if on the Windows platform and using the Win32 API */ #cmakedefine H5_HAVE_WIN32_API @H5_HAVE_WIN32_API@ /* Define if using a Windows compiler (i.e. Visual Studio) */ 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 |