* configure.in (case host): Add i386sco5 host.
[deliverable/binutils-gdb.git] / gdb / configure.in
1 dnl Autoconf configure script for GDB, the GNU debugger.
2 dnl Copyright 1995, 1996 Free Software Foundation, Inc.
3 dnl
4 dnl This file is part of GDB.
5 dnl
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2 of the License, or
9 dnl (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 dnl Process this file with autoconf to produce a configure script.
21
22 AC_PREREQ(2.3)dnl
23 AC_INIT(main.c)
24 AC_CONFIG_HEADER(config.h:config.in)
25
26 AC_PROG_CC
27 AC_AIX
28 AC_MINIX
29 AC_ISC_POSIX
30
31 AC_PROG_INSTALL
32 AC_PROG_RANLIB
33 AC_PROG_YACC
34
35 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
36 AC_CANONICAL_SYSTEM
37 AC_ARG_PROGRAM
38
39 AC_HEADER_STDC
40 AC_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)
41 AC_HEADER_STAT
42
43 AC_CHECK_FUNCS(setpgid)
44
45 AC_MSG_CHECKING([for gregset_t type])
46 AC_CACHE_VAL(gdb_cv_have_gregset_t,
47 [AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
48 gdb_cv_have_gregset_t=yes, gdb_cv_have_gregset_t=no)])
49 AC_MSG_RESULT($gdb_cv_have_gregset_t)
50 if test $gdb_cv_have_gregset_t = yes; then
51 AC_DEFINE(HAVE_GREGSET_T)
52 fi
53
54 AC_MSG_CHECKING([for fpregset_t type])
55 AC_CACHE_VAL(gdb_cv_have_fpregset_t,
56 [AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
57 gdb_cv_have_fpregset_t=yes, gdb_cv_have_fpregset_t=no)])
58 AC_MSG_RESULT($gdb_cv_have_fpregset_t)
59 if test $gdb_cv_have_fpregset_t = yes; then
60 AC_DEFINE(HAVE_FPREGSET_T)
61 fi
62
63 dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
64 dnl because autoconf complains about cross-compilation issues. However, this
65 dnl code uses the same variables as the macro for compatibility.
66
67 AC_MSG_CHECKING(for long double support in compiler)
68 AC_CACHE_VAL(ac_cv_c_long_double,
69 [AC_TRY_COMPILE(, [long double foo;],
70 ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
71 AC_MSG_RESULT($ac_cv_c_long_double)
72 if test $ac_cv_c_long_double = yes; then
73 AC_DEFINE(HAVE_LONG_DOUBLE)
74 fi
75
76 dnl See if the compiler and runtime support printing long doubles
77
78 AC_MSG_CHECKING(for long double support in printf)
79 AC_CACHE_VAL(gdb_cv_printf_has_long_double,
80 [AC_TRY_RUN([
81 int main () {
82 char buf[16];
83 long double f = 3.141592653;
84 sprintf (buf, "%Lg", f);
85 return (strncmp ("3.14159", buf, 7));
86 }],
87 gdb_cv_printf_has_long_double=yes,
88 gdb_cv_printf_has_long_double=no,
89 gdb_cv_printf_has_long_double=no)])
90 if test $gdb_cv_printf_has_long_double = yes; then
91 AC_DEFINE(PRINTF_HAS_LONG_DOUBLE)
92 fi
93 AC_MSG_RESULT($gdb_cv_printf_has_long_double)
94
95 AC_FUNC_MMAP
96
97 dnl Handle optional features that can be enabled.
98 ENABLE_CFLAGS=
99 ENABLE_CLIBS=
100 ENABLE_OBS=
101
102 AC_ARG_ENABLE(netrom,
103 [ --enable-netrom ],
104 [case "${enableval}" in
105 yes) enable_netrom=yes ;;
106 no) enable_netrom=no ;;
107 *) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
108 esac])
109
110 if test "${enable_netrom}" = "yes"; then
111 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
112 fi
113
114 # start-sanitize-gm
115 ENABLE_GM=
116
117 AC_ARG_ENABLE(gm,
118 [ --enable-gm ],
119 [case "${enableval}" in
120 yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
121 ENABLE_CFLAGS=-DGENERAL_MAGIC
122 ;;
123 no) ;;
124 *) AC_MSG_ERROR(bad value ${enableval} given for gm option) ;;
125 esac])
126
127 # end-sanitize-gm
128
129 AC_ARG_ENABLE(sim-powerpc,
130 [ --enable-sim-powerpc ],
131 [case "${enableval}" in
132 yes) powerpc_sim=yes ;;
133 no) powerpc_sim=no ;;
134 *) AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;;
135 esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi])
136
137 # start-sanitize-gdbtk
138 ENABLE_GDBTK=
139
140 AC_ARG_ENABLE(gdbtk,
141 [ --enable-gdbtk ],
142 [case "${enableval}" in
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) ;;
155 esac],
156 [
157 # Default is on for everything but go32
158 case "$host" in
159 *go32*)
160 ;;
161 *)
162 enable_gdbtk=yes ;;
163 esac
164 ])
165
166 if test "${enable_gdbtk}" = "yes"; then
167
168 AC_PATH_X
169 AC_PATH_XTRA
170
171 CY_AC_PATH_TCL
172 CY_AC_PATH_TK
173
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
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 #
203 sparc*-sun-solaris2*)
204 if test "x$GCC" = "xyes";
205 then
206 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
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"
240 fi
241
242 AC_SUBST(ENABLE_GDBTK)
243 AC_SUBST(X_CFLAGS)
244 AC_SUBST(X_LDFLAGS)
245 AC_SUBST(X_LIBS)
246 # end-sanitize-gdbtk
247
248 AC_SUBST(ENABLE_CFLAGS)
249 AC_SUBST(ENABLE_CLIBS)
250 AC_SUBST(ENABLE_OBS)
251
252 # target_subdir is used by the testsuite to find the target libraries.
253 target_subdir=
254 if test "${host}" != "${target}"; then
255 target_subdir="${target_alias}/"
256 fi
257 AC_SUBST(target_subdir)
258
259 configdirs="doc testsuite"
260
261 dnl
262 changequote(,)dnl
263
264 # Map host cpu into the config cpu subdirectory name.
265 # The default is $host_cpu.
266
267 case "${host_cpu}" in
268
269 c[12]) gdb_host_cpu=convex ;;
270 hppa*) gdb_host_cpu=pa ;;
271 i[3456]86) gdb_host_cpu=i386 ;;
272 m68*) gdb_host_cpu=m68k ;;
273 m88*) gdb_host_cpu=m88k ;;
274 np1) gdb_host_cpu=gould ;;
275 pyramid) gdb_host_cpu=pyr ;;
276 powerpc*) gdb_host_cpu=powerpc ;;
277 sparc64) gdb_host_cpu=sparc ;;
278 *) gdb_host_cpu=$host_cpu ;;
279
280 esac
281
282 # map host info into gdb names.
283
284 case "${host}" in
285
286 a29k-*-*) gdb_host=ultra3 ;;
287
288 alpha-*-osf1*) gdb_host=alpha-osf1 ;;
289 alpha-*-osf2*) gdb_host=alpha-osf2 ;;
290 alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
291
292 arm-*-*) gdb_host=arm ;;
293
294 c[12]-*-*) gdb_host=convex ;;
295
296 hppa*-*-bsd*) gdb_host=hppabsd ;;
297 hppa*-*-hiux*) gdb_host=hppahpux ;;
298 hppa*-*-hpux*) gdb_host=hppahpux ;;
299 hppa*-*-osf*) gdb_host=hppaosf ;;
300
301 i[3456]86-ncr-*) gdb_host=ncr3000 ;;
302 i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
303 i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
304 i[3456]86-sequent-sysv*) gdb_host=ptx ;;
305 i[3456]86-*-aix*) gdb_host=i386aix ;;
306 i[3456]86-*-bsd*) gdb_host=i386bsd ;;
307 i[3456]86-*-dgux*) gdb_host=i386dgux ;;
308 i[3456]86-*-freebsd*) gdb_host=fbsd ;;
309 i[3456]86-*-netbsd*) gdb_host=nbsd ;;
310 i[3456]86-*-go32*) gdb_host=go32 ;;
311 i[3456]86-*-linux*) gdb_host=linux ;;
312 i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
313 i[3456]86-*-mach3*) gdb_host=i386m3 ;;
314 i[3456]86-*-mach*) gdb_host=i386mach ;;
315 i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
316 i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
317 i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
318 i[3456]86-*-sco*) gdb_host=i386sco ;;
319 i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
320 i[3456]86-*-sunos*) gdb_host=sun386 ;;
321 i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
322 i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
323 i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
324 i[3456]86-*-unixware) gdb_host=i386v4 ;;
325 i[3456]86-*-sysv*) gdb_host=i386v ;;
326 i[3456]86-*-isc*) gdb_host=i386v32 ;;
327 i[3456]86-*-os9k) gdb_host=i386os9k ;;
328 i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
329 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
330 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
331 m68030-sony-*) gdb_host=news1000 ;;
332
333 m68*-altos-*) gdb_host=altos ;;
334 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
335 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
336 m68*-att-*) gdb_host=3b1 ;;
337 m68*-bull*-sysv*) gdb_host=dpx2 ;;
338 m68*-hp-bsd*) gdb_host=hp300bsd ;;
339 m68*-hp-hpux*) gdb_host=hp300hpux ;;
340 m68*-isi-*) gdb_host=isi ;;
341 m68*-*-lynxos*) gdb_host=m68klynx ;;
342 m68*-*-netbsd*) gdb_host=nbsd ;;
343 m68*-*-sysv4*) gdb_host=m68kv4 ;;
344 m68*-motorola-*) gdb_host=delta68 ;;
345 m68*-sony-*) gdb_host=news ;;
346 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
347 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
348 m68*-sun-*) gdb_host=sun3os4 ;;
349
350 m88*-harris-cxux*) gdb_host=cxux ;;
351 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
352 m88*-motorola-sysv*) gdb_host=delta88 ;;
353 m88*-*-mach3*) gdb_host=mach3 ;;
354 m88*-*-*) gdb_host=m88k ;;
355
356 mips-dec-mach3*) gdb_host=mach3 ;;
357 mips-dec-*) gdb_host=decstation ;;
358 mips-little-*) gdb_host=littlemips ;;
359 mips-sgi-irix3*) gdb_host=irix3 ;;
360 mips-sgi-irix4*) gdb_host=irix4 ;;
361 mips-sgi-irix5*) gdb_host=irix5 ;;
362 mips-sony-*) gdb_host=news-mips ;;
363 mips-*-mach3*) gdb_host=mach3 ;;
364 mips-*-sysv4*) gdb_host=mipsv4 ;;
365 mips-*-sysv*) gdb_host=riscos ;;
366 mips-*-riscos*) gdb_host=riscos ;;
367
368 none-*-*) gdb_host=none ;;
369
370 np1-*-*) gdb_host=np1 ;;
371
372 ns32k-*-mach3*) gdb_host=mach3 ;;
373 ns32k-*-netbsd*) gdb_host=nbsd ;;
374 ns32k-umax-*) gdb_host=umax ;;
375 ns32k-utek-sysv*) gdb_host=merlin ;;
376
377 powerpc-*-aix*) gdb_host=aix ;;
378 powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
379 pn-*-*) gdb_host=pn ;;
380
381 pyramid-*-*) gdb_host=pyramid ;;
382
383 romp-*-*) gdb_host=rtbsd ;;
384
385 rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
386 rs6000-*-aix4*) gdb_host=aix4 ;;
387 rs6000-*-*) gdb_host=rs6000 ;;
388
389 sparc-*-lynxos*) gdb_host=sparclynx ;;
390 sparc-*-netbsd*) gdb_host=nbsd ;;
391 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
392 sparc-*-sunos4*) gdb_host=sun4os4 ;;
393 sparc-*-sunos5*) gdb_host=sun4sol2 ;;
394 sparc-*-*) gdb_host=sun4os4 ;;
395 sparc64-*-*) gdb_host=sun4sol2 ;;
396
397 tahoe-*-*) gdb_host=tahoe ;;
398
399 vax-*-bsd*) gdb_host=vaxbsd ;;
400 vax-*-ultrix2*) gdb_host=vaxult2 ;;
401 vax-*-ultrix*) gdb_host=vaxult ;;
402
403 w65-*-*) gdb_host=w65 ;;
404
405 esac
406
407
408 # Map target cpu into the config cpu subdirectory name.
409 # The default is $target_cpu.
410
411 case "${target_cpu}" in
412
413 alpha) gdb_target_cpu=alpha ;;
414 c[12]) gdb_target_cpu=convex ;;
415 hppa*) gdb_target_cpu=pa ;;
416 i[3456]86) gdb_target_cpu=i386 ;;
417 m68*) gdb_target_cpu=m68k ;;
418 m88*) gdb_target_cpu=m88k ;;
419 mips*) gdb_target_cpu=mips ;;
420 np1) gdb_target_cpu=gould ;;
421 powerpc*) gdb_target_cpu=powerpc ;;
422 pn) gdb_target_cpu=gould ;;
423 pyramid) gdb_target_cpu=pyr ;;
424 sparc*) gdb_target_cpu=sparc ;;
425 *) gdb_target_cpu=$target_cpu ;;
426
427 esac
428
429 # map target info into gdb names.
430
431 case "${target}" in
432
433 a29k-*-aout*) gdb_target=a29k ;;
434 a29k-*-coff*) gdb_target=a29k ;;
435 a29k-*-elf*) gdb_target=a29k ;;
436 a29k-*-ebmon*) gdb_target=a29k ;;
437 a29k-*-kern*) gdb_target=a29k-kern ;;
438 a29k-*-none*) gdb_target=a29k ;;
439 a29k-*-sym1*) gdb_target=ultra3 ;;
440 a29k-*-udi*) gdb_target=a29k-udi ;;
441 a29k-*-vxworks*) gdb_target=vx29k ;;
442
443 alpha-*-osf*) gdb_target=alpha-osf1 ;;
444
445 # start-sanitize-arc
446 arc-*-*) gdb_target=arc ;;
447 # end-sanitize-arc
448
449 arm-*-*) gdb_target=arm ;;
450
451 c1-*-*) gdb_target=convex ;;
452 c2-*-*) gdb_target=convex ;;
453
454 h8300-*-*) gdb_target=h8300 ;;
455 h8500-*-*) gdb_target=h8500 ;;
456
457 sh-*-*) gdb_target=sh ;;
458
459 # start-sanitize-r16
460 r16-*-*) gdb_target=r16 ;;
461 # end-sanitize-r16
462
463 hppa*-*-bsd*) gdb_target=hppabsd ;;
464 hppa*-*-pro*) gdb_target=hppapro ;;
465 hppa*-*-hpux*) gdb_target=hppahpux ;;
466 hppa*-*-hiux*) gdb_target=hppahpux ;;
467 hppa*-*-osf*) gdb_target=hppaosf ;;
468
469 i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
470 i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
471 i[3456]86-sequent-sysv*) gdb_target=ptx ;;
472 i[3456]86-ncr-*) gdb_target=ncr3000 ;;
473 i[3456]86-*-aout*) gdb_target=i386aout ;;
474 i[3456]86-*-coff*) gdb_target=i386v ;;
475 i[3456]86-*-elf*) gdb_target=i386v ;;
476 i[3456]86-*-aix*) gdb_target=i386aix ;;
477 i[3456]86-*-bsd*) gdb_target=i386bsd ;;
478 i[3456]86-*-freebsd*) gdb_target=fbsd ;;
479 i[3456]86-*-netbsd*) gdb_target=nbsd ;;
480 i[3456]86-*-os9k) gdb_target=i386os9k ;;
481 i[3456]86-*-go32*) gdb_target=i386aout ;;
482 i[3456]86-*-lynxos*) gdb_target=i386lynx
483 configdirs="${configdirs} gdbserver" ;;
484 i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
485 i[3456]86-*-sunos*) gdb_target=sun386 ;;
486 i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
487 i[3456]86-*-sco*) gdb_target=i386v ;;
488 i[3456]86-*-sysv*) gdb_target=i386v ;;
489 i[3456]86-*-linux*) gdb_target=linux
490 configdirs="${configdirs} gdbserver" ;;
491 i[3456]86-*-isc*) gdb_target=i386v ;;
492 i[3456]86-*-mach3*) gdb_target=i386m3 ;;
493 i[3456]86-*-mach*) gdb_target=i386mach ;;
494 i[3456]86-*-netware*) gdb_target=i386nw
495 configdirs="${configdirs} nlm" ;;
496 i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
497 i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
498 i960-*-bout*) gdb_target=vxworks960 ;;
499 i960-nindy-coff*) gdb_target=nindy960 ;;
500 i960-*-coff*) gdb_target=mon960 ;;
501 i960-nindy-elf*) gdb_target=nindy960 ;;
502 i960-*-elf*) gdb_target=mon960 ;;
503
504 i960-*-nindy*) gdb_target=nindy960 ;;
505 i960-*-vxworks*) gdb_target=vxworks960 ;;
506
507 m68000-*-sunos3*) gdb_target=sun2os3 ;;
508 m68000-*-sunos4*) gdb_target=sun2os4 ;;
509
510 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
511 m68*-bull-sysv*) gdb_target=dpx2 ;;
512 m68*-hp-bsd*) gdb_target=hp300bsd ;;
513 m68*-hp-hpux*) gdb_target=hp300hpux ;;
514 m68*-altos-*) gdb_target=altos ;;
515 m68*-att-*) gdb_target=3b1 ;;
516 m68*-cisco*-*) gdb_target=cisco ;;
517 m68*-ericsson-*) gdb_target=es1800 ;;
518 m68*-isi-*) gdb_target=isi ;;
519 m68*-motorola-*) gdb_target=delta68 ;;
520 m68*-netx-*) gdb_target=vxworks68 ;;
521 m68*-sony-*) gdb_target=news ;;
522 m68*-tandem-*) gdb_target=st2000 ;;
523 m68*-rom68k-*) gdb_target=monitor ;;
524 m68*-*bug-*) gdb_target=monitor ;;
525 m68*-monitor-*) gdb_target=monitor ;;
526 m68*-est-*) gdb_target=monitor ;;
527 m68*-*-aout*) gdb_target=monitor ;;
528 m68*-*-coff*) gdb_target=monitor ;;
529 m68*-*-elf*) gdb_target=monitor ;;
530 m68*-*-lynxos*) gdb_target=m68klynx
531 configdirs="${configdirs} gdbserver" ;;
532 m68*-*-netbsd*) gdb_target=nbsd ;;
533 m68*-*-os68k*) gdb_target=os68k ;;
534 m68*-*-sunos3*) gdb_target=sun3os3 ;;
535 m68*-*-sunos4*) gdb_target=sun3os4 ;;
536 m68*-*-sysv4*) gdb_target=m68kv4 ;;
537 m68*-*-vxworks*) gdb_target=vxworks68 ;;
538
539 m88*-harris-cxux*) gdb_target=cxux ;;
540 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
541 m88*-*-mach3*) gdb_target=mach3 ;;
542 m88*-motorola-*) gdb_target=delta88 ;;
543 m88*-*-*) gdb_target=m88k ;;
544
545 mips64*-big-*) gdb_target=bigmips64 ;;
546 mips*-big-*) gdb_target=bigmips ;;
547 mips*-dec-mach3*) gdb_target=mach3 ;;
548 mips*-dec-*) gdb_target=decstation ;;
549 mips64*el-*-ecoff*) gdb_target=embedl64 ;;
550 mips64*-*-ecoff*) gdb_target=embed64 ;;
551 mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
552 mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
553 mips64*el-*-elf*) gdb_target=embedl64 ;;
554 mips64*-*-elf*) gdb_target=embed64 ;;
555 mips*el-*-ecoff*) gdb_target=embedl ;;
556 mips*-*-ecoff*) gdb_target=embed ;;
557 # start-sanitize-gm
558 mips*-*-magic*) gdb_target=embed ;;
559 # end-sanitize-gm
560 mips*el-*-elf*) gdb_target=embedl ;;
561 mips*-*-elf*) gdb_target=embed ;;
562 mips*-little-*) gdb_target=littlemips ;;
563 mips*-sgi-irix5*) gdb_target=irix5 ;;
564 mips*-sgi-*) gdb_target=irix3 ;;
565 mips*-sony-*) gdb_target=bigmips ;;
566 mips*-*-mach3*) gdb_target=mach3 ;;
567 mips*-*-sysv4*) gdb_target=mipsv4 ;;
568 mips*-*-sysv*) gdb_target=bigmips ;;
569 mips*-*-riscos*) gdb_target=bigmips ;;
570 mips*-*-vxworks*) gdb_target=vxmips ;;
571
572 none-*-*) gdb_target=none ;;
573
574 np1-*-*) gdb_target=np1 ;;
575
576 ns32k-*-mach3*) gdb_target=mach3 ;;
577 ns32k-*-netbsd*) gdb_target=nbsd ;;
578 ns32k-utek-sysv*) gdb_target=merlin ;;
579 ns32k-utek-*) gdb_target=umax ;;
580
581 pn-*-*) gdb_target=pn ;;
582 powerpc-*-macos*) gdb_target=macos ;;
583 powerpc-*-netware*) gdb_target=ppc-nw
584 configdirs="${configdirs} nlm" ;;
585
586 powerpc-*-aix4*) gdb_target=aix4 ;;
587 powerpc-*-aix*) gdb_target=aix ;;
588 powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
589 powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
590 gdb_target=ppc-sim
591 else
592 gdb_target=ppc-eabi
593 fi ;;
594 powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
595 gdb_target=ppcle-sim
596 else
597 gdb_target=ppcle-eabi
598 fi ;;
599
600 pyramid-*-*) gdb_target=pyramid ;;
601
602 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
603 rs6000-*-aix4*) gdb_target=aix4 ;;
604 rs6000-*-*) gdb_target=rs6000 ;;
605
606 sparc-*-aout*) gdb_target=sparc-em ;;
607 sparc-*-coff*) gdb_target=sparc-em ;;
608 sparc-*-elf*) gdb_target=sparc-em ;;
609 sparc-*-lynxos*) gdb_target=sparclynx
610 configdirs="${configdirs} gdbserver" ;;
611 sparc-*-netbsd*) gdb_target=nbsd ;;
612 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
613 sparc-*-sunos4*) gdb_target=sun4os4 ;;
614 sparc-*-sunos5*) gdb_target=sun4sol2 ;;
615 sparc-*-vxworks*) gdb_target=vxsparc ;;
616 sparc-*-*) gdb_target=sun4os4 ;;
617 # Use sparc-em for sparclet for now.
618 sparclet-*-*) gdb_target=sparc-em ;;
619 sparclite*-*-*) gdb_target=sparclite ;;
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 ;;
626 sparc64-*-*) gdb_target=sp64 ;;
627
628 tahoe-*-*) gdb_target=tahoe ;;
629
630 vax-*-*) gdb_target=vax ;;
631
632 w65-*-*) gdb_target=w65 ;;
633
634 z8k-*-coff*) gdb_target=z8k ;;
635
636 esac
637
638 dnl
639 changequote([,])dnl
640
641 frags=
642 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
643 if test ! -f ${host_makefile_frag}; then
644 AC_MSG_ERROR("*** Gdb does not support host ${host}")
645 fi
646 frags="$frags $host_makefile_frag"
647
648 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
649 if test ! -f ${target_makefile_frag}; then
650 AC_MSG_ERROR("*** Gdb does not support target ${target}")
651 fi
652 frags="$frags $target_makefile_frag"
653
654 AC_SUBST_FILE(host_makefile_frag)
655 AC_SUBST_FILE(target_makefile_frag)
656 AC_SUBST(frags)
657
658 changequote(,)dnl
659 hostfile=`sed -n '
660 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
661 ' ${host_makefile_frag}`
662
663 targetfile=`sed -n '
664 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
665 ' ${target_makefile_frag}`
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
670 if test "${target}" = "${host}"; then
671 nativefile=`sed -n '
672 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
673 ' ${host_makefile_frag}`
674 else
675 # GDBserver is only useful in a "native" enviroment
676 configdirs=`echo $configdirs | sed 's/gdbserver//'`
677 fi
678 changequote([,])
679
680 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
681 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
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
686 files=
687 links=
688 rm -f xm.h
689 if test "${hostfile}" != ""; then
690 files="${files} config/${gdb_host_cpu}/${hostfile}"
691 links="${links} xm.h"
692 fi
693 rm -f tm.h
694 if test "${targetfile}" != ""; then
695 files="${files} config/${gdb_target_cpu}/${targetfile}"
696 links="${links} tm.h"
697 fi
698 rm -f nm.h
699 if test "${nativefile}" != ""; then
700 files="${files} config/${gdb_host_cpu}/${nativefile}"
701 links="${links} nm.h"
702 else
703 # A cross-only configuration.
704 files="${files} config/nm-empty.h"
705 links="${links} nm.h"
706 fi
707 # start-sanitize-gdbtk
708
709 # Make it possible to use the GUI without doing a full install
710 if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
711 files="${files} gdbtk.tcl"
712 links="${links} gdbtk.tcl"
713 fi
714 # end-sanitize-gdbtk
715
716 AC_LINK_FILES($files, $links)
717
718 AC_CONFIG_SUBDIRS($configdirs)
719 AC_OUTPUT(Makefile,
720 [
721 dnl Autoconf doesn't provide a mechanism for modifying definitions
722 dnl provided by makefile fragments.
723 dnl
724 if test "${nativefile}" = ""; then
725 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
726 < Makefile > Makefile.tem
727 mv -f Makefile.tem Makefile
728 fi
729
730 changequote(,)dnl
731 sed -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
734 mv -f Makefile.tmp Makefile
735 changequote([,])dnl
736
737 case ${srcdir} in
738 .)
739 ;;
740 *)
741 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
742 echo "source ${srcdir}/.gdbinit" >> .gdbinit
743 esac
744
745 case x$CONFIG_HEADERS in
746 xconfig.h:config.in)
747 echo > stamp-h ;;
748 esac
749 ],
750 [
751 gdb_host_cpu=$gdb_host_cpu
752 gdb_target_cpu=$gdb_target_cpu
753 nativefile=$nativefile
754 ])
755
756 exit 0
757
This page took 0.046424 seconds and 5 git commands to generate.