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