* configure.in: ../bfd/config.bfd now just sets shell variables.

Use them rather than looking through target Makefile fragments.
	* configure: Rebuild.
This commit is contained in:
Ian Lance Taylor 1995-09-04 18:31:33 +00:00
parent 2cb159a52a
commit c62d12746b
3 changed files with 1236 additions and 64 deletions

View File

@ -1,3 +1,9 @@
Mon Sep 4 14:28:46 1995 Ian Lance Taylor <ian@cygnus.com>
* configure.in: ../bfd/config.bfd now just sets shell variables.
Use them rather than looking through target Makefile fragments.
* configure: Rebuild.
start-sanitize-sh3e start-sanitize-sh3e
Thu Aug 31 12:35:32 1995 Jim Wilson <wilson@chestnut.cygnus.com> Thu Aug 31 12:35:32 1995 Jim Wilson <wilson@chestnut.cygnus.com>

1154
opcodes/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +1,68 @@
# This file is a shell script that supplies the information necessary AC_PREREQ(2.0)
# to tailor a template configure script into the configure script AC_INIT(z8k-dis.c)
# appropriate for this directory. For more information, check any # configure.in script for the opcodes library.
# existing configure script. # Copyright (C) 1995 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
srctrigger=z8k-dis.c AC_ARG_ENABLE(targets,
srcname="opcodes" [ --enable-targets alternative target configurations],
[case "${enableval}" in
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
# per-host: # host-specific stuff:
AC_PROG_CC
AC_PROG_RANLIB
AC_CHECK_HEADERS(string.h strings.h)
AC_CONFIG_AUX_DIR(`cd $srcdir/..;pwd`)
AC_CANONICAL_SYSTEM
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
if test -z "$host" ; then
AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
fi
AC_ARG_PROGRAM
. ${srcdir}/../bfd/configure.host . ${srcdir}/../bfd/configure.host
# Set up to make a link between the host's include file and "sysdep.h". if test -f ${srcdir}/../bfd/config/${my_host}.mh ; then
files="../bfd/hosts/${my_host}.h" host_makefile_frag=${srcdir}/../bfd/config/${my_host}.mh
links="sysdep.h" frags=${host_makefile_frag}
else
if [ ! -f ${srcdir}/${files} ] ; then host_makefile_frag=/dev/null
files=../bfd/hosts/std-host.h frags=
echo "[${srcname} has no specific support for host ${host} -- using std-host]"
fi fi
AC_SUBST_FILE(host_makefile_frag)
AC_SUBST(frags)
host_makefile_frag= # target-specific stuff:
if [ -f ${srcdir}/../bfd/config/${my_host}.mh ] ; then
host_makefile_frag=../bfd/config/${my_host}.mh
fi
# per-target:
# Canonicalize the secondary target names. # Canonicalize the secondary target names.
if [ -n "$enable_targets" ]; then if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'` for targ in `echo $enable_targets | sed 's/,/ /g'`
do do
result=`$configsub $targ 2>/dev/null` result=`$ac_config_sub $targ 2>/dev/null`
if [ -n "$result" ]; then if test -n "$result" ; then
canon_targets="$canon_targets $result" canon_targets="$canon_targets $result"
else else
# Allow targets that config.sub doesn't recognize, like "all". # Allow targets that config.sub doesn't recognize, like "all".
@ -41,62 +72,41 @@ if [ -n "$enable_targets" ]; then
fi fi
all_targets=false all_targets=false
selarchs=
for targ in $target $canon_targets for targ in $target $canon_targets
do do
bfd_target=`${config_shell} $srcdir/../bfd/config.bfd $targ` if test "x$targ" = "xall" ; then
if [ "x$bfd_target" = "xall" ]; then
all_targets=true all_targets=true
else else
if [ ! -f ${srcdir}/../bfd/config/${bfd_target}.mt ] ; then . $srcdir/../bfd/config.bfd
echo '***' No file ${srcdir}/../bfd/config/${bfd_target}.mt 1>&2 selarchs="$selarchs $targ_archs"
echo '***' opcodes does not support target ${bfd_target} 1>&2
echo '***' Look in bfd/config.bfd for supported targets 1>&2
exit 1
fi
if [ "x$targ" = "x$target" ]; then
target_makefile_frag=${srcdir}/../bfd/config/${bfd_target}.mt
else
target_extra_frags="$target_extra_frags ${srcdir}/../bfd/config/${bfd_target}.mt"
fi
fi fi
done done
# We don't do any links based on the target system, just makefile config. # We don't do any links based on the target system, just makefile config.
# post-target: if test x${all_targets} = xfalse ; then
rm -f Makefile.tmp Makefile.2
mv Makefile Makefile.tmp
if [ x${all_targets} = xfalse ]; then
allfrags="$target_makefile_frag $target_extra_frags"
# The architectures in all the configured targets.
SELECT_ARCHITECTURES=`sed -n '
s/SELECT_ARCHITECTURES[ ]*=[ ]*//p
' $allfrags`
# Target architecture .o files. # Target architecture .o files.
ta= ta=
for arch in $SELECT_ARCHITECTURES for arch in $selarchs
do do
ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g` ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
archdefs="$archdefs -DARCH_$ad" archdefs="$archdefs -DARCH_$ad"
case "$arch" in case "$arch" in
bfd_a29k_arch) ta="$ta a29k-dis.o" ;; bfd_a29k_arch) ta="$ta a29k-dis.o" ;;
bfd_alpha_arch) ta="$ta alpha-dis.o" ;; bfd_alpha_arch) ta="$ta alpha-dis.o" ;;
# start-sanitize-arc
bfd_arc_arch) ta="$ta arc-dis.o arc-opc.o" ;;
# end-sanitize-arc
bfd_arm_arch) ta="$ta arm-dis.o" ;; bfd_arm_arch) ta="$ta arm-dis.o" ;;
bfd_h8300_arch) ta="$ta h8300-dis.o" ;; bfd_h8300_arch) ta="$ta h8300-dis.o" ;;
bfd_h8500_arch) ta="$ta h8500-dis.o" ;; bfd_h8500_arch) ta="$ta h8500-dis.o" ;;
bfd_hppa_arch) ta="$ta hppa-dis.o" ;; bfd_hppa_arch) ta="$ta hppa-dis.o" ;;
bfd_i386_arch) ta="$ta i386-dis.o" ;; bfd_i386_arch) ta="$ta i386-dis.o" ;;
bfd_i960_arch) ta="$ta i960-dis.o" ;; bfd_i960_arch) ta="$ta i960-dis.o" ;;
bfd_m68k_arch) ta="$ta m68k-dis.o" ;; bfd_m68k_arch) ta="$ta m68k-dis.o m68k-opc.o" ;;
bfd_m88k_arch) ta="$ta m88k-dis.o" ;; bfd_m88k_arch) ta="$ta m88k-dis.o" ;;
bfd_mips_arch) ta="$ta mips-dis.o mips-opc.o" ;; bfd_mips_arch) ta="$ta mips-dis.o mips-opc.o" ;;
bfd_ns32k_arch) ta="$ta ns32k-dis.o" ;; bfd_ns32k_arch) ta="$ta ns32k-dis.o" ;;
@ -110,9 +120,10 @@ if [ x${all_targets} = xfalse ]; then
bfd_vax_arch) ;; bfd_vax_arch) ;;
bfd_we32k_arch) ;; bfd_we32k_arch) ;;
bfd_z8k_arch) ta="$ta z8k-dis.o" ;; bfd_z8k_arch) ta="$ta z8k-dis.o" ;;
bfd_w65_arch) ta="$ta w65-dis.o" ;;
"") ;; "") ;;
*) echo "*** unknown target architecture $arch" 1>&2; exit 1 ;; *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
esac esac
done done
@ -136,14 +147,15 @@ if [ x${all_targets} = xfalse ]; then
done done
archdefs="$f" archdefs="$f"
echo "ARCHDEFS = $archdefs" >> Makefile.2 BFD_MACHINES="$ta"
echo "BFD_MACHINES = $ta" >> Makefile.2
else # all_targets is true else # all_targets is true
echo 'ARCHDEFS = -DARCH_all' >> Makefile.2 archdefs=-DARCH_all
echo 'BFD_MACHINES = $(ALL_MACHINES)' >> Makefile.2 BFD_MACHINES='$(ALL_MACHINES)'
fi # all_targets is true fi
cat Makefile.tmp >> Makefile.2 AC_SUBST(archdefs)
rm -f Makefile.tmp AC_SUBST(BFD_MACHINES)
mv Makefile.2 Makefile
AC_CONFIG_HEADER(config.h:config.in)
AC_OUTPUT(Makefile)