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)/libs -I\$(top_builddir) $GLIB_CFLAGS $XML_CFLAGS \$(GST_OPTION_CFLAGS)"
+GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS $XML_CFLAGS \$(GST_OPTION_CFLAGS) -DG_THREADS_MANDATORY"
dnl FIXME: check if LTLIBINTL is needed everywhere
dnl I presume it is given that it contains the symbols that _() stuff maps to
* called gst_init() yet or initialised the threading system otherwise, we
* better issue a warning here (since chances are high that the application
* has already called other GLib functions such as g_option_context_new() */
+#if GLIB_CHECK_VERSION (2,20,0)
+ if (!g_thread_get_initialized ()) {
+#else
if (!g_thread_supported ()) {
+#endif
g_warning ("The GStreamer function gst_init_get_option_group() was\n"
"\tcalled, but the GLib threading system has not been initialised\n"
"\tyet, something that must happen before any other GLib function\n"
#endif
gboolean res;
+#if GLIB_CHECK_VERSION (2,20,0)
+ if (!g_thread_get_initialized ())
+#else
if (!g_thread_supported ())
+#endif
g_thread_init (NULL);
if (gst_initialized) {
#ifndef GST_DISABLE_OPTION_PARSING
static void
-split_and_iterate (const gchar * stringlist, gchar * separator, GFunc iterator,
- gpointer user_data)
+split_and_iterate (const gchar * stringlist, gchar * separator,
+ GFunc iterator, gpointer user_data)
{
gchar **strings;
gint j = 0;
g_type_init ();
/* we need threading to be enabled right here */
+#if GLIB_CHECK_VERSION (2,20,0)
+ g_assert (g_thread_get_initialized ());
+#else
g_assert (g_thread_supported ());
+#endif
_gst_debug_init ();
#ifdef ENABLE_NLS