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