1 dnl Process this file with autoconf to produce a configure script.
9 AM_INIT_AUTOMAKE(opcodes, 2.8.2)
11 dnl Default to a non shared library. This may be overridden by the
12 dnl configure option --enable-shared.
16 AC_ARG_ENABLE(targets,
17 [ --enable-targets alternative target configurations],
18 [case "${enableval}" in
19 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
21 no) enable_targets= ;;
22 *) enable_targets=$enableval ;;
24 AC_ARG_ENABLE(commonbfdlib,
25 [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
26 [case "${enableval}" in
27 yes) commonbfdlib=true ;;
28 no) commonbfdlib=false ;;
29 *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
32 AM_CONFIG_HEADER(config.h:config.in)
34 if test -z "$target" ; then
35 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
43 # host-specific stuff:
47 . ${srcdir}/../bfd/configure.host
51 AC_CHECK_TOOL(RANLIB, ranlib, :)
54 AC_CHECK_HEADERS(string.h strings.h stdlib.h)
56 # target-specific stuff:
58 # Canonicalize the secondary target names.
59 if test -n "$enable_targets" ; then
60 for targ in `echo $enable_targets | sed 's/,/ /g'`
62 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
63 if test -n "$result" ; then
64 canon_targets="$canon_targets $result"
66 # Allow targets that config.sub doesn't recognize, like "all".
67 canon_targets="$canon_targets $targ"
74 for targ in $target $canon_targets
76 if test "x$targ" = "xall" ; then
79 . $srcdir/../bfd/config.bfd
80 selarchs="$selarchs $targ_archs"
84 # Utility var, documents generic cgen support files.
86 cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
88 # We don't do any links based on the target system, just makefile config.
90 if test x${all_targets} = xfalse ; then
92 # Target architecture .o files.
97 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
98 archdefs="$archdefs -DARCH_$ad"
100 bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
102 bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
103 bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
104 bfd_arm_arch) ta="$ta arm-dis.lo" ;;
106 bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
107 # start-sanitize-d30v
108 bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
110 bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
111 bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
112 bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
113 bfd_i386_arch) ta="$ta i386-dis.lo" ;;
115 bfd_i960_arch) ta="$ta i960-dis.lo" ;;
116 bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.lo m32r-asm.lo m32r-dis.lo" ;;
117 bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
118 bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
119 bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
120 bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
121 bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
122 bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
123 bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
126 bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
127 bfd_sh_arch) ta="$ta sh-dis.lo" ;;
128 bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
130 # start-sanitize-tic80
131 bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
133 # start-sanitize-v850
134 bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
137 bfd_w65_arch) ta="$ta w65-dis.lo" ;;
139 bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
142 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
146 # Weed out duplicate .o files.
156 # And duplicate -D flags.
158 for i in $archdefs ; do
168 else # all_targets is true
170 BFD_MACHINES='$(ALL_MACHINES)'
174 AC_SUBST(BFD_MACHINES)