First crack at a test suite.
[deliverable/binutils-gdb.git] / gas / configure.in
1 # This file is configure.in
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
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 configdirs="doc testsuite"
34
35 # per-host:
36
37 gas_host=generic
38
39 case "${host}" in
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
46 ;;
47 mips-dec-ultrix)
48 gas_host=decstatn
49 ;;
50 mips-*-bsd*)
51 gas_host=mipsbsd
52 ;;
53 i[34]86-ibm-aix*)
54 gas_host=i386aix
55 ;;
56 i[34]86-*-isc*)
57 gas_host=sysv
58 ;;
59 m68k-sun-sunos*)
60 gas_host=sun3
61 ;;
62 i386-sun-sunos*)
63 gas_host=sun386
64 ;;
65 sparc-sun-sunos*)
66 gas_host=sun4
67 ;;
68 sparc-sun-solaris2*)
69 gas_host=sysv
70 ;;
71 *-*-ansi | *-*-ultrix | *-*-hpux | *-*-sysv*)
72 gas_host=${host_os}
73 ;;
74 esac
75
76 # per-target:
77
78 # not yet...
79 case ${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 ;;
91 esac
92
93 # assign cpu type
94 emulation=generic
95
96 cpu_type=${target_cpu}
97
98 # check for architecture variants
99 case ${target_cpu} in
100 sparclite*) cpu_type=sparc ;;
101 sparc64) cpu_type=sparc obj_format=aout ;;
102 m680[01234]0) cpu_type=m68k ;;
103 m683??) cpu_type=m68k ;;
104 i486) cpu_type=i386 ;;
105 esac
106
107 gas_target=${cpu_type}
108
109 generic_target=${cpu_type}-${target_vendor}-${target_os}
110
111 # assign object format
112 case ${generic_target} in
113 a29k-amd-udi)
114 obj_format=coffbfd
115 need_bfd=yes
116 gas_target=ebmon29k
117 ;;
118 a29k-amd-ebmon)
119 obj_format=coffbfd
120 need_bfd=yes
121 gas_target=ebmon29k
122 ;;
123 a29k-amd-ebmonold)
124 obj_format=coff
125 need_bfd=yes
126 gas_target=ebmon29k
127 ;;
128 i386-ibm-aix*)
129 obj_format=coffbfd
130 need_bfd=yes
131 gas_target=i386coff
132 emulation=i386aix
133 ;;
134 i386-*-bsd*)
135 obj_format=aout
136 ;;
137 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
138 obj_format=coffbfd
139 need_bfd=yes
140 gas_target=i386coff
141 ;;
142 i386-*-go32)
143 obj_format=aout
144 ;;
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
162 need_bfd=yes
163 gas_target=m68kcoff
164 ;;
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)
182 obj_format=aout
183 ;;
184 *-*-aout | *-*-scout | *-*-linux)
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
199 need_bfd=yes
200 ;;
201 *-*-sysv32)
202 obj_format=coff
203 emulation=sysv32
204 ;;
205 *-*-sim)
206 obj_format=coffbfd
207 need_bfd=yes
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 ;;
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 ;;
233 *-*-vms)
234 obj_format=vms
235 ;;
236 esac
237
238 # assign floating point type
239 case ${target_cpu} in
240 ns32k) atof=ns32k ;;
241 vax) atof=vax ;;
242 tahoe) atof=tahoe ;;
243 *) atof=ieee ;;
244 esac
245
246 # and target makefile frag
247
248 target_makefile_frag=config/${gas_target}.mt
249
250 files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
251 config/tc-${cpu_type}.h config/te-${emulation}.h \
252 config/obj-${obj_format}.h config/obj-${obj_format}.c \
253 config/atof-${atof}.c"
254
255 links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
256
257 # post-target:
258
259 case ${bfd_gas} in
260 yes)
261 echo BFDDEF=-DBFD_ASSEMBLER >> Makefile
262 need_bfd=yes
263 ;;
264 *)
265 ;;
266 esac
267
268 case ${need_bfd} in
269 yes)
270 echo BFDLIB=../bfd/libbfd.a >> Makefile
271 ;;
272 *)
273 ;;
274 esac
275
276 # end of gas/configure.in
This page took 0.035676 seconds and 5 git commands to generate.