Use GST_PLUGIN_DOCS macro in configure.ac, add
[platform/upstream/gstreamer.git] / configure.ac
index 0552c42..7019f60 100644 (file)
@@ -1,16 +1,25 @@
 AC_PREREQ(2.52)
 
+dnl please read gstreamer/docs/random/autotools before changing this file
+
 dnl initialize autoconf
-dnl we don't specify PACKAGE and VERSION because AS_VERSION puts it together
-AC_INIT
+dnl releases only do -Wall, cvs and prerelease does -Werror too
+dnl use a three digit version number for releases, and four for cvs/prerelease
+AC_INIT(GStreamer Base Plug-ins, 0.10.8.1,
+    http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
+    gst-plugins-base)
+
+dnl initialize automake
+AM_INIT_AUTOMAKE
 
-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(gst-plugins-base, GST_PLUGINS_BASE_VERSION, 0, 9, 5, 1,
-    GST_CVS="no", GST_CVS="yes")
+dnl define PACKAGE_VERSION_* variables
+AS_VERSION
+
+dnl check if this is a release version
+AS_NANO(GST_CVS="no", GST_CVS="yes")
 
 dnl can autoconf find the source ?
-AC_CONFIG_SRCDIR([gst/sine/gstsinesrc.c])
+AC_CONFIG_SRCDIR([gst/audiotestsrc/gstaudiotestsrc.c])
 
 dnl define the output header for config
 AM_CONFIG_HEADER([config.h])
@@ -21,15 +30,10 @@ AM_MAINTAINER_MODE
 dnl sets host_* variables
 AC_CANONICAL_HOST
 
-dnl initialize automake
-dnl FIXME: this is deprecated use, we should move PACKAGE and VERSION to
-dnl AC_INIT, but then we need to parse the version to pass to AS_VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-
 dnl our libraries and install dirs use major.minor as a version
-GST_MAJORMINOR=$GST_PLUGINS_BASE_VERSION_MAJOR.$GST_PLUGINS_BASE_VERSION_MINOR
+GST_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
 dnl we override it here if we need to for the release candidate of new series
-# GST_MAJORMINOR=0.9
+GST_MAJORMINOR=0.10
 AC_SUBST(GST_MAJORMINOR)
 
 dnl CURRENT, REVISION, AGE
@@ -38,10 +42,18 @@ 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, 2, 0, 0)
-AS_LIBTOOL_TAGS
+AS_LIBTOOL(GST, 5, 0, 5)
+
+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
+
 AM_PROG_LIBTOOL
 
+dnl *** required versions of GStreamer stuff ***
+GST_REQ=0.10.6.1
+
 dnl *** autotools stuff ****
 
 dnl allow for different autotools
@@ -66,7 +78,7 @@ GST_ARG_GCOV
 GST_ARG_EXAMPLES
 
 GST_ARG_WITH_PKG_CONFIG_PATH
-GST_ARG_WITH_PACKAGE_NAME([GStreamer Base Plug-ins])
+GST_ARG_WITH_PACKAGE_NAME
 GST_ARG_WITH_PACKAGE_ORIGIN
 
 dnl these are all the gst plug-ins, compilable without additional libs
@@ -78,7 +90,6 @@ GST_PLUGINS_ALL="\
        audiotestsrc \
        ffmpegcolorspace \
        playback \
-       sine \
        typefind \
        videotestsrc \
        videorate \
@@ -144,6 +155,7 @@ AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
 dnl check for documentation tools
 GTK_DOC_CHECK([1.3])
 AS_PATH_PYTHON([2.1])
+GST_PLUGIN_DOCS([1.3],[2.1])
 
 dnl *** checks for libraries ***
 
