Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.7+dfsga-14) unstable; urgency=high
 .
   * eliminate maxpage/dbegin, restore windows and macosx builds
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.7+dfsga.orig/configure
+++ gcl-2.6.7+dfsga/configure
@@ -678,6 +678,13 @@ GREP
 MAKEINFO
 AWK
 CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
 PROCESSOR_FLAGS
 host_os
 host_vendor
@@ -687,13 +694,6 @@ build_os
 build_vendor
 build_cpu
 build
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
 VERSION
 target_alias
 host_alias
@@ -736,7 +736,6 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_maxpage
 enable_holepage
 enable_vssize
 enable_bdssize
@@ -1393,9 +1392,6 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
- --enable-maxpage=XXXX  will compile in a page table of size XXX
-                         (eg '--enable-maxpage=64*1024' would produce
-			 64K pages allowing 256 MB if pages are 4K each)
  --enable-holepage=XXXX will compile in a XXX-sized hole between the heap and relocatable memory area (eg '--enable-holepage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each)
  --enable-vssize=XXXX will compile in a value stack of size XXX
  --enable-bdssize=XXXX will compile in a binding stack of size XXX
@@ -1571,6 +1567,43 @@ fi
 
 } # ac_fn_c_try_compile
 
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
 # ac_fn_c_try_run LINENO
 # ----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -1613,43 +1646,6 @@ fi
 
 } # ac_fn_c_try_run
 
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
 # -------------------------------------------------------
 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -2493,944 +2489,114 @@ VERSION=`cat majvers`.`cat minvers`
 # Arguments
 #
 
-help="--enable-maxpage=XXXX will compile in a page table of size XXX (default ${default_maxpage})"
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+
+
+
+# Check whether --enable-holepage was given.
+if test "${enable_holepage+set}" = set; then :
+  enableval=$enable_holepage;
+cat >>confdefs.h <<_ACEOF
+#define HOLEPAGE $enable_holepage
+_ACEOF
 
 fi
+
+
+# Check whether --enable-vssize was given.
+if test "${enable_vssize+set}" = set; then :
+  enableval=$enable_vssize;
+else
+  enable_vssize=262144
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define VSSIZE $enable_vssize
+_ACEOF
+
+
+# Check whether --enable-bdssize was given.
+if test "${enable_bdssize+set}" = set; then :
+  enableval=$enable_bdssize;
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  enable_bdssize=2048
 fi
 
 
+cat >>confdefs.h <<_ACEOF
+#define BDSSIZE $enable_bdssize
+_ACEOF
+
+
+# Check whether --enable-ihssize was given.
+if test "${enable_ihssize+set}" = set; then :
+  enableval=$enable_ihssize;
+else
+  enable_ihssize=4096
 fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+
+cat >>confdefs.h <<_ACEOF
+#define IHSSIZE $enable_ihssize
+_ACEOF
+
+
+# Check whether --enable-frssize was given.
+if test "${enable_frssize+set}" = set; then :
+  enableval=$enable_frssize;
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+  enable_frssize=4096
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define FRSSIZE $enable_frssize
+_ACEOF
+
+
+# Check whether --enable-machine was given.
+if test "${enable_machine+set}" = set; then :
+  enableval=$enable_machine; enable_machine=$enableval
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  enable_machine=""
+fi
+
 
+# Check whether --enable-immfix was given.
+if test "${enable_immfix+set}" = set; then :
+  enableval=$enable_immfix;
+else
+  enable_immfix=yes
 fi
+
+
+#AC_ARG_ENABLE(gmp,[ --enable-gmp=no will disable use of GMP gnu multiprecision arithmetic, (default is =yes)] ,
+#[use_gmp=$enableval],[use_gmp="yes"])
+
+use_gmp="yes"
+
+# Check whether --enable-notify was given.
+if test "${enable_notify+set}" = set; then :
+  enableval=$enable_notify; enable_notify=$enableval
+else
+  enable_notify="yes"
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+
+
+# Check whether --enable-tcltk was given.
+if test "${enable_tcltk+set}" = set; then :
+  enableval=$enable_tcltk; enable_tcltk=$enableval
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  enable_tcltk="yes"
 fi
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
+
+# Check whether --enable-tkconfig was given.
+if test "${enable_tkconfig+set}" = set; then :
+  enableval=$enable_tkconfig; TK_CONFIG_PREFIX=$enableval
 else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	    #include <stdio.h>
-            #include <unistd.h>
-
-int
-main ()
-{
-
-	    FILE *fp=fopen("conftest1","w");
-	    fprintf(fp,"%u",262144*( SIZEOF_LONG >>2)/(1<<($PAGEWIDTH-12)));
-	    return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  def_maxpage=`cat conftest1`
-else
-  def_maxpage=262144
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-# Check whether --enable-maxpage was given.
-if test "${enable_maxpage+set}" = set; then :
-  enableval=$enable_maxpage;
-else
-  enable_maxpage=$def_maxpage
-fi
-
-
-
-# Check whether --enable-holepage was given.
-if test "${enable_holepage+set}" = set; then :
-  enableval=$enable_holepage;
-cat >>confdefs.h <<_ACEOF
-#define HOLEPAGE $enable_holepage
-_ACEOF
-
-fi
-
-
-# Check whether --enable-vssize was given.
-if test "${enable_vssize+set}" = set; then :
-  enableval=$enable_vssize;
-else
-  enable_vssize=262144
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define VSSIZE $enable_vssize
-_ACEOF
-
-
-# Check whether --enable-bdssize was given.
-if test "${enable_bdssize+set}" = set; then :
-  enableval=$enable_bdssize;
-else
-  enable_bdssize=2048
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define BDSSIZE $enable_bdssize
-_ACEOF
-
-
-# Check whether --enable-ihssize was given.
-if test "${enable_ihssize+set}" = set; then :
-  enableval=$enable_ihssize;
-else
-  enable_ihssize=4096
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define IHSSIZE $enable_ihssize
-_ACEOF
-
-
-# Check whether --enable-frssize was given.
-if test "${enable_frssize+set}" = set; then :
-  enableval=$enable_frssize;
-else
-  enable_frssize=4096
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define FRSSIZE $enable_frssize
-_ACEOF
-
-
-# Check whether --enable-machine was given.
-if test "${enable_machine+set}" = set; then :
-  enableval=$enable_machine; enable_machine=$enableval
-else
-  enable_machine=""
-fi
-
-
-# Check whether --enable-immfix was given.
-if test "${enable_immfix+set}" = set; then :
-  enableval=$enable_immfix;
-else
-  enable_immfix=yes
-fi
-
-
-#AC_ARG_ENABLE(gmp,[ --enable-gmp=no will disable use of GMP gnu multiprecision arithmetic, (default is =yes)] ,
-#[use_gmp=$enableval],[use_gmp="yes"])
-
-use_gmp="yes"
-
-# Check whether --enable-notify was given.
-if test "${enable_notify+set}" = set; then :
-  enableval=$enable_notify; enable_notify=$enableval
-else
-  enable_notify="yes"
-fi
-
-
-# Check whether --enable-tcltk was given.
-if test "${enable_tcltk+set}" = set; then :
-  enableval=$enable_tcltk; enable_tcltk=$enableval
-else
-  enable_tcltk="yes"
-fi
-
-
-# Check whether --enable-tkconfig was given.
-if test "${enable_tkconfig+set}" = set; then :
-  enableval=$enable_tkconfig; TK_CONFIG_PREFIX=$enableval
-else
-  TK_CONFIG_PREFIX="unknown"
+  TK_CONFIG_PREFIX="unknown"
 fi
 
 
@@ -4263,70 +3429,320 @@ do
     break 2
   fi
 done
-  done
-IFS=$as_save_IFS
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
 else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-fi
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
 
-  test -n "$ac_ct_CC" && break
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
 done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-    CC=$ac_ct_CC
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
 
-fi
-
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+int
+main ()
+{
 
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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:${as_lineno-$LINENO}: $ac_try_echo\""
 $as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  (eval "$ac_compile") 2>&5
   ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
 done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
 if ${ac_cv_c_compiler_gnu+:} false; then :
@@ -4698,7 +4114,8 @@ if test "$GCC" = "yes" ; then
 $as_echo_n "checking for CFLAG $TMPF... " >&6; }
    CFLAGS_ORI=$CFLAGS
    CFLAGS="$CFLAGS $TMPF"
-   if test "$cross_compiling" = yes; then :
+
+if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
@@ -7022,102 +6439,17 @@ $as_echo "no" >&6; }
 		echo " - upgrade to a kernel/libc that knows about personality(ADDR_NO_RANDOMIZE)"
 		echo " - recompile your kernel with CONFIG_COMPAT_BRK (if it has that option)"
 		echo " - run sysctl kernel.randomize_va_space=0 before using gcl"
-		exit 1
-	fi
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DBEGIN" >&5
-$as_echo_n "checking DBEGIN... " >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  #include <stdio.h>
-  #include <stdlib.h>
-  #include <unistd.h>
-  void gprof_cleanup() {};
-
-  int main(int argc,char **argv,char **envp) {
-
-  void *b;
-  FILE *fp;
-
-  #ifdef CAN_UNRANDOMIZE_SBRK
-  #include "h/unrandomize.h"
-  #endif
-
-  fp = fopen("conftest1","w");
-
-  #ifdef _WIN32
-  fprintf ( fp,"0x%lx", 0x3000000 );  /* Windows custom allocation from this point up */
-  #else
-  #if defined (__APPLE__) && defined (__MACH__)
-  fprintf(fp,"0x0");
-  #else
-  b = sbrk(0);
-  fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)((1<<PAGEWIDTH)-1));
-  #endif
-  #endif
-  fclose(fp);
-  return 0;}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  dbegin=`cat conftest1`
-else
-  dbegin=0
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbegin" >&5
-$as_echo "$dbegin" >&6; }
-
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	    #include <stdio.h>
-            #include <unistd.h>
-
-int
-main ()
-{
-
-	    FILE *fp=fopen("conftest1","w");
-	    fprintf(fp,"%u",262144*( SIZEOF_LONG >>2)/(1<<($PAGEWIDTH-12)));
-	    return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  def_maxpage=`cat conftest1`
-else
-  def_maxpage=262144
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+		exit 1
+	fi
 fi
 
 
-# Check whether --enable-maxpage was given.
-if test "${enable_maxpage+set}" = set; then :
-  enableval=$enable_maxpage;
-else
-  enable_maxpage=$def_maxpage
-fi
+
+
+
+
+
+
 
 
 
@@ -7320,89 +6652,8 @@ _ACEOF
 $as_echo "$cstack_direction" >&6; }
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library/C stack ceiling to heap" >&5
-$as_echo_n "checking for shared library/C stack ceiling to heap... " >&6; }
-if test "$use" = "mingw" ; then
-  heap_ceiling=2000000000
-else
-if test "$use" = "solaris-i386" ; then
-  heap_ceiling=0x0
-else
-if test "$enable_static" = "yes" ; then
-  heap_ceiling=0x0
-else
-if ! test -x `which ldd` && ! test -f /proc/self/maps ; then
-   heap_ceiling=0x0
-else
-if test -f /proc/self/maps ; then
-   heap_ceiling=0x`/bin/cat /proc/self/maps | grep "/lib.*/ld-" | cut -f1 -d- | head -1`
-else
-if test "`which ldd`" = "" ; then
-   heap_ceiling=0x0
-else
-#echo -e "#include <stdio.h>\n int main() {printf(\"foo\");return 0;}" >foo.c
-#$CC foo.c -o foo
-   AAWK=`which awk`
-# | grep -v ld-kfreebsd needed on some strange bsd amd64 boxes
-   heap_ceiling=`ldd $AAWK | tail -n 1 | $AWK '{print $NF}' | tr -d '()'`
-fi
-fi
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	#include <stdio.h>
-
-int
-main ()
-{
-
-	FILE *fp=fopen("conftest1","w");
-	unsigned long h=$heap_ceiling,d=$dbegin,c=$cstack_address;
-	h=h<d ? 0 : h;
-	h=c>d && c<h ? c : h;
-	fprintf(fp,"0x%lx",h);
-	return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  heap_ceiling=`cat conftest1`
-else
-  as_fn_error $? "failed" "$LINENO" 5
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $heap_ceiling" >&5
-$as_echo "$heap_ceiling" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define SHARED_LIB_HEAP_CEILING $heap_ceiling
-_ACEOF
 
 
-## Don't lower heap start if C stack is below default dbegin, as we're
-# likely to get more heap this way.
-if test "$enable_static" = "yes" ; then
-   echo "int main() {return !((unsigned long)$dbegin < (unsigned long)$cstack_address);}" >foo.c
-else
-   echo "int main() {return !($heap_ceiling && (unsigned long)$dbegin < (unsigned long)$cstack_address);}" >foo.c
-fi
-$CC foo.c -o foo
-if ./foo ; then
-
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking finding default linker script" >&5
 $as_echo_n "checking finding default linker script... " >&6; }
    touch unixport/gcl.script
