* expr.h (expr_build_dot): Declare.
[deliverable/binutils-gdb.git] / opcodes / configure.in
CommitLineData
1daed53f
ILT
1dnl Process this file with autoconf to produce a configure script.
2dnl
3
80c396f6
DE
4dnl Default to a non shared library. This may be overridden by the
5dnl configure option --enable-shared. The divert stuff is a hack
6dnl to set the variable before argument parsing is done.
7divert(AC_DIVERSION_INIT)
8enable_shared=no
9divert(-1)
10
e3659cbf 11AC_PREREQ(2.5)
c62d1274 12AC_INIT(z8k-dis.c)
1daed53f
ILT
13
14AC_CANONICAL_SYSTEM
15
16AM_INIT_AUTOMAKE(opcodes, 2.8.2)
17
80c396f6
DE
18dnl These must be called before AM_PROG_LIBTOOL, because it may want
19dnl to call AC_CHECK_PROG.
20AC_CHECK_TOOL(AR, ar)
21AC_CHECK_TOOL(RANLIB, ranlib, :)
22
1daed53f 23AM_PROG_LIBTOOL
c62d1274
ILT
24
25AC_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 ;;
32esac])dnl
e0bf1022
ILT
33AC_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]) ;;
39esac])dnl
c62d1274 40
1daed53f 41AM_CONFIG_HEADER(config.h:config.in)
f98c3369 42
f98c3369
ILT
43if test -z "$target" ; then
44 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
45fi
46bcd2ec 46AC_ARG_PROGRAM
f98c3369 47
1daed53f
ILT
48AM_MAINTAINER_MODE
49AM_CYGWIN32
50AM_EXEEXT
c62d1274 51
1daed53f 52# host-specific stuff:
e0bf1022 53
46bcd2ec
ILT
54AC_PROG_CC
55
40db6118
ILT
56. ${srcdir}/../bfd/configure.host
57
40db6118 58AC_SUBST(HDEFINES)
1daed53f 59AM_PROG_INSTALL
e0bf1022 60
9c03036a 61AC_CHECK_HEADERS(string.h strings.h stdlib.h)
c62d1274 62
bfc10abe
DE
63# start-sanitize-cygnus
64use_cgen=no
65if 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
73fi
74if test $use_cgen = yes ; then
75 AC_CHECK_PROG(SCHEME, guile, guile, guile)
76fi
77# end-sanitize-cygnus
78
c62d1274 79# target-specific stuff:
d94aca1a
MT
80
81# Canonicalize the secondary target names.
c62d1274 82if test -n "$enable_targets" ; then
d94aca1a
MT
83 for targ in `echo $enable_targets | sed 's/,/ /g'`
84 do
1daed53f 85 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
c62d1274 86 if test -n "$result" ; then
d94aca1a
MT
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
93fi
94
95all_targets=false
c62d1274 96selarchs=
d94aca1a
MT
97for targ in $target $canon_targets
98do
c62d1274 99 if test "x$targ" = "xall" ; then
d94aca1a
MT
100 all_targets=true
101 else
c62d1274
ILT
102 . $srcdir/../bfd/config.bfd
103 selarchs="$selarchs $targ_archs"
d94aca1a 104 fi
c62d1274 105done
d94aca1a 106
9c03036a
DE
107# Utility var, documents generic cgen support files.
108
1daed53f 109cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
9c03036a 110
d94aca1a
MT
111# We don't do any links based on the target system, just makefile config.
112
c62d1274 113if test x${all_targets} = xfalse ; then
d94aca1a
MT
114
115 # Target architecture .o files.
116 ta=
117
c62d1274 118 for arch in $selarchs
d94aca1a
MT
119 do
120 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
121 archdefs="$archdefs -DARCH_$ad"
122 case "$arch" in
1daed53f 123 bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
e0bf1022 124 bfd_alliant_arch) ;;
1daed53f 125 bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
1daed53f 126 bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
1daed53f 127 bfd_arm_arch) ta="$ta arm-dis.lo" ;;
e0bf1022 128 bfd_convex_arch) ;;
1daed53f 129 bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
b2e3f844 130# start-sanitize-d30v
1daed53f 131 bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
b2e3f844 132# end-sanitize-d30v
1daed53f
ILT
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" ;;
f98c3369 137 bfd_i860_arch) ;;
1daed53f
ILT
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" ;;
e0bf1022
ILT
147 bfd_pyramid_arch) ;;
148 bfd_romp_arch) ;;
1daed53f
ILT
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" ;;
e0bf1022 152 bfd_tahoe_arch) ;;
b2e3f844 153# start-sanitize-tic80
1daed53f 154 bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
b2e3f844 155# end-sanitize-tic80
80c396f6 156# start-sanitize-sky
37130f11 157 bfd_dvp_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo dvp-dis.lo dvp-opc.lo" ;;
80c396f6 158# end-sanitize-sky
1daed53f 159 bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
010916c2
NC
160# start-sanitize-v850e
161 bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
80c396f6 162 bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
010916c2 163# end-sanitize-v850e
d94aca1a 164 bfd_vax_arch) ;;
1daed53f 165 bfd_w65_arch) ta="$ta w65-dis.lo" ;;
d94aca1a 166 bfd_we32k_arch) ;;
1daed53f 167 bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
d94aca1a
MT
168
169 "") ;;
c62d1274 170 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
d94aca1a
MT
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
c62d1274 194 BFD_MACHINES="$ta"
d94aca1a
MT
195
196else # all_targets is true
c62d1274
ILT
197 archdefs=-DARCH_all
198 BFD_MACHINES='$(ALL_MACHINES)'
199fi
200
201AC_SUBST(archdefs)
202AC_SUBST(BFD_MACHINES)
d94aca1a 203
1daed53f 204AC_OUTPUT(Makefile)
This page took 0.132599 seconds and 4 git commands to generate.