*) enable_targets=$enableval ;;
esac])dnl
+AC_ARG_ENABLE(64_bit_archive,
+ AS_HELP_STRING([--enable-64-bit-archive],
+ [force 64-bit archives]),
+[case "${enableval}" in
+ yes) want_64_bit_archive=true ;;
+ no) want_64_bit_archive=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-archive option) ;;
+esac],[want_64_bit_archive=unset])dnl
+
AC_ARG_WITH(mmap,
[ --with-mmap try using mmap for BFD input files if available],
[case "${withval}" in
selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
fi # all_targets is true
+if test "x$want_64_bit_archive" = xunset; then
+ # 64-bit MIPS and s390 ELF targets use 64-bit archives.
+ case "${bfd_backends}" in
+ *elf64-mips* | *elf64-s390*)
+ want_64_bit_archive=true
+ ;;
+ esac
+fi
+
+# 64-bit archives need a 64-bit bfd_vma.
+if test "x$want_64_bit_archive" = xtrue; then
+ want64=true
+ AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
+ [Define if we should use 64-bit archives.])
+fi
+
case ${host64}-${target64}-${want64} in
*true*)
wordsize=64