configure.ac: Don't define GST_DISABLE_DEPRECATED for releases. Fixes #498181.
[platform/upstream/gstreamer.git] / configure.ac
index 849f206..97afd7e 100644 (file)
@@ -3,7 +3,7 @@ AC_PREREQ(2.52)
 dnl initialize autoconf
 dnl when going to/from release please set the nano (fourth number) right !
 dnl releases only do Wall, cvs and prerelease does Werror too
-AC_INIT(GStreamer, 0.10.13.1,
+AC_INIT(GStreamer, 0.10.15.1,
     http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
     gstreamer)
 AG_GST_INIT
@@ -43,7 +43,7 @@ dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
 dnl - interfaces added -> increment AGE
 dnl - interfaces removed -> AGE = 0
 dnl sets GST_LT_LDFLAGS
-AS_LIBTOOL(GST, 12, 0, 12)
+AS_LIBTOOL(GST, 14, 0, 14)
 
 dnl FIXME: this macro doesn't actually work;
 dnl the generated libtool script has no support for the listed tags.
@@ -106,6 +106,14 @@ AG_GST_CHECK_SUBSYSTEM_DISABLE(ENUMTYPES,[enum types])
 AM_CONDITIONAL(GST_DISABLE_ENUMTYPES, test "x$GST_DISABLE_ENUMTYPES" = "xyes")
 AG_GST_CHECK_SUBSYSTEM_DISABLE(INDEX,[index])
 AM_CONDITIONAL(GST_DISABLE_INDEX, test "x$GST_DISABLE_INDEX" = "xyes")
+dnl define a substitution to use in docs/gst/gstreamer.types
+if test "x$GST_DISABLE_INDEX" = "xyes"
+then
+  GST_INDEX_DOC_TYPES="%"
+else
+  GST_INDEX_DOC_TYPES=
+fi
+AC_SUBST(GST_INDEX_DOC_TYPES)
 AG_GST_CHECK_SUBSYSTEM_DISABLE(NET,[network distribution])
 AM_CONDITIONAL(GST_DISABLE_NET, test "x$GST_DISABLE_NET" = "xyes")
 AG_GST_CHECK_SUBSYSTEM_DISABLE(PLUGIN,[plugin])
@@ -280,6 +288,10 @@ dnl For interactive UNIX (a Sun thing)
 dnl FIXME: this adds -lcposix to LIBS, but I doubt we use LIBS
 AC_ISC_POSIX
 
+dnl check for libm, for sin()
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
+
 dnl *** checks for header files ***
 
 dnl check if we have ANSI C header files
@@ -346,6 +358,58 @@ dnl check for mmap()
 AC_FUNC_MMAP
 AM_CONDITIONAL(HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" = "xyes")
 
+dnl Check for POSIX timers
+AC_CHECK_FUNCS(clock_gettime, [], [
+  AC_CHECK_LIB(rt, clock_gettime, [
+    AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
+    LIBS="$LIBS -lrt"
+  ])
+])
+
+AC_CACHE_CHECK(for posix timers, gst_cv_posix_timers,AC_TRY_RUN([
+#include <time.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+      int main() {
+#if defined(_POSIX_TIMERS) && _POSIX_TIMERS >= 0 && defined(CLOCK_REALTIME)
+        return 0;
+#else
+        return 1;
+#endif
+      }],gst_cv_posix_timers=yes,gst_cv_posix_timers=no))
+
+if test "$gst_cv_posix_timers" = "yes"; then
+  AC_DEFINE(HAVE_POSIX_TIMERS,1,[Have posix timers])
+  GST_HAVE_POSIX_TIMERS_DEFINE="#define GST_HAVE_POSIX_TIMERS 1"
+else
+  GST_HAVE_POSIX_TIMERS_DEFINE="#define GST_HAVE_POSIX_TIMERS 0"
+fi
+AC_SUBST(GST_HAVE_POSIX_TIMERS_DEFINE)
+AM_CONDITIONAL(GST_HAVE_POSIX_TIMERS, test "$gst_cv_posix_timers" = "yes")
+
+AC_CACHE_CHECK(for monotonic clock, gst_cv_monotonic_clock,AC_TRY_RUN([
+#include <time.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+      int main() {
+#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)
+        return 0;
+#else
+        return 1;
+#endif
+      }],gst_cv_monotonic_clock=yes,gst_cv_monotonic_clock=no))
+
+if test "$gst_cv_monotonic_clock" = "yes"; then
+  AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock])
+  GST_HAVE_MONOTONIC_CLOCK_DEFINE="#define GST_HAVE_MONOTONIC_CLOCK 1"
+else
+  GST_HAVE_MONOTONIC_CLOCK_DEFINE="#define GST_HAVE_MONOTONIC_CLOCK 0"
+fi
+AC_SUBST(GST_HAVE_MONOTONIC_CLOCK_DEFINE)
+AM_CONDITIONAL(GST_HAVE_MONOTONIC_CLOCK, test "$gst_cv_monotonic_clock" = "yes")
+
 dnl Check for a way to display the function name in debug output
 AG_GST_CHECK_FUNCTION
 
