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 |
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 | ||
47fcc4f5 ILT |
44 | hppa*-hp-hpux*) gas_host=hppahpux ;; |
45 | hppa*-hp-bsd*) gas_host=hppabsd ;; | |
46 | hppa*-hp-osf*) gas_host=hppaosf ;; | |
7cf4d7ff KR |
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 | 135 | obj_format=aout emulation=sun3 ;; |
47fcc4f5 ILT |
136 | m68k-*-coff | m68*-*-sysv*) |
137 | obj_format=coffbfd gas_target=m68kcoff ;; | |
7cf4d7ff KR |
138 | m68k-*-hpux) obj_format=hp300 emulation=hp300 ;; |
139 | ||
140 | # don't change emulation like *-*-bsd does | |
141 | mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;; | |
142 | mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;; | |
47fcc4f5 ILT |
143 | mips-*-ecoffl*) obj_format=ecoff gas_target=mips-lit ;; |
144 | mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;; | |
7cf4d7ff KR |
145 | mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;; |
146 | ||
4f6f4aa8 | 147 | sparclite*-fujitsu-none) |
7cf4d7ff KR |
148 | obj_format=aout ;; |
149 | ||
85825401 | 150 | *-*-aout | *-*-scout | *-*-linux) |
7cf4d7ff | 151 | obj_format=aout ;; |
984cf2d7 | 152 | *-*-bout* | *-*-nindy*) |
7cf4d7ff KR |
153 | obj_format=bout ;; |
154 | *-*-bsd* | *-*-sunos*) | |
155 | obj_format=aout emulation=sun3 ;; | |
156 | *-*-generic) obj_format=generic ;; | |
157 | *-*-xray | *-*-hms) obj_format=coffbfd ;; | |
158 | *-*-sysv32) obj_format=coff emulation=sysv32 ;; | |
159 | *-*-sim) obj_format=coffbfd ;; | |
984cf2d7 | 160 | *-*-coff* | *-sysv* | *-*-sco*) |
7cf4d7ff KR |
161 | obj_format=coff |
162 | case ${target_vendor} in | |
163 | bull) emulation=dpx2 ;; | |
164 | sun) emulation=sun3 ;; | |
165 | esac | |
166 | ;; | |
167 | *-*-vxworks) obj_format=aout ;; | |
168 | *-*-coff) obj_format=coff ;; | |
4f6f4aa8 | 169 | *-*-elf | *-*-solaris*) |
7cf4d7ff KR |
170 | echo '*** Warning: GAS support for ELF format is incomplete' 1>&2 |
171 | obj_format=elf ;; | |
172 | *-*-vms) obj_format=vms ;; | |
fecd2382 RP |
173 | esac |
174 | ||
74cc5508 | 175 | # assign floating point type |
b678740d | 176 | case ${target_cpu} in |
7cf4d7ff KR |
177 | ns32k | vax | tahoe ) atof=${target_cpu} ;; |
178 | *) atof=ieee ;; | |
fecd2382 RP |
179 | esac |
180 | ||
7cf4d7ff KR |
181 | if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then |
182 | echo '*** GAS does not support target CPU' ${cpu_type} 1>&2 | |
183 | exit 1 | |
184 | fi | |
185 | ||
186 | if [ x${obj_format} = x ]; then | |
187 | echo "*** GAS doesn't know what format to use for target" ${target} 1>&2 | |
188 | exit 1 | |
189 | fi | |
190 | ||
191 | if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then | |
192 | echo '*** GAS does not have support for object file format' ${obj_format} 1>&2 | |
193 | exit 1 | |
194 | fi | |
195 | ||
8a24a37c SC |
196 | # and target makefile frag |
197 | ||
b53ccaac | 198 | target_makefile_frag=config/${gas_target}.mt |
8a24a37c | 199 | |
7cf4d7ff KR |
200 | case ${bfd_gas}-${obj_format} in |
201 | yes-coffbfd) obj_format=coff ;; | |
202 | no-coffbfd) need_bfd=yes ;; | |
203 | *-elf) bfd_gas=yes ;; | |
204 | *-ecoff) bfd_gas=yes ;; | |
205 | *) ;; | |
206 | esac | |
207 | ||
208 | case ${with_bfd_assembler} in | |
209 | "") | |
210 | # User specified nothing. | |
211 | ;; | |
212 | "${bfd_gas}") | |
213 | # We didn't override user's choice. | |
214 | ;; | |
215 | no) | |
216 | # ... but we overrode it. | |
217 | echo '*** Use of BFD is required for ${target}; overriding config options'\ | |
218 | 1>&2 | |
219 | ;; | |
220 | esac | |
221 | ||
b678740d | 222 | files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \ |
353deb84 | 223 | config/tc-${cpu_type}.h config/te-${emulation}.h \ |
74cc5508 RP |
224 | config/obj-${obj_format}.h config/obj-${obj_format}.c \ |
225 | config/atof-${atof}.c" | |
226 | ||
fecd2382 | 227 | links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c" |
8b228fe9 | 228 | |
4f6f4aa8 KR |
229 | # post-target: |
230 | ||
231 | case ${bfd_gas} in | |
232 | yes) | |
ed364bb6 ILT |
233 | rm -f Makefile.tem |
234 | mv Makefile Makefile.tem | |
235 | echo BFDDEF=-DBFD_ASSEMBLER > Makefile | |
236 | cat Makefile.tem >> Makefile | |
237 | rm -f Makefile.tem | |
4f6f4aa8 KR |
238 | need_bfd=yes |
239 | ;; | |
240 | *) | |
241 | ;; | |
242 | esac | |
243 | ||
244 | case ${need_bfd} in | |
245 | yes) | |
ed364bb6 ILT |
246 | rm -f Makefile.tem |
247 | mv Makefile Makefile.tem | |
248 | echo BFDLIB=../bfd/libbfd.a > Makefile | |
249 | cat Makefile.tem >> Makefile | |
250 | rm -f Makefile.tem | |
4f6f4aa8 KR |
251 | ;; |
252 | *) | |
253 | ;; | |
254 | esac | |
255 | ||
8b228fe9 | 256 | # end of gas/configure.in |