ext/dv/gstdvdec.c: Fix format conversion and position querying.
[platform/upstream/gst-plugins-good.git] / configure.ac
index 4631797..b242d44 100644 (file)
@@ -12,17 +12,14 @@ AM_MAINTAINER_MODE
 
 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, GST_PLUGINS_VERSION, 0, 7, 4, 1, GST_CVS="no", GST_CVS="yes")
-
-dnl add a suffix to apps
-if test x$program_suffix = xNONE ; then
-  program_suffix=-$GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR
-fi
+AS_VERSION(gst-plugins, GST_PLUGINS_VERSION, 0, 8, 1, 1, GST_CVS="no", GST_CVS="yes")
 
 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
 
 dnl our libraries and install dirs use major.minor as a version
 GST_MAJORMINOR=$GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR
+dnl we override it here if we need to for the release candidate
+#GST_MAJORMINOR=0.8
 AC_SUBST(GST_MAJORMINOR)
 
 dnl CURRENT, REVISION, AGE
@@ -30,7 +27,7 @@ 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_PLUGINS, 2, 0, 0)
+AS_LIBTOOL(GST_PLUGINS, 1, 0, 1)
 AM_PROG_LIBTOOL
 
 dnl FIXME take something else ?
@@ -69,7 +66,6 @@ if test "x$GST_WALL" = "xyes"; then
 
    if test "x$GST_CVS" = "xyes"; then
      AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
-     GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
    fi
 fi
 
@@ -85,6 +81,11 @@ AC_HEADER_STDC([])
 AC_C_INLINE
 AX_CREATE_STDINT_H
 
+dnl Check for malloc.h
+AC_CHECK_HEADER(malloc.h,[
+  AC_DEFINE(HAVE_MALLOC_H, 1, [whether malloc.h available])
+])
+
 dnl Check for a way to display the function name in debug output
 GST_CHECK_FUNCTION()
 
@@ -94,6 +95,9 @@ if test "x$GST_CVS" = "xyes"; then
   AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
 fi
 
+dnl Check for FIONREAD ioctl declaration :
+GST_CHECK_FIONREAD()
+
 dnl ############################################
 dnl # Super Duper options for plug-in building #
 dnl ############################################
@@ -118,11 +122,9 @@ GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
 [
   AC_MSG_WARN(building experimental plug-ins)
   USE_TARKIN="yes"
-  USE_SHOUT2="yes"
 ],[
   AC_MSG_NOTICE(not building experimental plug-ins)
   USE_TARKIN="no"
-  USE_SHOUT2="no"
 ])
 
 dnl broken plug-ins; stuff that doesn't seem to build at the moment
@@ -186,7 +188,8 @@ GST_CHECK_FEATURE(GCONF, [GConf libraries], , [
 ])
 
 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
-PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR.$GST_PLUGINS_VERSION_MICRO,
+GST_REQ=0.8.1.1
+PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
   HAVE_GST="yes", HAVE_GST="no")
 
 if test "x$HAVE_GST" = "xno"; then
@@ -200,7 +203,7 @@ fi
 AC_SUBST(GST_TOOLS_DIR)
 
 dnl check for gstreamer-control; uninstalled is selected preferentially
