X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fconfigure.in;h=ee12be347ed9ef120c70ad2fed4c76469957e04d;hb=198ce79b6b8e11c56a270eb3686574b87b0e7c75;hp=73dbde8e14729b1e6b7f53f1ee18e732f86648b5;hpb=4c2cea9dbd2fd068337a6e893ac56cdcc0af4a08;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/configure.in b/binutils/configure.in index 73dbde8e14..ee12be347e 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.5) +AC_PREREQ(2.13) 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,27 @@ AC_ARG_ENABLE(commonbfdlib, *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; esac])dnl +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_CONFIG_HEADER(config.h:config.in) if test -z "$target" ; then @@ -43,8 +68,13 @@ ALL_LINGUAS= CY_GNU_GETTEXT AM_MAINTAINER_MODE -AM_CYGWIN32 -AM_EXEEXT +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.]) # host-specific stuff: @@ -56,14 +86,24 @@ AC_SUBST(HDEFINES) AR=${AR-ar} AC_SUBST(AR) AC_PROG_RANLIB -AM_PROG_INSTALL +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) + +# Some systems have frexp only in -lm, not in -lc. +AC_SEARCH_LIBS(frexp, m) AC_MSG_CHECKING(for time_t in time.h) AC_CACHE_VAL(bu_cv_decl_time_t_time_h, @@ -71,7 +111,8 @@ AC_CACHE_VAL(bu_cv_decl_time_t_time_h, bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)]) AC_MSG_RESULT($bu_cv_decl_time_t_time_h) if test $bu_cv_decl_time_t_time_h = yes; then - AC_DEFINE([HAVE_TIME_T_IN_TIME_H]) + AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1, + [Is the type time_t defined in ?]) fi AC_MSG_CHECKING(for time_t in sys/types.h) @@ -80,7 +121,8 @@ AC_CACHE_VAL(bu_cv_decl_time_t_types_h, bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)]) AC_MSG_RESULT($bu_cv_decl_time_t_types_h) if test $bu_cv_decl_time_t_types_h = yes; then - AC_DEFINE([HAVE_TIME_T_IN_TYPES_H]) + AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1, + [Is the type time_t defined in ?]) fi # Under Next 3.2 apparently does not define struct utimbuf @@ -96,13 +138,14 @@ AC_CACHE_VAL(bu_cv_header_utime_h, bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)]) AC_MSG_RESULT($bu_cv_header_utime_h) if test $bu_cv_header_utime_h = yes; then - AC_DEFINE(HAVE_GOOD_UTIME_H) + 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) BFD_BINARY_FOPEN @@ -112,7 +155,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 @@ -129,6 +172,9 @@ BUILD_SRCONV= BUILD_DLLTOOL= DLLTOOL_DEFS= BUILD_WINDRES= +BUILD_DLLWRAP= +BUILD_MISC= +OBJDUMP_DEFS= for targ in $target $canon_targets do @@ -162,36 +208,79 @@ 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*) 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-*-cygwin32* | i[3-6]86-*-mingw32*) + i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) changequote([,])dnl BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - ;; - powerpc*-*-*pe* | powerpc*-*-cygwin32) + BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' + ;; + i[3-6]86-*-interix) + BUILD_DLLTOOL='$(DLLTOOL_PROG)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" + ;; + powerpc*-*-*pe* | powerpc*-*-cygwin*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - ;; + ;; + 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) + 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) AC_SUBST(BUILD_DLLTOOL) 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}") +AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) targ=$target . $srcdir/../bfd/config.bfd @@ -202,5 +291,9 @@ else fi AC_SUBST(UNDERSCORE) -AC_OUTPUT(Makefile po/Makefile.in:po/Make-in, -[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]) +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 ;; +esac +])