X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fconfigure;h=dd5ea43a9866dee4cc8d414d141893809a4b54ad;hb=c462020561f289be6da6126c5d47cbe063fbd1f5;hp=69d979290d2a2b432ab23c7f85ee5bcd845355ee;hpb=8b93c6380e299446e645ece29bf77d26f5713529;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/configure b/gdb/configure index 69d979290d..dd5ea43a98 100755 --- a/gdb/configure +++ b/gdb/configure @@ -11,12 +11,21 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: +ac_help="$ac_help + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer" ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" ac_help="$ac_help --enable-multi-ice Build the multi-ice-gdb-server" +ac_help="$ac_help + --enable-gdbcli Enable GDB-CLI interface" +ac_help="$ac_help + --enable-gdbmi Enable GDB-MI interface" +ac_help="$ac_help + --with-uiout Use new uiout functions instead of *printf's" ac_help="$ac_help --enable-tui Enable full-screen terminal user interface" ac_help="$ac_help @@ -24,11 +33,11 @@ ac_help="$ac_help ac_help="$ac_help --enable-build-warnings Enable build-time compiler warnings if gcc is used" ac_help="$ac_help - --with-mmalloc Use memory mapped malloc package" + --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used" ac_help="$ac_help - --enable-carp Configure alternative readaptive paradigm " + --with-mmalloc Use memory mapped malloc package" ac_help="$ac_help - --enable-targets Alternative target configurations" + --with-included-regex Use included regex" ac_help="$ac_help --with-cpu=CPU Set the default CPU variant to debug" ac_help="$ac_help @@ -49,10 +58,6 @@ ac_help="$ac_help --with-tixconfig Directory containing tix configuration (tixConfig.sh)" ac_help="$ac_help --with-x use the X Window System" -ac_help="$ac_help - --with-sim-gpu2=DIR Use GPU2 library under given DIR" -ac_help="$ac_help - --with-sim-funit=DIR Use target FP lib under given DIR" ac_help="$ac_help --enable-sim Link gdb with simulator" ac_help="$ac_help @@ -579,11 +584,34 @@ fi +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + MAINT=$MAINTAINER_MODE_TRUE + + # 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:587: checking for $ac_word" >&5 +echo "configure:615: 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 @@ -613,7 +641,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:617: checking for $ac_word" >&5 +echo "configure:645: 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 @@ -664,7 +692,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:668: checking for $ac_word" >&5 +echo "configure:696: 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 @@ -696,7 +724,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:728: 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. @@ -707,12 +735,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 711 "configure" +#line 739 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -738,12 +766,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:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:770: 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:747: checking whether we are using GNU C" >&5 +echo "configure:775: 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 @@ -752,7 +780,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:756: \"$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:784: \"$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 @@ -771,7 +799,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:775: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:803: 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 @@ -803,7 +831,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:807: checking how to run the C preprocessor" >&5 +echo "configure:835: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -818,13 +846,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:828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -835,13 +863,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:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -852,13 +880,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -883,9 +911,9 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:887: checking for AIX" >&5 +echo "configure:915: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:911: checking for POSIXized ISC" >&5 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 + + echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 +echo "configure:940: checking for strerror in -lcposix" >&5 +ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lcposix" else echo "$ac_t""no" 1>&6 - ISC= fi + + echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:935: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:985: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -947,7 +997,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__ do CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < #include @@ -984,7 +1034,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } EOF -if { (eval echo configure:988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -1055,7 +1105,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:1059: checking host system type" >&5 +echo "configure:1109: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1076,7 +1126,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:1080: checking target system type" >&5 +echo "configure:1130: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1094,7 +1144,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:1098: checking build system type" >&5 +echo "configure:1148: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1119,7 +1169,7 @@ test "$host_alias" != "$target_alias" && ALL_LINGUAS= echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1123: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1173: 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 @@ -1148,7 +1198,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:1202: 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 @@ -1176,12 +1226,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1180: checking for ANSI C header files" >&5 +echo "configure:1230: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1189,7 +1239,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1206,7 +1256,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1224,7 +1274,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1245,7 +1295,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1256,7 +1306,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1280,12 +1330,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1284: checking for working const" >&5 +echo "configure:1334: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1355,21 +1405,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1359: checking for inline" >&5 +echo "configure:1409: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1395,12 +1445,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1399: checking for off_t" >&5 +echo "configure:1449: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1428,12 +1478,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1432: checking for size_t" >&5 +echo "configure:1482: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1463,19 +1513,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1467: checking for working alloca.h" >&5 +echo "configure:1517: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1496,12 +1546,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1500: checking for alloca" >&5 +echo "configure:1550: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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${ac_exeext}; then +if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1561,12 +1611,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1565: checking whether alloca needs Cray hooks" >&5 +echo "configure:1615: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1595: checking for $ac_func" >&5 +echo "configure:1645: 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${ac_exeext}; then +if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1646,7 +1696,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1650: checking stack direction for C alloca" >&5 +echo "configure:1700: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1654,7 +1704,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -1698,17 +1748,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1702: checking for $ac_hdr" >&5 +echo "configure:1752: 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:1712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1737,12 +1787,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1741: checking for $ac_func" >&5 +echo "configure:1791: 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${ac_exeext}; then +if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1790,7 +1840,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:1794: checking for working mmap" >&5 +echo "configure:1844: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1798,7 +1848,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -1966,17 +2016,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1970: checking for $ac_hdr" >&5 +echo "configure:2020: 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:1980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2006,12 +2056,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2010: checking for $ac_func" >&5 +echo "configure:2060: 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${ac_exeext}; then +if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2063,12 +2113,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2067: checking for $ac_func" >&5 +echo "configure:2117: 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${ac_exeext}; then +if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2125,19 +2175,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2129: checking for LC_MESSAGES" >&5 +echo "configure:2179: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2158,7 +2208,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2162: checking whether NLS is requested" >&5 +echo "configure:2212: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -2178,7 +2228,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2182: checking whether included gettext is requested" >&5 +echo "configure:2232: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -2197,17 +2247,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2201: checking for libintl.h" >&5 +echo "configure:2251: checking for libintl.h" >&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:2211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2224,19 +2274,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:2228: checking for gettext in libc" >&5 +echo "configure:2278: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -2252,7 +2302,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:2256: checking for bindtextdomain in -lintl" >&5 +echo "configure:2306: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2260,7 +2310,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2287,19 +2337,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:2291: checking for gettext in libintl" >&5 +echo "configure:2341: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+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${ac_exeext}; then +if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -2327,7 +2377,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2331: checking for $ac_word" >&5 +echo "configure:2381: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2361,12 +2411,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2365: checking for $ac_func" >&5 +echo "configure:2415: 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${ac_exeext}; then +if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2416,7 +2466,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2420: checking for $ac_word" >&5 +echo "configure:2470: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2452,7 +2502,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2456: checking for $ac_word" >&5 +echo "configure:2506: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2484,7 +2534,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2524,7 +2574,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2528: checking for $ac_word" >&5 +echo "configure:2578: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2558,7 +2608,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2562: checking for $ac_word" >&5 +echo "configure:2612: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2594,7 +2644,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2598: checking for $ac_word" >&5 +echo "configure:2648: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2684,7 +2734,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:2688: checking for catalogs to be installed" >&5 +echo "configure:2738: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -2712,17 +2762,17 @@ echo "configure:2688: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:2716: checking for linux/version.h" >&5 +echo "configure:2766: checking for linux/version.h" >&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:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2767,7 +2817,7 @@ fi l= - if test -d $srcdir/po; then + if test -f $srcdir/po/POTFILES.in; then test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then @@ -2786,8 +2836,15 @@ fi CONFIG_OBS= +CONFIG_LIB_OBS= CONFIG_DEPS= CONFIG_SRCS= +CONFIG_INITS= +ENABLE_CFLAGS= +CONFIG_ALL= +CONFIG_CLEAN= +CONFIG_INSTALL= +CONFIG_UNINSTALL= configdirs="doc testsuite" @@ -2812,13 +2869,33 @@ fi . ${srcdir}/configure.tgt +targ=${target} ; . ${srcdir}/../bfd/config.bfd + + +targ=${target} +. ${srcdir}/../bfd/config.bfd + +targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'` + +if test x"${targ_archs}" != x ; then + cat >> confdefs.h <> confdefs.h <&6 -echo "configure:2822: checking for $ac_word" >&5 +echo "configure:2899: 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 @@ -2859,7 +2936,7 @@ done # 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:2863: checking for a BSD compatible install" >&5 +echo "configure:2940: 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 @@ -2920,7 +2997,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2924: checking for $ac_word" >&5 +echo "configure:3001: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2952,7 +3029,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2956: checking for $ac_word" >&5 +echo "configure:3033: 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 @@ -2984,7 +3061,7 @@ if test -n "$ac_tool_prefix"; then # 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:2988: checking for $ac_word" >&5 +echo "configure:3065: 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 @@ -3016,12 +3093,76 @@ else fi fi +# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3100: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" +fi +fi +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + +# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3132: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres" +fi +fi +WINDRES="$ac_cv_prog_WINDRES" +if test -n "$WINDRES"; then + echo "$ac_t""$WINDRES" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + for ac_prog in 'bison -y' byacc 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:3025: checking for $ac_word" >&5 +echo "configure:3166: 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 @@ -3052,6 +3193,39 @@ done test -n "$YACC" || YACC="yacc" +# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. +set dummy ${ac_tool_prefix}mig; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3200: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MIG"; then + ac_cv_prog_MIG="$MIG" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MIG="${ac_tool_prefix}mig" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig" +fi +fi +MIG="$ac_cv_prog_MIG" +if test -n "$MIG"; then + echo "$ac_t""$MIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + if test "$program_transform_name" = s,x,x,; then program_transform_name= else @@ -3073,12 +3247,12 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3077: checking return type of signal handlers" >&5 +echo "configure:3251: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3095,7 +3269,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3115,12 +3289,12 @@ EOF echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3119: checking for ANSI C header files" >&5 +echo "configure:3293: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3128,7 +3302,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3145,7 +3319,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3163,7 +3337,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3184,7 +3358,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3195,7 +3369,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3219,26 +3393,37 @@ EOF fi -for ac_hdr in ctype.h curses.h endian.h link.h thread_db.h proc_service.h \ + +case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) + cat >> confdefs.h <<\EOF +#define _MSE_INT_H 1 +EOF + +esac; esac + +for ac_hdr in ctype.h endian.h nlist.h link.h thread_db.h proc_service.h \ memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ term.h termio.h termios.h unistd.h wait.h sys/wait.h \ wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ - time.h sys/ioctl.h + time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \ + dirent.h sys/ndir.h sys/dir.h ndir.h \ + curses.h ncurses.h \ + poll.h sys/poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3232: checking for $ac_hdr" >&5 +echo "configure:3417: 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:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3265,12 +3450,12 @@ fi done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:3269: checking whether stat file-mode macros are broken" >&5 +echo "configure:3454: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3322,12 +3507,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3326: checking for working const" >&5 +echo "configure:3511: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3397,15 +3582,16 @@ EOF fi -for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask +for ac_func in bcopy btowc bzero isascii poll sbrk setpgid setpgrp \ + sigaction sigprocmask sigsetmask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3404: checking for $ac_func" >&5 +echo "configure:3590: 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${ac_exeext}; then +if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3455,19 +3641,19 @@ done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3459: checking for working alloca.h" >&5 +echo "configure:3645: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3488,12 +3674,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3492: checking for alloca" >&5 +echo "configure:3678: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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${ac_exeext}; then +if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3553,12 +3739,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3557: checking whether alloca needs Cray hooks" >&5 +echo "configure:3743: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3587: checking for $ac_func" >&5 +echo "configure:3773: 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${ac_exeext}; then +if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3638,7 +3824,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3642: checking stack direction for C alloca" >&5 +echo "configure:3828: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3646,7 +3832,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3686,1919 +3872,4181 @@ EOF fi - -echo $ac_n "checking for PTRACE_GETXFPREGS""... $ac_c" 1>&6 -echo "configure:3692: checking for PTRACE_GETXFPREGS" >&5 -if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getxfpregs'+set}'`\" = set"; then +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:3877: checking for pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -int main() { -PTRACE_GETXFPREGS; -; return 0; } +#include +#if STDC_HEADERS +#include +#include +#endif EOF -if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - gdb_cv_have_ptrace_getxfpregs=yes + ac_cv_type_pid_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* - gdb_cv_have_ptrace_getxfpregs=no + ac_cv_type_pid_t=no fi rm -f conftest* -fi -echo "$ac_t""$gdb_cv_have_ptrace_getxfpregs" 1>&6 -if test $gdb_cv_have_ptrace_getxfpregs = yes; then +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then cat >> confdefs.h <<\EOF -#define HAVE_PTRACE_GETXFPREGS 1 +#define pid_t int EOF fi -echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 -echo "configure:3725: checking for socketpair in -lsocket" >&5 -ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 +echo "configure:3911: checking for vfork.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:3744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_VFORK_H 1 EOF - LIBS="-lsocket $LIBS" - else echo "$ac_t""no" 1>&6 fi -for ac_func in socketpair -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3774: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo $ac_n "checking for working vfork""... $ac_c" 1>&6 +echo "configure:3946: checking for working vfork" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + echo $ac_n "checking for vfork""... $ac_c" 1>&6 +echo "configure:3952: checking for vfork" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char $ac_func(); +char vfork(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined (__stub_vfork) || defined (__stub___vfork) choke me #else -$ac_func(); +vfork(); #endif ; return 0; } EOF -if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "ac_cv_func_vfork=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "ac_cv_func_vfork=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi -done - - -echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:3829: checking whether malloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif +#include +#include #ifdef HAVE_UNISTD_H #include #endif -int main() { -char *(*pfn) = (char *(*)) malloc -; return 0; } +#ifdef HAVE_VFORK_H +#include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. + The compiler is told about this with #include , + but some compilers (e.g. gcc -O) don't grok . + Test for this by using a static variable whose address + is put into a register that is clobbered by the vfork. */ +static +#ifdef __cplusplus +sparc_address_test (int arg) +#else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} +main() { + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. + This test uses lots of local variables, at least + as many local variables as main has allocated so far + including compiler temporaries. 4 locals are enough for + gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. + A buggy compiler should reuse the register of parent + for one of the local variables, since it will think that + parent can't possibly be used any more in this routine. + Assigning to the local variable will thus munge parent + in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), + vfork doesn't separate parent from child file descriptors. + If the child closes a descriptor before it execs or exits, + this munges the parent's descriptor as well. + Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + exit( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} EOF -if { (eval echo configure:3855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - bfd_cv_decl_needed_malloc=no +if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_vfork_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - bfd_cv_decl_needed_malloc=yes + rm -fr conftest* + ac_cv_func_vfork_works=no fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 -if test $bfd_cv_decl_needed_malloc = yes; then +fi + +echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 +if test $ac_cv_func_vfork_works = no; then cat >> confdefs.h <<\EOF -#define NEED_DECLARATION_MALLOC 1 +#define vfork fork EOF fi -echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:3876: checking whether realloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then +if test "$cross_compiling" = no; then + echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 +echo "configure:4121: checking whether setpgrp takes no argument" >&5 +if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif #ifdef HAVE_UNISTD_H #include #endif -int main() { -char *(*pfn) = (char *(*)) realloc -; return 0; } + +/* + * If this system has a BSD-style setpgrp, which takes arguments, exit + * successfully. + */ +main() +{ + if (setpgrp(1,1) == -1) + exit(0); + else + exit(1); +} + EOF -if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - bfd_cv_decl_needed_realloc=no +if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_setpgrp_void=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - bfd_cv_decl_needed_realloc=yes + rm -fr conftest* + ac_cv_func_setpgrp_void=yes fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 -if test $bfd_cv_decl_needed_realloc = yes; then + +fi + +echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 +if test $ac_cv_func_setpgrp_void = yes; then cat >> confdefs.h <<\EOF -#define NEED_DECLARATION_REALLOC 1 +#define SETPGRP_VOID 1 EOF fi -echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:3923: checking whether free must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then +else + echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 +echo "configure:4174: checking whether setpgrp takes no argument" >&5 +if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H #include -#endif + int main() { -char *(*pfn) = (char *(*)) free + + if (setpgrp(1,1) == -1) + exit (0); + else + exit (1); + ; return 0; } EOF -if { (eval echo configure:3949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - bfd_cv_decl_needed_free=no + ac_cv_func_setpgrp_void=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_decl_needed_free=yes + ac_cv_func_setpgrp_void=yes fi rm -f conftest* fi -echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 -if test $bfd_cv_decl_needed_free = yes; then +echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 +if test $ac_cv_func_setpgrp_void = yes; then cat >> confdefs.h <<\EOF -#define NEED_DECLARATION_FREE 1 +#define SETPGRP_VOID 1 EOF +fi fi -echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 -echo "configure:3970: checking whether strerror must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then +# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do +# since sigsetjmp might only be defined as a macro. +echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 +echo "configure:4217: checking for sigsetjmp" >&5 +if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif +#include + int main() { -char *(*pfn) = (char *(*)) strerror +sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); ; return 0; } EOF -if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - bfd_cv_decl_needed_strerror=no + gdb_cv_func_sigsetjmp=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_decl_needed_strerror=yes + gdb_cv_func_sigsetjmp=no fi rm -f conftest* fi -echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 -if test $bfd_cv_decl_needed_strerror = yes; then +echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6 +if test $gdb_cv_func_sigsetjmp = yes; then cat >> confdefs.h <<\EOF -#define NEED_DECLARATION_STRERROR 1 +#define HAVE_SIGSETJMP 1 EOF fi -echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 -echo "configure:4017: checking whether strdup must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then +# See if supports the %fs and %gs i386 segment registers. +# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. +echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6 +echo "configure:4254: checking for r_fs in struct reg" >&5 +if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif +#include int main() { -char *(*pfn) = (char *(*)) strdup +struct reg r; r.r_fs; ; return 0; } EOF -if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - bfd_cv_decl_needed_strdup=no + gdb_cv_struct_reg_r_fs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_decl_needed_strdup=yes + gdb_cv_struct_reg_r_fs=no fi rm -f conftest* fi -echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 -if test $bfd_cv_decl_needed_strdup = yes; then +echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6 +if test $gdb_cv_struct_reg_r_fs = yes; then cat >> confdefs.h <<\EOF -#define NEED_DECLARATION_STRDUP 1 +#define HAVE_STRUCT_REG_R_FS 1 EOF fi - -echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4064: checking whether strstr must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then +echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6 +echo "configure:4286: checking for r_gs in struct reg" >&5 +if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif +#include int main() { -char *(*pfn) = (char *(*)) strstr +struct reg r; r.r_gs; ; return 0; } EOF -if { (eval echo configure:4090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - bfd_cv_decl_needed_strstr=no + gdb_cv_struct_reg_r_gs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_decl_needed_strstr=yes + gdb_cv_struct_reg_r_gs=no fi rm -f conftest* fi -echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 -if test $bfd_cv_decl_needed_strstr = yes; then +echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6 +if test $gdb_cv_struct_reg_r_gs = yes; then cat >> confdefs.h <<\EOF -#define NEED_DECLARATION_STRSTR 1 +#define HAVE_STRUCT_REG_R_GS 1 EOF fi - - -# The following save_state_t checkery is only necessary for HPUX -# versions earlier than 10.20. When those fade from memory, this -# could be expunged. --jsm 1999-03-22 - -echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 -echo "configure:4117: checking for HPUX save_state structure" >&5 -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "save_state_t" >/dev/null 2>&1; then - rm -rf conftest* - gdb_cv_hpux_savestate=yes +# See if provides the PTRACE_GETREGS request. +echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6 +echo "configure:4320: checking for PTRACE_GETREGS" >&5 +if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - rm -rf conftest* - gdb_cv_hpux_savestate=no -fi -rm -f conftest* - -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +int main() { +PTRACE_GETREGS; +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ss_wide" >/dev/null 2>&1; then +if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - gdb_cv_hpux_sswide=yes + gdb_cv_have_ptrace_getregs=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - gdb_cv_hpux_sswide=no + gdb_cv_have_ptrace_getregs=no fi rm -f conftest* - -if test $gdb_cv_hpux_savestate = yes -then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_SAVE_STATE_T 1 -EOF - -fi -if test $gdb_cv_hpux_sswide = yes -then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_MEMBER_SS_WIDE 1 -EOF - fi -echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 - - -# If we are configured native on GNU/Linux, work around problems with -# sys/procfs.h -# Also detect which type of /proc is in use, such as for Unixware or Solaris. - -if test "${target}" = "${host}"; then - case "${host}" in - i[3456]86-*-linux*) - cat >> confdefs.h <<\EOF -#define START_INFERIOR_TRAPS_EXPECTED 2 -EOF - - cat >> confdefs.h <<\EOF -#define sys_quotactl 1 -EOF - - ;; - *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) - cat >> confdefs.h <<\EOF -#define NEW_PROC_API 1 -EOF - ;; - # FIXME: we would like to define NEW_PROC_API for all versions of - # Solaris from 2.6 on... but it isn't quite working yet. Seems - # to work on sparc 2.6, so let's try it out there. - sparc-sun-solaris2.6) - cat >> confdefs.h <<\EOF -#define NEW_PROC_API 1 +echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6 +if test $gdb_cv_have_ptrace_getregs = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PTRACE_GETREGS 1 EOF - ;; - esac fi -if test "$ac_cv_header_sys_procfs_h" = yes; then - echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4201: checking for pstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then +# See if provides the PTRACE_GETFPXREGS request. +echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6 +echo "configure:4354: checking for PTRACE_GETFPXREGS" >&5 +if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include int main() { -pstatus_t avar +PTRACE_GETFPXREGS; ; return 0; } EOF -if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - bfd_cv_have_sys_procfs_type_pstatus_t=yes + gdb_cv_have_ptrace_getfpxregs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_have_sys_procfs_type_pstatus_t=no - + gdb_cv_have_ptrace_getfpxregs=no fi rm -f conftest* fi - if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_PSTATUS_T 1 +echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6 +if test $gdb_cv_have_ptrace_getfpxregs = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PTRACE_GETFPXREGS 1 EOF - fi - echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 +fi - echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4235: checking for prrun_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then +# See if provides the PT_GETDBREGS request. +echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6 +echo "configure:4388: checking for PT_GETDBREGS" >&5 +if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include +#include int main() { -prrun_t avar +PT_GETDBREGS; ; return 0; } EOF -if { (eval echo configure:4247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - bfd_cv_have_sys_procfs_type_prrun_t=yes + gdb_cv_have_pt_getdbregs=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_have_sys_procfs_type_prrun_t=no - + gdb_cv_have_pt_getdbregs=no fi rm -f conftest* fi - if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_PRRUN_T 1 +echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6 +if test $gdb_cv_have_pt_getdbregs = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PT_GETDBREGS 1 EOF - fi - echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 +fi - echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4269: checking for gregset_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then + +echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 +echo "configure:4423: checking for socketpair in -lsocket" >&5 +ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socketpair(); + int main() { -gregset_t avar +socketpair() ; return 0; } EOF -if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - bfd_cv_have_sys_procfs_type_gregset_t=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_have_sys_procfs_type_gregset_t=no - + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" - if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_GREGSET_T 1 +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 + LIBS="-lsocket $LIBS" - echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4303: checking for fpregset_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then +else + echo "$ac_t""no" 1>&6 +fi + +for ac_func in socketpair +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4472: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + int main() { -fpregset_t avar + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + ; return 0; } EOF -if { (eval echo configure:4315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - bfd_cv_have_sys_procfs_type_fpregset_t=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - bfd_cv_have_sys_procfs_type_fpregset_t=no - + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi - if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_FPREGSET_T 1 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done - fi - echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 - - echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4339: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then +echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 +echo "configure:4527: checking whether malloc must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -#include -#include +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif int main() { - - int dummy;; - dummy = ioctl(0, PIOCSET, &dummy); - +char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - gdb_cv_have_procfs_piocset=yes + bfd_cv_decl_needed_malloc=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - gdb_cv_have_procfs_piocset=no + bfd_cv_decl_needed_malloc=yes fi rm -f conftest* fi - echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 - if test $gdb_cv_have_procfs_piocset = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_PROCFS_PIOCSET 1 +echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 +if test $bfd_cv_decl_needed_malloc = yes; then + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_MALLOC 1 EOF - fi fi -echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:4379: checking for main in -lm" >&5 -ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 +echo "configure:4574: checking whether realloc must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif int main() { -main() +char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + bfd_cv_decl_needed_realloc=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + bfd_cv_decl_needed_realloc=yes fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 +if test $bfd_cv_decl_needed_realloc = yes; then + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_REALLOC 1 +EOF -else - echo "$ac_t""no" 1>&6 fi - -echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 -echo "configure:4423: checking for wctype in -lc" >&5 -ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 +echo "configure:4621: checking whether free must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif int main() { -wctype() +char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + bfd_cv_decl_needed_free=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + bfd_cv_decl_needed_free=yes fi rm -f conftest* -LIBS="$ac_save_LIBS" +fi + +echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 +if test $bfd_cv_decl_needed_free = yes; then + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_FREE 1 +EOF fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 -echo "configure:4461: checking for wctype in -lw" >&5 -ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + +echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 +echo "configure:4668: checking whether strerror must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lw $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif int main() { -wctype() +char *(*pfn) = (char *(*)) strerror ; return 0; } EOF -if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + bfd_cv_decl_needed_strerror=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + bfd_cv_decl_needed_strerror=yes fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi +echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6 +if test $bfd_cv_decl_needed_strerror = yes; then + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_STRERROR 1 +EOF fi - - -echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 -echo "configure:4512: checking for long long support in compiler" >&5 -if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then +echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 +echo "configure:4715: checking whether strdup must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif int main() { - - extern long long foo; - switch (foo & 2) { case 0: return 1; } - +char *(*pfn) = (char *(*)) strdup ; return 0; } EOF -if { (eval echo configure:4527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - gdb_cv_c_long_long=yes + bfd_cv_decl_needed_strdup=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - gdb_cv_c_long_long=no + bfd_cv_decl_needed_strdup=yes fi rm -f conftest* fi -echo "$ac_t""$gdb_cv_c_long_long" 1>&6 -if test $gdb_cv_c_long_long = yes; then +echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6 +if test $bfd_cv_decl_needed_strdup = yes; then cat >> confdefs.h <<\EOF -#define CC_HAS_LONG_LONG 1 +#define NEED_DECLARATION_STRDUP 1 EOF fi - -echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 -echo "configure:4549: checking for long long support in printf" >&5 -if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then +echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +echo "configure:4762: checking whether strstr must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - gdb_cv_printf_has_long_long=no else cat > conftest.$ac_ext < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +int main() { +char *(*pfn) = (char *(*)) strstr +; return 0; } EOF -if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - gdb_cv_printf_has_long_long=yes +if { (eval echo configure:4788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_strstr=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - gdb_cv_printf_has_long_long=no -fi -rm -fr conftest* + rm -rf conftest* + bfd_cv_decl_needed_strstr=yes fi - +rm -f conftest* fi -if test $gdb_cv_printf_has_long_long = yes; then +echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 +if test $bfd_cv_decl_needed_strstr = yes; then cat >> confdefs.h <<\EOF -#define PRINTF_HAS_LONG_LONG 1 +#define NEED_DECLARATION_STRSTR 1 EOF fi -echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 -echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 -echo "configure:4595: checking for long double support in compiler" >&5 -if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&6 +echo "configure:4815: checking for HPUX save_state structure" >&5 +cat > conftest.$ac_ext < EOF -if { (eval echo configure:4607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "save_state_t" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_c_long_double=yes + gdb_cv_hpux_savestate=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_c_long_double=no + gdb_cv_hpux_savestate=no fi rm -f conftest* + +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "ss_wide" >/dev/null 2>&1; then + rm -rf conftest* + gdb_cv_hpux_sswide=yes +else + rm -rf conftest* + gdb_cv_hpux_sswide=no fi +rm -f conftest* -echo "$ac_t""$ac_cv_c_long_double" 1>&6 -if test $ac_cv_c_long_double = yes; then +if test $gdb_cv_hpux_savestate = yes +then cat >> confdefs.h <<\EOF -#define HAVE_LONG_DOUBLE 1 +#define HAVE_STRUCT_SAVE_STATE_T 1 +EOF + +fi +if test $gdb_cv_hpux_sswide = yes +then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_MEMBER_SS_WIDE 1 EOF fi +echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6 -echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 -echo "configure:4629: checking for long double support in printf" >&5 -if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then +# If we are configured native on GNU/Linux, work around problems with +# sys/procfs.h +# Also detect which type of /proc is in use, such as for Unixware or Solaris. + +if test "${target}" = "${host}"; then + case "${host}" in + i[3456]86-*-linux*) + cat >> confdefs.h <<\EOF +#define START_INFERIOR_TRAPS_EXPECTED 2 +EOF + + cat >> confdefs.h <<\EOF +#define sys_quotactl 1 +EOF + + ;; + ia64-*-aix*) + cat >> confdefs.h <<\EOF +#define NEW_PROC_API 1 +EOF + + ;; + *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) + cat >> confdefs.h <<\EOF +#define NEW_PROC_API 1 +EOF + + ;; + *-*-solaris2.[678]) + cat >> confdefs.h <<\EOF +#define NEW_PROC_API 1 +EOF + + ;; + esac +fi + +if test "$ac_cv_header_sys_procfs_h" = yes; then + echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:4902: checking for pstatus_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext < +int main() { +pstatus_t avar +; return 0; } EOF -if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - gdb_cv_printf_has_long_double=yes +if { (eval echo configure:4916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_pstatus_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - gdb_cv_printf_has_long_double=no -fi -rm -fr conftest* + rm -rf conftest* + bfd_cv_have_sys_procfs_type_pstatus_t=no + fi - +rm -f conftest* fi -if test $gdb_cv_printf_has_long_double = yes; then - cat >> confdefs.h <<\EOF -#define PRINTF_HAS_LONG_DOUBLE 1 + if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PSTATUS_T 1 EOF -fi -echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 - + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 -echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 -echo "configure:4671: checking for long double support in scanf" >&5 -if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then + echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:4938: checking for prrun_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - gdb_cv_scanf_has_long_double=no else cat > conftest.$ac_ext < 3.14159 && f < 3.14160); -} +#define _SYSCALL32 +#include +int main() { +prrun_t avar +; return 0; } EOF -if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - gdb_cv_scanf_has_long_double=yes +if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prrun_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - gdb_cv_scanf_has_long_double=no -fi -rm -fr conftest* + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prrun_t=no + fi - +rm -f conftest* fi -if test $gdb_cv_scanf_has_long_double = yes; then - cat >> confdefs.h <<\EOF -#define SCANF_HAS_LONG_DOUBLE 1 + if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRRUN_T 1 EOF -fi -echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6 -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4715: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:4974: checking for gregset_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < + +#define _SYSCALL32 +#include +int main() { +gregset_t avar +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then +if { (eval echo configure:4988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + bfd_cv_have_sys_procfs_type_gregset_t=yes else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + bfd_cv_have_sys_procfs_type_gregset_t=no + fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_GREGSET_T 1 EOF - + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6 + + echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5010: checking for fpregset_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 + cat > conftest.$ac_ext < +int main() { +fpregset_t avar +; return 0; } +EOF +if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_fpregset_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_fpregset_t=no + +fi +rm -f conftest* fi -done -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4754: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FPREGSET_T 1 +EOF + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6 + + echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5046: checking for prgregset_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); +#define _SYSCALL32 +#include int main() { +prgregset_t avar +; return 0; } +EOF +if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prgregset_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prgregset_t=no + +fi +rm -f conftest* +fi -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif + if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRGREGSET_T 1 +EOF + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6 + + echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5082: checking for prfpregset_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +prfpregset_t avar ; return 0; } EOF -if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + bfd_cv_have_sys_procfs_type_prfpregset_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + bfd_cv_have_sys_procfs_type_prfpregset_t=no + fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_PRFPREGSET_T 1 EOF - + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6 + + echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5118: checking for prgregset32_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 + cat > conftest.$ac_ext < +int main() { +prgregset32_t avar +; return 0; } +EOF +if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prgregset32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prgregset32_t=no + +fi +rm -f conftest* fi -done -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4807: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRGREGSET32_T 1 +EOF + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6 + + echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5154: checking for prfpregset32_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < +int main() { +prfpregset32_t avar +; return 0; } +EOF +if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prfpregset32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prfpregset32_t=no + +fi +rm -f conftest* +fi - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include -#include -#include + if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRFPREGSET32_T 1 +EOF -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6 -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif + echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5190: checking for lwpid_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ +#define _SYSCALL32 +#include +int main() { +lwpid_t avar +; return 0; } +EOF +if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_lwpid_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_lwpid_t=no + +fi +rm -f conftest* +fi -#endif /* no HAVE_GETPAGESIZE */ + if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LWPID_T 1 +EOF -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6 -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} + echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5226: checking for psaddr_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +psaddr_t avar +; return 0; } EOF -if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_mmap_fixed_mapped=yes +if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_psaddr_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no -fi -rm -fr conftest* + rm -rf conftest* + bfd_cv_have_sys_procfs_type_psaddr_t=no + fi - +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MMAP 1 + if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PSADDR_T 1 EOF -fi - - + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6 + echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5262: checking for prsysent_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&6 -echo "configure:4984: checking for HPUX/OSF thread support" >&5 - if test -f /usr/include/dce/cma_config.h ; then - if test "$GCC" = "yes" ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_HPUX_THREAD_SUPPORT 1 +#define _SYSCALL32 +#include +int main() { +prsysent_t avar +; return 0; } EOF +if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prsysent_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prsysent_t=no + +fi +rm -f conftest* +fi - CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" - CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" - else - echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 - fi - else - echo "$ac_t""no" 1>&6 - fi - ;; - solaris*) - echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 -echo "configure:5003: checking for Solaris thread debugging library" >&5 - if test -f /usr/lib/libthread_db.so.1 ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_THREAD_DB_LIB 1 + if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRSYSENT_T 1 EOF - CONFIG_OBS="${CONFIG_OBS} sol-thread.o" - CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:5013: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6 + + echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5298: checking for pr_sigset_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -dlopen() +pr_sigset_t avar ; return 0; } EOF -if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + bfd_cv_have_sys_procfs_type_pr_sigset_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + bfd_cv_have_sys_procfs_type_pr_sigset_t=no + fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_PR_SIGSET_T 1 EOF - LIBS="-ldl $LIBS" + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6 + echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5334: checking for pr_sigaction64_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "$ac_t""no" 1>&6 -fi - - if test "$GCC" = "yes" ; then - # The GNU linker requires the -export-dynamic option to make - # all symbols visible in the dynamic symbol table. - hold_ldflags=$LDFLAGS - echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 -echo "configure:5064: checking for the ld -export-dynamic flag" >&5 - LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" - cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -int i; +pr_sigaction64_t avar ; return 0; } EOF -if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - found=yes + bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - found=no + bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no + fi rm -f conftest* - LDFLAGS=$hold_ldflags - echo "$ac_t""$found" 1>&6 - if test $found = yes; then - CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" - fi - fi - # Sun randomly tweaked the prototypes in - # at one point. - echo $ac_n "checking if is old""... $ac_c" 1>&6 -echo "configure:5093: checking if is old" >&5 - if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then +fi + + if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PR_SIGACTION64_T 1 +EOF + + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6 + + echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5370: checking for pr_siginfo64_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - cat > conftest.$ac_ext < conftest.$ac_ext < - ps_err_e ps_pdwrite - (struct ps_prochandle*, psaddr_t, const void*, size_t); - +#define _SYSCALL32 +#include int main() { - +pr_siginfo64_t avar ; return 0; } EOF -if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - gdb_cv_proc_service_is_old=no + bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - gdb_cv_proc_service_is_old=yes + bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no + fi rm -f conftest* - fi - echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 - if test $gdb_cv_proc_service_is_old = yes; then - cat >> confdefs.h <<\EOF -#define PROC_SERVICE_IS_OLD 1 + if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PR_SIGINFO64_T 1 EOF - fi - else - echo "$ac_t""no" 1>&6 - fi - ;; - esac - -fi + fi + echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6 + -ENABLE_CFLAGS= -# Check whether --enable-tui or --disable-tui was given. -if test "${enable_tui+set}" = set; then - enableval="$enable_tui" - case "${enable_tui}" in - yes | no) ;; - "") enable_tui=yes ;; - *) - { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } - ;; - esac + + if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then + echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6 +echo "configure:5411: checking whether prfpregset_t type is broken" >&5 + if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + gdb_cv_prfpregset_t_broken=yes +else + cat > conftest.$ac_ext < + int main () + { + if (sizeof (prfpregset_t) == sizeof (void *)) + return 1; + return 0; + } +EOF +if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + gdb_cv_prfpregset_t_broken=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + gdb_cv_prfpregset_t_broken=yes +fi +rm -fr conftest* +fi fi -case ${enable_tui} in - "yes" ) - cat >> confdefs.h <<\EOF -#define TUI 1 + echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6 + if test $gdb_cv_prfpregset_t_broken = yes; then + cat >> confdefs.h <<\EOF +#define PRFPREGSET_T_BROKEN 1 EOF - BUILD_TUI=all-tui - TUI_LIBRARY=tui/libtui.a - ;; - * ) - BUILD_TUI= - TUI_LIBRARY= - ;; -esac + fi + fi + + + echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5454: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include + +int main() { + + int dummy;; + dummy = ioctl(0, PIOCSET, &dummy); + +; return 0; } +EOF +if { (eval echo configure:5472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_procfs_piocset=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_procfs_piocset=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6 + if test $gdb_cv_have_procfs_piocset = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PROCFS_PIOCSET 1 +EOF + + fi +fi + +if test ${host} = ${target} ; then + + echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6 +echo "configure:5496: checking for member l_addr in struct link_map" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct link_map lm; (void) lm.l_addr; +; return 0; } +EOF +if { (eval echo configure:5508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_link_map_with_l_members=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_link_map_with_l_members=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6 + if test $gdb_cv_have_struct_link_map_with_l_members = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 +EOF + + fi + + + echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6 +echo "configure:5530: checking for member lm_addr in struct link_map" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct link_map lm; (void) lm.lm_addr; +; return 0; } +EOF +if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_link_map_with_lm_members=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_link_map_with_lm_members=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6 + if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 +EOF + + fi + + + echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6 +echo "configure:5565: checking for member som_addr in struct so_map" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef HAVE_NLIST_H +#include +#endif +#include +int main() { +struct so_map lm; (void) lm.som_addr; +; return 0; } +EOF +if { (eval echo configure:5581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_so_map_with_som_members=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_so_map_with_som_members=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6 + if test $gdb_cv_have_struct_so_map_with_som_members = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 +EOF + + fi + + + echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6 +echo "configure:5603: checking for struct link_map32 in sys/link.h" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct link_map32 l; +; return 0; } +EOF +if { (eval echo configure:5616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_struct_link_map32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_struct_link_map32=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6 + if test $gdb_cv_have_struct_link_map32 = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINK_MAP32 1 +EOF + + fi +fi + +echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:5638: checking for main in -lm" >&5 +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 +echo "configure:5682: checking for wctype in -lc" >&5 +ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 +echo "configure:5720: checking for wctype in -lw" >&5 +ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lw $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + + + +echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 +echo "configure:5771: checking for long long support in compiler" >&5 +if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_c_long_long=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_c_long_long=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gdb_cv_c_long_long" 1>&6 +if test $gdb_cv_c_long_long = yes; then + cat >> confdefs.h <<\EOF +#define CC_HAS_LONG_LONG 1 +EOF + +fi + + +echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 +echo "configure:5808: checking for long long support in printf" >&5 +if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + gdb_cv_printf_has_long_long=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + gdb_cv_printf_has_long_long=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + gdb_cv_printf_has_long_long=no +fi +rm -fr conftest* +fi + +fi + +if test $gdb_cv_printf_has_long_long = yes; then + cat >> confdefs.h <<\EOF +#define PRINTF_HAS_LONG_LONG 1 +EOF + +fi +echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 + + +echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 +echo "configure:5854: checking for long double support in compiler" >&5 +if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_long_double=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_long_double=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_long_double" 1>&6 +if test $ac_cv_c_long_double = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LONG_DOUBLE 1 +EOF + +fi + + +echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 +echo "configure:5888: checking for long double support in printf" >&5 +if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + gdb_cv_printf_has_long_double=no +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + gdb_cv_printf_has_long_double=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + gdb_cv_printf_has_long_double=no +fi +rm -fr conftest* +fi + +fi + +if test $gdb_cv_printf_has_long_double = yes; then + cat >> confdefs.h <<\EOF +#define PRINTF_HAS_LONG_DOUBLE 1 +EOF + +fi +echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 + + +echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 +echo "configure:5930: checking for long double support in scanf" >&5 +if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + gdb_cv_scanf_has_long_double=no +else + cat > conftest.$ac_ext < 3.14159 && f < 3.14160); +} +EOF +if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + gdb_cv_scanf_has_long_double=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + gdb_cv_scanf_has_long_double=no +fi +rm -fr conftest* +fi + +fi + +if test $gdb_cv_scanf_has_long_double = yes; then + cat >> confdefs.h <<\EOF +#define SCANF_HAS_LONG_DOUBLE 1 +EOF + +fi +echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6 + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5974: 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:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6013: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:6066: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat > conftest.$ac_ext < +#include +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { (eval echo configure:6214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + + + + +if test ${build} = ${host} -a ${host} = ${target} ; then + case ${host_os} in + hpux*) + echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 +echo "configure:6243: checking for HPUX/OSF thread support" >&5 + if test -f /usr/include/dce/cma_config.h ; then + if test "$GCC" = "yes" ; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_HPUX_THREAD_SUPPORT 1 +EOF + + CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o" + CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" + else + echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 + fi + else + echo "$ac_t""no" 1>&6 + fi + ;; + solaris*) + echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 +echo "configure:6262: checking for Solaris thread debugging library" >&5 + if test -f /usr/lib/libthread_db.so.1 ; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_THREAD_DB_LIB 1 +EOF + + CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o" + CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:6272: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + if test "$GCC" = "yes" ; then + # The GNU linker requires the -export-dynamic option to make + # all symbols visible in the dynamic symbol table. + hold_ldflags=$LDFLAGS + echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 +echo "configure:6323: checking for the ld -export-dynamic flag" >&5 + LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + found=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + found=no +fi +rm -f conftest* + LDFLAGS=$hold_ldflags + echo "$ac_t""$found" 1>&6 + if test $found = yes; then + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" + fi + fi + # Sun randomly tweaked the prototypes in + # at one point. + echo $ac_n "checking if is old""... $ac_c" 1>&6 +echo "configure:6352: checking if is old" >&5 + if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < + ps_err_e ps_pdwrite + (struct ps_prochandle*, psaddr_t, const void*, size_t); + +int main() { + +; return 0; } +EOF +if { (eval echo configure:6369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_proc_service_is_old=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_proc_service_is_old=yes +fi +rm -f conftest* + +fi + + echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6 + if test $gdb_cv_proc_service_is_old = yes; then + cat >> confdefs.h <<\EOF +#define PROC_SERVICE_IS_OLD 1 +EOF + + fi + else + echo "$ac_t""no" 1>&6 + fi + ;; + esac + +fi + + +# Check whether --enable-gdbcli or --disable-gdbcli was given. +if test "${enable_gdbcli+set}" = set; then + enableval="$enable_gdbcli" + + case "${enableval}" in + yes) enable_gdbcli=yes ;; + "") enable_gdbcli=yes ;; + no) + { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; } + ;; + *) + { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; } + ;; + esac + +else + enable_gdbcli=yes +fi + +case ${enable_gdbcli} in + "yes" ) + if test -d "${srcdir}/cli" ; then + CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)" + CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)" + CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)" + CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)" + ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)" + CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)" + CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)" + CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)" + CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)" + fi + ;; +esac + + +# Check whether --enable-gdbmi or --disable-gdbmi was given. +if test "${enable_gdbmi+set}" = set; then + enableval="$enable_gdbmi" + + case "${enable_gdbmi}" in + yes | no) ;; + "") enable_gdbmi=yes ;; + *) + { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; } + ;; + esac + +else + enable_gdbmi=yes +fi + +case ${enable_gdbmi} in + "yes" ) + if test -d "${srcdir}/mi" ; then + CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" + CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" + CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)" + CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" + ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" + CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)" + CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)" + CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" + CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" + fi + ;; +esac + +# Configure UI_OUT by default (before 5.2 it can be disabled) +# It must be configured if gdbmi is configured + +UIOUT_CFLAGS= + + +# Check whether --with-uiout or --without-uiout was given. +if test "${with_uiout+set}" = set; then + withval="$with_uiout" + case "${withval}" in + yes) want_uiout=true ;; + no) if test $enable_gdbmi = yes; then + { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; } + else + want_uiout=false + fi ;; + *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;; +esac +else + want_uiout=true +fi + +if test $want_uiout = true; then + UIOUT_CFLAGS="-DUI_OUT=1" +fi + +# Check whether --enable-tui or --disable-tui was given. +if test "${enable_tui+set}" = set; then + enableval="$enable_tui" + + case "${enable_tui}" in + yes | no) ;; + "") enable_tui=yes ;; + *) + { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; } + ;; + esac + +fi + +case ${enable_tui} in + "yes" ) + if test -d "${srcdir}/tui" ; then + CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)" + CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)" + CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)" + CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)" + ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)" + CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)" + CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)" + CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)" + CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)" + fi + ;; +esac + +# Check whether --enable-netrom or --disable-netrom was given. +if test "${enable_netrom+set}" = set; then + enableval="$enable_netrom" + case "${enableval}" in +yes) enable_netrom=yes ;; +no) enable_netrom=no ;; +*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; +esac +fi + + +if test "${enable_netrom}" = "yes"; then + CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" + CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" +fi + + +# NOTE: Don't add -Wall or -Wunused, they both include +# -Wunused-parameter which reports bogus warnings. +# NOTE: If you add to this list, remember to update +# gdb/doc/gdbint.texinfo. +build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \ +-Wformat -Wparentheses -Wpointer-arith -Wuninitialized" +# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs +# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value +# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual +# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes +# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls +# -Woverloaded-virtual -Winline -Werror" +# Check whether --enable-build-warnings or --disable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then + enableval="$enable_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting compiler warning flags = $build_warnings" 6>&1 +fi +fi +# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. +if test "${enable_gdb_build_warnings+set}" = set; then + enableval="$enable_gdb_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +WERROR_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes +then + echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6 +echo "configure:6588: checking compiler warning flags" >&5 + # Separate out the -Werror flag as some files just cannot be + # compiled with it enabled. + for w in ${build_warnings}; do + case $w in + -Werr*) WERROR_CFLAGS=-Werror ;; + *) # Check that GCC accepts it + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $w" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + WARN_CFLAGS="${WARN_CFLAGS} $w" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + CFLAGS="$saved_CFLAGS" + esac + done + echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6 +fi + + + +MMALLOC_CFLAGS= +MMALLOC= + + + +# Check whether --with-mmalloc or --without-mmalloc was given. +if test "${with_mmalloc+set}" = set; then + withval="$with_mmalloc" + case "${withval}" in + yes) want_mmalloc=true ;; + no) want_mmalloc=false;; + *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; +esac +else + want_mmalloc=false +fi + +if test x$want_mmalloc = xtrue; then + cat >> confdefs.h <<\EOF +#define USE_MMALLOC 1 +EOF + + cat >> confdefs.h <<\EOF +#define MMCHECK_FORCE 1 +EOF + + MMALLOC_CFLAGS="-I$srcdir/../mmalloc" + MMALLOC='../mmalloc/libmmalloc.a' +fi + +# Check whether --with-included-regex or --without-included-regex was given. +if test "${with_included_regex+set}" = set; then + withval="$with_included_regex" + case "${withval}" in + yes) want_included_regex=true ;; + no) want_included_regex=false;; + *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;; +esac +else + want_included_regex=true +fi + +if test $want_included_regex = false; then + echo $ac_n "checking for GNU regex""... $ac_c" 1>&6 +echo "configure:6665: checking for GNU regex" >&5 + if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 +#error No valid GNU regex. +#endif + +; return 0; } +EOF +if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gdb_cv_have_gnu_regex=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gdb_cv_have_gnu_regex=no +fi +rm -f conftest* +fi + + echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6 + if test $gdb_cv_have_gnu_regex = no; then + want_included_regex=true + fi +fi + +if test x${want_included_regex} = xtrue; then + REGEX="gnu-regex.o" + cat >> confdefs.h <<\EOF +#define USE_INCLUDED_REGEX 1 +EOF + +fi + + +# In the Cygwin environment, we need some additional flags. +echo $ac_n "checking for cygwin""... $ac_c" 1>&6 +echo "configure:6711: checking for cygwin" >&5 +if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "lose" >/dev/null 2>&1; then + rm -rf conftest* + gdb_cv_os_cygwin=yes +else + rm -rf conftest* + gdb_cv_os_cygwin=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 + + +SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o" +case ${host} in + *go32* ) SER_HARDWIRE=ser-go32.o ;; + *djgpp* ) SER_HARDWIRE=ser-go32.o ;; +esac + + + +if test x$gdb_host = xgo32; then + TERM_LIB= +else +if test x$gdb_cv_os_cygwin = xyes; then + TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' +else + TERM_LIB= + echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +echo "configure:6754: checking for tgetent in -lncurses" >&5 +ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lncurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lncurses +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 +echo "configure:6792: checking for tgetent in -lHcurses" >&5 +ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lHcurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lHcurses +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 +echo "configure:6830: checking for tgetent in -ltermlib" >&5 +ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermlib $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-ltermlib +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +echo "configure:6868: checking for tgetent in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-ltermcap +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 +echo "configure:6906: checking for tgetent in -lcurses" >&5 +ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lcurses +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 +echo "configure:6944: checking for tgetent in -lterminfo" >&5 +ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lterminfo $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERM_LIB=-lterminfo +else + echo "$ac_t""no" 1>&6 +fi +fi -# Check whether --enable-netrom or --disable-netrom was given. -if test "${enable_netrom+set}" = set; then - enableval="$enable_netrom" - case "${enableval}" in -yes) enable_netrom=yes ;; -no) enable_netrom=no ;; -*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; -esac fi +fi -if test "${enable_netrom}" = "yes"; then - CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" - CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" fi -# Check whether --enable-build-warnings or --disable-build-warnings was given. -if test "${enable_build_warnings+set}" = set; then - enableval="$enable_build_warnings" - build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" -case "${enableval}" in - yes) ;; - no) build_warnings="-w";; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${build_warnings} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - build_warnings="${t} ${build_warnings}";; - *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac -if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then - echo "Setting warning flags = $build_warnings" 6>&1 fi -WARN_CFLAGS="" -WERROR_CFLAGS="" -if test "x${build_warnings}" != x -a "x$GCC" = xyes -then - # Separate out the -Werror flag as some files just cannot be - # compiled with it enabled. - for w in ${build_warnings}; do - case $w in - -Werr*) WERROR_CFLAGS=-Werror ;; - *) WARN_CFLAGS="${WARN_CFLAGS} $w" + + + if test "x$TERM_LIB" = x + then + { echo "configure: error: Could not find a term library" 1>&2; exit 1; } + fi +fi +fi + + +# libreadline needs libuser32.a in a cygwin environment +WIN32LIBS= +if test x$gdb_cv_os_cygwin = xyes; then + WIN32LIBS="-luser32" + case "${target}" in + *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" + ;; esac - done fi + + +LIBGUI="../libgui/src/libgui.a" +GUI_CFLAGS_X="-I${srcdir}/../libgui/src" + + + +# Check whether --with-cpu or --without-cpu was given. +if test "${with_cpu+set}" = set; then + withval="$with_cpu" + case "${target}" in + powerpc-* | powerpcle-* ) + ## It would be nice to keep this table in sync with the one in + ## gcc/configure. + case "${with_cpu}" in + ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ + | 604 | 750 ) + ## Those are all handled in variants in rs6000-tdep.c, so they're fine. + ;; + common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) + ## These are all RS6000 variants, as far as GDB is concerned. + with_cpu=rs6000 + ;; + 603e | ec603e ) + with_cpu=603 + ;; + 604e ) + with_cpu=604 + ;; + * ) + echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 + with_cpu=ppc-uisa + ;; + esac + ;; + * ) + echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 + ;; +esac +cat >> confdefs.h <&2 + enable_gdbtk=no ;; + *windows*) + echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 + enable_gdbtk=no ;; + *) + enable_gdbtk=yes ;; + esac ;; + no) + enable_gdbtk=no ;; + *) + { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; +esac +else + +# Default is on for everything but go32 and Cygwin +case "$host" in + *go32* | *windows*) + ;; + *) + if test -d "${srcdir}/gdbtk" ; then + enable_gdbtk=yes + fi + ;; +esac + +fi + + +WIN32LDAPP= + + + +configdir="unix" + +GDBTKLIBS= +if test "${enable_gdbtk}" = "yes"; then + + # Gdbtk must have an absolute path to srcdir in order to run + # properly when not installed. + here=`pwd` + cd ${srcdir} + GDBTK_SRC_DIR=`pwd` + cd $here + + +# +# Ok, lets find the tcl configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-tclconfig +# + +if test x"${no_tcl}" = x ; then + # we reset no_tcl in case something fails here + no_tcl=true + # Check whether --with-tclconfig or --without-tclconfig was given. +if test "${with_tclconfig+set}" = set; then + withval="$with_tclconfig" + with_tclconfig=${withval} +fi + + echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 +echo "configure:7128: checking for Tcl configuration" >&5 + if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - build_warnings="" + + + # First check to see if --with-tclconfig was specified. + if test x"${with_tclconfig}" != x ; then + if test -f "${with_tclconfig}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + else + { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } + fi + fi + + # then check for a private Tcl installation + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ../tcl \ + `ls -dr ../tcl[7-9]* 2>/dev/null` \ + ../../tcl \ + `ls -dr ../../tcl[7-9]* 2>/dev/null` \ + ../../../tcl \ + `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do + if test -f "$i/${configdir}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few other private locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do + if test -f "$i/${configdir}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` + break + fi + done + fi + fi + if test x"${ac_cv_c_tclconfig}" = x ; then + TCLCONFIG="# no Tcl configs found" + echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 + else + no_tcl= + TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh + echo "$ac_t""found $TCLCONFIG" 1>&6 + fi +fi + if test -z "${no_tcl}"; then + + . $TCLCONFIG + + + + + -MMALLOC_CFLAGS= -MMALLOC= -# Check whether --with-mmalloc or --without-mmalloc was given. -if test "${with_mmalloc+set}" = set; then - withval="$with_mmalloc" - case "${withval}" in - yes) want_mmalloc=true ;; - no) want_mmalloc=false;; - *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;; -esac + + + + + + + + + + + + + + + + +# +# Ok, lets find the tk configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-tkconfig +# + +if test x"${no_tk}" = x ; then + # we reset no_tk in case something fails here + no_tk=true + # Check whether --with-tkconfig or --without-tkconfig was given. +if test "${with_tkconfig+set}" = set; then + withval="$with_tkconfig" + with_tkconfig=${withval} +fi + + echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 +echo "configure:7236: checking for Tk configuration" >&5 + if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - want_mmalloc=false + + + # First check to see if --with-tkconfig was specified. + if test x"${with_tkconfig}" != x ; then + if test -f "${with_tkconfig}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` + else + { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } + fi + fi + + # then check for a private Tk library + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ../tk \ + `ls -dr ../tk[4-9]* 2>/dev/null` \ + ../../tk \ + `ls -dr ../../tk[4-9]* 2>/dev/null` \ + ../../../tk \ + `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do + if test -f "$i/${configdir}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few other private locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do + if test -f "$i/${configdir}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` + break + fi + done + fi + +fi + + if test x"${ac_cv_c_tkconfig}" = x ; then + TKCONFIG="# no Tk configs found" + echo "configure: warning: Can't find Tk configuration definitions" 1>&2 + else + no_tk= + TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh + echo "$ac_t""found $TKCONFIG" 1>&6 + fi fi -if test x$want_mmalloc = xtrue; then - cat >> confdefs.h <<\EOF -#define USE_MMALLOC 1 -EOF - cat >> confdefs.h <<\EOF -#define MMCHECK_FORCE 1 -EOF - MMALLOC_CFLAGS="-I$srcdir/../mmalloc" - MMALLOC='../mmalloc/libmmalloc.a' + # now look for Tcl library stuff + + case "${host}" in + *-*-cygwin*) + tcldir=../tcl/win/ + ;; + *) + tcldir=../tcl/unix/ + ;; + esac + + TCL_DEPS="${tcldir}${TCL_LIB_FILE}" + + # If $no_tk is nonempty, then we can't do Tk, and there is no + # point to doing Tcl. + if test -z "${no_tk}"; then + + if test -f "$TKCONFIG" ; then + . $TKCONFIG + fi + + + + + + + + + + + + + + +# +# Ok, lets find the tcl source trees so we can use the headers +# Warning: transition of version 9 to 10 will break this algorithm +# because 10 sorts before 9. We also look for just tcl. We have to +# be careful that we don't match stuff like tclX by accident. +# the alternative search directory is involked by --with-tclinclude +# + +no_tcl=true +echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 +echo "configure:7345: checking for Tcl private headers. dir=${configdir}" >&5 +# Check whether --with-tclinclude or --without-tclinclude was given. +if test "${with_tclinclude+set}" = set; then + withval="$with_tclinclude" + with_tclinclude=${withval} +fi + +if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +# first check to see if --with-tclinclude was specified +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclInt.h ; then + ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` + else + { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } + fi fi +# next check if it came with Tcl configuration file +if test x"${ac_cv_c_tclconfig}" = x ; then + if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` + fi +fi -# In the Cygwin environment, we need some additional flags. -echo $ac_n "checking for cygwin""... $ac_c" 1>&6 -echo "configure:5379: checking for cygwin" >&5 -if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then +# next check in private source directory +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ + ${srcdir}/../../tcl \ + `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ + ${srcdir}/../../../tcl \ + `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi +# finally check in a few common install locations +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ + `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ + /usr/local/src/tcl \ + /usr/local/lib/tcl \ + ${prefix}/include ; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi +# see if one is installed +if test x"${ac_cv_c_tclh}" = x ; then + ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 +echo "configure:7411: checking for tclInt.h" >&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 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "lose" >/dev/null 2>&1; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - gdb_cv_os_cygwin=yes + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - gdb_cv_os_cygwin=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_c_tclh=installed +else + echo "$ac_t""no" 1>&6 +ac_cv_c_tclh="" +fi fi -echo "$ac_t""$gdb_cv_os_cygwin" 1>&6 +fi -DLLTOOL=${DLLTOOL-dlltool} -WINDRES=${WINDRES-windres} +if test x"${ac_cv_c_tclh}" = x ; then + TCLHDIR="# no Tcl private headers found" + { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } +fi +if test x"${ac_cv_c_tclh}" != x ; then + no_tcl="" + if test x"${ac_cv_c_tclh}" = x"installed" ; then + echo "$ac_t""is installed" 1>&6 + TCLHDIR="" + else + echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 + # this hack is cause the TCLHDIR won't print if there is a "-I" in it. + TCLHDIR="-I${ac_cv_c_tclh}" + fi +fi -if test x$gdb_host = xgo32; then - TERM_LIB= -else -if test x$gdb_cv_os_cygwin = xyes; then - TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' -else - TERM_LIB= - echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:5418: checking for tgetent in -lncurses" >&5 -ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + +# +# Ok, lets find the tk source trees so we can use the headers +# If the directory (presumably symlink) named "tk" exists, use that one +# in preference to any others. Same logic is used when choosing library +# and again with Tcl. The search order is the best place to look first, then in +# decreasing significance. The loop breaks if the trigger file is found. +# Note the gross little conversion here of srcdir by cd'ing to the found +# directory. This converts the path from a relative to an absolute, so +# recursive cache variables for the path will work right. We check all +# the possible paths in one loop rather than many seperate loops to speed +# things up. +# the alternative search directory is involked by --with-tkinclude +# +no_tk=true +echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 +echo "configure:7481: checking for Tk private headers" >&5 +# Check whether --with-tkinclude or --without-tkinclude was given. +if test "${with_tkinclude+set}" = set; then + withval="$with_tkinclude" + with_tkinclude=${withval} +fi + +if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lncurses $LIBS" -cat > conftest.$ac_ext <&2; exit 1; } + fi +fi -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +# next check if it came with Tk configuration file +if test x"${ac_cv_c_tkconfig}" = x ; then + if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then + ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` + fi fi -rm -f conftest* -LIBS="$ac_save_LIBS" +# next check in private source directory +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ + ${srcdir}/../../tk \ + `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ + ${srcdir}/../../../tk \ + `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - TERM_LIB=-lncurses -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 -echo "configure:5456: checking for tgetent in -lHcurses" >&5 -ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +# finally check in a few common install locations +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ + `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ + /usr/local/src/tk \ + /usr/local/lib/tk \ + ${prefix}/include ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi +# see if one is installed +if test x"${ac_cv_c_tkh}" = x ; then + ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for tk.h""... $ac_c" 1>&6 +echo "configure:7547: checking for tk.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lHcurses $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - TERM_LIB=-lHcurses + ac_cv_c_tkh=installed else echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 -echo "configure:5494: checking for tgetent in -ltermlib" >&5 -ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ltermlib $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" fi -rm -f conftest* -LIBS="$ac_save_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - TERM_LIB=-ltermlib -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:5532: checking for tgetent in -ltermcap" >&5 -ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ltermcap $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +if test x"${ac_cv_c_tkh}" != x ; then + no_tk="" + if test x"${ac_cv_c_tkh}" = x"installed" ; then + echo "$ac_t""is installed" 1>&6 + TKHDIR="" + else + echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 + # this hack is cause the TKHDIR won't print if there is a "-I" in it. + TKHDIR="-I${ac_cv_c_tkh}" + fi else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + TKHDIR="# no Tk directory found" + echo "configure: warning: Can't find Tk private headers" 1>&2 + no_tk=true fi -rm -f conftest* -LIBS="$ac_save_LIBS" + + + +echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 +echo "configure:7603: checking for Itcl private headers. srcdir=${srcdir}" >&5 +if test x"${ac_cv_c_itclh}" = x ; then + for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do + if test -f $i/generic/itcl.h ; then + ac_cv_c_itclh=`(cd $i/generic; pwd)` + break + fi + done fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - TERM_LIB=-ltermcap -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:5570: checking for tgetent in -lcurses" >&5 -ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lcurses $LIBS" -cat > conftest.$ac_ext <&2; exit 1; } +fi +if test x"${ac_cv_c_itclh}" != x ; then + ITCLHDIR="-I${ac_cv_c_itclh}" +fi +# should always be here +# ITCLLIB="../itcl/itcl/unix/libitcl.a" -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +#AC_SUBST(ITCLLIB) + + +echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 +echo "configure:7626: checking for Itk private headers. srcdir=${srcdir}" >&5 +if test x"${ac_cv_c_itkh}" = x ; then + for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do + if test -f $i/generic/itk.h ; then + ac_cv_c_itkh=`(cd $i/generic; pwd)` + break + fi + done fi -rm -f conftest* -LIBS="$ac_save_LIBS" +if test x"${ac_cv_c_itkh}" = x ; then + ITKHDIR="# no Itk private headers found" + { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; } +fi +if test x"${ac_cv_c_itkh}" != x ; then + ITKHDIR="-I${ac_cv_c_itkh}" +fi +# should always be here +# ITKLIB="../itcl/itk/unix/libitk.a" + +#AC_SUBST(ITKLIB) + + +echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 +echo "configure:7649: checking for Tix private headers. srcdir=${srcdir}" >&5 +if test x"${ac_cv_c_tixh}" = x ; then + for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do + if test -f $i/generic/tix.h ; then + ac_cv_c_tixh=`(cd $i/generic; pwd)` + break + fi + done +fi +if test x"${ac_cv_c_tixh}" = x ; then + TIXHDIR="# no Tix private headers found" + { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; } +fi +if test x"${ac_cv_c_tixh}" != x ; then + TIXHDIR="-I${ac_cv_c_tixh}" +fi + + + + + # now look for Tk library stuff + + case "${host}" in + *-*-cygwin*) + tkdir=../tk/win/ + ;; + *) + tkdir=../tk/unix/ + ;; + esac + + TK_DEPS="${tkdir}${TK_LIB_FILE}" + + # now look for Itcl library stuff + +# +# Ok, lets find the itcl configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-itclconfig +# + +if test x"${no_itcl}" = x ; then + # we reset no_itcl in case something fails here + no_itcl=true + # Check whether --with-itclconfig or --without-itclconfig was given. +if test "${with_itclconfig+set}" = set; then + withval="$with_itclconfig" + with_itclconfig=${withval} fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - TERM_LIB=-lcurses -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 -echo "configure:5608: checking for tgetent in -lterminfo" >&5 -ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 +echo "configure:7701: checking for Itcl configuration" >&5 + if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lterminfo $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + # First check to see if --with-itclconfig was specified. + if test x"${with_itclconfig}" != x ; then + if test -f "${with_itclconfig}/itclConfig.sh" ; then + ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)` + else + { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; } + fi + fi -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - TERM_LIB=-lterminfo -else - echo "$ac_t""no" 1>&6 + # then check for a private Itcl library + if test x"${ac_cv_c_itclconfig}" = x ; then + for i in \ + ../itcl/itcl \ + `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \ + ../../itcl \ + `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \ + ../../../itcl \ + `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do + if test -f "$i/itclConfig.sh" ; then + ac_cv_c_itclconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_itclconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/itclConfig.sh" ; then + ac_cv_c_itclconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few other private locations + if test x"${ac_cv_c_itclconfig}" = x ; then + for i in \ + ${srcdir}/../itcl/itcl \ + `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do + if test -f "$i/itclConfig.sh" ; then + ac_cv_c_itclconfig=`(cd $i; pwd)` + break + fi + done + fi + fi + if test x"${ac_cv_c_itclconfig}" = x ; then + ITCLCONFIG="# no Itcl configs found" + echo "configure: warning: Can't find Itcl configuration definitions" 1>&2 + else + no_itcl= + ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh + echo "$ac_t""found $ITCLCONFIG" 1>&6 + fi fi + if test -z "${no_itcl}"; then + + if test -f "$ITCLCONFIG" ; then + . $ITCLCONFIG + fi + + + + + + + + + + + + + ITCLLIB="${ITCL_BUILD_LIB_SPEC}" + ITCL_DEPS="${ITCL_LIB_FULL_PATH}" + fi + + + # now look for Itk library stuff + +# +# Ok, lets find the itk configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-itkconfig +# + +if test x"${no_itk}" = x ; then + # we reset no_itk in case something fails here + no_itk=true + # Check whether --with-itkconfig or --without-itkconfig was given. +if test "${with_itkconfig+set}" = set; then + withval="$with_itkconfig" + with_itkconfig=${withval} fi + echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 +echo "configure:7804: checking for Itk configuration" >&5 + if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + # First check to see if --with-itkconfig was specified. + if test x"${with_itkconfig}" != x ; then + if test -f "${with_itkconfig}/itkConfig.sh" ; then + ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)` + else + { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; } + fi + fi + + # then check for a private Itk library + if test x"${ac_cv_c_itkconfig}" = x ; then + for i in \ + ../itcl/itk \ + `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \ + ../../itk \ + `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \ + ../../../itk \ + `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do + if test -f "$i/itkConfig.sh" ; then + ac_cv_c_itkconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_itkconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/itkConfig.sh" ; then + ac_cv_c_itkconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few other private locations + if test x"${ac_cv_c_itkconfig}" = x ; then + for i in \ + ${srcdir}/../itcl/itk \ + `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do + if test -f "$i/itkConfig.sh" ; then + ac_cv_c_itkconfig=`(cd $i; pwd)` + break + fi + done + fi + fi + if test x"${ac_cv_c_itkconfig}" = x ; then + ITKCONFIG="# no Itk configs found" + echo "configure: warning: Can't find Itk configuration definitions" 1>&2 + else + no_itk= + ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh + echo "$ac_t""found $ITKCONFIG" 1>&6 + fi fi + + if test -z "${no_itcl}"; then + + if test -f "$ITKCONFIG" ; then + . $ITKCONFIG + fi + + + + + + + + + + + + + ITKLIB="${ITK_BUILD_LIB_SPEC}" + ITK_DEPS="${ITK_LIB_FULL_PATH}" + fi + + # now look for Tix library stuff + +# +# Ok, lets find the tix configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-itkconfig +# + +if test x"${no_tix}" = x ; then + # we reset no_tix in case something fails here + no_tix=true + # Check whether --with-tixconfig or --without-tixconfig was given. +if test "${with_tixconfig+set}" = set; then + withval="$with_tixconfig" + with_tixconfig=${withval} fi + echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 +echo "configure:7907: checking for Tix configuration" >&5 + if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + + # First check to see if --with-tixconfig was specified. + if test x"${with_tixconfig}" != x ; then + if test -f "${with_tixconfig}/tixConfig.sh" ; then + ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)` + else + { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; } + fi + fi - if test "x$TERM_LIB" = x - then - { echo "configure: error: Could not find a term library" 1>&2; exit 1; } + # then check for a private Tix library + if test x"${ac_cv_c_tixconfig}" = x ; then + for i in \ + ../tix \ + `ls -dr ../tix 2>/dev/null` \ + ../../tix \ + `ls -dr ../../tix 2>/dev/null` \ + ../../../tix \ + `ls -dr ../../../tix 2>/dev/null` ; do + echo "**** Looking at $i - with ${configdir}" + if test -f "$i/tixConfig.sh" ; then + ac_cv_c_tixconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tixconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + echo "**** Looking at $i" + if test -f "$i/tixConfig.sh" ; then + ac_cv_c_tixconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few other private locations + echo "**** Other private locations" + if test x"${ac_cv_c_tixconfig}" = x ; then + for i in \ + ${srcdir}/../tix \ + `ls -dr ${srcdir}/../tix 2>/dev/null` ; do + echo "**** Looking at $i - with ${configdir}" + if test -f "$i/${configdir}/tixConfig.sh" ; then + ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)` + break + fi + done fi + fi + + if test x"${ac_cv_c_tixconfig}" = x ; then + TIXCONFIG="# no Tix configs found" + echo "configure: warning: Can't find Tix configuration definitions" 1>&2 + else + no_tix= + TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh + echo "$ac_t""found $TIXCONFIG" 1>&6 + fi fi -# libreadline needs libuser32.a in a cygwin environment -WIN32LIBS= -if test x$gdb_cv_os_cygwin = xyes; then - WIN32LIBS="-luser32" - case "${target}" in - *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" - ;; - esac -fi + if test -z "${no_tix}"; then + + if test -f "$TIXCONFIG" ; then + . $TIXCONFIG + fi + -# Check whether --with-cpu or --without-cpu was given. -if test "${with_cpu+set}" = set; then - withval="$with_cpu" - case "${target}" in - powerpc-* | powerpcle-* ) - ## It would be nice to keep this table in sync with the one in - ## gcc/configure. - case "${with_cpu}" in - ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ - | 604 | 750 ) - ## Those are all handled in variants in rs6000-tdep.c, so they're fine. - ;; - common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) - ## These are all RS6000 variants, as far as GDB is concerned. - with_cpu=rs6000 - ;; - 603e | ec603e ) - with_cpu=603 - ;; - 604e ) - with_cpu=604 - ;; - * ) - echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2 - with_cpu=ppc-uisa - ;; - esac - ;; - * ) - echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2 - ;; -esac -cat >> confdefs.h <&6 -echo "configure:6704: checking for X" >&5 +echo "configure:8050: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5660,12 +8108,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5734,14 +8182,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5834,7 +8282,7 @@ fi # This code just checks for a few cases where we'd like to ignore those # definitions, even when they're present in the '.mt' file. These cases # are when --disable-sim is specified, or if the simulator directory is -# not part of the soruce tree. +# not part of the source tree. # # Check whether --enable-sim or --disable-sim was given. if test "${enable_sim+set}" = set; then @@ -5875,6 +8323,12 @@ fi + + + + + + # Begin stuff to support --enable-shared # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then @@ -5899,7 +8353,7 @@ if test "${shared}" = "true"; then ;; *-*-linux*aout*) ;; - *-*-linux* | *-pc-linux-gnu) + *-*-linux* | *-pc-linux-gnu*) HLDFLAGS='-Wl,-rpath,$(libdir)' ;; *-*-solaris*) @@ -5970,6 +8424,10 @@ targetfile=`sed -n ' s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p ' ${target_makefile_frag}` +GDB_MULTI_ARCH=`sed -n ' +s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p +' ${target_makefile_frag}` + # these really aren't orthogonal true/false values of the same condition, # but shells are slow enough that I like to reuse the test conditions # whenever possible @@ -5978,11 +8436,42 @@ nativefile=`sed -n ' s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p ' ${host_makefile_frag}` # else -# GDBserver is only useful in a "native" enviroment +# GDBserver is only useful in a "native" environment # configdirs=`echo $configdirs | sed 's/gdbserver//'` fi +# New targets should just set gdb_multi_arch=yes in configure.tgt. +# Old targets being converted can either do that or set GDB_MULTI_ARCH +# in the target specific makefile frag. Eventually gdb_multi_arch=yes +# will be the default. +if test x"${GDB_MULTI_ARCH}" = x ; then + case "${gdb_multi_arch}" in + yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; + no ) GDB_MULTI_ARCH=0 ;; + 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; + esac +fi +if test x"${GDB_MULTI_ARCH}" != x ; then + cat >> confdefs.h <&2 ;; + GDB_MULTI_ARCH_PURE ) + if test x"${targetfile}" != x ; then + echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2 + targetfile="" + fi ;; + *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; +esac + + SUBDIRS="doc testsuite nlm" if test "${enable_multi_ice}" = "yes"; then SUBDIRS="${SUBDIRS} multi-ice" @@ -5991,42 +8480,85 @@ fi # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile -# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the -# corresponding links. But we have to remove the xm.h files and tm.h -# files anyway, e.g. when switching from "configure host" to -# "configure none". +# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty +# version. files= links= + rm -f xm.h +xm_h="" if test "${hostfile}" != ""; then -files="${files} config/${gdb_host_cpu}/${hostfile}" -links="${links} xm.h" + xm_h=xm.h + GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" + files="${files} ${GDB_XM_FILE}" + links="${links} xm.h" + cat >> confdefs.h <> confdefs.h <> confdefs.h <&6 +echo "configure:8533: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 else -# A cross-only configuration. -files="${files} config/nm-empty.h" -links="${links} nm.h" + echo "$ac_t""no" 1>&6 fi + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:7198: checking for Cygwin environment" >&5 +echo "configure:8557: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -6054,19 +8586,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:7231: checking for mingw32 environment" >&5 +echo "configure:8590: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -6085,7 +8617,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:7262: checking for executable suffix" >&5 +echo "configure:8621: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6095,7 +8627,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:8631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -6219,7 +8751,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -6646,8 +9193,10 @@ EOF cat >> $CONFIG_STATUS <<\EOF if test "${nativefile}" = ""; then -sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ - < Makefile > Makefile.tem + < Makefile \ + sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ + | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \ + > Makefile.tem mv -f Makefile.tem Makefile fi