Index: gstreamer/configure.ac
===================================================================
RCS file: /cvs/gstreamer/gstreamer/configure.ac,v
retrieving revision 1.499
diff -p -u -r1.499 configure.ac
--- gstreamer/configure.ac	7 Mar 2007 16:55:02 -0000	1.499
+++ gstreamer/configure.ac	22 Mar 2007 13:22:08 -0000
@@ -71,7 +71,7 @@ dnl *** check for arguments to configure
 dnl subsystems - can influence other decisions so needs to be high up
 dnl we need to AM_CONDITIONAL them here for automake 1.6.x compatibility
 AG_GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
-AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_GST_DISABLE_DEBUG" = "xyes")
+AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_DISABLE_GST_DEBUG" = "xyes")
 AG_GST_CHECK_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
 AM_CONDITIONAL(GST_DISABLE_LOADSAVE, test "x$GST_DISABLE_LOADSAVE" = "xyes")
 dnl define a substitution to use in docs/gst/gstreamer.types
@@ -198,16 +198,19 @@ AC_ARG_ENABLE(binary-registry,
     [enable experimental binary registry]),
   [
     case "${enableval}" in
-      yes) USE_BINARY_REGISTRY=yes ;;
-      no)  USE_BINARY_REGISTRY=no ;;
+      yes) GST_USING_BINARY_REGISTRY=yes ;;
+      no)  GST_USING_BINARY_REGISTRY=no ;;
       *)   AC_MSG_ERROR(bad value ${enableval} for --enable-binary-registry) ;;
     esac
   ], 
-  [USE_BINARY_REGISTRY=no]) dnl Default value
-if test "x$USE_BINARY_REGISTRY" = xyes; then
-  AC_DEFINE(USE_BINARY_REGISTRY, 1,
-    [Define if we should use binary registry instead xml registry])
+  [GST_USING_BINARY_REGISTRY=no]) dnl Default value
+if test "x$GST_USING_BINARY_REGISTRY" = xyes; then
+  GST_USING_BINARY_REGISTRY_DEFINE="#define GST_USING_BINARY_REGISTRY 1"
+else
+  GST_USING_BINARY_REGISTRY_DEFINE="#undef GST_USING_BINARY_REGISTRY"
 fi
+AC_SUBST(GST_USING_BINARY_REGISTRY_DEFINE)
+AM_CONDITIONAL(GST_USING_BINARY_REGISTRY, test "x$GST_USING_BINARY_REGISTRY" = "xyes")
 
 dnl *** checks for platform ***
 
@@ -402,11 +405,13 @@ GLIB_PREFIX="`$PKG_CONFIG --variable=pre
 AC_SUBST(GLIB_PREFIX)
 
 dnl libxml 2, which is/should be optional (FIXME)
-dnl (FIXME) if we use binary registry, the DISABLE_REGISTRY check need to go
 if test "x$GST_DISABLE_LOADSAVE" = "xyes" && \
    test "x$GST_DISABLE_REGISTRY" = "xyes"
 then
   AC_MSG_NOTICE([Registry and load/save are disabled, not checking for libxml2])
+elif test "x$GST_USING_BINARY_REGISTRY" = "xyes"
+then
+  AC_MSG_NOTICE([Using binary registry, not checking for libxml2])
 else
   dnl check for libxml2 with minimum req version
   AG_GST_LIBXML2_CHECK(2.4.9)
Index: gstreamer/docs/gst/gstreamer-sections.txt
===================================================================
RCS file: /cvs/gstreamer/gstreamer/docs/gst/gstreamer-sections.txt,v
retrieving revision 1.294
diff -p -u -r1.294 gstreamer-sections.txt
--- gstreamer/docs/gst/gstreamer-sections.txt	19 Mar 2007 10:47:55 -0000	1.294
+++ gstreamer/docs/gst/gstreamer-sections.txt	22 Mar 2007 13:22:09 -0000
@@ -392,7 +392,6 @@ GST_DISABLE_INDEX
 GST_DISABLE_PLUGIN
 GST_DISABLE_URI
 <SUBSECTION Private>
