Made ENABLE_DTRACE actually be a macro.
authorMonty Taylor <mordred@inaugust.com>
Sun, 14 Jun 2009 23:14:59 +0000 (16:14 -0700)
committerMonty Taylor <mordred@inaugust.com>
Sun, 14 Jun 2009 23:14:59 +0000 (16:14 -0700)
configure.ac
m4/dtrace.m4

index 544c40bf7a416ced961b01ccdf8aac8404fa182d..218df90f891264562e937a7ff600bd7bec2e0071 100644 (file)
@@ -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)
index ee39c69a271a48ae0613d1ffb3ee8f16f1072707..274a6614e9cad903207299bed5cc55bd9d7ed8cc 100644 (file)
@@ -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 ---------------------------------------------------------------------------