summaryrefslogtreecommitdiff
path: root/opcodes/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/configure.in')
-rw-r--r--opcodes/configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 9c848167eb..dadfe4ae5a 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -45,6 +45,15 @@ 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])
+
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi