dnl find an assembler
AM_PROG_AS
-dnl we use awk in the bison version check
-AC_PROG_AWK
-
-dnl we require bison for building the parser
-dnl FIXME: check if AC_PROG_YACC is suitable here
-dnl FIXME: make precious
-AC_PATH_PROG(BISON_PATH, bison, no)
-if test x$BISON_PATH = xno; then
- AC_MSG_ERROR(Could not find bison)
-fi
-
-dnl check bison version
-AC_MSG_CHECKING([bison version])
-
-if $BISON_PATH --version | head -n 1 | $AWK '{ if ($4 < 1.35) exit 1; else exit 0;}';
-then
- AC_MSG_RESULT([ok])
-else
- AC_MSG_RESULT([too old.])
- AC_MSG_ERROR([Your bison version is too old, v1.35 or later is required.])
-fi
-
-dnl we require flex for building the parser
-dnl FIXME: check if AC_PROG_LEX is suitable here
-AC_PATH_PROG(FLEX_PATH, flex, no)
-if test x$FLEX_PATH = xno; then
- AC_MSG_ERROR(Could not find flex)
-fi
-
-dnl Perl is used in building documentation
+dnl Perl is used in building documentation and in the version checks
AC_PATH_PROG(PERL_PATH, perl, no)
if test x$PERL_PATH = xno; then
AC_MSG_ERROR(Could not find perl)
fi
+dnl we require flex and bison for building the parser
+GST_BISON_CHECK
+GST_FLEX_CHECK
+
AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
/* the need for the mutex will go away with flex 2.5.6 */
static gboolean flex_busy = FALSE;
+
+#ifndef HAVE_MT_SAVE_FLEX
static GStaticRecMutex flex_lock = G_STATIC_REC_MUTEX_INIT;
+#endif
extern GstElement *_gst_parse_launch (const gchar *, GError **);
GST_CAT_INFO (GST_CAT_PIPELINE, "parsing pipeline description %s",
pipeline_description);
+#ifndef HAVE_MT_SAVE_FLEX
g_static_rec_mutex_lock (&flex_lock);
+#endif
if (flex_busy)
goto recursive_call;
flex_busy = TRUE;
element = _gst_parse_launch (pipeline_description, error);
flex_busy = FALSE;
+#ifndef HAVE_MT_SAVE_FLEX
g_static_rec_mutex_unlock (&flex_lock);
+#endif
return element;
recursive_call:
{
GST_WARNING ("calls to gst_parse_launch() cannot be nested");
+#ifndef HAVE_MT_SAVE_FLEX
g_static_rec_mutex_unlock (&flex_lock);
+#endif
g_warning ("calls to gst_parse_launch() cannot be nested");
return NULL;
}