* arc.h (ARC_MACH_{BASE,HOST,GRAPHICS,AUDIO}): Define.
[deliverable/binutils-gdb.git] / gas / configure.in
index 29094f83423a0b11e0650b3241160b1160740cc0..a6bc5523944414de7984803e333af712d7cee180 100644 (file)
@@ -3,10 +3,9 @@ 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 Remember to use "dnl" in each line before the AC_INIT call...
 dnl
-dnl
-AC_INIT(as.h)
+AC_PREREQ(1.118)dnl
+AC_INIT(as.h)dnl
 dnl
 bfd_gas=no
 user_bfd_gas=
@@ -24,7 +23,7 @@ AC_CONFIG_HEADER(conf)
 dnl For recursion to work right, this must be an absolute pathname.
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
 AC_CANONICAL_SYSTEM
-AC_PROGRAM_TRANSFORM_NAME
+AC_ARG_PROGRAM
 
 emulation=generic
 
@@ -42,9 +41,11 @@ changequote([,])dnl
   m8*)         cpu_type=m88k ;;
   mips*el)     cpu_type=mips endian=little;;
   mips*)       cpu_type=mips endian=big ;;
+  powerpc*eabi*) cpu_type=ppc obj_format=elf;;
   powerpc*)    cpu_type=ppc ;;
   rs6000*)     cpu_type=ppc ;;
-  sparc64)     cpu_type=sparc obj_format=elf AC_DEFINE(sparcv9) ;;
+  sparc64)     cpu_type=sparc obj_format=elf
+               AC_DEFINE(sparcv9) ;;
   sparclite*)   cpu_type=sparc ;;
   *)           cpu_type=${target_cpu} ;;
 esac
@@ -71,7 +72,11 @@ case ${generic_target} in
   alpha-*-netware*)    obj_format=ecoff ;;
   alpha-*-osf*)                obj_format=ecoff ;;
 
-  arm-*-riscix*)       obj_format=aout bfd_gas=yes ;;
+# start-sanitize-arc
+  arc-*-elf*)          obj_format=elf bfd_gas=yes ;;
+# end-sanitize-arc
+
+  arm-*-riscix*)       obj_format=aout ;;
 
   hppa-*-*elf*)                obj_format=elf emulation=hppa ;;
   hppa-*-osf*)         obj_format=som emulation=hppa ;;
@@ -85,11 +90,11 @@ case ${generic_target} in
                         emulation=i386aix ;;
   i386-*-bsd*)         obj_format=aout emulation=386bsd ;;
   i386-*-netbsd0.8)    obj_format=aout emulation=386bsd ;;
-  i386-*-netbsd*)      obj_format=aout emulation=netbsd ;;
+  i386-*-netbsd*)      obj_format=aout emulation=nbsd bfd_gas=yes;;
   i386-*-linux*elf*)   obj_format=elf  emulation=linux ;;
   i386-*-linux*coff*)  obj_format=coff emulation=linux
                         gas_target=i386coff ;;
-  i386-*-linux*)       obj_format=aout emulation=linux bfd_gas=preferred ;;
+  i386-*-linux*)       obj_format=aout emulation=linux ;;
   i386-*-lynxos*)      obj_format=coff gas_target=i386coff
                         emulation=lynx ;;
   i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
@@ -98,8 +103,10 @@ case ${generic_target} in
                        obj_format=coff gas_target=i386coff ;;
   i386-*-vsta)         obj_format=aout ;;
   i386-*-go32)         obj_format=coff gas_target=i386coff ;;
+  i386-*-gnu*elf*)     obj_format=elf ;;
   i386-*-mach* | i386-*-gnu*)
                        obj_format=aout emulation=mach bfd_gas=yes ;;
+  i386-*-msdos*)       obj_format=aout ;;
 
   i960-*-bout)         obj_format=bout ;;
   i960-*-coff)         obj_format=coff emulation=ic960 gas_target=ic960coff ;;
