pecl-ev / config.m4

dnl +----------------------------------------------------------------------+
dnl | PHP Version 5                                                        |
dnl +----------------------------------------------------------------------+
dnl | Copyrght (C) 1997-2013 The PHP Group                                 |
dnl +----------------------------------------------------------------------+
dnl | This source file is subject to version 3.01 of the PHP license,      |
dnl | that is bundled with this package in the file LICENSE, and is        |
dnl | available through the world-wide-web at the following url:           |
dnl |                                  |
dnl | If you did not receive a copy of the PHP license and are unable to   |
dnl | obtain it through the world-wide-web, please send a note to          |
dnl | so we can mail you a copy immediately.               |
dnl +----------------------------------------------------------------------+
dnl | Author: Ruslan Osmanov <>                             |
dnl +----------------------------------------------------------------------+

PHP_ARG_ENABLE(ev, whether to enable ev,
[  --enable-ev         Enable ev support], no)

PHP_ARG_ENABLE(ev-debug, for ev debug support,
[  --enable-ev-debug       Enable ev debug support], no, no)

PHP_ARG_ENABLE(ev-sockets, for sockets support,
[  --enable-ev-sockets     Enable sockets support in ev], yes, no)

if test "$PHP_EV" != "no"; then
  AC_TRY_COMPILE([#include <php_version.h>], [
#if PHP_VERSION_ID < 50400
#error  this extension requires at least PHP version 5.4.0
[AC_MSG_ERROR([need at least PHP 5.4.0])])

  if test "$PHP_EV_DEBUG" != "no"; then
    CFLAGS="$CFLAGS -Wall -g -ggdb -O0"
    AC_DEFINE(PHP_EV_DEBUG, 1, [Enable ev debug support])
    AC_DEFINE(NDEBUG, 1, [With NDEBUG defined assert generates no code])

  if test "$PHP_EV_SOCKETS" != "no"; then
    PHP_ADD_EXTENSION_DEP(ev, sockets, true)
    AC_DEFINE([PHP_EV_USE_SOCKETS], 1, [Whether to enable sockets support])

  AC_DEFINE(EV_H, "embed.h", [Wrapper for libev/ev.h])
  AC_DEFINE(HAVE_EV, 1, [ ])

  ev_src="libev/ev.c util.c ev.c watcher.c fe.c pe.c"
  PHP_NEW_EXTENSION(ev, $ev_src, $ext_shared,,$CFLAGS)

dnl vim: fdm=marker cms=dnl\ %s
dnl vim: et ts=2 sts=2 sw=2
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.