Thu Nov 12 19:21:57 1998 Dave Brolley <brolley@cygnus.com>
[deliverable/binutils-gdb.git] / opcodes / configure.in
index fbbd94ee66e41b46ce21729560ab5acdfd5e50e5..f7a25a95253aebf9b0caccd92cd1e6d0eec24d40 100644 (file)
@@ -1,25 +1,30 @@
 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,
@@ -53,6 +58,9 @@ AM_EXEEXT
 
 AC_PROG_CC
 
+ALL_LINGUAS=
+CY_GNU_GETTEXT
+
 . ${srcdir}/../bfd/configure.host
 
 AC_SUBST(HDEFINES)
@@ -61,21 +69,48 @@ AM_PROG_INSTALL
 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
+cgen_maint=no
+# Default is to use one in build tree.
+cgen=../cgen/cgen
+cgendir='$(srcdir)/../cgen'
+# Having --enable-maintainer-mode take arguments is another way to go.
+# ??? One can argue --with is more appropriate if one wants to specify
+# a directory name, but what we're doing here is an enable/disable kind
+# of thing and specifying both --enable and --with is klunky.
+# If you reeely want this to be --with, go ahead and change it.
+AC_ARG_ENABLE(cgen-maint,
+[  --enable-cgen-maint[=dir]    build cgen generated files],
+[case "${enableval}" in
+  yes) cgen_maint=yes ;;
+  no)  cgen_maint=no ;;
+  *)
+       # argument is cgen install directory (not implemented yet).
+       # Having a `share' directory might be more appropriate for the .scm,
+       # .cpu, etc. files.
+       cgen_maint=yes
+       cgendir=${cgen_maint}/lib/cgen
+       cgen=${cgendir}/bin/cgen
+       ;;
+esac])dnl
+AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} = xyes)
+AC_SUBST(cgendir)
+AC_SUBST(cgen)
 # end-sanitize-cygnus
 
+# Horrible hacks to build DLLs on Windows.
+WIN32LDFLAGS=
+WIN32LIBADD=
+case "${host}" in
+*-*-cygwin*)
+  if test "$enable_shared" = "yes"; then
+    WIN32LDFLAGS="-no-undefined"
+    WIN32LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
+  fi
+  ;;
+esac
+AC_SUBST(WIN32LDFLAGS)
+AC_SUBST(WIN32LIBADD)
+
 # target-specific stuff:
 
 # Canonicalize the secondary target names.
@@ -127,9 +162,8 @@ if test x${all_targets} = xfalse ; then
        bfd_arm_arch)           ta="$ta arm-dis.lo" ;;
        bfd_convex_arch)        ;;
        bfd_d10v_arch)          ta="$ta d10v-dis.lo d10v-opc.lo" ;;
-# start-sanitize-d30v
        bfd_d30v_arch)          ta="$ta d30v-dis.lo d30v-opc.lo" ;;
-# end-sanitize-d30v
+       bfd_fr30_arch)          ta="$ta $cgen_files fr30-opc.lo fr30-asm.lo fr30-dis.lo" ;;
        bfd_h8300_arch)         ta="$ta h8300-dis.lo" ;;
        bfd_h8500_arch)         ta="$ta h8500-dis.lo" ;;
        bfd_hppa_arch)          ta="$ta hppa-dis.lo" ;;
@@ -150,6 +184,7 @@ if test x${all_targets} = xfalse ; then
        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
@@ -161,7 +196,7 @@ if test x${all_targets} = xfalse ; then
        bfd_v850e_arch)         ta="$ta v850-opc.lo v850-dis.lo" ;;
        bfd_v850ea_arch)        ta="$ta v850-opc.lo v850-dis.lo" ;;
 # end-sanitize-v850e
-       bfd_vax_arch)           ;;
+       bfd_vax_arch)           ta="$ta vax-dis.lo" ;;
        bfd_w65_arch)           ta="$ta w65-dis.lo" ;;
        bfd_we32k_arch)         ;;
        bfd_z8k_arch)           ta="$ta z8k-dis.lo" ;;
@@ -201,4 +236,5 @@ fi
 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])
This page took 0.024424 seconds and 4 git commands to generate.