libs/gst/base/gstbasetransform.*: Add vmethod that is called before we start the...
[platform/upstream/gstreamer.git] / configure.ac
index 5c99cdd..1378640 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.17.1,
+AC_INIT(GStreamer, 0.10.21.1,
     http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
     gstreamer)
 AG_GST_INIT
@@ -43,13 +43,14 @@ 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, 15, 0, 15)
+AS_LIBTOOL(GST, 18, 0, 18)
 
 dnl FIXME: this macro doesn't actually work;
 dnl the generated libtool script has no support for the listed tags.
 dnl So this needs to be fixed first if we want to use this
 dnl AS_LIBTOOL_TAGS
 
+AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
 dnl *** autotools stuff ****
@@ -62,7 +63,7 @@ AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4")
 
 dnl set up gettext
 dnl the version check needs to stay here because autopoint greps for it
-AM_GNU_GETTEXT_VERSION([0.11.5])
+AM_GNU_GETTEXT_VERSION([0.17])
 AM_GNU_GETTEXT([external])
 AG_GST_GETTEXT([gstreamer-$GST_MAJORMINOR])
 
@@ -88,6 +89,12 @@ if test "x$GST_DISABLE_PARSE" = xyes; then
   AC_DEFINE(GST_DISABLE_PARSE, 1,
     [Define if pipeline parsing code is disabled])
 fi
+AG_GST_CHECK_SUBSYSTEM_DISABLE(OPTION_PARSING,[option parsing when gst_init])
+AM_CONDITIONAL(GST_DISABLE_OPTION_PARSING, test "x$GST_DISABLE_OPTION_PARSING" = "xyes")
+if test "x$GST_DISABLE_OPTION_PARSING" = xyes; then
+  AC_DEFINE(GST_DISABLE_OPTION_PARSING, 1,
+    [Define if option parsing is disabled])
+fi
 AG_GST_CHECK_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
 AM_CONDITIONAL(GST_DISABLE_TRACE, test "x$GST_DISABLE_TRACE" = "xyes")
 AG_GST_CHECK_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing])
@@ -102,24 +109,10 @@ else
   GST_REGISTRY_DOC_TYPES=
 fi
 AC_SUBST(GST_REGISTRY_DOC_TYPES)
-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])
 AM_CONDITIONAL(GST_DISABLE_PLUGIN, test "x$GST_DISABLE_PLUGIN" = "xyes")
-AG_GST_CHECK_SUBSYSTEM_DISABLE(URI,[uri handlers])
-AM_CONDITIONAL(GST_DISABLE_URI, test "x$GST_DISABLE_URI" = "xyes")
 
 AG_GST_ARG_DEBUG
 AG_GST_ARG_PROFILING
@@ -132,25 +125,6 @@ AG_GST_ARG_WITH_PKG_CONFIG_PATH
 AG_GST_ARG_WITH_PACKAGE_NAME
 AG_GST_ARG_WITH_PACKAGE_ORIGIN
 
-dnl use a cache dir for storing element registry info.
-GST_CACHE_DIR=${localstatedir}/cache/gstreamer-$GST_MAJORMINOR
-
-AC_ARG_WITH(cachedir,
-  AC_HELP_STRING([--with-cachedir],
-    [specify path to use for plugin and command completion registries]),
-  [
-    case "${withval}" in
-      yes) AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
-      no)  AC_MSG_ERROR(bad value ${withval} for --with-cachedir) ;;
-      *)   GST_CACHE_DIR="${withval}" ;;
-    esac
-  ],
-  [:]) dnl Default value
-
-AS_AC_EXPAND(GST_CACHE_DIR, $GST_CACHE_DIR)
-AC_DEFINE_UNQUOTED(GST_CACHE_DIR, "$GST_CACHE_DIR", [Location of registry])
-AC_MSG_NOTICE(Using $GST_CACHE_DIR as registry cache dir)
-
 dnl building of tests
 AC_ARG_ENABLE(tests,
   AC_HELP_STRING([--disable-tests], [disable building test apps]),
@@ -202,17 +176,19 @@ fi
 
 dnl Use binary registry
 AC_ARG_ENABLE(binary-registry,
-  AC_HELP_STRING([--enable-binary-registry],
-    [enable experimental binary registry]),
+  AC_HELP_STRING([--disable-binary-registry],
+    [disable binary registry]),
   [
     case "${enableval}" in
       yes) USE_BINARY_REGISTRY=yes ;;
       no)  USE_BINARY_REGISTRY=no ;;
-      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-binary-registry) ;;
+      *)   AC_MSG_ERROR(bad value ${enableval} for --disable-binary-registry) ;;
     esac
   ],
