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