summaryrefslogtreecommitdiff
path: root/ext/sockets/config.m4
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-05-12 17:28:12 +0000
committerSascha Schumann <sas@php.net>2002-05-12 17:28:12 +0000
commit226e1ed246bc5e1db71bacad985ab47763931d18 (patch)
tree786b59b129c34b15b883a778f9a5f79d252ef2ca /ext/sockets/config.m4
parent94a365964244248615432364926f6d7c9280d43b (diff)
downloadphp-git-226e1ed246bc5e1db71bacad985ab47763931d18.tar.gz
As far as I can tell, the AC_CHECK_MEMBER could not succeed,
because it does not include <sys/socket.h> which is necessary for the definition of struct msghdr. This include file is not part of ac_includes_default. Regardless, AC_CHECK_MEMBER is a autoconf-2.5x macro and thus we expand it here for 2.13 compatibility.
Diffstat (limited to 'ext/sockets/config.m4')
-rw-r--r--ext/sockets/config.m415
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4
index 3229fce907..cdfa985aef 100644
--- a/ext/sockets/config.m4
+++ b/ext/sockets/config.m4
@@ -7,10 +7,15 @@ PHP_ARG_ENABLE(sockets, whether to enable sockets support,
if test "$PHP_SOCKETS" != "no"; then
- AC_CHECK_FUNCS(hstrerror)
- AC_CHECK_HEADERS(netdb.h netinet/tcp.h sys/un.h errno.h)
- AC_CHECK_MEMBER(struct msghdr.msg_flags, , AC_DEFINE(MISSING_MSGHDR_MSGFLAGS, 1, [ ]))
- AC_DEFINE(HAVE_SOCKETS, 1, [ ])
+ 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>
+ ], [static struct msghdr tp; int n = (int) tp.msg_flags; return n],
+ [AC_DEFINE(MISSING_MSGHDR_MSGFLAGS, 1, [ ])]
+ )
+ AC_DEFINE([HAVE_SOCKETS], 1, [ ])
- PHP_NEW_EXTENSION(sockets, sockets.c, $ext_shared)
+ PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
fi