-PKG_CHECK_MODULES(GST_CONTROL, gstreamer-control-$GST_MAJORMINOR >= $GST_PLUGINS_VERSION_MAJOR.$GST_PLUGINS_VERSION_MINOR.$GST_PLUGINS_VERSION_MICRO,
+PKG_CHECK_MODULES(GST_CONTROL, gstreamer-control-$GST_MAJORMINOR >= $GST_REQ,
   HAVE_GST_CONTROL="yes", HAVE_GST_CONTROL="no")
 
 if test "x$HAVE_GST_CONTROL" = "xno"; then
@@ -254,18 +257,26 @@ else
   HAVE_GDK_LOADERS=no
 fi
 
+# we set the defaults always to make sure we have non-empty variables
+# for the Makefile
+
+# by default, stick to prefix
+GDK_PIXBUF_LOADER_DIR=${libdir}/gtk-2.0/\${GTK_VERSION}/loaders
+GDK_PIXBUF_CONF_DIR=${sysconfdir}/gtk-2.0
+
+
 AC_ARG_ENABLE(gdk-pixbuf-loader,
   AC_HELP_STRING([--enable-gdk-pixbuf-loader],
               [whether to enable building of gdk_pixbuf loader]),
               :, HAVE_GDK_LOADERS="no")
 
-# allow customization of pixbuf loader install location
-# when nothing specified, adhere to prefix settings
-# when called without any option with this argument, autodetect
-# when called with a path, set to the given path
-
-if test "x$HAVE_GDK_LOADERS" == "xyes"; then
+if test "x$HAVE_GDK_LOADERS" = "xyes"; then
   AC_PATH_PROG(QUERYLOADERS, gdk-pixbuf-query-loaders, no)
+  # allow customization of pixbuf loader install location
+  # when nothing specified, adhere to prefix settings
+  # when called without any option with this argument, autodetect
+  # when called with a path, set to the given path
+
   AC_ARG_WITH(gdk-pixbuf-loader-dir, 
      AC_HELP_STRING([--with-gdk-pixbuf-loader-dir],
        [directory to install the gdk_pixbuf loader (none for pkg-config default)]),
@@ -275,9 +286,7 @@ if test "x$HAVE_GDK_LOADERS" == "xyes"; then
       else
         GDK_PIXBUF_LOADER_DIR="$GDK_PIXBUF_LIBDIR/gtk-2.0/\$GTK_VERSION/loaders"
       fi
-     ],
-     # nothing specified
-     GDK_PIXBUF_LOADER_DIR=${libdir}/gtk-2.0/\$GTK_VERSION/loaders
+     ]
   )
   AS_AC_EXPAND(GDK_PIXBUF_LOADER_DIR, $GDK_PIXBUF_LOADER_DIR)
   AC_SUBST(GDK_PIXBUF_LOADER_DIR)
@@ -287,6 +296,7 @@ if test "x$HAVE_GDK_LOADERS" == "xyes"; then
   # when nothing specified, adhere to prefix settings
   # when called without any option with this argument, autodetect
   # when called with a path, set to the given path
+
   AC_ARG_WITH(gdk-pixbuf-conf-dir, 
      AC_HELP_STRING([--with-gdk-pixbuf-conf-dir],
        [directory to install the gdk_pixbuf config (none for pkg-config default)]),
@@ -296,10 +306,7 @@ if test "x$HAVE_GDK_LOADERS" == "xyes"; then
       else
         GDK_PIXBUF_CONF_DIR="$GDK_PIXBUF_PREFIXDIR/etc/gtk-2.0/"
       fi
-     ],
-     # nothing specified
-     GDK_PIXBUF_LOADER_DIR=${libdir}/gtk-2.0/\$GTK_VERSION/loaders
-     GDK_PIXBUF_CONF_DIR=${sysconfdir}/gtk-2.0
+     ]
   )
   AS_AC_EXPAND(GDK_PIXBUF_CONF_DIR, $GDK_PIXBUF_CONF_DIR)
   AC_SUBST(GDK_PIXBUF_CONF_DIR)
@@ -322,7 +329,7 @@ dnl ===========================================================================
 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
 AC_SUBST(plugindir)
 
-GST_PLUGIN_LDFLAGS='-module -avoid-version'
+GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '[_]*(gst_|Gst|GST_).*' $GST_LIBS"
 AC_SUBST(GST_PLUGIN_LDFLAGS)
 
 dnl these are all the gst plug-ins, compilable without additional libs
@@ -342,11 +349,11 @@ GST_PLUGINS_ALL="\
        deinterlace \
        effectv \
        festival \
+       ffmpegcolorspace \
        filter \
        flx \
        goom \
-       id3 \
-       intfloat \
+       interleave \
        law \
        level \
        matroska \
@@ -359,7 +366,6 @@ GST_PLUGINS_ALL="\
        mpegaudioparse \
        mpegstream \
        monoscope \
