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