summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorwcohen <wcohen>2006-09-12 22:05:48 +0000
committerwcohen <wcohen>2006-09-12 22:05:48 +0000
commit47dd066dfec8ab73f7b1886920e153402baa4597 (patch)
tree01331b69b773f6076c10837085e7eb6e39a99219 /configure.ac
parent7f0e10b1a9623425f4600658e0358d5c607abba6 (diff)
downloadsystemtap-steved-47dd066dfec8ab73f7b1886920e153402baa4597.tar.gz
systemtap-steved-47dd066dfec8ab73f7b1886920e153402baa4597.tar.xz
systemtap-steved-47dd066dfec8ab73f7b1886920e153402baa4597.zip
Systemtap perfmon support to access the processors perfmon hardware.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e2ce76a9..1431086a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,32 @@ AC_PROG_MAKE_SET
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
+dnl enable option to generate code for using perfmon
+AC_ARG_ENABLE(perfmon,
+ [ --enable-perfmon enable perfmon support (default is disabled)],
+ perfmon_support=$enableval, perfmon_support=no)
+
+AC_ARG_WITH([perfmon],
+ AC_HELP_STRING([--with-perfmon=DIRECTORY],
+ [Path to Perfmon installation to use]),
+ [
+case "$with_perfmon" in
+yes ) AC_MSG_ERROR([--with-perfmon requires an argument]) ;;
+''|no) ;;
+*) perfmon_support=yes ;;
+esac])
+
+
+dnl XXX fixme so that it it can use perfmon installed for real
+dnl check that perfmon libraries are actually there
+if test $perfmon_support = yes; then
+ AC_CHECK_LIB(pfm, pfm_start,,[
+ AC_MSG_ERROR([systemtap cannot find required perfmon libs])])
+ CFLAGS="$CFLAGS -DPERFMON -I$with_perfmon/include"
+ CXXFLAGS="$CXXFLAGS -DPERFMON -I$with_perfmon/include"
+ LDFLAGS="$LDFLAGS -DPERFMON -L$with_perfmon/lib -lpfm"
+fi
+
build_elfutils=no
AC_ARG_WITH([elfutils],
AC_HELP_STRING([--with-elfutils=DIRECTORY],