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