From 47dd066dfec8ab73f7b1886920e153402baa4597 Mon Sep 17 00:00:00 2001 From: wcohen Date: Tue, 12 Sep 2006 22:05:48 +0000 Subject: Systemtap perfmon support to access the processors perfmon hardware. --- configure.ac | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'configure.ac') 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], -- cgit