--- a/js/src/configure.in 2012-11-01 19:42:20.130330321 +0100 +++ b/js/src/configure.in 2012-11-01 20:34:03.561351492 +0100 @@ -3477,7 +3477,16 @@ esac dnl Performance measurement headers. -AC_CHECK_HEADER(linux/perf_event.h, HAVE_LINUX_PERF_EVENT_H=1) +AC_CHECK_HEADER(linux/perf_event.h, + [AC_CACHE_CHECK(for perf_event_open system call,ac_cv_perf_event_open, + [AC_TRY_COMPILE([#include ],[return sizeof(__NR_perf_event_open);], + ac_cv_perf_event_open=yes, + ac_cv_perf_event_open=no)])]) +if test "$ac_cv_perf_event_open" = "yes"; then + HAVE_LINUX_PERF_EVENT_H=1 +else + HAVE_LINUX_PERF_EVENT_H= +fi AC_SUBST(HAVE_LINUX_PERF_EVENT_H) dnl Checks for libraries.