rtpjitterbuffer: pass downstream flowreturn to upstream
[platform/upstream/gst-plugins-good.git] / configure.ac
index b649023..01b850f 100644 (file)
@@ -5,12 +5,12 @@ dnl please read gstreamer/docs/random/autotools before changing this file
 dnl initialize autoconf
 dnl releases only do -Wall, git and prerelease does -Werror too
 dnl use a three digit version number for releases, and four for git/pre
-AC_INIT([GStreamer Good Plug-ins],[1.1.0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-good])
+AC_INIT([GStreamer Good Plug-ins],[1.3.0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-good])
 
 AG_GST_INIT
 
 dnl initialize automake
-AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar])
+AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
 
 dnl define PACKAGE_VERSION_* variables
 AS_VERSION
@@ -43,11 +43,11 @@ AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION",
   [GStreamer API Version])
 
 AG_GST_LIBTOOL_PREPARE
-AS_LIBTOOL(GST, 2, 0, 2)
+AS_LIBTOOL(GST, 300, 0, 300)
 
 dnl *** required versions of GStreamer stuff ***
-GST_REQ=1.1.0
-GSTPB_REQ=1.1.0
+GST_REQ=1.3.0.1
+GSTPB_REQ=1.3.0.1
 
 dnl *** autotools stuff ****
 
@@ -134,6 +134,14 @@ dnl check for libm, for sin()
 LT_LIB_M
 AC_SUBST(LIBM)
 
+AC_CHECK_FUNCS(clock_gettime, [], [
+  AC_CHECK_LIB(rt, clock_gettime, [
+    AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
+    LIBRT="-lrt"
+    AC_SUBST([LIBRT])
+  ])
+])
+
 dnl *** checks for header files ***
 
 dnl check if we have ANSI C header files
@@ -199,7 +207,7 @@ GLIB_REQ=2.32.0
 AG_GST_GLIB_CHECK([$GLIB_REQ])
 
 dnl Orc
-ORC_CHECK([0.4.16])
+ORC_CHECK([0.4.17])
 
 dnl checks for gstreamer
 dnl uninstalled is selected preferentially -- see pkg-config(1)
