1dnl aclocal.m4 generated automatically by aclocal 1.4-p4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE.
14sinclude(../../bfd/acinclude.m4)
15
16AC_DEFUN([SRV_CHECK_THREAD_DB],
17[AC_CACHE_CHECK([for libthread_db],[srv_cv_thread_db],
18 [old_LIBS="$LIBS"
19  LIBS="$LIBS -lthread_db"
20  AC_TRY_LINK(
21  [void ps_pglobal_lookup() {}
22   void ps_pdread() {}
23   void ps_pdwrite() {}
24   void ps_lgetregs() {}
25   void ps_lsetregs() {}
26   void ps_lgetfpregs() {}
27   void ps_lsetfpregs() {}
28   void ps_getpid() {}],
29  [td_ta_new();],
30  [srv_cv_thread_db="-lthread_db"],
31  [srv_cv_thread_db=no
32
33 if test "$prefix" = "/usr" || test "$prefix" = "NONE"; then
34  thread_db="/lib/libthread_db.so.1"
35 else
36  thread_db='$prefix/lib/libthread_db.so.1'
37 fi
38 LIBS="$old_LIBS `eval echo "$thread_db"`"
39 AC_TRY_LINK(
40  [void ps_pglobal_lookup() {}
41   void ps_pdread() {}
42   void ps_pdwrite() {}
43   void ps_lgetregs() {}
44   void ps_lsetregs() {}
45   void ps_lgetfpregs() {}
46   void ps_lsetfpregs() {}
47   void ps_getpid() {}],
48  [td_ta_new();],
49  [srv_cv_thread_db="$thread_db"],
50  [srv_cv_thread_db=no])
51 LIBS="$old_LIBS"
52 ]])
53)])
54
55