Commit | Line | Data |
---|---|---|
5436fc65 C |
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) | |
6ec7e4d3 | 64 | |
bc028766 | 65 | |
6ec7e4d3 SS |
66 | configdirs="doc testsuite" |
67 | ||
5436fc65 C |
68 | dnl |
69 | changequote(,)dnl | |
0df06ca0 | 70 | |
1a0edbc7 FF |
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 ;; | |
7382b3b1 | 78 | i[345]86) gdb_host_cpu=i386 ;; |
1a0edbc7 | 79 | m68*) gdb_host_cpu=m68k ;; |
6ec7e4d3 | 80 | m88*) gdb_host_cpu=m88k ;; |
1a0edbc7 FF |
81 | np1) gdb_host_cpu=gould ;; |
82 | pyramid) gdb_host_cpu=pyr ;; | |
c7b44b04 | 83 | powerpc*) gdb_host_cpu=powerpc ;; |
1a0edbc7 FF |
84 | *) gdb_host_cpu=$host_cpu ;; |
85 | ||
86 | esac | |
87 | ||
6c815bbe RP |
88 | # map host info into gdb names. |
89 | ||
19758e9e | 90 | case "${host}" in |
6c815bbe | 91 | |
19758e9e JG |
92 | a29k-*-*) gdb_host=ultra3 ;; |
93 | ||
2592eef8 PS |
94 | alpha-*-osf1*) gdb_host=alpha-osf1 ;; |
95 | alpha-*-osf[23456789]*) gdb_host=alpha-osf2 ;; | |
7ccb1e44 | 96 | |
19758e9e JG |
97 | arm-*-*) gdb_host=arm ;; |
98 | ||
99 | c[12]-*-*) gdb_host=convex ;; | |
100 | ||
e8e13040 | 101 | hppa*-*-bsd*) gdb_host=hppabsd ;; |
e8e13040 | 102 | hppa*-*-hiux*) gdb_host=hppahpux ;; |
6ec7e4d3 | 103 | hppa*-*-hpux*) gdb_host=hppahpux ;; |
2d2959e8 | 104 | hppa*-*-osf*) gdb_host=hppaosf ;; |
19758e9e | 105 | |
7382b3b1 ILT |
106 | i[345]86-ncr-*) gdb_host=ncr3000 ;; |
107 | i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix | |
108 | i[345]86-sequent-sysv4*) gdb_host=ptx4 ;; | |
109 | i[345]86-sequent-sysv*) gdb_host=ptx ;; | |
110 | i[345]86-*-aix*) gdb_host=i386aix ;; | |
111 | i[345]86-*-bsd*) gdb_host=i386bsd ;; | |
151d7f0a | 112 | i[345]86-*-freebsd*) gdb_host=fbsd ;; |
b40fa612 | 113 | i[345]86-*-netbsd*) gdb_host=nbsd ;; |
7382b3b1 ILT |
114 | i[345]86-*-go32*) gdb_host=go32 ;; |
115 | i[345]86-*-linux*) gdb_host=linux ;; | |
116 | i[345]86-*-lynxos*) gdb_host=i386lynx ;; | |
117 | i[345]86-*-mach3*) gdb_host=i386m3 ;; | |
118 | i[345]86-*-mach*) gdb_host=i386mach ;; | |
119 | i[345]86-*-osf1mk*) gdb_host=osf1mk ;; | |
120 | i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;; | |
121 | i[345]86-*-sco*) gdb_host=i386sco ;; | |
122 | i[345]86-*-solaris*) gdb_host=i386sol2 ;; | |
123 | i[345]86-*-sunos*) gdb_host=sun386 ;; | |
124 | i[345]86-*-sysv3.2*) gdb_host=i386v32 ;; | |
125 | i[345]86-*-sysv32*) gdb_host=i386v32 ;; | |
126 | i[345]86-*-sysv4*) gdb_host=i386v4 ;; | |
127 | i[345]86-*-unixware) gdb_host=i386v4 ;; | |
128 | i[345]86-*-sysv*) gdb_host=i386v ;; | |
129 | i[345]86-*-isc*) gdb_host=i386v32 ;; | |
130 | i[345]86-*-os9k) gdb_host=i386os9k ;; | |
19758e9e | 131 | |
358ca35e JG |
132 | m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;; |
133 | m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;; | |
ef131e13 | 134 | m68030-sony-*) gdb_host=news1000 ;; |
19758e9e | 135 | |
358ca35e JG |
136 | m68*-altos-*) gdb_host=altos ;; |
137 | m68*-apollo*-sysv*) gdb_host=apollo68v ;; | |
138 | m68*-apollo*-bsd*) gdb_host=apollo68b ;; | |
139 | m68*-att-*) gdb_host=3b1 ;; | |
0a8f1742 | 140 | m68*-bull*-sysv*) gdb_host=dpx2 ;; |
8f59e92b FF |
141 | m68*-hp-bsd*) gdb_host=hp300bsd ;; |
142 | m68*-hp-hpux*) gdb_host=hp300hpux ;; | |
358ca35e | 143 | m68*-isi-*) gdb_host=isi ;; |
9bebe500 | 144 | m68*-*-lynxos*) gdb_host=m68klynx ;; |
670a8e09 | 145 | m68*-*-sysv4*) gdb_host=m68kv4 ;; |
c649a7c2 | 146 | m68*-motorola-*) gdb_host=delta68 ;; |
358ca35e JG |
147 | m68*-sony-*) gdb_host=news ;; |
148 | m68*-sun-sunos3*) gdb_host=sun3os3 ;; | |
149 | m68*-sun-sunos4*) gdb_host=sun3os4 ;; | |
150 | m68*-sun-*) gdb_host=sun3os4 ;; | |
19758e9e | 151 | |
670a8e09 | 152 | m88*-harris-cxux*) gdb_host=cxux ;; |
304977ab JK |
153 | m88*-motorola-sysv4*) gdb_host=delta88v4 ;; |
154 | m88*-motorola-sysv*) gdb_host=delta88 ;; | |
6ec7e4d3 | 155 | m88*-*-mach3*) gdb_host=mach3 ;; |
304977ab | 156 | m88*-*-*) gdb_host=m88k ;; |
19758e9e | 157 | |
6ec7e4d3 | 158 | mips-dec-mach3*) gdb_host=mach3 ;; |
19758e9e JG |
159 | mips-dec-*) gdb_host=decstation ;; |
160 | mips-little-*) gdb_host=littlemips ;; | |
3b891e0b | 161 | mips-sgi-irix3*) gdb_host=irix3 ;; |
81029114 | 162 | mips-sgi-irix4*) gdb_host=irix4 ;; |
e03c0cc6 | 163 | mips-sgi-irix5*) gdb_host=irix5 ;; |
b487ba2e | 164 | mips-sony-*) gdb_host=news-mips ;; |
6ec7e4d3 | 165 | mips-*-mach3*) gdb_host=mach3 ;; |
2fe3b329 | 166 | mips-*-sysv4*) gdb_host=mipsv4 ;; |
ee06f230 | 167 | mips-*-sysv*) gdb_host=riscos ;; |
e8f8e093 | 168 | mips-*-riscos*) gdb_host=riscos ;; |
19758e9e JG |
169 | |
170 | none-*-*) gdb_host=none ;; | |
ef131e13 | 171 | |
19758e9e JG |
172 | np1-*-*) gdb_host=np1 ;; |
173 | ||
6ec7e4d3 | 174 | ns32k-*-mach3*) gdb_host=mach3 ;; |
84f652b1 | 175 | ns32k-*-netbsd*) gdb_host=nbsd ;; |
19758e9e | 176 | ns32k-umax-*) gdb_host=umax ;; |
3b891e0b | 177 | ns32k-utek-sysv*) gdb_host=merlin ;; |
19758e9e | 178 | |
19758e9e JG |
179 | pn-*-*) gdb_host=pn ;; |
180 | ||
181 | pyramid-*-*) gdb_host=pyramid ;; | |
182 | ||
183 | romp-*-*) gdb_host=rtbsd ;; | |
184 | ||
d87d7b10 | 185 | rs6000-*-lynxos*) gdb_host=rs6000lynx ;; |
19758e9e JG |
186 | rs6000-*-*) gdb_host=rs6000 ;; |
187 | ||
9bebe500 | 188 | sparc-*-lynxos*) gdb_host=sparclynx ;; |
331d515a | 189 | sparc-*-netbsd*) gdb_host=nbsd ;; |
ef131e13 | 190 | sparc-*-solaris2*) gdb_host=sun4sol2 ;; |
ebb3a1e5 | 191 | sparc-*-sunos4*) gdb_host=sun4os4 ;; |
1e1dd175 | 192 | sparc-*-sunos5*) gdb_host=sun4sol2 ;; |
b52373a2 | 193 | sparc-*-*) gdb_host=sun4os4 ;; |
19758e9e JG |
194 | |
195 | tahoe-*-*) gdb_host=tahoe ;; | |
196 | ||
197 | vax-*-bsd*) gdb_host=vaxbsd ;; | |
6985bc54 | 198 | vax-*-ultrix2*) gdb_host=vaxult2 ;; |
19758e9e | 199 | vax-*-ultrix*) gdb_host=vaxult ;; |
7da1e27d | 200 | |
d723ade7 SC |
201 | w65-*-*) gdb_host=w65 ;; |
202 | ||
6c815bbe RP |
203 | esac |
204 | ||
8c7ae4a2 | 205 | |
1a0edbc7 FF |
206 | # Map target cpu into the config cpu subdirectory name. |
207 | # The default is $target_cpu. | |
208 | ||
209 | case "${target_cpu}" in | |
210 | ||
cef4c2e7 | 211 | alpha) gdb_target_cpu=alpha ;; |
1a0edbc7 FF |
212 | c[12]) gdb_target_cpu=convex ;; |
213 | hppa*) gdb_target_cpu=pa ;; | |
7382b3b1 | 214 | i[345]86) gdb_target_cpu=i386 ;; |
1a0edbc7 | 215 | m68*) gdb_target_cpu=m68k ;; |
6ec7e4d3 | 216 | m88*) gdb_target_cpu=m88k ;; |
b60f6584 | 217 | mips*) gdb_target_cpu=mips ;; |
1a0edbc7 | 218 | np1) gdb_target_cpu=gould ;; |
c7b44b04 | 219 | powerpc*) gdb_target_cpu=powerpc ;; |
1a0edbc7 FF |
220 | pn) gdb_target_cpu=gould ;; |
221 | pyramid) gdb_target_cpu=pyr ;; | |
2c30f258 | 222 | sparclite*) gdb_target_cpu=sparc |
5436fc65 | 223 | configdirs="${configdirs} sparclite" ;; |
0c101d49 | 224 | sparc*) gdb_target_cpu=sparc ;; |
1a0edbc7 FF |
225 | *) gdb_target_cpu=$target_cpu ;; |
226 | ||
227 | esac | |
228 | ||
229 | # map target info into gdb names. | |
230 | ||
ef131e13 JG |
231 | case "${target}" in |
232 | ||
3b891e0b JK |
233 | a29k-*-aout*) gdb_target=a29k ;; |
234 | a29k-*-coff*) gdb_target=a29k ;; | |
235 | a29k-*-elf*) gdb_target=a29k ;; | |
236 | a29k-*-ebmon*) gdb_target=a29k ;; | |
237 | a29k-*-kern*) gdb_target=a29k-kern ;; | |
238 | a29k-*-none*) gdb_target=a29k ;; | |
239 | a29k-*-sym1*) gdb_target=ultra3 ;; | |
240 | a29k-*-udi*) gdb_target=a29k-udi ;; | |
83d9bb14 | 241 | a29k-*-vxworks*) gdb_target=vx29k ;; |
ef131e13 | 242 | |
cef4c2e7 | 243 | alpha-*-osf*) gdb_target=alpha-osf1 ;; |
6ec7e4d3 | 244 | |
c1ac88f9 | 245 | # start-sanitize-arc |
83d9bb14 | 246 | arc-*-*) gdb_target=arc ;; |
c1ac88f9 DE |
247 | # end-sanitize-arc |
248 | ||
ef131e13 JG |
249 | arm-*-*) gdb_target=arm ;; |
250 | ||
251 | c1-*-*) gdb_target=convex ;; | |
252 | c2-*-*) gdb_target=convex ;; | |
253 | ||
254 | h8300-*-*) gdb_target=h8300hms ;; | |
195e46ea | 255 | h8500-*-*) gdb_target=h8500hms ;; |
ef131e13 | 256 | |
9faacb92 SC |
257 | sh-*-*) gdb_target=sh ;; |
258 | ||
03c4ce2f MT |
259 | # start-sanitize-r16 |
260 | r16-*-*) gdb_target=r16 ;; | |
261 | # end-sanitize-r16 | |
262 | ||
8f59e92b | 263 | hppa*-*-bsd*) gdb_target=hppabsd ;; |
cc5702bd | 264 | hppa*-*-pro*) gdb_target=hppapro ;; |
8f59e92b | 265 | hppa*-*-hpux*) gdb_target=hppahpux ;; |
7079e766 | 266 | hppa*-*-hiux*) gdb_target=hppahpux ;; |
6bfd168c | 267 | hppa*-*-osf*) gdb_target=hppaosf ;; |
ef131e13 | 268 | |
7382b3b1 ILT |
269 | i[345]86-sequent-bsd*) gdb_target=symmetry ;; |
270 | i[345]86-sequent-sysv4*) gdb_target=ptx4 ;; | |
271 | i[345]86-sequent-sysv*) gdb_target=ptx ;; | |
272 | i[345]86-ncr-*) gdb_target=ncr3000 ;; | |
273 | i[345]86-*-aout*) gdb_target=i386aout ;; | |
274 | i[345]86-*-coff*) gdb_target=i386v ;; | |
275 | i[345]86-*-elf*) gdb_target=i386v ;; | |
276 | i[345]86-*-aix*) gdb_target=i386aix ;; | |
277 | i[345]86-*-bsd*) gdb_target=i386bsd ;; | |
151d7f0a | 278 | i[345]86-*-freebsd*) gdb_target=fbsd ;; |
b40fa612 | 279 | i[345]86-*-netbsd*) gdb_target=nbsd ;; |
7382b3b1 ILT |
280 | i[345]86-*-os9k) gdb_target=i386os9k ;; |
281 | i[345]86-*-go32*) gdb_target=i386aout ;; | |
282 | i[345]86-*-lynxos*) gdb_target=i386lynx | |
5436fc65 | 283 | configdirs="${configdirs} gdbserver" ;; |
7382b3b1 ILT |
284 | i[345]86-*-solaris*) gdb_target=i386sol2 ;; |
285 | i[345]86-*-sunos*) gdb_target=sun386 ;; | |
286 | i[345]86-*-sysv4*) gdb_target=i386v4 ;; | |
287 | i[345]86-*-sco*) gdb_target=i386v ;; | |
288 | i[345]86-*-sysv*) gdb_target=i386v ;; | |
289 | i[345]86-*-linux*) gdb_target=linux ;; | |
290 | i[345]86-*-isc*) gdb_target=i386v ;; | |
291 | i[345]86-*-mach3*) gdb_target=i386m3 ;; | |
292 | i[345]86-*-mach*) gdb_target=i386mach ;; | |
293 | i[345]86-*-netware*) gdb_target=i386nw | |
5436fc65 | 294 | configdirs="${configdirs} nlm" ;; |
7382b3b1 | 295 | i[345]86-*-osf1mk*) gdb_target=i386mk ;; |
ef131e13 | 296 | |
3b891e0b JK |
297 | i960-*-bout*) gdb_target=vxworks960 ;; |
298 | i960-*-coff*) gdb_target=nindy960 ;; | |
299 | i960-*-elf*) gdb_target=nindy960 ;; | |
ebb3a1e5 | 300 | |
3b891e0b JK |
301 | i960-*-nindy*) gdb_target=nindy960 ;; |
302 | i960-*-vxworks*) gdb_target=vxworks960 ;; | |
ef131e13 | 303 | |
ebb3a1e5 JG |
304 | m68000-*-sunos3*) gdb_target=sun2os3 ;; |
305 | m68000-*-sunos4*) gdb_target=sun2os4 ;; | |
ef131e13 | 306 | |
835fe6e6 | 307 | m68*-apollo*-bsd*) gdb_target=apollo68b ;; |
6ec7e4d3 | 308 | m68*-bull-sysv*) gdb_target=dpx2 ;; |
6ec7e4d3 SS |
309 | m68*-hp-bsd*) gdb_target=hp300bsd ;; |
310 | m68*-hp-hpux*) gdb_target=hp300hpux ;; | |
670a8e09 SS |
311 | m68*-altos-*) gdb_target=altos ;; |
312 | m68*-att-*) gdb_target=3b1 ;; | |
313 | m68*-cisco*-*) gdb_target=cisco ;; | |
314 | m68*-ericsson-*) gdb_target=es1800 ;; | |
358ca35e | 315 | m68*-isi-*) gdb_target=isi ;; |
c649a7c2 | 316 | m68*-motorola-*) gdb_target=delta68 ;; |
358ca35e JG |
317 | m68*-netx-*) gdb_target=vxworks68 ;; |
318 | m68*-sony-*) gdb_target=news ;; | |
319 | m68*-tandem-*) gdb_target=st2000 ;; | |
c1128340 RS |
320 | m68*-rom68k-*) gdb_target=monitor ;; |
321 | m68*-*bug-*) gdb_target=monitor ;; | |
322 | m68*-monitor-*) gdb_target=monitor ;; | |
a25a9f49 | 323 | m68*-est-*) gdb_target=est ;; |
0ffba029 RS |
324 | m68*-*-aout*) gdb_target=monitor ;; |
325 | m68*-*-coff*) gdb_target=monitor ;; | |
326 | m68*-*-elf*) gdb_target=monitor ;; | |
9bebe500 | 327 | m68*-*-lynxos*) gdb_target=m68klynx |
5436fc65 | 328 | configdirs="${configdirs} gdbserver" ;; |
3b891e0b | 329 | m68*-*-os68k*) gdb_target=os68k ;; |
358ca35e JG |
330 | m68*-*-sunos3*) gdb_target=sun3os3 ;; |
331 | m68*-*-sunos4*) gdb_target=sun3os4 ;; | |
670a8e09 | 332 | m68*-*-sysv4*) gdb_target=m68kv4 ;; |
358ca35e | 333 | m68*-*-vxworks*) gdb_target=vxworks68 ;; |
ef131e13 | 334 | |
670a8e09 | 335 | m88*-harris-cxux*) gdb_target=cxux ;; |
f9440640 | 336 | m88*-motorola-sysv4*) gdb_target=delta88v4 ;; |
6ec7e4d3 | 337 | m88*-*-mach3*) gdb_target=mach3 ;; |
304977ab JK |
338 | m88*-motorola-*) gdb_target=delta88 ;; |
339 | m88*-*-*) gdb_target=m88k ;; | |
ef131e13 | 340 | |
70126bf9 | 341 | mips64*-big-*) gdb_target=bigmips64 ;; |
b60f6584 | 342 | mips*-big-*) gdb_target=bigmips ;; |
6ec7e4d3 | 343 | mips*-dec-mach3*) gdb_target=mach3 ;; |
b60f6584 | 344 | mips*-dec-*) gdb_target=decstation ;; |
70126bf9 KH |
345 | mips64*el-*-ecoff*) gdb_target=idtl64 ;; |
346 | mips64*-idt-ecoff*) gdb_target=idt64 ;; | |
347 | mips64*el-*-elf*) gdb_target=idtl64 ;; | |
348 | mips64*-*-elf*) gdb_target=idt64 ;; | |
b60f6584 | 349 | mips*el-*-ecoff*) gdb_target=idtl ;; |
2e1b3b03 | 350 | mips*-*-ecoff*) gdb_target=idt ;; |
b60f6584 ILT |
351 | mips*el-*-elf*) gdb_target=idtl ;; |
352 | mips*-*-elf*) gdb_target=idt ;; | |
353 | mips*-little-*) gdb_target=littlemips ;; | |
354 | mips*-sgi-irix5*) gdb_target=irix5 ;; | |
355 | mips*-sgi-*) gdb_target=irix3 ;; | |
356 | mips*-sony-*) gdb_target=bigmips ;; | |
6ec7e4d3 | 357 | mips*-*-mach3*) gdb_target=mach3 ;; |
2fe3b329 | 358 | mips*-*-sysv4*) gdb_target=mipsv4 ;; |
b60f6584 ILT |
359 | mips*-*-sysv*) gdb_target=bigmips ;; |
360 | mips*-*-riscos*) gdb_target=bigmips ;; | |
ef131e13 JG |
361 | |
362 | none-*-*) gdb_target=none ;; | |
363 | ||
364 | np1-*-*) gdb_target=np1 ;; | |
365 | ||
6ec7e4d3 | 366 | ns32k-*-mach3*) gdb_target=mach3 ;; |
84f652b1 | 367 | ns32k-*-netbsd*) gdb_target=nbsd ;; |
3b891e0b | 368 | ns32k-utek-sysv*) gdb_target=merlin ;; |
ef131e13 JG |
369 | ns32k-utek-*) gdb_target=umax ;; |
370 | ||
371 | pn-*-*) gdb_target=pn ;; | |
b7da2494 SG |
372 | powerpc-*-netware*) gdb_target=ppc-nw |
373 | configdirs="${configdirs} nlm" ;; | |
ef131e13 | 374 | |
97544048 MM |
375 | powerpc-*-eabi*) gdb_target=ppc-eabi |
376 | configdirs="${configdirs}" ;; | |
377 | ||
c7b44b04 MM |
378 | powerpcle-*-eabi*) gdb_target=ppcle-eabi |
379 | configdirs="${configdirs}" ;; | |
380 | ||
ef131e13 JG |
381 | pyramid-*-*) gdb_target=pyramid ;; |
382 | ||
d87d7b10 | 383 | rs6000-*-lynxos*) gdb_target=rs6000lynx ;; |
ef131e13 JG |
384 | rs6000-*-*) gdb_target=rs6000 ;; |
385 | ||
3b891e0b JK |
386 | sparc-*-aout*) gdb_target=sparc-em ;; |
387 | sparc-*-coff*) gdb_target=sparc-em ;; | |
388 | sparc-*-elf*) gdb_target=sparc-em ;; | |
9bebe500 | 389 | sparc-*-lynxos*) gdb_target=sparclynx |
5436fc65 | 390 | configdirs="${configdirs} gdbserver" ;; |
331d515a | 391 | sparc-*-netbsd*) gdb_target=nbsd ;; |
ef131e13 | 392 | sparc-*-solaris2*) gdb_target=sun4sol2 ;; |
ebb3a1e5 | 393 | sparc-*-sunos4*) gdb_target=sun4os4 ;; |
1e1dd175 | 394 | sparc-*-sunos5*) gdb_target=sun4sol2 ;; |
54d44c8c | 395 | sparc-*-vxworks*) gdb_target=vxsparc ;; |
b52373a2 | 396 | sparc-*-*) gdb_target=sun4os4 ;; |
0c101d49 | 397 | sparclite*-*-*) gdb_target=sparclite ;; |
6ec7e4d3 | 398 | sparc64-*-*) gdb_target=sp64 ;; |
ef131e13 JG |
399 | |
400 | tahoe-*-*) gdb_target=tahoe ;; | |
6ec7e4d3 | 401 | |
ef131e13 | 402 | vax-*-*) gdb_target=vax ;; |
6c815bbe | 403 | |
d723ade7 SC |
404 | w65-*-*) gdb_target=w65 ;; |
405 | ||
3b891e0b JK |
406 | z8k-*-sim*) gdb_target=z8ksim ;; |
407 | z8k-*-coff*) gdb_target=z8ksim ;; | |
6ec7e4d3 | 408 | |
6c815bbe RP |
409 | esac |
410 | ||
5436fc65 C |
411 | dnl |
412 | changequote([,])dnl | |
413 | ||
414 | ||
415 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
416 | if test ! -f ${host_makefile_frag}; then | |
417 | AC_MSG_ERROR("*** Gdb does not support host ${host}") | |
912e0732 RP |
418 | fi |
419 | ||
5436fc65 C |
420 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt |
421 | if test ! -f ${target_makefile_frag}; then | |
422 | AC_MSG_ERROR("*** Gdb does not support target ${target}") | |
912e0732 RP |
423 | fi |
424 | ||
5436fc65 C |
425 | dnl We have to assign the same value to other variables because autoconf |
426 | dnl doesn't provide a mechanism to substitute a replacement keyword with | |
427 | dnl arbitrary data or pathnames. | |
428 | dnl | |
429 | host_makefile_frag_path=$host_makefile_frag | |
430 | target_makefile_frag_path=$target_makefile_frag | |
431 | AC_SUBST(host_makefile_frag_path) | |
432 | AC_SUBST(target_makefile_frag_path) | |
433 | AC_SUBST_FILE(host_makefile_frag) | |
434 | AC_SUBST_FILE(target_makefile_frag) | |
435 | ||
436 | ||
437 | # We really shouldn't depend on there being a space after XM_FILE= ... | |
438 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' ${host_makefile_frag}` | |
912e0732 | 439 | |
5436fc65 C |
440 | # We really shouldn't depend on there being a space after TM_FILE= ... |
441 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' ${target_makefile_frag}` | |
79f68f0f DZ |
442 | |
443 | # these really aren't orthogonal true/false values of the same condition, | |
444 | # but shells are slow enough that I like to reuse the test conditions | |
445 | # whenever possible | |
5436fc65 C |
446 | if test "${target}" = "${host}"; then |
447 | nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' ${host_makefile_frag}` | |
79f68f0f | 448 | else |
5436fc65 C |
449 | # GDBserver is only useful in a "native" enviroment |
450 | configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
d40309c7 JG |
451 | fi |
452 | ||
d40309c7 | 453 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
6573c898 | 454 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the |
d40309c7 JG |
455 | # corresponding links. But we have to remove the xm.h files and tm.h |
456 | # files anyway, e.g. when switching from "configure host" to | |
457 | # "configure none". | |
458 | ||
bdf3621b JG |
459 | files= |
460 | links= | |
dc0c3f64 | 461 | rm -f xm.h |
5436fc65 C |
462 | if test "${hostfile}" != ""; then |
463 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
464 | links="${links} xm.h" | |
bdf3621b | 465 | fi |
dc0c3f64 | 466 | rm -f tm.h |
5436fc65 C |
467 | if test "${targetfile}" != ""; then |
468 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
469 | links="${links} tm.h" | |
bdf3621b | 470 | fi |
1a0edbc7 | 471 | rm -f nm.h |
5436fc65 C |
472 | if test "${nativefile}" != ""; then |
473 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
474 | links="${links} nm.h" | |
c9c23412 | 475 | else |
5436fc65 C |
476 | # A cross-only configuration. |
477 | files="${files} config/nm-empty.h" | |
478 | links="${links} nm.h" | |
d40309c7 | 479 | fi |
d3d75ec9 | 480 | # start-sanitize-gdbtk |
912e0732 | 481 | |
5436fc65 C |
482 | # Make it possible to use the GUI without doing a full install |
483 | if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then | |
484 | files="${files} gdbtk.tcl" | |
485 | links="${links} gdbtk.tcl" | |
754e5da2 | 486 | fi |
d3d75ec9 | 487 | # end-sanitize-gdbtk |
754e5da2 | 488 | |
5436fc65 C |
489 | AC_LINK_FILES($files, $links) |
490 | ||
491 | AC_CONFIG_SUBDIRS($configdirs) | |
492 | AC_OUTPUT(Makefile, | |
493 | [ | |
494 | dnl Autoconf doesn't provide a mechanism for modifying definitions | |
495 | dnl provided by makefile fragments. | |
496 | dnl | |
497 | if test "${nativefile}" = ""; then | |
498 | sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \ | |
499 | < Makefile > Makefile.tem | |
500 | mv -f Makefile.tem Makefile | |
33bc979d SS |
501 | fi |
502 | ||
5436fc65 | 503 | changequote(,)dnl |
94d4b713 JK |
504 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, |
505 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
506 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
507 | mv -f Makefile.tmp Makefile | |
5436fc65 C |
508 | changequote([,])dnl |
509 | ||
510 | case ${srcdir} in | |
511 | .) | |
512 | ;; | |
513 | *) | |
514 | grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \ | |
515 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
516 | esac | |
0a5a1821 C |
517 | ], |
518 | [ | |
519 | gdb_host_cpu=$gdb_host_cpu | |
520 | gdb_target_cpu=$gdb_target_cpu | |
521 | nativefile=$nativefile | |
5436fc65 | 522 | ]) |