* configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
[deliverable/binutils-gdb.git] / opcodes / configure.in
CommitLineData
e3659cbf 1AC_PREREQ(2.5)
c62d1274
ILT
2AC_INIT(z8k-dis.c)
3# configure.in script for the opcodes library.
7919b9ec 4# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
c62d1274
ILT
5# Written by Cygnus Support.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21AC_ARG_ENABLE(targets,
22[ --enable-targets alternative target configurations],
23[case "${enableval}" in
24 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
25 ;;
26 no) enable_targets= ;;
27 *) enable_targets=$enableval ;;
28esac])dnl
e0bf1022
ILT
29AC_ARG_ENABLE(shared,
30[ --enable-shared build shared opcodes library],
31[case "${enableval}" in
32 yes) shared=true ;;
33 no) shared=false ;;
639b5a09
ILT
34 *opcodes*) shared=true ;;
35 *) shared=false ;;
e0bf1022
ILT
36esac])dnl
37AC_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]) ;;
43esac])dnl
c62d1274 44
f98c3369
ILT
45AC_CONFIG_HEADER(config.h:config.in)
46
47AC_CONFIG_AUX_DIR(`cd $srcdir/..;pwd`)
48AC_CANONICAL_SYSTEM
49if test -z "$target" ; then
50 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
51fi
46bcd2ec 52AC_ARG_PROGRAM
f98c3369 53
c62d1274
ILT
54# host-specific stuff:
55
9b17e0ea 56ALLLIBS='$(TARGETLIB)'
e0bf1022 57PICFLAG=
7919b9ec
ILT
58SHLIB=unused-shlib
59SHLINK=unused-shlink
e0bf1022
ILT
60if test "${shared}" = "true"; then
61 ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
62 PICFLAG=-fpic
63 if test "${commonbfdlib}" = "true"; then
64changequote(,)dnl
65 SHLIB=../bfd/libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/../bfd/VERSION`
66changequote([,])dnl
67 SHLINK=../bfd/libbfd.so
68 else
69changequote(,)dnl
70 SHLIB=libopcodes.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/../bfd/VERSION`
71changequote([,])dnl
72 SHLINK=libopcodes.so
73 fi
74fi
75
46bcd2ec
ILT
76AC_PROG_CC
77
40db6118
ILT
78. ${srcdir}/../bfd/configure.host
79
40db6118 80AC_SUBST(HDEFINES)
7919b9ec
ILT
81AC_CHECK_TOOL(AR, ar)
82AC_CHECK_TOOL(RANLIB, ranlib, :)
40db6118
ILT
83AC_PROG_INSTALL
84
e0bf1022
ILT
85if test "${shared}" = "true"; then
86 if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
87 AC_MSG_WARN([opcodes --enable-shared only supported when using gcc])
88 shared=false
7919b9ec 89 ALLLIBS='$(TARGETLIB)'
e0bf1022 90 PICFLAG=
7919b9ec 91 SHLIB=unused-shlib
e0bf1022
ILT
92 fi
93fi
94
95AC_SUBST(ALLLIBS)
96AC_SUBST(PICFLAG)
97AC_SUBST(SHLIB)
98AC_SUBST(SHLIB_CC)
99AC_SUBST(SHLIB_CFLAGS)
100if test "${commonbfdlib}" = "true"; then
101 COMMON_SHLIB=yes
7919b9ec
ILT
102 # Rebuild the shared library if libiberty or libbfd changes.
103 SHLIB_DEP="../libiberty/libiberty.a ../bfd/libbfd.a"
e3659cbf 104 BFD_PICLIST=../bfd/piclist
e0bf1022
ILT
105else
106 COMMON_SHLIB=
7919b9ec 107 SHLIB_DEP=
e3659cbf 108 BFD_PICLIST=
e0bf1022
ILT
109fi
110AC_SUBST(COMMON_SHLIB)
7919b9ec 111AC_SUBST(SHLIB_DEP)
e3659cbf 112AC_SUBST(BFD_PICLIST)
e0bf1022 113AC_SUBST(SHLINK)
e7c50cef 114AC_SUBST(INSTALL_SHLIB)
e0bf1022 115
9c03036a 116AC_CHECK_HEADERS(string.h strings.h stdlib.h)
c62d1274 117
c62d1274 118# target-specific stuff:
d94aca1a
MT
119
120# Canonicalize the secondary target names.
c62d1274 121if test -n "$enable_targets" ; then
d94aca1a
MT
122 for targ in `echo $enable_targets | sed 's/,/ /g'`
123 do
c62d1274
ILT
124 result=`$ac_config_sub $targ 2>/dev/null`
125 if test -n "$result" ; then
d94aca1a
MT
126 canon_targets="$canon_targets $result"
127 else
128 # Allow targets that config.sub doesn't recognize, like "all".
129 canon_targets="$canon_targets $targ"
130 fi
131 done
132fi
133
134all_targets=false
c62d1274 135selarchs=
d94aca1a
MT
136for targ in $target $canon_targets
137do
c62d1274 138 if test "x$targ" = "xall" ; then
d94aca1a
MT
139 all_targets=true
140 else
c62d1274
ILT
141 . $srcdir/../bfd/config.bfd
142 selarchs="$selarchs $targ_archs"
d94aca1a 143 fi
c62d1274 144done
d94aca1a 145
9c03036a
DE
146# Utility var, documents generic cgen support files.
147
148cgen_files="cgen-opc.o cgen-asm.o cgen-dis.o"
149
d94aca1a
MT
150# We don't do any links based on the target system, just makefile config.
151
c62d1274 152if test x${all_targets} = xfalse ; then
d94aca1a
MT
153
154 # Target architecture .o files.
155 ta=
156
c62d1274 157 for arch in $selarchs
d94aca1a
MT
158 do
159 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
160 archdefs="$archdefs -DARCH_$ad"
161 case "$arch" in
162 bfd_a29k_arch) ta="$ta a29k-dis.o" ;;
e0bf1022 163 bfd_alliant_arch) ;;
e3659cbf 164 bfd_alpha_arch) ta="$ta alpha-dis.o alpha-opc.o" ;;
c62d1274
ILT
165# start-sanitize-arc
166 bfd_arc_arch) ta="$ta arc-dis.o arc-opc.o" ;;
167# end-sanitize-arc
d94aca1a 168 bfd_arm_arch) ta="$ta arm-dis.o" ;;
e0bf1022 169 bfd_convex_arch) ;;
e3659cbf 170 bfd_d10v_arch) ta="$ta d10v-dis.o d10v-opc.o" ;;
b2e3f844
MH
171# start-sanitize-d30v
172 bfd_d30v_arch) ta="$ta d30v-dis.o d30v-opc.o" ;;
173# end-sanitize-d30v
d94aca1a
MT
174 bfd_h8300_arch) ta="$ta h8300-dis.o" ;;
175 bfd_h8500_arch) ta="$ta h8500-dis.o" ;;
176 bfd_hppa_arch) ta="$ta hppa-dis.o" ;;
177 bfd_i386_arch) ta="$ta i386-dis.o" ;;
f98c3369 178 bfd_i860_arch) ;;
d94aca1a 179 bfd_i960_arch) ta="$ta i960-dis.o" ;;
9c03036a 180 bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.o m32r-asm.o m32r-dis.o" ;;
c62d1274 181 bfd_m68k_arch) ta="$ta m68k-dis.o m68k-opc.o" ;;
d94aca1a 182 bfd_m88k_arch) ta="$ta m88k-dis.o" ;;
b2e3f844
MH
183 bfd_mips_arch) ta="$ta mips-dis.o mips-opc.o mips16-opc.o" ;;
184 bfd_mn10200_arch) ta="$ta mn10200-dis.o mn10200-opc.o" ;;
185 bfd_mn10300_arch) ta="$ta mn10300-dis.o mn10300-opc.o" ;;
d94aca1a
MT
186 bfd_ns32k_arch) ta="$ta ns32k-dis.o" ;;
187 bfd_powerpc_arch) ta="$ta ppc-dis.o ppc-opc.o" ;;
e0bf1022
ILT
188 bfd_pyramid_arch) ;;
189 bfd_romp_arch) ;;
d94aca1a 190 bfd_rs6000_arch) ta="$ta ppc-dis.o ppc-opc.o" ;;
e0bf1022 191 bfd_sh_arch) ta="$ta sh-dis.o" ;;
d94aca1a 192 bfd_sparc_arch) ta="$ta sparc-dis.o sparc-opc.o" ;;
e0bf1022 193 bfd_tahoe_arch) ;;
b2e3f844
MH
194# start-sanitize-tic80
195 bfd_tic80_arch) ta="$ta tic80-dis.o tic80-opc.o" ;;
196# end-sanitize-tic80
e7c50cef
JL
197# start-sanitize-v850
198 bfd_v850_arch) ta="$ta v850-opc.o v850-dis.o" ;;
199# end-sanitize-v850
d94aca1a 200 bfd_vax_arch) ;;
e0bf1022 201 bfd_w65_arch) ta="$ta w65-dis.o" ;;
d94aca1a
MT
202 bfd_we32k_arch) ;;
203 bfd_z8k_arch) ta="$ta z8k-dis.o" ;;
204
205 "") ;;
c62d1274 206 *) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
d94aca1a
MT
207 esac
208 done
209
210 # Weed out duplicate .o files.
211 f=""
212 for i in $ta ; do
213 case " $f " in
214 *" $i "*) ;;
215 *) f="$f $i" ;;
216 esac
217 done
218 ta="$f"
219
220 # And duplicate -D flags.
221 f=""
222 for i in $archdefs ; do
223 case " $f " in
224 *" $i "*) ;;
225 *) f="$f $i" ;;
226 esac
227 done
228 archdefs="$f"
229
c62d1274 230 BFD_MACHINES="$ta"
d94aca1a
MT
231
232else # all_targets is true
c62d1274
ILT
233 archdefs=-DARCH_all
234 BFD_MACHINES='$(ALL_MACHINES)'
235fi
236
237AC_SUBST(archdefs)
238AC_SUBST(BFD_MACHINES)
d94aca1a 239
f98c3369
ILT
240AC_OUTPUT(Makefile,
241[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.102243 seconds and 4 git commands to generate.