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