OSDN Git Service

gdb/
[pf3gnuchains/pf3gnuchains3x.git] / gas / configure.in
index 3ced026..d21b124 100644 (file)
@@ -5,14 +5,15 @@ dnl brackets, be sure changequote invocations surround it.
 dnl
 dnl
 dnl v2.5 needed for --bindir et al
 dnl
 dnl
 dnl v2.5 needed for --bindir et al
-AC_PREREQ(2.57)
-AC_INIT(as.h)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR(as.h)
 
 dnl Autoconf 2.57 will find the aux dir without this.  However, unless
 dnl we specify this explicitly, automake-1.7 will assume that ylwrap is in
 dnl gas/ instead of gas/../.
 AC_CONFIG_AUX_DIR(..)
 
 dnl Autoconf 2.57 will find the aux dir without this.  However, unless
 dnl we specify this explicitly, automake-1.7 will assume that ylwrap is in
 dnl gas/ instead of gas/../.
 AC_CONFIG_AUX_DIR(..)
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
 AC_ISC_POSIX
 
 changequote(,)dnl
 AC_ISC_POSIX
 
 changequote(,)dnl
@@ -20,30 +21,42 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[     ]*\([^  ]*\)[   ]*).*/\1/p' < ${
 changequote([,])dnl
 AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
 
 changequote([,])dnl
 AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
 
-AM_PROG_LIBTOOL
+AC_PROG_CC
+AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
+ACX_LARGEFILE
+
+LT_INIT
 
 AC_ARG_ENABLE(targets,
 
 AC_ARG_ENABLE(targets,
-[   --enable-targets       alternative target configurations besides the primary],
+[  --enable-targets        alternative target configurations besides the primary],
 [case "${enableval}" in
 [case "${enableval}" in
-  yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+  yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
            ;;
   no)      enable_targets= ;;
   *)       enable_targets=$enableval ;;
 esac])dnl
            ;;
   no)      enable_targets= ;;
   *)       enable_targets=$enableval ;;
 esac])dnl
-AC_ARG_ENABLE(commonbfdlib,
-[  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library],
+
+ac_checking=yes
+if grep '^RELEASE=y' ${srcdir}/../bfd/Makefile.am >/dev/null 2>/dev/null ; then
+  ac_checking=
+fi
+AC_ARG_ENABLE(checking,
+[  --enable-checking       enable run-time checks],
 [case "${enableval}" in
 [case "${enableval}" in
-  yes) commonbfdlib=true ;;
-  no)  commonbfdlib=false ;;
-  *)   AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
+  no|none)  ac_checking= ;;
+  *)       ac_checking=yes ;;
 esac])dnl
 esac])dnl
+if test x$ac_checking != x ; then
+  AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
+fi
 
 using_cgen=no
 
 AM_BINUTILS_WARNINGS
 
 # Generate a header file
 
 using_cgen=no
 
 AM_BINUTILS_WARNINGS
 
 # Generate a header file
-AM_CONFIG_HEADER(config.h:config.in)
+AC_CONFIG_HEADERS(config.h:config.in)
 
 # If we are on a DOS filesystem, we must use gdb.ini rather than
 # .gdbinit.
 
 # If we are on a DOS filesystem, we must use gdb.ini rather than
 # .gdbinit.
@@ -124,13 +137,18 @@ for this_target in $target $canon_targets ; do
        AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress)
        ;;
 
        AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress)
        ;;
 
+      microblaze*)
+        ;;
+
       mips-sony-bsd*)
        ;;
       mips-*-bsd*)
        AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
        ;;
 
       mips-sony-bsd*)
        ;;
       mips-*-bsd*)
        AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
        ;;
 
-      ppc-*-aix5.*)
+changequote(,)dnl
+      ppc-*-aix[5-9].*)
+changequote([,])dnl
        AC_DEFINE(AIX_WEAK_SUPPORT, 1,
                  [Define if using AIX 5.2 value for C_WEAKEXT.])
        ;;
        AC_DEFINE(AIX_WEAK_SUPPORT, 1,
                  [Define if using AIX 5.2 value for C_WEAKEXT.])
        ;;
@@ -206,7 +224,7 @@ changequote(,)dnl
 changequote([,])dnl
            ;;
          *)
 changequote([,])dnl
            ;;
          *)