@@ -257,6 +265,28 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
   ["${srcdir}/gst-plugins-good.doap"],
   [$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
 
+dnl build static plugins or not
+AC_MSG_CHECKING([whether to build static plugins or not])
+AC_ARG_ENABLE(
+  static-plugins,
+  AC_HELP_STRING(
+    [--enable-static-plugins],
+    [build static plugins @<:@default=no@:>@]),
+  [AS_CASE(
+    [$enableval], [no], [], [yes], [],
+    [AC_MSG_ERROR([bad value "$enableval" for --enable-static-plugins])])],
+  [enable_static_plugins=no])
+AC_MSG_RESULT([$enable_static_plugins])
+if test "x$enable_static_plugins" = xyes; then
+  AC_DEFINE(GST_PLUGIN_BUILD_STATIC, 1,
+    [Define if static plugins should be built])
+  GST_PLUGIN_LIBTOOLFLAGS=""
+else
+  GST_PLUGIN_LIBTOOLFLAGS="--tag=disable-static"
+fi
+AC_SUBST(GST_PLUGIN_LIBTOOLFLAGS)
+AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")
+
 # set by AG_GST_PARSE_SUBSYSTEM_DISABLES above
 dnl make sure it doesn't complain about unused variables if debugging is disabled
 NO_WARNINGS=""
@@ -292,11 +322,6 @@ AG_GST_DEFAULT_ELEMENTS
 
 dnl *** plug-ins to include ***
 
-dnl Non ported plugins (non-dependant, then dependant)
-dnl Make sure you have a space before and after all plugins
-GST_PLUGINS_NONPORTED="cairo cairo_gobject osx_audio "
-AC_SUBST(GST_PLUGINS_NONPORTED)
-
 dnl these are all the gst plug-ins, compilable without additional libs
 dnl videofilter is at the top because others depend on it
 AG_GST_CHECK_PLUGIN(alpha)
@@ -309,6 +334,7 @@ AG_GST_CHECK_PLUGIN(avi)
 AG_GST_CHECK_PLUGIN(cutter)
 AG_GST_CHECK_PLUGIN(debugutils)
 AG_GST_CHECK_PLUGIN(deinterlace)
+AG_GST_CHECK_PLUGIN(dtmf)
 AG_GST_CHECK_PLUGIN(effectv)
 AG_GST_CHECK_PLUGIN(equalizer)
 AG_GST_CHECK_PLUGIN(flv)
@@ -436,9 +462,24 @@ AG_GST_CHECK_FEATURE(SUNAUDIO, [Sun Audio], sunaudio, [
 
 dnl *** OSX Audio ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_AUDIO, true)
+HAVE_IOS="no"
 AG_GST_CHECK_FEATURE(OSX_AUDIO, [OSX audio], osxaudio, [
-  AC_CHECK_HEADER(CoreAudio/CoreAudio.h, HAVE_OSX_AUDIO="yes", HAVE_OSX_AUDIO="no")
+  AC_CHECK_HEADER(CoreAudio/CoreAudio.h,
+    [HAVE_OSX_AUDIO="yes"],
+    [AC_CHECK_HEADER(CoreAudio/CoreAudioTypes.h,
+    [
+      HAVE_OSX_AUDIO="yes"
+      HAVE_IOS="yes"
+    ], [
+      HAVE_OSX_AUDIO="no"
+      HAVE_IOS="no"
+    ])]
+  )
 ])
+if test "x$HAVE_IOS" = "xyes"; then
+  AC_DEFINE(HAVE_IOS, 1, [building for iOS platofrm])
+fi
+AM_CONDITIONAL(HAVE_IOS, test "x$HAVE_IOS" = "xyes")
 
 dnl *** OS X video ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_VIDEO, true)
@@ -468,6 +509,8 @@ AG_GST_CHECK_FEATURE(GST_V4L2, [Video 4 Linux 2], v4l2src, [
 #ifdef __sun /* Solaris */
 #include <sys/types.h>
 #include <sys/videodev2.h>
+#elif __FreeBSD__
+#include <linux/videodev2.h>
 #else /* Linux */
 #include <linux/types.h>
 #define _LINUX_TIME_H
@@ -509,6 +552,8 @@ return 0;
 #ifdef __sun /* Solaris */
 #include <sys/types.h>
 #include <sys/videodev2.h>
+#elif __FreeBSD__
+#include <linux/videodev2.h>
 #else /* Linux */
 #include <linux/types.h>
 #define _LINUX_TIME_H
@@ -570,6 +615,24 @@ if test x$HAVE_GST_V4L2 = xyes; then
   fi
 fi
 
+# Check if v4l2 support dmabuf
+if test x$HAVE_GST_V4L2 = xyes; then
+       AC_CHECK_DECLS(V4L2_MEMORY_DMABUF,,,[
+                                       #include <sys/types.h>
+                                       #ifdef __sun /* Solaris */
+                                       #include <sys/types.h>
+                                       #include <sys/videodev2.h>
+                                       #elif __FreeBSD__
+                                       #include <linux/videodev2.h>
+                                       #else /* Linux */
+                                       #include <linux/types.h>
+                                       #define _LINUX_TIME_H
+                                       #define __user
+                                       #include <linux/videodev2.h>
+                                       #endif
+                                       ])
+fi
+
 dnl Check for X11
 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
 AG_GST_CHECK_FEATURE(X, [X libraries and plugins],
@@ -665,20 +728,12 @@ dnl *** aalib ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_AALIB, true)
 AG_GST_CHECK_FEATURE(AALIB, [aalib ASCII Art library], aasink, [
   AM_PATH_AALIB(, HAVE_AALIB=yes, HAVE_AALIB=no)
-  AS_SCRUB_INCLUDE(AALIB_CFLAGS)
 ])
 
 dnl *** cairo ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
-AG_GST_CHECK_FEATURE(CAIRO, [Cairo graphics rendering], cairo, [
-  AG_GST_PKG_CHECK_MODULES(CAIRO, cairo >= 1.0.0)
-])
-
-dnl *** cairo-gobject ***
-translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO_GOBJECT, true)
-AG_GST_CHECK_FEATURE(CAIRO_GOBJECT, 
-  [Cairo graphics rendering gobject bindings], cairooverlay, [
-  AG_GST_PKG_CHECK_MODULES(CAIRO_GOBJECT, cairo-gobject >= 1.10.0)
+AG_GST_CHECK_FEATURE(CAIRO, [Cairo graphics rendering and gobject bindings], cairo, [
+  AG_GST_PKG_CHECK_MODULES(CAIRO, cairo >= 1.10.0 cairo-gobject >= 1.10.0)
 ])
 
 dnl *** FLAC ***
@@ -756,7 +811,7 @@ AG_GST_CHECK_FEATURE(PULSE, [pulseaudio plug-in], pulseaudio, [
   dnl used in ext/pulse/pulseutil.c
   AC_CHECK_HEADERS([process.h])
 
-  AG_GST_PKG_CHECK_MODULES(PULSE, libpulse >= 1.0)
+  AG_GST_PKG_CHECK_MODULES(PULSE, libpulse >= 2.0)
 ])
 
 dnl *** dv1394 ***
@@ -819,14 +874,7 @@ AG_GST_CHECK_FEATURE(SHOUT2, [Shoutcast/Icecast client library], shout2, [
 dnl *** soup ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
-  PKG_CHECK_MODULES(SOUP, libsoup-gnome-2.4 >= 2.3.2, [
-    HAVE_SOUP="yes"
-    AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [soup gnome integration])
-  ],[
-    PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.26.1, HAVE_SOUP="yes", [
-      HAVE_SOUP="no"
-    ])
-  ])
+  PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.38, [HAVE_SOUP="yes"], [HAVE_SOUP="no"])
   AC_SUBST(SOUP_CFLAGS)
   AC_SUBST(SOUP_LIBS)
 ])
@@ -896,6 +944,8 @@ dnl *** vpx ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_VPX, vpx)
 AG_GST_CHECK_FEATURE(VPX, [VPX decoder], vpx, [
   PKG_CHECK_MODULES(VPX, vpx >= 1.1.0, [HAVE_VPX="yes"], [HAVE_VPX="no"])
+  HAVE_VP8=no
+  HAVE_VP9=no
 
   if test $HAVE_VPX = "yes"; then
     OLD_LIBS="$LIBS"
@@ -910,6 +960,16 @@ AG_GST_CHECK_FEATURE(VPX, [VPX decoder], vpx, [
       HAVE_VP8=yes
       AC_DEFINE(HAVE_VP8_DECODER, 1, [Defined if the VP8 decoder is available])
     ])
+    if test "x$BUILD_EXPERIMENTAL" = "xyes"; then
+      AC_CHECK_LIB(vpx, vpx_codec_vp9_cx_algo, [
+        HAVE_VP9=yes
+        AC_DEFINE(HAVE_VP9_ENCODER, 1, [Defined if the VP9 encoder is available])
+      ])
+      AC_CHECK_LIB(vpx, vpx_codec_vp9_dx_algo, [
+        HAVE_VP9=yes
+        AC_DEFINE(HAVE_VP9_DECODER, 1, [Defined if the VP9 decoder is available])
+      ])
+    fi
     LIBS="$OLD_LIBS"
     CFLAGS="$OLD_CFLAGS"
   fi
@@ -946,7 +1006,15 @@ AG_GST_CHECK_FEATURE(ZLIB, [zlib support for qtdemux/matroska],, [
 dnl *** matroska prefers to have bz2 ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_BZ2, true)
 AG_GST_CHECK_FEATURE(BZ2, [bz2 library for matroska ],, [
-  AG_GST_CHECK_LIBHEADER(BZ2, bz2, BZ2_bzCompress, ,bzlib.h, BZ2_LIBS="-lbz2")
+  save_LIBS=$LIBS
+  LIBS="$LIBS -lbz2"
+  AC_MSG_CHECKING([for BZ2_bzlibVersion in -lbz2])
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bzlib.h>]], [[const char *version = BZ2_bzlibVersion ();]])],[HAVE_BZ2=yes],[HAVE_BZ2=no])
+  AC_MSG_RESULT($HAVE_BZ2)
+  LIBS=$save_LIBS
+  if test "x$HAVE_BZ2" = "xyes"; then
+    BZ2_LIBS="-lbz2"
+  fi
   AC_SUBST(BZ2_LIBS)
 ])
 
