Commit | Line | Data |
---|---|---|
6d5460ab | 1 | # This file is configure.in |
79a54a5b RP |
2 | # |
3 | # Copyright (C) 1987-1992 Free Software Foundation, Inc. | |
4 | # | |
5 | # This file is part of GAS, the GNU Assembler. | |
6 | # | |
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. | |
11 | # | |
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. | |
16 | # | |
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 | # <rich@cygnus.com>. | |
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 |
79a54a5b | 33 | configdirs=doc |
1058238c | 34 | |
353deb84 RP |
35 | # per-host: |
36 | ||
b678740d | 37 | gas_host=generic |
fecd2382 | 38 | |
984cf2d7 | 39 | case "${host}" in |
85825401 ILT |
40 | a29k-*-* | rs6000-*-* | vax-*-*) |
41 | case "${host_os}" in | |
42 | vms*) gas_host=vms ;; | |
43 | bsd*) gas_host=bsd ;; | |
44 | *) gas_host=${host_cpu} ;; | |
45 | esac | |
984cf2d7 ME |
46 | ;; |
47 | mips-dec-ultrix) | |
48 | gas_host=decstation | |
49 | ;; | |
4f6f4aa8 KR |
50 | mips-*-bsd) |
51 | gas_host=mipsbsd | |
52 | ;; | |
85825401 | 53 | i[34]86-ibm-aix*) |
984cf2d7 ME |
54 | gas_host=i386aix |
55 | ;; | |
85825401 ILT |
56 | i[34]86-*-isc*) |
57 | gas_host=sysv | |
58 | ;; | |
984cf2d7 ME |
59 | m68k-sun-sunos*) |
60 | gas_host=sun3 | |
61 | ;; | |
62 | i386-sun-sunos*) | |
63 | gas_host=sun386 | |
64 | ;; | |
0f8b9790 | 65 | sparc-sun-sunos*) |
984cf2d7 ME |
66 | gas_host=sun4 |
67 | ;; | |
2a697fa4 | 68 | sparc-sun-solaris2*) |
0f8b9790 DZ |
69 | gas_host=sysv |
70 | ;; | |
984cf2d7 ME |
71 | *-*-ansi | *-*-ultrix | *-*-hpux | *-*-sysv*) |
72 | gas_host=${host_os} | |
73 | ;; | |
74cc5508 RP |
74 | esac |
75 | ||
b678740d RP |
76 | # per-target: |
77 | ||
4f6f4aa8 KR |
78 | # not yet... |
79 | case ${with_bfd_assembler} in | |
80 | yes) | |
81 | echo "*** Warning: GAS BFD configuration option not yet supported" 1>&2 | |
82 | need_bfd=yes | |
83 | bfd_gas=yes | |
84 | ;; | |
85 | no | "") | |
86 | ;; | |
87 | *) | |
88 | echo "*** Bad value \"${with_bfd_assembler}\" for --with_bfd_assembler option" 1>&2 | |
89 | exit 1 | |
90 | ;; | |
91 | esac | |
92 | ||
b678740d RP |
93 | # assign cpu type |
94 | emulation=generic | |
95 | ||
96 | cpu_type=${target_cpu} | |
97 | ||
b53ccaac ILT |
98 | # check for architecture variants |
99 | case ${target_cpu} in | |
4f6f4aa8 | 100 | sparclite*) cpu_type=sparc ;; |
6ea6d0e3 | 101 | sparc64) cpu_type=sparc obj_format=aout ;; |
984cf2d7 | 102 | m680[01234]0) cpu_type=m68k ;; |
4f6f4aa8 | 103 | m683??) cpu_type=m68k ;; |
b53ccaac ILT |
104 | esac |
105 | ||
106 | gas_target=${cpu_type} | |
107 | ||
74cc5508 | 108 | # assign object format |
984cf2d7 ME |
109 | case ${target} in |
110 | a29k-amd-udi) | |
111 | obj_format=coffbfd | |
4f6f4aa8 | 112 | need_bfd=yes |
984cf2d7 ME |
113 | gas_target=ebmon29k |
114 | ;; | |
115 | a29k-amd-ebmon) | |
116 | obj_format=coffbfd | |
4f6f4aa8 | 117 | need_bfd=yes |
984cf2d7 ME |
118 | gas_target=ebmon29k |
119 | ;; | |
120 | a29k-amd-ebmonold) | |
121 | obj_format=coff | |
4f6f4aa8 | 122 | need_bfd=yes |
984cf2d7 ME |
123 | gas_target=ebmon29k |
124 | ;; | |
125 | i[34]86-ibm-aix*) | |
85825401 | 126 | obj_format=coffbfd |
4f6f4aa8 | 127 | need_bfd=yes |
85825401 | 128 | gas_target=i386coff |
984cf2d7 ME |
129 | emulation=i386aix |
130 | ;; | |
131 | i[34]86-*-bsd*) | |
132 | obj_format=aout | |
984cf2d7 | 133 | ;; |
85825401 | 134 | i[34]86-*-coff | i[34]86-*-sysv* | i[34]86-*-sco* | i[34]86-*-isc*) |
984cf2d7 | 135 | obj_format=coffbfd |
4f6f4aa8 | 136 | need_bfd=yes |
984cf2d7 ME |
137 | gas_target=i386coff |
138 | ;; | |
6efd877d KR |
139 | i[34]86-*-go32) |
140 | obj_format=aout | |
141 | ;; | |
984cf2d7 ME |
142 | i960-wrs-vxworks) |
143 | obj_format=bout | |
144 | ;; | |
145 | i960-*-coff) | |
146 | obj_format=coff | |
147 | emulation=ic960 | |
148 | ;; | |
149 | m68k-wrs-vxworks) | |
150 | obj_format=aout | |
151 | emulation=sun3 | |
152 | ;; | |
153 | m68k-ericsson-[Oo][Ss][Ee]) | |
154 | obj_format=aout | |
155 | emulation=sun3 | |
156 | ;; | |
157 | m68k-*-coff) | |
158 | obj_format=coffbfd | |
4f6f4aa8 | 159 | need_bfd=yes |
984cf2d7 ME |
160 | gas_target=m68kcoff |
161 | ;; | |
4f6f4aa8 KR |
162 | mips-*-bsd*) |
163 | # don't change emulation like *-*-bsd does | |
164 | bfd_gas=yes | |
165 | obj_format=aout | |
166 | gas_target=mips-lit | |
167 | ;; | |
168 | mips-*-ultrix*) | |
169 | bfd_gas=yes | |
170 | obj_format=ecoff | |
171 | gas_target=mips-lit | |
172 | ;; | |
173 | mips-*-irix* | mips-*-ecoff) | |
174 | bfd_gas=yes | |
175 | obj_format=ecoff | |
176 | gas_target=mips-big | |
177 | ;; | |
178 | sparclite*-fujitsu-none) | |
6ea6d0e3 ME |
179 | obj_format=aout |
180 | ;; | |
85825401 | 181 | *-*-aout | *-*-scout | *-*-linux) |
984cf2d7 ME |
182 | obj_format=aout |
183 | ;; | |
184 | *-*-bout* | *-*-nindy*) | |
185 | obj_format=bout | |
186 | ;; | |
187 | *-*-bsd* | *-*-sunos*) | |
188 | obj_format=aout | |
189 | emulation=sun3 | |
190 | ;; | |
191 | *-*-generic) | |
192 | obj_format=generic | |
193 | ;; | |
194 | *-*-xray | *-*-hms) | |
195 | obj_format=coffbfd | |
4f6f4aa8 | 196 | need_bfd=yes |
984cf2d7 ME |
197 | ;; |
198 | *-*-sysv32) | |
199 | obj_format=coff | |
200 | emulation=sysv32 | |
201 | ;; | |
202 | *-*-sim) | |
203 | obj_format=coffbfd | |
4f6f4aa8 | 204 | need_bfd=yes |
984cf2d7 ME |
205 | ;; |
206 | *-*-coff* | *-sysv* | *-*-sco*) | |
207 | obj_format=coff | |
208 | case ${target_vendor} in | |
209 | bull) emulation=dpx2 ;; | |
210 | sun) emulation=sun3 ;; | |
211 | esac | |
212 | ;; | |
213 | *-*-vxworks) | |
214 | obj_format=aout | |
215 | ;; | |
216 | *-*-coff) | |
217 | obj_format=coff | |
218 | ;; | |
4f6f4aa8 KR |
219 | *-*-elf | *-*-solaris*) |
220 | case ${bfd_gas} in | |
221 | yes) ;; | |
222 | *) | |
223 | echo "*** warning: gas ${target_os} configuration implies" 1>&2 | |
224 | echo " (unsupported) --with-bfd-assembler option" 1>&2 | |
225 | bfd_gas=yes | |
226 | ;; | |
227 | esac | |
228 | obj_format=elf | |
229 | ;; | |
85825401 ILT |
230 | *-*-vms) |
231 | obj_format=vms | |
232 | ;; | |
fecd2382 RP |
233 | esac |
234 | ||
74cc5508 | 235 | # assign floating point type |
b678740d | 236 | case ${target_cpu} in |
984cf2d7 ME |
237 | ns32k) atof=ns32k ;; |
238 | vax) atof=vax ;; | |
85825401 | 239 | tahoe) atof=tahoe ;; |
984cf2d7 | 240 | *) atof=ieee ;; |
fecd2382 RP |
241 | esac |
242 | ||
8a24a37c SC |
243 | # and target makefile frag |
244 | ||
b53ccaac | 245 | target_makefile_frag=config/${gas_target}.mt |
8a24a37c | 246 | |
b678740d | 247 | files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \ |
353deb84 | 248 | config/tc-${cpu_type}.h config/te-${emulation}.h \ |
74cc5508 RP |
249 | config/obj-${obj_format}.h config/obj-${obj_format}.c \ |
250 | config/atof-${atof}.c" | |
251 | ||
fecd2382 | 252 | links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c" |
8b228fe9 | 253 | |
4f6f4aa8 KR |
254 | # post-target: |
255 | ||
256 | case ${bfd_gas} in | |
257 | yes) | |
258 | echo BFDDEF=-DBFD_ASSEMBLER >> Makefile | |
259 | need_bfd=yes | |
260 | ;; | |
261 | *) | |
262 | ;; | |
263 | esac | |
264 | ||
265 | case ${need_bfd} in | |
266 | yes) | |
267 | echo BFDLIB=../bfd/libbfd.a >> Makefile | |
268 | ;; | |
269 | *) | |
270 | ;; | |
271 | esac | |
272 | ||
8b228fe9 | 273 | # end of gas/configure.in |