2
0
mirror of https://github.com/HDFGroup/hdf5.git synced 2025-04-12 17:31:09 +08:00

[svn-r22471] Add check for MINGW - ws2_32 library

Tested: windows - mingw
This commit is contained in:
Allen Byrne 2012-06-18 15:01:59 -05:00
parent 860fe3d4d7
commit 9b63d7d513
4 changed files with 74 additions and 1 deletions

@ -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@

65
configure vendored

@ -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.
#
@ -22270,6 +22270,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

@ -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])
;;

@ -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