From: Jani Taskinen Date: Sat, 13 Nov 2010 22:22:51 +0000 (+0000) Subject: - Simplified the DTrace configure macros, one is enough X-Git-Tag: php-5.4.0alpha1~191^2~680 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=200dcee22d9790944dbb4f83efef51963a3b35bb;p=php - Simplified the DTrace configure macros, one is enough --- diff --git a/acinclude.m4 b/acinclude.m4 index c7a0a72fa8..6fed91d477 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -711,10 +711,7 @@ ifelse([$2],,,[AC_MSG_CHECKING([$2])]) AC_ARG_WITH($1,[$3],$5=[$]withval, [ $5=ifelse($4,,no,$4) - - if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then - $5=$PHP_ENABLE_ALL - fi + ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL]) ]) PHP_ARG_ANALYZE($5,[$2],$6) ]) @@ -739,10 +736,7 @@ ifelse([$2],,,[AC_MSG_CHECKING([$2])]) AC_ARG_ENABLE($1,[$3],$5=[$]enableval, [ $5=ifelse($4,,no,$4) - - if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then - $5=$PHP_ENABLE_ALL - fi + ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL]) ]) PHP_ARG_ANALYZE($5,[$2],$6) ]) @@ -2883,43 +2877,33 @@ main() ]) dnl -dnl Generate dtrace targets +dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module]) dnl -AC_DEFUN([PHP_GENERATE_DTRACE],[ +AC_DEFUN([PHP_INIT_DTRACE],[ +dnl Set paths properly when called from extension + case "$4" in + ""[)] unset ac_bdir;; + /*[)] ac_bdir=$ac_srcdir;; + *[)] extdir=PHP_EXT_DIR($3); ac_bdir="$extdir/";; + esac + +dnl providerdesc + ac_provsrc=$1 old_IFS=[$]IFS IFS=. - set $ac_src + set $ac_provsrc + ac_provobj=[$]1 IFS=$old_IFS - build_target=$2 - PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS $1.o" - for src in $PHP_DTRACE_OBJS; do - case [$]build_target in - program|static) - obj="$obj `dirname $src`/`basename $src | sed 's,\.lo$,.o,'` " ;; - *) - obj="$obj `dirname $src`/.libs/`basename $src | sed 's,\.lo$,.o,'` " ;; - esac - done - cat >>Makefile.objects<>Makefile.objects<