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