Deleted Added
full compact
7,9c7,16
< AC_PREREQ(2.5)dnl v2.5 needed for --bindir et al
< AC_INIT(as.h)dnl
< dnl
---
> dnl v2.5 needed for --bindir et al
> AC_PREREQ(2.5)
> AC_INIT(as.h)
>
> AC_CANONICAL_SYSTEM
>
> AM_INIT_AUTOMAKE(gas, 2.9.1)
>
> AM_PROG_LIBTOOL
>
26,36d32
< AC_ARG_ENABLE(shared,
< [ --enable-shared build shared BFD library],
< [case "${enableval}" in
< yes) shared=true shared_bfd=true shared_opcodes=true ;;
< no) shared=false ;;
< *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
< *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
< *bfd*) shared=true shared_bfd=true ;;
< *opcodes*) shared=true shared_opcodes=true ;;
< *) shared=false ;;
< esac])dnl
45,46c41,42
< # Generate a header file -- gets more post-processing by Makefile later.
< AC_CONFIG_HEADER(conf)
---
> # Generate a header file
> AM_CONFIG_HEADER(config.h:config.in)
48,52d43
< dnl For recursion to work right, this must be an absolute pathname.
< AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
< AC_CANONICAL_SYSTEM
< AC_ARG_PROGRAM
<
77a69,70
> arch=
> endian=
78a72
> alpha*) cpu_type=alpha ;;
80a75
> thumb*) cpu_type=arm endian=little ;;
94,95c89,93
< sparc64) cpu_type=sparc want_sparc_v9=true ;;
< sparc*) cpu_type=sparc ;;
---
> sparclite*) cpu_type=sparc arch=sparclite ;;
> sparclet*) cpu_type=sparc arch=sparclet ;;
> sparc64*) cpu_type=sparc arch=v9-64 ;;
> sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
> v850*) cpu_type=v850 ;;
100a99,103
> if test x${endian} = xbig; then
> AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1)
> elif test x${endian} = xlittle; then
> AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0)
> fi
105d107
< targ=${cpu_type}
113,116c115,118
< a29k-*-coff) fmt=coff targ=ebmon29k ;;
< a29k-amd-udi) fmt=coff targ=ebmon29k ;;
< a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
< a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
---
> a29k-*-coff) fmt=coff ;;
> a29k-amd-udi) fmt=coff ;;
> a29k-amd-ebmon) fmt=coff ;;
> a29k-nyu-sym1) fmt=coff ;;
119,124c121,127
< alpha-*-*vms*) fmt=evax ;;
< alpha-*-netware*) fmt=ecoff ;;
< alpha-*-openbsd*) fmt=ecoff ;;
< alpha-*-osf*) fmt=ecoff ;;
< alpha-*-linuxecoff*) fmt=ecoff ;;
< alpha-*-linux*) fmt=elf em=linux ;;
---
> alpha*-*-*vms*) fmt=evax ;;
> alpha*-*-netware*) fmt=ecoff ;;
> alpha*-*-openbsd*) fmt=ecoff ;;
> alpha*-*-osf*) fmt=ecoff ;;
> alpha*-*-linuxecoff*) fmt=ecoff ;;
> alpha*-*-linux-gnu*) fmt=elf em=linux ;;
> alpha*-*-netbsd*) fmt=elf em=nbsd ;;
125a129
> arc-*-elf*) fmt=elf bfd_gas=yes ;;
127,134c131,133
< arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
< arm-*-aout) fmt=aout
< case "$endian" in
< big) targ=arm-big ;;
< *) targ=arm-lit ;;
< esac
< ;;
< arm-*-coff) fmt=coff ;;
---
> arm-*-riscix*) fmt=aout em=riscix ;;
> arm-*-aout) fmt=aout ;;
> arm-*-coff | thumb-*-coff) fmt=coff ;;
136c135
< arm-*-pe) fmt=coff targ=armcoff em=pe ;;
---
> arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
150,151c149
< i386-ibm-aix*) fmt=coff targ=i386coff
< em=i386aix ;;
---
> i386-ibm-aix*) fmt=coff em=i386aix ;;
158,162c156,158
< i386-*-linux*coff*) fmt=coff em=linux
< targ=i386coff ;;
< i386-*-linux*) fmt=elf em=linux ;;
< i386-*-lynxos*) fmt=coff targ=i386coff
< em=lynx ;;
---
> i386-*-linux*coff*) fmt=coff em=linux ;;
> i386-*-linux-gnu*) fmt=elf em=linux ;;
> i386-*-lynxos*) fmt=coff em=lynx ;;
165c161
< i386-*-freebsdelf*) fmt=elf em=freebsd ;;
---
> i386-*-freebsdelf*) fmt=elf em=freebsd;;
167,169c163,170
< i386-*-sco*elf*) fmt=elf targ=sco5 ;;
< i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
< fmt=coff targ=i386coff ;;
---
> i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
> fmt=coff ;;
> i386-*-sco3.2v5*) fmt=elf
> if test ${this_target} = $target; then
> AC_DEFINE(SCO_ELF)
> fi
> ;;
> i386-*-sco3.2*) fmt=coff ;;
171,172c172,174
< i386-*-go32) fmt=coff targ=i386coff ;;
< i386-*-rtems*) fmt=coff targ=i386coff ;;
---
> i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
> fmt=coff em=go32;;
> i386-*-rtems*) fmt=coff ;;
178,180c180,183
< i386-*-pe) fmt=coff targ=i386coff em=pe ;;
< i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
< i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
---
> i386-*-pe) fmt=coff em=pe ;;
> i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
> i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
> i386-*-*nt*) fmt=coff em=pe ;;
182,183c185,186
< i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
< i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
---
> i960-*-coff) fmt=coff em=ic960 ;;
> i960-*-rtems*) fmt=coff em=ic960 ;;
187c190
< i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
---
> i960-*-vxworks5.*) fmt=coff em=ic960 ;;
194,196c197,199
< m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
< m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
< m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
---
> m68k-motorola-sysv*) fmt=coff em=delta ;;
> m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
> m68k-apollo-*) fmt=coff em=apollo ;;
201c204
< fmt=coff targ=m68kcoff ;;
---
> fmt=coff ;;
204,206c207,208
< m68k-*-linux*) fmt=elf em=linux ;;
< m68k-*-lynxos*) fmt=coff targ=m68kcoff
< em=lynx ;;
---
> m68k-*-linux-gnu*) fmt=elf em=linux ;;
> m68k-*-lynxos*) fmt=coff em=lynx ;;
209c211
< m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
---
> m68k-apple-aux*) fmt=coff em=aux ;;
212,213c214,215
< m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
< m88k-*-coff*) fmt=coff targ=m88kcoff ;;
---
> m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
> m88k-*-coff*) fmt=coff ;;
216,219c218,221
< mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
< mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
< mips-dec-bsd*) fmt=aout targ=mips-lit ;;
< mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
---
> mips-dec-netbsd*) fmt=elf endian=little ;;
> mips-dec-openbsd*) fmt=elf endian=little ;;
> mips-dec-bsd*) fmt=aout ;;
> mips-sony-bsd*) fmt=ecoff ;;
221,242c223,234
< mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
< mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
< mips-*-ecoff*) fmt=ecoff
< case "$endian" in
< big) targ=mips-big ;;
< *) targ=mips-lit ;;
< esac
< ;;
< mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
< mips-*-irix6*) fmt=elf targ=mips-big ;;
< mips-*-irix5*) fmt=elf targ=mips-big ;;
< mips-*-irix*) fmt=ecoff targ=mips-big ;;
< mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
< mips-*-riscos*) fmt=ecoff targ=mips-big ;;
< mips-*-sysv*) fmt=ecoff targ=mips-big ;;
< mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
< fmt=elf
< case "$endian" in
< big) targ=mips-big ;;
< *) targ=mips-lit ;;
< esac
< ;;
---
> mips-*-ultrix*) fmt=ecoff endian=little ;;
> mips-*-osf*) fmt=ecoff endian=little ;;
> mips-*-ecoff*) fmt=ecoff ;;
> mips-*-ecoff*) fmt=ecoff ;;
> mips-*-irix6*) fmt=elf ;;
> mips-*-irix5*) fmt=elf ;;
> mips-*-irix*) fmt=ecoff ;;
> mips-*-lnews*) fmt=ecoff em=lnews ;;
> mips-*-riscos*) fmt=ecoff ;;
> mips-*-sysv*) fmt=ecoff ;;
> mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
> fmt=elf ;;
246,251c238
< fmt=coff em=pe
< case "$endian" in
< big) targ=ppc-big ;;
< *) targ=ppc-lit ;;
< esac
< ;;
---
> fmt=coff em=pe ;;
255c242,243
< fmt=elf
---
> fmt=elf ;;
> ppc-*-linux-gnu*) fmt=elf
257,258c245,246
< big) targ=ppc-big ;;
< *) targ=ppc-lit ;;
---
> big) ;;
> *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
261,266d248
< ppc-*-linux*) fmt=elf
< case "$endian" in
< big) targ=ppc-big ;;
< *) AC_MSG_ERROR(Linux must be configured big endian) ;;
< esac
< ;;
268,271c250,255
< case "$endian" in
< big) AC_MSG_ERROR(Solaris must be configured little endian) ;;
< *) targ=ppc-sol ;;
< esac
---
> if test ${this_target} = $target; then
> AC_DEFINE(TARGET_SOLARIS_COMMENT)
> fi
> if test x${endian} = xbig; then
> AC_MSG_ERROR(Solaris must be configured little endian)
> fi
273,279c257
< ppc-*-rtems*)
< fmt=elf
< case "$endian" in
< big) targ=ppc-big ;;
< *) targ=ppc-lit ;;
< esac
< ;;
---
> ppc-*-rtems*) fmt=elf ;;
285a264
> sh-*-rtems*) fmt=coff ;;
297c276
< sparc-*-linux*) fmt=elf em=linux ;;
---
> sparc-*-linux-gnu*) fmt=elf em=linux ;;
304a284,289
> tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
> tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
>
>
> v850-*-*) fmt=elf bfd_gas=yes ;;
>
331c316
< alpha-*) bfd_gas=yes ;;
---
> alpha*-*) bfd_gas=yes ;;
349c334
< vax | i386)
---
> vax | i386 | tic30)
352a338,343
>
> case "${enable_shared}" in
> yes) shared_opcodes=true ;;
> *opcodes*) shared_opcodes=true ;;
> *) shared_opcodes=false ;;
> esac
360,365d350
< test -n "$want_sparc_v9" && AC_DEFINE(SPARC_V9)
<
< case ${cpu}-${vendor}-${os} in
< sparc64-*-elf*) AC_DEFINE(SPARC_ARCH64) ;;
< esac
<
399a385,390
> sparc)
> if test $this_target = $target ; then
> AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}")
> fi
> ;;
>
409d399
< gas_target=$targ
425c415
< mips-*-linux*-*) case "$endian" in
---
> mips-*-linux-gnu*-*) case "$endian" in
472,479d461
< # and target makefile frag
<
< target_frag=${srcdir}/config/${gas_target}.mt
< if test ! -r ${target_frag}; then
< target_frag=/dev/null # ick! but subst_file can't be conditionalized
< fi
< AC_SUBST_FILE(target_frag)
<
602,626c584
< OPCODES_DEP=../opcodes/libopcodes.a
< OPCODES_LIB='-L../opcodes -lopcodes'
<
< # We need to handle some special cases for shared libraries.
< case "${host}" in
< *-*-sunos*)
< # On SunOS, we must link against the name we are going to install,
< # not -lbfd, since SunOS does not support SONAME.
< if test "${shared_opcodes}" = "true"; then
< OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
< fi
< ;;
< alpha*-*-osf*)
< # On Alpha OSF/1, the native linker searches all the -L
< # directories for any LIB.so files, and only then searches for any
< # LIB.a files. That means that if there is an installed
< # libbfd.so, but this build is not done with --enable-shared, the
< # link will wind up being against the install libbfd.so rather
< # than the newly built libbfd. To avoid this, we must explicitly
< # link against libbfd.a when --enable-shared is not used.
< if test "${shared_opcodes}" != "true"; then
< OPCODES_LIB='../opcodes/libopcodes.a'
< fi
< ;;
< esac
---
> OPCODES_LIB=../opcodes/libopcodes.la
632,633c590
< BFDDEP=../bfd/libbfd.a
< BFDLIB='-L../bfd -lbfd'
---
> BFDLIB=../bfd/libbfd.la
635,663d591
<
< # We need to handle some special cases for shared libraries
< case "${host}" in
< *-*-sunos*)
< # On SunOS, we must link against the name we are going to install,
< # not -lbfd, since SunOS does not support SONAME.
< if test "${shared_bfd}" = "true"; then
< BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
< fi
< ;;
< alpha*-*-osf*)
< # On Alpha OSF/1, the native linker searches all the -L
< # directories for any LIB.so files, and only then searches for any
< # LIB.a files. That means that if there is an installed
< # libbfd.so, but this build is not done with --enable-shared, the
< # link will wind up being against the install libbfd.so rather
< # than the newly built libbfd. To avoid this, we must explicitly
< # link against libbfd.a when --enable-shared is not used.
< if test "${shared_bfd}" != "true"; then
< BFDLIB='../bfd/libbfd.a'
< fi
< ;;
< esac
<
< if test "${commonbfdlib}" = "true"; then
< # when a shared libbfd is built with --enable-commonbfdlib,
< # all of libopcodes is available in libbfd.so
< OPCODES_LIB=
< fi
667d594
< AC_SUBST(BFDDEP)
669d595
< AC_SUBST(OPCODES_DEP)
681d606
< AC_PROG_INSTALL
682a608,615
> AC_PROG_YACC
> AC_PROG_LEX
> AC_DECL_YYTEXT
>
> AM_MAINTAINER_MODE
> AM_CYGWIN32
> AM_EXEEXT
>
746,797d678
< HLDFLAGS=
< HLDENV=
< RPATH_ENVVAR=LD_LIBRARY_PATH
< # If we have shared libraries, try to set rpath reasonably.
< if test "${shared}" = "true"; then
< case "${host}" in
< *-*-hpux*)
< HLDFLAGS='-Wl,+s,+b,$(libdir)'
< RPATH_ENVVAR=SHLIB_PATH
< ;;
< *-*-irix5* | *-*-irix6*)
< HLDFLAGS='-Wl,-rpath,$(libdir)'
< ;;
< *-*-linux*aout*)
< ;;
< *-*-linux*)
< HLDFLAGS='-Wl,-rpath,$(libdir)'
< ;;
< *-*-solaris*)
< HLDFLAGS='-R $(libdir)'
< ;;
< *-*-sysv4*)
< 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;'
< ;;
< esac
< fi
<
< # On SunOS, if the linker supports the -rpath option, use it to
< # prevent ../bfd and ../opcodes from being included in the run time
< # search path.
< case "${host}" in
< *-*-sunos*)
< echo 'main () { }' > conftest.c
< ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
< if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
< :
< elif grep 'No such file' conftest.t >/dev/null 2>&1; then
< :
< elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
< :
< elif test "${shared}" = "true"; then
< HLDFLAGS='-Wl,-rpath=$(libdir)'
< else
< HLDFLAGS='-Wl,-rpath='
< fi
< rm -f conftest.t conftest.c conftest
< ;;
< esac
< AC_SUBST(HLDFLAGS)
< AC_SUBST(HLDENV)
< AC_SUBST(RPATH_ENVVAR)
<