X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfigure.in;h=02e8e53af4feccce0c2616767995d55ce282e72f;hb=36fc76aebb7315571094d66b35e13d69d512fbe2;hp=580e7d0ef2d4f27c5c4983f05e1213628cdcbe81;hpb=1ad12f975f8a2a0ce45569ea3f550ef25705ad37;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/configure.in b/gas/configure.in index 580e7d0ef2..02e8e53af4 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -22,22 +22,15 @@ AM_INIT_AUTOMAKE(gas, ${BFD_VERSION}) AM_PROG_LIBTOOL -user_bfd_gas= -AC_ARG_ENABLE(bfd-assembler, -[ --enable-bfd-assembler use BFD back end for writing object files], -[case "${enableval}" in - yes) need_bfd=yes user_bfd_gas=yes ;; - no) user_bfd_gas=no ;; - *) AC_MSG_ERROR(bad value ${enableval} given for bfd-assembler option) ;; -esac])dnl AC_ARG_ENABLE(targets, -[ targets alternative target configurations besides the primary], +[ --enable-targets alternative target configurations besides the primary], [case "${enableval}" in yes | "") AC_ERROR(enable-targets option must specify target names or 'all') ;; no) enable_targets= ;; *) enable_targets=$enableval ;; esac])dnl + AC_ARG_ENABLE(commonbfdlib, [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library], [case "${enableval}" in @@ -46,44 +39,23 @@ AC_ARG_ENABLE(commonbfdlib, *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; esac])dnl -using_cgen=no - -build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - -AC_ARG_ENABLE(error-on-warning, - [ --enable-error-on-warning treat compile warnings as errors], - [case "${enableval}" in - yes | y) ERROR_ON_WARNING="yes" ;; - no | n) ERROR_ON_WARNING="no" ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;; - esac]) - -# Enable -Werror by default, suppressing it only for --disable-error-on-warning -# or --disable-build-warnings. -if test "${ERROR_ON_WARNING}" != no -then - build_warnings="$build_warnings -Werror" +ac_checking=yes +if grep '^RELEASE=y' ${srcdir}/../bfd/Makefile.am >/dev/null 2>/dev/null ; then + ac_checking= fi - -AC_ARG_ENABLE(build-warnings, -[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +AC_ARG_ENABLE(checking, +[ --enable-checking enable run-time checks], [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}" + no|none) ac_checking= ;; + *) ac_checking=yes ;; +esac])dnl +if test x$ac_checking != x ; then + AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.]) fi -AC_SUBST(WARN_CFLAGS) + +using_cgen=no + +AM_BINUTILS_WARNINGS # Generate a header file AM_CONFIG_HEADER(config.h:config.in) @@ -177,7 +149,7 @@ for this_target in $target $canon_targets ; do AC_DEFINE(AIX_WEAK_SUPPORT, 1, [Define if using AIX 5.2 value for C_WEAKEXT.]) ;; - ppc-*-linux-gnu*) + ppc-*-linux-*) case "$endian" in big) ;; *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;; @@ -281,6 +253,9 @@ changequote([,])dnl mips*-linux*) mips_default_abi=O32_ABI ;; + mips64*-openbsd*) + mips_default_abi=N64_ABI + ;; *) mips_default_abi=NO_ABI ;; @@ -298,7 +273,7 @@ changequote([,])dnl # Do we need the opcodes library? case ${cpu_type} in - vax | i386 | tic30) + vax | tic30) ;; *) @@ -309,19 +284,31 @@ changequote([,])dnl *opcodes*) shared_opcodes=true ;; *) shared_opcodes=false ;; esac - if test "${shared_opcodes}" = "true"; then - # A shared libopcodes must be linked against libbfd. - need_bfd=yes - fi ;; esac # Any other special object files needed ? case ${cpu_type} in + + bfin) + echo ${extra_objects} | grep -s "bfin-parse.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects bfin-parse.o" + fi + + echo ${extra_objects} | grep -s "bfin-lex.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects bfin-lex.o" + fi + ;; + fr30 | ip2k | iq2000 | m32r | openrisc) using_cgen=yes ;; + m32c) + using_cgen=yes + ;; frv) using_cgen=yes ;; @@ -332,23 +319,31 @@ changequote([,])dnl esac ;; + mep) + using_cgen=yes + ;; + 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 - 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 - 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 ;; + mt) + using_cgen=yes + ;; + i386 | s390 | sparc) if test $this_target = $target ; then AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) @@ -359,6 +354,10 @@ changequote([,])dnl using_cgen=yes ;; + xc16x) + using_cgen=yes + ;; + xtensa) echo ${extra_objects} | grep -s "xtensa-relax.o" if test $? -ne 0 ; then @@ -380,17 +379,8 @@ changequote([,])dnl # See if we really can support this configuration with the emulation code. if test $this_target = $target ; then - primary_bfd_gas=$bfd_gas obj_format=$fmt te_file=$em - - if test $bfd_gas = no ; then - # Can't support other configurations this way. - break - fi - elif test $bfd_gas = no ; then - # Can't support this configuration. - break fi # From target name and format, produce a list of supported emulations. @@ -446,6 +436,19 @@ if test ${all_targets} = "yes"; then ;; 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 @@ -453,8 +456,7 @@ fi # 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 @@ -484,27 +486,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) fi -case ${user_bfd_gas}-${primary_bfd_gas} in - yes-yes | no-no) - # We didn't override user's choice. - ;; - no-yes) - AC_MSG_WARN(Use of BFD is required for ${target}; overriding config options.) - ;; - no-preferred) - primary_bfd_gas=no - ;; - *-preferred) - primary_bfd_gas=yes - ;; - yes-*) - primary_bfd_gas=yes - ;; - -*) - # User specified nothing. - ;; -esac - # Some COFF configurations want these random other flags set. case ${obj_format} in coff) @@ -512,13 +493,14 @@ 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?]) ;; + x86_64) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;; esac ;; esac # Getting this done right is going to be a bitch. Each configuration specified -# with --enable-targets=... should be checked for environment, format, cpu, and -# bfd_gas setting. +# with --enable-targets=... should be checked for environment, format, cpu +# setting. # # For each configuration, the necessary object file support code must be linked # in. This might be only one, it might be up to four. The necessary emulation @@ -561,8 +543,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?]) ;; - hp300) AC_DEFINE(OBJ_MAYBE_HP300, 1, [HP300 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" @@ -585,12 +565,6 @@ AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.]) AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION", [Default emulation.]) -case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in - yes-*-coff) need_bfd=yes ;; - no-*-coff) need_bfd=yes - AC_DEFINE(MANY_SEGMENTS, 1, [old COFF support?]) ;; -esac - reject_dev_configs=yes case ${reject_dev_configs}-${dev} in @@ -606,11 +580,6 @@ AC_SUBST(install_tooldir) AC_SUBST(atof) dnl AC_SUBST(emulation) -case "${primary_bfd_gas}" in - yes) AC_DEFINE(BFD_ASSEMBLER, 1, [Use BFD interface?]) - need_bfd=yes ;; -esac - # do we need the opcodes library? case "${need_opcodes}" in yes) @@ -618,20 +587,8 @@ yes) ;; esac -case "${need_bfd}" in -yes) - BFDLIB=../bfd/libbfd.la - BFDVER_H=../bfd/bfdver.h - ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h' - ;; -esac - -AC_SUBST(BFDLIB) 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.]) @@ -643,10 +600,12 @@ AC_PROG_CC AC_PROG_YACC AM_PROG_LEX -ALL_LINGUAS="fr tr es" -CY_GNU_GETTEXT +ALL_LINGUAS="fr tr es rw" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS AM_MAINTAINER_MODE +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) @@ -675,7 +634,7 @@ AC_CHECK_FUNCS(sbrk) # do we need the math library? case "${need_libm}" in -yes) +yes) AC_CHECK_LIBM AC_SUBST(LIBM) ;; @@ -707,11 +666,6 @@ gas_test_headers=" #include #endif " -GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) # Does errno.h declare errno, or do we have to add a separate declaration # for it? @@ -721,6 +675,32 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [ #endif ]) +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h, +[AC_TRY_COMPILE([#include ], [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 + AC_DEFINE([HAVE_DECL_GETOPT], 1, + [Is the prototype for getopt in in the expected format?]) +fi + +GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) +GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) +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) + +AC_CHECK_DECLS([vsnprintf]) + +BFD_BINARY_FOPEN + +dnl Required for html and install-html targets. +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) + dnl This must come last. dnl We used to make symlinks to files in the source directory, but now @@ -738,9 +718,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 - 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}