* dvp-dis.c, dvp-opc.c: New files.
[deliverable/binutils-gdb.git] / opcodes / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3
4 dnl Default to a non shared library. This may be overridden by the
5 dnl configure option --enable-shared. The divert stuff is a hack
6 dnl to set the variable before argument parsing is done.
7 divert(AC_DIVERSION_INIT)
8 enable_shared=no
9 divert(-1)
10
11 AC_PREREQ(2.5)
12 AC_INIT(z8k-dis.c)
13
14 AC_CANONICAL_SYSTEM
15
16 AM_INIT_AUTOMAKE(opcodes, 2.8.2)
17
18 dnl These must be called before AM_PROG_LIBTOOL, because it may want
19 dnl to call AC_CHECK_PROG.
20 AC_CHECK_TOOL(AR, ar)
21 AC_CHECK_TOOL(RANLIB, ranlib, :)
22
23 AM_PROG_LIBTOOL
24
25 AC_ARG_ENABLE(targets,
26 [ --enable-targets alternative target configurations],
27 [case "${enableval}" in
28 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
29 ;;
30 no) enable_targets= ;;
31 *) enable_targets=$enableval ;;
32 esac])dnl
33 AC_ARG_ENABLE(commonbfdlib,
34 [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
35 [case "${enableval}" in
36 yes) commonbfdlib=true ;;
37 no) commonbfdlib=false ;;
38 *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
39 esac])dnl
40
41 AM_CONFIG_HEADER(config.h:config.in)
42
43 if test -z "$target" ; then
44 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
45 fi
46 AC_ARG_PROGRAM
47
48 AM_MAINTAINER_MODE
49 AM_CYGWIN32
50 AM_EXEEXT
51
52 # host-specific stuff:
53
54 AC_PROG_CC
55
56 . ${srcdir}/../bfd/configure.host
57
58 AC_SUBST(HDEFINES)
59 AM_PROG_INSTALL
60
61 AC_CHECK_HEADERS(string.h strings.h stdlib.h)
62
63 # start-sanitize-cygnus
64 use_cgen=no
65 if test ${USE_MAINTAINER_MODE} = yes ; then
66 for targ in $target $canon_targets
67 do
68 case $targ in
69 all) use_cgen=yes ;;
70 m32r-*-*) use_cgen=yes ;;
71 esac
72 done
73 fi
74 if test $use_cgen = yes ; then
75 AC_CHECK_PROG(SCHEME, guile, guile, guile)
76 fi
77 # end-sanitize-cygnus
78
79 # target-specific stuff:
80
81 # Canonicalize the secondary target names.
82 if test -n "$enable_targets" ; then
83 for targ in `echo $enable_targets | sed 's/,/ /g'`
84 do
85 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
86 if test -n "$result" ; then
87 canon_targets="$canon_targets $result"
88 else
89 # Allow targets that config.sub doesn't recognize, like "all".
90 canon_targets="$canon_targets $targ"
91 fi
92 done
93 fi
94
95 all_targets=false
96 selarchs=
97 for targ in $target $canon_targets
98 do
99 if test "x$targ" = "xall" ; then
100 all_targets=true
101 else
102 . $srcdir/../bfd/config.bfd
103 selarchs="$selarchs $targ_archs"
104 fi
105 done
106
107 # Utility var, documents generic cgen support files.
108
109 cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
110
111 # We don't do any links based on the target system, just makefile config.
112
113 if test x${all_targets} = xfalse ; then
114
115 # Target architecture .o files.
116 ta=
117
118 for arch in $selarchs
119 do
120 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
121 archdefs="$archdefs -DARCH_$ad"
122 case "$arch" in
123 bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
124 bfd_alliant_arch) ;;
125 bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
126 bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
127 bfd_arm_arch) ta="$ta arm-dis.lo" ;;
128 bfd_convex_arch) ;;
129 bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
130 # start-sanitize-d30v
131 bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
132 # end-sanitize-d30v
133 bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
134 bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
135 bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
136 bfd_i386_arch) ta="$ta i386-dis.lo" ;;
137 bfd_i860_arch) ;;
138 bfd_i960_arch) ta="$ta i960-dis.lo" ;;
139 bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.lo m32r-asm.lo m32r-dis.lo" ;;
140 bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
141 bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
142 bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
143 bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
144 bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
145 bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
146 bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
147 bfd_pyramid_arch) ;;
148 bfd_romp_arch) ;;
149 bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
150 bfd_sh_arch) ta="$ta sh-dis.lo" ;;
151 bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
152 bfd_tahoe_arch) ;;
153 # start-sanitize-tic80
154 bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
155 # end-sanitize-tic80
156 # start-sanitize-sky
157 bfd_dvp_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo dvp-dis.lo dvp-opc.lo" ;;
158 # end-sanitize-sky
159 bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
160 # start-sanitize-v850e
161 bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
162 bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
163 # end-sanitize-v850e
164 bfd_vax_arch) ;;
165 bfd_w65_arch) ta="$ta w65-dis.lo" ;;
166 bfd_we32k_arch) ;;
167 bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
168
169 "") ;;
170 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
171 esac
172 done
173
174 # Weed out duplicate .o files.
175 f=""
176 for i in $ta ; do
177 case " $f " in
178 *" $i "*) ;;
179 *) f="$f $i" ;;
180 esac
181 done
182 ta="$f"
183
184 # And duplicate -D flags.
185 f=""
186 for i in $archdefs ; do
187 case " $f " in
188 *" $i "*) ;;
189 *) f="$f $i" ;;
190 esac
191 done
192 archdefs="$f"
193
194 BFD_MACHINES="$ta"
195
196 else # all_targets is true
197 archdefs=-DARCH_all
198 BFD_MACHINES='$(ALL_MACHINES)'
199 fi
200
201 AC_SUBST(archdefs)
202 AC_SUBST(BFD_MACHINES)
203
204 AC_OUTPUT(Makefile)
This page took 0.037002 seconds and 5 git commands to generate.