aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-18 17:24:18 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-18 17:24:18 +0000
commit488778ed7605e8f2b518628e4de7e5d4e8e52452 (patch)
tree47615a96e8663f6a76e37b60380b313c9a529d33
parentb3ba7224176ee0a487da3221693d2b15bb7c8d3a (diff)
downloadopen-axiom-488778ed7605e8f2b518628e4de7e5d4e8e52452.tar.gz
* config/open-axiom.m4 (OPENAXIOM_CPPFLAGS_FOR_VENDOR_LOCK_INS):
New. Abstract over vendor lock-ins CPP flags. (OPENAXIOM_CHECK_MM): Check for file mapping capability.
-rw-r--r--ChangeLog6
-rwxr-xr-xbuild-setup.sh1
-rw-r--r--config/open-axiom.m479
-rw-r--r--config/openaxiom-c-macros.h.in9
-rwxr-xr-xconfigure283
-rw-r--r--configure.ac1
6 files changed, 321 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index bd54fa9a..34b609ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-18 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * config/open-axiom.m4 (OPENAXIOM_CPPFLAGS_FOR_VENDOR_LOCK_INS):
+ New. Abstract over vendor lock-ins CPP flags.
+ (OPENAXIOM_CHECK_MM): Check for file mapping capability.
+
2010-08-17 Gabriel Dos Reis <gdr@cs.tamu.edu>
* ChangeLog.jap: Merge with this ChangeLog. Remove.
diff --git a/build-setup.sh b/build-setup.sh
index 5b2de857..64520b21 100755
--- a/build-setup.sh
+++ b/build-setup.sh
@@ -7,6 +7,7 @@ error() {
# set -x
+rm -rf autom4te.cache
autoheader || error "could not re-generate config/openaxiom-c-macros.h"
autoconf || error "could not re-generate configure"
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index ae73ec67..e888c971 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -175,6 +175,28 @@ AC_DEFINE_UNQUOTED([OPENAXIOM_BASE_RTS],
[The kind of base runtime system for this build.])
])
+dnl --------------------------------------------
+dnl -- OPENAXIOM_CPPFLAGS_FOR_VENDOR_LOCK_INS --
+dnl --------------------------------------------
+dnl Adjust CPPFLAGS before detecting several vendor lock-ins (or not.)
+AC_DEFUN([OPENAXIOM_CPPFLAGS_FOR_VENDOR_LOCK_INS],[
+case $host in
+ *linux*)
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ ;;
+ *bsd*|*dragonfly*)
+ CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE"
+ ;;
+ *mingw*)
+ CPPFLAGS="$CPPFLAGS -DOPENAXIOM_MS_WINDOWS_HOST"
+ ;;
+ *solaris*)
+ ## FIXME: This should disappear
+ CPPFLAGS="$CPPFLAGS -DSUNplatform"
+ ;;
+esac
+])
+
dnl ------------------------------
dnl -- OPENAXIOM_HOST_COMPILERS --
dnl ------------------------------
@@ -201,6 +223,7 @@ if test -n "$openaxiom_host_lisp_precision"; then
fi
OPENAXIOM_SATISFY_GCL_NEEDS
AC_PROG_CPP
+OPENAXIOM_CPPFLAGS_FOR_VENDOR_LOCK_INS
])
dnl -------------------------
@@ -964,29 +987,51 @@ OPENAXIOM_CHECK_BROWSER_SUPPORT
])
+dnl ------------------------
+dnl -- OPENAXIOM_CHECK_MM --
+dnl ------------------------
+dnl Check for host capability of memory mapping.
+AC_DEFUN([OPENAXIOM_CHECK_MM],[
+AC_CHECK_HEADERS([sys/mman.h])
+## We want annonymous mapping for memory allocation. Unfortunately,
+## the flag for anonymous mapping is not standardized. Popular names
+## are MAP_ANONYMOUS and MAP_ANON.
+if test x"$ac_cv_header_sys_mman_h" = xyes; then
+ AC_MSG_CHECKING([for flag to request anonymous memory mapping])
+ AC_EGREP_CPP([MAP_ANONYMOUS],
+ [#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ "MAP_ANONYMOUS"
+#endif],
+ [openaxiom_mm_anonymous_flag=MAP_ANONYMOUS])
+ if test -z "$openaxiom_mm_anonymous_flag"; then
+ AC_EGREP_CPP([MAP_ANON],
+ [#include <sys/mman.h>
+#ifdef MAP_ANON
+ "MAP_ANON"
+#endif],
+ [openaxiom_mm_anonymous_flag=MAP_ANON])
+ fi
+ ## It would be curious that we don't have an anonymous mapping
+ ## capability. Let that be known loudly.
+ if test -n "$openaxiom_mm_anonymous_flag"; then
+ AC_MSG_RESULT([$openaxiom_mm_anonymous_flag])
+ else
+ AC_MSG_ERROR([Could not find flag for anonymous map])
+ fi
+ AC_DEFINE_UNQUOTED([OPENAXIOM_MM_ANONYMOUS_MAP_FLAG],
+ [$openaxiom_mm_anonymous_flag],
+ [mmap anonymous flag])
+fi
+])
+
dnl --------------------------
dnl -- OPENAXIOM_CHECK_MISC --
dnl --------------------------
AC_DEFUN([OPENAXIOM_CHECK_MISC],[
case $GCC in
yes)
- CCF="-O2 -Wall -D_GNU_SOURCE"
+ CFLAGS="$CFLAGS -O2 -Wall"
;;
esac
-
-case $target in
- *bsd*|*dragonfly*)
- CCF="-O2 -Wall"
- ;;
- *solaris*)
- ## This should be taken out.
- AC_DEFINE([SUNplatform], [], [SunOS flavour])
- ;;
- powerpc*darwin*)
- CCF="-O2 -Wall -D_GNU_SOURCE \
- -I/usr/include -I/usr/include/sys"
- ;;
-esac
-
-AC_SUBST(CCF)
])
diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in
index 5b5e21e5..df10e836 100644
--- a/config/openaxiom-c-macros.h.in
+++ b/config/openaxiom-c-macros.h.in
@@ -84,6 +84,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
@@ -124,6 +127,9 @@
/* The width of the host Lisp and CPU registers. */
#undef OPENAXIOM_HOST_LISP_PRECISION
+/* mmap anonymous flag */
+#undef OPENAXIOM_MM_ANONYMOUS_MAP_FLAG
+
/* Whether to use the session manager as driver. */
#undef OPENAXIOM_USE_SMAN
@@ -148,9 +154,6 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* SunOS flavour */
-#undef SUNplatform
-
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
diff --git a/configure b/configure
index 93619bd0..1de37802 100755
--- a/configure
+++ b/configure
@@ -788,7 +788,6 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
-CCF
GCLOPTS
string_type
double_type
@@ -4063,6 +4062,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+case $host in
+ *linux*)
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ ;;
+ *bsd*|*dragonfly*)
+ CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE"
+ ;;
+ *mingw*)
+ CPPFLAGS="$CPPFLAGS -DOPENAXIOM_MS_WINDOWS_HOST"
+ ;;
+ *solaris*)
+ ## FIXME: This should disappear
+ CPPFLAGS="$CPPFLAGS -DSUNplatform"
+ ;;
+esac
+
+
## The following is a horrible hack to arrange for GCL to successfully
## rebuild symbol tables with "rsym" on Windows platform. It should
@@ -6968,13 +6984,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:6971: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:6987: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:6974: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:6990: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:6977: output\"" >&5)
+ (eval echo "\"\$as_me:6993: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -8176,7 +8192,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8179 "configure"' > conftest.$ac_ext
+ echo '#line 8195 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10456,11 +10472,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10459: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10475: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10463: \$? = $ac_status" >&5
+ echo "$as_me:10479: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10795,11 +10811,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10798: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10814: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10802: \$? = $ac_status" >&5
+ echo "$as_me:10818: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10900,11 +10916,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10903: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10919: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10907: \$? = $ac_status" >&5
+ echo "$as_me:10923: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10955,11 +10971,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10958: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10974: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10962: \$? = $ac_status" >&5
+ echo "$as_me:10978: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13755,7 +13771,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13758 "configure"
+#line 13774 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13851,7 +13867,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13854 "configure"
+#line 13870 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15871,11 +15887,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15874: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15890: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15878: \$? = $ac_status" >&5
+ echo "$as_me:15894: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15970,11 +15986,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15973: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15989: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15977: \$? = $ac_status" >&5
+ echo "$as_me:15993: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16022,11 +16038,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16025: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16041: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16029: \$? = $ac_status" >&5
+ echo "$as_me:16045: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -22068,31 +22084,222 @@ GCLOPTS="$oa_gcl_emacs $oa_gcl_bfd_option $oa_gcl_mm_option $oa_gcl_x_option"
-case $GCC in
- yes)
- CCF="-O2 -Wall -D_GNU_SOURCE"
- ;;
+
+for ac_header in sys/mman.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-case $target in
- *bsd*|*dragonfly*)
- CCF="-O2 -Wall"
- ;;
- *solaris*)
- ## This should be taken out.
+ ac_header_compiler=no
+fi
-cat >>confdefs.h <<\_ACEOF
-#define SUNplatform /**/
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- ;;
- powerpc*darwin*)
- CCF="-O2 -Wall -D_GNU_SOURCE \
- -I/usr/include -I/usr/include/sys"
- ;;
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------------- ##
+## Report this to open-axiom-bugs@lists.sf.net ##
+## ------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+## We want annonymous mapping for memory allocation. Unfortunately,
+## the flag for anonymous mapping is not standardized. Popular names
+## are MAP_ANONYMOUS and MAP_ANON.
+if test x"$ac_cv_header_sys_mman_h" = xyes; then
+ { $as_echo "$as_me:$LINENO: checking for flag to request anonymous memory mapping" >&5
+$as_echo_n "checking for flag to request anonymous memory mapping... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ "MAP_ANONYMOUS"
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "MAP_ANONYMOUS" >/dev/null 2>&1; then
+ openaxiom_mm_anonymous_flag=MAP_ANONYMOUS
+fi
+rm -f conftest*
+
+ if test -z "$openaxiom_mm_anonymous_flag"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ "MAP_ANON"
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "MAP_ANON" >/dev/null 2>&1; then
+ openaxiom_mm_anonymous_flag=MAP_ANON
+fi
+rm -f conftest*
+
+ fi
+ ## It would be curious that we don't have an anonymous mapping
+ ## capability. Let that be known loudly.
+ if test -n "$openaxiom_mm_anonymous_flag"; then
+ { $as_echo "$as_me:$LINENO: result: $openaxiom_mm_anonymous_flag" >&5
+$as_echo "$openaxiom_mm_anonymous_flag" >&6; }
+ else
+ { { $as_echo "$as_me:$LINENO: error: Could not find flag for anonymous map" >&5
+$as_echo "$as_me: error: Could not find flag for anonymous map" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define OPENAXIOM_MM_ANONYMOUS_MAP_FLAG $openaxiom_mm_anonymous_flag
+_ACEOF
+
+fi
+
+
+case $GCC in
+ yes)
+ CFLAGS="$CFLAGS -O2 -Wall"
+ ;;
+esac
## We are ready to instantiate makefiles.
diff --git a/configure.ac b/configure.ac
index 8ada2984..495a01c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,6 +104,7 @@ OPENAXIOM_CHECK_GRAPHICS
OPENAXIOM_FFI_TYPE_TABLE
OPENAXIOM_GCL_BUILD_OPTIONS
+OPENAXIOM_CHECK_MM
OPENAXIOM_CHECK_MISC
## We are ready to instantiate makefiles.