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