-           AC_ERROR($target_cpu isn't a supported MIPS CPU name)
+           AC_MSG_ERROR($target_cpu isn't a supported MIPS CPU name)
            ;;
        esac
        # See whether it's appropriate to set E_MIPS_ABI_O32 for o32
            ;;
        esac
        # See whether it's appropriate to set E_MIPS_ABI_O32 for o32
@@ -258,7 +276,7 @@ changequote([,])dnl
 
     # Do we need the opcodes library?
     case ${cpu_type} in
 
     # Do we need the opcodes library?
     case ${cpu_type} in
-      vax | i386 | tic30)
+      vax | tic30)
        ;;
 
       *)
        ;;
 
       *)
@@ -287,7 +305,7 @@ changequote([,])dnl
         fi
         ;;
 
         fi
         ;;
 
-      fr30 | ip2k | iq2000 | m32r | openrisc)
+      fr30 | ip2k | iq2000 | lm32 | m32r | openrisc)
        using_cgen=yes
        ;;
 
        using_cgen=yes
        ;;
 
@@ -304,18 +322,22 @@ changequote([,])dnl
        esac
        ;;
 
        esac
        ;;
 
+      mep)
+       using_cgen=yes
+       ;;
+
       mips)
       mips)
-       echo ${extra_objects} | grep -s "itbl-parse.o" 
+       echo ${extra_objects} | grep -s "itbl-parse.o"
        if test $? -ne 0 ; then
          extra_objects="$extra_objects itbl-parse.o"
        fi
 
        if test $? -ne 0 ; then
          extra_objects="$extra_objects itbl-parse.o"
        fi
 
-       echo ${extra_objects} | grep -s "itbl-lex.o" 
+       echo ${extra_objects} | grep -s "itbl-lex.o"
        if test $? -ne 0 ; then
          extra_objects="$extra_objects itbl-lex.o"
        fi
 
        if test $? -ne 0 ; then
          extra_objects="$extra_objects itbl-lex.o"
        fi
 
-       echo ${extra_objects} | grep -s "itbl-ops.o" 
+       echo ${extra_objects} | grep -s "itbl-ops.o"
        if test $? -ne 0 ; then
          extra_objects="$extra_objects itbl-ops.o"
        fi
        if test $? -ne 0 ; then
          extra_objects="$extra_objects itbl-ops.o"
        fi
@@ -331,6 +353,13 @@ changequote([,])dnl
        fi
        ;;
 
        fi
        ;;
 
+      rx)
+        echo ${extra_objects} | grep -s "rx-parse.o"
+        if test $? -ne 0 ; then
+          extra_objects="$extra_objects rx-parse.o"
+        fi
+       ;;
+
       xstormy16)
        using_cgen=yes
        ;;
       xstormy16)
        using_cgen=yes
        ;;
@@ -364,6 +393,10 @@ changequote([,])dnl
       te_file=$em
     fi
 
       te_file=$em
     fi
 
+   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
@@ -417,6 +450,19 @@ if test ${all_targets} = "yes"; then
       ;;
     esac
   ;;
       ;;
     esac
   ;;
+  x86_64)
+    case ${obj_format} in
+    aout)
+      emulations="$emulations i386coff i386elf"
+      ;;
+    coff)
+      emulations="$emulations i386aout i386elf"
+    ;;
+    elf)
+      emulations="$emulations i386aout i386coff"
+      ;;
+    esac
+  ;;
   esac
 fi
 
   esac
 fi
 
@@ -424,8 +470,7 @@ fi
 # IEEE FP.  On those that don't support FP at all, usually IEEE
 # is emulated.
 case ${target_cpu} in
 # IEEE FP.  On those that don't support FP at all, usually IEEE
 # is emulated.
 case ${target_cpu} in
-  vax | tahoe )        atof=${target_cpu} ;;
-  pdp11)       atof=vax ;;
+  vax | pdp11 )        atof=vax ;;
   *)           atof=ieee ;;
 esac
 
   *)           atof=ieee ;;
 esac
 
@@ -462,6 +507,7 @@ case ${obj_format} in
       i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
       m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
       m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
       i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
       m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
       m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
+      x86_64) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
     esac
     ;;
 esac
     esac
     ;;
 esac
@@ -511,7 +557,6 @@ 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?]) ;;
       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?]) ;;
-      ieee)    AC_DEFINE(OBJ_MAYBE_IEEE, 1,    [IEEE support?])    ;;
       som)     AC_DEFINE(OBJ_MAYBE_SOM, 1,     [SOM support?])     ;;
     esac
     extra_objects="$extra_objects obj-$fmt.o"
       som)     AC_DEFINE(OBJ_MAYBE_SOM, 1,     [SOM support?])     ;;
     esac
     extra_objects="$extra_objects obj-$fmt.o"
