From bdb47a71061165f9a88528e2d05e6e608858be1a Mon Sep 17 00:00:00 2001 From: Shuhei Tanuma Date: Mon, 9 Jul 2012 13:57:16 +0900 Subject: [PATCH] add ./configure --enable-uv-debug option. --- config.m4 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/config.m4 b/config.m4 index eba76b0..5eeb613 100644 --- a/config.m4 +++ b/config.m4 @@ -4,6 +4,9 @@ PHP_ARG_ENABLE(uv, Whether to enable the "uv" extension, PHP_ARG_ENABLE(httpparser, Whether to enable the "httpparser" module, [ --enable-httpparser Enable "httpparser" module support]) +PHP_ARG_ENABLE(uv-debug, for uv debug support, + [ --enable-uv-debugEnable enable uv deubg support], no, no) + if test -z "$PHP_DEBUG"; then AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging symbols],[ @@ -12,6 +15,11 @@ if test -z "$PHP_DEBUG"; then ]) fi +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]) +fi + if test $PHP_UV != "no"; then SOURCES="" @@ -27,11 +35,7 @@ if test $PHP_UV != "no"; then fi PHP_ADD_INCLUDE([$ext_srcdir/libuv/include]) - CFLAGS=" -g -O0 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Wl,libuv/uv.a" - - dnl if test $PHP_DEBUG != "no"; then - dnl CFLAGS="$CFLAGS -DPHP_UV_DEBUG=1" - dnl fi + CFLAGS=" $CFLAGS -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Wl,libuv/uv.a" case $host in *darwin*)