-       oneton \
        overlay \
        passthrough \
        playondemand \
@@ -408,7 +414,8 @@ GST_PLUGINS_SELECTED=""
 AC_ARG_WITH(plugins,
     AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile]),
     [for i in `echo $withval | tr , ' '`; do
-        if test -n `echo $i | grep $GST_PLUGINS_ALL`; then
+        if echo $GST_PLUGINS_ALL | grep $i > /dev/null
+        then
             GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
         else
             echo "plug-in $i not recognized, ignoring..."
@@ -441,6 +448,12 @@ GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
   AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
 ])
 
+dnl *** OS X audio ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_OSX_AUDIO, true)
+GST_CHECK_FEATURE(OSX_AUDIO, [OSX audio], osxaudiosrc osxaudiosink, [
+  AC_CHECK_HEADER(CoreAudio/CoreAudio.h, HAVE_OSX_AUDIO="yes", HAVE_OSX_AUDIO="no")
+])
+
 dnl *** QuickCam ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_QCAM, true)
 GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
@@ -456,6 +469,12 @@ GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
   fi
 ])
 
+dnl *** Sun Audio ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_SUNAUDIO, true)
+GST_CHECK_FEATURE(SUNAUDIO, [Sun Audio], sunaudiosink, [
+  AC_CHECK_HEADER(sys/audioio.h, HAVE_SUNAUDIO="yes", HAVE_SUNAUDIO="no")
+])
+
 dnl *** Video CD ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
 GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
@@ -501,20 +520,20 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_X, true)
 GST_CHECK_FEATURE(X, [X libraries and plugins],
                   [ximagesink], [
   AC_PATH_XTRA
-dnl  if test "x$X_CFLAGS" == "x" -o "$X_CFLAGS" == "-DX_DISPLAY_MISSING"
-  if test "x$X_DISPLAY_MISSING" = "x1"
+  dnl now try to find the HEADER
+  AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no")
+
+  if test "x$HAVE_X" = "xno"
   then
     AC_MSG_NOTICE([cannot find X11 development files])
-    HAVE_X="no"
   else
     dnl this is much more than we want
     X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
-    dnl AC_PATH_XTRA only defines the path needed to find the X libs, not the libs
-    dnl therefore we add them here
+    dnl AC_PATH_XTRA only defines the path needed to find the X libs,
+    dnl it does not add the libs; therefore we add them here
     X_LIBS="$X_LIBS -lX11"
     AC_SUBST(X_CFLAGS)
     AC_SUBST(X_LIBS)
-    HAVE_X="yes"
   fi
   AC_SUBST(HAVE_X)
 ])
@@ -537,7 +556,7 @@ 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 xvideosink], [
+                  [xvimagesink], [
   if test x$HAVE_X = xyes; then
     AC_CHECK_LIB(Xv_pic, XvQueryExtension,
                 HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
@@ -594,7 +613,7 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true)
 GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [
   # first check X
   HAVE_V4L="no"
-  if test "$HAVE_X" == "yes"
+  if test "$HAVE_X" = "yes"
   then
     AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [
 #include <sys/types.h>
@@ -609,7 +628,7 @@ dnl for information about the header/define, see sys/v4l2/gstv4l2element.h
 translit(dnm, m, l) AM_CONDITIONAL(USE_V4L2, true)
 GST_CHECK_FEATURE(V4L2, [Video 4 Linux 2], v4l2src, [
   HAVE_V4L2="no"
-  if test "$HAVE_X" == "yes"
+  if test "$HAVE_X" = "yes"
   then
     AC_MSG_CHECKING([Checking for uptodate v4l2 installation])
     AC_TRY_COMPILE([
@@ -629,6 +648,24 @@ return 0;
                          [ AC_MSG_WARN([video4linux2 was not found])])
        ])
   fi
+  dnl check for missing v4l2_buffer declaration (see #135919)
+  if [ test x$HAVE_V4L2 = xyes ]; then
+    MISSING_DECL=0
+    AC_MSG_CHECKING(struct v4l2_buffer declaration)
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <linux/types.h>
+#define _LINUX_TIME_H
+#include <linux/videodev2.h>
+    ],[
+struct v4l2_buffer buf;
+buf.index = 0;
+return 0;
+    ], [ AC_MSG_RESULT(yes) ], [ MISSING_DECL=1 && AC_MSG_RESULT(no) ])
+    if [ test x$MISSING_DECL = x1 ]; then
+      AC_DEFINE(GST_V4L2_MISSING_BUFDECL, 1, [struct v4l2_buffer missing])
+    fi
+  fi
 ])
 
 dnl Next, check for the optional libraries:
@@ -656,7 +693,13 @@ GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
 dnl *** alsa ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_ALSA, true)
 GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
-   AM_PATH_ALSA(0.9.1, HAVE_ALSA=yes, HAVE_ALSA=no)
+  PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, [
+    HAVE_ALSA="yes"
+    AC_SUBST(ALSA_CFLAGS)
+    AC_SUBST(ALSA_LIBS)
+  ], [
+    AM_PATH_ALSA(0.9.1, HAVE_ALSA="yes", HAVE_ALSA="no")
+  ])
 ])
 
 dnl *** arts ***
