2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
2000-07-03 12:35:57 +08:00
|
|
|
dnl $Id$
|
2001-12-01 03:00:13 +08:00
|
|
|
dnl
|
2000-07-03 12:35:57 +08:00
|
|
|
|
|
|
|
PHP_ARG_ENABLE(sockets, whether to enable sockets support,
|
2003-06-19 16:41:51 +08:00
|
|
|
[ --enable-sockets Enable sockets support])
|
2000-07-03 12:35:57 +08:00
|
|
|
|
|
|
|
if test "$PHP_SOCKETS" != "no"; then
|
2003-04-04 23:42:54 +08:00
|
|
|
dnl Check for struct cmsghdr
|
|
|
|
AC_CACHE_CHECK([for struct cmsghdr], ac_cv_cmsghdr,
|
|
|
|
[
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>], [struct cmsghdr s; s], ac_cv_cmsghdr=yes, ac_cv_cmsghdr=no)
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "$ac_cv_cmsghdr" = yes; then
|
|
|
|
AC_DEFINE(HAVE_CMSGHDR,1,[Whether you have struct cmsghdr])
|
|
|
|
fi
|
2000-07-03 12:35:57 +08:00
|
|
|
|
2002-05-13 01:28:12 +08:00
|
|
|
AC_CHECK_FUNCS([hstrerror])
|
|
|
|
AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h errno.h])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2002-09-04 22:30:36 +08:00
|
|
|
], [static struct msghdr tp; int n = (int) tp.msg_flags; return n],[],
|
2002-05-13 01:28:12 +08:00
|
|
|
[AC_DEFINE(MISSING_MSGHDR_MSGFLAGS, 1, [ ])]
|
|
|
|
)
|
|
|
|
AC_DEFINE([HAVE_SOCKETS], 1, [ ])
|
2001-04-04 08:06:49 +08:00
|
|
|
|
2002-05-13 01:28:12 +08:00
|
|
|
PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
|
2000-07-03 12:35:57 +08:00
|
|
|
fi
|
2003-07-08 11:38:00 +08:00
|
|
|
|
|
|
|
PHP_CHECK_FUNC(gethostbyname2)
|
|
|
|
|