changelog
[platform/upstream/gstreamer.git] / configure.ac
index 8a2e7ae..0e3b9e7 100644 (file)
@@ -1,9 +1,12 @@
+AC_PREREQ(2.52)
+
 AC_INIT
 AC_CANONICAL_TARGET
 
 dnl when going to/from release please set the nano (fourth number) right !
 dnl releases only do Wall, cvs and prerelease does Werror too
-AS_VERSION(gstreamer, GST_VERSION, 0, 8, 4, 1, GST_CVS="no", GST_CVS="yes")
+AS_VERSION(gstreamer, GST_VERSION, 0, 9, 3, 1,
+    GST_CVS="no", GST_CVS="yes")
 
 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
 AM_MAINTAINER_MODE
@@ -11,8 +14,8 @@ AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
 
 dnl our libraries and install dirs use major.minor as a version
 GST_MAJORMINOR=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
-dnl we override it here for release candidates
-#GST_MAJORMINOR=0.8
+dnl we override it here for release candidates for a new series
+# GST_MAJORMINOR=0.9
 AC_SUBST(GST_MAJORMINOR)
 
 AC_PROG_CC
@@ -24,7 +27,8 @@ dnl - library source changed -> increment REVISION
 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
 dnl - interfaces added -> increment AGE
 dnl - interfaces removed -> AGE = 0
-AS_LIBTOOL(GST, 4, 0, 3)
+AS_LIBTOOL(GST, 7, 0, 0)
+AS_LIBTOOL_TAGS([])
 AM_PROG_LIBTOOL
 
 AC_CONFIG_SRCDIR([gst/gst.c])
@@ -51,17 +55,12 @@ AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
                    [gettext locale dir])
 
+dnl define LIBDIR so we can inform people where we live
+AS_AC_EXPAND(LIBDIR, $libdir)
+AC_DEFINE_UNQUOTED([LIBDIR], "$LIBDIR",
+                   [library dir])
 
-dnl decide on error flags
-dnl if we support -Wall, set it unconditionally
-AS_COMPILER_FLAG(-Wall,
-                 GST_ERROR_CFLAGS="-Wall",
-                 GST_ERROR_CFLAGS="")
-dnl if we're in nano >= 1, add -Werror if supported
-if test "x$GST_CVS" = "xyes"
-then
-  AS_COMPILER_FLAG(-Werror, GST_ERROR_CFLAGS="$GST_ERROR_CFLAGS -Werror")
-fi
+GST_SET_ERROR_CFLAGS($GST_CVS)
 
 dnl We disable static building for development, for time savings
 dnl *NOTE*: dnl this line before release, so release does static too
@@ -79,7 +78,7 @@ fi
 dnl subsystems - can influence other decisions so needs to be high up
 dnl we need to do AM_CONDITIONAL them here for automake 1.6.x compatibility
 GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
-AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_DISABLE_GST_DEBUG" = "xyes")
+AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_GST_DISABLE_DEBUG" = "xyes")
 GST_CHECK_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
 AM_CONDITIONAL(GST_DISABLE_LOADSAVE, test "x$GST_DISABLE_LOADSAVE" = "xyes")
 GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
@@ -115,15 +114,19 @@ AC_ARG_WITH(pkg-config-path,
                   [colon-separated list of pkg-config(1) dirs]),
    [export PKG_CONFIG_PATH=${withval}])
 
-GST_DOC()
 GST_ARCH()
 
+dnl ### Documentation checks
+
 dnl Perl is used in building documentation
 AC_PATH_PROG(PERL_PATH, perl, no)
 if test x$PERL_PATH = xno; then
   AC_MSG_ERROR(Could not find perl)
 fi
 
+GST_DOCBOOK_CHECK
+GTK_DOC_CHECK([1.3])
+
 AC_PROG_AWK
 
 dnl we require bison for building the parser
@@ -151,41 +154,12 @@ if test x$FLEX_PATH = xno; then
   AC_MSG_ERROR(Could not find flex)
 fi
 
-dnl
-dnl We should really use AC_SYS_LARGEFILE, but the problem is
-dnl many of the plugins don't include "config.h".  To assure
-dnl binary compatibility, it is necessary that all gstreamer
-dnl code be compiled with the same sizeof(off_t), so we use
-dnl the following crude hack.
-dnl
-
-AC_MSG_CHECKING(for large file support)
-AC_TRY_RUN([
-#define _LARGEFILE_SOURCE
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
-int main () { return !(sizeof(off_t) == 8); }
-],
-[
-  AC_MSG_RESULT(yes)
-  GST_PKG_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-],
-[
-  AC_MSG_RESULT(no)
-],
-[
-  AC_MSG_RESULT(no)
-])
+dnl check for large file support (affected
+dnl plugins must include config.h for this)
+AC_SYS_LARGEFILE
 
 dnl check for mmap
 AC_FUNC_MMAP()
