* stack.c (print_frame_info): When checking PC_IN_CALL_DUMMY,
[deliverable/binutils-gdb.git] / gas / configure.in
CommitLineData
6d5460ab 1# This file is configure.in
79a54a5b
RP
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
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 ;;
7cf4d7ff
KR
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
984cf2d7 68 *-*-ansi | *-*-ultrix | *-*-hpux | *-*-sysv*)
7cf4d7ff
KR
69 gas_host=${host_os} ;;
70
74cc5508
RP
71esac
72
7cf4d7ff
KR
73if [ ! -r ${srcdir}/config/ho-${gas_host}.h ]; then
74 echo '*** GAS does not support host' ${host} 1>&2
75 exit 1
76fi
77
b678740d
RP
78# per-target:
79
4f6f4aa8
KR
80case ${with_bfd_assembler} in
81 yes)
7cf4d7ff 82 echo "*** Warning: GAS BFD configuration option not yet fully supported" 1>&2
4f6f4aa8
KR
83 need_bfd=yes
84 bfd_gas=yes
85 ;;
86 no | "")
87 ;;
88 *)
7cf4d7ff 89 echo "*** Bad value \"${with_bfd_assembler}\" for --with-bfd-assembler option" 1>&2
4f6f4aa8
KR
90 exit 1
91 ;;
92esac
93
b678740d
RP
94# assign cpu type
95emulation=generic
96
b53ccaac
ILT
97# check for architecture variants
98case ${target_cpu} in
4f6f4aa8 99 sparclite*) cpu_type=sparc ;;
8f4b9142 100 sparc64) cpu_type=sparc64 obj_format=elf ;; # v9
984cf2d7 101 m680[01234]0) cpu_type=m68k ;;
4f6f4aa8 102 m683??) cpu_type=m68k ;;
f70a4714 103 i486) cpu_type=i386 ;;
07ef2075 104 h8300h) cpu_type=h8300 ;;
7cf4d7ff
KR
105 # Actually we've only got support for the 1.1, so we shouldn't generalize,
106 # but this is what the support files are named...
107 hppa1.1) cpu_type=hppa ;;
108 *) cpu_type=${target_cpu} ;;
b53ccaac
ILT
109esac
110
111gas_target=${cpu_type}
112
f70a4714
KR
113generic_target=${cpu_type}-${target_vendor}-${target_os}
114
74cc5508 115# assign object format
f70a4714 116case ${generic_target} in
7cf4d7ff
KR
117 a29k-amd-udi) obj_format=coffbfd gas_target=ebmon29k ;;
118 a29k-amd-ebmon) obj_format=coffbfd gas_target=ebmon29k ;;
119 a29k-amd-ebmonold) obj_format=coff gas_target=ebmon29k ;;
120
121 hppa-*-osf) obj_format=elf emulation=hppa ;;
122 hppa-*-hpux*) obj_format=som emulation=hppa ;;
123
8f4b9142
DZ
124 h8300-*-coff) obj_format=coffbfd ;;
125
7cf4d7ff
KR
126 i386-ibm-aix*) obj_format=coffbfd gas_target=i386coff
127 emulation=i386aix ;;
128 i386-*-bsd*) obj_format=aout emulation=386bsd ;;
129 i386-*-linux*) obj_format=aout emulation=linux ;;
f70a4714 130 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
7cf4d7ff
KR
131 obj_format=coffbfd gas_target=i386coff ;;
132 i386-*-go32) obj_format=aout ;;
133
134 i960-wrs-vxworks) obj_format=bout ;;
135 i960-*-coff) obj_format=coff emulation=ic960 ;;
136
137 m68k-wrs-vxworks) obj_format=aout emulation=sun3 ;;
984cf2d7 138 m68k-ericsson-[Oo][Ss][Ee])
7cf4d7ff 139 obj_format=aout emulation=sun3 ;;
47fcc4f5
ILT
140 m68k-*-coff | m68*-*-sysv*)
141 obj_format=coffbfd gas_target=m68kcoff ;;
7cf4d7ff
KR
142 m68k-*-hpux) obj_format=hp300 emulation=hp300 ;;
143
144 # don't change emulation like *-*-bsd does
145 mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
146 mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;;
47fcc4f5
ILT
147 mips-*-ecoffl*) obj_format=ecoff gas_target=mips-lit ;;
148 mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;;
7cf4d7ff
KR
149 mips-*-irix*) obj_format=ecoff gas_target=mips-big emulation=irix ;;
150
a8285504
DZ
151 sparc*-*-sunos4*) bfd_gas=preferred obj_format=aout emulation=sun3 ;;
152
07ef2075
DE
153 sparc*-fujitsu-none) obj_format=aout ;;
154
155 sparc64-*-aout*) obj_format=aout bfd_gas=yes ;; # v9
7cf4d7ff 156
85825401 157 *-*-aout | *-*-scout | *-*-linux)
7cf4d7ff 158 obj_format=aout ;;
984cf2d7 159 *-*-bout* | *-*-nindy*)
7cf4d7ff
KR
160 obj_format=bout ;;
161 *-*-bsd* | *-*-sunos*)
162 obj_format=aout emulation=sun3 ;;
163 *-*-generic) obj_format=generic ;;
164 *-*-xray | *-*-hms) obj_format=coffbfd ;;
165 *-*-sysv32) obj_format=coff emulation=sysv32 ;;
166 *-*-sim) obj_format=coffbfd ;;
984cf2d7 167 *-*-coff* | *-sysv* | *-*-sco*)
7cf4d7ff
KR
168 obj_format=coff
169 case ${target_vendor} in
170 bull) emulation=dpx2 ;;
171 sun) emulation=sun3 ;;
172 esac
173 ;;
174 *-*-vxworks) obj_format=aout ;;
175 *-*-coff) obj_format=coff ;;
4f6f4aa8 176 *-*-elf | *-*-solaris*)
7cf4d7ff
KR
177 echo '*** Warning: GAS support for ELF format is incomplete' 1>&2
178 obj_format=elf ;;
179 *-*-vms) obj_format=vms ;;
fecd2382
RP
180esac
181
74cc5508 182# assign floating point type
b678740d 183case ${target_cpu} in
7cf4d7ff
KR
184 ns32k | vax | tahoe ) atof=${target_cpu} ;;
185 *) atof=ieee ;;
fecd2382
RP
186esac
187
7cf4d7ff
KR
188if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then
189 echo '*** GAS does not support target CPU' ${cpu_type} 1>&2
190 exit 1
191fi
192
193if [ x${obj_format} = x ]; then
194 echo "*** GAS doesn't know what format to use for target" ${target} 1>&2
195 exit 1
196fi
197
198if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then
199 echo '*** GAS does not have support for object file format' ${obj_format} 1>&2
200 exit 1
201fi
202
8a24a37c
SC
203# and target makefile frag
204
b53ccaac 205target_makefile_frag=config/${gas_target}.mt
8a24a37c 206
7cf4d7ff
KR
207case ${bfd_gas}-${obj_format} in
208 yes-coffbfd) obj_format=coff ;;
209 no-coffbfd) need_bfd=yes ;;
210 *-elf) bfd_gas=yes ;;
211 *-ecoff) bfd_gas=yes ;;
212 *) ;;
213esac
214
a8285504
DZ
215case ${with_bfd_assembler}-${bfd_gas} in
216 yes-yes | no-no)
7cf4d7ff
KR
217 # We didn't override user's choice.
218 ;;
a8285504 219 no-yes)
7cf4d7ff
KR
220 echo '*** Use of BFD is required for ${target}; overriding config options'\
221 1>&2
222 ;;
a8285504
DZ
223 no-preferred)
224 bfd_gas=no
225 ;;
226 *-preferred)
227 bfd_gas=yes
228 ;;
229 -*)
230 # User specified nothing.
231 ;;
7cf4d7ff
KR
232esac
233
b678740d 234files="config/ho-${gas_host}.h config/tc-${cpu_type}.c \
353deb84 235 config/tc-${cpu_type}.h config/te-${emulation}.h \
74cc5508
RP
236 config/obj-${obj_format}.h config/obj-${obj_format}.c \
237 config/atof-${atof}.c"
238
fecd2382 239links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
8b228fe9 240
4f6f4aa8
KR
241# post-target:
242
243case ${bfd_gas} in
244 yes)
ed364bb6
ILT
245 rm -f Makefile.tem
246 mv Makefile Makefile.tem
247 echo BFDDEF=-DBFD_ASSEMBLER > Makefile
248 cat Makefile.tem >> Makefile
249 rm -f Makefile.tem
4f6f4aa8
KR
250 need_bfd=yes
251 ;;
252 *)
253 ;;
254esac
255
256case ${need_bfd} in
257 yes)
ed364bb6
ILT
258 rm -f Makefile.tem
259 mv Makefile Makefile.tem
260 echo BFDLIB=../bfd/libbfd.a > Makefile
261 cat Makefile.tem >> Makefile
262 rm -f Makefile.tem
4f6f4aa8
KR
263 ;;
264 *)
265 ;;
266esac
267
00a737d3 268if [ x${host} != x${target} ] ; then
8f4b9142
DZ
269 rm -f Makefile.tem
270 mv Makefile Makefile.tem
00a737d3 271 echo CROSS=-DCROSS_COMPILE > Makefile
8f4b9142
DZ
272 cat Makefile.tem >> Makefile
273 rm -f Makefile.tem
274else
275 true
276fi
277
8b228fe9 278# end of gas/configure.in
This page took 0.085847 seconds and 4 git commands to generate.