gold/
[deliverable/binutils-gdb.git] / gold / configure.ac
index edc591737f17d5c5b3219d0b75ecf29754de0655..a2c4875eb422b893087d71d9e563d58fe82aad5e 100644 (file)
@@ -11,6 +11,15 @@ AM_INIT_AUTOMAKE([no-dist parallel-tests])
 
 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])
@@ -45,7 +54,7 @@ dnl "installed_linker" is the installed gold linker name.
 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
     ;;
@@ -536,6 +545,10 @@ fi
 
 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)
This page took 0.022529 seconds and 4 git commands to generate.