OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [gdbserver/] [configure.in] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
dnl Autoconf configure script for GDB server.
2
dnl Copyright 2000, 2002 Free Software Foundation, Inc.
3
dnl
4
dnl This file is part of GDB.
5
dnl
6
dnl This program is free software; you can redistribute it and/or modify
7
dnl it under the terms of the GNU General Public License as published by
8
dnl the Free Software Foundation; either version 2 of the License, or
9
dnl (at your option) any later version.
10
dnl
11
dnl This program is distributed in the hope that it will be useful,
12
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
dnl GNU General Public License for more details.
15
dnl
16
dnl You should have received a copy of the GNU General Public License
17
dnl along with this program; if not, write to the Free Software
18
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
 
20
dnl Process this file with autoconf to produce a configure script.
21
 
22
AC_INIT(server.c)
23
AC_CONFIG_HEADER(config.h:config.in)
24
 
25
AC_PROG_CC
26
 
27
AC_CANONICAL_SYSTEM
28
 
29
AC_PROG_INSTALL
30
 
31
AC_HEADER_STDC
32
 
33
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
34
                 proc_service.h sys/procfs.h thread_db.h linux/elf.h unistd.h)
35
 
36
. ${srcdir}/configure.srv
37
 
38
if test "${srv_linux_usrregs}" = "yes"; then
39
  AC_DEFINE(HAVE_LINUX_USRREGS)
40
fi
41
 
42
if test "${srv_linux_regsets}" = "yes"; then
43
  AC_MSG_CHECKING(for PTRACE_GETREGS)
44
  AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getregs,
45
  [AC_TRY_COMPILE([#include ],
46
                  [PTRACE_GETREGS;],
47
                  [gdbsrv_cv_have_ptrace_getregs=yes],
48
                  [gdbsrv_cv_have_ptrace_getregs=no])])
49
  AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getregs)
50
  if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
51
    AC_DEFINE(HAVE_LINUX_REGSETS)
52
  fi
53
 
54
  AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
55
  AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getfpxregs,
56
  [AC_TRY_COMPILE([#include ],
57
                  [PTRACE_GETFPXREGS;],
58
                  [gdbsrv_cv_have_ptrace_getfpxregs=yes],
59
                  [gdbsrv_cv_have_ptrace_getfpxregs=no])])
60
  AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getfpxregs)
61
  if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
62
    AC_DEFINE(HAVE_PTRACE_GETFPXREGS)
63
  fi
64
fi
65
 
66
if test "$ac_cv_header_sys_procfs_h" = yes; then
67
  BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
68
  BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
69
  BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
70
  BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
71
 
72
  dnl Check for broken prfpregset_t type
73
 
74
  dnl For Linux/i386, glibc 2.1.3 was released with a bogus
75
  dnl prfpregset_t type (it's a typedef for the pointer to a struct
76
  dnl instead of the struct itself).  We detect this here, and work
77
  dnl around it in gdb_proc_service.h.
78
 
79
  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
80
    AC_MSG_CHECKING(whether prfpregset_t type is broken)
81
    AC_CACHE_VAL(gdb_cv_prfpregset_t_broken,
82
      [AC_TRY_RUN([#include 
83
       int main ()
84
       {
85
         if (sizeof (prfpregset_t) == sizeof (void *))
86
           return 1;
87
         return 0;
88
       }],
89
       gdb_cv_prfpregset_t_broken=no,
90
       gdb_cv_prfpregset_t_broken=yes,
91
       gdb_cv_prfpregset_t_broken=yes)])
92
    AC_MSG_RESULT($gdb_cv_prfpregset_t_broken)
93
    if test $gdb_cv_prfpregset_t_broken = yes; then
94
      AC_DEFINE(PRFPREGSET_T_BROKEN)
95
    fi
96
  fi
97
 
98
  BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
99
fi
100
 
101
srv_thread_depfiles=
102
srv_libs=
103
USE_THREAD_DB=
104
 
105
if test "$srv_linux_thread_db" = "yes"; then
106
  SRV_CHECK_THREAD_DB
107
  if test "$srv_cv_thread_db" = no; then
108
    AC_WARN([Could not find libthread_db.])
109
    AC_WARN([Disabling thread support in gdbserver.])
110
    srv_linux_thread_db=no
111
  else
112
    srv_libs="$srv_cv_thread_db"
113
  fi
114
fi
115
 
116
if test "$srv_linux_thread_db" = "yes"; then
117
  srv_thread_depfiles="thread-db.o proc-service.o"
118
  USE_THREAD_DB="-DUSE_THREAD_DB"
119
fi
120
 
121
GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
122
GDBSERVER_LIBS="$srv_libs"
123
 
124
AC_SUBST(GDBSERVER_DEPFILES)
125
AC_SUBST(GDBSERVER_LIBS)
126
AC_SUBST(USE_THREAD_DB)
127
 
128
AC_OUTPUT(Makefile,
129
[case x$CONFIG_HEADERS in
130
xconfig.h:config.in)
131
echo > stamp-h ;;
132
esac
133
])

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.