? canvas-without-glade.diff
Index: configure.in
===================================================================
RCS file: /cvs/gnome/libgnomecanvas/configure.in,v
retrieving revision 1.58
diff -u -p -r1.58 configure.in
--- configure.in	2002/02/28 14:45:21	1.58
+++ configure.in	2002/03/01 12:54:51
@@ -38,10 +38,21 @@ PKG_CHECK_MODULES(LIBGNOMECANVAS, $CANVA
 AC_SUBST(LIBGNOMECANVAS_CFLAGS)
 AC_SUBST(LIBGNOMECANVAS_LIBS)
 
-PKG_CHECK_MODULES(CANVAS_GLADE, $CANVAS_MODULES libglade-2.0 >= 1.99.7)
-AC_SUBST(CANVAS_GLADE_CFLAGS)
-AC_SUBST(CANVAS_GLADE_LIBS)
+AC_ARG_ENABLE(glade, [  --enable-glade          enable glade support (needs libglade-2.0) [default=auto]], , enable_glade=yes)
+if test "x$enable_glade" = "xyes"; then
+  PKG_CHECK_MODULES(CANVAS_GLADE, $CANVAS_MODULES libglade-2.0 >= 1.99.7,
+    use_glade=yes
+    AC_SUBST(CANVAS_GLADE_CFLAGS)
+    AC_SUBST(CANVAS_GLADE_LIBS),
+    AC_MSG_ERROR([
+*** libglade-2.0 is needed. Either install it or turn off
+*** glade support using the --disable-glade option.]))
+else
+  AC_MSG_WARN([*** libgnomecanvas will be built without glade support.])
+fi
 
+AM_CONDITIONAL(USE_GLADE, test "x$use_glade" = xyes)
+
 dnl Don't use AC_PROG_AWK since we need the full pathname.
 AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
 AC_PATH_PROGS(PERL, perl5 perl)
@@ -49,7 +60,7 @@ AC_PATH_PROGS(PERL, perl5 perl)
 # glib-genmarshal
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 
-AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
+AC_ARG_WITH(html-dir, [  --with-html-dir=PATH    path to installed docs ])
 
 if test "x$with_html_dir" = "x" ; then
   HTML_DIR='${datadir}/gtk-doc/html'
Index: glade/Makefile.am
===================================================================
RCS file: /cvs/gnome/libgnomecanvas/glade/Makefile.am,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.am
--- glade/Makefile.am	2001/11/07 20:38:33	1.2
+++ glade/Makefile.am	2002/03/01 12:54:51
@@ -7,7 +7,10 @@ INCLUDES = \
 	$(CANVAS_GLADE_CFLAGS)
 
 glademoduledir = $(libdir)/libglade/2.0
+
+if USE_GLADE
 glademodule_LTLIBRARIES = libcanvas.la
+endif
 
 libcanvas_la_LIBADD = \
 	$(top_builddir)/libgnomecanvas/libgnomecanvas-2.la	\
