From 870761131be0eaf18be6e1527704f9a812ff165a Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 30 Nov 2005 19:01:53 +0000 Subject: [PATCH] various fixes to make Original commit message from CVS: * configure.ac: * gst/Makefile.am: * gst/gst.c: * gst/gstplugin.h: * gst/gstregistry.h: * tests/benchmarks/complexity.c: * tests/benchmarks/mass-elements.c: * tests/check/Makefile.am: * tools/Makefile.am: * tools/gst-inspect.c: * tools/gst-xmlinspect.c: various fixes to make --disable-nls --disable-registry --disable-loadsave --disable-parse --disable-gst-debug work and get the core .so down to 360444 bytes after stripping --- ChangeLog | 18 ++++++++++++ configure.ac | 17 ++++++++++++ gst/Makefile.am | 14 ++++++++-- gst/gst.c | 4 ++- gst/gstplugin.h | 1 + gst/gstregistry.h | 1 + tests/benchmarks/complexity.c | 1 + tests/benchmarks/mass-elements.c | 1 + tests/check/Makefile.am | 9 ++++-- tools/Makefile.am | 47 ++++++++++++++++++++++++-------- tools/gst-inspect.c | 1 + tools/gst-xmlinspect.c | 1 + 12 files changed, 97 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16f44752d4..da83e83ae0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2005-11-30 Thomas Vander Stichele + + * configure.ac: + * gst/Makefile.am: + * gst/gst.c: + * gst/gstplugin.h: + * gst/gstregistry.h: + * tests/benchmarks/complexity.c: + * tests/benchmarks/mass-elements.c: + * tests/check/Makefile.am: + * tools/Makefile.am: + * tools/gst-inspect.c: + * tools/gst-xmlinspect.c: + various fixes to make + --disable-nls --disable-registry --disable-loadsave + --disable-parse --disable-gst-debug + work and get the core .so down to 360444 bytes after stripping + 2005-11-30 Thomas Vander Stichele * Makefile.am: diff --git a/configure.ac b/configure.ac index 57f4ccd173..586816acc5 100644 --- a/configure.ac +++ b/configure.ac @@ -64,6 +64,14 @@ GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem]) AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_GST_DISABLE_DEBUG" = "xyes") 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 +if test "x$GST_DISABLE_LOADSAVE" = "xyes" +then + GST_LOADSAVE_DOC_TYPES="%" +else + GST_LOADSAVE_DOC_TYPES= +fi +AC_SUBST(GST_LOADSAVE_DOC_TYPES) GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser]) AM_CONDITIONAL(GST_DISABLE_PARSE, test "x$GST_DISABLE_PARSE" = "xyes") GST_CHECK_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem]) @@ -72,6 +80,14 @@ GST_CHECK_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing]) AM_CONDITIONAL(GST_DISABLE_ALLOC_TRACE, test "x$GST_DISABLE_ALLOC_TRACE" = "xyes") GST_CHECK_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry]) AM_CONDITIONAL(GST_DISABLE_REGISTRY, test "x$GST_DISABLE_REGISTRY" = "xyes") +dnl define a substitution to use in docs/gst/gstreamer.types +if test "x$GST_DISABLE_REGISTRY" = "xyes" +then + GST_REGISTRY_DOC_TYPES="%" +else + GST_REGISTRY_DOC_TYPES= +fi +AC_SUBST(GST_REGISTRY_DOC_TYPES) GST_CHECK_SUBSYSTEM_DISABLE(ENUMTYPES,[enum types]) AM_CONDITIONAL(GST_DISABLE_ENUMTYPES, test "x$GST_DISABLE_ENUMTYPES" = "xyes") GST_CHECK_SUBSYSTEM_DISABLE(INDEX,[index]) @@ -495,6 +511,7 @@ common/m4/Makefile docs/Makefile docs/faq/Makefile docs/gst/Makefile +docs/gst/gstreamer.types docs/libs/Makefile docs/manual/Makefile docs/pwg/Makefile diff --git a/gst/Makefile.am b/gst/Makefile.am index 5291749ed4..af99c06caa 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -6,12 +6,20 @@ else GST_LOADSAVE_SRC = gstxml.c endif +if GST_DISABLE_REGISTRY +GST_REGISTRY_SRC = +else +GST_REGISTRY_SRC = gstregistryxml.c +endif + if GST_DISABLE_PARSE GST_PARSE_SRC = +GST_PARSE_H = SUBDIRS_PARSE = GST_PARSE_LA = else GST_PARSE_SRC = gstparse.c +GST_PARSE_H = gstparse.h SUBDIRS_PARSE = parse GST_PARSE_LA = parse/libgstparse.la endif @@ -58,7 +66,7 @@ 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 + gstmarshal.list gstxml.c gstparse.c gsttrace.c gstregistryxml.c libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \ glib-compat.c \ @@ -90,7 +98,6 @@ libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \ gstpluginfeature.c \ gstquery.c \ gstregistry.c \ - gstregistryxml.c \ gstsegment.c \ gststructure.c \ gstsystemclock.c \ @@ -105,6 +112,7 @@ libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \ gstvalue.c \ $(GST_PARSE_SRC) \ $(GSTARCH_SRCS) \ + $(GSTREGISTRY_SRC) \ $(GST_LOADSAVE_SRC) # do not put files in the distribution that are generated @@ -183,7 +191,7 @@ gst_headers = \ gstutils.h \ gstvalue.h \ gstregistry.h \ - gstparse.h \ + $(GST_PARSE_H) \ gstxml.h libgstreamer_@GST_MAJORMINOR@include_HEADERS = $(gst_headers) diff --git a/gst/gst.c b/gst/gst.c index feb522d9f3..71f8353e37 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -170,6 +170,7 @@ enum #define NUL '\0' #endif +#ifndef GST_DISABLE_GST_DEBUG static gboolean parse_debug_category (gchar * str, const gchar ** category) { @@ -239,6 +240,7 @@ parse_debug_list (const gchar * list) g_strfreev (split); } +#endif #ifndef GST_HAVE_GLIB_2_8 #define G_OPTION_FLAG_NO_ARG 0 @@ -476,7 +478,7 @@ init_pre (void) bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); #endif /* ENABLE_NLS */ -#ifndef GST_DISABLE_REGISTRY +#ifndef GST_DISABLE_GST_DEBUG { const gchar *debug_list; diff --git a/gst/gstplugin.h b/gst/gstplugin.h index d4e32827a7..ccfd3fb233 100644 --- a/gst/gstplugin.h +++ b/gst/gstplugin.h @@ -27,6 +27,7 @@ #include #include /* time_t */ +#include /* off_t */ #include /* off_t */ #include #include diff --git a/gst/gstregistry.h b/gst/gstregistry.h index 0537eed3b5..7eef2e2b71 100644 --- a/gst/gstregistry.h +++ b/gst/gstregistry.h @@ -24,6 +24,7 @@ #ifndef __GST_REGISTRY_H__ #define __GST_REGISTRY_H__ +#include /* FIXME: because of cache_file below */ #include #include diff --git a/tests/benchmarks/complexity.c b/tests/benchmarks/complexity.c index 96fcd164a3..1cd1133c87 100644 --- a/tests/benchmarks/complexity.c +++ b/tests/benchmarks/complexity.c @@ -17,6 +17,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #define BUFFER_COUNT (1000) diff --git a/tests/benchmarks/mass-elements.c b/tests/benchmarks/mass-elements.c index 2d4d0c53d4..d375dfd443 100644 --- a/tests/benchmarks/mass-elements.c +++ b/tests/benchmarks/mass-elements.c @@ -16,6 +16,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #define IDENTITY_COUNT (1000) diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 00250c9478..810765fb91 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -27,6 +27,12 @@ clean-local: clean-local-check # checks to fix # gst/gstplugin +if GST_DISABLE_PARSE +PARSE_CHECKS = +else +PARSE_CHECKS = pipelines/simple-launch-lines pipelines/cleanup +endif + check_PROGRAMS = \ gst/gst \ gst/gstbin \ @@ -53,9 +59,8 @@ check_PROGRAMS = \ elements/fdsrc \ generic/sinks \ generic/states \ - pipelines/simple-launch-lines \ + $(PARSE_CHECKS) \ pipelines/stress \ - pipelines/cleanup \ libs/controller \ libs/gdp \ libs/gstnetclientclock \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 95ee840141..f022296a21 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -9,23 +9,31 @@ GST_LOADSAVE_SRC_V = \ gst-xmllaunch-@GST_MAJORMINOR@ endif +if GST_DISABLE_PARSE +GST_PARSE_SRC = +GST_PARSE_SRC_V = +else +GST_PARSE_SRC = gst-launch gst-md5sum +GST_PARSE_SRC_V = \ + gst-launch-@GST_MAJORMINOR@ \ + gst-md5sum-@GST_MAJORMINOR@ +endif + + GST_OTHER_SRC = \ gst-feedback \ gst-inspect \ - gst-launch \ - gst-md5sum \ gst-typefind \ gst-xmlinspect GST_OTHER_SRC_V = \ gst-inspect-@GST_MAJORMINOR@ \ - gst-launch-@GST_MAJORMINOR@ \ - gst-md5sum-@GST_MAJORMINOR@ \ gst-typefind-@GST_MAJORMINOR@ \ gst-xmlinspect-@GST_MAJORMINOR@ ### so all of the programs we want to build bin_PROGRAMS = \ $(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \ + $(GST_PARSE_SRC) $(GST_PARSE_SRC_V) \ $(GST_OTHER_SRC) $(GST_OTHER_SRC_V) bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@ @@ -35,15 +43,19 @@ gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c gst_xmllaunch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) gst_xmllaunch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS) endif -gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c -gst_inspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) -gst_inspect_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS) + +if !GST_DISABLE_PARSE gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c gst_launch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) gst_launch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS) gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c gst_md5sum_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) gst_md5sum_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS) +endif + +gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c +gst_inspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) +gst_inspect_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS) gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c gst_typefind_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS) gst_typefind_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS) @@ -59,10 +71,14 @@ gst-feedback-@GST_MAJORMINOR@: gst-feedback-m.m if !GST_DISABLE_LOADSAVE gst_xmllaunch_SOURCES = gst-run.c endif -gst_feedback_SOURCES = gst-run.c -gst_inspect_SOURCES = gst-run.c + +if !GST_DISABLE_PARSE gst_launch_SOURCES = gst-run.c gst_md5sum_SOURCES = gst-run.c +endif + +gst_feedback_SOURCES = gst-run.c +gst_inspect_SOURCES = gst-run.c gst_typefind_SOURCES = gst-run.c gst_xmlinspect_SOURCES = gst-run.c @@ -80,15 +96,22 @@ GST_LOADSAVE_MAN = \ gst-xmllaunch-@GST_MAJORMINOR@.1 endif +if GST_DISABLE_PARSE +GST_PARSE_MAN= +else +GST_PARSE_MAN = \ + gst-launch-@GST_MAJORMINOR@.1 \ + gst-md5sum-@GST_MAJORMINOR@.1 +endif + + GST_OTHER_MAN = \ gst-feedback-@GST_MAJORMINOR@.1 \ gst-inspect-@GST_MAJORMINOR@.1 \ - gst-launch-@GST_MAJORMINOR@.1 \ - gst-md5sum-@GST_MAJORMINOR@.1 \ gst-typefind-@GST_MAJORMINOR@.1 \ gst-xmlinspect-@GST_MAJORMINOR@.1 -manpages = $(GST_LOADSAVE_MAN) $(GST_OTHER_MAN) +manpages = $(GST_LOADSAVE_MAN) $(GST_PARSE_MAN) $(GST_OTHER_MAN) CLEANFILES = $(manpages) $(bin_SCRIPTS) man_MANS = $(manpages) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 34d18e10ea..6c35ed93b2 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -30,6 +30,7 @@ #include "gst/gst-i18n-app.h" +#include #include #include #include diff --git a/tools/gst-xmlinspect.c b/tools/gst-xmlinspect.c index 5b3396a860..1c677907d5 100644 --- a/tools/gst-xmlinspect.c +++ b/tools/gst-xmlinspect.c @@ -3,6 +3,7 @@ #endif #include +#include #include #include #include