]>
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 | # <[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 | |
42 | a29k-*-*) gas_host=a29k ;; | |
43 | ||
44 | hppa-hp-hpux*) gas_host=hppahpux ;; | |
45 | hppa-hp-bsd*) gas_host=hppabsd ;; | |
46 | hppa-hp-osf*) gas_host=hppaosf ;; | |
47 | ||
48 | i[34]86-ibm-aix*) gas_host=i386aix ;; | |
49 | i[34]86-*-isc*) gas_host=sysv ;; | |
50 | i386-sun-sunos*) gas_host=sun386 ;; | |
51 | ||
52 | m68k-sun-sunos*) gas_host=sun3 ;; | |
53 | m68*-*-hpux) gas_host=hpux ;; | |
54 | ||
55 | mips-dec-ultrix*) gas_host=decstatn ;; | |
56 | mips-*-bsd*) gas_host=mipsbsd ;; | |
57 | mips-sgi-irix*) gas_host=irix ;; | |
58 | ||
59 | rs6000-*-*) gas_host=rs6000 ;; | |
60 | ||
61 | sparc-sun-sunos*) gas_host=sun4 ;; | |
62 | sparc-sun-solaris2*) gas_host=sysv ;; | |
63 | ||
64 | vax-*-vms*) gas_host=vms ;; | |
65 | vax-*-bsd*) gas_host=vax ;; | |
66 | ||
984cf2d7 | 67 | *-*-ansi | *-*-ultrix | *-*-hpux | *-*-sysv*) |
7cf4d7ff KR |
68 | gas_host=${host_os} ;; |
69 | ||
74cc5508 RP |
70 | esac |
71 | ||
7cf4d7ff KR |
72 | if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then |
73 | echo '*** GAS does not support host' ${host} 1>&2 | |
74 | exit 1 | |
75 | fi | |
76 | ||
b678740d RP |
77 | # per-target: |
78 | ||
4f6f4aa8 KR |
79 | case ${with_bfd_assembler} in |
80 | yes) | |
7cf4d7ff | 81 | echo "*** Warning: GAS BFD configuration option not yet fully supported" 1>&2 |
4f6f4aa8 KR |
82 | need_bfd=yes |
83 | bfd_gas=yes | |
84 | ;; | |
85 | no | "") | |
86 | ;; | |
87 | *) | |
7cf4d7ff | 88 | echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2 |
4f6f4aa8 KR |
89 | exit 1 |
90 | ;; | |
91 | esac | |
92 | ||
b678740d RP |
93 | # assign cpu type |
94 | emulation=generic | |
95 | ||
b53ccaac ILT |
96 | # check for architecture variants |
97 | case ${target_cpu} in | |
4f6f4aa8 | 98 | sparclite*) cpu_type=sparc ;; |
6ea6d0e3 | 99 | sparc64) cpu_type=sparc obj_format=aout ;; |
984cf2d7 | 100 | m680[01234]0) cpu_type=m68k ;; |
4f6f4aa8 | 101 | m683??) cpu_type=m68k ;; |
f70a4714 | 102 | i486) cpu_type=i386 ;; |
7cf4d7ff KR |
103 | # Actually we've only got support for the 1.1, so we shouldn't generalize, |
104 | # but this is what the support files are named... | |
105 | hppa1.1) cpu_type=hppa ;; | |
106 | *) cpu_type=${target_cpu} ;; | |
b53ccaac ILT |
107 | esac |
108 | ||
109 | gas_target=${cpu_type} | |
110 | ||
f70a4714 KR |
111 | generic_target=${cpu_type}-${target_vendor}-${target_os} |
112 | ||
74cc5508 | 113 | # assign object format |
f70a4714 | 114 | case ${generic_target} in |
7cf4d7ff KR |
115 | a29k-amd-udi) obj_format=coffbfd gas_target=ebmon29k ;; |
116 | a29k-amd-ebmon) obj_format=coffbfd gas_target=ebmon29k ;; | |
117 | a29k-amd-ebmonold) obj_format=coff gas_target=ebmon29k ;; | |
118 | ||
119 | hppa-*-osf) obj_format=elf emulation=hppa ;; | |
120 | hppa-*-hpux*) obj_format=som emulation=hppa ;; | |
121 | ||
122 | i386-ibm-aix*) obj_format=coffbfd gas_target=i386coff | |
123 | emulation=i386aix ;; | |
124 | i386-*-bsd*) obj_format=aout emulation=386bsd ;; | |
125 | i386-*-linux*) obj_format=aout emulation=linux ;; | |
f70a4714 | 126 | i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) |
7cf4d7ff KR |
127 | obj_format=coffbfd gas_target=i386coff ;; |
128 | i386-*-go32) obj_format=aout ;; | |
129 | ||
130 | i960-wrs-vxworks) obj_format=bout ;; | |
131 | i960-*-coff) obj_format=coff emulation=ic960 ;; | |
132 | ||
133 | m68k-wrs-vxworks) obj_format=aout emulation=sun3 ;; | |
984cf2d7 | 134 | m68k-ericsson-[Oo][Ss][Ee]) |
7cf4d7ff KR |
135 | obj_format=aout emulation=sun3 ;; |
136 | m68k-*-coff) obj_format=coffbfd gas_target=m68kcoff ;; | |
137 | m68k-*-hpux) obj_format=hp300 emulation=hp300 ;; | |
138 | ||
139 | # don't change emulation like *-*-bsd does | |
140 | mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;; | |
141 | mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;; | |
142 | mips-*-ecoff) obj_format=ecoff gas_target=mips-big ;; | |
143 | mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;; | |
144 | ||
4f6f4aa8 | 145 | sparclite*-fujitsu-none) |
7cf4d7ff KR |
146 | obj_format=aout ;; |
147 | ||
85825401 | 148 | *-*-aout | *-*-scout | *-*-linux) |
7cf4d7ff | 149 | obj_format=aout ;; |
984cf2d7 | 150 | *-*-bout* | *-*-nindy*) |
7cf4d7ff KR |
151 | obj_format=bout ;; |
152 | *-*-bsd* | *-*-sunos*) | |
153 | obj_format=aout emulation=sun3 ;; | |
154 | *-*-generic) obj_format=generic ;; | |
155 | *-*-xray | *-*-hms) obj_format=coffbfd ;; | |
156 | *-*-sysv32) obj_format=coff emulation=sysv32 ;; | |
157 | *-*-sim) obj_format=coffbfd ;; | |
984cf2d7 | 158 | *-*-coff* | *-sysv* | *-*-sco*) |
7cf4d7ff KR |
159 | obj_format=coff |
160 | case ${target_vendor} in | |
161 | bull) emulation=dpx2 ;; | |
162 | sun) emulation=sun3 ;; | |
163 | esac | |
164 | ;; | |
165 | *-*-vxworks) obj_format=aout ;; | |
166 | *-*-coff) obj_format=coff ;; | |
4f6f4aa8 | 167 | *-*-elf | *-*-solaris*) |
7cf4d7ff KR |
168 | echo '*** Warning: GAS support for ELF format is incomplete' 1>&2 |
169 | obj_format=elf ;; | |
170 | *-*-vms) obj_format=vms ;; | |
fecd2382 RP |
171 | esac |
172 | ||
74cc5508 | 173 | # assign floating point type |
b678740d | 174 | case ${target_cpu} in |
7cf4d7ff KR |
175 | ns32k | vax | tahoe ) atof=${target_cpu} ;; |
176 | *) atof=ieee ;; | |
fecd2382 RP |
177 | esac |
178 | ||
7cf4d7ff KR |
179 | if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then |
180 | echo '*** GAS does not support target CPU' ${cpu_type} 1>&2 | |
181 | exit 1 | |
182 | fi | |
183 | ||
184 | if [ x${obj_format} = x ]; then | |
185 | echo "*** GAS doesn't know what format to use for target" ${target} 1>&2 | |
186 | exit 1 | |
187 | fi | |
188 | ||
189 | if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then | |
190 | echo '*** GAS does not have support for object file format' ${obj_format} 1>&2 | |
191 | exit 1 | |
192 | fi | |
193 | ||
8a24a37c SC |
194 | # and target makefile frag |
195 | ||
b53ccaac | 196 | target_makefile_frag=config/${gas_target}.mt |
8a24a37c | 197 | |
7cf4d7ff KR |
198 | case ${bfd_gas}-${obj_format} in |
199 | yes-coffbfd) obj_format=coff ;; | |
200 | no-coffbfd) need_bfd=yes ;; | |
201 | *-elf) bfd_gas=yes ;; | |
202 | *-ecoff) bfd_gas=yes ;; | |
203 | *) ;; | |
204 | esac | |
205 | ||
206 | case ${with_bfd_assembler} in | |
207 | "") | |
208 | # User specified nothing. | |
209 | ;; | |
210 | "${bfd_gas}") | |
211 | # We didn't override user's choice. | |
212 | ;; | |
213 | no) | |
214 | # ... but we overrode it. | |
215 | echo '*** Use of BFD is required for ${target}; overriding config options'\ | |
216 | 1>&2 | |
217 | ;; | |
218 | esac | |
219 | ||
b678740d | 220 | files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \ |
353deb84 | 221 | config/tc-${cpu_type}.h config/te-${emulation}.h \ |
74cc5508 RP |
222 | config/obj-${obj_format}.h config/obj-${obj_format}.c \ |
223 | config/atof-${atof}.c" | |
224 | ||
fecd2382 | 225 | links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c" |
8b228fe9 | 226 | |
4f6f4aa8 KR |
227 | # post-target: |
228 | ||
229 | case ${bfd_gas} in | |
230 | yes) | |
ed364bb6 ILT |
231 | rm -f Makefile.tem |
232 | mv Makefile Makefile.tem | |
233 | echo BFDDEF=-DBFD_ASSEMBLER > Makefile | |
234 | cat Makefile.tem >> Makefile | |
235 | rm -f Makefile.tem | |
4f6f4aa8 KR |
236 | need_bfd=yes |
237 | ;; | |
238 | *) | |
239 | ;; | |
240 | esac | |
241 | ||
242 | case ${need_bfd} in | |
243 | yes) | |
ed364bb6 ILT |
244 | rm -f Makefile.tem |
245 | mv Makefile Makefile.tem | |
246 | echo BFDLIB=../bfd/libbfd.a > Makefile | |
247 | cat Makefile.tem >> Makefile | |
248 | rm -f Makefile.tem | |
4f6f4aa8 KR |
249 | ;; |
250 | *) | |
251 | ;; | |
252 | esac | |
253 | ||
8b228fe9 | 254 | # end of gas/configure.in |