Tweak to match output of autoconf 2.9 with same cygnus local patch as
[deliverable/binutils-gdb.git] / gdb / configure.in
... / ...
CommitLineData
1dnl Autoconf configure script for GDB, the GNU debugger.
2dnl Copyright 1995, 1996 Free Software Foundation, Inc.
3dnl
4dnl This file is part of GDB.
5dnl
6dnl This program is free software; you can redistribute it and/or modify
7dnl it under the terms of the GNU General Public License as published by
8dnl the Free Software Foundation; either version 2 of the License, or
9dnl (at your option) any later version.
10dnl
11dnl This program is distributed in the hope that it will be useful,
12dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14dnl GNU General Public License for more details.
15dnl
16dnl You should have received a copy of the GNU General Public License
17dnl along with this program; if not, write to the Free Software
18dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20dnl Process this file with autoconf to produce a configure script.
21
22AC_PREREQ(2.3)dnl
23AC_INIT(main.c)
24AC_CONFIG_HEADER(config.h:config.in)
25
26AC_PROG_CC
27AC_AIX
28AC_MINIX
29AC_ISC_POSIX
30
31AC_PROG_INSTALL
32AC_PROG_RANLIB
33AC_PROG_YACC
34
35AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
36AC_CANONICAL_SYSTEM
37AC_ARG_PROGRAM
38
39AC_HEADER_STDC
40AC_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)
41AC_HEADER_STAT
42
43AC_MSG_CHECKING([for gregset_t type])
44AC_CACHE_VAL(gdb_have_gregset_t,
45[AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
46gdb_have_gregset_t=yes, gdb_have_gregset_t=no)])
47AC_MSG_RESULT($gdb_have_gregset_t)
48if test $gdb_have_gregset_t = yes; then
49 AC_DEFINE(HAVE_GREGSET_T)
50fi
51
52AC_MSG_CHECKING([for fpregset_t type])
53AC_CACHE_VAL(gdb_have_fpregset_t,
54[AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
55gdb_have_fpregset_t=yes, gdb_have_fpregset_t=no)])
56AC_MSG_RESULT($gdb_have_fpregset_t)
57if test $gdb_have_fpregset_t = yes; then
58 AC_DEFINE(HAVE_FPREGSET_T)
59fi
60
61dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
62dnl because autoconf complains about cross-compilation issues. However, this
63dnl code uses the same variables as the macro for compatibility.
64
65AC_MSG_CHECKING(for long double)
66AC_CACHE_VAL(ac_cv_c_long_double,
67[AC_TRY_COMPILE(, [long double foo;],
68ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
69AC_MSG_RESULT($ac_cv_c_long_double)
70if test $ac_cv_c_long_double = yes; then
71 AC_DEFINE(HAVE_LONG_DOUBLE)
72fi
73
74AC_FUNC_MMAP
75
76dnl Handle optional features that can be enabled.
77ENABLE_CFLAGS=
78ENABLE_CLIBS=
79ENABLE_OBS=
80
81AC_ARG_ENABLE(netrom,
82[ --enable-netrom ],
83[case "${enableval}" in
84yes) enable_netrom=yes ;;
85no) enable_netrom=no ;;
86*) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
87esac])
88
89if test "${enable_netrom}" = "yes"; then
90 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
91fi
92
93# start-sanitize-gm
94ENABLE_GM=
95
96AC_ARG_ENABLE(gm,
97[ --enable-gm ],
98[case "${enableval}" in
99yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
100 ENABLE_CFLAGS=-DGENERAL_MAGIC
101 ;;
102no) ;;
103*) AC_MSG_ERROR(bad value ${enableval} given for gm option) ;;
104esac])
105
106# end-sanitize-gm
107
108AC_ARG_ENABLE(sim-powerpc,
109[ --enable-sim-powerpc ],
110[case "${enableval}" in
111yes) powerpc_sim=yes ;;
112no) powerpc_sim=no ;;
113*) AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;;
114esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi])
115
116# start-sanitize-gdbtk
117ENABLE_GDBTK=
118
119AC_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) ;;
134esac],
135[
136# Default is on for everything but go32
137case "$host" in
138 *go32*)
139 ;;
140 *)
141 enable_gdbtk=yes ;;
142 esac
143])
144
145if 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"
219fi
220
221AC_SUBST(ENABLE_GDBTK)
222AC_SUBST(X_CFLAGS)
223AC_SUBST(X_LDFLAGS)
224AC_SUBST(X_LIBS)
225# end-sanitize-gdbtk
226
227AC_SUBST(ENABLE_CFLAGS)
228AC_SUBST(ENABLE_CLIBS)
229AC_SUBST(ENABLE_OBS)
230
231# target_subdir is used by the testsuite to find the target libraries.
232target_subdir=
233if test "${host}" != "${target}"; then
234 target_subdir="${target_alias}/"
235fi
236AC_SUBST(target_subdir)
237
238configdirs="doc testsuite"
239
240dnl
241changequote(,)dnl
242
243# Map host cpu into the config cpu subdirectory name.
244# The default is $host_cpu.
245
246case "${host_cpu}" in
247
248c[12]) gdb_host_cpu=convex ;;
249hppa*) gdb_host_cpu=pa ;;
250i[3456]86) gdb_host_cpu=i386 ;;
251m68*) gdb_host_cpu=m68k ;;
252m88*) gdb_host_cpu=m88k ;;
253np1) gdb_host_cpu=gould ;;
254pyramid) gdb_host_cpu=pyr ;;
255powerpc*) gdb_host_cpu=powerpc ;;
256sparc64) gdb_host_cpu=sparc ;;
257*) gdb_host_cpu=$host_cpu ;;
258
259esac
260
261# map host info into gdb names.
262
263case "${host}" in
264
265a29k-*-*) gdb_host=ultra3 ;;
266
267alpha-*-osf1*) gdb_host=alpha-osf1 ;;
268alpha-*-osf2*) gdb_host=alpha-osf2 ;;
269alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
270
271arm-*-*) gdb_host=arm ;;
272
273c[12]-*-*) gdb_host=convex ;;
274
275hppa*-*-bsd*) gdb_host=hppabsd ;;
276hppa*-*-hiux*) gdb_host=hppahpux ;;
277hppa*-*-hpux*) gdb_host=hppahpux ;;
278hppa*-*-osf*) gdb_host=hppaosf ;;
279
280i[3456]86-ncr-*) gdb_host=ncr3000 ;;
281i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
282i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
283i[3456]86-sequent-sysv*) gdb_host=ptx ;;
284i[3456]86-*-aix*) gdb_host=i386aix ;;
285i[3456]86-*-bsd*) gdb_host=i386bsd ;;
286i[3456]86-*-dgux*) gdb_host=i386dgux ;;
287i[3456]86-*-freebsd*) gdb_host=fbsd ;;
288i[3456]86-*-netbsd*) gdb_host=nbsd ;;
289i[3456]86-*-go32*) gdb_host=go32 ;;
290i[3456]86-*-linux*) gdb_host=linux ;;
291i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
292i[3456]86-*-mach3*) gdb_host=i386m3 ;;
293i[3456]86-*-mach*) gdb_host=i386mach ;;
294i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
295i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
296i[3456]86-*-sco*) gdb_host=i386sco ;;
297i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
298i[3456]86-*-sunos*) gdb_host=sun386 ;;
299i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
300i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
301i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
302i[3456]86-*-unixware) gdb_host=i386v4 ;;
303i[3456]86-*-sysv*) gdb_host=i386v ;;
304i[3456]86-*-isc*) gdb_host=i386v32 ;;
305i[3456]86-*-os9k) gdb_host=i386os9k ;;
306i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
307m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
308m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
309m68030-sony-*) gdb_host=news1000 ;;
310
311m68*-altos-*) gdb_host=altos ;;
312m68*-apollo*-sysv*) gdb_host=apollo68v ;;
313m68*-apollo*-bsd*) gdb_host=apollo68b ;;
314m68*-att-*) gdb_host=3b1 ;;
315m68*-bull*-sysv*) gdb_host=dpx2 ;;
316m68*-hp-bsd*) gdb_host=hp300bsd ;;
317m68*-hp-hpux*) gdb_host=hp300hpux ;;
318m68*-isi-*) gdb_host=isi ;;
319m68*-*-lynxos*) gdb_host=m68klynx ;;
320m68*-*-netbsd*) gdb_host=nbsd ;;
321m68*-*-sysv4*) gdb_host=m68kv4 ;;
322m68*-motorola-*) gdb_host=delta68 ;;
323m68*-sony-*) gdb_host=news ;;
324m68*-sun-sunos3*) gdb_host=sun3os3 ;;
325m68*-sun-sunos4*) gdb_host=sun3os4 ;;
326m68*-sun-*) gdb_host=sun3os4 ;;
327
328m88*-harris-cxux*) gdb_host=cxux ;;
329m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
330m88*-motorola-sysv*) gdb_host=delta88 ;;
331m88*-*-mach3*) gdb_host=mach3 ;;
332m88*-*-*) gdb_host=m88k ;;
333
334mips-dec-mach3*) gdb_host=mach3 ;;
335mips-dec-*) gdb_host=decstation ;;
336mips-little-*) gdb_host=littlemips ;;
337mips-sgi-irix3*) gdb_host=irix3 ;;
338mips-sgi-irix4*) gdb_host=irix4 ;;
339mips-sgi-irix5*) gdb_host=irix5 ;;
340mips-sony-*) gdb_host=news-mips ;;
341mips-*-mach3*) gdb_host=mach3 ;;
342mips-*-sysv4*) gdb_host=mipsv4 ;;
343mips-*-sysv*) gdb_host=riscos ;;
344mips-*-riscos*) gdb_host=riscos ;;
345
346none-*-*) gdb_host=none ;;
347
348np1-*-*) gdb_host=np1 ;;
349
350ns32k-*-mach3*) gdb_host=mach3 ;;
351ns32k-*-netbsd*) gdb_host=nbsd ;;
352ns32k-umax-*) gdb_host=umax ;;
353ns32k-utek-sysv*) gdb_host=merlin ;;
354
355powerpc-*-aix*) gdb_host=aix ;;
356powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
357pn-*-*) gdb_host=pn ;;
358
359pyramid-*-*) gdb_host=pyramid ;;
360
361romp-*-*) gdb_host=rtbsd ;;
362
363rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
364rs6000-*-aix4*) gdb_host=aix4 ;;
365rs6000-*-*) gdb_host=rs6000 ;;
366
367sparc-*-lynxos*) gdb_host=sparclynx ;;
368sparc-*-netbsd*) gdb_host=nbsd ;;
369sparc-*-solaris2*) gdb_host=sun4sol2 ;;
370sparc-*-sunos4*) gdb_host=sun4os4 ;;
371sparc-*-sunos5*) gdb_host=sun4sol2 ;;
372sparc-*-*) gdb_host=sun4os4 ;;
373sparc64-*-*) gdb_host=sun4sol2 ;;
374
375tahoe-*-*) gdb_host=tahoe ;;
376
377vax-*-bsd*) gdb_host=vaxbsd ;;
378vax-*-ultrix2*) gdb_host=vaxult2 ;;
379vax-*-ultrix*) gdb_host=vaxult ;;
380
381w65-*-*) gdb_host=w65 ;;
382
383esac
384
385
386# Map target cpu into the config cpu subdirectory name.
387# The default is $target_cpu.
388
389case "${target_cpu}" in
390
391alpha) gdb_target_cpu=alpha ;;
392c[12]) gdb_target_cpu=convex ;;
393hppa*) gdb_target_cpu=pa ;;
394i[3456]86) gdb_target_cpu=i386 ;;
395m68*) gdb_target_cpu=m68k ;;
396m88*) gdb_target_cpu=m88k ;;
397mips*) gdb_target_cpu=mips ;;
398np1) gdb_target_cpu=gould ;;
399powerpc*) gdb_target_cpu=powerpc ;;
400pn) gdb_target_cpu=gould ;;
401pyramid) gdb_target_cpu=pyr ;;
402sparc*) gdb_target_cpu=sparc ;;
403*) gdb_target_cpu=$target_cpu ;;
404
405esac
406
407# map target info into gdb names.
408
409case "${target}" in
410
411a29k-*-aout*) gdb_target=a29k ;;
412a29k-*-coff*) gdb_target=a29k ;;
413a29k-*-elf*) gdb_target=a29k ;;
414a29k-*-ebmon*) gdb_target=a29k ;;
415a29k-*-kern*) gdb_target=a29k-kern ;;
416a29k-*-none*) gdb_target=a29k ;;
417a29k-*-sym1*) gdb_target=ultra3 ;;
418a29k-*-udi*) gdb_target=a29k-udi ;;
419a29k-*-vxworks*) gdb_target=vx29k ;;
420
421alpha-*-osf*) gdb_target=alpha-osf1 ;;
422
423# start-sanitize-arc
424arc-*-*) gdb_target=arc ;;
425# end-sanitize-arc
426
427arm-*-*) gdb_target=arm ;;
428
429c1-*-*) gdb_target=convex ;;
430c2-*-*) gdb_target=convex ;;
431
432h8300-*-*) gdb_target=h8300 ;;
433h8500-*-*) gdb_target=h8500 ;;
434
435sh-*-*) gdb_target=sh ;;
436
437# start-sanitize-r16
438r16-*-*) gdb_target=r16 ;;
439# end-sanitize-r16
440
441hppa*-*-bsd*) gdb_target=hppabsd ;;
442hppa*-*-pro*) gdb_target=hppapro ;;
443hppa*-*-hpux*) gdb_target=hppahpux ;;
444hppa*-*-hiux*) gdb_target=hppahpux ;;
445hppa*-*-osf*) gdb_target=hppaosf ;;
446
447i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
448i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
449i[3456]86-sequent-sysv*) gdb_target=ptx ;;
450i[3456]86-ncr-*) gdb_target=ncr3000 ;;
451i[3456]86-*-aout*) gdb_target=i386aout ;;
452i[3456]86-*-coff*) gdb_target=i386v ;;
453i[3456]86-*-elf*) gdb_target=i386v ;;
454i[3456]86-*-aix*) gdb_target=i386aix ;;
455i[3456]86-*-bsd*) gdb_target=i386bsd ;;
456i[3456]86-*-freebsd*) gdb_target=fbsd ;;
457i[3456]86-*-netbsd*) gdb_target=nbsd ;;
458i[3456]86-*-os9k) gdb_target=i386os9k ;;
459i[3456]86-*-go32*) gdb_target=i386aout ;;
460i[3456]86-*-lynxos*) gdb_target=i386lynx
461 configdirs="${configdirs} gdbserver" ;;
462i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
463i[3456]86-*-sunos*) gdb_target=sun386 ;;
464i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
465i[3456]86-*-sco*) gdb_target=i386v ;;
466i[3456]86-*-sysv*) gdb_target=i386v ;;
467i[3456]86-*-linux*) gdb_target=linux
468 configdirs="${configdirs} gdbserver" ;;
469i[3456]86-*-isc*) gdb_target=i386v ;;
470i[3456]86-*-mach3*) gdb_target=i386m3 ;;
471i[3456]86-*-mach*) gdb_target=i386mach ;;
472i[3456]86-*-netware*) gdb_target=i386nw
473 configdirs="${configdirs} nlm" ;;
474i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
475i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
476i960-*-bout*) gdb_target=vxworks960 ;;
477i960-nindy-coff*) gdb_target=nindy960 ;;
478i960-*-coff*) gdb_target=mon960 ;;
479i960-nindy-elf*) gdb_target=nindy960 ;;
480i960-*-elf*) gdb_target=mon960 ;;
481
482i960-*-nindy*) gdb_target=nindy960 ;;
483i960-*-vxworks*) gdb_target=vxworks960 ;;
484
485m68000-*-sunos3*) gdb_target=sun2os3 ;;
486m68000-*-sunos4*) gdb_target=sun2os4 ;;
487
488m68*-apollo*-bsd*) gdb_target=apollo68b ;;
489m68*-bull-sysv*) gdb_target=dpx2 ;;
490m68*-hp-bsd*) gdb_target=hp300bsd ;;
491m68*-hp-hpux*) gdb_target=hp300hpux ;;
492m68*-altos-*) gdb_target=altos ;;
493m68*-att-*) gdb_target=3b1 ;;
494m68*-cisco*-*) gdb_target=cisco ;;
495m68*-ericsson-*) gdb_target=es1800 ;;
496m68*-isi-*) gdb_target=isi ;;
497m68*-motorola-*) gdb_target=delta68 ;;
498m68*-netx-*) gdb_target=vxworks68 ;;
499m68*-sony-*) gdb_target=news ;;
500m68*-tandem-*) gdb_target=st2000 ;;
501m68*-rom68k-*) gdb_target=monitor ;;
502m68*-*bug-*) gdb_target=monitor ;;
503m68*-monitor-*) gdb_target=monitor ;;
504m68*-est-*) gdb_target=monitor ;;
505m68*-*-aout*) gdb_target=monitor ;;
506m68*-*-coff*) gdb_target=monitor ;;
507m68*-*-elf*) gdb_target=monitor ;;
508m68*-*-lynxos*) gdb_target=m68klynx
509 configdirs="${configdirs} gdbserver" ;;
510m68*-*-netbsd*) gdb_target=nbsd ;;
511m68*-*-os68k*) gdb_target=os68k ;;
512m68*-*-sunos3*) gdb_target=sun3os3 ;;
513m68*-*-sunos4*) gdb_target=sun3os4 ;;
514m68*-*-sysv4*) gdb_target=m68kv4 ;;
515m68*-*-vxworks*) gdb_target=vxworks68 ;;
516
517m88*-harris-cxux*) gdb_target=cxux ;;
518m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
519m88*-*-mach3*) gdb_target=mach3 ;;
520m88*-motorola-*) gdb_target=delta88 ;;
521m88*-*-*) gdb_target=m88k ;;
522
523mips64*-big-*) gdb_target=bigmips64 ;;
524mips*-big-*) gdb_target=bigmips ;;
525mips*-dec-mach3*) gdb_target=mach3 ;;
526mips*-dec-*) gdb_target=decstation ;;
527mips64*el-*-ecoff*) gdb_target=embedl64 ;;
528mips64*-*-ecoff*) gdb_target=embed64 ;;
529mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
530mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
531mips64*el-*-elf*) gdb_target=embedl64 ;;
532mips64*-*-elf*) gdb_target=embed64 ;;
533mips*el-*-ecoff*) gdb_target=embedl ;;
534mips*-*-ecoff*) gdb_target=embed ;;
535# start-sanitize-gm
536mips*-*-magic*) gdb_target=embed ;;
537# end-sanitize-gm
538mips*el-*-elf*) gdb_target=embedl ;;
539mips*-*-elf*) gdb_target=embed ;;
540mips*-little-*) gdb_target=littlemips ;;
541mips*-sgi-irix5*) gdb_target=irix5 ;;
542mips*-sgi-*) gdb_target=irix3 ;;
543mips*-sony-*) gdb_target=bigmips ;;
544mips*-*-mach3*) gdb_target=mach3 ;;
545mips*-*-sysv4*) gdb_target=mipsv4 ;;
546mips*-*-sysv*) gdb_target=bigmips ;;
547mips*-*-riscos*) gdb_target=bigmips ;;
548mips*-*-vxworks*) gdb_target=vxmips ;;
549
550none-*-*) gdb_target=none ;;
551
552np1-*-*) gdb_target=np1 ;;
553
554ns32k-*-mach3*) gdb_target=mach3 ;;
555ns32k-*-netbsd*) gdb_target=nbsd ;;
556ns32k-utek-sysv*) gdb_target=merlin ;;
557ns32k-utek-*) gdb_target=umax ;;
558
559pn-*-*) gdb_target=pn ;;
560powerpc-*-macos*) gdb_target=macos ;;
561powerpc-*-netware*) gdb_target=ppc-nw
562 configdirs="${configdirs} nlm" ;;
563
564powerpc-*-aix4*) gdb_target=aix4 ;;
565powerpc-*-aix*) gdb_target=aix ;;
566powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
567powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
568 gdb_target=ppc-sim
569 else
570 gdb_target=ppc-eabi
571 fi ;;
572powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
573 gdb_target=ppcle-sim
574 else
575 gdb_target=ppcle-eabi
576 fi ;;
577
578pyramid-*-*) gdb_target=pyramid ;;
579
580rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
581rs6000-*-aix4*) gdb_target=aix4 ;;
582rs6000-*-*) gdb_target=rs6000 ;;
583
584sparc-*-aout*) gdb_target=sparc-em ;;
585sparc-*-coff*) gdb_target=sparc-em ;;
586sparc-*-elf*) gdb_target=sparc-em ;;
587sparc-*-lynxos*) gdb_target=sparclynx
588 configdirs="${configdirs} gdbserver" ;;
589sparc-*-netbsd*) gdb_target=nbsd ;;
590sparc-*-solaris2*) gdb_target=sun4sol2 ;;
591sparc-*-sunos4*) gdb_target=sun4os4 ;;
592sparc-*-sunos5*) gdb_target=sun4sol2 ;;
593sparc-*-vxworks*) gdb_target=vxsparc ;;
594sparc-*-*) gdb_target=sun4os4 ;;
595# Use sparc-em for sparclet for now.
596sparclet-*-*) gdb_target=sparc-em ;;
597sparclite*-*-*) gdb_target=sparclite ;;
598sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
599sparc64-*-*) gdb_target=sp64 ;;
600
601tahoe-*-*) gdb_target=tahoe ;;
602
603vax-*-*) gdb_target=vax ;;
604
605w65-*-*) gdb_target=w65 ;;
606
607z8k-*-coff*) gdb_target=z8k ;;
608
609esac
610
611dnl
612changequote([,])dnl
613
614frags=
615host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
616if test ! -f ${host_makefile_frag}; then
617AC_MSG_ERROR("*** Gdb does not support host ${host}")
618fi
619frags="$frags $host_makefile_frag"
620
621target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
622if test ! -f ${target_makefile_frag}; then
623AC_MSG_ERROR("*** Gdb does not support target ${target}")
624fi
625frags="$frags $target_makefile_frag"
626
627AC_SUBST_FILE(host_makefile_frag)
628AC_SUBST_FILE(target_makefile_frag)
629AC_SUBST(frags)
630
631changequote(,)dnl
632hostfile=`sed -n '
633s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
634' ${host_makefile_frag}`
635
636targetfile=`sed -n '
637s/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
643if test "${target}" = "${host}"; then
644nativefile=`sed -n '
645s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
646' ${host_makefile_frag}`
647else
648# GDBserver is only useful in a "native" enviroment
649configdirs=`echo $configdirs | sed 's/gdbserver//'`
650fi
651changequote([,])
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
659files=
660links=
661rm -f xm.h
662if test "${hostfile}" != ""; then
663files="${files} config/${gdb_host_cpu}/${hostfile}"
664links="${links} xm.h"
665fi
666rm -f tm.h
667if test "${targetfile}" != ""; then
668files="${files} config/${gdb_target_cpu}/${targetfile}"
669links="${links} tm.h"
670fi
671rm -f nm.h
672if test "${nativefile}" != ""; then
673files="${files} config/${gdb_host_cpu}/${nativefile}"
674links="${links} nm.h"
675else
676# A cross-only configuration.
677files="${files} config/nm-empty.h"
678links="${links} nm.h"
679fi
680# start-sanitize-gdbtk
681
682# Make it possible to use the GUI without doing a full install
683if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
684files="${files} gdbtk.tcl"
685links="${links} gdbtk.tcl"
686fi
687# end-sanitize-gdbtk
688
689AC_LINK_FILES($files, $links)
690
691AC_CONFIG_SUBDIRS($configdirs)
692AC_OUTPUT(Makefile,
693[
694dnl Autoconf doesn't provide a mechanism for modifying definitions
695dnl provided by makefile fragments.
696dnl
697if test "${nativefile}" = ""; then
698sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
699 < Makefile > Makefile.tem
700mv -f Makefile.tem Makefile
701fi
702
703changequote(,)dnl
704sed -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
707mv -f Makefile.tmp Makefile
708changequote([,])dnl
709
710case ${srcdir} in
711.)
712;;
713*)
714grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
715echo "source ${srcdir}/.gdbinit" >> .gdbinit
716esac
717
718case x$CONFIG_HEADERS in
719xconfig.h:config.in)
720echo > stamp-h ;;
721esac
722],
723[
724gdb_host_cpu=$gdb_host_cpu
725gdb_target_cpu=$gdb_target_cpu
726nativefile=$nativefile
727])
728
729exit 0
730
This page took 0.032095 seconds and 4 git commands to generate.