summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-06-19 13:45:12 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-06-19 13:45:12 (GMT)
commit25a711fdce5817895f76d52115f948b2ba4645b4 (patch)
treeaad3d36843642fc0e0468f42931dae6b056e48a3
parentb52c3aea3b7687aa1b5e9149b23c282049b11fb1 (diff)
downloadhdf5-25a711fdce5817895f76d52115f948b2ba4645b4.zip
hdf5-25a711fdce5817895f76d52115f948b2ba4645b4.tar.gz
hdf5-25a711fdce5817895f76d52115f948b2ba4645b4.tar.bz2
[svn-r22474] Add check for MINGW - ws2_32 library
Tested: windows - mingw
-rw-r--r--config/cmake/H5pubconf.h.in3
-rwxr-xr-xconfigure65
-rw-r--r--configure.in4
-rw-r--r--src/H5config.h.in3
4 files changed, 74 insertions, 1 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 208ad18..d0a182b 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@
diff --git a/configure b/configure
index 993f58b..3a0aa2b 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Id: configure.in 22449 2012-06-10 23:40:40Z hdftest .
+# From configure.in Id: configure.in 22451 2012-06-11 16:12:49Z byrn .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for HDF5 1.8.10-snap4.
#
@@ -22281,6 +22281,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 7363eee..75d30aa 100644
--- a/configure.in
+++ b/configure.in
@@ -1298,6 +1298,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 1dbb545..900e96e 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -221,6 +221,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