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> 2007-04-20 Stefan Kost <ensonic@users.sf.net>
* docs/design/draft-tagreading.txt: * docs/design/draft-tagreading.txt:

View file

@ -391,7 +391,7 @@ dnl GLib
AG_GST_GLIB_CHECK([2.8]) 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" GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
AC_SUBST(GST_HAVE_GLIB_2_8_DEFINE) 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$GST_DISABLE_REGISTRY" = "xyes" || \
test "x$USE_BINARY_REGISTRY" = "xyes" ) test "x$USE_BINARY_REGISTRY" = "xyes" )
then 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 else
dnl check for libxml2 with minimum req version dnl check for libxml2 with minimum req version
AG_GST_LIBXML2_CHECK(2.4.9) AG_GST_LIBXML2_CHECK(2.4.9)
GST_DISABLE_XML_DEFINE="/* #undef GST_DISABLE_XML */"
fi fi
AC_SUBST(GST_DISABLE_XML_DEFINE)
dnl check for "check", unit testing library/header dnl check for "check", unit testing library/header
AM_PATH_CHECK(0.9.2, AM_PATH_CHECK(0.9.2,
@ -438,7 +441,7 @@ AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
dnl set location of plugin directory dnl set location of plugin directory
AG_GST_SET_PLUGINDIR 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" GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0"
AC_SUBST(GST_PKG_DEPS) 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 LIBS: XML doesn't need to be added because we don't explicitly use symbols
dnl from LibXML except for in the core library 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)" 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 FIXME: check if LTLIBINTL is needed everywhere
dnl I presume it is given that it contains the symbols that _() stuff maps to dnl I presume it is given that it contains the symbols that _() stuff maps to
GST_ALL_LIBS="$GLIB_LIBS $LTLIBINTL \$(GCOV_LIBS)" GST_ALL_LIBS="$GLIB_LIBS $LTLIBINTL \$(GCOV_LIBS)"
dnl LDFLAGS really should only contain flags, not libs - they get added before 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 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
GST_ALL_LDFLAGS="-no-undefined" GST_ALL_LDFLAGS="-no-undefined"

View file

@ -392,6 +392,7 @@ GST_DISABLE_ENUMTYPES
GST_DISABLE_INDEX GST_DISABLE_INDEX
GST_DISABLE_PLUGIN GST_DISABLE_PLUGIN
GST_DISABLE_URI GST_DISABLE_URI
GST_DISABLE_XML
<SUBSECTION Private> <SUBSECTION Private>
GST_DISABLE_LOADSAVE_REGISTRY GST_DISABLE_LOADSAVE_REGISTRY
GST_HAVE_GLIB_2_8 GST_HAVE_GLIB_2_8
@ -1640,7 +1641,7 @@ gst_query_new_segment
gst_query_set_segment gst_query_set_segment
gst_query_parse_segment gst_query_parse_segment
<SUBSECTION Standard> SUBSECTION Standard>
GstQueryClass GstQueryClass
GST_QUERY GST_QUERY
GST_IS_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 built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \ 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 # temporarily not used

View file

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

View file

@ -102,7 +102,7 @@ enum
{ {
PARENT_SET, PARENT_SET,
PARENT_UNSET, PARENT_UNSET,
#ifndef GST_DISABLE_LOADSAVE_REGISTRY #ifndef GST_DISABLE_LOADSAVE
OBJECT_SAVED, OBJECT_SAVED,
#endif #endif
DEEP_NOTIFY, 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_class_init (GstSignalObjectClass * klass);
static void gst_signal_object_init (GstSignalObject * object); 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 }; static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
#endif #endif
@ -153,7 +153,7 @@ static void gst_object_finalize (GObject * object);
static gboolean gst_object_set_name_default (GstObject * 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, static void gst_object_real_restore_thyself (GstObject * object,
xmlNodePtr self); xmlNodePtr self);
#endif #endif
@ -231,7 +231,7 @@ gst_object_class_init (GstObjectClass * klass)
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstObjectClass, parent_unset), NULL, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstObjectClass, parent_unset), NULL,
NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); 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::object-saved:
* @gstobject: a #GstObject * @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: * gst_object_save_thyself:
* @object: a #GstObject to save * @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); gst_class_signal_emit_by_name (object, "object_loaded", self);
} }
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */ #endif /* GST_DISABLE_LOADSAVE */
static void static void
gst_object_set_property (GObject * object, guint prop_id, gst_object_set_property (GObject * object, guint prop_id,
@ -1133,10 +1133,10 @@ struct _GstSignalObjectClass
GObjectClass parent_class; GObjectClass parent_class;
/* signals */ /* signals */
#ifndef GST_DISABLE_LOADSAVE_REGISTRY #ifndef GST_DISABLE_LOADSAVE
void (*object_loaded) (GstSignalObject * object, GstObject * new, void (*object_loaded) (GstSignalObject * object, GstObject * new,
xmlNodePtr self); xmlNodePtr self);
#endif /* GST_DISABLE_LOADSAVE_REGISTRY */ #endif
}; };
static GType static GType
@ -1174,7 +1174,7 @@ gst_signal_object_class_init (GstSignalObjectClass * klass)
parent_class = g_type_class_peek_parent (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] = gst_signal_object_signals[SO_OBJECT_LOADED] =
g_signal_new ("object-loaded", G_TYPE_FROM_CLASS (klass), g_signal_new ("object-loaded", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSignalObjectClass, object_loaded), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSignalObjectClass, object_loaded),
@ -1209,7 +1209,7 @@ gst_class_signal_connect (GstObjectClass * klass,
func_data); func_data);
} }
#ifndef GST_DISABLE_LOADSAVE_REGISTRY #ifndef GST_DISABLE_LOADSAVE
/** /**
* gst_class_signal_emit_by_name: * gst_class_signal_emit_by_name:
* @object: a #GstObject that emits the signal * @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); 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 /* make sure we don't change the object size but still make it compile
* without libxml */ * without libxml */
#ifdef GST_DISABLE_LOADSAVE_REGISTRY #ifdef GST_DISABLE_LOADSAVE
#define GstXmlNodePtr gpointer #define GstXmlNodePtr gpointer
#else #else
#define GstXmlNodePtr xmlNodePtr #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); gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
/* load/save */ /* load/save */
#ifndef GST_DISABLE_LOADSAVE_REGISTRY #ifndef GST_DISABLE_LOADSAVE
GstXmlNodePtr gst_object_save_thyself (GstObject *object, GstXmlNodePtr parent); GstXmlNodePtr gst_object_save_thyself (GstObject *object, GstXmlNodePtr parent);
void gst_object_restore_thyself (GstObject *object, GstXmlNodePtr self); void gst_object_restore_thyself (GstObject *object, GstXmlNodePtr self);
#else #else
@ -318,7 +318,7 @@ guint gst_class_signal_connect (GstObjectClass *klass,
gpointer func, gpointer func,
gpointer func_data); gpointer func_data);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY #ifndef GST_DISABLE_LOADSAVE
void gst_class_signal_emit_by_name (GstObject * object, void gst_class_signal_emit_by_name (GstObject * object,
const gchar * name, const gchar * name,
GstXmlNodePtr self); GstXmlNodePtr self);