summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/configure.ac1
-rw-r--r--source4/include/includes.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/configure.ac b/source4/configure.ac
index 813a333c14..1a00c97049 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -8,6 +8,7 @@ AC_INIT([samba],[],[samba-technical@samba.org])
AC_CONFIG_SRCDIR([include/includes.h])
AC_CONFIG_HEADER(include/config_tmp.h)
+AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h])
# Configuration rules.
m4_include(lib/replace/libreplace.m4)
diff --git a/source4/include/includes.h b/source4/include/includes.h
index dc7db5d3bb..5850103145 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -23,8 +23,15 @@
#ifndef NO_CONFIG_H /* for some tests */
#include "lib/replace/replace.h"
+
+/* make sure we have included the correct config.h */
+#ifndef CONFIG_H_IS_FROM_SAMBA
+#warn "make sure you have removed all config.h files from standalone builds!"
+#error "the included config.h isn't from samba!"
#endif
+#endif /* NO_CONFIG_H */
+
#include "local.h"
#ifdef __GNUC__