xref: /PHP-7.1/ext/sysvsem/config.m4 (revision a20383ba)
1dnl
2dnl $Id$
3dnl
4
5PHP_ARG_ENABLE(sysvsem,whether to enable System V semaphore support,
6[  --enable-sysvsem        Enable System V semaphore support])
7
8if test "$PHP_SYSVSEM" != "no"; then
9 PHP_NEW_EXTENSION(sysvsem, sysvsem.c, $ext_shared)
10 AC_DEFINE(HAVE_SYSVSEM, 1, [ ])
11 AC_CACHE_CHECK(for union semun,php_cv_semun,
12   AC_TRY_COMPILE([
13#include <sys/types.h>
14#include <sys/ipc.h>
15#include <sys/sem.h>
16   ],
17   [union semun x;],
18   [
19     php_cv_semun=yes
20   ],[
21     php_cv_semun=no
22   ])
23 )
24 if test "$php_cv_semun" = "yes"; then
25   AC_DEFINE(HAVE_SEMUN, 1, [ ])
26 else
27   AC_DEFINE(HAVE_SEMUN, 0, [ ])
28 fi
29fi
30