-GST_DISABLE_LOADSAVE_REGISTRY
 GST_HAVE_GLIB_2_8
 GST_PTR_FORMAT
 GST_SEGMENT_FORMAT
@@ -401,7 +400,9 @@ GST_PLUGIN_EXPORT
 GST_PADDING
 GST_PADDING_LARGE
 GST_PADDING_INIT
+GST_USING_BINARY_REGISTRY
 GST_USING_PRINTF_EXTENSION
+GST_USING_XML
 </SECTION>
 
 <SECTION>
Index: gstreamer/gst/Makefile.am
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/Makefile.am,v
retrieving revision 1.220
diff -p -u -r1.220 Makefile.am
--- gstreamer/gst/Makefile.am	11 Jan 2007 13:45:51 -0000	1.220
+++ gstreamer/gst/Makefile.am	22 Mar 2007 13:22:09 -0000
@@ -9,7 +9,11 @@ endif
 if GST_DISABLE_REGISTRY
 GST_REGISTRY_SRC = 
 else
-GST_REGISTRY_SRC = gstregistryxml.c gstregistrybinary.c
+if GST_USING_BINARY_REGISTRY
+GST_REGISTRY_SRC = gstregistrybinary.c
+else
+GST_REGISTRY_SRC = gstregistryxml.c
+endif
 endif
 
 if GST_DISABLE_PARSE
Index: gstreamer/gst/gst.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gst.c,v
retrieving revision 1.238
diff -p -u -r1.238 gst.c
--- gstreamer/gst/gst.c	20 Mar 2007 10:23:25 -0000	1.238
+++ gstreamer/gst/gst.c	22 Mar 2007 13:22:10 -0000
@@ -121,6 +121,7 @@
 #include <locale.h>             /* for LC_ALL */
 
 #include "gst.h"
+#include "gstconfig.h"
 
 #define GST_CAT_DEFAULT GST_CAT_GST_INIT
 
