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