diff options
-rw-r--r-- | config/cmake/H5pubconf.h.in | 3 | ||||
-rwxr-xr-x | configure | 65 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | src/H5config.h.in | 3 |
4 files changed, 74 insertions, 1 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 0c6cc0b..6fca1ae 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -260,6 +260,9 @@ /* Define to 1 if you have the `sz' library (-lsz). */ #cmakedefine H5_HAVE_LIBSZ @H5_HAVE_LIBSZ@ +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#cmakedefine H5_HAVE_LIBWS2_32 @H5_HAVE_LIBWS2_32@ + /* Define to 1 if you have the `z' library (-lz). */ #cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@ @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 22430 2012-06-04 17:05:02Z byrn . +# From configure.in Id: configure.in 22448 2012-06-10 13:53:06Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.9.122. # @@ -22271,6 +22271,69 @@ fi done ;; + MINGW*) + for ac_header in io.h winsock2.h sys/timeb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32_main=yes +else + ac_cv_lib_ws2_32_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + + LIBS="-lws2_32 $LIBS" + +fi +ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main + + ;; *) for ac_header in io.h winsock2.h sys/timeb.h do : diff --git a/configure.in b/configure.in index 3dc354b..6f8a3e9 100644 --- a/configure.in +++ b/configure.in @@ -1286,6 +1286,10 @@ case "`uname`" in CYGWIN*) AC_CHECK_HEADERS([io.h sys/timeb.h]) ;; + MINGW*) + AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) + AC_HAVE_LIBRARY([ws2_32]) + ;; *) AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) ;; diff --git a/src/H5config.h.in b/src/H5config.h.in index 6176b33..a2b75df 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -217,6 +217,9 @@ /* Define to 1 if you have the `sz' library (-lsz). */ #undef HAVE_LIBSZ +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#undef HAVE_LIBWS2_32 + /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ |