1 # This file is configure.in
3 # Copyright (C) 1987-1992,1993,1994 Free Software Foundation, Inc.
5 # This file is part of GAS, the GNU Assembler.
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)
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.
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. */
22 # This file was written, and is maintained by K. Richard Pixley
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.
34 configdirs="doc testsuite"
41 a29k-*-*) gas_host=a29k ;;
43 alpha-*-osf*) gas_host=ansi ;;
45 hppa*-*-hpux*) gas_host=hpux ;;
46 hppa*-*-bsd*) gas_host=hppabsd ;;
47 hppa*-*-osf*) gas_host=hppaosf ;;
48 hppa*-*-hiux*) gas_host=hpux ;;
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 i386-*-mach*) gas_host=mach3 ;;
54 i386-*-go32) target_makefile_frag=config/go32.mh ;;
56 m68k-sun-sunos*) gas_host=sun3 ;;
57 m68*-*-hpux) gas_host=hpux ;;
59 mips*-dec-ultrix*) gas_host=decstatn ;;
60 mips*-*-bsd*) gas_host=mipsbsd ;;
61 mips*-sgi-irix*) gas_host=irix ;;
63 rs6000-*-*) gas_host=rs6000 ;;
65 sparc-sun-sunos*) gas_host=sun4 ;;
66 sparc-sun-solaris2*) gas_host=sysv ;;
68 vax-*-vms*) gas_host=vms ;;
69 vax-*-bsd*) gas_host=vax ;;
70 vax-*-ultrix*) gas_host=vax ;;
72 *-*-sysv4* | *-*-unixware) gas_host=sysv ;;
74 *-*-ansi | *-*-hpux | *-*-sysv)
75 gas_host=${host_os} ;;
79 if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then
80 echo '*** GAS does not support host' ${host} 1>&2
86 case ${with_bfd_assembler} in
88 echo "*** Warning: GAS BFD configuration option not yet fully supported" 1>&2
95 echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2
106 # check for architecture variants
107 case ${target_cpu} in
108 # Actually we've only got support for the 1.1, so we shouldn't generalize,
109 # but this is what the support files are named...
110 hppa*) cpu_type=hppa ;;
111 i486) cpu_type=i386 ;;
112 m680[012346]0) cpu_type=m68k ;;
113 m68008) cpu_type=m68k ;;
114 m683??) cpu_type=m68k ;;
115 m8*) cpu_type=m88k ;;
116 mips*el) cpu_type=mips endian=little;;
117 mips*) cpu_type=mips ;;
118 powerpc*) cpu_type=ppc ;;
119 rs6000*) cpu_type=ppc ;;
120 sparc64) cpu_type=sparc64 obj_format=elf ;; # v9
121 sparclite*) cpu_type=sparc ;;
122 *) cpu_type=${target_cpu} ;;
125 # do we need the opcodes library?
131 opcodes="../opcodes/libopcodes.a"
135 gas_target=${cpu_type}
136 generic_target=${cpu_type}-${target_vendor}-${target_os}
139 # assign object format
140 case ${generic_target} in
141 a29k-amd-udi) obj_format=coff gas_target=ebmon29k ;;
142 a29k-amd-ebmon) obj_format=coff gas_target=ebmon29k ;;
144 alpha-*-netware*) obj_format=ecoff ;;
145 alpha-*-osf*) obj_format=ecoff ;;
147 hppa-*-*elf*) obj_format=elf emulation=hppa ;;
148 hppa-*-osf*) obj_format=som emulation=hppa ;;
149 hppa-*-hpux*) obj_format=som emulation=hppa ;;
150 hppa-*-bsd*) obj_format=som emulation=hppa ;;
151 hppa-*-hiux*) obj_format=som emulation=hppa ;;
153 h8300-*-coff) obj_format=coff ;;
155 i386-ibm-aix*) obj_format=coff gas_target=i386coff
157 i386-*-bsd*) obj_format=aout emulation=386bsd ;;
158 i386-*-netbsd0.8) obj_format=aout emulation=386bsd ;;
159 i386-*-netbsd*) obj_format=aout emulation=netbsd ;;
160 i386-*-linux*elf*) obj_format=elf emulation=linux ;;
161 i386-*-linux*coff*) obj_format=coff emulation=linux
162 gas_target=i386coff ;;
163 i386-*-linux*) obj_format=aout emulation=linux ;;
164 i386-*-lynxos*) obj_format=coff gas_target=i386coff
166 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
168 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
169 obj_format=coff gas_target=i386coff ;;
170 i386-*-vsta) obj_format=aout ;;
171 i386-*-go32) obj_format=coff gas_target=i386coff ;;
172 i386-*-mach* | i386-*-gnu*)
173 obj_format=aout emulation=mach bfd_gas=yes ;;
175 i960-*-bout) obj_format=bout ;;
176 i960-*-coff) obj_format=coff emulation=ic960 gas_target=ic960coff ;;
177 i960-*-nindy*) obj_format=bout ;;
178 i960-*-vxworks4*) obj_format=bout ;;
179 i960-*-vxworks5.0) obj_format=bout ;;
180 i960-*-vxworks5.*) obj_format=coff emulation=ic960 gas_target=ic960coff ;;
181 i960-*-vxworks*) obj_format=bout ;;
183 m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*)
184 obj_format=aout emulation=sun3 ;;
185 m68k-motorola-sysv) obj_format=coff gas_target=m68kcoff emulation=delta ;;
186 m68k-bull-sysv3*) obj_format=coff gas_target=m68kcoff emulation=dpx2 ;;
187 m68k-apollo-*) obj_format=coff gas_target=apollo emulation=apollo ;;
188 m68k-*-coff | m68k-*-sysv*)
189 obj_format=coff gas_target=m68kcoff ;;
190 m68k-*-hpux) obj_format=hp300 emulation=hp300 ;;
191 m68k-*-lynxos*) obj_format=coff gas_target=m68kcoff
194 m88k-*-coff*) obj_format=coff gas_target=m88kcoff ;;
196 # don't change emulation like *-*-bsd does
197 mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
198 mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;;
199 mips-*-ecoff*) obj_format=ecoff
200 if [ $endian = big ] ; then
206 mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;;
207 mips-*-irix5*) obj_format=elf gas_target=mips-big ;;
208 mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;;
209 mips-*-riscos*) obj_format=ecoff gas_target=mips-big ;;
210 mips-*-sysv*) obj_format=ecoff gas_target=mips-big ;;
211 mips-*-elf*) obj_format=elf
212 if [ $endian = big ] ; then
219 ppc-*-aix*) obj_format=coff bfd_gas=yes ;;
220 ppc-*-sysv4*) obj_format=elf bfd_gas=yes ;;
222 sh-*-coff) obj_format=coff ;;
224 sparc*-*-sunos4*) obj_format=aout emulation=sun3 bfd_gas=yes ;;
225 sparc*-*-aout | sparc*-*-vxworks)
226 obj_format=aout bfd_gas=yes ;;
227 sparc*-*-coff) obj_format=coff bfd_gas=yes ;;
228 sparc*-*-lynxos*) obj_format=coff bfd_gas=yes emulation=lynx ;;
229 sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;;
230 sparc*-*-elf | sparc*-*-solaris*)
232 sparc64-*-aout*) obj_format=aout bfd_gas=yes ;; # v9
234 vax-*-bsd* | vax-*-ultrix*)
236 vax-*-vms) obj_format=vms ;;
238 z8k-*-coff | z8k-*-sim)
241 *-*-aout | *-*-scout)
246 obj_format=aout emulation=sun3 ;;
247 *-*-generic) obj_format=generic ;;
248 *-*-xray | *-*-hms) obj_format=coff ;;
249 *-*-sim) obj_format=coff ;;
250 *-*-elf | *-*-sysv4* | *-*-solaris*)
251 echo '*** Warning: GAS support for ELF format is incomplete' 1>&2
252 obj_format=elf dev=yes ;;
253 *-*-vxworks) obj_format=aout ;;
254 *-*-netware) obj_format=elf ;;
257 # Assign floating point type. Most processors with FP support
258 # IEEE FP. On those that don't support FP at all, usually IEEE
260 case ${target_cpu} in
261 ns32k | vax | tahoe ) atof=${target_cpu} ;;
265 if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then
266 echo '*** GAS does not support target CPU' ${cpu_type} 1>&2
270 case "${obj_format}" in
272 echo "*** GAS doesn't know what format to use for target" ${target} 1>&2
277 if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then
278 echo '*** GAS does not have support for object file format' ${obj_format} 1>&2
282 # and target makefile frag
284 target_makefile_frag=config/${gas_target}.mt
286 case ${bfd_gas}-${obj_format} in
287 yes-coff) need_bfd=yes ;;
288 no-coff) need_bfd=yes extra_def="MANY_SEGMENTS" ;;
289 *-elf) bfd_gas=yes ;;
290 *-ecoff) bfd_gas=yes ;;
291 *-som) bfd_gas=yes ;;
295 case ${with_bfd_assembler}-${bfd_gas} in
297 # We didn't override user's choice.
300 echo '*** Use of BFD is required for ${target}; overriding config options'\
310 # User specified nothing.
314 reject_dev_configs=yes
316 case ${reject_dev_configs}-${dev} in
318 echo "*** GAS does not support the ${generic_target} configuration" 1>&2
323 files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
324 config/tc-${cpu_type}.h config/te-${emulation}.h \
325 config/obj-${obj_format}.h config/obj-${obj_format}.c \
326 config/atof-${atof}.c"
328 links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
333 yes) extra_def="BFD_ASSEMBLER" need_bfd=yes ;;
337 yes) bfdlib="BFDLIB=../bfd/libbfd.a"
338 all_obj_deps="$all_obj_deps ../bfd/bfd.h"
345 "x${target}") cross="" ;;
346 *) cross="CROSS=-DCROSS_COMPILE" ;;
350 echo $cross > Makefile.tem
351 echo ALL_OBJ_DEPS=$all_obj_deps >> Makefile.tem
352 echo defs=$extra_def >> Makefile.tem
353 echo $bfdlib >> Makefile.tem
354 echo "OPCODES_LIB=$opcodes" >> Makefile.tem
355 cat Makefile >> Makefile.tem
356 mv -f Makefile.tem Makefile
358 # end of gas/configure.in