]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/configure.in
daily update
[thirdparty/binutils-gdb.git] / gdb / gdbserver / configure.in
CommitLineData
d6e9fb05
JK
1dnl Autoconf configure script for GDB server.
2dnl Copyright 2000 Free Software Foundation, Inc.
3dnl
4dnl This file is part of GDB.
5dnl
6dnl This program is free software; you can redistribute it and/or modify
7dnl it under the terms of the GNU General Public License as published by
8dnl the Free Software Foundation; either version 2 of the License, or
9dnl (at your option) any later version.
10dnl
11dnl This program is distributed in the hope that it will be useful,
12dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14dnl GNU General Public License for more details.
15dnl
16dnl You should have received a copy of the GNU General Public License
17dnl along with this program; if not, write to the Free Software
18dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20dnl Process this file with autoconf to produce a configure script.
21
22AC_INIT(server.c)
23
24AC_CANONICAL_SYSTEM
25AC_PROG_INSTALL
c906108c
SS
26
27. ${srcdir}/../configure.host
28
c906108c
SS
29. ${srcdir}/../configure.tgt
30
d6e9fb05
JK
31frags=
32host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh
33if test ! -f ${host_makefile_frag}; then
34 AC_MSG_ERROR("*** GDB remote does not support host ${host}")
c906108c 35fi
d6e9fb05 36frags="$frags $host_makefile_frag"
c906108c 37
d6e9fb05
JK
38target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt
39if test ! -f ${target_makefile_frag}; then
40 AC_MSG_ERROR("*** GDB remote does not support target ${target}")
c906108c 41fi
d6e9fb05 42frags="$frags $target_makefile_frag"
c906108c 43
d6e9fb05
JK
44AC_SUBST_FILE(host_makefile_frag)
45AC_SUBST_FILE(target_makefile_frag)
46AC_SUBST(frags)
c906108c 47
d6e9fb05
JK
48changequote(,)dnl
49hostfile=`sed -n '
50s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
51' ${host_makefile_frag}`
c906108c 52
d6e9fb05
JK
53targetfile=`sed -n '
54s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
55' ${target_makefile_frag}`
56
57if test "${target}" = "${host}"; then
58nativefile=`sed -n '
59s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
60' ${host_makefile_frag}`
61fi
62changequote([,])dnl
c906108c
SS
63
64# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
65# (NAT_FILE) is not set in the ?config/* file, we don't make the
66# corresponding links. But we have to remove the xm.h files and tm.h
67# files anyway, e.g. when switching from "configure host" to
68# "configure none".
69
70files=
71links=
72rm -f xm.h
73rm -f ser-hardwire.c
d6e9fb05
JK
74if test "${hostfile}" != ""; then
75 files="${files} ../config/${gdb_host_cpu}/${hostfile}"
c906108c 76 links="${links} xm.h"
c906108c
SS
77fi
78rm -f tm.h
d6e9fb05
JK
79if test "${targetfile}" != ""; then
80 files="${files} ../config/${gdb_target_cpu}/${targetfile}"
c906108c
SS
81 links="${links} tm.h"
82fi
83rm -f nm.h
d6e9fb05
JK
84if test "${nativefile}" != ""; then
85 files="${files} ../config/${gdb_host_cpu}/${nativefile}"
c906108c 86 links="${links} nm.h"
c906108c 87fi
d6e9fb05 88AC_LINK_FILES($files, $links)
c906108c 89
d6e9fb05 90AC_OUTPUT(Makefile)