From 86a55316baf2a7c0718670fd7342b648e0ef4a87 Mon Sep 17 00:00:00 2001 From: "chappedm@gmail.com" Date: Sun, 4 Nov 2012 19:12:42 +0000 Subject: issue-449: Disables mmap check when cross compiling since it is meaningless anyways git-svn-id: http://gperftools.googlecode.com/svn/trunk@179 6b5cf1ce-ec42-a296-1ba9-69fdba395a50 --- configure | 9 ++++++++- configure.ac | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6bc5b63..8dc009a 100755 --- a/configure +++ b/configure @@ -15482,7 +15482,13 @@ case "$host" in $as_echo "#define HAVE_MMAP 1" >>confdefs.h ;; - *) + *) if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=yes + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + + else + for ac_header in $ac_header_list @@ -15683,6 +15689,7 @@ $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt + fi ;; esac diff --git a/configure.ac b/configure.ac index 9f73616..f4ca2de 100644 --- a/configure.ac +++ b/configure.ac @@ -188,7 +188,13 @@ case "$host" in AC_DEFINE(HAVE_MMAP, 1, [Define to 1 if you have a working `mmap' system call.]) ;; - *) AC_FUNC_MMAP + *) if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=yes + AC_DEFINE(HAVE_MMAP, 1, + [Define to 1 if you have a working `mmap' system call.]) + else + AC_FUNC_MMAP + fi ;; esac -- cgit v1.2.1