Commit | Line | Data |
---|---|---|
d6e9fb05 | 1 | dnl Autoconf configure script for GDB server. |
84563040 | 2 | dnl Copyright 2000, 2002 Free Software Foundation, Inc. |
d6e9fb05 JK |
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) | |
84563040 DJ |
23 | AC_CONFIG_HEADER(config.h:config.in) |
24 | ||
25 | AC_PROG_CC | |
d6e9fb05 JK |
26 | |
27 | AC_CANONICAL_SYSTEM | |
84563040 | 28 | |
d6e9fb05 | 29 | AC_PROG_INSTALL |
c906108c | 30 | |
ee6e2b82 | 31 | AC_HEADER_STDC |
84563040 | 32 | |
0729219d | 33 | AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h) |
84563040 | 34 | |
7ea81414 | 35 | . ${srcdir}/configure.srv |
c906108c | 36 | |
58caa3dc DJ |
37 | if test "${srv_linux_usrregs}" = "yes"; then |
38 | AC_DEFINE(HAVE_LINUX_USRREGS) | |
39 | fi | |
40 | ||
41 | if test "${srv_linux_regsets}" = "yes"; then | |
42 | AC_MSG_CHECKING(for PTRACE_GETREGS) | |
43 | AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getregs, | |
44 | [AC_TRY_COMPILE([#include <sys/ptrace.h>], | |
45 | [PTRACE_GETREGS;], | |
46 | [gdbsrv_cv_have_ptrace_getregs=yes], | |
47 | [gdbsrv_cv_have_ptrace_getregs=no])]) | |
48 | AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getregs) | |
49 | if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then | |
50 | AC_DEFINE(HAVE_LINUX_REGSETS) | |
51 | fi | |
52 | ||
53 | AC_MSG_CHECKING(for PTRACE_GETFPXREGS) | |
54 | AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getfpxregs, | |
55 | [AC_TRY_COMPILE([#include <sys/ptrace.h>], | |
56 | [PTRACE_GETFPXREGS;], | |
57 | [gdbsrv_cv_have_ptrace_getfpxregs=yes], | |
58 | [gdbsrv_cv_have_ptrace_getfpxregs=no])]) | |
59 | AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getfpxregs) | |
60 | if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then | |
61 | AC_DEFINE(HAVE_PTRACE_GETFPXREGS) | |
62 | fi | |
63 | fi | |
64 | ||
7ea81414 | 65 | GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj" |
c906108c | 66 | |
7ea81414 | 67 | AC_SUBST(GDBSERVER_DEPFILES) |
c906108c | 68 | |
d6e9fb05 | 69 | AC_OUTPUT(Makefile) |