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