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