@@ -643,7 +644,7 @@ scan_and_update_registry (GstRegistry * 
   GList *l;
 
   GST_DEBUG ("reading registry cache: %s", registry_file);
-#ifdef USE_BINARY_REGISTRY
+#ifdef GST_USING_BINARY_REGISTRY
   gst_registry_binary_read_cache (default_registry, registry_file);
 #else
   gst_registry_xml_read_cache (default_registry, registry_file);
@@ -718,7 +719,7 @@ scan_and_update_registry (GstRegistry * 
   }
 
   GST_INFO ("Registry cache changed. Writing new registry cache");
-#ifdef USE_BINARY_REGISTRY
+#ifdef GST_USING_BINARY_REGISTRY
   if (!gst_registry_binary_write_cache (default_registry, registry_file)) {
 #else
   if (!gst_registry_xml_write_cache (default_registry, registry_file)) {
@@ -837,7 +838,7 @@ ensure_current_registry_forking (GstRegi
 
     if (res_byte == '1') {
       GST_DEBUG ("Child succeeded. Parent reading registry cache");
-#ifdef USE_BINARY_REGISTRY
+#ifdef GST_USING_BINARY_REGISTRY
       gst_registry_binary_read_cache (default_registry, registry_file);
 #else
       gst_registry_xml_read_cache (default_registry, registry_file);
@@ -862,7 +863,7 @@ ensure_current_registry (GError ** error
   default_registry = gst_registry_get_default ();
   registry_file = g_strdup (g_getenv ("GST_REGISTRY"));
   if (registry_file == NULL) {
-#ifdef USE_BINARY_REGISTRY
+#ifdef GST_USING_BINARY_REGISTRY
     registry_file = g_build_filename (g_get_home_dir (),
         ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL);
 #else
Index: gstreamer/gst/gstconfig.h.in
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstconfig.h.in,v
retrieving revision 1.23
diff -p -u -r1.23 gstconfig.h.in
--- gstreamer/gst/gstconfig.h.in	5 Jan 2007 13:23:02 -0000	1.23
+++ gstreamer/gst/gstconfig.h.in	22 Mar 2007 13:22:10 -0000
@@ -53,7 +53,6 @@
 /* trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
 
 #if 0
-#define GST_DISABLE_LOADSAVE_REGISTRY 1
 #define GST_DISABLE_GST_DEBUG 1
 #define GST_DISABLE_LOADSAVE 1
 #define GST_DISABLE_PARSE 1
@@ -145,6 +144,7 @@
  * This can only be used on types whose size is >= sizeof(gpointer).
  */
 @GST_PRINTF_EXTENSION_POINTER_FORMAT_DEFINE@
+
 /**
  * GST_SEGMENT_FORMAT:
  *
@@ -167,12 +167,17 @@
    refcounting */
 @GST_HAVE_GLIB_2_8_DEFINE@
 
+/* whether or not we are using a binary registry */
+@GST_USING_BINARY_REGISTRY_DEFINE@
+
 /***** Deal with XML stuff, we have to handle both loadsave and registry *****/
 
-#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
-# include <libxml/parser.h>
+#if defined(GST_DISABLE_LOADSAVE) && \
+    (defined(GST_DISABLE_REGISTRY) || defined(GST_USING_BINARY_REGISTRY))
+# undef GST_USING_XML
 #else
-# define GST_DISABLE_LOADSAVE_REGISTRY
+# include <libxml/parser.h>
+# define GST_USING_XML 1
 #endif
 
 /**
Index: gstreamer/gst/gstobject.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstobject.c,v
retrieving revision 1.122
diff -p -u -r1.122 gstobject.c
--- gstreamer/gst/gstobject.c	13 Mar 2007 14:53:21 -0000	1.122
+++ gstreamer/gst/gstobject.c	22 Mar 2007 13:22:10 -0000
@@ -102,7 +102,7 @@ enum
 {
   PARENT_SET,
   PARENT_UNSET,
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
   OBJECT_SAVED,
 #endif
   DEEP_NOTIFY,
@@ -134,7 +134,7 @@ static GType gst_signal_object_get_type 
 static void gst_signal_object_class_init (GstSignalObjectClass * klass);
 static void gst_signal_object_init (GstSignalObject * object);
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
 static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
 #endif
 
@@ -153,7 +153,7 @@ static void gst_object_finalize (GObject
 
 static gboolean gst_object_set_name_default (GstObject * object);
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
 static void gst_object_real_restore_thyself (GstObject * object,
     xmlNodePtr self);
 #endif
@@ -231,7 +231,7 @@ gst_object_class_init (GstObjectClass * 
       G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstObjectClass, parent_unset), NULL,
       NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
   /**
    * GstObject::object-saved:
    * @gstobject: a #GstObject
@@ -954,7 +954,7 @@ gst_object_check_uniqueness (GList * lis
 }
 
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
 /**
  * gst_object_save_thyself:
  * @object: a #GstObject to save
@@ -1012,7 +1012,7 @@ gst_object_real_restore_thyself (GstObje
 
   gst_class_signal_emit_by_name (object, "object_loaded", self);
 }
-#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
+#endif /* GST_DISABLE_LOADSAVE */
 
 static void
 gst_object_set_property (GObject * object, guint prop_id,
@@ -1133,10 +1133,10 @@ struct _GstSignalObjectClass
   GObjectClass parent_class;
 
   /* signals */
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
   void (*object_loaded) (GstSignalObject * object, GstObject * new,
       xmlNodePtr self);
-#endif                          /* GST_DISABLE_LOADSAVE_REGISTRY */
+#endif /* GST_DISABLE_LOADSAVE */
 };
 
 static GType
@@ -1174,7 +1174,7 @@ gst_signal_object_class_init (GstSignalO
 
   parent_class = g_type_class_peek_parent (klass);
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
   gst_signal_object_signals[SO_OBJECT_LOADED] =
       g_signal_new ("object-loaded", G_TYPE_FROM_CLASS (klass),
       G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSignalObjectClass, object_loaded),
@@ -1209,7 +1209,7 @@ gst_class_signal_connect (GstObjectClass
       func_data);
 }
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
 /**
  * gst_class_signal_emit_by_name:
  * @object: a #GstObject that emits the signal
@@ -1229,4 +1229,4 @@ gst_class_signal_emit_by_name (GstObject
   g_signal_emit_by_name (oclass->signal_object, name, object, self);
 }
 
-#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
+#endif /* GST_DISABLE_LOADSAVE */
Index: gstreamer/gst/gstobject.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstobject.h,v
retrieving revision 1.79
diff -p -u -r1.79 gstobject.h
--- gstreamer/gst/gstobject.h	17 Oct 2006 11:57:32 -0000	1.79
+++ gstreamer/gst/gstobject.h	22 Mar 2007 13:22:10 -0000
@@ -41,7 +41,7 @@ G_BEGIN_DECLS
 
 /* make sure we don't change the object size but still make it compile
  * without libxml */
-#ifdef GST_DISABLE_LOADSAVE_REGISTRY
+#ifdef GST_DISABLE_LOADSAVE
 #define GstXmlNodePtr	gpointer
 #else
 #define GstXmlNodePtr	xmlNodePtr
@@ -302,7 +302,7 @@ gchar *		gst_object_get_path_string	(Gst
 gboolean	gst_object_check_uniqueness	(GList *list, const gchar *name);
 
 /* load/save */
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
 GstXmlNodePtr   gst_object_save_thyself    (GstObject *object, GstXmlNodePtr parent);
 void            gst_object_restore_thyself (GstObject *object, GstXmlNodePtr self);
 #else
@@ -318,7 +318,7 @@ guint		gst_class_signal_connect	(GstObje
 						 gpointer	 func,
 						 gpointer	 func_data);
 
-#ifndef GST_DISABLE_LOADSAVE_REGISTRY
+#ifndef GST_DISABLE_LOADSAVE
 void        gst_class_signal_emit_by_name   (GstObject     * object,
                                              const gchar   * name,
                                              GstXmlNodePtr   self);
Index: gstreamer/gst/gstregistry.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstregistry.h,v
retrieving revision 1.38
diff -p -u -r1.38 gstregistry.h
--- gstreamer/gst/gstregistry.h	11 Jan 2007 13:45:51 -0000	1.38
+++ gstreamer/gst/gstregistry.h	22 Mar 2007 13:22:10 -0000
@@ -109,7 +109,7 @@ GstPluginFeature*	gst_registry_find_feat
 GstPlugin * 		gst_registry_lookup 		(GstRegistry *registry, const char *filename);
 GstPluginFeature * 	gst_registry_lookup_feature 	(GstRegistry *registry, const char *name);
 
-#ifdef USE_BINARY_REGISTRY
+#ifdef GST_USING_BINARY_REGISTRY
 gboolean 		gst_registry_binary_read_cache 	(GstRegistry * registry, const char *location);
 gboolean 		gst_registry_binary_write_cache	(GstRegistry * registry, const char *location);
 #else 
Index: gstreamer/win32/common/gstconfig.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/win32/common/gstconfig.h,v
retrieving revision 1.4
diff -p -u -r1.4 gstconfig.h
--- gstreamer/win32/common/gstconfig.h	28 Oct 2006 15:03:19 -0000	1.4
+++ gstreamer/win32/common/gstconfig.h	22 Mar 2007 13:22:11 -0000
@@ -52,7 +52,6 @@
 /*** trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
 
 #if 0
-#define GST_DISABLE_LOADSAVE_REGISTRY 1
 #define GST_DISABLE_GST_DEBUG 1
 #define GST_DISABLE_LOADSAVE 1
 #define GST_DISABLE_PARSE 1
@@ -137,12 +136,17 @@
    refcounting */
 #define GST_HAVE_GLIB_2_8 1
 
+/* whether or not we are using a binary registry */
+#undef GST_USING_BINARY_REGISTRY
+
 /***** Deal with XML stuff, we have to handle both loadsave and registry *****/
 
-#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
-# include <libxml/parser.h>
+#if defined(GST_DISABLE_LOADSAVE) && \
+    (defined(GST_DISABLE_REGISTRY) || defined(GST_USING_BINARY_REGISTRY))
+# undef GST_USING_XML
 #else
-# define GST_DISABLE_LOADSAVE_REGISTRY
+# include <libxml/parser.h>
+# define GST_USING_XML 1
 #endif
 
 /**
