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