Some support for PowerPC ELF, although it isn't in BFD yet.
[deliverable/binutils-gdb.git] / gas / configure.in
1 # This file is configure.in
2 #
3 # Copyright (C) 1987-1992,1993,1994 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
22 # This file was written, and is maintained by K. Richard Pixley
23 # <rich@cygnus.com>.
24
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"
32 need_bfd=no
33 bfd_gas=no
34 configdirs="doc testsuite"
35
36 # per-host:
37
38 gas_host=generic
39
40 case "${host}" in
41 a29k-*-*) gas_host=a29k ;;
42
43 alpha-*-osf*) gas_host=ansi ;;
44
45 hppa*-hp-hpux*) gas_host=hpux ;;
46 hppa*-hp-bsd*) gas_host=hppabsd ;;
47 hppa*-hp-osf*) gas_host=hppaosf ;;
48 hppa*-*-hiux*) gas_host=hpux ;;
49
50 i[34]86-ibm-aix*) gas_host=i386aix ;;
51 i[34]86-*-isc*) gas_host=sysv ;;
52 i386-sun-sunos*) gas_host=sun386 ;;
53
54 m68k-sun-sunos*) gas_host=sun3 ;;
55 m68*-*-hpux) gas_host=hpux ;;
56
57 mips*-dec-ultrix*) gas_host=decstatn ;;
58 mips*-*-bsd*) gas_host=mipsbsd ;;
59 mips*-sgi-irix*) gas_host=irix ;;
60
61 rs6000-*-*) gas_host=rs6000 ;;
62
63 sparc-sun-sunos*) gas_host=sun4 ;;
64 sparc-sun-solaris2*) gas_host=sysv ;;
65
66 vax-*-vms*) gas_host=vms ;;
67 vax-*-bsd*) gas_host=vax ;;
68 vax-*-ultrix*) gas_host=vax ;;
69
70 *-*-sysv4* | *-*-unixware) gas_host=sysv ;;
71
72 *-*-ansi | *-*-hpux | *-*-sysv)
73 gas_host=${host_os} ;;
74
75 esac
76
77 if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then
78 echo '*** GAS does not support host' ${host} 1>&2
79 exit 1
80 fi
81
82 # per-target:
83
84 case ${with_bfd_assembler} in
85 yes)
86 echo "*** Warning: GAS BFD configuration option not yet fully supported" 1>&2
87 need_bfd=yes
88 bfd_gas=yes
89 ;;
90 no | "")
91 ;;
92 *)
93 echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2
94 exit 1
95 ;;
96 esac
97
98 # assign cpu type
99 emulation=generic
100
101 # default is big
102 endian=big
103
104 # check for architecture variants
105 case ${target_cpu} in
106 # Actually we've only got support for the 1.1, so we shouldn't generalize,
107 # but this is what the support files are named...
108 hppa*) cpu_type=hppa ;;
109 i486) cpu_type=i386 ;;
110 m680[01234]0) cpu_type=m68k ;;
111 m68008) cpu_type=m68k ;;
112 m683??) cpu_type=m68k ;;
113 m8*) cpu_type=m88k ;;
114 mips*el) cpu_type=mips endian=little;;
115 mips*) cpu_type=mips ;;
116 powerpc*) cpu_type=ppc ;;
117 rs6000*) cpu_type=ppc ;;
118 sparc64) cpu_type=sparc64 obj_format=elf ;; # v9
119 sparclite*) cpu_type=sparc ;;
120 *) cpu_type=${target_cpu} ;;
121 esac
122
123 gas_target=${cpu_type}
124 generic_target=${cpu_type}-${target_vendor}-${target_os}
125 dev=no
126
127 # assign object format
128 case ${generic_target} in
129 a29k-amd-udi) obj_format=coffbfd gas_target=ebmon29k ;;
130 a29k-amd-ebmon) obj_format=coffbfd gas_target=ebmon29k ;;
131 a29k-amd-ebmonold) obj_format=coff gas_target=ebmon29k ;;
132
133 alpha-*-netware*) obj_format=ecoff ;;
134 alpha-*-osf*) obj_format=ecoff ;;
135
136 hppa-*-*elf*) obj_format=elf emulation=hppa ;;
137 hppa-*-osf*) obj_format=som emulation=hppa ;;
138 hppa-*-hpux*) obj_format=som emulation=hppa ;;
139 hppa-*-bsd*) obj_format=som emulation=hppa ;;
140 hppa-*-hiux*) obj_format=som emulation=hppa ;;
141
142 h8300-*-coff) obj_format=coffbfd ;;
143
144 i386-ibm-aix*) obj_format=coffbfd gas_target=i386coff
145 emulation=i386aix ;;
146 i386-*-bsd*) obj_format=aout emulation=386bsd ;;
147 i386-*-netbsd0.8) obj_format=aout emulation=netbsd ;;
148 i386-*-netbsd*) obj_format=aout emulation=netbsd ;;
149 i386-*-linux*elf*) obj_format=elf emulation=linux ;;
150 i386-*-linux*coff*) obj_format=coffbfd emulation=linux
151 gas_target=i386coff ;;
152 i386-*-linux*) obj_format=aout emulation=linux ;;
153 i386-*-lynxos*) obj_format=coffbfd gas_target=i386coff
154 emulation=lynx ;;
155 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
156 obj_format=elf ;;
157 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
158 obj_format=coffbfd gas_target=i386coff ;;
159 i386-*-vsta) obj_format=aout ;;
160 i386-*-go32) obj_format=aout ;;
161
162 i960-*-bout) obj_format=bout ;;
163 i960-*-coff) obj_format=coff emulation=ic960 ;;
164 i960-*-nindy*) obj_format=bout ;;
165 i960-*-vxworks4*) obj_format=bout ;;
166 i960-*-vxworks5.0) obj_format=bout ;;
167 i960-*-vxworks5.*) obj_format=coff emulation=ic960 ;;
168 i960-*-vxworks*) obj_format=bout ;;
169
170 m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*)
171 obj_format=aout emulation=sun3 ;;
172 m68k-*-coff | m68k-*-sysv*)
173 obj_format=coffbfd gas_target=m68kcoff ;;
174 m68k-*-hpux) obj_format=hp300 emulation=hp300 ;;
175 m68k-*-lynxos*) obj_format=coffbfd gas_target=m68kcoff
176 emulation=lynx ;;
177
178 m88k-*-coff*) obj_format=coffbfd gas_target=m88kcoff ;;
179
180 # don't change emulation like *-*-bsd does
181 mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
182 mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;;
183 mips-*-ecoff*) obj_format=ecoff
184 if [ $endian = big ] ; then
185 gas_target=mips-big
186 else
187 gas_target=mips-lit
188 fi
189 ;;
190 mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;;
191 mips-*-irix5*) obj_format=elf gas_target=mips-big ;;
192 mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;;
193 mips-*-riscos*) obj_format=ecoff gas_target=mips-big ;;
194 mips-*-sysv*) obj_format=ecoff gas_target=mips-big ;;
195 mips-*-elf*) obj_format=elf
196 if [ $endian = big ] ; then
197 gas_target=mips-big
198 else
199 gas_target=mips-lit
200 fi
201 ;;
202
203 ppc-*-aix*) obj_format=coff bfd_gas=yes ;;
204 ppc-*-sysv4*) obj_format=elf bfd_gas=yes ;;
205
206 sh-*-coff) obj_format=coffbfd ;;
207
208 sparc*-*-sunos4*) obj_format=aout emulation=sun3 bfd_gas=yes ;;
209 sparc*-*-aout | sparc*-*-vxworks)
210 obj_format=aout bfd_gas=yes ;;
211 sparc*-*-coff) obj_format=coff bfd_gas=yes ;;
212 sparc*-*-lynxos) obj_format=coff bfd_gas=yes ;;
213 sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;;
214 sparc*-*-elf | sparc*-*-solaris*)
215 obj_format=elf ;;
216 sparc64-*-aout*) obj_format=aout bfd_gas=yes ;; # v9
217
218 vax-*-bsd* | vax-*-ultrix*)
219 obj_format=aout ;;
220 vax-*-vms) obj_format=vms ;;
221
222 z8k-*-coff | z8k-*-sim)
223 obj_format=coffbfd ;;
224
225 *-*-aout | *-*-scout)
226 obj_format=aout ;;
227 *-*-nindy*)
228 obj_format=bout ;;
229 *-*-bsd*)
230 obj_format=aout emulation=sun3 ;;
231 *-*-generic) obj_format=generic ;;
232 *-*-xray | *-*-hms) obj_format=coffbfd ;;
233 *-*-sysv32) obj_format=coff emulation=sysv32 ;;
234 *-*-sim) obj_format=coffbfd ;;
235 *-*-elf | *-*-sysv4* | *-*-solaris*)
236 echo '*** Warning: GAS support for ELF format is incomplete' 1>&2
237 obj_format=elf dev=yes ;;
238 *-*-coff* | *-sysv* | *-*-sco*)
239 obj_format=coff
240 case ${target_vendor} in
241 bull) emulation=dpx2 ;;
242 sun) emulation=sun3 ;;
243 esac
244 ;;
245 *-*-vxworks) obj_format=aout ;;
246 *-*-netware) obj_format=elf ;;
247 esac
248
249 # Assign floating point type. Most processors with FP support
250 # IEEE FP. On those that don't support FP at all, usually IEEE
251 # is emulated.
252 case ${target_cpu} in
253 ns32k | vax | tahoe ) atof=${target_cpu} ;;
254 *) atof=ieee ;;
255 esac
256
257 if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then
258 echo '*** GAS does not support target CPU' ${cpu_type} 1>&2
259 exit 1
260 fi
261
262 case "${obj_format}" in
263 "")
264 echo "*** GAS doesn't know what format to use for target" ${target} 1>&2
265 exit 1
266 ;;
267 esac
268
269 if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then
270 echo '*** GAS does not have support for object file format' ${obj_format} 1>&2
271 exit 1
272 fi
273
274 # and target makefile frag
275
276 target_makefile_frag=config/${gas_target}.mt
277
278 case ${bfd_gas}-${obj_format} in
279 yes-coffbfd) obj_format=coff ;;
280 no-coffbfd) need_bfd=yes ;;
281 *-elf) bfd_gas=yes ;;
282 *-ecoff) bfd_gas=yes ;;
283 *-som) bfd_gas=yes ;;
284 *) ;;
285 esac
286
287 case ${with_bfd_assembler}-${bfd_gas} in
288 yes-yes | no-no)
289 # We didn't override user's choice.
290 ;;
291 no-yes)
292 echo '*** Use of BFD is required for ${target}; overriding config options'\
293 1>&2
294 ;;
295 no-preferred)
296 bfd_gas=no
297 ;;
298 *-preferred)
299 bfd_gas=yes
300 ;;
301 -*)
302 # User specified nothing.
303 ;;
304 esac
305
306 reject_dev_configs=yes
307
308 case ${reject_dev_configs}-${dev} in
309 yes-yes) # Oops.
310 echo "*** GAS does not support the ${generic_target} configuration" 1>&2
311 exit 1
312 ;;
313 esac
314
315 files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
316 config/tc-${cpu_type}.h config/te-${emulation}.h \
317 config/obj-${obj_format}.h config/obj-${obj_format}.c \
318 config/atof-${atof}.c"
319
320 links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
321
322 # post-target:
323
324 case ${bfd_gas} in
325 yes) bfddef="BFDDEF=define" need_bfd=yes ;;
326 *) bfddef="BFDDEF=undef" ;;
327 esac
328
329 case ${need_bfd} in
330 yes) bfdlib="BFDLIB=../bfd/libbfd.a" ;;
331 *) bfdlib="" ;;
332 esac
333
334 case "x${host}" in
335 "x${target}") cross="" ;;
336 *) cross="CROSS=-DCROSS_COMPILE" ;;
337 esac
338
339 rm -f Makefile.tem
340 echo $bfddef > Makefile.tem
341 echo $bfdlib >> Makefile.tem
342 echo $cross >> Makefile.tem
343 cat Makefile >> Makefile.tem
344 mv -f Makefile.tem Makefile
345
346 # end of gas/configure.in
This page took 0.03644 seconds and 5 git commands to generate.