summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2008-10-16 16:18:10 -0400
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2008-10-16 16:18:10 -0400
commitee91b5e0ed9465a711e52cce2f549a6de591d9a9 (patch)
tree9f2bd98030e19c7a3167081081a301cdd06d2cab
parent704713555489348b6c2f46cf2b3f44d02b58dbe6 (diff)
downloadlibchamplain-ee91b5e0ed9465a711e52cce2f549a6de591d9a9.tar.gz
Force to only include <champlain/champlain.h>
-rw-r--r--champlain/Makefile.am2
-rw-r--r--champlain/champlain.h4
-rw-r--r--champlain/champlaindefines.h4
-rw-r--r--champlain/champlainlayer.h4
-rw-r--r--champlain/champlainmarker.h4
-rw-r--r--champlain/champlainview.h4
6 files changed, 21 insertions, 1 deletions
diff --git a/champlain/Makefile.am b/champlain/Makefile.am
index 518cf65..38d7ef5 100644
--- a/champlain/Makefile.am
+++ b/champlain/Makefile.am
@@ -53,7 +53,7 @@ libchamplain_include_HEADERS = champlain.h champlainview.h champlaindefines.h ch
libchamplain_0_2_la_LDFLAGS= -version-info $(LIBRARY_VERSION)
-AM_CPPFLAGS = $(DEPS_CFLAGS) -DDATADIR=\""$(datadir)"\" -I$(top_srcdir)/tidy -I$(top_srcdir)
+AM_CPPFLAGS = $(DEPS_CFLAGS) -DDATADIR=\""$(datadir)"\" -I$(top_srcdir)/tidy -I$(top_srcdir) -DCHAMPLAIN_COMPILATION
AM_LDFLAGS = $(DEPS_LIBS) -export-dynamic -export-symbols-regex ^champlain_.*
svgdir = $(datadir)/champlain
diff --git a/champlain/champlain.h b/champlain/champlain.h
index cdaf714..4acdb2b 100644
--- a/champlain/champlain.h
+++ b/champlain/champlain.h
@@ -19,6 +19,8 @@
#ifndef CHAMPLAIN_H
#define CHAMPLAIN_H
+#define __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
+
#define CHAMPLAIN_MIN_LAT -90
#define CHAMPLAIN_MAX_LAT 90
#define CHAMPLAIN_MIN_LONG -180
@@ -31,4 +33,6 @@
#include <champlain/champlainmarker.h>
#include <champlain/champlainlayer.h>
+#undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
+
#endif
diff --git a/champlain/champlaindefines.h b/champlain/champlaindefines.h
index c0f6533..9c3ea97 100644
--- a/champlain/champlaindefines.h
+++ b/champlain/champlaindefines.h
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
+#error "Only <champlain/champlain.h> can be included directly."
+#endif
+
#ifndef CHAMPLAIN_DEFINES_H
#define CHAMPLAIN_DEFINES_H
diff --git a/champlain/champlainlayer.h b/champlain/champlainlayer.h
index 99c4a91..f22e4b3 100644
--- a/champlain/champlainlayer.h
+++ b/champlain/champlainlayer.h
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
+#error "Only <champlain/champlain.h> can be included directly."
+#endif
+
#ifndef CHAMPLAIN_LAYER_H
#define CHAMPLAIN_LAYER_H
diff --git a/champlain/champlainmarker.h b/champlain/champlainmarker.h
index badb41d..8853caf 100644
--- a/champlain/champlainmarker.h
+++ b/champlain/champlainmarker.h
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
+#error "Only <champlain/champlain.h> can be included directly."
+#endif
+
#ifndef CHAMPLAIN_MARKER_H
#define CHAMPLAIN_MARKER_H
diff --git a/champlain/champlainview.h b/champlain/champlainview.h
index 581c1a8..88810f2 100644
--- a/champlain/champlainview.h
+++ b/champlain/champlainview.h
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
+#error "Only <champlain/champlain.h> can be included directly."
+#endif
+
#ifndef CHAMPLAIN_VIEW_H
#define CHAMPLAIN_VIEW_H