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