/[gcl]/gcl/configure.in
ViewVC logotype

Diff of /gcl/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.195 by camm, Tue Aug 9 01:14:41 2005 UTC revision 1.196 by camm, Wed Sep 14 19:08:35 2005 UTC
# Line 1244  AC_DEFINE_UNQUOTED(CSTACK_DIRECTION,$cst Line 1244  AC_DEFINE_UNQUOTED(CSTACK_DIRECTION,$cst
1244  AC_MSG_RESULT($cstack_direction)  AC_MSG_RESULT($cstack_direction)
1245    
1246    
1247    AC_MSG_CHECKING(for shared library/C stack ceiling to heap)
1248    if test "$use" = "mingw" ; then
1249      heap_ceiling=2000000000
1250    else
1251    echo "int main() {return 0;}" >foo.c
1252    $CC foo.c -o foo
1253    heap_ceiling=`ldd foo | tail -n 1 | awk '{print $NF}' | tr -d '()'`
1254    AC_TRY_RUN([#include <stdio.h>
1255    int main() {
1256        FILE *fp=fopen("conftest1","w");
1257        unsigned long h=$heap_ceiling,d=$dbegin,c=$cstack_address;
1258        h=h<d ? 0 : h;
1259        h=c>d && c<h ? c : h;
1260        fprintf(fp,"0x%lx",h);
1261        return 0;}],heap_ceiling=`cat conftest1`,echo failed;exit 1,echo failed;exit 1)
1262    fi
1263    AC_MSG_RESULT($heap_ceiling)
1264    AC_DEFINE_UNQUOTED(SHARED_LIB_HEAP_CEILING,$heap_ceiling)
1265    
1266  ## Don't lower heap start if C stack is below default dbegin, as we're  ## Don't lower heap start if C stack is below default dbegin, as we're
1267  # likely to get more heap this way.  # likely to get more heap this way.
1268  if awk 'END {exit (unsigned long)d<(unsigned long)c ? 0 : 1}' d=$dbegin c=$cstack_address /dev/null ; then  if awk 'END {exit h && (unsigned long)d<(unsigned long)c ? 0 : 1}' h=$heap_ceiling d=$dbegin c=$cstack_address /dev/null ; then
1269    
1270     AC_MSG_CHECKING("finding default linker script")     AC_MSG_CHECKING("finding default linker script")
1271     touch unixport/gcl.script     touch unixport/gcl.script
# Line 1324  if awk 'END {exit (unsigned long)d<(unsi Line 1343  if awk 'END {exit (unsigned long)d<(unsi
1343  fi  fi
1344  AC_DEFINE_UNQUOTED(DBEGIN,$dbegin)  AC_DEFINE_UNQUOTED(DBEGIN,$dbegin)
1345    
 AC_MSG_CHECKING(for shared library/C stack ceiling to heap)  
 if test "$use" = "mingw" ; then  
   heap_ceiling=2000000000  
 else  
 echo "int main() {return 0;}" >foo.c  
 $CC foo.c -o foo  
 heap_ceiling=`ldd foo | tail -n 1 | awk '{print $NF}' | tr -d '()'`  
 AC_TRY_RUN([#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;}],heap_ceiling=`cat conftest1`,echo failed;exit 1,echo failed;exit 1)  
 fi  
 AC_MSG_RESULT($heap_ceiling)  
 AC_DEFINE_UNQUOTED(SHARED_LIB_HEAP_CEILING,$heap_ceiling)  
   
1346  AC_MSG_CHECKING(for maxpage revision)  AC_MSG_CHECKING(for maxpage revision)
1347  AC_TRY_RUN([#include <stdio.h>  AC_TRY_RUN([#include <stdio.h>
1348  main()  main()

Legend:
Removed from v.1.195  
changed lines
  Added in v.1.196

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26