* m68kmri.h: Remove.
[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
19758e9e
JG
186pn-*-*) gdb_host=pn ;;
187
188pyramid-*-*) gdb_host=pyramid ;;
189
190romp-*-*) gdb_host=rtbsd ;;
191
d87d7b10 192rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
19758e9e
JG
193rs6000-*-*) gdb_host=rs6000 ;;
194
9bebe500 195sparc-*-lynxos*) gdb_host=sparclynx ;;
331d515a 196sparc-*-netbsd*) gdb_host=nbsd ;;
ef131e13 197sparc-*-solaris2*) gdb_host=sun4sol2 ;;
ebb3a1e5 198sparc-*-sunos4*) gdb_host=sun4os4 ;;
1e1dd175 199sparc-*-sunos5*) gdb_host=sun4sol2 ;;
b52373a2 200sparc-*-*) gdb_host=sun4os4 ;;
19758e9e
JG
201
202tahoe-*-*) gdb_host=tahoe ;;
203
204vax-*-bsd*) gdb_host=vaxbsd ;;
6985bc54 205vax-*-ultrix2*) gdb_host=vaxult2 ;;
19758e9e 206vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 207
d723ade7
SC
208w65-*-*) gdb_host=w65 ;;
209
6c815bbe
RP
210esac
211
8c7ae4a2 212
1a0edbc7
FF
213# Map target cpu into the config cpu subdirectory name.
214# The default is $target_cpu.
215
216case "${target_cpu}" in
217
cef4c2e7 218alpha) gdb_target_cpu=alpha ;;
1a0edbc7
FF
219c[12]) gdb_target_cpu=convex ;;
220hppa*) gdb_target_cpu=pa ;;
7382b3b1 221i[345]86) gdb_target_cpu=i386 ;;
1a0edbc7 222m68*) gdb_target_cpu=m68k ;;
6ec7e4d3 223m88*) gdb_target_cpu=m88k ;;
b60f6584 224mips*) gdb_target_cpu=mips ;;
1a0edbc7 225np1) gdb_target_cpu=gould ;;
c7b44b04 226powerpc*) gdb_target_cpu=powerpc ;;
1a0edbc7
FF
227pn) gdb_target_cpu=gould ;;
228pyramid) gdb_target_cpu=pyr ;;
0c101d49 229sparc*) gdb_target_cpu=sparc ;;
1a0edbc7
FF
230*) gdb_target_cpu=$target_cpu ;;
231
232esac
233
234# map target info into gdb names.
235
ef131e13
JG
236case "${target}" in
237
3b891e0b
JK
238a29k-*-aout*) gdb_target=a29k ;;
239a29k-*-coff*) gdb_target=a29k ;;
240a29k-*-elf*) gdb_target=a29k ;;
241a29k-*-ebmon*) gdb_target=a29k ;;
242a29k-*-kern*) gdb_target=a29k-kern ;;
243a29k-*-none*) gdb_target=a29k ;;
244a29k-*-sym1*) gdb_target=ultra3 ;;
245a29k-*-udi*) gdb_target=a29k-udi ;;
83d9bb14 246a29k-*-vxworks*) gdb_target=vx29k ;;
ef131e13 247
cef4c2e7 248alpha-*-osf*) gdb_target=alpha-osf1 ;;
6ec7e4d3 249
c1ac88f9 250# start-sanitize-arc
83d9bb14 251arc-*-*) gdb_target=arc ;;
c1ac88f9
DE
252# end-sanitize-arc
253
ef131e13
JG
254arm-*-*) gdb_target=arm ;;
255
256c1-*-*) gdb_target=convex ;;
257c2-*-*) gdb_target=convex ;;
258
fb506180
SS
259h8300-*-*) gdb_target=h8300 ;;
260h8500-*-*) gdb_target=h8500 ;;
ef131e13 261
9faacb92
SC
262sh-*-*) gdb_target=sh ;;
263
03c4ce2f
MT
264# start-sanitize-r16
265r16-*-*) gdb_target=r16 ;;
266# end-sanitize-r16
267
8f59e92b 268hppa*-*-bsd*) gdb_target=hppabsd ;;
cc5702bd 269hppa*-*-pro*) gdb_target=hppapro ;;
8f59e92b 270hppa*-*-hpux*) gdb_target=hppahpux ;;
7079e766 271hppa*-*-hiux*) gdb_target=hppahpux ;;
6bfd168c 272hppa*-*-osf*) gdb_target=hppaosf ;;
ef131e13 273
7382b3b1
ILT
274i[345]86-sequent-bsd*) gdb_target=symmetry ;;
275i[345]86-sequent-sysv4*) gdb_target=ptx4 ;;
276i[345]86-sequent-sysv*) gdb_target=ptx ;;
277i[345]86-ncr-*) gdb_target=ncr3000 ;;
278i[345]86-*-aout*) gdb_target=i386aout ;;
279i[345]86-*-coff*) gdb_target=i386v ;;
280i[345]86-*-elf*) gdb_target=i386v ;;
281i[345]86-*-aix*) gdb_target=i386aix ;;
282i[345]86-*-bsd*) gdb_target=i386bsd ;;
151d7f0a 283i[345]86-*-freebsd*) gdb_target=fbsd ;;
b40fa612 284i[345]86-*-netbsd*) gdb_target=nbsd ;;
7382b3b1
ILT
285i[345]86-*-os9k) gdb_target=i386os9k ;;
286i[345]86-*-go32*) gdb_target=i386aout ;;
287i[345]86-*-lynxos*) gdb_target=i386lynx
5436fc65 288 configdirs="${configdirs} gdbserver" ;;
7382b3b1
ILT
289i[345]86-*-solaris*) gdb_target=i386sol2 ;;
290i[345]86-*-sunos*) gdb_target=sun386 ;;
291i[345]86-*-sysv4*) gdb_target=i386v4 ;;
292i[345]86-*-sco*) gdb_target=i386v ;;
293i[345]86-*-sysv*) gdb_target=i386v ;;
294i[345]86-*-linux*) gdb_target=linux ;;
295i[345]86-*-isc*) gdb_target=i386v ;;
296i[345]86-*-mach3*) gdb_target=i386m3 ;;
297i[345]86-*-mach*) gdb_target=i386mach ;;
298i[345]86-*-netware*) gdb_target=i386nw
5436fc65 299 configdirs="${configdirs} nlm" ;;
7382b3b1 300i[345]86-*-osf1mk*) gdb_target=i386mk ;;
ef131e13 301
3b891e0b
JK
302i960-*-bout*) gdb_target=vxworks960 ;;
303i960-*-coff*) gdb_target=nindy960 ;;
304i960-*-elf*) gdb_target=nindy960 ;;
ebb3a1e5 305
3b891e0b
JK
306i960-*-nindy*) gdb_target=nindy960 ;;
307i960-*-vxworks*) gdb_target=vxworks960 ;;
ef131e13 308
ebb3a1e5
JG
309m68000-*-sunos3*) gdb_target=sun2os3 ;;
310m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 311
835fe6e6 312m68*-apollo*-bsd*) gdb_target=apollo68b ;;
6ec7e4d3 313m68*-bull-sysv*) gdb_target=dpx2 ;;
6ec7e4d3
SS
314m68*-hp-bsd*) gdb_target=hp300bsd ;;
315m68*-hp-hpux*) gdb_target=hp300hpux ;;
670a8e09
SS
316m68*-altos-*) gdb_target=altos ;;
317m68*-att-*) gdb_target=3b1 ;;
318m68*-cisco*-*) gdb_target=cisco ;;
319m68*-ericsson-*) gdb_target=es1800 ;;
358ca35e 320m68*-isi-*) gdb_target=isi ;;
c649a7c2 321m68*-motorola-*) gdb_target=delta68 ;;
358ca35e
JG
322m68*-netx-*) gdb_target=vxworks68 ;;
323m68*-sony-*) gdb_target=news ;;
324m68*-tandem-*) gdb_target=st2000 ;;
c1128340
RS
325m68*-rom68k-*) gdb_target=monitor ;;
326m68*-*bug-*) gdb_target=monitor ;;
327m68*-monitor-*) gdb_target=monitor ;;
a25a9f49 328m68*-est-*) gdb_target=est ;;
0ffba029
RS
329m68*-*-aout*) gdb_target=monitor ;;
330m68*-*-coff*) gdb_target=monitor ;;
331m68*-*-elf*) gdb_target=monitor ;;
9bebe500 332m68*-*-lynxos*) gdb_target=m68klynx
5436fc65 333 configdirs="${configdirs} gdbserver" ;;
3b891e0b 334m68*-*-os68k*) gdb_target=os68k ;;
358ca35e
JG
335m68*-*-sunos3*) gdb_target=sun3os3 ;;
336m68*-*-sunos4*) gdb_target=sun3os4 ;;
670a8e09 337m68*-*-sysv4*) gdb_target=m68kv4 ;;
358ca35e 338m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13 339
670a8e09 340m88*-harris-cxux*) gdb_target=cxux ;;
f9440640 341m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
6ec7e4d3 342m88*-*-mach3*) gdb_target=mach3 ;;
304977ab
JK
343m88*-motorola-*) gdb_target=delta88 ;;
344m88*-*-*) gdb_target=m88k ;;
ef131e13 345
70126bf9 346mips64*-big-*) gdb_target=bigmips64 ;;
b60f6584 347mips*-big-*) gdb_target=bigmips ;;
6ec7e4d3 348mips*-dec-mach3*) gdb_target=mach3 ;;
b60f6584 349mips*-dec-*) gdb_target=decstation ;;
70126bf9
KH
350mips64*el-*-ecoff*) gdb_target=idtl64 ;;
351mips64*-idt-ecoff*) gdb_target=idt64 ;;
352mips64*el-*-elf*) gdb_target=idtl64 ;;
353mips64*-*-elf*) gdb_target=idt64 ;;
b60f6584 354mips*el-*-ecoff*) gdb_target=idtl ;;
2e1b3b03 355mips*-*-ecoff*) gdb_target=idt ;;
b60f6584
ILT
356mips*el-*-elf*) gdb_target=idtl ;;
357mips*-*-elf*) gdb_target=idt ;;
358mips*-little-*) gdb_target=littlemips ;;
359mips*-sgi-irix5*) gdb_target=irix5 ;;
360mips*-sgi-*) gdb_target=irix3 ;;
361mips*-sony-*) gdb_target=bigmips ;;
6ec7e4d3 362mips*-*-mach3*) gdb_target=mach3 ;;
2fe3b329 363mips*-*-sysv4*) gdb_target=mipsv4 ;;
b60f6584
ILT
364mips*-*-sysv*) gdb_target=bigmips ;;
365mips*-*-riscos*) gdb_target=bigmips ;;
ef131e13
JG
366
367none-*-*) gdb_target=none ;;
368
369np1-*-*) gdb_target=np1 ;;
370
6ec7e4d3 371ns32k-*-mach3*) gdb_target=mach3 ;;
84f652b1 372ns32k-*-netbsd*) gdb_target=nbsd ;;
3b891e0b 373ns32k-utek-sysv*) gdb_target=merlin ;;
ef131e13
JG
374ns32k-utek-*) gdb_target=umax ;;
375
376pn-*-*) gdb_target=pn ;;
b7da2494
SG
377powerpc-*-netware*) gdb_target=ppc-nw
378 configdirs="${configdirs} nlm" ;;
ef131e13 379
97544048
MM
380powerpc-*-eabi*) gdb_target=ppc-eabi
381 configdirs="${configdirs}" ;;
382
c7b44b04
MM
383powerpcle-*-eabi*) gdb_target=ppcle-eabi
384 configdirs="${configdirs}" ;;
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.209793 seconds and 4 git commands to generate.