hp300 support. Emulation mode fix for 386bsd and linux.
[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
42 a29k-*-*) gas_host=a29k ;;
43
44 hppa-hp-hpux*) gas_host=hppahpux ;;
45 hppa-hp-bsd*) gas_host=hppabsd ;;
46 hppa-hp-osf*) gas_host=hppaosf ;;
47
48 i[34]86-ibm-aix*) gas_host=i386aix ;;
49 i[34]86-*-isc*) gas_host=sysv ;;
50 i386-sun-sunos*) gas_host=sun386 ;;
51
52 m68k-sun-sunos*) gas_host=sun3 ;;
53 m68*-*-hpux) gas_host=hpux ;;
54
55 mips-dec-ultrix*) gas_host=decstatn ;;
56 mips-*-bsd*) gas_host=mipsbsd ;;
57 mips-sgi-irix*) gas_host=irix ;;
58
59 rs6000-*-*) gas_host=rs6000 ;;
60
61 sparc-sun-sunos*) gas_host=sun4 ;;
62 sparc-sun-solaris2*) gas_host=sysv ;;
63
64 vax-*-vms*) gas_host=vms ;;
65 vax-*-bsd*) gas_host=vax ;;
66
67 *-*-ansi | *-*-ultrix | *-*-hpux | *-*-sysv*)
68 gas_host=${host_os} ;;
69
70 esac
71
72 if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then
73 echo '*** GAS does not support host' ${host} 1>&2
74 exit 1
75 fi
76
77 # per-target:
78
79 case ${with_bfd_assembler} in
80 yes)
81 echo "*** Warning: GAS BFD configuration option not yet fully 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 # check for architecture variants
97 case ${target_cpu} in
98 sparclite*) cpu_type=sparc ;;
99 sparc64) cpu_type=sparc obj_format=aout ;;
100 m680[01234]0) cpu_type=m68k ;;
101 m683??) cpu_type=m68k ;;
102 i486) cpu_type=i386 ;;
103 # Actually we've only got support for the 1.1, so we shouldn't generalize,
104 # but this is what the support files are named...
105 hppa1.1) cpu_type=hppa ;;
106 *) cpu_type=${target_cpu} ;;
107 esac
108
109 gas_target=${cpu_type}
110
111 generic_target=${cpu_type}-${target_vendor}-${target_os}
112
113 # assign object format
114 case ${generic_target} in
115 a29k-amd-udi) obj_format=coffbfd gas_target=ebmon29k ;;
116 a29k-amd-ebmon) obj_format=coffbfd gas_target=ebmon29k ;;
117 a29k-amd-ebmonold) obj_format=coff gas_target=ebmon29k ;;
118
119 hppa-*-osf) obj_format=elf emulation=hppa ;;
120 hppa-*-hpux*) obj_format=som emulation=hppa ;;
121
122 i386-ibm-aix*) obj_format=coffbfd gas_target=i386coff
123 emulation=i386aix ;;
124 i386-*-bsd*) obj_format=aout emulation=386bsd ;;
125 i386-*-linux*) obj_format=aout emulation=linux ;;
126 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
127 obj_format=coffbfd gas_target=i386coff ;;
128 i386-*-go32) obj_format=aout ;;
129
130 i960-wrs-vxworks) obj_format=bout ;;
131 i960-*-coff) obj_format=coff emulation=ic960 ;;
132
133 m68k-wrs-vxworks) obj_format=aout emulation=sun3 ;;
134 m68k-ericsson-[Oo][Ss][Ee])
135 obj_format=aout emulation=sun3 ;;
136 m68k-*-coff) obj_format=coffbfd gas_target=m68kcoff ;;
137 m68k-*-hpux) obj_format=hp300 emulation=hp300 ;;
138
139 # don't change emulation like *-*-bsd does
140 mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
141 mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;;
142 mips-*-ecoff) obj_format=ecoff gas_target=mips-big ;;
143 mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;;
144
145 sparclite*-fujitsu-none)
146 obj_format=aout ;;
147
148 *-*-aout | *-*-scout | *-*-linux)
149 obj_format=aout ;;
150 *-*-bout* | *-*-nindy*)
151 obj_format=bout ;;
152 *-*-bsd* | *-*-sunos*)
153 obj_format=aout emulation=sun3 ;;
154 *-*-generic) obj_format=generic ;;
155 *-*-xray | *-*-hms) obj_format=coffbfd ;;
156 *-*-sysv32) obj_format=coff emulation=sysv32 ;;
157 *-*-sim) obj_format=coffbfd ;;
158 *-*-coff* | *-sysv* | *-*-sco*)
159 obj_format=coff
160 case ${target_vendor} in
161 bull) emulation=dpx2 ;;
162 sun) emulation=sun3 ;;
163 esac
164 ;;
165 *-*-vxworks) obj_format=aout ;;
166 *-*-coff) obj_format=coff ;;
167 *-*-elf | *-*-solaris*)
168 echo '*** Warning: GAS support for ELF format is incomplete' 1>&2
169 obj_format=elf ;;
170 *-*-vms) obj_format=vms ;;
171 esac
172
173 # assign floating point type
174 case ${target_cpu} in
175 ns32k | vax | tahoe ) atof=${target_cpu} ;;
176 *) atof=ieee ;;
177 esac
178
179 if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then
180 echo '*** GAS does not support target CPU' ${cpu_type} 1>&2
181 exit 1
182 fi
183
184 if [ x${obj_format} = x ]; then
185 echo "*** GAS doesn't know what format to use for target" ${target} 1>&2
186 exit 1
187 fi
188
189 if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then
190 echo '*** GAS does not have support for object file format' ${obj_format} 1>&2
191 exit 1
192 fi
193
194 # and target makefile frag
195
196 target_makefile_frag=config/${gas_target}.mt
197
198 case ${bfd_gas}-${obj_format} in
199 yes-coffbfd) obj_format=coff ;;
200 no-coffbfd) need_bfd=yes ;;
201 *-elf) bfd_gas=yes ;;
202 *-ecoff) bfd_gas=yes ;;
203 *) ;;
204 esac
205
206 case ${with_bfd_assembler} in
207 "")
208 # User specified nothing.
209 ;;
210 "${bfd_gas}")
211 # We didn't override user's choice.
212 ;;
213 no)
214 # ... but we overrode it.
215 echo '*** Use of BFD is required for ${target}; overriding config options'\
216 1>&2
217 ;;
218 esac
219
220 files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
221 config/tc-${cpu_type}.h config/te-${emulation}.h \
222 config/obj-${obj_format}.h config/obj-${obj_format}.c \
223 config/atof-${atof}.c"
224
225 links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
226
227 # post-target:
228
229 case ${bfd_gas} in
230 yes)
231 rm -f Makefile.tem
232 mv Makefile Makefile.tem
233 echo BFDDEF=-DBFD_ASSEMBLER > Makefile
234 cat Makefile.tem >> Makefile
235 rm -f Makefile.tem
236 need_bfd=yes
237 ;;
238 *)
239 ;;
240 esac
241
242 case ${need_bfd} in
243 yes)
244 rm -f Makefile.tem
245 mv Makefile Makefile.tem
246 echo BFDLIB=../bfd/libbfd.a > Makefile
247 cat Makefile.tem >> Makefile
248 rm -f Makefile.tem
249 ;;
250 *)
251 ;;
252 esac
253
254 # end of gas/configure.in
This page took 0.03581 seconds and 5 git commands to generate.