+AC_ARG_ENABLE(leading-mingw64-underscores,
+ AS_HELP_STRING([--enable-leading-mingw64-underscores],
+ [Enable leading underscores on 64 bit mingw targets]),
+ [],[])
+AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ],
+ [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1,
+ [Define if we should use leading underscore on 64 bit mingw targets])])
+
+DEBUGDIR=${libdir}/debug
+AC_ARG_WITH(separate-debug-dir,
+ AS_HELP_STRING([--with-separate-debug-dir=DIR],
+ [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]),
+[DEBUGDIR="${withval}"])
+AC_SUBST(DEBUGDIR)
+
+# Check to see if we should allow the generation of
+# symbols with the ELF standard's STT_COMMON type.
+AC_ARG_ENABLE(elf-stt-common,
+[ --enable-elf-stt-common Allow the generation of ELF symbols with the STT_COMMON type],
+[case "${enableval}" in
+ yes) want_elf_stt_common=true ;;
+ no) want_elf_stt_common=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for ELF STT_COMMON option) ;;
+ esac],
+# We have to choose a default behaviour. For native builds we could
+# test whether the loader supports the STT_COMMON type, but that would
+# mean that built binaries could not be exported to older systems where
+# the loader does not support it. So by default we always choose to
+# disable this feature.
+ want_elf_stt_common=false)dnl
+if test $want_elf_stt_common = true; then
+ AC_DEFINE(USE_STT_COMMON, 1,
+ [Define if we may generate symbols with ELF's STT_COMMON type])
+fi
+
+ACX_PKGVERSION([GNU Binutils])
+ACX_BUGURL([http://www.sourceware.org/bugzilla/])
+
+AM_BINUTILS_WARNINGS
+
+AC_CONFIG_HEADERS(config.h:config.in)
+
+# PR 14072
+AH_VERBATIM([00_CONFIG_H_CHECK],
+[/* Check that config.h is #included before system headers
+ (this works only for glibc, but that should be enough). */
+#if defined(__GLIBC__) && !defined(__CONFIG_H__)
+# error config.h must be #included before system headers
+#endif
+#define __CONFIG_H__ 1])