]>
Commit | Line | Data |
---|---|---|
6d5460ab | 1 | # This file is configure.in |
79a54a5b RP |
2 | # |
3 | # Copyright (C) 1987-1992 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 ;; | |
7cf4d7ff KR |
48 | |
49 | i[34]86-ibm-aix*) gas_host=i386aix ;; | |
50 | i[34]86-*-isc*) gas_host=sysv ;; | |
51 | i386-sun-sunos*) gas_host=sun386 ;; | |
52 | ||
53 | m68k-sun-sunos*) gas_host=sun3 ;; | |
54 | m68*-*-hpux) gas_host=hpux ;; | |
55 | ||
5f8a3788 DHW |
56 | mips*-dec-ultrix*) gas_host=decstatn ;; |
57 | mips*-*-bsd*) gas_host=mipsbsd ;; | |
58 | mips*-sgi-irix*) gas_host=irix ;; | |
7cf4d7ff KR |
59 | |
60 | rs6000-*-*) gas_host=rs6000 ;; | |
61 | ||
62 | sparc-sun-sunos*) gas_host=sun4 ;; | |
63 | sparc-sun-solaris2*) gas_host=sysv ;; | |
64 | ||
65 | vax-*-vms*) gas_host=vms ;; | |
66 | vax-*-bsd*) gas_host=vax ;; | |
5677c028 | 67 | vax-*-ultrix*) gas_host=vax ;; |
7cf4d7ff | 68 | |
5f8a3788 | 69 | *-*-sysv4* | *-*-unixware) gas_host=sysv ;; |
8cac6ca6 | 70 | |
5677c028 | 71 | *-*-ansi | *-*-hpux | *-*-sysv) |
7cf4d7ff KR |
72 | gas_host=${host_os} ;; |
73 | ||
74cc5508 RP |
74 | esac |
75 | ||
7cf4d7ff KR |
76 | if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then |
77 | echo '*** GAS does not support host' ${host} 1>&2 | |
78 | exit 1 | |
79 | fi | |
80 | ||
b678740d RP |
81 | # per-target: |
82 | ||
4f6f4aa8 KR |
83 | case ${with_bfd_assembler} in |
84 | yes) | |
7cf4d7ff | 85 | echo "*** Warning: GAS BFD configuration option not yet fully supported" 1>&2 |
4f6f4aa8 KR |
86 | need_bfd=yes |
87 | bfd_gas=yes | |
88 | ;; | |
89 | no | "") | |
90 | ;; | |
91 | *) | |
7cf4d7ff | 92 | echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2 |
4f6f4aa8 KR |
93 | exit 1 |
94 | ;; | |
95 | esac | |
96 | ||
b678740d RP |
97 | # assign cpu type |
98 | emulation=generic | |
99 | ||
5f8a3788 DHW |
100 | # default is big |
101 | endian=big | |
102 | ||
b53ccaac ILT |
103 | # check for architecture variants |
104 | case ${target_cpu} in | |
7cf4d7ff KR |
105 | # Actually we've only got support for the 1.1, so we shouldn't generalize, |
106 | # but this is what the support files are named... | |
8cac6ca6 KR |
107 | hppa*) cpu_type=hppa ;; |
108 | i486) cpu_type=i386 ;; | |
109 | m680[01234]0) cpu_type=m68k ;; | |
110 | m68008) cpu_type=m68k ;; | |
111 | m683??) cpu_type=m68k ;; | |
112 | m8*) cpu_type=m88k ;; | |
5f8a3788 | 113 | mips*el) cpu_type=mips endian=little;; |
8cac6ca6 KR |
114 | mips*) cpu_type=mips ;; |
115 | sparc64) cpu_type=sparc64 obj_format=elf ;; # v9 | |
116 | sparclite*) cpu_type=sparc ;; | |
7cf4d7ff | 117 | *) cpu_type=${target_cpu} ;; |
b53ccaac ILT |
118 | esac |
119 | ||
120 | gas_target=${cpu_type} | |
f70a4714 | 121 | generic_target=${cpu_type}-${target_vendor}-${target_os} |
8cac6ca6 KR |
122 | dev=no |
123 | ||
74cc5508 | 124 | # assign object format |
f70a4714 | 125 | case ${generic_target} in |
7cf4d7ff KR |
126 | a29k-amd-udi) obj_format=coffbfd gas_target=ebmon29k ;; |
127 | a29k-amd-ebmon) obj_format=coffbfd gas_target=ebmon29k ;; | |
128 | a29k-amd-ebmonold) obj_format=coff gas_target=ebmon29k ;; | |
129 | ||
816153a3 SC |
130 | alpha-*-osf*) obj_format=ecoff dev=yes ;; |
131 | ||
420065a5 | 132 | hppa-*-osf) obj_format=elf emulation=hppa ;; |
7cf4d7ff | 133 | hppa-*-hpux*) obj_format=som emulation=hppa ;; |
5f8a3788 | 134 | hppa-*-bsd*) obj_format=som emulation=hppa ;; |
7cf4d7ff | 135 | |
8f4b9142 DZ |
136 | h8300-*-coff) obj_format=coffbfd ;; |
137 | ||
7cf4d7ff KR |
138 | i386-ibm-aix*) obj_format=coffbfd gas_target=i386coff |
139 | emulation=i386aix ;; | |
140 | i386-*-bsd*) obj_format=aout emulation=386bsd ;; | |
420065a5 KR |
141 | i386-*-netbsd0.8) obj_format=aout emulation=netbsd ;; |
142 | i386-*-netbsd*) obj_format=aout emulation=netbsd ;; | |
8cac6ca6 KR |
143 | i386-*-linux*elf*) obj_format=elf emulation=linux ;; |
144 | i386-*-linux*coff*) obj_format=coffbfd emulation=linux | |
145 | gas_target=i386coff ;; | |
7cf4d7ff | 146 | i386-*-linux*) obj_format=aout emulation=linux ;; |
8cac6ca6 KR |
147 | i386-*-lynxos*) obj_format=coffbfd gas_target=i386coff |
148 | emulation=lynx ;; | |
149 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf) | |
150 | obj_format=elf ;; | |
151 | i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) | |
152 | obj_format=coffbfd gas_target=i386coff ;; | |
420065a5 | 153 | i386-*-vsta) obj_format=aout ;; |
7cf4d7ff KR |
154 | i386-*-go32) obj_format=aout ;; |
155 | ||
8cac6ca6 KR |
156 | i960-wrs-vxworks | i960-*-nindy*) |
157 | obj_format=bout ;; | |
7cf4d7ff KR |
158 | i960-*-coff) obj_format=coff emulation=ic960 ;; |
159 | ||
8cac6ca6 | 160 | m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*) |
7cf4d7ff | 161 | obj_format=aout emulation=sun3 ;; |
8cac6ca6 | 162 | m68k-*-coff | m68k-*-sysv*) |
47fcc4f5 | 163 | obj_format=coffbfd gas_target=m68kcoff ;; |
7cf4d7ff | 164 | m68k-*-hpux) obj_format=hp300 emulation=hp300 ;; |
8cac6ca6 KR |
165 | m68k-*-lynxos*) obj_format=coffbfd gas_target=m68kcoff |
166 | emulation=lynx ;; | |
7cf4d7ff | 167 | |
c978e704 ILT |
168 | m88k-*-coff*) obj_format=coffbfd gas_target=m88kcoff ;; |
169 | ||
7cf4d7ff KR |
170 | # don't change emulation like *-*-bsd does |
171 | mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;; | |
172 | mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;; | |
5f8a3788 DHW |
173 | mips-*-ecoff*) obj_format=ecoff |
174 | if [ $endian = big ] ; then | |
175 | gas_target=mips-big | |
176 | else | |
177 | gas_target=mips-lit | |
178 | fi | |
179 | ;; | |
47fcc4f5 | 180 | mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;; |
00f4e659 | 181 | mips-*-irix5*) obj_format=elf gas_target=mips-big ;; |
7cf4d7ff | 182 | mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;; |
8cac6ca6 KR |
183 | mips-*-riscos*) obj_format=ecoff gas_target=mips-big ;; |
184 | mips-*-sysv*) obj_format=ecoff gas_target=mips-big ;; | |
5f8a3788 DHW |
185 | mips-*-elf*) obj_format=elf |
186 | if [ $endian = big ] ; then | |
187 | gas_target=mips-big | |
188 | else | |
189 | gas_target=mips-lit | |
190 | fi | |
191 | ;; | |
8cac6ca6 | 192 | |
816153a3 SC |
193 | sh-*-coff) obj_format=coffbfd ;; |
194 | ||
8cac6ca6 KR |
195 | sparc*-*-sunos4*) obj_format=aout emulation=sun3 bfd_gas=yes ;; |
196 | sparc*-*-aout | sparc*-*-vxworks) | |
197 | obj_format=aout bfd_gas=yes ;; | |
198 | sparc*-*-coff) obj_format=coff bfd_gas=yes ;; | |
816153a3 | 199 | sparc*-*-lynxos) obj_format=coff bfd_gas=yes ;; |
8cac6ca6 KR |
200 | sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;; |
201 | sparc*-*-elf | sparc*-*-solaris*) | |
202 | obj_format=elf ;; | |
203 | sparc64-*-aout*) obj_format=aout bfd_gas=yes ;; # v9 | |
7cf4d7ff | 204 | |
5677c028 KR |
205 | vax-*-bsd* | vax-*-ultrix*) |
206 | obj_format=aout ;; | |
8cac6ca6 | 207 | vax-*-vms) obj_format=vms ;; |
a8285504 | 208 | |
8cac6ca6 KR |
209 | z8k-*-coff | z8k-*-sim) |
210 | obj_format=coffbfd ;; | |
07ef2075 | 211 | |
8cac6ca6 | 212 | *-*-aout | *-*-scout) |
7cf4d7ff | 213 | obj_format=aout ;; |
8cac6ca6 | 214 | *-*-nindy*) |
7cf4d7ff | 215 | obj_format=bout ;; |
8cac6ca6 | 216 | *-*-bsd*) |
7cf4d7ff KR |
217 | obj_format=aout emulation=sun3 ;; |
218 | *-*-generic) obj_format=generic ;; | |
219 | *-*-xray | *-*-hms) obj_format=coffbfd ;; | |
220 | *-*-sysv32) obj_format=coff emulation=sysv32 ;; | |
221 | *-*-sim) obj_format=coffbfd ;; | |
8cac6ca6 KR |
222 | *-*-elf | *-*-sysv4* | *-*-solaris*) |
223 | echo '*** Warning: GAS support for ELF format is incomplete' 1>&2 | |
224 | obj_format=elf dev=yes ;; | |
984cf2d7 | 225 | *-*-coff* | *-sysv* | *-*-sco*) |
7cf4d7ff KR |
226 | obj_format=coff |
227 | case ${target_vendor} in | |
228 | bull) emulation=dpx2 ;; | |
229 | sun) emulation=sun3 ;; | |
230 | esac | |
231 | ;; | |
232 | *-*-vxworks) obj_format=aout ;; | |
5f8a3788 | 233 | *-*-netware) obj_format=elf ;; |
fecd2382 RP |
234 | esac |
235 | ||
8cac6ca6 KR |
236 | # Assign floating point type. Most processors with FP support |
237 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
238 | # is emulated. | |
b678740d | 239 | case ${target_cpu} in |
7cf4d7ff KR |
240 | ns32k | vax | tahoe ) atof=${target_cpu} ;; |
241 | *) atof=ieee ;; | |
fecd2382 RP |
242 | esac |
243 | ||
7cf4d7ff KR |
244 | if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then |
245 | echo '*** GAS does not support target CPU' ${cpu_type} 1>&2 | |
246 | exit 1 | |
247 | fi | |
248 | ||
8cac6ca6 KR |
249 | case "${obj_format}" in |
250 | "") | |
251 | echo "*** GAS doesn't know what format to use for target" ${target} 1>&2 | |
252 | exit 1 | |
253 | ;; | |
254 | esac | |
7cf4d7ff KR |
255 | |
256 | if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then | |
257 | echo '*** GAS does not have support for object file format' ${obj_format} 1>&2 | |
258 | exit 1 | |
259 | fi | |
260 | ||
8a24a37c SC |
261 | # and target makefile frag |
262 | ||
b53ccaac | 263 | target_makefile_frag=config/${gas_target}.mt |
8a24a37c | 264 | |
7cf4d7ff KR |
265 | case ${bfd_gas}-${obj_format} in |
266 | yes-coffbfd) obj_format=coff ;; | |
267 | no-coffbfd) need_bfd=yes ;; | |
268 | *-elf) bfd_gas=yes ;; | |
269 | *-ecoff) bfd_gas=yes ;; | |
5f8a3788 | 270 | *-som) bfd_gas=yes ;; |
7cf4d7ff KR |
271 | *) ;; |
272 | esac | |
273 | ||
a8285504 DZ |
274 | case ${with_bfd_assembler}-${bfd_gas} in |
275 | yes-yes | no-no) | |
7cf4d7ff KR |
276 | # We didn't override user's choice. |
277 | ;; | |
a8285504 | 278 | no-yes) |
7cf4d7ff KR |
279 | echo '*** Use of BFD is required for ${target}; overriding config options'\ |
280 | 1>&2 | |
281 | ;; | |
a8285504 DZ |
282 | no-preferred) |
283 | bfd_gas=no | |
284 | ;; | |
285 | *-preferred) | |
286 | bfd_gas=yes | |
287 | ;; | |
288 | -*) | |
289 | # User specified nothing. | |
290 | ;; | |
7cf4d7ff KR |
291 | esac |
292 | ||
69ecc03f | 293 | reject_dev_configs=yes |
8cac6ca6 KR |
294 | |
295 | case ${reject_dev_configs}-${dev} in | |
296 | yes-yes) # Oops. | |
297 | echo "*** GAS does not support the ${generic_target} configuration" 1>&2 | |
298 | exit 1 | |
299 | ;; | |
300 | esac | |
301 | ||
b678740d | 302 | files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \ |
353deb84 | 303 | config/tc-${cpu_type}.h config/te-${emulation}.h \ |
74cc5508 RP |
304 | config/obj-${obj_format}.h config/obj-${obj_format}.c \ |
305 | config/atof-${atof}.c" | |
306 | ||
fecd2382 | 307 | links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c" |
8b228fe9 | 308 | |
4f6f4aa8 KR |
309 | # post-target: |
310 | ||
311 | case ${bfd_gas} in | |
420065a5 KR |
312 | yes) bfddef="BFDDEF=define" need_bfd=yes ;; |
313 | *) bfddef="BFDDEF=undef" ;; | |
4f6f4aa8 KR |
314 | esac |
315 | ||
316 | case ${need_bfd} in | |
8cac6ca6 KR |
317 | yes) bfdlib="BFDLIB=../bfd/libbfd.a" ;; |
318 | *) bfdlib="" ;; | |
4f6f4aa8 KR |
319 | esac |
320 | ||
8cac6ca6 KR |
321 | case "x${host}" in |
322 | "x${target}") cross="" ;; | |
323 | *) cross="CROSS=-DCROSS_COMPILE" ;; | |
324 | esac | |
325 | ||
326 | rm -f Makefile.tem | |
327 | echo $bfddef > Makefile.tem | |
328 | echo $bfdlib >> Makefile.tem | |
329 | echo $cross >> Makefile.tem | |
330 | cat Makefile >> Makefile.tem | |
331 | mv -f Makefile.tem Makefile | |
8f4b9142 | 332 | |
8b228fe9 | 333 | # end of gas/configure.in |