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)
#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__