@@ -116,14 +123,17 @@ case ${generic_target} in
   m68k-apollo-*)       obj_format=coff gas_target=apollo emulation=apollo ;;
   m68k-*-coff | m68k-*-sysv*)
                        obj_format=coff gas_target=m68kcoff ;;
-  m68k-*-hpux)         obj_format=hp300 emulation=hp300 ;;
+  m68k-*-hpux*)                obj_format=hp300 emulation=hp300 ;;
   m68k-*-lynxos*)      obj_format=coff gas_target=m68kcoff
                         emulation=lynx ;;
+  m68k-*-netbsd*)      obj_format=aout emulation=nbsd bfd_gas=yes ;;
 
   m88k-*-coff*)                obj_format=coff gas_target=m88kcoff ;;
 
   # don't change emulation like *-*-bsd does
-  mips-*-bsd*)         bfd_gas=yes obj_format=aout gas_target=mips-lit ;;
+  mips-dec-bsd*)       obj_format=aout gas_target=mips-lit ;;
+  mips-sony-bsd*)      obj_format=ecoff gas_target=mips-big ;;
+  mips-*-bsd*)         AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
   mips-*-ultrix*)      obj_format=ecoff gas_target=mips-lit ;;
   mips-*-ecoff*)       obj_format=ecoff 
                        case "$endian" in
@@ -132,6 +142,12 @@ case ${generic_target} in
                        esac
                        ;;
   mips-*-ecoff*)       obj_format=ecoff gas_target=mips-big ;;
+  mips-*-gnu*)         obj_format=aout
+                       case "$endian" in
+                       big) gas_target=mips-big ;;
+                       *)   gas_target=mips-lit ;;
+                       esac
+                       ;;
   mips-*-irix5*)       obj_format=elf gas_target=mips-big ;;
   mips-*-irix*)                obj_format=ecoff gas_target=mips-big ;;
   mips-*-riscos*)      obj_format=ecoff gas_target=mips-big ;;
@@ -142,24 +158,29 @@ case ${generic_target} in
                        *)   gas_target=mips-lit ;;
                        esac
                        ;;
-  ppc-*-aix*)          obj_format=coff bfd_gas=yes ;;
-  ppc-*-elf*)          obj_format=elf bfd_gas=yes ;;
+  ppc-*-aix*)          obj_format=coff ;;
+  ppc-*-elf*)          obj_format=elf ;;
   ppc-*-netware*)      obj_format=elf emulation=ppcnw ;;
-  ppc-*-sysv4*)                obj_format=elf bfd_gas=yes ;;
+  ppc-*-sysv4*)                obj_format=elf ;;
 
   sh-*-coff)           obj_format=coff ;;
 
-  ns32k-pc532-mach*)   obj_format=aout emulation=pc532 bfd_gas=yes ;;
-  ns32k-pc532-netbsd*) obj_format=aout emulation=netbsd532 bfd_gas=yes ;;
+# start-sanitize-rce
+  rce-*-aout)          obj_format=aout ;;
+# end-sanitize-rce
+
+  ns32k-pc532-mach*)   obj_format=aout emulation=pc532mach ;;
+  ns32k-pc532-netbsd*) obj_format=aout emulation=nbsd532 ;;
 
-  sparc*-*-sunos4*)    obj_format=aout emulation=sun3 bfd_gas=yes ;;
-  sparc*-*-aout | sparc*-*-vxworks)
-                       obj_format=aout bfd_gas=yes ;;
-  sparc*-*-coff)       obj_format=coff bfd_gas=yes ;;
-  sparc*-*-lynxos*)    obj_format=coff bfd_gas=yes emulation=lynx ;;
-  sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;;
-  sparc*-*-elf | sparc*-*-solaris*)
+  sparc-*-sunos4*)     obj_format=aout emulation=sun3 ;;
+  sparc-*-aout | sparc*-*-vxworks)
+                       obj_format=aout ;;
+  sparc-*-coff)                obj_format=coff ;;
+  sparc-*-lynxos*)     obj_format=coff emulation=lynx ;;
+  sparc-fujitsu-none)  obj_format=aout ;;
+  sparc-*-elf | sparc*-*-solaris*)
                        obj_format=elf ;;