@@ -7444,328 +6695,18 @@ $as_echo "none" >&6; }
      rm -f gcl.script
    fi
 
-   old_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $TLDFLAGS"
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking revised DBEGIN" >&5
-$as_echo_n "checking revised DBEGIN... " >&6; }
-   if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	#include <stdio.h>
-	#include <stdlib.h>
-	#include <unistd.h>
-
-	int main(int argc,char **argv,char **envp) {
-
-	    void *b;
-	    FILE *fp;
-
-	    #ifdef CAN_UNRANDOMIZE_SBRK
-	    #include "h/unrandomize.h"
-	    #endif
-	    fp = fopen("conftest1","w");
-
-	    #ifdef _WIN32
-	    fprintf ( fp,"0x%lx", 0x1a000000 );  /* Windows custom allocation from this point up */
-	    #else
-	    #if defined (__APPLE__) && defined (__MACH__)
-	    fprintf(fp,"((unsigned long)get_dbegin())");
-	    #else
-	    b = sbrk(0);
-	    fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)0xffffff);
-	    #endif
-	    #endif
-	    fclose(fp);
-	    return 0;}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  dbegin=`cat conftest1`
-else
-  dbegin=0
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbegin" >&5
-$as_echo "$dbegin" >&6; }
-   LDFLAGS="$old_LDFLAGS"
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define DBEGIN $dbegin
-_ACEOF
-
-rm -rf foo*
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maxpage revision" >&5
-$as_echo_n "checking for maxpage revision... " >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	#include <stdio.h>
-
-int
-main ()
-{
-
-	char *b;
-	unsigned long i,j;
-	FILE *fp = fopen("conftest1","w");
-	j=((unsigned long)$enable_maxpage <<$PAGEWIDTH) + $dbegin;
-	j=$heap_ceiling && j>$heap_ceiling ? $heap_ceiling : j;
-	j-=$dbegin;
-	/*  for (i=1;i<<1 && i<=j;i<<=1); */
-	/*  if (i>j) i>>=1; */
-	i=j;
-	fprintf(fp,"%ld",i>>$PAGEWIDTH);
-	fclose(fp);
-	return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  tmp_maxpage=`cat conftest1`
-else
-  tmp_maxpage=0
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-if test "$tmp_maxpage" != "$enable_maxpage" ; then
-   enable_maxpage=$tmp_maxpage
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_maxpage" >&5
-$as_echo "$enable_maxpage" >&6; }
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_maxpage is OK" >&5
-$as_echo "$enable_maxpage is OK" >&6; }
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define MAXPAGE $enable_maxpage
-_ACEOF
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C stack size floor from heap" >&5
-$as_echo_n "checking for C stack size floor from heap... " >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	#include <stdio.h>
-
-int
-main ()
-{
-
-	char *b;
-	FILE *fp = fopen("conftest1","w");
-	unsigned long j,k;
-
-	j=$cstack_address + $cstack_direction * $enable_cssize;
-	k=($dbegin + ((unsigned long)$enable_maxpage << $PAGEWIDTH));
-	j=abs(j-$cstack_address)!=$enable_cssize || (j<k && $dbegin < $cstack_address) ? k : j;
-	j-=$cstack_address;
-	j*=$cstack_direction;
-	fprintf(fp,"%lu",j);
-	fclose(fp);
-	return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  tmp_cssize=`cat conftest1`
-else
-  tmp_cssize=0
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-if test "$tmp_cssize" != "$enable_cssize" ; then
-   enable_cssize=$tmp_cssize;
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cssize" >&5
-$as_echo "$enable_cssize" >&6; }
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cssize is OK" >&5
-$as_echo "$enable_cssize is OK" >&6; }
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C stack size limit from fixnum table" >&5
-$as_echo_n "checking for C stack size limit from fixnum table... " >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	#include <stdio.h>
-
-int
-main ()
-{
-
-	char *b;
-	FILE *fp = fopen("conftest1","w");
-	unsigned long j,k;
-
-	j=$cstack_address + $cstack_direction * $enable_cssize;
-	if ($cstack_direction>0) {
-	  k=$cstack_address + ((-(unsigned long)$cstack_address)>>1);
-	  j=j<$cstack_address || j > k ? k : j;
-	  j=$cstack_address < $dbegin && j > $dbegin ? $dbegin : j;
-	}
-	j-=$cstack_address;
-	j*=$cstack_direction;
-	fprintf(fp,"%lu",j);
-	fclose(fp);
-	return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  tmp_cssize=`cat conftest1`
-else
-  tmp_cssize=0
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-if test "$tmp_cssize" != "$enable_cssize" ; then
-   enable_cssize=$tmp_cssize;
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cssize" >&5
-$as_echo "$enable_cssize" >&6; }
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cssize is OK" >&5
-$as_echo "$enable_cssize is OK" >&6; }
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C stack size limit from address wrap" >&5
-$as_echo_n "checking for C stack size limit from address wrap... " >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-	#include <stdio.h>
-
-int
-main ()
-{
-
-	char *b;
-	FILE *fp = fopen("conftest1","w");
-	unsigned long j,k;
-
-	j=-$cstack_address * $cstack_direction;
-	j=j>$enable_cssize ? $enable_cssize : j;
-	fprintf(fp,"%lu",j);
-	fclose(fp);
-	return 0;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  tmp_cssize=`cat conftest1`
-else
-  tmp_cssize=0
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-if test "$tmp_cssize" != "$enable_cssize" ; then
-   enable_cssize=$tmp_cssize;
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cssize" >&5
-$as_echo "$enable_cssize" >&6; }
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cssize is OK" >&5
-$as_echo "$enable_cssize is OK" >&6; }
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define CSSIZE $enable_cssize
-_ACEOF
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fast NULL_OR_ON_CSTACK macro" >&5
-$as_echo_n "checking for fast NULL_OR_ON_CSTACK macro... " >&6; }
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-	#include <stdio.h>
 
-int
-main ()
-{
 
-	return ((long)$dbegin>=0 &&
-	       ((long)$dbegin+(long)($enable_maxpage<<$PAGEWIDTH)) >=0 &&
-	       ((long)$cstack_address<0)) ? 0 : 1;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  tmp_fnocm=yes
-else
-  tmp_fnocm=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-if test "$tmp_fnocm" = "yes" ; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define USE_FAST_NULL_OR_ON_CSTACK_MACRO 1" >>confdefs.h
 
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 mem_top=0
 mem_range=0
@@ -7791,9 +6732,8 @@ main ()
 	FILE *fp = fopen("conftest1","w");
 
 	for (i=2,k=1;i;k=i,i<<=1);
-	l=$cstack_address + ($cstack_direction==1 ? $enable_cssize : 0);
-	m=$dbegin + ((unsigned long)$enable_maxpage << $PAGEWIDTH);
-	l=l<m ? m : l;
+	l=$cstack_address;
+	l=$cstack_direction==1 ? (l<k ? k-1 : -1) : l;
 	for (i=j=k;j && i<l;j>>=1,i|=j);
 	if (j<(k>>3)) i=0;
 	j=1;
@@ -7813,7 +6753,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   mem_top=`cat conftest1`
 else
-  mem_top=0
+  mem_top="0x0"
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -7821,7 +6761,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mem_top" >&5
 $as_echo "$mem_top" >&6; }
-if test "$mem_top" != "0" ; then
+if test "$mem_top" != "0x0" ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking finding upper mem half range" >&5
 $as_echo_n "checking finding upper mem half range... " >&6; }
    if test "$cross_compiling" = yes; then :
@@ -7854,7 +6794,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   mem_range=`cat conftest1`
 else
-  mem_range=0
+  mem_range="0x0"
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -7862,7 +6802,7 @@ fi
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mem_range" >&5
 $as_echo "$mem_range" >&6; }
-   if test "$mem_range" != "0" ; then
+   if test "$mem_range" != "0x0" ; then
 
 cat >>confdefs.h <<_ACEOF
 #define MEM_TOP $mem_top
--- gcl-2.6.7+dfsga.orig/makefile
+++ gcl-2.6.7+dfsga/makefile
@@ -260,7 +260,7 @@ $(HDIR)cmpinclude.h: $(CMPINCLUDE_FILES)
 		-e "/End for cmpinclude/,50000d" > tmpx.h
 	cd h && cpp tsgc.h 2>/dev/null| grep -v '^ *$$' | tail -1l | tr -d '"' >>../tmpx.h
 	cat $(CMPINCLUDE_FILES)  >> tmpx.h
-	gcc -E -I$(HDIR)  -dD tmpx.h | grep -v "#define *__STDC__ " | grep -v "#define *__STDC_HOSTED__ " | grep -v "#define  *__GNUC_PATCHLEVEL__ " | grep -v "#define  *__VERSION__ ">tmpx1 && mv tmpx1 tmpx.h
+	$(CC) -E -I$(HDIR)  -dD tmpx.h | grep -v "#define putc"|grep -v "#define getc" | grep -v "#define *__STDC__ " | grep -v "#define *__STDC_HOSTED__ " | grep -v "#define  *__GNUC_PATCHLEVEL__ " | grep -v "#define  *__VERSION__ ">tmpx1 && mv tmpx1 tmpx.h
 	./xbin/move-if-changed mv tmpx.h h/cmpinclude.h
 	./xbin/move-if-changed cp h/cmpinclude.h o/cmpinclude.h
 
--- gcl-2.6.7+dfsga.orig/configure.in
+++ gcl-2.6.7+dfsga/configure.in
@@ -11,21 +11,21 @@ AC_SUBST(VERSION)
 # Arguments
 #
 
