+dnl ** check for ld, whether it has an -x option, and if it is GNU ld
+FP_PROG_LD_X
+FP_PROG_LD_IS_GNU
+
+dnl ** check for Apple-style dead-stripping support
+dnl (.subsections-via-symbols assembler directive)
+
+
+AC_MSG_CHECKING(for .subsections_via_symbols)
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([], [__asm__ (".subsections_via_symbols");])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
+ [Define to 1 if Apple-style dead-stripping is supported.])
+ ],
+ [AC_MSG_RESULT(no)])
+
+dnl *** check for GNU non-executable stack note support (ELF only)
+dnl (.section .note.GNU-stack,"",@progbits)
+
+AC_MSG_CHECKING(for GNU non-executable stack support)
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([__asm__ (".section .note.GNU-stack,\"\",@progbits");], [0])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_GNU_NONEXEC_STACK],[1],
+ [Define to 1 if GNU non-executable stack notes are supported.])
+ ],
+ [AC_MSG_RESULT(no)])
+
+dnl ** check for librt
+AC_CHECK_LIB(rt, clock_gettime)
+AC_CHECK_FUNCS(clock_gettime timer_create timer_settime)
+FP_CHECK_TIMER_CREATE
+
+dnl ** check for Apple's "interesting" long double compatibility scheme
+AC_MSG_CHECKING(for printf\$LDBLStub)
+AC_TRY_LINK_FUNC(printf\$LDBLStub,
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[1],
+ [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[0],
+ [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
+ ])
+
+# test for GTK+
+AC_PATH_PROGS([GTK_CONFIG], [pkg-config])
+if test -n "$GTK_CONFIG"; then
+ if $GTK_CONFIG gtk+-2.0 --atleast-version=2.0; then
+ GTK_CONFIG="$GTK_CONFIG gtk+-2.0"
+ else
+ AC_MSG_WARN([GTK+ not usable, need at least version 2.0])
+ GTK_CONFIG=
+ fi
+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
+ HavePapi=YES
+else
+ HavePapi=NO
+fi
+AC_SUBST(HavePapi)