2002-04-25 23:14:43 +00:00
|
|
|
dnl $Id$
|
|
|
|
|
|
|
|
PHP_ARG_ENABLE(sysvmsg,whether to enable System V IPC support,
|
2002-09-19 20:14:58 +00:00
|
|
|
[ --enable-sysvmsg Enable sysvmsg support])
|
2002-04-25 23:14:43 +00:00
|
|
|
|
|
|
|
if test "$PHP_SYSVMSG" != "no"; then
|
2002-09-10 13:04:08 +00:00
|
|
|
AC_MSG_CHECKING([whether sys/msg.h defines struct msgbuf or mymsg])
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/ipc.h>
|
|
|
|
#include <sys/msg.h>],
|
|
|
|
[struct msgbuf *foo;
|
|
|
|
|
2002-09-19 20:14:58 +00:00
|
|
|
foo = (struct msgbuf *) malloc(sizeof(struct msgbuf*) +1);
|
2002-09-10 13:04:08 +00:00
|
|
|
return 1;],
|
|
|
|
[AC_MSG_RESULT(msgbuf)],
|
|
|
|
[AC_TRY_COMPILE(
|
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/ipc.h>
|
|
|
|
#include <sys/msg.h>
|
|
|
|
],
|
|
|
|
[struct mymsg *foo;
|
|
|
|
|
2002-09-19 20:14:58 +00:00
|
|
|
foo = (struct mymsg *) malloc(sizeof(struct mymsg*) +1);
|
2002-09-10 13:04:08 +00:00
|
|
|
return 1;
|
|
|
|
],
|
|
|
|
[AC_DEFINE(msgbuf, mymsg, [msgbuf is called mymsg])
|
|
|
|
AC_MSG_RESULT(mymsg)
|
|
|
|
],
|
|
|
|
[AC_MSG_ERROR([none. Cannot make sysvmsg module])
|
|
|
|
])
|
|
|
|
])
|
2002-04-25 23:14:43 +00:00
|
|
|
AC_DEFINE(HAVE_SYSVMSG, 1, [ ])
|
|
|
|
PHP_NEW_EXTENSION(sysvmsg, sysvmsg.c, $ext_shared)
|
|
|
|
fi
|