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