Drop libxml2 dependency when building with
[platform/upstream/gstreamer.git] / gst / gstconfig.h.in
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *               2004,2005 Wim Taymans <wim@fluendo.com>
4  *
5  * gstconfig.h: GST_DISABLE_* macros for build configuration
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 /**
24  * SECTION:gstconfig
25  * @short_description: Build configuration options
26  *
27  * This describes the configuration options for GStreamer. When building
28  * GStreamer there are a lot of parts (known internally as "subsystems" ) that
29  * can be disabled for various reasons. The most common reasons are speed and
30  * size, which is important because GStreamer is designed to run on embedded
31  * systems.
32  *
33  * If a subsystem is disabled, most of this changes are done in an API
34  * compatible way, so you don't need to adapt your code in most cases. It is
35  * never done in an ABI compatible way though. So if you want to disable a
36  * suybsystem, you have to rebuild all programs depending on GStreamer, too.
37  *
38  * If a subsystem is disabled in GStreamer, a value is defined in
39  * &lt;gst/gst.h&gt;. You can check this if you do subsystem-specific stuff.
40  * <example>
41  * <title>Doing subsystem specific things</title>
42  * <programlisting>
43  * &hash;ifndef GST_DISABLE_GST_DEBUG
44  * // do stuff specific to the debugging subsystem
45  * &hash;endif // GST_DISABLE_GST_DEBUG
46  * </programlisting>
47  * </example>
48  */
49
50 #ifndef __GST_CONFIG_H__
51 #define __GST_CONFIG_H__
52
53 #include "config.h"
54
55 /* trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
56
57 #if 0
58 #define GST_DISABLE_LOADSAVE_REGISTRY 1
59 #define GST_DISABLE_GST_DEBUG 1
60 #define GST_DISABLE_LOADSAVE 1
61 #define GST_DISABLE_PARSE 1
62 #define GST_DISABLE_TRACE 1
63 #define GST_DISABLE_ALLOC_TRACE 1
64 #define GST_DISABLE_REGISTRY 1
65 #define GST_DISABLE_ENUMTYPES 1
66 #define GST_DISABLE_INDEX 1
67 #define GST_DISABLE_PLUGIN 1
68 #define GST_DISABLE_URI 1
69 #define GST_HAVE_GLIB_2_8 1
70 #endif
71
72 /***** default padding of structures *****/
73 #define GST_PADDING             4
74 #define GST_PADDING_INIT        {0}
75
76 /***** padding for very extensible base classes *****/
77 #define GST_PADDING_LARGE       20
78
79 /***** disabling of subsystems *****/
80
81 /**
82  * GST_DISABLE_GST_DEBUG:
83  *
84  * Configures the inclusion of the debugging subsystem
85  */
86 @GST_DISABLE_GST_DEBUG_DEFINE@
87
88 /**
89  * GST_DISABLE_LOADSAVE:
90  *
91  * Configures the inclusion of the plugin graph xml-serialisation 
92  * (was used in 0.8 by gst-editor)
93  */
94 @GST_DISABLE_LOADSAVE_DEFINE@
95
96 /**
97  * GST_DISABLE_PARSE:
98  *
99  * Configures the inclusion of the gst-lauch parser
100  */
101 @GST_DISABLE_PARSE_DEFINE@
102
103 /**
104  * GST_DISABLE_TRACE:
105  *
106  * Configures the inclusion of a resource tracing facillity
107  * (seems to be unused)
108  */
109 @GST_DISABLE_TRACE_DEFINE@
110
111 /**
112  * GST_DISABLE_ALLOC_TRACE:
113  *
114  * Configures the use of a memory tracer based on the resource tracer
115  * if TRACE is disabled, ALLOC_TRACE is disabled as well
116  */
117 @GST_DISABLE_ALLOC_TRACE_DEFINE@
118
119 /**
120  * GST_DISABLE_REGISTRY:
121  *
122  * Configures the use of the plugin registry
123  * if one disables this, required plugins need to be loaded and registered
124  * manualy
125  */
126 @GST_DISABLE_REGISTRY_DEFINE@
127
128 /* FIXME: test and document these! */
129 /* Configure the use of glib enumtypes (useful for introspection)
130  * see http://bugzilla.gnome.org/show_bug.cgi?id=342564
131  */
132 @GST_DISABLE_ENUMTYPES_DEFINE@
133 /* Configure the use of indizies for seeking
134  * (not used in plugins right now)
135  */
136 @GST_DISABLE_INDEX_DEFINE@
137 /* Configures the use of external plugins */
138 @GST_DISABLE_PLUGIN_DEFINE@
139 /* Configures the use of uri-handlers */
140 @GST_DISABLE_URI_DEFINE@
141
142 /* printf extension format */
143 /**
144  * GST_PTR_FORMAT:
145  *
146  * printf format type used to debug GStreamer types.
147  * This can only be used on types whose size is >= sizeof(gpointer).
148  */
149 @GST_PRINTF_EXTENSION_POINTER_FORMAT_DEFINE@
150 /**
151  * GST_SEGMENT_FORMAT:
152  *
153  * printf format type used to debug GStreamer segments.
154  * This can only be used on pointers to GstSegment structures.
155  *
156  * Since: 0.10.10
157  */
158 @GST_PRINTF_EXTENSION_SEGMENT_FORMAT_DEFINE@
159
160 /* whether or not GST_PTR_FORMAT or GST_SEGMENT_FORMAT are using
161  * the printf extension mechanism. This is for internal use in our
162  * header files so we know whether we can use G_GNUC_PRINTF or not */
163 @GST_USING_PRINTF_EXTENSION_DEFINE@
164
165 /* whether or not the CPU supports unaligned access */
166 @GST_HAVE_UNALIGNED_ACCESS_DEFINE@
167
168 /* whether or not we are using glib 2.8 api, e.g. atomic gobject
169    refcounting */
170 @GST_HAVE_GLIB_2_8_DEFINE@
171
172 /***** Deal with XML stuff, we have to handle both loadsave and registry *****/
173
174 /*#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) ) */
175 /* this works better, but requires the above config.h include, its a bit strange
176  * that we include stuff here anyway */
177 #ifdef HAVE_LIBXML2
178 # include <libxml/parser.h>
179 #else
180 # define GST_DISABLE_LOADSAVE_REGISTRY
181 #endif
182
183 /**
184  * GST_EXPORT:
185  *
186  * Export the given variable from the built shared object.
187  *
188  * On Windows, this exports the variable from the DLL.
189  * On other platforms, this gets defined to "extern".
190  */
191 /**
192  * GST_PLUGIN_EXPORT:
193  *
194  * Export the plugin's definition.
195  *
196  * On Windows, this exports the plugin definition from the DLL.
197  * On other platforms, this gets defined as a no-op.
198  */
199 #ifdef _MSC_VER
200 #define GST_PLUGIN_EXPORT __declspec(dllexport) extern
201 #ifdef GST_EXPORTS
202 #define GST_EXPORT __declspec(dllexport) extern
203 #else
204 #define GST_EXPORT __declspec(dllimport) extern
205 #endif
206 #else /* not _MSC_VER */
207 #define GST_PLUGIN_EXPORT
208 #define GST_EXPORT extern
209 #endif
210
211 #endif /* __GST_CONFIG_H__ */