r18447: make sure we bail out if the config.h is not generated
authorStefan Metzmacher <metze@samba.org>
Wed, 13 Sep 2006 09:23:05 +0000 (09:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:31 +0000 (14:18 -0500)
by samba's configure.

this could happen when you have done a standalone build in
lib/replace/, lib/talloc, ...

metze
(This used to be commit d8e88386748d3952c6a82726c9d36cad870992fd)

source4/configure.ac
source4/include/includes.h

index 813a333c1448f62a7ec28894db9812a5a11c59c5..1a00c97049f46875b64c3e5899e7c12332fab50d 100644 (file)
@@ -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)
index dc7db5d3bb1b577e4d6a1d04b1cf8684c0b3d369..5850103145cb7253c203e6addd0aef9ce5559073 100644 (file)
 
 #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__