Internationalised the opcodes library.
[deliverable/binutils-gdb.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 # We currently only use the version number for the name of any shared
10 # library. For user convenience, we always use the same version
11 # number that BFD is using.
12 changequote(,)dnl
13 BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[ ]//g' -e 's/^.*,\(.*\)).*$/\1/p'`
14 changequote([,])dnl
15
16 AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION})
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 dnl Default to a non shared library. This may be overridden by the
24 dnl configure option --enable-shared.
25 AM_DISABLE_SHARED
26
27 AM_PROG_LIBTOOL
28
29 AC_ARG_ENABLE(targets,
30 [ --enable-targets alternative target configurations],
31 [case "${enableval}" in
32 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
33 ;;
34 no) enable_targets= ;;
35 *) enable_targets=$enableval ;;
36 esac])dnl
37 AC_ARG_ENABLE(commonbfdlib,
38 [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
39 [case "${enableval}" in
40 yes) commonbfdlib=true ;;
41 no) commonbfdlib=false ;;
42 *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
43 esac])dnl
44
45 AM_CONFIG_HEADER(config.h:config.in)
46
47 if test -z "$target" ; then
48 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
49 fi
50 AC_ARG_PROGRAM
51
52 ALL_LINGUAS=
53 CY_GNU_GETTEXT
54
55 AM_MAINTAINER_MODE
56 AM_CYGWIN32
57 AM_EXEEXT
58
59 # host-specific stuff:
60
61 AC_PROG_CC
62
63 . ${srcdir}/../bfd/configure.host
64
65 AC_SUBST(HDEFINES)
66 AM_PROG_INSTALL
67
68 AC_CHECK_HEADERS(string.h strings.h stdlib.h)
69
70 # start-sanitize-cygnus
71 use_cgen=no
72 if test ${USE_MAINTAINER_MODE} = yes ; then
73 for targ in $target $canon_targets
74 do
75 case $targ in
76 all) use_cgen=yes ;;
77 m32r-*-*) use_cgen=yes ;;
78 esac
79 done
80 fi
81 if test $use_cgen = yes ; then
82 AC_CHECK_PROG(SCHEME, guile, guile, guile)
83 fi
84 # end-sanitize-cygnus
85
86 # Horrible hacks to build DLLs on Windows.
87 WIN32LDFLAGS=
88 WIN32LIBADD=
89 case "${host}" in
90 *-*-cygwin32*)
91 if test "$enable_shared" = "yes"; then
92 WIN32LDFLAGS="-no-undefined"
93 WIN32LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -lcygwin"
94 fi
95 ;;
96 esac
97 AC_SUBST(WIN32LDFLAGS)
98 AC_SUBST(WIN32LIBADD)
99
100 # target-specific stuff:
101
102 # Canonicalize the secondary target names.
103 if test -n "$enable_targets" ; then
104 for targ in `echo $enable_targets | sed 's/,/ /g'`
105 do
106 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
107 if test -n "$result" ; then
108 canon_targets="$canon_targets $result"
109 else
110 # Allow targets that config.sub doesn't recognize, like "all".
111 canon_targets="$canon_targets $targ"
112 fi
113 done
114 fi
115
116 all_targets=false
117 selarchs=
118 for targ in $target $canon_targets
119 do
120 if test "x$targ" = "xall" ; then
121 all_targets=true
122 else
123 . $srcdir/../bfd/config.bfd
124 selarchs="$selarchs $targ_archs"
125 fi
126 done
127
128 # Utility var, documents generic cgen support files.
129
130 cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo"
131
132 # We don't do any links based on the target system, just makefile config.
133
134 if test x${all_targets} = xfalse ; then
135
136 # Target architecture .o files.
137 ta=
138
139 for arch in $selarchs
140 do
141 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
142 archdefs="$archdefs -DARCH_$ad"
143 case "$arch" in
144 bfd_a29k_arch) ta="$ta a29k-dis.lo" ;;
145 bfd_alliant_arch) ;;
146 bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
147 bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;;
148 bfd_arm_arch) ta="$ta arm-dis.lo" ;;
149 bfd_convex_arch) ;;
150 bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
151 # start-sanitize-d30v
152 bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;;
153 # end-sanitize-d30v
154 bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
155 bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
156 bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
157 bfd_i386_arch) ta="$ta i386-dis.lo" ;;
158 bfd_i860_arch) ;;
159 bfd_i960_arch) ta="$ta i960-dis.lo" ;;
160 bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.lo m32r-asm.lo m32r-dis.lo" ;;
161 bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;;
162 bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
163 bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
164 bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
165 bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
166 bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
167 bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
168 bfd_pyramid_arch) ;;
169 bfd_romp_arch) ;;
170 bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
171 bfd_sh_arch) ta="$ta sh-dis.lo" ;;
172 bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
173 bfd_tahoe_arch) ;;
174 bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
175 # start-sanitize-tic80
176 bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
177 # end-sanitize-tic80
178 # start-sanitize-sky
179 bfd_dvp_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo dvp-dis.lo dvp-opc.lo" ;;
180 # end-sanitize-sky
181 bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
182 # start-sanitize-v850e
183 bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
184 bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
185 # end-sanitize-v850e
186 bfd_vax_arch) ;;
187 bfd_w65_arch) ta="$ta w65-dis.lo" ;;
188 bfd_we32k_arch) ;;
189 bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
190
191 "") ;;
192 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
193 esac
194 done
195
196 # Weed out duplicate .o files.
197 f=""
198 for i in $ta ; do
199 case " $f " in
200 *" $i "*) ;;
201 *) f="$f $i" ;;
202 esac
203 done
204 ta="$f"
205
206 # And duplicate -D flags.
207 f=""
208 for i in $archdefs ; do
209 case " $f " in
210 *" $i "*) ;;
211 *) f="$f $i" ;;
212 esac
213 done
214 archdefs="$f"
215
216 BFD_MACHINES="$ta"
217
218 else # all_targets is true
219 archdefs=-DARCH_all
220 BFD_MACHINES='$(ALL_MACHINES)'
221 fi
222
223 AC_SUBST(archdefs)
224 AC_SUBST(BFD_MACHINES)
225
226 AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
227 [sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
This page took 0.034314 seconds and 4 git commands to generate.