-if test "$ac_cv_func_mmap_fixed_mapped" = "yes" ; then
-  GST_DISABLE_OMEGA_COTHREADS=no
-else
-  GST_DISABLE_OMEGA_COTHREADS=yes
-fi
-dnl for future --disabling, maybe.  Right now, it depends on HAVE_MMAP
-AM_CONDITIONAL(GST_DISABLE_OMEGA_COTHREADS, test "x$GST_DISABLE_OMEGA_COTHREADS" = "xyes")
 
 dnl check for makecontext and define HAVE_MAKECONTEXT if we have it
 AC_CHECK_MCSC()
@@ -249,7 +223,7 @@ dnl ====================================
 dnl === GLib 2 ===
 dnl Minimum required version of GLib2
 dnl required for compilation without warnings
-GLIB2_REQ="2.2"
+GLIB2_REQ="2.4"
 AC_SUBST(GLIB2_REQ)
 
 dnl Check for glib2 with sugar on top
@@ -261,6 +235,16 @@ GLIB_CFLAGS=$GLIB2_CFLAGS
 AC_SUBST(GLIB_LIBS)
 AC_SUBST(GLIB_CFLAGS)
 
+AC_MSG_CHECKING([glib version >= 2.8])
+if pkg-config --atleast-version=2.8 glib-2.0; then
+  AC_MSG_RESULT(yes)
+  GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
+else
+  AC_MSG_RESULT(no)
+  GST_HAVE_GLIB_2_8_DEFINE="/* #undef GST_HAVE_GLIB_2_8 */"
+fi
+AC_SUBST(GST_HAVE_GLIB_2_8_DEFINE)
+
 if test "x$HAVE_GLIB2" = "xno"; then
   AC_MSG_ERROR([GStreamer requires GLib $GLIB2_REQ to compile.])
 fi
@@ -304,26 +288,28 @@ int main ()
                 download the latest version from 
                 ftp://ftp.rpm.org/pub/rpm/dist/])
 ])
+AC_SUBST(POPT_CFLAGS)
 AC_SUBST(POPT_LIBS)
 
 dnl Check for ucontext.h
 AC_CHECK_HEADER(ucontext.h, AC_DEFINE(HAVE_UCONTEXT_H, 1, [defined if we have ucontext.h]))
 
+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)
+AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")
+
 dnl ######################################################################
 dnl # Check command line parameters, and set shell variables accordingly #
 dnl ######################################################################
 
 dnl FIXME: simplify all this down using a few m4 macros
 
-AC_ARG_ENABLE(libmmx,
-AC_HELP_STRING([--enable-libmmx],[use libmmx, if available]),
-[case "${enableval}" in
-  yes) USE_LIBMMX=$HAVE_LIBMMX ;;
-  no)  USE_LIBMMX=no ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmmx) ;;
-esac], 
-[USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
-
 AC_ARG_ENABLE(fast-stack-trash,
 AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]),
 [case "${enableval}" in
@@ -334,15 +320,6 @@ AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or a
 esac], 
 [USE_FAST_STACK_TRASH=yes]) dnl Default value
 
-AC_ARG_ENABLE(plugin-builddir,
-AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installed plugins]),
-[case "${enableval}" in
-  yes) PLUGINS_USE_BUILDDIR=yes ;;
-  no)  PLUGINS_USE_BUILDDIR=no ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;;
-esac], 
-[PLUGINS_USE_BUILDDIR=no]) dnl Default value
-
 AC_ARG_ENABLE(profiling,
 AC_HELP_STRING([--enable-profiling],[adds -pg to compiler commandline, for profiling]),
 [case "${enableval}" in
@@ -353,13 +330,8 @@ esac],
 [USE_PROFILING=no]) dnl Default value
 
 dnl use a cache dir for storing element registry info.
-dnl default to building registry in the source tree if we are enabling plugin build dir
-if test "x$PLUGINS_USE_BUILDDIR" = "xyes"; then
-  GST_CACHE_DIR=`pwd`
-else
-  dnl ${localstatedir} points to PREFIX/var
-  GST_CACHE_DIR=${localstatedir}/cache/gstreamer-$GST_MAJORMINOR
-fi
+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
@@ -434,7 +406,14 @@ esac],
 [USE_DEBUG=yes]) dnl Default value
 
 dnl valgrind inclusion
-USE_VALGRIND="$USE_DEBUG"
+AC_ARG_ENABLE(valgrind,
+AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
+[case "${enableval}" in
+  yes) USE_VALGRIND="$USE_DEBUG" ;;
+  no)  USE_VALGRIND=no ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
+esac],
+[USE_VALGRIND="$USE_DEBUG"]) dnl Default value
 VALGRIND_REQ="2.1"
 if test "x$USE_VALGRIND" = xyes; then
 
