]>
Commit | Line | Data |
---|---|---|
6d5460ab | 1 | # This file is configure.in |
79a54a5b | 2 | # |
1c11ab0e | 3 | # Copyright (C) 1987-1992,1993,1994 Free Software Foundation, Inc. |
8cac6ca6 | 4 | # |
79a54a5b | 5 | # This file is part of GAS, the GNU Assembler. |
8cac6ca6 | 6 | # |
79a54a5b RP |
7 | # GAS is free software; you can redistribute it and/or modify |
8 | # it under the terms of the GNU General Public License as published by | |
9 | # the Free Software Foundation; either version 2, or (at your option) | |
10 | # any later version. | |
8cac6ca6 | 11 | # |
79a54a5b RP |
12 | # GAS is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
8cac6ca6 | 16 | # |
79a54a5b RP |
17 | # You should have received a copy of the GNU General Public License |
18 | # along with GAS; see the file COPYING. If not, write to | |
19 | # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | # | |
21 | ||
8c1b25e4 RP |
22 | # This file was written, and is maintained by K. Richard Pixley |
23 | # <[email protected]>. | |
24 | ||
fecd2382 RP |
25 | # This file is a shell script that supplies the information necessary |
26 | # to tailor a template configure script into the configure script | |
27 | # appropriate for this directory. For more information, check any | |
28 | # existing configure script. | |
29 | ||
30 | srctrigger=as.c | |
31 | srcname="gas" | |
4f6f4aa8 | 32 | need_bfd=no |
7cf4d7ff | 33 | bfd_gas=no |
f70a4714 | 34 | configdirs="doc testsuite" |
1058238c | 35 | |
353deb84 RP |
36 | # per-host: |
37 | ||
b678740d | 38 | gas_host=generic |
fecd2382 | 39 | |
984cf2d7 | 40 | case "${host}" in |
7cf4d7ff KR |
41 | a29k-*-*) gas_host=a29k ;; |
42 | ||
cb0b800b SC |
43 | alpha-*-osf*) gas_host=ansi ;; |
44 | ||
a8285504 | 45 | hppa*-hp-hpux*) gas_host=hpux ;; |
47fcc4f5 ILT |
46 | hppa*-hp-bsd*) gas_host=hppabsd ;; |
47 | hppa*-hp-osf*) gas_host=hppaosf ;; | |
f8693e71 | 48 | hppa*-*-hiux*) gas_host=hpux ;; |
7cf4d7ff KR |
49 | |
50 | i[34]86-ibm-aix*) gas_host=i386aix ;; | |
51 | i[34]86-*-isc*) gas_host=sysv ;; | |
52 | i386-sun-sunos*) gas_host=sun386 ;; | |
c535f6bc | 53 | i386-*-mach*) gas_host=mach3 ;; |
7cf4d7ff KR |
54 | |
55 | m68k-sun-sunos*) gas_host=sun3 ;; | |
56 | m68*-*-hpux) gas_host=hpux ;; | |
57 | ||
5f8a3788 DHW |
58 | mips*-dec-ultrix*) gas_host=decstatn ;; |
59 | mips*-*-bsd*) gas_host=mipsbsd ;; | |
60 | mips*-sgi-irix*) gas_host=irix ;; | |
7cf4d7ff KR |
61 | |
62 | rs6000-*-*) gas_host=rs6000 ;; | |
63 | ||
64 | sparc-sun-sunos*) gas_host=sun4 ;; | |
65 | sparc-sun-solaris2*) gas_host=sysv ;; | |
66 | ||
67 | vax-*-vms*) gas_host=vms ;; | |
68 | vax-*-bsd*) gas_host=vax ;; | |
5677c028 | 69 | vax-*-ultrix*) gas_host=vax ;; |
7cf4d7ff | 70 | |
5f8a3788 | 71 | *-*-sysv4* | *-*-unixware) gas_host=sysv ;; |
8cac6ca6 | 72 | |
5677c028 | 73 | *-*-ansi | *-*-hpux | *-*-sysv) |
7cf4d7ff KR |
74 | gas_host=${host_os} ;; |
75 | ||
74cc5508 RP |
76 | esac |
77 | ||
7cf4d7ff KR |
78 | if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then |
79 | echo '*** GAS does not support host' ${host} 1>&2 | |
80 | exit 1 | |
81 | fi | |
82 | ||
b678740d RP |
83 | # per-target: |
84 | ||
4f6f4aa8 KR |
85 | case ${with_bfd_assembler} in |
86 | yes) | |
7cf4d7ff | 87 | echo "*** Warning: GAS BFD configuration option not yet fully supported" 1>&2 |
4f6f4aa8 KR |
88 | need_bfd=yes |
89 | bfd_gas=yes | |
90 | ;; | |
91 | no | "") | |
92 | ;; | |
93 | *) | |
7cf4d7ff | 94 | echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2 |
4f6f4aa8 KR |
95 | exit 1 |
96 | ;; | |
97 | esac | |
98 | ||
b678740d RP |
99 | # assign cpu type |
100 | emulation=generic | |
101 | ||
5f8a3788 DHW |
102 | # default is big |
103 | endian=big | |
104 | ||
b53ccaac ILT |
105 | # check for architecture variants |
106 | case ${target_cpu} in | |
7cf4d7ff KR |
107 | # Actually we've only got support for the 1.1, so we shouldn't generalize, |
108 | # but this is what the support files are named... | |
8cac6ca6 KR |
109 | hppa*) cpu_type=hppa ;; |
110 | i486) cpu_type=i386 ;; | |
111 | m680[01234]0) cpu_type=m68k ;; | |
112 | m68008) cpu_type=m68k ;; | |
113 | m683??) cpu_type=m68k ;; | |
114 | m8*) cpu_type=m88k ;; | |
5f8a3788 | 115 | mips*el) cpu_type=mips endian=little;; |
8cac6ca6 | 116 | mips*) cpu_type=mips ;; |
5e65fbc8 | 117 | powerpc*) cpu_type=ppc ;; |
1c11ab0e | 118 | rs6000*) cpu_type=ppc ;; |
8cac6ca6 KR |
119 | sparc64) cpu_type=sparc64 obj_format=elf ;; # v9 |
120 | sparclite*) cpu_type=sparc ;; | |
7cf4d7ff | 121 | *) cpu_type=${target_cpu} ;; |
b53ccaac ILT |
122 | esac |
123 | ||
124 | gas_target=${cpu_type} | |
f70a4714 | 125 | generic_target=${cpu_type}-${target_vendor}-${target_os} |
8cac6ca6 KR |
126 | dev=no |
127 | ||
74cc5508 | 128 | # assign object format |
f70a4714 | 129 | case ${generic_target} in |
7cf4d7ff KR |
130 | a29k-amd-udi) obj_format=coffbfd gas_target=ebmon29k ;; |
131 | a29k-amd-ebmon) obj_format=coffbfd gas_target=ebmon29k ;; | |
132 | a29k-amd-ebmonold) obj_format=coff gas_target=ebmon29k ;; | |
133 | ||
c25be7f4 | 134 | alpha-*-netware*) obj_format=ecoff ;; |
34de45f9 | 135 | alpha-*-osf*) obj_format=ecoff ;; |
816153a3 | 136 | |
c25be7f4 KR |
137 | hppa-*-*elf*) obj_format=elf emulation=hppa ;; |
138 | hppa-*-osf*) obj_format=som emulation=hppa ;; | |
7cf4d7ff | 139 | hppa-*-hpux*) obj_format=som emulation=hppa ;; |
5f8a3788 | 140 | hppa-*-bsd*) obj_format=som emulation=hppa ;; |
f8693e71 | 141 | hppa-*-hiux*) obj_format=som emulation=hppa ;; |
7cf4d7ff | 142 | |
8f4b9142 DZ |
143 | h8300-*-coff) obj_format=coffbfd ;; |
144 | ||
7cf4d7ff KR |
145 | i386-ibm-aix*) obj_format=coffbfd gas_target=i386coff |
146 | emulation=i386aix ;; | |
147 | i386-*-bsd*) obj_format=aout emulation=386bsd ;; | |
420065a5 KR |
148 | i386-*-netbsd0.8) obj_format=aout emulation=netbsd ;; |
149 | i386-*-netbsd*) obj_format=aout emulation=netbsd ;; | |
8cac6ca6 KR |
150 | i386-*-linux*elf*) obj_format=elf emulation=linux ;; |
151 | i386-*-linux*coff*) obj_format=coffbfd emulation=linux | |
152 | gas_target=i386coff ;; | |
7cf4d7ff | 153 | i386-*-linux*) obj_format=aout emulation=linux ;; |
8cac6ca6 KR |
154 | i386-*-lynxos*) obj_format=coffbfd gas_target=i386coff |
155 | emulation=lynx ;; | |
156 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf) | |
157 | obj_format=elf ;; | |
158 | i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) | |
159 | obj_format=coffbfd gas_target=i386coff ;; | |
420065a5 | 160 | i386-*-vsta) obj_format=aout ;; |
7cf4d7ff | 161 | i386-*-go32) obj_format=aout ;; |
c535f6bc | 162 | i386-*-mach*) obj_format=aout emulation=mach bfd_gas=yes ;; |
7cf4d7ff | 163 | |
c25be7f4 | 164 | i960-*-bout) obj_format=bout ;; |
c535f6bc | 165 | i960-*-coff) obj_format=coffbfd emulation=ic960 gas_target=ic960coff ;; |
c25be7f4 KR |
166 | i960-*-nindy*) obj_format=bout ;; |
167 | i960-*-vxworks4*) obj_format=bout ;; | |
168 | i960-*-vxworks5.0) obj_format=bout ;; | |
c535f6bc | 169 | i960-*-vxworks5.*) obj_format=coffbfd emulation=ic960 gas_target=ic960coff ;; |
c25be7f4 | 170 | i960-*-vxworks*) obj_format=bout ;; |
7cf4d7ff | 171 | |
8cac6ca6 | 172 | m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*) |
7cf4d7ff | 173 | obj_format=aout emulation=sun3 ;; |
8cac6ca6 | 174 | m68k-*-coff | m68k-*-sysv*) |
47fcc4f5 | 175 | obj_format=coffbfd gas_target=m68kcoff ;; |
7cf4d7ff | 176 | m68k-*-hpux) obj_format=hp300 emulation=hp300 ;; |
8cac6ca6 KR |
177 | m68k-*-lynxos*) obj_format=coffbfd gas_target=m68kcoff |
178 | emulation=lynx ;; | |
7cf4d7ff | 179 | |
c978e704 ILT |
180 | m88k-*-coff*) obj_format=coffbfd gas_target=m88kcoff ;; |
181 | ||
7cf4d7ff KR |
182 | # don't change emulation like *-*-bsd does |
183 | mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;; | |
184 | mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;; | |
5f8a3788 DHW |
185 | mips-*-ecoff*) obj_format=ecoff |
186 | if [ $endian = big ] ; then | |
187 | gas_target=mips-big | |
188 | else | |
189 | gas_target=mips-lit | |
190 | fi | |
191 | ;; | |
47fcc4f5 | 192 | mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;; |
00f4e659 | 193 | mips-*-irix5*) obj_format=elf gas_target=mips-big ;; |
7cf4d7ff | 194 | mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;; |
8cac6ca6 KR |
195 | mips-*-riscos*) obj_format=ecoff gas_target=mips-big ;; |
196 | mips-*-sysv*) obj_format=ecoff gas_target=mips-big ;; | |
5f8a3788 DHW |
197 | mips-*-elf*) obj_format=elf |
198 | if [ $endian = big ] ; then | |
199 | gas_target=mips-big | |
200 | else | |
201 | gas_target=mips-lit | |
202 | fi | |
203 | ;; | |
8cac6ca6 | 204 | |
1c11ab0e | 205 | ppc-*-aix*) obj_format=coff bfd_gas=yes ;; |
5e65fbc8 | 206 | ppc-*-sysv4*) obj_format=elf bfd_gas=yes ;; |
1c11ab0e | 207 | |
816153a3 SC |
208 | sh-*-coff) obj_format=coffbfd ;; |
209 | ||
8cac6ca6 KR |
210 | sparc*-*-sunos4*) obj_format=aout emulation=sun3 bfd_gas=yes ;; |
211 | sparc*-*-aout | sparc*-*-vxworks) | |
212 | obj_format=aout bfd_gas=yes ;; | |
213 | sparc*-*-coff) obj_format=coff bfd_gas=yes ;; | |
816153a3 | 214 | sparc*-*-lynxos) obj_format=coff bfd_gas=yes ;; |
8cac6ca6 KR |
215 | sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;; |
216 | sparc*-*-elf | sparc*-*-solaris*) | |
217 | obj_format=elf ;; | |
218 | sparc64-*-aout*) obj_format=aout bfd_gas=yes ;; # v9 | |
7cf4d7ff | 219 | |
5677c028 KR |
220 | vax-*-bsd* | vax-*-ultrix*) |
221 | obj_format=aout ;; | |
8cac6ca6 | 222 | vax-*-vms) obj_format=vms ;; |
a8285504 | 223 | |
8cac6ca6 KR |
224 | z8k-*-coff | z8k-*-sim) |
225 | obj_format=coffbfd ;; | |
07ef2075 | 226 | |
8cac6ca6 | 227 | *-*-aout | *-*-scout) |
7cf4d7ff | 228 | obj_format=aout ;; |
8cac6ca6 | 229 | *-*-nindy*) |
7cf4d7ff | 230 | obj_format=bout ;; |
8cac6ca6 | 231 | *-*-bsd*) |
7cf4d7ff KR |
232 | obj_format=aout emulation=sun3 ;; |
233 | *-*-generic) obj_format=generic ;; | |
234 | *-*-xray | *-*-hms) obj_format=coffbfd ;; | |
235 | *-*-sysv32) obj_format=coff emulation=sysv32 ;; | |
236 | *-*-sim) obj_format=coffbfd ;; | |
8cac6ca6 KR |
237 | *-*-elf | *-*-sysv4* | *-*-solaris*) |
238 | echo '*** Warning: GAS support for ELF format is incomplete' 1>&2 | |
239 | obj_format=elf dev=yes ;; | |
984cf2d7 | 240 | *-*-coff* | *-sysv* | *-*-sco*) |
7cf4d7ff KR |
241 | obj_format=coff |
242 | case ${target_vendor} in | |
243 | bull) emulation=dpx2 ;; | |
244 | sun) emulation=sun3 ;; | |
245 | esac | |
246 | ;; | |
247 | *-*-vxworks) obj_format=aout ;; | |
5f8a3788 | 248 | *-*-netware) obj_format=elf ;; |
fecd2382 RP |
249 | esac |
250 | ||
8cac6ca6 KR |
251 | # Assign floating point type. Most processors with FP support |
252 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
253 | # is emulated. | |
b678740d | 254 | case ${target_cpu} in |
7cf4d7ff KR |
255 | ns32k | vax | tahoe ) atof=${target_cpu} ;; |
256 | *) atof=ieee ;; | |
fecd2382 RP |
257 | esac |
258 | ||
7cf4d7ff KR |
259 | if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then |
260 | echo '*** GAS does not support target CPU' ${cpu_type} 1>&2 | |
261 | exit 1 | |
262 | fi | |
263 | ||
8cac6ca6 KR |
264 | case "${obj_format}" in |
265 | "") | |
266 | echo "*** GAS doesn't know what format to use for target" ${target} 1>&2 | |
267 | exit 1 | |
268 | ;; | |
269 | esac | |
7cf4d7ff KR |
270 | |
271 | if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then | |
272 | echo '*** GAS does not have support for object file format' ${obj_format} 1>&2 | |
273 | exit 1 | |
274 | fi | |
275 | ||
8a24a37c SC |
276 | # and target makefile frag |
277 | ||
b53ccaac | 278 | target_makefile_frag=config/${gas_target}.mt |
8a24a37c | 279 | |
7cf4d7ff KR |
280 | case ${bfd_gas}-${obj_format} in |
281 | yes-coffbfd) obj_format=coff ;; | |
282 | no-coffbfd) need_bfd=yes ;; | |
283 | *-elf) bfd_gas=yes ;; | |
284 | *-ecoff) bfd_gas=yes ;; | |
5f8a3788 | 285 | *-som) bfd_gas=yes ;; |
7cf4d7ff KR |
286 | *) ;; |
287 | esac | |
288 | ||
a8285504 DZ |
289 | case ${with_bfd_assembler}-${bfd_gas} in |
290 | yes-yes | no-no) | |
7cf4d7ff KR |
291 | # We didn't override user's choice. |
292 | ;; | |
a8285504 | 293 | no-yes) |
7cf4d7ff KR |
294 | echo '*** Use of BFD is required for ${target}; overriding config options'\ |
295 | 1>&2 | |
296 | ;; | |
a8285504 DZ |
297 | no-preferred) |
298 | bfd_gas=no | |
299 | ;; | |
300 | *-preferred) | |
301 | bfd_gas=yes | |
302 | ;; | |
303 | -*) | |
304 | # User specified nothing. | |
305 | ;; | |
7cf4d7ff KR |
306 | esac |
307 | ||
69ecc03f | 308 | reject_dev_configs=yes |
8cac6ca6 KR |
309 | |
310 | case ${reject_dev_configs}-${dev} in | |
311 | yes-yes) # Oops. | |
312 | echo "*** GAS does not support the ${generic_target} configuration" 1>&2 | |
313 | exit 1 | |
314 | ;; | |
315 | esac | |
316 | ||
b678740d | 317 | files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \ |
353deb84 | 318 | config/tc-${cpu_type}.h config/te-${emulation}.h \ |
74cc5508 RP |
319 | config/obj-${obj_format}.h config/obj-${obj_format}.c \ |
320 | config/atof-${atof}.c" | |
321 | ||
fecd2382 | 322 | links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c" |
8b228fe9 | 323 | |
4f6f4aa8 KR |
324 | # post-target: |
325 | ||
326 | case ${bfd_gas} in | |
420065a5 KR |
327 | yes) bfddef="BFDDEF=define" need_bfd=yes ;; |
328 | *) bfddef="BFDDEF=undef" ;; | |
4f6f4aa8 KR |
329 | esac |
330 | ||
331 | case ${need_bfd} in | |
8cac6ca6 KR |
332 | yes) bfdlib="BFDLIB=../bfd/libbfd.a" ;; |
333 | *) bfdlib="" ;; | |
4f6f4aa8 KR |
334 | esac |
335 | ||
8cac6ca6 KR |
336 | case "x${host}" in |
337 | "x${target}") cross="" ;; | |
338 | *) cross="CROSS=-DCROSS_COMPILE" ;; | |
339 | esac | |
340 | ||
341 | rm -f Makefile.tem | |
342 | echo $bfddef > Makefile.tem | |
343 | echo $bfdlib >> Makefile.tem | |
344 | echo $cross >> Makefile.tem | |
345 | cat Makefile >> Makefile.tem | |
346 | mv -f Makefile.tem Makefile | |
8f4b9142 | 347 | |
8b228fe9 | 348 | # end of gas/configure.in |