build/autoconf/linux.m4

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 dnl This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 4
michael@0 5 AC_DEFUN([MOZ_LINUX_PERF_EVENT],
michael@0 6 [
michael@0 7
michael@0 8 MOZ_ARG_WITH_STRING(linux-headers,
michael@0 9 [ --with-linux-headers=DIR
michael@0 10 location where the Linux kernel headers can be found],
michael@0 11 linux_headers=$withval)
michael@0 12
michael@0 13 LINUX_HEADERS_INCLUDES=
michael@0 14
michael@0 15 if test "$linux_headers"; then
michael@0 16 LINUX_HEADERS_INCLUDES="-I$linux_headers"
michael@0 17 fi
michael@0 18
michael@0 19 _SAVE_CFLAGS="$CFLAGS"
michael@0 20 CFLAGS="$CFLAGS $LINUX_HEADERS_INCLUDES"
michael@0 21
michael@0 22 dnl Performance measurement headers.
michael@0 23 MOZ_CHECK_HEADER(linux/perf_event.h,
michael@0 24 [AC_CACHE_CHECK(for perf_event_open system call,ac_cv_perf_event_open,
michael@0 25 [AC_TRY_COMPILE([#include <asm/unistd.h>],[return sizeof(__NR_perf_event_open);],
michael@0 26 ac_cv_perf_event_open=yes,
michael@0 27 ac_cv_perf_event_open=no)])])
michael@0 28 if test "$ac_cv_perf_event_open" = "yes"; then
michael@0 29 HAVE_LINUX_PERF_EVENT_H=1
michael@0 30 else
michael@0 31 HAVE_LINUX_PERF_EVENT_H=
michael@0 32 LINUX_HEADERS_INCLUDES=
michael@0 33 fi
michael@0 34 AC_SUBST(HAVE_LINUX_PERF_EVENT_H)
michael@0 35 AC_SUBST(LINUX_HEADERS_INCLUDES)
michael@0 36
michael@0 37 CFLAGS="$_SAVE_CFLAGS"
michael@0 38
michael@0 39 ])

mercurial