* configure.in: Include coff-m68k.o for m68kcoffun_vec.
[deliverable/binutils-gdb.git] / bfd / configure.in
1 # This file is a shell script that supplies the information necessary
2 # to tailor a template configure script into the configure script
3 # appropriate for this directory. For more information, check any
4 # existing configure script.
5
6 configdirs="doc"
7 srctrigger=libbfd.c
8 srcname="BFD"
9 target_dependent=true
10 host64=false
11 target64=false
12 want64=false
13
14 # per-host:
15
16 . ${srcdir}/configure.host
17
18 # Set up to make a link between the host's include file and "sysdep.h".
19 files="hosts/${my_host}.h"
20 links="sysdep.h"
21
22 if [ ! -f ${srcdir}/${files} ] ; then
23 files=../bfd/hosts/std-host.h
24 echo "[${srcname} has no specific support for host ${host} -- using std-host]"
25 fi
26
27 host_makefile_frag=
28 if [ -f ${srcdir}/config/${my_host}.mh ] ; then
29 host_makefile_frag=config/${my_host}.mh
30 fi
31
32 # per-target:
33
34 # WHEN ADDING ENTRIES TO THIS MATRIX:
35 # Make sure that the left side always has two dashes. Otherwise you
36 # can get spurious matches. Even for unambiguous cases, do this as a
37 # convention, else the table becomes a real mess to understand and maintain.
38
39 case "${target}" in
40 alpha-*-*) bfd_target=alphaosf ;;
41 a29k-*-ebmon) bfd_target=a29k-coff ;;
42 a29k-*-udi) bfd_target=a29k-coff ;;
43 a29k-*-aout) bfd_target=a29k-aout ;;
44 a29k-*-coff) bfd_target=a29k-coff ;;
45 a29k-*-sym1) bfd_target=a29k-coff ;;
46 h8300*-*-*) bfd_target=h8300-coff ;;
47 h8500-*-*) bfd_target=h8500-coff ;;
48 sh-*-*) bfd_target=sh-coff ;;
49 hppa*-*-bsd*) bfd_target=hppabsd ;;
50 hppa*-*-hpux*) bfd_target=hppahpux ;;
51 hppa*-*-osf) bfd_target=hppa-elf ;;
52 i[34]86-*-sysv4*) bfd_target=i386-elf ;;
53 i[34]86-*-sysv*) bfd_target=i386-coff ;;
54 i[34]86-*-isc*) bfd_target=i386-sco ;; # gets core dump reading right
55 i[34]86-*-sco*) bfd_target=i386-sco ;;
56 i[34]86-*-bsd*) bfd_target=i386-bsd ;;
57 i[34]86-*-lynxos*) bfd_target=i386-lynx ;;
58 i[34]86-*-coff) bfd_target=i386-coff ;;
59 i[34]86-*-aix*) bfd_target=i386-coff ;;
60 i[34]86-*-elf) bfd_target=i386-elf ;;
61 i[34]86-*-netware*) bfd_target=i386-nlm ;;
62 i[34]86-*-linux*) bfd_target=i386-linux ;;
63 i[34]86-*-lynx*) bfd_target=i386-lynx ;;
64 i[34]86-none-*) bfd_target=i386-coff ;;
65 i960-*-vxworks) bfd_target=i960-bout ;;
66 i960-*-aout) bfd_target=i960-bout ;;
67 i960-*-bout) bfd_target=i960-bout ;;
68 m68*-bull-sysv*) bfd_target=u68k-coff ;;
69 m68*-hp-bsd*) bfd_target=hp300bsd ;;
70 m68*-*-aout) bfd_target=m68k-aout ;;
71 m68*-*-coff) bfd_target=m68k-coff ;;
72 m68*-*-hpux*) bfd_target=hp300hpux ;;
73 m68*-*-os68k) bfd_target=m68k-aout ;;
74 m68*-*-sunos*) bfd_target=m68k-aout ;;
75 m68*-*-sysv*) bfd_target=m68k-coff ;;
76 m68*-*-vxworks*) bfd_target=m68k-aout ;;
77 m68*-ericsson-*) bfd_target=m68k-aout ;;
78 m68*-netx-*) bfd_target=m68k-aout ;;
79 m88k-*-*) bfd_target=m88k-coff ;;
80 mips-big-*) bfd_target=bigmips ;;
81 mips-dec-bsd*) bfd_target=mipsdecbsd ;;
82 mips-dec-*) bfd_target=decstation ;;
83 mips-*-ecoffl*) bfd_target=decstation ;;
84 mips-*-ecoff*) bfd_target=bigmips ;;
85 mips-sgi-*) bfd_target=bigmips ;;
86 mips-*-sysv*) bfd_target=riscos ;;
87 mips-*-riscos*) bfd_target=riscos ;;
88 mips-*-bsd*) bfd_target=noop ;;
89 rs6000-*-*) bfd_target=rs6000 ;;
90 sparc-*-solaris2*) bfd_target=sparc-elf ;;
91 sparc-*-sysv4*) bfd_target=sparc-elf ;;
92 # start-sanitize-v9
93 # Don't set target64=true for sparc64-*-aout*. Keep it using the 32bit stuff
94 # so we continue to have something that works (until the 64 bit support is
95 # rock solid).
96 sparc64-*-aout*) bfd_target=sparc-aout ;;
97 sparc64-*-elf*) bfd_target=sparc64-elf ; target64=true ;;
98 # end-sanitize-v9
99 sparc*-*-*) bfd_target=sparc-aout ;;
100 tahoe-*-*) bfd_target=tahoe ;;
101 vax-*-vms) bfd_target=vax-vms ;;
102 vax-*-*) bfd_target=vax ;;
103 we32k-*-*) bfd_target=we32k ;;
104 z8k*-*-*) bfd_target=z8k-coff ;;
105
106 *-*-aout) bfd_target=${target_cpu}-aout ;;
107 *-*-bsd*) bfd_target=${target_cpu}-aout ;;
108 *-*-netware*) bfd_target=${target_cpu}-nlm ;;
109 *-*-sysv4*) bfd_target=${target_cpu}-elf ;;
110 *-*-solaris2*) bfd_target=${target_cpu}-elf ;;
111 *-*-go32) bfd_target=${target_cpu}-aout ;;
112 *-*-sysv*) bfd_target=${target_cpu}-coff ;;
113
114 *-*-aout64) bfd_target=${target_cpu}-aout64 ; target64=true ;;
115 *-*-elf64) bfd_target=${target_cpu}-elf64 ; target64=true ;;
116
117 *-adobe-*) bfd_target=adobe ;;
118 *-sony-*) bfd_target=news ;;
119 *-intel-*) bfd_target=${target_cpu}-coff ;;
120 *-stratus-*) bfd_target=${target_cpu}-elf ;;
121 *-cbm-*) bfd_target=${target_cpu}-elf ;;
122 *-ncr-*) bfd_target=${target_cpu}-elf ;;
123 *-tandem-*) bfd_target=st2000 ;;
124 esac
125
126 [ -z "$bfd_target" ] && bfd_target="$target" # For error message.
127
128 all_targets=false
129 for targ in $bfd_target `echo $with_bfd_targets | sed 's/,/ /g'`
130 do
131 if [ "x$targ" = "xall" ]; then
132 all_targets=true
133 else
134 if [ ! -f ${srcdir}/config/${targ}.mt ] ; then
135 if [ -n "${targ}" ] ; then
136 echo '***' No file ${srcdir}/config/${targ}.mt 1>&2
137 fi
138 echo '***' BFD does not support target ${targ} 1>&2
139 echo '***' Look in bfd/configure.in for supported targets 1>&2
140 exit 1
141 fi
142
143 if [ "x$bfd_target" = "x$targ" ]; then
144 target_makefile_frag=${srcdir}/config/${targ}.mt
145 else
146 target_extra_frags="$target_extra_frags ${srcdir}/config/${targ}.mt"
147 fi
148 fi
149 done
150
151 # We don't do any links based on the target system, just minor makefile
152 # config.
153
154 # post-target:
155
156 rm -f Makefile.tmp Makefile.2
157 mv Makefile Makefile.tmp
158
159 case ${with_64_bit_bfd} in
160 yes) want64=true ;;
161 no | "") want64=false ;;
162 *)
163 echo "*** bad value \"${with_64_bit_bfd}\" for 64-bit-bfd flag; ignored" 1>&2
164 ;;
165 esac
166
167 case ${host64}-${target64}-${want64} in
168 *true*)
169 echo WORDSIZE=64 >> Makefile.2
170 echo 'ALL_BACKENDS = $(BFD64_BACKENDS) $(BFD32_BACKENDS)' >> Makefile.2
171 ;;
172 false-false-false)
173 echo WORDSIZE=32 >> Makefile.2
174 echo 'ALL_BACKENDS = $(BFD32_BACKENDS)' >> Makefile.2
175 ;;
176 esac
177
178 # The default vector in the primary target.
179 DEFAULT_VECTOR=`sed -n '
180 s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p
181 ' $target_makefile_frag`
182
183 if [ x${all_targets} = xfalse ]; then
184
185 allfrags="$target_makefile_frag $target_extra_frags"
186
187 # The default and selected vectors in all the configured targets.
188 SELECT_VECS=`sed -n '
189 s/DEFAULT_VECTOR[ ]*=[ ]*\([^ ]*\)/\1/p
190 s/SELECT_VECS[ ]*=[ ]*\([^ ]*\)/\1/p
191 ' $allfrags`
192 # uniq the list.
193 f=""
194 for i in $SELECT_VECS ; do
195 case " $f " in
196 *" $i "*) ;;
197 *) f="$f $i" ;;
198 esac
199 done
200 SELECT_VECS="$f"
201
202 # The architectures in all the configured targets.
203 SELECT_ARCHITECTURES=`sed -n '
204 s/SELECT_ARCHITECTURES[ ]*=[ ]*//p
205 ' $allfrags`
206 # uniq the list.
207 f=""
208 for i in $SELECT_ARCHITECTURES ; do
209 case " $f " in
210 *" $i "*) ;;
211 *) f="$f $i" ;;
212 esac
213 done
214 SELECT_ARCHITECTURES="$f"
215
216 # Target backend .o files.
217 tb=
218
219 for vec in $SELECT_VECS
220 do
221 case "$vec" in
222 a29kcoff_big_vec) tb="$tb coff-a29k.o" ;;
223 a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o stab-syms.o" ;;
224 aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;;
225 b_out_vec_big_host) tb="$tb bout.o aout32.o stab-syms.o" ;;
226 b_out_vec_little_host) tb="$tb bout.o aout32.o stab-syms.o" ;;
227 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o elf.o" ;;
228 bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o elf.o" ;;
229 bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o elf.o" ;;
230 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o elf.o" ;;
231 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o elf.o" ;;
232 # start-sanitize-v9
233 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o elf.o" ;;
234 # end-sanitize-v9
235 bfd_nlm32_i386_vec) tb="$tb nlm32-i386.o" ;;
236 ecoff_big_vec) tb="$tb coff-mips.o" ;;
237 ecoff_little_vec) tb="$tb coff-mips.o" ;;
238 ecoffalpha_little_vec) tb="$tb coff-alpha.o" ;;
239 h8300coff_vec) tb="$tb coff-h8300.o" ;;
240 h8500coff_vec) tb="$tb coff-h8500.o" ;;
241 host_aout_vec) tb="$tb host-aout.o aout32.o stab-syms.o" ;;
242 hp300bsd_vec) tb="$tb hp300bsd.o aout32.o stab-syms.o" ;;
243 hp300hpux_vec) tb="$tb hp300hpux.o aout32.o stab-syms.o" ;;
244 hppa_vec) tb="$tb hppa.o" ;;
245 i386aout_vec) tb="$tb i386aout.o aout32.o stab-syms.o" ;;
246 i386bsd_vec) tb="$tb i386bsd.o aout32.o stab-syms.o" ;;
247 i386coff_vec) tb="$tb coff-i386.o" ;;
248 i386linux_vec) tb="$tb i386linux.o aout32.o stab-syms.o" ;;
249 i386lynx_vec) tb="$tb i386lynx.o aout32.o stab-syms.o" ;;
250 icoff_big_vec) tb="$tb coff-i960.o" ;;
251 icoff_little_vec) tb="$tb coff-i960.o" ;;
252 ieee_vec) tb="$tb ieee.o" ;;
253 m68kcoff_vec) tb="$tb coff-m68k.o" ;;
254 m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o" ;;
255 m88kbcs_vec) tb="$tb coff-m88k.o" ;;
256 newsos3_vec) tb="$tb newsos3.o aout32.o stab-syms.o" ;;
257 rs6000coff_vec) tb="$tb coff-rs6000.o" ;;
258 shcoff_vec) tb="$tb coff-sh.o" ;;
259 srec_vec) tb="$tb srec.o" ;;
260 sunos_big_vec) tb="$tb sunos.o aout32.o stab-syms.o" ;;
261 symbolsrec_vec) tb="$tb srec.o" ;;
262 we32kcoff_vec) tb="$tb coff-we32k.o" ;;
263 z8kcoff_vec) tb="$tb coff-z8k.o" ;;
264
265 "") ;;
266 *) echo "*** unknown target vector $vec in $f" 1>&2; exit 1 ;;
267 esac
268 done
269
270 # Target architecture .o files.
271 ta=`echo $SELECT_ARCHITECTURES | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
272
273 # Weed out duplicate .o files.
274 f=""
275 for i in $tb ; do
276 case " $f " in
277 *" $i "*) ;;
278 *) f="$f $i" ;;
279 esac
280 done
281 tb="$f"
282
283 f=""
284 for i in $ta ; do
285 case " $f " in
286 *" $i "*) ;;
287 *) f="$f $i" ;;
288 esac
289 done
290 ta="$f"
291
292 echo "BFD_BACKENDS = $tb" >> Makefile.2
293 echo "BFD_MACHINES = $ta" >> Makefile.2
294
295 # Only set these if they will be nonempty, for the clever echo.
296 test -n "$SELECT_VECS" &&
297 selvecs=`echo $SELECT_VECS | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
298 test -n "SELECT_ARCHITECTURES" &&
299 selarchs=`echo $SELECT_ARCHITECTURES | sed -e 's/ \(.\)/,\1/g'`
300
301 else # all_targets is true
302 echo 'BFD_BACKENDS = $(ALL_BACKENDS)' >> Makefile.2
303 echo 'BFD_MACHINES = $(ALL_MACHINES)' >> Makefile.2
304 fi # all_targets is true
305
306 test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR"
307
308 echo "TDEFAULTS = \
309 ${defvec+-DDEFAULT_VECTOR=$defvec} \
310 ${selvecs+-DSELECT_VECS='$selvecs'} \
311 ${selarchs+-DSELECT_ARCHITECTURES='$selarchs'}" \
312 >> Makefile.2
313
314 cat Makefile.tmp >> Makefile.2
315 rm -f Makefile.tmp
316 mv Makefile.2 Makefile
This page took 0.038013 seconds and 5 git commands to generate.