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