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