Commit e4e7b37c authored by Simon Marlow's avatar Simon Marlow
Browse files

reorganise PAPI configuration: off by default, even if library is found

Add GhcRtsWithPapi=YES to mk/build.mk to turn it on
parent bed7074c
......@@ -1207,9 +1207,11 @@ AC_SUBST(HavePapiLib)
AC_SUBST(HavePapiHeader)
if test "$HavePapiLib" = "YES" -a "$HavePapiHeader" = "YES"; then
USE_PAPI=YES
HavePapi=YES
else
HavePapi=NO
fi
AC_SUBST(USE_PAPI)
AC_SUBST(HavePapi)
AC_CONFIG_FILES([mk/config.mk ghc.spec docs/users_guide/ug-book.xml])
AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])
......
......@@ -431,6 +431,11 @@ GhcRtsCcOpts=-fomit-frame-pointer
# Include the front panel code? Needs GTK+.
GhcRtsWithFrontPanel = NO
# Include support for CPU performance counters via the PAPI library in the RTS?
# (PAPI: http://icl.cs.utk.edu/papi/)
GhcRtsWithPapi = NO
HavePapi = @HavePapi@
################################################################################
#
# nofib
......@@ -987,9 +992,6 @@ UNAME = uname
# GTK+
GTK_CONFIG = @GTK_CONFIG@
# PAPI
USE_PAPI = @USE_PAPI@
#-----------------------------------------------------------------------------
# DocBook XML stuff
......
......@@ -181,8 +181,8 @@ endif
#-----------------------------------------------------------------------------
# Add PAPI library if needed
ifeq "$(USE_PAPI)" "YES"
SRC_HC_OPTS += -lpapi -optc-DUSE_PAPI
ifeq "$(GhcRtsWithPapi)" "YES"
SRC_HC_OPTS += -optc-DUSE_PAPI
PACKAGE_CPP_OPTS += -DUSE_PAPI
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment