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) ...@@ -1207,9 +1207,11 @@ AC_SUBST(HavePapiLib)
AC_SUBST(HavePapiHeader) AC_SUBST(HavePapiHeader)
if test "$HavePapiLib" = "YES" -a "$HavePapiHeader" = "YES"; then if test "$HavePapiLib" = "YES" -a "$HavePapiHeader" = "YES"; then
USE_PAPI=YES HavePapi=YES
else
HavePapi=NO
fi fi
AC_SUBST(USE_PAPI) AC_SUBST(HavePapi)
AC_CONFIG_FILES([mk/config.mk ghc.spec docs/users_guide/ug-book.xml]) 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]) AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])
......
...@@ -431,6 +431,11 @@ GhcRtsCcOpts=-fomit-frame-pointer ...@@ -431,6 +431,11 @@ GhcRtsCcOpts=-fomit-frame-pointer
# Include the front panel code? Needs GTK+. # Include the front panel code? Needs GTK+.
GhcRtsWithFrontPanel = NO 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 # nofib
...@@ -987,9 +992,6 @@ UNAME = uname ...@@ -987,9 +992,6 @@ UNAME = uname
# GTK+ # GTK+
GTK_CONFIG = @GTK_CONFIG@ GTK_CONFIG = @GTK_CONFIG@
# PAPI
USE_PAPI = @USE_PAPI@
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# DocBook XML stuff # DocBook XML stuff
......
...@@ -181,8 +181,8 @@ endif ...@@ -181,8 +181,8 @@ endif
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Add PAPI library if needed # Add PAPI library if needed
ifeq "$(USE_PAPI)" "YES" ifeq "$(GhcRtsWithPapi)" "YES"
SRC_HC_OPTS += -lpapi -optc-DUSE_PAPI SRC_HC_OPTS += -optc-DUSE_PAPI
PACKAGE_CPP_OPTS += -DUSE_PAPI PACKAGE_CPP_OPTS += -DUSE_PAPI
endif endif
......
Supports Markdown
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