@@ -721,6 +764,14 @@ 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 *** dirac ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_DIRAC, true)
+GST_CHECK_FEATURE(DIRAC, [dirac plug-ins], dirac, [
+  PKG_CHECK_MODULES(DIRAC, dirac, HAVE_DIRAC="yes", HAVE_DIRAC="no")
+  AC_SUBST(DIRAC_CFLAGS)
+  AC_SUBST(DIRAC_LIBS)
+])
+
 dnl *** DIVX ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
 GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
@@ -778,6 +829,13 @@ return 0;
   fi
 ])
 
+dnl *** DTS ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_DTS, true)
+GST_CHECK_FEATURE(DTS, [dts library], dtsdec, [
+  GST_CHECK_LIBHEADER(DTS, dts_pic, dts_init, -lm, dts.h, DTS_LIBS="-ldts_pic -lm")
+  AC_SUBST(DTS_LIBS)
+])
+
 dnl *** dvdread ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
 GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
@@ -814,8 +872,14 @@ GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
 dnl **** ESound ****
 translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
 GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
-  AM_PATH_ESD(0.2.12, HAVE_ESD=yes, HAVE_ESD=no)
-  AS_SCRUB_INCLUDE(ESD_CFLAGS)
+  PKG_CHECK_MODULES(ESD, esound >= 0.2.12, [
+    HAVE_ESD="yes"
+    AC_SUBST(ESD_CFLAGS)
+    AC_SUBST(ESD_LIBS)
+  ], [
+    AM_PATH_ESD(0.2.12, HAVE_ESD="yes", HAVE_ESD="no")
+    AS_SCRUB_INCLUDE(ESD_CFLAGS)
+  ])
 ])
 
 dnl **** Free AAC Encoder (FAAC) ****
@@ -829,16 +893,19 @@ GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
 dnl **** Free AAC Decoder (FAAD) ****
 translit(dnm, m, l) AM_CONDITIONAL(USE_FAAD, true)
 GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [
-  GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h, FAAD_LIBS="-lfaad -lm")
-  AC_MSG_CHECKING([Checking for FAAD >= 2])
-  AC_TRY_COMPILE([
+  HAVE_FAAD="yes"
+  GST_CHECK_LIBHEADER(FAAD, faad, faacDecOpen, -lm, faad.h, FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no")
+  if test $HAVE_FAAD = "yes"; then
+    AC_MSG_CHECKING([Checking for FAAD >= 2])
+    AC_TRY_COMPILE([
 #include <faad.h>
 #if !defined(FAAD2_VERSION) || !defined(FAAD_FMT_DOUBLE)
 #error Not faad2
 #endif
-  ], [ return 0; ],
-     [ HAVE_FAAD="yes" && AC_MSG_RESULT(yes)],
-     [ HAVE_FAAD="no"  && AC_MSG_RESULT(no)])
+    ], [ return 0; ],
+       [ HAVE_FAAD="yes" && AC_MSG_RESULT(yes)],
+       [ HAVE_FAAD="no"  && AC_MSG_RESULT(no)])
+  fi;
   AS_SCRUB_INCLUDE(FAAD_CFLAGS)
   AC_SUBST(FAAD_LIBS)
 ])
