Lint fixes from Paul Eggert (eggert@twinsun.com):
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
b12529c1 1configdirs="doc testsuite"
912e0732
RP
2srcname="GDB"
3srctrigger=main.c
bc028766 4
0df06ca0
RP
5# per-host:
6
6c815bbe
RP
7# map host info into gdb names.
8
19758e9e 9case "${host}" in
6c815bbe 10
19758e9e
JG
11a29k-*-*) gdb_host=ultra3 ;;
12
13arm-*-*) gdb_host=arm ;;
14
15c[12]-*-*) gdb_host=convex ;;
16
19758e9e 17hppa*-hp-bsd) gdb_host=hppabsd ;;
ef131e13 18hppa*-hp-hpux) gdb_host=hppahpux ;;
19758e9e 19
19758e9e 20i[34]86-ncr-*) gdb_host=ncr3000 ;;
ef131e13 21i[34]86-sequent-*) gdb_host=symmetry ;;
19758e9e 22
6d685882 23i[34]86-*-bsd*) gdb_host=i386bsd ;;
19758e9e 24i[34]86-*-go32) gdb_host=go32 ;;
ef131e13
JG
25i[34]86-*-linux) gdb_host=linux ;;
26i[34]86-*-mach) gdb_host=i386mach ;;
117f631e 27i[34]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
cf57ff2a 28i[34]86-*-sco*) gdb_host=i386sco ;;
5c820c19 29i[34]86-*-solaris*) gdb_host=i386sol2 ;;
b1aa08e2 30i[34]86-*-sunos*) gdb_host=sun386 ;;
ef131e13 31i[34]86-*-sysv32) gdb_host=i386v32 ;;
19758e9e
JG
32i[34]86-*-sysv4*) gdb_host=i386v4 ;;
33i[34]86-*-sysv*) gdb_host=i386v ;;
19758e9e
JG
34
35i860-*-*) gdb_host=stratus ;;
36
358ca35e
JG
37m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
38m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
ef131e13 39m68030-sony-*) gdb_host=news1000 ;;
19758e9e 40
358ca35e
JG
41m68*-altos-*) gdb_host=altos ;;
42m68*-apollo*-sysv*) gdb_host=apollo68v ;;
43m68*-apollo*-bsd*) gdb_host=apollo68b ;;
44m68*-att-*) gdb_host=3b1 ;;
45m68*-cbm-sysv4*) gdb_host=amix ;;
46m68*-hp-bsd) gdb_host=hp300bsd ;;
47m68*-hp-hpux) gdb_host=hp300hpux ;;
48m68*-isi-*) gdb_host=isi ;;
49m68*-sony-*) gdb_host=news ;;
50m68*-sun-sunos3*) gdb_host=sun3os3 ;;
51m68*-sun-sunos4*) gdb_host=sun3os4 ;;
52m68*-sun-*) gdb_host=sun3os4 ;;
19758e9e 53
19758e9e
JG
54m88k-motorola-*) gdb_host=delta88 ;;
55m88k-*-*) gdb_host=m88k ;;
56
19758e9e
JG
57mips-dec-*) gdb_host=decstation ;;
58mips-little-*) gdb_host=littlemips ;;
59mips-sgi-irix3) gdb_host=irix3 ;;
60mips-sgi-irix4) gdb_host=irix4 ;;
ef131e13 61mips-sony-*) gdb_host=bigmips ;;
19758e9e
JG
62
63none-*-*) gdb_host=none ;;
ef131e13 64
19758e9e
JG
65np1-*-*) gdb_host=np1 ;;
66
67ns32k-umax-*) gdb_host=umax ;;
68ns32k-utek-sysv) gdb_host=merlin ;;
69
19758e9e
JG
70pn-*-*) gdb_host=pn ;;
71
72pyramid-*-*) gdb_host=pyramid ;;
73
74romp-*-*) gdb_host=rtbsd ;;
75
76rs6000-*-*) gdb_host=rs6000 ;;
77
ef131e13 78sparc-*-solaris2*) gdb_host=sun4sol2 ;;
ebb3a1e5 79sparc-*-sunos4*) gdb_host=sun4os4 ;;
b52373a2 80sparc-*-*) gdb_host=sun4os4 ;;
19758e9e
JG
81
82tahoe-*-*) gdb_host=tahoe ;;
83
84vax-*-bsd*) gdb_host=vaxbsd ;;
6985bc54 85vax-*-ultrix2*) gdb_host=vaxult2 ;;
19758e9e 86vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 87
6c815bbe
RP
88esac
89
8c7ae4a2 90
fe7ca711 91if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
6c815bbe 92 echo '***' "Gdb does not support host ${host}" 1>&2
912e0732
RP
93 exit 1
94fi
95
bdf3621b 96# We really shouldn't depend on there being a space after XM_FILE= ...
fe7ca711 97hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
912e0732 98
0df06ca0 99# per-target:
912e0732 100
ef131e13
JG
101case "${target}" in
102
103a29k-*-aout) gdb_target=a29k ;;
104a29k-*-coff) gdb_target=a29k ;;
ebb3a1e5 105a29k-*-elf) gdb_target=a29k ;;
ef131e13
JG
106a29k-*-ebmon) gdb_target=a29k ;;
107a29k-*-kern) gdb_target=a29k-kern ;;
108a29k-*-none) gdb_target=a29k ;;
109a29k-*-sym1) gdb_target=ultra3 ;;
110a29k-*-udi) gdb_target=a29k-udi ;;
111
112arm-*-*) gdb_target=arm ;;
113
114c1-*-*) gdb_target=convex ;;
115c2-*-*) gdb_target=convex ;;
116
117h8300-*-*) gdb_target=h8300hms ;;
118
119hppa*-*-bsd) gdb_target=hppabsd ;;
120hppa*-*-hpux) gdb_target=hppahpux ;;
121
122i[34]86-sequent-*) gdb_target=symmetry ;;
123i[34]86-ncr-*) gdb_target=ncr3000 ;;
ebb3a1e5
JG
124
125i[34]86-*-aout) gdb_target=i386aout ;;
126i[34]86-*-coff) gdb_target=i386v ;;
127i[34]86-*-elf) gdb_target=i386v ;;
128
6d685882 129i[34]86-*-bsd*) gdb_target=i386bsd ;;
e633652f 130i[34]86-*-go32) gdb_target=i386aout ;;
5c820c19 131i[34]86-*-solaris*) gdb_target=i386sol2 ;;
ef131e13
JG
132i[34]86-*-sunos*) gdb_target=sun386 ;;
133i[34]86-*-sysv4*) gdb_target=i386v4 ;;
cf57ff2a 134i[34]86-*-sco*) gdb_target=i386v ;;
ef131e13 135i[34]86-*-sysv*) gdb_target=i386v ;;
ef131e13
JG
136i[34]86-*-linux) gdb_target=linux ;;
137
138i860-*-*) gdb_target=stratus ;;
139
140i960-*-bout) gdb_target=vxworks960 ;;
141i960-*-coff) gdb_target=nindy960 ;;
ebb3a1e5
JG
142i960-*-elf) gdb_target=nindy960 ;;
143
ef131e13
JG
144i960-*-nindy) gdb_target=nindy960 ;;
145i960-*-vxworks) gdb_target=vxworks960 ;;
146
ebb3a1e5
JG
147m68000-*-sunos3*) gdb_target=sun2os3 ;;
148m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 149
358ca35e
JG
150m68*-cbm-sysv4*) gdb_target=amix ;;
151m68*-hp-bsd) gdb_target=hp300bsd ;;
152m68*-hp-hpux) gdb_target=hp300hpux ;;
153
154m68*-altos-*) gdb_target=altos ;;
155m68*-att-*) gdb_target=3b1 ;;
156m68*-ericsson-*) gdb_target=es1800 ;;
157m68*-isi-*) gdb_target=isi ;;
158m68*-netx-*) gdb_target=vxworks68 ;;
159m68*-sony-*) gdb_target=news ;;
160m68*-tandem-*) gdb_target=st2000 ;;
161
162m68*-*-aout) gdb_target=m68k-un ;;
163m68*-*-coff) gdb_target=m68k-noun ;;
164m68*-*-elf) gdb_target=m68k-noun ;;
165m68*-*-os68k) gdb_target=os68k ;;
166m68*-*-sunos3*) gdb_target=sun3os3 ;;
167m68*-*-sunos4*) gdb_target=sun3os4 ;;
168m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13
JG
169
170m88k-motorola-*) gdb_target=delta88 ;;
171m88k-*-*) gdb_target=m88k ;;
172
173mips-big-*) gdb_target=bigmips ;;
174mips-dec-*) gdb_target=decstation ;;
c2a0f1cb 175mips-idt-ecoff) gdb_target=idt ;;
ef131e13
JG
176mips-little-*) gdb_target=littlemips ;;
177mips-sgi-*) gdb_target=irix3 ;;
178mips-sony-*) gdb_target=bigmips ;;
179
180none-*-*) gdb_target=none ;;
181
182np1-*-*) gdb_target=np1 ;;
183
184ns32k-utek-sysv) gdb_target=merlin ;;
185ns32k-utek-*) gdb_target=umax ;;
186
187pn-*-*) gdb_target=pn ;;
188
189pyramid-*-*) gdb_target=pyramid ;;
190
191rs6000-*-*) gdb_target=rs6000 ;;
192
ebb3a1e5
JG
193sparc-*-aout) gdb_target=sparc-un ;;
194sparc-*-coff) gdb_target=sparc-noun ;;
195sparc-*-elf) gdb_target=sparc-noun ;;
ef131e13 196sparc-*-solaris2*) gdb_target=sun4sol2 ;;
ebb3a1e5
JG
197sparc-*-sunos4*) gdb_target=sun4os4 ;;
198sparc-*-vxworks*) gdb_target=sparc-un ;;
b52373a2 199sparc-*-*) gdb_target=sun4os4 ;;
a05e2e57 200sparclite*-*-*) gdb_target=sun4os4 ;;
ef131e13
JG
201
202tahoe-*-*) gdb_target=tahoe ;;
203vax-*-*) gdb_target=vax ;;
6c815bbe 204
1242152e 205z8k-unknown-sim) gdb_target=z8ksim ;;
6c815bbe
RP
206esac
207
fe7ca711 208if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
6c815bbe 209 echo '***' "Gdb does not support target ${target}" 1>&2
912e0732
RP
210 exit 1
211fi
212
213if [ -z "${removing}" ] ; then
fe7ca711 214 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
912e0732
RP
215 print substr($0,6)}'
216fi
217
bdf3621b 218# We really shouldn't depend on there being a space after TM_FILE= ...
fe7ca711 219targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
912e0732 220
d40309c7
JG
221if [ "${target}" = "${host}" ] ; then
222 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
223fi
224
fe7ca711
SC
225host_makefile_frag=config/${gdb_host}.mh
226target_makefile_frag=config/${gdb_target}.mt
912e0732 227
d40309c7
JG
228# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
229# (NAT_FILE) is not set in the ?config/* file, we don't make the
230# corresponding links. But we have to remove the xm.h files and tm.h
231# files anyway, e.g. when switching from "configure host" to
232# "configure none".
233
bdf3621b
JG
234files=
235links=
dc0c3f64 236rm -f xm.h
bdf3621b
JG
237if [ "${hostfile}" != "" ]; then
238 files="${files} ${hostfile}"
239 links="${links} xm.h"
240fi
dc0c3f64 241rm -f tm.h
bdf3621b
JG
242if [ "${targetfile}" != "" ]; then
243 files="${files} ${targetfile}"
244 links="${links} tm.h"
245fi
d40309c7
JG
246rm -f nat.h
247if [ "${nativefile}" != "" ]; then
248 files="${files} ${nativefile}"
dfc82617 249 links="${links} nm.h"
c9c23412
RP
250# temporary scaffolding until all hosts have the host/target/native
251# split in place.
252else
dfc82617
RP
253 files="${files} nm-trash.h"
254 links="${links} nm.h"
d40309c7 255fi
bdf3621b
JG
256
257# post-target:
912e0732 258
bdf3621b
JG
259case ${srcdir} in
260 .)
261 ;;
262 *)
263 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
264 echo "source ${srcdir}/.gdbinit" >> .gdbinit
265esac
266
c1ab5dba 267if [ "${nativefile}" = "" ] ; then
41617f8b 268 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
d40309c7
JG
269 < Makefile > Makefile.tem
270 mv -f Makefile.tem Makefile
271fi
272
dc0c3f64 273cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
This page took 0.089621 seconds and 4 git commands to generate.