-help="--enable-maxpage=XXXX will compile in a page table of size XXX (default ${default_maxpage})"
+dnl help="--enable-maxpage=XXXX will compile in a page table of size XXX (default ${default_maxpage})"
 
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	    #include <stdio.h>
-            #include <unistd.h>
-	    ]],[[
-	    FILE *fp=fopen("conftest1","w");
-	    fprintf(fp,"%u",262144*( SIZEOF_LONG >>2)/(1<<($PAGEWIDTH-12)));
-	    return 0;]])],[def_maxpage=`cat conftest1`],[def_maxpage=262144])
-
-AC_ARG_ENABLE(maxpage,
-[ --enable-maxpage=XXXX  will compile in a page table of size XXX
-                         (eg '--enable-maxpage=64*1024' would produce
-			 64K pages allowing 256 MB if pages are 4K each)],
-,enable_maxpage=$def_maxpage)
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	    #include <stdio.h>
+dnl             #include <unistd.h>
+dnl 	    ]],[[
+dnl 	    FILE *fp=fopen("conftest1","w");
+dnl 	    fprintf(fp,"%u",262144*( SIZEOF_LONG >>2)/(1<<($PAGEWIDTH-12)));
+dnl 	    return 0;]])],[def_maxpage=`cat conftest1`],[def_maxpage=262144])
+
+dnl AC_ARG_ENABLE(maxpage,
+dnl [ --enable-maxpage=XXXX  will compile in a page table of size XXX
+dnl                          (eg '--enable-maxpage=64*1024' would produce
+dnl 			 64K pages allowing 256 MB if pages are 4K each)],
+dnl ,enable_maxpage=$def_maxpage)
 
 
 AC_ARG_ENABLE(holepage,[ --enable-holepage=XXXX will compile in a XXX-sized hole between the heap and relocatable memory area (eg '--enable-holepage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each)] ,
@@ -1277,53 +1277,53 @@ if test "$HAVE_SBRK" = "1" ; then
 	fi
 fi
 
-AC_MSG_CHECKING(DBEGIN)
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
-  #include <stdio.h>
-  #include <stdlib.h>
-  #include <unistd.h>
-  void gprof_cleanup() {};
-
-  int main(int argc,char **argv,char **envp) {
-
-  void *b;
-  FILE *fp;
-
-  #ifdef CAN_UNRANDOMIZE_SBRK
-  #include "h/unrandomize.h"
-  #endif
+dnl AC_MSG_CHECKING(DBEGIN)
+dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[
+dnl   #include <stdio.h>
+dnl   #include <stdlib.h>
+dnl   #include <unistd.h>
+dnl   void gprof_cleanup() {};
+
+dnl   int main(int argc,char **argv,char **envp) {
+
+dnl   void *b;
+dnl   FILE *fp;
+
+dnl   #ifdef CAN_UNRANDOMIZE_SBRK
+dnl   #include "h/unrandomize.h"
+dnl   #endif
 			
-  fp = fopen("conftest1","w");
+dnl   fp = fopen("conftest1","w");
 
-  #ifdef _WIN32
-  fprintf ( fp,"0x%lx", 0x3000000 );  /* Windows custom allocation from this point up */
-  #else
-  #if defined (__APPLE__) && defined (__MACH__)
-  fprintf(fp,"0x0");
-  #else
-  b = sbrk(0);
-  fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)((1<<PAGEWIDTH)-1));
-  #endif
-  #endif
-  fclose(fp);
-  return 0;}]])],
-  [dbegin=`cat conftest1`],[dbegin=0])
-
-AC_MSG_RESULT($dbegin)
-
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	    #include <stdio.h>
-            #include <unistd.h>
-	    ]],[[
-	    FILE *fp=fopen("conftest1","w");
-	    fprintf(fp,"%u",262144*( SIZEOF_LONG >>2)/(1<<($PAGEWIDTH-12)));
-	    return 0;]])],[def_maxpage=`cat conftest1`],[def_maxpage=262144])
-
-AC_ARG_ENABLE(maxpage,
-[ --enable-maxpage=XXXX  will compile in a page table of size XXX
-                         (eg '--enable-maxpage=64*1024' would produce
-			 64K pages allowing 256 MB if pages are 4K each)],
-,enable_maxpage=$def_maxpage)
+dnl   #ifdef _WIN32
+dnl   fprintf ( fp,"0x%lx", 0x3000000 );  /* Windows custom allocation from this point up */
+dnl   #else
+dnl   #if defined (__APPLE__) && defined (__MACH__)
+dnl   fprintf(fp,"0x0");
+dnl   #else
+dnl   b = sbrk(0);
+dnl   fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)((1<<PAGEWIDTH)-1));
+dnl   #endif
+dnl   #endif
+dnl   fclose(fp);
+dnl   return 0;}]])],
+dnl   [dbegin=`cat conftest1`],[dbegin=0])
+
+dnl AC_MSG_RESULT($dbegin)
+
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	    #include <stdio.h>
+dnl             #include <unistd.h>
+dnl 	    ]],[[
+dnl 	    FILE *fp=fopen("conftest1","w");
+dnl 	    fprintf(fp,"%u",262144*( SIZEOF_LONG >>2)/(1<<($PAGEWIDTH-12)));
+dnl 	    return 0;]])],[def_maxpage=`cat conftest1`],[def_maxpage=262144])
+
+dnl AC_ARG_ENABLE(maxpage,
+dnl [ --enable-maxpage=XXXX  will compile in a page table of size XXX
+dnl                          (eg '--enable-maxpage=64*1024' would produce
+dnl 			 64K pages allowing 256 MB if pages are 4K each)],
+dnl ,enable_maxpage=$def_maxpage)
 
 
 AC_MSG_CHECKING(CSTACK_ADDRESS)
@@ -1403,58 +1403,58 @@ AC_DEFINE_UNQUOTED(CSTACK_DIRECTION,$cst
 AC_MSG_RESULT($cstack_direction)
 
 
-AC_MSG_CHECKING(for shared library/C stack ceiling to heap)
-if test "$use" = "mingw" ; then
-  heap_ceiling=2000000000
-else
-if test "$use" = "solaris-i386" ; then
-  heap_ceiling=0x0
-else
-if test "$enable_static" = "yes" ; then
-  heap_ceiling=0x0
-else
-if ! test -x `which ldd` && ! test -f /proc/self/maps ; then
-   heap_ceiling=0x0
-else
-if test -f /proc/self/maps ; then
-   heap_ceiling=0x`/bin/cat /proc/self/maps | grep "/lib.*/ld-" | cut -f1 -d- | head -1`
-else 
-if test "`which ldd`" = "" ; then 
-   heap_ceiling=0x0
-else
-#echo -e "#include <stdio.h>\n int main() {printf(\"foo\");return 0;}" >foo.c
-#$CC foo.c -o foo
-   AAWK=`which awk`
-# | grep -v ld-kfreebsd needed on some strange bsd amd64 boxes
-   heap_ceiling=`ldd $AAWK | tail -n 1 | $AWK '{print $NF}' | tr -d '()'`
-fi
-fi
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	#include <stdio.h>
-	]],[[
-	FILE *fp=fopen("conftest1","w");
-	unsigned long h=$heap_ceiling,d=$dbegin,c=$cstack_address;
-	h=h<d ? 0 : h;
-	h=c>d && c<h ? c : h;
-	fprintf(fp,"0x%lx",h);
-	return 0;]])],[heap_ceiling=`cat conftest1`],[AC_MSG_ERROR([failed])])
-fi
-fi
-fi
-fi
-AC_MSG_RESULT($heap_ceiling)
-AC_DEFINE_UNQUOTED(SHARED_LIB_HEAP_CEILING,$heap_ceiling,
-	[address at which shared lib placement terminates heap growth])
-
-## Don't lower heap start if C stack is below default dbegin, as we're
-# likely to get more heap this way.
-if test "$enable_static" = "yes" ; then 
-   echo "int main() {return !((unsigned long)$dbegin < (unsigned long)$cstack_address);}" >foo.c
-else
-   echo "int main() {return !($heap_ceiling && (unsigned long)$dbegin < (unsigned long)$cstack_address);}" >foo.c
-fi
-$CC foo.c -o foo
-if ./foo ; then
+dnl AC_MSG_CHECKING(for shared library/C stack ceiling to heap)
+dnl if test "$use" = "mingw" ; then
+dnl   heap_ceiling=2000000000
+dnl else
+dnl if test "$use" = "solaris-i386" ; then
+dnl   heap_ceiling=0x0
+dnl else
+dnl if test "$enable_static" = "yes" ; then
+dnl   heap_ceiling=0x0
+dnl else
+dnl if ! test -x `which ldd` && ! test -f /proc/self/maps ; then
+dnl    heap_ceiling=0x0
+dnl else
+dnl if test -f /proc/self/maps ; then
+dnl    heap_ceiling=0x`/bin/cat /proc/self/maps | grep "/lib.*/ld-" | cut -f1 -d- | head -1`
+dnl else 
+dnl if test "`which ldd`" = "" ; then 
+dnl    heap_ceiling=0x0
+dnl else
+dnl #echo -e "#include <stdio.h>\n int main() {printf(\"foo\");return 0;}" >foo.c
+dnl #$CC foo.c -o foo
+dnl    AAWK=`which awk`
+dnl # | grep -v ld-kfreebsd needed on some strange bsd amd64 boxes
+dnl    heap_ceiling=`ldd $AAWK | tail -n 1 | $AWK '{print $NF}' | tr -d '()'`
+dnl fi
+dnl fi
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	#include <stdio.h>
+dnl 	]],[[
+dnl 	FILE *fp=fopen("conftest1","w");
+dnl 	unsigned long h=$heap_ceiling,d=$dbegin,c=$cstack_address;
+dnl 	h=h<d ? 0 : h;
+dnl 	h=c>d && c<h ? c : h;
+dnl 	fprintf(fp,"0x%lx",h);
+dnl 	return 0;]])],[heap_ceiling=`cat conftest1`],[AC_MSG_ERROR([failed])])
+dnl fi
+dnl fi
+dnl fi
+dnl fi
+dnl AC_MSG_RESULT($heap_ceiling)
+dnl AC_DEFINE_UNQUOTED(SHARED_LIB_HEAP_CEILING,$heap_ceiling,
+dnl 	[address at which shared lib placement terminates heap growth])
+
+dnl ## Don't lower heap start if C stack is below default dbegin, as we're
+dnl # likely to get more heap this way.
+dnl if test "$enable_static" = "yes" ; then 
+dnl    echo "int main() {return !((unsigned long)$dbegin < (unsigned long)$cstack_address);}" >foo.c
+dnl else
+dnl    echo "int main() {return !($heap_ceiling && (unsigned long)$dbegin < (unsigned long)$cstack_address);}" >foo.c
+dnl fi
+dnl $CC foo.c -o foo
+dnl if ./foo ; then
 
    AC_MSG_CHECKING([finding default linker script])
    touch unixport/gcl.script
@@ -1489,154 +1489,154 @@ if ./foo ; then
      rm -f gcl.script
    fi
 
