* configure.in (*-*-netware, i[34]86-*-netware): New configs.
[deliverable/binutils-gdb.git] / bfd / configure.in
CommitLineData
21c9f626
RP
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
3b4f1a5d 6configdirs="doc"
21c9f626 7srctrigger=libbfd.c
5b2765bf 8srcname="BFD"
d89b9f99 9target_dependent=true
b32ae8e2
JK
10host64=false
11target64=false
12want64=false
21c9f626
RP
13
14# per-host:
15
5a5fa368 16. ${srcdir}/configure.host
4dfe09da 17
5b2765bf 18# Set up to make a link between the host's include file and "sysdep.h".
5868184b 19files="hosts/${my_host}.h"
5b2765bf
JG
20links="sysdep.h"
21
d89b9f99 22if [ ! -f ${srcdir}/${files} ] ; then
0e238aa7
PB
23 files=../bfd/hosts/std-host.h
24 echo "[${srcname} has no specific support for host ${host} -- using std-host]"
21c9f626
RP
25fi
26
5b2765bf 27host_makefile_frag=
5868184b
FF
28if [ -f ${srcdir}/config/${my_host}.mh ] ; then
29 host_makefile_frag=config/${my_host}.mh
5b2765bf 30fi
4dfe09da 31
21c9f626
RP
32# per-target:
33
218ce930
JG
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
1e730c4b 39case "${target}" in
9faacb92 40 alpha-*-*) bfd_target=alphaosf ;;
439a4936
JG
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 ;;
7024033b 46 h8300*-*-*) bfd_target=h8300-coff ;;
9faacb92
SC
47 h8500-*-*) bfd_target=h8500-coff ;;
48 sh-*-*) bfd_target=sh-coff ;;
b32ae8e2
JK
49 hppa*-*-bsd*) bfd_target=hppabsd ;;
50 hppa*-*-hpux*) bfd_target=hppahpux ;;
18f81c05 51 hppa*-*-osf) bfd_target=hppa-elf ;;
439a4936
JG
52 i[34]86-*-sysv4*) bfd_target=i386-elf ;;
53 i[34]86-*-sysv*) bfd_target=i386-coff ;;
b32ae8e2 54 i[34]86-*-isc*) bfd_target=i386-sco ;; # gets core dump reading right
60ac749c 55 i[34]86-*-sco*) bfd_target=i386-sco ;;
5a5fa368 56 i[34]86-*-bsd*) bfd_target=i386-bsd ;;
84d3f422 57 i[34]86-*-lynxos*) bfd_target=i386-lynx ;;
c812942f 58 i[34]86-*-coff) bfd_target=i386-coff ;;
60ac749c 59 i[34]86-*-aix*) bfd_target=i386-coff ;;
7a35367c 60 i[34]86-*-elf) bfd_target=i386-elf ;;
c3e964b9 61 i[34]86-*-netware*) bfd_target=i386-nlm ;;
772b5e9b 62 i[34]86-*-linux*) bfd_target=i386-linux ;;
439a4936
JG
63 i[34]86-none-*) bfd_target=i386-coff ;;
64 i960-*-vxworks) bfd_target=i960-bout ;;
6ac05343
JG
65 i960-*-aout) bfd_target=i960-bout ;;
66 i960-*-bout) bfd_target=i960-bout ;;
25452831 67 m68*-bull-sysv*) bfd_target=m68k-coffun ;;
b32ae8e2 68 m68*-hp-bsd*) bfd_target=hp300bsd ;;
439a4936
JG
69 m68*-*-aout) bfd_target=m68k-aout ;;
70 m68*-*-coff) bfd_target=m68k-coff ;;
b32ae8e2 71 m68*-*-hpux*) bfd_target=hp300hpux ;;
439a4936
JG
72 m68*-*-os68k) bfd_target=m68k-aout ;;
73 m68*-*-sunos*) bfd_target=m68k-aout ;;
b32ae8e2 74 m68*-*-sysv*) bfd_target=m68k-coff ;;
439a4936
JG
75 m68*-*-vxworks*) bfd_target=m68k-aout ;;
76 m68*-ericsson-*) bfd_target=m68k-aout ;;
77 m68*-netx-*) bfd_target=m68k-aout ;;
78 m88k-*-*) bfd_target=m88k-coff ;;
9faacb92 79 mips-big-*) bfd_target=bigmips ;;
7a35367c 80 mips-dec-bsd*) bfd_target=mipsdecbsd ;;
439a4936 81 mips-dec-*) bfd_target=decstation ;;
b32ae8e2
JK
82 mips-*-ecoffl*) bfd_target=decstation ;;
83 mips-*-ecoff*) bfd_target=bigmips ;;
9faacb92 84 mips-sgi-*) bfd_target=bigmips ;;
b32ae8e2 85 mips-*-sysv*) bfd_target=riscos ;;
c812942f 86 mips-*-riscos*) bfd_target=riscos ;;
9b4be067 87 mips-*-bsd*) bfd_target=noop ;;
439a4936
JG
88 rs6000-*-*) bfd_target=rs6000 ;;
89 sparc-*-solaris2*) bfd_target=sparc-elf ;;
90 sparc-*-sysv4*) bfd_target=sparc-elf ;;
6ed3ddef
KR
91# start-sanitize-v9
92 sparc64-*-aout*) bfd_target=sparc-aout ; target64=true ;;
93 sparc64-*-elf*) bfd_target=sparc64-elf ; target64=true ;;
94# end-sanitize-v9
60ac749c 95 sparc*-*-*) bfd_target=sparc-aout ;;
439a4936 96 tahoe-*-*) bfd_target=tahoe ;;
7a35367c 97 vax-*-vms) bfd_target=vax-vms ;;
439a4936
JG
98 vax-*-*) bfd_target=vax ;;
99 we32k-*-*) bfd_target=we32k ;;
100 z8k*-*-*) bfd_target=z8k-coff ;;
101
102 *-*-aout) bfd_target=${target_cpu}-aout ;;
b32ae8e2 103 *-*-bsd*) bfd_target=${target_cpu}-aout ;;
c3e964b9 104 *-*-netware*) bfd_target=${target_cpu}-nlm ;;
439a4936
JG
105 *-*-sysv4*) bfd_target=${target_cpu}-elf ;;
106 *-*-solaris2*) bfd_target=${target_cpu}-elf ;;
107 *-*-go32) bfd_target=${target_cpu}-aout ;;
439a4936 108 *-*-sysv*) bfd_target=${target_cpu}-coff ;;
439a4936 109
b32ae8e2
JK
110 *-*-aout64) bfd_target=${target_cpu}-aout64 ; target64=true ;;
111 *-*-elf64) bfd_target=${target_cpu}-elf64 ; target64=true ;;
112
439a4936
JG
113 *-adobe-*) bfd_target=adobe ;;
114 *-sony-*) bfd_target=news ;;
115 *-intel-*) bfd_target=${target_cpu}-coff ;;
116 *-stratus-*) bfd_target=${target_cpu}-elf ;;
117 *-cbm-*) bfd_target=${target_cpu}-elf ;;
118 *-ncr-*) bfd_target=${target_cpu}-elf ;;
119 *-tandem-*) bfd_target=st2000 ;;
4dfe09da
RP
120esac
121
5868184b 122if [ ! -f ${srcdir}/config/${bfd_target}.mt ] ; then
5b2765bf 123 if [ -n "${bfd_target}" ] ; then
eafc6d85 124 echo '***' No file ${srcdir}/config/${bfd_target}.mt 1>&2
5b2765bf 125 fi
eafc6d85
FF
126 echo '***' BFD does not support target ${target} 1>&2
127 echo '***' Look in bfd/configure.in for supported targets 1>&2
21c9f626
RP
128 exit 1
129fi
5868184b 130target_makefile_frag=config/${bfd_target}.mt
4dfe09da 131
5b2765bf
JG
132# We don't do any links based on the target system, just very minor makefile
133# config.
7a35367c
KR
134
135# post-target:
136
b32ae8e2
JK
137rm -f Makefile.tmp Makefile.2
138mv Makefile Makefile.tmp
139
7a35367c 140case ${with_minimal_bfd} in
c812942f
KR
141 yes) echo MINIMIZE=1 > Makefile.2 ;;
142 no | "") echo MINIMIZE=0 > Makefile.2 ;;
7a35367c
KR
143 *)
144 echo "*** bad value \"${with_minimal_bfd}\" for minimal-bfd flag; ignored" 1>&2
c812942f 145 with_minimal_bfd=no
b32ae8e2 146 echo MINIMIZE=0 > Makefile.2
7a35367c
KR
147 ;;
148esac
b32ae8e2
JK
149
150case ${with_64_bit_bfd} in
c812942f
KR
151 yes) want64=true ;;
152 no | "") want64=false ;;
b32ae8e2
JK
153 *)
154 echo "*** bad value \"${with_64_bit_bfd}\" for 64-bit-bfd flag; ignored" 1>&2
155 ;;
156esac
157
158case ${host64}-${target64}-${want64} in
159 *true*)
160 echo WORDSIZE=64 >> Makefile.2
c812942f 161 echo 'ALL_BACKENDS = $(BFD64_BACKENDS) $(BFD32_BACKENDS)' >> Makefile.2
b32ae8e2
JK
162 ;;
163 false-false-false)
164 echo WORDSIZE=32 >> Makefile.2
c812942f 165 echo 'ALL_BACKENDS = $(BFD32_BACKENDS)' >> Makefile.2
b32ae8e2
JK
166 ;;
167esac
168
2fd415df 169if [ x${with_minimal_bfd} = xyes ] \
c812942f
KR
170 && grep -s TARGET_BACKENDS ${srcdir}/${target_makefile_frag} ; then
171 echo 'BFD_BACKENDS = $(TARGET_BACKENDS)' >> Makefile.2
172else
173 echo 'BFD_BACKENDS = $(ALL_BACKENDS)' >> Makefile.2
174fi
175
2fd415df 176if [ x${with_minimal_bfd} = xyes ] \
c812942f
KR
177 && grep -s TARGET_CPUS ${srcdir}/${target_makefile_frag} ; then
178 echo 'BFD_MACHINES = $(TARGET_CPUS)' >> Makefile.2
179else
180 echo 'BFD_MACHINES = $(ALL_MACHINES)' >> Makefile.2
181fi
182
b32ae8e2
JK
183cat Makefile.tmp >> Makefile.2
184rm -f Makefile.tmp
185mv Makefile.2 Makefile
This page took 0.15993 seconds and 4 git commands to generate.