configure.in (33973) | configure.in (38891) |
---|---|
1dnl Process this file with autoconf to produce a configure script. 2dnl 3dnl And be careful when changing it! If you must add tests with square 4dnl brackets, be sure changequote invocations surround it. 5dnl 6dnl | 1dnl Process this file with autoconf to produce a configure script. 2dnl 3dnl And be careful when changing it! If you must add tests with square 4dnl brackets, be sure changequote invocations surround it. 5dnl 6dnl |
7AC_PREREQ(2.5)dnl v2.5 needed for --bindir et al 8AC_INIT(as.h)dnl 9dnl | 7dnl v2.5 needed for --bindir et al 8AC_PREREQ(2.5) 9AC_INIT(as.h) 10 11AC_CANONICAL_SYSTEM 12 13AM_INIT_AUTOMAKE(gas, 2.9.1) 14 15AM_PROG_LIBTOOL 16 |
10user_bfd_gas= 11AC_ARG_ENABLE(bfd-assembler, 12[ --enable-bfd-assembler use BFD back end for writing object files], 13[case "${enableval}" in 14 yes) need_bfd=yes user_bfd_gas=yes ;; 15 no) user_bfd_gas=no ;; 16 *) AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;; 17esac])dnl 18AC_ARG_ENABLE(targets, 19[ targets alternative target configurations besides the primary], 20[case "${enableval}" in 21 yes | "") AC_ERROR(enable-targets option must specify target names or 'all') 22 ;; 23 no) enable_targets= ;; 24 *) enable_targets=$enableval ;; 25esac])dnl | 17user_bfd_gas= 18AC_ARG_ENABLE(bfd-assembler, 19[ --enable-bfd-assembler use BFD back end for writing object files], 20[case "${enableval}" in 21 yes) need_bfd=yes user_bfd_gas=yes ;; 22 no) user_bfd_gas=no ;; 23 *) AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;; 24esac])dnl 25AC_ARG_ENABLE(targets, 26[ targets alternative target configurations besides the primary], 27[case "${enableval}" in 28 yes | "") AC_ERROR(enable-targets option must specify target names or 'all') 29 ;; 30 no) enable_targets= ;; 31 *) enable_targets=$enableval ;; 32esac])dnl |
26AC_ARG_ENABLE(shared, 27[ --enable-shared build shared BFD library], 28[case "${enableval}" in 29 yes) shared=true shared_bfd=true shared_opcodes=true ;; 30 no) shared=false ;; 31 *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;; 32 *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;; 33 *bfd*) shared=true shared_bfd=true ;; 34 *opcodes*) shared=true shared_opcodes=true ;; 35 *) shared=false ;; 36esac])dnl | |
37AC_ARG_ENABLE(commonbfdlib, 38[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library], 39[case "${enableval}" in 40 yes) commonbfdlib=true ;; 41 no) commonbfdlib=false ;; 42 *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; 43esac])dnl 44 | 33AC_ARG_ENABLE(commonbfdlib, 34[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library], 35[case "${enableval}" in 36 yes) commonbfdlib=true ;; 37 no) commonbfdlib=false ;; 38 *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; 39esac])dnl 40 |
45# Generate a header file -- gets more post-processing by Makefile later. 46AC_CONFIG_HEADER(conf) | 41# Generate a header file 42AM_CONFIG_HEADER(config.h:config.in) |
47 | 43 |
48dnl For recursion to work right, this must be an absolute pathname. 49AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) 50AC_CANONICAL_SYSTEM 51AC_ARG_PROGRAM 52 | |
53te_file=generic 54 55canon_targets="" 56if test -n "$enable_targets" ; then 57 for t in `echo $enable_targets | sed 's/,/ /g'`; do 58 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null` 59 if test -n "$result" ; then 60 canon_targets="$canon_targets $result" --- 9 unchanged lines hidden (view full) --- 70 71for this_target in $target $canon_targets ; do 72 73changequote(,)dnl 74 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` 75changequote([,])dnl 76 77 # check for architecture variants | 44te_file=generic 45 46canon_targets="" 47if test -n "$enable_targets" ; then 48 for t in `echo $enable_targets | sed 's/,/ /g'`; do 49 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null` 50 if test -n "$result" ; then 51 canon_targets="$canon_targets $result" --- 9 unchanged lines hidden (view full) --- 61 62for this_target in $target $canon_targets ; do 63 64changequote(,)dnl 65 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` 66changequote([,])dnl 67 68 # check for architecture variants |
69 arch= 70 endian= |
|
78 case ${cpu} in | 71 case ${cpu} in |
72 alpha*) cpu_type=alpha ;; |
|
79 armeb) cpu_type=arm endian=big ;; 80 arm*) cpu_type=arm endian=little ;; | 73 armeb) cpu_type=arm endian=big ;; 74 arm*) cpu_type=arm endian=little ;; |
75 thumb*) cpu_type=arm endian=little ;; |
|
81 hppa*) cpu_type=hppa ;; 82changequote(,)dnl 83 i[456]86) cpu_type=i386 ;; 84 m680[012346]0) cpu_type=m68k ;; 85 m68008) cpu_type=m68k ;; 86 m683??) cpu_type=m68k ;; 87changequote([,])dnl 88 m8*) cpu_type=m88k ;; 89 mips*el) cpu_type=mips endian=little ;; 90 mips*) cpu_type=mips endian=big ;; 91 powerpcle*) cpu_type=ppc endian=little ;; 92 powerpc*) cpu_type=ppc endian=big ;; 93 rs6000*) cpu_type=ppc ;; | 76 hppa*) cpu_type=hppa ;; 77changequote(,)dnl 78 i[456]86) cpu_type=i386 ;; 79 m680[012346]0) cpu_type=m68k ;; 80 m68008) cpu_type=m68k ;; 81 m683??) cpu_type=m68k ;; 82changequote([,])dnl 83 m8*) cpu_type=m88k ;; 84 mips*el) cpu_type=mips endian=little ;; 85 mips*) cpu_type=mips endian=big ;; 86 powerpcle*) cpu_type=ppc endian=little ;; 87 powerpc*) cpu_type=ppc endian=big ;; 88 rs6000*) cpu_type=ppc ;; |
94 sparc64) cpu_type=sparc want_sparc_v9=true ;; 95 sparc*) cpu_type=sparc ;; | 89 sparclite*) cpu_type=sparc arch=sparclite ;; 90 sparclet*) cpu_type=sparc arch=sparclet ;; 91 sparc64*) cpu_type=sparc arch=v9-64 ;; 92 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c. 93 v850*) cpu_type=v850 ;; |
96 *) cpu_type=${cpu} ;; 97 esac 98 99 if test ${this_target} = $target ; then 100 target_cpu_type=${cpu_type} | 94 *) cpu_type=${cpu} ;; 95 esac 96 97 if test ${this_target} = $target ; then 98 target_cpu_type=${cpu_type} |
99 if test x${endian} = xbig; then 100 AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1) 101 elif test x${endian} = xlittle; then 102 AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0) 103 fi |
|
101 elif test ${target_cpu_type} != ${cpu_type} ; then 102 continue 103 fi 104 | 104 elif test ${target_cpu_type} != ${cpu_type} ; then 105 continue 106 fi 107 |
105 targ=${cpu_type} | |
106 generic_target=${cpu_type}-$vendor-$os 107 dev=no 108 bfd_gas=no 109 em=generic 110 111 # assign object format 112 case ${generic_target} in | 108 generic_target=${cpu_type}-$vendor-$os 109 dev=no 110 bfd_gas=no 111 em=generic 112 113 # assign object format 114 case ${generic_target} in |
113 a29k-*-coff) fmt=coff targ=ebmon29k ;; 114 a29k-amd-udi) fmt=coff targ=ebmon29k ;; 115 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;; 116 a29k-nyu-sym1) fmt=coff targ=ebmon29k ;; | 115 a29k-*-coff) fmt=coff ;; 116 a29k-amd-udi) fmt=coff ;; 117 a29k-amd-ebmon) fmt=coff ;; 118 a29k-nyu-sym1) fmt=coff ;; |
117 a29k-*-vxworks*) fmt=coff ;; 118 | 119 a29k-*-vxworks*) fmt=coff ;; 120 |
119 alpha-*-*vms*) fmt=evax ;; 120 alpha-*-netware*) fmt=ecoff ;; 121 alpha-*-openbsd*) fmt=ecoff ;; 122 alpha-*-osf*) fmt=ecoff ;; 123 alpha-*-linuxecoff*) fmt=ecoff ;; 124 alpha-*-linux*) fmt=elf em=linux ;; | 121 alpha*-*-*vms*) fmt=evax ;; 122 alpha*-*-netware*) fmt=ecoff ;; 123 alpha*-*-openbsd*) fmt=ecoff ;; 124 alpha*-*-osf*) fmt=ecoff ;; 125 alpha*-*-linuxecoff*) fmt=ecoff ;; 126 alpha*-*-linux-gnu*) fmt=elf em=linux ;; 127 alpha*-*-netbsd*) fmt=elf em=nbsd ;; |
125 | 128 |
129 arc-*-elf*) fmt=elf bfd_gas=yes ;; |
|
126 | 130 |
127 arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;; 128 arm-*-aout) fmt=aout 129 case "$endian" in 130 big) targ=arm-big ;; 131 *) targ=arm-lit ;; 132 esac 133 ;; 134 arm-*-coff) fmt=coff ;; | 131 arm-*-riscix*) fmt=aout em=riscix ;; 132 arm-*-aout) fmt=aout ;; 133 arm-*-coff | thumb-*-coff) fmt=coff ;; |
135 arm-*-riscix*) fmt=aout ;; | 134 arm-*-riscix*) fmt=aout ;; |
136 arm-*-pe) fmt=coff targ=armcoff em=pe ;; | 135 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; |
137 138 d10v-*-*) fmt=elf bfd_gas=yes ;; 139 140 hppa-*-*elf*) fmt=elf em=hppa ;; 141 hppa-*-lites*) fmt=elf em=hppa ;; 142 hppa-*-osf*) fmt=som em=hppa ;; 143 hppa-*-rtems*) fmt=elf em=hppa ;; 144 hppa-*-hpux*) fmt=som em=hppa ;; 145 hppa-*-bsd*) fmt=som em=hppa ;; 146 hppa-*-hiux*) fmt=som em=hppa ;; 147 148 h8300-*-coff) fmt=coff ;; 149 | 136 137 d10v-*-*) fmt=elf bfd_gas=yes ;; 138 139 hppa-*-*elf*) fmt=elf em=hppa ;; 140 hppa-*-lites*) fmt=elf em=hppa ;; 141 hppa-*-osf*) fmt=som em=hppa ;; 142 hppa-*-rtems*) fmt=elf em=hppa ;; 143 hppa-*-hpux*) fmt=som em=hppa ;; 144 hppa-*-bsd*) fmt=som em=hppa ;; 145 hppa-*-hiux*) fmt=som em=hppa ;; 146 147 h8300-*-coff) fmt=coff ;; 148 |
150 i386-ibm-aix*) fmt=coff targ=i386coff 151 em=i386aix ;; | 149 i386-ibm-aix*) fmt=coff em=i386aix ;; |
152 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; 153 i386-*-bsd*) fmt=aout em=386bsd ;; 154 i386-*-netbsd0.8) fmt=aout em=386bsd ;; 155 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; 156 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; 157 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; | 150 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; 151 i386-*-bsd*) fmt=aout em=386bsd ;; 152 i386-*-netbsd0.8) fmt=aout em=386bsd ;; 153 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; 154 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; 155 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; |
158 i386-*-linux*coff*) fmt=coff em=linux 159 targ=i386coff ;; 160 i386-*-linux*) fmt=elf em=linux ;; 161 i386-*-lynxos*) fmt=coff targ=i386coff 162 em=lynx ;; | 156 i386-*-linux*coff*) fmt=coff em=linux ;; 157 i386-*-linux-gnu*) fmt=elf em=linux ;; 158 i386-*-lynxos*) fmt=coff em=lynx ;; |
163 i386-*-sysv4* | i386-*-solaris* | i386-*-elf) 164 fmt=elf ;; | 159 i386-*-sysv4* | i386-*-solaris* | i386-*-elf) 160 fmt=elf ;; |
165 i386-*-freebsdelf*) fmt=elf em=freebsd ;; | 161 i386-*-freebsdelf*) fmt=elf em=freebsd;; |
166 i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;; | 162 i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;; |
167 i386-*-sco*elf*) fmt=elf targ=sco5 ;; 168 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) 169 fmt=coff targ=i386coff ;; | 163 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) 164 fmt=coff ;; 165 i386-*-sco3.2v5*) fmt=elf 166 if test ${this_target} = $target; then 167 AC_DEFINE(SCO_ELF) 168 fi 169 ;; 170 i386-*-sco3.2*) fmt=coff ;; |
170 i386-*-vsta) fmt=aout ;; | 171 i386-*-vsta) fmt=aout ;; |
171 i386-*-go32) fmt=coff targ=i386coff ;; 172 i386-*-rtems*) fmt=coff targ=i386coff ;; | 172 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) 173 fmt=coff em=go32;; 174 i386-*-rtems*) fmt=coff ;; |
173 i386-*-gnu*) fmt=elf ;; 174 i386-*-mach*) 175 fmt=aout em=mach bfd_gas=yes ;; 176 i386-*-msdos*) fmt=aout ;; 177 i386-*-moss*) fmt=elf ;; | 175 i386-*-gnu*) fmt=elf ;; 176 i386-*-mach*) 177 fmt=aout em=mach bfd_gas=yes ;; 178 i386-*-msdos*) fmt=aout ;; 179 i386-*-moss*) fmt=elf ;; |
178 i386-*-pe) fmt=coff targ=i386coff em=pe ;; 179 i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;; 180 i386-*-*nt) fmt=coff targ=i386coff em=pe ;; | 180 i386-*-pe) fmt=coff em=pe ;; 181 i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;; 182 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; 183 i386-*-*nt*) fmt=coff em=pe ;; |
181 i960-*-bout) fmt=bout ;; | 184 i960-*-bout) fmt=bout ;; |
182 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;; 183 i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;; | 185 i960-*-coff) fmt=coff em=ic960 ;; 186 i960-*-rtems*) fmt=coff em=ic960 ;; |
184 i960-*-nindy*) fmt=bout ;; 185 i960-*-vxworks4*) fmt=bout ;; 186 i960-*-vxworks5.0) fmt=bout ;; | 187 i960-*-nindy*) fmt=bout ;; 188 i960-*-vxworks4*) fmt=bout ;; 189 i960-*-vxworks5.0) fmt=bout ;; |
187 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;; | 190 i960-*-vxworks5.*) fmt=coff em=ic960 ;; |
188 i960-*-vxworks*) fmt=bout ;; 189 190 m32r-*-*) fmt=elf bfd_gas=yes ;; 191 192 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) 193 fmt=aout em=sun3 ;; | 191 i960-*-vxworks*) fmt=bout ;; 192 193 m32r-*-*) fmt=elf bfd_gas=yes ;; 194 195 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) 196 fmt=aout em=sun3 ;; |
194 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;; 195 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;; 196 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;; | 197 m68k-motorola-sysv*) fmt=coff em=delta ;; 198 m68k-bull-sysv3*) fmt=coff em=dpx2 ;; 199 m68k-apollo-*) fmt=coff em=apollo ;; |
197 m68k-*-sysv4*) # must be before -sysv* 198 fmt=elf em=svr4 ;; 199 m68k-*-elf*) fmt=elf ;; 200 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) | 200 m68k-*-sysv4*) # must be before -sysv* 201 fmt=elf em=svr4 ;; 202 m68k-*-elf*) fmt=elf ;; 203 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) |
201 fmt=coff targ=m68kcoff ;; | 204 fmt=coff ;; |
202 m68k-*-hpux*) fmt=hp300 em=hp300 ;; 203 m68k-*-linux*aout*) fmt=aout em=linux ;; | 205 m68k-*-hpux*) fmt=hp300 em=hp300 ;; 206 m68k-*-linux*aout*) fmt=aout em=linux ;; |
204 m68k-*-linux*) fmt=elf em=linux ;; 205 m68k-*-lynxos*) fmt=coff targ=m68kcoff 206 em=lynx ;; | 207 m68k-*-linux-gnu*) fmt=elf em=linux ;; 208 m68k-*-lynxos*) fmt=coff em=lynx ;; |
207 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; 208 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | 209 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; 210 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
209 m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;; | 211 m68k-apple-aux*) fmt=coff em=aux ;; |
210 m68k-*-psos*) fmt=elf em=psos;; 211 | 212 m68k-*-psos*) fmt=elf em=psos;; 213 |
212 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;; 213 m88k-*-coff*) fmt=coff targ=m88kcoff ;; | 214 m88k-motorola-sysv3*) fmt=coff em=delt88 ;; 215 m88k-*-coff*) fmt=coff ;; |
214 215 # don't change em like *-*-bsd does | 216 217 # don't change em like *-*-bsd does |
216 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; 217 mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;; 218 mips-dec-bsd*) fmt=aout targ=mips-lit ;; 219 mips-sony-bsd*) fmt=ecoff targ=mips-big ;; | 218 mips-dec-netbsd*) fmt=elf endian=little ;; 219 mips-dec-openbsd*) fmt=elf endian=little ;; 220 mips-dec-bsd*) fmt=aout ;; 221 mips-sony-bsd*) fmt=ecoff ;; |
220 mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;; | 222 mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;; |
221 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;; 222 mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;; 223 mips-*-ecoff*) fmt=ecoff 224 case "$endian" in 225 big) targ=mips-big ;; 226 *) targ=mips-lit ;; 227 esac 228 ;; 229 mips-*-ecoff*) fmt=ecoff targ=mips-big ;; 230 mips-*-irix6*) fmt=elf targ=mips-big ;; 231 mips-*-irix5*) fmt=elf targ=mips-big ;; 232 mips-*-irix*) fmt=ecoff targ=mips-big ;; 233 mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;; 234 mips-*-riscos*) fmt=ecoff targ=mips-big ;; 235 mips-*-sysv*) fmt=ecoff targ=mips-big ;; 236 mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*) 237 fmt=elf 238 case "$endian" in 239 big) targ=mips-big ;; 240 *) targ=mips-lit ;; 241 esac 242 ;; | 223 mips-*-ultrix*) fmt=ecoff endian=little ;; 224 mips-*-osf*) fmt=ecoff endian=little ;; 225 mips-*-ecoff*) fmt=ecoff ;; 226 mips-*-ecoff*) fmt=ecoff ;; 227 mips-*-irix6*) fmt=elf ;; 228 mips-*-irix5*) fmt=elf ;; 229 mips-*-irix*) fmt=ecoff ;; 230 mips-*-lnews*) fmt=ecoff em=lnews ;; 231 mips-*-riscos*) fmt=ecoff ;; 232 mips-*-sysv*) fmt=ecoff ;; 233 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) 234 fmt=elf ;; |
243 mn10200-*-*) fmt=elf bfd_gas=yes ;; 244 mn10300-*-*) fmt=elf bfd_gas=yes ;; 245 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) | 235 mn10200-*-*) fmt=elf bfd_gas=yes ;; 236 mn10300-*-*) fmt=elf bfd_gas=yes ;; 237 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) |
246 fmt=coff em=pe 247 case "$endian" in 248 big) targ=ppc-big ;; 249 *) targ=ppc-lit ;; 250 esac 251 ;; | 238 fmt=coff em=pe ;; |
252 ppc-*-aix*) fmt=coff ;; 253 ppc-*-beos*) fmt=coff ;; 254 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) | 239 ppc-*-aix*) fmt=coff ;; 240 ppc-*-beos*) fmt=coff ;; 241 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) |
255 fmt=elf | 242 fmt=elf ;; 243 ppc-*-linux-gnu*) fmt=elf |
256 case "$endian" in | 244 case "$endian" in |
257 big) targ=ppc-big ;; 258 *) targ=ppc-lit ;; | 245 big) ;; 246 *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;; |
259 esac 260 ;; | 247 esac 248 ;; |
261 ppc-*-linux*) fmt=elf 262 case "$endian" in 263 big) targ=ppc-big ;; 264 *) AC_MSG_ERROR(Linux must be configured big endian) ;; 265 esac 266 ;; | |
267 ppc-*-solaris*) fmt=elf | 249 ppc-*-solaris*) fmt=elf |
268 case "$endian" in 269 big) AC_MSG_ERROR(Solaris must be configured little endian) ;; 270 *) targ=ppc-sol ;; 271 esac | 250 if test ${this_target} = $target; then 251 AC_DEFINE(TARGET_SOLARIS_COMMENT) 252 fi 253 if test x${endian} = xbig; then 254 AC_MSG_ERROR(Solaris must be configured little endian) 255 fi |
272 ;; | 256 ;; |
273 ppc-*-rtems*) 274 fmt=elf 275 case "$endian" in 276 big) targ=ppc-big ;; 277 *) targ=ppc-lit ;; 278 esac 279 ;; | 257 ppc-*-rtems*) fmt=elf ;; |
280 ppc-*-macos* | ppc-*-mpw*) 281 fmt=coff em=macos ;; 282 ppc-*-netware*) fmt=elf em=ppcnw ;; 283 284 sh-*-elf*) fmt=elf ;; 285 sh-*-coff*) fmt=coff ;; | 258 ppc-*-macos* | ppc-*-mpw*) 259 fmt=coff em=macos ;; 260 ppc-*-netware*) fmt=elf em=ppcnw ;; 261 262 sh-*-elf*) fmt=elf ;; 263 sh-*-coff*) fmt=coff ;; |
264 sh-*-rtems*) fmt=coff ;; |
|
286 287 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; 288 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; 289 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; 290 291 sparc-*-rtems*) fmt=aout ;; 292 sparc-*-sunos4*) fmt=aout em=sun3 ;; 293 sparc-*-aout | sparc*-*-vxworks*) 294 fmt=aout em=sparcaout ;; 295 sparc-*-coff) fmt=coff ;; 296 sparc-*-linux*aout*) fmt=aout em=linux ;; | 265 266 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; 267 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; 268 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; 269 270 sparc-*-rtems*) fmt=aout ;; 271 sparc-*-sunos4*) fmt=aout em=sun3 ;; 272 sparc-*-aout | sparc*-*-vxworks*) 273 fmt=aout em=sparcaout ;; 274 sparc-*-coff) fmt=coff ;; 275 sparc-*-linux*aout*) fmt=aout em=linux ;; |
297 sparc-*-linux*) fmt=elf em=linux ;; | 276 sparc-*-linux-gnu*) fmt=elf em=linux ;; |
298 sparc-*-lynxos*) fmt=coff em=lynx ;; 299 sparc-fujitsu-none) fmt=aout ;; 300 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) 301 fmt=elf ;; 302 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; 303 sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; 304 | 277 sparc-*-lynxos*) fmt=coff em=lynx ;; 278 sparc-fujitsu-none) fmt=aout ;; 279 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) 280 fmt=elf ;; 281 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; 282 sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; 283 |
284 tic30-*-*aout*) fmt=aout bfd_gas=yes ;; 285 tic30-*-*coff*) fmt=coff bfd_gas=yes ;; 286 287 288 v850-*-*) fmt=elf bfd_gas=yes ;; 289 |
|
305 vax-*-bsd* | vax-*-ultrix*) 306 fmt=aout ;; 307 vax-*-vms) fmt=vms ;; 308 309 z8k-*-coff | z8k-*-sim) 310 fmt=coff ;; 311 312 w65-*-*) fmt=coff ;; --- 10 unchanged lines hidden (view full) --- 323 *-*-elf | *-*-sysv4* | *-*-solaris*) 324 AC_MSG_WARN(GAS support for ${generic_target} is incomplete.) 325 fmt=elf dev=yes ;; 326 *-*-vxworks) fmt=aout ;; 327 *-*-netware) fmt=elf ;; 328 esac 329 330 case ${cpu_type}-${fmt} in | 290 vax-*-bsd* | vax-*-ultrix*) 291 fmt=aout ;; 292 vax-*-vms) fmt=vms ;; 293 294 z8k-*-coff | z8k-*-sim) 295 fmt=coff ;; 296 297 w65-*-*) fmt=coff ;; --- 10 unchanged lines hidden (view full) --- 308 *-*-elf | *-*-sysv4* | *-*-solaris*) 309 AC_MSG_WARN(GAS support for ${generic_target} is incomplete.) 310 fmt=elf dev=yes ;; 311 *-*-vxworks) fmt=aout ;; 312 *-*-netware) fmt=elf ;; 313 esac 314 315 case ${cpu_type}-${fmt} in |
331 alpha-*) bfd_gas=yes ;; | 316 alpha*-*) bfd_gas=yes ;; |
332 arm-*) bfd_gas=yes ;; 333 # not yet 334 # i386-aout) bfd_gas=preferred ;; 335 mips-*) bfd_gas=yes ;; 336 ns32k-*) bfd_gas=yes ;; 337 ppc-*) bfd_gas=yes ;; 338 sparc-*) bfd_gas=yes ;; 339 *-elf) bfd_gas=yes ;; 340 *-ecoff) bfd_gas=yes ;; 341 *-som) bfd_gas=yes ;; 342 *) ;; 343 esac 344 345# Other random stuff. 346 347 # do we need the opcodes library? 348 case ${cpu_type} in | 317 arm-*) bfd_gas=yes ;; 318 # not yet 319 # i386-aout) bfd_gas=preferred ;; 320 mips-*) bfd_gas=yes ;; 321 ns32k-*) bfd_gas=yes ;; 322 ppc-*) bfd_gas=yes ;; 323 sparc-*) bfd_gas=yes ;; 324 *-elf) bfd_gas=yes ;; 325 *-ecoff) bfd_gas=yes ;; 326 *-som) bfd_gas=yes ;; 327 *) ;; 328 esac 329 330# Other random stuff. 331 332 # do we need the opcodes library? 333 case ${cpu_type} in |
349 vax | i386) | 334 vax | i386 | tic30) |
350 ;; 351 *) 352 need_opcodes=yes | 335 ;; 336 *) 337 need_opcodes=yes |
338 339 case "${enable_shared}" in 340 yes) shared_opcodes=true ;; 341 *opcodes*) shared_opcodes=true ;; 342 *) shared_opcodes=false ;; 343 esac |
|
353 if test "${shared_opcodes}" = "true"; then 354 # A shared libopcodes must be linked against libbfd. 355 need_bfd=yes 356 fi 357 ;; 358 esac 359 | 344 if test "${shared_opcodes}" = "true"; then 345 # A shared libopcodes must be linked against libbfd. 346 need_bfd=yes 347 fi 348 ;; 349 esac 350 |
360 test -n "$want_sparc_v9" && AC_DEFINE(SPARC_V9) 361 362 case ${cpu}-${vendor}-${os} in 363 sparc64-*-elf*) AC_DEFINE(SPARC_ARCH64) ;; 364 esac 365 | |
366 case ${cpu_type} in 367 m32r) 368 case ${extra_objects} in 369 *cgen.o*) ;; 370 *) extra_objects="$extra_objects cgen.o" 371 AC_DEFINE(USING_CGEN) 372 ;; 373 esac --- 18 unchanged lines hidden (view full) --- 392 fi 393 394 echo ${extra_objects} | grep -s "itbl-ops.o" 395 if test $? -ne 0 ; then 396 extra_objects="$extra_objects itbl-ops.o" 397 fi 398 ;; 399 | 351 case ${cpu_type} in 352 m32r) 353 case ${extra_objects} in 354 *cgen.o*) ;; 355 *) extra_objects="$extra_objects cgen.o" 356 AC_DEFINE(USING_CGEN) 357 ;; 358 esac --- 18 unchanged lines hidden (view full) --- 377 fi 378 379 echo ${extra_objects} | grep -s "itbl-ops.o" 380 if test $? -ne 0 ; then 381 extra_objects="$extra_objects itbl-ops.o" 382 fi 383 ;; 384 |
385 sparc) 386 if test $this_target = $target ; then 387 AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}") 388 fi 389 ;; 390 |
|
400 *) 401 ;; 402 esac 403 404# See if we really can support this configuration with the emulation code. 405 406 if test $this_target = $target ; then 407 primary_bfd_gas=$bfd_gas 408 obj_format=$fmt | 391 *) 392 ;; 393 esac 394 395# See if we really can support this configuration with the emulation code. 396 397 if test $this_target = $target ; then 398 primary_bfd_gas=$bfd_gas 399 obj_format=$fmt |
409 gas_target=$targ | |
410 te_file=$em 411 412 if test $bfd_gas = no ; then 413 # Can't support other configurations this way. 414 break 415 fi 416 elif test $bfd_gas = no ; then 417 # Can't support this configuration. 418 break 419 fi 420 421# From target name and format, produce a list of supported emulations. 422 423 case ${generic_target}-${fmt} in 424 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; | 400 te_file=$em 401 402 if test $bfd_gas = no ; then 403 # Can't support other configurations this way. 404 break 405 fi 406 elif test $bfd_gas = no ; then 407 # Can't support this configuration. 408 break 409 fi 410 411# From target name and format, produce a list of supported emulations. 412 413 case ${generic_target}-${fmt} in 414 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
425 mips-*-linux*-*) case "$endian" in | 415 mips-*-linux-gnu*-*) case "$endian" in |
426 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; 427 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; 428 esac ;; 429 mips-*-lnews*-ecoff) ;; 430 mips-*-*-ecoff) case "$endian" in 431 big) emulation="mipsbecoff mipslecoff mipsecoff" ;; 432 *) emulation="mipslecoff mipsbecoff mipsecoff" ;; 433 esac ;; --- 30 unchanged lines hidden (view full) --- 464if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then 465 AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type}) 466fi 467 468if test ! -r ${srcdir}/config/obj-${obj_format}.c; then 469 AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) 470fi 471 | 416 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; 417 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; 418 esac ;; 419 mips-*-lnews*-ecoff) ;; 420 mips-*-*-ecoff) case "$endian" in 421 big) emulation="mipsbecoff mipslecoff mipsecoff" ;; 422 *) emulation="mipslecoff mipsbecoff mipsecoff" ;; 423 esac ;; --- 30 unchanged lines hidden (view full) --- 454if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then 455 AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type}) 456fi 457 458if test ! -r ${srcdir}/config/obj-${obj_format}.c; then 459 AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) 460fi 461 |
472# and target makefile frag 473 474target_frag=${srcdir}/config/${gas_target}.mt 475if test ! -r ${target_frag}; then 476 target_frag=/dev/null # ick! but subst_file can't be conditionalized 477fi 478AC_SUBST_FILE(target_frag) 479 | |
480case ${user_bfd_gas}-${primary_bfd_gas} in 481 yes-yes | no-no) 482 # We didn't override user's choice. 483 ;; 484 no-yes) 485 AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.) 486 ;; 487 no-preferred) --- 106 unchanged lines hidden (view full) --- 594case "${primary_bfd_gas}" in 595 yes) AC_DEFINE(BFD_ASSEMBLER) 596 need_bfd=yes ;; 597esac 598 599# do we need the opcodes library? 600case "${need_opcodes}" in 601yes) | 462case ${user_bfd_gas}-${primary_bfd_gas} in 463 yes-yes | no-no) 464 # We didn't override user's choice. 465 ;; 466 no-yes) 467 AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.) 468 ;; 469 no-preferred) --- 106 unchanged lines hidden (view full) --- 576case "${primary_bfd_gas}" in 577 yes) AC_DEFINE(BFD_ASSEMBLER) 578 need_bfd=yes ;; 579esac 580 581# do we need the opcodes library? 582case "${need_opcodes}" in 583yes) |
602 OPCODES_DEP=../opcodes/libopcodes.a 603 OPCODES_LIB='-L../opcodes -lopcodes' 604 605 # We need to handle some special cases for shared libraries. 606 case "${host}" in 607 *-*-sunos*) 608 # On SunOS, we must link against the name we are going to install, 609 # not -lbfd, since SunOS does not support SONAME. 610 if test "${shared_opcodes}" = "true"; then 611 OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`' 612 fi 613 ;; 614 alpha*-*-osf*) 615 # On Alpha OSF/1, the native linker searches all the -L 616 # directories for any LIB.so files, and only then searches for any 617 # LIB.a files. That means that if there is an installed 618 # libbfd.so, but this build is not done with --enable-shared, the 619 # link will wind up being against the install libbfd.so rather 620 # than the newly built libbfd. To avoid this, we must explicitly 621 # link against libbfd.a when --enable-shared is not used. 622 if test "${shared_opcodes}" != "true"; then 623 OPCODES_LIB='../opcodes/libopcodes.a' 624 fi 625 ;; 626 esac | 584 OPCODES_LIB=../opcodes/libopcodes.la |
627 ;; 628esac 629 630case "${need_bfd}" in 631yes) | 585 ;; 586esac 587 588case "${need_bfd}" in 589yes) |
632 BFDDEP=../bfd/libbfd.a 633 BFDLIB='-L../bfd -lbfd' | 590 BFDLIB=../bfd/libbfd.la |
634 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" | 591 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" |
635 636 # We need to handle some special cases for shared libraries 637 case "${host}" in 638 *-*-sunos*) 639 # On SunOS, we must link against the name we are going to install, 640 # not -lbfd, since SunOS does not support SONAME. 641 if test "${shared_bfd}" = "true"; then 642 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`' 643 fi 644 ;; 645 alpha*-*-osf*) 646 # On Alpha OSF/1, the native linker searches all the -L 647 # directories for any LIB.so files, and only then searches for any 648 # LIB.a files. That means that if there is an installed 649 # libbfd.so, but this build is not done with --enable-shared, the 650 # link will wind up being against the install libbfd.so rather 651 # than the newly built libbfd. To avoid this, we must explicitly 652 # link against libbfd.a when --enable-shared is not used. 653 if test "${shared_bfd}" != "true"; then 654 BFDLIB='../bfd/libbfd.a' 655 fi 656 ;; 657 esac 658 659 if test "${commonbfdlib}" = "true"; then 660 # when a shared libbfd is built with --enable-commonbfdlib, 661 # all of libopcodes is available in libbfd.so 662 OPCODES_LIB= 663 fi | |
664 ;; 665esac 666 | 592 ;; 593esac 594 |
667AC_SUBST(BFDDEP) | |
668AC_SUBST(BFDLIB) | 595AC_SUBST(BFDLIB) |
669AC_SUBST(OPCODES_DEP) | |
670AC_SUBST(OPCODES_LIB) 671 672AC_SUBST(ALL_OBJ_DEPS) 673 674AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}") 675AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}") 676AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}") 677AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}") 678AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}") 679 680AC_PROG_CC | 596AC_SUBST(OPCODES_LIB) 597 598AC_SUBST(ALL_OBJ_DEPS) 599 600AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}") 601AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}") 602AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}") 603AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}") 604AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}") 605 606AC_PROG_CC |
681AC_PROG_INSTALL | |
682 | 607 |
608AC_PROG_YACC 609AC_PROG_LEX 610AC_DECL_YYTEXT 611 612AM_MAINTAINER_MODE 613AM_CYGWIN32 614AM_EXEEXT 615 |
|
683AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h) 684 685# Put this here so that autoconf's "cross-compiling" message doesn't confuse 686# people who are not cross-compiling but are compiling cross-assemblers. 687AC_MSG_CHECKING(whether compiling a cross-assembler) 688if test "${host}" = "${target}"; then 689 cross_gas=no 690else --- 47 unchanged lines hidden (view full) --- 738# Does errno.h declare errno, or do we have to add a separate declaration 739# for it? 740GAS_CHECK_DECL_NEEDED(errno, f, int f, [ 741#ifdef HAVE_ERRNO_H 742#include <errno.h> 743#endif 744]) 745 | 616AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h) 617 618# Put this here so that autoconf's "cross-compiling" message doesn't confuse 619# people who are not cross-compiling but are compiling cross-assemblers. 620AC_MSG_CHECKING(whether compiling a cross-assembler) 621if test "${host}" = "${target}"; then 622 cross_gas=no 623else --- 47 unchanged lines hidden (view full) --- 671# Does errno.h declare errno, or do we have to add a separate declaration 672# for it? 673GAS_CHECK_DECL_NEEDED(errno, f, int f, [ 674#ifdef HAVE_ERRNO_H 675#include <errno.h> 676#endif 677]) 678 |
746HLDFLAGS= 747HLDENV= 748RPATH_ENVVAR=LD_LIBRARY_PATH 749# If we have shared libraries, try to set rpath reasonably. 750if test "${shared}" = "true"; then 751 case "${host}" in 752 *-*-hpux*) 753 HLDFLAGS='-Wl,+s,+b,$(libdir)' 754 RPATH_ENVVAR=SHLIB_PATH 755 ;; 756 *-*-irix5* | *-*-irix6*) 757 HLDFLAGS='-Wl,-rpath,$(libdir)' 758 ;; 759 *-*-linux*aout*) 760 ;; 761 *-*-linux*) 762 HLDFLAGS='-Wl,-rpath,$(libdir)' 763 ;; 764 *-*-solaris*) 765 HLDFLAGS='-R $(libdir)' 766 ;; 767 *-*-sysv4*) 768 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' 769 ;; 770 esac 771fi 772 773# On SunOS, if the linker supports the -rpath option, use it to 774# prevent ../bfd and ../opcodes from being included in the run time 775# search path. 776case "${host}" in 777 *-*-sunos*) 778 echo 'main () { }' > conftest.c 779 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t 780 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then 781 : 782 elif grep 'No such file' conftest.t >/dev/null 2>&1; then 783 : 784 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then 785 : 786 elif test "${shared}" = "true"; then 787 HLDFLAGS='-Wl,-rpath=$(libdir)' 788 else 789 HLDFLAGS='-Wl,-rpath=' 790 fi 791 rm -f conftest.t conftest.c conftest 792 ;; 793esac 794AC_SUBST(HLDFLAGS) 795AC_SUBST(HLDENV) 796AC_SUBST(RPATH_ENVVAR) 797 | |
798dnl This must come last. 799 800dnl We used to make symlinks to files in the source directory, but now 801dnl we just use the right name for .c files, and create .h files in 802dnl the build directory which include the right .h file. Make sure 803dnl the old symlinks don't exist, so that a reconfigure in an existing 804dnl directory behaves reasonably. 805 --- 12 unchanged lines hidden --- | 679dnl This must come last. 680 681dnl We used to make symlinks to files in the source directory, but now 682dnl we just use the right name for .c files, and create .h files in 683dnl the build directory which include the right .h file. Make sure 684dnl the old symlinks don't exist, so that a reconfigure in an existing 685dnl directory behaves reasonably. 686 --- 12 unchanged lines hidden --- |