@@ -896,7 +963,7 @@ GST_CHECK_FEATURE(GSM, [GSM library], gsmenc gsmdec, [
 
 dnl *** Hermes ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_HERMES, true)
-GST_CHECK_FEATURE(HERMES, [Hermes library], colorspace, [
+GST_CHECK_FEATURE(HERMES, [Hermes library], hermescolorspace, [
   GST_CHECK_LIBHEADER(HERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, HERMES_LIBS="-lHermes")
 ], AC_SUBST(HERMES_LIBS))
 
@@ -961,6 +1028,102 @@ GST_CHECK_FEATURE(JPEG, [jpeg], jpegenc jpegdec, [
   AC_SUBST(JPEG_LIBS)
 ])
 
+dnl *** KDE / Qt ***
+
+dnl * Qt *
+
+qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3 /usr/local/qt"
+
+dnl Build include path search path from the list of Qt dirs
+
+qt_include_dirs=""
+for dir in $qt_dirs; do
+  qt_include_dirs="$qt_include_dirs $dir/include $dir"
+done
+
+qt_include_dirs="$qt_include_dirs /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/include/qt3"
+
+for dir in $qt_include_dirs; do
+  if test -r "$dir/qglobal.h"; then
+    qt_include_dir=$dir
+    break
+  fi
+done
+
+for dir in $qt_dirs; do
+  qt_lib_dirs="$qt_lib_dirs $dir/lib $dir"
+done
+
+qt_lib_dirs="$qt_lib_dirs /usr/X11R6/lib /usr/lib"
+
+for dir in $qt_lib_dirs; do
+  try="ls -1 $dir/libqt-mt.*"
+  if test -n "`$try 2> /dev/null`"; then
+    qt_lib_dir=$dir
+    break
+  fi
+done
+
+dnl * KDE *
+
+translit(dnm, m, l) AM_CONDITIONAL(USE_KIO, true)
+GST_CHECK_FEATURE(KIO, [kio], kio, [
+  AC_PATH_PROG(KDE_CONFIG, kde-config, no)
+
+  if test x$KDE_CONFIG != xno; then
+    KDE_PREFIX=`$KDE_CONFIG --prefix`
+  fi
+
+  kde_include_dirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include"
+  kde_lib_dirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
+
+  if test -n "$KDE_PREFIX"; then
+    kde_include_dirs="$KDE_PREFIX/include $KDE_PREFIX/include/kde $KDE_PREFIX $kde_include_dirs"
+    kde_lib_dirs="$KDE_PREFIX/lib $KDE_PREFIX $kde_lib_dirs"
+  fi
+  if test -n "$KDEDIR"; then
+    kde_include_dirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_include_dirs"
+    kde_lib_dirs="$KDEDIR/lib $KDEDIR $kde_lib_dirs"
+  fi
+
+  for dir in $kde_include_dirs; do
+    if test -r "$dir/kglobal.h" && test -r "$dir/kdemacros.h"; then
+      kde_include_dir=$dir
+      break
+    fi
+  done
+
+  for dir in $kde_lib_dirs; do
+    try="ls -1 $dir/libkio.*"
+    if test -n "`$try 2> /dev/null`"; then
+      kde_lib_dir=$dir
+      break
+    fi
+  done
+
+  if test -n $kde_include_dir && test -n $kde_lib_dir; then
+    KIO_CFLAGS="-I$kde_include_dir -I$qt_include_dir"
+    KIO_LIBS="-L$KDE_PREFIX/lib -L$qt_lib_dir -lkio -lqt-mt"
+    AC_LANG_PUSH(C++)
+    save_LIBS="$LIBS"
+    save_CPPFLAGS="$CPPFLAGS"
+    LIBS="$LIBS $KIO_LIBS"
+    CPPFLAGS="$CPPFLAGS $KIO_CFLAGS"
+    AC_TRY_LINK([
+#include <kio/job.h>
+                ], [
+KIO::get ("bla")
+                ], HAVE_KIO="yes", HAVE_KIO="no")
+    LIBS="$save_LIBS"
+    CPPFLAGS="$save_CPPFLAGS"
+    AC_LANG_POP(C++)
+    AC_SUBST(KIO_CFLAGS)
+    AC_SUBST(KIO_LIBS)
+  else
+    HAVE_KIO="false"
+  fi
+])
+
 dnl *** ladspa ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
 GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
@@ -1022,6 +1185,14 @@ GST_CHECK_FEATURE(LIBRFB, [librfb Remote Framebuffer], rfbsrc, [
   AC_SUBST(LIBRFB_LIBS)
 ])
 
+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.1.1, HAVE_LIBVISUAL="yes", HAVE_LIBVISUAL="no")
+  AC_SUBST(LIBVISUAL_CFLAGS)
+  AC_SUBST(LIBVISUAL_LIBS)
+])
+
 dnl *** mad ***
 dnl FIXME: we could use header checks here as well IMO
 translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
