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