Tweak to match output of autoconf 2.9 with same cygnus local patch as
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
2f4973f8
SG
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
476a283f 18dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2f4973f8 19
5436fc65 20dnl Process this file with autoconf to produce a configure script.
2f4973f8 21
5436fc65
C
22AC_PREREQ(2.3)dnl
23AC_INIT(main.c)
18ea4416 24AC_CONFIG_HEADER(config.h:config.in)
5436fc65 25
5436fc65
C
26AC_PROG_CC
27AC_AIX
28AC_MINIX
29AC_ISC_POSIX
30
31AC_PROG_INSTALL
32AC_PROG_RANLIB
1e02f078 33AC_PROG_YACC
5436fc65
C
34
35AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
36AC_CANONICAL_SYSTEM
37AC_ARG_PROGRAM
38
2b576293 39AC_HEADER_STDC
31520669 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)
2b576293
C
41AC_HEADER_STAT
42
4708ac65
FF
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
aa220473
SG
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
2b576293 74AC_FUNC_MMAP
5436fc65
C
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
188c635f
SG
93# start-sanitize-gm
94ENABLE_GM=
95
96AC_ARG_ENABLE(gm,
97[ --enable-gm ],
98[case "${enableval}" in
640086fd 99yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
188c635f
SG
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
3c0bf315
MM
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
5436fc65
C
116# start-sanitize-gdbtk
117ENABLE_GDBTK=
118
119AC_ARG_ENABLE(gdbtk,
120[ --enable-gdbtk ],
121[case "${enableval}" in
0fe1522a
SG
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])
5436fc65
C
144
145if test "${enable_gdbtk}" = "yes"; then
0fe1522a 146
a2b63bbd
JM
147 AC_PATH_X
148 AC_PATH_XTRA
149
4e327047
TT
150 CY_AC_PATH_TCL
151 CY_AC_PATH_TK
a2b63bbd 152
1a57cd09
TT
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
a2b63bbd
JM
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#
146ee7db 182 sparc*-sun-solaris2*)
a2b63bbd
JM
183 if test "x$GCC" = "xyes";
184 then
127841e4 185 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
a2b63bbd
JM
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"
5436fc65 219fi
a2b63bbd 220
5436fc65 221AC_SUBST(ENABLE_GDBTK)
9c0bc1da 222AC_SUBST(X_CFLAGS)
a2b63bbd
JM
223AC_SUBST(X_LDFLAGS)
224AC_SUBST(X_LIBS)
5436fc65
C
225# end-sanitize-gdbtk
226
227AC_SUBST(ENABLE_CFLAGS)
228AC_SUBST(ENABLE_CLIBS)
229AC_SUBST(ENABLE_OBS)
6ec7e4d3 230
9c0bc1da
DE
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)
bc028766 237
6ec7e4d3
SS
238configdirs="doc testsuite"
239
5436fc65
C
240dnl
241changequote(,)dnl
0df06ca0 242
1a0edbc7
FF
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 ;;
3222ff2e 250i[3456]86) gdb_host_cpu=i386 ;;
1a0edbc7 251m68*) gdb_host_cpu=m68k ;;
6ec7e4d3 252m88*) gdb_host_cpu=m88k ;;
1a0edbc7
FF
253np1) gdb_host_cpu=gould ;;
254pyramid) gdb_host_cpu=pyr ;;
c7b44b04 255powerpc*) gdb_host_cpu=powerpc ;;
146ee7db 256sparc64) gdb_host_cpu=sparc ;;
1a0edbc7
FF
257*) gdb_host_cpu=$host_cpu ;;
258
259esac
260
6c815bbe
RP
261# map host info into gdb names.
262
19758e9e 263case "${host}" in
6c815bbe 264
19758e9e
JG
265a29k-*-*) gdb_host=ultra3 ;;
266
2592eef8 267alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
268alpha-*-osf2*) gdb_host=alpha-osf2 ;;
269alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
7ccb1e44 270
19758e9e
JG
271arm-*-*) gdb_host=arm ;;
272
273c[12]-*-*) gdb_host=convex ;;
274
e8e13040 275hppa*-*-bsd*) gdb_host=hppabsd ;;
e8e13040 276hppa*-*-hiux*) gdb_host=hppahpux ;;
6ec7e4d3 277hppa*-*-hpux*) gdb_host=hppahpux ;;
2d2959e8 278hppa*-*-osf*) gdb_host=hppaosf ;;
19758e9e 279
3222ff2e
MM
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 ;;
3d78f532 306i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
358ca35e
JG
307m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
308m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
ef131e13 309m68030-sony-*) gdb_host=news1000 ;;
19758e9e 310
358ca35e
JG
311m68*-altos-*) gdb_host=altos ;;
312m68*-apollo*-sysv*) gdb_host=apollo68v ;;
313m68*-apollo*-bsd*) gdb_host=apollo68b ;;
314m68*-att-*) gdb_host=3b1 ;;
0a8f1742 315m68*-bull*-sysv*) gdb_host=dpx2 ;;
8f59e92b
FF
316m68*-hp-bsd*) gdb_host=hp300bsd ;;
317m68*-hp-hpux*) gdb_host=hp300hpux ;;
358ca35e 318m68*-isi-*) gdb_host=isi ;;
9bebe500 319m68*-*-lynxos*) gdb_host=m68klynx ;;
b7f3b6d5 320m68*-*-netbsd*) gdb_host=nbsd ;;
670a8e09 321m68*-*-sysv4*) gdb_host=m68kv4 ;;
c649a7c2 322m68*-motorola-*) gdb_host=delta68 ;;
358ca35e
JG
323m68*-sony-*) gdb_host=news ;;
324m68*-sun-sunos3*) gdb_host=sun3os3 ;;
325m68*-sun-sunos4*) gdb_host=sun3os4 ;;
326m68*-sun-*) gdb_host=sun3os4 ;;
19758e9e 327
670a8e09 328m88*-harris-cxux*) gdb_host=cxux ;;
304977ab
JK
329m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
330m88*-motorola-sysv*) gdb_host=delta88 ;;
6ec7e4d3 331m88*-*-mach3*) gdb_host=mach3 ;;
304977ab 332m88*-*-*) gdb_host=m88k ;;
19758e9e 333
6ec7e4d3 334mips-dec-mach3*) gdb_host=mach3 ;;
19758e9e
JG
335mips-dec-*) gdb_host=decstation ;;
336mips-little-*) gdb_host=littlemips ;;
3b891e0b 337mips-sgi-irix3*) gdb_host=irix3 ;;
81029114 338mips-sgi-irix4*) gdb_host=irix4 ;;
e03c0cc6 339mips-sgi-irix5*) gdb_host=irix5 ;;
b487ba2e 340mips-sony-*) gdb_host=news-mips ;;
6ec7e4d3 341mips-*-mach3*) gdb_host=mach3 ;;
2fe3b329 342mips-*-sysv4*) gdb_host=mipsv4 ;;
ee06f230 343mips-*-sysv*) gdb_host=riscos ;;
e8f8e093 344mips-*-riscos*) gdb_host=riscos ;;
19758e9e
JG
345
346none-*-*) gdb_host=none ;;
ef131e13 347
19758e9e
JG
348np1-*-*) gdb_host=np1 ;;
349
6ec7e4d3 350ns32k-*-mach3*) gdb_host=mach3 ;;
84f652b1 351ns32k-*-netbsd*) gdb_host=nbsd ;;
19758e9e 352ns32k-umax-*) gdb_host=umax ;;
3b891e0b 353ns32k-utek-sysv*) gdb_host=merlin ;;
19758e9e 354
fbc3f191 355powerpc-*-aix*) gdb_host=aix ;;
3d78f532 356powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
19758e9e
JG
357pn-*-*) gdb_host=pn ;;
358
359pyramid-*-*) gdb_host=pyramid ;;
360
361romp-*-*) gdb_host=rtbsd ;;
362
d87d7b10 363rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
a1956677 364rs6000-*-aix4*) gdb_host=aix4 ;;
19758e9e
JG
365rs6000-*-*) gdb_host=rs6000 ;;
366
9bebe500 367sparc-*-lynxos*) gdb_host=sparclynx ;;
331d515a 368sparc-*-netbsd*) gdb_host=nbsd ;;
ef131e13 369sparc-*-solaris2*) gdb_host=sun4sol2 ;;
ebb3a1e5 370sparc-*-sunos4*) gdb_host=sun4os4 ;;
1e1dd175 371sparc-*-sunos5*) gdb_host=sun4sol2 ;;
b52373a2 372sparc-*-*) gdb_host=sun4os4 ;;
146ee7db 373sparc64-*-*) gdb_host=sun4sol2 ;;
19758e9e
JG
374
375tahoe-*-*) gdb_host=tahoe ;;
376
377vax-*-bsd*) gdb_host=vaxbsd ;;
6985bc54 378vax-*-ultrix2*) gdb_host=vaxult2 ;;
19758e9e 379vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 380
d723ade7
SC
381w65-*-*) gdb_host=w65 ;;
382
6c815bbe
RP
383esac
384
8c7ae4a2 385
1a0edbc7
FF
386# Map target cpu into the config cpu subdirectory name.
387# The default is $target_cpu.
388
389case "${target_cpu}" in
390
cef4c2e7 391alpha) gdb_target_cpu=alpha ;;
1a0edbc7
FF
392c[12]) gdb_target_cpu=convex ;;
393hppa*) gdb_target_cpu=pa ;;
3222ff2e 394i[3456]86) gdb_target_cpu=i386 ;;
1a0edbc7 395m68*) gdb_target_cpu=m68k ;;
6ec7e4d3 396m88*) gdb_target_cpu=m88k ;;
b60f6584 397mips*) gdb_target_cpu=mips ;;
1a0edbc7 398np1) gdb_target_cpu=gould ;;
c7b44b04 399powerpc*) gdb_target_cpu=powerpc ;;
1a0edbc7
FF
400pn) gdb_target_cpu=gould ;;
401pyramid) gdb_target_cpu=pyr ;;
0c101d49 402sparc*) gdb_target_cpu=sparc ;;
1a0edbc7
FF
403*) gdb_target_cpu=$target_cpu ;;
404
405esac
406
407# map target info into gdb names.
408
ef131e13
JG
409case "${target}" in
410
3b891e0b
JK
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 ;;
83d9bb14 419a29k-*-vxworks*) gdb_target=vx29k ;;
ef131e13 420
cef4c2e7 421alpha-*-osf*) gdb_target=alpha-osf1 ;;
6ec7e4d3 422
c1ac88f9 423# start-sanitize-arc
83d9bb14 424arc-*-*) gdb_target=arc ;;
c1ac88f9
DE
425# end-sanitize-arc
426
ef131e13
JG
427arm-*-*) gdb_target=arm ;;
428
429c1-*-*) gdb_target=convex ;;
430c2-*-*) gdb_target=convex ;;
431
fb506180
SS
432h8300-*-*) gdb_target=h8300 ;;
433h8500-*-*) gdb_target=h8500 ;;
ef131e13 434
9faacb92
SC
435sh-*-*) gdb_target=sh ;;
436
03c4ce2f
MT
437# start-sanitize-r16
438r16-*-*) gdb_target=r16 ;;
439# end-sanitize-r16
440
8f59e92b 441hppa*-*-bsd*) gdb_target=hppabsd ;;
cc5702bd 442hppa*-*-pro*) gdb_target=hppapro ;;
8f59e92b 443hppa*-*-hpux*) gdb_target=hppahpux ;;
7079e766 444hppa*-*-hiux*) gdb_target=hppahpux ;;
6bfd168c 445hppa*-*-osf*) gdb_target=hppaosf ;;
ef131e13 446
3222ff2e
MM
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
5436fc65 461 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
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 ;;
3dedc867
FF
467i[3456]86-*-linux*) gdb_target=linux
468 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
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
5436fc65 473 configdirs="${configdirs} nlm" ;;
3222ff2e 474i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
3d78f532 475i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
3b891e0b 476i960-*-bout*) gdb_target=vxworks960 ;;
2e665cd3
DP
477i960-nindy-coff*) gdb_target=nindy960 ;;
478i960-*-coff*) gdb_target=mon960 ;;
479i960-nindy-elf*) gdb_target=nindy960 ;;
480i960-*-elf*) gdb_target=mon960 ;;
ebb3a1e5 481
3b891e0b
JK
482i960-*-nindy*) gdb_target=nindy960 ;;
483i960-*-vxworks*) gdb_target=vxworks960 ;;
ef131e13 484
ebb3a1e5
JG
485m68000-*-sunos3*) gdb_target=sun2os3 ;;
486m68000-*-sunos4*) gdb_target=sun2os4 ;;
ef131e13 487
835fe6e6 488m68*-apollo*-bsd*) gdb_target=apollo68b ;;
6ec7e4d3 489m68*-bull-sysv*) gdb_target=dpx2 ;;
6ec7e4d3
SS
490m68*-hp-bsd*) gdb_target=hp300bsd ;;
491m68*-hp-hpux*) gdb_target=hp300hpux ;;
670a8e09
SS
492m68*-altos-*) gdb_target=altos ;;
493m68*-att-*) gdb_target=3b1 ;;
494m68*-cisco*-*) gdb_target=cisco ;;
495m68*-ericsson-*) gdb_target=es1800 ;;
358ca35e 496m68*-isi-*) gdb_target=isi ;;
c649a7c2 497m68*-motorola-*) gdb_target=delta68 ;;
358ca35e
JG
498m68*-netx-*) gdb_target=vxworks68 ;;
499m68*-sony-*) gdb_target=news ;;
500m68*-tandem-*) gdb_target=st2000 ;;
c1128340
RS
501m68*-rom68k-*) gdb_target=monitor ;;
502m68*-*bug-*) gdb_target=monitor ;;
503m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 504m68*-est-*) gdb_target=monitor ;;
0ffba029
RS
505m68*-*-aout*) gdb_target=monitor ;;
506m68*-*-coff*) gdb_target=monitor ;;
507m68*-*-elf*) gdb_target=monitor ;;
9bebe500 508m68*-*-lynxos*) gdb_target=m68klynx
5436fc65 509 configdirs="${configdirs} gdbserver" ;;
b7f3b6d5 510m68*-*-netbsd*) gdb_target=nbsd ;;
3b891e0b 511m68*-*-os68k*) gdb_target=os68k ;;
358ca35e
JG
512m68*-*-sunos3*) gdb_target=sun3os3 ;;
513m68*-*-sunos4*) gdb_target=sun3os4 ;;
670a8e09 514m68*-*-sysv4*) gdb_target=m68kv4 ;;
358ca35e 515m68*-*-vxworks*) gdb_target=vxworks68 ;;
ef131e13 516
670a8e09 517m88*-harris-cxux*) gdb_target=cxux ;;
f9440640 518m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
6ec7e4d3 519m88*-*-mach3*) gdb_target=mach3 ;;
304977ab
JK
520m88*-motorola-*) gdb_target=delta88 ;;
521m88*-*-*) gdb_target=m88k ;;
ef131e13 522
70126bf9 523mips64*-big-*) gdb_target=bigmips64 ;;
b60f6584 524mips*-big-*) gdb_target=bigmips ;;
6ec7e4d3 525mips*-dec-mach3*) gdb_target=mach3 ;;
b60f6584 526mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
527mips64*el-*-ecoff*) gdb_target=embedl64 ;;
528mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
529mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
530mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
531mips64*el-*-elf*) gdb_target=embedl64 ;;
532mips64*-*-elf*) gdb_target=embed64 ;;
533mips*el-*-ecoff*) gdb_target=embedl ;;
534mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 535# start-sanitize-gm
7bb5e831 536mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 537# end-sanitize-gm
7bb5e831
RS
538mips*el-*-elf*) gdb_target=embedl ;;
539mips*-*-elf*) gdb_target=embed ;;
b60f6584
ILT
540mips*-little-*) gdb_target=littlemips ;;
541mips*-sgi-irix5*) gdb_target=irix5 ;;
542mips*-sgi-*) gdb_target=irix3 ;;
543mips*-sony-*) gdb_target=bigmips ;;
6ec7e4d3 544mips*-*-mach3*) gdb_target=mach3 ;;
2fe3b329 545mips*-*-sysv4*) gdb_target=mipsv4 ;;
b60f6584
ILT
546mips*-*-sysv*) gdb_target=bigmips ;;
547mips*-*-riscos*) gdb_target=bigmips ;;
8fa6fcf8 548mips*-*-vxworks*) gdb_target=vxmips ;;
ef131e13
JG
549
550none-*-*) gdb_target=none ;;
551
552np1-*-*) gdb_target=np1 ;;
553
6ec7e4d3 554ns32k-*-mach3*) gdb_target=mach3 ;;
84f652b1 555ns32k-*-netbsd*) gdb_target=nbsd ;;
3b891e0b 556ns32k-utek-sysv*) gdb_target=merlin ;;
ef131e13
JG
557ns32k-utek-*) gdb_target=umax ;;
558
559pn-*-*) gdb_target=pn ;;
c148ab3c 560powerpc-*-macos*) gdb_target=macos ;;
b7da2494
SG
561powerpc-*-netware*) gdb_target=ppc-nw
562 configdirs="${configdirs} nlm" ;;
ef131e13 563
65eaea27 564powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 565powerpc-*-aix*) gdb_target=aix ;;
3d78f532 566powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
3c0bf315
MM
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 ;;
c7b44b04 577
ef131e13
JG
578pyramid-*-*) gdb_target=pyramid ;;
579
d87d7b10 580rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 581rs6000-*-aix4*) gdb_target=aix4 ;;
ef131e13
JG
582rs6000-*-*) gdb_target=rs6000 ;;
583
3b891e0b
JK
584sparc-*-aout*) gdb_target=sparc-em ;;
585sparc-*-coff*) gdb_target=sparc-em ;;
586sparc-*-elf*) gdb_target=sparc-em ;;
9bebe500 587sparc-*-lynxos*) gdb_target=sparclynx
5436fc65 588 configdirs="${configdirs} gdbserver" ;;
331d515a 589sparc-*-netbsd*) gdb_target=nbsd ;;
ef131e13 590sparc-*-solaris2*) gdb_target=sun4sol2 ;;
ebb3a1e5 591sparc-*-sunos4*) gdb_target=sun4os4 ;;
1e1dd175 592sparc-*-sunos5*) gdb_target=sun4sol2 ;;
54d44c8c 593sparc-*-vxworks*) gdb_target=vxsparc ;;
b52373a2 594sparc-*-*) gdb_target=sun4os4 ;;
229b2c87
DE
595# Use sparc-em for sparclet for now.
596sparclet-*-*) gdb_target=sparc-em ;;
0c101d49 597sparclite*-*-*) gdb_target=sparclite ;;
146ee7db 598sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
6ec7e4d3 599sparc64-*-*) gdb_target=sp64 ;;
ef131e13
JG
600
601tahoe-*-*) gdb_target=tahoe ;;
6ec7e4d3 602
ef131e13 603vax-*-*) gdb_target=vax ;;
6c815bbe 604
d723ade7
SC
605w65-*-*) gdb_target=w65 ;;
606
fb506180 607z8k-*-coff*) gdb_target=z8k ;;
6ec7e4d3 608
6c815bbe
RP
609esac
610
5436fc65
C
611dnl
612changequote([,])dnl
613
5f107900 614frags=
5436fc65
C
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}")
912e0732 618fi
5f107900 619frags="$frags $host_makefile_frag"
912e0732 620
5436fc65
C
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}")
912e0732 624fi
5f107900 625frags="$frags $target_makefile_frag"
912e0732 626
5436fc65
C
627AC_SUBST_FILE(host_makefile_frag)
628AC_SUBST_FILE(target_makefile_frag)
5f107900 629AC_SUBST(frags)
5436fc65 630
094fd4ae
C
631changequote(,)dnl
632hostfile=`sed -n '
633s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
634' ${host_makefile_frag}`
5436fc65 635
094fd4ae
C
636targetfile=`sed -n '
637s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
638' ${target_makefile_frag}`
79f68f0f
DZ
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
5436fc65 643if test "${target}" = "${host}"; then
094fd4ae
C
644nativefile=`sed -n '
645s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
646' ${host_makefile_frag}`
79f68f0f 647else
5436fc65
C
648# GDBserver is only useful in a "native" enviroment
649configdirs=`echo $configdirs | sed 's/gdbserver//'`
d40309c7 650fi
094fd4ae 651changequote([,])
d40309c7 652
d40309c7 653# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
6573c898 654# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
d40309c7
JG
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
bdf3621b
JG
659files=
660links=
dc0c3f64 661rm -f xm.h
5436fc65
C
662if test "${hostfile}" != ""; then
663files="${files} config/${gdb_host_cpu}/${hostfile}"
664links="${links} xm.h"
bdf3621b 665fi
dc0c3f64 666rm -f tm.h
5436fc65
C
667if test "${targetfile}" != ""; then
668files="${files} config/${gdb_target_cpu}/${targetfile}"
669links="${links} tm.h"
bdf3621b 670fi
1a0edbc7 671rm -f nm.h
5436fc65
C
672if test "${nativefile}" != ""; then
673files="${files} config/${gdb_host_cpu}/${nativefile}"
674links="${links} nm.h"
c9c23412 675else
5436fc65
C
676# A cross-only configuration.
677files="${files} config/nm-empty.h"
678links="${links} nm.h"
d40309c7 679fi
d3d75ec9 680# start-sanitize-gdbtk
912e0732 681
5436fc65
C
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"
754e5da2 686fi
d3d75ec9 687# end-sanitize-gdbtk
754e5da2 688
5436fc65
C
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
33bc979d
SS
701fi
702
5436fc65 703changequote(,)dnl
94d4b713
JK
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
5436fc65
C
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
31520669
FF
717
718case x$CONFIG_HEADERS in
18ea4416 719xconfig.h:config.in)
31520669
FF
720echo > stamp-h ;;
721esac
0a5a1821
C
722],
723[
724gdb_host_cpu=$gdb_host_cpu
725gdb_target_cpu=$gdb_target_cpu
726nativefile=$nativefile
5436fc65 727])
5e711e7f
PS
728
729exit 0
b7f3b6d5 730
This page took 0.27391 seconds and 4 git commands to generate.