+  sparc-*-netbsd*)     obj_format=aout emulation=nbsd bfd_gas=yes ;;
 
   vax-*-bsd* | vax-*-ultrix*)
                        obj_format=aout ;;
@@ -168,6 +189,8 @@ case ${generic_target} in
   z8k-*-coff | z8k-*-sim)
                        obj_format=coff ;;
 
+  w65-*-*)             obj_format=coff ;;
+
   *-*-aout | *-*-scout)
                        obj_format=aout ;;
   *-*-nindy*)
@@ -211,11 +234,19 @@ fi
 # and target makefile frag
 
 target_frag=${srcdir}/config/${gas_target}.mt
+if test ! -r ${target_frag}; then
+  target_frag=/dev/null # ick! but subst_file can't be conditionalized
+fi
 AC_SUBST_FILE(target_frag)
 
 case ${cpu_type}-${obj_format} in
+  arm-*)       bfd_gas=yes ;;
 # not yet
 # i386-aout)   bfd_gas=preferred ;;
+  mips-*)      bfd_gas=yes ;;
+  ns32k-*)     bfd_gas=yes ;;
+  ppc-*)       bfd_gas=yes ;;
+  sparc-*)     bfd_gas=yes ;;
   *-elf)       bfd_gas=yes ;;
   *-ecoff)     bfd_gas=yes ;;
   *-som)       bfd_gas=yes ;;
@@ -235,6 +266,9 @@ case ${user_bfd_gas}-${bfd_gas} in
   *-preferred)
     bfd_gas=yes
     ;;
+  yes-*)
+    bfd_gas=yes
+    ;;
   -*)
     # User specified nothing.
     ;;
@@ -254,14 +288,10 @@ case ${reject_dev_configs}-${dev} in
     ;;
 esac
 
-dnl Looks like the AC_MAKE_LINKS string is taken literally and put into the
-dnl  config.status file.  So the necessary variables also have to be
-dnl  exported.
-AC_SUBST(cpu_type) AC_SUBST(obj_format) AC_SUBST(emulation) AC_SUBST(atof)
-AC_LINK_FILES(targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c,
-       config/tc-${cpu_type}.c config/tc-${cpu_type}.h \
+AC_LINK_FILES(config/tc-${cpu_type}.c  config/tc-${cpu_type}.h \
        config/obj-${obj_format}.h config/obj-${obj_format}.c \
-       config/te-${emulation}.h config/atof-${atof}.c)
+       config/te-${emulation}.h config/atof-${atof}.c,
+       targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c)
 
 case "${bfd_gas}" in
   yes) AC_DEFINE(BFD_ASSEMBLER)
@@ -276,83 +306,45 @@ esac
 AC_SUBST(BFDLIB)
 AC_SUBST(ALL_OBJ_DEPS)
 
-case "x${host}" in
-  x${target})                          ;;
-  *)           AC_DEFINE(CROSS_COMPILE);;
-esac
-
 AC_DEFINE_UNQUOTED(TARGET_ALIAS,       "${target_alias}")
 AC_DEFINE_UNQUOTED(TARGET_CANONICAL,   "${target}")
 AC_DEFINE_UNQUOTED(TARGET_CPU,         "${target_cpu}")
 AC_DEFINE_UNQUOTED(TARGET_VENDOR,      "${target_vendor}")
 AC_DEFINE_UNQUOTED(TARGET_OS,          "${target_os}")
 
-case ${host} in
-  rs6000-*-*)
-       # The IBM compiler mis-compiles some expressions used in gas.
-       # This will tell gas to work around this lossage.
-       AC_DEFINE(IBM_COMPILER_SUX) ;;
-  i386-*-go32)
-       # Using fopen(..., "w") for a binary file breaks under DOS.
-       AC_DEFINE(WANT_FOPEN_BIN)   ;;
-esac
-
 AC_PROG_CC
 AC_PROG_INSTALL
 
 AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
 