-  [USE_BINARY_REGISTRY=no]) dnl Default value
+  [USE_BINARY_REGISTRY=yes]) dnl Default value
+
 if test "x$USE_BINARY_REGISTRY" = xyes; then
+  dnl for config.h:
   AC_DEFINE(USE_BINARY_REGISTRY, 1,
     [Define if we should use binary registry instead xml registry])
 fi
@@ -240,21 +216,29 @@ else
 fi
 AC_SUBST(GST_HAVE_UNALIGNED_ACCESS_DEFINE)
 
+dnl check for platform specific settings
+case $host_os in
+     rhapsody*)
+       AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
+        ;;
+     darwin*)
+       AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
+        AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe])
+       ;;
+     cygwin* | mingw* | msvc* | mks*)
+        dnl HAVE_WIN32 currently means "disable POSIXisms".
+        AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
+        ;;
+     *)
+       ;;
+esac
+
 dnl * software *
 
 dnl check for large file support
 dnl affected plugins must include config.h
 AC_SYS_LARGEFILE
 
-dnl HAVE_WIN32 currently means "disable POSIXisms".
-case "$host" in
-  *-*-mingw*)
-    AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
-    ;;
-  *)
-    ;;
-esac
-
 dnl *** checks for programs ***
 
 dnl find a compiler
@@ -273,8 +257,10 @@ if test x$PERL_PATH = xno; then
 fi
 
 dnl we require flex and bison for building the parser
-AG_GST_BISON_CHECK
-AG_GST_FLEX_CHECK
+if test "x$GST_DISABLE_PARSE" != xyes; then
+  AG_GST_BISON_CHECK
+  AG_GST_FLEX_CHECK
+fi
 
 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
@@ -287,10 +273,6 @@ AG_GST_PLUGIN_DOCS([1.3],[2.1])
 
 dnl *** checks for libraries ***
 
-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)
@@ -321,6 +303,19 @@ AC_CHECK_HEADERS([sys/utsname.h])
 dnl Check for stdio_ext.f for __fbufsize
 AC_CHECK_HEADERS([stdio_ext.h])
 
+dnl Check for valgrind.h
+dnl separate from HAVE_VALGRIND because you can have the program, but not
+dnl the dev package
+AC_CHECK_HEADERS([valgrind/valgrind.h], HAVE_VALGRIND_H=yes)
+
+dnl used in gst/gstpoll.c
+AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)
+AM_CONDITIONAL(HAVE_WINSOCK2_H, test "x$HAVE_WINSOCK2_H" = "xyes")
+if test "x$HAVE_WINSOCK2_H" = "xyes"; then
+  WIN32_LIBS="-lws2_32"
+  AC_SUBST(WIN32_LIBS)
+fi
+
 dnl *** checks for types/defines ***
 
 dnl *** checks for structures ***
@@ -360,6 +355,11 @@ AC_CHECK_FUNCS([ftello])
 AC_CHECK_FUNCS([fgetpos])
 AC_CHECK_FUNCS([fsetpos])
 
+dnl check for poll(), ppoll() and pselect()
+AC_CHECK_FUNCS([poll])
+AC_CHECK_FUNCS([ppoll])
+AC_CHECK_FUNCS([pselect])
+
 dnl check for mmap()
 AC_FUNC_MMAP
 AM_CONDITIONAL(HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" = "xyes")
@@ -451,8 +451,8 @@ dnl test if we have dladdr(); we use it for debugging; see gst/gstinfo.c
 save_cflags="$CFLAGS"
 CFLAGS="$CFLAGS -D_GNU_SOURCE"
 AC_CHECK_LIB(dl, dladdr,
-   AC_DEFINE(HAVE_DLADDR, 1,
-             [Defined if we have dladdr ()]))
+   AC_DEFINE(HAVE_DLADDR, 1, [Defined if we have dladdr ()])
+   LIBS="$LIBS -ldl")
 CFLAGS="$save_cflags"
 
 dnl check for inet_aton()