@@ -1033,7 +1204,7 @@ GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
     AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
     if test "x$HAVE_MAD" = "xyes"; then
       HAVE_MAD="no"
-      save_libs=$LIBS
+      save_LIBS=$LIBS
       LIBS="-lz"
       AC_CHECK_LIB(id3tag, id3_tag_options, HAVE_MAD="yes" MAD_LIBS="-lmad -lid3tag -lz")
       LIBS=$save_LIBS
@@ -1053,7 +1224,7 @@ GST_CHECK_FEATURE(MIKMOD, [mikmod plug-in], mikmod, [
 dnl *** mpeg2dec ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
 GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
-  PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.3.1,
+  PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.4.0,
       HAVE_MPEG2DEC="yes", HAVE_MPEG2DEC="no")
   AC_SUBST(MPEG2DEC_CFLAGS)
   AC_SUBST(MPEG2DEC_LIBS)
@@ -1223,9 +1394,15 @@ GST_CHECK_FEATURE(SHOUT, [shout plug-in], icecastsend, [
 dnl *** shout2 *** 
 translit(dnm, m, l) AM_CONDITIONAL(USE_SHOUT2, true)
 GST_CHECK_FEATURE(SHOUT2, [shout2 plug-in], shout2send, [
-  AM_PATH_SHOUT2(HAVE_SHOUT2=yes, HAVE_SHOUT2=no)
-  AC_SUBST(SHOUT2_CFLAGS)
-  AC_SUBST(SHOUT2_LIBS)
+  PKG_CHECK_MODULES(SHOUT2, shout >= 2.0, [
+    HAVE_SHOUT2="yes"
+    AC_SUBST(SHOUT2_CFLAGS)
+    AC_SUBST(SHOUT2_LIBS)
+  ], [
+    AM_PATH_SHOUT2(HAVE_SHOUT2="yes", HAVE_SHOUT2="no")
+    AC_SUBST(SHOUT2_CFLAGS)
+    AC_SUBST(SHOUT2_LIBS)
+  ])
 ])
 
 dnl *** sidplay ***
@@ -1248,12 +1425,30 @@ GST_CHECK_FEATURE(LIBPNG, [snapshot plug-in], snapshot, [
   AC_SUBST(LIBPNG_LIBS)
 ])
 
-dnl *** speex ***
+dnl *** speex 1.0.x or >= 1.1.5 (1.1.4 and earlier were not API/ABI compatible ***
+dnl speex_jitter.h is 1.1 only
 translit(dnm, m, l) AM_CONDITIONAL(USE_SPEEX, true)
 GST_CHECK_FEATURE(SPEEX, [speex plug-in], speex, [
-  GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex.h, HAVE_SPEEX="yes" SPEEX_LIBS="-lspeex")
-  AC_SUBST(SPEEX_CFLAGS)
-  AC_SUBST(SPEEX_LIBS)
+  GST_CHECK_LIBHEADER(SPEEX, speex, speex_bits_init, , speex.h, [
+    AC_CHECK_HEADER(speex_jitter.h, [
+      dnl speex 1.1.x :
+      GST_CHECK_LIBHEADER(SPEEX, speex, speex_encode_int, , speex.h, [
+        dnl speex 1.1.5 or + :
+        HAVE_SPEEX="yes"
+        SPEEX_LIBS="-lspeex"
+        AC_SUBST(SPEEX_CFLAGS)
+        AC_SUBST(SPEEX_LIBS)
+      ],[
+        HAVE_SPEEX="no"
+      ])
+    ], [
+      dnl speex 1.0.x :
+      HAVE_SPEEX="yes"
+      SPEEX_LIBS="-lspeex"
+      AC_SUBST(SPEEX_CFLAGS)
+      AC_SUBST(SPEEX_LIBS)
+    ])
+  ])
 ])
 
 dnl *** sndfile ***
@@ -1283,8 +1478,14 @@ GST_CHECK_FEATURE(TARKIN, [tarkinenc tarkindec], tarkin, [
 dnl *** ogg ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_OGG, true)
 GST_CHECK_FEATURE(OGG, [ogg de/encoder], oggdemux oggmux, [
-  XIPH_PATH_OGG(HAVE_OGG=yes, HAVE_OGG=no)
-  AS_SCRUB_INCLUDE(OGG_CFLAGS)
+  PKG_CHECK_MODULES(OGG, ogg >= 1.0, [
+    HAVE_OGG="yes"
+    AC_SUBST(OGG_CFLAGS)
+    AC_SUBST(OGG_LIBS)
+  ], [
+    XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no")
+    AS_SCRUB_INCLUDE(OGG_CFLAGS)
+  ])
 ])
 
 dnl *** theora ***
@@ -1299,11 +1500,16 @@ 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, [
-  XIPH_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
-  AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
+  PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0 vorbisenc >= 1.0, [
+    HAVE_VORBIS="yes"
+  ], [
+    XIPH_PATH_VORBIS(HAVE_VORBIS="yes", HAVE_VORBIS="no")
+    AS_SCRUB_INCLUDE(VORBIS_CFLAGS)
+  ])
 ])
 if test "x$HAVE_VORBIS" = "xyes"; then
   ac_cflags_save="$CFLAGS"
+  dnl FIXME: does this work on non-gcc? -- Company
   CFLAGS="-Wall -Werror"
   AC_COMPILE_IFELSE(
     AC_LANG_PROGRAM([
@@ -1435,7 +1641,9 @@ esac],
 [BUILD_EXAMPLES=yes]) dnl Default value
 
 dnl seeking needs freetype, so check for it here
-AC_CHECK_FT2(2.0.9,HAVE_FT2=yes,HAVE_FT2=no)
+PKG_CHECK_MODULES(FT2, freetype2 >= 2.0.9, HAVE_FT2="yes", [
+  AC_CHECK_FT2(2.0.9, HAVE_FT2="yes", HAVE_FT2="no")
+])
 dnl make the HAVE_FT2 variable available to automake and Makefile.am
 AM_CONDITIONAL(HAVE_FT2, test "x$HAVE_FT2" = "xyes")
 AC_SUBST(FT2_CFLAGS)
@@ -1509,7 +1717,7 @@ 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
+[GST_PACKAGE="GStreamer Plugins"]) dnl Default value
 AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
 AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
 dnl package origin URL
@@ -1520,7 +1728,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.net/"]) dnl Default value
 AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
 AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
 
@@ -1530,14 +1738,6 @@ dnl #########################
 
 AC_CONFIG_FILES(
 Makefile
-pkgconfig/gstreamer-libs.pc
-pkgconfig/gstreamer-libs-uninstalled.pc
-pkgconfig/gstreamer-play.pc
-pkgconfig/gstreamer-play-uninstalled.pc
-pkgconfig/gstreamer-interfaces.pc
-pkgconfig/gstreamer-interfaces-uninstalled.pc
-gst-libs/gst/gconf/gstreamer-gconf.pc
-gst-libs/gst/gconf/gstreamer-gconf-uninstalled.pc
 gst-plugins.spec
 gst/Makefile
 gst/ac3parse/Makefile
@@ -1555,11 +1755,11 @@ gst/debug/Makefile
 gst/deinterlace/Makefile
 gst/effectv/Makefile
 gst/festival/Makefile
+gst/ffmpegcolorspace/Makefile
 gst/filter/Makefile
 gst/flx/Makefile
 gst/goom/Makefile
-gst/id3/Makefile
-gst/intfloat/Makefile
+gst/interleave/Makefile
 gst/law/Makefile
 gst/level/Makefile
 gst/matroska/Makefile
@@ -1574,7 +1774,6 @@ gst/mpegstream/Makefile
 gst/modplug/Makefile
 gst/modplug/libmodplug/Makefile
 gst/monoscope/Makefile
-gst/oneton/Makefile
 gst/overlay/Makefile
 gst/passthrough/Makefile
 gst/playondemand/Makefile
@@ -1612,13 +1811,14 @@ sys/cdrom/Makefile
 sys/dxr3/Makefile
 sys/glsink/Makefile
 sys/oss/Makefile
+sys/osxaudio/Makefile
 sys/qcam/Makefile
+sys/sunaudio/Makefile
 sys/v4l/Makefile
 sys/v4l2/Makefile
 sys/vcd/Makefile
 sys/ximage/Makefile
 sys/xvimage/Makefile
-sys/xvideo/Makefile
 ext/Makefile
 ext/a52dec/Makefile
 ext/aalib/Makefile
@@ -1627,7 +1827,9 @@ ext/arts/Makefile
 ext/artsd/Makefile
 ext/audiofile/Makefile
 ext/cdparanoia/Makefile
+ext/dirac/Makefile
 ext/divx/Makefile
+ext/dts/Makefile
 ext/dv/Makefile
 ext/dvdread/Makefile
 ext/dvdnav/Makefile
@@ -1642,6 +1844,7 @@ ext/hermes/Makefile
 dnl ext/http/Makefile
 ext/jack/Makefile
 ext/jpeg/Makefile
+ext/kio/Makefile
 ext/ladspa/Makefile
 ext/lame/Makefile
 ext/ivorbis/Makefile
@@ -1650,6 +1853,7 @@ ext/libcaca/Makefile
 ext/libfame/Makefile
 ext/libpng/Makefile
 ext/librfb/Makefile
+ext/libvisual/Makefile
 ext/mad/Makefile
 ext/mikmod/Makefile
 ext/mpeg2dec/Makefile
@@ -1705,10 +1909,25 @@ testsuite/spider/Makefile
 testsuite/alsa/Makefile
 testsuite/Makefile
 tools/Makefile
-tools/gst-launch-ext
 gconf/Makefile
+gconf/gstreamer.schemas
 pkgconfig/Makefile
+pkgconfig/gstreamer-gconf.pc
+pkgconfig/gstreamer-gconf-uninstalled.pc
+pkgconfig/gstreamer-interfaces.pc
+pkgconfig/gstreamer-interfaces-uninstalled.pc
+pkgconfig/gstreamer-libs.pc
+pkgconfig/gstreamer-libs-uninstalled.pc
+pkgconfig/gstreamer-media-info.pc
+pkgconfig/gstreamer-media-info-uninstalled.pc
+pkgconfig/gstreamer-play.pc
+pkgconfig/gstreamer-play-uninstalled.pc
+pkgconfig/gstreamer-plugins.pc
+pkgconfig/gstreamer-plugins-uninstalled.pc
 po/Makefile.in
+common/Makefile
+common/m4/Makefile
+m4/Makefile
 )
 AC_OUTPUT