-SUBDIRS = tidy champlain champlain-gtk demos docs/reference
+SUBDIRS = tidy champlain docs/reference
ACLOCAL_AMFLAGS = -I m4
-pcfiles = champlain-@API_VERSION@.pc champlain-gtk-@API_VERSION@.pc
+pcfiles = champlain-@API_VERSION@.pc
-champlain-@API_VERSION@.pc: champlain.pc
+if ENABLE_GTK
+SUBDIRS += champlain-gtk
+pcfiles += champlain-gtk-@API_VERSION@.pc
+champlain-gtk-@API_VERSION@.pc: champlain-gtk.pc
@cp -f $< $@
+endif
-champlain-gtk-@API_VERSION@.pc: champlain-gtk.pc
+champlain-@API_VERSION@.pc: champlain.pc
@cp -f $< $@
pkgconfig_DATA = $(pcfiles)
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
CLEANFILES = $(pcfiles)
+
+# Have the demos build at the end as they depend on optional parts
+SUBDIRS += demos
noinst_HEADERS = champlain-view-embed.h
-libchamplain_gtk_0_3_la_LIBADD = $(DEPS_LIBS) $(CPLAIN_DEPS_LIBS)
+libchamplain_gtk_0_3_la_LIBADD = $(GTK_DEPS_LIBS)
champlain-gtk-marshal.h: $(CHAMPLAIN_GTK_MARSHAL_LIST)
@GLIB_GENMARSHAL@ --header --prefix=champlain_gtk_marshal $< > $(CHAMPLAIN_GTK_MARSHAL).h
libchamplain_gtk_0_3_la_LDFLAGS= -version-info $(LIBRARY_VERSION)
-AM_CPPFLAGS = $(DEPS_CFLAGS) $(CPLAIN_DEPS_CFLAGS) -I$(top_srcdir) -DCHAMPLAIN_GTK_COMPILATION
-AM_LDFLAGS = $(DEPS_LIBS) $(CPLAIN_DEPS_LIBS) -export-symbols-regex ^champlain_.*
+AM_CPPFLAGS = $(GTK_DEPS_CFLAGS) -I$(top_srcdir) -DCHAMPLAIN_GTK_COMPILATION
+AM_LDFLAGS = $(GTK_DEPS_LIBS) -export-symbols-regex ^champlain_.*
EXTRA_DIST = $(CHAMPLAIN_GTK_MARSHAL_LIST)
gdk-2.0 >= 2.10,
clutter-0.8 >= 0.8,
clutter-cairo-0.8 >= 0.8,
- clutter-gtk-0.8 >= 0.8,
cairo >= 1.4,
libsoup-2.4 >= 2.4.1,
gio-2.0 >= 2.16
- gtk+-2.0 >= 2.2
]
)
# check for gtk-doc
if test x$enable_debug = xyes; then
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
+
+# -----------------------------------------------------------
+# Enable debug
+# -----------------------------------------------------------
+
+AC_ARG_ENABLE(gtk,
+ AC_HELP_STRING([--disable-gtk],[Don't 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.2
+ clutter-gtk-0.8 >= 0.8
+ ]
+ )
+
+ AC_CONFIG_FILES([champlain-gtk/Makefile
+ champlain-gtk.pc])
+
+ AC_DEFINE(ENABLE_GTK, [], [Enable Gtk+ view code])
+fi
+
+AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtk" = "xyes")
# -----------------------------------------------------------
AC_CONFIG_FILES([Makefile
champlain/Makefile
- champlain-gtk/Makefile
demos/Makefile
tidy/Makefile
docs/reference/Makefile
docs/reference/version.xml
- champlain.pc
- champlain-gtk.pc])
+ champlain.pc])
AC_OUTPUT
echo ""
echo " Prefix: ${prefix}"
echo " Compiler flags: ${CPPFLAGS}"
echo " Debug: ${enable_debug}"
+echo " Gtk+ View: ${enable_gtk}"
-noinst_PROGRAMS = launcher launcher-gtk animated-marker
+noinst_PROGRAMS = launcher animated-marker
INCLUDES = -I$(top_srcdir)
animated_marker_SOURCES = animated-marker.c
animated_marker_LDADD = $(DEPS_LIBS) ../champlain/libchamplain-0.3.la
+if ENABLE_GTK
+noinst_PROGRAMS += launcher-gtk
launcher_gtk_SOURCES = launcher-gtk.c
-launcher_gtk_LDADD = $(DEPS_LIBS) $(CPLAIN_DEPS_LIBS) \
+launcher_gtk_CPPFLAGS = $(GTK_DEPS_CFLAGS)
+launcher_gtk_LDADD = $(GTK_DEPS_LIBS) $(DEPS_LIBS) \
../champlain-gtk/libchamplain-gtk-0.3.la \
../champlain/libchamplain-0.3.la
+endif