2012-05-23 05:34:07 +02:00
|
|
|
PHP_ARG_ENABLE(uv, Whether to enable the "uv" extension,
|
2012-06-24 17:18:32 +02:00
|
|
|
[ --enable-uv Enable "uv" extension support])
|
|
|
|
|
2012-07-01 06:15:14 +02:00
|
|
|
PHP_ARG_ENABLE(httpparser, Whether to enable the "httpparser" module,
|
|
|
|
[ --enable-httpparser Enable "httpparser" module support])
|
|
|
|
|
2012-07-09 06:57:16 +02:00
|
|
|
PHP_ARG_ENABLE(uv-debug, for uv debug support,
|
2012-07-12 16:37:47 +02:00
|
|
|
[ --enable-uv-debug Enable enable uv deubg support], no, no)
|
|
|
|
|
|
|
|
PHP_ARG_ENABLE(dtrace, Whether to enable the "dtrace" debug,
|
2012-07-14 15:57:18 +02:00
|
|
|
[ --enable-dtrace Enable "dtrace" support], no, no)
|
2012-07-12 16:37:47 +02:00
|
|
|
|
2012-07-09 06:57:16 +02:00
|
|
|
|
2012-06-24 17:18:32 +02:00
|
|
|
if test -z "$PHP_DEBUG"; then
|
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
[ --enable-debug compile with debugging symbols],[
|
|
|
|
PHP_DEBUG=$enableval
|
|
|
|
],[ PHP_DEBUG=no
|
|
|
|
])
|
|
|
|
fi
|
2012-05-23 05:34:07 +02:00
|
|
|
|
2012-07-09 06:57:16 +02:00
|
|
|
if test "$PHP_UV_DEBUG" != "no"; then
|
|
|
|
CFLAGS="$CFLAGS -Wall -g -ggdb -O0 -DPHP_UV_DEBUG=1"
|
|
|
|
AC_DEFINE(PHP_UV_DEBUG, 1, [Enable uv debug support])
|
2012-07-14 15:57:18 +02:00
|
|
|
echo "damepo"
|
2012-07-09 06:57:16 +02:00
|
|
|
fi
|
|
|
|
|
2012-07-14 15:57:18 +02:00
|
|
|
if test "$PHP_DTRACE" != "no"; then
|
|
|
|
dnl TODO: we should move this line to Makefile.frag or somewhere.
|
|
|
|
case $host in
|
|
|
|
*darwin*)
|
|
|
|
dtrace -h -s phpuv_dtrace.d
|
|
|
|
UV_SHARED_DEPENDENCIES=phpuv_dtrace.h
|
|
|
|
PHP_ADD_LIBRARY(dtrace, UV_SHARED_LIBADD)
|
|
|
|
AC_DEFINE(PHP_UV_DTRACE, 1, [Enable uv dtrace support])
|
|
|
|
PHP_SUBST(UV_SHARED_DEPENDENCIES)
|
|
|
|
PHP_ADD_MAKEFILE_FRAGMENT
|
|
|
|
;;
|
|
|
|
*linux*)
|
|
|
|
echo "dtrace does not support this machine. currently OSX only"
|
|
|
|
esac
|
2012-07-12 16:37:47 +02:00
|
|
|
fi
|
|
|
|
|
2012-05-23 05:34:07 +02:00
|
|
|
if test $PHP_UV != "no"; then
|
2012-07-01 06:15:14 +02:00
|
|
|
SOURCES=""
|
|
|
|
|
|
|
|
if test $PHP_HTTPPARSER != "no"; then
|
|
|
|
SOURCES=" http-parser/http_parser.c"
|
|
|
|
AC_DEFINE([ENABLE_HTTPPARSER], [1], [ Enable http parser])
|
|
|
|
fi
|
|
|
|
|
|
|
|
PHP_NEW_EXTENSION(uv, php_uv.c uv.c $SOURCES, $ext_shared)
|
2012-05-23 05:34:07 +02:00
|
|
|
|
2012-07-01 06:15:14 +02:00
|
|
|
if test $PHP_HTTPPARSER != "no"; then
|
|
|
|
PHP_ADD_INCLUDE([$ext_srcdir/http-parser])
|
|
|
|
fi
|
2012-06-23 05:07:22 +02:00
|
|
|
PHP_ADD_INCLUDE([$ext_srcdir/libuv/include])
|
2012-06-24 15:57:38 +02:00
|
|
|
|
2012-09-06 18:39:57 +02:00
|
|
|
CFLAGS=" $CFLAGS -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a"
|
2012-06-24 17:18:32 +02:00
|
|
|
|
2012-06-24 16:05:43 +02:00
|
|
|
case $host in
|
|
|
|
*darwin*)
|
|
|
|
dnl these macro does not work. why?
|
|
|
|
dnl
|
|
|
|
dnl PHP_ADD_FRAMEWORK(CoreServices)
|
|
|
|
dnl PHP_ADD_FRAMEWORK(Carbon)
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -framework CoreServices -framework Carbon"
|
|
|
|
;;
|
|
|
|
*linux*)
|
2012-09-06 18:41:52 +02:00
|
|
|
CFLAGS="$CFLAGS -lrt"
|
2012-06-24 16:05:43 +02:00
|
|
|
esac
|
2012-05-23 05:34:07 +02:00
|
|
|
|
|
|
|
PHP_SUBST(UV_SHARED_LIBADD)
|
|
|
|
PHP_SUBST([CFLAGS])
|
|
|
|
fi
|