summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-05-11 13:47:29 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-05-11 13:47:29 +0100
commita1680f03b7d38bf007d29ac23035e5af33736b0e (patch)
tree2890554fb0c5a6ada660cbd2ff2b8dc19e927543 /configure.ac
parent042a0b063b22bd02bb72f4a78cf29ffe5553d4d8 (diff)
downloadlibguestfs-a1680f03b7d38bf007d29ac23035e5af33736b0e.tar.gz
libguestfs-a1680f03b7d38bf007d29ac23035e5af33736b0e.tar.xz
libguestfs-a1680f03b7d38bf007d29ac23035e5af33736b0e.zip
configure: Allow systemtap/DTrace userspace probes to be disabled.
'./configure --disable-probes' will disable these probes. Otherwise they are autodetected as before. The <sys/sdt.h> produces lots of errors when you try to compile with these probes enabled under clang, so it is necessary to provide a way to disable them for clang users.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 7db6d37a..29f11798 100644
--- a/configure.ac
+++ b/configure.ac
@@ -418,9 +418,19 @@ fi
AC_SUBST([SELINUX_LIB])
dnl Check for systemtap/DTrace userspace probes (optional).
-dnl http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps
-AC_CHECK_HEADERS([sys/sdt.h])
-dnl AC_CHECK_PROG([DTRACE],[dtrace],[dtrace],[no])
+dnl Since the probe points break under clang, allow this to be disabled.
+AC_ARG_ENABLE([probes],
+ AS_HELP_STRING([--disable-probes], [Disable systemtap/DTrace userspace probes]),
+ [],
+ [enable_probes=yes])
+AS_IF([test "x$enable_probes" != "xno"],[
+ dnl http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps
+ AC_CHECK_HEADERS([sys/sdt.h])
+ dnl AC_CHECK_PROG([DTRACE],[dtrace],[dtrace],[no])
+ AS_IF([test "x$ac_cv_header_sys_sdt_h" = "xyes"],[
+ AC_DEFINE([ENABLE_PROBES],[1],[enable systemtap/DTrace userspace probes])
+ ])
+])
dnl Check for cpio which isn't in the default Pardus install amazingly.
AC_CHECK_PROG([CPIO],[cpio],[cpio],[no])