@@ -957,7 +1025,6 @@ dnl but we still need to set the conditionals
 AM_CONDITIONAL(USE_AALIB, false)
 AM_CONDITIONAL(USE_BZ2, false)
 AM_CONDITIONAL(USE_CAIRO, false)
-AM_CONDITIONAL(USE_CAIRO_GOBJECT, false)
 AM_CONDITIONAL(USE_DIRECTSOUND, false)
 AM_CONDITIONAL(USE_DV1394, false)
 AM_CONDITIONAL(USE_FLAC, false)
@@ -1045,11 +1112,13 @@ AC_SUBST(GST_ALL_LDFLAGS)
 
 dnl this really should only contain flags, not libs - they get added before
 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
-GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc.*' $GST_ALL_LDFLAGS"
+GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
 AC_SUBST(GST_PLUGIN_LDFLAGS)
 
 dnl *** output files ***
 
+$MKDIR_P tests/check/orc
+
 dnl keep this alphabetic per directory, please
 AC_CONFIG_FILES(
 Makefile
@@ -1063,6 +1132,7 @@ gst/autodetect/Makefile
 gst/avi/Makefile
 gst/cutter/Makefile
 gst/deinterlace/Makefile
+gst/dtmf/Makefile
 gst/debugutils/Makefile
 gst/effectv/Makefile
 gst/equalizer/Makefile