@@ -426,6 +490,13 @@ AM_PATH_CHECK(0.9.2,
     HAVE_CHECK=no)
 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
 
+dnl pkg-config check that for libcheck that works for cross-compiling
+dnl but not normal compilation on Fedora & Ubuntu:
+dnl PKG_CHECK_MODULES(CHECK, check >= 0.9.2,
+dnl   AM_CONDITIONAL(HAVE_CHECK, true),
+dnl   AM_CONDITIONAL(HAVE_CHECK, false)
+dnl )
+
 dnl *** set variables based on configure arguments
 
 dnl set license and copyright notice
@@ -470,10 +541,15 @@ AC_SUBST(PROFILE_CFLAGS)
 # GST_DISABLE_DEPRECATED: hide the visibility of deprecated
 # functionality from the API that gstreamer uses
 # GST_REMOVE_DEPRECATED: don't compile deprecated functionality (breaks ABI)
-DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
+if test "x$GST_CVS" = "xyes"; then
+  DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
+else
+  DEPRECATED_CFLAGS=""
+fi
 AC_SUBST(DEPRECATED_CFLAGS)
 
-dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
+dnl every flag in GST_OPTION_CFLAGS can be overridden at make time via e.g.
+dnl make DEPRECATED_CFLAGS=''
 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
 AC_SUBST(GST_OPTION_CFLAGS)
 
@@ -504,6 +580,13 @@ dnl linker flags shared by all libraries
 dnl LDFLAGS modifier defining exported symbols from built libraries
 GST_LIB_LDFLAGS="-export-symbols-regex \^[_]*\(gst_\|Gst\|GST_\).*"
 AC_SUBST(GST_LIB_LDFLAGS)
+dnl Version of the linker flags specifically for libgstcheck to support the boonky extra symbols it exports.
+GST_CHECK_LIB_LDFLAGS="-export-symbols-regex \^\([_]*\(gst_\|Gst\|GST_\).*\|check_\(debug\|mutex\|cond\)\|buffers\|mutex\|start_cond\|sync_cond\|thread_list\)$"
+dnl HACK: add non-portable --export-dynamic if we have GNU ld (needed on my debian stable, tpm)
+if test "x$ac_cv_prog_gnu_ld" = "xyes" -o "x$acl_cv_prog_gnu_ld" = "xyes" ; then
+  GST_CHECK_LIB_LDFLAGS="-Wl,--export-dynamic $GST_CHECK_LIB_LDFLAGS"
+fi
+AC_SUBST(GST_CHECK_LIB_LDFLAGS)
 
 dnl GST_OBJ_*
 dnl default vars for all internal objects built on libgstreamer