From Richard Earnshaw (rearnsha@armltd.co.uk):
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
5436fc65
C
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.3)dnl
3AC_INIT(main.c)
4
5CC=${CC-cc}
6AC_PROG_CC
7AC_AIX
8AC_MINIX
9AC_ISC_POSIX
10
11AC_PROG_INSTALL
12AC_PROG_RANLIB
13
14AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
15AC_CANONICAL_SYSTEM
16AC_ARG_PROGRAM
17
18
19dnl Handle optional features that can be enabled.
20ENABLE_CFLAGS=
21ENABLE_CLIBS=
22ENABLE_OBS=
23
24AC_ARG_ENABLE(netrom,
25[ --enable-netrom ],
26[case "${enableval}" in
27yes) enable_netrom=yes ;;
28no) enable_netrom=no ;;
29*) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
30esac])
31
32if test "${enable_netrom}" = "yes"; then
33 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
34fi
35
36# start-sanitize-gdbtk
37ENABLE_GDBTK=
38
39AC_ARG_ENABLE(gdbtk,
40[ --enable-gdbtk ],
41[case "${enableval}" in
42yes) enable_gdbtk=yes ;;
43no) enable_gdbtk=no ;;
44*) AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
45esac])
46
47if test "${enable_gdbtk}" = "yes"; then
48 AC_PATH_X
49 AC_PATH_XTRA
50
51 CYGNUS_PATH_TK
52 CYGNUS_PATH_TCL
53
54 ENABLE_GDBTK=1
55 ENABLE_CLIBS="${ENABLE_CLIBS} $(TCL) $(TK) $(X11) -lm"
56 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
57fi
58AC_SUBST(ENABLE_GDBTK)
59# end-sanitize-gdbtk
60
61AC_SUBST(ENABLE_CFLAGS)
62AC_SUBST(ENABLE_CLIBS)
63AC_SUBST(ENABLE_OBS)
6ec7e4d3 64
bc028766 65
6ec7e4d3
SS
66configdirs="doc testsuite"
67
5436fc65
C
68dnl
69changequote(,)dnl
0df06ca0 70
1a0edbc7
FF
71# Map host cpu into the config cpu subdirectory name.
72# The default is $host_cpu.
73
74case "${host_cpu}" in
75
76c[12]) gdb_host_cpu=convex ;;
77hppa*) gdb_host_cpu=pa ;;
7382b3b1 78i[345]86) gdb_host_cpu=i386 ;;
1a0edbc7 79m68*) gdb_host_cpu=m68k ;;
6ec7e4d3 80m88*) gdb_host_cpu=m88k ;;
1a0edbc7
FF
81np1) gdb_host_cpu=gould ;;
82pyramid) gdb_host_cpu=pyr ;;
c7b44b04 83powerpc*) gdb_host_cpu=powerpc ;;
1a0edbc7
FF
84*) gdb_host_cpu=$host_cpu ;;
85
86esac
87
6c815bbe
RP
88# map host info into gdb names.
89
19758e9e 90case "${host}" in
6c815bbe 91
19758e9e
JG
92a29k-*-*) gdb_host=ultra3 ;;
93
2592eef8 94alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
95alpha-*-osf2*) gdb_host=alpha-osf2 ;;
96alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
7ccb1e44 97
19758e9e
JG
98arm-*-*) gdb_host=arm ;;
99
100c[12]-*-*) gdb_host=convex ;;
101
e8e13040 102hppa*-*-bsd*) gdb_host=hppabsd ;;
e8e13040 103hppa*-*-hiux*) gdb_host=hppahpux ;;
6ec7e4d3 104hppa*-*-hpux*) gdb_host=hppahpux ;;
2d2959e8 105hppa*-*-osf*) gdb_host=hppaosf ;;
19758e9e 106
7382b3b1
ILT
107i[345]86-ncr-*) gdb_host=ncr3000 ;;
108i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
109i[345]86-sequent-sysv4*) gdb_host=ptx4 ;;
110i[345]86-sequent-sysv*) gdb_host=ptx ;;
111i[345]86-*-aix*) gdb_host=i386aix ;;
112i[345]86-*-bsd*) gdb_host=i386bsd ;;
151d7f0a 113i[345]86-*-freebsd*) gdb_host=fbsd ;;
b40fa612 114i[345]86-*-netbsd*) gdb_host=nbsd ;;
7382b3b1
ILT
115i[345]86-*-go32*) gdb_host=go32 ;;
116i[345]86-*-linux*) gdb_host=linux ;;
117i[345]86-*-lynxos*) gdb_host=i386lynx ;;
118i[345]86-*-mach3*) gdb_host=i386m3 ;;
119i[345]86-*-mach*) gdb_host=i386mach ;;
120i[345]86-*-osf1mk*) gdb_host=osf1mk ;;
121i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
122i[345]86-*-sco*) gdb_host=i386sco ;;
123i[345]86-*-solaris*) gdb_host=i386sol2 ;;
124i[345]86-*-sunos*) gdb_host=sun386 ;;
125i[345]86-*-sysv3.2*) gdb_host=i386v32 ;;
126i[345]86-*-sysv32*) gdb_host=i386v32 ;;
127i[345]86-*-sysv4*) gdb_host=i386v4 ;;
128i[345]86-*-unixware) gdb_host=i386v4 ;;
129i[345]86-*-sysv*) gdb_host=i386v ;;
130i[345]86-*-isc*) gdb_host=i386v32 ;;
131i[345]86-*-os9k) gdb_host=i386os9k ;;
19758e9e 132
358ca35e
JG
133m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
134m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
ef131e13 135m68030-sony-*) gdb_host=news1000 ;;
19758e9e 136
358ca35e
JG
137m68*-altos-*) gdb_host=altos ;;
138m68*-apollo*-sysv*) gdb_host=apollo68v ;;
139m68*-apollo*-bsd*) gdb_host=apollo68b ;;
140m68*-att-*) gdb_host=3b1 ;;
0a8f1742 141m68*-bull*-sysv*) gdb_host=dpx2 ;;
8f59e92b
FF
142m68*-hp-bsd*) gdb_host=hp300bsd ;;
143m68*-hp-hpux*) gdb_host=hp300hpux ;;
358ca35e 144m68*-isi-*) gdb_host=isi ;;
9bebe500 145m68*-*-lynxos*) gdb_host=m68klynx ;;
670a8e09 146m68*-*-sysv4*) gdb_host=m68kv4 ;;
c649a7c2 147m68*-motorola-*) gdb_host=delta68 ;;
358ca35e
JG
148m68*-sony-*) gdb_host=news ;;
149m68*-sun-sunos3*) gdb_host=sun3os3 ;;
150m68*-sun-sunos4*) gdb_host=sun3os4 ;;
151m68*-sun-*) gdb_host=sun3os4 ;;
19758e9e 152
670a8e09 153m88*-harris-cxux*) gdb_host=cxux ;;
304977ab
JK
154m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
155m88*-motorola-sysv*) gdb_host=delta88 ;;
6ec7e4d3 156m88*-*-mach3*) gdb_host=mach3 ;;
304977ab 157m88*-*-*) gdb_host=m88k ;;
19758e9e 158
6ec7e4d3 159mips-dec-mach3*) gdb_host=mach3 ;;
19758e9e
JG
160mips-dec-*) gdb_host=decstation ;;
161mips-little-*) gdb_host=littlemips ;;
3b891e0b 162mips-sgi-irix3*) gdb_host=irix3 ;;
81029114 163mips-sgi-irix4*) gdb_host=irix4 ;;
e03c0cc6 164mips-sgi-irix5*) gdb_host=irix5 ;;
b487ba2e 165mips-sony-*) gdb_host=news-mips ;;
6ec7e4d3 166mips-*-mach3*) gdb_host=mach3 ;;
2fe3b329 167mips-*-sysv4*) gdb_host=mipsv4 ;;
ee06f230 168mips-*-sysv*) gdb_host=riscos ;;
e8f8e093 169mips-*-riscos*) gdb_host=riscos ;;
19758e9e
JG
170
171none-*-*) gdb_host=none ;;
ef131e13 172
19758e9e
JG
173np1-*-*) gdb_host=np1 ;;
174
6ec7e4d3 175ns32k-*-mach3*) gdb_host=mach3 ;;
84f652b1 176ns32k-*-netbsd*) gdb_host=nbsd ;;
19758e9e 177ns32k-umax-*) gdb_host=umax ;;
3b891e0b 178ns32k-utek-sysv*) gdb_host=merlin ;;
19758e9e 179
19758e9e
JG
180pn-*-*) gdb_host=pn ;;
181
182pyramid-*-*) gdb_host=pyramid ;;
183
184romp-*-*) gdb_host=rtbsd ;;
185
d87d7b10 186rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
19758e9e
JG
187rs6000-*-*) gdb_host=rs6000 ;;
188
9bebe500 189sparc-*-lynxos*) gdb_host=sparclynx ;;
331d515a 190sparc-*-netbsd*) gdb_host=nbsd ;;
ef131e13 191sparc-*-solaris2*) gdb_host=sun4sol2 ;;
ebb3a1e5 192sparc-*-sunos4*) gdb_host=sun4os4 ;;
1e1dd175 193sparc-*-sunos5*) gdb_host=sun4sol2 ;;
b52373a2 194sparc-*-*) gdb_host=sun4os4 ;;
19758e9e
JG
195
196tahoe-*-*) gdb_host=tahoe ;;
197
198vax-*-bsd*) gdb_host=vaxbsd ;;
6985bc54 199vax-*-ultrix2*) gdb_host=vaxult2 ;;
19758e9e 200vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 201
d723ade7
SC
202w65-*-*) gdb_host=w65 ;;
203
6c815bbe
RP
204esac
205
8c7ae4a2 206
1a0edbc7
FF
207# Map target cpu into the config cpu subdirectory name.
208# The default is $target_cpu.
209
210case "${target_cpu}" in
211
cef4c2e7 212alpha) gdb_target_cpu=alpha ;;
1a0edbc7
FF
213c[12]) gdb_target_cpu=convex ;;
214hppa*) gdb_target_cpu=pa ;;
7382b3b1 215i[345]86) gdb_target_cpu=i386 ;;
1a0edbc7 216m68*) gdb_target_cpu=m68k ;;
6ec7e4d3 217m88*) gdb_target_cpu=m88k ;;
b60f6584 218mips*) gdb_target_cpu=mips ;;
1a0edbc7 219np1) gdb_target_cpu=gould ;;
c7b44b04 220powerpc*) gdb_target_cpu=powerpc ;;
1a0edbc7
FF
221pn) gdb_target_cpu=gould ;;
222pyramid) gdb_target_cpu=pyr ;;
2c30f258 223sparclite*) gdb_target_cpu=sparc
5436fc65 224 configdirs="${configdirs} sparclite" ;;
0c101d49 225sparc*) gdb_target_cpu=sparc ;;
1a0edbc7
FF
226*) gdb_target_cpu=$target_cpu ;;
227
228esac
229
230# map target info into gdb names.
231
ef131e13
JG
232case "${target}" in
233
3b891e0b
JK
234a29k-*-aout*) gdb_target=a29k ;;
235a29k-*-coff*) gdb_target=a29k ;;
236a29k-*-elf*) gdb_target=a29k ;;
237a29k-*-ebmon*) gdb_target=a29k ;;
238a29k-*-kern*) gdb_target=a29k-kern ;;
239a29k-*-none*) gdb_target=a29k ;;
240a29k-*-sym1*) gdb_target=ultra3 ;;
241a29k-*-udi*) gdb_target=a29k-udi ;;
83d9bb14 242a29k-*-vxworks*) gdb_target=vx29k ;;
ef131e13 243
cef4c2e7 244alpha-*-osf*) gdb_target=alpha-osf1 ;;
6ec7e4d3 245
c1ac88f9 246# start-sanitize-arc
83d9bb14 247arc-*-*) gdb_target=arc ;;
c1ac88f9
DE
248# end-sanitize-arc
249
ef131e13
JG
250arm-*-*) gdb_target=arm ;;
251
252c1-*-*) gdb_target=convex ;;
253c2-*-*) gdb_target=convex ;;
254
fb506180
SS
255h8300-*-*) gdb_target=h8300 ;;
256h8500-*-*) gdb_target=h8500 ;;
ef131e13 257
9faacb92
SC
258sh-*-*) gdb_target=sh ;;
259
03c4ce2f
MT
260# start-sanitize-r16
261r16-*-*) gdb_target=r16 ;;
262# end-sanitize-r16
263
8f59e92b 264hppa*-*-bsd*) gdb_target=hppabsd ;;
cc5702bd 265hppa*-*-pro*) gdb_target=hppapro ;;
8f59e92b 266hppa*-*-hpux*) gdb_target=hppahpux ;;
7079e766 267hppa*-*-hiux*) gdb_target=hppahpux ;;
6bfd168c 268hppa*-*-osf*) gdb_target=hppaosf ;;
ef131e13 269
7382b3b1
ILT
270i[345]86-sequent-bsd*) gdb_target=symmetry ;;
271i[345]86-sequent-sysv4*) gdb_target=ptx4 ;;
272i[345]86-sequent-sysv*) gdb_target=ptx ;;
273i[345]86-ncr-*) gdb_target=ncr3000 ;;
274i[345]86-*-aout*) gdb_target=i386aout ;;
275i[345]86-*-coff*) gdb_target=i386v ;;
276i[345]86-*-elf*) gdb_target=i386v ;;
277i[345]86-*-aix*) gdb_target=i386aix ;;
278i[345]86-*-bsd*) gdb_target=i386bsd ;;
151d7f0a 279i[345]86-*-freebsd*) gdb_target=fbsd ;;
b40fa612 280i[345]86-*-netbsd*) gdb_target=nbsd ;;
7382b3b1
ILT
281i[345]86-*-os9k) gdb_target=i386os9k ;;
282i[345]86-*-go32*) gdb_target=i386aout ;;
283i[345]86-*-lynxos*) gdb_target=i386lynx
5436fc65 284 configdirs="${configdirs} gdbserver" ;;
7382b3b1
ILT
285i[345]86-*-solaris*) gdb_target=i386sol2 ;;
286i[345]86-*-sunos*) gdb_target=sun386 ;;
287i[345]86-*-sysv4*) gdb_target=i386v4 ;;
288i[345]86-*-sco*) gdb_target=i386v ;;
289i[345]86-*-sysv*) gdb_target=i386v ;;
290i[345]86-*-linux*) gdb_target=linux ;;
291i[345]86-*-isc*) gdb_target=i386v ;;
292i[345]86-*-mach3*) gdb_target=i386m3 ;;
293i[345]86-*-mach*) gdb_target=i386mach ;;
294i[345]86-*-netware*) gdb_target=i386nw
5436fc65 295 configdirs="${configdirs} nlm" ;;
7382b3b1 296i[345]86-*-osf1mk*) gdb_target=i386mk ;;
ef131e13 297
3b891e0b
JK
298i960-*-bout*) gdb_target=vxworks960 ;;
299i960-*-coff*) gdb_target=nindy960 ;;
300i960-*-elf*) gdb_target=nindy960 ;;
ebb3a1e5 301
3b891e0b
JK
302i960-*-nindy*) gdb_target=nindy960 ;;
303i960-*-vxworks*) gdb_target=vxworks960 ;;
ef131e13 304
ebb3a1e5
JG
305m68000-*-sunos3*) gdb_target=sun2os3 ;;
306m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 307
835fe6e6 308m68*-apollo*-bsd*) gdb_target=apollo68b ;;
6ec7e4d3 309m68*-bull-sysv*) gdb_target=dpx2 ;;
6ec7e4d3
SS
310m68*-hp-bsd*) gdb_target=hp300bsd ;;
311m68*-hp-hpux*) gdb_target=hp300hpux ;;
670a8e09
SS
312m68*-altos-*) gdb_target=altos ;;
313m68*-att-*) gdb_target=3b1 ;;
314m68*-cisco*-*) gdb_target=cisco ;;
315m68*-ericsson-*) gdb_target=es1800 ;;
358ca35e 316m68*-isi-*) gdb_target=isi ;;
c649a7c2 317m68*-motorola-*) gdb_target=delta68 ;;
358ca35e
JG
318m68*-netx-*) gdb_target=vxworks68 ;;
319m68*-sony-*) gdb_target=news ;;
320m68*-tandem-*) gdb_target=st2000 ;;
c1128340
RS
321m68*-rom68k-*) gdb_target=monitor ;;
322m68*-*bug-*) gdb_target=monitor ;;
323m68*-monitor-*) gdb_target=monitor ;;
a25a9f49 324m68*-est-*) gdb_target=est ;;
0ffba029
RS
325m68*-*-aout*) gdb_target=monitor ;;
326m68*-*-coff*) gdb_target=monitor ;;
327m68*-*-elf*) gdb_target=monitor ;;
9bebe500 328m68*-*-lynxos*) gdb_target=m68klynx
5436fc65 329 configdirs="${configdirs} gdbserver" ;;
3b891e0b 330m68*-*-os68k*) gdb_target=os68k ;;
358ca35e
JG
331m68*-*-sunos3*) gdb_target=sun3os3 ;;
332m68*-*-sunos4*) gdb_target=sun3os4 ;;
670a8e09 333m68*-*-sysv4*) gdb_target=m68kv4 ;;
358ca35e 334m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13 335
670a8e09 336m88*-harris-cxux*) gdb_target=cxux ;;
f9440640 337m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
6ec7e4d3 338m88*-*-mach3*) gdb_target=mach3 ;;
304977ab
JK
339m88*-motorola-*) gdb_target=delta88 ;;
340m88*-*-*) gdb_target=m88k ;;
ef131e13 341
70126bf9 342mips64*-big-*) gdb_target=bigmips64 ;;
b60f6584 343mips*-big-*) gdb_target=bigmips ;;
6ec7e4d3 344mips*-dec-mach3*) gdb_target=mach3 ;;
b60f6584 345mips*-dec-*) gdb_target=decstation ;;
70126bf9
KH
346mips64*el-*-ecoff*) gdb_target=idtl64 ;;
347mips64*-idt-ecoff*) gdb_target=idt64 ;;
348mips64*el-*-elf*) gdb_target=idtl64 ;;
349mips64*-*-elf*) gdb_target=idt64 ;;
b60f6584 350mips*el-*-ecoff*) gdb_target=idtl ;;
2e1b3b03 351mips*-*-ecoff*) gdb_target=idt ;;
b60f6584
ILT
352mips*el-*-elf*) gdb_target=idtl ;;
353mips*-*-elf*) gdb_target=idt ;;
354mips*-little-*) gdb_target=littlemips ;;
355mips*-sgi-irix5*) gdb_target=irix5 ;;
356mips*-sgi-*) gdb_target=irix3 ;;
357mips*-sony-*) gdb_target=bigmips ;;
6ec7e4d3 358mips*-*-mach3*) gdb_target=mach3 ;;
2fe3b329 359mips*-*-sysv4*) gdb_target=mipsv4 ;;
b60f6584
ILT
360mips*-*-sysv*) gdb_target=bigmips ;;
361mips*-*-riscos*) gdb_target=bigmips ;;
ef131e13
JG
362
363none-*-*) gdb_target=none ;;
364
365np1-*-*) gdb_target=np1 ;;
366
6ec7e4d3 367ns32k-*-mach3*) gdb_target=mach3 ;;
84f652b1 368ns32k-*-netbsd*) gdb_target=nbsd ;;
3b891e0b 369ns32k-utek-sysv*) gdb_target=merlin ;;
ef131e13
JG
370ns32k-utek-*) gdb_target=umax ;;
371
372pn-*-*) gdb_target=pn ;;
b7da2494
SG
373powerpc-*-netware*) gdb_target=ppc-nw
374 configdirs="${configdirs} nlm" ;;
ef131e13 375
97544048
MM
376powerpc-*-eabi*) gdb_target=ppc-eabi
377 configdirs="${configdirs}" ;;
378
c7b44b04
MM
379powerpcle-*-eabi*) gdb_target=ppcle-eabi
380 configdirs="${configdirs}" ;;
381
ef131e13
JG
382pyramid-*-*) gdb_target=pyramid ;;
383
d87d7b10 384rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
ef131e13
JG
385rs6000-*-*) gdb_target=rs6000 ;;
386
3b891e0b
JK
387sparc-*-aout*) gdb_target=sparc-em ;;
388sparc-*-coff*) gdb_target=sparc-em ;;
389sparc-*-elf*) gdb_target=sparc-em ;;
9bebe500 390sparc-*-lynxos*) gdb_target=sparclynx
5436fc65 391 configdirs="${configdirs} gdbserver" ;;
331d515a 392sparc-*-netbsd*) gdb_target=nbsd ;;
ef131e13 393sparc-*-solaris2*) gdb_target=sun4sol2 ;;
ebb3a1e5 394sparc-*-sunos4*) gdb_target=sun4os4 ;;
1e1dd175 395sparc-*-sunos5*) gdb_target=sun4sol2 ;;
54d44c8c 396sparc-*-vxworks*) gdb_target=vxsparc ;;
b52373a2 397sparc-*-*) gdb_target=sun4os4 ;;
0c101d49 398sparclite*-*-*) gdb_target=sparclite ;;
6ec7e4d3 399sparc64-*-*) gdb_target=sp64 ;;
ef131e13
JG
400
401tahoe-*-*) gdb_target=tahoe ;;
6ec7e4d3 402
ef131e13 403vax-*-*) gdb_target=vax ;;
6c815bbe 404
d723ade7
SC
405w65-*-*) gdb_target=w65 ;;
406
fb506180
SS
407z8k-*-sim*) gdb_target=z8k ;;
408z8k-*-coff*) gdb_target=z8k ;;
6ec7e4d3 409
6c815bbe
RP
410esac
411
5436fc65
C
412dnl
413changequote([,])dnl
414
5f107900 415frags=
5436fc65
C
416host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
417if test ! -f ${host_makefile_frag}; then
418AC_MSG_ERROR("*** Gdb does not support host ${host}")
912e0732 419fi
5f107900 420frags="$frags $host_makefile_frag"
912e0732 421
5436fc65
C
422target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
423if test ! -f ${target_makefile_frag}; then
424AC_MSG_ERROR("*** Gdb does not support target ${target}")
912e0732 425fi
5f107900 426frags="$frags $target_makefile_frag"
912e0732 427
5436fc65
C
428AC_SUBST_FILE(host_makefile_frag)
429AC_SUBST_FILE(target_makefile_frag)
5f107900 430AC_SUBST(frags)
5436fc65 431
094fd4ae
C
432changequote(,)dnl
433hostfile=`sed -n '
434s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
435' ${host_makefile_frag}`
5436fc65 436
094fd4ae
C
437targetfile=`sed -n '
438s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
439' ${target_makefile_frag}`
79f68f0f
DZ
440
441# these really aren't orthogonal true/false values of the same condition,
442# but shells are slow enough that I like to reuse the test conditions
443# whenever possible
5436fc65 444if test "${target}" = "${host}"; then
094fd4ae
C
445nativefile=`sed -n '
446s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
447' ${host_makefile_frag}`
79f68f0f 448else
5436fc65
C
449# GDBserver is only useful in a "native" enviroment
450configdirs=`echo $configdirs | sed 's/gdbserver//'`
d40309c7 451fi
094fd4ae 452changequote([,])
d40309c7 453
d40309c7 454# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
6573c898 455# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
d40309c7
JG
456# corresponding links. But we have to remove the xm.h files and tm.h
457# files anyway, e.g. when switching from "configure host" to
458# "configure none".
459
bdf3621b
JG
460files=
461links=
dc0c3f64 462rm -f xm.h
5436fc65
C
463if test "${hostfile}" != ""; then
464files="${files} config/${gdb_host_cpu}/${hostfile}"
465links="${links} xm.h"
bdf3621b 466fi
dc0c3f64 467rm -f tm.h
5436fc65
C
468if test "${targetfile}" != ""; then
469files="${files} config/${gdb_target_cpu}/${targetfile}"
470links="${links} tm.h"
bdf3621b 471fi
1a0edbc7 472rm -f nm.h
5436fc65
C
473if test "${nativefile}" != ""; then
474files="${files} config/${gdb_host_cpu}/${nativefile}"
475links="${links} nm.h"
c9c23412 476else
5436fc65
C
477# A cross-only configuration.
478files="${files} config/nm-empty.h"
479links="${links} nm.h"
d40309c7 480fi
d3d75ec9 481# start-sanitize-gdbtk
912e0732 482
5436fc65
C
483# Make it possible to use the GUI without doing a full install
484if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
485files="${files} gdbtk.tcl"
486links="${links} gdbtk.tcl"
754e5da2 487fi
d3d75ec9 488# end-sanitize-gdbtk
754e5da2 489
5436fc65
C
490AC_LINK_FILES($files, $links)
491
492AC_CONFIG_SUBDIRS($configdirs)
493AC_OUTPUT(Makefile,
494[
495dnl Autoconf doesn't provide a mechanism for modifying definitions
496dnl provided by makefile fragments.
497dnl
498if test "${nativefile}" = ""; then
499sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
500 < Makefile > Makefile.tem
501mv -f Makefile.tem Makefile
33bc979d
SS
502fi
503
5436fc65 504changequote(,)dnl
94d4b713
JK
505sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
506/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
507/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
508mv -f Makefile.tmp Makefile
5436fc65
C
509changequote([,])dnl
510
511case ${srcdir} in
512.)
513;;
514*)
515grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
516echo "source ${srcdir}/.gdbinit" >> .gdbinit
517esac
0a5a1821
C
518],
519[
520gdb_host_cpu=$gdb_host_cpu
521gdb_target_cpu=$gdb_target_cpu
522nativefile=$nativefile
5436fc65 523])
This page took 0.215347 seconds and 4 git commands to generate.