dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Default to a non shared library. This may be overridden by the
-dnl configure option --enable-shared. The divert stuff is a hack
-dnl to set the variable before argument parsing is done.
-divert(AC_DIVERSION_INIT)
-enable_shared=no
-divert(-1)
-
AC_PREREQ(2.5)
AC_INIT(z8k-dis.c)
AC_CANONICAL_SYSTEM
+AC_ISC_POSIX
+
+# We currently only use the version number for the name of any shared
+# library. For user convenience, we always use the same version
+# number that BFD is using.
+changequote(,)dnl
+BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[ ]//g' -e 's/^.*,\(.*\)).*$/\1/p'`
+changequote([,])dnl
-AM_INIT_AUTOMAKE(opcodes, 2.8.2)
+AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION})
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
+dnl Default to a non shared library. This may be overridden by the
+dnl configure option --enable-shared.
+AM_DISABLE_SHARED
+
AM_PROG_LIBTOOL
AC_ARG_ENABLE(targets,
AC_PROG_CC
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
. ${srcdir}/../bfd/configure.host
AC_SUBST(HDEFINES)
AC_CHECK_HEADERS(string.h strings.h stdlib.h)
+# start-sanitize-cygnus
+use_cgen=no
+if test ${USE_MAINTAINER_MODE} = yes ; then
+ for targ in $target $canon_targets
+ do
+ case $targ in
+ all) use_cgen=yes ;;
+ m32r-*-*) use_cgen=yes ;;
+ esac
+ done
+fi
+if test $use_cgen = yes ; then
+ AC_CHECK_PROG(SCHEME, guile, guile, guile)
+fi
+# end-sanitize-cygnus
+
+# Horrible hacks to build DLLs on Windows.
+WIN32LDFLAGS=
+WIN32LIBADD=
+case "${host}" in
+*-*-cygwin32*)
+ if test "$enable_shared" = "yes"; then
+ WIN32LDFLAGS="-no-undefined"
+ WIN32LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -lcygwin"
+ fi
+ ;;
+esac
+AC_SUBST(WIN32LDFLAGS)
+AC_SUBST(WIN32LIBADD)
+
# target-specific stuff:
# Canonicalize the secondary target names.
bfd_sh_arch) ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
+ bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
# start-sanitize-tic80
bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
# end-sanitize-tic80
# start-sanitize-sky
- bfd_txvu_arch) ta="$ta txvu-dis.lo txvu-opc.lo" ;;
+ bfd_dvp_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo dvp-dis.lo dvp-opc.lo" ;;
# end-sanitize-sky
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
# start-sanitize-v850e
AC_SUBST(archdefs)
AC_SUBST(BFD_MACHINES)
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
+[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])