* configure.in: Add new target m68k-coffun to the dpx/2.
[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-*-coff) bfd_target=i386-coff ;;
58 i[34]86-*-aix*) bfd_target=i386-coff ;;
59 i[34]86-*-elf) bfd_target=i386-elf ;;
60 i[34]86-*-linux*) bfd_target=i386-linux ;;
61 i[34]86-none-*) bfd_target=i386-coff ;;
62 i960-*-vxworks) bfd_target=i960-bout ;;
63 i960-*-aout) bfd_target=i960-bout ;;
64 i960-*-bout) bfd_target=i960-bout ;;
65 m68*-bull-sysv*) bfd_target=m68k-coffun ;;
66 m68*-hp-bsd*) bfd_target=hp300bsd ;;
67 m68*-*-aout) bfd_target=m68k-aout ;;
68 m68*-*-coff) bfd_target=m68k-coff ;;
69 m68*-*-hpux*) bfd_target=hp300hpux ;;
70 m68*-*-os68k) bfd_target=m68k-aout ;;
71 m68*-*-sunos*) bfd_target=m68k-aout ;;
72 m68*-*-sysv*) bfd_target=m68k-coff ;;
73 m68*-*-vxworks*) bfd_target=m68k-aout ;;
74 m68*-ericsson-*) bfd_target=m68k-aout ;;
75 m68*-netx-*) bfd_target=m68k-aout ;;
76 m88k-*-*) bfd_target=m88k-coff ;;
77 mips-big-*) bfd_target=bigmips ;;
78 mips-dec-bsd*) bfd_target=mipsdecbsd ;;
79 mips-dec-*) bfd_target=decstation ;;
80 mips-*-ecoffl*) bfd_target=decstation ;;
81 mips-*-ecoff*) bfd_target=bigmips ;;
82 mips-sgi-*) bfd_target=bigmips ;;
83 mips-*-sysv*) bfd_target=riscos ;;
84 mips-*-riscos*) bfd_target=riscos ;;
85 mips-*-bsd*) bfd_target=noop ;;
86 rs6000-*-*) bfd_target=rs6000 ;;
87 sparc-*-solaris2*) bfd_target=sparc-elf ;;
88 sparc-*-sysv4*) bfd_target=sparc-elf ;;
89 # start-sanitize-v9
90 sparc64-*-aout*) bfd_target=sparc-aout ; target64=true ;;
91 sparc64-*-elf*) bfd_target=sparc64-elf ; target64=true ;;
92 # end-sanitize-v9
93 sparc*-*-*) bfd_target=sparc-aout ;;
94 tahoe-*-*) bfd_target=tahoe ;;
95 vax-*-vms) bfd_target=vax-vms ;;
96 vax-*-*) bfd_target=vax ;;
97 we32k-*-*) bfd_target=we32k ;;
98 z8k*-*-*) bfd_target=z8k-coff ;;
99
100 *-*-aout) bfd_target=${target_cpu}-aout ;;
101 *-*-bsd*) bfd_target=${target_cpu}-aout ;;
102 *-*-sysv4*) bfd_target=${target_cpu}-elf ;;
103 *-*-solaris2*) bfd_target=${target_cpu}-elf ;;
104 *-*-go32) bfd_target=${target_cpu}-aout ;;
105 *-*-sysv*) bfd_target=${target_cpu}-coff ;;
106
107 *-*-aout64) bfd_target=${target_cpu}-aout64 ; target64=true ;;
108 *-*-elf64) bfd_target=${target_cpu}-elf64 ; target64=true ;;
109
110 *-adobe-*) bfd_target=adobe ;;
111 *-sony-*) bfd_target=news ;;
112 *-intel-*) bfd_target=${target_cpu}-coff ;;
113 *-stratus-*) bfd_target=${target_cpu}-elf ;;
114 *-cbm-*) bfd_target=${target_cpu}-elf ;;
115 *-ncr-*) bfd_target=${target_cpu}-elf ;;
116 *-tandem-*) bfd_target=st2000 ;;
117 esac
118
119 if [ ! -f ${srcdir}/config/${bfd_target}.mt ] ; then
120 if [ -n "${bfd_target}" ] ; then
121 echo '***' No file ${srcdir}/config/${bfd_target}.mt 1>&2
122 fi
123 echo '***' BFD does not support target ${target} 1>&2
124 echo '***' Look in bfd/configure.in for supported targets 1>&2
125 exit 1
126 fi
127 target_makefile_frag=config/${bfd_target}.mt
128
129 # We don't do any links based on the target system, just very minor makefile
130 # config.
131
132 # post-target:
133
134 rm -f Makefile.tmp Makefile.2
135 mv Makefile Makefile.tmp
136
137 case ${with_minimal_bfd} in
138 yes) echo MINIMIZE=1 > Makefile.2 ;;
139 no | "") echo MINIMIZE=0 > Makefile.2 ;;
140 *)
141 echo "*** bad value \"${with_minimal_bfd}\" for minimal-bfd flag; ignored" 1>&2
142 with_minimal_bfd=no
143 echo MINIMIZE=0 > Makefile.2
144 ;;
145 esac
146
147 case ${with_64_bit_bfd} in
148 yes) want64=true ;;
149 no | "") want64=false ;;
150 *)
151 echo "*** bad value \"${with_64_bit_bfd}\" for 64-bit-bfd flag; ignored" 1>&2
152 ;;
153 esac
154
155 case ${host64}-${target64}-${want64} in
156 *true*)
157 echo WORDSIZE=64 >> Makefile.2
158 echo 'ALL_BACKENDS = $(BFD64_BACKENDS) $(BFD32_BACKENDS)' >> Makefile.2
159 ;;
160 false-false-false)
161 echo WORDSIZE=32 >> Makefile.2
162 echo 'ALL_BACKENDS = $(BFD32_BACKENDS)' >> Makefile.2
163 ;;
164 esac
165
166 if [ x${with_minimal_bfd} = xyes ] \
167 && grep -s TARGET_BACKENDS ${srcdir}/${target_makefile_frag} ; then
168 echo 'BFD_BACKENDS = $(TARGET_BACKENDS)' >> Makefile.2
169 else
170 echo 'BFD_BACKENDS = $(ALL_BACKENDS)' >> Makefile.2
171 fi
172
173 if [ x${with_minimal_bfd} = xyes ] \
174 && grep -s TARGET_CPUS ${srcdir}/${target_makefile_frag} ; then
175 echo 'BFD_MACHINES = $(TARGET_CPUS)' >> Makefile.2
176 else
177 echo 'BFD_MACHINES = $(ALL_MACHINES)' >> Makefile.2
178 fi
179
180 cat Makefile.tmp >> Makefile.2
181 rm -f Makefile.tmp
182 mv Makefile.2 Makefile