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