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