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 DJ |
32 | |
33 | AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h) | |
34 | ||
c906108c SS |
35 | . ${srcdir}/../configure.host |
36 | ||
c906108c SS |
37 | . ${srcdir}/../configure.tgt |
38 | ||
d6e9fb05 JK |
39 | frags= |
40 | host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh | |
41 | if test ! -f ${host_makefile_frag}; then | |
42 | AC_MSG_ERROR("*** GDB remote does not support host ${host}") | |
c906108c | 43 | fi |
d6e9fb05 | 44 | frags="$frags $host_makefile_frag" |
c906108c | 45 | |
d6e9fb05 JK |
46 | target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt |
47 | if test ! -f ${target_makefile_frag}; then | |
48 | AC_MSG_ERROR("*** GDB remote does not support target ${target}") | |
c906108c | 49 | fi |
d6e9fb05 | 50 | frags="$frags $target_makefile_frag" |
c906108c | 51 | |
d6e9fb05 JK |
52 | AC_SUBST_FILE(host_makefile_frag) |
53 | AC_SUBST_FILE(target_makefile_frag) | |
54 | AC_SUBST(frags) | |
c906108c | 55 | |
d6e9fb05 JK |
56 | changequote(,)dnl |
57 | hostfile=`sed -n ' | |
58 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
59 | ' ${host_makefile_frag}` | |
c906108c | 60 | |
d6e9fb05 JK |
61 | targetfile=`sed -n ' |
62 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
63 | ' ${target_makefile_frag}` | |
64 | ||
65 | if test "${target}" = "${host}"; then | |
66 | nativefile=`sed -n ' | |
67 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
68 | ' ${host_makefile_frag}` | |
69 | fi | |
70 | changequote([,])dnl | |
c906108c | 71 | |
d6e9fb05 | 72 | AC_OUTPUT(Makefile) |