86 |
|
|
87 |
# Check for a windows build. |
# Check for a windows build. |
88 |
case $host in |
case $host in |
89 |
*mingw*|*cygwin*) windows=yes ;; |
*mingw*|*cygwin*) windows=yes ;; |
90 |
*) windows=no ;; |
*) windows=no ;; |
91 |
esac |
esac |
92 |
AM_CONDITIONAL(WINDOWS, test "x$windows" = "xyes") |
AM_CONDITIONAL(WINDOWS, test "x$windows" = "xyes") |
93 |
|
|
94 |
# Checks for standard header files. |
# Checks for standard header files. |
95 |
AC_HEADER_STDC |
AC_HEADER_STDC |
96 |
|
|
97 |
|
# Checks for standard headers and functions. |
98 |
if test "x$windows" = "xno"; then |
if test "x$windows" = "xno"; then |
99 |
AC_CHECK_HEADERS( |
AC_CHECK_HEADERS( |
100 |
[netdb.h arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h unistd.h], |
[netdb.h arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h unistd.h], |
101 |
[], [ac_headers_h="no"]) |
[], [ac_headers_h="no"]) |
102 |
else |
if test "x$ac_headers_h" = "xno"; then |
103 |
AC_CHECK_HEADERS([winsock.h], [], [ac_headers_h="no"]) |
AC_MSG_ERROR([*** Standard headers not found.]) |
104 |
fi |
fi |
|
if test "x$ac_headers_h" = "xno"; then |
|
|
AC_MSG_ERROR([*** Standard headers not found.]) |
|
|
fi |
|
|
|
|
|
# Checks for standard functions. |
|
|
if test "x$windows" = "xno"; then |
|
105 |
AC_CHECK_FUNCS( |
AC_CHECK_FUNCS( |
106 |
[socket connect bind listen setsockopt getsockopt getsockname gethostbyname], |
[socket connect bind listen setsockopt getsockopt getsockname gethostbyname], |
107 |
[], [ac_funcs_c="no"]) |
[], [ac_funcs_c="no"]) |
108 |
if test "x$ac_funcs_c" = "xno"; then |
if test "x$ac_funcs_c" = "xno"; then |
109 |
AC_MSG_ERROR([*** Standard functions not found.]) |
AC_MSG_ERROR([*** Standard functions not found.]) |
110 |
fi |
fi |