Skip to content

Commit

Permalink
Bug 1298536 - Move --with-linux-headers to Python configure. r=glandium
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: FWovXD9rjed

--HG--
extra : rebase_source : 4a9693b512c51b37abd5cdafcedc21cff8b4434c
  • Loading branch information
chmanchester committed Aug 31, 2016
1 parent 70af134 commit 8577fd7
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 47 deletions.
1 change: 0 additions & 1 deletion aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ builtin(include, build/autoconf/expandlibs.m4)dnl
builtin(include, build/autoconf/arch.m4)dnl
builtin(include, build/autoconf/android.m4)dnl
builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/linux.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl
builtin(include, build/autoconf/ffi.m4)dnl
builtin(include, build/autoconf/clang-plugin.m4)dnl
Expand Down
39 changes: 0 additions & 39 deletions build/autoconf/linux.m4

This file was deleted.

28 changes: 28 additions & 0 deletions build/moz.configure/headers.configure
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,31 @@ check_headers(
'byteswap.h',
when=non_msvc_compiler,
)

# TODO: Move these checks to file specific to --enable-project=js.
have_perf_event_h = check_header('linux/perf_event.h',
when=building_linux)

js_option('--with-linux-headers',
help='location where the Linux kernel headers can be found',
nargs=1)

passed_linux_header_flags = depends_if('--with-linux-headers')(lambda v: ['-I%s' % v[0]])

@depends_when(try_compile(includes=['asm/unistd.h'],
body='return sizeof(__NR_perf_event_open);',
flags=passed_linux_header_flags,
check_msg='for perf_event_open system call'),
when=have_perf_event_h)
def have_perf_event_open(have_perf_event_open):
if have_perf_event_open:
return True

set_config('HAVE_LINUX_PERF_EVENT_H', have_perf_event_open)

@depends(passed_linux_header_flags, have_perf_event_open)
def linux_headers_includes(passed_linux_header_flags, have_perf_event_open):
if have_perf_event_open and passed_linux_header_flags:
return passed_linux_header_flags[0]

set_config('LINUX_HEADERS_INCLUDES', linux_headers_includes)
1 change: 0 additions & 1 deletion build/moz.configure/old.configure
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def old_configure_options(*options):
'--with-intl-api',
'--with-ios-sdk',
'--with-jitreport-granularity',
'--with-linux-headers',
'--with-macbundlename-prefix',
'--with-macos-private-frameworks',
'--with-macos-sdk',
Expand Down
1 change: 0 additions & 1 deletion js/src/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ builtin(include, ../../build/autoconf/expandlibs.m4)dnl
builtin(include, ../../build/autoconf/arch.m4)dnl
builtin(include, ../../build/autoconf/android.m4)dnl
builtin(include, ../../build/autoconf/zlib.m4)dnl
builtin(include, ../../build/autoconf/linux.m4)dnl
builtin(include, ../../build/autoconf/icu.m4)dnl
builtin(include, ../../build/autoconf/ffi.m4)dnl
builtin(include, ../../build/autoconf/clang-plugin.m4)dnl
Expand Down
3 changes: 2 additions & 1 deletion js/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ if CONFIG['HAVE_LINUX_PERF_EVENT_H']:
SOURCES += [
'perf/pm_linux.cpp'
]
SOURCES['perf/pm_linux.cpp'].flags += [CONFIG['LINUX_HEADERS_INCLUDES']]
if CONFIG['LINUX_HEADERS_INCLUDES']:
SOURCES['perf/pm_linux.cpp'].flags += [CONFIG['LINUX_HEADERS_INCLUDES']]
else:
SOURCES += [
'perf/pm_stub.cpp'
Expand Down
2 changes: 0 additions & 2 deletions js/src/old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,6 @@ if test "x$enable_dtrace" = "xyes"; then
fi
AC_SUBST(HAVE_DTRACE)

MOZ_LINUX_PERF_EVENT

dnl Checks for libraries.
dnl ========================================================
AC_CHECK_LIB(c_r, gethostbyname_r)
Expand Down
2 changes: 0 additions & 2 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1459,8 +1459,6 @@ if test "x$enable_dtrace" = "xyes"; then
fi
AC_SUBST(HAVE_DTRACE)

MOZ_LINUX_PERF_EVENT

dnl Checks for libraries.
dnl ========================================================
AC_CHECK_LIB(c_r, gethostbyname_r)
Expand Down

0 comments on commit 8577fd7

Please sign in to comment.