+# Put this here so that autoconf's "cross-compiling" message doesn't confuse
+# people who are not cross-compiling but are compiling cross-assemblers.
+AC_MSG_CHECKING(whether compiling a cross-assembler)
+if test "${host}" = "${target}"; then
+  cross_gas=no
+else
+  cross_gas=yes
+  AC_DEFINE(CROSS_COMPILE)
+fi
+AC_MSG_RESULT($cross_gas)
+
 dnl ansidecl.h will deal with const
 dnl AC_CONST
 AC_FUNC_ALLOCA
 AC_C_INLINE
 
+# VMS doesn't have unlink.
+AC_CHECK_FUNCS(unlink remove, break)
+
 # Some non-ANSI preprocessors botch requoting inside strings.  That's bad
 # enough, but on some of those systems, the assert macro relies on requoting
 # working properly!
-AC_MSG_CHECKING([for working assert macro])
-AC_CACHE_VAL(gas_cv_assert_ok,
-AC_TRY_LINK([#include <assert.h>
-#include <stdio.h>], [
-/* check for requoting problems */
-static int a, b, c, d;
-static char *s;
-assert (!strcmp(s, "foo bar baz quux"));
-/* check for newline handling */
-assert (a == b
-        || c == d);
-], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
-AC_MSG_RESULT($gas_cv_assert_ok)
-test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
+GAS_WORKING_ASSERT
 
 # On some systems, the system header files may not declare malloc, realloc,
 # and free.  There are places where gas needs these functions to have been
 # declared -- such as when taking their addresses.
-AC_MSG_CHECKING([whether a malloc declaration is required])
-AC_CACHE_VAL(gas_cv_malloc_decl_needed,
-AC_TRY_LINK([
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-], [
-char *(*f) ();
-f = (char *(*)()) malloc;
-], gas_cv_malloc_decl_needed=no, gas_cv_malloc_decl_needed=yes))dnl
-AC_MSG_RESULT($gas_cv_malloc_decl_needed)
-test $gas_cv_malloc_decl_needed = no || AC_DEFINE(NEED_MALLOC_DECLARATION)
-
-AC_MSG_CHECKING([whether a free declaration is required])
-AC_CACHE_VAL(gas_cv_free_decl_needed,
-AC_TRY_LINK([
+gas_test_headers="
 #ifdef HAVE_MEMORY_H
 #include <memory.h>
 #endif
@@ -365,31 +357,19 @@ AC_TRY_LINK([
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-], [
-int (*f) ();
-f = (int (*)()) free;
-], gas_cv_free_decl_needed=no, gas_cv_free_decl_needed=yes))
-AC_MSG_RESULT($gas_cv_free_decl_needed)
-test $gas_cv_free_decl_needed = no || AC_DEFINE(NEED_FREE_DECLARATION)
+"
+GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
+GAS_CHECK_DECL_NEEDED(free, f, int f, $gas_test_headers)
 
 # Does errno.h declare errno, or do we have to add a separate declaration
 # for it?
-AC_MSG_CHECKING([whether an errno declaration is required])
-AC_CACHE_VAL(gas_cv_errno_decl_needed,
-AC_TRY_LINK([
+GAS_CHECK_DECL_NEEDED(errno, f, int f, [
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
-], [
-int x;
-x = errno;
-], gas_cv_errno_decl_needed=no, gas_cv_errno_decl_needed=yes))
-AC_MSG_RESULT($gas_cv_errno_decl_needed)
-test $gas_cv_errno_decl_needed = no || AC_DEFINE(NEED_ERRNO_DECLARATION)
+])
 
 AC_CONFIG_SUBDIRS(testsuite)
 
 dnl This must come last.
-dnl Apparently symlinks are checked for in the directory containing
-dnl  the last Makefile.  Thus the order used here...
-AC_OUTPUT(doc/Makefile Makefile)
+AC_OUTPUT(Makefile doc/Makefile .gdbinit:gdbinit.in)
This page took 0.030883 seconds and 4 git commands to generate.