@@ -447,6 +426,9 @@ fi
 AC_SUBST(VALGRIND_CFLAGS)
 AC_SUBST(VALGRIND_LIBS)
 
+AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
+AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
+
 dnl ################################################
 dnl # Set defines according to variables set above #
 dnl ################################################
@@ -454,10 +436,6 @@ dnl ################################################
 
 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
 dnl HAVE_ and it is likely to be easier to stick with the old name
-if test "x$USE_LIBMMX" = xyes; then
-  AC_DEFINE(HAVE_LIBMMX, 1, [Define if libmmx is available])
-fi
-
 if test "x$USE_FAST_STACK_TRASH" = xyes; then
   AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions])
 fi
@@ -490,10 +468,6 @@ AC_CHECK_LIB(dl, dladdr,
              [Defined if we have dladdr ()]))
 CFLAGS="$save_cflags"
 
-if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
-  AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this])
-fi
-
 if test "x$USE_DEBUG" = xyes; then
    GST_INT_CFLAGS="$GST_INT_CFLAGS -g"
 fi
@@ -504,10 +478,8 @@ dnl #############################
 
 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
 dnl HAVE_ and it is likely to be easier to stick with the old name
-AM_CONDITIONAL(EXPERIMENTAL,        test "$EXPERIMENTAL" = "$xyes")
-AM_CONDITIONAL(BROKEN,              test "$BROKEN" = "$xyes")
-AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
-
+AM_CONDITIONAL(EXPERIMENTAL,        test "x$EXPERIMENTAL" = "xyes")
+AM_CONDITIONAL(BROKEN,              test "x$BROKEN" = "xyes")
 
 dnl ############################
 dnl # Set up some more defines #
@@ -515,6 +487,7 @@ dnl ############################
 
 dnl set license and copyright notice
 AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
+
 dnl package name in plugins
 AC_ARG_WITH(package-name,
 AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
@@ -523,9 +496,20 @@ AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
   no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
   *) GST_PACKAGE="${withval}" ;;
 esac], 
-[GST_PACKAGE="GStreamer"]) dnl Default value
+[
+dnl default value
+if test "x$GST_CVS" = "xyes"
+then
+  dnl nano >= 1
+  GST_PACKAGE="GStreamer CVS/prerelease"
+else
+  GST_PACKAGE="GStreamer source release"
+fi
+]
+)
 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
+
 dnl package origin URL
 AC_ARG_WITH(package-origin,
 AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
@@ -534,7 +518,7 @@ AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plu
   no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
   *) GST_ORIGIN="${withval}" ;;
 esac], 
-[GST_ORIGIN="http://gstreamer.net/"]) dnl Default value
+[GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value
 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
 
@@ -544,11 +528,6 @@ AC_DEFINE_UNQUOTED(PLUGINS_DIR, "$PLUGINS_DIR", [Define the plugin directory])
 AC_SUBST(PLUGINS_DIR)
 AC_MSG_NOTICE([Using $PLUGINS_DIR as the plugin install location])
 
-dnl Set location of uninstalled plugin directory
-PLUGINS_BUILDDIR=`pwd`
-AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR, "$PLUGINS_BUILDDIR", [Define the uninstalled plugin directory])
-AC_SUBST(PLUGINS_BUILDDIR)
-
 dnl LDFLAGS modifier defining exported symbols from built objects
 EXPORT_LDFLAGS="-export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*"
 
@@ -573,13 +552,13 @@ dnl we disable deprecated internally
 dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS
 dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in
 GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \
- $GST_INT_CFLAGS $GST_ERROR_CFLAGS -DGST_DISABLE_DEPRECATED"
+ $GST_INT_CFLAGS \$(ERROR_CFLAGS) -DGST_DISABLE_DEPRECATED"
 
 dnl Private vars for libgst only
 GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \
   $VALGRIND_CFLAGS -I\$(top_srcdir)"
 GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS -lpopt $GST_PKG_LIBS $LTLIBINTL $VALGRIND_LIBS"
-GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION $EXPORT_LDFLAGS"
+GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION -no-undefined $EXPORT_LDFLAGS"
 AC_SUBST(GST_LIB_CFLAGS)
 AC_SUBST(GST_LIB_LIBS)
 AC_SUBST(GST_LIB_LDFLAGS)
@@ -592,7 +571,7 @@ AC_SUBST(GST_OBJ_CFLAGS, "$GST_OBJ_CFLAGS")
 AC_SUBST(GST_OBJ_LIBS, "$GST_OBJ_LIBS")
 
 dnl specific additional LDFLAGS for plugins
