From 74f409b76fc1ec8fcadbc021549bab582a881590 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 9 Mar 2005 08:45:03 +0000 Subject: [PATCH] Fix libxml-less compilation (--disable-loadsave). Original commit message from CVS: * configure.ac: * gst/gstconfig.h.in: * gst/indexers/gstindexers.c: (plugin_init): * gst/registries/gstxmlregistry.h: Fix libxml-less compilation (--disable-loadsave). --- ChangeLog | 8 ++++++++ configure.ac | 4 ++-- gst/gstconfig.h.in | 5 +++-- gst/indexers/gstindexers.c | 2 ++ gst/registries/gstxmlregistry.h | 1 + plugins/indexers/gstindexers.c | 2 ++ 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e481c0bbec..0359d607fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-03-09 Ronald S. Bultje + + * configure.ac: + * gst/gstconfig.h.in: + * gst/indexers/gstindexers.c: (plugin_init): + * gst/registries/gstxmlregistry.h: + Fix libxml-less compilation (--disable-loadsave). + 2005-03-09 Ronald S. Bultje * gst/registries/Makefile.am: diff --git a/configure.ac b/configure.ac index 534d6ff628..4249a7daa3 100644 --- a/configure.ac +++ b/configure.ac @@ -275,9 +275,9 @@ AC_SUBST(GLIB_ONLY_CFLAGS) AC_SUBST(GLIB_ONLY_LIBS) dnl === libxml 2 === -if test "x$GST_DISABLE_LOADSAVE" = "xyes" && test "x$GST_DISABLE_REGISTRY" = "xyes" +if test "x$GST_DISABLE_LOADSAVE" = "xyes" then - AC_MSG_NOTICE([Registry and load/save are disabled, not checking for libxml2]) + AC_MSG_NOTICE([Load/save is disabled, not checking for libxml2]) else dnl check for libxml2 with minimum req version GST_LIBXML2_CHECK(2.4.9) diff --git a/gst/gstconfig.h.in b/gst/gstconfig.h.in index b6ae066196..d0d819389a 100644 --- a/gst/gstconfig.h.in +++ b/gst/gstconfig.h.in @@ -61,10 +61,11 @@ /***** Deal with XML stuff, we have to handle both loadsave and registry *****/ -#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) ) +#if (! defined(GST_DISABLE_LOADSAVE) ) # include #else -# define GST_DISABLE_LOADSAVE_REGISTRY +/* misnomer but we cannot rename symbols */ +# define GST_DISABLE_LOADSAVE_REGISTRY #endif #ifdef WIN32 diff --git a/gst/indexers/gstindexers.c b/gst/indexers/gstindexers.c index 2e45116f46..188a8aa85f 100644 --- a/gst/indexers/gstindexers.c +++ b/gst/indexers/gstindexers.c @@ -30,7 +30,9 @@ plugin_init (GstPlugin * plugin) gboolean res = TRUE; res &= gst_mem_index_plugin_init (plugin); +#ifndef GST_DISABLE_LOADSAVE_REGISTRY res &= gst_file_index_plugin_init (plugin); +#endif return res; } diff --git a/gst/registries/gstxmlregistry.h b/gst/registries/gstxmlregistry.h index bf1d6a10be..0504f52f97 100644 --- a/gst/registries/gstxmlregistry.h +++ b/gst/registries/gstxmlregistry.h @@ -25,6 +25,7 @@ #define __GST_XML_REGISTRY_H__ #include +#include G_BEGIN_DECLS diff --git a/plugins/indexers/gstindexers.c b/plugins/indexers/gstindexers.c index 2e45116f46..188a8aa85f 100644 --- a/plugins/indexers/gstindexers.c +++ b/plugins/indexers/gstindexers.c @@ -30,7 +30,9 @@ plugin_init (GstPlugin * plugin) gboolean res = TRUE; res &= gst_mem_index_plugin_init (plugin); +#ifndef GST_DISABLE_LOADSAVE_REGISTRY res &= gst_file_index_plugin_init (plugin); +#endif return res; }