Added configure gadgets to detect Papi, and fixed build problems
[ghc-hetmet.git] / configure.ac
index e9ad212..a4a229c 100644 (file)
@@ -13,7 +13,7 @@ dnl
 # see what flags are available. (Better yet, read the documentation!)
 #
 
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5], [glasgow-haskell-bugs@haskell.org], [ghc])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.7], [glasgow-haskell-bugs@haskell.org], [ghc])
 
 if test ! -f mk/config.h.in; then
    echo "mk/config.h.in doesn't exist: perhaps you haven't run 'autoreconf'?"
@@ -1136,6 +1136,7 @@ AC_C_CONST
 
 dnl ** are we big endian?
 AC_C_BIGENDIAN
+FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN
 
 dnl ** check for leading underscores in symbol names
 FP_LEADING_UNDERSCORE
@@ -1199,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