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