-   old_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $TLDFLAGS"
-   AC_MSG_CHECKING([revised DBEGIN])
-   AC_RUN_IFELSE([AC_LANG_SOURCE([[
-	#include <stdio.h>
-	#include <stdlib.h>
-	#include <unistd.h>
-
-	int main(int argc,char **argv,char **envp) {
-
-	    void *b;
-	    FILE *fp;
-
-	    #ifdef CAN_UNRANDOMIZE_SBRK
-	    #include "h/unrandomize.h"
-	    #endif
-	    fp = fopen("conftest1","w");
-
-	    #ifdef _WIN32
-	    fprintf ( fp,"0x%lx", 0x1a000000 );  /* Windows custom allocation from this point up */
-	    #else
-	    #if defined (__APPLE__) && defined (__MACH__)
-	    fprintf(fp,"((unsigned long)get_dbegin())");
-	    #else
-	    b = sbrk(0);
-	    fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)0xffffff);
-	    #endif
-	    #endif
-	    fclose(fp);
-	    return 0;}]])],[dbegin=`cat conftest1`],[dbegin=0])
-   AC_MSG_RESULT($dbegin)
-   LDFLAGS="$old_LDFLAGS"
-fi
-AC_DEFINE_UNQUOTED(DBEGIN,$dbegin,[down-rounded beginning address of lisp data])
-rm -rf foo*
-
-AC_MSG_CHECKING(for maxpage revision)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	#include <stdio.h>
-	]],[[
-	char *b;
-	unsigned long i,j;
-	FILE *fp = fopen("conftest1","w");
-	j=((unsigned long)$enable_maxpage <<$PAGEWIDTH) + $dbegin;
-	j=$heap_ceiling && j>$heap_ceiling ? $heap_ceiling : j;
-	j-=$dbegin;
-	/*  for (i=1;i<<1 && i<=j;i<<=1); */
-	/*  if (i>j) i>>=1; */
-	i=j;
-	fprintf(fp,"%ld",i>>$PAGEWIDTH);
-	fclose(fp);
-	return 0;
-]])],[tmp_maxpage=`cat conftest1`],[tmp_maxpage=0])
-if test "$tmp_maxpage" != "$enable_maxpage" ; then
-   enable_maxpage=$tmp_maxpage
-   AC_MSG_RESULT($enable_maxpage)
-else
-   AC_MSG_RESULT($enable_maxpage is OK)
-fi
-AC_DEFINE_UNQUOTED(MAXPAGE,$enable_maxpage,[maximum number of pages to be allocated])
-
-AC_MSG_CHECKING(for C stack size floor from heap)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	#include <stdio.h>
-	]],[[
-	char *b;
-	FILE *fp = fopen("conftest1","w");
-	unsigned long j,k;
-
-	j=$cstack_address + $cstack_direction * $enable_cssize;
-	k=($dbegin + ((unsigned long)$enable_maxpage << $PAGEWIDTH));
-	j=abs(j-$cstack_address)!=$enable_cssize || (j<k && $dbegin < $cstack_address) ? k : j;
-	j-=$cstack_address;
-	j*=$cstack_direction;
-	fprintf(fp,"%lu",j);
-	fclose(fp);
-	return 0;
-]])],[tmp_cssize=`cat conftest1`],[tmp_cssize=0])
-if test "$tmp_cssize" != "$enable_cssize" ; then
-   enable_cssize=$tmp_cssize;
-   AC_MSG_RESULT($enable_cssize)
-else
-   AC_MSG_RESULT($enable_cssize is OK)
-fi
-
-AC_MSG_CHECKING(for C stack size limit from fixnum table)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	#include <stdio.h>
-	]],[[
-	char *b;
-	FILE *fp = fopen("conftest1","w");
-	unsigned long j,k;
-
-	j=$cstack_address + $cstack_direction * $enable_cssize;
-	if ($cstack_direction>0) {
-	  k=$cstack_address + ((-(unsigned long)$cstack_address)>>1);
-	  j=j<$cstack_address || j > k ? k : j;
-	  j=$cstack_address < $dbegin && j > $dbegin ? $dbegin : j;
-	}
-	j-=$cstack_address;
-	j*=$cstack_direction;
-	fprintf(fp,"%lu",j);
-	fclose(fp);
-	return 0;
-]])],[tmp_cssize=`cat conftest1`],[tmp_cssize=0])
-if test "$tmp_cssize" != "$enable_cssize" ; then
-   enable_cssize=$tmp_cssize;
-   AC_MSG_RESULT($enable_cssize)
-else
-   AC_MSG_RESULT($enable_cssize is OK)
-fi
-
-AC_MSG_CHECKING(for C stack size limit from address wrap)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	#include <stdio.h>
-	]],[[
-	char *b;
-	FILE *fp = fopen("conftest1","w");
-	unsigned long j,k;
-
-	j=-$cstack_address * $cstack_direction;
-	j=j>$enable_cssize ? $enable_cssize : j;
-	fprintf(fp,"%lu",j);
-	fclose(fp);
-	return 0;
-]])],[tmp_cssize=`cat conftest1`],[tmp_cssize=0])
-if test "$tmp_cssize" != "$enable_cssize" ; then
-   enable_cssize=$tmp_cssize;
-   AC_MSG_RESULT($enable_cssize)
-else
-   AC_MSG_RESULT($enable_cssize is OK)
-fi
-AC_DEFINE_UNQUOTED(CSSIZE,$enable_cssize,[maximum C stack size])
-
-AC_MSG_CHECKING(for fast NULL_OR_ON_CSTACK macro)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	#include <stdio.h>
-	]],[[
-	return ((long)$dbegin>=0 &&
-	       ((long)$dbegin+(long)($enable_maxpage<<$PAGEWIDTH)) >=0 &&
-	       ((long)$cstack_address<0)) ? 0 : 1;
-]])],[tmp_fnocm=yes],[tmp_fnocm=no])
-if test "$tmp_fnocm" = "yes" ; then
-   AC_MSG_RESULT(yes)
-   AC_DEFINE(USE_FAST_NULL_OR_ON_CSTACK_MACRO,1,[whether one instruction heap address check can be used])
-else
-   AC_MSG_RESULT(no)
-fi
+   dnl old_LDFLAGS="$LDFLAGS"
+   dnl LDFLAGS="$LDFLAGS $TLDFLAGS"
+   dnl AC_MSG_CHECKING([revised DBEGIN])
+   dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[
+   dnl 	#include <stdio.h>
+   dnl 	#include <stdlib.h>
+   dnl 	#include <unistd.h>
+
+   dnl 	int main(int argc,char **argv,char **envp) {
+
+   dnl 	    void *b;
+   dnl 	    FILE *fp;
+
+   dnl 	    #ifdef CAN_UNRANDOMIZE_SBRK
+   dnl 	    #include "h/unrandomize.h"
+   dnl 	    #endif
+   dnl 	    fp = fopen("conftest1","w");
+
+   dnl 	    #ifdef _WIN32
+   dnl 	    fprintf ( fp,"0x%lx", 0x1a000000 );  /* Windows custom allocation from this point up */
+   dnl 	    #else
+   dnl 	    #if defined (__APPLE__) && defined (__MACH__)
+   dnl 	    fprintf(fp,"((unsigned long)get_dbegin())");
+   dnl 	    #else
+   dnl 	    b = sbrk(0);
+   dnl 	    fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)0xffffff);
+   dnl 	    #endif
+   dnl 	    #endif
+   dnl 	    fclose(fp);
+   dnl 	    return 0;}]])],[dbegin=`cat conftest1`],[dbegin=0])
+   dnl AC_MSG_RESULT($dbegin)
+   dnl LDFLAGS="$old_LDFLAGS"
+dnl fi
+dnl dnl AC_DEFINE_UNQUOTED(DBEGIN,$dbegin,[down-rounded beginning address of lisp data])
+dnl rm -rf foo*
+
+dnl AC_MSG_CHECKING(for maxpage revision)
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	#include <stdio.h>
+dnl 	]],[[
+dnl 	char *b;
+dnl 	unsigned long i,j;
+dnl 	FILE *fp = fopen("conftest1","w");
+dnl 	j=((unsigned long)$enable_maxpage <<$PAGEWIDTH) + $dbegin;
+dnl 	j=$heap_ceiling && j>$heap_ceiling ? $heap_ceiling : j;
+dnl 	j-=$dbegin;
+dnl 	/*  for (i=1;i<<1 && i<=j;i<<=1); */
+dnl 	/*  if (i>j) i>>=1; */
+dnl 	i=j;
+dnl 	fprintf(fp,"%ld",i>>$PAGEWIDTH);
+dnl 	fclose(fp);
+dnl 	return 0;
+dnl ]])],[tmp_maxpage=`cat conftest1`],[tmp_maxpage=0])
+dnl if test "$tmp_maxpage" != "$enable_maxpage" ; then
+dnl    enable_maxpage=$tmp_maxpage
+dnl    AC_MSG_RESULT($enable_maxpage)
+dnl else
+dnl    AC_MSG_RESULT($enable_maxpage is OK)
+dnl fi
+dnl AC_DEFINE_UNQUOTED(MAXPAGE,$enable_maxpage,[maximum number of pages to be allocated])
+
+dnl AC_MSG_CHECKING(for C stack size floor from heap)
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	#include <stdio.h>
+dnl 	]],[[
+dnl 	char *b;
+dnl 	FILE *fp = fopen("conftest1","w");
+dnl 	unsigned long j,k;
+
+dnl 	j=$cstack_address + $cstack_direction * $enable_cssize;
+dnl 	k=($dbegin + ((unsigned long)$enable_maxpage << $PAGEWIDTH));
+dnl 	j=abs(j-$cstack_address)!=$enable_cssize || (j<k && $dbegin < $cstack_address) ? k : j;
+dnl 	j-=$cstack_address;
+dnl 	j*=$cstack_direction;
+dnl 	fprintf(fp,"%lu",j);
+dnl 	fclose(fp);
+dnl 	return 0;
+dnl ]])],[tmp_cssize=`cat conftest1`],[tmp_cssize=0])
+dnl if test "$tmp_cssize" != "$enable_cssize" ; then
+dnl    enable_cssize=$tmp_cssize;
+dnl    AC_MSG_RESULT($enable_cssize)
+dnl else
+dnl    AC_MSG_RESULT($enable_cssize is OK)
+dnl fi
+
+dnl AC_MSG_CHECKING(for C stack size limit from fixnum table)
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	#include <stdio.h>
+dnl 	]],[[
+dnl 	char *b;
+dnl 	FILE *fp = fopen("conftest1","w");
+dnl 	unsigned long j,k;
+
+dnl 	j=$cstack_address + $cstack_direction * $enable_cssize;
+dnl 	if ($cstack_direction>0) {
+dnl 	  k=$cstack_address + ((-(unsigned long)$cstack_address)>>1);
+dnl 	  j=j<$cstack_address || j > k ? k : j;
+dnl 	  j=$cstack_address < $dbegin && j > $dbegin ? $dbegin : j;
+dnl 	}
+dnl 	j-=$cstack_address;
+dnl 	j*=$cstack_direction;
+dnl 	fprintf(fp,"%lu",j);
+dnl 	fclose(fp);
+dnl 	return 0;
+dnl ]])],[tmp_cssize=`cat conftest1`],[tmp_cssize=0])
+dnl if test "$tmp_cssize" != "$enable_cssize" ; then
+dnl    enable_cssize=$tmp_cssize;
+dnl    AC_MSG_RESULT($enable_cssize)
+dnl else
+dnl    AC_MSG_RESULT($enable_cssize is OK)
+dnl fi
+
+dnl AC_MSG_CHECKING(for C stack size limit from address wrap)
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	#include <stdio.h>
+dnl 	]],[[
+dnl 	char *b;
+dnl 	FILE *fp = fopen("conftest1","w");
+dnl 	unsigned long j,k;
+
+dnl 	j=-$cstack_address * $cstack_direction;
+dnl 	j=j>$enable_cssize ? $enable_cssize : j;
+dnl 	fprintf(fp,"%lu",j);
+dnl 	fclose(fp);
+dnl 	return 0;
+dnl ]])],[tmp_cssize=`cat conftest1`],[tmp_cssize=0])
+dnl if test "$tmp_cssize" != "$enable_cssize" ; then
+dnl    enable_cssize=$tmp_cssize;
+dnl    AC_MSG_RESULT($enable_cssize)
+dnl else
+dnl    AC_MSG_RESULT($enable_cssize is OK)
+dnl fi
+dnl AC_DEFINE_UNQUOTED(CSSIZE,$enable_cssize,[maximum C stack size])
+
+dnl AC_MSG_CHECKING(for fast NULL_OR_ON_CSTACK macro)
+dnl AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+dnl 	#include <stdio.h>
+dnl 	]],[[
+dnl 	return ((long)$dbegin>=0 &&
+dnl 	       ((long)$dbegin+(long)($enable_maxpage<<$PAGEWIDTH)) >=0 &&
+dnl 	       ((long)$cstack_address<0)) ? 0 : 1;
+dnl ]])],[tmp_fnocm=yes],[tmp_fnocm=no])
+dnl if test "$tmp_fnocm" = "yes" ; then
+dnl    AC_MSG_RESULT(yes)
+dnl    AC_DEFINE(USE_FAST_NULL_OR_ON_CSTACK_MACRO,1,[whether one instruction heap address check can be used])
+dnl else
+dnl    AC_MSG_RESULT(no)
+dnl fi
 
 mem_top=0
 mem_range=0
@@ -1649,9 +1649,8 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 	FILE *fp = fopen("conftest1","w");
 
 	for (i=2,k=1;i;k=i,i<<=1);
-	l=$cstack_address + ($cstack_direction==1 ? $enable_cssize : 0);
-	m=$dbegin + ((unsigned long)$enable_maxpage << $PAGEWIDTH);
-	l=l<m ? m : l;
+	l=$cstack_address;
+	l=$cstack_direction==1 ? (l<k ? k-1 : -1) : l;
 	for (i=j=k;j && i<l;j>>=1,i|=j);
 	if (j<(k>>3)) i=0;
 	j=1;
@@ -1663,9 +1662,9 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 	fprintf(fp,"0x%lx",i);
 	fclose(fp);
 	return 0;
-]])],[mem_top=`cat conftest1`],[mem_top=0])
+]])],[mem_top=`cat conftest1`],[mem_top="0x0"])
 AC_MSG_RESULT($mem_top)
-if test "$mem_top" != "0" ; then
+if test "$mem_top" != "0x0" ; then
    AC_MSG_CHECKING(finding upper mem half range)
    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
    #include <stdio.h>
@@ -1677,9 +1676,9 @@ if test "$mem_top" != "0" ; then
    fprintf(fp,"0x%lx",j>>1);
    fclose(fp);
    return 0;
-   ]])],[mem_range=`cat conftest1`],[mem_range=0])
+   ]])],[mem_range=`cat conftest1`],[mem_range="0x0"])
    AC_MSG_RESULT($mem_range)
-   if test "$mem_range" != "0" ; then 
+   if test "$mem_range" != "0x0" ; then 
 	AC_DEFINE_UNQUOTED(MEM_TOP,$mem_top,[beginning address for immediate fixnum range])
         AC_DEFINE_UNQUOTED(MEM_RANGE,$mem_range,[size of immediate fixnum address space])
    fi
--- gcl-2.6.7+dfsga.orig/h/protoize.h
+++ gcl-2.6.7+dfsga/h/protoize.h
@@ -2,7 +2,8 @@
 /* alloc.c:149:OF */ extern void add_page_to_freelist (char *p, struct typemanager *tm); /* (p, tm) char *p; struct typemanager *tm; */
 /* alloc.c:196:OF */ extern object type_name (int t); /* (t) int t; */
 /* alloc.c:213:OF */ extern object alloc_object (enum type t); /* (t) enum type t; */
