]> Git Repo - binutils.git/blob - bfd/configure.in
* gdb.t15/funcargs.exp: Add comments that hppa xfails are only
[binutils.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 | sort -u`
192
193     # The architectures in all the configured targets.
194     SELECT_ARCHITECTURES=`sed -n '
195     s/SELECT_ARCHITECTURES[     ]*=[    ]*//p
196     ' $allfrags | sort -u`
197
198     # Target backend .o files.
199     tb=
200
201     for vec in $SELECT_VECS
202     do
203         case "$vec" in
204         a29kcoff_big_vec)       tb="$tb coff-a29k.o" ;;
205         a_out_adobe_vec)        tb="$tb aout-adobe.o" ;;
206         aout_mips_little_vec)   tb="$tb mipsbsd.o" ;;
207         b_out_vec_big_host)     tb="$tb bout.o" ;;
208         b_out_vec_little_host)  tb="$tb bout.o" ;;
209         bfd_elf32_hppa_vec)     tb="$tb elf32-hppa.o elf32.o elf.o" ;;
210         bfd_elf32_i386_vec)     tb="$tb elf32-i386.o elf32.o elf.o" ;;
211         bfd_elf32_i860_vec)     tb="$tb elf32-i860.o elf32.o elf.o" ;;
212         bfd_elf32_m68k_vec)     tb="$tb elf32-m68k.o elf32.o elf.o" ;;
213         bfd_elf32_sparc_vec)    tb="$tb elf32-sparc.o elf32.o elf.o" ;;
214 #       start-sanitize-v9
215         bfd_elf64_sparc_vec)    tb="$tb elf64-sparc.o elf64.o elf.o" ;;
216 #       end-sanitize-v9
217         bfd_nlm32_i386_vec)     tb="$tb nlm32-i386.o" ;;
218         ecoff_big_vec)          tb="$tb coff-mips.o" ;;
219         ecoff_little_vec)       tb="$tb coff-mips.o" ;;
220         ecoffalpha_little_vec)  tb="$tb coff-alpha.o" ;;
221         h8300coff_vec)          tb="$tb coff-h8300.o" ;;
222         h8500coff_vec)          tb="$tb coff-h8500.o" ;;
223         host_aout_vec)          tb="$tb host-aout.o" ;;
224         hp300bsd_vec)           tb="$tb hp300bsd.o" ;;
225         hp300hpux_vec)          tb="$tb hp300hpux.o" ;;
226         hppa_vec)               tb="$tb hppa.o" ;;
227         i386aout_vec)           tb="$tb i386aout.o" ;;
228         i386bsd_vec)            tb="$tb i386bsd.o" ;;
229         i386coff_vec)           tb="$tb coff-i386.o" ;;
230         i386linux_vec)          tb="$tb i386linux.o" ;;
231         i386lynx_vec)           tb="$tb i386lynx.o" ;;
232         icoff_big_vec)          tb="$tb coff-i960.o" ;;
233         icoff_little_vec)       tb="$tb coff-i960.o" ;;
234         ieee_vec)               tb="$tb ieee.o" ;;
235         m68kcoff_vec)           tb="$tb coff-m68k.o" ;;
236         m68kcoffun_vec)         tb="$tb coff-u68k.o" ;;
237         m88kbcs_vec)            tb="$tb coff-m88k.o" ;;
238         newsos3_vec)            tb="$tb newsos3.o" ;;
239         rs6000coff_vec)         tb="$tb coff-rs6000.o" ;;
240         shcoff_vec)             tb="$tb coff-sh.o" ;;
241         srec_vec)               tb="$tb srec.o" ;;
242         sunos_big_vec)          tb="$tb sunos.o aout32.o stab-syms.o" ;;
243         symbolsrec_vec)         tb="$tb srec.o" ;;
244         we32kcoff_vec)          tb="$tb coff-we32k.o" ;;
245         z8kcoff_vec)            tb="$tb coff-z8k.o" ;;
246
247         "")                     ;;
248         *) echo "*** unknown target vector $vec in $f" 1>&2; exit 1 ;;
249         esac
250     done
251
252     # Target architecture .o files.
253     ta=`echo $SELECT_ARCHITECTURES | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
254
255     # Weed out duplicate .o files.
256     tb=`echo $tb | tr -s ' ' '\012' | sort -u | tr '\012' ' '`
257     ta=`echo $ta | tr -s ' ' '\012' | sort -u | tr '\012' ' '`
258
259     echo "BFD_BACKENDS = $tb" >> Makefile.2
260     echo "BFD_MACHINES = $ta" >> Makefile.2
261
262     # Only set these if they will be nonempty, for the clever echo.
263     test -n "$SELECT_VECS" &&
264       selvecs=`echo $SELECT_VECS | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
265     test -n "SELECT_ARCHITECTURES" &&
266       selarchs=`echo $SELECT_ARCHITECTURES | sed -e 's/ \(.\)/,\1/g'`
267
268 else    # all_targets is true
269     echo 'BFD_BACKENDS = $(ALL_BACKENDS)' >> Makefile.2
270     echo 'BFD_MACHINES = $(ALL_MACHINES)' >> Makefile.2
271 fi      # all_targets is true
272
273 test -n "$DEFAULT_VECTOR" && defvec="$DEFAULT_VECTOR"
274
275 echo "TDEFAULTS = \
276 ${defvec+-DDEFAULT_VECTOR=$defvec} \
277 ${selvecs+-DSELECT_VECS='$selvecs'} \
278 ${selarchs+-DSELECT_ARCHITECTURES='$selarchs'}" \
279   >> Makefile.2
280
281 cat Makefile.tmp >> Makefile.2
282 rm -f Makefile.tmp
283 mv Makefile.2 Makefile
This page took 0.039926 seconds and 4 git commands to generate.