Commit 14591e0d authored by Alexey Rodriguez's avatar Alexey Rodriguez

Added configure gadgets to detect Papi, and fixed build problems

parent 2b522ade
......@@ -1200,6 +1200,17 @@ if test -n "$GTK_CONFIG"; then
fi
AC_SUBST([GTK_CONFIG])
#Checking for PAPI
AC_CHECK_LIB(papi, PAPI_library_init, HavePapiLib=YES, HavePapiLib=NO)
AC_CHECK_HEADER([papi.h], [HavePapiHeader=YES], [HavePapiHeader=NO])
AC_SUBST(HavePapiLib)
AC_SUBST(HavePapiHeader)
if test "$HavePapiLib" = "YES" -a "$HavePapiHeader" = "YES"; then
USE_PAPI=YES
fi
AC_SUBST(USE_PAPI)
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_OUTPUT
......@@ -987,6 +987,9 @@ UNAME = uname
# GTK+
GTK_CONFIG = @GTK_CONFIG@
# PAPI
USE_PAPI = @USE_PAPI@
#-----------------------------------------------------------------------------
# DocBook XML stuff
......
......@@ -178,6 +178,14 @@ else # GTK_CONFIG
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
......
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