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