Author: metze Date: 2006-09-13 09:23:05 +0000 (Wed, 13 Sep 2006) New Revision: 18447
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18447 Log: make sure we bail out if the config.h is not generated by samba's configure. this could happen when you have done a standalone build in lib/replace/, lib/talloc, ... metze Modified: branches/SAMBA_4_0/source/configure.ac branches/SAMBA_4_0/source/include/includes.h Changeset: Modified: branches/SAMBA_4_0/source/configure.ac =================================================================== --- branches/SAMBA_4_0/source/configure.ac 2006-09-13 09:03:42 UTC (rev 18446) +++ branches/SAMBA_4_0/source/configure.ac 2006-09-13 09:23:05 UTC (rev 18447) @@ -8,6 +8,7 @@ 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) Modified: branches/SAMBA_4_0/source/include/includes.h =================================================================== --- branches/SAMBA_4_0/source/include/includes.h 2006-09-13 09:03:42 UTC (rev 18446) +++ branches/SAMBA_4_0/source/include/includes.h 2006-09-13 09:23:05 UTC (rev 18447) @@ -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__