From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 82A1B384232B for ; Tue, 6 Dec 2022 17:19:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82A1B384232B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670347176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yFAo0sXg07gEDoqvJutCg6UvlOon+qMx3q7K/a+MMZ8=; b=MxCz2+NUTwsQaonXbL4jYUwg8ZZFSUbGLzmn7lRLi0tVdO43r1s0ytzCa5vuBYVzFCNrHt 7hJMjwaYRWmrTXuzI/gKII8mff8svmzF8PcIksTO2yQ7Kt+KJR3neybUlQc6LPtYLfT+Su iHQNrrM+cjcaHXN83NUSvQb275Q+Lo0= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-368--4c6ysiAMnuZjbgh7L04kw-1; Tue, 06 Dec 2022 12:19:34 -0500 X-MC-Unique: -4c6ysiAMnuZjbgh7L04kw-1 Received: by mail-wr1-f70.google.com with SMTP id e19-20020adfa453000000b0024209415034so3432054wra.18 for ; Tue, 06 Dec 2022 09:19:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nBRGykDRQrXM9oGU5C4/Ul8O9MQ1CleZc/56ss3WU/8=; b=IqTWQchZNCLbTCALdqt0JZLD0ok15zo1guX18Oe8FRKWMnNDn3fo308yV7NKyTSIag 9VoMsKTWHBY8xRgOYi568V76b2znPar73hun4oOQVQlzMtanfqDopEF2g/WAGfABNvTJ nK6En2P90yr61nCbQiksDjobW+k51MZKKGLDxxnTyzNHm/QMUNx7SnLHr1wSo8/qnR+4 vc69ocw8U87waIwNq09sWlrZOXOxQ2Wr3QNDhj99lseL50V1aqdfDOlxjzwhkgsXoaGG 2KNJsMJVJJvxpNGjHenpHSjQpa/oc5CIYqS3wZEBC9rEVQQPQ3lPowPC8UEEfmofbN79 +x6A== X-Gm-Message-State: ANoB5pk0jrMMUOW0U3fH35ZCCuKZWSfZISJgj3hsstsejCEdwJHAjTTn Sd/g9by+CLxzQt0Yz2yumF32WmiyRZkhFS35XCOgE6FQCnlZo+yNAVUuL3P/dH9fNJX14dajIlv HYu8a+VMBBwL6YlAKUXMQ9DkjZfqDBnUSOrii2lHTaygvC/8c/iAj0fw9LtnRDh3mK1RS9ne3mg == X-Received: by 2002:a1c:7318:0:b0:3cf:cb16:f24a with SMTP id d24-20020a1c7318000000b003cfcb16f24amr66471502wmb.182.1670347171816; Tue, 06 Dec 2022 09:19:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ttk1Nn18J5R+qPcRhzzvJF+up1sBGr41H/xn/C12WqF0Dj9Ee/NefvpIchw6O4V3ngDR8jQ== X-Received: by 2002:a1c:7318:0:b0:3cf:cb16:f24a with SMTP id d24-20020a1c7318000000b003cfcb16f24amr66471437wmb.182.1670347170316; Tue, 06 Dec 2022 09:19:30 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id o3-20020a5d4743000000b00228cbac7a25sm17476458wrs.64.2022.12.06.09.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 09:19:29 -0800 (PST) From: Andrew Burgess To: Simon Marchi via Gdb-patches , gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH 07/12] gdbsupport: move libxxhash configure check to gdbsupport In-Reply-To: <20221206135729.3937767-8-simon.marchi@efficios.com> References: <20221206135729.3937767-1-simon.marchi@efficios.com> <20221206135729.3937767-8-simon.marchi@efficios.com> Date: Tue, 06 Dec 2022 17:19:28 +0000 Message-ID: <87mt8030wv.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Simon Marchi via Gdb-patches writes: > The following patch moves the fast_hash function, which uses libxxhash, > to gdbsupport. Move the libxxhash configure check to gdbsupport (and > transitively to gdbserver). LGTM. Thanks, Andrew > > Change-Id: I242499e50c8cd6fe9f51e6e92dc53a1b3daaa96e > --- > gdb/configure | 5994 ++++++++++++++++++++-------------------- > gdb/configure.ac | 23 - > gdbserver/config.in | 3 + > gdbserver/configure | 514 ++++ > gdbsupport/Makefile.in | 3 + > gdbsupport/common.m4 | 24 + > gdbsupport/config.in | 3 + > gdbsupport/configure | 514 ++++ > 8 files changed, 4058 insertions(+), 3020 deletions(-) > > diff --git a/gdb/configure b/gdb/configure > index 23e6b7160ec..1b07e1e798c 100755 > --- a/gdb/configure > +++ b/gdb/configure > @@ -638,9 +638,6 @@ GDB_TRANSFORM_NAME > XSLTPROC > NM_H > GDB_NM_FILE > -LTLIBXXHASH > -LIBXXHASH > -HAVE_LIBXXHASH > CTF_DEPS > LIBCTF > LTLIBBABELTRACE > @@ -716,6 +713,9 @@ SYSTEM_GDBINIT > TARGET_SYSTEM_ROOT > CONFIG_LDFLAGS > RDYNAMIC > +LTLIBXXHASH > +LIBXXHASH > +HAVE_LIBXXHASH > LTLIBIPT > LIBIPT > HAVE_LIBIPT > @@ -947,6 +947,9 @@ enable_threading > with_intel_pt > with_libipt_prefix > with_libipt_type > +with_xxhash > +with_libxxhash_prefix > +with_libxxhash_type > with_sysroot > with_system_gdbinit > with_system_gdbinit_dir > @@ -965,10 +968,7 @@ enable_libbacktrace > with_babeltrace > with_libbabeltrace_prefix > with_libbabeltrace_type > -with_xxhash > enable_libctf > -with_libxxhash_prefix > -with_libxxhash_type > enable_unit_tests > ' > ac_precious_vars=3D'build_alias > @@ -1714,6 +1714,10 @@ Optional Packages: > --with-libipt-prefix[=3DDIR] search for libipt in DIR/include and DIR= /lib > --without-libipt-prefix don't search for libipt in includedir and = libdir > --with-libipt-type=3DTYPE type of library to search for (auto/stat= ic/shared) > + --with-xxhash use libxxhash for hashing (faster) (auto/yes/n= o) > + --with-libxxhash-prefix[=3DDIR] search for libxxhash in DIR/include a= nd DIR/lib > + --without-libxxhash-prefix don't search for libxxhash in includedi= r and libdir > + --with-libxxhash-type=3DTYPE type of library to search for (auto/s= tatic/shared) > --with-sysroot[=3DDIR] search for usr/lib et al within DIR > --with-system-gdbinit=3DPATH > automatically load a system-wide gdbinit file > @@ -1731,10 +1735,6 @@ Optional Packages: > --with-libbabeltrace-prefix[=3DDIR] search for libbabeltrace in DIR/i= nclude and DIR/lib > --without-libbabeltrace-prefix don't search for libbabeltrace in i= ncludedir and libdir > --with-libbabeltrace-type=3DTYPE type of library to search for (au= to/static/shared) > - --with-xxhash use libxxhash for hashing (faster) (auto/yes/n= o) > - --with-libxxhash-prefix[=3DDIR] search for libxxhash in DIR/include a= nd DIR/lib > - --without-libxxhash-prefix don't search for libxxhash in includedi= r and libdir > - --with-libxxhash-type=3DTYPE type of library to search for (auto/s= tatic/shared) > =20 > Some influential environment variables: > CC C compiler command > @@ -26973,3669 +26973,3633 @@ $as_echo "$bfd_cv_have_sys_procfs_type_elf_= fpregset_t" >&6; } > =20 > fi > =20 > + # Check for xxhash > =20 > -# Check the return and argument types of ptrace. > - > - > -for ac_header in sys/ptrace.h ptrace.h > -do : > - as_ac_Header=3D`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` > -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac= _includes_default" > -if eval test \"x\$"$as_ac_Header"\" =3D x"yes"; then : > - cat >>confdefs.h <<_ACEOF > -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 > -_ACEOF > - > -fi > - > -done > - > - > -gdb_ptrace_headers=3D' > -#include > -#if HAVE_SYS_PTRACE_H > -# include > -#endif > -#if HAVE_UNISTD_H > -# include > -#endif > -' > - > -# Check return type. Varargs (used on GNU/Linux) conflict with the > -# empty argument list, so check for that explicitly. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace"= >&5 > -$as_echo_n "checking return type of ptrace... " >&6; } > -if ${gdb_cv_func_ptrace_ret+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -=C2=A0$gdb_ptrace_headers > -int > -main () > -{ > -extern long ptrace (enum __ptrace_request, ...); > - > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_func_ptrace_ret=3D'long' > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$gdb_ptrace_headers > -int > -main () > -{ > -extern int ptrace (); > - > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_func_ptrace_ret=3D'int' > +# Check whether --with-xxhash was given. > +if test "${with_xxhash+set}" =3D set; then : > + withval=3D$with_xxhash; > else > - gdb_cv_func_ptrace_ret=3D'long' > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > + with_xxhash=3Dauto > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret= " >&5 > -$as_echo "$gdb_cv_func_ptrace_ret" >&6; } > - > =20 > -cat >>confdefs.h <<_ACEOF > -#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret > -_ACEOF > =20 > + if test "x$with_xxhash" !=3D "xno"; then > =20 > -# Check argument types. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for= ptrace" >&5 > -$as_echo_n "checking types of arguments for ptrace... " >&6; } > -if ${gdb_cv_func_ptrace_args+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$gdb_ptrace_headers > -int > -main () > -{ > -extern long ptrace (enum __ptrace_request, ...); > =20 > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_func_ptrace_args=3D'enum __ptrace_request,int,long,long' > -else > - for gdb_arg1 in 'int' 'long'; do > -=09for gdb_arg2 in 'pid_t' 'int' 'long'; do > -=09 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do > -=09 for gdb_arg4 in 'int' 'long' 'void *'; do > -=09 cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$gdb_ptrace_headers > -int > -main () > -{ > -extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, = $gdb_arg4); > =20 > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_func_ptrace_args=3D"$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; > -=09=09 break 4; > =20 > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > -=09 for gdb_arg5 in 'int *' 'int' 'long'; do > -=09=09cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$gdb_ptrace_headers > -int > -main () > -{ > -extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, = $gdb_arg4, $gdb_arg5); > =20 > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_func_ptrace_args=3D"$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gd= b_arg5"; > -=09=09 break 5; > =20 > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > -=09 done > -=09 done > -=09 done > -=09done > - done > - # Provide a safe default value. > - : ${gdb_cv_func_ptrace_args=3D'int,int,long,long'} > =20 > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + use_additional=3Dyes > =20 > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_arg= s" >&5 > -$as_echo "$gdb_cv_func_ptrace_args" >&6; } > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > =20 > -ac_save_IFS=3D$IFS; IFS=3D',' > -set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` > -IFS=3D$ac_save_IFS > -shift > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > =20 > -cat >>confdefs.h <<_ACEOF > -#define PTRACE_TYPE_ARG1 $1 > -_ACEOF > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > =20 > -cat >>confdefs.h <<_ACEOF > -#define PTRACE_TYPE_ARG3 $3 > -_ACEOF > +# Check whether --with-libxxhash-prefix was given. > +if test "${with_libxxhash_prefix+set}" =3D set; then : > + withval=3D$with_libxxhash_prefix; > + if test "X$withval" =3D "Xno"; then > + use_additional=3Dno > + else > + if test "X$withval" =3D "X"; then > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > =20 > -cat >>confdefs.h <<_ACEOF > -#define PTRACE_TYPE_ARG4 $4 > -_ACEOF > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > =20 > -if test -n "$5"; then > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > -cat >>confdefs.h <<_ACEOF > -#define PTRACE_TYPE_ARG5 $5 > -_ACEOF > + else > + additional_includedir=3D"$withval/include" > + additional_libdir=3D"$withval/lib" > + fi > + fi > =20 > fi > =20 > =20 > -if test "$cross_compiling" =3D no; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp take= s no argument" >&5 > -$as_echo_n "checking whether setpgrp takes no argument... " >&6; } > -if ${ac_cv_func_setpgrp_void+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test "$cross_compiling" =3D yes; then : > - as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$ac_includes_default > -int > -main () > -{ > -/* If this system has a BSD-style setpgrp which takes arguments, > - setpgrp(1, 1) will fail with ESRCH and return -1, in that case > - exit successfully. */ > - return setpgrp (1,1) !=3D -1; > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_run "$LINENO"; then : > - ac_cv_func_setpgrp_void=3Dno > +# Check whether --with-libxxhash-type was given. > +if test "${with_libxxhash_type+set}" =3D set; then : > + withval=3D$with_libxxhash_type; with_libxxhash_type=3D$withval > else > - ac_cv_func_setpgrp_void=3Dyes > -fi > -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > - conftest.$ac_objext conftest.beam conftest.$ac_ext > -fi > - > + with_libxxhash_type=3Dauto > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_voi= d" >&5 > -$as_echo "$ac_cv_func_setpgrp_void" >&6; } > -if test $ac_cv_func_setpgrp_void =3D yes; then > =20 > -$as_echo "#define SETPGRP_VOID 1" >>confdefs.h > + lib_type=3D`eval echo \$with_libxxhash_type` > =20 > -fi > - > -else > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp take= s no argument" >&5 > -$as_echo_n "checking whether setpgrp takes no argument... " >&6; } > -if ${ac_cv_func_setpgrp_void+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -int > -main () > -{ > -if (setpgrp(1,1) =3D=3D -1) > -=09 exit (0); > -=09 else > -=09 exit (1); > - > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - ac_cv_func_setpgrp_void=3Dno > -else > - ac_cv_func_setpgrp_void=3Dyes > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_voi= d" >&5 > -$as_echo "$ac_cv_func_setpgrp_void" >&6; } > -if test "$ac_cv_func_setpgrp_void" =3D yes; then > - $as_echo "#define SETPGRP_VOID 1" >>confdefs.h > - > -fi > -fi > - > -# Check if defines `struct thread' with a td_pcb member. > -ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_st= ruct_thread_td_pcb" "#include > -#include > - > -" > -if test "x$ac_cv_member_struct_thread_td_pcb" =3D xyes; then : > - > -cat >>confdefs.h <<_ACEOF > -#define HAVE_STRUCT_THREAD_TD_PCB 1 > -_ACEOF > - > - > -fi > - > - > -# See if defines `struct lwp`. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 > -$as_echo_n "checking for struct lwp... " >&6; } > -if ${gdb_cv_struct_lwp+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -=09 #define _KMEMUSER > -=09 #include > -int > -main () > -{ > -struct lwp l; > - > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_struct_lwp=3Dyes > -else > - gdb_cv_struct_lwp=3Dno > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 > -$as_echo "$gdb_cv_struct_lwp" >&6; } > -if test "$gdb_cv_struct_lwp" =3D yes; then > - > -$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h > - > -fi > - > -# See if degines `struct reg'. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in mach= ine/reg.h" >&5 > -$as_echo_n "checking for struct reg in machine/reg.h... " >&6; } > -if ${gdb_cv_struct_reg+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -=09 #include > -int > -main () > -{ > -struct reg r; > - > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_struct_reg=3Dyes > -else > - gdb_cv_struct_reg=3Dno > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 > -$as_echo "$gdb_cv_struct_reg" >&6; } > -if test "$gdb_cv_struct_reg" =3D yes; then > - > -$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h > - > -fi > - > -# 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'. > -ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_= reg_r_fs" "#include > -#include > -" > -if test "x$ac_cv_member_struct_reg_r_fs" =3D xyes; then : > - > -cat >>confdefs.h <<_ACEOF > -#define HAVE_STRUCT_REG_R_FS 1 > -_ACEOF > - > - > -fi > -ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_= reg_r_gs" "#include > -#include > -" > -if test "x$ac_cv_member_struct_reg_r_gs" =3D xyes; then : > - > -cat >>confdefs.h <<_ACEOF > -#define HAVE_STRUCT_REG_R_GS 1 > -_ACEOF > - > - > -fi > - > - > -# See if provides the PTRACE_GETREGS request. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&= 5 > -$as_echo_n "checking for PTRACE_GETREGS... " >&6; } > -if ${gdb_cv_have_ptrace_getregs+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -int > -main () > -{ > -PTRACE_GETREGS; > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_have_ptrace_getregs=3Dyes > -else > - gdb_cv_have_ptrace_getregs=3Dno > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > -fi > - > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_get= regs" >&5 > -$as_echo "$gdb_cv_have_ptrace_getregs" >&6; } > -if test "$gdb_cv_have_ptrace_getregs" =3D yes; then > - > -$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h > - > -fi > - > -# See if provides the PTRACE_GETFPXREGS request. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS"= >&5 > -$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } > -if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -int > -main () > -{ > -PTRACE_GETFPXREGS; > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_have_ptrace_getfpxregs=3Dyes > -else > - gdb_cv_have_ptrace_getfpxregs=3Dno > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > -fi > - > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_get= fpxregs" >&5 > -$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } > -if test "$gdb_cv_have_ptrace_getfpxregs" =3D yes; then > - > -$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h > - > -fi > - > -# See if provides the PT_GETDBREGS request. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 > -$as_echo_n "checking for PT_GETDBREGS... " >&6; } > -if ${gdb_cv_have_pt_getdbregs+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -=09 #include > -int > -main () > -{ > -PT_GETDBREGS; > - > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_have_pt_getdbregs=3Dyes > -else > - gdb_cv_have_pt_getdbregs=3Dno > - > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + LIBXXHASH=3D > + LTLIBXXHASH=3D > + INCXXHASH=3D > + rpathdirs=3D > + ltrpathdirs=3D > + names_already_handled=3D > + names_next_round=3D'xxhash ' > + while test -n "$names_next_round"; do > + names_this_round=3D"$names_next_round" > + names_next_round=3D > + for name in $names_this_round; do > + already_handled=3D > + for n in $names_already_handled; do > + if test "$n" =3D "$name"; then > + already_handled=3Dyes > + break > + fi > + done > + if test -z "$already_handled"; then > + names_already_handled=3D"$names_already_handled $name" > + uppername=3D`echo "$name" | sed -e 'y|abcdefghij= klmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` > + eval value=3D\"\$HAVE_LIB$uppername\" > + if test -n "$value"; then > + if test "$value" =3D yes; then > + eval value=3D\"\$LIB$uppername\" > + test -z "$value" || LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $value" > + eval value=3D\"\$LTLIB$uppername\" > + test -z "$value" || LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHA= SH:+ }$value" > + else > + : > + fi > + else > + found_dir=3D > + found_la=3D > + found_so=3D > + found_a=3D > + if test $use_additional =3D yes; then > + if test -n "$shlibext" && test -f "$additional_libdir/lib$na= me.$shlibext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$additional_libdir" > + found_so=3D"$additional_libdir/lib$name.$shlibext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$additional_libdir/lib$name.$libext"; then > + found_dir=3D"$additional_libdir" > + found_a=3D"$additional_libdir/lib$name.$libext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + fi > + fi > + fi > + if test "X$found_dir" =3D "X"; then > + for x in $LDFLAGS $LTLIBXXHASH; do > =20 > -fi > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbre= gs" >&5 > -$as_echo "$gdb_cv_have_pt_getdbregs" >&6; } > -if test "$gdb_cv_have_pt_getdbregs" =3D yes; then > + case "$x" in > + -L*) > + dir=3D`echo "X$x" | sed -e 's/^X-L//'` > + if test -n "$shlibext" && test -f "$dir/lib$name.$shli= bext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$dir" > + found_so=3D"$dir/lib$name.$shlibext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$dir/lib$name.$libext"; then > + found_dir=3D"$dir" > + found_a=3D"$dir/lib$name.$libext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + fi > + fi > + ;; > + esac > + if test "X$found_dir" !=3D "X"; then > + break > + fi > + done > + fi > + if test "X$found_dir" !=3D "X"; then > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-L= $found_dir -l$name" > + if test "X$found_so" !=3D "X"; then > + if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_so" > + else > + = haveit=3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $found_dir" > + fi > + if test "$hardcode_direct" =3D yes; then > + LIBXXHASH=3D"${LIB= XXHASH}${LIBXXHASH:+ }$found_so" > + else > + if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > + LIBXXHASH=3D= "${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + haveit=3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $found_dir" > + fi > + else > + = haveit=3D > + for x in $LDFLAGS $LIBXXHASH; do > =20 > -$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > -fi > + if test "X$x" =3D "X-L$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-L$found_d= ir" > + fi > + if test "$hardcode_minus_L" !=3D no; then > + = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + else > + = = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$nam= e" > + fi > + fi > + fi > + fi > + else > + if test "X$found_a" !=3D "X"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_a" > + else > + LIBXXHASH=3D"${LIBXXHASH= }${LIBXXHASH:+ }-L$found_dir -l$name" > + fi > + fi > + additional_includedir=3D > + case "$found_dir" in > + */lib | */lib/) > + basedir=3D`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/l= ib/*$,,'` > + additional_includedir=3D"$basedir/include" > + ;; > + esac > + if test "X$additional_includedir" !=3D "X"; then > + = if test "X$additional_includedir" != =3D "X/usr/include"; then > + haveit=3D > + if test "X$additional_includedir" =3D "X/usr/local/inclu= de"; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + for x in $CPPFLAGS $INCXXHASH; do > =20 > -# See if supports LWP names on FreeBSD > -# Older FreeBSD versions don't have the pl_tdname member of > -# `struct ptrace_lwpinfo'. > -ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_c= v_member_struct_ptrace_lwpinfo_pl_tdname" "#include > -" > -if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" =3D xyes; then = : > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > -cat >>confdefs.h <<_ACEOF > -#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 > -_ACEOF > + if test "X$x" =3D "X-I$additional_includedir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_includedir"; then > + INCXXHASH=3D"${INCXXHASH}${I= NCXXHASH:+ }-I$additional_includedir" > + fi > + fi > + fi > + fi > + fi > + if test -n "$found_la"; then > + save_libdir=3D"$= libdir" > + case "$found_la" in > + */* | *\\*) . "$found_la" ;; > + *) . "./$found_la" ;; > + esac > + libdir=3D"$save_libdir" > + for dep in $dependency_libs; do > + case "$dep" in > + -L*) > + additional_libdir=3D`echo "X$dep" | sed -e 's/^X-L//= '` > + = = if test "X$additional_libdir" !=3D "X/usr/lib"; then > + haveit=3D > + if test "X$additional_libdir" =3D "X/usr/local/lib= "; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + haveit=3D > + for x in $LDFLAGS $LIBXXHASH; do > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > -fi > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LIBXXHASH=3D"${L= IBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" > + fi > + fi > + haveit=3D > + for x in $LDFLAGS $LTLIBXXHASH; do > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > -# See if supports syscall fields on FreeBSD. The > -# pl_syscall_code member of `struct ptrace_lwpinfo' was added in > -# FreeBSD 10.3. > -ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code"= "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include > -" > -if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" =3D xyes;= then : > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LTLIBXXHASH=3D"$= {LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" > + fi > + fi > + fi > + fi > + ;; > + -R*) > + dir=3D`echo "X$dep" | sed -e 's/^X-R//'` > + if test "$enable_rpath" !=3D no; then > + haveit= =3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $dir" > + fi > + haveit= =3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $dir" > + fi > + fi > + ;; > + -l*) > + names_next_round=3D"$names_next_= round "`echo "X$dep" | sed -e 's/^X-l//'` > + ;; > + *.la) > + = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > + ;; > + *) > + LIBXXHASH=3D"${LIBXXHASH}${LIBXX= HASH:+ }$dep" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" > + ;; > + esac > + done > + fi > + else > + if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$name" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" > + else > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libex= t" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.= $libext" > + fi > + fi > + fi > + fi > + done > + done > + if test "X$rpathdirs" !=3D "X"; then > + if test -n "$hardcode_libdir_separator"; then > + alldirs=3D > + for found_dir in $rpathdirs; do > + alldirs=3D"${alldirs}${alldirs:+$hardcode_libdir_separator}$foun= d_dir" > + done > + acl_save_libdir=3D"$libdir" > + libdir=3D"$alldirs" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + else > + for found_dir in $rpathdirs; do > + acl_save_libdir=3D"$libdir" > + libdir=3D"$found_dir" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + done > + fi > + fi > + if test "X$ltrpathdirs" !=3D "X"; then > + for found_dir in $ltrpathdirs; do > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" > + done > + fi > =20 > -cat >>confdefs.h <<_ACEOF > -#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 > -_ACEOF > =20 > + ac_save_CPPFLAGS=3D"$CPPFLAGS" > =20 > -fi > + for element in $INCXXHASH; do > + haveit=3D > + for x in $CPPFLAGS; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > + if test "X$x" =3D "X$element"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + CPPFLAGS=3D"${CPPFLAGS}${CPPFLAGS:+ }$element" > + fi > + done > =20 > -# Check if the compiler supports the `long long' type. > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support = in compiler" >&5 > -$as_echo_n "checking for long long support in compiler... " >&6; } > -if ${gdb_cv_c_long_long+:} false; then : > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 > +$as_echo_n "checking for libxxhash... " >&6; } > +if ${ac_cv_libxxhash+:} false; then : > $as_echo_n "(cached) " >&6 > else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + > + ac_save_LIBS=3D"$LIBS" > + LIBS=3D"$LIBS $LIBXXHASH" > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -extern long long foo; > +#include > int > main () > { > -switch (foo & 2) { case 0: return 1; } > +XXH32("foo", 3, 0); > + > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_c_long_long=3Dyes > +if ac_fn_c_try_link "$LINENO"; then : > + ac_cv_libxxhash=3Dyes > else > - gdb_cv_c_long_long=3Dno > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + ac_cv_libxxhash=3Dno > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&= 5 > -$as_echo "$gdb_cv_c_long_long" >&6; } > -if test "$gdb_cv_c_long_long" !=3D yes; then > - # libdecnumber requires long long. > - as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + LIBS=3D"$ac_save_LIBS" > + > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 > +$as_echo "$ac_cv_libxxhash" >&6; } > + if test "$ac_cv_libxxhash" =3D yes; then > + HAVE_LIBXXHASH=3Dyes > =20 > -# Check if the compiler and runtime support printing decfloats. > +$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support i= n printf" >&5 > -$as_echo_n "checking for decfloat support in printf... " >&6; } > -if ${gdb_cv_printf_has_decfloat+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test "$cross_compiling" =3D yes; then : > - gdb_cv_printf_has_decfloat=3Dno > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$ac_includes_default > -int > -main () > -{ > -char buf[64]; > - _Decimal32 d32 =3D 1.2345df; > - _Decimal64 d64 =3D 1.2345dd; > - _Decimal128 d128 =3D 1.2345dl; > - sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d6= 4, d128); > - return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2= 345", buf)); > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_run "$LINENO"; then : > - gdb_cv_printf_has_decfloat=3Dyes > -else > - gdb_cv_printf_has_decfloat=3Dno > -fi > -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > - conftest.$ac_objext conftest.beam conftest.$ac_ext > -fi > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= ibxxhash" >&5 > +$as_echo_n "checking how to link with libxxhash... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 > +$as_echo "$LIBXXHASH" >&6; } > + else > + HAVE_LIBXXHASH=3Dno > + CPPFLAGS=3D"$ac_save_CPPFLAGS" > + LIBXXHASH=3D > + LTLIBXXHASH=3D > + fi > =20 > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decf= loat" >&5 > -$as_echo "$gdb_cv_printf_has_decfloat" >&6; } > -if test "$gdb_cv_printf_has_decfloat" =3D yes; then > =20 > -$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h > =20 > -fi > =20 > -# Check if the compiler supports the `long double' type. We can't use > -# AC_C_LONG_DOUBLE because that one does additional checks on the > -# constants defined in that fail on some systems, > -# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double suppor= t in compiler" >&5 > -$as_echo_n "checking for long double support in compiler... " >&6; } > -if ${gdb_cv_c_long_double+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -long double foo; > -_ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_c_long_double=3Dyes > -else > - gdb_cv_c_long_double=3Dno > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" = >&5 > -$as_echo "$gdb_cv_c_long_double" >&6; } > -if test "$gdb_cv_c_long_double" =3D yes; then > =20 > -$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h > + if test "$HAVE_LIBXXHASH" !=3D yes; then > + if test "$with_xxhash" =3D yes; then > +=09as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 > + fi > + fi > + if test "x$with_xxhash" =3D "xauto"; then > + with_xxhash=3D"$HAVE_LIBXXHASH" > + fi > + fi > =20 > -fi > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhas= h" >&5 > +$as_echo_n "checking whether to use xxhash... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 > +$as_echo "$with_xxhash" >&6; } > =20 > -# Check if the compiler and runtime support printing long doubles. > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double suppor= t in printf" >&5 > -$as_echo_n "checking for long double support in printf... " >&6; } > -if ${gdb_cv_printf_has_long_double+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - if test "$cross_compiling" =3D yes; then : > - gdb_cv_printf_has_long_double=3Dno > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -$ac_includes_default > -int > -main () > -{ > -char buf[16]; > - long double f =3D 3.141592653; > - sprintf (buf, "%Lg", f); > - return (strncmp ("3.14159", buf, 7)); > - ; > - return 0; > -} > +# Check the return and argument types of ptrace. > + > + > +for ac_header in sys/ptrace.h ptrace.h > +do : > + as_ac_Header=3D`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` > +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac= _includes_default" > +if eval test \"x\$"$as_ac_Header"\" =3D x"yes"; then : > + cat >>confdefs.h <<_ACEOF > +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 > _ACEOF > -if ac_fn_c_try_run "$LINENO"; then : > - gdb_cv_printf_has_long_double=3Dyes > -else > - gdb_cv_printf_has_long_double=3Dno > -fi > -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > - conftest.$ac_objext conftest.beam conftest.$ac_ext > -fi > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long= _double" >&5 > -$as_echo "$gdb_cv_printf_has_long_double" >&6; } > -if test "$gdb_cv_printf_has_long_double" =3D yes; then > =20 > -$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h > +done > =20 > -fi > =20 > -# Check if the compiler and runtime support scanning long doubles. > +gdb_ptrace_headers=3D' > +#include > +#if HAVE_SYS_PTRACE_H > +# include > +#endif > +#if HAVE_UNISTD_H > +# include > +#endif > +' > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double suppor= t in scanf" >&5 > -$as_echo_n "checking for long double support in scanf... " >&6; } > -if ${gdb_cv_scanf_has_long_double+:} false; then : > +# Check return type. Varargs (used on GNU/Linux) conflict with the > +# empty argument list, so check for that explicitly. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace"= >&5 > +$as_echo_n "checking return type of ptrace... " >&6; } > +if ${gdb_cv_func_ptrace_ret+:} false; then : > $as_echo_n "(cached) " >&6 > -else > - if test "$cross_compiling" =3D yes; then : > - gdb_cv_scanf_has_long_double=3Dno > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +=C2=A0$gdb_ptrace_headers > int > main () > { > -char *buf =3D "3.141592653"; > - long double f =3D 0; > - sscanf (buf, "%Lg", &f); > - return !(f > 3.14159 && f < 3.14160); > +extern long ptrace (enum __ptrace_request, ...); > + > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_run "$LINENO"; then : > - gdb_cv_scanf_has_long_double=3Dyes > -else > - gdb_cv_scanf_has_long_double=3Dno > -fi > -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > - conftest.$ac_objext conftest.beam conftest.$ac_ext > -fi > - > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_= double" >&5 > -$as_echo "$gdb_cv_scanf_has_long_double" >&6; } > -if test "$gdb_cv_scanf_has_long_double" =3D yes; then > - > -$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h > - > -fi > - > -case ${host_os} in > -aix*) > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option"= >&5 > -$as_echo_n "checking for -bbigtoc option... " >&6; } > -if ${gdb_cv_bigtoc+:} false; then : > - $as_echo_n "(cached) " >&6 > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_func_ptrace_ret=3D'long' > else > - SAVE_LDFLAGS=3D$LDFLAGS > - > - case $GCC in > - yes) gdb_cv_bigtoc=3D-Wl,-bbigtoc ;; > - *) gdb_cv_bigtoc=3D-bbigtoc ;; > - esac > - > - LDFLAGS=3D$LDFLAGS\ $gdb_cv_bigtoc > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > - > +$gdb_ptrace_headers > int > main () > { > -int i; > +extern int ptrace (); > + > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_func_ptrace_ret=3D'int' > else > - gdb_cv_bigtoc=3D > + gdb_cv_func_ptrace_ret=3D'long' > =20 > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > - LDFLAGS=3D"${SAVE_LDFLAGS}" > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 > -$as_echo "$gdb_cv_bigtoc" >&6; } > - CONFIG_LDFLAGS=3D"${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" > - ;; > -esac > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret= " >&5 > +$as_echo "$gdb_cv_func_ptrace_ret" >&6; } > + > + > +cat >>confdefs.h <<_ACEOF > +#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret > +_ACEOF > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export= flag" >&5 > -$as_echo_n "checking for the dynamic export flag... " >&6; } > -dynamic_list=3Dfalse > -if test "${gdb_native}" =3D yes; then > - # The dynamically loaded libthread_db needs access to symbols in the = gdb > - # executable. Older GNU ld supports --export-dynamic but --dynamic-l= ist > - # may not be supported there. > - old_LDFLAGS=3D"$LDFLAGS" > - # Older GNU ld supports --export-dynamic but --dynamic-list it does n= ot. > - RDYNAMIC=3D"-Wl,--dynamic-list=3D${srcdir}/proc-service.list" > - LDFLAGS=3D"$LDFLAGS $RDYNAMIC" > - if test "${have_libpython}" =3D no; then > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > =20 > +# Check argument types. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for= ptrace" >&5 > +$as_echo_n "checking types of arguments for ptrace... " >&6; } > +if ${gdb_cv_func_ptrace_args+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +$gdb_ptrace_headers > int > main () > { > +extern long ptrace (enum __ptrace_request, ...); > =20 > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - dynamic_list=3Dtrue > -fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > - else > - # Workaround http://bugs.python.org/issue4434 where static > - # libpythonX.Y.a would get its symbols required for > - # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. > - # Problem does not happen for the recommended libpythonX.Y.so linka= ge. > - > - # Note the workaround for Python > - # http://bugs.python.org/issue10112 earlier has removed > - # -export-dynamic from PYTHON_LIBS. That's exactly what we want > - # here too, as otherwise it'd make this -Wl,--dynamic-list test > - # always pass. > - old_CFLAGS=3D"$CFLAGS" > - CFLAGS=3D"$CFLAGS $PYTHON_CFLAGS" > - old_LIBS=3D"$LIBS" > - LIBS=3D"$LIBS $PYTHON_LIBS" > - old_CPPFLAGS=3D"$CPPFLAGS" > - CPPFLAGS=3D"$CPPFLAGS $PYTHON_CPPFLAGS" > - if test "$cross_compiling" =3D yes; then : > - true > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_func_ptrace_args=3D'enum __ptrace_request,int,long,long' > else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + for gdb_arg1 in 'int' 'long'; do > +=09for gdb_arg2 in 'pid_t' 'int' 'long'; do > +=09 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do > +=09 for gdb_arg4 in 'int' 'long' 'void *'; do > +=09 cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include "Python.h" > +$gdb_ptrace_headers > int > main () > { > -int err; > - Py_Initialize (); > - err =3D PyRun_SimpleString ("import ctypes\n"); > - Py_Finalize (); > - return err =3D=3D 0 ? 0 : 1; > +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, = $gdb_arg4); > + > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_run "$LINENO"; then : > - dynamic_list=3Dtrue > -fi > -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > - conftest.$ac_objext conftest.beam conftest.$ac_ext > -fi > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_func_ptrace_args=3D"$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; > +=09=09 break 4; > =20 > - LIBS=3D"$old_LIBS" > - CFLAGS=3D"$old_CFLAGS" > - CPPFLAGS=3D"$old_CPPFLAGS" > - fi > - LDFLAGS=3D"$old_LDFLAGS" > -fi > -if $dynamic_list; then > - found=3D"-Wl,--dynamic-list" > - RDYNAMIC=3D'-Wl,--dynamic-list=3D$(srcdir)/proc-service.list' > -else > - found=3D"-rdynamic" > - RDYNAMIC=3D"-rdynamic" > fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 > -$as_echo "$found" >&6; } > - > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h bac= ktrace is available" >&5 > -$as_echo_n "checking whether execinfo.h backtrace is available... " >&6;= } > -if ${gdb_cv_execinfo_backtrace+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +=09 for gdb_arg5 in 'int *' 'int' 'long'; do > +=09=09cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > - > - #include > - > +$gdb_ptrace_headers > int > main () > { > - > - int f; > - void *b[2]; > - f =3D backtrace (b, 2); > - backtrace_symbols_fd (b, f, 2); > +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, = $gdb_arg4, $gdb_arg5); > =20 > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - gdb_cv_execinfo_backtrace=3Dyes > -else > - gdb_cv_execinfo_backtrace=3Dno > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_func_ptrace_args=3D"$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gd= b_arg5"; > +=09=09 break 5; > + > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +=09 done > +=09 done > +=09 done > +=09done > + done > + # Provide a safe default value. > + : ${gdb_cv_func_ptrace_args=3D'int,int,long,long'} > + > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtr= ace" >&5 > -$as_echo "$gdb_cv_execinfo_backtrace" >&6; } > -if test "$gdb_cv_execinfo_backtrace" =3D yes; then > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > -$as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_arg= s" >&5 > +$as_echo "$gdb_cv_func_ptrace_args" >&6; } > + > +ac_save_IFS=3D$IFS; IFS=3D',' > +set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` > +IFS=3D$ac_save_IFS > +shift > + > +cat >>confdefs.h <<_ACEOF > +#define PTRACE_TYPE_ARG1 $1 > +_ACEOF > + > + > +cat >>confdefs.h <<_ACEOF > +#define PTRACE_TYPE_ARG3 $3 > +_ACEOF > + > + > +cat >>confdefs.h <<_ACEOF > +#define PTRACE_TYPE_ARG4 $4 > +_ACEOF > + > +if test -n "$5"; then > + > +cat >>confdefs.h <<_ACEOF > +#define PTRACE_TYPE_ARG5 $5 > +_ACEOF > =20 > fi > =20 > =20 > -if test "${build}" =3D "${host}" -a "${host}" =3D "${target}" ; then > - case ${host_os} in > - aix*) > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread d= ebugging library" >&5 > -$as_echo_n "checking for AiX thread debugging library... " >&6; } > - if ${gdb_cv_have_aix_thread_debug+:} false; then : > +if test "$cross_compiling" =3D no; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp take= s no argument" >&5 > +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } > +if ${ac_cv_func_setpgrp_void+:} false; then : > $as_echo_n "(cached) " >&6 > +else > + if test "$cross_compiling" =3D yes; then : > + as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +$ac_includes_default > int > main () > { > -#ifndef PTHDB_VERSION_3 > -=09 #error > -=09 #endif > - > +/* If this system has a BSD-style setpgrp which takes arguments, > + setpgrp(1, 1) will fail with ESRCH and return -1, in that case > + exit successfully. */ > + return setpgrp (1,1) !=3D -1; > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_have_aix_thread_debug=3Dyes > +if ac_fn_c_try_run "$LINENO"; then : > + ac_cv_func_setpgrp_void=3Dno > else > - gdb_cv_have_aix_thread_debug=3Dno > - > + ac_cv_func_setpgrp_void=3Dyes > fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > fi > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_= thread_debug" >&5 > -$as_echo "$gdb_cv_have_aix_thread_debug" >&6; } > - if test "$gdb_cv_have_aix_thread_debug" =3D yes; then > - CONFIG_SRCS=3D"${CONFIG_SRCS} aix-thread.c" > - CONFIG_OBS=3D"${CONFIG_OBS} aix-thread.o" > - LIBS=3D"$LIBS -lpthdebug" > - > - # Older versions of AIX do not provide the declaration for > - # the getthrds function (it appears that it was introduced > - # with AIX 6.x). > - ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthr= ds" "#include > -" > -if test "x$ac_cv_have_decl_getthrds" =3D xyes; then : > - ac_have_decl=3D1 > -else > - ac_have_decl=3D0 > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_voi= d" >&5 > +$as_echo "$ac_cv_func_setpgrp_void" >&6; } > +if test $ac_cv_func_setpgrp_void =3D yes; then > =20 > -cat >>confdefs.h <<_ACEOF > -#define HAVE_DECL_GETTHRDS $ac_have_decl > -_ACEOF > - > - fi > - ;; > - esac > +$as_echo "#define SETPGRP_VOID 1" >>confdefs.h > =20 > fi > - > -if test "x$ac_cv_header_thread_db_h" =3D "xyes"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTALLOC" >&5 > -$as_echo_n "checking whether has TD_NOTALLOC... " >&6; } > -if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : > + > +else > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp take= s no argument" >&5 > +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } > +if ${ac_cv_func_setpgrp_void+:} false; then : > $as_echo_n "(cached) " >&6 > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +#include > int > main () > { > -int i =3D TD_NOTALLOC; > +if (setpgrp(1,1) =3D=3D -1) > +=09 exit (0); > +=09 else > +=09 exit (1); > =20 > ; > return 0; > } > _ACEOF > if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_thread_db_h_has_td_notalloc=3Dyes > + ac_cv_func_setpgrp_void=3Dno > else > - gdb_cv_thread_db_h_has_td_notalloc=3Dno > + ac_cv_func_setpgrp_void=3Dyes > =20 > fi > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has= _td_notalloc" >&5 > -$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_voi= d" >&5 > +$as_echo "$ac_cv_func_setpgrp_void" >&6; } > +if test "$ac_cv_func_setpgrp_void" =3D yes; then > + $as_echo "#define SETPGRP_VOID 1" >>confdefs.h > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_VERSION" >&5 > -$as_echo_n "checking whether has TD_VERSION... " >&6; } > -if ${gdb_cv_thread_db_h_has_td_version+:} false; then : > +fi > +fi > + > +# Check if defines `struct thread' with a td_pcb member. > +ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_st= ruct_thread_td_pcb" "#include > +#include > + > +" > +if test "x$ac_cv_member_struct_thread_td_pcb" =3D xyes; then : > + > +cat >>confdefs.h <<_ACEOF > +#define HAVE_STRUCT_THREAD_TD_PCB 1 > +_ACEOF > + > + > +fi > + > + > +# See if defines `struct lwp`. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 > +$as_echo_n "checking for struct lwp... " >&6; } > +if ${gdb_cv_struct_lwp+:} false; then : > $as_echo_n "(cached) " >&6 > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +#include > +=09 #define _KMEMUSER > +=09 #include > int > main () > { > -int i =3D TD_VERSION; > +struct lwp l; > =20 > ; > return 0; > } > _ACEOF > if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_thread_db_h_has_td_version=3Dyes > + gdb_cv_struct_lwp=3Dyes > else > - gdb_cv_thread_db_h_has_td_version=3Dno > + gdb_cv_struct_lwp=3Dno > =20 > fi > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has= _td_version" >&5 > -$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 > +$as_echo "$gdb_cv_struct_lwp" >&6; } > +if test "$gdb_cv_struct_lwp" =3D yes; then > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTLS" >&5 > -$as_echo_n "checking whether has TD_NOTLS... " >&6; } > -if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : > +$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h > + > +fi > + > +# See if degines `struct reg'. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in mach= ine/reg.h" >&5 > +$as_echo_n "checking for struct reg in machine/reg.h... " >&6; } > +if ${gdb_cv_struct_reg+:} false; then : > $as_echo_n "(cached) " >&6 > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +#include > +=09 #include > int > main () > { > -int i =3D TD_NOTLS; > +struct reg r; > =20 > ; > return 0; > } > _ACEOF > if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_thread_db_h_has_td_notls=3Dyes > + gdb_cv_struct_reg=3Dyes > else > - gdb_cv_thread_db_h_has_td_notls=3Dno > + gdb_cv_struct_reg=3Dno > =20 > fi > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has= _td_notls" >&5 > -$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } > -fi > -if test "x$gdb_cv_thread_db_h_has_td_notalloc" =3D "xyes"; then > - > -$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h > - > -fi > -if test "x$gdb_cv_thread_db_h_has_td_version" =3D "xyes"; then > - > -$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h > - > -fi > -if test "x$gdb_cv_thread_db_h_has_td_notls" =3D "xyes"; then > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 > +$as_echo "$gdb_cv_struct_reg" >&6; } > +if test "$gdb_cv_struct_reg" =3D yes; then > =20 > -$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h > +$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h > =20 > fi > =20 > -case $host_os in > - go32* | *djgpp*) > - gdbinit=3Dgdb.ini > - ;; > - *) > - gdbinit=3D.gdbinit > - ;; > -esac > - > -cat >>confdefs.h <<_ACEOF > -#define GDBINIT "$gdbinit" > -_ACEOF > - > - > +# 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'. > +ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_= reg_r_fs" "#include > +#include > +" > +if test "x$ac_cv_member_struct_reg_r_fs" =3D xyes; then : > =20 > cat >>confdefs.h <<_ACEOF > -#define GDBEARLYINIT ".gdbearlyinit" > +#define HAVE_STRUCT_REG_R_FS 1 > _ACEOF > =20 > =20 > - > -# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, > -# except that the argument to --with-sysroot is optional. > -# --with-sysroot (or --with-sysroot=3Dyes) sets the default sysroot path= . > -if test "x$with_sysroot" =3D xyes; then > - with_sysroot=3D"${exec_prefix}/${target_alias}/sys-root" > -fi > - > -# Check whether --with-sysroot was given. > -if test "${with_sysroot+set}" =3D set; then : > - withval=3D$with_sysroot; TARGET_SYSTEM_ROOT=3D$withval > -else > - TARGET_SYSTEM_ROOT=3D > fi > - > - > - test "x$prefix" =3D xNONE && prefix=3D"$ac_default_prefix" > - test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' > - ac_define_dir=3D`eval echo $TARGET_SYSTEM_ROOT` > - ac_define_dir=3D`eval echo $ac_define_dir` > +ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_= reg_r_gs" "#include > +#include > +" > +if test "x$ac_cv_member_struct_reg_r_gs" =3D xyes; then : > =20 > cat >>confdefs.h <<_ACEOF > -#define TARGET_SYSTEM_ROOT "$ac_define_dir" > +#define HAVE_STRUCT_REG_R_GS 1 > _ACEOF > =20 > =20 > +fi > =20 > =20 > - if test "x$exec_prefix" =3D xNONE || test "x$exec_prefix" =3D 'x${pref= ix}'; then > - if test "x$prefix" =3D xNONE; then > - =09test_prefix=3D/usr/local > - else > -=09test_prefix=3D$prefix > - fi > - else > - test_prefix=3D$exec_prefix > - fi > - value=3D0 > - case ${ac_define_dir} in > - "${test_prefix}"|"${test_prefix}/"*|\ > -=09'${exec_prefix}'|'${exec_prefix}/'*) > - value=3D1 > - ;; > - esac > - > -cat >>confdefs.h <<_ACEOF > -#define TARGET_SYSTEM_ROOT_RELOCATABLE $value > +# See if provides the PTRACE_GETREGS request. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&= 5 > +$as_echo_n "checking for PTRACE_GETREGS... " >&6; } > +if ${gdb_cv_have_ptrace_getregs+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +int > +main () > +{ > +PTRACE_GETREGS; > + ; > + return 0; > +} > _ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_have_ptrace_getregs=3Dyes > +else > + gdb_cv_have_ptrace_getregs=3Dno > =20 > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > +fi > =20 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_get= regs" >&5 > +$as_echo "$gdb_cv_have_ptrace_getregs" >&6; } > +if test "$gdb_cv_have_ptrace_getregs" =3D yes; then > =20 > +$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h > =20 > -# Check whether --with-system-gdbinit was given. > -if test "${with_system_gdbinit+set}" =3D set; then : > - withval=3D$with_system_gdbinit; > - SYSTEM_GDBINIT=3D$withval > -else > - SYSTEM_GDBINIT=3D > fi > =20 > +# See if provides the PTRACE_GETFPXREGS request. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS"= >&5 > +$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } > +if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +int > +main () > +{ > +PTRACE_GETFPXREGS; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_have_ptrace_getfpxregs=3Dyes > +else > + gdb_cv_have_ptrace_getfpxregs=3Dno > =20 > - test "x$prefix" =3D xNONE && prefix=3D"$ac_default_prefix" > - test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' > - ac_define_dir=3D`eval echo $SYSTEM_GDBINIT` > - ac_define_dir=3D`eval echo $ac_define_dir` > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > -cat >>confdefs.h <<_ACEOF > -#define SYSTEM_GDBINIT "$ac_define_dir" > -_ACEOF > +fi > =20 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_get= fpxregs" >&5 > +$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } > +if test "$gdb_cv_have_ptrace_getfpxregs" =3D yes; then > =20 > +$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h > =20 > +fi > =20 > - if test "x$exec_prefix" =3D xNONE || test "x$exec_prefix" =3D 'x${pref= ix}'; then > - if test "x$prefix" =3D xNONE; then > - =09test_prefix=3D/usr/local > - else > -=09test_prefix=3D$prefix > - fi > - else > - test_prefix=3D$exec_prefix > - fi > - value=3D0 > - case ${ac_define_dir} in > - "${test_prefix}"|"${test_prefix}/"*|\ > -=09'${exec_prefix}'|'${exec_prefix}/'*) > - value=3D1 > - ;; > - esac > +# See if provides the PT_GETDBREGS request. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 > +$as_echo_n "checking for PT_GETDBREGS... " >&6; } > +if ${gdb_cv_have_pt_getdbregs+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +=09 #include > +int > +main () > +{ > +PT_GETDBREGS; > =20 > -cat >>confdefs.h <<_ACEOF > -#define SYSTEM_GDBINIT_RELOCATABLE $value > + ; > + return 0; > +} > _ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_have_pt_getdbregs=3Dyes > +else > + gdb_cv_have_pt_getdbregs=3Dno > =20 > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > +fi > =20 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbre= gs" >&5 > +$as_echo "$gdb_cv_have_pt_getdbregs" >&6; } > +if test "$gdb_cv_have_pt_getdbregs" =3D yes; then > =20 > +$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h > =20 > -# Check whether --with-system-gdbinit-dir was given. > -if test "${with_system_gdbinit_dir+set}" =3D set; then : > - withval=3D$with_system_gdbinit_dir; > - SYSTEM_GDBINIT_DIR=3D$withval > -else > - SYSTEM_GDBINIT_DIR=3D > fi > =20 > - > - test "x$prefix" =3D xNONE && prefix=3D"$ac_default_prefix" > - test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' > - ac_define_dir=3D`eval echo $SYSTEM_GDBINIT_DIR` > - ac_define_dir=3D`eval echo $ac_define_dir` > +# See if supports LWP names on FreeBSD > +# Older FreeBSD versions don't have the pl_tdname member of > +# `struct ptrace_lwpinfo'. > +ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_c= v_member_struct_ptrace_lwpinfo_pl_tdname" "#include > +" > +if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" =3D xyes; then = : > =20 > cat >>confdefs.h <<_ACEOF > -#define SYSTEM_GDBINIT_DIR "$ac_define_dir" > +#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 > _ACEOF > =20 > =20 > +fi > =20 > =20 > - if test "x$exec_prefix" =3D xNONE || test "x$exec_prefix" =3D 'x${pref= ix}'; then > - if test "x$prefix" =3D xNONE; then > - =09test_prefix=3D/usr/local > - else > -=09test_prefix=3D$prefix > - fi > - else > - test_prefix=3D$exec_prefix > - fi > - value=3D0 > - case ${ac_define_dir} in > - "${test_prefix}"|"${test_prefix}/"*|\ > -=09'${exec_prefix}'|'${exec_prefix}/'*) > - value=3D1 > - ;; > - esac > +# See if supports syscall fields on FreeBSD. The > +# pl_syscall_code member of `struct ptrace_lwpinfo' was added in > +# FreeBSD 10.3. > +ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code"= "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include > +" > +if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" =3D xyes;= then : > =20 > cat >>confdefs.h <<_ACEOF > -#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value > +#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 > _ACEOF > =20 > =20 > +fi > =20 > =20 > +# Check if the compiler supports the `long long' type. > =20 > - > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >= &5 > -$as_echo_n "checking the compiler type... " >&6; } > -if ${gdb_cv_compiler_type+:} false; then : > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support = in compiler" >&5 > +$as_echo_n "checking for long long support in compiler... " >&6; } > +if ${gdb_cv_c_long_long+:} false; then : > $as_echo_n "(cached) " >&6 > else > - gdb_cv_compiler_type=3Dunknown > - if test "$gdb_cv_compiler_type" =3D unknown; then > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > - > +extern long long foo; > int > main () > { > - > - #if !defined __GNUC__ || defined __clang__ > - #error not gcc > - #endif > - > +switch (foo & 2) { case 0: return 1; } > ; > return 0; > } > _ACEOF > if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_compiler_type=3Dgcc > + gdb_cv_c_long_long=3Dyes > +else > + gdb_cv_c_long_long=3Dno > fi > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - fi > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&= 5 > +$as_echo "$gdb_cv_c_long_long" >&6; } > +if test "$gdb_cv_c_long_long" !=3D yes; then > + # libdecnumber requires long long. > + as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 > +fi > =20 > - if test "$gdb_cv_compiler_type" =3D unknown; then > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > +# Check if the compiler and runtime support printing decfloats. > =20 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support i= n printf" >&5 > +$as_echo_n "checking for decfloat support in printf... " >&6; } > +if ${gdb_cv_printf_has_decfloat+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if test "$cross_compiling" =3D yes; then : > + gdb_cv_printf_has_decfloat=3Dno > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +$ac_includes_default > int > main () > { > - > - #ifndef __clang__ > - #error not clang > - #endif > - > +char buf[64]; > + _Decimal32 d32 =3D 1.2345df; > + _Decimal64 d64 =3D 1.2345dd; > + _Decimal128 d128 =3D 1.2345dl; > + sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d6= 4, d128); > + return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2= 345", buf)); > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_compile "$LINENO"; then : > - gdb_cv_compiler_type=3Dclang > +if ac_fn_c_try_run "$LINENO"; then : > + gdb_cv_printf_has_decfloat=3Dyes > +else > + gdb_cv_printf_has_decfloat=3Dno > fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > - fi > - > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" = >&5 > -$as_echo "$gdb_cv_compiler_type" >&6; } > =20 > - GDB_COMPILER_TYPE=3D"$gdb_cv_compiler_type" > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decf= loat" >&5 > +$as_echo "$gdb_cv_printf_has_decfloat" >&6; } > +if test "$gdb_cv_printf_has_decfloat" =3D yes; then > =20 > +$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h > =20 > -# Check whether --enable-werror was given. > -if test "${enable_werror+set}" =3D set; then : > - enableval=3D$enable_werror; case "${enableval}" in > - yes | y) ERROR_ON_WARNING=3D"yes" ;; > - no | n) ERROR_ON_WARNING=3D"no" ;; > - *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LI= NENO" 5 ;; > - esac > fi > =20 > +# Check if the compiler supports the `long double' type. We can't use > +# AC_C_LONG_DOUBLE because that one does additional checks on the > +# constants defined in that fail on some systems, > +# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. > =20 > -# Enable -Werror by default when using gcc. Turn it off for releases. > -if test "${GCC}" =3D yes -a -z "${ERROR_ON_WARNING}" && $development; th= en > - ERROR_ON_WARNING=3Dyes > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double suppor= t in compiler" >&5 > +$as_echo_n "checking for long double support in compiler... " >&6; } > +if ${gdb_cv_c_long_double+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +long double foo; > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_c_long_double=3Dyes > +else > + gdb_cv_c_long_double=3Dno > fi > - > -WERROR_CFLAGS=3D"" > -if test "${ERROR_ON_WARNING}" =3D yes ; then > - WERROR_CFLAGS=3D"-Werror" > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" = >&5 > +$as_echo "$gdb_cv_c_long_double" >&6; } > +if test "$gdb_cv_c_long_double" =3D yes; then > =20 > -# The options we'll try to enable. > -build_warnings=3D"-Wall -Wpointer-arith \ > --Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ > --Wno-switch -Wno-char-subscripts \ > --Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ > --Wno-sign-compare -Wno-error=3Dmaybe-uninitialized \ > --Wno-mismatched-tags \ > --Wno-error=3Ddeprecated-register \ > --Wsuggest-override \ > --Wimplicit-fallthrough=3D3 \ > --Wduplicated-cond \ > --Wshadow=3Dlocal \ > --Wdeprecated-copy \ > --Wdeprecated-copy-dtor \ > --Wredundant-move \ > --Wmissing-declarations \ > --Wstrict-null-sentinel \ > -" > +$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h > =20 > -# The -Wmissing-prototypes flag will be accepted by GCC, but results > -# in a warning being printed about the flag not being valid for C++, > -# this is something to do with using ccache, and argument ordering. > -if test "$GDB_COMPILER_TYPE" !=3D gcc; then > - build_warnings=3D"$build_warnings -Wmissing-prototypes" > fi > =20 > -case "${host}" in > - *-*-mingw32*) > - # Enable -Wno-format by default when using gcc on mingw since many > - # GCC versions complain about %I64. > - build_warnings=3D"$build_warnings -Wno-format" ;; > - *-*-solaris*) > - # Solaris 11.4 uses #pragma no_inline that GCC > - # doesn't understand. > - build_warnings=3D"$build_warnings -Wno-unknown-pragmas" > - # Solaris 11 marks vfork deprecated. > - build_warnings=3D"$build_warnings -Wno-deprecated-declarations" ;; > - *) > - # Note that gcc requires -Wformat for -Wformat-nonliteral to work, > - # but there's a special case for this below. > - build_warnings=3D"$build_warnings -Wformat-nonliteral" ;; > -esac > +# Check if the compiler and runtime support printing long doubles. > =20 > -# Check whether --enable-build-warnings was given. > -if test "${enable_build_warnings+set}" =3D set; then : > - enableval=3D$enable_build_warnings; case "${enableval}" in > - yes)=09;; > - no)=09build_warnings=3D"-w";; > - ,*) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > - build_warnings=3D"${build_warnings} ${t}";; > - *,) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > - build_warnings=3D"${t} ${build_warnings}";; > - *) build_warnings=3D`echo "${enableval}" | sed -e "s/,/ /g"`;; > -esac > -if test x"$silent" !=3D x"yes" && test x"$build_warnings" !=3D x""; then > - echo "Setting compiler warning flags =3D $build_warnings" 6>&1 > -fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double suppor= t in printf" >&5 > +$as_echo_n "checking for long double support in printf... " >&6; } > +if ${gdb_cv_printf_has_long_double+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if test "$cross_compiling" =3D yes; then : > + gdb_cv_printf_has_long_double=3Dno > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +$ac_includes_default > +int > +main () > +{ > +char buf[16]; > + long double f =3D 3.141592653; > + sprintf (buf, "%Lg", f); > + return (strncmp ("3.14159", buf, 7)); > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_run "$LINENO"; then : > + gdb_cv_printf_has_long_double=3Dyes > +else > + gdb_cv_printf_has_long_double=3Dno > fi > -# Check whether --enable-gdb-build-warnings was given. > -if test "${enable_gdb_build_warnings+set}" =3D set; then : > - enableval=3D$enable_gdb_build_warnings; case "${enableval}" in > - yes)=09;; > - no)=09build_warnings=3D"-w";; > - ,*) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > - build_warnings=3D"${build_warnings} ${t}";; > - *,) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > - build_warnings=3D"${t} ${build_warnings}";; > - *) build_warnings=3D`echo "${enableval}" | sed -e "s/,/ /g"`;; > -esac > -if test x"$silent" !=3D x"yes" && test x"$build_warnings" !=3D x""; then > - echo "Setting GDB specific compiler warning flags =3D $build_warnings"= 6>&1 > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > fi > + > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long= _double" >&5 > +$as_echo "$gdb_cv_printf_has_long_double" >&6; } > +if test "$gdb_cv_printf_has_long_double" =3D yes; then > =20 > -# The set of warnings supported by a C++ compiler is not the same as > -# of the C compiler. > -ac_ext=3Dcpp > -ac_cpp=3D'$CXXCPP $CPPFLAGS' > -ac_compile=3D'$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' > -ac_link=3D'$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conft= est.$ac_ext $LIBS >&5' > -ac_compiler_gnu=3D$ac_cv_cxx_compiler_gnu > +$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h > =20 > +fi > =20 > -WARN_CFLAGS=3D"" > -if test "x${build_warnings}" !=3D x -a "x$GCC" =3D xyes > -then > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning f= lags" >&5 > -$as_echo_n "checking compiler warning flags... " >&6; } > - # Separate out the -Werror flag as some files just cannot be > - # compiled with it enabled. > - for w in ${build_warnings}; do > -=09# GCC does not complain about -Wno-unknown-warning. Invert > -=09# and test -Wunknown-warning instead. > -=09case $w in > -=09-Wno-*) > -=09=09wtest=3D`echo $w | sed 's/-Wno-/-W/g'` ;; > - -Wformat-nonliteral) > -=09=09# gcc requires -Wformat before -Wformat-nonliteral > -=09=09# will work, so stick them together. > -=09=09w=3D"-Wformat $w" > -=09=09wtest=3D"$w" > -=09=09;; > -=09*) > -=09=09wtest=3D$w ;; > -=09esac > +# Check if the compiler and runtime support scanning long doubles. > =20 > -=09case $w in > -=09-Werr*) WERROR_CFLAGS=3D-Werror ;; > -=09*) > -=09 # Check whether GCC accepts it. > -=09 saved_CFLAGS=3D"$CFLAGS" > -=09 CFLAGS=3D"$CFLAGS -Werror $wtest" > -=09 saved_CXXFLAGS=3D"$CXXFLAGS" > -=09 CXXFLAGS=3D"$CXXFLAGS -Werror $wtest" > -=09 if test "x$w" =3D "x-Wunused-variable"; then > -=09 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D3895= 8, > -=09 # fixed in GCC 4.9. This test is derived from the gdb > -=09 # source code that triggered this bug in GCC. > -=09 cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double suppor= t in scanf" >&5 > +$as_echo_n "checking for long double support in scanf... " >&6; } > +if ${gdb_cv_scanf_has_long_double+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if test "$cross_compiling" =3D yes; then : > + gdb_cv_scanf_has_long_double=3Dno > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -struct scoped_restore_base {}; > -=09=09 struct scoped_restore_tmpl : public scoped_restore_base { > -=09=09 ~scoped_restore_tmpl() {} > -=09=09 }; > +#include > int > main () > { > -const scoped_restore_base &b =3D scoped_restore_tmpl(); > - > +char *buf =3D "3.141592653"; > + long double f =3D 0; > + sscanf (buf, "%Lg", &f); > + return !(f > 3.14159 && f < 3.14160); > ; > return 0; > } > _ACEOF > -if ac_fn_cxx_try_compile "$LINENO"; then : > - WARN_CFLAGS=3D"${WARN_CFLAGS} $w" > +if ac_fn_c_try_run "$LINENO"; then : > + gdb_cv_scanf_has_long_double=3Dyes > +else > + gdb_cv_scanf_has_long_double=3Dno > fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > -=09 else > -=09 cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > +fi > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_= double" >&5 > +$as_echo "$gdb_cv_scanf_has_long_double" >&6; } > +if test "$gdb_cv_scanf_has_long_double" =3D yes; then > + > +$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h > + > +fi > + > +case ${host_os} in > +aix*) > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option"= >&5 > +$as_echo_n "checking for -bbigtoc option... " >&6; } > +if ${gdb_cv_bigtoc+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + SAVE_LDFLAGS=3D$LDFLAGS > + > + case $GCC in > + yes) gdb_cv_bigtoc=3D-Wl,-bbigtoc ;; > + *) gdb_cv_bigtoc=3D-bbigtoc ;; > + esac > + > + LDFLAGS=3D$LDFLAGS\ $gdb_cv_bigtoc > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > =20 > int > main () > { > - > +int i; > ; > return 0; > } > _ACEOF > -if ac_fn_cxx_try_compile "$LINENO"; then : > - WARN_CFLAGS=3D"${WARN_CFLAGS} $w" > -fi > -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > -=09 fi > -=09 CFLAGS=3D"$saved_CFLAGS" > -=09 CXXFLAGS=3D"$saved_CXXFLAGS" > -=09esac > - done > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WE= RROR_CFLAGS}" >&5 > -$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } > -fi > +if ac_fn_c_try_link "$LINENO"; then : > =20 > +else > + gdb_cv_bigtoc=3D > =20 > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + LDFLAGS=3D"${SAVE_LDFLAGS}" > =20 > -ac_ext=3Dc > -ac_cpp=3D'$CPP $CPPFLAGS' > -ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' > -ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest= .$ac_ext $LIBS >&5' > -ac_compiler_gnu=3D$ac_cv_c_compiler_gnu > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 > +$as_echo "$gdb_cv_bigtoc" >&6; } > + CONFIG_LDFLAGS=3D"${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" > + ;; > +esac > =20 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export= flag" >&5 > +$as_echo_n "checking for the dynamic export flag... " >&6; } > +dynamic_list=3Dfalse > +if test "${gdb_native}" =3D yes; then > + # The dynamically loaded libthread_db needs access to symbols in the = gdb > + # executable. Older GNU ld supports --export-dynamic but --dynamic-l= ist > + # may not be supported there. > + old_LDFLAGS=3D"$LDFLAGS" > + # Older GNU ld supports --export-dynamic but --dynamic-list it does n= ot. > + RDYNAMIC=3D"-Wl,--dynamic-list=3D${srcdir}/proc-service.list" > + LDFLAGS=3D"$LDFLAGS $RDYNAMIC" > + if test "${have_libpython}" =3D no; then > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > =20 > +int > +main () > +{ > =20 > -# Check whether --enable-ubsan was given. > -if test "${enable_ubsan+set}" =3D set; then : > - enableval=3D$enable_ubsan; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_link "$LINENO"; then : > + dynamic_list=3Dtrue > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + else > + # Workaround http://bugs.python.org/issue4434 where static > + # libpythonX.Y.a would get its symbols required for > + # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. > + # Problem does not happen for the recommended libpythonX.Y.so linka= ge. > + > + # Note the workaround for Python > + # http://bugs.python.org/issue10112 earlier has removed > + # -export-dynamic from PYTHON_LIBS. That's exactly what we want > + # here too, as otherwise it'd make this -Wl,--dynamic-list test > + # always pass. > + old_CFLAGS=3D"$CFLAGS" > + CFLAGS=3D"$CFLAGS $PYTHON_CFLAGS" > + old_LIBS=3D"$LIBS" > + LIBS=3D"$LIBS $PYTHON_LIBS" > + old_CPPFLAGS=3D"$CPPFLAGS" > + CPPFLAGS=3D"$CPPFLAGS $PYTHON_CPPFLAGS" > + if test "$cross_compiling" =3D yes; then : > + true > else > - enable_ubsan=3Dno > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include "Python.h" > +int > +main () > +{ > +int err; > + Py_Initialize (); > + err =3D PyRun_SimpleString ("import ctypes\n"); > + Py_Finalize (); > + return err =3D=3D 0 ? 0 : 1; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_run "$LINENO"; then : > + dynamic_list=3Dtrue > +fi > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > fi > =20 > -if test "x$enable_ubsan" =3D xauto; then > - if $development; then > - enable_ubsan=3Dyes > - fi > + LIBS=3D"$old_LIBS" > + CFLAGS=3D"$old_CFLAGS" > + CPPFLAGS=3D"$old_CPPFLAGS" > + fi > + LDFLAGS=3D"$old_LDFLAGS" > fi > -ac_ext=3Dcpp > -ac_cpp=3D'$CXXCPP $CPPFLAGS' > -ac_compile=3D'$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' > -ac_link=3D'$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conft= est.$ac_ext $LIBS >&5' > -ac_compiler_gnu=3D$ac_cv_cxx_compiler_gnu > +if $dynamic_list; then > + found=3D"-Wl,--dynamic-list" > + RDYNAMIC=3D'-Wl,--dynamic-list=3D$(srcdir)/proc-service.list' > +else > + found=3D"-rdynamic" > + RDYNAMIC=3D"-rdynamic" > +fi > + > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 > +$as_echo "$found" >&6; } > =20 > -if test "x$enable_ubsan" =3D xyes; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize= =3Dundefined is accepted" >&5 > -$as_echo_n "checking whether -fsanitize=3Dundefined is accepted... " >&6= ; } > - saved_CXXFLAGS=3D"$CXXFLAGS" > - CXXFLAGS=3D"$CXXFLAGS -fsanitize=3Dundefined -fno-sanitize-recover=3Du= ndefined" > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h bac= ktrace is available" >&5 > +$as_echo_n "checking whether execinfo.h backtrace is available... " >&6;= } > +if ${gdb_cv_execinfo_backtrace+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > =20 > + #include > + > int > main () > { > =20 > + int f; > + void *b[2]; > + f =3D backtrace (b, 2); > + backtrace_symbols_fd (b, f, 2); > + > ; > return 0; > } > _ACEOF > -if ac_fn_cxx_try_link "$LINENO"; then : > - enable_ubsan=3Dyes > +if ac_fn_c_try_link "$LINENO"; then : > + gdb_cv_execinfo_backtrace=3Dyes > else > - enable_ubsan=3Dno > - > + gdb_cv_execinfo_backtrace=3Dno > fi > rm -f core conftest.err conftest.$ac_objext \ > conftest$ac_exeext conftest.$ac_ext > - CXXFLAGS=3D"$saved_CXXFLAGS" > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 > -$as_echo "$enable_ubsan" >&6; } > - if test "x$enable_ubsan" =3D xyes; then > - WARN_CFLAGS=3D"$WARN_CFLAGS -fsanitize=3Dundefined -fno-sanitize-rec= over=3Dundefined" > - CONFIG_LDFLAGS=3D"$CONFIG_LDFLAGS -fsanitize=3Dundefined" > - fi > fi > -ac_ext=3Dc > -ac_cpp=3D'$CPP $CPPFLAGS' > -ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' > -ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest= .$ac_ext $LIBS >&5' > -ac_compiler_gnu=3D$ac_cv_c_compiler_gnu > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtr= ace" >&5 > +$as_echo "$gdb_cv_execinfo_backtrace" >&6; } > +if test "$gdb_cv_execinfo_backtrace" =3D yes; then > =20 > +$as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h > =20 > +fi > =20 > -# In the Cygwin environment, we need some additional flags. > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 > -$as_echo_n "checking for cygwin... " >&6; } > -if ${gdb_cv_os_cygwin+:} false; then : > + > +if test "${build}" =3D "${host}" -a "${host}" =3D "${target}" ; then > + case ${host_os} in > + aix*) > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread d= ebugging library" >&5 > +$as_echo_n "checking for AiX thread debugging library... " >&6; } > + if ${gdb_cv_have_aix_thread_debug+:} false; then : > $as_echo_n "(cached) " >&6 > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > +#include > +int > +main () > +{ > +#ifndef PTHDB_VERSION_3 > +=09 #error > +=09 #endif > =20 > -#if defined (__CYGWIN__) || defined (__CYGWIN32__) > -lose > -#endif > + ; > + return 0; > +} > _ACEOF > -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | > - $EGREP "^lose$" >/dev/null 2>&1; then : > - gdb_cv_os_cygwin=3Dyes > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_have_aix_thread_debug=3Dyes > else > - gdb_cv_os_cygwin=3Dno > -fi > -rm -f conftest* > + gdb_cv_have_aix_thread_debug=3Dno > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 > -$as_echo "$gdb_cv_os_cygwin" >&6; } > - > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > -SER_HARDWIRE=3D"ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" > -case ${host} in > - *go32* ) SER_HARDWIRE=3Dser-go32.o ;; > - *djgpp* ) SER_HARDWIRE=3Dser-go32.o ;; > - *mingw32*) SER_HARDWIRE=3D"ser-base.o ser-tcp.o ser-mingw.o" ;; > - *) SER_HARDWIRE=3D"$SER_HARDWIRE ser-uds.o" ;; > -esac > +fi > =20 > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_= thread_debug" >&5 > +$as_echo "$gdb_cv_have_aix_thread_debug" >&6; } > + if test "$gdb_cv_have_aix_thread_debug" =3D yes; then > + CONFIG_SRCS=3D"${CONFIG_SRCS} aix-thread.c" > + CONFIG_OBS=3D"${CONFIG_OBS} aix-thread.o" > + LIBS=3D"$LIBS -lpthdebug" > =20 > -# libreadline needs libuser32.a in a cygwin environment > -WIN32LIBS=3D > -if test x"$gdb_cv_os_cygwin" =3D xyes; then > - WIN32LIBS=3D"-luser32" > - case "${target}" in > -=09*cygwin*) WIN32LIBS=3D"$WIN32LIBS -limagehlp" > -=09;; > - esac > + # Older versions of AIX do not provide the declaration for > + # the getthrds function (it appears that it was introduced > + # with AIX 6.x). > + ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthr= ds" "#include > +" > +if test "x$ac_cv_have_decl_getthrds" =3D xyes; then : > + ac_have_decl=3D1 > +else > + ac_have_decl=3D0 > fi > =20 > -# The ser-tcp.c module requires sockets. > -# Note that WIN32APILIBS is set by GDB_AC_COMMON. > -WIN32LIBS=3D"$WIN32LIBS $WIN32APILIBS" > +cat >>confdefs.h <<_ACEOF > +#define HAVE_DECL_GETTHRDS $ac_have_decl > +_ACEOF > =20 > -# Add ELF support to GDB, but only if BFD includes ELF support. > + fi > + ;; > + esac > =20 > - OLD_CFLAGS=3D$CFLAGS > - OLD_LDFLAGS=3D$LDFLAGS > - OLD_LIBS=3D$LIBS > - OLD_CC=3D$CC > - # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS > - # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We > - # always want our bfd. > - CFLAGS=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" > - LDFLAGS=3D"-L../bfd -L../libiberty" > - intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` > - LIBS=3D"-lbfd -liberty $intl $LIBS" > - CC=3D"./libtool --quiet --mode=3Dlink $CC" > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in B= FD" >&5 > -$as_echo_n "checking for ELF support in BFD... " >&6; } > -if ${gdb_cv_var_elf+:} false; then : > +fi > + > +if test "x$ac_cv_header_thread_db_h" =3D "xyes"; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTALLOC" >&5 > +$as_echo_n "checking whether has TD_NOTALLOC... " >&6; } > +if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : > $as_echo_n "(cached) " >&6 > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > -=09 #include > -=09 #include "bfd.h" > -=09 #include "elf-bfd.h" > +#include > int > main () > { > -return bfd_get_elf_phdr_upper_bound (NULL); > +int i =3D TD_NOTALLOC; > =20 > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - gdb_cv_var_elf=3Dyes > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_thread_db_h_has_td_notalloc=3Dyes > else > - gdb_cv_var_elf=3Dno > + gdb_cv_thread_db_h_has_td_notalloc=3Dno > =20 > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 > -$as_echo "$gdb_cv_var_elf" >&6; } > - CC=3D$OLD_CC > - CFLAGS=3D$OLD_CFLAGS > - LDFLAGS=3D$OLD_LDFLAGS > - LIBS=3D$OLD_LIBS > -if test "$gdb_cv_var_elf" =3D yes; then > - CONFIG_OBS=3D"$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ > -=09=09gcore-elf.o elf-none-tdep.o" > - > -$as_echo "#define HAVE_ELF 1" >>confdefs.h > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has= _td_notalloc" >&5 > +$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } > =20 > - # -ldl is provided by bfd/Makfile.am (LIBDL) . > - if test "$plugins" =3D "yes"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library contai= ning dlopen" >&5 > -$as_echo_n "checking for library containing dlopen... " >&6; } > -if ${ac_cv_search_dlopen+:} false; then : > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_VERSION" >&5 > +$as_echo_n "checking whether has TD_VERSION... " >&6; } > +if ${gdb_cv_thread_db_h_has_td_version+:} false; then : > $as_echo_n "(cached) " >&6 > else > - ac_func_search_save_LIBS=3D$LIBS > -cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > - > -/* Override any GCC internal prototype to avoid an error. > - Use char because int might match the return type of a GCC > - builtin and then its argument prototype would still apply. */ > -#ifdef __cplusplus > -extern "C" > -#endif > -char dlopen (); > +#include > int > main () > { > -return dlopen (); > +int i =3D TD_VERSION; > + > ; > return 0; > } > _ACEOF > -for ac_lib in '' dl; do > - if test -z "$ac_lib"; then > - ac_res=3D"none required" > - else > - ac_res=3D-l$ac_lib > - LIBS=3D"-l$ac_lib $ac_func_search_save_LIBS" > - fi > - if ac_fn_c_try_link "$LINENO"; then : > - ac_cv_search_dlopen=3D$ac_res > -fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext > - if ${ac_cv_search_dlopen+:} false; then : > - break > -fi > -done > -if ${ac_cv_search_dlopen+:} false; then : > - > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_thread_db_h_has_td_version=3Dyes > else > - ac_cv_search_dlopen=3Dno > -fi > -rm conftest.$ac_ext > -LIBS=3D$ac_func_search_save_LIBS > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >= &5 > -$as_echo "$ac_cv_search_dlopen" >&6; } > -ac_res=3D$ac_cv_search_dlopen > -if test "$ac_res" !=3D no; then : > - test "$ac_res" =3D "none required" || LIBS=3D"$ac_res $LIBS" > + gdb_cv_thread_db_h_has_td_version=3Dno > =20 > fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > - fi > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has= _td_version" >&5 > +$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } > =20 > -# Add macho support to GDB, but only if BFD includes it. > - > - OLD_CFLAGS=3D$CFLAGS > - OLD_LDFLAGS=3D$LDFLAGS > - OLD_LIBS=3D$LIBS > - OLD_CC=3D$CC > - # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS > - # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We > - # always want our bfd. > - CFLAGS=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" > - LDFLAGS=3D"-L../bfd -L../libiberty" > - intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` > - LIBS=3D"-lbfd -liberty $intl $LIBS" > - CC=3D"./libtool --quiet --mode=3Dlink $CC" > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support i= n BFD" >&5 > -$as_echo_n "checking for Mach-O support in BFD... " >&6; } > -if ${gdb_cv_var_macho+:} false; then : > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether has TD_NOTLS" >&5 > +$as_echo_n "checking whether has TD_NOTLS... " >&6; } > +if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : > $as_echo_n "(cached) " >&6 > -else > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -=09 #include > -=09 #include "bfd.h" > -=09 #include "mach-o.h" > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > int > main () > { > -return bfd_mach_o_lookup_command (NULL, 0, NULL); > +int i =3D TD_NOTLS; > =20 > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - gdb_cv_var_macho=3Dyes > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_thread_db_h_has_td_notls=3Dyes > else > - gdb_cv_var_macho=3Dno > + gdb_cv_thread_db_h_has_td_notls=3Dno > =20 > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 > -$as_echo "$gdb_cv_var_macho" >&6; } > - CC=3D$OLD_CC > - CFLAGS=3D$OLD_CFLAGS > - LDFLAGS=3D$OLD_LDFLAGS > - LIBS=3D$OLD_LIBS > -if test "$gdb_cv_var_macho" =3D yes; then > - CONFIG_OBS=3D"$CONFIG_OBS machoread.o" > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has= _td_notls" >&5 > +$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } > fi > +if test "x$gdb_cv_thread_db_h_has_td_notalloc" =3D "xyes"; then > =20 > -# Add any host-specific objects to GDB. > -CONFIG_OBS=3D"${CONFIG_OBS} ${gdb_host_obs}" > - > -# If building on ELF, look for lzma support for embedded compressed debu= g info. > -if test "$gdb_cv_var_elf" =3D yes; then > +$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h > =20 > -# Check whether --with-lzma was given. > -if test "${with_lzma+set}" =3D set; then : > - withval=3D$with_lzma; > -else > - with_lzma=3Dauto > fi > +if test "x$gdb_cv_thread_db_h_has_td_version" =3D "xyes"; then > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma"= >&5 > -$as_echo_n "checking whether to use lzma... " >&6; } > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 > -$as_echo "$with_lzma" >&6; } > - > - if test "${with_lzma}" !=3D no; then > - > - > - > - > - > - > - > +$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h > =20 > - use_additional=3Dyes > +fi > +if test "x$gdb_cv_thread_db_h_has_td_notls" =3D "xyes"; then > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > +$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h > =20 > - eval additional_includedir=3D\"$includedir\" > - eval additional_libdir=3D\"$libdir\" > +fi > =20 > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > +case $host_os in > + go32* | *djgpp*) > + gdbinit=3Dgdb.ini > + ;; > + *) > + gdbinit=3D.gdbinit > + ;; > +esac > =20 > +cat >>confdefs.h <<_ACEOF > +#define GDBINIT "$gdbinit" > +_ACEOF > =20 > -# Check whether --with-liblzma-prefix was given. > -if test "${with_liblzma_prefix+set}" =3D set; then : > - withval=3D$with_liblzma_prefix; > - if test "X$withval" =3D "Xno"; then > - use_additional=3Dno > - else > - if test "X$withval" =3D "X"; then > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > =20 > - eval additional_includedir=3D\"$includedir\" > - eval additional_libdir=3D\"$libdir\" > +cat >>confdefs.h <<_ACEOF > +#define GDBEARLYINIT ".gdbearlyinit" > +_ACEOF > =20 > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - else > - additional_includedir=3D"$withval/include" > - additional_libdir=3D"$withval/lib" > - fi > - fi > =20 > +# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, > +# except that the argument to --with-sysroot is optional. > +# --with-sysroot (or --with-sysroot=3Dyes) sets the default sysroot path= . > +if test "x$with_sysroot" =3D xyes; then > + with_sysroot=3D"${exec_prefix}/${target_alias}/sys-root" > fi > =20 > - > -# Check whether --with-liblzma-type was given. > -if test "${with_liblzma_type+set}" =3D set; then : > - withval=3D$with_liblzma_type; with_liblzma_type=3D$withval > +# Check whether --with-sysroot was given. > +if test "${with_sysroot+set}" =3D set; then : > + withval=3D$with_sysroot; TARGET_SYSTEM_ROOT=3D$withval > else > - with_liblzma_type=3Dauto > + TARGET_SYSTEM_ROOT=3D > fi > =20 > - lib_type=3D`eval echo \$with_liblzma_type` > =20 > - LIBLZMA=3D > - LTLIBLZMA=3D > - INCLZMA=3D > - rpathdirs=3D > - ltrpathdirs=3D > - names_already_handled=3D > - names_next_round=3D'lzma ' > - while test -n "$names_next_round"; do > - names_this_round=3D"$names_next_round" > - names_next_round=3D > - for name in $names_this_round; do > - already_handled=3D > - for n in $names_already_handled; do > - if test "$n" =3D "$name"; then > - already_handled=3Dyes > - break > - fi > - done > - if test -z "$already_handled"; then > - names_already_handled=3D"$names_already_handled $name" > - uppername=3D`echo "$name" | sed -e 'y|abcdefghij= klmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` > - eval value=3D\"\$HAVE_LIB$uppername\" > - if test -n "$value"; then > - if test "$value" =3D yes; then > - eval value=3D\"\$LIB$uppername\" > - test -z "$value" || LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$value= " > - eval value=3D\"\$LTLIB$uppername\" > - test -z "$value" || LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }= $value" > - else > - : > - fi > - else > - found_dir=3D > - found_la=3D > - found_so=3D > - found_a=3D > - if test $use_additional =3D yes; then > - if test -n "$shlibext" && test -f "$additional_libdir/lib$na= me.$shlibext" && test x$lib_type !=3D xstatic; then > - found_dir=3D"$additional_libdir" > - found_so=3D"$additional_libdir/lib$name.$shlibext" > - if test -f "$additional_libdir/lib$name.la"; then > - found_la=3D"$additional_libdir/lib$name.la" > - fi > - elif test x$lib_type !=3D xshared; then > - if test -f "$additional_libdir/lib$name.$libext"; then > - found_dir=3D"$additional_libdir" > - found_a=3D"$additional_libdir/lib$name.$libext" > - if test -f "$additional_libdir/lib$name.la"; then > - found_la=3D"$additional_libdir/lib$name.la" > - fi > - fi > - fi > - fi > - if test "X$found_dir" =3D "X"; then > - for x in $LDFLAGS $LTLIBLZMA; do > + test "x$prefix" =3D xNONE && prefix=3D"$ac_default_prefix" > + test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' > + ac_define_dir=3D`eval echo $TARGET_SYSTEM_ROOT` > + ac_define_dir=3D`eval echo $ac_define_dir` > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > +cat >>confdefs.h <<_ACEOF > +#define TARGET_SYSTEM_ROOT "$ac_define_dir" > +_ACEOF > =20 > - case "$x" in > - -L*) > - dir=3D`echo "X$x" | sed -e 's/^X-L//'` > - if test -n "$shlibext" && test -f "$dir/lib$name.$shli= bext" && test x$lib_type !=3D xstatic; then > - found_dir=3D"$dir" > - found_so=3D"$dir/lib$name.$shlibext" > - if test -f "$dir/lib$name.la"; then > - found_la=3D"$dir/lib$name.la" > - fi > - elif test x$lib_type !=3D xshared; then > - if test -f "$dir/lib$name.$libext"; then > - found_dir=3D"$dir" > - found_a=3D"$dir/lib$name.$libext" > - if test -f "$dir/lib$name.la"; then > - found_la=3D"$dir/lib$name.la" > - fi > - fi > - fi > - ;; > - esac > - if test "X$found_dir" !=3D "X"; then > - break > - fi > - done > - fi > - if test "X$found_dir" !=3D "X"; then > - LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-L$found= _dir -l$name" > - if test "X$found_so" !=3D "X"; then > - if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$found= _so" > - else > - = haveit=3D > - for x in $ltrpathdirs; do > - if test "X$x" =3D "X$found_dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - ltrpathdirs=3D"$ltrpathdirs $found_dir" > - fi > - if test "$hardcode_direct" =3D yes; then > - LIBLZMA=3D"${LIBLZ= MA}${LIBLZMA:+ }$found_so" > - else > - if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > - LIBLZMA=3D"$= {LIBLZMA}${LIBLZMA:+ }$found_so" > - haveit=3D > - for x in $rpathdirs; do > - if test "X$x" =3D "X$found_dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - rpathdirs=3D"$rpathdirs $found_dir" > - fi > - else > - = haveit=3D > - for x in $LDFLAGS $LIBLZMA; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-L$found_dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-L$found_dir" > - fi > - if test "$hardcode_minus_L" !=3D no; then > - = LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$found_so" > - else > - = = LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-l$name" > - fi > - fi > - fi > - fi > - else > - if test "X$found_a" !=3D "X"; then > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$found= _a" > - else > - LIBLZMA=3D"${LIBLZMA}${L= IBLZMA:+ }-L$found_dir -l$name" > - fi > - fi > - additional_includedir=3D > - case "$found_dir" in > - */lib | */lib/) > - basedir=3D`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/l= ib/*$,,'` > - additional_includedir=3D"$basedir/include" > - ;; > - esac > - if test "X$additional_includedir" !=3D "X"; then > - = if test "X$additional_includedir" != =3D "X/usr/include"; then > - haveit=3D > - if test "X$additional_includedir" =3D "X/usr/local/inclu= de"; then > - if test -n "$GCC"; then > - case $host_os in > - linux*) haveit=3Dyes;; > - esac > - fi > - fi > - if test -z "$haveit"; then > - for x in $CPPFLAGS $INCLZMA; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > + if test "x$exec_prefix" =3D xNONE || test "x$exec_prefix" =3D 'x${pref= ix}'; then > + if test "x$prefix" =3D xNONE; then > + =09test_prefix=3D/usr/local > + else > +=09test_prefix=3D$prefix > + fi > + else > + test_prefix=3D$exec_prefix > + fi > + value=3D0 > + case ${ac_define_dir} in > + "${test_prefix}"|"${test_prefix}/"*|\ > +=09'${exec_prefix}'|'${exec_prefix}/'*) > + value=3D1 > + ;; > + esac > + > +cat >>confdefs.h <<_ACEOF > +#define TARGET_SYSTEM_ROOT_RELOCATABLE $value > +_ACEOF > + > + > =20 > - if test "X$x" =3D "X-I$additional_includedir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - if test -d "$additional_includedir"; then > - INCLZMA=3D"${INCLZMA}${INCLZ= MA:+ }-I$additional_includedir" > - fi > - fi > - fi > - fi > - fi > - if test -n "$found_la"; then > - save_libdir=3D"$= libdir" > - case "$found_la" in > - */* | *\\*) . "$found_la" ;; > - *) . "./$found_la" ;; > - esac > - libdir=3D"$save_libdir" > - for dep in $dependency_libs; do > - case "$dep" in > - -L*) > - additional_libdir=3D`echo "X$dep" | sed -e 's/^X-L//= '` > - = = if test "X$additional_libdir" !=3D "X/usr/lib"; then > - haveit=3D > - if test "X$additional_libdir" =3D "X/usr/local/lib= "; then > - if test -n "$GCC"; then > - case $host_os in > - linux*) haveit=3Dyes;; > - esac > - fi > - fi > - if test -z "$haveit"; then > - haveit=3D > - for x in $LDFLAGS $LIBLZMA; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-L$additional_libdir"; the= n > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - if test -d "$additional_libdir"; then > - LIBLZMA=3D"${LIB= LZMA}${LIBLZMA:+ }-L$additional_libdir" > - fi > - fi > - haveit=3D > - for x in $LDFLAGS $LTLIBLZMA; do > +# Check whether --with-system-gdbinit was given. > +if test "${with_system_gdbinit+set}" =3D set; then : > + withval=3D$with_system_gdbinit; > + SYSTEM_GDBINIT=3D$withval > +else > + SYSTEM_GDBINIT=3D > +fi > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-L$additional_libdir"; the= n > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - if test -d "$additional_libdir"; then > - LTLIBLZMA=3D"${L= TLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" > - fi > - fi > - fi > - fi > - ;; > - -R*) > - dir=3D`echo "X$dep" | sed -e 's/^X-R//'` > - if test "$enable_rpath" !=3D no; then > - haveit= =3D > - for x in $rpathdirs; do > - if test "X$x" =3D "X$dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - rpathdirs=3D"$rpathdirs $dir" > - fi > - haveit= =3D > - for x in $ltrpathdirs; do > - if test "X$x" =3D "X$dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - ltrpathdirs=3D"$ltrpathdirs $dir" > - fi > - fi > - ;; > - -l*) > - names_next_round=3D"$names_next_= round "`echo "X$dep" | sed -e 's/^X-l//'` > - ;; > - *.la) > - = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > - ;; > - *) > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+= }$dep" > - LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }$dep" > - ;; > - esac > - done > - fi > - else > - if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-l$name" > - LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" > - else > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" > - LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libex= t" > - fi > - fi > - fi > - fi > - done > - done > - if test "X$rpathdirs" !=3D "X"; then > - if test -n "$hardcode_libdir_separator"; then > - alldirs=3D > - for found_dir in $rpathdirs; do > - alldirs=3D"${alldirs}${alldirs:+$hardcode_libdir_separator}$foun= d_dir" > - done > - acl_save_libdir=3D"$libdir" > - libdir=3D"$alldirs" > - eval flag=3D\"$hardcode_libdir_flag_spec\" > - libdir=3D"$acl_save_libdir" > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$flag" > - else > - for found_dir in $rpathdirs; do > - acl_save_libdir=3D"$libdir" > - libdir=3D"$found_dir" > - eval flag=3D\"$hardcode_libdir_flag_spec\" > - libdir=3D"$acl_save_libdir" > - LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$flag" > - done > - fi > + test "x$prefix" =3D xNONE && prefix=3D"$ac_default_prefix" > + test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' > + ac_define_dir=3D`eval echo $SYSTEM_GDBINIT` > + ac_define_dir=3D`eval echo $ac_define_dir` > + > +cat >>confdefs.h <<_ACEOF > +#define SYSTEM_GDBINIT "$ac_define_dir" > +_ACEOF > + > + > + > + > + if test "x$exec_prefix" =3D xNONE || test "x$exec_prefix" =3D 'x${pref= ix}'; then > + if test "x$prefix" =3D xNONE; then > + =09test_prefix=3D/usr/local > + else > +=09test_prefix=3D$prefix > + fi > + else > + test_prefix=3D$exec_prefix > fi > - if test "X$ltrpathdirs" !=3D "X"; then > - for found_dir in $ltrpathdirs; do > - LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" > - done > + value=3D0 > + case ${ac_define_dir} in > + "${test_prefix}"|"${test_prefix}/"*|\ > +=09'${exec_prefix}'|'${exec_prefix}/'*) > + value=3D1 > + ;; > + esac > + > +cat >>confdefs.h <<_ACEOF > +#define SYSTEM_GDBINIT_RELOCATABLE $value > +_ACEOF > + > + > + > + > + > +# Check whether --with-system-gdbinit-dir was given. > +if test "${with_system_gdbinit_dir+set}" =3D set; then : > + withval=3D$with_system_gdbinit_dir; > + SYSTEM_GDBINIT_DIR=3D$withval > +else > + SYSTEM_GDBINIT_DIR=3D > +fi > + > + > + test "x$prefix" =3D xNONE && prefix=3D"$ac_default_prefix" > + test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}' > + ac_define_dir=3D`eval echo $SYSTEM_GDBINIT_DIR` > + ac_define_dir=3D`eval echo $ac_define_dir` > + > +cat >>confdefs.h <<_ACEOF > +#define SYSTEM_GDBINIT_DIR "$ac_define_dir" > +_ACEOF > + > + > + > + > + if test "x$exec_prefix" =3D xNONE || test "x$exec_prefix" =3D 'x${pref= ix}'; then > + if test "x$prefix" =3D xNONE; then > + =09test_prefix=3D/usr/local > + else > +=09test_prefix=3D$prefix > + fi > + else > + test_prefix=3D$exec_prefix > fi > + value=3D0 > + case ${ac_define_dir} in > + "${test_prefix}"|"${test_prefix}/"*|\ > +=09'${exec_prefix}'|'${exec_prefix}/'*) > + value=3D1 > + ;; > + esac > =20 > +cat >>confdefs.h <<_ACEOF > +#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value > +_ACEOF > =20 > - ac_save_CPPFLAGS=3D"$CPPFLAGS" > =20 > - for element in $INCLZMA; do > - haveit=3D > - for x in $CPPFLAGS; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X$element"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - CPPFLAGS=3D"${CPPFLAGS}${CPPFLAGS:+ }$element" > - fi > - done > =20 > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 > -$as_echo_n "checking for liblzma... " >&6; } > -if ${ac_cv_liblzma+:} false; then : > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >= &5 > +$as_echo_n "checking the compiler type... " >&6; } > +if ${gdb_cv_compiler_type+:} false; then : > $as_echo_n "(cached) " >&6 > else > + gdb_cv_compiler_type=3Dunknown > + if test "$gdb_cv_compiler_type" =3D unknown; then > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > =20 > - ac_save_LIBS=3D"$LIBS" > - LIBS=3D"$LIBS $LIBLZMA" > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +int > +main () > +{ > + > + #if !defined __GNUC__ || defined __clang__ > + #error not gcc > + #endif > + > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_compiler_type=3Dgcc > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + fi > + > + if test "$gdb_cv_compiler_type" =3D unknown; then > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > + > +int > +main () > +{ > + > + #ifndef __clang__ > + #error not clang > + #endif > + > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + gdb_cv_compiler_type=3Dclang > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + fi > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" = >&5 > +$as_echo "$gdb_cv_compiler_type" >&6; } > + > + GDB_COMPILER_TYPE=3D"$gdb_cv_compiler_type" > + > + > +# Check whether --enable-werror was given. > +if test "${enable_werror+set}" =3D set; then : > + enableval=3D$enable_werror; case "${enableval}" in > + yes | y) ERROR_ON_WARNING=3D"yes" ;; > + no | n) ERROR_ON_WARNING=3D"no" ;; > + *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LI= NENO" 5 ;; > + esac > +fi > + > + > +# Enable -Werror by default when using gcc. Turn it off for releases. > +if test "${GCC}" =3D yes -a -z "${ERROR_ON_WARNING}" && $development; th= en > + ERROR_ON_WARNING=3Dyes > +fi > + > +WERROR_CFLAGS=3D"" > +if test "${ERROR_ON_WARNING}" =3D yes ; then > + WERROR_CFLAGS=3D"-Werror" > +fi > + > +# The options we'll try to enable. > +build_warnings=3D"-Wall -Wpointer-arith \ > +-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ > +-Wno-switch -Wno-char-subscripts \ > +-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ > +-Wno-sign-compare -Wno-error=3Dmaybe-uninitialized \ > +-Wno-mismatched-tags \ > +-Wno-error=3Ddeprecated-register \ > +-Wsuggest-override \ > +-Wimplicit-fallthrough=3D3 \ > +-Wduplicated-cond \ > +-Wshadow=3Dlocal \ > +-Wdeprecated-copy \ > +-Wdeprecated-copy-dtor \ > +-Wredundant-move \ > +-Wmissing-declarations \ > +-Wstrict-null-sentinel \ > +" > + > +# The -Wmissing-prototypes flag will be accepted by GCC, but results > +# in a warning being printed about the flag not being valid for C++, > +# this is something to do with using ccache, and argument ordering. > +if test "$GDB_COMPILER_TYPE" !=3D gcc; then > + build_warnings=3D"$build_warnings -Wmissing-prototypes" > +fi > + > +case "${host}" in > + *-*-mingw32*) > + # Enable -Wno-format by default when using gcc on mingw since many > + # GCC versions complain about %I64. > + build_warnings=3D"$build_warnings -Wno-format" ;; > + *-*-solaris*) > + # Solaris 11.4 uses #pragma no_inline that GCC > + # doesn't understand. > + build_warnings=3D"$build_warnings -Wno-unknown-pragmas" > + # Solaris 11 marks vfork deprecated. > + build_warnings=3D"$build_warnings -Wno-deprecated-declarations" ;; > + *) > + # Note that gcc requires -Wformat for -Wformat-nonliteral to work, > + # but there's a special case for this below. > + build_warnings=3D"$build_warnings -Wformat-nonliteral" ;; > +esac > + > +# Check whether --enable-build-warnings was given. > +if test "${enable_build_warnings+set}" =3D set; then : > + enableval=3D$enable_build_warnings; case "${enableval}" in > + yes)=09;; > + no)=09build_warnings=3D"-w";; > + ,*) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > + build_warnings=3D"${build_warnings} ${t}";; > + *,) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > + build_warnings=3D"${t} ${build_warnings}";; > + *) build_warnings=3D`echo "${enableval}" | sed -e "s/,/ /g"`;; > +esac > +if test x"$silent" !=3D x"yes" && test x"$build_warnings" !=3D x""; then > + echo "Setting compiler warning flags =3D $build_warnings" 6>&1 > +fi > +fi > +# Check whether --enable-gdb-build-warnings was given. > +if test "${enable_gdb_build_warnings+set}" =3D set; then : > + enableval=3D$enable_gdb_build_warnings; case "${enableval}" in > + yes)=09;; > + no)=09build_warnings=3D"-w";; > + ,*) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > + build_warnings=3D"${build_warnings} ${t}";; > + *,) t=3D`echo "${enableval}" | sed -e "s/,/ /g"` > + build_warnings=3D"${t} ${build_warnings}";; > + *) build_warnings=3D`echo "${enableval}" | sed -e "s/,/ /g"`;; > +esac > +if test x"$silent" !=3D x"yes" && test x"$build_warnings" !=3D x""; then > + echo "Setting GDB specific compiler warning flags =3D $build_warnings"= 6>&1 > +fi > +fi > + > +# The set of warnings supported by a C++ compiler is not the same as > +# of the C compiler. > +ac_ext=3Dcpp > +ac_cpp=3D'$CXXCPP $CPPFLAGS' > +ac_compile=3D'$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' > +ac_link=3D'$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conft= est.$ac_ext $LIBS >&5' > +ac_compiler_gnu=3D$ac_cv_cxx_compiler_gnu > + > + > +WARN_CFLAGS=3D"" > +if test "x${build_warnings}" !=3D x -a "x$GCC" =3D xyes > +then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning f= lags" >&5 > +$as_echo_n "checking compiler warning flags... " >&6; } > + # Separate out the -Werror flag as some files just cannot be > + # compiled with it enabled. > + for w in ${build_warnings}; do > +=09# GCC does not complain about -Wno-unknown-warning. Invert > +=09# and test -Wunknown-warning instead. > +=09case $w in > +=09-Wno-*) > +=09=09wtest=3D`echo $w | sed 's/-Wno-/-W/g'` ;; > + -Wformat-nonliteral) > +=09=09# gcc requires -Wformat before -Wformat-nonliteral > +=09=09# will work, so stick them together. > +=09=09w=3D"-Wformat $w" > +=09=09wtest=3D"$w" > +=09=09;; > +=09*) > +=09=09wtest=3D$w ;; > +=09esac > + > +=09case $w in > +=09-Werr*) WERROR_CFLAGS=3D-Werror ;; > +=09*) > +=09 # Check whether GCC accepts it. > +=09 saved_CFLAGS=3D"$CFLAGS" > +=09 CFLAGS=3D"$CFLAGS -Werror $wtest" > +=09 saved_CXXFLAGS=3D"$CXXFLAGS" > +=09 CXXFLAGS=3D"$CXXFLAGS -Werror $wtest" > +=09 if test "x$w" =3D "x-Wunused-variable"; then > +=09 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D3895= 8, > +=09 # fixed in GCC 4.9. This test is derived from the gdb > +=09 # source code that triggered this bug in GCC. > +=09 cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include "lzma.h" > +struct scoped_restore_base {}; > +=09=09 struct scoped_restore_tmpl : public scoped_restore_base { > +=09=09 ~scoped_restore_tmpl() {} > +=09=09 }; > int > main () > { > -lzma_index_iter iter; > -=09=09=09 lzma_index_iter_init (&iter, 0); > -=09=09=09 lzma_mf_is_supported (LZMA_MF_HC3); > +const scoped_restore_base &b =3D scoped_restore_tmpl(); > + > ; > return 0; > } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - ac_cv_liblzma=3Dyes > -else > - ac_cv_liblzma=3Dno > +if ac_fn_cxx_try_compile "$LINENO"; then : > + WARN_CFLAGS=3D"${WARN_CFLAGS} $w" > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > - LIBS=3D"$ac_save_LIBS" > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +=09 else > +=09 cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > =20 > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 > -$as_echo "$ac_cv_liblzma" >&6; } > - if test "$ac_cv_liblzma" =3D yes; then > - HAVE_LIBLZMA=3Dyes > +int > +main () > +{ > =20 > -$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_cxx_try_compile "$LINENO"; then : > + WARN_CFLAGS=3D"${WARN_CFLAGS} $w" > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +=09 fi > +=09 CFLAGS=3D"$saved_CFLAGS" > +=09 CXXFLAGS=3D"$saved_CXXFLAGS" > +=09esac > + done > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WE= RROR_CFLAGS}" >&5 > +$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } > +fi > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= iblzma" >&5 > -$as_echo_n "checking how to link with liblzma... " >&6; } > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 > -$as_echo "$LIBLZMA" >&6; } > - else > - HAVE_LIBLZMA=3Dno > - CPPFLAGS=3D"$ac_save_CPPFLAGS" > - LIBLZMA=3D > - LTLIBLZMA=3D > - fi > =20 > =20 > +ac_ext=3Dc > +ac_cpp=3D'$CPP $CPPFLAGS' > +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' > +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest= .$ac_ext $LIBS >&5' > +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu > =20 > =20 > =20 > +# Check whether --enable-ubsan was given. > +if test "${enable_ubsan+set}" =3D set; then : > + enableval=3D$enable_ubsan; > +else > + enable_ubsan=3Dno > +fi > =20 > - if test "$HAVE_LIBLZMA" !=3D yes; then > - if test "$with_lzma" =3D yes; then > - as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 > - fi > - fi > +if test "x$enable_ubsan" =3D xauto; then > + if $development; then > + enable_ubsan=3Dyes > fi > fi > +ac_ext=3Dcpp > +ac_cpp=3D'$CXXCPP $CPPFLAGS' > +ac_compile=3D'$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' > +ac_link=3D'$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conft= est.$ac_ext $LIBS >&5' > +ac_compiler_gnu=3D$ac_cv_cxx_compiler_gnu > =20 > -LIBGUI=3D"../libgui/src/libgui.a" > -GUI_CFLAGS_X=3D"-I${srcdir}/../libgui/src" > - > - > - > -WIN32LDAPP=3D > - > - > - > -case "${host}" in > -*-*-cygwin* | *-*-mingw* ) > - configdir=3D"win" > - ;; > -*) > - configdir=3D"unix" > - ;; > -esac > - > -GDBTKLIBS=3D > -if test "${enable_gdbtk}" =3D "yes"; then > +if test "x$enable_ubsan" =3D xyes; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize= =3Dundefined is accepted" >&5 > +$as_echo_n "checking whether -fsanitize=3Dundefined is accepted... " >&6= ; } > + saved_CXXFLAGS=3D"$CXXFLAGS" > + CXXFLAGS=3D"$CXXFLAGS -fsanitize=3Dundefined -fno-sanitize-recover=3Du= ndefined" > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > =20 > - # Gdbtk must have an absolute path to srcdir in order to run > - # properly when not installed. > - here=3D`pwd` > - cd ${srcdir} > - GDBTK_SRC_DIR=3D`pwd` > - cd $here > +int > +main () > +{ > =20 > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_cxx_try_link "$LINENO"; then : > + enable_ubsan=3Dyes > +else > + enable_ubsan=3Dno > =20 > - # > - # Ok, lets find the tcl configuration > - # First, look for one uninstalled. > - # the alternative search directory is invoked by --with-tcl > - # > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + CXXFLAGS=3D"$saved_CXXFLAGS" > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 > +$as_echo "$enable_ubsan" >&6; } > + if test "x$enable_ubsan" =3D xyes; then > + WARN_CFLAGS=3D"$WARN_CFLAGS -fsanitize=3Dundefined -fno-sanitize-rec= over=3Dundefined" > + CONFIG_LDFLAGS=3D"$CONFIG_LDFLAGS -fsanitize=3Dundefined" > + fi > +fi > +ac_ext=3Dc > +ac_cpp=3D'$CPP $CPPFLAGS' > +ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' > +ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest= .$ac_ext $LIBS >&5' > +ac_compiler_gnu=3D$ac_cv_c_compiler_gnu > =20 > - if test x"${no_tcl}" =3D x ; then > -=09# we reset no_tcl in case something fails here > -=09no_tcl=3Dtrue > =20 > -# Check whether --with-tcl was given. > -if test "${with_tcl+set}" =3D set; then : > - withval=3D$with_tcl; with_tclconfig=3D${withval} > -fi > =20 > -=09{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configurati= on" >&5 > -$as_echo_n "checking for Tcl configuration... " >&6; } > -=09if ${ac_cv_c_tclconfig+:} false; then : > +# In the Cygwin environment, we need some additional flags. > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 > +$as_echo_n "checking for cygwin... " >&6; } > +if ${gdb_cv_os_cygwin+:} false; then : > $as_echo_n "(cached) " >&6 > else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > =20 > +#if defined (__CYGWIN__) || defined (__CYGWIN32__) > +lose > +#endif > +_ACEOF > +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | > + $EGREP "^lose$" >/dev/null 2>&1; then : > + gdb_cv_os_cygwin=3Dyes > +else > + gdb_cv_os_cygwin=3Dno > +fi > +rm -f conftest* > =20 > -=09 # First check to see if --with-tcl was specified. > -=09 case "${host}" in > -=09=09*-*-cygwin*) platDir=3D"win" ;; > -=09=09*) platDir=3D"unix" ;; > -=09 esac > -=09 if test x"${with_tclconfig}" !=3D x ; then > -=09=09if test -f "${with_tclconfig}/tclConfig.sh" ; then > -=09=09 ac_cv_c_tclconfig=3D`(cd ${with_tclconfig}; pwd)` > -=09=09else > -=09=09 as_fn_error $? "${with_tclconfig} directory doesn't contain tc= lConfig.sh" "$LINENO" 5 > -=09=09fi > -=09 fi > - > -=09 # then check for a private Tcl installation > -=09 if test x"${ac_cv_c_tclconfig}" =3D x ; then > -=09=09for i in \ > -=09=09=09../tcl \ > -=09=09=09`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ > -=09=09=09../../tcl \ > -=09=09=09`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ > -=09=09=09../../../tcl \ > -=09=09=09`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do > -=09=09 if test -f "$i/$platDir/tclConfig.sh" ; then > -=09=09=09ac_cv_c_tclconfig=3D`(cd $i/$platDir; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > - > -=09 # on Darwin, check in Framework installation locations > -=09 if test "`uname -s`" =3D "Darwin" -a x"${ac_cv_c_tclconfig}" =3D = x ; then > -=09=09for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ > -=09=09=09`ls -d /Library/Frameworks 2>/dev/null` \ > -=09=09=09`ls -d /Network/Library/Frameworks 2>/dev/null` \ > -=09=09=09`ls -d /System/Library/Frameworks 2>/dev/null` \ > -=09=09=09; do > -=09=09 if test -f "$i/Tcl.framework/tclConfig.sh" ; then > -=09=09=09ac_cv_c_tclconfig=3D`(cd $i/Tcl.framework; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 > +$as_echo "$gdb_cv_os_cygwin" >&6; } > =20 > -=09 # check in a few common install locations > -=09 if test x"${ac_cv_c_tclconfig}" =3D x ; then > -=09=09for i in `ls -d ${libdir} 2>/dev/null` \ > -=09=09=09`ls -d ${exec_prefix}/lib 2>/dev/null` \ > -=09=09=09`ls -d ${prefix}/lib 2>/dev/null` \ > -=09=09=09`ls -d /usr/local/lib 2>/dev/null` \ > -=09=09=09`ls -d /usr/contrib/lib 2>/dev/null` \ > -=09=09=09`ls -d /usr/lib 2>/dev/null` \ > -=09=09=09; do > -=09=09 if test -f "$i/tclConfig.sh" ; then > -=09=09=09ac_cv_c_tclconfig=3D`(cd $i; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > =20 > -=09 # check in a few other private locations > -=09 if test x"${ac_cv_c_tclconfig}" =3D x ; then > -=09=09for i in \ > -=09=09=09${srcdir}/../tcl \ > -=09=09=09`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do > -=09=09 if test -f "$i/$platDir/tclConfig.sh" ; then > -=09=09 ac_cv_c_tclconfig=3D`(cd $i/$platDir; pwd)` > -=09=09 break > -=09=09fi > -=09=09done > -=09 fi > +SER_HARDWIRE=3D"ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" > +case ${host} in > + *go32* ) SER_HARDWIRE=3Dser-go32.o ;; > + *djgpp* ) SER_HARDWIRE=3Dser-go32.o ;; > + *mingw32*) SER_HARDWIRE=3D"ser-base.o ser-tcp.o ser-mingw.o" ;; > + *) SER_HARDWIRE=3D"$SER_HARDWIRE ser-uds.o" ;; > +esac > =20 > -fi > =20 > +# libreadline needs libuser32.a in a cygwin environment > +WIN32LIBS=3D > +if test x"$gdb_cv_os_cygwin" =3D xyes; then > + WIN32LIBS=3D"-luser32" > + case "${target}" in > +=09*cygwin*) WIN32LIBS=3D"$WIN32LIBS -limagehlp" > +=09;; > + esac > +fi > =20 > -=09if test x"${ac_cv_c_tclconfig}" =3D x ; then > -=09 TCL_BIN_DIR=3D"# no Tcl configs found" > -=09 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl = configuration definitions" >&5 > -$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2= ;} > -=09else > -=09 no_tcl=3D > -=09 TCL_BIN_DIR=3D${ac_cv_c_tclconfig} > -=09 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_= DIR}/tclConfig.sh" >&5 > -$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } > -=09fi > - fi > +# The ser-tcp.c module requires sockets. > +# Note that WIN32APILIBS is set by GDB_AC_COMMON. > +WIN32LIBS=3D"$WIN32LIBS $WIN32APILIBS" > =20 > +# Add ELF support to GDB, but only if BFD includes ELF support. > =20 > - # If $no_tk is nonempty, then we can't do Tk, and there is no > - # point to doing Tcl. > + OLD_CFLAGS=3D$CFLAGS > + OLD_LDFLAGS=3D$LDFLAGS > + OLD_LIBS=3D$LIBS > + OLD_CC=3D$CC > + # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS > + # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We > + # always want our bfd. > + CFLAGS=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" > + LDFLAGS=3D"-L../bfd -L../libiberty" > + intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` > + LIBS=3D"-lbfd -liberty $intl $LIBS" > + CC=3D"./libtool --quiet --mode=3Dlink $CC" > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in B= FD" >&5 > +$as_echo_n "checking for ELF support in BFD... " >&6; } > +if ${gdb_cv_var_elf+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +=09 #include > +=09 #include "bfd.h" > +=09 #include "elf-bfd.h" > +int > +main () > +{ > +return bfd_get_elf_phdr_upper_bound (NULL); > =20 > - # > - # Ok, lets find the tk configuration > - # First, look for one uninstalled. > - # the alternative search directory is invoked by --with-tk > - # > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_link "$LINENO"; then : > + gdb_cv_var_elf=3Dyes > +else > + gdb_cv_var_elf=3Dno > =20 > - if test x"${no_tk}" =3D x ; then > -=09# we reset no_tk in case something fails here > -=09no_tk=3Dtrue > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > =20 > -# Check whether --with-tk was given. > -if test "${with_tk+set}" =3D set; then : > - withval=3D$with_tk; with_tkconfig=3D${withval} > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 > +$as_echo "$gdb_cv_var_elf" >&6; } > + CC=3D$OLD_CC > + CFLAGS=3D$OLD_CFLAGS > + LDFLAGS=3D$OLD_LDFLAGS > + LIBS=3D$OLD_LIBS > +if test "$gdb_cv_var_elf" =3D yes; then > + CONFIG_OBS=3D"$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ > +=09=09gcore-elf.o elf-none-tdep.o" > =20 > -=09{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuratio= n" >&5 > -$as_echo_n "checking for Tk configuration... " >&6; } > -=09if ${ac_cv_c_tkconfig+:} false; then : > +$as_echo "#define HAVE_ELF 1" >>confdefs.h > + > + # -ldl is provided by bfd/Makfile.am (LIBDL) . > + if test "$plugins" =3D "yes"; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library contai= ning dlopen" >&5 > +$as_echo_n "checking for library containing dlopen... " >&6; } > +if ${ac_cv_search_dlopen+:} false; then : > $as_echo_n "(cached) " >&6 > else > + ac_func_search_save_LIBS=3D$LIBS > +cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > + > +/* Override any GCC internal prototype to avoid an error. > + Use char because int might match the return type of a GCC > + builtin and then its argument prototype would still apply. */ > +#ifdef __cplusplus > +extern "C" > +#endif > +char dlopen (); > +int > +main () > +{ > +return dlopen (); > + ; > + return 0; > +} > +_ACEOF > +for ac_lib in '' dl; do > + if test -z "$ac_lib"; then > + ac_res=3D"none required" > + else > + ac_res=3D-l$ac_lib > + LIBS=3D"-l$ac_lib $ac_func_search_save_LIBS" > + fi > + if ac_fn_c_try_link "$LINENO"; then : > + ac_cv_search_dlopen=3D$ac_res > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext > + if ${ac_cv_search_dlopen+:} false; then : > + break > +fi > +done > +if ${ac_cv_search_dlopen+:} false; then : > + > +else > + ac_cv_search_dlopen=3Dno > +fi > +rm conftest.$ac_ext > +LIBS=3D$ac_func_search_save_LIBS > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >= &5 > +$as_echo "$ac_cv_search_dlopen" >&6; } > +ac_res=3D$ac_cv_search_dlopen > +if test "$ac_res" !=3D no; then : > + test "$ac_res" =3D "none required" || LIBS=3D"$ac_res $LIBS" > =20 > +fi > =20 > -=09 # First check to see if --with-tkconfig was specified. > -=09 if test x"${with_tkconfig}" !=3D x ; then > -=09=09if test -f "${with_tkconfig}/tkConfig.sh" ; then > -=09=09 ac_cv_c_tkconfig=3D`(cd ${with_tkconfig}; pwd)` > -=09=09else > -=09=09 as_fn_error $? "${with_tkconfig} directory doesn't contain tkC= onfig.sh" "$LINENO" 5 > -=09=09fi > -=09 fi > + fi > +fi > =20 > -=09 # then check for a private Tk library > -=09 case "${host}" in > -=09=09*-*-cygwin*) platDir=3D"win" ;; > -=09=09*) platDir=3D"unix" ;; > -=09 esac > -=09 if test x"${ac_cv_c_tkconfig}" =3D x ; then > -=09=09for i in \ > -=09=09=09../tk \ > -=09=09=09`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ > -=09=09=09../../tk \ > -=09=09=09`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ > -=09=09=09../../../tk \ > -=09=09=09`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do > -=09=09 if test -f "$i/$platDir/tkConfig.sh" ; then > -=09=09=09ac_cv_c_tkconfig=3D`(cd $i/$platDir; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > +# Add macho support to GDB, but only if BFD includes it. > =20 > -=09 # on Darwin, check in Framework installation locations > -=09 if test "`uname -s`" =3D "Darwin" -a x"${ac_cv_c_tkconfig}" =3D x= ; then > -=09=09for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ > -=09=09=09`ls -d /Library/Frameworks 2>/dev/null` \ > -=09=09=09`ls -d /Network/Library/Frameworks 2>/dev/null` \ > -=09=09=09`ls -d /System/Library/Frameworks 2>/dev/null` \ > -=09=09=09; do > -=09=09 if test -f "$i/Tk.framework/tkConfig.sh" ; then > -=09=09=09ac_cv_c_tkconfig=3D`(cd $i/Tk.framework; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > + OLD_CFLAGS=3D$CFLAGS > + OLD_LDFLAGS=3D$LDFLAGS > + OLD_LIBS=3D$LIBS > + OLD_CC=3D$CC > + # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS > + # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We > + # always want our bfd. > + CFLAGS=3D"-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" > + LDFLAGS=3D"-L../bfd -L../libiberty" > + intl=3D`echo $LIBINTL | sed 's,${top_builddir}/,,g'` > + LIBS=3D"-lbfd -liberty $intl $LIBS" > + CC=3D"./libtool --quiet --mode=3Dlink $CC" > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support i= n BFD" >&5 > +$as_echo_n "checking for Mach-O support in BFD... " >&6; } > +if ${gdb_cv_var_macho+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +=09 #include > +=09 #include "bfd.h" > +=09 #include "mach-o.h" > +int > +main () > +{ > +return bfd_mach_o_lookup_command (NULL, 0, NULL); > =20 > -=09 # check in a few common install locations > -=09 if test x"${ac_cv_c_tkconfig}" =3D x ; then > -=09=09for i in `ls -d ${libdir} 2>/dev/null` \ > -=09=09=09`ls -d ${exec_prefix}/lib 2>/dev/null` \ > -=09=09=09`ls -d ${prefix}/lib 2>/dev/null` \ > -=09=09=09`ls -d /usr/local/lib 2>/dev/null` \ > -=09=09=09`ls -d /usr/contrib/lib 2>/dev/null` \ > -=09=09=09`ls -d /usr/lib 2>/dev/null` \ > -=09=09=09; do > -=09=09 if test -f "$i/tkConfig.sh" ; then > -=09=09=09ac_cv_c_tkconfig=3D`(cd $i; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > -=09 # check in a few other private locations > -=09 if test x"${ac_cv_c_tkconfig}" =3D x ; then > -=09=09for i in \ > -=09=09=09${srcdir}/../tk \ > -=09=09=09`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > -=09=09=09`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ > -=09=09=09`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do > -=09=09 if test -f "$i/$platDir/tkConfig.sh" ; then > -=09=09=09ac_cv_c_tkconfig=3D`(cd $i/$platDir; pwd)` > -=09=09=09break > -=09=09 fi > -=09=09done > -=09 fi > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_link "$LINENO"; then : > + gdb_cv_var_macho=3Dyes > +else > + gdb_cv_var_macho=3Dno > =20 > fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > =20 > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 > +$as_echo "$gdb_cv_var_macho" >&6; } > + CC=3D$OLD_CC > + CFLAGS=3D$OLD_CFLAGS > + LDFLAGS=3D$OLD_LDFLAGS > + LIBS=3D$OLD_LIBS > +if test "$gdb_cv_var_macho" =3D yes; then > + CONFIG_OBS=3D"$CONFIG_OBS machoread.o" > +fi > =20 > -=09if test x"${ac_cv_c_tkconfig}" =3D x ; then > -=09 TK_BIN_DIR=3D"# no Tk configs found" > -=09 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk c= onfiguration definitions" >&5 > -$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;= } > -=09else > -=09 no_tk=3D > -=09 TK_BIN_DIR=3D${ac_cv_c_tkconfig} > -=09 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_D= IR}/tkConfig.sh" >&5 > -$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } > -=09fi > - fi > - > +# Add any host-specific objects to GDB. > +CONFIG_OBS=3D"${CONFIG_OBS} ${gdb_host_obs}" > =20 > - if test -z "${no_tcl}" -a -z "${no_tk}"; then > +# If building on ELF, look for lzma support for embedded compressed debu= g info. > +if test "$gdb_cv_var_elf" =3D yes; then > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $= {TCL_BIN_DIR}/tclConfig.sh" >&5 > -$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >= &6; } > +# Check whether --with-lzma was given. > +if test "${with_lzma+set}" =3D set; then : > + withval=3D$with_lzma; > +else > + with_lzma=3Dauto > +fi > =20 > - if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 > -$as_echo "loading" >&6; } > -=09. ${TCL_BIN_DIR}/tclConfig.sh > - else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find = ${TCL_BIN_DIR}/tclConfig.sh" >&5 > -$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } > - fi > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma"= >&5 > +$as_echo_n "checking whether to use lzma... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 > +$as_echo "$with_lzma" >&6; } > =20 > - # eval is required to do the TCL_DBGX substitution > - eval "TCL_LIB_FILE=3D\"${TCL_LIB_FILE}\"" > - eval "TCL_STUB_LIB_FILE=3D\"${TCL_STUB_LIB_FILE}\"" > + if test "${with_lzma}" !=3D no; then > =20 > - # If the TCL_BIN_DIR is the build directory (not the install directo= ry), > - # then set the common variable name to the value of the build variab= les. > - # For example, the variable TCL_LIB_SPEC will be set to the value > - # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPE= C > - # instead of TCL_BUILD_LIB_SPEC since it will work with both an > - # installed and uninstalled version of Tcl. > - if test -f "${TCL_BIN_DIR}/Makefile" ; then > - TCL_LIB_SPEC=3D${TCL_BUILD_LIB_SPEC} > - TCL_STUB_LIB_SPEC=3D${TCL_BUILD_STUB_LIB_SPEC} > - TCL_STUB_LIB_PATH=3D${TCL_BUILD_STUB_LIB_PATH} > - elif test "`uname -s`" =3D "Darwin"; then > -=09# If Tcl was built as a framework, attempt to use the libraries > -=09# from the framework at the given location so that linking works > -=09# against Tcl.framework installed in an arbitrary location. > -=09case ${TCL_DEFS} in > -=09 *TCL_FRAMEWORK*) > -=09=09if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then > -=09=09 for i in "`cd ${TCL_BIN_DIR}; pwd`" \ > -=09=09=09 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do > -=09=09=09if test "`basename "$i"`" =3D "${TCL_LIB_FILE}.framework"; then > -=09=09=09 TCL_LIB_SPEC=3D"-F`dirname "$i"` -framework ${TCL_LIB_FILE}= " > -=09=09=09 break > -=09=09=09fi > -=09=09 done > -=09=09fi > -=09=09if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then > -=09=09 TCL_STUB_LIB_SPEC=3D"-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" > -=09=09 TCL_STUB_LIB_PATH=3D"${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" > -=09=09fi > -=09=09;; > -=09esac > - fi > =20 > - # eval is required to do the TCL_DBGX substitution > - eval "TCL_LIB_FLAG=3D\"${TCL_LIB_FLAG}\"" > - eval "TCL_LIB_SPEC=3D\"${TCL_LIB_SPEC}\"" > - eval "TCL_STUB_LIB_FLAG=3D\"${TCL_STUB_LIB_FLAG}\"" > - eval "TCL_STUB_LIB_SPEC=3D\"${TCL_STUB_LIB_SPEC}\"" > =20 > =20 > =20 > =20 > =20 > =20 > + use_additional=3Dyes > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > =20 > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > =20 > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > =20 > +# Check whether --with-liblzma-prefix was given. > +if test "${with_liblzma_prefix+set}" =3D set; then : > + withval=3D$with_liblzma_prefix; > + if test "X$withval" =3D "Xno"; then > + use_additional=3Dno > + else > + if test "X$withval" =3D "X"; then > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > =20 > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > =20 > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > - # Check for in-tree tcl > - here=3D`pwd` > - cd ${srcdir}/.. > - topdir=3D`pwd` > - cd ${here} > + else > + additional_includedir=3D"$withval/include" > + additional_libdir=3D"$withval/lib" > + fi > + fi > =20 > - intree=3D"no" > - if test "${TCL_SRC_DIR}" =3D "${topdir}/tcl"; then > - intree=3D"yes" > - fi > +fi > =20 > - # Find Tcl private headers > - if test x"${intree}" =3D xno; then > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private head= ers" >&5 > -$as_echo_n "checking for Tcl private headers... " >&6; } > - private_dir=3D"" > - dir=3D`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` > - if test -f ${dir}/tclInt.h ; then > - private_dir=3D${dir} > - fi > +# Check whether --with-liblzma-type was given. > +if test "${with_liblzma_type+set}" =3D set; then : > + withval=3D$with_liblzma_type; with_liblzma_type=3D$withval > +else > + with_liblzma_type=3Dauto > +fi > =20 > - if test x"${private_dir}" =3D x; then > - as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 > - else > - TCL_PRIVATE_INCLUDE=3D"-I${private_dir}" > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 > -$as_echo "${private_dir}" >&6; } > - fi > + lib_type=3D`eval echo \$with_liblzma_type` > =20 > -=09 TCL_INCLUDE=3D"${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" > - TCL_LIBRARY=3D"${TCL_LIB_SPEC}" > - TCL_DEPS=3D"" > - else > - # If building tcl in the same src tree, private headers > - # are not needed, but we need to be sure to use the right > - # headers library > -=09 TCL_INCLUDE=3D"-I${TCL_SRC_DIR}/generic" > - TCL_LIBRARY=3D"${TCL_BUILD_LIB_SPEC}" > - TCL_DEPS=3D"../tcl/${configdir}${TCL_LIB_FILE}" > + LIBLZMA=3D > + LTLIBLZMA=3D > + INCLZMA=3D > + rpathdirs=3D > + ltrpathdirs=3D > + names_already_handled=3D > + names_next_round=3D'lzma ' > + while test -n "$names_next_round"; do > + names_this_round=3D"$names_next_round" > + names_next_round=3D > + for name in $names_this_round; do > + already_handled=3D > + for n in $names_already_handled; do > + if test "$n" =3D "$name"; then > + already_handled=3Dyes > + break > fi > + done > + if test -z "$already_handled"; then > + names_already_handled=3D"$names_already_handled $name" > + uppername=3D`echo "$name" | sed -e 'y|abcdefghij= klmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` > + eval value=3D\"\$HAVE_LIB$uppername\" > + if test -n "$value"; then > + if test "$value" =3D yes; then > + eval value=3D\"\$LIB$uppername\" > + test -z "$value" || LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$value= " > + eval value=3D\"\$LTLIB$uppername\" > + test -z "$value" || LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }= $value" > + else > + : > + fi > + else > + found_dir=3D > + found_la=3D > + found_so=3D > + found_a=3D > + if test $use_additional =3D yes; then > + if test -n "$shlibext" && test -f "$additional_libdir/lib$na= me.$shlibext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$additional_libdir" > + found_so=3D"$additional_libdir/lib$name.$shlibext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$additional_libdir/lib$name.$libext"; then > + found_dir=3D"$additional_libdir" > + found_a=3D"$additional_libdir/lib$name.$libext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + fi > + fi > + fi > + if test "X$found_dir" =3D "X"; then > + for x in $LDFLAGS $LTLIBLZMA; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + case "$x" in > + -L*) > + dir=3D`echo "X$x" | sed -e 's/^X-L//'` > + if test -n "$shlibext" && test -f "$dir/lib$name.$shli= bext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$dir" > + found_so=3D"$dir/lib$name.$shlibext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$dir/lib$name.$libext"; then > + found_dir=3D"$dir" > + found_a=3D"$dir/lib$name.$libext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + fi > + fi > + ;; > + esac > + if test "X$found_dir" !=3D "X"; then > + break > + fi > + done > + fi > + if test "X$found_dir" !=3D "X"; then > + LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-L$found= _dir -l$name" > + if test "X$found_so" !=3D "X"; then > + if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$found= _so" > + else > + = haveit=3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $found_dir" > + fi > + if test "$hardcode_direct" =3D yes; then > + LIBLZMA=3D"${LIBLZ= MA}${LIBLZMA:+ }$found_so" > + else > + if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > + LIBLZMA=3D"$= {LIBLZMA}${LIBLZMA:+ }$found_so" > + haveit=3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $found_dir" > + fi > + else > + = haveit=3D > + for x in $LDFLAGS $LIBLZMA; do > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > + if test "X$x" =3D "X-L$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-L$found_dir" > + fi > + if test "$hardcode_minus_L" !=3D no; then > + = LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$found_so" > + else > + = = LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-l$name" > + fi > + fi > + fi > + fi > + else > + if test "X$found_a" !=3D "X"; then > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$found= _a" > + else > + LIBLZMA=3D"${LIBLZMA}${L= IBLZMA:+ }-L$found_dir -l$name" > + fi > + fi > + additional_includedir=3D > + case "$found_dir" in > + */lib | */lib/) > + basedir=3D`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/l= ib/*$,,'` > + additional_includedir=3D"$basedir/include" > + ;; > + esac > + if test "X$additional_includedir" !=3D "X"; then > + = if test "X$additional_includedir" != =3D "X/usr/include"; then > + haveit=3D > + if test "X$additional_includedir" =3D "X/usr/local/inclu= de"; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + for x in $CPPFLAGS $INCLZMA; do > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > + if test "X$x" =3D "X-I$additional_includedir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_includedir"; then > + INCLZMA=3D"${INCLZMA}${INCLZ= MA:+ }-I$additional_includedir" > + fi > + fi > + fi > + fi > + fi > + if test -n "$found_la"; then > + save_libdir=3D"$= libdir" > + case "$found_la" in > + */* | *\\*) . "$found_la" ;; > + *) . "./$found_la" ;; > + esac > + libdir=3D"$save_libdir" > + for dep in $dependency_libs; do > + case "$dep" in > + -L*) > + additional_libdir=3D`echo "X$dep" | sed -e 's/^X-L//= '` > + = = if test "X$additional_libdir" !=3D "X/usr/lib"; then > + haveit=3D > + if test "X$additional_libdir" =3D "X/usr/local/lib= "; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + haveit=3D > + for x in $LDFLAGS $LIBLZMA; do > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $= {TK_BIN_DIR}/tkConfig.sh" >&5 > -$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6= ; } > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > - if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 > -$as_echo "loading" >&6; } > -=09. ${TK_BIN_DIR}/tkConfig.sh > - else > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find = ${TK_BIN_DIR}/tkConfig.sh" >&5 > -$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } > - fi > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LIBLZMA=3D"${LIB= LZMA}${LIBLZMA:+ }-L$additional_libdir" > + fi > + fi > + haveit=3D > + for x in $LDFLAGS $LTLIBLZMA; do > =20 > - # eval is required to do the TK_DBGX substitution > - eval "TK_LIB_FILE=3D\"${TK_LIB_FILE}\"" > - eval "TK_STUB_LIB_FILE=3D\"${TK_STUB_LIB_FILE}\"" > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > - # If the TK_BIN_DIR is the build directory (not the install director= y), > - # then set the common variable name to the value of the build variab= les. > - # For example, the variable TK_LIB_SPEC will be set to the value > - # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC > - # instead of TK_BUILD_LIB_SPEC since it will work with both an > - # installed and uninstalled version of Tcl. > - if test -f "${TK_BIN_DIR}/Makefile" ; then > - TK_LIB_SPEC=3D${TK_BUILD_LIB_SPEC} > - TK_STUB_LIB_SPEC=3D${TK_BUILD_STUB_LIB_SPEC} > - TK_STUB_LIB_PATH=3D${TK_BUILD_STUB_LIB_PATH} > - elif test "`uname -s`" =3D "Darwin"; then > -=09# If Tk was built as a framework, attempt to use the libraries > -=09# from the framework at the given location so that linking works > -=09# against Tk.framework installed in an arbitrary location. > -=09case ${TK_DEFS} in > -=09 *TK_FRAMEWORK*) > -=09=09if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then > -=09=09 for i in "`cd ${TK_BIN_DIR}; pwd`" \ > -=09=09=09 "`cd ${TK_BIN_DIR}/../..; pwd`"; do > -=09=09=09if test "`basename "$i"`" =3D "${TK_LIB_FILE}.framework"; then > -=09=09=09 TK_LIB_SPEC=3D"-F`dirname "$i"` -framework ${TK_LIB_FILE}" > -=09=09=09 break > -=09=09=09fi > -=09=09 done > -=09=09fi > -=09=09if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then > -=09=09 TK_STUB_LIB_SPEC=3D"-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" > -=09=09 TK_STUB_LIB_PATH=3D"${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" > -=09=09fi > -=09=09;; > -=09esac > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LTLIBLZMA=3D"${L= TLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" > + fi > + fi > + fi > + fi > + ;; > + -R*) > + dir=3D`echo "X$dep" | sed -e 's/^X-R//'` > + if test "$enable_rpath" !=3D no; then > + haveit= =3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $dir" > + fi > + haveit= =3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $dir" > + fi > + fi > + ;; > + -l*) > + names_next_round=3D"$names_next_= round "`echo "X$dep" | sed -e 's/^X-l//'` > + ;; > + *.la) > + = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > + ;; > + *) > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+= }$dep" > + LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }$dep" > + ;; > + esac > + done > + fi > + else > + if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-l$name" > + LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" > + else > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" > + LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libex= t" > + fi > + fi > + fi > + fi > + done > + done > + if test "X$rpathdirs" !=3D "X"; then > + if test -n "$hardcode_libdir_separator"; then > + alldirs=3D > + for found_dir in $rpathdirs; do > + alldirs=3D"${alldirs}${alldirs:+$hardcode_libdir_separator}$foun= d_dir" > + done > + acl_save_libdir=3D"$libdir" > + libdir=3D"$alldirs" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$flag" > + else > + for found_dir in $rpathdirs; do > + acl_save_libdir=3D"$libdir" > + libdir=3D"$found_dir" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBLZMA=3D"${LIBLZMA}${LIBLZMA:+ }$flag" > + done > fi > - > - # eval is required to do the TK_DBGX substitution > - eval "TK_LIB_FLAG=3D\"${TK_LIB_FLAG}\"" > - eval "TK_LIB_SPEC=3D\"${TK_LIB_SPEC}\"" > - eval "TK_STUB_LIB_FLAG=3D\"${TK_STUB_LIB_FLAG}\"" > - eval "TK_STUB_LIB_SPEC=3D\"${TK_STUB_LIB_SPEC}\"" > - > - > - > - > - > - > + fi > + if test "X$ltrpathdirs" !=3D "X"; then > + for found_dir in $ltrpathdirs; do > + LTLIBLZMA=3D"${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" > + done > + fi > =20 > =20 > + ac_save_CPPFLAGS=3D"$CPPFLAGS" > =20 > + for element in $INCLZMA; do > + haveit=3D > + for x in $CPPFLAGS; do > =20 > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > =20 > + if test "X$x" =3D "X$element"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + CPPFLAGS=3D"${CPPFLAGS}${CPPFLAGS:+ }$element" > + fi > + done > =20 > =20 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 > +$as_echo_n "checking for liblzma... " >&6; } > +if ${ac_cv_liblzma+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > =20 > - # Check for in-tree Tk > - intree=3D"no" > - if test "${TK_SRC_DIR}" =3D "${topdir}/tk"; then > - intree=3D"yes" > - fi > + ac_save_LIBS=3D"$LIBS" > + LIBS=3D"$LIBS $LIBLZMA" > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include "lzma.h" > +int > +main () > +{ > +lzma_index_iter iter; > +=09=09=09 lzma_index_iter_init (&iter, 0); > +=09=09=09 lzma_mf_is_supported (LZMA_MF_HC3); > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_link "$LINENO"; then : > + ac_cv_liblzma=3Dyes > +else > + ac_cv_liblzma=3Dno > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + LIBS=3D"$ac_save_LIBS" > =20 > - # Find Tk private headers > - if test x"${intree}" =3D xno; then > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 > +$as_echo "$ac_cv_liblzma" >&6; } > + if test "$ac_cv_liblzma" =3D yes; then > + HAVE_LIBLZMA=3Dyes > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private heade= rs" >&5 > -$as_echo_n "checking for Tk private headers... " >&6; } > - private_dir=3D"" > - dir=3D`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` > - if test -f ${dir}/tkInt.h; then > - private_dir=3D${dir} > - fi > +$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h > =20 > - if test x"${private_dir}" =3D x; then > - as_fn_error $? "could not find Tk private headers" "$LINENO" 5 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= iblzma" >&5 > +$as_echo_n "checking how to link with liblzma... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 > +$as_echo "$LIBLZMA" >&6; } > else > - TK_PRIVATE_INCLUDE=3D"-I${private_dir}" > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 > -$as_echo "${private_dir}" >&6; } > + HAVE_LIBLZMA=3Dno > + CPPFLAGS=3D"$ac_save_CPPFLAGS" > + LIBLZMA=3D > + LTLIBLZMA=3D > fi > =20 > -=09 TK_INCLUDE=3D"${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" > -=09 TK_LIBRARY=3D${TK_LIB_SPEC} > - TK_DEPS=3D"" > - else > - TK_INCLUDE=3D"-I${TK_SRC_DIR}/generic" > - TK_LIBRARY=3D"${TK_BUILD_LIB_SPEC}" > - TK_DEPS=3D"../tk/${configdir}/${TK_LIB_FILE}" > - fi > - > - > - > - > - > - ENABLE_CFLAGS=3D"${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" > =20 > -=09# Include some libraries that Tcl and Tk want. > -=09TCL_LIBS=3D'$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' > -=09# Yes, the ordering seems wrong here. But it isn't. > -=09# TK_LIBS is the list of libraries that need to be linked > -=09# after Tcl/Tk. Note that this isn't put into LIBS. If it > -=09# were in LIBS then any link tests after this point would > -=09# try to include things like `$(LIBGUI)', which wouldn't work. > -=09GDBTKLIBS=3D"${TCL_LIBS} ${TK_LIBS}" > =20 > - CONFIG_OBS=3D"${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" > - CONFIG_DEPS=3D"${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" > - CONFIG_SRCS=3D"${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" > -=09CONFIG_ALL=3D"${CONFIG_ALL} all-gdbtk" > -=09CONFIG_CLEAN=3D"${CONFIG_CLEAN} clean-gdbtk" > -=09CONFIG_INSTALL=3D"${CONFIG_INSTALL} install-gdbtk" > -=09CONFIG_UNINSTALL=3D"${CONFIG_UNINSTALL} uninstall-gdbtk" > =20 > -=09if test x"$gdb_cv_os_cygwin" =3D xyes; then > -=09 WIN32LIBS=3D"${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" > -=09 WIN32LDAPP=3D"-Wl,--subsystem,console" > -=09 CONFIG_OBS=3D"${CONFIG_OBS} gdbres.o" > -=09fi > =20 > - subdirs=3D"$subdirs gdbtk" > =20 > + if test "$HAVE_LIBLZMA" !=3D yes; then > + if test "$with_lzma" =3D yes; then > + as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 > + fi > fi > + fi > fi > =20 > +LIBGUI=3D"../libgui/src/libgui.a" > +GUI_CFLAGS_X=3D"-I${srcdir}/../libgui/src" > =20 > =20 > =20 > +WIN32LDAPP=3D > =20 > =20 > =20 > +case "${host}" in > +*-*-cygwin* | *-*-mingw* ) > + configdir=3D"win" > + ;; > +*) > + configdir=3D"unix" > + ;; > +esac > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 > -$as_echo_n "checking for X... " >&6; } > +GDBTKLIBS=3D > +if test "${enable_gdbtk}" =3D "yes"; then > =20 > + # Gdbtk must have an absolute path to srcdir in order to run > + # properly when not installed. > + here=3D`pwd` > + cd ${srcdir} > + GDBTK_SRC_DIR=3D`pwd` > + cd $here > =20 > -# Check whether --with-x was given. > -if test "${with_x+set}" =3D set; then : > - withval=3D$with_x; > -fi > =20 > -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. > -if test "x$with_x" =3D xno; then > - # The user explicitly disabled X. > - have_x=3Ddisabled > -else > - case $x_includes,$x_libraries in #( > - *\'*) as_fn_error $? "cannot use X directory names containing '" "$L= INENO" 5;; #( > - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - # One or both of the vars are not set, and there is no cached value. > -ac_x_includes=3Dno ac_x_libraries=3Dno > -rm -f -r conftest.dir > -if mkdir conftest.dir; then > - cd conftest.dir > - cat >Imakefile <<'_ACEOF' > -incroot: > -=09@echo incroot=3D'${INCROOT}' > -usrlibdir: > -=09@echo usrlibdir=3D'${USRLIBDIR}' > -libdir: > -=09@echo libdir=3D'${LIBDIR}' > -_ACEOF > - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makef= ile; then > - # GNU make sometimes prints "make[1]: Entering ...", which would con= fuse us. > - for ac_var in incroot usrlibdir libdir; do > - eval "ac_im_$ac_var=3D\`\${MAKE-make} $ac_var 2>/dev/null | sed -n= 's/^$ac_var=3D//p'\`" > - done > - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. > - for ac_extension in a so sl dylib la dll; do > - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && > -=09 test -f "$ac_im_libdir/libX11.$ac_extension"; then > -=09ac_im_usrlibdir=3D$ac_im_libdir; break > - fi > - done > - # Screen out bogus values from the imake configuration. They are > - # bogus both because they are the default anyway, and because > - # using them would break gcc on systems where it needs fixed include= s. > - case $ac_im_incroot in > -=09/usr/include) ac_x_includes=3D ;; > -=09*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=3D$ac_im_incro= ot;; > - esac > - case $ac_im_usrlibdir in > -=09/usr/lib | /usr/lib64 | /lib | /lib64) ;; > -=09*) test -d "$ac_im_usrlibdir" && ac_x_libraries=3D$ac_im_usrlibdir ;; > - esac > - fi > - cd .. > - rm -f -r conftest.dir > -fi > + # > + # Ok, lets find the tcl configuration > + # First, look for one uninstalled. > + # the alternative search directory is invoked by --with-tcl > + # > =20 > -# Standard set of common directories for X headers. > -# Check X11 before X11Rn because it is often a symlink to the current re= lease. > -ac_x_header_dirs=3D' > -/usr/X11/include > -/usr/X11R7/include > -/usr/X11R6/include > -/usr/X11R5/include > -/usr/X11R4/include > + if test x"${no_tcl}" =3D x ; then > +=09# we reset no_tcl in case something fails here > +=09no_tcl=3Dtrue > + > +# Check whether --with-tcl was given. > +if test "${with_tcl+set}" =3D set; then : > + withval=3D$with_tcl; with_tclconfig=3D${withval} > +fi > =20 > -/usr/include/X11 > -/usr/include/X11R7 > -/usr/include/X11R6 > -/usr/include/X11R5 > -/usr/include/X11R4 > +=09{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configurati= on" >&5 > +$as_echo_n "checking for Tcl configuration... " >&6; } > +=09if ${ac_cv_c_tclconfig+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > =20 > -/usr/local/X11/include > -/usr/local/X11R7/include > -/usr/local/X11R6/include > -/usr/local/X11R5/include > -/usr/local/X11R4/include > =20 > -/usr/local/include/X11 > -/usr/local/include/X11R7 > -/usr/local/include/X11R6 > -/usr/local/include/X11R5 > -/usr/local/include/X11R4 > +=09 # First check to see if --with-tcl was specified. > +=09 case "${host}" in > +=09=09*-*-cygwin*) platDir=3D"win" ;; > +=09=09*) platDir=3D"unix" ;; > +=09 esac > +=09 if test x"${with_tclconfig}" !=3D x ; then > +=09=09if test -f "${with_tclconfig}/tclConfig.sh" ; then > +=09=09 ac_cv_c_tclconfig=3D`(cd ${with_tclconfig}; pwd)` > +=09=09else > +=09=09 as_fn_error $? "${with_tclconfig} directory doesn't contain tc= lConfig.sh" "$LINENO" 5 > +=09=09fi > +=09 fi > =20 > -/usr/X386/include > -/usr/x386/include > -/usr/XFree86/include/X11 > +=09 # then check for a private Tcl installation > +=09 if test x"${ac_cv_c_tclconfig}" =3D x ; then > +=09=09for i in \ > +=09=09=09../tcl \ > +=09=09=09`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ > +=09=09=09../../tcl \ > +=09=09=09`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ > +=09=09=09../../../tcl \ > +=09=09=09`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do > +=09=09 if test -f "$i/$platDir/tclConfig.sh" ; then > +=09=09=09ac_cv_c_tclconfig=3D`(cd $i/$platDir; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > =20 > -/usr/include > -/usr/local/include > -/usr/unsupported/include > -/usr/athena/include > -/usr/local/x11r5/include > -/usr/lpp/Xamples/include > +=09 # on Darwin, check in Framework installation locations > +=09 if test "`uname -s`" =3D "Darwin" -a x"${ac_cv_c_tclconfig}" =3D = x ; then > +=09=09for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ > +=09=09=09`ls -d /Library/Frameworks 2>/dev/null` \ > +=09=09=09`ls -d /Network/Library/Frameworks 2>/dev/null` \ > +=09=09=09`ls -d /System/Library/Frameworks 2>/dev/null` \ > +=09=09=09; do > +=09=09 if test -f "$i/Tcl.framework/tclConfig.sh" ; then > +=09=09=09ac_cv_c_tclconfig=3D`(cd $i/Tcl.framework; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > =20 > -/usr/openwin/include > -/usr/openwin/share/include' > +=09 # check in a few common install locations > +=09 if test x"${ac_cv_c_tclconfig}" =3D x ; then > +=09=09for i in `ls -d ${libdir} 2>/dev/null` \ > +=09=09=09`ls -d ${exec_prefix}/lib 2>/dev/null` \ > +=09=09=09`ls -d ${prefix}/lib 2>/dev/null` \ > +=09=09=09`ls -d /usr/local/lib 2>/dev/null` \ > +=09=09=09`ls -d /usr/contrib/lib 2>/dev/null` \ > +=09=09=09`ls -d /usr/lib 2>/dev/null` \ > +=09=09=09; do > +=09=09 if test -f "$i/tclConfig.sh" ; then > +=09=09=09ac_cv_c_tclconfig=3D`(cd $i; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > + > +=09 # check in a few other private locations > +=09 if test x"${ac_cv_c_tclconfig}" =3D x ; then > +=09=09for i in \ > +=09=09=09${srcdir}/../tcl \ > +=09=09=09`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do > +=09=09 if test -f "$i/$platDir/tclConfig.sh" ; then > +=09=09 ac_cv_c_tclconfig=3D`(cd $i/$platDir; pwd)` > +=09=09 break > +=09=09fi > +=09=09done > +=09 fi > =20 > -if test "$ac_x_includes" =3D no; then > - # Guess where to find include files, by looking for Xlib.h. > - # First, try using that file with no special directory specified. > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -_ACEOF > -if ac_fn_c_try_cpp "$LINENO"; then : > - # We can compile using X headers with no special include directory. > -ac_x_includes=3D > -else > - for ac_dir in $ac_x_header_dirs; do > - if test -r "$ac_dir/X11/Xlib.h"; then > - ac_x_includes=3D$ac_dir > - break > - fi > -done > fi > -rm -f conftest.err conftest.i conftest.$ac_ext > -fi # $ac_x_includes =3D no > =20 > -if test "$ac_x_libraries" =3D no; then > - # Check for the libraries. > - # See if we find them without any special options. > - # Don't add to $LIBS permanently. > - ac_save_LIBS=3D$LIBS > - LIBS=3D"-lX11 $LIBS" > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > -/* end confdefs.h. */ > -#include > -int > -main () > -{ > -XrmInitialize () > - ; > - return 0; > -} > -_ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > - LIBS=3D$ac_save_LIBS > -# We can link X programs with no special library path. > -ac_x_libraries=3D > -else > - LIBS=3D$ac_save_LIBS > -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/inclu= de/lib/g` > -do > - # Don't even attempt the hair of trying to link an X program! > - for ac_extension in a so sl dylib la dll; do > - if test -r "$ac_dir/libX11.$ac_extension"; then > - ac_x_libraries=3D$ac_dir > - break 2 > + > +=09if test x"${ac_cv_c_tclconfig}" =3D x ; then > +=09 TCL_BIN_DIR=3D"# no Tcl configs found" > +=09 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl = configuration definitions" >&5 > +$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2= ;} > +=09else > +=09 no_tcl=3D > +=09 TCL_BIN_DIR=3D${ac_cv_c_tclconfig} > +=09 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_= DIR}/tclConfig.sh" >&5 > +$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } > +=09fi > fi > - done > -done > -fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > -fi # $ac_x_libraries =3D no > =20 > -case $ac_x_includes,$ac_x_libraries in #( > - no,* | *,no | *\'*) > - # Didn't find X, or a directory has "'" in its name. > - ac_cv_have_x=3D"have_x=3Dno";; #( > - *) > - # Record where we found X for the cache. > - ac_cv_have_x=3D"have_x=3Dyes\ > -=09ac_x_includes=3D'$ac_x_includes'\ > -=09ac_x_libraries=3D'$ac_x_libraries'" > -esac > -fi > -;; #( > - *) have_x=3Dyes;; > - esac > - eval "$ac_cv_have_x" > -fi # $with_x !=3D no > =20 > -if test "$have_x" !=3D yes; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 > -$as_echo "$have_x" >&6; } > - no_x=3Dyes > -else > - # If each of the values was on the command line, it overrides each gue= ss. > - test "x$x_includes" =3D xNONE && x_includes=3D$ac_x_includes > - test "x$x_libraries" =3D xNONE && x_libraries=3D$ac_x_libraries > - # Update the cache value to reflect the command line values. > - ac_cv_have_x=3D"have_x=3Dyes\ > -=09ac_x_includes=3D'$x_includes'\ > -=09ac_x_libraries=3D'$x_libraries'" > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_librarie= s, headers $x_includes" >&5 > -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } > -fi > + # If $no_tk is nonempty, then we can't do Tk, and there is no > + # point to doing Tcl. > =20 > + # > + # Ok, lets find the tk configuration > + # First, look for one uninstalled. > + # the alternative search directory is invoked by --with-tk > + # > =20 > -# Unlike the sim directory, whether a simulator is linked is controlled = by > -# presence of a gdb_sim definition in the target configure.tgt entry. > -# 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 source tree. > -# > -# Check whether --enable-sim was given. > -if test "${enable_sim+set}" =3D set; then : > - enableval=3D$enable_sim; echo "enable_sim =3D $enable_sim"; > - echo "enableval =3D ${enableval}"; > - case "${enableval}" in > - yes) ignore_sim=3Dfalse ;; > - no) ignore_sim=3Dtrue ;; > - *) ignore_sim=3Dfalse ;; > - esac > -else > - ignore_sim=3Dfalse > + if test x"${no_tk}" =3D x ; then > +=09# we reset no_tk in case something fails here > +=09no_tk=3Dtrue > + > +# Check whether --with-tk was given. > +if test "${with_tk+set}" =3D set; then : > + withval=3D$with_tk; with_tkconfig=3D${withval} > fi > =20 > +=09{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuratio= n" >&5 > +$as_echo_n "checking for Tk configuration... " >&6; } > +=09if ${ac_cv_c_tkconfig+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > =20 > -if test ! -d "${srcdir}/../sim"; then > - ignore_sim=3Dtrue > -fi > =20 > -SIM=3D > -SIM_OBS=3D > -if test "${ignore_sim}" =3D "false"; then > - if test x"${gdb_sim}" !=3D x ; then > - SIM=3D"${gdb_sim}" > - SIM_OBS=3D"remote-sim.o" > +=09 # First check to see if --with-tkconfig was specified. > +=09 if test x"${with_tkconfig}" !=3D x ; then > +=09=09if test -f "${with_tkconfig}/tkConfig.sh" ; then > +=09=09 ac_cv_c_tkconfig=3D`(cd ${with_tkconfig}; pwd)` > +=09=09else > +=09=09 as_fn_error $? "${with_tkconfig} directory doesn't contain tkC= onfig.sh" "$LINENO" 5 > +=09=09fi > +=09 fi > =20 > - # Some tdep code should only be compiled in when the ppc sim is > - # built. PR sim/13418. > - case $target in > - powerpc*-*-*) > +=09 # then check for a private Tk library > +=09 case "${host}" in > +=09=09*-*-cygwin*) platDir=3D"win" ;; > +=09=09*) platDir=3D"unix" ;; > +=09 esac > +=09 if test x"${ac_cv_c_tkconfig}" =3D x ; then > +=09=09for i in \ > +=09=09=09../tk \ > +=09=09=09`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ > +=09=09=09../../tk \ > +=09=09=09`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ > +=09=09=09../../../tk \ > +=09=09=09`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do > +=09=09 if test -f "$i/$platDir/tkConfig.sh" ; then > +=09=09=09ac_cv_c_tkconfig=3D`(cd $i/$platDir; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > =20 > -$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h > +=09 # on Darwin, check in Framework installation locations > +=09 if test "`uname -s`" =3D "Darwin" -a x"${ac_cv_c_tkconfig}" =3D x= ; then > +=09=09for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ > +=09=09=09`ls -d /Library/Frameworks 2>/dev/null` \ > +=09=09=09`ls -d /Network/Library/Frameworks 2>/dev/null` \ > +=09=09=09`ls -d /System/Library/Frameworks 2>/dev/null` \ > +=09=09=09; do > +=09=09 if test -f "$i/Tk.framework/tkConfig.sh" ; then > +=09=09=09ac_cv_c_tkconfig=3D`(cd $i/Tk.framework; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > + > +=09 # check in a few common install locations > +=09 if test x"${ac_cv_c_tkconfig}" =3D x ; then > +=09=09for i in `ls -d ${libdir} 2>/dev/null` \ > +=09=09=09`ls -d ${exec_prefix}/lib 2>/dev/null` \ > +=09=09=09`ls -d ${prefix}/lib 2>/dev/null` \ > +=09=09=09`ls -d /usr/local/lib 2>/dev/null` \ > +=09=09=09`ls -d /usr/contrib/lib 2>/dev/null` \ > +=09=09=09`ls -d /usr/lib 2>/dev/null` \ > +=09=09=09; do > +=09=09 if test -f "$i/tkConfig.sh" ; then > +=09=09=09ac_cv_c_tkconfig=3D`(cd $i; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > +=09 # check in a few other private locations > +=09 if test x"${ac_cv_c_tkconfig}" =3D x ; then > +=09=09for i in \ > +=09=09=09${srcdir}/../tk \ > +=09=09=09`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ > +=09=09=09`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ > +=09=09=09`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do > +=09=09 if test -f "$i/$platDir/tkConfig.sh" ; then > +=09=09=09ac_cv_c_tkconfig=3D`(cd $i/$platDir; pwd)` > +=09=09=09break > +=09=09 fi > +=09=09done > +=09 fi > =20 > -=09;; > - esac > - fi > fi > =20 > =20 > +=09if test x"${ac_cv_c_tkconfig}" =3D x ; then > +=09 TK_BIN_DIR=3D"# no Tk configs found" > +=09 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk c= onfiguration definitions" >&5 > +$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;= } > +=09else > +=09 no_tk=3D > +=09 TK_BIN_DIR=3D${ac_cv_c_tkconfig} > +=09 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_D= IR}/tkConfig.sh" >&5 > +$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } > +=09fi > + fi > =20 > =20 > + if test -z "${no_tcl}" -a -z "${no_tk}"; then > =20 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $= {TCL_BIN_DIR}/tclConfig.sh" >&5 > +$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >= &6; } > =20 > + if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 > +$as_echo "loading" >&6; } > +=09. ${TCL_BIN_DIR}/tclConfig.sh > + else > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find = ${TCL_BIN_DIR}/tclConfig.sh" >&5 > +$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } > + fi > =20 > + # eval is required to do the TCL_DBGX substitution > + eval "TCL_LIB_FILE=3D\"${TCL_LIB_FILE}\"" > + eval "TCL_STUB_LIB_FILE=3D\"${TCL_STUB_LIB_FILE}\"" > =20 > + # If the TCL_BIN_DIR is the build directory (not the install directo= ry), > + # then set the common variable name to the value of the build variab= les. > + # For example, the variable TCL_LIB_SPEC will be set to the value > + # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPE= C > + # instead of TCL_BUILD_LIB_SPEC since it will work with both an > + # installed and uninstalled version of Tcl. > + if test -f "${TCL_BIN_DIR}/Makefile" ; then > + TCL_LIB_SPEC=3D${TCL_BUILD_LIB_SPEC} > + TCL_STUB_LIB_SPEC=3D${TCL_BUILD_STUB_LIB_SPEC} > + TCL_STUB_LIB_PATH=3D${TCL_BUILD_STUB_LIB_PATH} > + elif test "`uname -s`" =3D "Darwin"; then > +=09# If Tcl was built as a framework, attempt to use the libraries > +=09# from the framework at the given location so that linking works > +=09# against Tcl.framework installed in an arbitrary location. > +=09case ${TCL_DEFS} in > +=09 *TCL_FRAMEWORK*) > +=09=09if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then > +=09=09 for i in "`cd ${TCL_BIN_DIR}; pwd`" \ > +=09=09=09 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do > +=09=09=09if test "`basename "$i"`" =3D "${TCL_LIB_FILE}.framework"; then > +=09=09=09 TCL_LIB_SPEC=3D"-F`dirname "$i"` -framework ${TCL_LIB_FILE}= " > +=09=09=09 break > +=09=09=09fi > +=09=09 done > +=09=09fi > +=09=09if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then > +=09=09 TCL_STUB_LIB_SPEC=3D"-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" > +=09=09 TCL_STUB_LIB_PATH=3D"${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" > +=09=09fi > +=09=09;; > +=09esac > + fi > =20 > + # eval is required to do the TCL_DBGX substitution > + eval "TCL_LIB_FLAG=3D\"${TCL_LIB_FLAG}\"" > + eval "TCL_LIB_SPEC=3D\"${TCL_LIB_SPEC}\"" > + eval "TCL_STUB_LIB_FLAG=3D\"${TCL_STUB_LIB_FLAG}\"" > + eval "TCL_STUB_LIB_SPEC=3D\"${TCL_STUB_LIB_SPEC}\"" > =20 > =20 > =20 > =20 > =20 > -# List of host floatformats. > =20 > -cat >>confdefs.h <<_ACEOF > -#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format > -_ACEOF > =20 > =20 > -cat >>confdefs.h <<_ACEOF > -#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format > -_ACEOF > =20 > =20 > -cat >>confdefs.h <<_ACEOF > -#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format > -_ACEOF > =20 > =20 > -# target_subdir is used by the testsuite to find the target libraries. > -target_subdir=3D > -if test "${host}" !=3D "${target}"; then > - target_subdir=3D"${target_alias}/" > -fi > =20 > =20 > -# Import nat definitions. > -nat_makefile_frag=3D/dev/null > -if test "${gdb_native}" =3D "yes"; then > - . ${srcdir}/configure.nat > - nativefile=3D$NAT_FILE > -fi > =20 > + # Check for in-tree tcl > + here=3D`pwd` > + cd ${srcdir}/.. > + topdir=3D`pwd` > + cd ${here} > =20 > + intree=3D"no" > + if test "${TCL_SRC_DIR}" =3D "${topdir}/tcl"; then > + intree=3D"yes" > + fi > =20 > + # Find Tcl private headers > + if test x"${intree}" =3D xno; then > =20 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private head= ers" >&5 > +$as_echo_n "checking for Tcl private headers... " >&6; } > + private_dir=3D"" > + dir=3D`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` > + if test -f ${dir}/tclInt.h ; then > + private_dir=3D${dir} > + fi > =20 > + if test x"${private_dir}" =3D x; then > + as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 > + else > + TCL_PRIVATE_INCLUDE=3D"-I${private_dir}" > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 > +$as_echo "${private_dir}" >&6; } > + fi > =20 > +=09 TCL_INCLUDE=3D"${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" > + TCL_LIBRARY=3D"${TCL_LIB_SPEC}" > + TCL_DEPS=3D"" > + else > + # If building tcl in the same src tree, private headers > + # are not needed, but we need to be sure to use the right > + # headers library > +=09 TCL_INCLUDE=3D"-I${TCL_SRC_DIR}/generic" > + TCL_LIBRARY=3D"${TCL_BUILD_LIB_SPEC}" > + TCL_DEPS=3D"../tcl/${configdir}${TCL_LIB_FILE}" > + fi > =20 > =20 > =20 > =20 > =20 > -if test x"${gdb_osabi}" !=3D x ; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of $= {TK_BIN_DIR}/tkConfig.sh" >&5 > +$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6= ; } > =20 > -cat >>confdefs.h <<_ACEOF > -#define GDB_OSABI_DEFAULT $gdb_osabi > -_ACEOF > + if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 > +$as_echo "loading" >&6; } > +=09. ${TK_BIN_DIR}/tkConfig.sh > + else > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find = ${TK_BIN_DIR}/tkConfig.sh" >&5 > +$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } > + fi > =20 > -fi > + # eval is required to do the TK_DBGX substitution > + eval "TK_LIB_FILE=3D\"${TK_LIB_FILE}\"" > + eval "TK_STUB_LIB_FILE=3D\"${TK_STUB_LIB_FILE}\"" > =20 > -# Setup possible use of libbacktrace. > -# Check whether --enable-libbacktrace was given. > -if test "${enable_libbacktrace+set}" =3D set; then : > - enableval=3D$enable_libbacktrace; > -=09 case $enableval in > -=09 yes | no) > -=09 ;; > -=09 *) > -=09 as_fn_error $? "bad value $enableval for --enable-libbacktrace= " "$LINENO" 5 > -=09 ;; > -=09 esac > + # If the TK_BIN_DIR is the build directory (not the install director= y), > + # then set the common variable name to the value of the build variab= les. > + # For example, the variable TK_LIB_SPEC will be set to the value > + # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC > + # instead of TK_BUILD_LIB_SPEC since it will work with both an > + # installed and uninstalled version of Tcl. > + if test -f "${TK_BIN_DIR}/Makefile" ; then > + TK_LIB_SPEC=3D${TK_BUILD_LIB_SPEC} > + TK_STUB_LIB_SPEC=3D${TK_BUILD_STUB_LIB_SPEC} > + TK_STUB_LIB_PATH=3D${TK_BUILD_STUB_LIB_PATH} > + elif test "`uname -s`" =3D "Darwin"; then > +=09# If Tk was built as a framework, attempt to use the libraries > +=09# from the framework at the given location so that linking works > +=09# against Tk.framework installed in an arbitrary location. > +=09case ${TK_DEFS} in > +=09 *TK_FRAMEWORK*) > +=09=09if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then > +=09=09 for i in "`cd ${TK_BIN_DIR}; pwd`" \ > +=09=09=09 "`cd ${TK_BIN_DIR}/../..; pwd`"; do > +=09=09=09if test "`basename "$i"`" =3D "${TK_LIB_FILE}.framework"; then > +=09=09=09 TK_LIB_SPEC=3D"-F`dirname "$i"` -framework ${TK_LIB_FILE}" > +=09=09=09 break > +=09=09=09fi > +=09=09 done > +=09=09fi > +=09=09if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then > +=09=09 TK_STUB_LIB_SPEC=3D"-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" > +=09=09 TK_STUB_LIB_PATH=3D"${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" > +=09=09fi > +=09=09;; > +=09esac > + fi > =20 > -else > - enable_libbacktrace=3Dyes > -fi > + # eval is required to do the TK_DBGX substitution > + eval "TK_LIB_FLAG=3D\"${TK_LIB_FLAG}\"" > + eval "TK_LIB_SPEC=3D\"${TK_LIB_SPEC}\"" > + eval "TK_STUB_LIB_FLAG=3D\"${TK_STUB_LIB_FLAG}\"" > + eval "TK_STUB_LIB_SPEC=3D\"${TK_STUB_LIB_SPEC}\"" > =20 > =20 > -if test "${enable_libbacktrace}" =3D "yes"; then > - LIBBACKTRACE_INC=3D"-I$srcdir/../libbacktrace/ -I../libbacktrace/" > - LIBBACKTRACE_LIB=3D../libbacktrace/libbacktrace.la > =20 > -$as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h > =20 > -else > - LIBBACKTRACE_INC=3D > - LIBBACKTRACE_LIB=3D > -fi > =20 > =20 > =20 > =20 > -# Check for babeltrace and babeltrace-ctf > =20 > -# Check whether --with-babeltrace was given. > -if test "${with_babeltrace+set}" =3D set; then : > - withval=3D$with_babeltrace; > -else > - with_babeltrace=3Dauto > -fi > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltr= ace" >&5 > -$as_echo_n "checking whether to use babeltrace... " >&6; } > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 > -$as_echo "$with_babeltrace" >&6; } > =20 > -if test "x$with_babeltrace" =3D "xno"; then > - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support d= isabled; GDB is unable to read CTF data." >&5 > -$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to= read CTF data." >&2;} > -else > - # Append -Werror to CFLAGS so that configure can catch the warning > - # "assignment from incompatible pointer type", which is related to > - # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works > - # in GDB, while babeltrace 1.0.3 is broken. > - # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be > - # safe to save and restore CFLAGS here. > - saved_CFLAGS=3D$CFLAGS > - CFLAGS=3D"$CFLAGS -Werror" > =20 > =20 > =20 > + # Check for in-tree Tk > + intree=3D"no" > + if test "${TK_SRC_DIR}" =3D "${topdir}/tk"; then > + intree=3D"yes" > + fi > =20 > + # Find Tk private headers > + if test x"${intree}" =3D xno; then > =20 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private heade= rs" >&5 > +$as_echo_n "checking for Tk private headers... " >&6; } > + private_dir=3D"" > + dir=3D`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` > + if test -f ${dir}/tkInt.h; then > + private_dir=3D${dir} > + fi > =20 > + if test x"${private_dir}" =3D x; then > + as_fn_error $? "could not find Tk private headers" "$LINENO" 5 > + else > + TK_PRIVATE_INCLUDE=3D"-I${private_dir}" > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 > +$as_echo "${private_dir}" >&6; } > + fi > =20 > +=09 TK_INCLUDE=3D"${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" > +=09 TK_LIBRARY=3D${TK_LIB_SPEC} > + TK_DEPS=3D"" > + else > + TK_INCLUDE=3D"-I${TK_SRC_DIR}/generic" > + TK_LIBRARY=3D"${TK_BUILD_LIB_SPEC}" > + TK_DEPS=3D"../tk/${configdir}/${TK_LIB_FILE}" > + fi > =20 > - use_additional=3Dyes > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > =20 > - eval additional_includedir=3D\"$includedir\" > - eval additional_libdir=3D\"$libdir\" > =20 > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > + ENABLE_CFLAGS=3D"${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" > =20 > -# Check whether --with-libbabeltrace-prefix was given. > -if test "${with_libbabeltrace_prefix+set}" =3D set; then : > - withval=3D$with_libbabeltrace_prefix; > - if test "X$withval" =3D "Xno"; then > - use_additional=3Dno > - else > - if test "X$withval" =3D "X"; then > +=09# Include some libraries that Tcl and Tk want. > +=09TCL_LIBS=3D'$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' > +=09# Yes, the ordering seems wrong here. But it isn't. > +=09# TK_LIBS is the list of libraries that need to be linked > +=09# after Tcl/Tk. Note that this isn't put into LIBS. If it > +=09# were in LIBS then any link tests after this point would > +=09# try to include things like `$(LIBGUI)', which wouldn't work. > +=09GDBTKLIBS=3D"${TCL_LIBS} ${TK_LIBS}" > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > + CONFIG_OBS=3D"${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" > + CONFIG_DEPS=3D"${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" > + CONFIG_SRCS=3D"${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" > +=09CONFIG_ALL=3D"${CONFIG_ALL} all-gdbtk" > +=09CONFIG_CLEAN=3D"${CONFIG_CLEAN} clean-gdbtk" > +=09CONFIG_INSTALL=3D"${CONFIG_INSTALL} install-gdbtk" > +=09CONFIG_UNINSTALL=3D"${CONFIG_UNINSTALL} uninstall-gdbtk" > =20 > - eval additional_includedir=3D\"$includedir\" > - eval additional_libdir=3D\"$libdir\" > +=09if test x"$gdb_cv_os_cygwin" =3D xyes; then > +=09 WIN32LIBS=3D"${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" > +=09 WIN32LDAPP=3D"-Wl,--subsystem,console" > +=09 CONFIG_OBS=3D"${CONFIG_OBS} gdbres.o" > +=09fi > =20 > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > + subdirs=3D"$subdirs gdbtk" > =20 > - else > - additional_includedir=3D"$withval/include" > - additional_libdir=3D"$withval/lib" > - fi > fi > - > -fi > - > - > -# Check whether --with-libbabeltrace-type was given. > -if test "${with_libbabeltrace_type+set}" =3D set; then : > - withval=3D$with_libbabeltrace_type; with_libbabeltrace_type=3D$withva= l > -else > - with_libbabeltrace_type=3Dauto > fi > =20 > - lib_type=3D`eval echo \$with_libbabeltrace_type` > - > - LIBBABELTRACE=3D > - LTLIBBABELTRACE=3D > - INCBABELTRACE=3D > - rpathdirs=3D > - ltrpathdirs=3D > - names_already_handled=3D > - names_next_round=3D'babeltrace babeltrace-ctf' > - while test -n "$names_next_round"; do > - names_this_round=3D"$names_next_round" > - names_next_round=3D > - for name in $names_this_round; do > - already_handled=3D > - for n in $names_already_handled; do > - if test "$n" =3D "$name"; then > - already_handled=3Dyes > - break > - fi > - done > - if test -z "$already_handled"; then > - names_already_handled=3D"$names_already_handled $name" > - uppername=3D`echo "$name" | sed -e 'y|abcdefghij= klmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` > - eval value=3D\"\$HAVE_LIB$uppername\" > - if test -n "$value"; then > - if test "$value" =3D yes; then > - eval value=3D\"\$LIB$uppername\" > - test -z "$value" || LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBA= BELTRACE:+ }$value" > - eval value=3D\"\$LTLIB$uppername\" > - test -z "$value" || LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${L= TLIBBABELTRACE:+ }$value" > - else > - : > - fi > - else > - found_dir=3D > - found_la=3D > - found_so=3D > - found_a=3D > - if test $use_additional =3D yes; then > - if test -n "$shlibext" && test -f "$additional_libdir/lib$na= me.$shlibext" && test x$lib_type !=3D xstatic; then > - found_dir=3D"$additional_libdir" > - found_so=3D"$additional_libdir/lib$name.$shlibext" > - if test -f "$additional_libdir/lib$name.la"; then > - found_la=3D"$additional_libdir/lib$name.la" > - fi > - elif test x$lib_type !=3D xshared; then > - if test -f "$additional_libdir/lib$name.$libext"; then > - found_dir=3D"$additional_libdir" > - found_a=3D"$additional_libdir/lib$name.$libext" > - if test -f "$additional_libdir/lib$name.la"; then > - found_la=3D"$additional_libdir/lib$name.la" > - fi > - fi > - fi > - fi > - if test "X$found_dir" =3D "X"; then > - for x in $LDFLAGS $LTLIBBABELTRACE; do > - > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > - > - case "$x" in > - -L*) > - dir=3D`echo "X$x" | sed -e 's/^X-L//'` > - if test -n "$shlibext" && test -f "$dir/lib$name.$shli= bext" && test x$lib_type !=3D xstatic; then > - found_dir=3D"$dir" > - found_so=3D"$dir/lib$name.$shlibext" > - if test -f "$dir/lib$name.la"; then > - found_la=3D"$dir/lib$name.la" > - fi > - elif test x$lib_type !=3D xshared; then > - if test -f "$dir/lib$name.$libext"; then > - found_dir=3D"$dir" > - found_a=3D"$dir/lib$name.$libext" > - if test -f "$dir/lib$name.la"; then > - found_la=3D"$dir/lib$name.la" > - fi > - fi > - fi > - ;; > - esac > - if test "X$found_dir" !=3D "X"; then > - break > - fi > - done > - fi > - if test "X$found_dir" !=3D "X"; then > - LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABE= LTRACE:+ }-L$found_dir -l$name" > - if test "X$found_so" !=3D "X"; then > - if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBA= BELTRACE:+ }$found_so" > - else > - = haveit=3D > - for x in $ltrpathdirs; do > - if test "X$x" =3D "X$found_dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - ltrpathdirs=3D"$ltrpathdirs $found_dir" > - fi > - if test "$hardcode_direct" =3D yes; then > - LIBBABELTRACE=3D"$= {LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" > - else > - if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > - LIBBABELTRAC= E=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" > - haveit=3D > - for x in $rpathdirs; do > - if test "X$x" =3D "X$found_dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - rpathdirs=3D"$rpathdirs $found_dir" > - fi > - else > - = haveit=3D > - for x in $LDFLAGS $LIBBABELTRACE; do > - > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-L$found_dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+= }-L$found_dir" > - fi > - if test "$hardcode_minus_L" !=3D no; then > - = LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_= so" > - else > - = = LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRA= CE:+ }-l$name" > - fi > - fi > - fi > - fi > - else > - if test "X$found_a" !=3D "X"; then > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBA= BELTRACE:+ }$found_a" > - else > - LIBBABELTRACE=3D"${LIBBA= BELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" > - fi > - fi > - additional_includedir=3D > - case "$found_dir" in > - */lib | */lib/) > - basedir=3D`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/l= ib/*$,,'` > - additional_includedir=3D"$basedir/include" > - ;; > - esac > - if test "X$additional_includedir" !=3D "X"; then > - = if test "X$additional_includedir" != =3D "X/usr/include"; then > - haveit=3D > - if test "X$additional_includedir" =3D "X/usr/local/inclu= de"; then > - if test -n "$GCC"; then > - case $host_os in > - linux*) haveit=3Dyes;; > - esac > - fi > - fi > - if test -z "$haveit"; then > - for x in $CPPFLAGS $INCBABELTRACE; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-I$additional_includedir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - if test -d "$additional_includedir"; then > - INCBABELTRACE=3D"${INCBABELT= RACE}${INCBABELTRACE:+ }-I$additional_includedir" > - fi > - fi > - fi > - fi > - fi > - if test -n "$found_la"; then > - save_libdir=3D"$= libdir" > - case "$found_la" in > - */* | *\\*) . "$found_la" ;; > - *) . "./$found_la" ;; > - esac > - libdir=3D"$save_libdir" > - for dep in $dependency_libs; do > - case "$dep" in > - -L*) > - additional_libdir=3D`echo "X$dep" | sed -e 's/^X-L//= '` > - = = if test "X$additional_libdir" !=3D "X/usr/lib"; then > - haveit=3D > - if test "X$additional_libdir" =3D "X/usr/local/lib= "; then > - if test -n "$GCC"; then > - case $host_os in > - linux*) haveit=3Dyes;; > - esac > - fi > - fi > - if test -z "$haveit"; then > - haveit=3D > - for x in $LDFLAGS $LIBBABELTRACE; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-L$additional_libdir"; the= n > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - if test -d "$additional_libdir"; then > - LIBBABELTRACE=3D= "${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" > - fi > - fi > - haveit=3D > - for x in $LDFLAGS $LTLIBBABELTRACE; do > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > =20 > - if test "X$x" =3D "X-L$additional_libdir"; the= n > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - if test -d "$additional_libdir"; then > - LTLIBBABELTRACE= =3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" > - fi > - fi > - fi > - fi > - ;; > - -R*) > - dir=3D`echo "X$dep" | sed -e 's/^X-R//'` > - if test "$enable_rpath" !=3D no; then > - haveit= =3D > - for x in $rpathdirs; do > - if test "X$x" =3D "X$dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - rpathdirs=3D"$rpathdirs $dir" > - fi > - haveit= =3D > - for x in $ltrpathdirs; do > - if test "X$x" =3D "X$dir"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - ltrpathdirs=3D"$ltrpathdirs $dir" > - fi > - fi > - ;; > - -l*) > - names_next_round=3D"$names_next_= round "`echo "X$dep" | sed -e 's/^X-l//'` > - ;; > - *.la) > - = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > - ;; > - *) > - LIBBABELTRACE=3D"${LIBBABELTRACE= }${LIBBABELTRACE:+ }$dep" > - LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRA= CE:+ }$dep" > - ;; > - esac > - done > - fi > - else > - if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$nam= e" > - LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }= -l$name" > - else > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib= $name.$libext" > - LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }= -l:lib$name.$libext" > - fi > - fi > - fi > - fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 > +$as_echo_n "checking for X... " >&6; } > + > + > +# Check whether --with-x was given. > +if test "${with_x+set}" =3D set; then : > + withval=3D$with_x; > +fi > + > +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. > +if test "x$with_x" =3D xno; then > + # The user explicitly disabled X. > + have_x=3Ddisabled > +else > + case $x_includes,$x_libraries in #( > + *\'*) as_fn_error $? "cannot use X directory names containing '" "$L= INENO" 5;; #( > + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + # One or both of the vars are not set, and there is no cached value. > +ac_x_includes=3Dno ac_x_libraries=3Dno > +rm -f -r conftest.dir > +if mkdir conftest.dir; then > + cd conftest.dir > + cat >Imakefile <<'_ACEOF' > +incroot: > +=09@echo incroot=3D'${INCROOT}' > +usrlibdir: > +=09@echo usrlibdir=3D'${USRLIBDIR}' > +libdir: > +=09@echo libdir=3D'${LIBDIR}' > +_ACEOF > + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makef= ile; then > + # GNU make sometimes prints "make[1]: Entering ...", which would con= fuse us. > + for ac_var in incroot usrlibdir libdir; do > + eval "ac_im_$ac_var=3D\`\${MAKE-make} $ac_var 2>/dev/null | sed -n= 's/^$ac_var=3D//p'\`" > done > - done > - if test "X$rpathdirs" !=3D "X"; then > - if test -n "$hardcode_libdir_separator"; then > - alldirs=3D > - for found_dir in $rpathdirs; do > - alldirs=3D"${alldirs}${alldirs:+$hardcode_libdir_separator}$foun= d_dir" > - done > - acl_save_libdir=3D"$libdir" > - libdir=3D"$alldirs" > - eval flag=3D\"$hardcode_libdir_flag_spec\" > - libdir=3D"$acl_save_libdir" > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" > - else > - for found_dir in $rpathdirs; do > - acl_save_libdir=3D"$libdir" > - libdir=3D"$found_dir" > - eval flag=3D\"$hardcode_libdir_flag_spec\" > - libdir=3D"$acl_save_libdir" > - LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" > - done > - fi > - fi > - if test "X$ltrpathdirs" !=3D "X"; then > - for found_dir in $ltrpathdirs; do > - LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found= _dir" > + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. > + for ac_extension in a so sl dylib la dll; do > + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && > +=09 test -f "$ac_im_libdir/libX11.$ac_extension"; then > +=09ac_im_usrlibdir=3D$ac_im_libdir; break > + fi > done > + # Screen out bogus values from the imake configuration. They are > + # bogus both because they are the default anyway, and because > + # using them would break gcc on systems where it needs fixed include= s. > + case $ac_im_incroot in > +=09/usr/include) ac_x_includes=3D ;; > +=09*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=3D$ac_im_incro= ot;; > + esac > + case $ac_im_usrlibdir in > +=09/usr/lib | /usr/lib64 | /lib | /lib64) ;; > +=09*) test -d "$ac_im_usrlibdir" && ac_x_libraries=3D$ac_im_usrlibdir ;; > + esac > fi > + cd .. > + rm -f -r conftest.dir > +fi > =20 > +# Standard set of common directories for X headers. > +# Check X11 before X11Rn because it is often a symlink to the current re= lease. > +ac_x_header_dirs=3D' > +/usr/X11/include > +/usr/X11R7/include > +/usr/X11R6/include > +/usr/X11R5/include > +/usr/X11R4/include > =20 > - ac_save_CPPFLAGS=3D"$CPPFLAGS" > +/usr/include/X11 > +/usr/include/X11R7 > +/usr/include/X11R6 > +/usr/include/X11R5 > +/usr/include/X11R4 > =20 > - for element in $INCBABELTRACE; do > - haveit=3D > - for x in $CPPFLAGS; do > +/usr/local/X11/include > +/usr/local/X11R7/include > +/usr/local/X11R6/include > +/usr/local/X11R5/include > +/usr/local/X11R4/include > =20 > - acl_save_prefix=3D"$prefix" > - prefix=3D"$acl_final_prefix" > - acl_save_exec_prefix=3D"$exec_prefix" > - exec_prefix=3D"$acl_final_exec_prefix" > - eval x=3D\"$x\" > - exec_prefix=3D"$acl_save_exec_prefix" > - prefix=3D"$acl_save_prefix" > +/usr/local/include/X11 > +/usr/local/include/X11R7 > +/usr/local/include/X11R6 > +/usr/local/include/X11R5 > +/usr/local/include/X11R4 > =20 > - if test "X$x" =3D "X$element"; then > - haveit=3Dyes > - break > - fi > - done > - if test -z "$haveit"; then > - CPPFLAGS=3D"${CPPFLAGS}${CPPFLAGS:+ }$element" > - fi > - done > +/usr/X386/include > +/usr/x386/include > +/usr/XFree86/include/X11 > + > +/usr/include > +/usr/local/include > +/usr/unsupported/include > +/usr/athena/include > +/usr/local/x11r5/include > +/usr/lpp/Xamples/include > =20 > +/usr/openwin/include > +/usr/openwin/share/include' > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >= &5 > -$as_echo_n "checking for libbabeltrace... " >&6; } > -if ${ac_cv_libbabeltrace+:} false; then : > - $as_echo_n "(cached) " >&6 > +if test "$ac_x_includes" =3D no; then > + # Guess where to find include files, by looking for Xlib.h. > + # First, try using that file with no special directory specified. > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +_ACEOF > +if ac_fn_c_try_cpp "$LINENO"; then : > + # We can compile using X headers with no special include directory. > +ac_x_includes=3D > else > + for ac_dir in $ac_x_header_dirs; do > + if test -r "$ac_dir/X11/Xlib.h"; then > + ac_x_includes=3D$ac_dir > + break > + fi > +done > +fi > +rm -f conftest.err conftest.i conftest.$ac_ext > +fi # $ac_x_includes =3D no > =20 > - ac_save_LIBS=3D"$LIBS" > - LIBS=3D"$LIBS $LIBBABELTRACE" > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +if test "$ac_x_libraries" =3D no; then > + # Check for the libraries. > + # See if we find them without any special options. > + # Don't add to $LIBS permanently. > + ac_save_LIBS=3D$LIBS > + LIBS=3D"-lX11 $LIBS" > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > -=09=09=09 #include > -=09=09=09 #include > +#include > int > main () > { > -struct bt_iter_pos *pos =3D bt_iter_get_pos (bt_ctf_get_iter (NULL)); > -=09=09=09struct bt_ctf_event *event =3D NULL; > -=09=09=09const struct bt_definition *scope; > - > -=09=09=09pos->type =3D BT_SEEK_BEGIN; > -=09=09=09bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); > -=09=09=09scope =3D bt_ctf_get_top_level_scope (event, > -=09=09=09 =09=09=09=09 BT_STREAM_EVENT_HEADER); > -=09=09 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); > - > +XrmInitialize () > ; > return 0; > } > _ACEOF > if ac_fn_c_try_link "$LINENO"; then : > - ac_cv_libbabeltrace=3Dyes > + LIBS=3D$ac_save_LIBS > +# We can link X programs with no special library path. > +ac_x_libraries=3D > else > - ac_cv_libbabeltrace=3Dno > + LIBS=3D$ac_save_LIBS > +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/inclu= de/lib/g` > +do > + # Don't even attempt the hair of trying to link an X program! > + for ac_extension in a so sl dylib la dll; do > + if test -r "$ac_dir/libX11.$ac_extension"; then > + ac_x_libraries=3D$ac_dir > + break 2 > + fi > + done > +done > fi > rm -f core conftest.err conftest.$ac_objext \ > conftest$ac_exeext conftest.$ac_ext > - LIBS=3D"$ac_save_LIBS" > +fi # $ac_x_libraries =3D no > + > +case $ac_x_includes,$ac_x_libraries in #( > + no,* | *,no | *\'*) > + # Didn't find X, or a directory has "'" in its name. > + ac_cv_have_x=3D"have_x=3Dno";; #( > + *) > + # Record where we found X for the cache. > + ac_cv_have_x=3D"have_x=3Dyes\ > +=09ac_x_includes=3D'$ac_x_includes'\ > +=09ac_x_libraries=3D'$ac_x_libraries'" > +esac > +fi > +;; #( > + *) have_x=3Dyes;; > + esac > + eval "$ac_cv_have_x" > +fi # $with_x !=3D no > =20 > +if test "$have_x" !=3D yes; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 > +$as_echo "$have_x" >&6; } > + no_x=3Dyes > +else > + # If each of the values was on the command line, it overrides each gue= ss. > + test "x$x_includes" =3D xNONE && x_includes=3D$ac_x_includes > + test "x$x_libraries" =3D xNONE && x_libraries=3D$ac_x_libraries > + # Update the cache value to reflect the command line values. > + ac_cv_have_x=3D"have_x=3Dyes\ > +=09ac_x_includes=3D'$x_includes'\ > +=09ac_x_libraries=3D'$x_libraries'" > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_librarie= s, headers $x_includes" >&5 > +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >= &5 > -$as_echo "$ac_cv_libbabeltrace" >&6; } > - if test "$ac_cv_libbabeltrace" =3D yes; then > - HAVE_LIBBABELTRACE=3Dyes > =20 > -$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= ibbabeltrace" >&5 > -$as_echo_n "checking how to link with libbabeltrace... " >&6; } > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 > -$as_echo "$LIBBABELTRACE" >&6; } > - else > - HAVE_LIBBABELTRACE=3Dno > - CPPFLAGS=3D"$ac_save_CPPFLAGS" > - LIBBABELTRACE=3D > - LTLIBBABELTRACE=3D > +# Unlike the sim directory, whether a simulator is linked is controlled = by > +# presence of a gdb_sim definition in the target configure.tgt entry. > +# 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 source tree. > +# > +# Check whether --enable-sim was given. > +if test "${enable_sim+set}" =3D set; then : > + enableval=3D$enable_sim; echo "enable_sim =3D $enable_sim"; > + echo "enableval =3D ${enableval}"; > + case "${enableval}" in > + yes) ignore_sim=3Dfalse ;; > + no) ignore_sim=3Dtrue ;; > + *) ignore_sim=3Dfalse ;; > + esac > +else > + ignore_sim=3Dfalse > +fi > + > + > +if test ! -d "${srcdir}/../sim"; then > + ignore_sim=3Dtrue > +fi > + > +SIM=3D > +SIM_OBS=3D > +if test "${ignore_sim}" =3D "false"; then > + if test x"${gdb_sim}" !=3D x ; then > + SIM=3D"${gdb_sim}" > + SIM_OBS=3D"remote-sim.o" > + > + # Some tdep code should only be compiled in when the ppc sim is > + # built. PR sim/13418. > + case $target in > + powerpc*-*-*) > + > +$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h > + > +=09;; > + esac > fi > +fi > + > + > + > + > + > + > + > + > + > + > + > + > + > + > +# List of host floatformats. > + > +cat >>confdefs.h <<_ACEOF > +#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format > +_ACEOF > + > + > +cat >>confdefs.h <<_ACEOF > +#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format > +_ACEOF > + > + > +cat >>confdefs.h <<_ACEOF > +#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format > +_ACEOF > + > + > +# target_subdir is used by the testsuite to find the target libraries. > +target_subdir=3D > +if test "${host}" !=3D "${target}"; then > + target_subdir=3D"${target_alias}/" > +fi > + > + > +# Import nat definitions. > +nat_makefile_frag=3D/dev/null > +if test "${gdb_native}" =3D "yes"; then > + . ${srcdir}/configure.nat > + nativefile=3D$NAT_FILE > +fi > =20 > =20 > =20 > =20 > =20 > =20 > - CFLAGS=3D$saved_CFLAGS > =20 > - if test "$HAVE_LIBBABELTRACE" !=3D yes; then > - if test "$with_babeltrace" =3D yes; then > - as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 > - else > - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is m= issing or unusable; GDB is unable to read CTF data." >&5 > -$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is una= ble to read CTF data." >&2;} > - fi > - fi > + > + > + > + > +if test x"${gdb_osabi}" !=3D x ; then > + > +cat >>confdefs.h <<_ACEOF > +#define GDB_OSABI_DEFAULT $gdb_osabi > +_ACEOF > + > fi > =20 > -# Check for xxhash > +# Setup possible use of libbacktrace. > +# Check whether --enable-libbacktrace was given. > +if test "${enable_libbacktrace+set}" =3D set; then : > + enableval=3D$enable_libbacktrace; > +=09 case $enableval in > +=09 yes | no) > +=09 ;; > +=09 *) > +=09 as_fn_error $? "bad value $enableval for --enable-libbacktrace= " "$LINENO" 5 > +=09 ;; > +=09 esac > =20 > -# Check whether --with-xxhash was given. > -if test "${with_xxhash+set}" =3D set; then : > - withval=3D$with_xxhash; > else > - with_xxhash=3Dauto > + enable_libbacktrace=3Dyes > fi > =20 > =20 > - # Check whether --enable-libctf was given. > -if test "${enable_libctf+set}" =3D set; then : > - enableval=3D$enable_libctf; > - case "$enableval" in > - yes|no) ;; > - *) as_fn_error $? "Argument to enable/disable libctf must be yes = or no" "$LINENO" 5 ;; > - esac > +if test "${enable_libbacktrace}" =3D "yes"; then > + LIBBACKTRACE_INC=3D"-I$srcdir/../libbacktrace/ -I../libbacktrace/" > + LIBBACKTRACE_LIB=3D../libbacktrace/libbacktrace.la > + > +$as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h > =20 > else > - enable_libctf=3Dyes > + LIBBACKTRACE_INC=3D > + LIBBACKTRACE_LIB=3D > fi > =20 > =20 > -if test "${enable_libctf}" =3D yes; then > =20 > -$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h > =20 > - LIBCTF=3D"../libctf/libctf.la" > - CTF_DEPS=3D"../libctf/libctf.la" > +# Check for babeltrace and babeltrace-ctf > + > +# Check whether --with-babeltrace was given. > +if test "${with_babeltrace+set}" =3D set; then : > + withval=3D$with_babeltrace; > else > - LIBCTF=3D > - CTF_DEPS=3D > + with_babeltrace=3Dauto > fi > =20 > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltr= ace" >&5 > +$as_echo_n "checking whether to use babeltrace... " >&6; } > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 > +$as_echo "$with_babeltrace" >&6; } > =20 > - > -# If nativefile (NAT_FILE) is not set in configure.nat, we link to an > -# empty version. > - > -if test "x$with_xxhash" !=3D "xno"; then > +if test "x$with_babeltrace" =3D "xno"; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support d= isabled; GDB is unable to read CTF data." >&5 > +$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to= read CTF data." >&2;} > +else > + # Append -Werror to CFLAGS so that configure can catch the warning > + # "assignment from incompatible pointer type", which is related to > + # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works > + # in GDB, while babeltrace 1.0.3 is broken. > + # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be > + # safe to save and restore CFLAGS here. > + saved_CFLAGS=3D$CFLAGS > + CFLAGS=3D"$CFLAGS -Werror" > =20 > =20 > =20 > @@ -30658,9 +30622,9 @@ if test "x$with_xxhash" !=3D "xno"; then > prefix=3D"$acl_save_prefix" > =20 > =20 > -# Check whether --with-libxxhash-prefix was given. > -if test "${with_libxxhash_prefix+set}" =3D set; then : > - withval=3D$with_libxxhash_prefix; > +# Check whether --with-libbabeltrace-prefix was given. > +if test "${with_libbabeltrace_prefix+set}" =3D set; then : > + withval=3D$with_libbabeltrace_prefix; > if test "X$withval" =3D "Xno"; then > use_additional=3Dno > else > @@ -30686,22 +30650,22 @@ if test "${with_libxxhash_prefix+set}" =3D set;= then : > fi > =20 > =20 > -# Check whether --with-libxxhash-type was given. > -if test "${with_libxxhash_type+set}" =3D set; then : > - withval=3D$with_libxxhash_type; with_libxxhash_type=3D$withval > +# Check whether --with-libbabeltrace-type was given. > +if test "${with_libbabeltrace_type+set}" =3D set; then : > + withval=3D$with_libbabeltrace_type; with_libbabeltrace_type=3D$withva= l > else > - with_libxxhash_type=3Dauto > + with_libbabeltrace_type=3Dauto > fi > =20 > - lib_type=3D`eval echo \$with_libxxhash_type` > + lib_type=3D`eval echo \$with_libbabeltrace_type` > =20 > - LIBXXHASH=3D > - LTLIBXXHASH=3D > - INCXXHASH=3D > + LIBBABELTRACE=3D > + LTLIBBABELTRACE=3D > + INCBABELTRACE=3D > rpathdirs=3D > ltrpathdirs=3D > names_already_handled=3D > - names_next_round=3D'xxhash ' > + names_next_round=3D'babeltrace babeltrace-ctf' > while test -n "$names_next_round"; do > names_this_round=3D"$names_next_round" > names_next_round=3D > @@ -30720,9 +30684,9 @@ fi > if test -n "$value"; then > if test "$value" =3D yes; then > eval value=3D\"\$LIB$uppername\" > - test -z "$value" || LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $value" > + test -z "$value" || LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBA= BELTRACE:+ }$value" > eval value=3D\"\$LTLIB$uppername\" > - test -z "$value" || LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHA= SH:+ }$value" > + test -z "$value" || LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${L= TLIBBABELTRACE:+ }$value" > else > : > fi > @@ -30749,7 +30713,7 @@ fi > fi > fi > if test "X$found_dir" =3D "X"; then > - for x in $LDFLAGS $LTLIBXXHASH; do > + for x in $LDFLAGS $LTLIBBABELTRACE; do > =20 > acl_save_prefix=3D"$prefix" > prefix=3D"$acl_final_prefix" > @@ -30785,10 +30749,10 @@ fi > done > fi > if test "X$found_dir" !=3D "X"; then > - LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-L= $found_dir -l$name" > + LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABE= LTRACE:+ }-L$found_dir -l$name" > if test "X$found_so" !=3D "X"; then > if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_so" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBA= BELTRACE:+ }$found_so" > else > = haveit=3D > for x in $ltrpathdirs; do > @@ -30801,10 +30765,10 @@ fi > ltrpathdirs=3D"$ltrpathdirs $found_dir" > fi > if test "$hardcode_direct" =3D yes; then > - LIBXXHASH=3D"${LIB= XXHASH}${LIBXXHASH:+ }$found_so" > + LIBBABELTRACE=3D"$= {LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" > else > if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > - LIBXXHASH=3D= "${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + LIBBABELTRAC= E=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" > haveit=3D > for x in $rpathdirs; do > if test "X$x" =3D "X$found_dir"; then > @@ -30817,7 +30781,7 @@ fi > fi > else > = haveit=3D > - for x in $LDFLAGS $LIBXXHASH; do > + for x in $LDFLAGS $LIBBABELTRACE; do > =20 > acl_save_prefix=3D"$prefix" > prefix=3D"$acl_final_prefix" > @@ -30833,21 +30797,21 @@ fi > fi > done > if test -z "$haveit"; then > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-L$found_d= ir" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+= }-L$found_dir" > fi > if test "$hardcode_minus_L" !=3D no; then > - = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + = LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_= so" > else > - = = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$nam= e" > + = = LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRA= CE:+ }-l$name" > fi > fi > fi > fi > else > if test "X$found_a" !=3D "X"; then > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_a" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBA= BELTRACE:+ }$found_a" > else > - LIBXXHASH=3D"${LIBXXHASH= }${LIBXXHASH:+ }-L$found_dir -l$name" > + LIBBABELTRACE=3D"${LIBBA= BELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" > fi > fi > additional_includedir=3D > @@ -30868,7 +30832,7 @@ fi > fi > fi > if test -z "$haveit"; then > - for x in $CPPFLAGS $INCXXHASH; do > + for x in $CPPFLAGS $INCBABELTRACE; do > =20 > acl_save_prefix=3D"$prefix" > prefix=3D"$acl_final_prefix" > @@ -30885,7 +30849,7 @@ fi > done > if test -z "$haveit"; then > if test -d "$additional_includedir"; then > - INCXXHASH=3D"${INCXXHASH}${I= NCXXHASH:+ }-I$additional_includedir" > + INCBABELTRACE=3D"${INCBABELT= RACE}${INCBABELTRACE:+ }-I$additional_includedir" > fi > fi > fi > @@ -30913,7 +30877,7 @@ fi > fi > if test -z "$haveit"; then > haveit=3D > - for x in $LDFLAGS $LIBXXHASH; do > + for x in $LDFLAGS $LIBBABELTRACE; do > =20 > acl_save_prefix=3D"$prefix" > prefix=3D"$acl_final_prefix" > @@ -30930,11 +30894,11 @@ fi > done > if test -z "$haveit"; then > if test -d "$additional_libdir"; then > - LIBXXHASH=3D"${L= IBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" > + LIBBABELTRACE=3D= "${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" > fi > fi > haveit=3D > - for x in $LDFLAGS $LTLIBXXHASH; do > + for x in $LDFLAGS $LTLIBBABELTRACE; do > =20 > acl_save_prefix=3D"$prefix" > prefix=3D"$acl_final_prefix" > @@ -30951,7 +30915,7 @@ fi > done > if test -z "$haveit"; then > if test -d "$additional_libdir"; then > - LTLIBXXHASH=3D"$= {LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" > + LTLIBBABELTRACE= =3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" > fi > fi > fi > @@ -30989,19 +30953,19 @@ fi > = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > ;; > *) > - LIBXXHASH=3D"${LIBXXHASH}${LIBXX= HASH:+ }$dep" > - LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" > + LIBBABELTRACE=3D"${LIBBABELTRACE= }${LIBBABELTRACE:+ }$dep" > + LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRA= CE:+ }$dep" > ;; > esac > done > fi > else > if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$name" > - LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$nam= e" > + LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }= -l$name" > else > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libex= t" > - LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.= $libext" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib= $name.$libext" > + LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }= -l:lib$name.$libext" > fi > fi > fi > @@ -31018,27 +30982,27 @@ fi > libdir=3D"$alldirs" > eval flag=3D\"$hardcode_libdir_flag_spec\" > libdir=3D"$acl_save_libdir" > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" > else > for found_dir in $rpathdirs; do > acl_save_libdir=3D"$libdir" > libdir=3D"$found_dir" > eval flag=3D\"$hardcode_libdir_flag_spec\" > libdir=3D"$acl_save_libdir" > - LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + LIBBABELTRACE=3D"${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" > done > fi > fi > if test "X$ltrpathdirs" !=3D "X"; then > for found_dir in $ltrpathdirs; do > - LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" > + LTLIBBABELTRACE=3D"${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found= _dir" > done > fi > =20 > =20 > ac_save_CPPFLAGS=3D"$CPPFLAGS" > =20 > - for element in $INCXXHASH; do > + for element in $INCBABELTRACE; do > haveit=3D > for x in $CPPFLAGS; do > =20 > @@ -31061,52 +31025,62 @@ fi > done > =20 > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 > -$as_echo_n "checking for libxxhash... " >&6; } > -if ${ac_cv_libxxhash+:} false; then : > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >= &5 > +$as_echo_n "checking for libbabeltrace... " >&6; } > +if ${ac_cv_libbabeltrace+:} false; then : > $as_echo_n "(cached) " >&6 > else > =20 > ac_save_LIBS=3D"$LIBS" > - LIBS=3D"$LIBS $LIBXXHASH" > + LIBS=3D"$LIBS $LIBBABELTRACE" > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +#include > +=09=09=09 #include > +=09=09=09 #include > int > main () > { > -XXH32("foo", 3, 0); > +struct bt_iter_pos *pos =3D bt_iter_get_pos (bt_ctf_get_iter (NULL)); > +=09=09=09struct bt_ctf_event *event =3D NULL; > +=09=09=09const struct bt_definition *scope; > + > +=09=09=09pos->type =3D BT_SEEK_BEGIN; > +=09=09=09bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); > +=09=09=09scope =3D bt_ctf_get_top_level_scope (event, > +=09=09=09 =09=09=09=09 BT_STREAM_EVENT_HEADER); > +=09=09 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); > =20 > ; > return 0; > } > _ACEOF > if ac_fn_c_try_link "$LINENO"; then : > - ac_cv_libxxhash=3Dyes > + ac_cv_libbabeltrace=3Dyes > else > - ac_cv_libxxhash=3Dno > + ac_cv_libbabeltrace=3Dno > fi > rm -f core conftest.err conftest.$ac_objext \ > conftest$ac_exeext conftest.$ac_ext > LIBS=3D"$ac_save_LIBS" > =20 > fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 > -$as_echo "$ac_cv_libxxhash" >&6; } > - if test "$ac_cv_libxxhash" =3D yes; then > - HAVE_LIBXXHASH=3Dyes > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >= &5 > +$as_echo "$ac_cv_libbabeltrace" >&6; } > + if test "$ac_cv_libbabeltrace" =3D yes; then > + HAVE_LIBBABELTRACE=3Dyes > =20 > -$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h > +$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h > =20 > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= ibxxhash" >&5 > -$as_echo_n "checking how to link with libxxhash... " >&6; } > - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 > -$as_echo "$LIBXXHASH" >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= ibbabeltrace" >&5 > +$as_echo_n "checking how to link with libbabeltrace... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 > +$as_echo "$LIBBABELTRACE" >&6; } > else > - HAVE_LIBXXHASH=3Dno > + HAVE_LIBBABELTRACE=3Dno > CPPFLAGS=3D"$ac_save_CPPFLAGS" > - LIBXXHASH=3D > - LTLIBXXHASH=3D > + LIBBABELTRACE=3D > + LTLIBBABELTRACE=3D > fi > =20 > =20 > @@ -31114,20 +31088,46 @@ $as_echo "$LIBXXHASH" >&6; } > =20 > =20 > =20 > - if test "$HAVE_LIBXXHASH" !=3D yes; then > - if test "$with_xxhash" =3D yes; then > - as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 > - fi > - fi > - if test "x$with_xxhash" =3D "xauto"; then > - with_xxhash=3D"$HAVE_LIBXXHASH" > + CFLAGS=3D$saved_CFLAGS > + > + if test "$HAVE_LIBBABELTRACE" !=3D yes; then > + if test "$with_babeltrace" =3D yes; then > + as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 > + else > + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is m= issing or unusable; GDB is unable to read CTF data." >&5 > +$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is una= ble to read CTF data." >&2;} > + fi > fi > fi > =20 > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash"= >&5 > -$as_echo_n "checking whether to use xxhash... " >&6; } > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 > -$as_echo "$with_xxhash" >&6; } > + # Check whether --enable-libctf was given. > +if test "${enable_libctf+set}" =3D set; then : > + enableval=3D$enable_libctf; > + case "$enableval" in > + yes|no) ;; > + *) as_fn_error $? "Argument to enable/disable libctf must be yes = or no" "$LINENO" 5 ;; > + esac > + > +else > + enable_libctf=3Dyes > +fi > + > + > +if test "${enable_libctf}" =3D yes; then > + > +$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h > + > + LIBCTF=3D"../libctf/libctf.la" > + CTF_DEPS=3D"../libctf/libctf.la" > +else > + LIBCTF=3D > + CTF_DEPS=3D > +fi > + > + > + > +# If nativefile (NAT_FILE) is not set in configure.nat, we link to an > +# empty version. > =20 > NM_H=3D > rm -f nm.h > diff --git a/gdb/configure.ac b/gdb/configure.ac > index d0c54ad3c02..cecf4a46bec 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -2152,11 +2152,6 @@ else > fi > fi > =20 > -# Check for xxhash > -AC_ARG_WITH(xxhash, > - AS_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) (a= uto/yes/no)]), > - [], [with_xxhash=3Dauto]) > - > GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections]) > if test "${enable_libctf}" =3D yes; then > AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections]) > @@ -2172,24 +2167,6 @@ AC_SUBST(CTF_DEPS) > # If nativefile (NAT_FILE) is not set in configure.nat, we link to an > # empty version. > =20 > -if test "x$with_xxhash" !=3D "xno"; then > - AC_LIB_HAVE_LINKFLAGS([xxhash], [], > -=09=09=09[#include ], > -=09=09=09[XXH32("foo", 3, 0); > -=09=09=09]) > - if test "$HAVE_LIBXXHASH" !=3D yes; then > - if test "$with_xxhash" =3D yes; then > - AC_MSG_ERROR([xxhash is missing or unusable]) > - fi > - fi > - if test "x$with_xxhash" =3D "xauto"; then > - with_xxhash=3D"$HAVE_LIBXXHASH" > - fi > -fi > - > -AC_MSG_CHECKING([whether to use xxhash]) > -AC_MSG_RESULT([$with_xxhash]) > - > NM_H=3D > rm -f nm.h > if test "${nativefile}" !=3D ""; then > diff --git a/gdbserver/config.in b/gdbserver/config.in > index 39ddc7c0edb..63876afcf85 100644 > --- a/gdbserver/config.in > +++ b/gdbserver/config.in > @@ -143,6 +143,9 @@ > /* Define if you have the ipt library. */ > #undef HAVE_LIBIPT > =20 > +/* Define if you have the xxhash library. */ > +#undef HAVE_LIBXXHASH > + > /* Define if the target supports branch tracing. */ > #undef HAVE_LINUX_BTRACE > =20 > diff --git a/gdbserver/configure b/gdbserver/configure > index 050264ed7da..e5e0cb14d03 100755 > --- a/gdbserver/configure > +++ b/gdbserver/configure > @@ -656,6 +656,9 @@ am__leading_dot > host_noncanonical > target_noncanonical > WIN32APILIBS > +LTLIBXXHASH > +LIBXXHASH > +HAVE_LIBXXHASH > LTLIBIPT > LIBIPT > HAVE_LIBIPT > @@ -752,6 +755,9 @@ with_gnu_ld > enable_rpath > with_libipt_prefix > with_libipt_type > +with_xxhash > +with_libxxhash_prefix > +with_libxxhash_type > enable_unit_tests > with_ust > with_ust_include > @@ -1418,6 +1424,10 @@ Optional Packages: > --with-libipt-prefix[=3DDIR] search for libipt in DIR/include and DIR= /lib > --without-libipt-prefix don't search for libipt in includedir and = libdir > --with-libipt-type=3DTYPE type of library to search for (auto/stat= ic/shared) > + --with-xxhash use libxxhash for hashing (faster) (auto/yes/n= o) > + --with-libxxhash-prefix[=3DDIR] search for libxxhash in DIR/include a= nd DIR/lib > + --without-libxxhash-prefix don't search for libxxhash in includedi= r and libdir > + --with-libxxhash-type=3DTYPE type of library to search for (auto/s= tatic/shared) > --with-ust=3DPATH Specify prefix directory for the installed UST= package > Equivalent to --with-ust-include=3DPATH/includ= e > plus --with-ust-lib=3DPATH/lib > @@ -8947,6 +8957,510 @@ $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregs= et_t" >&6; } > =20 > fi > =20 > + # Check for xxhash > + > +# Check whether --with-xxhash was given. > +if test "${with_xxhash+set}" =3D set; then : > + withval=3D$with_xxhash; > +else > + with_xxhash=3Dauto > +fi > + > + > + if test "x$with_xxhash" !=3D "xno"; then > + > + > + > + > + > + > + > + > + use_additional=3Dyes > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > + > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + > +# Check whether --with-libxxhash-prefix was given. > +if test "${with_libxxhash_prefix+set}" =3D set; then : > + withval=3D$with_libxxhash_prefix; > + if test "X$withval" =3D "Xno"; then > + use_additional=3Dno > + else > + if test "X$withval" =3D "X"; then > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > + > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + else > + additional_includedir=3D"$withval/include" > + additional_libdir=3D"$withval/lib" > + fi > + fi > + > +fi > + > + > +# Check whether --with-libxxhash-type was given. > +if test "${with_libxxhash_type+set}" =3D set; then : > + withval=3D$with_libxxhash_type; with_libxxhash_type=3D$withval > +else > + with_libxxhash_type=3Dauto > +fi > + > + lib_type=3D`eval echo \$with_libxxhash_type` > + > + LIBXXHASH=3D > + LTLIBXXHASH=3D > + INCXXHASH=3D > + rpathdirs=3D > + ltrpathdirs=3D > + names_already_handled=3D > + names_next_round=3D'xxhash ' > + while test -n "$names_next_round"; do > + names_this_round=3D"$names_next_round" > + names_next_round=3D > + for name in $names_this_round; do > + already_handled=3D > + for n in $names_already_handled; do > + if test "$n" =3D "$name"; then > + already_handled=3Dyes > + break > + fi > + done > + if test -z "$already_handled"; then > + names_already_handled=3D"$names_already_handled $name" > + uppername=3D`echo "$name" | sed -e 'y|abcdefghij= klmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` > + eval value=3D\"\$HAVE_LIB$uppername\" > + if test -n "$value"; then > + if test "$value" =3D yes; then > + eval value=3D\"\$LIB$uppername\" > + test -z "$value" || LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $value" > + eval value=3D\"\$LTLIB$uppername\" > + test -z "$value" || LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHA= SH:+ }$value" > + else > + : > + fi > + else > + found_dir=3D > + found_la=3D > + found_so=3D > + found_a=3D > + if test $use_additional =3D yes; then > + if test -n "$shlibext" && test -f "$additional_libdir/lib$na= me.$shlibext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$additional_libdir" > + found_so=3D"$additional_libdir/lib$name.$shlibext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$additional_libdir/lib$name.$libext"; then > + found_dir=3D"$additional_libdir" > + found_a=3D"$additional_libdir/lib$name.$libext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + fi > + fi > + fi > + if test "X$found_dir" =3D "X"; then > + for x in $LDFLAGS $LTLIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + case "$x" in > + -L*) > + dir=3D`echo "X$x" | sed -e 's/^X-L//'` > + if test -n "$shlibext" && test -f "$dir/lib$name.$shli= bext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$dir" > + found_so=3D"$dir/lib$name.$shlibext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$dir/lib$name.$libext"; then > + found_dir=3D"$dir" > + found_a=3D"$dir/lib$name.$libext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + fi > + fi > + ;; > + esac > + if test "X$found_dir" !=3D "X"; then > + break > + fi > + done > + fi > + if test "X$found_dir" !=3D "X"; then > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-L= $found_dir -l$name" > + if test "X$found_so" !=3D "X"; then > + if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_so" > + else > + = haveit=3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $found_dir" > + fi > + if test "$hardcode_direct" =3D yes; then > + LIBXXHASH=3D"${LIB= XXHASH}${LIBXXHASH:+ }$found_so" > + else > + if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > + LIBXXHASH=3D= "${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + haveit=3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $found_dir" > + fi > + else > + = haveit=3D > + for x in $LDFLAGS $LIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-L$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-L$found_d= ir" > + fi > + if test "$hardcode_minus_L" !=3D no; then > + = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + else > + = = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$nam= e" > + fi > + fi > + fi > + fi > + else > + if test "X$found_a" !=3D "X"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_a" > + else > + LIBXXHASH=3D"${LIBXXHASH= }${LIBXXHASH:+ }-L$found_dir -l$name" > + fi > + fi > + additional_includedir=3D > + case "$found_dir" in > + */lib | */lib/) > + basedir=3D`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/l= ib/*$,,'` > + additional_includedir=3D"$basedir/include" > + ;; > + esac > + if test "X$additional_includedir" !=3D "X"; then > + = if test "X$additional_includedir" != =3D "X/usr/include"; then > + haveit=3D > + if test "X$additional_includedir" =3D "X/usr/local/inclu= de"; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + for x in $CPPFLAGS $INCXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-I$additional_includedir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_includedir"; then > + INCXXHASH=3D"${INCXXHASH}${I= NCXXHASH:+ }-I$additional_includedir" > + fi > + fi > + fi > + fi > + fi > + if test -n "$found_la"; then > + save_libdir=3D"$= libdir" > + case "$found_la" in > + */* | *\\*) . "$found_la" ;; > + *) . "./$found_la" ;; > + esac > + libdir=3D"$save_libdir" > + for dep in $dependency_libs; do > + case "$dep" in > + -L*) > + additional_libdir=3D`echo "X$dep" | sed -e 's/^X-L//= '` > + = = if test "X$additional_libdir" !=3D "X/usr/lib"; then > + haveit=3D > + if test "X$additional_libdir" =3D "X/usr/local/lib= "; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + haveit=3D > + for x in $LDFLAGS $LIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LIBXXHASH=3D"${L= IBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" > + fi > + fi > + haveit=3D > + for x in $LDFLAGS $LTLIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LTLIBXXHASH=3D"$= {LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" > + fi > + fi > + fi > + fi > + ;; > + -R*) > + dir=3D`echo "X$dep" | sed -e 's/^X-R//'` > + if test "$enable_rpath" !=3D no; then > + haveit= =3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $dir" > + fi > + haveit= =3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $dir" > + fi > + fi > + ;; > + -l*) > + names_next_round=3D"$names_next_= round "`echo "X$dep" | sed -e 's/^X-l//'` > + ;; > + *.la) > + = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > + ;; > + *) > + LIBXXHASH=3D"${LIBXXHASH}${LIBXX= HASH:+ }$dep" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" > + ;; > + esac > + done > + fi > + else > + if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$name" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" > + else > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libex= t" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.= $libext" > + fi > + fi > + fi > + fi > + done > + done > + if test "X$rpathdirs" !=3D "X"; then > + if test -n "$hardcode_libdir_separator"; then > + alldirs=3D > + for found_dir in $rpathdirs; do > + alldirs=3D"${alldirs}${alldirs:+$hardcode_libdir_separator}$foun= d_dir" > + done > + acl_save_libdir=3D"$libdir" > + libdir=3D"$alldirs" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + else > + for found_dir in $rpathdirs; do > + acl_save_libdir=3D"$libdir" > + libdir=3D"$found_dir" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + done > + fi > + fi > + if test "X$ltrpathdirs" !=3D "X"; then > + for found_dir in $ltrpathdirs; do > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" > + done > + fi > + > + > + ac_save_CPPFLAGS=3D"$CPPFLAGS" > + > + for element in $INCXXHASH; do > + haveit=3D > + for x in $CPPFLAGS; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X$element"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + CPPFLAGS=3D"${CPPFLAGS}${CPPFLAGS:+ }$element" > + fi > + done > + > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 > +$as_echo_n "checking for libxxhash... " >&6; } > +if ${ac_cv_libxxhash+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + > + ac_save_LIBS=3D"$LIBS" > + LIBS=3D"$LIBS $LIBXXHASH" > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +int > +main () > +{ > +XXH32("foo", 3, 0); > + > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_link "$LINENO"; then : > + ac_cv_libxxhash=3Dyes > +else > + ac_cv_libxxhash=3Dno > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + LIBS=3D"$ac_save_LIBS" > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 > +$as_echo "$ac_cv_libxxhash" >&6; } > + if test "$ac_cv_libxxhash" =3D yes; then > + HAVE_LIBXXHASH=3Dyes > + > +$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= ibxxhash" >&5 > +$as_echo_n "checking how to link with libxxhash... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 > +$as_echo "$LIBXXHASH" >&6; } > + else > + HAVE_LIBXXHASH=3Dno > + CPPFLAGS=3D"$ac_save_CPPFLAGS" > + LIBXXHASH=3D > + LTLIBXXHASH=3D > + fi > + > + > + > + > + > + > + if test "$HAVE_LIBXXHASH" !=3D yes; then > + if test "$with_xxhash" =3D yes; then > +=09as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 > + fi > + fi > + if test "x$with_xxhash" =3D "xauto"; then > + with_xxhash=3D"$HAVE_LIBXXHASH" > + fi > + fi > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhas= h" >&5 > +$as_echo_n "checking whether to use xxhash... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 > +$as_echo "$with_xxhash" >&6; } > + > # This is set by GDB_AC_COMMON. > =20 > =20 > diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in > index 6aadae41031..6db76447d81 100644 > --- a/gdbsupport/Makefile.in > +++ b/gdbsupport/Makefile.in > @@ -254,6 +254,7 @@ GMSGFMT =3D @GMSGFMT@ > GREP =3D @GREP@ > HAVE_CXX11 =3D @HAVE_CXX11@ > HAVE_LIBIPT =3D @HAVE_LIBIPT@ > +HAVE_LIBXXHASH =3D @HAVE_LIBXXHASH@ > INCINTL =3D @INCINTL@ > INSTALL =3D @INSTALL@ > INSTALL_DATA =3D @INSTALL_DATA@ > @@ -268,8 +269,10 @@ LIBINTL_DEP =3D @LIBINTL_DEP@ > LIBIPT =3D @LIBIPT@ > LIBOBJS =3D @LIBOBJS@ > LIBS =3D @LIBS@ > +LIBXXHASH =3D @LIBXXHASH@ > LTLIBIPT =3D @LTLIBIPT@ > LTLIBOBJS =3D @LTLIBOBJS@ > +LTLIBXXHASH =3D @LTLIBXXHASH@ > MAINT =3D @MAINT@ > MAKEINFO =3D @MAKEINFO@ > MKDIR_P =3D @MKDIR_P@ > diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4 > index 0fed186ae1d..a08255da3e3 100644 > --- a/gdbsupport/common.m4 > +++ b/gdbsupport/common.m4 > @@ -215,6 +215,30 @@ AC_DEFUN([GDB_AC_COMMON], [ > BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t) > BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t) > fi > + > + dnl xxhash support > + # Check for xxhash > + AC_ARG_WITH(xxhash, > + AS_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) = (auto/yes/no)]), > + [], [with_xxhash=3Dauto]) > + > + if test "x$with_xxhash" !=3D "xno"; then > + AC_LIB_HAVE_LINKFLAGS([xxhash], [], > +=09=09=09 [#include ], > +=09=09=09 [XXH32("foo", 3, 0); > +=09=09=09 ]) > + if test "$HAVE_LIBXXHASH" !=3D yes; then > + if test "$with_xxhash" =3D yes; then > +=09AC_MSG_ERROR([xxhash is missing or unusable]) > + fi > + fi > + if test "x$with_xxhash" =3D "xauto"; then > + with_xxhash=3D"$HAVE_LIBXXHASH" > + fi > + fi > + > + AC_MSG_CHECKING([whether to use xxhash]) > + AC_MSG_RESULT([$with_xxhash]) > ]) > =20 > dnl Check that the provided value ($1) is either "yes" or "no". If not, > diff --git a/gdbsupport/config.in b/gdbsupport/config.in > index 577866c97b3..2cdc1fbde61 100644 > --- a/gdbsupport/config.in > +++ b/gdbsupport/config.in > @@ -124,6 +124,9 @@ > /* Define if you have the ipt library. */ > #undef HAVE_LIBIPT > =20 > +/* Define if you have the xxhash library. */ > +#undef HAVE_LIBXXHASH > + > /* Define to 1 if you have the header file. */ > #undef HAVE_LINUX_ELF_H > =20 > diff --git a/gdbsupport/configure b/gdbsupport/configure > index 38541e87c15..a0e4a3f94a4 100755 > --- a/gdbsupport/configure > +++ b/gdbsupport/configure > @@ -631,6 +631,9 @@ HAVE_PIPE_OR_PIPE2_FALSE > HAVE_PIPE_OR_PIPE2_TRUE > SELFTEST_FALSE > SELFTEST_TRUE > +LTLIBXXHASH > +LIBXXHASH > +HAVE_LIBXXHASH > LTLIBIPT > LIBIPT > HAVE_LIBIPT > @@ -776,6 +779,9 @@ with_gnu_ld > enable_rpath > with_libipt_prefix > with_libipt_type > +with_xxhash > +with_libxxhash_prefix > +with_libxxhash_type > enable_unit_tests > enable_werror > enable_build_warnings > @@ -1442,6 +1448,10 @@ Optional Packages: > --with-libipt-prefix[=3DDIR] search for libipt in DIR/include and DIR= /lib > --without-libipt-prefix don't search for libipt in includedir and = libdir > --with-libipt-type=3DTYPE type of library to search for (auto/stat= ic/shared) > + --with-xxhash use libxxhash for hashing (faster) (auto/yes/n= o) > + --with-libxxhash-prefix[=3DDIR] search for libxxhash in DIR/include a= nd DIR/lib > + --without-libxxhash-prefix don't search for libxxhash in includedi= r and libdir > + --with-libxxhash-type=3DTYPE type of library to search for (auto/s= tatic/shared) > =20 > Some influential environment variables: > CC C compiler command > @@ -9963,6 +9973,510 @@ $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregs= et_t" >&6; } > =20 > fi > =20 > + # Check for xxhash > + > +# Check whether --with-xxhash was given. > +if test "${with_xxhash+set}" =3D set; then : > + withval=3D$with_xxhash; > +else > + with_xxhash=3Dauto > +fi > + > + > + if test "x$with_xxhash" !=3D "xno"; then > + > + > + > + > + > + > + > + > + use_additional=3Dyes > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > + > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + > +# Check whether --with-libxxhash-prefix was given. > +if test "${with_libxxhash_prefix+set}" =3D set; then : > + withval=3D$with_libxxhash_prefix; > + if test "X$withval" =3D "Xno"; then > + use_additional=3Dno > + else > + if test "X$withval" =3D "X"; then > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + > + eval additional_includedir=3D\"$includedir\" > + eval additional_libdir=3D\"$libdir\" > + > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + else > + additional_includedir=3D"$withval/include" > + additional_libdir=3D"$withval/lib" > + fi > + fi > + > +fi > + > + > +# Check whether --with-libxxhash-type was given. > +if test "${with_libxxhash_type+set}" =3D set; then : > + withval=3D$with_libxxhash_type; with_libxxhash_type=3D$withval > +else > + with_libxxhash_type=3Dauto > +fi > + > + lib_type=3D`eval echo \$with_libxxhash_type` > + > + LIBXXHASH=3D > + LTLIBXXHASH=3D > + INCXXHASH=3D > + rpathdirs=3D > + ltrpathdirs=3D > + names_already_handled=3D > + names_next_round=3D'xxhash ' > + while test -n "$names_next_round"; do > + names_this_round=3D"$names_next_round" > + names_next_round=3D > + for name in $names_this_round; do > + already_handled=3D > + for n in $names_already_handled; do > + if test "$n" =3D "$name"; then > + already_handled=3Dyes > + break > + fi > + done > + if test -z "$already_handled"; then > + names_already_handled=3D"$names_already_handled $name" > + uppername=3D`echo "$name" | sed -e 'y|abcdefghij= klmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` > + eval value=3D\"\$HAVE_LIB$uppername\" > + if test -n "$value"; then > + if test "$value" =3D yes; then > + eval value=3D\"\$LIB$uppername\" > + test -z "$value" || LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $value" > + eval value=3D\"\$LTLIB$uppername\" > + test -z "$value" || LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHA= SH:+ }$value" > + else > + : > + fi > + else > + found_dir=3D > + found_la=3D > + found_so=3D > + found_a=3D > + if test $use_additional =3D yes; then > + if test -n "$shlibext" && test -f "$additional_libdir/lib$na= me.$shlibext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$additional_libdir" > + found_so=3D"$additional_libdir/lib$name.$shlibext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$additional_libdir/lib$name.$libext"; then > + found_dir=3D"$additional_libdir" > + found_a=3D"$additional_libdir/lib$name.$libext" > + if test -f "$additional_libdir/lib$name.la"; then > + found_la=3D"$additional_libdir/lib$name.la" > + fi > + fi > + fi > + fi > + if test "X$found_dir" =3D "X"; then > + for x in $LDFLAGS $LTLIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + case "$x" in > + -L*) > + dir=3D`echo "X$x" | sed -e 's/^X-L//'` > + if test -n "$shlibext" && test -f "$dir/lib$name.$shli= bext" && test x$lib_type !=3D xstatic; then > + found_dir=3D"$dir" > + found_so=3D"$dir/lib$name.$shlibext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + elif test x$lib_type !=3D xshared; then > + if test -f "$dir/lib$name.$libext"; then > + found_dir=3D"$dir" > + found_a=3D"$dir/lib$name.$libext" > + if test -f "$dir/lib$name.la"; then > + found_la=3D"$dir/lib$name.la" > + fi > + fi > + fi > + ;; > + esac > + if test "X$found_dir" !=3D "X"; then > + break > + fi > + done > + fi > + if test "X$found_dir" !=3D "X"; then > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-L= $found_dir -l$name" > + if test "X$found_so" !=3D "X"; then > + if test "$enable= _rpath" =3D no || test "X$found_dir" =3D "X/usr/lib"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_so" > + else > + = haveit=3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $found_dir" > + fi > + if test "$hardcode_direct" =3D yes; then > + LIBXXHASH=3D"${LIB= XXHASH}${LIBXXHASH:+ }$found_so" > + else > + if test -n "$hardcode_libdir_flag_spec" && test "$hard= code_minus_L" =3D no; then > + LIBXXHASH=3D= "${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + haveit=3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $found_dir" > + fi > + else > + = haveit=3D > + for x in $LDFLAGS $LIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-L$found_dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-L$found_d= ir" > + fi > + if test "$hardcode_minus_L" !=3D no; then > + = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$found_so" > + else > + = = LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$nam= e" > + fi > + fi > + fi > + fi > + else > + if test "X$found_a" !=3D "X"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }= $found_a" > + else > + LIBXXHASH=3D"${LIBXXHASH= }${LIBXXHASH:+ }-L$found_dir -l$name" > + fi > + fi > + additional_includedir=3D > + case "$found_dir" in > + */lib | */lib/) > + basedir=3D`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/l= ib/*$,,'` > + additional_includedir=3D"$basedir/include" > + ;; > + esac > + if test "X$additional_includedir" !=3D "X"; then > + = if test "X$additional_includedir" != =3D "X/usr/include"; then > + haveit=3D > + if test "X$additional_includedir" =3D "X/usr/local/inclu= de"; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + for x in $CPPFLAGS $INCXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-I$additional_includedir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_includedir"; then > + INCXXHASH=3D"${INCXXHASH}${I= NCXXHASH:+ }-I$additional_includedir" > + fi > + fi > + fi > + fi > + fi > + if test -n "$found_la"; then > + save_libdir=3D"$= libdir" > + case "$found_la" in > + */* | *\\*) . "$found_la" ;; > + *) . "./$found_la" ;; > + esac > + libdir=3D"$save_libdir" > + for dep in $dependency_libs; do > + case "$dep" in > + -L*) > + additional_libdir=3D`echo "X$dep" | sed -e 's/^X-L//= '` > + = = if test "X$additional_libdir" !=3D "X/usr/lib"; then > + haveit=3D > + if test "X$additional_libdir" =3D "X/usr/local/lib= "; then > + if test -n "$GCC"; then > + case $host_os in > + linux*) haveit=3Dyes;; > + esac > + fi > + fi > + if test -z "$haveit"; then > + haveit=3D > + for x in $LDFLAGS $LIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LIBXXHASH=3D"${L= IBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" > + fi > + fi > + haveit=3D > + for x in $LDFLAGS $LTLIBXXHASH; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X-L$additional_libdir"; the= n > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + if test -d "$additional_libdir"; then > + LTLIBXXHASH=3D"$= {LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" > + fi > + fi > + fi > + fi > + ;; > + -R*) > + dir=3D`echo "X$dep" | sed -e 's/^X-R//'` > + if test "$enable_rpath" !=3D no; then > + haveit= =3D > + for x in $rpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + rpathdirs=3D"$rpathdirs $dir" > + fi > + haveit= =3D > + for x in $ltrpathdirs; do > + if test "X$x" =3D "X$dir"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + ltrpathdirs=3D"$ltrpathdirs $dir" > + fi > + fi > + ;; > + -l*) > + names_next_round=3D"$names_next_= round "`echo "X$dep" | sed -e 's/^X-l//'` > + ;; > + *.la) > + = names_next_round=3D"$names_next_round "`echo "X$dep" | sed -e 's,^X= .*/,,' -e 's,^lib,,' -e 's,\.la$,,'` > + ;; > + *) > + LIBXXHASH=3D"${LIBXXHASH}${LIBXX= HASH:+ }$dep" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" > + ;; > + esac > + done > + fi > + else > + if test "x$l= ib_type" =3D "xauto" || test "x$lib_type" =3D "xshared"; then > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l$name" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" > + else > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libex= t" > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.= $libext" > + fi > + fi > + fi > + fi > + done > + done > + if test "X$rpathdirs" !=3D "X"; then > + if test -n "$hardcode_libdir_separator"; then > + alldirs=3D > + for found_dir in $rpathdirs; do > + alldirs=3D"${alldirs}${alldirs:+$hardcode_libdir_separator}$foun= d_dir" > + done > + acl_save_libdir=3D"$libdir" > + libdir=3D"$alldirs" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + else > + for found_dir in $rpathdirs; do > + acl_save_libdir=3D"$libdir" > + libdir=3D"$found_dir" > + eval flag=3D\"$hardcode_libdir_flag_spec\" > + libdir=3D"$acl_save_libdir" > + LIBXXHASH=3D"${LIBXXHASH}${LIBXXHASH:+ }$flag" > + done > + fi > + fi > + if test "X$ltrpathdirs" !=3D "X"; then > + for found_dir in $ltrpathdirs; do > + LTLIBXXHASH=3D"${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" > + done > + fi > + > + > + ac_save_CPPFLAGS=3D"$CPPFLAGS" > + > + for element in $INCXXHASH; do > + haveit=3D > + for x in $CPPFLAGS; do > + > + acl_save_prefix=3D"$prefix" > + prefix=3D"$acl_final_prefix" > + acl_save_exec_prefix=3D"$exec_prefix" > + exec_prefix=3D"$acl_final_exec_prefix" > + eval x=3D\"$x\" > + exec_prefix=3D"$acl_save_exec_prefix" > + prefix=3D"$acl_save_prefix" > + > + if test "X$x" =3D "X$element"; then > + haveit=3Dyes > + break > + fi > + done > + if test -z "$haveit"; then > + CPPFLAGS=3D"${CPPFLAGS}${CPPFLAGS:+ }$element" > + fi > + done > + > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 > +$as_echo_n "checking for libxxhash... " >&6; } > +if ${ac_cv_libxxhash+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + > + ac_save_LIBS=3D"$LIBS" > + LIBS=3D"$LIBS $LIBXXHASH" > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include > +int > +main () > +{ > +XXH32("foo", 3, 0); > + > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_link "$LINENO"; then : > + ac_cv_libxxhash=3Dyes > +else > + ac_cv_libxxhash=3Dno > +fi > +rm -f core conftest.err conftest.$ac_objext \ > + conftest$ac_exeext conftest.$ac_ext > + LIBS=3D"$ac_save_LIBS" > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 > +$as_echo "$ac_cv_libxxhash" >&6; } > + if test "$ac_cv_libxxhash" =3D yes; then > + HAVE_LIBXXHASH=3Dyes > + > +$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with l= ibxxhash" >&5 > +$as_echo_n "checking how to link with libxxhash... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 > +$as_echo "$LIBXXHASH" >&6; } > + else > + HAVE_LIBXXHASH=3Dno > + CPPFLAGS=3D"$ac_save_CPPFLAGS" > + LIBXXHASH=3D > + LTLIBXXHASH=3D > + fi > + > + > + > + > + > + > + if test "$HAVE_LIBXXHASH" !=3D yes; then > + if test "$with_xxhash" =3D yes; then > +=09as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 > + fi > + fi > + if test "x$with_xxhash" =3D "xauto"; then > + with_xxhash=3D"$HAVE_LIBXXHASH" > + fi > + fi > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhas= h" >&5 > +$as_echo_n "checking whether to use xxhash... " >&6; } > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 > +$as_echo "$with_xxhash" >&6; } > + > =20 > # Check whether we will enable the inclusion of unit tests when > # compiling GDB. > --=20 > 2.38.1