gold/
[deliverable/binutils-gdb.git] / gold / configure.ac
index a6d1a59c0b9c496b4860030159cc96e44058f363..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,7 @@ fi
 
 AC_LANG_POP(C++)
 
+AC_CHECK_HEADERS(locale.h)
 AC_CHECK_FUNCS(setlocale)
 AM_LC_MESSAGES
 
This page took 0.02257 seconds and 4 git commands to generate.