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