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