2nd attempt to have a xml-less build as a joined effort of #413123 and #421480.

Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gstconfig.h.in:
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstobject.h:
2nd attempt to have a xml-less build as a joined effort of #413123
and #421480.
This commit is contained in:
Stefan Kost 2007-04-20 08:39:35 +00:00
parent d5669b316a
commit 92cd1de49e
7 changed files with 83 additions and 52 deletions

View file

@ -1,3 +1,15 @@
2007-04-20 Stefan Kost <ensonic@users.sf.net>
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gstconfig.h.in:
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstobject.h:
2nd attempt to have a xml-less build as a joined effort of #413123
and #421480.
2007-04-20 Stefan Kost <ensonic@users.sf.net>
* docs/design/draft-tagreading.txt:

View file

@ -391,7 +391,7 @@ dnl GLib
AG_GST_GLIB_CHECK([2.8])
dnl Guess we need to keep this around until 0.11
dnl FIXME: 0.11: Guess we need to keep this around until 0.11
GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
AC_SUBST(GST_HAVE_GLIB_2_8_DEFINE)
@ -408,11 +408,14 @@ if test "x$GST_DISABLE_LOADSAVE" = "xyes" && \
( test "x$GST_DISABLE_REGISTRY" = "xyes" || \
test "x$USE_BINARY_REGISTRY" = "xyes" )
then
AC_MSG_NOTICE([Registry and load/save are disabled, not checking for libxml2])
AC_MSG_NOTICE([XML registry and load/save are disabled, not checking for libxml2])
GST_DISABLE_XML_DEFINE="#define GST_DISABLE_XML 1"
else
dnl check for libxml2 with minimum req version
AG_GST_LIBXML2_CHECK(2.4.9)
GST_DISABLE_XML_DEFINE="/* #undef GST_DISABLE_XML */"
fi
AC_SUBST(GST_DISABLE_XML_DEFINE)
dnl check for "check", unit testing library/header
AM_PATH_CHECK(0.9.2,
@ -438,7 +441,7 @@ AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
dnl set location of plugin directory
AG_GST_SET_PLUGINDIR
dnl FIXME: add LIBXML_PKG here
dnl FIXME: add LIBXML_PKG here if we use it
GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0"
AC_SUBST(GST_PKG_DEPS)
@ -484,9 +487,11 @@ dnl will need the GStreamer source and generated headers
dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols
dnl from LibXML except for in the core library
GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir) $GLIB_CFLAGS $XML_CFLAGS \$(GST_OPTION_CFLAGS)"
dnl FIXME: check if LTLIBINTL is needed everywhere
dnl I presume it is given that it contains the symbols that _() stuff maps to
GST_ALL_LIBS="$GLIB_LIBS $LTLIBINTL \$(GCOV_LIBS)"
dnl LDFLAGS really should only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
GST_ALL_LDFLAGS="-no-undefined"

View file

@ -392,6 +392,7 @@ GST_DISABLE_ENUMTYPES
GST_DISABLE_INDEX
GST_DISABLE_PLUGIN
GST_DISABLE_URI
GST_DISABLE_XML
<SUBSECTION Private>
GST_DISABLE_LOADSAVE_REGISTRY
GST_HAVE_GLIB_2_8
@ -1640,7 +1641,7 @@ gst_query_new_segment
gst_query_set_segment
gst_query_parse_segment
<SUBSECTION Standard>
SUBSECTION Standard>
GstQueryClass
GST_QUERY
GST_IS_QUERY

View file

@ -70,7 +70,8 @@ built_header_make = gstenumtypes.h gstmarshal.h
built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gstmarshal.list gstxml.c gstparse.c gsttrace.c gstregistryxml.c
gstmarshal.list gstparse.c gsttrace.c gstxml.c \
gstregistryxml.c gstregistrybinary.c
# temporarily not used

View file

@ -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
@ -64,6 +63,8 @@
#define GST_DISABLE_INDEX 1
#define GST_DISABLE_PLUGIN 1
#define GST_DISABLE_URI 1
#define GST_DISABLE_XML 1
#define GST_DISABLE_LOADSAVE_REGISTRY 1
#define GST_HAVE_GLIB_2_8 1
#endif
@ -117,12 +118,20 @@
/**
* GST_DISABLE_REGISTRY:
*
* Configures the use of the plugin registry
* if one disables this, required plugins need to be loaded and registered
* Configures the use of the plugin registry.
* If one disables this, required plugins need to be loaded and registered
* manualy
*/
@GST_DISABLE_REGISTRY_DEFINE@
/**
* GST_DISABLE_XML:
*
* Configures the use libxml2. This setting is derived from the settings of
* %GST_DISABLE_LOADSAVE and %GST_DISABLE_REGISTRY (in the xml registry case).
*/
@GST_DISABLE_XML_DEFINE@
/* FIXME: test and document these! */
/* Configure the use of glib enumtypes (useful for introspection)
* see http://bugzilla.gnome.org/show_bug.cgi?id=342564
@ -163,15 +172,18 @@
/* whether or not the CPU supports unaligned access */
@GST_HAVE_UNALIGNED_ACCESS_DEFINE@
/* whether or not we are using glib 2.8 api, e.g. atomic gobject
refcounting */
/* FIXME: 0.11 (remove)
* whether or not we are using glib 2.8 api, e.g. atomic gobject
* refcounting */
@GST_HAVE_GLIB_2_8_DEFINE@
/***** Deal with XML stuff, we have to handle both loadsave and registry *****/
#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
/* FIXME: move include to where we need it */
/*#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )*/
#ifndef GST_DISABLE_XML
# include <libxml/parser.h>
#else
/* FIXME: 0.11 (replace by GST_DISABLE_XML) */
# define GST_DISABLE_LOADSAVE_REGISTRY
#endif

View file

@ -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 (void);
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 * object);
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 * klass)
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 * list, const gchar * name)
}
#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 (GstObject * object, xmlNodePtr self)
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
};
static GType
@ -1174,7 +1174,7 @@ gst_signal_object_class_init (GstSignalObjectClass * klass)
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 * klass,
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 * object,
g_signal_emit_by_name (oclass->signal_object, name, object, self);
}
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */
#endif /* GST_DISABLE_LOADSAVE */

View file

@ -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 (GstObject *object);
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 (GstObjectClass *klass,
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);