Rename ms1 to mt, part 1
[deliverable/binutils-gdb.git] / gas / configure.in
index 3bc5a9993173d98e285f8db9f8a9f01e7d1f2146..f0baf767a98f58d5441cf4208299b8404be50fb3 100644 (file)
@@ -22,14 +22,6 @@ AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
 
 AM_PROG_LIBTOOL
 
-user_bfd_gas=
-AC_ARG_ENABLE(bfd-assembler,
-[  --enable-bfd-assembler  use BFD back end for writing object files],
-[case "${enableval}" in
-  yes) need_bfd=yes user_bfd_gas=yes ;;
-  no)  user_bfd_gas=no ;;
-  *)   AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;;
-esac])dnl
 AC_ARG_ENABLE(targets,
 [    targets            alternative target configurations besides the primary],
 [case "${enableval}" in
@@ -48,26 +40,7 @@ esac])dnl
 
 using_cgen=no
 
-build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-AC_ARG_ENABLE(build-warnings,
-[  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[case "${enableval}" in
-  yes) ;;
-  no)  build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
-fi])dnl
-WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
-    WARN_CFLAGS="${build_warnings}"
-fi
-AC_SUBST(WARN_CFLAGS)
+AM_BINUTILS_WARNINGS
 
 # Generate a header file
 AM_CONFIG_HEADER(config.h:config.in)
@@ -161,7 +134,7 @@ for this_target in $target $canon_targets ; do
        AC_DEFINE(AIX_WEAK_SUPPORT, 1,
                  [Define if using AIX 5.2 value for C_WEAKEXT.])
        ;;
-      ppc-*-linux-gnu*)
+      ppc-*-linux-*)
        case "$endian" in
          big)  ;;
          *)    AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
@@ -265,6 +238,9 @@ changequote([,])dnl
          mips*-linux*)
            mips_default_abi=O32_ABI
            ;;
+         mips64*-openbsd*)
+           mips_default_abi=N64_ABI
+           ;;
          *)
            mips_default_abi=NO_ABI
            ;;
@@ -293,19 +269,31 @@ changequote([,])dnl
        *opcodes*) shared_opcodes=true ;;
        *) shared_opcodes=false ;;
        esac
-       if test "${shared_opcodes}" = "true"; then
-         # A shared libopcodes must be linked against libbfd.
-         need_bfd=yes
-       fi
        ;;
     esac
 
     # Any other special object files needed ?
     case ${cpu_type} in
+
+      bfin)
+        echo ${extra_objects} | grep -s "bfin-parse.o"
+        if test $? -ne 0 ; then
+          extra_objects="$extra_objects bfin-parse.o"
+        fi
+
+        echo ${extra_objects} | grep -s "bfin-lex.o"
+        if test $? -ne 0 ; then
+          extra_objects="$extra_objects bfin-lex.o"
+        fi
+        ;;
+
       fr30 | ip2k | iq2000 | m32r | openrisc)
        using_cgen=yes
        ;;
 
+      m32c)
+       using_cgen=yes
+       ;;
       frv)
        using_cgen=yes
        ;;
@@ -333,6 +321,10 @@ changequote([,])dnl
        fi
        ;;
 
+      mt)
+        using_cgen=yes
+       ;;
+
       i386 | s390 | sparc)
        if test $this_target = $target ; then
          AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
@@ -364,17 +356,8 @@ changequote([,])dnl
 # See if we really can support this configuration with the emulation code.
 
     if test $this_target = $target ; then
-      primary_bfd_gas=$bfd_gas
       obj_format=$fmt
       te_file=$em
-
-      if test $bfd_gas = no ; then
-       # Can't support other configurations this way.
-       break
-      fi
-    elif test $bfd_gas = no ; then
-      # Can't support this configuration.
-      break
     fi
 
 # From target name and format, produce a list of supported emulations.
@@ -450,6 +433,7 @@ esac
 cgen_cpu_prefix=""
 if test $using_cgen = yes ; then
   case ${target_cpu} in
+    mt) cgen_cpu_prefix=ms1 ;;
     *) cgen_cpu_prefix=${target_cpu} ;;
   esac
   AC_SUBST(cgen_cpu_prefix)
@@ -468,27 +452,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
   AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
 fi
 
-case ${user_bfd_gas}-${primary_bfd_gas} in
-  yes-yes | no-no)
-    # We didn't override user's choice.
-    ;;
-  no-yes)
-    AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.)
-    ;;
-  no-preferred)
-    primary_bfd_gas=no
-    ;;
-  *-preferred)
-    primary_bfd_gas=yes
-    ;;
-  yes-*)
-    primary_bfd_gas=yes
-    ;;
-  -*)
-    # User specified nothing.
-    ;;
-esac
-
 # Some COFF configurations want these random other flags set.
 case ${obj_format} in
   coff)
@@ -501,8 +464,8 @@ case ${obj_format} in
 esac
 
 # Getting this done right is going to be a bitch.  Each configuration specified
-# with --enable-targets=... should be checked for environment, format, cpu, and
-# bfd_gas setting.
+# with --enable-targets=... should be checked for environment, format, cpu
+# setting.
 #
 # For each configuration, the necessary object file support code must be linked
 # in.  This might be only one, it might be up to four.  The necessary emulation
@@ -545,10 +508,8 @@ if test `set . $formats ; shift ; echo $#` -gt 1 ; then
       ecoff)   AC_DEFINE(OBJ_MAYBE_ECOFF, 1,   [ECOFF support?])   ;;
       elf)     AC_DEFINE(OBJ_MAYBE_ELF, 1,     [ELF support?])     ;;
       generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;;
-      hp300)   AC_DEFINE(OBJ_MAYBE_HP300, 1,   [HP300 support?])   ;;
       ieee)    AC_DEFINE(OBJ_MAYBE_IEEE, 1,    [IEEE support?])    ;;
       som)     AC_DEFINE(OBJ_MAYBE_SOM, 1,     [SOM support?])     ;;
-      vms)     AC_DEFINE(OBJ_MAYBE_VMS, 1,     [VMS support?])     ;;
     esac
     extra_objects="$extra_objects obj-$fmt.o"
   done
@@ -570,12 +531,6 @@ AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.])
 AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION",
                   [Default emulation.])
 
-case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
-  yes-*-coff)  need_bfd=yes ;;
-  no-*-coff)   need_bfd=yes
-               AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;;
-esac
-
 reject_dev_configs=yes
 
 case ${reject_dev_configs}-${dev} in
@@ -591,11 +546,6 @@ AC_SUBST(install_tooldir)
 AC_SUBST(atof)
 dnl AC_SUBST(emulation)
 
-case "${primary_bfd_gas}" in
-  yes) AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?])
-       need_bfd=yes ;;
-esac
-
 # do we need the opcodes library?
 case "${need_opcodes}" in
 yes)
@@ -603,13 +553,9 @@ yes)
   ;;
 esac
 
-case "${need_bfd}" in
-yes)
-  BFDLIB=../bfd/libbfd.la
-  BFDVER_H=../bfd/bfdver.h
-  ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
-  ;;
-esac
+BFDLIB=../bfd/libbfd.la
+BFDVER_H=../bfd/bfdver.h
+ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
 
 AC_SUBST(BFDLIB)
 AC_SUBST(OPCODES_LIB)
@@ -628,7 +574,7 @@ AC_PROG_CC
 AC_PROG_YACC
 AM_PROG_LEX
 
-ALL_LINGUAS="fr tr es"
+ALL_LINGUAS="fr tr es rw"
 CY_GNU_GETTEXT
 
 AM_MAINTAINER_MODE
@@ -692,11 +638,6 @@ gas_test_headers="
 #include <unistd.h>
 #endif
 "
-GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
-GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
 
 # Does errno.h declare errno, or do we have to add a separate declaration
 # for it?
@@ -706,6 +647,23 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [
 #endif
 ])
 
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h,
+[AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
+gas_cv_decl_getopt_unistd_h=yes, gas_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($gas_cv_decl_getopt_unistd_h)
+if test $gas_cv_decl_getopt_unistd_h = yes; then
+  AC_DEFINE([HAVE_DECL_GETOPT], 1,
+           [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
+GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
+
 dnl This must come last.
 
 dnl We used to make symlinks to files in the source directory, but now
This page took 0.028625 seconds and 4 git commands to generate.