AM_CONFIG_HEADER(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])
+
AC_ARG_WITH(sysroot,
[ --with-sysroot[=DIR] search for usr/lib et al within DIR],
[sysroot=$withval], [sysroot=no])
default_ld=
AC_ARG_ENABLE(ld,
[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
-[case "${enableval}" in
+[case "${enableval}" in
default)
default_ld=ld.bfd
;;
AC_LANG_POP(C++)
+AC_CHECK_HEADERS(locale.h)
+AC_CHECK_FUNCS(setlocale)
+AM_LC_MESSAGES
+
AM_MAINTAINER_MODE
AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in)