~drizzle-trunk/drizzle/development

1085.1.4 by Monty Taylor
pandora-build v1
1
dnl  Copyright (C) 2009 Sun Microsystems
2
dnl This file is free software; Sun Microsystems
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
5
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
6
dnl ---------------------------------------------------------------------------
7
dnl Macro: PANDORA_ENABLE_DTRACE
8
dnl ---------------------------------------------------------------------------
9
AC_DEFUN([PANDORA_ENABLE_DTRACE],[
10
  AC_ARG_ENABLE([dtrace],
11
    [AS_HELP_STRING([--enable-dtrace],
12
            [Build with support for the DTRACE. @<:@default=off@:>@])],
13
    [ac_cv_enable_dtrace="yes"],
14
    [ac_cv_enable_dtrace="no"])
15
16
  AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
17
    AC_CHECK_PROGS([DTRACE], [dtrace])
18
    AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[
19
      AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
1126.6.5 by Monty Taylor
pandora-build v0.59
20
      AC_MSG_CHECKING([if dtrace should instrument object files])
1085.1.4 by Monty Taylor
pandora-build v1
21
      dnl DTrace on MacOSX does not use -G option
22
      cat >conftest.d <<_ACEOF
23
provider Example {
24
  probe increment(int);
25
};
26
_ACEOF
27
      $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero
1126.6.5 by Monty Taylor
pandora-build v0.59
28
      AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],
29
            [ac_cv_dtrace_needs_objects=no])
1085.1.4 by Monty Taylor
pandora-build v1
30
      rm -f conftest.d.o conftest.d
1126.6.5 by Monty Taylor
pandora-build v0.59
31
      AC_MSG_RESULT($ac_cv_dtrace_needs_objects)
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
32
      AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX
33
      ac_cv_have_dtrace=yes
34
    ])])
35
1085.1.4 by Monty Taylor
pandora-build v1
36
AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_have_dtrace" = "xyes"])
37
AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS],
38
               [test "x$ac_cv_dtrace_needs_objects" = "xyes"])
39
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
40
])
41
dnl ---------------------------------------------------------------------------
42
dnl End Macro: PANDORA_ENABLE_DTRACE
43
dnl ---------------------------------------------------------------------------