From 7636d567433a0cc3ecbf07ff3c953f7d5b6088e4 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 5 Nov 1997 00:30:37 +0000 Subject: [PATCH] Fix irix5 build problem resulting from FSF merge. * acconfig.h (HAVE_INTTYPES_H): Undef. * configure.in (inttypes.h): Check for conflicts between sys/types.h and inttypes.h, and verify that intmax_t is defined. * config/mips/x-iris (CC, OPT, OLDCC): Comment out. * config/mips/x-iris3: Likewise. From-SVN: r16325 --- gcc/ChangeLog | 8 +++ gcc/acconfig.h | 3 + gcc/config.in | 6 +- gcc/config/mips/x-iris | 8 ++- gcc/config/mips/x-iris3 | 8 ++- gcc/configure | 158 +++++++++++++++++++++++++++++------------------- gcc/configure.in | 15 ++++- 7 files changed, 133 insertions(+), 73 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1ed0dd..3a1c4d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Tue Nov 4 12:30:28 1997 Jim Wilson + + * acconfig.h (HAVE_INTTYPES_H): Undef. + * configure.in (inttypes.h): Check for conflicts between sys/types.h + and inttypes.h, and verify that intmax_t is defined. + * config/mips/x-iris (CC, OPT, OLDCC): Comment out. + * config/mips/x-iris3: Likewise. + Tue Nov 4 16:07:15 1997 Jeffrey A Law (law@cygnus.com) * alias.c (find_base_value): When copying arguments, return the diff --git a/gcc/acconfig.h b/gcc/acconfig.h index 5240ab8..bd2acd9 100644 --- a/gcc/acconfig.h +++ b/gcc/acconfig.h @@ -1,3 +1,6 @@ +/* Define if you have a working header file. */ +#undef HAVE_INTTYPES_H + /* Whether malloc must be declared even if is included. */ #undef NEED_DECLARATION_MALLOC diff --git a/gcc/config.in b/gcc/config.in index f7abfb93..1244b76 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1,4 +1,7 @@ /* config.in. Generated automatically from configure.in by autoheader. */ +/* Define if you have a working header file. */ +#undef HAVE_INTTYPES_H + /* Whether malloc must be declared even if is included. */ #undef NEED_DECLARATION_MALLOC @@ -23,9 +26,6 @@ /* Define if you have the strtoul function. */ #undef HAVE_STRTOUL -/* Define if you have the header file. */ -#undef HAVE_INTTYPES_H - /* Define if you have the header file. */ #undef HAVE_LIMITS_H diff --git a/gcc/config/mips/x-iris b/gcc/config/mips/x-iris index 3d49e4c..0f04f09 100644 --- a/gcc/config/mips/x-iris +++ b/gcc/config/mips/x-iris @@ -9,9 +9,11 @@ # can use -O2. Down with fixed size tables! # The -cckr is to turn off strict ANSI checking. -CC = $(OLDCC) -OPT = -O1 -OLDCC = cc -Wf,-XNh2000,-XNg1500 -Olimit 3000 -cckr $(OPT) +# These definitions are commented out because they cause trouble with +# autoconf. It is believed that they aren't needed anymore. +#CC = $(OLDCC) +#OPT = -O1 +#OLDCC = cc -Wf,-XNh2000,-XNg1500 -Olimit 3000 -cckr $(OPT) # The bison output files are machine-indep, # so different flags for a particular machine are not useful. diff --git a/gcc/config/mips/x-iris3 b/gcc/config/mips/x-iris3 index d4b55dd..2743ab7 100644 --- a/gcc/config/mips/x-iris3 +++ b/gcc/config/mips/x-iris3 @@ -12,9 +12,11 @@ # the -cckr option, so, lets try without it for all versions of Irix 3.x. # The -cckr is to turn off strict ANSI checking. -CC = $(OLDCC) -OPT = -O1 -OLDCC = cc -Wf,-XNh2000,-XNg1500 -Olimit 3000 $(OPT) +# These definitions are commented out because they cause trouble with +# autoconf. It is believed that they aren't needed anymore. +#CC = $(OLDCC) +#OPT = -O1 +#OLDCC = cc -Wf,-XNh2000,-XNg1500 -Olimit 3000 $(OPT) # The bison output files are machine-indep, # so different flags for a particular machine are not useful. diff --git a/gcc/configure b/gcc/configure index 639d864..f28b760 100755 --- a/gcc/configure +++ b/gcc/configure @@ -67,7 +67,6 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -709,7 +708,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:713: checking host system type" >&5 +echo "configure:712: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -730,7 +729,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:734: checking target system type" >&5 +echo "configure:733: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -748,7 +747,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:752: checking build system type" >&5 +echo "configure:751: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -775,7 +774,7 @@ test "$host_alias" != "$target_alias" && # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:779: checking for $ac_word" >&5 +echo "configure:778: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -804,7 +803,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:808: checking for $ac_word" >&5 +echo "configure:807: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -852,7 +851,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:855: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -862,11 +861,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -886,12 +885,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; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:889: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:895: checking whether we are using GNU C" >&5 +echo "configure:894: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -900,7 +899,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$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:903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -915,7 +914,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:919: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:918: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -943,7 +942,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:947: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:946: checking whether ${MAKE-make} sets \${MAKE}" >&5 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -976,7 +975,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:980: checking for $ac_word" >&5 +echo "configure:979: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1007,7 +1006,7 @@ done # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1011: checking for $ac_word" >&5 +echo "configure:1010: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1040,7 +1039,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1044: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1043: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1048,7 +1047,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1082,7 +1081,7 @@ fi fi echo $ac_n "checking whether ln works""... $ac_c" 1>&6 -echo "configure:1086: checking whether ln works" >&5 +echo "configure:1085: checking whether ln works" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1114,7 +1113,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1118: checking whether ln -s works" >&5 +echo "configure:1117: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1148,7 +1147,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1152: checking for $ac_word" >&5 +echo "configure:1151: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1179,7 +1178,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1183: checking for $ac_word" >&5 +echo "configure:1182: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1219,7 +1218,7 @@ test -n "$YACC" || YACC="yacc" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./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 "configure:1223: checking for a BSD compatible install" >&5 +echo "configure:1222: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1273,7 +1272,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1277: checking for $ac_word" >&5 +echo "configure:1276: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1302,7 +1301,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1306: checking for $ac_word" >&5 +echo "configure:1305: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1350,7 +1349,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1354: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1360,11 +1359,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1384,12 +1383,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; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1388: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1387: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1393: checking whether we are using GNU C" >&5 +echo "configure:1392: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1398,7 +1397,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1402: \"$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:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1413,7 +1412,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1417: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1416: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1441,7 +1440,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1445: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1444: checking whether ${MAKE-make} sets \${MAKE}" >&5 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -1469,7 +1468,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1473: checking how to run the C preprocessor" >&5 +echo "configure:1472: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1484,13 +1483,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1501,13 +1500,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1529,21 +1528,21 @@ else fi echo "$ac_t""$CPP" 1>&6 -for ac_hdr in inttypes.h limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h +for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1537: checking for $ac_hdr" >&5 +echo "configure:1536: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1570,13 +1569,47 @@ fi done +# Use only if it exists, +# doesn't clash with , and declares intmax_t. +echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 +echo "configure:1576: checking for inttypes.h" >&5 +if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +intmax_t i = -1; +; return 0; } +EOF +if { (eval echo configure:1589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cat >> confdefs.h <&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gcc_cv_header_inttypes_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 + echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:1575: checking whether malloc must be declared" >&5 +echo "configure:1608: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'gcc_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1597,7 +1630,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:1601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_decl_needed_malloc=no else @@ -1619,12 +1652,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:1623: checking whether realloc must be declared" >&5 +echo "configure:1656: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'gcc_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1645,7 +1678,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_decl_needed_realloc=no else @@ -1667,12 +1700,12 @@ EOF fi echo $ac_n "checking whether calloc must be declared""... $ac_c" 1>&6 -echo "configure:1671: checking whether calloc must be declared" >&5 +echo "configure:1704: checking whether calloc must be declared" >&5 if eval "test \"`echo '$''{'gcc_cv_decl_needed_calloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1693,7 +1726,7 @@ int main() { char *(*pfn) = (char *(*)) calloc ; return 0; } EOF -if { (eval echo configure:1697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_decl_needed_calloc=no else @@ -1715,12 +1748,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:1719: checking whether free must be declared" >&5 +echo "configure:1752: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'gcc_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1741,7 +1774,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gcc_cv_decl_needed_free=no else @@ -1764,12 +1797,12 @@ fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:1768: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:1801: checking for sys_siglist declaration in signal.h or unistd.h" >&5 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1781,7 +1814,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -1805,12 +1838,12 @@ fi for ac_func in strerror strtoul bsearch do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1809: checking for $ac_func" >&5 +echo "configure:1842: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4901,7 +4934,7 @@ EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1 | grep ac_space` in + case `(ac_space=' '; set) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -4987,7 +5020,6 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub -s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g diff --git a/gcc/configure.in b/gcc/configure.in index ca35146..143b005 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -137,7 +137,20 @@ EGCS_PROG_INSTALL AC_PROG_CC AC_PROG_MAKE_SET -AC_CHECK_HEADERS(inttypes.h limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h) +AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h) + +# Use only if it exists, +# doesn't clash with , and declares intmax_t. +AC_MSG_CHECKING(for inttypes.h) +AC_CACHE_VAL(gcc_cv_header_inttypes_h, +[AC_TRY_COMPILE( + [#include +#include ], + [intmax_t i = -1;], + [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H) + gcc_cv_header_inttypes_h=yes], + gcc_cv_header_inttypes_h=no)]) +AC_MSG_RESULT($gcc_cv_header_inttypes_h) GCC_NEED_DECLARATION(malloc) GCC_NEED_DECLARATION(realloc) -- 2.7.4