Added configure gadgets to detect Papi, and fixed build problems
[ghc.git] / rts / Makefile
index 2b05eff..08240a1 100644 (file)
@@ -179,6 +179,14 @@ EXCLUDED_SRCS              += $(wildcard Vis*.c)
 endif
 
 #-----------------------------------------------------------------------------
+# Add PAPI library if needed
+
+ifeq "$(USE_PAPI)" "YES"
+SRC_HC_OPTS            += -lpapi -optc-DUSE_PAPI
+PACKAGE_CPP_OPTS       += -DUSE_PAPI
+endif
+
+#-----------------------------------------------------------------------------
 # make depend setup
 
 SRC_MKDEPENDC_OPTS += -I. -I../includes