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