@@ -468,8 +468,9 @@ LIBS="$save_libs"
 dnl *** checks for dependency libraries ***
 
 dnl GLib
+GLIB_REQ=2.12
 
-AG_GST_GLIB_CHECK([2.8])
+AG_GST_GLIB_CHECK([$GLIB_REQ])
 
 dnl FIXME: 0.11: Guess we need to keep this around until 0.11
 GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
@@ -497,13 +498,13 @@ fi
 AC_SUBST(GST_DISABLE_XML_DEFINE)
 
 dnl check for "check", unit testing library/header
-AM_PATH_CHECK(0.9.2,
-    [
-        HAVE_CHECK=yes
-        AC_MSG_NOTICE(CHECK_CFLAGS: $CHECK_CFLAGS)
-        AC_MSG_NOTICE(CHECK_LIBS: $CHECK_LIBS)
-    ],
-    HAVE_CHECK=no)
+if test "$cross_compiling" != yes; then
+  AM_PATH_CHECK(0.9.2,
+      HAVE_CHECK=yes,
+      HAVE_CHECK=no)
+else
+  HAVE_CHECK=no
+fi
 AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
 
 dnl pkg-config check that for libcheck that works for cross-compiling
@@ -520,9 +521,11 @@ GST_LICENSE="LGPL"
 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
 AC_SUBST(GST_LICENSE)
 
-dnl define LIBDIR so we can inform people where we live
+dnl define LIBDIR, GST_DATADIR so we can inform people where we live
 AS_AC_EXPAND(LIBDIR, $libdir)
 AC_DEFINE_UNQUOTED(LIBDIR, "$LIBDIR", [library dir])
+AS_AC_EXPAND(DATADIR, $datadir)
+AC_DEFINE_UNQUOTED(GST_DATADIR, "$DATADIR", [data dir])
 
 dnl set location of plugin directory
 AG_GST_SET_PLUGINDIR
@@ -684,3 +687,43 @@ gstreamer.spec
 )
 
 AC_OUTPUT
+
+dnl negate for output
+if test "x${GST_DISABLE_LOADSAVE}" = "xno"; then enable_loadsave="yes"; fi
+if test "x${GST_DISABLE_PARSE}" = "xno"; then enable_parse="yes"; fi
+if test "x${GST_DISABLE_OPTION_PARSING}" = "xno"; then enable_option_parsing="yes"; fi
+if test "x${GST_DISABLE_TRACE}" = "xno"; then enable_trace="yes"; fi
+if test "x${GST_DISABLE_ALLOC_TRACE}" = "xno"; then enable_alloc_trace="yes"; fi
+if test "x${GST_DISABLE_PLUGIN}" = "xno"; then enable_plugin="yes"; fi
+if test "x${GST_DISABLE_REGISTRY}" = "xno"; then enable_registry="yes"; fi
+if test "x${GST_DISABLE_NET}" = "xno"; then enable_net="yes"; fi
+
+echo "
+
+Configuration
+       Version                    : ${VERSION}
+       Source code location       : ${srcdir}
+       Prefix                     : ${prefix}
+       Compiler                   : ${CC}
+       Package name               : ${GST_PACKAGE_NAME}
+       Package origin             : ${GST_PACKAGE_ORIGIN}
+
+       Documentation (manuals)    : ${enable_docbook}
+       Documentation (API)        : ${enable_gtk_doc}
+
+       Pipeline XML load/save     : ${enable_loadsave}
+       Command-line parser        : ${enable_parse}
+       Option parsing in gst_init : ${enable_option_parsing}
+       Tracing subsystem          : ${enable_trace}
+       Allocation tracing         : ${enable_alloc_trace}
+       Plugin registry            : ${enable_registry}
+       Plugin support             : ${enable_plugin}
+       Network support            : ${enable_net}
+
+       Debug                      : ${USE_DEBUG}
+       Profiling                  : ${USE_PROFILING}
+
+       Building examples          : ${BUILD_EXAMPLES}
+       Building test apps         : ${BUILD_TESTS}
+       Building tests that fail   : ${BUILD_FAILING_TESTS}
+"