From: Monty Taylor Date: Sun, 14 Jun 2009 23:14:59 +0000 (-0700) Subject: Made ENABLE_DTRACE actually be a macro. X-Git-Tag: 0.31~14^2~14 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5b73c54a9753b56a1bfda094ce69fbecd969565a;p=awesomized%2Flibmemcached Made ENABLE_DTRACE actually be a macro. --- diff --git a/configure.ac b/configure.ac index 544c40bf..218df90f 100644 --- a/configure.ac +++ b/configure.ac @@ -150,9 +150,9 @@ AC_SEARCH_LIBS(floorf, m) DETECT_BYTEORDER ENABLE_UTILLIB +ENABLE_DTRACE sinclude(m4/pod2man.m4) -sinclude(m4/dtrace.m4) sinclude(m4/protocol_binary.m4) sinclude(m4/memcached.m4) sinclude(m4/setsockopt.m4) diff --git a/m4/dtrace.m4 b/m4/dtrace.m4 index ee39c69a..274a6614 100644 --- a/m4/dtrace.m4 +++ b/m4/dtrace.m4 @@ -1,9 +1,15 @@ dnl --------------------------------------------------------------------------- -dnl Macro: DTRACE_TEST +dnl Macro: ENABLE_DTRACE dnl --------------------------------------------------------------------------- -AC_ARG_ENABLE(dtrace, - [ --enable-dtrace Build with support for the DTRACE.], - [ +AC_DEFUN([ENABLE_DTRACE],[ + AC_ARG_ENABLE([dtrace], + [AS_HELP_STRING([--enable-dtrace], + [Build with support for the DTRACE. @<:@default=off@:>@])], + [ac_cv_enable_dtrace="yes"], + [ac_cv_enable_dtrace="no"]) + + if test "$ac_cv_enable_dtrace" = "yes" + then AC_PATH_PROG([DTRACE], [dtrace], "no", [/usr/sbin:$PATH]) if test "x$DTRACE" != "xno"; then AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support]) @@ -17,21 +23,18 @@ AC_ARG_ENABLE(dtrace, rm conftest.$$ fi - ENABLE_DTRACE="yes" + ac_cv_enable_dtrace="yes" AC_SUBST(HAVE_DTRACE) else AC_MSG_ERROR([Need dtrace binary and OS support.]) fi - ], - [ - ENABLE_DTRACE="no" - ] - ) + fi -AC_SUBST(DTRACEFLAGS) -AC_SUBST(DTRACE_HEADER) -AC_SUBST(DTRACE_OBJ) -AM_CONDITIONAL([HAVE_DTRACE], [ test "$ENABLE_DTRACE" = "yes" ]) + AC_SUBST(DTRACEFLAGS) + AC_SUBST(DTRACE_HEADER) + AC_SUBST(DTRACE_OBJ) + AM_CONDITIONAL([HAVE_DTRACE], [ test "$ac_cv_enable_dtrace" = "yes" ]) +]) dnl --------------------------------------------------------------------------- -dnl End Macro: DTRACE_TEST +dnl End Macro: ENABLE_DTRACE dnl ---------------------------------------------------------------------------