@@ -170,6 +182,7 @@ AC_CHECK_HEADERS([sys/socket.h],
 AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
 
 dnl ffmpegcolorspace includes _stdint.h
+dnl also, Windows does not have long long
 AX_CREATE_STDINT_H
 
 dnl *** checks for types/defines ***
@@ -201,14 +214,14 @@ dnl GLib is required
 GST_GLIB_CHECK([2.6])
 
 dnl liboil is required
-PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
-if test "x${HAVE_LIBOIL}" != xyes ; then
-  AC_ERROR([liboil-0.3 is required])
+PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.6, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
+if test "x$HAVE_LIBOIL" != "xyes"
+then
+  AC_ERROR([liboil-0.3.6 or later is required])
 fi
 
 dnl checks for gstreamer
 dnl uninstalled is selected preferentially -- see pkg-config(1)
-GST_REQ=0.9.3
 GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
 GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
 GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
@@ -297,52 +310,16 @@ GST_CHECK_FEATURE(X, [X libraries and plugins],
   CPPFLAGS="$ac_cppflags_save"
 ])
   
-dnl *** XVideo ***
-dnl Look for the PIC library first, Debian requires it.
-dnl Check debian-devel archives for gory details.
-dnl 20020110:
-dnl At the moment XFree86 doesn't distribute shared libXv due
-dnl to unstable API.  On many platforms you CAN NOT link a shared
-dnl lib to a static non-PIC lib.  This is what the xvideo GStreamer
-dnl plug-in wants to do.  So Debian distributes a PIC compiled
-dnl version of the static lib for plug-ins to link to when it is
-dnl inappropriate to link the main application to libXv directly.
-dnl FIXME: add check if this platform can support linking to a
-dnl        non-PIC libXv, if not then don not use Xv.
-dnl FIXME: perhaps warn user if they have a shared libXv since
-dnl        this is an error until XFree86 starts shipping one
-   
 dnl Check for Xv extension
 translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
 GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions],
                   [xvimagesink], [
-  if test x$HAVE_X = xyes; then
-    AC_CHECK_LIB(Xv_pic, XvQueryExtension,
-                HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
-                $X_LIBS -lXext)
-
-    if test x$HAVE_XVIDEO = xyes; then
-      XVIDEO_LIBS="-lXv_pic -lXext"
-      AC_SUBST(XVIDEO_LIBS)
-    else
-      dnl try again using something else if we didn't find it first
-      if test x$HAVE_XVIDEO = xno; then
-        AC_CHECK_LIB(Xv, XvQueryExtension,
-                  HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
-                  $X_LIBS -lXext)
-
-        if test x$HAVE_XVIDEO = xyes; then
-          XVIDEO_LIBS="-lXv -lXext"
-          AC_SUBST(XVIDEO_LIBS)
-        fi
-      fi
-    fi
-  fi
+  GST_CHECK_XV
 ])
 
 dnl check for X Shm
 translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true)
-GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], xshm, [
+GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [
   if test x$HAVE_X = xyes; then
     AC_CHECK_LIB(Xext, XShmAttach, 
                 HAVE_XSHM="yes", HAVE_XSHM="no",
@@ -362,7 +339,7 @@ GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], xshm, [
 ], , [ 
   AC_SUBST(HAVE_XSHM) 
   AC_SUBST(XSHM_LIBS) 
-] )
+])
 
 dnl v4l/v4l2 checks have been moved down because they require X
 
@@ -370,17 +347,19 @@ dnl *** Video 4 Linux ***
 dnl for information about the header/define, see sys/v4l/gstv4lelement.h
 dnl renamed to GST_V4L in accordance with V4L2 below
 translit(dnm, m, l) AM_CONDITIONAL(USE_GST_V4L, true)
-GST_CHECK_FEATURE(GST_V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
-  # first check X
-  HAVE_GST_V4L="no"
-  if test "$HAVE_X" = "yes"
-  then
-    AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_GST_V4L="yes", HAVE_GST_V4L="no", [
+GST_CHECK_FEATURE(GST_V4L, [Video 4 Linux], video4linux, [
+  AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_GST_V4L="yes", HAVE_GST_V4L="no", [
 #include <sys/types.h>
 #define _LINUX_TIME_H
 #define __user
 #include <linux/videodev.h>
-    ])
+  ])
+
+  dnl we can build v4l without Xv, but then we won't have XOverlay support
+  if test "x$HAVE_GST_V4L" = "xyes" -a "x$HAVE_XVIDEO" != "xyes"
+  then
+    AC_MSG_NOTICE([NO XVIDEO FOUND, VIDEO4LINUX WILL BE BUILT])
+    AC_MSG_NOTICE([WITHOUT XOVERLAY SUPPORT])
   fi
 ])
 
