Add DG/UX x86 host
[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 ;;
3222ff2e 171i[3456]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
3222ff2e
MM
200i[3456]86-ncr-*) gdb_host=ncr3000 ;;
201i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
202i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
203i[3456]86-sequent-sysv*) gdb_host=ptx ;;
204i[3456]86-*-aix*) gdb_host=i386aix ;;
205i[3456]86-*-bsd*) gdb_host=i386bsd ;;
206i[3456]86-*-dgux*) gdb_host=i386dgux ;;
207i[3456]86-*-freebsd*) gdb_host=fbsd ;;
208i[3456]86-*-netbsd*) gdb_host=nbsd ;;
209i[3456]86-*-go32*) gdb_host=go32 ;;
210i[3456]86-*-linux*) gdb_host=linux ;;
211i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
212i[3456]86-*-mach3*) gdb_host=i386m3 ;;
213i[3456]86-*-mach*) gdb_host=i386mach ;;
214i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
215i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
216i[3456]86-*-sco*) gdb_host=i386sco ;;
217i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
218i[3456]86-*-sunos*) gdb_host=sun386 ;;
219i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
220i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
221i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
222i[3456]86-*-unixware) gdb_host=i386v4 ;;
223i[3456]86-*-sysv*) gdb_host=i386v ;;
224i[3456]86-*-isc*) gdb_host=i386v32 ;;
225i[3456]86-*-os9k) gdb_host=i386os9k ;;
226i[3456]86-*-win32*) gdb_host=win32 ;;
358ca35e
JG
227m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
228m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
ef131e13 229m68030-sony-*) gdb_host=news1000 ;;
19758e9e 230
358ca35e
JG
231m68*-altos-*) gdb_host=altos ;;
232m68*-apollo*-sysv*) gdb_host=apollo68v ;;
233m68*-apollo*-bsd*) gdb_host=apollo68b ;;
234m68*-att-*) gdb_host=3b1 ;;
0a8f1742 235m68*-bull*-sysv*) gdb_host=dpx2 ;;
8f59e92b
FF
236m68*-hp-bsd*) gdb_host=hp300bsd ;;
237m68*-hp-hpux*) gdb_host=hp300hpux ;;
358ca35e 238m68*-isi-*) gdb_host=isi ;;
9bebe500 239m68*-*-lynxos*) gdb_host=m68klynx ;;
670a8e09 240m68*-*-sysv4*) gdb_host=m68kv4 ;;
c649a7c2 241m68*-motorola-*) gdb_host=delta68 ;;
358ca35e
JG
242m68*-sony-*) gdb_host=news ;;
243m68*-sun-sunos3*) gdb_host=sun3os3 ;;
244m68*-sun-sunos4*) gdb_host=sun3os4 ;;
245m68*-sun-*) gdb_host=sun3os4 ;;
19758e9e 246
670a8e09 247m88*-harris-cxux*) gdb_host=cxux ;;
304977ab
JK
248m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
249m88*-motorola-sysv*) gdb_host=delta88 ;;
6ec7e4d3 250m88*-*-mach3*) gdb_host=mach3 ;;
304977ab 251m88*-*-*) gdb_host=m88k ;;
19758e9e 252
6ec7e4d3 253mips-dec-mach3*) gdb_host=mach3 ;;
19758e9e
JG
254mips-dec-*) gdb_host=decstation ;;
255mips-little-*) gdb_host=littlemips ;;
3b891e0b 256mips-sgi-irix3*) gdb_host=irix3 ;;
81029114 257mips-sgi-irix4*) gdb_host=irix4 ;;
e03c0cc6 258mips-sgi-irix5*) gdb_host=irix5 ;;
b487ba2e 259mips-sony-*) gdb_host=news-mips ;;
6ec7e4d3 260mips-*-mach3*) gdb_host=mach3 ;;
2fe3b329 261mips-*-sysv4*) gdb_host=mipsv4 ;;
ee06f230 262mips-*-sysv*) gdb_host=riscos ;;
e8f8e093 263mips-*-riscos*) gdb_host=riscos ;;
19758e9e
JG
264
265none-*-*) gdb_host=none ;;
ef131e13 266
19758e9e
JG
267np1-*-*) gdb_host=np1 ;;
268
6ec7e4d3 269ns32k-*-mach3*) gdb_host=mach3 ;;
84f652b1 270ns32k-*-netbsd*) gdb_host=nbsd ;;
19758e9e 271ns32k-umax-*) gdb_host=umax ;;
3b891e0b 272ns32k-utek-sysv*) gdb_host=merlin ;;
19758e9e 273
fbc3f191
JL
274powerpc-*-aix*) gdb_host=aix ;;
275
19758e9e
JG
276pn-*-*) gdb_host=pn ;;
277
278pyramid-*-*) gdb_host=pyramid ;;
279
280romp-*-*) gdb_host=rtbsd ;;
281
d87d7b10 282rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
19758e9e
JG
283rs6000-*-*) gdb_host=rs6000 ;;
284
9bebe500 285sparc-*-lynxos*) gdb_host=sparclynx ;;
331d515a 286sparc-*-netbsd*) gdb_host=nbsd ;;
ef131e13 287sparc-*-solaris2*) gdb_host=sun4sol2 ;;
ebb3a1e5 288sparc-*-sunos4*) gdb_host=sun4os4 ;;
1e1dd175 289sparc-*-sunos5*) gdb_host=sun4sol2 ;;
b52373a2 290sparc-*-*) gdb_host=sun4os4 ;;
19758e9e
JG
291
292tahoe-*-*) gdb_host=tahoe ;;
293
294vax-*-bsd*) gdb_host=vaxbsd ;;
6985bc54 295vax-*-ultrix2*) gdb_host=vaxult2 ;;
19758e9e 296vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 297
d723ade7
SC
298w65-*-*) gdb_host=w65 ;;
299
6c815bbe
RP
300esac
301
8c7ae4a2 302
1a0edbc7
FF
303# Map target cpu into the config cpu subdirectory name.
304# The default is $target_cpu.
305
306case "${target_cpu}" in
307
cef4c2e7 308alpha) gdb_target_cpu=alpha ;;
1a0edbc7
FF
309c[12]) gdb_target_cpu=convex ;;
310hppa*) gdb_target_cpu=pa ;;
3222ff2e 311i[3456]86) gdb_target_cpu=i386 ;;
1a0edbc7 312m68*) gdb_target_cpu=m68k ;;
6ec7e4d3 313m88*) gdb_target_cpu=m88k ;;
b60f6584 314mips*) gdb_target_cpu=mips ;;
1a0edbc7 315np1) gdb_target_cpu=gould ;;
c7b44b04 316powerpc*) gdb_target_cpu=powerpc ;;
1a0edbc7
FF
317pn) gdb_target_cpu=gould ;;
318pyramid) gdb_target_cpu=pyr ;;
0c101d49 319sparc*) gdb_target_cpu=sparc ;;
1a0edbc7
FF
320*) gdb_target_cpu=$target_cpu ;;
321
322esac
323
324# map target info into gdb names.
325
ef131e13
JG
326case "${target}" in
327
3b891e0b
JK
328a29k-*-aout*) gdb_target=a29k ;;
329a29k-*-coff*) gdb_target=a29k ;;
330a29k-*-elf*) gdb_target=a29k ;;
331a29k-*-ebmon*) gdb_target=a29k ;;
332a29k-*-kern*) gdb_target=a29k-kern ;;
333a29k-*-none*) gdb_target=a29k ;;
334a29k-*-sym1*) gdb_target=ultra3 ;;
335a29k-*-udi*) gdb_target=a29k-udi ;;
83d9bb14 336a29k-*-vxworks*) gdb_target=vx29k ;;
ef131e13 337
cef4c2e7 338alpha-*-osf*) gdb_target=alpha-osf1 ;;
6ec7e4d3 339
c1ac88f9 340# start-sanitize-arc
83d9bb14 341arc-*-*) gdb_target=arc ;;
c1ac88f9
DE
342# end-sanitize-arc
343
ef131e13
JG
344arm-*-*) gdb_target=arm ;;
345
346c1-*-*) gdb_target=convex ;;
347c2-*-*) gdb_target=convex ;;
348
fb506180
SS
349h8300-*-*) gdb_target=h8300 ;;
350h8500-*-*) gdb_target=h8500 ;;
ef131e13 351
9faacb92
SC
352sh-*-*) gdb_target=sh ;;
353
03c4ce2f
MT
354# start-sanitize-r16
355r16-*-*) gdb_target=r16 ;;
356# end-sanitize-r16
357
8f59e92b 358hppa*-*-bsd*) gdb_target=hppabsd ;;
cc5702bd 359hppa*-*-pro*) gdb_target=hppapro ;;
8f59e92b 360hppa*-*-hpux*) gdb_target=hppahpux ;;
7079e766 361hppa*-*-hiux*) gdb_target=hppahpux ;;
6bfd168c 362hppa*-*-osf*) gdb_target=hppaosf ;;
ef131e13 363
3222ff2e
MM
364i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
365i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
366i[3456]86-sequent-sysv*) gdb_target=ptx ;;
367i[3456]86-ncr-*) gdb_target=ncr3000 ;;
368i[3456]86-*-aout*) gdb_target=i386aout ;;
369i[3456]86-*-coff*) gdb_target=i386v ;;
370i[3456]86-*-elf*) gdb_target=i386v ;;
371i[3456]86-*-aix*) gdb_target=i386aix ;;
372i[3456]86-*-bsd*) gdb_target=i386bsd ;;
373i[3456]86-*-freebsd*) gdb_target=fbsd ;;
374i[3456]86-*-netbsd*) gdb_target=nbsd ;;
375i[3456]86-*-os9k) gdb_target=i386os9k ;;
376i[3456]86-*-go32*) gdb_target=i386aout ;;
377i[3456]86-*-lynxos*) gdb_target=i386lynx
5436fc65 378 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
379i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
380i[3456]86-*-sunos*) gdb_target=sun386 ;;
381i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
382i[3456]86-*-sco*) gdb_target=i386v ;;
383i[3456]86-*-sysv*) gdb_target=i386v ;;
384i[3456]86-*-linux*) gdb_target=linux ;;
385i[3456]86-*-isc*) gdb_target=i386v ;;
386i[3456]86-*-mach3*) gdb_target=i386m3 ;;
387i[3456]86-*-mach*) gdb_target=i386mach ;;
388i[3456]86-*-netware*) gdb_target=i386nw
5436fc65 389 configdirs="${configdirs} nlm" ;;
3222ff2e
MM
390i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
391i[3456]86-*-win32) gdb_target=win32 ;;
ef131e13 392
3b891e0b
JK
393i960-*-bout*) gdb_target=vxworks960 ;;
394i960-*-coff*) gdb_target=nindy960 ;;
395i960-*-elf*) gdb_target=nindy960 ;;
ebb3a1e5 396
3b891e0b
JK
397i960-*-nindy*) gdb_target=nindy960 ;;
398i960-*-vxworks*) gdb_target=vxworks960 ;;
ef131e13 399
ebb3a1e5
JG
400m68000-*-sunos3*) gdb_target=sun2os3 ;;
401m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 402
835fe6e6 403m68*-apollo*-bsd*) gdb_target=apollo68b ;;
6ec7e4d3 404m68*-bull-sysv*) gdb_target=dpx2 ;;
6ec7e4d3
SS
405m68*-hp-bsd*) gdb_target=hp300bsd ;;
406m68*-hp-hpux*) gdb_target=hp300hpux ;;
670a8e09
SS
407m68*-altos-*) gdb_target=altos ;;
408m68*-att-*) gdb_target=3b1 ;;
409m68*-cisco*-*) gdb_target=cisco ;;
410m68*-ericsson-*) gdb_target=es1800 ;;
358ca35e 411m68*-isi-*) gdb_target=isi ;;
c649a7c2 412m68*-motorola-*) gdb_target=delta68 ;;
358ca35e
JG
413m68*-netx-*) gdb_target=vxworks68 ;;
414m68*-sony-*) gdb_target=news ;;
415m68*-tandem-*) gdb_target=st2000 ;;
c1128340
RS
416m68*-rom68k-*) gdb_target=monitor ;;
417m68*-*bug-*) gdb_target=monitor ;;
418m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 419m68*-est-*) gdb_target=monitor ;;
0ffba029
RS
420m68*-*-aout*) gdb_target=monitor ;;
421m68*-*-coff*) gdb_target=monitor ;;
422m68*-*-elf*) gdb_target=monitor ;;
9bebe500 423m68*-*-lynxos*) gdb_target=m68klynx
5436fc65 424 configdirs="${configdirs} gdbserver" ;;
3b891e0b 425m68*-*-os68k*) gdb_target=os68k ;;
358ca35e
JG
426m68*-*-sunos3*) gdb_target=sun3os3 ;;
427m68*-*-sunos4*) gdb_target=sun3os4 ;;
670a8e09 428m68*-*-sysv4*) gdb_target=m68kv4 ;;
358ca35e 429m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13 430
670a8e09 431m88*-harris-cxux*) gdb_target=cxux ;;
f9440640 432m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
6ec7e4d3 433m88*-*-mach3*) gdb_target=mach3 ;;
304977ab
JK
434m88*-motorola-*) gdb_target=delta88 ;;
435m88*-*-*) gdb_target=m88k ;;
ef131e13 436
70126bf9 437mips64*-big-*) gdb_target=bigmips64 ;;
b60f6584 438mips*-big-*) gdb_target=bigmips ;;
6ec7e4d3 439mips*-dec-mach3*) gdb_target=mach3 ;;
b60f6584 440mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
441mips64*el-*-ecoff*) gdb_target=embedl64 ;;
442mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
443mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
444mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
445mips64*el-*-elf*) gdb_target=embedl64 ;;
446mips64*-*-elf*) gdb_target=embed64 ;;
447mips*el-*-ecoff*) gdb_target=embedl ;;
448mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 449# start-sanitize-gm
7bb5e831 450mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 451# end-sanitize-gm
7bb5e831
RS
452mips*el-*-elf*) gdb_target=embedl ;;
453mips*-*-elf*) gdb_target=embed ;;
b60f6584
ILT
454mips*-little-*) gdb_target=littlemips ;;
455mips*-sgi-irix5*) gdb_target=irix5 ;;
456mips*-sgi-*) gdb_target=irix3 ;;
457mips*-sony-*) gdb_target=bigmips ;;
6ec7e4d3 458mips*-*-mach3*) gdb_target=mach3 ;;
2fe3b329 459mips*-*-sysv4*) gdb_target=mipsv4 ;;
b60f6584
ILT
460mips*-*-sysv*) gdb_target=bigmips ;;
461mips*-*-riscos*) gdb_target=bigmips ;;
ef131e13
JG
462
463none-*-*) gdb_target=none ;;
464
465np1-*-*) gdb_target=np1 ;;
466
6ec7e4d3 467ns32k-*-mach3*) gdb_target=mach3 ;;
84f652b1 468ns32k-*-netbsd*) gdb_target=nbsd ;;
3b891e0b 469ns32k-utek-sysv*) gdb_target=merlin ;;
ef131e13
JG
470ns32k-utek-*) gdb_target=umax ;;
471
472pn-*-*) gdb_target=pn ;;
c148ab3c 473powerpc-*-macos*) gdb_target=macos ;;
b7da2494
SG
474powerpc-*-netware*) gdb_target=ppc-nw
475 configdirs="${configdirs} nlm" ;;
ef131e13 476
65eaea27 477powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 478powerpc-*-aix*) gdb_target=aix ;;
3c0bf315
MM
479powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
480 gdb_target=ppc-sim
481 else
482 gdb_target=ppc-eabi
483 fi ;;
484powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
485 gdb_target=ppcle-sim
486 else
487 gdb_target=ppcle-eabi
488 fi ;;
c7b44b04 489
ef131e13
JG
490pyramid-*-*) gdb_target=pyramid ;;
491
d87d7b10 492rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 493rs6000-*-aix4*) gdb_target=aix4 ;;
ef131e13
JG
494rs6000-*-*) gdb_target=rs6000 ;;
495
3b891e0b
JK
496sparc-*-aout*) gdb_target=sparc-em ;;
497sparc-*-coff*) gdb_target=sparc-em ;;
498sparc-*-elf*) gdb_target=sparc-em ;;
9bebe500 499sparc-*-lynxos*) gdb_target=sparclynx
5436fc65 500 configdirs="${configdirs} gdbserver" ;;
331d515a 501sparc-*-netbsd*) gdb_target=nbsd ;;
ef131e13 502sparc-*-solaris2*) gdb_target=sun4sol2 ;;
ebb3a1e5 503sparc-*-sunos4*) gdb_target=sun4os4 ;;
1e1dd175 504sparc-*-sunos5*) gdb_target=sun4sol2 ;;
54d44c8c 505sparc-*-vxworks*) gdb_target=vxsparc ;;
b52373a2 506sparc-*-*) gdb_target=sun4os4 ;;
0c101d49 507sparclite*-*-*) gdb_target=sparclite ;;
6ec7e4d3 508sparc64-*-*) gdb_target=sp64 ;;
ef131e13
JG
509
510tahoe-*-*) gdb_target=tahoe ;;
6ec7e4d3 511
ef131e13 512vax-*-*) gdb_target=vax ;;
6c815bbe 513
d723ade7
SC
514w65-*-*) gdb_target=w65 ;;
515
fb506180 516z8k-*-coff*) gdb_target=z8k ;;
6ec7e4d3 517
6c815bbe
RP
518esac
519
5436fc65
C
520dnl
521changequote([,])dnl
522
5f107900 523frags=
5436fc65
C
524host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
525if test ! -f ${host_makefile_frag}; then
526AC_MSG_ERROR("*** Gdb does not support host ${host}")
912e0732 527fi
5f107900 528frags="$frags $host_makefile_frag"
912e0732 529
5436fc65
C
530target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
531if test ! -f ${target_makefile_frag}; then
532AC_MSG_ERROR("*** Gdb does not support target ${target}")
912e0732 533fi
5f107900 534frags="$frags $target_makefile_frag"
912e0732 535
5436fc65
C
536AC_SUBST_FILE(host_makefile_frag)
537AC_SUBST_FILE(target_makefile_frag)
5f107900 538AC_SUBST(frags)
5436fc65 539
094fd4ae
C
540changequote(,)dnl
541hostfile=`sed -n '
542s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
543' ${host_makefile_frag}`
5436fc65 544
094fd4ae
C
545targetfile=`sed -n '
546s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
547' ${target_makefile_frag}`
79f68f0f
DZ
548
549# these really aren't orthogonal true/false values of the same condition,
550# but shells are slow enough that I like to reuse the test conditions
551# whenever possible
5436fc65 552if test "${target}" = "${host}"; then
094fd4ae
C
553nativefile=`sed -n '
554s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
555' ${host_makefile_frag}`
79f68f0f 556else
5436fc65
C
557# GDBserver is only useful in a "native" enviroment
558configdirs=`echo $configdirs | sed 's/gdbserver//'`
d40309c7 559fi
094fd4ae 560changequote([,])
d40309c7 561
d40309c7 562# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
6573c898 563# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
d40309c7
JG
564# corresponding links. But we have to remove the xm.h files and tm.h
565# files anyway, e.g. when switching from "configure host" to
566# "configure none".
567
bdf3621b
JG
568files=
569links=
dc0c3f64 570rm -f xm.h
5436fc65
C
571if test "${hostfile}" != ""; then
572files="${files} config/${gdb_host_cpu}/${hostfile}"
573links="${links} xm.h"
bdf3621b 574fi
dc0c3f64 575rm -f tm.h
5436fc65
C
576if test "${targetfile}" != ""; then
577files="${files} config/${gdb_target_cpu}/${targetfile}"
578links="${links} tm.h"
bdf3621b 579fi
1a0edbc7 580rm -f nm.h
5436fc65
C
581if test "${nativefile}" != ""; then
582files="${files} config/${gdb_host_cpu}/${nativefile}"
583links="${links} nm.h"
c9c23412 584else
5436fc65
C
585# A cross-only configuration.
586files="${files} config/nm-empty.h"
587links="${links} nm.h"
d40309c7 588fi
d3d75ec9 589# start-sanitize-gdbtk
912e0732 590
5436fc65
C
591# Make it possible to use the GUI without doing a full install
592if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
593files="${files} gdbtk.tcl"
594links="${links} gdbtk.tcl"
754e5da2 595fi
d3d75ec9 596# end-sanitize-gdbtk
754e5da2 597
5436fc65
C
598AC_LINK_FILES($files, $links)
599
600AC_CONFIG_SUBDIRS($configdirs)
601AC_OUTPUT(Makefile,
602[
603dnl Autoconf doesn't provide a mechanism for modifying definitions
604dnl provided by makefile fragments.
605dnl
606if test "${nativefile}" = ""; then
607sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
608 < Makefile > Makefile.tem
609mv -f Makefile.tem Makefile
33bc979d
SS
610fi
611
5436fc65 612changequote(,)dnl
94d4b713
JK
613sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
614/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
615/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
616mv -f Makefile.tmp Makefile
5436fc65
C
617changequote([,])dnl
618
619case ${srcdir} in
620.)
621;;
622*)
623grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
624echo "source ${srcdir}/.gdbinit" >> .gdbinit
625esac
0a5a1821
C
626],
627[
628gdb_host_cpu=$gdb_host_cpu
629gdb_target_cpu=$gdb_target_cpu
630nativefile=$nativefile
5436fc65 631])
5e711e7f
PS
632
633exit 0
This page took 0.329981 seconds and 4 git commands to generate.