Commit 7c6da3d73a1e0c9ff380599b167cd7e7e460b3b5

suzuki toshiya 2011-05-01T19:06:24

Add new option `--disable-mmap' to configure script. * builds/unix/configure.raw: New option `--disable-mmap' is added. It is for the developers to simulate the systems without mmap() (like 4.3BSD, minix etc) on POSIX systems.

diff --git a/ChangeLog b/ChangeLog
index 0221692..25f6b03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-01  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+	Add new option `--disable-mmap' to configure script.
+
+	* builds/unix/configure.raw: New option `--disable-mmap' 
+	is added.  It is for the developers to simulate the systems
+	without mmap() (like 4.3BSD, minix etc) on POSIX systems.
+
 2011-04-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	[truetype] Recalculate the sfnt table checksum always.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index a58d20c..2b071f8 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -189,8 +189,14 @@ CPPFLAGS="${orig_CPPFLAGS}"
 
 # Here we check whether we can use our mmap file component.
 
-AC_FUNC_MMAP
-if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
+AC_ARG_ENABLE([mmap],
+  AS_HELP_STRING([--disable-mmap],
+                 [do not check mmap() and do not use]),
+  [enable_mmap="no"],[enable_mmap="yes"])
+if test "x${enable_mmap}" != "xno"; then
+  AC_FUNC_MMAP
+fi
+if test "x${enable_mmap}" = "xno" -o "$ac_cv_func_mmap_fixed_mapped" != "yes" ; then
   FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
 else
   FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'