@@ -395,7 +374,7 @@ echo
 
 dnl *** alsa ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
-GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
+GST_CHECK_FEATURE(ALSA, [ALSA], alsa, [
   PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
     HAVE_ALSA="yes"
     AC_SUBST(ALSA_CFLAGS)
@@ -434,59 +413,62 @@ dnl FIXME : add second check somehow if that is necessary
 dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
 dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
 
-dnl *** Gnome VFS ***
+dnl *** GNOME VFS ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
-GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
-  PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, HAVE_GNOME_VFS="yes", HAVE_GNOME_VFS="no")
-  AC_SUBST(GNOME_VFS_CFLAGS)
-  AC_SUBST(GNOME_VFS_LIBS)
+GST_CHECK_FEATURE(GNOME_VFS, [GNOME VFS], gnomevfs, [
+  GST_PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0)
 ])
 
 dnl *** libvisual ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
-GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization plugins], libvisual, [
-  PKG_CHECK_MODULES(LIBVISUAL, libvisual = 0.2.0, HAVE_LIBVISUAL="yes", HAVE_LIBVISUAL="no")
-  AC_SUBST(LIBVISUAL_CFLAGS)
-  AC_SUBST(LIBVISUAL_LIBS)
+GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization library], libvisual, [
+  GST_PKG_CHECK_MODULES(LIBVISUAL, libvisual-0.4 >= 0.4.0)
+  if test $HAVE_LIBVISUAL = no
+  then
+    GST_PKG_CHECK_MODULES(LIBVISUAL, libvisual = 0.2.0)
+  fi
 ])
 
 dnl *** ogg ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_OGG, true)
-GST_CHECK_FEATURE(OGG, [ogg de/encoder], oggdemux oggmux, [
-  PKG_CHECK_MODULES(OGG, ogg >= 1.0, [
-    HAVE_OGG="yes"
-    AC_SUBST(OGG_CFLAGS)
-    AC_SUBST(OGG_LIBS)
-  ], [
+GST_CHECK_FEATURE(OGG, [Xiph Ogg library], ogg, [
+  GST_PKG_CHECK_MODULES(OGG, ogg >= 1.0)
+  if test $HAVE_OGG = no
+  then
     XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no")
     AS_SCRUB_INCLUDE(OGG_CFLAGS)
-  ])
+  fi
+])
+
+dnl *** pango ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true)
+GST_CHECK_FEATURE(PANGO, [Pango font rendering], pango, [
+  GST_PKG_CHECK_MODULES(PANGO, pango pangoft2)
 ])
 
 dnl *** theora ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_THEORA, true)
