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