* config/m68k/{nbsd.mh,nbsd.mt,nm-nbsd.h,tm-nbsd.h,xm-nbsd.h},
[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
545 none-*-*) gdb_target=none ;;
546
547 np1-*-*) gdb_target=np1 ;;
548
549 ns32k-*-mach3*) gdb_target=mach3 ;;
550 ns32k-*-netbsd*) gdb_target=nbsd ;;
551 ns32k-utek-sysv*) gdb_target=merlin ;;
552 ns32k-utek-*) gdb_target=umax ;;
553
554 pn-*-*) gdb_target=pn ;;
555 powerpc-*-macos*) gdb_target=macos ;;
556 powerpc-*-netware*) gdb_target=ppc-nw
557 configdirs="${configdirs} nlm" ;;
558
559 powerpc-*-aix4*) gdb_target=aix4 ;;
560 powerpc-*-aix*) gdb_target=aix ;;
561 powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
562 powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
563 gdb_target=ppc-sim
564 else
565 gdb_target=ppc-eabi
566 fi ;;
567 powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
568 gdb_target=ppcle-sim
569 else
570 gdb_target=ppcle-eabi
571 fi ;;
572
573 pyramid-*-*) gdb_target=pyramid ;;
574
575 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
576 rs6000-*-aix4*) gdb_target=aix4 ;;
577 rs6000-*-*) gdb_target=rs6000 ;;
578
579 sparc-*-aout*) gdb_target=sparc-em ;;
580 sparc-*-coff*) gdb_target=sparc-em ;;
581 sparc-*-elf*) gdb_target=sparc-em ;;
582 sparc-*-lynxos*) gdb_target=sparclynx
583 configdirs="${configdirs} gdbserver" ;;
584 sparc-*-netbsd*) gdb_target=nbsd ;;
585 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
586 sparc-*-sunos4*) gdb_target=sun4os4 ;;
587 sparc-*-sunos5*) gdb_target=sun4sol2 ;;
588 sparc-*-vxworks*) gdb_target=vxsparc ;;
589 sparc-*-*) gdb_target=sun4os4 ;;
590 # Use sparc-em for sparclet for now.
591 sparclet-*-*) gdb_target=sparc-em ;;
592 sparclite*-*-*) gdb_target=sparclite ;;
593 sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
594 sparc64-*-*) gdb_target=sp64 ;;
595
596 tahoe-*-*) gdb_target=tahoe ;;
597
598 vax-*-*) gdb_target=vax ;;
599
600 w65-*-*) gdb_target=w65 ;;
601
602 z8k-*-coff*) gdb_target=z8k ;;
603
604 esac
605
606 dnl
607 changequote([,])dnl
608
609 frags=
610 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
611 if test ! -f ${host_makefile_frag}; then
612 AC_MSG_ERROR("*** Gdb does not support host ${host}")
613 fi
614 frags="$frags $host_makefile_frag"
615
616 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
617 if test ! -f ${target_makefile_frag}; then
618 AC_MSG_ERROR("*** Gdb does not support target ${target}")
619 fi
620 frags="$frags $target_makefile_frag"
621
622 AC_SUBST_FILE(host_makefile_frag)
623 AC_SUBST_FILE(target_makefile_frag)
624 AC_SUBST(frags)
625
626 changequote(,)dnl
627 hostfile=`sed -n '
628 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
629 ' ${host_makefile_frag}`
630
631 targetfile=`sed -n '
632 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
633 ' ${target_makefile_frag}`
634
635 # these really aren't orthogonal true/false values of the same condition,
636 # but shells are slow enough that I like to reuse the test conditions
637 # whenever possible
638 if test "${target}" = "${host}"; then
639 nativefile=`sed -n '
640 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
641 ' ${host_makefile_frag}`
642 else
643 # GDBserver is only useful in a "native" enviroment
644 configdirs=`echo $configdirs | sed 's/gdbserver//'`
645 fi
646 changequote([,])
647
648 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
649 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
650 # corresponding links. But we have to remove the xm.h files and tm.h
651 # files anyway, e.g. when switching from "configure host" to
652 # "configure none".
653
654 files=
655 links=
656 rm -f xm.h
657 if test "${hostfile}" != ""; then
658 files="${files} config/${gdb_host_cpu}/${hostfile}"
659 links="${links} xm.h"
660 fi
661 rm -f tm.h
662 if test "${targetfile}" != ""; then
663 files="${files} config/${gdb_target_cpu}/${targetfile}"
664 links="${links} tm.h"
665 fi
666 rm -f nm.h
667 if test "${nativefile}" != ""; then
668 files="${files} config/${gdb_host_cpu}/${nativefile}"
669 links="${links} nm.h"
670 else
671 # A cross-only configuration.
672 files="${files} config/nm-empty.h"
673 links="${links} nm.h"
674 fi
675 # start-sanitize-gdbtk
676
677 # Make it possible to use the GUI without doing a full install
678 if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
679 files="${files} gdbtk.tcl"
680 links="${links} gdbtk.tcl"
681 fi
682 # end-sanitize-gdbtk
683
684 AC_LINK_FILES($files, $links)
685
686 AC_CONFIG_SUBDIRS($configdirs)
687 AC_OUTPUT(Makefile,
688 [
689 dnl Autoconf doesn't provide a mechanism for modifying definitions
690 dnl provided by makefile fragments.
691 dnl
692 if test "${nativefile}" = ""; then
693 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
694 < Makefile > Makefile.tem
695 mv -f Makefile.tem Makefile
696 fi
697
698 changequote(,)dnl
699 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
700 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
701 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
702 mv -f Makefile.tmp Makefile
703 changequote([,])dnl
704
705 case ${srcdir} in
706 .)
707 ;;
708 *)
709 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
710 echo "source ${srcdir}/.gdbinit" >> .gdbinit
711 esac
712 ],
713 [
714 gdb_host_cpu=$gdb_host_cpu
715 gdb_target_cpu=$gdb_target_cpu
716 nativefile=$nativefile
717 ])
718
719 exit 0
720
This page took 0.062864 seconds and 5 git commands to generate.