-/* alloc.c:296:OF */ extern object make_cons (object a, object d); /* (a, d) object a; object d; */
+/* alloc.c:213:OF */ inline void add_pages(struct typemanager *,fixnum);
+/* alloc.c:296:OF */ extern inline object make_cons (object a, object d); /* (a, d) object a; object d; */
 /* alloc.c:364:OF */ extern object on_stack_cons (object x, object y); /* (x, y) object x; object y; */
 /* alloc.c:376:OF */ extern object fSallocated (object typ); /* (typ) object typ; */
 /* alloc.c:401:OF */ extern object fSreset_number_used (object typ); /* (typ) object typ; */
@@ -1836,3 +1837,6 @@ int
 obj_to_mpz(object,MP_INT *);
 
 struct htent *gethash(object,object);
+
+int
+update_real_maxpage(void);
--- gcl-2.6.7+dfsga.orig/h/powerpc-macosx.h
+++ gcl-2.6.7+dfsga/h/powerpc-macosx.h
@@ -35,9 +35,6 @@ extern char *mach_brkpt;
 
 extern char *get_dbegin ();
 
-#undef SET_REAL_MAXPAGE
-#define SET_REAL_MAXPAGE real_maxpage = MAXPAGE
-
 #include <unistd.h> /* to get sbrk defined */
 extern void *my_sbrk(long incr);
 #define sbrk my_sbrk
--- gcl-2.6.7+dfsga.orig/h/stacks.h
+++ gcl-2.6.7+dfsga/h/stacks.h
@@ -1,6 +1,3 @@
-#ifndef MAXPAGE
-#define MAXPAGE (128 * 1024)
-#endif
 #ifndef VSSIZE
 #define VSSIZE 128*1024
 #endif
