X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fconfigure.in;h=0f328a34e158bcf2b65333150919bf57fde71ce1;hb=38975f9eab9c0440a0863af398bc10049efe8333;hp=5e7bd3ff82696d800091805bc4cdee71905f0ace;hpb=bb0cb4db08103ccb12840275b162cfe8cc4501ce;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/configure.in b/binutils/configure.in index 5e7bd3ff82..0f328a34e1 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -1,11 +1,15 @@ dnl Process this file with autoconf to produce a configure script. dnl -AC_PREREQ(2.13) +AC_PREREQ(2.57) AC_INIT(ar.c) AC_CANONICAL_SYSTEM +AC_ISC_POSIX -AM_INIT_AUTOMAKE(binutils, 2.9.4) +changequote(,)dnl +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` +changequote([,])dnl +AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION}) AM_PROG_LIBTOOL @@ -25,6 +29,8 @@ AC_ARG_ENABLE(commonbfdlib, *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; esac])dnl +AM_BINUTILS_WARNINGS + AM_CONFIG_HEADER(config.h:config.in) if test -z "$target" ; then @@ -39,11 +45,15 @@ AC_PROG_CC AC_PROG_YACC AM_PROG_LEX -ALL_LINGUAS= +ALL_LINGUAS="fr tr ja es sv da zh_CN ru ro rw zh_TW" CY_GNU_GETTEXT AM_MAINTAINER_MODE AC_EXEEXT +if test -n "$EXEEXT"; then + AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1, + [Does the platform use an executable suffix?]) +fi AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}", [Suffix used for executables, if any.]) @@ -61,13 +71,59 @@ AC_PROG_INSTALL BFD_CC_FOR_BUILD +DEMANGLER_NAME=c++filt +case "${host}" in + *-*-go32* | *-*-msdos*) + DEMANGLER_NAME=cxxfilt +esac +AC_SUBST(DEMANGLER_NAME) + AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h) AC_HEADER_SYS_WAIT AC_FUNC_ALLOCA -AC_CHECK_FUNCS(sbrk utimes) +AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll) + +# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE +# needs to be defined for it +AC_MSG_CHECKING([for fopen64]) +AC_CACHE_VAL(bu_cv_have_fopen64, +[AC_TRY_LINK([#include ], [FILE *f = fopen64 ("/tmp/foo","r");], +bu_cv_have_fopen64=yes, +[saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + AC_TRY_LINK([#include ], [FILE *f = fopen64 ("/tmp/foo","r");], +bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE", +bu_cv_have_fopen64=no) + CPPFLAGS=$saved_CPPFLAGS])]) +AC_MSG_RESULT($bu_cv_have_fopen64) +if test "$bu_cv_have_fopen64" != no; then + AC_DEFINE([HAVE_FOPEN64], 1, + [Is fopen64 available?]) +fi +AC_MSG_CHECKING([for stat64]) +AC_CACHE_VAL(bu_cv_have_stat64, +[AC_TRY_LINK([#include ], [struct stat64 st; stat64 ("/tmp/foo", &st);], +bu_cv_have_stat64=yes, +[saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + AC_TRY_LINK([#include ], [struct stat64 st; stat64 ("/tmp/foo", &st);], +bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE", +bu_cv_have_stat64=no) + CPPFLAGS=$saved_CPPFLAGS])]) +AC_MSG_RESULT($bu_cv_have_stat64) +if test "$bu_cv_have_stat64" != no; then + AC_DEFINE([HAVE_STAT64], 1, + [Is stat64 available?]) +fi +if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \ + || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then + AC_DEFINE([_LARGEFILE64_SOURCE], 1, + [Enable LFS]) + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" +fi # Some systems have frexp only in -lm, not in -lc. -AC_SEARCH_LIBS(frexp, -lm) +AC_SEARCH_LIBS(frexp, m) AC_MSG_CHECKING(for time_t in time.h) AC_CACHE_VAL(bu_cv_decl_time_t_time_h, @@ -89,6 +145,16 @@ if test $bu_cv_decl_time_t_types_h = yes; then [Is the type time_t defined in ?]) fi +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h, +[AC_TRY_COMPILE([#include ], [extern int getopt (int, char *const*, const char *);], +bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h) +if test $bu_cv_decl_getopt_unistd_h = yes; then + AC_DEFINE([HAVE_DECL_GETOPT], 1, + [Is the prototype for getopt in in the expected format?]) +fi + # Under Next 3.2 apparently does not define struct utimbuf # by default. AC_MSG_CHECKING([for utime.h]) @@ -105,11 +171,7 @@ if test $bu_cv_header_utime_h = yes; then AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does define struct utimbuf?]) fi -BFD_NEED_DECLARATION(fprintf) -BFD_NEED_DECLARATION(strstr) -BFD_NEED_DECLARATION(sbrk) -BFD_NEED_DECLARATION(getenv) -BFD_NEED_DECLARATION(environ) +AC_CHECK_DECLS([fprintf, strstr, sbrk, getenv, environ, getc_unlocked]) BFD_BINARY_FOPEN @@ -119,7 +181,7 @@ BFD_BINARY_FOPEN if test -n "$enable_targets"; then for targ in `echo $enable_targets | sed 's/,/ /g'` do - result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null` + result=`$ac_config_sub $targ 2>/dev/null` if test -n "$result"; then canon_targets="$canon_targets $result" else @@ -138,6 +200,7 @@ DLLTOOL_DEFS= BUILD_WINDRES= BUILD_DLLWRAP= BUILD_MISC= +OBJDUMP_DEFS= for targ in $target $canon_targets do @@ -149,7 +212,7 @@ do else case $targ in changequote(,)dnl - i[3456]86*-*-netware*) + i[3-7]86*-*-netware*) changequote([,])dnl BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386" @@ -171,42 +234,77 @@ changequote([,])dnl *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; esac case $targ in - arm-*pe*) + arm-epoc-pe*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; + arm-*-pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - ;; - thumb-*pe*) + ;; + thumb-*-pe*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - ;; + ;; + arm*-* | xscale-* | strongarm-* | d10v-*) + OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" + ;; changequote(,)dnl - i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) + i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*) changequote([,])dnl BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' - ;; - powerpc*-*-*pe* | powerpc*-*-cygwin*) + ;; +changequote(,)dnl + i[3-7]86-*-interix) +changequote([,])dnl + BUILD_DLLTOOL='$(DLLTOOL_PROG)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" + ;; +changequote(,)dnl + powerpc*-aix5.[01]) +changequote([,])dnl + ;; + powerpc*-aix5.*) + OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT" + ;; + powerpc*-*-pe* | powerpc*-*-cygwin*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - ;; - mcore-*pe) + ;; + sh*-*-pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; + mips*-*-pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; + mcore-*-pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - ;; - mcore-*elf) + ;; + mcore-*-elf) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF" - ;; + ;; esac fi done +if test "${with_windres+set}" = set; then + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' +fi + AC_SUBST(NLMCONV_DEFS) AC_SUBST(BUILD_NLMCONV) AC_SUBST(BUILD_SRCONV) @@ -215,6 +313,7 @@ AC_SUBST(DLLTOOL_DEFS) AC_SUBST(BUILD_WINDRES) AC_SUBST(BUILD_DLLWRAP) AC_SUBST(BUILD_MISC) +AC_SUBST(OBJDUMP_DEFS) AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) @@ -225,9 +324,30 @@ if test "x$targ_underscore" = "xyes"; then else UNDERSCORE=0 fi -AC_SUBST(UNDERSCORE) +AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE, + [Define to 1 if user symbol names have a leading underscore, 0 if not.]) + +# Emulation +for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` +do + # Canonicalize the secondary target names. + result=`$ac_config_sub $targ_alias 2>/dev/null` + if test -n "$result"; then + targ=$result + else + targ=$targ_alias + fi + + . ${srcdir}/configure.tgt + + EMULATION=$targ_emul + EMULATION_VECTOR=$targ_emul_vector +done + +AC_SUBST(EMULATION) +AC_SUBST(EMULATION_VECTOR) -AC_OUTPUT(Makefile po/Makefile.in:po/Make-in, +AC_OUTPUT(Makefile doc/Makefile po/Makefile.in:po/Make-in, [ case "x$CONFIG_FILES" in *) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;