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