/[gcl]/gcl/configure
ViewVC logotype

Diff of /gcl/configure

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

revision 1.189 by camm, Tue Aug 9 01:14:40 2005 UTC revision 1.190 by camm, Wed Sep 14 19:08:35 2005 UTC
# Line 4540  EOF Line 4540  EOF
4540  echo "$ac_t""$cstack_direction" 1>&6  echo "$ac_t""$cstack_direction" 1>&6
4541    
4542    
4543    echo $ac_n "checking for shared library/C stack ceiling to heap""... $ac_c" 1>&6
4544    echo "configure:4545: checking for shared library/C stack ceiling to heap" >&5
4545    if test "$use" = "mingw" ; then
4546      heap_ceiling=2000000000
4547    else
4548    echo "int main() {return 0;}" >foo.c
4549    $CC foo.c -o foo
4550    heap_ceiling=`ldd foo | tail -n 1 | awk '{print $NF}' | tr -d '()'`
4551    if test "$cross_compiling" = yes; then
4552      echo failed;exit 1
4553    else
4554      cat > conftest.$ac_ext <<EOF
4555    #line 4556 "configure"
4556    #include "confdefs.h"
4557    #include <stdio.h>
4558    int main() {
4559        FILE *fp=fopen("conftest1","w");
4560        unsigned long h=$heap_ceiling,d=$dbegin,c=$cstack_address;
4561        h=h<d ? 0 : h;
4562        h=c>d && c<h ? c : h;
4563        fprintf(fp,"0x%lx",h);
4564        return 0;}
4565    EOF
4566    if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4567    then
4568      heap_ceiling=`cat conftest1`
4569    else
4570      echo "configure: failed program was:" >&5
4571      cat conftest.$ac_ext >&5
4572      rm -fr conftest*
4573      echo failed;exit 1
4574    fi
4575    rm -fr conftest*
4576    fi
4577    
4578    fi
4579    echo "$ac_t""$heap_ceiling" 1>&6
4580    cat >> confdefs.h <<EOF
4581    #define SHARED_LIB_HEAP_CEILING $heap_ceiling
4582    EOF
4583    
4584    
4585  ## 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
4586  # likely to get more heap this way.  # likely to get more heap this way.
4587  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
4588    
4589     echo $ac_n "checking "finding default linker script"""... $ac_c" 1>&6     echo $ac_n "checking "finding default linker script"""... $ac_c" 1>&6
4590  echo "configure:4549: checking "finding default linker script"" >&5  echo "configure:4591: checking "finding default linker script"" >&5
4591     touch unixport/gcl.script     touch unixport/gcl.script
4592     echo "int main() {return 0;}" >foo.c     echo "int main() {return 0;}" >foo.c
4593     $CC -Wl,--verbose foo.c -o foo 2>&1 | \     $CC -Wl,--verbose foo.c -o foo 2>&1 | \
# Line 4554  echo "configure:4549: checking "finding Line 4596  echo "configure:4549: checking "finding
4596     if test "`cat gcl.script | wc -l`" != "0" ; then     if test "`cat gcl.script | wc -l`" != "0" ; then
4597        echo "$ac_t""got it" 1>&6        echo "$ac_t""got it" 1>&6
4598        echo $ac_n "checking "trying to lower heap start"""... $ac_c" 1>&6        echo $ac_n "checking "trying to lower heap start"""... $ac_c" 1>&6
4599  echo "configure:4558: checking "trying to lower heap start"" >&5  echo "configure:4600: checking "trying to lower heap start"" >&5
4600        cp gcl.script gcl.script.def        cp gcl.script gcl.script.def
4601        cat gcl.script.def | awk '/SIZEOF_HEADERS/ {gsub("0x...","0x000",$0);} {print}' |  sed 's,\. = 0x10000000;,/*. = 0x10000000;*/,1' >gcl.script        cat gcl.script.def | awk '/SIZEOF_HEADERS/ {gsub("0x...","0x000",$0);} {print}' |  sed 's,\. = 0x10000000;,/*. = 0x10000000;*/,1' >gcl.script
4602        if diff gcl.script.def gcl.script >/dev/null 2>&1 ; then        if diff gcl.script.def gcl.script >/dev/null 2>&1 ; then
# Line 4562  echo "configure:4558: checking "trying t Line 4604  echo "configure:4558: checking "trying t
4604           rm -f gcl.script gcl.script.def           rm -f gcl.script gcl.script.def
4605        else        else
4606           echo $ac_n "checking "linker script"""... $ac_c" 1>&6           echo $ac_n "checking "linker script"""... $ac_c" 1>&6
4607  echo "configure:4566: checking "linker script"" >&5  echo "configure:4608: checking "linker script"" >&5
4608           echo "int main() {return 0;}" >foo.c           echo "int main() {return 0;}" >foo.c
4609           if $CC -Wl,-T gcl.script foo.c -o foo >/dev/null 2>&1 && ./foo >/dev/null 2>&1 ; then           if $CC -Wl,-T gcl.script foo.c -o foo >/dev/null 2>&1 && ./foo >/dev/null 2>&1 ; then
4610              echo "$ac_t"""done"" 1>&6              echo "$ac_t"""done"" 1>&6
# Line 4583  echo "configure:4566: checking "linker s Line 4625  echo "configure:4566: checking "linker s
4625     old_LDFLAGS="$LDFLAGS"     old_LDFLAGS="$LDFLAGS"
4626     LDFLAGS="$LDFLAGS $TLDFLAGS"     LDFLAGS="$LDFLAGS $TLDFLAGS"
4627     echo $ac_n "checking "revised DBEGIN"""... $ac_c" 1>&6     echo $ac_n "checking "revised DBEGIN"""... $ac_c" 1>&6
4628  echo "configure:4587: checking "revised DBEGIN"" >&5  echo "configure:4629: checking "revised DBEGIN"" >&5
4629     if test "$cross_compiling" = yes; then     if test "$cross_compiling" = yes; then
4630    dbegin=0    dbegin=0
4631  else  else
4632    cat > conftest.$ac_ext <<EOF    cat > conftest.$ac_ext <<EOF
4633  #line 4592 "configure"  #line 4634 "configure"
4634  #include "confdefs.h"  #include "confdefs.h"
4635  #include <stdio.h>  #include <stdio.h>
4636                 #include <stdlib.h>                 #include <stdlib.h>
# Line 4626  else Line 4668  else
4668                     fclose(fp);                     fclose(fp);
4669                     return 0;}                     return 0;}
4670  EOF  EOF
4671  if { (eval echo configure:4630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null  if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4672  then  then
4673    dbegin=`cat conftest1`    dbegin=`cat conftest1`
4674  else  else
# Line 4646  cat >> confdefs.h <<EOF Line 4688  cat >> confdefs.h <<EOF
4688  EOF  EOF
4689    
4690    
 echo $ac_n "checking for shared library/C stack ceiling to heap""... $ac_c" 1>&6  
 echo "configure:4651: checking for shared library/C stack ceiling to heap" >&5  
 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 '()'`  
 if test "$cross_compiling" = yes; then  
   echo failed;exit 1  
 else  
   cat > conftest.$ac_ext <<EOF  
 #line 4662 "configure"  
 #include "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;}  
 EOF  
 if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null  
 then  
   heap_ceiling=`cat conftest1`  
 else  
   echo "configure: failed program was:" >&5  
   cat conftest.$ac_ext >&5  
   rm -fr conftest*  
   echo failed;exit 1  
 fi  
 rm -fr conftest*  
 fi  
   
 fi  
 echo "$ac_t""$heap_ceiling" 1>&6  
 cat >> confdefs.h <<EOF  
 #define SHARED_LIB_HEAP_CEILING $heap_ceiling  
 EOF  
   
   
4691  echo $ac_n "checking for maxpage revision""... $ac_c" 1>&6  echo $ac_n "checking for maxpage revision""... $ac_c" 1>&6
4692  echo "configure:4693: checking for maxpage revision" >&5  echo "configure:4693: checking for maxpage revision" >&5
4693  if test "$cross_compiling" = yes; then  if test "$cross_compiling" = yes; then

Legend:
Removed from v.1.189  
changed lines
  Added in v.1.190

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