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