* gdb/testsuite: Initial creation of gdb/testsuite.
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
e040b94b 1configdirs="doc"
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 ;;
85vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 86
6c815bbe
RP
87esac
88
8c7ae4a2 89
fe7ca711 90if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
6c815bbe 91 echo '***' "Gdb does not support host ${host}" 1>&2
912e0732
RP
92 exit 1
93fi
94
bdf3621b 95# We really shouldn't depend on there being a space after XM_FILE= ...
fe7ca711 96hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
912e0732 97
0df06ca0 98# per-target:
912e0732 99
ef131e13
JG
100case "${target}" in
101
102a29k-*-aout) gdb_target=a29k ;;
103a29k-*-coff) gdb_target=a29k ;;
ebb3a1e5 104a29k-*-elf) gdb_target=a29k ;;
ef131e13
JG
105a29k-*-ebmon) gdb_target=a29k ;;
106a29k-*-kern) gdb_target=a29k-kern ;;
107a29k-*-none) gdb_target=a29k ;;
108a29k-*-sym1) gdb_target=ultra3 ;;
109a29k-*-udi) gdb_target=a29k-udi ;;
110
111arm-*-*) gdb_target=arm ;;
112
113c1-*-*) gdb_target=convex ;;
114c2-*-*) gdb_target=convex ;;
115
116h8300-*-*) gdb_target=h8300hms ;;
117
118hppa*-*-bsd) gdb_target=hppabsd ;;
119hppa*-*-hpux) gdb_target=hppahpux ;;
120
121i[34]86-sequent-*) gdb_target=symmetry ;;
122i[34]86-ncr-*) gdb_target=ncr3000 ;;
ebb3a1e5
JG
123
124i[34]86-*-aout) gdb_target=i386aout ;;
125i[34]86-*-coff) gdb_target=i386v ;;
126i[34]86-*-elf) gdb_target=i386v ;;
127
6d685882 128i[34]86-*-bsd*) gdb_target=i386bsd ;;
e633652f 129i[34]86-*-go32) gdb_target=i386aout ;;
5c820c19 130i[34]86-*-solaris*) gdb_target=i386sol2 ;;
ef131e13
JG
131i[34]86-*-sunos*) gdb_target=sun386 ;;
132i[34]86-*-sysv4*) gdb_target=i386v4 ;;
cf57ff2a 133i[34]86-*-sco*) gdb_target=i386v ;;
ef131e13 134i[34]86-*-sysv*) gdb_target=i386v ;;
ef131e13
JG
135i[34]86-*-linux) gdb_target=linux ;;
136
137i860-*-*) gdb_target=stratus ;;
138
139i960-*-bout) gdb_target=vxworks960 ;;
140i960-*-coff) gdb_target=nindy960 ;;
ebb3a1e5
JG
141i960-*-elf) gdb_target=nindy960 ;;
142
ef131e13
JG
143i960-*-nindy) gdb_target=nindy960 ;;
144i960-*-vxworks) gdb_target=vxworks960 ;;
145
ebb3a1e5
JG
146m68000-*-sunos3*) gdb_target=sun2os3 ;;
147m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 148
358ca35e
JG
149m68*-cbm-sysv4*) gdb_target=amix ;;
150m68*-hp-bsd) gdb_target=hp300bsd ;;
151m68*-hp-hpux) gdb_target=hp300hpux ;;
152
153m68*-altos-*) gdb_target=altos ;;
154m68*-att-*) gdb_target=3b1 ;;
155m68*-ericsson-*) gdb_target=es1800 ;;
156m68*-isi-*) gdb_target=isi ;;
157m68*-netx-*) gdb_target=vxworks68 ;;
158m68*-sony-*) gdb_target=news ;;
159m68*-tandem-*) gdb_target=st2000 ;;
160
161m68*-*-aout) gdb_target=m68k-un ;;
162m68*-*-coff) gdb_target=m68k-noun ;;
163m68*-*-elf) gdb_target=m68k-noun ;;
164m68*-*-os68k) gdb_target=os68k ;;
165m68*-*-sunos3*) gdb_target=sun3os3 ;;
166m68*-*-sunos4*) gdb_target=sun3os4 ;;
167m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13
JG
168
169m88k-motorola-*) gdb_target=delta88 ;;
170m88k-*-*) gdb_target=m88k ;;
171
172mips-big-*) gdb_target=bigmips ;;
173mips-dec-*) gdb_target=decstation ;;
174mips-little-*) gdb_target=littlemips ;;
175mips-sgi-*) gdb_target=irix3 ;;
176mips-sony-*) gdb_target=bigmips ;;
177
178none-*-*) gdb_target=none ;;
179
180np1-*-*) gdb_target=np1 ;;
181
182ns32k-utek-sysv) gdb_target=merlin ;;
183ns32k-utek-*) gdb_target=umax ;;
184
185pn-*-*) gdb_target=pn ;;
186
187pyramid-*-*) gdb_target=pyramid ;;
188
189rs6000-*-*) gdb_target=rs6000 ;;
190
ebb3a1e5
JG
191sparc-*-aout) gdb_target=sparc-un ;;
192sparc-*-coff) gdb_target=sparc-noun ;;
193sparc-*-elf) gdb_target=sparc-noun ;;
ef131e13 194sparc-*-solaris2*) gdb_target=sun4sol2 ;;
ebb3a1e5
JG
195sparc-*-sunos4*) gdb_target=sun4os4 ;;
196sparc-*-vxworks*) gdb_target=sparc-un ;;
b52373a2 197sparc-*-*) gdb_target=sun4os4 ;;
a05e2e57 198sparclite*-*-*) gdb_target=sun4os4 ;;
ef131e13
JG
199
200tahoe-*-*) gdb_target=tahoe ;;
201vax-*-*) gdb_target=vax ;;
6c815bbe 202
1242152e 203z8k-unknown-sim) gdb_target=z8ksim ;;
6c815bbe
RP
204esac
205
fe7ca711 206if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
6c815bbe 207 echo '***' "Gdb does not support target ${target}" 1>&2
912e0732
RP
208 exit 1
209fi
210
211if [ -z "${removing}" ] ; then
fe7ca711 212 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
912e0732
RP
213 print substr($0,6)}'
214fi
215
bdf3621b 216# We really shouldn't depend on there being a space after TM_FILE= ...
fe7ca711 217targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
912e0732 218
d40309c7
JG
219if [ "${target}" = "${host}" ] ; then
220 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
221fi
222
fe7ca711
SC
223host_makefile_frag=config/${gdb_host}.mh
224target_makefile_frag=config/${gdb_target}.mt
912e0732 225
d40309c7
JG
226# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
227# (NAT_FILE) is not set in the ?config/* file, we don't make the
228# corresponding links. But we have to remove the xm.h files and tm.h
229# files anyway, e.g. when switching from "configure host" to
230# "configure none".
231
bdf3621b
JG
232files=
233links=
dc0c3f64 234rm -f xm.h
bdf3621b
JG
235if [ "${hostfile}" != "" ]; then
236 files="${files} ${hostfile}"
237 links="${links} xm.h"
238fi
dc0c3f64 239rm -f tm.h
bdf3621b
JG
240if [ "${targetfile}" != "" ]; then
241 files="${files} ${targetfile}"
242 links="${links} tm.h"
243fi
d40309c7
JG
244rm -f nat.h
245if [ "${nativefile}" != "" ]; then
246 files="${files} ${nativefile}"
dfc82617 247 links="${links} nm.h"
c9c23412
RP
248# temporary scaffolding until all hosts have the host/target/native
249# split in place.
250else
dfc82617
RP
251 files="${files} nm-trash.h"
252 links="${links} nm.h"
d40309c7 253fi
bdf3621b
JG
254
255# post-target:
912e0732 256
bdf3621b
JG
257case ${srcdir} in
258 .)
259 ;;
260 *)
261 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
262 echo "source ${srcdir}/.gdbinit" >> .gdbinit
263esac
264
c1ab5dba 265if [ "${nativefile}" = "" ] ; then
41617f8b 266 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
d40309c7
JG
267 < Makefile > Makefile.tem
268 mv -f Makefile.tem Makefile
269fi
270
dc0c3f64 271cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
This page took 0.08539 seconds and 4 git commands to generate.