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