--- gcl-2.6.7+dfsga.orig/h/object.h
+++ gcl-2.6.7+dfsga/h/object.h
@@ -123,7 +123,7 @@ struct fixnum_struct {
 #define       fix_imm_fixnum(a_)        ((fixnum)a_)
 #define      mark_imm_fixnum(a_)        ((a_)=((object)((fixnum)(a_)+(LOW_IM_FIX<<1))))
 #define    unmark_imm_fixnum(a_)        ((a_)=((object)((fixnum)(a_)-(LOW_IM_FIX<<1))))
-#define        is_imm_fixnum(a_)        ((fixnum)(a_)<DBEGIN)
+#define        is_imm_fixnum(a_)        ((fixnum)(a_)<data_start)
 #define is_unmrkd_imm_fixnum(a_)        ((fixnum)(a_)<LOW_IM_FIX)
 #define is_marked_imm_fixnum(a_)        (is_imm_fixnum(a_)*!is_unmrkd_imm_fixnum(a_))
 #define           is_imm_fix(a_)        INT_IN_BITS(a_,LOW_SHFT-1)
@@ -198,7 +198,6 @@ struct fixnum_struct {
 /* #define eql_is_eq(a_)    (is_imm_fixnum(a_) || ({enum type _tp=type_of(a_); _tp == t_cons || _tp > t_complex;})) */
 /* #define equal_is_eq(a_)  (is_imm_fixnum(a_) || type_of(a_)>t_bitvector) */
 
-/* #define writable_ptr(a_) (((unsigned long)(a_)>=DBEGIN && (void *)(a_)<(void *)heap_end) || is_imm_fixnum(a_)) */
 
 
 struct shortfloat_struct {
@@ -972,18 +971,18 @@ char *tmp_alloc;
 
 
 /* FIXME  Make all other page constants scale similarly by default. */
-#ifndef HOLEPAGE
-#define	HOLEPAGE	(MAXPAGE/10)
-#endif
+/* #ifndef HOLEPAGE */
+/* #define	HOLEPAGE	(MAXPAGE/10) */
+/* #endif */
 
 
-/* #define	INIT_HOLEPAGE	150 */
-/* #define	INIT_NRBPAGE	50 */
-/* #define	RB_GETA		512 */
-
-#define	INIT_HOLEPAGE	(6*HOLEPAGE/5)
-#define	INIT_NRBPAGE	(INIT_HOLEPAGE/30)
-#define	RB_GETA		(10*INIT_NRBPAGE)
+/* /\* #define	INIT_HOLEPAGE	150 *\/ */
+/* /\* #define	INIT_NRBPAGE	50 *\/ */
+/* /\* #define	RB_GETA		512 *\/ */
+
+/* #define	INIT_HOLEPAGE	(6*HOLEPAGE/5) */
+/* #define	INIT_NRBPAGE	(INIT_HOLEPAGE/30) */
+#define	RB_GETA		PAGESIZE
 
 
 #ifdef AV
--- gcl-2.6.7+dfsga.orig/h/att.h
+++ gcl-2.6.7+dfsga/h/att.h
@@ -70,8 +70,6 @@
 
 #define NUMBER_OPEN_FILES _NFILE 
 
-#define SET_REAL_MAXPAGE real_maxpage = MAXPAGE
-
 #define INIT_ALLOC \
      	heap_end = sbrk(0); \
 	({fixnum i;if ((i = ((int)heap_end & (PAGESIZE - 1))))	\
--- gcl-2.6.7+dfsga.orig/h/386-macosx.h
+++ gcl-2.6.7+dfsga/h/386-macosx.h
@@ -35,9 +35,6 @@ extern char *mach_brkpt;
 
 extern char *get_dbegin ();
 
-#undef SET_REAL_MAXPAGE
-#define SET_REAL_MAXPAGE real_maxpage = MAXPAGE
-
 #include <unistd.h> /* to get sbrk defined */
 extern void *my_sbrk(long incr);
 #define sbrk my_sbrk
@@ -218,5 +215,3 @@ if (realpath (buf, fub) == 0) {
 #else
 #define RELOC_H "mach32_i386_reloc.h"
 #endif
-#undef DBEGIN
-#define DBEGIN mach_mapstart
--- gcl-2.6.7+dfsga.orig/h/notcomp.h
+++ gcl-2.6.7+dfsga/h/notcomp.h
@@ -249,7 +249,10 @@ EXTER struct printStruct *printStructBuf
 */
 #ifndef NULL_OR_ON_C_STACK
 
-#define NULL_OR_ON_C_STACK(x) (((void *)(x))<=(void *)DBEGIN || ((void *)(x))>=(void *)core_end)
+#define NULL_OR_ON_C_STACK(x) ({\
+      /* if ((void *)(x)<data_start && ((void *)(x)!=NULL) && ((object)(x))!=Cnil && ((object)(x))!=Ct) */ \
+      /* {pp(x);printf("%p %p\n",(void *)(x),data_start);}			*/ \
+      ((((void *)(x))<(void *)data_start || ((void *)(x))>=(void *)core_end));})
 
 #endif /* NULL_OR_ON_C_STACK */
 
--- gcl-2.6.7+dfsga.orig/h/386-gnu.h
+++ gcl-2.6.7+dfsga/h/386-gnu.h
@@ -67,7 +67,6 @@
 #ifndef SA_NOCLDWAIT
 #define SA_NOCLDWAIT 0 /*fixme handler does waitpid(-1, ..., WNOHANG)*/
 #endif
-/* #define NULL_OR_ON_C_STACK(x) ((unsigned long)x <= DBEGIN)/\*fixme configure detect*\/ */
 #define PATH_MAX 4096 /*fixme dynamic*/
 #define MAXPATHLEN 4096 /*fixme dynamic*/
 
--- gcl-2.6.7+dfsga.orig/h/mingw.h
+++ gcl-2.6.7+dfsga/h/mingw.h
@@ -106,7 +106,7 @@ extern DBEGIN_TY _stacktop, _stackbottom
 /* #define NULL_OR_ON_C_STACK(y) \ */
 /*     (((unsigned int)(y)) == 0 || \ */
 /*     (((unsigned int)(y)) > _stacktop && ((unsigned int)(y)) < _stackbottom))      */
-#define NULL_OR_ON_C_STACK(x) (!(int *)x || ((int *)x>cs_limit && (int *)x<=cs_org))
+/* #define NULL_OR_ON_C_STACK(x) (!(int *)x || ((int *)x>cs_limit && (int *)x<=cs_org)) */
       
 #if defined ( IN_FILE ) || defined ( IN_SOCKETS )
 #  define HAVE_NSOCKET
@@ -145,9 +145,6 @@ extern DBEGIN_TY _stacktop, _stackbottom
 #define	IEEEFLOAT
 #define I386
 
-#undef SET_REAL_MAXPAGE  
-#define SET_REAL_MAXPAGE {init_shared_memory(); real_maxpage=MAXPAGE;}
-
 /* include some low level routines for maxima */
 #define CMAC
 
--- gcl-2.6.7+dfsga.orig/h/gclincl.h.in
+++ gcl-2.6.7+dfsga/h/gclincl.h.in
@@ -17,9 +17,6 @@
    */
 #undef CRAY_STACKSEG_END
 
-/* maximum C stack size */
-#undef CSSIZE
-
 /* starting C stack address */
 #undef CSTACK_ADDRESS
 
@@ -32,9 +29,6 @@
 /* Define to 1 if using `alloca.c'. */
 #undef C_ALLOCA
 
-/* down-rounded beginning address of lisp data */
-#undef DBEGIN
-
 /* big endian word order */
 #undef DOUBLE_BIGENDIAN
 
@@ -234,9 +228,6 @@
 /* can use fcntl for listen function */
 #undef LISTEN_USE_FCNTL
 
-/* maximum number of pages to be allocated */
-#undef MAXPAGE
-
 /* size of immediate fixnum address space */
 #undef MEM_RANGE
 
@@ -291,9 +282,6 @@
 /* system pagewidth */
 #undef PAGEWIDTH
 
-/* address at which shared lib placement terminates heap growth */
-#undef SHARED_LIB_HEAP_CEILING
-
 /* have sigcontext in signal.h */
 #undef SIGNAL_H_HAS_SIGCONTEXT
 
@@ -323,9 +311,6 @@
 /* link compiled objects via libdl */
 #undef USE_DLOPEN
 
-/* whether one instruction heap address check can be used */
-#undef USE_FAST_NULL_OR_ON_CSTACK_MACRO
-
 /* use fionbio for non-blocking io */
 #undef USE_FIONBIO
 
--- gcl-2.6.7+dfsga.orig/h/page.h
+++ gcl-2.6.7+dfsga/h/page.h
@@ -1,16 +1,12 @@
-#ifndef DBEGIN
-#define DBEGIN 0
-#endif
-
-#define MAYBE_DATA_P(pp) ((char *)(pp)> (char *) DBEGIN)
+#define MAYBE_DATA_P(pp) ((char *)(pp)>= (char *) data_start)/*DBEGIN*/
 #define VALID_DATA_ADDRESS_P(pp) (MAYBE_DATA_P(pp) &&  ((char *)(pp) < heap_end))
 
 
 #ifndef page
-#define page(p)	((unsigned long)(((unsigned long)(((char *)(p))-DBEGIN)>>PAGEWIDTH)))
-#define	pagetochar(x)	((char *)((((unsigned long)x) << PAGEWIDTH) + DBEGIN + sizeof(struct pageinfo)))
+#define page(p)	(((unsigned long)(p))>>PAGEWIDTH)
+#define	pagetochar(x)	((char *)((((unsigned long)x) << PAGEWIDTH) + sizeof(struct pageinfo)))
 #define pageinfo(x) ((struct pageinfo *)((((ufixnum)x)>>PAGEWIDTH)<<PAGEWIDTH))
-#define pagetoinfo(x) ((struct pageinfo *)((((ufixnum)x)<<PAGEWIDTH)+DBEGIN))
+#define pagetoinfo(x) ((struct pageinfo *)((((ufixnum)x)<<PAGEWIDTH)))
 #endif
   
 #ifdef UNIX
@@ -51,11 +47,10 @@
 
 #define SGC_WRITABLE  (SGC_PERM_WRITABLE | SGC_PAGE_FLAG)
 
-#define GCL_PAGE(p)         ((unsigned long)p<MAXPAGE)
-#define WRITABLE_PAGE_P(p)  (GCL_PAGE(p) && IS_WRITABLE(p))
+#define WRITABLE_PAGE_P(p)  IS_WRITABLE(p)
 #define ON_WRITABLE_PAGE(x) WRITABLE_PAGE_P(page(x))
 
-#define  IF_WRITABLE(x,if_code) ({unsigned long xSG= page(x);if(xSG < MAXPAGE && IS_WRITABLE(xSG)) {if_code;}})/*FIXME maxpage*/
+#define  IF_WRITABLE(x,if_code) ({if (IS_WRITABLE(page(x))) {if_code;}})/*FIXME maxpage*/
 
 #define sgc_mark_object(x) IF_WRITABLE(x,if(!is_marked(x)) sgc_mark_object1(x))
 
@@ -109,7 +104,6 @@ extern struct pageinfo *cell_list_head,*
 
 #define PAGE_MAGIC 0x2e
 
-extern unsigned long first_data_page;
 extern unsigned char *wrimap;
 extern fixnum writable_pages;
 
@@ -118,9 +112,11 @@ extern fixnum writable_pages;
 #define IS_WRITABLE(i) is_writable(i)
 
 
+EXTER long first_data_page,real_maxpage;
+EXTER void * data_start;
+
 #if !defined(IN_MAIN) && defined(SGC)
 #include "writable.h"
 #endif
 
-EXTER unsigned long first_data_page;
 
--- gcl-2.6.7+dfsga.orig/h/bsd.h
+++ gcl-2.6.7+dfsga/h/bsd.h
@@ -36,13 +36,13 @@ extern char etext;
 
 
 
-#define SET_REAL_MAXPAGE do { struct rlimit data_rlimit; \
-				extern char etext; \
-			     real_maxpage = MAXPAGE ; \
-     	getrlimit(RLIMIT_DATA, &data_rlimit); \
-	real_maxpage = ((unsigned int)&etext/PAGESIZE + data_rlimit.rlim_cur/PAGESIZE); \
-	if (real_maxpage > MAXPAGE) \
-		real_maxpage = MAXPAGE ; } while(0)
+/* #define SET_REAL_MAXPAGE do { struct rlimit data_rlimit; \ */
+/* 				extern char etext; \ */
+/* 			     real_maxpage = MAXPAGE ; \ */
+/*      	getrlimit(RLIMIT_DATA, &data_rlimit); \ */
+/* 	real_maxpage = ((unsigned int)&etext/PAGESIZE + data_rlimit.rlim_cur/PAGESIZE); \ */
+/* 	if (real_maxpage > MAXPAGE) \ */
+/* 		real_maxpage = MAXPAGE ; } while(0) */
      
 #define ROUND_UP_SBRK(x)  \
        do {long i; \
--- gcl-2.6.7+dfsga.orig/h/writable.h
+++ gcl-2.6.7+dfsga/h/writable.h
@@ -4,7 +4,7 @@ set_writable(fixnum i,fixnum m) {
   fixnum j;
   object v;
 
-  if (i<=page(DBEGIN) || i>=page(core_end))
+  if (i<first_data_page || i>=page(core_end))
     error("out of core in set_writable");
 
   if ((v=sSAwritableA ? sSAwritableA->s.s_dbind : Cnil)==Cnil)
@@ -33,7 +33,7 @@ is_writable(fixnum i) {
   fixnum j;
   object v;
 
-  if (i<=page(DBEGIN) || i>=page(core_end))
+  if (i<first_data_page || i>=page(core_end))
     return 0;
 
   if ((v=sSAwritableA ? sSAwritableA->s.s_dbind : Cnil)==Cnil)
--- gcl-2.6.7+dfsga.orig/h/linux.h
+++ gcl-2.6.7+dfsga/h/linux.h
@@ -47,17 +47,17 @@ do {static struct sigaction action; \
 
 #endif
 
-#define ELF_TEXT_BASE  DBEGIN
+/* #define ELF_TEXT_BASE  0x0/\* DBEGIN *\/ */
 
-#undef SET_REAL_MAXPAGE
-#define SET_REAL_MAXPAGE do { struct rlimit data_rlimit; \
-                              extern char etext; \
-			       real_maxpage = MAXPAGE ;\
-     	getrlimit(RLIMIT_DATA, &data_rlimit); \
-	real_maxpage = ((unsigned long)&etext/PAGESIZE \
-			+ data_rlimit.rlim_cur/PAGESIZE - ELF_TEXT_BASE/PAGESIZE); \
-	if (real_maxpage > MAXPAGE) \
-		real_maxpage = MAXPAGE ; } while(0)
+/* #undef SET_REAL_MAXPAGE */
+/* #define SET_REAL_MAXPAGE do { struct rlimit data_rlimit; \ */
+/*                               extern char etext; \ */
+/* 			       real_maxpage = MAXPAGE ;\ */
+/*      	getrlimit(RLIMIT_DATA, &data_rlimit); \ */
+/* 	real_maxpage = ((unsigned long)&etext/PAGESIZE \ */
+/* 			+ data_rlimit.rlim_cur/PAGESIZE - ELF_TEXT_BASE/PAGESIZE); \ */
+/* 	if (real_maxpage > MAXPAGE) \ */
+/* 		real_maxpage = MAXPAGE ; } while(0) */
 
 #ifdef USE_DLOPEN
 #define SPECIAL_RSYM "rsym_elf.c"
--- gcl-2.6.7+dfsga.orig/h/solaris-i386.h
+++ gcl-2.6.7+dfsga/h/solaris-i386.h
@@ -34,4 +34,4 @@ void bcopy (const void *,void *,size_t);
 void bzero(void *,size_t);
 int bcmp(const void *,const void *,size_t);
 
-#define NULL_OR_ON_C_STACK(x) ((unsigned long)x<DBEGIN)
+#define NULL_OR_ON_C_STACK(x) ((unsigned long)x<data_start)
--- gcl-2.6.7+dfsga.orig/o/format.c
+++ gcl-2.6.7+dfsga/o/format.c
@@ -1462,7 +1462,7 @@ fmt_general_float(bool colon, bool atsig
 		q = 8;
 	edit_double(q, number_to_double(x), &sign, buff, &exp);
 	n = exp + 1;
-	while (q >= 0)
+	while (q > 0)
 		if (buff[q - 1] == '0')
 			--q;
 		else
--- gcl-2.6.7+dfsga.orig/o/mingwin.c
+++ gcl-2.6.7+dfsga/o/mingwin.c
@@ -830,7 +830,7 @@ init_signals_pendingPtr() {
   if (sharedMemory.address) {
     signalsPendingPtr = sharedMemory.address;
   } else {
-    signalsPendingPtr = &where;
+    signalsPendingPtr = (void *)&where;
   }
   gcl_signal(SIGKILL,sigkill);
   gcl_signal(SIGTERM,sigterm);
--- gcl-2.6.7+dfsga.orig/o/alloc.c
+++ gcl-2.6.7+dfsga/o/alloc.c
@@ -61,7 +61,6 @@ sbrk1(n)
 #define sbrk sbrk1
 #endif /* DEBUG_SBRK */
 
-long real_maxpage = MAXPAGE;
 long new_holepage;
 long resv_pages=40;
 
@@ -73,7 +72,7 @@ struct rlimit data_rlimit;
 #endif
 #endif
 
-void
+inline void
 add_page_to_contblock_list(void *p,fixnum m) {
  
   struct pageinfo *pp=pageinfo(p);
@@ -107,7 +106,7 @@ icomp(const void *v1,const void *v2) {
   return *f1<*f2 ? -1 : *f1==*f2 ? 0 : +1;
 }
 
-void
+inline void
 maybe_reallocate_page(struct typemanager *ntm,ufixnum count) {
 
   void **y,**n;
@@ -190,7 +189,7 @@ int hole_overrun=0;
    If not in_signal_handler then try to keep a minimum of
    reserve_pages_for_signal_handler pages on hand in the hole
  */
-void *
+inline void *
 alloc_page(long n) {
 
   void *e=heap_end;
@@ -285,7 +284,7 @@ eg to add 20 more do (si::set-hole-size
 struct pageinfo *cell_list_head=NULL,*cell_list_tail=NULL;;
 
 
-void
+inline void
 add_page_to_freelist(char *p, struct typemanager *tm) {
 
   short t,size;
@@ -419,7 +418,7 @@ DEFVAR("*OPTIMIZE-MAXIMUM-PAGES*",sSAopt
 #define OPTIMIZE_MAX_PAGES (sSAoptimize_maximum_pagesA ==0 || sSAoptimize_maximum_pagesA->s.s_dbind !=sLnil) 
 DEFVAR("*NOTIFY-OPTIMIZE-MAXIMUM-PAGES*",sSAnotify_optimize_maximum_pagesA,SI,sLnil,"");
 #define MMAX_PG(a_) ((a_)->tm_type == t_relocatable ? (a_)->tm_npage : (a_)->tm_maxpage)
-long
+inline long
 opt_maxpage(struct typemanager *my_tm) {
 
   double x=0.0,y=0.0,z,r;
@@ -492,7 +491,7 @@ Use ALLOCATE to expand the space.",
 #else
 #define TOTAL_THIS_TYPE(tm) (tm->tm_nppage * tm->tm_npage)
 #endif
-void *
+inline void *
 alloc_from_freelist(struct typemanager *tm,fixnum n) {
 
   void *p;
@@ -534,7 +533,7 @@ alloc_from_freelist(struct typemanager *
 
 #define npage(m_) ((m_+PAGESIZE-1)/PAGESIZE)
 
-void
+static inline void
 grow_linear1(struct typemanager *tm) {
   
   fixnum maxgro=available_pages,j=tm->tm_maxpage;
@@ -546,7 +545,7 @@ grow_linear1(struct typemanager *tm) {
 
 }
 
-int
+static inline int
 too_full_p(struct typemanager *tm) {
 
   fixnum j,k;
@@ -573,7 +572,7 @@ too_full_p(struct typemanager *tm) {
 
 }
 
-void *
+inline void *
 alloc_after_gc(struct typemanager *tm,fixnum n) {
 
   if (tm->tm_npage+npage(n)>=tm->tm_maxpage) {
@@ -607,7 +606,7 @@ alloc_after_gc(struct typemanager *tm,fi
 
 struct pageinfo *contblock_list_head=NULL,*contblock_list_tail=NULL;
 
-void
+inline void
 add_pages(struct typemanager *tm,fixnum n) {
 
   void *p;
@@ -654,7 +653,7 @@ add_pages(struct typemanager *tm,fixnum
 
 }
 
-void *
+inline void *
 alloc_after_adding_pages(struct typemanager *tm,fixnum n) {
   
   fixnum m=npage(n);
@@ -677,7 +676,7 @@ alloc_after_adding_pages(struct typemana
 
 }
 
-void *
+inline void *
 alloc_after_reclaiming_pages(struct typemanager *tm,fixnum n) {
 
   fixnum m=npage(n),reloc_min,i;
@@ -715,7 +714,7 @@ alloc_after_reclaiming_pages(struct type
 
 }
 
-void *
+inline void *
 alloc_mem(enum type t,fixnum n) {
 
   void *p;
@@ -734,7 +733,7 @@ alloc_mem(enum type t,fixnum n) {
   return exhausted_report(t,tm);
 }
 
-object
+inline object
 alloc_object(enum type t)  {
 
   object obj;
@@ -749,12 +748,12 @@ alloc_object(enum type t)  {
   
 }
 
-void *
+inline void *
 alloc_contblock(size_t n) {
   return alloc_mem(t_contiguous,ROUND_UP_PTR_CONT(n));
 }
 
-void *
+inline void *
 alloc_relblock(size_t n) {
 
   return alloc_mem(t_relocatable,ROUND_UP_PTR(n));
@@ -762,7 +761,7 @@ alloc_relblock(size_t n) {
 }
 
 
-object
+inline object
 make_cons(object a,object d) {
 
   object obj=alloc_object(t_cons);
@@ -776,7 +775,7 @@ make_cons(object a,object d) {
 
 
 
-object on_stack_cons(object x, object y)
+inline object on_stack_cons(object x, object y)
 {object p = (object) alloca_val;
  set_type_of(p,t_cons);
  p->c.c_car=x;
@@ -1012,7 +1011,7 @@ set_maxpage(void) {
   }
 #endif
   
-  SET_REAL_MAXPAGE;
+  update_real_maxpage();
 
 }
 
@@ -1061,16 +1060,26 @@ gcl_init_alloc(void) {
 #endif	
 #endif
 
-  holepage = INIT_HOLEPAGE;
+#ifdef INIT_ALLOC  
+  INIT_ALLOC;
+#endif  
+
+  data_start=heap_end;
+  first_data_page=page(data_start);
+  
+  set_maxpage();
+  
+  /* holepage = INIT_HOLEPAGE; */
+  holepage = available_pages/10;
 #ifdef GCL_GPROF
   if (holepage<textpage)
      holepage=textpage;
 #endif
 
-  new_holepage = HOLEPAGE;
-  nrbpage = INIT_NRBPAGE;
-  
-  set_maxpage();
+  /* new_holepage = HOLEPAGE; */
+  new_holepage = available_pages/10;
+  /* nrbpage = INIT_NRBPAGE; */
+  nrbpage = real_maxpage/20;
   
 #ifdef __linux__
   /* Some versions of the Linux startup code are broken.
@@ -1088,12 +1097,6 @@ gcl_init_alloc(void) {
     }
 #endif
 
-#ifdef INIT_ALLOC  
-  INIT_ALLOC;
-#endif  
-
-  first_data_page=page(heap_end);
-  
   alloc_page(-(holepage + nrbpage));
   
   rb_start = rb_pointer = heap_end + PAGESIZE*holepage;
--- gcl-2.6.7+dfsga.orig/o/sfaslelf.c
+++ gcl-2.6.7+dfsga/o/sfaslelf.c
@@ -527,7 +527,7 @@ clear_protect_memory(object memory) {
   int i;
 
   p=(void *)((unsigned long)memory->cfd.cfd_start & ~(PAGESIZE-1));
-  pe=(void *)((unsigned long)(memory->cfd.cfd_start+memory->cfd.cfd_size) & ~(PAGESIZE-1)) + PAGESIZE-1;
+  pe=(void *)((unsigned long)(memory->cfd.cfd_start+memory->cfd.cfd_size + PAGESIZE-1) & ~(PAGESIZE-1));
 
   i=mprotect(p,pe-p,PROT_READ|PROT_WRITE|PROT_EXEC);
 
--- gcl-2.6.7+dfsga.orig/o/unexmacosx.c
+++ gcl-2.6.7+dfsga/o/unexmacosx.c
@@ -213,7 +213,7 @@ unsigned num_marked_regions;
 
 /* Size of the heap.  */
 /* #define BIG_HEAP_SIZE 0x50000000 */
-#define BIG_HEAP_SIZE MAXPAGE*PAGESIZE
+#define BIG_HEAP_SIZE 262144*PAGESIZE
 int big_heap = BIG_HEAP_SIZE;
 
 /* Start of the heap.  */
--- gcl-2.6.7+dfsga.orig/o/main.c
+++ gcl-2.6.7+dfsga/o/main.c
@@ -129,14 +129,24 @@ fixnum log_maxpage_bound=sizeof(fixnum)*
 int
 update_real_maxpage(void) {
 
-  fixnum i;
+  ufixnum i,j;
   void *end,*cur;
+#ifdef __MINGW32__
+  static fixnum n;
+
+  if (!n) {
+    init_shared_memory();
+    n=1;
+  }
+#endif
 
   massert(cur=sbrk(0));
-  for (i=PAGEWIDTH;i<=log_maxpage_bound;i++)
-    if ((end=(void *)(1L<<i)-PAGESIZE)>cur)
-      if (!mbrk(end))
+  for (i=0,j=(1L<<log_maxpage_bound);j>PAGESIZE;j>>=1)
+    if ((end=data_start+i+j-PAGESIZE)>cur)
+      if (!mbrk(end)) {
 	real_maxpage=page(end);
+	i+=j;
+      }
   massert(!mbrk(cur));
 
   return 0;
@@ -299,14 +309,14 @@ main(int argc, char **argv, char **envp)
  }
 #endif
 
-	cssize = CSSIZE;
+        cssize = (1L<<23);
 	install_segmentation_catcher();
 
 #ifdef BSD
 #ifdef RLIMIT_STACK
 	{
 	  unsigned long mss;
-	  mss=(MAXPAGE/64)<<PAGEWIDTH;
+	  mss=(real_maxpage/64)<<PAGEWIDTH;
 	  if (getrlimit(RLIMIT_STACK, &rl))
 	    error("Cannot get stack rlimit\n");
 	  if (rl.rlim_max != RLIM_INFINITY && rl.rlim_max < mss)
@@ -382,6 +392,7 @@ main(int argc, char **argv, char **envp)
 #endif
 	  
 		if (saving_system) {
+
 			saving_system = FALSE;
 			terminal_io->sm.sm_object0->sm.sm_fp = stdin;
 			terminal_io->sm.sm_object1->sm.sm_fp = stdout;
@@ -389,7 +400,19 @@ main(int argc, char **argv, char **envp)
 #ifdef INIT_CORE_END
 			INIT_CORE_END
 #endif			  
-			alloc_page(-(holepage + nrbpage));
+			  /* if (available_pages/20>nrbpage) */
+			  /*   add_pages(tm_table+t_relocatable,(available_pages/20-nrbpage)<<PAGEWIDTH); */
+			  /* { */
+			  /*   int in_sgc=sgc_enabled; */
+			  /*   if (in_sgc) sgc_quit(); */
+			  /*   /\* holepage=available_pages/10; *\/ */
+			  /*   /\* if (available_pages/20>nrbpage) nrbpage=available_pages/20; *\/ */
+			  /*   GBC_enable = TRUE; */
+			  /*   GBC(t_relocatable); */
+			  /*   if (in_sgc) sgc_start(); */
+			  /* } */
+			  /* alloc_page(-((available_pages/5) + nrbpage)); */
+			  alloc_page(-(holepage + nrbpage));
 		}
 
 		initflag = FALSE;
@@ -427,9 +450,9 @@ main(int argc, char **argv, char **envp)
 		exit(0);
 	}
 
-	printf("GCL (GNU Common Lisp)  %s  %d pages\n",
+	printf("GCL (GNU Common Lisp)  %s  %ld pages\n",
 	       LISP_IMPLEMENTATION_VERSION,
-	       MAXPAGE);
+	       real_maxpage);
 	fflush(stdout);
 
 	initlisp();
@@ -501,14 +524,14 @@ error(char *s)
 static void
 initlisp(void) {
 
-	void *v=&v,*vv=Cnil;
+        void *v=&v;
 
 	if (NULL_OR_ON_C_STACK(v) == 0
 #if defined(IM_FIX_BASE)
              || NULL_OR_ON_C_STACK(IM_FIX_BASE) == 0
              || NULL_OR_ON_C_STACK((IM_FIX_BASE|IM_FIX_LIM)) == 0
 #endif
-	    || NULL_OR_ON_C_STACK(vv)
+	    /* || NULL_OR_ON_C_STACK(vv) */
 	    || NULL_OR_ON_C_STACK(pagetoinfo(first_data_page))
 	    || NULL_OR_ON_C_STACK(core_end-1))
 	  /* check person has correct definition of above */
@@ -1004,8 +1027,8 @@ FFN(siLsave_system)(void) {
     if (in_sgc) sgc_start();
     new = (void *)(((((ufixnum)rb_pointer)+ PAGESIZE-1)/PAGESIZE)*PAGESIZE);
     core_end = new;
-    rb_end=rb_limit=rb_pointer;
-    nrbpage=(rb_pointer-rb_start)/PAGESIZE;
+    /* rb_end=rb_limit=rb_pointer; */
+    /* nrbpage=(rb_pointer-rb_start)/PAGESIZE; */
     new_holepage=old_holepage;
   }
 
--- gcl-2.6.7+dfsga.orig/o/sgbc.c
+++ gcl-2.6.7+dfsga/o/sgbc.c
@@ -72,44 +72,60 @@ joe1(){;}
 joe() {;}     
 #endif
 
-static void
-sgc_mark_cons(object x) {
+/* static void */
+/* sgc_mark_cons(object x) { */
   
-  cs_check(x);
+/*   cs_check(x); */
   
-  /*  x is already marked.  */
+/*   /\*  x is already marked.  *\/ */
   
- BEGIN:
-#ifdef SDEBUG
-  if(x==sdebug) joe1();
-#endif
-  sgc_mark_object(x->c.c_car);
-#ifdef OLD
-  IF_WRITABLE(x->c.c_car, goto MARK_CAR;);
-  goto MARK_CDR;
-  
- MARK_CAR:
-  if (!is_marked_or_free(x->c.c_car)) {
-    if (consp(x->c.c_car)) {
-      mark(x->c.c_car);
-      sgc_mark_cons(x->c.c_car);
-    } else
-      sgc_mark_object1(x->c.c_car);}
- MARK_CDR:  
-#endif
-  /* if (is_imm_fixnum(x->c.c_cdr)) return; */
-  x = Scdr(x);
-  IF_WRITABLE(x, goto WRITABLE_CDR;);
-  return;
- WRITABLE_CDR:
-  if (is_marked_or_free(x)) return;
-  if (consp(x)) {
+/*  BEGIN: */
+/* #ifdef SDEBUG */
+/*   if(x==sdebug) joe1(); */
+/* #endif */
+/*   sgc_mark_object(x->c.c_car); */
+/* #ifdef OLD */
+/*   IF_WRITABLE(x->c.c_car, goto MARK_CAR;); */
+/*   goto MARK_CDR; */
+  
+/*  MARK_CAR: */
+/*   if (!is_marked_or_free(x->c.c_car)) { */
+/*     if (consp(x->c.c_car)) { */
+/*       mark(x->c.c_car); */
+/*       sgc_mark_cons(x->c.c_car); */
+/*     } else */
+/*       sgc_mark_object1(x->c.c_car);} */
+/*  MARK_CDR:   */
+/* #endif */
+/*   /\* if (is_imm_fixnum(x->c.c_cdr)) return; *\/ */
+/*   x = Scdr(x); */
+/*   IF_WRITABLE(x, goto WRITABLE_CDR;); */
+/*   return; */
+/*  WRITABLE_CDR: */
+/*   if (is_marked_or_free(x)) return; */
+/*   if (consp(x)) { */
+/*     mark(x); */
+/*     goto BEGIN; */
+/*   } */
+/*   sgc_mark_object1(x); */
+/* } */
+
+static void
+sgc_mark_cons(object x) {
+  
+  object d;
+
+  do {
+    d=x->c.c_cdr;
     mark(x);
-    goto BEGIN;
-  }
+    sgc_mark_object(x->c.c_car);
+    x=d;
+    if (!IS_WRITABLE(page(x)) || is_marked_or_free(x))
+      return;
+  } while (type_of(x)==t_cons);
   sgc_mark_object1(x);
-}
 
+}
 
 /* Whenever two arrays are linked together by displacement,
    if one is live, the other will be made live */
@@ -129,6 +145,7 @@ sgc_mark_object1(object x) {
   fixnum i,j;
   object *p;
   char *cp;
+  enum type tp;
   
   cs_check(x);
  BEGIN:
@@ -144,15 +161,14 @@ sgc_mark_object1(object x) {
 #ifdef SDEBUG
   if(x==sdebug) joe1();
 #endif
-  if (DBEGIN)
-    if (NULL_OR_ON_C_STACK(x))
-      return;
-  /* otherwise if DBEGIN==0 the IF_WRITABLE test will
-     always fail on x that satisfy (NULL_OR_ON_C_STACK(x))
-  */
   
+  if ((tp=type_of(x))==t_cons) {
+    sgc_mark_cons(x);
+    return;
+  }
+
   mark(x);
-  switch (type_of(x)) {
+  switch (tp) {
   case t_fixnum:
     break;
     
@@ -177,7 +193,7 @@ sgc_mark_object1(object x) {
     
   case t_symbol:
     IF_WRITABLE(x->s.s_plist,if(!is_marked_or_free(x->s.s_plist))
-    {mark(x->s.s_plist);
+    {/* mark(x->s.s_plist); */
     sgc_mark_cons(x->s.s_plist);});
     sgc_mark_object(x->s.s_gfdef);
     sgc_mark_object(x->s.s_dbind);
@@ -605,8 +621,8 @@ sgc_mark_phase(void) {
   STATIC ihs_ptr ihsp;
   STATIC struct pageinfo *v;
   
-  sgc_mark_object(Cnil);
-  sgc_mark_object(Ct);
+  sgc_mark_object(Cnil->s.s_plist);
+  sgc_mark_object(Ct->s.s_plist);
   
   /* mark all non recent data on writable pages */
   {
@@ -626,11 +642,11 @@ sgc_mark_phase(void) {
 	  object x = (object) p; 
 	  if (SGC_OR_M(x)) 
 	    continue;
-	  if (consp(x)) {
-	    mark(x);
-	    sgc_mark_cons(x);
-	  } else
-	    sgc_mark_object1(x);
+	  /* if (consp(x)) { */
+	  /*   mark(x); */
+	  /*   sgc_mark_cons(x); */
+	  /* } else */
+	  sgc_mark_object1(x);
 	}
       else {
 	int size=tm->tm_size;
@@ -718,9 +734,6 @@ sgc_sweep_phase(void) {
   int size;
   STATIC struct pageinfo *v;
   
-  unmark(Cnil);
-  unmark(Ct);
-  
 #ifdef DEBUG
   if (debug)
     printf("type map\n");
@@ -802,7 +815,7 @@ sgc_sweep_phase(void) {
 	
 	SET_LINK(x,f);
 	make_free(x);
-	if (pagetoinfo(i)!=t_cons) x->d.s = SGC_RECENT;
+	if (pagetoinfo(i)->type!=t_cons) x->d.s = SGC_RECENT;
 	f = x;
 	k++;
       }
@@ -1314,7 +1327,6 @@ sgc_start(void) {
 	 GBC freed pages onto the old contblock list.  CM 20030827*/
       unsigned long z=count+1,n=z*PAGESIZE-sizeof(struct pageinfo);
       void *old_contblock_list_tail=contblock_list_tail;
-      extern void add_pages(struct typemanager *tm,fixnum n);
 
 
       add_pages(tm_table+t_contiguous,n);
@@ -1580,7 +1592,7 @@ sgc_quit(void) {
   for (v=cell_list_head;v;v=v->next) 
     if (v->type==(tm=tm_of(v->type))->tm_type && v->type!=t_cons && v->sgc_flags & SGC_PAGE_FLAG)
       for (p=pagetochar(page(v)),j=tm->tm_nppage;j>0;--j,p+=tm->tm_size)
-	if (!valid_cdr((object)p)) ((object) p)->d.s=SGC_NORMAL;
+	((object) p)->d.s=SGC_NORMAL;
   
   {
     struct pageinfo *pi;
@@ -1601,7 +1613,7 @@ static void
 memprotect_handler(int sig, long code, void *scp, char *addr) {
   
   unsigned long p;
-  char *faddr;  /* Needed because we must not modify signal handler
+  void *faddr;  /* Needed because we must not modify signal handler
 		   arguments on the stack! */
 #ifdef GET_FAULT_ADDR
   faddr=GET_FAULT_ADDR(sig,code,scp,addr); 
@@ -1609,7 +1621,7 @@ memprotect_handler(int sig, long code, v
 #ifdef DEBUG_MPROTECT
   printf("fault:0x%x [%d] (%d)  ",faddr,page(faddr),faddr >= core_end);
 #endif 
-  if (faddr >= core_end || (unsigned long)faddr < DBEGIN) {
+  if (faddr >= (void *)core_end || faddr < data_start) {
     if (fault_count > 300) error("fault count too high");
     fault_count ++;
     INSTALL_MPROTECT_HANDLER;
@@ -1621,7 +1633,7 @@ memprotect_handler(int sig, long code, v
   p = page(faddr);
   /* p = ROUND_DOWN_PAGE_NO(p); */
   if (p >= first_protectable_page
-      && faddr < core_end
+      && faddr < (void *)core_end
       && !(WRITABLE_PAGE_P(p))) {
     /*   CHECK_RANGE(p,1); */
 #ifdef DEBUG_MPROTECT
@@ -1667,8 +1679,6 @@ sgc_mprotect(long pbeg, long n, int writ
 
 
 
-extern unsigned long first_data_page;
-
 void
 memory_protect(int on) {
 
@@ -1677,7 +1687,7 @@ memory_protect(int on) {
   extern void install_segmentation_catcher(void);
 
 
-  massert(first_protectable_page=first_data_page);
+  first_protectable_page=first_data_page;
 
   /* turning it off */
   if (on==0) {
--- gcl-2.6.7+dfsga.orig/o/gbc.c
+++ gcl-2.6.7+dfsga/o/gbc.c
@@ -87,15 +87,10 @@ mark_object(object);
 #define BCHARS_TABLE (BBITS_LONG+BBYTES_CONTBLOCK)
 
 #define Shamt(x) (((((unsigned long) x) >> BBYTES_CONTBLOCK) & ~(~0UL << BBITS_LONG)))
-#define Madr(x) (mark_table+((((unsigned long) x) - ((unsigned long)DBEGIN)) >> (BCHARS_TABLE)))
+#define Madr(x) (mark_table+((((unsigned long) x)) >> (BCHARS_TABLE)))
 #define get_mark_bit(x) (*(Madr(x)) >> Shamt(x) & 1)
 #define set_mark_bit(x) ((*(Madr(x))) |= (1UL << Shamt(x)))
 
-/*  #define Shamt(x) (((((long) x) >> 3) & ~(~0 << 6))) */
-/*  #define Madr(x) (mark_table+((((long) x) - ((long)DBEGIN)) >> (9))) */
-/*  #define get_mark_bit(x) (*(Madr(x)) >> Shamt(x) & 1) */
-/*  #define set_mark_bit(x) ((*(Madr(x))) |= ((unsigned long)1 << Shamt(x))) */
-
 #ifdef KCLOVM
 void mark_all_stacks();
 bool ovm_process_created; 
@@ -193,37 +188,54 @@ enter_mark_origin(object *p) {
 
 }
 
-static void
-mark_cons(object x) {
+/* static void */
+/* mark_cons(object x) { */
   
-  cs_check(x);
+/*   cs_check(x); */
   
-  /*  x is already marked.  */
+/*   /\*  x is already marked.  *\/ */
   
- BEGIN:  
-  if (NULL_OR_ON_C_STACK(x->c.c_car)) goto MARK_CDR;
-  if (type_of(x->c.c_car) == t_cons) {
-    if (is_marked_or_free(x->c.c_car))
-      ;
-    else {
-      mark(x->c.c_car);
-      mark_cons(x->c.c_car);
-    }
-  } else
+/*  BEGIN:   */
+/*   if (NULL_OR_ON_C_STACK(x->c.c_car)) goto MARK_CDR; */
+/*   if (type_of(x->c.c_car) == t_cons) { */
+/*     if (is_marked_or_free(x->c.c_car)) */
+/*       ; */
+/*     else { */
+/*       mark(x->c.c_car); */
+/*       mark_cons(x->c.c_car); */
+/*     } */
+/*   } else */
+/*     mark_object(x->c.c_car); */
+/*  MARK_CDR:   */
+/*   if (NULL_OR_ON_C_STACK(x->c.c_cdr)) */
+/*     return; */
+/*   x = Scdr(x); */
+/*   if (consp(x)) { */
+/*     if (is_marked_or_free(x)) */
+/*       return; */
+/*     mark(x); */
+/*     goto BEGIN; */
+/*   } */
+/*   if (x == Cnil) */
+/*     return; */
+/*   mark_object(x); */
+/* } */
+
+static void
+mark_cons(object x) {
+  
+  object d;
+
+  do {
+    d=x->c.c_cdr;
+    mark(x);
     mark_object(x->c.c_car);
- MARK_CDR:  
-  if (NULL_OR_ON_C_STACK(x->c.c_cdr))
-    return;
-  x = Scdr(x);
-  if (consp(x)) {
-    if (is_marked_or_free(x))
+    x=d;
+    if (NULL_OR_ON_C_STACK(x) || is_marked_or_free(x))
       return;
-    mark(x);
-    goto BEGIN;
-  }
-  if (x == Cnil)
-    return;
+  } while (type_of(x)==t_cons);
   mark_object(x);
+
 }
 
 /* Whenever two arrays are linked together by displacement,
@@ -236,8 +248,8 @@ mark_object(object x) {
   fixnum i,j;
   object *p;
   char *cp;
+  enum type tp;
   
-  cs_check(x);
  BEGIN:
   /* if the body of x is in the c stack, its elements
      are marked anyway by the c stack mark carefully, and
@@ -249,8 +261,14 @@ mark_object(object x) {
     return;
   if (is_marked_or_free(x))
     return;
+
+  if ((tp=type_of(x))==t_cons) {
+    mark_cons(x);
+    return;
+  }
+
   mark(x);
-  switch (type_of(x)) {
+  switch (tp) {
   case t_fixnum:
     break;
     
@@ -652,7 +670,6 @@ static long *c_stack_where;
 void **contblock_stack_list=NULL;
 
 #define PAGEINFO_P(pi) (pi->magic==PAGE_MAGIC && pi->type<=t_contiguous)
-extern unsigned long first_data_page;
 
 #ifdef SGC
 static void
@@ -663,7 +680,7 @@ static void
 mark_stack_carefully(void *topv, void *bottomv, int offset) {
 
   long pageoffset;
-  unsigned long p;
+  long p;
   object x;
   struct typemanager *tm;
   register long *j;
@@ -726,8 +743,8 @@ mark_phase(void) {
   STATIC frame_ptr frp;
   STATIC ihs_ptr ihsp;
   
-  mark_object(Cnil);
-  mark_object(Ct);
+  mark_object(Cnil->s.s_plist);
+  mark_object(Ct->s.s_plist);
   
   mark_stack_carefully(vs_top-1,vs_org,0);
   mark_stack_carefully(MVloc+(sizeof(MVloc)/sizeof(object)),MVloc,0);
@@ -931,9 +948,6 @@ sweep_phase(void) {
   STATIC object f;
   STATIC struct pageinfo *v;
   
-  unmark(Cnil);
-  unmark(Ct);
-  
 #ifdef DEBUG
   if (debug)
     printf("type map\n");
@@ -1366,16 +1380,16 @@ FFN(siLheap_report)(void) {
   
   vs_check_push(make_fixnum(sizeof(fixnum)*CHAR_SIZE));
   vs_push(make_fixnum(PAGESIZE));
-  vs_push(make_fixnum(DBEGIN));
-  vs_push(make_fixnum(DBEGIN+(MAXPAGE<<PAGEWIDTH)));
-  vs_push(make_fixnum(SHARED_LIB_HEAP_CEILING));
+  vs_push(make_fixnum((ufixnum)data_start));
+  vs_push(make_fixnum((ufixnum)data_start+(real_maxpage<<PAGEWIDTH)));
+  vs_push(make_fixnum(0));/*SHARED_LIB_HEAP_CEILING*/
   i=sizeof(fixnum)*CHAR_SIZE-2;
   i=1<<i;
   vs_push(make_fixnum(((unsigned long)cs_base+i-1)&-i));
   vs_push(make_fixnum(abs(cs_base-cs_org)));
   vs_push(make_fixnum((CSTACK_DIRECTION+1)>>1));
   vs_push(make_fixnum(CSTACK_ALIGNMENT));
-  vs_push(make_fixnum(CSSIZE));
+  vs_push(make_fixnum(abs(cs_limit-cs_org)));/*CSSIZE*/
 #if defined(IM_FIX_BASE) && defined(IM_FIX_LIM)
   vs_push(make_fixnum(IM_FIX_BASE));
   vs_push(make_fixnum(IM_FIX_LIM));
--- gcl-2.6.7+dfsga.orig/o/unexnt.c
+++ gcl-2.6.7+dfsga/o/unexnt.c
@@ -957,9 +957,9 @@ allocate_heap (void)
      the region below the 256MB line for our malloc arena - 229MB is
      still a pretty decent arena to play in!  */
 
-  unsigned long base = DBEGIN;   /*  27MB */
+  unsigned long base = 0x01100000;   /*  27MB */
   /*   unsigned long base = 0x01B00000; */  /*  27MB */
-  unsigned long end  = 2*PAGESIZE*MAXPAGE; /* 256MB */
+  unsigned long end  = 2*PAGESIZE*65536; /* 256MB */
   void *ptr = NULL;
 
 #define NTHEAP_PROBE_BASE 0
