[libchamplain] Many changes in build process
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Many changes in build process
- Date: Sun, 25 Apr 2010 19:59:02 +0000 (UTC)
commit 1ea004326266e2a26d02942bf26c308f28b45553
Author: JiÅ?Ã Techet <techet gmail com>
Date: Sat Apr 17 22:19:59 2010 +0200
Many changes in build process
* make libchamplain independent of memphis so it can be built without it
* automatically generate library name based on version in autoconf configuration
* some necessary updates in python bindings
* minor updates everywhere
Signed-off-by: JiÅ?Ã Techet <techet gmail com>
Makefile.am | 25 ++-
bindings/python/Makefile.am | 2 +-
bindings/python/champlain-gtk/Makefile.am | 16 +-
.../python/champlain-gtk/pychamplaingtk-base.defs | 4 +-
bindings/python/champlain/Makefile.am | 60 ++++-
bindings/python/champlain/pychamplain-base.defs | 243 ------------------
.../python/champlain/pychamplain-boxed-types.defs | 12 -
bindings/python/champlain/pychamplain.override | 60 -----
.../python/champlain/pychamplainmemphis-base.defs | 258 ++++++++++++++++++++
.../champlain/pychamplainmemphis-boxed-types.defs | 14 +
bindings/python/champlain/pychamplainmemphis.defs | 4 +
bindings/python/champlain/pychamplainmemphis.h | 7 +
.../python/champlain/pychamplainmemphis.override | 81 ++++++
.../python/champlain/pychamplainmemphismodule.c | 27 ++
.../{update-binding.sh => update-binding.sh.in} | 26 ++-
champlain-gtk.pc.in | 6 +-
champlain-gtk/Makefile.am | 28 +-
champlain-memphis-uninstalled.pc.in | 11 +
champlain-memphis.pc.in | 11 +
champlain-uninstalled.pc.in | 4 +-
champlain.pc.in | 6 +-
champlain/Makefile.am | 74 ++++---
champlain/champlain-file-cache.c | 2 +-
champlain/champlain-map-source-factory.c | 12 +
champlain/champlain-map-source-factory.h | 5 +-
champlain/champlain-memphis.h | 36 +++
champlain/champlain.h | 7 +-
configure.ac | 165 ++++++++-----
demos/Makefile.am | 26 +-
demos/local-rendering.c | 1 +
m4/acinclude.m4 | 32 +++
31 files changed, 789 insertions(+), 476 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6599348..b1abb73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,20 +2,29 @@ SUBDIRS = tidy champlain docs/reference
ACLOCAL_AMFLAGS = -I m4
-pcfiles = champlain- API_VERSION@.pc
-other_pcfiles = champlain- API_VERSION@-uninstalled.pc
-champlain- API_VERSION@.pc: champlain.pc
+pcfiles = champlain- CHAMPLAIN_API_VERSION@.pc
+other_pcfiles = champlain- CHAMPLAIN_API_VERSION@-uninstalled.pc
+champlain- CHAMPLAIN_API_VERSION@.pc: champlain.pc
@cp -f $< $@
-champlain- API_VERSION@-uninstalled.pc: champlain-uninstalled.pc
+champlain- CHAMPLAIN_API_VERSION@-uninstalled.pc: champlain-uninstalled.pc
@cp -f $< $@
if ENABLE_GTK
SUBDIRS += champlain-gtk docs/reference-gtk
-pcfiles += champlain-gtk- API_VERSION@.pc
-champlain-gtk- API_VERSION@.pc: champlain-gtk.pc
+pcfiles += champlain-gtk- CHAMPLAIN_API_VERSION@.pc
+champlain-gtk- CHAMPLAIN_API_VERSION@.pc: champlain-gtk.pc
@cp -f $< $@
-other_pcfiles += champlain-gtk- API_VERSION@-uninstalled.pc
-champlain-gtk- API_VERSION@-uninstalled.pc: champlain-gtk-uninstalled.pc
+other_pcfiles += champlain-gtk- CHAMPLAIN_API_VERSION@-uninstalled.pc
+champlain-gtk- CHAMPLAIN_API_VERSION@-uninstalled.pc: champlain-gtk-uninstalled.pc
+ @cp -f $< $@
+endif
+
+if ENABLE_MEMPHIS
+pcfiles += champlain-memphis- CHAMPLAIN_API_VERSION@.pc
+champlain-memphis- CHAMPLAIN_API_VERSION@.pc: champlain-memphis.pc
+ @cp -f $< $@
+other_pcfiles += champlain-memphis- CHAMPLAIN_API_VERSION@-uninstalled.pc
+champlain-memphis- CHAMPLAIN_API_VERSION@-uninstalled.pc: champlain-memphis-uninstalled.pc
@cp -f $< $@
endif
diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index b7256ef..9eb2262 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -4,4 +4,4 @@ if ENABLE_GTK
SUBDIRS += champlain-gtk
endif
-DIST_SUBDIRS= champlain champlain-gtk demos
+DIST_SUBDIRS = champlain champlain-gtk demos
diff --git a/bindings/python/champlain-gtk/Makefile.am b/bindings/python/champlain-gtk/Makefile.am
index 0df598f..1722287 100644
--- a/bindings/python/champlain-gtk/Makefile.am
+++ b/bindings/python/champlain-gtk/Makefile.am
@@ -7,7 +7,12 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/champlain \
-I$(top_srcdir) \
-DDATADIR=\""$(datadir)"\" \
+ $(DEPS_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(MEMPHIS_CFLAGS) \
$(PYTHON_BINDING_CFLAGS) \
+ $(PYTHON_BINDING_GTK_CFLAGS) \
+ $(PYTHON_BINDING_MEMPHIS_CFLAGS) \
$(PYTHON_INCLUDES) \
$(WARN_CFLAGS)
@@ -22,9 +27,14 @@ champlaingtk_la_SOURCES = \
pychamplaingtk.c
champlaingtk_la_LIBADD = \
- $(PYTHON_BINDING_LIBS) \
- $(top_builddir)/champlain/libchamplain-0.5.la \
- $(top_builddir)/champlain-gtk/libchamplain-gtk-0.5.la
+ $(PYTHON_BINDING_LIBS) \
+ $(PYTHON_BINDING_GTK_LIBS) \
+ $(PYTHON_BINDING_MEMPHIS_LIBS) \
+ $(DEPS_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(MEMPHIS_CFLAGS) \
+ $(top_builddir)/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la \
+ $(top_builddir)/champlain-gtk/libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
champlaingtk_la_LDFLAGS = \
-module -avoid-version
diff --git a/bindings/python/champlain-gtk/pychamplaingtk-base.defs b/bindings/python/champlain-gtk/pychamplaingtk-base.defs
index da5e8a0..affb795 100644
--- a/bindings/python/champlain-gtk/pychamplaingtk-base.defs
+++ b/bindings/python/champlain-gtk/pychamplaingtk-base.defs
@@ -23,12 +23,12 @@
;; From gtk-champlain-embed.h
-(define-function gtk_champlain_embed_get_type
+(define-function get_type
(c-name "gtk_champlain_embed_get_type")
(return-type "GType")
)
-(define-function gtk_champlain_embed_new
+(define-function new
(c-name "gtk_champlain_embed_new")
(is-constructor-of "GtkChamplainEmbed")
(return-type "GtkWidget*")
diff --git a/bindings/python/champlain/Makefile.am b/bindings/python/champlain/Makefile.am
index c8a7619..faecf61 100644
--- a/bindings/python/champlain/Makefile.am
+++ b/bindings/python/champlain/Makefile.am
@@ -7,44 +7,82 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/champlain \
-I$(top_srcdir) \
-DDATADIR=\""$(datadir)"\" \
+ $(DEPS_CFLAGS) \
+ $(MEMPHIS_CFLAGS) \
$(PYTHON_INCLUDES) \
$(PYTHON_BINDING_CFLAGS) \
+ $(PYTHON_BINDING_GTK_CFLAGS) \
+ $(PYTHON_BINDING_MEMPHIS_CFLAGS) \
$(WARN_CFLAGS)
-BUILT_SOURCES = \
- pychamplain.c
+BUILT_SOURCES = pychamplain.c
+
+if ENABLE_MEMPHIS
+BUILT_SOURCES += pychamplainmemphis.c
+endif
pychamplaindir = $(pyexecdir)
+pychamplainmemphisdir = $(pyexecdir)
+
pychamplain_LTLIBRARIES = champlain.la
+if ENABLE_MEMPHIS
+pychamplain_LTLIBRARIES += champlainmemphis.la
+endif
+
champlain_la_SOURCES = \
pychamplainmodule.c \
pychamplain.c
+champlainmemphis_la_SOURCES = \
+ pychamplainmemphismodule.c \
+ pychamplainmemphis.c
champlain_la_LIBADD = \
+ $(DEPS_LIBS) \
+ $(MEMPHIS_LIBS) \
$(PYTHON_BINDING_LIBS) \
- $(top_builddir)/champlain/libchamplain-0.5.la
+ $(PYTHON_BINDING_GTK_LIBS) \
+ $(PYTHON_BINDING_MEMPHIS_LIBS) \
+ $(top_builddir)/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
+champlainmemphis_la_LIBADD = $(champlain_la_LIBADD)
champlain_la_LDFLAGS = \
-module -avoid-version
+champlainmemphis_la_LDFLAGS = $(champlain_la_LDFLAGS)
+
+codegen_register = \
+ --register $(PYCLUTTERDEFS)/clutter-types.defs \
+ --register $(PYCLUTTERDEFS)/cogl-types.defs \
+ --register $(PYGTKDEFS)/pango-types.defs
pychamplain.c: pychamplain.override pychamplain.defs
- $(PYGOBJECTCODEGEN) \
- --prefix champlain \
- --register $(PYGTKDEFS)/pango-types.defs \
- --register $(PYCLUTTERDEFS)/clutter-types.defs \
- --register $(PYCLUTTERDEFS)/cogl-types.defs \
- --register $(PYMEMPHISDEFS)/memphis-types.defs \
- --override pychamplain.override \
+ $(PYGOBJECTCODEGEN) \
+ $(codegen_register) \
+ --prefix champlain \
+ --override pychamplain.override \
pychamplain.defs > $@
+pychamplainmemphis.c: pychamplainmemphis.override pychamplainmemphis.defs
+ $(PYGOBJECTCODEGEN) \
+ $(codegen_register) \
+ --register $(PYMEMPHISDEFS)/memphis-types.defs \
+ --register pychamplain.defs \
+ --prefix champlainmemphis \
+ --override pychamplainmemphis.override \
+ pychamplainmemphis.defs > $@
+
EXTRA_DIST = \
pychamplain.override \
pychamplain-constructors.defs \
pychamplain-boxed-types.defs \
pychamplain-base.defs \
pychamplain.defs \
- pychamplain.h
+ pychamplain.h \
+ pychamplainmemphis.override \
+ pychamplainmemphis-boxed-types.defs \
+ pychamplainmemphis-base.defs \
+ pychamplainmemphis.defs \
+ pychamplainmemphis.h
CLEANFILES = $(BUILT_SOURCES)
diff --git a/bindings/python/champlain/pychamplain-base.defs b/bindings/python/champlain/pychamplain-base.defs
index 6c0c2dd..c6907b9 100644
--- a/bindings/python/champlain/pychamplain-base.defs
+++ b/bindings/python/champlain/pychamplain-base.defs
@@ -33,20 +33,6 @@
(gtype-id "CHAMPLAIN_TYPE_LAYER")
)
-(define-object LocalMapDataSource
- (in-module "Champlain")
- (parent "ChamplainMapDataSource")
- (c-name "ChamplainLocalMapDataSource")
- (gtype-id "CHAMPLAIN_TYPE_LOCAL_MAP_DATA_SOURCE")
-)
-
-(define-object MapDataSource
- (in-module "Champlain")
- (parent "GInitiallyUnowned")
- (c-name "ChamplainMapDataSource")
- (gtype-id "CHAMPLAIN_TYPE_MAP_DATA_SOURCE")
-)
-
(define-object MapSource
(in-module "Champlain")
(parent "GInitiallyUnowned")
@@ -75,20 +61,6 @@
(gtype-id "CHAMPLAIN_TYPE_MARKER")
)
-(define-object MemphisTileSource
- (in-module "Champlain")
- (parent "ChamplainTileSource")
- (c-name "ChamplainMemphisTileSource")
- (gtype-id "CHAMPLAIN_TYPE_MEMPHIS_TILE_SOURCE")
-)
-
-(define-object NetworkMapDataSource
- (in-module "Champlain")
- (parent "ChamplainMapDataSource")
- (c-name "ChamplainNetworkMapDataSource")
- (gtype-id "CHAMPLAIN_TYPE_NETWORK_MAP_DATA_SOURCE")
-)
-
(define-object NetworkTileSource
(in-module "Champlain")
(parent "ChamplainTileSource")
@@ -273,43 +245,6 @@
-;; From champlain-bounding-box.h
-
-(define-function bounding_box_get_type
- (c-name "champlain_bounding_box_get_type")
- (return-type "GType")
-)
-
-(define-function bounding_box_new
- (c-name "champlain_bounding_box_new")
- (is-constructor-of "ChamplainBoundingBox")
- (return-type "ChamplainBoundingBox*")
-)
-
-(define-method copy
- (of-object "ChamplainBoundingBox")
- (c-name "champlain_bounding_box_copy")
- (return-type "ChamplainBoundingBox*")
-)
-
-(define-method free
- (of-object "ChamplainBoundingBox")
- (c-name "champlain_bounding_box_free")
- (return-type "none")
-)
-
-(define-method get_center
- (of-object "ChamplainBoundingBox")
- (c-name "champlain_bounding_box_get_center")
- (return-type "none")
- (parameters
- '("gdouble*" "lat")
- '("gdouble*" "lon")
- )
-)
-
-
-
;; From champlain-defines.h
@@ -458,45 +393,6 @@
-;; From champlain-local-map-data-source.h
-
-(define-function local_map_data_source_get_type
- (c-name "champlain_local_map_data_source_get_type")
- (return-type "GType")
-)
-
-(define-function local_map_data_source_new
- (c-name "champlain_local_map_data_source_new")
- (is-constructor-of "ChamplainLocalMapDataSource")
- (return-type "ChamplainLocalMapDataSource*")
-)
-
-(define-method load_map_data
- (of-object "ChamplainLocalMapDataSource")
- (c-name "champlain_local_map_data_source_load_map_data")
- (return-type "none")
- (parameters
- '("const-gchar*" "map_path")
- )
-)
-
-
-
-;; From champlain-map-data-source.h
-
-(define-function map_data_source_get_type
- (c-name "champlain_map_data_source_get_type")
- (return-type "GType")
-)
-
-(define-method get_map_data
- (of-object "ChamplainMapDataSource")
- (c-name "champlain_map_data_source_get_map_data")
- (return-type "MemphisMap*")
-)
-
-
-
;; From champlain-map-source-chain.h
(define-function map_source_chain_get_type
@@ -1088,145 +984,6 @@
-;; From champlain-memphis-tile-source.h
-
-(define-function memphis_tile_source_get_type
- (c-name "champlain_memphis_tile_source_get_type")
- (return-type "GType")
-)
-
-(define-function memphis_tile_source_new_full
- (c-name "champlain_memphis_tile_source_new_full")
- (return-type "ChamplainMemphisTileSource*")
- (parameters
- '("const-gchar*" "id")
- '("const-gchar*" "name")
- '("const-gchar*" "license")
- '("const-gchar*" "license_uri")
- '("guint" "min_zoom")
- '("guint" "max_zoom")
- '("guint" "tile_size")
- '("ChamplainMapProjection" "projection")
- '("ChamplainMapDataSource*" "map_data_source")
- )
-)
-
-(define-method load_rules
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_load_rules")
- (return-type "none")
- (parameters
- '("const-gchar*" "rules_path")
- )
-)
-
-(define-method set_map_data_source
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_set_map_data_source")
- (return-type "none")
- (parameters
- '("ChamplainMapDataSource*" "map_data_source")
- )
-)
-
-(define-method get_map_data_source
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_get_map_data_source")
- (return-type "ChamplainMapDataSource*")
-)
-
-(define-method get_background_color
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_get_background_color")
- (return-type "ClutterColor*")
-)
-
-(define-method set_background_color
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_set_background_color")
- (return-type "none")
- (parameters
- '("const-ClutterColor*" "color")
- )
-)
-
-(define-method get_rule_ids
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_get_rule_ids")
- (return-type "GList*")
-)
-
-(define-method set_rule
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_set_rule")
- (return-type "none")
- (parameters
- '("MemphisRule*" "rule")
- )
-)
-
-(define-method get_rule
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_get_rule")
- (return-type "MemphisRule*")
- (parameters
- '("const-gchar*" "id")
- )
-)
-
-(define-method remove_rule
- (of-object "ChamplainMemphisTileSource")
- (c-name "champlain_memphis_tile_source_remove_rule")
- (return-type "none")
- (parameters
- '("const-gchar*" "id")
- )
-)
-
-
-
-;; From champlain-network-map-data-source.h
-
-(define-function network_map_data_source_get_type
- (c-name "champlain_network_map_data_source_get_type")
- (return-type "GType")
-)
-
-(define-function network_map_data_source_new
- (c-name "champlain_network_map_data_source_new")
- (is-constructor-of "ChamplainNetworkMapDataSource")
- (return-type "ChamplainNetworkMapDataSource*")
-)
-
-(define-method load_map_data
- (of-object "ChamplainNetworkMapDataSource")
- (c-name "champlain_network_map_data_source_load_map_data")
- (return-type "none")
- (parameters
- '("gdouble" "bound_left")
- '("gdouble" "bound_bottom")
- '("gdouble" "bound_right")
- '("gdouble" "bound_top")
- )
-)
-
-(define-method get_api_uri
- (of-object "ChamplainNetworkMapDataSource")
- (c-name "champlain_network_map_data_source_get_api_uri")
- (return-type "const-gchar*")
-)
-
-(define-method set_api_uri
- (of-object "ChamplainNetworkMapDataSource")
- (c-name "champlain_network_map_data_source_set_api_uri")
- (return-type "none")
- (parameters
- '("const-gchar*" "api_uri")
- )
-)
-
-
-
;; From champlain-network-tile-source.h
(define-function network_tile_source_get_type
diff --git a/bindings/python/champlain/pychamplain-boxed-types.defs b/bindings/python/champlain/pychamplain-boxed-types.defs
index e2f3320..37c03aa 100644
--- a/bindings/python/champlain/pychamplain-boxed-types.defs
+++ b/bindings/python/champlain/pychamplain-boxed-types.defs
@@ -1,18 +1,6 @@
;; -*- scheme -*-
; boxed type definitions ...
-(define-boxed BoundingBox
- (in-module "Champlain")
- (c-name "ChamplainBoundingBox")
- (gtype-id "CHAMPLAIN_TYPE_BOUNDING_BOX")
- (fields
- '("double" "left")
- '("double" "bottom")
- '("double" "right")
- '("double" "top")
- )
-)
-
(define-boxed Point
(in-module "Champlain")
(c-name "ChamplainPoint")
diff --git a/bindings/python/champlain/pychamplain.override b/bindings/python/champlain/pychamplain.override
index d07be4d..719d608 100644
--- a/bindings/python/champlain/pychamplain.override
+++ b/bindings/python/champlain/pychamplain.override
@@ -4,7 +4,6 @@ headers
#include <pygobject.h>
#include <champlain/champlain.h>
#include <clutter/clutter.h>
-#include <memphis/memphis.h>
#include "pychamplain.h"
%%
@@ -492,66 +491,7 @@ _wrap_champlain_point__set_lon(PyGBoxed *self, PyObject *value,
pyg_boxed_get(self, ChamplainPoint)->lon = val;
return 0;
}
-%%
-override-attr ChamplainBoundingBox.left
-static int
-_wrap_champlain_bounding_box__set_left (PyGBoxed *self, PyObject *value,
- void *closure)
-{
- gdouble val;
-
- val = PyFloat_AsDouble(value);
- if (PyErr_Occurred())
- return -1;
-
- pyg_boxed_get(self, ChamplainBoundingBox)->left = val;
- return 0;
-}
-%%
-override-attr ChamplainBoundingBox.right
-static int
-_wrap_champlain_bounding_box__set_right (PyGBoxed *self, PyObject *value,
- void *closure)
-{
- gdouble val;
-
- val = PyFloat_AsDouble(value);
- if (PyErr_Occurred())
- return -1;
- pyg_boxed_get(self, ChamplainBoundingBox)->right = val;
- return 0;
-}
-%%
-override-attr ChamplainBoundingBox.top
-static int
-_wrap_champlain_bounding_box__set_top (PyGBoxed *self, PyObject *value,
- void *closure)
-{
- gdouble val;
-
- val = PyFloat_AsDouble(value);
- if (PyErr_Occurred())
- return -1;
-
- pyg_boxed_get(self, ChamplainBoundingBox)->top = val;
- return 0;
-}
-%%
-override-attr ChamplainBoundingBox.bottom
-static int
-_wrap_champlain_bounding_box__set_bottom (PyGBoxed *self, PyObject *value,
- void *closure)
-{
- gdouble val;
-
- val = PyFloat_AsDouble(value);
- if (PyErr_Occurred())
- return -1;
-
- pyg_boxed_get(self, ChamplainBoundingBox)->bottom = val;
- return 0;
-}
%%
override champlain_selection_layer_get_selected_markers kwargs
static PyObject *
diff --git a/bindings/python/champlain/pychamplainmemphis-base.defs b/bindings/python/champlain/pychamplainmemphis-base.defs
new file mode 100644
index 0000000..f223873
--- /dev/null
+++ b/bindings/python/champlain/pychamplainmemphis-base.defs
@@ -0,0 +1,258 @@
+;; -*- scheme -*-
+; boxed definitions ...
+
+; interface definitions ...
+
+; object definitions ...
+
+(define-object LocalMapDataSource
+ (in-module "Champlain")
+ (parent "ChamplainMapDataSource")
+ (c-name "ChamplainLocalMapDataSource")
+ (gtype-id "CHAMPLAIN_TYPE_LOCAL_MAP_DATA_SOURCE")
+)
+
+(define-object MapDataSource
+ (in-module "Champlain")
+ (parent "GInitiallyUnowned")
+ (c-name "ChamplainMapDataSource")
+ (gtype-id "CHAMPLAIN_TYPE_MAP_DATA_SOURCE")
+)
+
+(define-object MemphisTileSource
+ (in-module "Champlain")
+ (parent "ChamplainTileSource")
+ (c-name "ChamplainMemphisTileSource")
+ (gtype-id "CHAMPLAIN_TYPE_MEMPHIS_TILE_SOURCE")
+)
+
+(define-object NetworkMapDataSource
+ (in-module "Champlain")
+ (parent "ChamplainMapDataSource")
+ (c-name "ChamplainNetworkMapDataSource")
+ (gtype-id "CHAMPLAIN_TYPE_NETWORK_MAP_DATA_SOURCE")
+)
+
+; pointer definitions ...
+
+;; Enumerations and Flags ...
+
+
+;; From champlain-bounding-box.h
+
+(define-function bounding_box_get_type
+ (c-name "champlain_bounding_box_get_type")
+ (return-type "GType")
+)
+
+(define-function bounding_box_new
+ (c-name "champlain_bounding_box_new")
+ (is-constructor-of "ChamplainBoundingBox")
+ (return-type "ChamplainBoundingBox*")
+)
+
+(define-method copy
+ (of-object "ChamplainBoundingBox")
+ (c-name "champlain_bounding_box_copy")
+ (return-type "ChamplainBoundingBox*")
+)
+
+(define-method free
+ (of-object "ChamplainBoundingBox")
+ (c-name "champlain_bounding_box_free")
+ (return-type "none")
+)
+
+(define-method get_center
+ (of-object "ChamplainBoundingBox")
+ (c-name "champlain_bounding_box_get_center")
+ (return-type "none")
+ (parameters
+ '("gdouble*" "lat")
+ '("gdouble*" "lon")
+ )
+)
+
+
+
+;; From champlain-local-map-data-source.h
+
+(define-function local_map_data_source_get_type
+ (c-name "champlain_local_map_data_source_get_type")
+ (return-type "GType")
+)
+
+(define-function local_map_data_source_new
+ (c-name "champlain_local_map_data_source_new")
+ (is-constructor-of "ChamplainLocalMapDataSource")
+ (return-type "ChamplainLocalMapDataSource*")
+)
+
+(define-method load_map_data
+ (of-object "ChamplainLocalMapDataSource")
+ (c-name "champlain_local_map_data_source_load_map_data")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "map_path")
+ )
+)
+
+
+
+;; From champlain-map-data-source.h
+
+(define-function map_data_source_get_type
+ (c-name "champlain_map_data_source_get_type")
+ (return-type "GType")
+)
+
+(define-method get_map_data
+ (of-object "ChamplainMapDataSource")
+ (c-name "champlain_map_data_source_get_map_data")
+ (return-type "MemphisMap*")
+)
+
+
+
+;; From champlain-memphis-tile-source.h
+
+(define-function memphis_tile_source_get_type
+ (c-name "champlain_memphis_tile_source_get_type")
+ (return-type "GType")
+)
+
+(define-function memphis_tile_source_new_full
+ (c-name "champlain_memphis_tile_source_new_full")
+ (return-type "ChamplainMemphisTileSource*")
+ (parameters
+ '("const-gchar*" "id")
+ '("const-gchar*" "name")
+ '("const-gchar*" "license")
+ '("const-gchar*" "license_uri")
+ '("guint" "min_zoom")
+ '("guint" "max_zoom")
+ '("guint" "tile_size")
+ '("ChamplainMapProjection" "projection")
+ '("ChamplainMapDataSource*" "map_data_source")
+ )
+)
+
+(define-method load_rules
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_load_rules")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "rules_path")
+ )
+)
+
+(define-method set_map_data_source
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_set_map_data_source")
+ (return-type "none")
+ (parameters
+ '("ChamplainMapDataSource*" "map_data_source")
+ )
+)
+
+(define-method get_map_data_source
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_get_map_data_source")
+ (return-type "ChamplainMapDataSource*")
+)
+
+(define-method get_background_color
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_get_background_color")
+ (return-type "ClutterColor*")
+)
+
+(define-method set_background_color
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_set_background_color")
+ (return-type "none")
+ (parameters
+ '("const-ClutterColor*" "color")
+ )
+)
+
+(define-method get_rule_ids
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_get_rule_ids")
+ (return-type "GList*")
+)
+
+(define-method set_rule
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_set_rule")
+ (return-type "none")
+ (parameters
+ '("MemphisRule*" "rule")
+ )
+)
+
+(define-method get_rule
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_get_rule")
+ (return-type "MemphisRule*")
+ (parameters
+ '("const-gchar*" "id")
+ )
+)
+
+(define-method remove_rule
+ (of-object "ChamplainMemphisTileSource")
+ (c-name "champlain_memphis_tile_source_remove_rule")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "id")
+ )
+)
+
+
+
+;; From champlain-memphis.h
+
+
+
+;; From champlain-network-map-data-source.h
+
+(define-function network_map_data_source_get_type
+ (c-name "champlain_network_map_data_source_get_type")
+ (return-type "GType")
+)
+
+(define-function network_map_data_source_new
+ (c-name "champlain_network_map_data_source_new")
+ (is-constructor-of "ChamplainNetworkMapDataSource")
+ (return-type "ChamplainNetworkMapDataSource*")
+)
+
+(define-method load_map_data
+ (of-object "ChamplainNetworkMapDataSource")
+ (c-name "champlain_network_map_data_source_load_map_data")
+ (return-type "none")
+ (parameters
+ '("gdouble" "bound_left")
+ '("gdouble" "bound_bottom")
+ '("gdouble" "bound_right")
+ '("gdouble" "bound_top")
+ )
+)
+
+(define-method get_api_uri
+ (of-object "ChamplainNetworkMapDataSource")
+ (c-name "champlain_network_map_data_source_get_api_uri")
+ (return-type "const-gchar*")
+)
+
+(define-method set_api_uri
+ (of-object "ChamplainNetworkMapDataSource")
+ (c-name "champlain_network_map_data_source_set_api_uri")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "api_uri")
+ )
+)
+
+
diff --git a/bindings/python/champlain/pychamplainmemphis-boxed-types.defs b/bindings/python/champlain/pychamplainmemphis-boxed-types.defs
new file mode 100644
index 0000000..8b1cf6a
--- /dev/null
+++ b/bindings/python/champlain/pychamplainmemphis-boxed-types.defs
@@ -0,0 +1,14 @@
+;; -*- scheme -*-
+; boxed type definitions ...
+
+(define-boxed BoundingBox
+ (in-module "Champlain")
+ (c-name "ChamplainBoundingBox")
+ (gtype-id "CHAMPLAIN_TYPE_BOUNDING_BOX")
+ (fields
+ '("double" "left")
+ '("double" "bottom")
+ '("double" "right")
+ '("double" "top")
+ )
+)
diff --git a/bindings/python/champlain/pychamplainmemphis.defs b/bindings/python/champlain/pychamplainmemphis.defs
new file mode 100644
index 0000000..a5dc56f
--- /dev/null
+++ b/bindings/python/champlain/pychamplainmemphis.defs
@@ -0,0 +1,4 @@
+;; -*- scheme -*-
+
+(include "pychamplainmemphis-base.defs")
+(include "pychamplainmemphis-boxed-types.defs")
diff --git a/bindings/python/champlain/pychamplainmemphis.h b/bindings/python/champlain/pychamplainmemphis.h
new file mode 100644
index 0000000..fb83d82
--- /dev/null
+++ b/bindings/python/champlain/pychamplainmemphis.h
@@ -0,0 +1,7 @@
+#ifndef __PYCHAMPLAINMEMPHIS_H__
+#define __PYCHAMPLAINMEMPHIS_H__
+
+void champlainmemphis_register_classes (PyObject *d);
+void champlainmemphis_add_constants (PyObject *module, const gchar *strip_prefix);
+
+#endif
diff --git a/bindings/python/champlain/pychamplainmemphis.override b/bindings/python/champlain/pychamplainmemphis.override
new file mode 100644
index 0000000..ba88a71
--- /dev/null
+++ b/bindings/python/champlain/pychamplainmemphis.override
@@ -0,0 +1,81 @@
+%%
+headers
+#include <Python.h>
+#include <pygobject.h>
+#include <champlain/champlain.h>
+#include <champlain/champlain-memphis.h>
+#include <memphis/memphis.h>
+#include <clutter/clutter.h>
+#include "pychamplainmemphis.h"
+%%
+modulename champlain.memphis
+%%
+import gobject.GObject as PyGObject_Type
+import gobject.GObject as PyGInitiallyUnowned_Type
+import clutter.Actor as PyClutterActor_Type
+import clutter.Group as PyClutterGroup_Type
+import clutter.Color as PyClutterColor_Type
+import champlain.TileSource as PyChamplainTileSource_Type
+%%
+ignore-glob
+ *_get_type
+%%
+override-attr ChamplainBoundingBox.left
+static int
+_wrap_champlain_bounding_box__set_left (PyGBoxed *self, PyObject *value,
+ void *closure)
+{
+ gdouble val;
+
+ val = PyFloat_AsDouble(value);
+ if (PyErr_Occurred())
+ return -1;
+
+ pyg_boxed_get(self, ChamplainBoundingBox)->left = val;
+ return 0;
+}
+%%
+override-attr ChamplainBoundingBox.right
+static int
+_wrap_champlain_bounding_box__set_right (PyGBoxed *self, PyObject *value,
+ void *closure)
+{
+ gdouble val;
+
+ val = PyFloat_AsDouble(value);
+ if (PyErr_Occurred())
+ return -1;
+
+ pyg_boxed_get(self, ChamplainBoundingBox)->right = val;
+ return 0;
+}
+%%
+override-attr ChamplainBoundingBox.top
+static int
+_wrap_champlain_bounding_box__set_top (PyGBoxed *self, PyObject *value,
+ void *closure)
+{
+ gdouble val;
+
+ val = PyFloat_AsDouble(value);
+ if (PyErr_Occurred())
+ return -1;
+
+ pyg_boxed_get(self, ChamplainBoundingBox)->top = val;
+ return 0;
+}
+%%
+override-attr ChamplainBoundingBox.bottom
+static int
+_wrap_champlain_bounding_box__set_bottom (PyGBoxed *self, PyObject *value,
+ void *closure)
+{
+ gdouble val;
+
+ val = PyFloat_AsDouble(value);
+ if (PyErr_Occurred())
+ return -1;
+
+ pyg_boxed_get(self, ChamplainBoundingBox)->bottom = val;
+ return 0;
+}
diff --git a/bindings/python/champlain/pychamplainmemphismodule.c b/bindings/python/champlain/pychamplainmemphismodule.c
new file mode 100644
index 0000000..ee69c8f
--- /dev/null
+++ b/bindings/python/champlain/pychamplainmemphismodule.c
@@ -0,0 +1,27 @@
+#define NO_IMPORT_PYGOBJECT
+
+#include <pygobject.h>
+#include <champlain/champlain.h>
+#include <champlain/champlain-memphis.h>
+#include "pychamplainmemphis.h"
+
+extern PyMethodDef champlainmemphis_functions[];
+DL_EXPORT(void) initchamplainmemphis (void);
+
+DL_EXPORT(void)
+initchamplainmemphis (void)
+{
+ PyObject *m, *d;
+
+ init_pygobject ();
+
+ m = Py_InitModule ("champlainmemphis", champlainmemphis_functions);
+ d = PyModule_GetDict (m);
+
+ champlainmemphis_register_classes (d);
+
+ if (PyErr_Occurred ()) {
+ PyErr_Print();
+ Py_FatalError ("can't initialise module champlainmemphis");
+ }
+}
diff --git a/bindings/python/update-binding.sh b/bindings/python/update-binding.sh.in
old mode 100755
new mode 100644
similarity index 60%
rename from bindings/python/update-binding.sh
rename to bindings/python/update-binding.sh.in
index 2d5424a..9b015a6
--- a/bindings/python/update-binding.sh
+++ b/bindings/python/update-binding.sh.in
@@ -6,8 +6,9 @@ cp champlain-gtk/pychamplaingtk-base.defs /tmp/pychamplaingtk-base.defs.bk
# Update the list of headers from Makefile.am
cd ../../champlain
-python /usr/share/pygobject/2.0/codegen/defsgen.py \
- -m champlain -l .libs/libchamplain-0.5.so \
+DEFSGEN="$(pkg-config --variable=codegendir pygobject-2.0)/defsgen.py"
+python ${DEFSGEN} \
+ -m champlain -l .libs/libchamplain- CHAMPLAIN_API_VERSION@.so \
-f ../bindings/python/champlain/pychamplain-boxed-types.defs \
champlain.h \
champlain-defines.h \
@@ -29,17 +30,24 @@ python /usr/share/pygobject/2.0/codegen/defsgen.py \
champlain-map-source-desc.h \
champlain-polygon.h \
champlain-version.h \
- champlain-memphis-tile-source.h \
- champlain-map-data-source.h \
- champlain-local-map-data-source.h \
- champlain-network-map-data-source.h \
- champlain-bounding-box.h \
> ../bindings/python/champlain/pychamplain-base.defs
+python ${DEFSGEN} \
+ -m champlain -l .libs/libchamplain- CHAMPLAIN_API_VERSION@.so \
+ -f ../bindings/python/champlain/pychamplainmemphis-boxed-types.defs \
+ champlain-memphis.h \
+ champlain-memphis-tile-source.h \
+ champlain-map-data-source.h \
+ champlain-local-map-data-source.h \
+ champlain-network-map-data-source.h \
+ champlain-bounding-box.h \
+ > ../bindings/python/champlain/pychamplainmemphis-base.defs
+
# Update the list of headers from Makefile.am
cd ../champlain-gtk
-python /usr/share/pygobject/2.0/codegen/defsgen.py \
- -m champlain -l .libs/libchamplain-gtk-0.5.so \
+python ${DEFSGEN} \
+ -m gtk_champlain_embed -l .libs/libchamplain-gtk- CHAMPLAIN_API_VERSION@.so \
champlain-gtk.h \
gtk-champlain-embed.h \
> ../bindings/python/champlain-gtk/pychamplaingtk-base.defs
+
diff --git a/champlain-gtk.pc.in b/champlain-gtk.pc.in
index b254bc4..6461a69 100644
--- a/champlain-gtk.pc.in
+++ b/champlain-gtk.pc.in
@@ -6,6 +6,6 @@ includedir= includedir@
Name: libchamplain-gtk
Description: Gtk+ Widget wrapper for libchamplain
Version: @VERSION@
-Libs: -L${libdir} -lchamplain-gtk- API_VERSION@
-Cflags: -I${includedir}/libchamplain-gtk- API_VERSION@
-Requires: champlain- API_VERSION@ gobject-2.0 clutter-1.0 clutter-gtk-0.10 gtk+-2.0
+Libs: -L${libdir} -lchamplain-gtk- CHAMPLAIN_API_VERSION@
+Cflags: -I${includedir}/libchamplain-gtk- CHAMPLAIN_API_VERSION@
+Requires: champlain- CHAMPLAIN_API_VERSION@ clutter-gtk-0.10 gtk+-2.0
diff --git a/champlain-gtk/Makefile.am b/champlain-gtk/Makefile.am
index 5fe1c8e..f1ff8fe 100644
--- a/champlain-gtk/Makefile.am
+++ b/champlain-gtk/Makefile.am
@@ -8,17 +8,17 @@ CLEANFILES = $(BUILT_SOURCES)
CHAMPLAIN_GTK_MARSHAL = champlain-gtk-marshal
CHAMPLAIN_GTK_MARSHAL_LIST = champlain-gtk-marshal.list
-lib_LTLIBRARIES = libchamplain-gtk-0.5.la
+lib_LTLIBRARIES = libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
-libchamplain_gtk_0_5_la_SOURCES = \
+libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
$(CHAMPLAIN_GTK_MARSHAL_LIST) \
$(BUILT_SOURCES) \
gtk-champlain-embed.c
noinst_HEADERS = gtk-champlain-embed.h
-libchamplain_gtk_0_5_la_LIBADD = $(GTK_DEPS_LIBS) \
- $(top_builddir)/champlain/libchamplain-0.5.la
+libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_LIBADD = $(GTK_LIBS) \
+ $(top_builddir)/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
champlain-gtk-marshal.h: $(CHAMPLAIN_GTK_MARSHAL_LIST)
@GLIB_GENMARSHAL@ --header --prefix=champlain_gtk_marshal $< > $(CHAMPLAIN_GTK_MARSHAL).h
@@ -26,24 +26,24 @@ champlain-gtk-marshal.h: $(CHAMPLAIN_GTK_MARSHAL_LIST)
champlain-gtk-marshal.c: $(CHAMPLAIN_GTK_MARSHAL_LIST)
@GLIB_GENMARSHAL@ --body --prefix=champlain_gtk_marshal $< > $(CHAMPLAIN_GTK_MARSHAL).c
-libchamplain_includedir=$(includedir)/libchamplain-gtk-0.5/champlain-gtk
+libchamplain_includedir=$(includedir)/libchamplain-gtk- CHAMPLAIN_API_VERSION@/champlain-gtk
libchamplain_include_HEADERS = champlain-gtk.h gtk-champlain-embed.h
-libchamplain_gtk_0_5_la_LDFLAGS= -version-info $(LIBRARY_VERSION)
+libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_LDFLAGS= -version-info $(LIBRARY_VERSION)
-AM_CPPFLAGS = $(GTK_DEPS_CFLAGS) -I$(top_srcdir) -DCHAMPLAIN_GTK_COMPILATION
-AM_LDFLAGS = $(GTK_DEPS_LIBS) -export-symbols-regex ^gtk_champlain_.*
+AM_CPPFLAGS = $(GTK_CFLAGS) -I$(top_srcdir) -DCHAMPLAIN_GTK_COMPILATION
+AM_LDFLAGS = $(GTK_LIBS) -export-symbols-regex ^gtk_champlain_.*
EXTRA_DIST = $(CHAMPLAIN_GTK_MARSHAL_LIST)
if HAVE_INTROSPECTION
BUILT_GIRSOURCES =
-GtkChamplain-0.5.gir: $(INTROSPECTION_SCANNER) libchamplain-gtk-0.5.la
+GtkChamplain- CHAMPLAIN_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
- --namespace GtkChamplain --nsversion=0.5 \
+ --namespace GtkChamplain --nsversion= CHAMPLAIN_API_VERSION@ \
--strip-prefix=GtkChamplain \
- $(GTK_DEPS_CFLAGS) \
+ $(GTK_CFLAGS) \
$(SOUP_CFLAGS) \
-I$(top_srcdir) \
-DCHAMPLAIN_COMPILATION \
@@ -52,15 +52,15 @@ GtkChamplain-0.5.gir: $(INTROSPECTION_SCANNER) libchamplain-gtk-0.5.la
--include=Champlain-0.5 \
--include=Clutter-1.0 \
--include=Gtk-2.0 \
- --library=champlain-gtk-0.5 \
+ --library=champlain-gtk- CHAMPLAIN_API_VERSION@ \
--libtool="$(LIBTOOL)" \
--output $@ \
--pkg gobject-2.0 \
--pkg gtk+-2.0 \
- $(addprefix $(srcdir)/,$(libchamplain_gtk_0_5_la_SOURCES)) \
+ $(addprefix $(srcdir)/,$(libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_SOURCES)) \
$(addprefix $(srcdir)/,$(libchamplain_include_HEADERS))
-BUILT_GIRSOURCES += GtkChamplain-0.5.gir
+BUILT_GIRSOURCES += GtkChamplain- CHAMPLAIN_API_VERSION@.gir
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
# install anything - we need to install inside our prefix.
diff --git a/champlain-memphis-uninstalled.pc.in b/champlain-memphis-uninstalled.pc.in
new file mode 100644
index 0000000..d97843f
--- /dev/null
+++ b/champlain-memphis-uninstalled.pc.in
@@ -0,0 +1,11 @@
+prefix=
+exec_prefix=
+abs_top_srcdir= abs_top_srcdir@
+abs_top_builddir= abs_top_builddir@
+
+Name: libchamplain-memphis (uninstalled copy)
+Description: libmemphis support for libchamplain
+Version: @VERSION@
+Libs: ${abs_top_builddir}/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
+Cflags: -I${abs_top_srcdir} -I${abs_top_builddir}
+Requires: champlain- CHAMPLAIN_API_VERSION@ memphis-0.2
diff --git a/champlain-memphis.pc.in b/champlain-memphis.pc.in
new file mode 100644
index 0000000..d754474
--- /dev/null
+++ b/champlain-memphis.pc.in
@@ -0,0 +1,11 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+
+Name: libchamplain-memphis
+Description: libmemphis support for libchamplain
+Version: @VERSION@
+Libs: -L${libdir} -lchamplain- CHAMPLAIN_API_VERSION@
+Cflags: -I${includedir}/libchamplain- CHAMPLAIN_API_VERSION@
+Requires: champlain- CHAMPLAIN_API_VERSION@ memphis-0.2
diff --git a/champlain-uninstalled.pc.in b/champlain-uninstalled.pc.in
index de00921..bcbf284 100644
--- a/champlain-uninstalled.pc.in
+++ b/champlain-uninstalled.pc.in
@@ -6,6 +6,6 @@ abs_top_builddir= abs_top_builddir@
Name: libchamplain (uninstalled copy)
Description: Map View for Clutter
Version: @VERSION@
-Libs: ${abs_top_builddir}/champlain/libchamplain- API_VERSION@.la
+Libs: ${abs_top_builddir}/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
Cflags: -I${abs_top_srcdir} -I${abs_top_builddir}
-Requires: gobject-2.0 clutter-1.0
+Requires: gobject-2.0 glib-2.0 gdk-2.0 gio-2.0 cairo clutter-1.0 sqlite3 @SOUP_DEP@
diff --git a/champlain.pc.in b/champlain.pc.in
index 2607c4a..f296223 100644
--- a/champlain.pc.in
+++ b/champlain.pc.in
@@ -6,6 +6,6 @@ includedir= includedir@
Name: libchamplain
Description: Map View for Clutter
Version: @VERSION@
-Libs: -L${libdir} -lchamplain- API_VERSION@
-Cflags: -I${includedir}/libchamplain- API_VERSION@
-Requires: gobject-2.0 clutter-1.0 memphis-0.2
+Libs: -L${libdir} -lchamplain- CHAMPLAIN_API_VERSION@
+Cflags: -I${includedir}/libchamplain- CHAMPLAIN_API_VERSION@
+Requires: gobject-2.0 glib-2.0 gdk-2.0 gio-2.0 cairo clutter-1.0 sqlite3 @SOUP_DEP@
diff --git a/champlain/Makefile.am b/champlain/Makefile.am
index f6d37a5..bdaa33e 100644
--- a/champlain/Makefile.am
+++ b/champlain/Makefile.am
@@ -5,16 +5,27 @@ BUILT_SOURCES = \
champlain-enum-types.h \
champlain-enum-types.c \
stamp-enum-types \
- champlain-version.h
+ champlain-version.h
CLEANFILES = $(BUILT_SOURCES)
CHAMPLAIN_MARSHAL = champlain-marshal
CHAMPLAIN_MARSHAL_LIST = champlain-marshal.list
-lib_LTLIBRARIES = libchamplain-0.5.la
+lib_LTLIBRARIES = libchamplain- CHAMPLAIN_API_VERSION@.la
+
+if ENABLE_MEMPHIS
+memphis_headers = \
+ champlain-memphis.h \
+ champlain-memphis-tile-source.h \
+ champlain-map-data-source.h \
+ champlain-local-map-data-source.h \
+ champlain-network-map-data-source.h \
+ champlain-bounding-box.h
+endif
libchamplain_headers = \
+ $(memphis_headers) \
champlain.h \
champlain-defines.h \
champlain-point.h \
@@ -35,16 +46,22 @@ libchamplain_headers = \
champlain-map-source-desc.h \
champlain-polygon.h \
champlain-version.h \
- champlain-memphis-tile-source.h \
- champlain-map-data-source.h \
- champlain-local-map-data-source.h \
- champlain-network-map-data-source.h \
- champlain-bounding-box.h
+ champlain-features.h
+
+if ENABLE_MEMPHIS
+memphis_sources = \
+ champlain-memphis-tile-source.c \
+ champlain-map-data-source.c \
+ champlain-local-map-data-source.c \
+ champlain-network-map-data-source.c \
+ champlain-bounding-box.c
+endif
-libchamplain_0_5_la_SOURCES = \
+libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
$(CHAMPLAIN_MARSHAL_LIST) \
$(BUILT_SOURCES) \
$(libchamplain_headers) \
+ $(memphis_sources) \
champlain-debug.c \
champlain-view.c \
champlain-layer.c \
@@ -62,18 +79,14 @@ libchamplain_0_5_la_SOURCES = \
champlain-map-source-factory.c \
champlain-map-source-desc.c \
champlain-point.c \
- champlain-polygon.c \
- champlain-memphis-tile-source.c \
- champlain-map-data-source.c \
- champlain-local-map-data-source.c \
- champlain-network-map-data-source.c \
- champlain-bounding-box.c
+ champlain-polygon.c
noinst_HEADERS = \
champlain-debug.h \
champlain-private.h
libchamplain_include_HEADERS = \
+ $(memphis_headers) \
champlain.h \
champlain-view.h \
champlain-defines.h \
@@ -95,24 +108,21 @@ libchamplain_include_HEADERS = \
champlain-marker.h \
champlain-polygon.h \
champlain-version.h \
- champlain-memphis-tile-source.h \
- champlain-map-data-source.h \
- champlain-local-map-data-source.h \
- champlain-network-map-data-source.h \
- champlain-bounding-box.h
+ champlain-features.h
-libchamplain_0_5_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) ../tidy/libtidy-1.0.la
+libchamplain_ CHAMPLAIN_API_VERSION@_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) $(MEMPHIS_LIBS) ../tidy/libtidy-1.0.la
-libchamplain_includedir = $(includedir)/libchamplain-0.5/champlain
+libchamplain_includedir = $(includedir)/libchamplain- CHAMPLAIN_API_VERSION@/champlain
-libchamplain_0_5_la_LDFLAGS = -version-info $(LIBRARY_VERSION) \
- -no-undefined \
+libchamplain_ CHAMPLAIN_API_VERSION@_la_LDFLAGS = -version-info $(LIBRARY_VERSION) \
+ -no-undefined \
-export-symbols-regex \
^champlain_.*
AM_CPPFLAGS = \
$(DEPS_CFLAGS) \
$(SOUP_CFLAGS) \
+ $(MEMPHIS_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-I$(top_srcdir)/tidy \
-I$(top_srcdir) \
@@ -166,12 +176,18 @@ champlain-enum-types.c: $(libchamplain_headers) Makefile
&& cp xgen-gtc $(@F) \
&& rm -f xgen-gtc
+
if HAVE_INTROSPECTION
+
+if ENABLE_MEMPHIS
+memphis_gir_include = --include=Memphis-0.2
+endif
+
BUILT_GIRSOURCES =
-Champlain-0.5.gir: $(INTROSPECTION_SCANNER) libchamplain-0.5.la
+Champlain- CHAMPLAIN_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libchamplain- CHAMPLAIN_API_VERSION@.la
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
- --namespace Champlain --nsversion=0.5 \
+ --namespace Champlain --nsversion= CHAMPLAIN_API_VERSION@ \
--strip-prefix=Champlain \
$(DEPS_CFLAGS) \
$(SOUP_CFLAGS) \
@@ -182,16 +198,16 @@ Champlain-0.5.gir: $(INTROSPECTION_SCANNER) libchamplain-0.5.la
--c-include="$(libchamplain_include_HEADERS)" \
--include=Clutter-1.0 \
--include=Gtk-2.0 \
- --include=Memphis-0.2 \
- --library=champlain-0.5 \
+ $(memphis_gir_include) \
+ --library=champlain- CHAMPLAIN_API_VERSION@ \
--libtool="$(LIBTOOL)" \
--output $@ \
--pkg gobject-2.0 \
--pkg gtk+-2.0 \
- $(addprefix $(srcdir)/,$(libchamplain_0_5_la_SOURCES)) \
+ $(addprefix $(srcdir)/,$(libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES)) \
$(addprefix $(srcdir)/,$(libchamplain_include_HEADERS))
-BUILT_GIRSOURCES += Champlain-0.5.gir
+BUILT_GIRSOURCES += Champlain- CHAMPLAIN_API_VERSION@.gir
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
# install anything - we need to install inside our prefix.
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index f0d1f97..3a1904d 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -352,7 +352,7 @@ champlain_file_cache_constructed (GObject *object)
{
if (champlain_tile_cache_get_persistent (tile_cache))
{
-#ifdef USE_MAEMO
+#ifdef CHAMPLAIN_HAS_MAEMO
priv->cache_dir = g_strdup ("/home/user/MyDocs/.Maps/");
#else
priv->cache_dir = g_build_path (G_DIR_SEPARATOR_S,
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index 31dd0ef..7a1791c 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -39,6 +39,9 @@
#include "champlain-debug.h"
#include "champlain.h"
+#ifdef CHAMPLAIN_HAS_MEMPHIS
+#include "champlain-memphis.h"
+#endif
#include "champlain-file-cache.h"
#include "champlain-defines.h"
#include "champlain-enum-types.h"
@@ -78,8 +81,10 @@ struct _ChamplainMapSourceFactoryPrivate
static ChamplainMapSource * champlain_map_source_new_generic (
ChamplainMapSourceDesc *desc, gpointer data);
+#ifdef CHAMPLAIN_HAS_MEMPHIS
static ChamplainMapSource * champlain_map_source_new_memphis (
ChamplainMapSourceDesc *desc, gpointer user_data);
+#endif
static void
champlain_map_source_factory_get_property (GObject *object,
@@ -252,6 +257,7 @@ ChamplainMapSourceDesc MFF_RELIEF_DESC =
NULL
};
+#ifdef CHAMPLAIN_HAS_MEMPHIS
static
ChamplainMapSourceDesc MEMPHIS_LOCAL_DESC =
{
@@ -281,6 +287,7 @@ ChamplainMapSourceDesc MEMPHIS_NETWORK_DESC =
"",
NULL
};
+#endif
static void
champlain_map_source_factory_init (ChamplainMapSourceFactory *factory)
@@ -305,10 +312,12 @@ champlain_map_source_factory_init (ChamplainMapSourceFactory *factory)
#endif
champlain_map_source_factory_register (factory, &MFF_RELIEF_DESC,
MFF_RELIEF_DESC.constructor, MFF_RELIEF_DESC.data);
+#ifdef CHAMPLAIN_HAS_MEMPHIS
champlain_map_source_factory_register (factory, &MEMPHIS_LOCAL_DESC,
MEMPHIS_LOCAL_DESC.constructor, MEMPHIS_LOCAL_DESC.data);
champlain_map_source_factory_register (factory, &MEMPHIS_NETWORK_DESC,
MEMPHIS_NETWORK_DESC.constructor, MEMPHIS_NETWORK_DESC.data);
+#endif
}
/**
@@ -454,6 +463,7 @@ champlain_map_source_new_generic (
desc->uri_format));
}
+#ifdef CHAMPLAIN_HAS_MEMPHIS
static ChamplainMapSource *
champlain_map_source_new_memphis (ChamplainMapSourceDesc *desc,
gpointer user_data)
@@ -486,3 +496,5 @@ champlain_map_source_new_memphis (ChamplainMapSourceDesc *desc,
desc->projection,
map_data_source));
}
+#endif
+
diff --git a/champlain/champlain-map-source-factory.h b/champlain/champlain-map-source-factory.h
index accbee5..6a8f84a 100644
--- a/champlain/champlain-map-source-factory.h
+++ b/champlain/champlain-map-source-factory.h
@@ -23,6 +23,7 @@
#ifndef CHAMPLAIN_MAP_SOURCE_FACTORY_H
#define CHAMPLAIN_MAP_SOURCE_FACTORY_H
+#include <champlain/champlain-features.h>
#include <champlain/champlain-defines.h>
#include <champlain/champlain-map-source.h>
#include <champlain/champlain-map-source-desc.h>
@@ -69,7 +70,7 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
ChamplainMapSourceDesc *desc, ChamplainMapSourceConstructor constructor,
gpointer data);
-#ifdef USE_MAEMO
+#ifdef CHAMPLAIN_HAS_MAEMO
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "OpenStreetMap I"
#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "OpenStreetMap II"
#define CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP "OpenCycleMap"
@@ -85,8 +86,10 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "mff-relief"
#endif
+#ifdef CHAMPLAIN_HAS_MEMPHIS
#define CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL "memphis-local"
#define CHAMPLAIN_MAP_SOURCE_MEMPHIS_NETWORK "memphis-network"
+#endif
G_END_DECLS
diff --git a/champlain/champlain-memphis.h b/champlain/champlain-memphis.h
new file mode 100644
index 0000000..e3f21ea
--- /dev/null
+++ b/champlain/champlain-memphis.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 Jiri Techet <techet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef CHAMPLAIN_MEMPHIS_H
+#define CHAMPLAIN_MEMPHIS_H
+
+#define __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
+
+#include <glib.h>
+
+#include "champlain/champlain-features.h"
+
+#include "champlain/champlain-memphis-tile-source.h"
+#include "champlain/champlain-map-data-source.h"
+#include "champlain/champlain-local-map-data-source.h"
+#include "champlain/champlain-network-map-data-source.h"
+#include "champlain/champlain-bounding-box.h"
+
+#undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
+
+#endif
diff --git a/champlain/champlain.h b/champlain/champlain.h
index 27cafaa..05d1e45 100644
--- a/champlain/champlain.h
+++ b/champlain/champlain.h
@@ -28,6 +28,8 @@
#include <glib.h>
+#include "champlain/champlain-features.h"
+
#include "champlain/champlain-defines.h"
#include "champlain/champlain-layer.h"
#include "champlain/champlain-selection-layer.h"
@@ -45,11 +47,6 @@
#include "champlain/champlain-error-tile-source.h"
#include "champlain/champlain-map-source-factory.h"
#include "champlain/champlain-version.h"
-#include "champlain/champlain-memphis-tile-source.h"
-#include "champlain/champlain-map-data-source.h"
-#include "champlain/champlain-local-map-data-source.h"
-#include "champlain/champlain-network-map-data-source.h"
-#include "champlain/champlain-bounding-box.h"
#undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__
diff --git a/configure.ac b/configure.ac
index d9d3bac..81133c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ m4_define([champlain_minor_version], [5])
m4_define([champlain_micro_version], [1])
m4_define([champlain_version],
[champlain_major_version.champlain_minor_version.champlain_micro_version])
-m4_define([api_version],
+m4_define([champlain_api_version],
[champlain_major_version.champlain_minor_version])
# if the API changes, set to 0
AC_PREREQ(2.61)
@@ -13,7 +13,7 @@ AC_INIT([libchamplain],
[champlain_version],
pierre-luc pierlux com)
AC_CONFIG_SRCDIR([champlain/champlain.h])
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
@@ -29,14 +29,13 @@ AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
# Checks for libraries.
LIBRARY_VERSION=0:0:0
-# API_VERSION is used to generate pc files only
-API_VERSION=api_version
+CHAMPLAIN_API_VERSION=champlain_api_version
CHAMPLAIN_MAJOR_VERSION=champlain_major_version
CHAMPLAIN_MINOR_VERSION=champlain_minor_version
CHAMPLAIN_MICRO_VERSION=champlain_micro_version
CHAMPLAIN_VERSION=champlain_version
CHAMPLAIN_MAJORMINOR=champlain_api_version
-AC_SUBST(API_VERSION)
+AC_SUBST(CHAMPLAIN_API_VERSION)
AC_SUBST(CHAMPLAIN_MAJOR_VERSION)
AC_SUBST(CHAMPLAIN_MINOR_VERSION)
AC_SUBST(CHAMPLAIN_MICRO_VERSION)
@@ -44,20 +43,20 @@ AC_SUBST(CHAMPLAIN_VERSION)
AC_SUBST(CHAMPLAIN_MAJORMINOR)
AC_SUBST(LIBRARY_VERSION)
-AC_SUBST(DEPS_CFLAGS)
-AC_SUBST(DEPS_LIBS)
PKG_CHECK_MODULES(DEPS,
- [ glib-2.0 >= 2.16,
- gobject-2.0 >= 2.10,
- gdk-2.0 >= 2.10,
- clutter-1.0 >= 1.0,
- cairo >= 1.4,
- gio-2.0 >= 2.16,
- sqlite3 >= 3.0,
- memphis-0.2 >= 0.2
+ [ glib-2.0 >= 2.16
+ gobject-2.0 >= 2.10
+ gdk-2.0 >= 2.10
+ clutter-1.0 >= 1.0
+ cairo >= 1.4
+ gio-2.0 >= 2.16
+ sqlite3 >= 3.0
]
)
+AC_SUBST(DEPS_CFLAGS)
+AC_SUBST(DEPS_LIBS)
+
# check for gtk-doc
GTK_DOC_CHECK(1.9)
IDT_COMPILE_WARNINGS
@@ -65,29 +64,33 @@ IDT_COMPILE_WARNINGS
# -----------------------------------------------------------
# Check for libsoup, use libsoup-gnome if available
# -----------------------------------------------------------
-PKG_CHECK_MODULES(SOUP, libsoup-gnome-2.4 >= 2.26, [
+PKG_CHECK_MODULES(SOUP_GNOME, libsoup-gnome-2.4 >= 2.26, [
+ SOUP=SOUP_GNOME
have_soup_gnome="yes"
+ SOUP_DEP="libsoup-gnome-2.4"
AC_DEFINE(HAVE_LIBSOUP_GNOME,1,[libsoup gnome integration])
], have_soup_gnome="no")
+
if test "x$have_soup_gnome" = "xno"; then
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.4.1,
have_soup="yes", have_soup="no")
+ SOUP_DEP="libsoup-2.4"
fi
if test "x$have_soup" = "xno" && test "x$have_soup_gnome" = "xno"; then
- AC_MSG_ERROR([Couldn't find libsoup or libsoup-gnome.])
+ AC_MSG_ERROR([Could not find libsoup or libsoup-gnome.])
fi
AC_SUBST(SOUP_CFLAGS)
AC_SUBST(SOUP_LIBS)
-
+AC_SUBST(SOUP_DEP)
# -----------------------------------------------------------
# Enable debug
# -----------------------------------------------------------
AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--disable-debug],[compile without debug code]),
+ AS_HELP_STRING([--disable-debug],[compile without debug code]),
enable_debug=$enableval, enable_debug=yes )
if test x$enable_debug = xyes; then
@@ -99,47 +102,63 @@ fi
# -----------------------------------------------------------
AC_ARG_ENABLE(maemo,
- AC_HELP_STRING([--enable-maemo],[compile with maemo optimizations]),
+ AS_HELP_STRING([--enable-maemo],[compile with maemo optimizations]),
[enable_maemo=yes])
-if test x$enable_maemo = xyes; then
- AC_DEFINE(USE_MAEMO, [], [Enable Maemo Optimizations])
-fi
-
# -----------------------------------------------------------
# Enable gtk
# -----------------------------------------------------------
AC_ARG_ENABLE(gtk,
- AC_HELP_STRING([--disable-gtk],[Don't compile Gtk+ embedded view]),
+ AS_HELP_STRING([--disable-gtk],[Do not compile Gtk+ embedded view]),
enable_gtk=$enableval, enable_gtk=yes )
if test x$enable_gtk = xyes; then
- AC_SUBST(GTK_DEPS_CFLAGS)
- AC_SUBST(GTK_DEPS_LIBS)
- PKG_CHECK_MODULES(GTK_DEPS,
- [ gtk+-2.0 >= 2.12,
- clutter-gtk-0.10 >= 0.10,
- memphis-0.2 >= 0.2.1
+ PKG_CHECK_MODULES(GTK,
+ [ gtk+-2.0 >= 2.12
+ clutter-gtk-0.10 >= 0.10
]
)
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
AC_CONFIG_FILES([champlain-gtk/Makefile
docs/reference-gtk/Makefile
docs/reference-gtk/version.xml
champlain-gtk.pc
champlain-gtk-uninstalled.pc])
-
- AC_DEFINE(ENABLE_GTK, [], [Enable Gtk+ view code])
fi
AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtk" = "xyes")
# -----------------------------------------------------------
+# Enable memphis
+# -----------------------------------------------------------
+
+AC_ARG_ENABLE(memphis,
+ AS_HELP_STRING([--disable-memphis],[Disable support of local rendering using libmemphis]),
+ enable_memphis=$enableval, enable_memphis="auto")
+
+if test "x$enable_memphis" = "xauto"; then
+ PKG_CHECK_MODULES(MEMPHIS, [memphis-0.2 >= 0.2.1], enable_memphis="yes", enable_memphis="no")
+elif test "x$enable_memphis" = "xyes"; then
+ PKG_CHECK_MODULES(MEMPHIS, [memphis-0.2 >= 0.2.1])
+fi
+
+if test "x$enable_memphis" = "xyes"; then
+ AC_CONFIG_FILES([champlain-memphis.pc
+ champlain-memphis-uninstalled.pc])
+ AC_SUBST(MEMPHIS_CFLAGS)
+ AC_SUBST(MEMPHIS_LIBS)
+fi
+
+AM_CONDITIONAL(ENABLE_MEMPHIS, test "x$enable_memphis" = "xyes")
+
+# -----------------------------------------------------------
# Enable managed (default to "no")
# -----------------------------------------------------------
AC_ARG_ENABLE(managed,
- AC_HELP_STRING([--enable-managed],[Build champlain-sharp (and champlain-gtk-sharp)]),
+ AS_HELP_STRING([--enable-managed],[Build champlain-sharp (and champlain-gtk-sharp)]),
enable_managed=$enableval, enable_managed=no )
if test x$enable_managed = xyes; then
@@ -181,38 +200,71 @@ AM_CONDITIONAL(ENABLE_MANAGED, test "x$enable_managed" = "xyes")
# -----------------------------------------------------------
AC_ARG_ENABLE(python,
- AC_HELP_STRING([--enable-python],[Build python bindings]),
+ AS_HELP_STRING([--enable-python],[Build python bindings]),
enable_python=$enableval, enable_python=no )
if test x$enable_python = xyes; then
PKG_CHECK_MODULES(PYTHON_BINDING,
[
- pygtk-2.0,
- pygobject-2.0,
- glib-2.0,
- gobject-2.0,
- clutter-1.0,
- pyclutter-1.0,
- pyclutter-gtk-0.10,
- memphis-0.2,
- pymemphis-0.2,
- gtk+-2.0
- ], have_python="yes", have_python="no")
-
- if test "x$have_python" = "xyes" ; then
- AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
- AM_CHECK_PYTHON_HEADERS(,have_python="no")
+ pygtk-2.0 >= 2.12
+ pygobject-2.0 >= 2.10
+ pyclutter-1.0 >= 1.0
+ ]
+ )
+
+ if test "x$enable_memphis" = "xyes"; then
+ PKG_CHECK_MODULES(PYTHON_BINDING_MEMPHIS, [pymemphis-0.2 >= 0.2])
+ fi
+
+ if test "x$enable_gtk" = "xyes"; then
+ PKG_CHECK_MODULES(PYTHON_BINDING_GTK, [pyclutter-gtk-0.10 >= 0.10])
+ fi
+
+ AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0], [no])
+
+ if test "PYGOBJECTCODEGEN" = "xno"; then
+ AC_MSG_ERROR([Could not find pygobject-codegen-2.0 or pygtk-codegen-2.0])
fi
-fi
-if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
- AC_MSG_ERROR([Couldn't find python. Check config.log])
+ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(Could not find python headers)])
+
+ AC_CONFIG_FILES([bindings/python/Makefile
+ bindings/python/update-binding.sh
+ bindings/python/champlain/Makefile
+ bindings/python/champlain-gtk/Makefile
+ bindings/python/demos/Makefile],
+ [chmod +x bindings/python/update-binding.sh])
fi
AM_CONDITIONAL(ENABLE_PYTHON, test "x$enable_python" = "xyes")
GOBJECT_INTROSPECTION_CHECK([0.6.3])
# -----------------------------------------------------------
+# Generate features header file
+# -----------------------------------------------------------
+
+CHAMPLAIN_CONFIG_COMMANDS([champlain/champlain-features.h],
+[
+ echo '/* Generated by configure. Do not edit. */'
+ echo '#ifndef CHAMPLAIN_FEATURES_H'
+ echo '#define CHAMPLAIN_FEATURES_H'
+ echo ''
+ if test "x$enable_memphis" = "xyes"; then
+ echo '#define CHAMPLAIN_HAS_MEMPHIS 1'
+ echo ''
+ fi
+ if test "x$enable_maemo" = "xyes"; then
+ echo '#define CHAMPLAIN_HAS_MAEMO 1'
+ echo ''
+ fi
+ echo '#endif'
+],[
+ enable_memphis="$enable_memphis"
+ enable_maemo="$enable_maemo"
+])
+
+# ----------------------------------------------------------
+
AC_CONFIG_FILES([Makefile
champlain/Makefile
champlain/champlain-version.h
@@ -223,10 +275,6 @@ AC_CONFIG_FILES([Makefile
champlain.pc
champlain-uninstalled.pc
bindings/perl/Champlain/Makefile
- bindings/python/Makefile
- bindings/python/champlain/Makefile
- bindings/python/champlain-gtk/Makefile
- bindings/python/demos/Makefile
bindings/managed/Makefile
bindings/managed/champlain/Makefile
bindings/managed/champlain/AssemblyInfo.cs
@@ -250,6 +298,9 @@ echo " Debug: ${enable_debug}"
echo " libsoup-gnome: ${have_soup_gnome}"
echo " Gtk+ View: ${enable_gtk}"
echo ""
+echo "Extra tile sources:"
+echo " Memphis source: ${enable_memphis}"
+echo ""
echo "Bindings:"
echo " champlain-sharp: ${enable_managed}"
echo " Python bindings: ${enable_python}"
diff --git a/demos/Makefile.am b/demos/Makefile.am
index 1d273d1..d095960 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -6,32 +6,34 @@ AM_CPPFLAGS = $(DEPS_CFLAGS) $(WARN_CFLAGS)
AM_LDFLAGS = $(DEPS_LIBS)
launcher_SOURCES = launcher.c markers.c
-launcher_LDADD = $(DEPS_LIBS) ../champlain/libchamplain-0.5.la
+launcher_LDADD = $(DEPS_LIBS) ../champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
animated_marker_SOURCES = animated-marker.c
-animated_marker_LDADD = $(DEPS_LIBS) ../champlain/libchamplain-0.5.la
+animated_marker_LDADD = $(DEPS_LIBS) ../champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
polygons_SOURCES = polygons.c
-polygons_LDADD = $(DEPS_LIBS) ../champlain/libchamplain-0.5.la
+polygons_LDADD = $(DEPS_LIBS) ../champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
url_marker_SOURCES = url-marker.c
url_marker_CPPFLAGS = $(DEPS_CFLAGS) $(SOUP_CFLAGS)
-url_marker_LDADD = $(SOUP_LIBS) $(DEPS_LIBS) ../champlain/libchamplain-0.5.la
+url_marker_LDADD = $(SOUP_LIBS) $(DEPS_LIBS) ../champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
if ENABLE_GTK
noinst_PROGRAMS += launcher-gtk
launcher_gtk_SOURCES = launcher-gtk.c markers.c
-launcher_gtk_CPPFLAGS = $(GTK_DEPS_CFLAGS)
-launcher_gtk_LDADD = $(GTK_DEPS_LIBS) $(DEPS_LIBS) \
- ../champlain-gtk/libchamplain-gtk-0.5.la \
- ../champlain/libchamplain-0.5.la
+launcher_gtk_CPPFLAGS = $(GTK_CFLAGS)
+launcher_gtk_LDADD = $(GTK_LIBS) $(DEPS_LIBS) \
+ ../champlain-gtk/libchamplain-gtk- CHAMPLAIN_API_VERSION@.la \
+ ../champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
+if ENABLE_MEMPHIS
noinst_PROGRAMS += local-rendering
local_rendering_SOURCES = local-rendering.c
-local_rendering_CPPFLAGS = $(GTK_DEPS_CFLAGS)
-local_rendering_LDADD = $(GTK_DEPS_LIBS) $(DEPS_LIBS) \
- ../champlain-gtk/libchamplain-gtk-0.5.la \
- ../champlain/libchamplain-0.5.la
+local_rendering_CPPFLAGS = $(GTK_CFLAGS) $(MEMPHIS_CFLAGS)
+local_rendering_LDADD = $(GTK_LIBS) $(MEMPHIS_LIBS) $(DEPS_LIBS) \
+ ../champlain-gtk/libchamplain-gtk- CHAMPLAIN_API_VERSION@.la \
+ ../champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
+endif
endif
EXTRA_DIST = markers.h
diff --git a/demos/local-rendering.c b/demos/local-rendering.c
index c1ddaa1..7f3caca 100644
--- a/demos/local-rendering.c
+++ b/demos/local-rendering.c
@@ -19,6 +19,7 @@
#include <gtk/gtk.h>
#include <champlain/champlain.h>
+#include <champlain/champlain-memphis.h>
#include <champlain-gtk/champlain-gtk.h>
#include <clutter-gtk/clutter-gtk.h>
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 18cf7c8..cdb4937 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -63,3 +63,35 @@ AC_DEFUN([IDT_COMPILE_WARNINGS],[
AC_SUBST(WARN_CFLAGS)
])
+
+
+dnl CHAMPLAIN_CONFIG_COMMANDS is like AC_CONFIG_COMMANDS, except that:
+dnl
+dnl 1) It redirects the stdout of the command to the file.
+dnl 2) It does not recreate the file if contents did not change.
+dnl
+dnl (macro copied from CAIRO)
+
+AC_DEFUN([CHAMPLAIN_CONFIG_COMMANDS],
+[dnl
+ AC_CONFIG_COMMANDS($1,
+ [
+ _config_file=$1
+ _tmp_file=champlainconf.tmp
+ AC_MSG_NOTICE([creating $_config_file])
+ {
+ $2
+ } >> "$_tmp_file" ||
+ AC_MSG_ERROR([failed to write to $_tmp_file])
+
+ if cmp -s "$_tmp_file" "$_config_file"; then
+ AC_MSG_NOTICE([$_config_file is unchanged])
+ rm -f "$_tmp_file"
+ else
+ mv "$_tmp_file" "$_config_file" ||
+ AC_MSG_ERROR([failed to update $_config_file])
+ fi
+ ], $3)
+])
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]