Commit 005537df by Richard Henderson

Simplified GC interface and other goodies.

From-SVN: r29946
parent 1f1479dc
...@@ -1750,7 +1750,7 @@ s-output : $(md_file) genoutput $(srcdir)/move-if-change ...@@ -1750,7 +1750,7 @@ s-output : $(md_file) genoutput $(srcdir)/move-if-change
$(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c $(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c
touch s-output touch s-output
genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h ggc.h
genrtl.c genrtl.h : s-genrtl genrtl.c genrtl.h : s-genrtl
@true # force gnu make to recheck modification times. @true # force gnu make to recheck modification times.
......
...@@ -324,6 +324,9 @@ ...@@ -324,6 +324,9 @@
/* Define if you have the sysconf function. */ /* Define if you have the sysconf function. */
#undef HAVE_SYSCONF #undef HAVE_SYSCONF
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
/* Define if you have the <argz.h> header file. */ /* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H #undef HAVE_ARGZ_H
......
...@@ -91,6 +91,7 @@ program_suffix=NONE ...@@ -91,6 +91,7 @@ program_suffix=NONE
program_transform_name=s,x,x, program_transform_name=s,x,x,
silent= silent=
site= site=
sitefile=
srcdir= srcdir=
target=NONE target=NONE
verbose= verbose=
...@@ -205,6 +206,7 @@ Configuration: ...@@ -205,6 +206,7 @@ Configuration:
--help print this message --help print this message
--no-create do not create output files --no-create do not create output files
--quiet, --silent do not print \`checking...' messages --quiet, --silent do not print \`checking...' messages
--site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure --version print the version of autoconf that created configure
Directory and file names: Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX --prefix=PREFIX install architecture-independent files in PREFIX
...@@ -375,6 +377,11 @@ EOF ...@@ -375,6 +377,11 @@ EOF
-site=* | --site=* | --sit=*) -site=* | --site=* | --sit=*)
site="$ac_optarg" ;; site="$ac_optarg" ;;
-site-file | --site-file | --site-fil | --site-fi | --site-f)
ac_prev=sitefile ;;
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
sitefile="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr) -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;; ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
...@@ -540,12 +547,16 @@ fi ...@@ -540,12 +547,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones. # Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then if test -z "$sitefile"; then
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi fi
fi
else
CONFIG_SITE="$sitefile"
fi fi
for ac_site_file in $CONFIG_SITE; do for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then if test -r "$ac_site_file"; then
...@@ -600,7 +611,7 @@ copy=cp ...@@ -600,7 +611,7 @@ copy=cp
# - two terminals occur directly after each other # - two terminals occur directly after each other
# - the path contains an element with a dot in it # - the path contains an element with a dot in it
echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
echo "configure:604: checking LIBRARY_PATH variable" >&5 echo "configure:615: checking LIBRARY_PATH variable" >&5
case ${LIBRARY_PATH} in case ${LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
library_path_setting="contains current directory" library_path_setting="contains current directory"
...@@ -625,7 +636,7 @@ fi ...@@ -625,7 +636,7 @@ fi
# - two terminals occur directly after each other # - two terminals occur directly after each other
# - the path contains an element with a dot in it # - the path contains an element with a dot in it
echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
echo "configure:629: checking GCC_EXEC_PREFIX variable" >&5 echo "configure:640: checking GCC_EXEC_PREFIX variable" >&5
case ${GCC_EXEC_PREFIX} in case ${GCC_EXEC_PREFIX} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
gcc_exec_prefix_setting="contains current directory" gcc_exec_prefix_setting="contains current directory"
...@@ -948,7 +959,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } ...@@ -948,7 +959,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi fi
echo $ac_n "checking host system type""... $ac_c" 1>&6 echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:952: checking host system type" >&5 echo "configure:963: checking host system type" >&5
host_alias=$host host_alias=$host
case "$host_alias" in case "$host_alias" in
...@@ -969,7 +980,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ...@@ -969,7 +980,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6 echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:973: checking target system type" >&5 echo "configure:984: checking target system type" >&5
target_alias=$target target_alias=$target
case "$target_alias" in case "$target_alias" in
...@@ -987,7 +998,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ...@@ -987,7 +998,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6 echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:991: checking build system type" >&5 echo "configure:1002: checking build system type" >&5
build_alias=$build build_alias=$build
case "$build_alias" in case "$build_alias" in
...@@ -1014,7 +1025,7 @@ test "$host_alias" != "$target_alias" && ...@@ -1014,7 +1025,7 @@ test "$host_alias" != "$target_alias" &&
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1018: checking for $ac_word" >&5 echo "configure:1029: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1044,7 +1055,7 @@ if test -z "$CC"; then ...@@ -1044,7 +1055,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1048: checking for $ac_word" >&5 echo "configure:1059: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1095,7 +1106,7 @@ fi ...@@ -1095,7 +1106,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1099: checking for $ac_word" >&5 echo "configure:1110: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1127,7 +1138,7 @@ fi ...@@ -1127,7 +1138,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1131: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:1142: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...@@ -1138,12 +1149,12 @@ cross_compiling=$ac_cv_prog_cc_cross ...@@ -1138,12 +1149,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 1142 "configure" #line 1153 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
...@@ -1169,12 +1180,12 @@ if test $ac_cv_prog_cc_works = no; then ...@@ -1169,12 +1180,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1173: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:1184: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1178: checking whether we are using GNU C" >&5 echo "configure:1189: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1183,7 +1194,7 @@ else ...@@ -1183,7 +1194,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
...@@ -1202,7 +1213,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ...@@ -1202,7 +1213,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1206: checking whether ${CC-cc} accepts -g" >&5 echo "configure:1217: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1234,7 +1245,7 @@ else ...@@ -1234,7 +1245,7 @@ else
fi fi
echo $ac_n "checking for long double""... $ac_c" 1>&6 echo $ac_n "checking for long double""... $ac_c" 1>&6
echo "configure:1238: checking for long double" >&5 echo "configure:1249: checking for long double" >&5
if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1242,7 +1253,7 @@ else ...@@ -1242,7 +1253,7 @@ else
gcc_cv_c_long_double=yes gcc_cv_c_long_double=yes
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1246 "configure" #line 1257 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -1252,7 +1263,7 @@ long double foo = 0.0; ...@@ -1252,7 +1263,7 @@ long double foo = 0.0;
switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_c_long_double=yes gcc_cv_c_long_double=yes
else else
...@@ -1285,7 +1296,7 @@ fi ...@@ -1285,7 +1296,7 @@ fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1289: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:1300: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -1313,7 +1324,7 @@ fi ...@@ -1313,7 +1324,7 @@ fi
echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
echo "configure:1317: checking whether a default assembler was specified" >&5 echo "configure:1328: checking whether a default assembler was specified" >&5
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test x"$gas_flag" = x"no"; then if test x"$gas_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
...@@ -1325,7 +1336,7 @@ else ...@@ -1325,7 +1336,7 @@ else
fi fi
echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
echo "configure:1329: checking whether a default linker was specified" >&5 echo "configure:1340: checking whether a default linker was specified" >&5
if test x"${DEFAULT_LINKER+set}" = x"set"; then if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test x"$gnu_ld_flag" = x"no"; then if test x"$gnu_ld_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
...@@ -1342,7 +1353,7 @@ do ...@@ -1342,7 +1353,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1346: checking for $ac_word" >&5 echo "configure:1357: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1374,7 +1385,7 @@ done ...@@ -1374,7 +1385,7 @@ done
# Extract the first word of "flex", so it can be a program name with args. # Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2 set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1378: checking for $ac_word" >&5 echo "configure:1389: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1408,7 +1419,7 @@ then ...@@ -1408,7 +1419,7 @@ then
*) ac_lib=l ;; *) ac_lib=l ;;
esac esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
echo "configure:1412: checking for yywrap in -l$ac_lib" >&5 echo "configure:1423: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -1416,7 +1427,7 @@ else ...@@ -1416,7 +1427,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS" LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1420 "configure" #line 1431 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -1427,7 +1438,7 @@ int main() { ...@@ -1427,7 +1438,7 @@ int main() {
yywrap() yywrap()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -1450,7 +1461,7 @@ fi ...@@ -1450,7 +1461,7 @@ fi
fi fi
echo $ac_n "checking whether ln works""... $ac_c" 1>&6 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
echo "configure:1454: checking whether ln works" >&5 echo "configure:1465: checking whether ln works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1482,7 +1493,7 @@ else ...@@ -1482,7 +1493,7 @@ else
fi fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1486: checking whether ln -s works" >&5 echo "configure:1497: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1514,19 +1525,19 @@ else ...@@ -1514,19 +1525,19 @@ else
fi fi
echo $ac_n "checking for volatile""... $ac_c" 1>&6 echo $ac_n "checking for volatile""... $ac_c" 1>&6
echo "configure:1518: checking for volatile" >&5 echo "configure:1529: checking for volatile" >&5
if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1523 "configure" #line 1534 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
volatile int foo; volatile int foo;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_c_volatile=yes gcc_cv_c_volatile=yes
else else
...@@ -1549,7 +1560,7 @@ fi ...@@ -1549,7 +1560,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1553: checking for $ac_word" >&5 echo "configure:1564: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1581,7 +1592,7 @@ do ...@@ -1581,7 +1592,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1585: checking for $ac_word" >&5 echo "configure:1596: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1622,7 +1633,7 @@ test -n "$YACC" || YACC="yacc" ...@@ -1622,7 +1633,7 @@ test -n "$YACC" || YACC="yacc"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1626: checking for a BSD compatible install" >&5 echo "configure:1637: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -1673,7 +1684,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ...@@ -1673,7 +1684,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1677: checking how to run the C preprocessor" >&5 echo "configure:1688: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
...@@ -1688,13 +1699,13 @@ else ...@@ -1688,13 +1699,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1692 "configure" #line 1703 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -1705,13 +1716,13 @@ else ...@@ -1705,13 +1716,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1709 "configure" #line 1720 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -1722,13 +1733,13 @@ else ...@@ -1722,13 +1733,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1726 "configure" #line 1737 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -1753,12 +1764,12 @@ fi ...@@ -1753,12 +1764,12 @@ fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1757: checking for ANSI C header files" >&5 echo "configure:1768: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1762 "configure" #line 1773 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -1766,7 +1777,7 @@ else ...@@ -1766,7 +1777,7 @@ else
#include <float.h> #include <float.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1783,7 +1794,7 @@ rm -f conftest* ...@@ -1783,7 +1794,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1787 "configure" #line 1798 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
...@@ -1801,7 +1812,7 @@ fi ...@@ -1801,7 +1812,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1805 "configure" #line 1816 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
...@@ -1822,7 +1833,7 @@ if test "$cross_compiling" = yes; then ...@@ -1822,7 +1833,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1826 "configure" #line 1837 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
...@@ -1833,7 +1844,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); ...@@ -1833,7 +1844,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
...@@ -1857,12 +1868,12 @@ EOF ...@@ -1857,12 +1868,12 @@ EOF
fi fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1861: checking whether time.h and sys/time.h may both be included" >&5 echo "configure:1872: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1866 "configure" #line 1877 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
...@@ -1871,7 +1882,7 @@ int main() { ...@@ -1871,7 +1882,7 @@ int main() {
struct tm *tp; struct tm *tp;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_time=yes ac_cv_header_time=yes
else else
...@@ -1892,12 +1903,12 @@ EOF ...@@ -1892,12 +1903,12 @@ EOF
fi fi
echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
echo "configure:1896: checking whether string.h and strings.h may both be included" >&5 echo "configure:1907: checking whether string.h and strings.h may both be included" >&5
if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1901 "configure" #line 1912 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
...@@ -1905,7 +1916,7 @@ int main() { ...@@ -1905,7 +1916,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_header_string=yes gcc_cv_header_string=yes
else else
...@@ -1926,12 +1937,12 @@ EOF ...@@ -1926,12 +1937,12 @@ EOF
fi fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:1930: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo "configure:1941: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1935 "configure" #line 1946 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
...@@ -1947,7 +1958,7 @@ wait (&s); ...@@ -1947,7 +1958,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_sys_wait_h=yes ac_cv_header_sys_wait_h=yes
else else
...@@ -1974,17 +1985,17 @@ for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ ...@@ -1974,17 +1985,17 @@ for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1978: checking for $ac_hdr" >&5 echo "configure:1989: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1983 "configure" #line 1994 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2014,17 +2025,17 @@ done ...@@ -2014,17 +2025,17 @@ done
# Check for thread headers. # Check for thread headers.
ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for thread.h""... $ac_c" 1>&6 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
echo "configure:2018: checking for thread.h" >&5 echo "configure:2029: checking for thread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2023 "configure" #line 2034 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <thread.h> #include <thread.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2048,17 +2059,17 @@ fi ...@@ -2048,17 +2059,17 @@ fi
ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
echo "configure:2052: checking for pthread.h" >&5 echo "configure:2063: checking for pthread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2057 "configure" #line 2068 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <pthread.h> #include <pthread.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2085,7 +2096,7 @@ fi ...@@ -2085,7 +2096,7 @@ fi
# Extract the first word of "gnatbind", so it can be a program name with args. # Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2 set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2089: checking for $ac_word" >&5 echo "configure:2100: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2118,12 +2129,12 @@ fi ...@@ -2118,12 +2129,12 @@ fi
echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
echo "configure:2122: checking for preprocessor stringizing operator" >&5 echo "configure:2133: checking for preprocessor stringizing operator" >&5
if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2127 "configure" #line 2138 "configure"
#include "confdefs.h" #include "confdefs.h"
#define x(y) #y #define x(y) #y
...@@ -2156,12 +2167,12 @@ echo "$ac_t""${ac_cv_c_stringize}" 1>&6 ...@@ -2156,12 +2167,12 @@ echo "$ac_t""${ac_cv_c_stringize}" 1>&6
# Use <inttypes.h> only if it exists, # Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t. # doesn't clash with <sys/types.h>, and declares intmax_t.
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
echo "configure:2160: checking for inttypes.h" >&5 echo "configure:2171: checking for inttypes.h" >&5
if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2165 "configure" #line 2176 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <inttypes.h> #include <inttypes.h>
...@@ -2169,7 +2180,7 @@ int main() { ...@@ -2169,7 +2180,7 @@ int main() {
intmax_t i = -1; intmax_t i = -1;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_header_inttypes_h=yes gcc_cv_header_inttypes_h=yes
else else
...@@ -2192,15 +2203,15 @@ fi ...@@ -2192,15 +2203,15 @@ fi
for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \ for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \ index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked getrusage fputs_unlocked getrusage valloc
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2199: checking for $ac_func" >&5 echo "configure:2210: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2204 "configure" #line 2215 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -2223,7 +2234,7 @@ $ac_func(); ...@@ -2223,7 +2234,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -2252,12 +2263,12 @@ done ...@@ -2252,12 +2263,12 @@ done
#AC_CHECK_TYPE(wchar_t, unsigned int) #AC_CHECK_TYPE(wchar_t, unsigned int)
echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:2256: checking for vprintf" >&5 echo "configure:2267: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2261 "configure" #line 2272 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */ which can conflict with char vprintf(); below. */
...@@ -2280,7 +2291,7 @@ vprintf(); ...@@ -2280,7 +2291,7 @@ vprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vprintf=yes" eval "ac_cv_func_vprintf=yes"
else else
...@@ -2304,12 +2315,12 @@ fi ...@@ -2304,12 +2315,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:2308: checking for _doprnt" >&5 echo "configure:2319: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2313 "configure" #line 2324 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */ which can conflict with char _doprnt(); below. */
...@@ -2332,7 +2343,7 @@ _doprnt(); ...@@ -2332,7 +2343,7 @@ _doprnt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func__doprnt=yes" eval "ac_cv_func__doprnt=yes"
else else
...@@ -2368,7 +2379,7 @@ fi ...@@ -2368,7 +2379,7 @@ fi
echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
echo "configure:2372: checking whether the printf functions support %p" >&5 echo "configure:2383: checking whether the printf functions support %p" >&5
if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2376,7 +2387,7 @@ else ...@@ -2376,7 +2387,7 @@ else
gcc_cv_func_printf_ptr=no gcc_cv_func_printf_ptr=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2380 "configure" #line 2391 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
...@@ -2389,7 +2400,7 @@ main() ...@@ -2389,7 +2400,7 @@ main()
exit (p != q); exit (p != q);
} }
EOF EOF
if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
gcc_cv_func_printf_ptr=yes gcc_cv_func_printf_ptr=yes
else else
...@@ -2422,12 +2433,12 @@ case "${host}" in ...@@ -2422,12 +2433,12 @@ case "${host}" in
;; ;;
esac esac
echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:2426: checking for pid_t" >&5 echo "configure:2437: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2431 "configure" #line 2442 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -2456,17 +2467,17 @@ fi ...@@ -2456,17 +2467,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
echo "configure:2460: checking for vfork.h" >&5 echo "configure:2471: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2465 "configure" #line 2476 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <vfork.h> #include <vfork.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2491,18 +2502,18 @@ else ...@@ -2491,18 +2502,18 @@ else
fi fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
echo "configure:2495: checking for working vfork" >&5 echo "configure:2506: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6 echo $ac_n "checking for vfork""... $ac_c" 1>&6
echo "configure:2501: checking for vfork" >&5 echo "configure:2512: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2506 "configure" #line 2517 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */ which can conflict with char vfork(); below. */
...@@ -2525,7 +2536,7 @@ vfork(); ...@@ -2525,7 +2536,7 @@ vfork();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vfork=yes" eval "ac_cv_func_vfork=yes"
else else
...@@ -2547,7 +2558,7 @@ fi ...@@ -2547,7 +2558,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork ac_cv_func_vfork_works=$ac_cv_func_vfork
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2551 "configure" #line 2562 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Thanks to Paul Eggert for this test. */ /* Thanks to Paul Eggert for this test. */
#include <stdio.h> #include <stdio.h>
...@@ -2642,7 +2653,7 @@ main() { ...@@ -2642,7 +2653,7 @@ main() {
} }
} }
EOF EOF
if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_vfork_works=yes ac_cv_func_vfork_works=yes
else else
...@@ -2668,17 +2679,17 @@ for ac_hdr in unistd.h ...@@ -2668,17 +2679,17 @@ for ac_hdr in unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2672: checking for $ac_hdr" >&5 echo "configure:2683: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2677 "configure" #line 2688 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2707,12 +2718,12 @@ done ...@@ -2707,12 +2718,12 @@ done
for ac_func in getpagesize for ac_func in getpagesize
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2711: checking for $ac_func" >&5 echo "configure:2722: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2716 "configure" #line 2727 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -2735,7 +2746,7 @@ $ac_func(); ...@@ -2735,7 +2746,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -2760,7 +2771,7 @@ fi ...@@ -2760,7 +2771,7 @@ fi
done done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:2764: checking for working mmap" >&5 echo "configure:2775: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2768,7 +2779,7 @@ else ...@@ -2768,7 +2779,7 @@ else
ac_cv_func_mmap_fixed_mapped=no ac_cv_func_mmap_fixed_mapped=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2772 "configure" #line 2783 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. /* Thanks to Mike Haertel and Jim Avera for this test.
...@@ -2908,7 +2919,7 @@ main() ...@@ -2908,7 +2919,7 @@ main()
} }
EOF EOF
if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_fixed_mapped=yes
else else
...@@ -2936,12 +2947,12 @@ for ac_func in bcopy bzero bcmp \ ...@@ -2936,12 +2947,12 @@ for ac_func in bcopy bzero bcmp \
strsignal putc_unlocked fputs_unlocked strstr strsignal putc_unlocked fputs_unlocked strstr
do do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:2940: checking whether $ac_func must be declared" >&5 echo "configure:2951: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2945 "configure" #line 2956 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
...@@ -2974,7 +2985,7 @@ int main() { ...@@ -2974,7 +2985,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func char *(*pfn) = (char *(*)) $ac_func
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no" eval "gcc_cv_decl_needed_$ac_func=no"
else else
...@@ -3003,12 +3014,12 @@ done ...@@ -3003,12 +3014,12 @@ done
for ac_func in malloc realloc calloc free for ac_func in malloc realloc calloc free
do do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:3007: checking whether $ac_func must be declared" >&5 echo "configure:3018: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3012 "configure" #line 3023 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
...@@ -3044,7 +3055,7 @@ int main() { ...@@ -3044,7 +3055,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func char *(*pfn) = (char *(*)) $ac_func
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no" eval "gcc_cv_decl_needed_$ac_func=no"
else else
...@@ -3073,12 +3084,12 @@ done ...@@ -3073,12 +3084,12 @@ done
for ac_func in getrlimit setrlimit getrusage for ac_func in getrlimit setrlimit getrusage
do do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:3077: checking whether $ac_func must be declared" >&5 echo "configure:3088: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3082 "configure" #line 3093 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
...@@ -3115,7 +3126,7 @@ int main() { ...@@ -3115,7 +3126,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func char *(*pfn) = (char *(*)) $ac_func
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no" eval "gcc_cv_decl_needed_$ac_func=no"
else else
...@@ -3142,12 +3153,12 @@ done ...@@ -3142,12 +3153,12 @@ done
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
echo "configure:3146: checking for sys_siglist declaration in signal.h or unistd.h" >&5 echo "configure:3157: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3151 "configure" #line 3162 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
...@@ -3159,7 +3170,7 @@ int main() { ...@@ -3159,7 +3170,7 @@ int main() {
char *msg = *(sys_siglist + 1); char *msg = *(sys_siglist + 1);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_decl_sys_siglist=yes ac_cv_decl_sys_siglist=yes
else else
...@@ -3182,12 +3193,12 @@ fi ...@@ -3182,12 +3193,12 @@ fi
# mkdir takes a single argument on some systems. # mkdir takes a single argument on some systems.
echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
echo "configure:3186: checking if mkdir takes one argument" >&5 echo "configure:3197: checking if mkdir takes one argument" >&5
if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3191 "configure" #line 3202 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
...@@ -3204,7 +3215,7 @@ int main() { ...@@ -3204,7 +3215,7 @@ int main() {
mkdir ("foo", 0); mkdir ("foo", 0);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_mkdir_takes_one_arg=no gcc_cv_mkdir_takes_one_arg=no
else else
...@@ -5968,7 +5979,7 @@ for machine in $build $host $target; do ...@@ -5968,7 +5979,7 @@ for machine in $build $host $target; do
xmake_file=sparc/x-sysv4 xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o" extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
case $machine in case $machine in
*-*-solaris2.[0-4]) *-*-solaris2.0-4)
float_format=i128 float_format=i128
;; ;;
*) *)
...@@ -6641,7 +6652,7 @@ fi ...@@ -6641,7 +6652,7 @@ fi
echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
echo "configure:6636: checking for strerror in -lcposix" >&5 echo "configure:6656: checking for strerror in -lcposix" >&5
ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -6649,7 +6660,7 @@ else ...@@ -6649,7 +6660,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcposix $LIBS" LIBS="-lcposix $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6644 "configure" #line 6664 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -6660,7 +6671,7 @@ int main() { ...@@ -6660,7 +6671,7 @@ int main() {
strerror() strerror()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -6683,12 +6694,12 @@ fi ...@@ -6683,12 +6694,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:6678: checking for working const" >&5 echo "configure:6698: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6683 "configure" #line 6703 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -6737,7 +6748,7 @@ ccp = (char const *const *) p; ...@@ -6737,7 +6748,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:6752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
...@@ -6758,21 +6769,21 @@ EOF ...@@ -6758,21 +6769,21 @@ EOF
fi fi
echo $ac_n "checking for inline""... $ac_c" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:6753: checking for inline" >&5 echo "configure:6773: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_cv_c_inline=no ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6760 "configure" #line 6780 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} $ac_kw foo() { } $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:6787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_inline=$ac_kw; break ac_cv_c_inline=$ac_kw; break
else else
...@@ -6798,12 +6809,12 @@ EOF ...@@ -6798,12 +6809,12 @@ EOF
esac esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6 echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:6793: checking for off_t" >&5 echo "configure:6813: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6798 "configure" #line 6818 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -6831,12 +6842,12 @@ EOF ...@@ -6831,12 +6842,12 @@ EOF
fi fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:6826: checking for size_t" >&5 echo "configure:6846: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6831 "configure" #line 6851 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -6866,19 +6877,19 @@ fi ...@@ -6866,19 +6877,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless! # for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:6861: checking for working alloca.h" >&5 echo "configure:6881: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6866 "configure" #line 6886 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alloca.h> #include <alloca.h>
int main() { int main() {
char *p = alloca(2 * sizeof(int)); char *p = alloca(2 * sizeof(int));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_alloca_h=yes ac_cv_header_alloca_h=yes
else else
...@@ -6899,12 +6910,12 @@ EOF ...@@ -6899,12 +6910,12 @@ EOF
fi fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6 echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:6894: checking for alloca" >&5 echo "configure:6914: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6899 "configure" #line 6919 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -6932,7 +6943,7 @@ int main() { ...@@ -6932,7 +6943,7 @@ int main() {
char *p = (char *) alloca(1); char *p = (char *) alloca(1);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_func_alloca_works=yes ac_cv_func_alloca_works=yes
else else
...@@ -6964,12 +6975,12 @@ EOF ...@@ -6964,12 +6975,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:6959: checking whether alloca needs Cray hooks" >&5 echo "configure:6979: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6964 "configure" #line 6984 "configure"
#include "confdefs.h" #include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2) #if defined(CRAY) && ! defined(CRAY2)
webecray webecray
...@@ -6994,12 +7005,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 ...@@ -6994,12 +7005,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6989: checking for $ac_func" >&5 echo "configure:7009: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6994 "configure" #line 7014 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -7022,7 +7033,7 @@ $ac_func(); ...@@ -7022,7 +7033,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -7049,7 +7060,7 @@ done ...@@ -7049,7 +7060,7 @@ done
fi fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:7044: checking stack direction for C alloca" >&5 echo "configure:7064: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7057,7 +7068,7 @@ else ...@@ -7057,7 +7068,7 @@ else
ac_cv_c_stack_direction=0 ac_cv_c_stack_direction=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7052 "configure" #line 7072 "configure"
#include "confdefs.h" #include "confdefs.h"
find_stack_direction () find_stack_direction ()
{ {
...@@ -7076,7 +7087,7 @@ main () ...@@ -7076,7 +7087,7 @@ main ()
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
} }
EOF EOF
if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_c_stack_direction=1 ac_cv_c_stack_direction=1
else else
...@@ -7103,17 +7114,17 @@ unistd.h sys/param.h ...@@ -7103,17 +7114,17 @@ unistd.h sys/param.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7098: checking for $ac_hdr" >&5 echo "configure:7118: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7103 "configure" #line 7123 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7143,12 +7154,12 @@ done ...@@ -7143,12 +7154,12 @@ done
strdup __argz_count __argz_stringify __argz_next strdup __argz_count __argz_stringify __argz_next
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7138: checking for $ac_func" >&5 echo "configure:7158: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7143 "configure" #line 7163 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -7171,7 +7182,7 @@ $ac_func(); ...@@ -7171,7 +7182,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -7200,12 +7211,12 @@ done ...@@ -7200,12 +7211,12 @@ done
for ac_func in stpcpy for ac_func in stpcpy
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7195: checking for $ac_func" >&5 echo "configure:7215: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7200 "configure" #line 7220 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -7228,7 +7239,7 @@ $ac_func(); ...@@ -7228,7 +7239,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -7262,19 +7273,19 @@ EOF ...@@ -7262,19 +7273,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:7257: checking for LC_MESSAGES" >&5 echo "configure:7277: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7262 "configure" #line 7282 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <locale.h> #include <locale.h>
int main() { int main() {
return LC_MESSAGES return LC_MESSAGES
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
am_cv_val_LC_MESSAGES=yes am_cv_val_LC_MESSAGES=yes
else else
...@@ -7295,7 +7306,7 @@ EOF ...@@ -7295,7 +7306,7 @@ EOF
fi fi
fi fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
echo "configure:7290: checking whether NLS is requested" >&5 echo "configure:7310: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given. # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then if test "${enable_nls+set}" = set; then
enableval="$enable_nls" enableval="$enable_nls"
...@@ -7315,7 +7326,7 @@ fi ...@@ -7315,7 +7326,7 @@ fi
EOF EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
echo "configure:7310: checking whether included gettext is requested" >&5 echo "configure:7330: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given. # Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext" withval="$with_included_gettext"
...@@ -7334,17 +7345,17 @@ fi ...@@ -7334,17 +7345,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
echo "configure:7329: checking for libintl.h" >&5 echo "configure:7349: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7334 "configure" #line 7354 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libintl.h> #include <libintl.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7361,19 +7372,19 @@ fi ...@@ -7361,19 +7372,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
echo "configure:7356: checking for gettext in libc" >&5 echo "configure:7376: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7361 "configure" #line 7381 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libintl.h> #include <libintl.h>
int main() { int main() {
return (int) gettext ("") return (int) gettext ("")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
gt_cv_func_gettext_libc=yes gt_cv_func_gettext_libc=yes
else else
...@@ -7389,7 +7400,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 ...@@ -7389,7 +7400,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
echo "configure:7384: checking for bindtextdomain in -lintl" >&5 echo "configure:7404: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -7397,7 +7408,7 @@ else ...@@ -7397,7 +7408,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS" LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7392 "configure" #line 7412 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -7408,7 +7419,7 @@ int main() { ...@@ -7408,7 +7419,7 @@ int main() {
bindtextdomain() bindtextdomain()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -7424,12 +7435,12 @@ fi ...@@ -7424,12 +7435,12 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
echo "configure:7419: checking for gettext in libintl" >&5 echo "configure:7439: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
echo "configure:7424: checking for gettext in -lintl" >&5 echo "configure:7444: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -7437,7 +7448,7 @@ else ...@@ -7437,7 +7448,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS" LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7432 "configure" #line 7452 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -7448,7 +7459,7 @@ int main() { ...@@ -7448,7 +7459,7 @@ int main() {
gettext() gettext()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -7487,7 +7498,7 @@ EOF ...@@ -7487,7 +7498,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7482: checking for $ac_word" >&5 echo "configure:7502: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7521,12 +7532,12 @@ fi ...@@ -7521,12 +7532,12 @@ fi
for ac_func in dcgettext for ac_func in dcgettext
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7516: checking for $ac_func" >&5 echo "configure:7536: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7521 "configure" #line 7541 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -7549,7 +7560,7 @@ $ac_func(); ...@@ -7549,7 +7560,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -7576,7 +7587,7 @@ done ...@@ -7576,7 +7587,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7571: checking for $ac_word" >&5 echo "configure:7591: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7612,7 +7623,7 @@ fi ...@@ -7612,7 +7623,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7607: checking for $ac_word" >&5 echo "configure:7627: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7644,7 +7655,7 @@ else ...@@ -7644,7 +7655,7 @@ else
fi fi
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7639 "configure" #line 7659 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -7652,7 +7663,7 @@ extern int _nl_msg_cat_cntr; ...@@ -7652,7 +7663,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr return _nl_msg_cat_cntr
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
CATOBJEXT=.gmo CATOBJEXT=.gmo
DATADIRNAME=share DATADIRNAME=share
...@@ -7675,7 +7686,7 @@ fi ...@@ -7675,7 +7686,7 @@ fi
if test "$CATOBJEXT" = "NONE"; then if test "$CATOBJEXT" = "NONE"; then
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
echo "configure:7670: checking whether catgets can be used" >&5 echo "configure:7690: checking whether catgets can be used" >&5
# Check whether --with-catgets or --without-catgets was given. # Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then if test "${with_catgets+set}" = set; then
withval="$with_catgets" withval="$with_catgets"
...@@ -7688,7 +7699,7 @@ fi ...@@ -7688,7 +7699,7 @@ fi
if test "$nls_cv_use_catgets" = "yes"; then if test "$nls_cv_use_catgets" = "yes"; then
echo $ac_n "checking for main in -li""... $ac_c" 1>&6 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
echo "configure:7683: checking for main in -li" >&5 echo "configure:7703: checking for main in -li" >&5
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -7696,14 +7707,14 @@ else ...@@ -7696,14 +7707,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-li $LIBS" LIBS="-li $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7691 "configure" #line 7711 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -7731,12 +7742,12 @@ else ...@@ -7731,12 +7742,12 @@ else
fi fi
echo $ac_n "checking for catgets""... $ac_c" 1>&6 echo $ac_n "checking for catgets""... $ac_c" 1>&6
echo "configure:7726: checking for catgets" >&5 echo "configure:7746: checking for catgets" >&5
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7731 "configure" #line 7751 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char catgets(); below. */ which can conflict with char catgets(); below. */
...@@ -7759,7 +7770,7 @@ catgets(); ...@@ -7759,7 +7770,7 @@ catgets();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_catgets=yes" eval "ac_cv_func_catgets=yes"
else else
...@@ -7781,7 +7792,7 @@ EOF ...@@ -7781,7 +7792,7 @@ EOF
# Extract the first word of "gencat", so it can be a program name with args. # Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2 set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7776: checking for $ac_word" >&5 echo "configure:7796: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7817,7 +7828,7 @@ fi ...@@ -7817,7 +7828,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7812: checking for $ac_word" >&5 echo "configure:7832: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7854,7 +7865,7 @@ fi ...@@ -7854,7 +7865,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7849: checking for $ac_word" >&5 echo "configure:7869: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7889,7 +7900,7 @@ fi ...@@ -7889,7 +7900,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7884: checking for $ac_word" >&5 echo "configure:7904: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7947,7 +7958,7 @@ fi ...@@ -7947,7 +7958,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7942: checking for $ac_word" >&5 echo "configure:7962: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -7981,7 +7992,7 @@ fi ...@@ -7981,7 +7992,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:7976: checking for $ac_word" >&5 echo "configure:7996: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -8017,7 +8028,7 @@ fi ...@@ -8017,7 +8028,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:8012: checking for $ac_word" >&5 echo "configure:8032: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -8110,7 +8121,7 @@ fi ...@@ -8110,7 +8121,7 @@ fi
LINGUAS= LINGUAS=
else else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
echo "configure:8105: checking for catalogs to be installed" >&5 echo "configure:8125: checking for catalogs to be installed" >&5
NEW_LINGUAS= NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in case "$ALL_LINGUAS" in
...@@ -8138,17 +8149,17 @@ echo "configure:8105: checking for catalogs to be installed" >&5 ...@@ -8138,17 +8149,17 @@ echo "configure:8105: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
echo "configure:8133: checking for linux/version.h" >&5 echo "configure:8153: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8138 "configure" #line 8158 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <linux/version.h> #include <linux/version.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:8143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:8163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -8223,7 +8234,7 @@ fi ...@@ -8223,7 +8234,7 @@ fi
echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
echo "configure:8218: checking whether windows registry support is requested" >&5 echo "configure:8238: checking whether windows registry support is requested" >&5
if test x$enable_win32_registry != xno; then if test x$enable_win32_registry != xno; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define ENABLE_WIN32_REGISTRY 1 #define ENABLE_WIN32_REGISTRY 1
...@@ -8252,7 +8263,7 @@ esac ...@@ -8252,7 +8263,7 @@ esac
if test x$enable_win32_registry != xno; then if test x$enable_win32_registry != xno; then
echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
echo "configure:8247: checking registry key on windows hosts" >&5 echo "configure:8267: checking registry key on windows hosts" >&5
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
EOF EOF
...@@ -8428,7 +8439,7 @@ fi ...@@ -8428,7 +8439,7 @@ fi
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:8423: checking assembler alignment features" >&5 echo "configure:8443: checking assembler alignment features" >&5
gcc_cv_as= gcc_cv_as=
gcc_cv_as_alignment_features= gcc_cv_as_alignment_features=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
...@@ -8549,7 +8560,7 @@ fi ...@@ -8549,7 +8560,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:8544: checking assembler subsection support" >&5 echo "configure:8564: checking assembler subsection support" >&5
gcc_cv_as_subsections= gcc_cv_as_subsections=
if test x$gcc_cv_as != x; then if test x$gcc_cv_as != x; then
# Check if we have .subsection # Check if we have .subsection
...@@ -8591,7 +8602,7 @@ echo "$ac_t""$gcc_cv_as_subsections" 1>&6 ...@@ -8591,7 +8602,7 @@ echo "$ac_t""$gcc_cv_as_subsections" 1>&6
case "$target" in case "$target" in
sparc*-*-*) sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:8586: checking assembler .register pseudo-op support" >&5 echo "configure:8606: checking assembler .register pseudo-op support" >&5
gcc_cv_as_register_pseudo_op= gcc_cv_as_register_pseudo_op=
if test x$gcc_cv_as != x; then if test x$gcc_cv_as != x; then
# Check if we have .register # Check if we have .register
...@@ -8608,7 +8619,7 @@ EOF ...@@ -8608,7 +8619,7 @@ EOF
echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
echo $ac_n "checking assembler offsetable %lo() support""... $ac_c" 1>&6 echo $ac_n "checking assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:8603: checking assembler offsetable %lo() support" >&5 echo "configure:8623: checking assembler offsetable %lo() support" >&5
gcc_cv_as_offsetable_lo10= gcc_cv_as_offsetable_lo10=
if test x$gcc_cv_as != x; then if test x$gcc_cv_as != x; then
# Check if assembler has offsetable %lo() # Check if assembler has offsetable %lo()
...@@ -8645,7 +8656,7 @@ EOF ...@@ -8645,7 +8656,7 @@ EOF
i[34567]86-*-*) i[34567]86-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:8640: checking assembler instructions" >&5 echo "configure:8660: checking assembler instructions" >&5
gcc_cv_as_instructions= gcc_cv_as_instructions=
if test x$gcc_cv_as != x; then if test x$gcc_cv_as != x; then
set "filds fists" "filds mem; fists mem" set "filds fists" "filds mem; fists mem"
...@@ -8745,6 +8756,8 @@ esac ...@@ -8745,6 +8756,8 @@ esac
else else
if test $ac_cv_func_mmap_fixed_mapped = yes; then if test $ac_cv_func_mmap_fixed_mapped = yes; then
GGC=ggc-page GGC=ggc-page
elif test $ac_cv_func_valloc = yes; then
GGC=ggc-page
else else
GGC=ggc-simple GGC=ggc-simple
fi fi
......
...@@ -368,7 +368,7 @@ fi ...@@ -368,7 +368,7 @@ fi
AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \ AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \ index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked getrusage) fputs_unlocked getrusage valloc)
# Make sure wchar_t is available # Make sure wchar_t is available
#AC_CHECK_TYPE(wchar_t, unsigned int) #AC_CHECK_TYPE(wchar_t, unsigned int)
...@@ -4456,6 +4456,8 @@ AC_ARG_WITH(gc, ...@@ -4456,6 +4456,8 @@ AC_ARG_WITH(gc,
esac], esac],
[if test $ac_cv_func_mmap_fixed_mapped = yes; then [if test $ac_cv_func_mmap_fixed_mapped = yes; then
GGC=ggc-page GGC=ggc-page
elif test $ac_cv_func_valloc = yes; then
GGC=ggc-page
else else
GGC=ggc-simple GGC=ggc-simple
fi]) fi])
......
...@@ -268,21 +268,18 @@ ggc_mark_rtx_children (r) ...@@ -268,21 +268,18 @@ ggc_mark_rtx_children (r)
ggc_mark_rtvec (XVEC (r, i)); ggc_mark_rtvec (XVEC (r, i));
break; break;
case 'S': case 's': case 'S': case 's':
ggc_mark_string_if_gcable (XSTR (r, i)); ggc_mark_if_gcable (XSTR (r, i));
break; break;
} }
} }
} }
void void
ggc_mark_rtvec (v) ggc_mark_rtvec_children (v)
rtvec v; rtvec v;
{ {
int i; int i;
if (v == NULL || ggc_set_mark_rtvec (v))
return;
i = GET_NUM_ELEM (v); i = GET_NUM_ELEM (v);
while (--i >= 0) while (--i >= 0)
ggc_mark_rtx (RTVEC_ELT (v, i)); ggc_mark_rtx (RTVEC_ELT (v, i));
...@@ -451,3 +448,26 @@ ggc_mark_tree_hash_table (ht) ...@@ -451,3 +448,26 @@ ggc_mark_tree_hash_table (ht)
hash_traverse (ht, ggc_mark_tree_hash_table_entry, /*info=*/0); hash_traverse (ht, ggc_mark_tree_hash_table_entry, /*info=*/0);
} }
/* Allocation wrappers. */
char *
ggc_alloc_string (contents, length)
const char *contents;
int length;
{
char *string;
if (length < 0)
{
if (contents == NULL)
return NULL;
length = strlen (contents);
}
string = (char *) ggc_alloc_obj (length + 1, 0);
if (contents != NULL)
memcpy (string, contents, length);
string[length] = 0;
return string;
}
...@@ -35,28 +35,13 @@ ...@@ -35,28 +35,13 @@
/* For now, keep using the old obstack scheme in the gen* programs. */ /* For now, keep using the old obstack scheme in the gen* programs. */
int ggc_p = 0; int ggc_p = 0;
rtx void *
ggc_alloc_rtx (nslots) ggc_alloc_obj (size, zero)
int nslots; size_t size;
int zero;
{ {
int size = sizeof(struct rtx_def) + (nslots - 1) * sizeof(rtunion); void *p = xmalloc (size);
rtx n; if (zero)
memset (p, 0, size);
n = (rtx) xmalloc (size); return p;
bzero ((char *) n, size);
return n;
}
rtvec
ggc_alloc_rtvec (nelt)
int nelt;
{
int size = sizeof (struct rtvec_def) + (nelt - 1) * sizeof (rtx);
rtvec v;
v = (rtvec) xmalloc (size);
bzero ((char *) v, size);
return v;
} }
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
#include "flags.h" #include "flags.h"
#include "ggc.h" #include "ggc.h"
#ifdef HAVE_MMAP
#include <sys/mman.h> #include <sys/mman.h>
#endif
/* Stategy: /* Stategy:
...@@ -111,10 +113,10 @@ char *empty_string; ...@@ -111,10 +113,10 @@ char *empty_string;
significant PAGE_L2_BITS and PAGE_L1_BITS are the second and first significant PAGE_L2_BITS and PAGE_L1_BITS are the second and first
index values in the lookup table, respectively. index values in the lookup table, respectively.
The topmost leftover bits, if any, are ignored. For 32-bit For 32-bit architectures and the settings below, there are no
architectures and the settings below, there are no leftover bits. leftover bits. For architectures with wider pointers, the lookup
For architectures with wider pointers, the lookup tree points to a tree points to a list of pages, which must be scanned to find the
list of pages, which must be scanned to find the correct one. */ correct one. */
#define PAGE_L1_BITS (8) #define PAGE_L1_BITS (8)
#define PAGE_L2_BITS (32 - PAGE_L1_BITS - G.lg_pagesize) #define PAGE_L2_BITS (32 - PAGE_L1_BITS - G.lg_pagesize)
...@@ -178,8 +180,8 @@ typedef page_entry **page_table[PAGE_L1_SIZE]; ...@@ -178,8 +180,8 @@ typedef page_entry **page_table[PAGE_L1_SIZE];
#else #else
/* On 64-bit hosts, we use two level page tables plus a linked list /* On 64-bit hosts, we use the same two level page tables plus a linked
that disambiguates the top 32-bits. There will almost always be list that disambiguates the top 32-bits. There will almost always be
exactly one entry in the list. */ exactly one entry in the list. */
typedef struct page_table_chain typedef struct page_table_chain
{ {
...@@ -221,7 +223,7 @@ static struct globals ...@@ -221,7 +223,7 @@ static struct globals
unsigned char context_depth; unsigned char context_depth;
/* A file descriptor open to /dev/zero for reading. */ /* A file descriptor open to /dev/zero for reading. */
#ifndef MAP_ANONYMOUS #if defined (HAVE_MMAP) && !defined(MAP_ANONYMOUS)
int dev_zero_fd; int dev_zero_fd;
#endif #endif
...@@ -258,16 +260,13 @@ static struct globals ...@@ -258,16 +260,13 @@ static struct globals
#define GGC_MIN_LAST_ALLOCATED (4 * 1024 * 1024) #define GGC_MIN_LAST_ALLOCATED (4 * 1024 * 1024)
static page_entry *** ggc_lookup_page_table PROTO ((void));
static int ggc_allocated_p PROTO ((const void *)); static int ggc_allocated_p PROTO ((const void *));
static page_entry *lookup_page_table_entry PROTO ((void *)); static page_entry *lookup_page_table_entry PROTO ((const void *));
static void set_page_table_entry PROTO ((void *, page_entry *)); static void set_page_table_entry PROTO ((void *, page_entry *));
static char *alloc_anon PROTO ((char *, size_t)); static char *alloc_anon PROTO ((char *, size_t));
static struct page_entry * alloc_page PROTO ((unsigned)); static struct page_entry * alloc_page PROTO ((unsigned));
static void free_page PROTO ((struct page_entry *)); static void free_page PROTO ((struct page_entry *));
static void release_pages PROTO ((void)); static void release_pages PROTO ((void));
static void *alloc_obj PROTO ((size_t, int));
static int mark_obj PROTO ((void *));
static void clear_marks PROTO ((void)); static void clear_marks PROTO ((void));
static void sweep_pages PROTO ((void)); static void sweep_pages PROTO ((void));
...@@ -278,37 +277,31 @@ static void poison_pages PROTO ((void)); ...@@ -278,37 +277,31 @@ static void poison_pages PROTO ((void));
void debug_print_page_list PROTO ((int)); void debug_print_page_list PROTO ((int));
/* Returns the lookup table appropriate for looking up P. */ /* Returns non-zero if P was allocated in GC'able memory. */
static inline page_entry *** static inline int
ggc_lookup_page_table () ggc_allocated_p (p)
const void *p;
{ {
page_entry ***base; page_entry ***base;
size_t L1, L2;
#if HOST_BITS_PER_PTR <= 32 #if HOST_BITS_PER_PTR <= 32
base = &G.lookup[0]; base = &G.lookup[0];
#else #else
page_table table = G.lookup; page_table table = G.lookup;
size_t high_bits = (size_t) p & ~ (size_t) 0xffffffff; size_t high_bits = (size_t) p & ~ (size_t) 0xffffffff;
while (table->high_bits != high_bits) while (1)
{
if (table == NULL)
return 0;
if (table->high_bits == high_bits)
break;
table = table->next; table = table->next;
}
base = &table->table[0]; base = &table->table[0];
#endif #endif
return base;
}
/* Returns non-zero if P was allocated in GC'able memory. */
static inline int
ggc_allocated_p (p)
const void *p;
{
page_entry ***base;
size_t L1, L2;
base = ggc_lookup_page_table ();
/* Extract the level 1 and 2 indicies. */ /* Extract the level 1 and 2 indicies. */
L1 = LOOKUP_L1 (p); L1 = LOOKUP_L1 (p);
L2 = LOOKUP_L2 (p); L2 = LOOKUP_L2 (p);
...@@ -321,12 +314,20 @@ ggc_allocated_p (p) ...@@ -321,12 +314,20 @@ ggc_allocated_p (p)
static inline page_entry * static inline page_entry *
lookup_page_table_entry(p) lookup_page_table_entry(p)
void *p; const void *p;
{ {
page_entry ***base; page_entry ***base;
size_t L1, L2; size_t L1, L2;
base = ggc_lookup_page_table (); #if HOST_BITS_PER_PTR <= 32
base = &G.lookup[0];
#else
page_table table = G.lookup;
size_t high_bits = (size_t) p & ~ (size_t) 0xffffffff;
while (table->high_bits != high_bits)
table = table->next;
base = &table->table[0];
#endif
/* Extract the level 1 and 2 indicies. */ /* Extract the level 1 and 2 indicies. */
L1 = LOOKUP_L1 (p); L1 = LOOKUP_L1 (p);
...@@ -407,11 +408,12 @@ poison (start, len) ...@@ -407,11 +408,12 @@ poison (start, len)
(if non-null). */ (if non-null). */
static inline char * static inline char *
alloc_anon (pref, size) alloc_anon (pref, size)
char *pref; char *pref ATTRIBUTE_UNUSED;
size_t size; size_t size;
{ {
char *page; char *page;
#ifdef HAVE_MMAP
#ifdef MAP_ANONYMOUS #ifdef MAP_ANONYMOUS
page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE, page = (char *) mmap (pref, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
...@@ -424,6 +426,16 @@ alloc_anon (pref, size) ...@@ -424,6 +426,16 @@ alloc_anon (pref, size)
fputs ("Virtual memory exhausted!\n", stderr); fputs ("Virtual memory exhausted!\n", stderr);
exit(1); exit(1);
} }
#else
#ifdef HAVE_VALLOC
page = (char *) valloc (size);
if (!page)
{
fputs ("Virtual memory exhausted!\n", stderr);
exit(1);
}
#endif /* HAVE_VALLOC */
#endif /* HAVE_MMAP */
return page; return page;
} }
...@@ -522,6 +534,7 @@ free_page (entry) ...@@ -522,6 +534,7 @@ free_page (entry)
static inline void static inline void
release_pages () release_pages ()
{ {
#ifdef HAVE_MMAP
page_entry *p, *next; page_entry *p, *next;
char *start; char *start;
size_t len; size_t len;
...@@ -553,6 +566,19 @@ release_pages () ...@@ -553,6 +566,19 @@ release_pages ()
} }
munmap (start, len); munmap (start, len);
#else
#ifdef HAVE_VALLOC
page_entry *p, *next;
for (p = G.free_pages; p ; p = next)
{
next = p->next;
free (p->page);
free (p);
}
#endif /* HAVE_VALLOC */
#endif /* HAVE_MMAP */
G.free_pages = NULL; G.free_pages = NULL;
} }
...@@ -582,8 +608,8 @@ static unsigned char const size_lookup[257] = ...@@ -582,8 +608,8 @@ static unsigned char const size_lookup[257] =
/* Allocate a chunk of memory of SIZE bytes. If ZERO is non-zero, the /* Allocate a chunk of memory of SIZE bytes. If ZERO is non-zero, the
memory is zeroed; otherwise, its contents are undefined. */ memory is zeroed; otherwise, its contents are undefined. */
static void * void *
alloc_obj (size, zero) ggc_alloc_obj (size, zero)
size_t size; size_t size;
int zero; int zero;
{ {
...@@ -700,8 +726,8 @@ alloc_obj (size, zero) ...@@ -700,8 +726,8 @@ alloc_obj (size, zero)
/* If P is not marked, marks it and returns 0. Otherwise returns 1. /* If P is not marked, marks it and returns 0. Otherwise returns 1.
P must have been allocated by the GC allocator; it mustn't point to P must have been allocated by the GC allocator; it mustn't point to
static objects, stack variables, or memory allocated with malloc. */ static objects, stack variables, or memory allocated with malloc. */
static int int
mark_obj (p) ggc_set_mark (p)
void *p; void *p;
{ {
page_entry *entry; page_entry *entry;
...@@ -738,6 +764,13 @@ mark_obj (p) ...@@ -738,6 +764,13 @@ mark_obj (p)
return 0; return 0;
} }
void
ggc_mark_if_gcable (p)
void *p;
{
if (p && ggc_allocated_p (p))
ggc_set_mark (p);
}
/* Initialize the ggc-mmap allocator. */ /* Initialize the ggc-mmap allocator. */
void void
...@@ -746,7 +779,7 @@ init_ggc () ...@@ -746,7 +779,7 @@ init_ggc ()
G.pagesize = getpagesize(); G.pagesize = getpagesize();
G.lg_pagesize = exact_log2 (G.pagesize); G.lg_pagesize = exact_log2 (G.pagesize);
#ifndef MAP_ANONYMOUS #if defined (HAVE_MMAP) && !defined(MAP_ANONYMOUS)
G.dev_zero_fd = open ("/dev/zero", O_RDONLY); G.dev_zero_fd = open ("/dev/zero", O_RDONLY);
if (G.dev_zero_fd == -1) if (G.dev_zero_fd == -1)
abort (); abort ();
...@@ -813,64 +846,6 @@ ggc_pop_context () ...@@ -813,64 +846,6 @@ ggc_pop_context ()
} }
} }
struct rtx_def *
ggc_alloc_rtx (nslots)
int nslots;
{
return (struct rtx_def *)
alloc_obj (sizeof (struct rtx_def) + (nslots - 1) * sizeof (rtunion), 1);
}
struct rtvec_def *
ggc_alloc_rtvec (nelt)
int nelt;
{
return (struct rtvec_def *)
alloc_obj (sizeof (struct rtvec_def) + (nelt - 1) * sizeof (rtx), 1);
}
union tree_node *
ggc_alloc_tree (length)
int length;
{
return (union tree_node *) alloc_obj (length, 1);
}
char *
ggc_alloc_string (contents, length)
const char *contents;
int length;
{
char *string;
if (length < 0)
{
if (contents == NULL)
return NULL;
length = strlen (contents);
}
string = (char *) alloc_obj (length + 1, 0);
if (contents != NULL)
memcpy (string, contents, length);
string[length] = 0;
return string;
}
void *
ggc_alloc (size)
size_t size;
{
return alloc_obj (size, 0);
}
static inline void static inline void
clear_marks () clear_marks ()
{ {
...@@ -1072,54 +1047,9 @@ ggc_collect () ...@@ -1072,54 +1047,9 @@ ggc_collect ()
time = get_run_time () - time; time = get_run_time () - time;
gc_time += time; gc_time += time;
time = (time + 500) / 1000;
if (!quiet_flag) if (!quiet_flag)
fprintf (stderr, "%luk in %d.%03d}", {
(unsigned long) G.allocated / 1024, time / 1000, time % 1000); fprintf (stderr, "%luk in %.3f}",
} (unsigned long) G.allocated / 1024, time * 1e-6);
}
int
ggc_set_mark_rtx (r)
rtx r;
{
return mark_obj (r);
}
int
ggc_set_mark_rtvec (v)
rtvec v;
{
return mark_obj (v);
}
int
ggc_set_mark_tree (t)
tree t;
{
return mark_obj (t);
}
void
ggc_mark_string (s)
char *s;
{
if (s)
mark_obj (s);
}
void
ggc_mark_string_if_gcable (s)
char *s;
{
if (s && ggc_allocated_p (s))
mark_obj (s);
}
void
ggc_mark (p)
void *p;
{
if (p)
mark_obj (p);
} }
...@@ -28,69 +28,74 @@ ...@@ -28,69 +28,74 @@
#include "hash.h" #include "hash.h"
#include "ggc.h" #include "ggc.h"
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
/* Debugging flags. */ /* Debugging flags. */
/* Zap memory before freeing to catch dangling pointers. */ /* Zap memory before freeing to catch dangling pointers. */
#define GGC_POISON #define GGC_POISON
/* Log alloc and release. Don't enable this unless you want a /* Collect statistics on how bushy the search tree is. */
really really lot of data. */ #undef GGC_BALANCE
#undef GGC_DUMP
/* Some magic tags for strings and anonymous memory, hoping to catch /* Perform collection every time ggc_collect is invoked. Otherwise,
certain errors wrt marking memory. */ collection is performed only when a significant amount of memory
has been allocated since the last collection. */
#undef GGC_ALWAYS_COLLECT
#define IS_MARKED(X) ((X) & 1) /* Always verify that the to-be-marked memory is collectable. */
#define IGNORE_MARK(X) ((X) & -2) #undef GGC_ALWAYS_VERIFY
#define GGC_STRING_MAGIC ((unsigned int)0xa1b2c3d4) #ifdef ENABLE_CHECKING
#define GGC_STRING_MAGIC_MARK ((unsigned int)0xa1b2c3d4 | 1) #define GGC_POISON
#define GGC_ALWAYS_COLLECT
#define GGC_ANY_MAGIC ((unsigned int)0xa9bacbdc) #define GGC_ALWAYS_VERIFY
#define GGC_ANY_MAGIC_MARK ((unsigned int)0xa9bacbdc | 1) #endif
/* Constants for general use. */ /* Constants for general use. */
char *empty_string; char *empty_string;
extern int gc_time;
/* Global lists of roots, rtxs, and trees. */ #ifndef HOST_BITS_PER_PTR
#define HOST_BITS_PER_PTR HOST_BITS_PER_LONG
#endif
struct ggc_rtx /* We'd like a balanced tree, but we don't really want to pay for the
{ cost of keeping the tree balanced. We'll settle for the next best
struct ggc_rtx *chain; thing -- nearly balanced.
struct rtx_def rtx;
};
struct ggc_rtvec In this context, the most natural key is the node pointer itself,
{ but due to the way memory managers work, we'd be virtually certain
struct ggc_rtvec *chain; to wind up with a completely degenerate straight line. What's needed
struct rtvec_def vec; is to make something more variable, and yet predictable, be more
}; significant in the comparison.
struct ggc_tree The handiest source of variability is the low bits of the pointer
{ value itself. Any sort of bit/byte swap would do, but such machine
struct ggc_tree *chain; specific operations are not handy, and we don't want to put that much
union tree_node tree; effort into it. */
};
struct ggc_string #define PTR_KEY(p) ((size_t)p << (HOST_BITS_PER_PTR - 8) \
{ | ((size_t)p & 0xff00) << (HOST_BITS_PER_PTR - 24) \
struct ggc_string *chain; | (size_t)p >> 16)
unsigned int magic_mark;
char string[1];
};
/* A generic allocation, with an external mark bit. */ /* GC'able memory; a node in a binary search tree. */
struct ggc_any struct ggc_mem
{ {
struct ggc_any *chain; /* A combination of the standard left/right nodes, indexable by `<'. */
unsigned int magic_mark; struct ggc_mem *sub[2];
unsigned int mark : 1;
unsigned int context : 7;
unsigned int size : 24;
/* Make sure the data is reasonably aligned. */ /* Make sure the data is reasonably aligned. */
union { union {
char c; HOST_WIDEST_INT i;
HOST_WIDE_INT i;
#ifdef HAVE_LONG_DOUBLE #ifdef HAVE_LONG_DOUBLE
long double d; long double d;
#else #else
...@@ -99,642 +104,373 @@ struct ggc_any ...@@ -99,642 +104,373 @@ struct ggc_any
} u; } u;
}; };
struct ggc_status static struct globals
{ {
struct ggc_status *next; /* Root of the object tree. */
struct ggc_rtx *rtxs; struct ggc_mem *root;
struct ggc_rtvec *vecs;
struct ggc_tree *trees;
struct ggc_string *strings;
struct ggc_any *anys;
size_t bytes_alloced_since_gc;
};
/* A chain of GGC contexts. The currently active context is at the /* Data bytes currently allocated. */
front of the chain. */ size_t allocated;
static struct ggc_status *ggc_chain;
/* The table of all allocated strings. Only valid during collection. */ /* Data objects currently allocated. */
static varray_type ggc_allocated_strings; size_t objects;
static size_t ggc_strings_used;
/* Some statistics. */ /* Data bytes allocated at time of last GC. */
size_t allocated_last_gc;
static int n_rtxs_collected; /* Current context level. */
static int n_vecs_collected; int context;
static int n_trees_collected; } G;
static int n_strings_collected;
static int n_anys_collected;
extern int gc_time;
#ifdef GGC_DUMP /* Skip garbage collection if the current allocation is not at least
static FILE *dump; this factor times the allocation at the end of the last collection.
#endif In other words, total allocation must expand by (this factor minus
one) before collection is performed. */
#define GGC_MIN_EXPAND_FOR_GC (1.3)
/* Local function prototypes. */ /* Bound `allocated_last_gc' to 4MB, to prevent the memory expansion
test from triggering too often when the heap is small. */
static void ggc_free_rtx PROTO ((struct ggc_rtx *r)); #define GGC_MIN_LAST_ALLOCATED (4 * 1024 * 1024)
static void ggc_free_rtvec PROTO ((struct ggc_rtvec *v));
static void ggc_free_tree PROTO ((struct ggc_tree *t));
static void ggc_free_string PROTO ((struct ggc_string *s));
static void ggc_free_any PROTO ((struct ggc_any *a));
static int ggc_compare_addresses PROTO ((const void *, const void *));
/* Called once to initialize the garbage collector. */ /* Local function prototypes. */
void static void tree_insert PROTO ((struct ggc_mem *));
init_ggc PROTO ((void)) static int tree_lookup PROTO ((struct ggc_mem *));
{ static void clear_marks PROTO ((struct ggc_mem *));
/* Initialize the global context. */ static void sweep_objs PROTO ((struct ggc_mem **));
ggc_push_context (); static void ggc_pop_context_1 PROTO ((struct ggc_mem *, int));
#ifdef GGC_DUMP #ifdef GGC_BALANCE
dump = fopen ("zgcdump", "w"); extern void debug_ggc_balance PROTO ((void));
setlinebuf (dump); static void tally_leaves PROTO ((struct ggc_mem *, int, size_t *, size_t *));
#endif #endif
empty_string = ggc_alloc_string ("", 0); /* Insert V into the search tree. */
ggc_add_string_root (&empty_string, 1);
}
/* Start a new GGC context. Memory allocated in previous contexts
will not be collected while the new context is active. */
void
ggc_push_context PROTO ((void))
{
struct ggc_status *gs = (struct ggc_status *) xcalloc (1, sizeof (*gs));
gs->next = ggc_chain;
ggc_chain = gs;
}
/* Finish a GC context. Any uncollected memory in the new context static inline void
will be merged with the old context. */ tree_insert (v)
struct ggc_mem *v;
void
ggc_pop_context PROTO ((void))
{ {
struct ggc_rtx *r; size_t v_key = PTR_KEY (v);
struct ggc_rtvec *v; struct ggc_mem *p, **pp;
struct ggc_tree *t;
struct ggc_string *s;
struct ggc_any *a;
struct ggc_status *gs;
gs = ggc_chain;
r = gs->rtxs;
if (r)
{
while (r->chain)
r = r->chain;
r->chain = gs->next->rtxs;
gs->next->rtxs = gs->rtxs;
}
v = gs->vecs; for (pp = &G.root, p = *pp; p ; p = *pp)
if (v)
{ {
while (v->chain) size_t p_key = PTR_KEY (p);
v = v->chain; pp = &p->sub[v_key < p_key];
v->chain = gs->next->vecs;
gs->next->vecs = gs->vecs;
} }
*pp = v;
}
t = gs->trees; /* Return true if V is in the tree. */
if (t)
{
while (t->chain)
t = t->chain;
t->chain = gs->next->trees;
gs->next->trees = gs->trees;
}
s = gs->strings; static inline int
if (s) tree_lookup (v)
{ struct ggc_mem *v;
while (s->chain) {
s = s->chain; size_t v_key = PTR_KEY (v);
s->chain = gs->next->strings; struct ggc_mem *p = G.root;
gs->next->strings = gs->strings;
}
a = gs->anys; while (p)
if (a)
{ {
while (a->chain) size_t p_key = PTR_KEY (p);
a = a->chain; if (p == v)
a->chain = gs->next->anys; return 1;
gs->next->anys = gs->anys; p = p->sub[v_key < p_key];
} }
gs->next->bytes_alloced_since_gc += gs->bytes_alloced_since_gc; return 0;
ggc_chain = gs->next;
free (gs);
} }
/* These allocators are dreadfully simple, with no caching whatsoever so /* Alloc SIZE bytes of GC'able memory. If ZERO, clear the memory. */
that Purify-like tools that do allocation versioning can catch errors.
This collector is never going to go fast anyway. */
rtx void *
ggc_alloc_rtx (nslots) ggc_alloc_obj (size, zero)
int nslots; size_t size;
int zero;
{ {
struct ggc_rtx *n; struct ggc_mem *x;
int size = sizeof(*n) + (nslots-1) * sizeof(rtunion);
n = (struct ggc_rtx *) xcalloc (1, size); x = (struct ggc_mem *) xmalloc (offsetof (struct ggc_mem, u) + size);
n->chain = ggc_chain->rtxs; x->sub[0] = NULL;
ggc_chain->rtxs = n; x->sub[1] = NULL;
x->mark = 0;
x->context = G.context;
x->size = size;
#ifdef GGC_DUMP if (zero)
fprintf (dump, "alloc rtx %p\n", &n->rtx); memset (&x->u, 0, size);
#endif
ggc_chain->bytes_alloced_since_gc += size; tree_insert (x);
G.allocated += size;
G.objects += 1;
return &n->rtx; return &x->u;
} }
rtvec /* Mark a node. */
ggc_alloc_rtvec (nelt)
int nelt;
{
struct ggc_rtvec *v;
int size = sizeof (*v) + (nelt - 1) * sizeof (rtx);
v = (struct ggc_rtvec *) xcalloc (1, size);
v->chain = ggc_chain->vecs;
ggc_chain->vecs = v;
#ifdef GGC_DUMP
fprintf(dump, "alloc vec %p\n", &v->vec);
#endif
ggc_chain->bytes_alloced_since_gc += size;
return &v->vec;
}
tree int
ggc_alloc_tree (length) ggc_set_mark (p)
int length; void *p;
{ {
struct ggc_tree *n; struct ggc_mem *x;
int size = sizeof(*n) - sizeof(n->tree) + length;
n = (struct ggc_tree *) xcalloc (1, size);
n->chain = ggc_chain->trees;
ggc_chain->trees = n;
#ifdef GGC_DUMP x = (struct ggc_mem *) ((char *)p - offsetof (struct ggc_mem, u));
fprintf(dump, "alloc tree %p\n", &n->tree); #ifdef GGC_ALWAYS_VERIFY
if (! tree_lookup (x))
abort ();
#endif #endif
ggc_chain->bytes_alloced_since_gc += size; if (x->mark)
return 1;
return &n->tree;
}
char *
ggc_alloc_string (contents, length)
const char *contents;
int length;
{
struct ggc_string *s;
int size;
if (length < 0)
{
if (contents == NULL)
return NULL;
length = strlen (contents);
}
size = (s->string - (char *)s) + length + 1;
s = (struct ggc_string *) xmalloc (size);
s->chain = ggc_chain->strings;
s->magic_mark = GGC_STRING_MAGIC;
ggc_chain->strings = s;
if (contents)
memcpy (s->string, contents, length);
s->string[length] = 0;
#ifdef GGC_DUMP
fprintf(dump, "alloc string %p\n", &s->string);
#endif
ggc_chain->bytes_alloced_since_gc += size; x->mark = 1;
G.allocated += x->size;
G.objects += 1;
return s->string; return 0;
} }
/* Like xmalloc, but allocates GC-able memory. */ void
ggc_mark_if_gcable (p)
void * void *p;
ggc_alloc (bytes)
size_t bytes;
{ {
struct ggc_any *a; struct ggc_mem *x;
if (bytes == 0) if (p == NULL)
bytes = 1; return;
bytes += (&((struct ggc_any *) 0)->u.c - (char *) 0);
a = (struct ggc_any *) xmalloc (bytes); x = (struct ggc_mem *) ((char *)p - offsetof (struct ggc_mem, u));
a->chain = ggc_chain->anys; if (! tree_lookup (x))
a->magic_mark = GGC_ANY_MAGIC; return;
ggc_chain->anys = a;
ggc_chain->bytes_alloced_since_gc += bytes; if (x->mark)
return;
return &a->u; x->mark = 1;
G.allocated += x->size;
G.objects += 1;
} }
/* Freeing a bit of rtl is as simple as calling free. */ static void
clear_marks (x)
static inline void struct ggc_mem *x;
ggc_free_rtx (r)
struct ggc_rtx *r;
{ {
#ifdef GGC_DUMP x->mark = 0;
fprintf (dump, "collect rtx %p\n", &r->rtx); if (x->sub[0])
#endif clear_marks (x->sub[0]);
#ifdef GGC_POISON if (x->sub[1])
memset (r, 0xAA, sizeof(*r) + ((GET_RTX_LENGTH (r->rtx.code) -1) clear_marks (x->sub[1]);
* sizeof(rtunion)));
#endif
free (r);
} }
/* Freeing an rtvec is as simple as calling free. */ static void
sweep_objs (root)
static inline void struct ggc_mem **root;
ggc_free_rtvec (v)
struct ggc_rtvec *v;
{ {
#ifdef GGC_DUMP struct ggc_mem *x = *root;
fprintf(dump, "collect vec %p\n", &v->vec); if (!x)
#endif return;
#ifdef GGC_POISON
memset (v, 0xBB, sizeof (*v) + ((GET_NUM_ELEM (&v->vec) - 1)
* sizeof (rtx)));
#endif
free (v); sweep_objs (&x->sub[0]);
} sweep_objs (&x->sub[1]);
/* Freeing a tree node is almost, but not quite, as simple as calling free. if (! x->mark && x->context >= G.context)
Mostly we need to let the language clean up its lang_specific bits. */ {
struct ggc_mem *l, *r;
l = x->sub[0];
r = x->sub[1];
if (!l)
*root = r;
else if (!r)
*root = l;
else if (!l->sub[1])
{
*root = l;
l->sub[1] = r;
}
else if (!r->sub[0])
{
*root = r;
r->sub[0] = l;
}
else
{
*root = l;
do {
root = &l->sub[1];
} while ((l = *root) != NULL);
*root = r;
}
static inline void
ggc_free_tree (t)
struct ggc_tree *t;
{
#ifdef GGC_DUMP
fprintf (dump, "collect tree %p\n", &t->tree);
#endif
#ifdef GGC_POISON #ifdef GGC_POISON
memset(&t->tree.common, 0xCC, sizeof(t->tree.common)); memset (&x->u, 0xA5, x->size);
#endif #endif
free (t); free (x);
}
} }
/* Freeing a string is as simple as calling free. */ /* The top level mark-and-sweep routine. */
static inline void void
ggc_free_string (s) ggc_collect ()
struct ggc_string *s;
{ {
#ifdef GGC_DUMP int time;
fprintf(dump, "collect string %p\n", s->string);
#endif
#ifdef GGC_POISON
s->magic_mark = 0xDDDDDDDD;
s->string[0] = 0xDD;
#endif
free (s);
}
/* Freeing anonymous memory is as simple as calling free. */
static inline void #ifndef GGC_ALWAYS_COLLECT
ggc_free_any (a) if (G.allocated < GGC_MIN_EXPAND_FOR_GC * G.allocated_last_gc)
struct ggc_any *a; return;
{
#ifdef GGC_DUMP
fprintf(dump, "collect mem %p\n", &a->u);
#endif
#ifdef GGC_POISON
a->magic_mark = 0xEEEEEEEE;
#endif #endif
free (a); #ifdef GGC_BALANCE
} debug_ggc_balance ();
#endif
/* Mark a node. */ time = get_run_time ();
if (!quiet_flag)
fprintf (stderr, " {GC %luk -> ", (unsigned long)G.allocated / 1024);
int G.allocated = 0;
ggc_set_mark_rtx (r) G.objects = 0;
rtx r;
{
int marked = r->gc_mark;
if (! marked)
r->gc_mark = 1;
return marked;
}
int clear_marks (G.root);
ggc_set_mark_rtvec (v) ggc_mark_roots ();
rtvec v; sweep_objs (&G.root);
{
int marked = v->gc_mark;
if (! marked)
v->gc_mark = 1;
return marked;
}
int G.allocated_last_gc = G.allocated;
ggc_set_mark_tree (t) if (G.allocated_last_gc < GGC_MIN_LAST_ALLOCATED)
tree t; G.allocated_last_gc = GGC_MIN_LAST_ALLOCATED;
{
int marked = t->common.gc_mark;
if (! marked)
t->common.gc_mark = 1;
return marked;
}
/* Compare the pointers pointed to by A1 and A2. Used as a callback time = get_run_time () - time;
for qsort/bsearch. */ gc_time += time;
static int if (!quiet_flag)
ggc_compare_addresses (a1, a2) {
const void *a1; fprintf (stderr, "%luk in %.3f}",
const void *a2; (unsigned long) G.allocated / 1024, time * 1e-6);
{ }
const char *c1 = *((const char **) a1);
const char *c2 = *((const char **) a2);
if (c1 < c2) #ifdef GGC_BALANCE
return -1; debug_ggc_balance ();
else if (c1 > c2) #endif
return 1;
else
return 0;
} }
/* Called once to initialize the garbage collector. */
void void
ggc_mark_string (s) init_ggc ()
char *s;
{ {
const ptrdiff_t d = (((struct ggc_string *) 0)->string - (char *) 0); G.allocated_last_gc = GGC_MIN_LAST_ALLOCATED;
struct ggc_string *gs;
if (s == NULL) empty_string = ggc_alloc_string ("", 0);
return; ggc_add_string_root (&empty_string, 1);
gs = (struct ggc_string *)(s - d);
if (IGNORE_MARK (gs->magic_mark) != GGC_STRING_MAGIC)
return; /* abort? */
gs->magic_mark = GGC_STRING_MAGIC_MARK;
} }
/* Start a new GGC context. Memory allocated in previous contexts
will not be collected while the new context is active. */
void void
ggc_mark_string_if_gcable (s) ggc_push_context ()
char *s;
{ {
if (s && !bsearch (&s, G.context++;
&VARRAY_CHAR_PTR (ggc_allocated_strings, 0),
ggc_strings_used, sizeof (char *),
ggc_compare_addresses))
return;
ggc_mark_string (s); /* We only allocated 7 bits in the node for the context. This
should be more than enough. */
if (G.context >= 128)
abort ();
} }
/* Finish a GC context. Any uncollected memory in the new context
/* Mark P, allocated with ggc_alloc. */ will be merged with the old context. */
void void
ggc_mark (p) ggc_pop_context ()
void *p;
{ {
const ptrdiff_t d = (&((struct ggc_any *) 0)->u.c - (char *) 0); G.context--;
struct ggc_any *a; if (G.root)
ggc_pop_context_1 (G.root, G.context);
if (p == NULL) }
return;
a = (struct ggc_any *) (((char*) p) - d); static void
if (IGNORE_MARK (a->magic_mark) != GGC_ANY_MAGIC) ggc_pop_context_1 (x, c)
abort (); struct ggc_mem *x;
a->magic_mark = GGC_ANY_MAGIC_MARK; int c;
{
if (x->context > c)
x->context = c;
if (x->sub[0])
ggc_pop_context_1 (x->sub[0], c);
if (x->sub[1])
ggc_pop_context_1 (x->sub[1], c);
} }
/* The top level mark-and-sweep routine. */ /* Dump a tree. */
void void
ggc_collect () debug_ggc_tree (p, indent)
struct ggc_mem *p;
int indent;
{ {
struct ggc_rtx *r, **rp; int i;
struct ggc_rtvec *v, **vp;
struct ggc_tree *t, **tp;
struct ggc_string *s, **sp;
struct ggc_status *gs;
struct ggc_any *a, **ap;
int time, n_rtxs, n_trees, n_vecs, n_strings, n_anys;
#if !defined(ENABLE_CHECKING)
/* See if it's even worth our while. */
if (ggc_chain->bytes_alloced_since_gc < 4*1024*1024)
return;
#endif
if (!quiet_flag)
fputs (" {GC ", stderr);
time = get_run_time ();
/* Set up the table of allocated strings. */ if (!p)
VARRAY_CHAR_PTR_INIT (ggc_allocated_strings, 1024, "allocated strings");
ggc_strings_used = 0;
/* Clean out all of the GC marks. */
for (gs = ggc_chain; gs; gs = gs->next)
{
for (r = gs->rtxs; r != NULL; r = r->chain)
r->rtx.gc_mark = 0;
for (v = gs->vecs; v != NULL; v = v->chain)
v->vec.gc_mark = 0;
for (t = gs->trees; t != NULL; t = t->chain)
t->tree.common.gc_mark = 0;
for (s = gs->strings; s != NULL; s = s->chain)
{ {
s->magic_mark = GGC_STRING_MAGIC; fputs ("(nil)\n", stderr);
if (ggc_strings_used == ggc_allocated_strings->num_elements) return;
VARRAY_GROW (ggc_allocated_strings, 2 * ggc_strings_used);
VARRAY_CHAR_PTR (ggc_allocated_strings, ggc_strings_used)
= &s->string[0];
++ggc_strings_used;
}
for (a = gs->anys; a != NULL; a = a->chain)
a->magic_mark = GGC_ANY_MAGIC;
} }
/* Sort the allocated string table. */ if (p->sub[0])
qsort (&VARRAY_CHAR_PTR (ggc_allocated_strings, 0), debug_ggc_tree (p->sub[0], indent + 1);
ggc_strings_used, sizeof (char *),
ggc_compare_addresses);
ggc_mark_roots ();
/* Free the string table. */
VARRAY_FREE (ggc_allocated_strings);
/* Sweep the resulting dead nodes. */ for (i = 0; i < indent; ++i)
putc (' ', stderr);
fprintf (stderr, "%lx %p\n", PTR_KEY (p), p);
/* The RTXs. */ if (p->sub[1])
debug_ggc_tree (p->sub[1], indent + 1);
rp = &ggc_chain->rtxs; }
r = ggc_chain->rtxs;
n_rtxs = 0;
while (r != NULL)
{
struct ggc_rtx *chain = r->chain;
if (!r->rtx.gc_mark)
{
ggc_free_rtx (r);
*rp = chain;
n_rtxs++;
}
else
rp = &r->chain;
r = chain;
}
*rp = NULL;
n_rtxs_collected += n_rtxs;
/* The vectors. */
vp = &ggc_chain->vecs; #ifdef GGC_BALANCE
v = ggc_chain->vecs; /* Collect tree balance metrics */
n_vecs = 0;
while (v != NULL)
{
struct ggc_rtvec *chain = v->chain;
if (!v->vec.gc_mark)
{
ggc_free_rtvec (v);
*vp = chain;
n_vecs++;
}
else
vp = &v->chain;
v = chain;
}
*vp = NULL;
n_vecs_collected += n_vecs;
/* The trees. */ #include <math.h>
tp = &ggc_chain->trees; void
t = ggc_chain->trees; debug_ggc_balance ()
n_trees = 0; {
while (t != NULL) size_t nleaf, sumdepth;
{
struct ggc_tree *chain = t->chain;
if (!t->tree.common.gc_mark)
{
ggc_free_tree (t);
*tp = chain;
n_trees++;
}
else
tp = &t->chain;
t = chain;
}
*tp = NULL;
n_trees_collected += n_trees;
/* The strings. */
sp = &ggc_chain->strings; nleaf = sumdepth = 0;
s = ggc_chain->strings; tally_leaves (G.root, 0, &nleaf, &sumdepth);
n_strings = 0;
while (s != NULL)
{
struct ggc_string *chain = s->chain;
if (! IS_MARKED (s->magic_mark))
{
ggc_free_string (s);
*sp = chain;
n_strings++;
}
else
sp = &s->chain;
s = chain;
}
*sp = NULL;
n_strings_collected += n_strings;
/* The generic data. */ fprintf (stderr, " {B %.2f,%.1f,%.1f}",
/* In a balanced tree, leaf/node should approach 1/2. */
(float)nleaf / (float)G.objects,
/* In a balanced tree, average leaf depth should approach lg(n). */
(float)sumdepth / (float)nleaf,
log ((double) G.objects) / M_LN2);
}
ap = &ggc_chain->anys; static void
a = ggc_chain->anys; tally_leaves (x, depth, nleaf, sumdepth)
n_anys = 0; struct ggc_mem *x;
while (a != NULL) int depth;
{ size_t *nleaf;
struct ggc_any *chain = a->chain; size_t *sumdepth;
if (! IS_MARKED (a->magic_mark)) {
if (! x->sub[0] && !x->sub[1])
{ {
ggc_free_any (a); *nleaf += 1;
*ap = chain; *sumdepth += depth;
n_anys++;
} }
else else
ap = &a->chain;
a = chain;
}
n_anys_collected += n_anys;
ggc_chain->bytes_alloced_since_gc = 0;
time = get_run_time () - time;
gc_time += time;
if (!quiet_flag)
{
time = (time + 500) / 1000;
fprintf (stderr, "%dr,%dv,%dt,%ds,%da %d.%03d}", n_rtxs, n_vecs,
n_trees, n_strings, n_anys, time / 1000, time % 1000);
}
}
#if 0
/* GDB really should have a memory search function. Since this is just
for initial debugging, I won't even pretend to get the __data_start
to work on any but alpha-dec-linux-gnu. */
static void **
search_data(void **start, void *target)
{
extern void *__data_start[];
void **_end = (void **)sbrk(0);
if (start == NULL)
start = __data_start;
while (start < _end)
{ {
if (*start == target) if (x->sub[0])
return start; tally_leaves (x->sub[0], depth + 1, nleaf, sumdepth);
start++; if (x->sub[1])
tally_leaves (x->sub[1], depth + 1, nleaf, sumdepth);
} }
return NULL;
} }
#endif #endif
...@@ -56,34 +56,52 @@ void ggc_del_root PROTO ((void *base)); ...@@ -56,34 +56,52 @@ void ggc_del_root PROTO ((void *base));
/* Mark nodes from the gc_add_root callback. These functions follow /* Mark nodes from the gc_add_root callback. These functions follow
pointers to mark other objects too. */ pointers to mark other objects too. */
extern void ggc_mark_rtvec PROTO ((struct rtvec_def *));
extern void ggc_mark_tree_varray PROTO ((struct varray_head_tag *)); extern void ggc_mark_tree_varray PROTO ((struct varray_head_tag *));
extern void ggc_mark_tree_hash_table PROTO ((struct hash_table *)); extern void ggc_mark_tree_hash_table PROTO ((struct hash_table *));
extern void ggc_mark_string PROTO ((char *));
extern void ggc_mark PROTO ((void *));
extern void ggc_mark_roots PROTO((void)); extern void ggc_mark_roots PROTO((void));
extern void ggc_mark_rtx_children PROTO ((struct rtx_def *)); extern void ggc_mark_rtx_children PROTO ((struct rtx_def *));
extern void ggc_mark_rtvec_children PROTO ((struct rtvec_def *));
extern void ggc_mark_tree_children PROTO ((union tree_node *)); extern void ggc_mark_tree_children PROTO ((union tree_node *));
/* Mark the string, but only if it was allocated in collectable #define ggc_mark_rtx(EXPR) \
memory. */
extern void ggc_mark_string_if_gcable PROTO ((char *));
#define ggc_mark_rtx(RTX_EXPR) \
do { \ do { \
rtx r__ = (RTX_EXPR); \ rtx r__ = (EXPR); \
if (r__ != NULL && ! ggc_set_mark_rtx (r__)) \ if (r__ != NULL && ! ggc_set_mark (r__)) \
ggc_mark_rtx_children (r__); \ ggc_mark_rtx_children (r__); \
} while (0) } while (0)
#define ggc_mark_tree(TREE_EXPR) \ #define ggc_mark_tree(EXPR) \
do { \ do { \
tree t__ = (TREE_EXPR); \ tree t__ = (EXPR); \
if (t__ != NULL && ! ggc_set_mark_tree (t__)) \ if (t__ != NULL && ! ggc_set_mark (t__)) \
ggc_mark_tree_children (t__); \ ggc_mark_tree_children (t__); \
} while (0) } while (0)
#define ggc_mark_rtvec(EXPR) \
do { \
rtvec v__ = (EXPR); \
if (v__ != NULL && ! ggc_set_mark (v__)) \
ggc_mark_rtvec_children (v__); \
} while (0)
#define ggc_mark_string(EXPR) \
do { \
char *s__ = (EXPR); \
if (s__ != NULL) \
ggc_set_mark (s__); \
} while (0)
#define ggc_mark(EXPR) \
do { \
void *a__ = (EXPR); \
if (a__ != NULL) \
ggc_set_mark (a__); \
} while (0)
/* Mark, but only if it was allocated in collectable memory. */
extern void ggc_mark_if_gcable PROTO ((void *));
/* A GC implementation must provide these functions. */ /* A GC implementation must provide these functions. */
/* Initialize the garbage collector. */ /* Initialize the garbage collector. */
...@@ -98,24 +116,35 @@ extern void ggc_push_context PROTO ((void)); ...@@ -98,24 +116,35 @@ extern void ggc_push_context PROTO ((void));
extern void ggc_pop_context PROTO ((void)); extern void ggc_pop_context PROTO ((void));
/* Allocation. */ /* Allocation. */
struct rtx_def *ggc_alloc_rtx PROTO ((int nslots));
struct rtvec_def *ggc_alloc_rtvec PROTO ((int nelt)); /* The internal primitive. */
union tree_node *ggc_alloc_tree PROTO ((int length)); void *ggc_alloc_obj PROTO ((size_t, int));
#define ggc_alloc_rtx(NSLOTS) \
((struct rtx_def *) ggc_alloc_obj (sizeof (struct rtx_def) \
+ ((NSLOTS) - 1) * sizeof (rtunion), 1))
#define ggc_alloc_rtvec(NELT) \
((struct rtvec_def *) ggc_alloc_obj (sizeof (struct rtvec_def) \
+ ((NELT) - 1) * sizeof (rtx), 1))
#define ggc_alloc_tree(LENGTH) \
((union tree_node *) ggc_alloc_obj ((LENGTH), 1))
#define ggc_alloc(SIZE) ggc_alloc_obj((SIZE), 0)
char *ggc_alloc_string PROTO ((const char *contents, int length)); char *ggc_alloc_string PROTO ((const char *contents, int length));
void *ggc_alloc PROTO ((size_t));
/* Invoke the collector. This is really just a hint, but in the case of /* Invoke the collector. This is really just a hint, but in the case of
the simple collector, the only time it will happen. */ the simple collector, the only time it will happen. */
void ggc_collect PROTO ((void)); void ggc_collect PROTO ((void));
/* Actually set the mark on a particular region of memory, but don't /* Actually set the mark on a particular region of memory, but don't
follow pointers. These functions are called by ggc_mark_*. They follow pointers. This function is called by ggc_mark_*. It
return zero if the object was not previously marked; they return returns zero if the object was not previously marked; non-zero if
non-zero if the object was already marked, or if, for any other the object was already marked, or if, for any other reason,
reason, pointers in this data structure should not be traversed. */ pointers in this data structure should not be traversed. */
int ggc_set_mark_rtx PROTO ((struct rtx_def *)); int ggc_set_mark PROTO ((void *));
int ggc_set_mark_rtvec PROTO ((struct rtvec_def *));
int ggc_set_mark_tree PROTO ((union tree_node *));
/* Callbacks to the languages. */ /* Callbacks to the languages. */
......
...@@ -102,18 +102,15 @@ typedef struct rtx_def ...@@ -102,18 +102,15 @@ typedef struct rtx_def
{ {
#ifdef ONLY_INT_FIELDS #ifdef ONLY_INT_FIELDS
#ifdef CODE_FIELD_BUG #ifdef CODE_FIELD_BUG
unsigned int code : 15; unsigned int code : 16;
#else #else
unsigned short code; unsigned short code;
#endif #endif
#else #else
/* The kind of expression this is. */ /* The kind of expression this is. */
enum rtx_code code : 15; enum rtx_code code : 16;
#endif #endif
/* Used by the garbage collector. */
unsigned gc_mark : 1;
/* The kind of value the expression has. */ /* The kind of value the expression has. */
#ifdef ONLY_INT_FIELDS #ifdef ONLY_INT_FIELDS
int mode : 8; int mode : 8;
...@@ -207,7 +204,6 @@ typedef struct rtx_def ...@@ -207,7 +204,6 @@ typedef struct rtx_def
typedef struct rtvec_def{ typedef struct rtvec_def{
int num_elem; /* number of elements */ int num_elem; /* number of elements */
int gc_mark;
struct rtx_def *elem[1]; struct rtx_def *elem[1];
} *rtvec; } *rtvec;
......
...@@ -203,9 +203,7 @@ struct tree_common ...@@ -203,9 +203,7 @@ struct tree_common
unsigned lang_flag_5 : 1; unsigned lang_flag_5 : 1;
unsigned lang_flag_6 : 1; unsigned lang_flag_6 : 1;
unsigned gc_mark : 1; /* There is room for three more flags. */
/* There is room for two more flags. */
}; };
/* The following table lists the uses of each of the above flags and /* The following table lists the uses of each of the above flags and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment