Remove support for the (deprecated) openrisc and or32 configurations and replace
[deliverable/binutils-gdb.git] / gas / configure.in
index 455b8ee177400cad5041d4a1b588cb6c9f921aff..33cd50b6507c3b8d41ddaf123d62da0f8413fa52 100644 (file)
@@ -3,6 +3,21 @@ dnl
 dnl And be careful when changing it!  If you must add tests with square
 dnl brackets, be sure changequote invocations surround it.
 dnl
 dnl And be careful when changing it!  If you must add tests with square
 dnl brackets, be sure changequote invocations surround it.
 dnl
+dnl   Copyright (C) 2012-2014 Free Software Foundation, Inc.
+dnl
+dnl This file is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING3.  If not see
+dnl <http://www.gnu.org/licenses/>.
 dnl
 dnl v2.5 needed for --bindir et al
 AC_PREREQ(2.59)
 dnl
 dnl v2.5 needed for --bindir et al
 AC_PREREQ(2.59)
@@ -17,7 +32,7 @@ AC_CANONICAL_TARGET
 AC_ISC_POSIX
 
 changequote(,)dnl
 AC_ISC_POSIX
 
 changequote(,)dnl
-BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[        ]*\([^  ]*\)[   ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
+BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'`
 changequote([,])dnl
 AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
 
 changequote([,])dnl
 AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
 
@@ -58,6 +73,15 @@ AM_BINUTILS_WARNINGS
 # Generate a header file
 AC_CONFIG_HEADERS(config.h:config.in)
 
 # Generate a header file
 AC_CONFIG_HEADERS(config.h:config.in)
 
+# PR 14072
+AH_VERBATIM([00_CONFIG_H_CHECK],
+[/* Check that config.h is #included before system headers
+   (this works only for glibc, but that should be enough).  */
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
+#  error config.h must be #included before system headers
+#endif
+#define __CONFIG_H__ 1])
+
 # If we are on a DOS filesystem, we must use gdb.ini rather than
 # .gdbinit.
 case "${host}" in
 # If we are on a DOS filesystem, we must use gdb.ini rather than
 # .gdbinit.
 case "${host}" in
@@ -140,24 +164,12 @@ for this_target in $target $canon_targets ; do
       microblaze*)
         ;;
 
       microblaze*)
         ;;
 
-      mips-sony-bsd*)
-       ;;
-      mips-*-bsd*)
-       AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
-       ;;
-
 changequote(,)dnl
       ppc-*-aix[5-9].*)
 changequote([,])dnl
        AC_DEFINE(AIX_WEAK_SUPPORT, 1,
                  [Define if using AIX 5.2 value for C_WEAKEXT.])
        ;;
 changequote(,)dnl
       ppc-*-aix[5-9].*)
 changequote([,])dnl
        AC_DEFINE(AIX_WEAK_SUPPORT, 1,
                  [Define if using AIX 5.2 value for C_WEAKEXT.])
        ;;
-      ppc-*-linux-*)
-       case "$endian" in
-         big)  ;;
-         *)    AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
-       esac
-       ;;
       ppc-*-solaris*)
        if test ${this_target} = $target; then
          AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
       ppc-*-solaris*)
        if test ${this_target} = $target; then
          AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
@@ -221,6 +233,11 @@ changequote([,])dnl
          mips64* | mipsisa64* | mipsisa32*)
 changequote(,)dnl
            mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'`
          mips64* | mipsisa64* | mipsisa32*)
 changequote(,)dnl
            mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'`
+changequote([,])dnl
+           ;;
+         mips*)
+changequote(,)dnl
+           mips_cpu=`echo $target_cpu | sed -e 's/^mips//' -e 's/el$//'`
 changequote([,])dnl
            ;;
          *)
 changequote([,])dnl
            ;;
          *)
@@ -229,7 +246,6 @@ changequote([,])dnl
        esac
        # See whether it's appropriate to set E_MIPS_ABI_O32 for o32
        # binaries.  It's a GNU extension that some OSes don't understand.
        esac
        # See whether it's appropriate to set E_MIPS_ABI_O32 for o32
        # binaries.  It's a GNU extension that some OSes don't understand.
-       # The value only matters on ELF targets.
        case ${target} in
          *-*-irix*)
            use_e_mips_abi_o32=0
        case ${target} in
          *-*-irix*)
            use_e_mips_abi_o32=0
@@ -250,10 +266,10 @@ changequote([,])dnl
        esac
        # Decide which ABI to target by default.
        case ${target} in
        esac
        # Decide which ABI to target by default.
        case ${target} in
-         mips64*-linux* | mips-sgi-irix6*)
+         mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu)
            mips_default_abi=N32_ABI
            ;;
            mips_default_abi=N32_ABI
            ;;
-         mips*-linux*)
+         mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
            mips_default_abi=O32_ABI
            ;;
          mips64*-openbsd*)
            mips_default_abi=O32_ABI
            ;;
          mips64*-openbsd*)
@@ -299,13 +315,13 @@ changequote([,])dnl
           extra_objects="$extra_objects bfin-parse.o"
         fi
 
           extra_objects="$extra_objects bfin-parse.o"
         fi
 
-        echo ${extra_objects} | grep -s "bfin-lex.o"
+        echo ${extra_objects} | grep -s "bfin-lex-wrapper.o"
         if test $? -ne 0 ; then
         if test $? -ne 0 ; then
-          extra_objects="$extra_objects bfin-lex.o"
+          extra_objects="$extra_objects bfin-lex-wrapper.o"
         fi
         ;;
 
         fi
         ;;
 
-      fr30 | ip2k | iq2000 | lm32 | m32r | openrisc)
+      epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | or1k)
        using_cgen=yes
        ;;
 
        using_cgen=yes
        ;;
 
@@ -332,9 +348,9 @@ changequote([,])dnl
          extra_objects="$extra_objects itbl-parse.o"
        fi
 
          extra_objects="$extra_objects itbl-parse.o"
        fi
 
-       echo ${extra_objects} | grep -s "itbl-lex.o"
+       echo ${extra_objects} | grep -s "itbl-lex-wrapper.o"
        if test $? -ne 0 ; then
        if test $? -ne 0 ; then
-         extra_objects="$extra_objects itbl-lex.o"
+         extra_objects="$extra_objects itbl-lex-wrapper.o"
        fi
 
        echo ${extra_objects} | grep -s "itbl-ops.o"
        fi
 
        echo ${extra_objects} | grep -s "itbl-ops.o"
@@ -347,12 +363,88 @@ changequote([,])dnl
         using_cgen=yes
        ;;
 
         using_cgen=yes
        ;;
 
+      nds32)
+        # Decide BASELINE, REDUCED_REGS, FPU_DP_EXT, FPU_SP_EXT features
+       # based on arch_name.
+       AC_MSG_CHECKING(for default configuration of --with-arch)
+       if test "x${with_arch}" != x; then
+         case ${with_arch} in
+            v2j | v2s | v2f | v2 | v3m | v3j | v3s | v3f | v3 )
+             AC_DEFINE_UNQUOTED(NDS32_DEFAULT_ARCH_NAME, "$with_arch",
+                                [Define value for nds32_arch_name])
+              ;;
+           *)
+             AC_MSG_ERROR(This kind of arch name does *NOT* exist!)
+             ;;
+          esac
+       fi
+       AC_MSG_RESULT($with_arch)
+
+        # Decide features one by one.
+        AC_MSG_CHECKING(for default configuration of --enable-dx-regs)
+       if test "x${enable_dx_regs}" == xyes; then
+         AC_DEFINE(NDS32_DEFAULT_DX_REGS, 1,
+                   [Define value for nds32_dx_regs])
+       else
+         AC_DEFINE(NDS32_DEFAULT_DX_REGS, 0,
+                   [Define default value for nds32_dx_regs])
+       fi
+       AC_MSG_RESULT($enable_dx_regs)
+
+        AC_MSG_CHECKING(for default configuration of --enable-perf-ext)
+       if test "x${enable_perf_ext}" == xno; then
+         AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 0,
+                   [Define value for nds32_perf_ext])
+       else
+         AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 1,
+                   [Define default value for nds32_perf_ext])
+       fi
+       AC_MSG_RESULT($enable_perf_ext)
+
+        AC_MSG_CHECKING(for default configuration of --enable-perf-ext2)
+       if test "x${enable_perf_ext2}" == xno; then
+         AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 0,
+                   [Define value for nds32_perf_ext2])
+       else
+         AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 1,
+                   [Define default value for nds32_perf_ext2])
+       fi
+       AC_MSG_RESULT($enable_perf_ext2)
+
+        AC_MSG_CHECKING(for default configuration of --enable-string-ext)
+       if test "x${enable_string_ext}" == xno; then
+         AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 0,
+                   [Define value for nds32_string_ext])
+       else
+         AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 1,
+                   [Define default value for nds32_string_ext])
+       fi
+       AC_MSG_RESULT($enable_string_ext)
+
+        AC_MSG_CHECKING(for default configuration of --enable-audio-ext)
+       if test "x${enable_audio_ext}" == xno; then
+         AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 0,
+                   [Define value for nds32_audio_ext])
+       else
+         AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 1,
+                   [Define default value for nds32_audio_ext])
+       fi
+       AC_MSG_RESULT($enable_audio_ext)
+       ;;
+
       i386 | s390 | sparc)
        if test $this_target = $target ; then
          AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
        fi
        ;;
 
       i386 | s390 | sparc)
        if test $this_target = $target ; then
          AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
        fi
        ;;
 
+      rl78)
+        echo ${extra_objects} | grep -s "rl78-parse.o"
+        if test $? -ne 0 ; then
+          extra_objects="$extra_objects rl78-parse.o"
+        fi
+       ;;
+
       rx)
         echo ${extra_objects} | grep -s "rx-parse.o"
         if test $? -ne 0 ; then
       rx)
         echo ${extra_objects} | grep -s "rx-parse.o"
         if test $? -ne 0 ; then
@@ -396,25 +488,14 @@ changequote([,])dnl
    case ${te_file} in
       vms) extra_objects="$extra_objects te-vms.o" ;;
    esac
    case ${te_file} in
       vms) extra_objects="$extra_objects te-vms.o" ;;
    esac
+
 # From target name and format, produce a list of supported emulations.
 
     case ${generic_target}-${fmt} in
 # From target name and format, produce a list of supported emulations.
 
     case ${generic_target}-${fmt} in
-      mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
-      mips*-*-linux*-*) case "$endian" in
+      mips-*-*-*)      case "$endian" in
                        big)    emulation="mipsbelf mipslelf mipself" ;;
                        *)      emulation="mipslelf mipsbelf mipself" ;;
                        esac ;;
                        big)    emulation="mipsbelf mipslelf mipself" ;;
                        *)      emulation="mipslelf mipsbelf mipself" ;;
                        esac ;;
-      mips-*-lnews*-ecoff) ;;
-      mips-*-*-ecoff)  case "$endian" in
-                       big)    emulation="mipsbecoff mipslecoff mipsecoff" ;;
-                       *)      emulation="mipslecoff mipsbecoff mipsecoff" ;;
-                       esac ;;
-      mips-*-*-elf)    case "$endian" in
-                       big)    emulation="mipsbelf mipslelf mipself" ;;
-                       *)      emulation="mipslelf mipsbelf mipself" ;;
-                       esac ;;
-      mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
       # i386-pc-pe-coff != i386-pc-coff.
       i386-*-pe-coff)  ;;
       # Uncommenting the next line will turn on support for i386 AOUT
       # i386-pc-pe-coff != i386-pc-coff.
       i386-*-pe-coff)  ;;
       # Uncommenting the next line will turn on support for i386 AOUT
@@ -466,6 +547,11 @@ if test ${all_targets} = "yes"; then
   esac
 fi
 
   esac
 fi
 
+# PE code has way too many macros tweaking behaviour
+case ${te_file} in
+  pe*) emulations="" ;;
+esac
+
 # Assign floating point type.  Most processors with FP support
 # IEEE FP.  On those that don't support FP at all, usually IEEE
 # is emulated.
 # Assign floating point type.  Most processors with FP support
 # IEEE FP.  On those that don't support FP at all, usually IEEE
 # is emulated.
@@ -482,6 +568,8 @@ esac
 cgen_cpu_prefix=""
 if test $using_cgen = yes ; then
   case ${target_cpu} in
 cgen_cpu_prefix=""
 if test $using_cgen = yes ; then
   case ${target_cpu} in
+    or1knd)
+       cgen_cpu_prefix=or1k ;;
     *) cgen_cpu_prefix=${target_cpu} ;;
   esac
   AC_SUBST(cgen_cpu_prefix)
     *) cgen_cpu_prefix=${target_cpu} ;;
   esac
   AC_SUBST(cgen_cpu_prefix)
@@ -522,7 +610,7 @@ esac
 #
 # And then there's "--enable-targets=all"....
 #
 #
 # And then there's "--enable-targets=all"....
 #
-# For now, just always do it for MIPS ELF or ECOFF configurations.  Sigh.
+# For now, just always do it for MIPS ELF configurations.  Sigh.
 
 formats="${obj_format}"
 emfiles=""
 
 formats="${obj_format}"
 emfiles=""
@@ -533,8 +621,6 @@ for em in . $emulations ; do
     .) continue ;;
     mipsbelf | mipslelf | mipself)
        fmt=elf   file=mipself ;;
     .) continue ;;
     mipsbelf | mipslelf | mipself)
        fmt=elf   file=mipself ;;
-    mipsbecoff | mipslecoff | mipsecoff)
-       fmt=ecoff file=mipsecoff ;;
     *coff)
        fmt=coff  file=$em ;;
     *aout)
     *coff)
        fmt=coff  file=$em ;;
     *aout)
@@ -565,11 +651,11 @@ if test `set . $formats ; shift ; echo $#` -gt 1 ; then
 fi
 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
   DEFAULT_EMULATION=`set . $emulations ; echo $2`
 fi
 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
   DEFAULT_EMULATION=`set . $emulations ; echo $2`
-  # e-mips* has more than one emulation per file, e-i386* has just one at the
+  # e-mipself has more than one emulation per file, e-i386* has just one at the
   # moment.  If only one emulation is specified, then don't define
   # USE_EMULATIONS or include any of the e-files as they will only be bloat.
   case "${obj_format}${emfiles}" in
   # moment.  If only one emulation is specified, then don't define
   # USE_EMULATIONS or include any of the e-files as they will only be bloat.
   case "${obj_format}${emfiles}" in
-    multi* | *mips*)
+    multi* | *mipself*)
       extra_objects="$extra_objects $emfiles"
       AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
   esac
       extra_objects="$extra_objects $emfiles"
       AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
   esac
@@ -612,7 +698,7 @@ AC_DEFINE_UNQUOTED(TARGET_OS,               "${target_os}",    [Target OS.])
 AC_PROG_YACC
 AM_PROG_LEX
 
 AC_PROG_YACC
 AM_PROG_LEX
 
-ALL_LINGUAS="fr tr es rw id"
+ALL_LINGUAS="fr tr es rw id ru fi ja"
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
@@ -620,7 +706,8 @@ AM_MAINTAINER_MODE
 AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 
 AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 
-AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h limits.h time.h sys/stat.h)
+AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h errno.h sys/types.h limits.h locale.h time.h sys/stat.h)
+ACX_HEADER_STRING
 
 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
 # people who are not cross-compiling but are compiling cross-assemblers.
 
 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
 # people who are not cross-compiling but are compiling cross-assemblers.
@@ -640,9 +727,9 @@ AC_C_INLINE
 
 # VMS doesn't have unlink.
 AC_CHECK_FUNCS(unlink remove, break)
 
 # VMS doesn't have unlink.
 AC_CHECK_FUNCS(unlink remove, break)
+AC_CHECK_FUNCS(sbrk setlocale)
 
 
-# Some systems don't have sbrk().
-AC_CHECK_FUNCS(sbrk)
+AM_LC_MESSAGES
 
 # do we need the math library?
 case "${need_libm}" in
 
 # do we need the math library?
 case "${need_libm}" in
@@ -704,10 +791,13 @@ 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)
 
 GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
 GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
 
-AC_CHECK_DECLS([vsnprintf])
+AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf])
 
 BFD_BINARY_FOPEN
 
 
 BFD_BINARY_FOPEN
 
+# Link in zlib if we can.  This allows us to write compressed debug sections.
+AM_ZLIB
+
 # Support for VMS timestamps via cross compile
 
 if test "$ac_cv_header_time_h" = yes; then
 # Support for VMS timestamps via cross compile
 
 if test "$ac_cv_header_time_h" = yes; then
This page took 0.02916 seconds and 4 git commands to generate.