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