Index: configure.in
===================================================================
RCS file: /cvs/gnome/libglade/configure.in,v
retrieving revision 1.92
diff -u -r1.92 configure.in
--- configure.in	23 Jan 2004 00:48:26 -0000	1.92
+++ configure.in	12 Feb 2004 15:53:15 -0000
@@ -148,6 +148,19 @@
 fi
 changequote([,])dnl
 
+dnl xml catalog handling
+AC_ARG_WITH(catalog, AC_HELP_STRING([--with-catalog=file],
+            [use "file" as catalog file, default /etc/xml/catalog]),
+            CATALOG="${withval}", CATALOG="/etc/xml/catalog")
+AC_SUBST(CATALOG)
+if test "${CATALOG}" != no; then
+  AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
+  if test "${XMLCATALOG}" = no; then
+     CATALOG=no
+  fi
+fi
+AM_CONDITIONAL(REGISTER_DTD, test "${CATALOG}" != no)
+
 dnl hack to get aclocal to use the ACLOCAL_FLAGS env var
 ACLOCAL_AMFLAGS=\${ACLOCAL_FLAGS}
 AC_SUBST(ACLOCAL_AMFLAGS)
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/libglade/Makefile.am,v
retrieving revision 1.48
diff -u -r1.48 Makefile.am
--- Makefile.am	26 Feb 2003 14:22:54 -0000	1.48
+++ Makefile.am	12 Feb 2004 15:53:15 -0000
@@ -19,15 +19,18 @@
 
 # handling of the XML catalog
 
-XMLCATALOG = /etc/xml/catalog
-
 xmldir = $(datadir)/xml/libglade
 xml_DATA = glade-2.0.dtd
 
+if REGISTER_DTD
+install-data-local:
+	-$(XMLCATALOG) --noout --add "system" "http://glade.gnome.org/glade-2.0.dtd" $(xmldir)/glade-2.0.dtd $(CATALOG)
+uninstall-local:
+	-$(XMLCATALOG) --noout --del $(xmldir)/glade-2.0.dtd $(CATALOG)
+else
 install-data-local:
-	-xmlcatalog --noout --add "system" "http://glade.gnome.org/glade-2.0.dtd" $(xmldir)/glade-2.0.dtd $(XMLCATALOG)
 uninstall-local:
-	-xmlcatalog --noout --del $(xmldir)/glade-2.0.dtd $(XMLCATALOG)
+endif
 
 #small hack to get distcheck to work
 clean-local:
