mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
[svn-r2815]
Purpose: Bugfix Description: Detect whether the 'struct socklen_t' type is defined in the system include header files. Solution: Added an AC_TRY_COMPILE test for 'struct socklen_t' to the configure script. This test is only executed if the Stream VFD is configured. Also added detection of <sys/types.h> and <sys/socket.h> system header files. Platforms tested: Solaris 2.6 and 2.7 IRIX64 Linux Windows NT (command line configure with gcc and cl)
This commit is contained in:
parent
8073cbe745
commit
36456dcccf
22
configure.in
22
configure.in
@ -385,6 +385,7 @@ AC_HEADER_STDC
|
||||
AC_HEADER_TIME
|
||||
dnl Unix
|
||||
AC_CHECK_HEADERS(sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h)
|
||||
AC_CHECK_HEADERS(sys/socket.h sys/types.h)
|
||||
AC_CHECK_HEADERS(stddef.h setjmp.h)
|
||||
AC_CHECK_HEADERS(stdint.h, C9x=yes)
|
||||
dnl Windows
|
||||
@ -798,6 +799,27 @@ case "$withval" in
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_CHECK_HEADERS(netinet/tcp.h)
|
||||
AC_DEFINE(HAVE_STREAM)
|
||||
|
||||
dnl Check if we have struct socklen_t available
|
||||
AC_MSG_CHECKING([if struct socklen_t is defined])
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
],
|
||||
[socklen_t foo; return 0;],
|
||||
AC_DEFINE(HAVE_STRUCT_SOCKLEN_T) AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(not configured)
|
||||
|
Loading…
x
Reference in New Issue
Block a user