~drizzle-trunk/drizzle/development

1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
1
dnl  Copyright (C) 2009 Sun Microsystems, Inc.
2
dnl This file is free software; Sun Microsystems, Inc.
1085.1.4 by Monty Taylor
pandora-build v1
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],
1497.3.2 by Monty Taylor
Enabled building dtrace if we have it by default. Apparently it doesn't add
11
    [AS_HELP_STRING([--disable-dtrace],
12
            [Build with support for the DTRACE. @<:@default=on@:>@])],
1497.3.3 by Monty Taylor
Fixed lcov builds. Fixed the dtrace enabling.
13
    [ac_cv_enable_dtrace="$enableval"],
1497.3.2 by Monty Taylor
Enabled building dtrace if we have it by default. Apparently it doesn't add
14
    [ac_cv_enable_dtrace="yes"])
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
15
16
  AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
17
    AC_CHECK_PROGS([DTRACE], [dtrace])
1720.1.5 by Monty Taylor
Added libdrizzle to the tree.
18
    AC_CHECK_HEADERS(sys/sdt.h)
19
20
    AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"],[
1497.3.9 by Monty Taylor
dtrace is broken on FreeBSD. Check for that and don't attempt to use it if it don't work.
21
22
      AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
23
        cat >conftest.d <<_ACEOF
24
provider Example {
25
  probe increment(int);
26
};
27
_ACEOF
28
        $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero
29
        AS_IF([test $? -eq 0],[ac_cv_dtrace_works=yes],
30
          [ac_cv_dtrace_works=no])
31
        rm -f conftest.h conftest.d
2373.5.1 by Brian Aker
Just disable DTRACE for OSX
32
        AS_IF([test "$TARGET_OSX"],[ac_cv_dtrace_works=no])
1497.3.9 by Monty Taylor
dtrace is broken on FreeBSD. Check for that and don't attempt to use it if it don't work.
33
      ])
34
      AS_IF([test "x$ac_cv_dtrace_works" = "xyes"],[
35
        AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support])
36
      ])
37
      AC_CACHE_CHECK([if dtrace should instrument object files],
38
        [ac_cv_dtrace_needs_objects],[
39
          dnl DTrace on MacOSX does not use -G option
40
          cat >conftest.d <<_ACEOF
41
provider Example {
42
  probe increment(int);
43
};
44
_ACEOF
45
          $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero
46
          AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes],
1126.6.5 by Monty Taylor
pandora-build v0.59
47
            [ac_cv_dtrace_needs_objects=no])
1497.3.9 by Monty Taylor
dtrace is broken on FreeBSD. Check for that and don't attempt to use it if it don't work.
48
          rm -f conftest.d.o conftest.d
49
      ])
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
50
      AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX
51
      ac_cv_have_dtrace=yes
52
    ])])
53
1497.3.9 by Monty Taylor
dtrace is broken on FreeBSD. Check for that and don't attempt to use it if it don't work.
54
AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_dtrace_works" = "xyes"])
1085.1.4 by Monty Taylor
pandora-build v1
55
AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS],
56
               [test "x$ac_cv_dtrace_needs_objects" = "xyes"])
57
1085.1.3 by Monty Taylor
Split out warnings - start using the pandora build system.
58
])
59
dnl ---------------------------------------------------------------------------
60
dnl End Macro: PANDORA_ENABLE_DTRACE
61
dnl ---------------------------------------------------------------------------