summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-03 08:55:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:53 -0500
commita328e2f9970a221227df79e361752ae776120f46 (patch)
tree7c0a84f560689d42dc5298b2c0b7da3906de9607 /source3
parentbf4e44d6468de2a4a4f56bc0d81580c1d0aabccf (diff)
downloadsamba-a328e2f9970a221227df79e361752ae776120f46.tar.gz
samba-a328e2f9970a221227df79e361752ae776120f46.tar.bz2
samba-a328e2f9970a221227df79e361752ae776120f46.zip
r20501: Check in config.h fix from Michael Adam <ma@sernet.de>
(This used to be commit d10dd47fb8908a4372aa6932e40b23189784522c)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in1
-rw-r--r--source3/include/includes.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 0d169b18d4..b40e8aa8c0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4,6 +4,7 @@ dnl We must use autotools 2.53 or above
AC_PREREQ(2.53)
AC_INIT(include/includes.h)
AC_CONFIG_HEADER(include/config.h)
+AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h])
SMB_VERSION_STRING=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 538bdd75ec..b341d1ee95 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -28,6 +28,14 @@
#include "lib/replace/replace.h"
+/* make sure we have included the correct config.h */
+#ifndef NO_CONFIG_H /* for some tests */
+#ifndef CONFIG_H_IS_FROM_SAMBA
+#error "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 */
+
/* only do the C++ reserved word check when we compile
to include --with-developer since too many systems
still have comflicts with their header files (e.g. IRIX 6.4) */