1 dnl Process this file with autoconf to produce a configure script.
9 AM_INIT_AUTOMAKE(opcodes, 2.8.2)
13 AC_ARG_ENABLE(targets,
14 [ --enable-targets alternative target configurations],
15 [case "${enableval}" in
16 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
18 no) enable_targets= ;;
19 *) enable_targets=$enableval ;;
21 AC_ARG_ENABLE(commonbfdlib,
22 [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
23 [case "${enableval}" in
24 yes) commonbfdlib=true ;;
25 no) commonbfdlib=false ;;
26 *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
29 AM_CONFIG_HEADER(config.h:config.in)
31 if test -z "$target" ; then
32 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
40 # host-specific stuff:
44 . ${srcdir}/../bfd/configure.host
48 AC_CHECK_TOOL(RANLIB, ranlib, :)
51 AC_CHECK_HEADERS(string.h strings.h stdlib.h)
53 # target-specific stuff:
55 # Canonicalize the secondary target names.
56 if test -n "$enable_targets" ; then
57 for targ in `echo $enable_targets | sed 's/,/ /g'`
59 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
60 if test -n "$result" ; then
61 canon_targets="$canon_targets $result"
63 # Allow targets that config.sub doesn't recognize, like "all".
64 canon_targets="$canon_targets $targ"
71 for targ in $target $canon_targets
73 if test "x$targ" = "xall" ; then
76 . $srcdir/../bfd/config.bfd
77 selarchs="$selarchs $targ_archs"
81 # Utility var, documents generic cgen support files.
83 cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
85 # We don't do any links based on the target system, just makefile config.
87 if test x${all_targets} = xfalse ; then
89 # Target architecture .o files.
94 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
95 archdefs="$archdefs -DARCH_$ad"
97 bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
99 bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
101 bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
103 bfd_arm_arch) ta="$ta arm-dis.lo" ;;
105 bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
106 # start-sanitize-d30v
107 bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
109 bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
110 bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
111 bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
112 bfd_i386_arch) ta="$ta i386-dis.lo" ;;
114 bfd_i960_arch) ta="$ta i960-dis.lo" ;;
115 bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.lo m32r-asm.lo m32r-dis.lo" ;;
116 bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
117 bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
118 bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
119 bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
120 bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
121 bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
122 bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
125 bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
126 bfd_sh_arch) ta="$ta sh-dis.lo" ;;
127 bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
129 # start-sanitize-tic80
130 bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
132 # start-sanitize-v850
133 bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
136 bfd_w65_arch) ta="$ta w65-dis.lo" ;;
138 bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
141 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
145 # Weed out duplicate .o files.
155 # And duplicate -D flags.
157 for i in $archdefs ; do
167 else # all_targets is true
169 BFD_MACHINES='$(ALL_MACHINES)'
173 AC_SUBST(BFD_MACHINES)