* som.h (R_HPPA_COMPLEX): Fix dumb typo.
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
6ec7e4d3
SS
1# This file is a shell script fragment that supplies the information
2# necessary to tailor a template configure script into the configure
3# script appropriate for this directory. For more information, check
4# any existing configure script.
5
912e0732
RP
6srcname="GDB"
7srctrigger=main.c
bc028766 8
6ec7e4d3
SS
9configdirs="doc testsuite"
10
0df06ca0
RP
11# per-host:
12
1a0edbc7
FF
13# Map host cpu into the config cpu subdirectory name.
14# The default is $host_cpu.
15
16case "${host_cpu}" in
17
18c[12]) gdb_host_cpu=convex ;;
19hppa*) gdb_host_cpu=pa ;;
20i[34]86) gdb_host_cpu=i386 ;;
21m68*) gdb_host_cpu=m68k ;;
6ec7e4d3 22m88*) gdb_host_cpu=m88k ;;
1a0edbc7
FF
23np1) gdb_host_cpu=gould ;;
24pyramid) gdb_host_cpu=pyr ;;
25*) gdb_host_cpu=$host_cpu ;;
26
27esac
28
6c815bbe
RP
29# map host info into gdb names.
30
19758e9e 31case "${host}" in
6c815bbe 32
19758e9e
JG
33a29k-*-*) gdb_host=ultra3 ;;
34
7ccb1e44
SC
35alpha-*-osf*) gdb_host=alpha-osf1 ;;
36
19758e9e
JG
37arm-*-*) gdb_host=arm ;;
38
39c[12]-*-*) gdb_host=convex ;;
40
e8e13040 41hppa*-*-bsd*) gdb_host=hppabsd ;;
e8e13040 42hppa*-*-hiux*) gdb_host=hppahpux ;;
6ec7e4d3 43hppa*-*-hpux*) gdb_host=hppahpux ;;
6bfd168c 44hppa*-*-osf*) gdb_host=hppabsd ;;
19758e9e 45
19758e9e 46i[34]86-ncr-*) gdb_host=ncr3000 ;;
6ec7e4d3 47i[34]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
59144a81 48i[34]86-sequent-sysv4*) gdb_host=ptx4 ;;
56eec3c7 49i[34]86-sequent-sysv*) gdb_host=ptx ;;
2c7ab4ca 50i[34]86-*-aix*) gdb_host=i386aix ;;
6d685882 51i[34]86-*-bsd*) gdb_host=i386bsd ;;
a6565079 52i[34]86-*-netbsd*) gdb_host=i386bsd ;;
6ec7e4d3 53i[34]86-*-go32*) gdb_host=go32 ;;
3b891e0b 54i[34]86-*-linux*) gdb_host=linux ;;
9bebe500 55i[34]86-*-lynxos*) gdb_host=i386lynx ;;
3563094d 56i[34]86-*-mach3*) gdb_host=i386m3 ;;
6ec7e4d3
SS
57i[34]86-*-mach*) gdb_host=i386mach ;;
58i[34]86-*-osf1mk*) gdb_host=osf1mk ;;
117f631e 59i[34]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
cf57ff2a 60i[34]86-*-sco*) gdb_host=i386sco ;;
5c820c19 61i[34]86-*-solaris*) gdb_host=i386sol2 ;;
b1aa08e2 62i[34]86-*-sunos*) gdb_host=sun386 ;;
3b891e0b 63i[34]86-*-sysv3.2*) gdb_host=i386v32 ;;
d9a5e91f 64i[34]86-*-sysv32*) gdb_host=i386v32 ;;
19758e9e 65i[34]86-*-sysv4*) gdb_host=i386v4 ;;
2fa6925b 66i[34]86-*-unixware) gdb_host=i386v4 ;;
19758e9e 67i[34]86-*-sysv*) gdb_host=i386v ;;
e23a6896 68i[34]86-*-isc*) gdb_host=i386v32 ;;
1340861c 69i[34]86-*-os9k) gdb_host=i386os9k ;;
19758e9e 70
358ca35e
JG
71m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
72m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
ef131e13 73m68030-sony-*) gdb_host=news1000 ;;
19758e9e 74
358ca35e
JG
75m68*-altos-*) gdb_host=altos ;;
76m68*-apollo*-sysv*) gdb_host=apollo68v ;;
77m68*-apollo*-bsd*) gdb_host=apollo68b ;;
78m68*-att-*) gdb_host=3b1 ;;
0a8f1742 79m68*-bull*-sysv*) gdb_host=dpx2 ;;
358ca35e 80m68*-cbm-sysv4*) gdb_host=amix ;;
8f59e92b
FF
81m68*-hp-bsd*) gdb_host=hp300bsd ;;
82m68*-hp-hpux*) gdb_host=hp300hpux ;;
358ca35e 83m68*-isi-*) gdb_host=isi ;;
9bebe500 84m68*-*-lynxos*) gdb_host=m68klynx ;;
c649a7c2 85m68*-motorola-*) gdb_host=delta68 ;;
358ca35e
JG
86m68*-sony-*) gdb_host=news ;;
87m68*-sun-sunos3*) gdb_host=sun3os3 ;;
88m68*-sun-sunos4*) gdb_host=sun3os4 ;;
89m68*-sun-*) gdb_host=sun3os4 ;;
19758e9e 90
304977ab
JK
91m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
92m88*-motorola-sysv*) gdb_host=delta88 ;;
6ec7e4d3 93m88*-*-mach3*) gdb_host=mach3 ;;
304977ab 94m88*-*-*) gdb_host=m88k ;;
19758e9e 95
6ec7e4d3 96mips-dec-mach3*) gdb_host=mach3 ;;
19758e9e
JG
97mips-dec-*) gdb_host=decstation ;;
98mips-little-*) gdb_host=littlemips ;;
3b891e0b 99mips-sgi-irix3*) gdb_host=irix3 ;;
81029114 100mips-sgi-irix4*) gdb_host=irix4 ;;
e03c0cc6 101mips-sgi-irix5*) gdb_host=irix5 ;;
b487ba2e 102mips-sony-*) gdb_host=news-mips ;;
6ec7e4d3 103mips-*-mach3*) gdb_host=mach3 ;;
2fe3b329 104mips-*-sysv4*) gdb_host=mipsv4 ;;
ee06f230 105mips-*-sysv*) gdb_host=riscos ;;
e8f8e093 106mips-*-riscos*) gdb_host=riscos ;;
19758e9e
JG
107
108none-*-*) gdb_host=none ;;
ef131e13 109
19758e9e
JG
110np1-*-*) gdb_host=np1 ;;
111
6ec7e4d3 112ns32k-*-mach3*) gdb_host=mach3 ;;
19758e9e 113ns32k-umax-*) gdb_host=umax ;;
3b891e0b 114ns32k-utek-sysv*) gdb_host=merlin ;;
19758e9e 115
19758e9e
JG
116pn-*-*) gdb_host=pn ;;
117
118pyramid-*-*) gdb_host=pyramid ;;
119
120romp-*-*) gdb_host=rtbsd ;;
121
d87d7b10 122rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
19758e9e
JG
123rs6000-*-*) gdb_host=rs6000 ;;
124
9bebe500 125sparc-*-lynxos*) gdb_host=sparclynx ;;
ef131e13 126sparc-*-solaris2*) gdb_host=sun4sol2 ;;
ebb3a1e5 127sparc-*-sunos4*) gdb_host=sun4os4 ;;
b52373a2 128sparc-*-*) gdb_host=sun4os4 ;;
19758e9e
JG
129
130tahoe-*-*) gdb_host=tahoe ;;
131
132vax-*-bsd*) gdb_host=vaxbsd ;;
6985bc54 133vax-*-ultrix2*) gdb_host=vaxult2 ;;
19758e9e 134vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 135
6c815bbe
RP
136esac
137
8c7ae4a2 138
1a0edbc7 139if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then
6c815bbe 140 echo '***' "Gdb does not support host ${host}" 1>&2
912e0732
RP
141 exit 1
142fi
143
bdf3621b 144# We really shouldn't depend on there being a space after XM_FILE= ...
1a0edbc7 145hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
912e0732 146
0df06ca0 147# per-target:
912e0732 148
1a0edbc7
FF
149# Map target cpu into the config cpu subdirectory name.
150# The default is $target_cpu.
151
152case "${target_cpu}" in
153
cef4c2e7 154alpha) gdb_target_cpu=alpha ;;
1a0edbc7
FF
155c[12]) gdb_target_cpu=convex ;;
156hppa*) gdb_target_cpu=pa ;;
157i[34]86) gdb_target_cpu=i386 ;;
158m68*) gdb_target_cpu=m68k ;;
6ec7e4d3 159m88*) gdb_target_cpu=m88k ;;
b60f6584 160mips*) gdb_target_cpu=mips ;;
1a0edbc7
FF
161np1) gdb_target_cpu=gould ;;
162pn) gdb_target_cpu=gould ;;
163pyramid) gdb_target_cpu=pyr ;;
2c30f258 164sparclite*) gdb_target_cpu=sparc
6ec7e4d3 165 configdirs="${configdirs} sparclite" ;;
0c101d49 166sparc*) gdb_target_cpu=sparc ;;
1a0edbc7
FF
167*) gdb_target_cpu=$target_cpu ;;
168
169esac
170
171# map target info into gdb names.
172
ef131e13
JG
173case "${target}" in
174
3b891e0b
JK
175a29k-*-aout*) gdb_target=a29k ;;
176a29k-*-coff*) gdb_target=a29k ;;
177a29k-*-elf*) gdb_target=a29k ;;
178a29k-*-ebmon*) gdb_target=a29k ;;
179a29k-*-kern*) gdb_target=a29k-kern ;;
180a29k-*-none*) gdb_target=a29k ;;
181a29k-*-sym1*) gdb_target=ultra3 ;;
182a29k-*-udi*) gdb_target=a29k-udi ;;
ef131e13 183
cef4c2e7 184alpha-*-osf*) gdb_target=alpha-osf1 ;;
2e6784a8 185alpha-*-netware*) gdb_target=alpha-nw
6ec7e4d3
SS
186 configdirs="${configdirs} nlm" ;;
187
ef131e13
JG
188arm-*-*) gdb_target=arm ;;
189
190c1-*-*) gdb_target=convex ;;
191c2-*-*) gdb_target=convex ;;
192
193h8300-*-*) gdb_target=h8300hms ;;
195e46ea 194h8500-*-*) gdb_target=h8500hms ;;
ef131e13 195
9faacb92
SC
196sh-*-*) gdb_target=sh ;;
197
8f59e92b
FF
198hppa*-*-bsd*) gdb_target=hppabsd ;;
199hppa*-*-hpux*) gdb_target=hppahpux ;;
7079e766 200hppa*-*-hiux*) gdb_target=hppahpux ;;
6bfd168c 201hppa*-*-osf*) gdb_target=hppaosf ;;
ef131e13 202
59144a81
JK
203i[34]86-sequent-bsd*) gdb_target=symmetry ;;
204i[34]86-sequent-sysv4*) gdb_target=ptx4 ;;
205i[34]86-sequent-sysv*) gdb_target=ptx ;;
ef131e13 206i[34]86-ncr-*) gdb_target=ncr3000 ;;
3b891e0b
JK
207i[34]86-*-aout*) gdb_target=i386aout ;;
208i[34]86-*-coff*) gdb_target=i386v ;;
209i[34]86-*-elf*) gdb_target=i386v ;;
2c7ab4ca 210i[34]86-*-aix*) gdb_target=i386aix ;;
6d685882 211i[34]86-*-bsd*) gdb_target=i386bsd ;;
a6565079 212i[34]86-*-netbsd*) gdb_target=i386bsd ;;
1340861c 213i[34]86-*-os9k) gdb_target=i386os9k ;;
3b891e0b 214i[34]86-*-go32*) gdb_target=i386aout ;;
9bebe500 215i[34]86-*-lynxos*) gdb_target=i386lynx
6ec7e4d3 216 configdirs="${configdirs} gdbserver" ;;
5c820c19 217i[34]86-*-solaris*) gdb_target=i386sol2 ;;
ef131e13
JG
218i[34]86-*-sunos*) gdb_target=sun386 ;;
219i[34]86-*-sysv4*) gdb_target=i386v4 ;;
cf57ff2a 220i[34]86-*-sco*) gdb_target=i386v ;;
ef131e13 221i[34]86-*-sysv*) gdb_target=i386v ;;
e23a6896
JK
222i[34]86-*-linux*) gdb_target=linux ;;
223i[34]86-*-isc*) gdb_target=i386v ;;
3563094d 224i[34]86-*-mach3*) gdb_target=i386m3 ;;
6ec7e4d3 225i[34]86-*-mach*) gdb_target=i386mach ;;
db85f523 226i[34]86-*-netware*) gdb_target=i386nw ;;
5d76c8e6 227i[34]86-*-osf1mk*) gdb_target=i386mk ;;
ef131e13 228
3b891e0b
JK
229i960-*-bout*) gdb_target=vxworks960 ;;
230i960-*-coff*) gdb_target=nindy960 ;;
231i960-*-elf*) gdb_target=nindy960 ;;
ebb3a1e5 232
3b891e0b
JK
233i960-*-nindy*) gdb_target=nindy960 ;;
234i960-*-vxworks*) gdb_target=vxworks960 ;;
ef131e13 235
ebb3a1e5
JG
236m68000-*-sunos3*) gdb_target=sun2os3 ;;
237m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 238
358ca35e 239m68*-altos-*) gdb_target=altos ;;
835fe6e6 240m68*-apollo*-bsd*) gdb_target=apollo68b ;;
358ca35e 241m68*-att-*) gdb_target=3b1 ;;
6ec7e4d3
SS
242m68*-bull-sysv*) gdb_target=dpx2 ;;
243m68*-cbm-sysv4*) gdb_target=amix ;;
d0bff94e 244m68*-cisco*-*) gdb_target=cisco ;;
358ca35e 245m68*-ericsson-*) gdb_target=es1800 ;;
6ec7e4d3
SS
246m68*-hp-bsd*) gdb_target=hp300bsd ;;
247m68*-hp-hpux*) gdb_target=hp300hpux ;;
358ca35e 248m68*-isi-*) gdb_target=isi ;;
c649a7c2 249m68*-motorola-*) gdb_target=delta68 ;;
358ca35e
JG
250m68*-netx-*) gdb_target=vxworks68 ;;
251m68*-sony-*) gdb_target=news ;;
252m68*-tandem-*) gdb_target=st2000 ;;
c1128340
RS
253m68*-rom68k-*) gdb_target=monitor ;;
254m68*-*bug-*) gdb_target=monitor ;;
255m68*-monitor-*) gdb_target=monitor ;;
0ffba029
RS
256m68*-*-aout*) gdb_target=monitor ;;
257m68*-*-coff*) gdb_target=monitor ;;
258m68*-*-elf*) gdb_target=monitor ;;
9bebe500 259m68*-*-lynxos*) gdb_target=m68klynx
6ec7e4d3 260 configdirs="${configdirs} gdbserver" ;;
3b891e0b 261m68*-*-os68k*) gdb_target=os68k ;;
358ca35e
JG
262m68*-*-sunos3*) gdb_target=sun3os3 ;;
263m68*-*-sunos4*) gdb_target=sun3os4 ;;
264m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13 265
f9440640 266m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
6ec7e4d3 267m88*-*-mach3*) gdb_target=mach3 ;;
304977ab
JK
268m88*-motorola-*) gdb_target=delta88 ;;
269m88*-*-*) gdb_target=m88k ;;
ef131e13 270
70126bf9 271mips64*-big-*) gdb_target=bigmips64 ;;
b60f6584 272mips*-big-*) gdb_target=bigmips ;;
6ec7e4d3 273mips*-dec-mach3*) gdb_target=mach3 ;;
b60f6584 274mips*-dec-*) gdb_target=decstation ;;
70126bf9
KH
275mips64*el-*-ecoff*) gdb_target=idtl64 ;;
276mips64*-idt-ecoff*) gdb_target=idt64 ;;
277mips64*el-*-elf*) gdb_target=idtl64 ;;
278mips64*-*-elf*) gdb_target=idt64 ;;
b60f6584
ILT
279mips*el-*-ecoff*) gdb_target=idtl ;;
280mips*-idt-ecoff*) gdb_target=idt ;;
281mips*el-*-elf*) gdb_target=idtl ;;
282mips*-*-elf*) gdb_target=idt ;;
283mips*-little-*) gdb_target=littlemips ;;
284mips*-sgi-irix5*) gdb_target=irix5 ;;
285mips*-sgi-*) gdb_target=irix3 ;;
286mips*-sony-*) gdb_target=bigmips ;;
6ec7e4d3 287mips*-*-mach3*) gdb_target=mach3 ;;
2fe3b329 288mips*-*-sysv4*) gdb_target=mipsv4 ;;
b60f6584
ILT
289mips*-*-sysv*) gdb_target=bigmips ;;
290mips*-*-riscos*) gdb_target=bigmips ;;
ef131e13
JG
291
292none-*-*) gdb_target=none ;;
293
294np1-*-*) gdb_target=np1 ;;
295
6ec7e4d3 296ns32k-*-mach3*) gdb_target=mach3 ;;
3b891e0b 297ns32k-utek-sysv*) gdb_target=merlin ;;
ef131e13
JG
298ns32k-utek-*) gdb_target=umax ;;
299
300pn-*-*) gdb_target=pn ;;
301
302pyramid-*-*) gdb_target=pyramid ;;
303
d87d7b10 304rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
ef131e13
JG
305rs6000-*-*) gdb_target=rs6000 ;;
306
3b891e0b
JK
307sparc-*-aout*) gdb_target=sparc-em ;;
308sparc-*-coff*) gdb_target=sparc-em ;;
309sparc-*-elf*) gdb_target=sparc-em ;;
9bebe500 310sparc-*-lynxos*) gdb_target=sparclynx
6ec7e4d3 311 configdirs="${configdirs} gdbserver" ;;
ef131e13 312sparc-*-solaris2*) gdb_target=sun4sol2 ;;
ebb3a1e5 313sparc-*-sunos4*) gdb_target=sun4os4 ;;
54d44c8c 314sparc-*-vxworks*) gdb_target=vxsparc ;;
b52373a2 315sparc-*-*) gdb_target=sun4os4 ;;
0c101d49 316sparclite*-*-*) gdb_target=sparclite ;;
6ec7e4d3 317sparc64-*-*) gdb_target=sp64 ;;
ef131e13
JG
318
319tahoe-*-*) gdb_target=tahoe ;;
6ec7e4d3 320
ef131e13 321vax-*-*) gdb_target=vax ;;
6c815bbe 322
3b891e0b
JK
323z8k-*-sim*) gdb_target=z8ksim ;;
324z8k-*-coff*) gdb_target=z8ksim ;;
6ec7e4d3 325
6c815bbe
RP
326esac
327
1a0edbc7 328if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
6c815bbe 329 echo '***' "Gdb does not support target ${target}" 1>&2
912e0732
RP
330 exit 1
331fi
332
333if [ -z "${removing}" ] ; then
1a0edbc7 334 cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
912e0732
RP
335 print substr($0,6)}'
336fi
337
bdf3621b 338# We really shouldn't depend on there being a space after TM_FILE= ...
1a0edbc7 339targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
912e0732 340
79f68f0f
DZ
341
342# these really aren't orthogonal true/false values of the same condition,
343# but shells are slow enough that I like to reuse the test conditions
344# whenever possible
345#
d40309c7 346if [ "${target}" = "${host}" ] ; then
1a0edbc7 347 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
79f68f0f
DZ
348else
349 # GDBserver is only useful in a "native" enviroment
350 configdirs=`echo $configdirs | sed 's/gdbserver//'`
d40309c7
JG
351fi
352
1a0edbc7
FF
353host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
354target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
912e0732 355
d40309c7
JG
356# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
357# (NAT_FILE) is not set in the ?config/* file, we don't make the
358# corresponding links. But we have to remove the xm.h files and tm.h
359# files anyway, e.g. when switching from "configure host" to
360# "configure none".
361
bdf3621b
JG
362files=
363links=
dc0c3f64 364rm -f xm.h
bdf3621b 365if [ "${hostfile}" != "" ]; then
1a0edbc7
FF
366 if [ -f ${srcdir}/config/${hostfile} ]; then
367 files="${files} config/${hostfile}"
368 else
369 files="${files} config/${gdb_host_cpu}/${hostfile}"
370 fi
bdf3621b
JG
371 links="${links} xm.h"
372fi
dc0c3f64 373rm -f tm.h
bdf3621b 374if [ "${targetfile}" != "" ]; then
1a0edbc7
FF
375 if [ -f ${srcdir}/config/${targetfile} ]; then
376 files="${files} config/${targetfile}"
377 else
378 files="${files} config/${gdb_target_cpu}/${targetfile}"
379 fi
bdf3621b
JG
380 links="${links} tm.h"
381fi
1a0edbc7 382rm -f nm.h
d40309c7 383if [ "${nativefile}" != "" ]; then
1a0edbc7
FF
384 if [ -f ${srcdir}/config/${nativefile} ]; then
385 files="${files} config/${nativefile}"
386 else
387 files="${files} config/${gdb_host_cpu}/${nativefile}"
388 fi
dfc82617 389 links="${links} nm.h"
c9c23412
RP
390# temporary scaffolding until all hosts have the host/target/native
391# split in place.
392else
1a0edbc7 393 files="${files} config/nm-trash.h"
dfc82617 394 links="${links} nm.h"
d40309c7 395fi
bdf3621b
JG
396
397# post-target:
912e0732 398
bdf3621b
JG
399case ${srcdir} in
400 .)
401 ;;
402 *)
e8f8e093 403 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
bdf3621b
JG
404 echo "source ${srcdir}/.gdbinit" >> .gdbinit
405esac
406
c1ab5dba 407if [ "${nativefile}" = "" ] ; then
41617f8b 408 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
d40309c7
JG
409 < Makefile > Makefile.tem
410 mv -f Makefile.tem Makefile
411fi
94d4b713
JK
412
413sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
414/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
415/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
416mv -f Makefile.tmp Makefile
This page took 0.174645 seconds and 4 git commands to generate.