@@ -556,34 +601,26 @@ yes)
   ;;
 esac
 
   ;;
 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)
 
 AC_SUBST(OPCODES_LIB)
 
-AC_SUBST(BFDVER_H)
-AC_SUBST(ALL_OBJ_DEPS)
-
 AC_DEFINE_UNQUOTED(TARGET_ALIAS,       "${target_alias}", [Target alias.])
 AC_DEFINE_UNQUOTED(TARGET_CANONICAL,   "${target}",       [Canonical target.])
 AC_DEFINE_UNQUOTED(TARGET_CPU,         "${target_cpu}",   [Target CPU.])
 AC_DEFINE_UNQUOTED(TARGET_VENDOR,      "${target_vendor}", [Target vendor.])
 AC_DEFINE_UNQUOTED(TARGET_OS,          "${target_os}",    [Target OS.])
 
 AC_DEFINE_UNQUOTED(TARGET_ALIAS,       "${target_alias}", [Target alias.])
 AC_DEFINE_UNQUOTED(TARGET_CANONICAL,   "${target}",       [Canonical target.])
 AC_DEFINE_UNQUOTED(TARGET_CPU,         "${target_cpu}",   [Target CPU.])
 AC_DEFINE_UNQUOTED(TARGET_VENDOR,      "${target_vendor}", [Target vendor.])
 AC_DEFINE_UNQUOTED(TARGET_OS,          "${target_os}",    [Target OS.])
 
-AC_PROG_CC
-
 AC_PROG_YACC
 AM_PROG_LEX
 
 AC_PROG_YACC
 AM_PROG_LEX
 
-ALL_LINGUAS="fr tr es rw"
-CY_GNU_GETTEXT
+ALL_LINGUAS="fr tr es rw id"
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
 
 AM_MAINTAINER_MODE
 
 AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
 AC_EXEEXT
 
 AC_EXEEXT
 
-AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
+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)
 
 # 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.
@@ -597,7 +634,7 @@ fi
 AC_MSG_RESULT($cross_gas)
 
 dnl ansidecl.h will deal with const
 AC_MSG_RESULT($cross_gas)
 
 dnl ansidecl.h will deal with const
-dnl AC_CONST
+dnl AC_C_CONST
 AC_FUNC_ALLOCA
 AC_C_INLINE
 
 AC_FUNC_ALLOCA
 AC_C_INLINE
 
@@ -609,8 +646,8 @@ AC_CHECK_FUNCS(sbrk)
 
 # do we need the math library?
 case "${need_libm}" in
 
 # do we need the math library?
 case "${need_libm}" in
-yes) 
-  AC_CHECK_LIBM
+yes)
+  LT_LIB_M
   AC_SUBST(LIBM)
   ;;
 esac
   AC_SUBST(LIBM)
   ;;
 esac
@@ -652,7 +689,7 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [
 
 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
 AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h,
 
 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 *);],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#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
 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
@@ -667,8 +704,29 @@ 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([mempcpy])
 AC_CHECK_DECLS([vsnprintf])
 
 AC_CHECK_DECLS([vsnprintf])
 
+BFD_BINARY_FOPEN
+
+# Support for VMS timestamps via cross compile
+
+if test "$ac_cv_header_time_h" = yes; then
+  GAS_HAVE_TIME_TYPE_MEMBER(struct tm, tm_gmtoff)
+fi
+
+if test "$ac_cv_header_sys_stat_h" = yes; then
+    GAS_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_sec)
+    GAS_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_nsec)
+fi
+
+
+dnl Required for html, pdf, install-pdf and install-html targets.
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+AC_SUBST(pdfdir)
+
 dnl This must come last.
 
 dnl We used to make symlinks to files in the source directory, but now
 dnl This must come last.
 
 dnl We used to make symlinks to files in the source directory, but now
@@ -686,9 +744,7 @@ AC_CONFIG_COMMANDS([default],
  echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
  if test "x$cgen_cpu_prefix" != x ; then
    echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
  echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
  if test "x$cgen_cpu_prefix" != x ; then
    echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
- fi
-
- sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
+ fi],
 [target_cpu_type=${target_cpu_type}
  cgen_cpu_prefix=${cgen_cpu_prefix}
  obj_format=${obj_format}
 [target_cpu_type=${target_cpu_type}
  cgen_cpu_prefix=${cgen_cpu_prefix}
  obj_format=${obj_format}