Moved divh opcodes next to each other.
[deliverable/binutils-gdb.git] / opcodes / configure.in
CommitLineData
1daed53f
ILT
1dnl Process this file with autoconf to produce a configure script.
2dnl
3
e3659cbf 4AC_PREREQ(2.5)
c62d1274 5AC_INIT(z8k-dis.c)
1daed53f
ILT
6
7AC_CANONICAL_SYSTEM
8
9AM_INIT_AUTOMAKE(opcodes, 2.8.2)
10
2b0c643b
DE
11dnl Default to a non shared library. This may be overridden by the
12dnl configure option --enable-shared.
13enable_shared=no
1daed53f 14AM_PROG_LIBTOOL
c62d1274
ILT
15
16AC_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')
20 ;;
21 no) enable_targets= ;;
22 *) enable_targets=$enableval ;;
23esac])dnl
e0bf1022
ILT
24AC_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]) ;;
30esac])dnl
c62d1274 31
1daed53f 32AM_CONFIG_HEADER(config.h:config.in)
f98c3369 33
f98c3369
ILT
34if test -z "$target" ; then
35 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
36fi
46bcd2ec 37AC_ARG_PROGRAM
f98c3369 38
1daed53f
ILT
39AM_MAINTAINER_MODE
40AM_CYGWIN32
41AM_EXEEXT
c62d1274 42
1daed53f 43# host-specific stuff:
e0bf1022 44
46bcd2ec
ILT
45AC_PROG_CC
46
40db6118
ILT
47. ${srcdir}/../bfd/configure.host
48
40db6118 49AC_SUBST(HDEFINES)
7919b9ec
ILT
50AC_CHECK_TOOL(AR, ar)
51AC_CHECK_TOOL(RANLIB, ranlib, :)
1daed53f 52AM_PROG_INSTALL
e0bf1022 53
9c03036a 54AC_CHECK_HEADERS(string.h strings.h stdlib.h)
c62d1274 55
c62d1274 56# target-specific stuff:
d94aca1a
MT
57
58# Canonicalize the secondary target names.
c62d1274 59if test -n "$enable_targets" ; then
d94aca1a
MT
60 for targ in `echo $enable_targets | sed 's/,/ /g'`
61 do
1daed53f 62 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
c62d1274 63 if test -n "$result" ; then
d94aca1a
MT
64 canon_targets="$canon_targets $result"
65 else
66 # Allow targets that config.sub doesn't recognize, like "all".
67 canon_targets="$canon_targets $targ"
68 fi
69 done
70fi
71
72all_targets=false
c62d1274 73selarchs=
d94aca1a
MT
74for targ in $target $canon_targets
75do
c62d1274 76 if test "x$targ" = "xall" ; then
d94aca1a
MT
77 all_targets=true
78 else
c62d1274
ILT
79 . $srcdir/../bfd/config.bfd
80 selarchs="$selarchs $targ_archs"
d94aca1a 81 fi
c62d1274 82done
d94aca1a 83
9c03036a
DE
84# Utility var, documents generic cgen support files.
85
1daed53f 86cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
9c03036a 87
d94aca1a
MT
88# We don't do any links based on the target system, just makefile config.
89
c62d1274 90if test x${all_targets} = xfalse ; then
d94aca1a
MT
91
92 # Target architecture .o files.
93 ta=
94
c62d1274 95 for arch in $selarchs
d94aca1a
MT
96 do
97 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
98 archdefs="$archdefs -DARCH_$ad"
99 case "$arch" in
1daed53f 100 bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
e0bf1022 101 bfd_alliant_arch) ;;
1daed53f 102 bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
1daed53f 103 bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
1daed53f 104 bfd_arm_arch) ta="$ta arm-dis.lo" ;;
e0bf1022 105 bfd_convex_arch) ;;
1daed53f 106 bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
b2e3f844 107# start-sanitize-d30v
1daed53f 108 bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
b2e3f844 109# end-sanitize-d30v
1daed53f
ILT
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" ;;
f98c3369 114 bfd_i860_arch) ;;
1daed53f
ILT
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" ;;
e0bf1022
ILT
124 bfd_pyramid_arch) ;;
125 bfd_romp_arch) ;;
1daed53f
ILT
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" ;;
e0bf1022 129 bfd_tahoe_arch) ;;
b2e3f844 130# start-sanitize-tic80
1daed53f 131 bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
b2e3f844 132# end-sanitize-tic80
e7c50cef 133# start-sanitize-v850
1daed53f 134 bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
e7c50cef 135# end-sanitize-v850
d94aca1a 136 bfd_vax_arch) ;;
1daed53f 137 bfd_w65_arch) ta="$ta w65-dis.lo" ;;
d94aca1a 138 bfd_we32k_arch) ;;
1daed53f 139 bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
d94aca1a
MT
140
141 "") ;;
c62d1274 142 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
d94aca1a
MT
143 esac
144 done
145
146 # Weed out duplicate .o files.
147 f=""
148 for i in $ta ; do
149 case " $f " in
150 *" $i "*) ;;
151 *) f="$f $i" ;;
152 esac
153 done
154 ta="$f"
155
156 # And duplicate -D flags.
157 f=""
158 for i in $archdefs ; do
159 case " $f " in
160 *" $i "*) ;;
161 *) f="$f $i" ;;
162 esac
163 done
164 archdefs="$f"
165
c62d1274 166 BFD_MACHINES="$ta"
d94aca1a
MT
167
168else # all_targets is true
c62d1274
ILT
169 archdefs=-DARCH_all
170 BFD_MACHINES='$(ALL_MACHINES)'
171fi
172
173AC_SUBST(archdefs)
174AC_SUBST(BFD_MACHINES)
d94aca1a 175
1daed53f 176AC_OUTPUT(Makefile)
This page took 0.104678 seconds and 4 git commands to generate.