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