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