* breakpoint.c (remove_breakpoint): Change error to warning so
[deliverable/binutils-gdb.git] / gdb / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.3)dnl
3 AC_INIT(main.c)
4
5 AC_PROG_CC
6 AC_AIX
7 AC_MINIX
8 AC_ISC_POSIX
9
10 AC_PROG_INSTALL
11 AC_PROG_RANLIB
12 AC_PROG_YACC
13
14 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
15 AC_CANONICAL_SYSTEM
16 AC_ARG_PROGRAM
17
18 AC_HEADER_STDC
19 AC_CHECK_HEADERS(memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h)
20 AC_HEADER_STAT
21
22 AC_FUNC_MMAP
23
24 dnl Handle optional features that can be enabled.
25 ENABLE_CFLAGS=
26 ENABLE_CLIBS=
27 ENABLE_OBS=
28
29 AC_ARG_ENABLE(netrom,
30 [ --enable-netrom ],
31 [case "${enableval}" in
32 yes) enable_netrom=yes ;;
33 no) enable_netrom=no ;;
34 *) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
35 esac])
36
37 if test "${enable_netrom}" = "yes"; then
38 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
39 fi
40
41 # start-sanitize-gm
42 ENABLE_GM=
43
44 AC_ARG_ENABLE(gm,
45 [ --enable-gm ],
46 [case "${enableval}" in
47 yes) ENABLE_OBS="${ENABLE_OBS} magic.o"
48 ENABLE_CFLAGS=-DGENERAL_MAGIC
49 ;;
50 no) ;;
51 *) AC_MSG_ERROR(bad value ${enableval} given for gm option) ;;
52 esac])
53
54 # end-sanitize-gm
55
56 AC_ARG_ENABLE(sim-powerpc,
57 [ --enable-sim-powerpc ],
58 [case "${enableval}" in
59 yes) powerpc_sim=yes ;;
60 no) powerpc_sim=no ;;
61 *) AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;;
62 esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi])
63
64 # start-sanitize-gdbtk
65 ENABLE_GDBTK=
66
67 AC_ARG_ENABLE(gdbtk,
68 [ --enable-gdbtk ],
69 [case "${enableval}" in
70 yes)
71 case "$host" in
72 *go32*)
73 AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
74 enable_gdbtk=no ;;
75 *)
76 enable_gdbtk=yes ;;
77 esac ;;
78 no)
79 enable_gdbtk=no ;;
80 *)
81 AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
82 esac],
83 [
84 # Default is on for everything but go32
85 case "$host" in
86 *go32*)
87 ;;
88 *)
89 enable_gdbtk=yes ;;
90 esac
91 ])
92
93 if test "${enable_gdbtk}" = "yes"; then
94
95 AC_PATH_X
96 AC_PATH_XTRA
97
98 CYGNUS_PATH_TK
99 CYGNUS_PATH_TCL
100
101 ENABLE_GDBTK=1
102
103 if test "x$no_x" != "xyes"; then
104 if test "x$x_includes" != "x" ;
105 then
106 X_CFLAGS="-I$x_includes"
107 else
108 X_CFLAGS=""
109 fi
110
111 if test "x$x_libraries" != "x" ;
112 then
113 X_LDFLAGS="-L$x_libraries"
114 else
115 X_LDFLAGS=""
116 fi
117
118 case "$host" in
119 #
120 # gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
121 #
122 sparc-sun-solaris2*)
123 if test "x$GCC" = "xyes";
124 then
125 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic"
126 else
127 if test "x$x_libraries" != "x" ;
128 then
129 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
130 fi
131 X_LIBS="-lX11 -lXext -lX11"
132 fi ;;
133 #
134 # gdb linked statically w/ SunOS or HPUX
135 #
136 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
137 if test "x$x_libraries" != "x" ;
138 then
139 X_LIBS="$x_libraries/libX11.a"
140 else
141 X_LIBS="/usr/lib/libX11.a"
142 fi ;;
143 #
144 # default is to link dynamically
145 #
146 *)
147 X_LIBS="-lX11" ;;
148 esac
149 else
150 X_LDLAGS=""
151 X_CFLAGS=""
152 X_LIBS=""
153 AC_MSG_WARN([No X based programs will be built])
154 fi
155
156 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
157 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
158 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
159 fi
160
161 AC_SUBST(ENABLE_GDBTK)
162 AC_SUBST(X_CFLAGS)
163 AC_SUBST(X_LDFLAGS)
164 AC_SUBST(X_LIBS)
165 # end-sanitize-gdbtk
166
167 AC_SUBST(ENABLE_CFLAGS)
168 AC_SUBST(ENABLE_CLIBS)
169 AC_SUBST(ENABLE_OBS)
170
171 # target_subdir is used by the testsuite to find the target libraries.
172 target_subdir=
173 if test "${host}" != "${target}"; then
174 target_subdir="${target_alias}/"
175 fi
176 AC_SUBST(target_subdir)
177
178 configdirs="doc testsuite"
179
180 dnl
181 changequote(,)dnl
182
183 # Map host cpu into the config cpu subdirectory name.
184 # The default is $host_cpu.
185
186 case "${host_cpu}" in
187
188 c[12]) gdb_host_cpu=convex ;;
189 hppa*) gdb_host_cpu=pa ;;
190 i[3456]86) gdb_host_cpu=i386 ;;
191 m68*) gdb_host_cpu=m68k ;;
192 m88*) gdb_host_cpu=m88k ;;
193 np1) gdb_host_cpu=gould ;;
194 pyramid) gdb_host_cpu=pyr ;;
195 powerpc*) gdb_host_cpu=powerpc ;;
196 *) gdb_host_cpu=$host_cpu ;;
197
198 esac
199
200 # map host info into gdb names.
201
202 case "${host}" in
203
204 a29k-*-*) gdb_host=ultra3 ;;
205
206 alpha-*-osf1*) gdb_host=alpha-osf1 ;;
207 alpha-*-osf2*) gdb_host=alpha-osf2 ;;
208 alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
209
210 arm-*-*) gdb_host=arm ;;
211
212 c[12]-*-*) gdb_host=convex ;;
213
214 hppa*-*-bsd*) gdb_host=hppabsd ;;
215 hppa*-*-hiux*) gdb_host=hppahpux ;;
216 hppa*-*-hpux*) gdb_host=hppahpux ;;
217 hppa*-*-osf*) gdb_host=hppaosf ;;
218
219 i[3456]86-ncr-*) gdb_host=ncr3000 ;;
220 i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
221 i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
222 i[3456]86-sequent-sysv*) gdb_host=ptx ;;
223 i[3456]86-*-aix*) gdb_host=i386aix ;;
224 i[3456]86-*-bsd*) gdb_host=i386bsd ;;
225 i[3456]86-*-dgux*) gdb_host=i386dgux ;;
226 i[3456]86-*-freebsd*) gdb_host=fbsd ;;
227 i[3456]86-*-netbsd*) gdb_host=nbsd ;;
228 i[3456]86-*-go32*) gdb_host=go32 ;;
229 i[3456]86-*-linux*) gdb_host=linux ;;
230 i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
231 i[3456]86-*-mach3*) gdb_host=i386m3 ;;
232 i[3456]86-*-mach*) gdb_host=i386mach ;;
233 i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
234 i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
235 i[3456]86-*-sco*) gdb_host=i386sco ;;
236 i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
237 i[3456]86-*-sunos*) gdb_host=sun386 ;;
238 i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
239 i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
240 i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
241 i[3456]86-*-unixware) gdb_host=i386v4 ;;
242 i[3456]86-*-sysv*) gdb_host=i386v ;;
243 i[3456]86-*-isc*) gdb_host=i386v32 ;;
244 i[3456]86-*-os9k) gdb_host=i386os9k ;;
245 i[3456]86-*-win32*) gdb_host=win32 ;;
246 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
247 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
248 m68030-sony-*) gdb_host=news1000 ;;
249
250 m68*-altos-*) gdb_host=altos ;;
251 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
252 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
253 m68*-att-*) gdb_host=3b1 ;;
254 m68*-bull*-sysv*) gdb_host=dpx2 ;;
255 m68*-hp-bsd*) gdb_host=hp300bsd ;;
256 m68*-hp-hpux*) gdb_host=hp300hpux ;;
257 m68*-isi-*) gdb_host=isi ;;
258 m68*-*-lynxos*) gdb_host=m68klynx ;;
259 m68*-*-sysv4*) gdb_host=m68kv4 ;;
260 m68*-motorola-*) gdb_host=delta68 ;;
261 m68*-sony-*) gdb_host=news ;;
262 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
263 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
264 m68*-sun-*) gdb_host=sun3os4 ;;
265
266 m88*-harris-cxux*) gdb_host=cxux ;;
267 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
268 m88*-motorola-sysv*) gdb_host=delta88 ;;
269 m88*-*-mach3*) gdb_host=mach3 ;;
270 m88*-*-*) gdb_host=m88k ;;
271
272 mips-dec-mach3*) gdb_host=mach3 ;;
273 mips-dec-*) gdb_host=decstation ;;
274 mips-little-*) gdb_host=littlemips ;;
275 mips-sgi-irix3*) gdb_host=irix3 ;;
276 mips-sgi-irix4*) gdb_host=irix4 ;;
277 mips-sgi-irix5*) gdb_host=irix5 ;;
278 mips-sony-*) gdb_host=news-mips ;;
279 mips-*-mach3*) gdb_host=mach3 ;;
280 mips-*-sysv4*) gdb_host=mipsv4 ;;
281 mips-*-sysv*) gdb_host=riscos ;;
282 mips-*-riscos*) gdb_host=riscos ;;
283
284 none-*-*) gdb_host=none ;;
285
286 np1-*-*) gdb_host=np1 ;;
287
288 ns32k-*-mach3*) gdb_host=mach3 ;;
289 ns32k-*-netbsd*) gdb_host=nbsd ;;
290 ns32k-umax-*) gdb_host=umax ;;
291 ns32k-utek-sysv*) gdb_host=merlin ;;
292
293 powerpc-*-aix*) gdb_host=aix ;;
294
295 pn-*-*) gdb_host=pn ;;
296
297 pyramid-*-*) gdb_host=pyramid ;;
298
299 romp-*-*) gdb_host=rtbsd ;;
300
301 rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
302 rs6000-*-*) gdb_host=rs6000 ;;
303
304 sparc-*-lynxos*) gdb_host=sparclynx ;;
305 sparc-*-netbsd*) gdb_host=nbsd ;;
306 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
307 sparc-*-sunos4*) gdb_host=sun4os4 ;;
308 sparc-*-sunos5*) gdb_host=sun4sol2 ;;
309 sparc-*-*) gdb_host=sun4os4 ;;
310
311 tahoe-*-*) gdb_host=tahoe ;;
312
313 vax-*-bsd*) gdb_host=vaxbsd ;;
314 vax-*-ultrix2*) gdb_host=vaxult2 ;;
315 vax-*-ultrix*) gdb_host=vaxult ;;
316
317 w65-*-*) gdb_host=w65 ;;
318
319 esac
320
321
322 # Map target cpu into the config cpu subdirectory name.
323 # The default is $target_cpu.
324
325 case "${target_cpu}" in
326
327 alpha) gdb_target_cpu=alpha ;;
328 c[12]) gdb_target_cpu=convex ;;
329 hppa*) gdb_target_cpu=pa ;;
330 i[3456]86) gdb_target_cpu=i386 ;;
331 m68*) gdb_target_cpu=m68k ;;
332 m88*) gdb_target_cpu=m88k ;;
333 mips*) gdb_target_cpu=mips ;;
334 np1) gdb_target_cpu=gould ;;
335 powerpc*) gdb_target_cpu=powerpc ;;
336 pn) gdb_target_cpu=gould ;;
337 pyramid) gdb_target_cpu=pyr ;;
338 sparc*) gdb_target_cpu=sparc ;;
339 *) gdb_target_cpu=$target_cpu ;;
340
341 esac
342
343 # map target info into gdb names.
344
345 case "${target}" in
346
347 a29k-*-aout*) gdb_target=a29k ;;
348 a29k-*-coff*) gdb_target=a29k ;;
349 a29k-*-elf*) gdb_target=a29k ;;
350 a29k-*-ebmon*) gdb_target=a29k ;;
351 a29k-*-kern*) gdb_target=a29k-kern ;;
352 a29k-*-none*) gdb_target=a29k ;;
353 a29k-*-sym1*) gdb_target=ultra3 ;;
354 a29k-*-udi*) gdb_target=a29k-udi ;;
355 a29k-*-vxworks*) gdb_target=vx29k ;;
356
357 alpha-*-osf*) gdb_target=alpha-osf1 ;;
358
359 # start-sanitize-arc
360 arc-*-*) gdb_target=arc ;;
361 # end-sanitize-arc
362
363 arm-*-*) gdb_target=arm ;;
364
365 c1-*-*) gdb_target=convex ;;
366 c2-*-*) gdb_target=convex ;;
367
368 h8300-*-*) gdb_target=h8300 ;;
369 h8500-*-*) gdb_target=h8500 ;;
370
371 sh-*-*) gdb_target=sh ;;
372
373 # start-sanitize-r16
374 r16-*-*) gdb_target=r16 ;;
375 # end-sanitize-r16
376
377 hppa*-*-bsd*) gdb_target=hppabsd ;;
378 hppa*-*-pro*) gdb_target=hppapro ;;
379 hppa*-*-hpux*) gdb_target=hppahpux ;;
380 hppa*-*-hiux*) gdb_target=hppahpux ;;
381 hppa*-*-osf*) gdb_target=hppaosf ;;
382
383 i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
384 i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
385 i[3456]86-sequent-sysv*) gdb_target=ptx ;;
386 i[3456]86-ncr-*) gdb_target=ncr3000 ;;
387 i[3456]86-*-aout*) gdb_target=i386aout ;;
388 i[3456]86-*-coff*) gdb_target=i386v ;;
389 i[3456]86-*-elf*) gdb_target=i386v ;;
390 i[3456]86-*-aix*) gdb_target=i386aix ;;
391 i[3456]86-*-bsd*) gdb_target=i386bsd ;;
392 i[3456]86-*-freebsd*) gdb_target=fbsd ;;
393 i[3456]86-*-netbsd*) gdb_target=nbsd ;;
394 i[3456]86-*-os9k) gdb_target=i386os9k ;;
395 i[3456]86-*-go32*) gdb_target=i386aout ;;
396 i[3456]86-*-lynxos*) gdb_target=i386lynx
397 configdirs="${configdirs} gdbserver" ;;
398 i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
399 i[3456]86-*-sunos*) gdb_target=sun386 ;;
400 i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
401 i[3456]86-*-sco*) gdb_target=i386v ;;
402 i[3456]86-*-sysv*) gdb_target=i386v ;;
403 i[3456]86-*-linux*) gdb_target=linux ;;
404 i[3456]86-*-isc*) gdb_target=i386v ;;
405 i[3456]86-*-mach3*) gdb_target=i386m3 ;;
406 i[3456]86-*-mach*) gdb_target=i386mach ;;
407 i[3456]86-*-netware*) gdb_target=i386nw
408 configdirs="${configdirs} nlm" ;;
409 i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
410 i[3456]86-*-win32) gdb_target=win32 ;;
411
412 i960-*-bout*) gdb_target=vxworks960 ;;
413 i960-*-coff*) gdb_target=nindy960 ;;
414 i960-*-elf*) gdb_target=nindy960 ;;
415
416 i960-*-nindy*) gdb_target=nindy960 ;;
417 i960-*-vxworks*) gdb_target=vxworks960 ;;
418
419 m68000-*-sunos3*) gdb_target=sun2os3 ;;
420 m68000-*-sunos4*) gdb_target=sun2os4 ;;
421
422 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
423 m68*-bull-sysv*) gdb_target=dpx2 ;;
424 m68*-hp-bsd*) gdb_target=hp300bsd ;;
425 m68*-hp-hpux*) gdb_target=hp300hpux ;;
426 m68*-altos-*) gdb_target=altos ;;
427 m68*-att-*) gdb_target=3b1 ;;
428 m68*-cisco*-*) gdb_target=cisco ;;
429 m68*-ericsson-*) gdb_target=es1800 ;;
430 m68*-isi-*) gdb_target=isi ;;
431 m68*-motorola-*) gdb_target=delta68 ;;
432 m68*-netx-*) gdb_target=vxworks68 ;;
433 m68*-sony-*) gdb_target=news ;;
434 m68*-tandem-*) gdb_target=st2000 ;;
435 m68*-rom68k-*) gdb_target=monitor ;;
436 m68*-*bug-*) gdb_target=monitor ;;
437 m68*-monitor-*) gdb_target=monitor ;;
438 m68*-est-*) gdb_target=monitor ;;
439 m68*-*-aout*) gdb_target=monitor ;;
440 m68*-*-coff*) gdb_target=monitor ;;
441 m68*-*-elf*) gdb_target=monitor ;;
442 m68*-*-lynxos*) gdb_target=m68klynx
443 configdirs="${configdirs} gdbserver" ;;
444 m68*-*-os68k*) gdb_target=os68k ;;
445 m68*-*-sunos3*) gdb_target=sun3os3 ;;
446 m68*-*-sunos4*) gdb_target=sun3os4 ;;
447 m68*-*-sysv4*) gdb_target=m68kv4 ;;
448 m68*-*-vxworks*) gdb_target=vxworks68 ;;
449
450 m88*-harris-cxux*) gdb_target=cxux ;;
451 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
452 m88*-*-mach3*) gdb_target=mach3 ;;
453 m88*-motorola-*) gdb_target=delta88 ;;
454 m88*-*-*) gdb_target=m88k ;;
455
456 mips64*-big-*) gdb_target=bigmips64 ;;
457 mips*-big-*) gdb_target=bigmips ;;
458 mips*-dec-mach3*) gdb_target=mach3 ;;
459 mips*-dec-*) gdb_target=decstation ;;
460 mips64*el-*-ecoff*) gdb_target=embedl64 ;;
461 mips64*-*-ecoff*) gdb_target=embed64 ;;
462 mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
463 mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
464 mips64*el-*-elf*) gdb_target=embedl64 ;;
465 mips64*-*-elf*) gdb_target=embed64 ;;
466 mips*el-*-ecoff*) gdb_target=embedl ;;
467 mips*-*-ecoff*) gdb_target=embed ;;
468 # start-sanitize-gm
469 mips*-*-magic*) gdb_target=embed ;;
470 # end-sanitize-gm
471 mips*el-*-elf*) gdb_target=embedl ;;
472 mips*-*-elf*) gdb_target=embed ;;
473 mips*-little-*) gdb_target=littlemips ;;
474 mips*-sgi-irix5*) gdb_target=irix5 ;;
475 mips*-sgi-*) gdb_target=irix3 ;;
476 mips*-sony-*) gdb_target=bigmips ;;
477 mips*-*-mach3*) gdb_target=mach3 ;;
478 mips*-*-sysv4*) gdb_target=mipsv4 ;;
479 mips*-*-sysv*) gdb_target=bigmips ;;
480 mips*-*-riscos*) gdb_target=bigmips ;;
481
482 none-*-*) gdb_target=none ;;
483
484 np1-*-*) gdb_target=np1 ;;
485
486 ns32k-*-mach3*) gdb_target=mach3 ;;
487 ns32k-*-netbsd*) gdb_target=nbsd ;;
488 ns32k-utek-sysv*) gdb_target=merlin ;;
489 ns32k-utek-*) gdb_target=umax ;;
490
491 pn-*-*) gdb_target=pn ;;
492 powerpc-*-macos*) gdb_target=macos ;;
493 powerpc-*-netware*) gdb_target=ppc-nw
494 configdirs="${configdirs} nlm" ;;
495
496 powerpc-*-aix4*) gdb_target=aix4 ;;
497 powerpc-*-aix*) gdb_target=aix ;;
498 powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
499 gdb_target=ppc-sim
500 else
501 gdb_target=ppc-eabi
502 fi ;;
503 powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
504 gdb_target=ppcle-sim
505 else
506 gdb_target=ppcle-eabi
507 fi ;;
508
509 pyramid-*-*) gdb_target=pyramid ;;
510
511 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
512 rs6000-*-aix4*) gdb_target=aix4 ;;
513 rs6000-*-*) gdb_target=rs6000 ;;
514
515 sparc-*-aout*) gdb_target=sparc-em ;;
516 sparc-*-coff*) gdb_target=sparc-em ;;
517 sparc-*-elf*) gdb_target=sparc-em ;;
518 sparc-*-lynxos*) gdb_target=sparclynx
519 configdirs="${configdirs} gdbserver" ;;
520 sparc-*-netbsd*) gdb_target=nbsd ;;
521 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
522 sparc-*-sunos4*) gdb_target=sun4os4 ;;
523 sparc-*-sunos5*) gdb_target=sun4sol2 ;;
524 sparc-*-vxworks*) gdb_target=vxsparc ;;
525 sparc-*-*) gdb_target=sun4os4 ;;
526 sparclite*-*-*) gdb_target=sparclite ;;
527 sparc64-*-*) gdb_target=sp64 ;;
528
529 tahoe-*-*) gdb_target=tahoe ;;
530
531 vax-*-*) gdb_target=vax ;;
532
533 w65-*-*) gdb_target=w65 ;;
534
535 z8k-*-coff*) gdb_target=z8k ;;
536
537 esac
538
539 dnl
540 changequote([,])dnl
541
542 frags=
543 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
544 if test ! -f ${host_makefile_frag}; then
545 AC_MSG_ERROR("*** Gdb does not support host ${host}")
546 fi
547 frags="$frags $host_makefile_frag"
548
549 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
550 if test ! -f ${target_makefile_frag}; then
551 AC_MSG_ERROR("*** Gdb does not support target ${target}")
552 fi
553 frags="$frags $target_makefile_frag"
554
555 AC_SUBST_FILE(host_makefile_frag)
556 AC_SUBST_FILE(target_makefile_frag)
557 AC_SUBST(frags)
558
559 changequote(,)dnl
560 hostfile=`sed -n '
561 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
562 ' ${host_makefile_frag}`
563
564 targetfile=`sed -n '
565 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
566 ' ${target_makefile_frag}`
567
568 # these really aren't orthogonal true/false values of the same condition,
569 # but shells are slow enough that I like to reuse the test conditions
570 # whenever possible
571 if test "${target}" = "${host}"; then
572 nativefile=`sed -n '
573 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
574 ' ${host_makefile_frag}`
575 else
576 # GDBserver is only useful in a "native" enviroment
577 configdirs=`echo $configdirs | sed 's/gdbserver//'`
578 fi
579 changequote([,])
580
581 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
582 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
583 # corresponding links. But we have to remove the xm.h files and tm.h
584 # files anyway, e.g. when switching from "configure host" to
585 # "configure none".
586
587 files=
588 links=
589 rm -f xm.h
590 if test "${hostfile}" != ""; then
591 files="${files} config/${gdb_host_cpu}/${hostfile}"
592 links="${links} xm.h"
593 fi
594 rm -f tm.h
595 if test "${targetfile}" != ""; then
596 files="${files} config/${gdb_target_cpu}/${targetfile}"
597 links="${links} tm.h"
598 fi
599 rm -f nm.h
600 if test "${nativefile}" != ""; then
601 files="${files} config/${gdb_host_cpu}/${nativefile}"
602 links="${links} nm.h"
603 else
604 # A cross-only configuration.
605 files="${files} config/nm-empty.h"
606 links="${links} nm.h"
607 fi
608 # start-sanitize-gdbtk
609
610 # Make it possible to use the GUI without doing a full install
611 if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
612 files="${files} gdbtk.tcl"
613 links="${links} gdbtk.tcl"
614 fi
615 # end-sanitize-gdbtk
616
617 AC_LINK_FILES($files, $links)
618
619 AC_CONFIG_SUBDIRS($configdirs)
620 AC_OUTPUT(Makefile,
621 [
622 dnl Autoconf doesn't provide a mechanism for modifying definitions
623 dnl provided by makefile fragments.
624 dnl
625 if test "${nativefile}" = ""; then
626 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
627 < Makefile > Makefile.tem
628 mv -f Makefile.tem Makefile
629 fi
630
631 changequote(,)dnl
632 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
633 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
634 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
635 mv -f Makefile.tmp Makefile
636 changequote([,])dnl
637
638 case ${srcdir} in
639 .)
640 ;;
641 *)
642 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
643 echo "source ${srcdir}/.gdbinit" >> .gdbinit
644 esac
645 ],
646 [
647 gdb_host_cpu=$gdb_host_cpu
648 gdb_target_cpu=$gdb_target_cpu
649 nativefile=$nativefile
650 ])
651
652 exit 0
This page took 0.063914 seconds and 5 git commands to generate.