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