-GST_CHECK_FEATURE(THEORA, [ogg theora codec], theoradec theoraenc, [
-  PKG_CHECK_MODULES(THEORA, theora, [
-    HAVE_THEORA="yes"
-    AC_SUBST(THEORA_LIBS)
-    AC_SUBST(THEORA_CFLAGS)
-  ], [
+GST_CHECK_FEATURE(THEORA, [Xiph Theora video codec], theora, [
+  GST_PKG_CHECK_MODULES(THEORA, theora)
+  if test $HAVE_THEORA = no
+  then
     GST_CHECK_LIBHEADER(THEORA, theora, theora_version_string, "-logg", theora/theora.h, THEORA_LIBS="-ltheora -logg")
     AC_SUBST(THEORA_LIBS)
-  ])
+  fi
 ])
 
 dnl *** vorbis ***
 dnl AM_PATH_VORBIS only takes two options
 translit(dnm, m, l) AM_CONDITIONAL(USE_VORBIS, true)
-GST_CHECK_FEATURE(VORBIS, [vorbis plug-in], vorbisenc vorbisdec, [
-  PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0 vorbisenc >= 1.0, [
-    HAVE_VORBIS="yes"
-  ], [
+GST_CHECK_FEATURE(VORBIS, [Xiph Vorbis audio codec], vorbis, [
+  GST_PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0 vorbisenc >= 1.0)
+  if test $HAVE_VORBIS = no
+  then
     XIPH_PATH_VORBIS(HAVE_VORBIS="yes", HAVE_VORBIS="no")
     AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
-  ])
+  fi
 ])
+
 if test "x$HAVE_VORBIS" = "xyes"; then
   ac_cflags_save="$CFLAGS"
   dnl FIXME: does this work on non-gcc? -- Company
@@ -522,7 +504,9 @@ dnl *** finalize CFLAGS, LDFLAGS, LIBS
 
 dnl Overview:
 dnl GST_OPTION_CFLAGS:  common flags for profiling, debugging, errors, ...
-dnl GST_*:              flags shared by all built objects
+dnl GST_*:              flags shared by built objects to link against GStreamer
+dnl GST_ALL_LDFLAGS:    linker flags shared by all
+dnl GST_LIB_LDFLAGS:    additional linker flags for all libaries
 dnl GST_LT_LDFLAGS:     library versioning of our libraries
 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
 
@@ -545,14 +529,25 @@ AC_SUBST(GST_LT_LDFLAGS)
 dnl FIXME: do we want to rename to GST_ALL_* ?
 dnl prefer internal headers to already installed ones
 dnl also add builddir include for enumtypes and marshal
-dnl add ERROR_CFLAGS, but overridable
+dnl add GST_OPTION_CFLAGS, but overridable
 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
 AC_SUBST(GST_CFLAGS)
 AC_SUBST(GST_LIBS)
 
+dnl LDFLAGS 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_ALL_LDFLAGS="-no-undefined"
+AC_SUBST(GST_ALL_LDFLAGS)
+
+dnl GST_LIB_LDFLAGS
+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 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\$\$' -no-undefined"
+GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
 AC_SUBST(GST_PLUGIN_LDFLAGS)
 
 dnl *** output files ***
@@ -568,7 +563,6 @@ gst/audioresample/Makefile
 gst/audiotestsrc/Makefile
 gst/ffmpegcolorspace/Makefile
 gst/playback/Makefile
-gst/sine/Makefile
 gst/subparse/Makefile
 gst/tcp/Makefile
 gst/typefind/Makefile
@@ -586,26 +580,31 @@ ext/cdparanoia/Makefile
 ext/gnomevfs/Makefile
 ext/libvisual/Makefile
 ext/ogg/Makefile
+ext/pango/Makefile
 ext/theora/Makefile
 ext/vorbis/Makefile
 gst-libs/Makefile
 gst-libs/gst/Makefile
 gst-libs/gst/audio/Makefile
+gst-libs/gst/cdda/Makefile
 gst-libs/gst/floatcast/Makefile
 gst-libs/gst/interfaces/Makefile
-gst-libs/gst/net/Makefile
+gst-libs/gst/netbuffer/Makefile
 gst-libs/gst/riff/Makefile
 gst-libs/gst/rtp/Makefile
 gst-libs/gst/tag/Makefile
 gst-libs/gst/video/Makefile
-gst-libs/ext/Makefile
-examples/seeking/Makefile
-examples/Makefile
 tools/Makefile
+win32/common/config.h
 pkgconfig/Makefile
 pkgconfig/gstreamer-plugins-base.pc
 pkgconfig/gstreamer-plugins-base-uninstalled.pc
-check/Makefile
+tests/Makefile
+tests/check/Makefile
+tests/examples/Makefile
+tests/examples/seek/Makefile
+tests/examples/volume/Makefile
+tests/icles/Makefile
 docs/Makefile
 docs/libs/Makefile
 docs/plugins/Makefile
@@ -617,15 +616,4 @@ m4/Makefile
 )
 AC_OUTPUT
 
-echo "configure: *** Core plug-ins, always built:"
-( for i in $GST_PLUGINS_ALL; do echo -e '\t'$i; done ) | sort
-echo
-echo -n "configure: *** Plug-ins relying on libraries that will be built:"
-echo -e "$GST_PLUGINS_YES" | sort
-echo
-echo -n "configure: *** Plug-ins relying on libraries that will NOT be built:"
-echo -e "$GST_PLUGINS_NO" | sort
-echo
-if test "x$BUILD_EXTERNAL" = "xno"; then
-  echo "configure: *** No external plug-ins will be built"
-fi
+GST_OUTPUT_PLUGINS