(big_cons): If target_big_endian, reverse bytes being copied. (Temporary
[deliverable/binutils-gdb.git] / gas / configure.in
CommitLineData
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
30srctrigger=as.c
31srcname="gas"
4f6f4aa8 32need_bfd=no
f70a4714 33configdirs="doc testsuite"
1058238c 34
353deb84
RP
35# per-host:
36
b678740d 37gas_host=generic
fecd2382 38
984cf2d7 39case "${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 ;;
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
74esac
75
b678740d
RP
76# per-target:
77
4f6f4aa8
KR
78# not yet...
79case ${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 ;;
91esac
92
b678740d
RP
93# assign cpu type
94emulation=generic
95
96cpu_type=${target_cpu}
97
b53ccaac
ILT
98# check for architecture variants
99case ${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 ;;
f70a4714 104 i486) cpu_type=i386 ;;
b53ccaac
ILT
105esac
106
107gas_target=${cpu_type}
108
f70a4714
KR
109generic_target=${cpu_type}-${target_vendor}-${target_os}
110
74cc5508 111# assign object format
f70a4714 112case ${generic_target} in
984cf2d7
ME
113 a29k-amd-udi)
114 obj_format=coffbfd
4f6f4aa8 115 need_bfd=yes
984cf2d7
ME
116 gas_target=ebmon29k
117 ;;
118 a29k-amd-ebmon)
119 obj_format=coffbfd
4f6f4aa8 120 need_bfd=yes
984cf2d7
ME
121 gas_target=ebmon29k
122 ;;
123 a29k-amd-ebmonold)
124 obj_format=coff
4f6f4aa8 125 need_bfd=yes
984cf2d7
ME
126 gas_target=ebmon29k
127 ;;
f70a4714 128 i386-ibm-aix*)
85825401 129 obj_format=coffbfd
4f6f4aa8 130 need_bfd=yes
85825401 131 gas_target=i386coff
984cf2d7
ME
132 emulation=i386aix
133 ;;
f70a4714 134 i386-*-bsd*)
984cf2d7 135 obj_format=aout
984cf2d7 136 ;;
f70a4714 137 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
984cf2d7 138 obj_format=coffbfd
4f6f4aa8 139 need_bfd=yes
984cf2d7
ME
140 gas_target=i386coff
141 ;;
f70a4714 142 i386-*-go32)
6efd877d
KR
143 obj_format=aout
144 ;;
984cf2d7
ME
145 i960-wrs-vxworks)
146 obj_format=bout
147 ;;
148 i960-*-coff)
149 obj_format=coff
150 emulation=ic960
151 ;;
152 m68k-wrs-vxworks)
153 obj_format=aout
154 emulation=sun3
155 ;;
156 m68k-ericsson-[Oo][Ss][Ee])
157 obj_format=aout
158 emulation=sun3
159 ;;
160 m68k-*-coff)
161 obj_format=coffbfd
4f6f4aa8 162 need_bfd=yes
984cf2d7
ME
163 gas_target=m68kcoff
164 ;;
4f6f4aa8
KR
165 mips-*-bsd*)
166 # don't change emulation like *-*-bsd does
167 bfd_gas=yes
168 obj_format=aout
169 gas_target=mips-lit
170 ;;
171 mips-*-ultrix*)
172 bfd_gas=yes
173 obj_format=ecoff
174 gas_target=mips-lit
175 ;;
176 mips-*-irix* | mips-*-ecoff)
177 bfd_gas=yes
178 obj_format=ecoff
179 gas_target=mips-big
180 ;;
181 sparclite*-fujitsu-none)
6ea6d0e3
ME
182 obj_format=aout
183 ;;
85825401 184 *-*-aout | *-*-scout | *-*-linux)
984cf2d7
ME
185 obj_format=aout
186 ;;
187 *-*-bout* | *-*-nindy*)
188 obj_format=bout
189 ;;
190 *-*-bsd* | *-*-sunos*)
191 obj_format=aout
192 emulation=sun3
193 ;;
194 *-*-generic)
195 obj_format=generic
196 ;;
197 *-*-xray | *-*-hms)
198 obj_format=coffbfd
4f6f4aa8 199 need_bfd=yes
984cf2d7
ME
200 ;;
201 *-*-sysv32)
202 obj_format=coff
203 emulation=sysv32
204 ;;
205 *-*-sim)
206 obj_format=coffbfd
4f6f4aa8 207 need_bfd=yes
984cf2d7
ME
208 ;;
209 *-*-coff* | *-sysv* | *-*-sco*)
210 obj_format=coff
211 case ${target_vendor} in
212 bull) emulation=dpx2 ;;
213 sun) emulation=sun3 ;;
214 esac
215 ;;
216 *-*-vxworks)
217 obj_format=aout
218 ;;
219 *-*-coff)
220 obj_format=coff
221 ;;
4f6f4aa8
KR
222 *-*-elf | *-*-solaris*)
223 case ${bfd_gas} in
224 yes) ;;
225 *)
226 echo "*** warning: gas ${target_os} configuration implies" 1>&2
227 echo " (unsupported) --with-bfd-assembler option" 1>&2
228 bfd_gas=yes
229 ;;
230 esac
231 obj_format=elf
232 ;;
85825401
ILT
233 *-*-vms)
234 obj_format=vms
235 ;;
fecd2382
RP
236esac
237
74cc5508 238# assign floating point type
b678740d 239case ${target_cpu} in
984cf2d7
ME
240 ns32k) atof=ns32k ;;
241 vax) atof=vax ;;
85825401 242 tahoe) atof=tahoe ;;
984cf2d7 243 *) atof=ieee ;;
fecd2382
RP
244esac
245
8a24a37c
SC
246# and target makefile frag
247
b53ccaac 248target_makefile_frag=config/${gas_target}.mt
8a24a37c 249
b678740d 250files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
353deb84 251 config/tc-${cpu_type}.h config/te-${emulation}.h \
74cc5508
RP
252 config/obj-${obj_format}.h config/obj-${obj_format}.c \
253 config/atof-${atof}.c"
254
fecd2382 255links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
8b228fe9 256
4f6f4aa8
KR
257# post-target:
258
259case ${bfd_gas} in
260 yes)
261 echo BFDDEF=-DBFD_ASSEMBLER >> Makefile
262 need_bfd=yes
263 ;;
264 *)
265 ;;
266esac
267
268case ${need_bfd} in
269 yes)
270 echo BFDLIB=../bfd/libbfd.a >> Makefile
271 ;;
272 *)
273 ;;
274esac
275
8b228fe9 276# end of gas/configure.in
This page took 0.07742 seconds and 4 git commands to generate.