-GST_PLUGIN_LDFLAGS="-module -avoid-version $EXPORT_LDFLAGS"
+GST_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined $EXPORT_LDFLAGS"
 AC_SUBST(GST_PLUGIN_LDFLAGS, "$GST_PLUGIN_LDFLAGS")
 
 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
@@ -614,20 +593,6 @@ dnl ##################################################
 
 infomessages=
 
-if test "x$PLUGINS_USE_BUILDDIR" = xyes; then
-  infomessages="$infomessages
-*** Warning: You have configured using the --enable-plugin-builddir option.
-
-This option is for development purposes only: binaries built with
-it should be used with code in the build tree only.  To build an
-installable version, use ./configure without the --enable-plugin-builddir
-option.  Note that the autogen.sh script supplies the plugin builddir
-option automatically -- run ./autogen.sh -- --disable-plugin-builddir to make
-an installable build.
-
-"
-fi
-
 dnl #########################
 dnl # Make the output files #
 dnl #########################
@@ -636,63 +601,56 @@ dnl libs/ext/Makefile
 dnl nothing there yet !
 AC_OUTPUT(
 Makefile
-include/Makefile
 gst/Makefile
 gst/gstconfig.h
 gst/gstversion.h
-gst/autoplug/Makefile
+gst/base/Makefile
+gst/check/Makefile
 gst/indexers/Makefile
 gst/elements/Makefile
 gst/parse/Makefile
-gst/schedulers/Makefile
-gst/registries/Makefile
 libs/Makefile
 libs/gst/Makefile
-libs/gst/bytestream/Makefile
-libs/gst/control/Makefile
+libs/gst/controller/Makefile
 libs/gst/dataprotocol/Makefile
-libs/gst/getbits/Makefile
 po/Makefile.in
+check/Makefile
 tests/Makefile
-tests/bufspeed/Makefile
 tests/instantiate/Makefile
-tests/memchunk/Makefile
 tests/muxing/Makefile
 tests/seeking/Makefile
 tests/sched/Makefile
 tests/threadstate/Makefile
 testsuite/Makefile
-testsuite/bins/Makefile
 testsuite/bytestream/Makefile
 testsuite/caps/Makefile
 testsuite/cleanup/Makefile
-testsuite/clock/Makefile
+testsuite/controller/Makefile
 testsuite/debug/Makefile
 testsuite/dlopen/Makefile
-testsuite/dynparams/Makefile
 testsuite/elements/Makefile
-testsuite/ghostpads/Makefile
 testsuite/indexers/Makefile
 testsuite/negotiation/Makefile
+testsuite/pad/Makefile
 testsuite/parse/Makefile
 testsuite/plugin/Makefile
 testsuite/refcounting/Makefile
 testsuite/schedulers/Makefile
 testsuite/states/Makefile
-testsuite/tags/Makefile
 testsuite/threads/Makefile
+testsuite/trigger/Makefile
 examples/Makefile
+examples/controller/Makefile
 examples/cutter/Makefile
 examples/helloworld/Makefile
 examples/launch/Makefile
 examples/manual/Makefile
 examples/mixer/Makefile
+examples/metadata/Makefile
 examples/pingpong/Makefile
 examples/plugins/Makefile
+examples/pwg/Makefile
 examples/queue/Makefile
-examples/queue2/Makefile
-examples/queue3/Makefile
-examples/queue4/Makefile
 examples/retag/Makefile
 examples/thread/Makefile
 examples/typefind/Makefile
@@ -705,8 +663,6 @@ docs/faq/Makefile
 docs/gst/Makefile
 docs/libs/Makefile
 docs/manual/Makefile
-docs/plugins/Makefile
-docs/plugins/gstreamer-plugins.types
 docs/pwg/Makefile
 docs/xsl/Makefile
 docs/version.entities
@@ -714,8 +670,14 @@ pkgconfig/Makefile
 stamp.h
 pkgconfig/gstreamer.pc
 pkgconfig/gstreamer-uninstalled.pc
-pkgconfig/gstreamer-control.pc
-pkgconfig/gstreamer-control-uninstalled.pc
+pkgconfig/gstreamer-base.pc
+pkgconfig/gstreamer-base-uninstalled.pc
+pkgconfig/gstreamer-check.pc
+pkgconfig/gstreamer-check-uninstalled.pc
+pkgconfig/gstreamer-controller.pc
+pkgconfig/gstreamer-controller-uninstalled.pc
+pkgconfig/gstreamer-dataprotocol.pc
+pkgconfig/gstreamer-dataprotocol-uninstalled.pc
 gstreamer.spec,
 echo "$infomessages", infomessages="$infomessages"
 )