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