the socklen_t check is more involved now, but works on linux at least

This commit is contained in:
Daniel Stenberg 2001-03-09 15:38:59 +00:00
parent 26cd8eda4a
commit 11693c0faa
1 changed files with 21 additions and 2 deletions

View File

@ -693,8 +693,27 @@ AC_CHECK_SIZEOF(long long, 4)
# check for ssize_t
AC_CHECK_TYPE(ssize_t, int)
# check for socklen_t (getsockname() wants that)
AC_CHECK_TYPE(socklen_t, int)
dnl
dnl We can't just AC_CHECK_TYPE() for socklen_t since it doesn't appear
dnl in the standard headers. We egrep for it in the socket headers and
dnl if it is used there we assume we have the type defined, otherwise
dnl we search for it with AC_CHECK_TYPE() the "normal" way
dnl
if test "$ac_cv_header_sys_socket_h" = "yes"; then
AC_MSG_CHECKING(for socklen_t in sys/socket.h)
AC_EGREP_HEADER(socklen_t,
sys/socket.h,
socklen_t=yes
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
fi
if test "$socklen_t" != "yes"; then
# check for socklen_t the standard way if it wasn't found before
AC_CHECK_TYPE(socklen_t, int)
fi
dnl Get system canonical name
AC_CANONICAL_HOST