try this one
[platform/upstream/gstreamer.git] / configure.base
index 874767a..f1ba986 100644 (file)
@@ -42,16 +42,16 @@ AC_SUBST(GST_REVISION)
 AC_SUBST(GST_AGE)
 AC_SUBST(GST_LIBVERSION)
 
-
 AM_MAINTAINER_MODE
 
+dnl you need automake 1.5 for AM_PROG_AS to work !
+dnl we moved AM_PROG_AS up before CC, maybe that helps the substition ?
+AM_PROG_AS
 AC_PROG_CC
+AM_PROG_CC_STDC
 AC_PROG_CXX
 AC_PROG_CXXCPP
 AC_ISC_POSIX
-SUBSTFOR configure.ac:AC_HEADER_STDC([])
-SUBSTFOR configure.in:AC_STDC_HEADERS
-AC_ARG_PROGRAM
 
 dnl We disable static building for development, for time savings
 dnl *NOTE*: dnl this line before release, so release does static too
@@ -59,7 +59,8 @@ AM_DISABLE_STATIC
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 
-CFLAGS=""
+SUBSTFOR configure.ac:AC_HEADER_STDC([])
+SUBSTFOR configure.in:AC_STDC_HEADERS
 
 dnl This is used for the -config script...
 builddir=`pwd`
@@ -83,6 +84,15 @@ else
   HAVE_NASM="yes"
 fi
 
+dnl fix pkg-config's broken default search path
+if test -z $PKG_CONFIG_PATH; then
+  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
+fi
+export PKG_CONFIG_PATH
+
+dnl Check for pkgconfig
+AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, true, false)
+
 dnl check for gtkdoc
 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
 AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scanobj, :, false)
@@ -139,6 +149,10 @@ case "x${target_cpu}" in
               AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;;
   xsparc*)    HAVE_CPU_SPARC=yes
               AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a PPC]) ;;
+  xmips*)     HAVE_CPU_MIPS=yes
+              AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;;
+  xhppa*)     HAVE_CPU_HPPA=yes
+              AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;;
 esac
 
 dnl Determine endianness
@@ -163,7 +177,31 @@ HAVE_LIBMMX="no"
 AC_MSG_RESULT(no)
 )
 
+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_CFLAGS="$GST_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+],
+[
+AC_MSG_RESULT(no)
+],
+[
+AC_MSG_RESULT(no)
+])
 
 dnl Check for essential libraries first:
 dnl ====================================
@@ -172,51 +210,61 @@ dnl Check for glib2
 GST_CHECK_FEATURE(GLIB2, [use of glib-2.0 and GObject], , [
   PKG_CHECK_MODULES(GLIB2, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0,
     HAVE_GLIB2=yes,HAVE_GLIB2=no)
-  AC_SUBST(GLIB2_LIBS)
-  AC_SUBST(GLIB2_CFLAGS)
+  GLIB_LIBS=$GLIB2_LIBS
+  GLIB_CFLAGS=$GLIB2_CFLAGS
+  AC_SUBST(GLIB_LIBS)
+  AC_SUBST(GLIB_CFLAGS)
 ], disabled, [
-  CORE_LIBS="$CORE_LIBS $GLIB2_LIBS"
-  CORE_CFLAGS="$CORE_CFLAGS $GLIB2_CFLAGS"
-
   AC_DEFINE(USE_GLIB2)
-  GST_DEFINE_CFLAGS="$GST_DEFINE_CFLAGS -DUSE_GLIB2"
+  GST_CFLAGS="$GST_CFLAGS -DUSE_GLIB2"
 ])
 AC_SUBST(USE_GLIB2)
 
-dnl FIXME: check for gtk2 and gnome2 - these conditionals are currently
-dnl always false.
-AM_CONDITIONAL(USE_GTK2, test "x$USE_GTK2" = "xyes")
-AC_SUBST(USE_GTK2)
-AM_CONDITIONAL(USE_GNOME2, test "x$USE_GNOME2" = "xyes")
-AC_SUBST(USE_GNOME2)
-
 if test x$USE_GLIB2 = xno; then
+  GST_PKG_DEPS="glib >= 1.2.0, gtk+ >= 1.2.0"
+  
   dnl Check for glib and gtk
   AM_PATH_GLIB(1.2.0,,
               AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
               glib gmodule gthread)
   AM_PATH_GTK(1.2.0,,
               AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?))
+  HAVE_GTK=yes
 
-  CORE_LIBS="$CORE_LIBS $GLIB_LIBS $GTK_LIBS"
-  CORE_CFLAGS="$CORE_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS"
+  GLIB_LIBS="$GLIB_LIBS $GTK_LIBS"
+  GLIB_CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS"
+else
+  GST_PKG_DEPS="glib-2.0 gobject-2.0 gmodule-2.0 gthread-2.0"
+  
+  PKG_CHECK_MODULES(GTK2, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
+
+  GTK_FLAGS=$GTK2_CFLAGS
+  GTK_LIBS=$GTK2_LIBS
+
+  dnl FIXME: check for  gnome2 - this conditional is currently
+  dnl always false.
+  AM_CONDITIONAL(USE_GNOME2, test "x$USE_GNOME2" = "xyes")
+  AC_SUBST(USE_GNOME2)
 fi
 
+AC_SUBST(GST_PKG_DEPS)
+AC_SUBST(GTK_LIBS)
+AC_SUBST(GTK_CFLAGS)
 
 dnl Check for libxml
-AC_PATH_PROG(XML_CONFIG, xml-config, no)
+dnl Thomas tries to convert this to pkg-config
+PKG_CHECK_MODULES(XML, libxml >= 1.8.1, XML_CONFIG=yes, XML_CONFIG=no)
+dnl AC_PATH_PROG(XML_CONFIG, xml-config, no)
 if test x$XML_CONFIG = xno; then
   AC_MSG_ERROR(Couldn't find xml-config)
 fi
-XML_LIBS=`xml-config --libs`
-XML_CFLAGS=`xml-config --cflags`
-AC_CHECK_LIB(xml, xmlDocGetRootElement, ,
-  [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
-  $XML_LIBS)
+dnl XML_LIBS="`xml-config --libs`"
+dnl XML_CFLAGS="`xml-config --cflags`"
+dnl AC_CHECK_LIB(xml, xmlDocGetRootElement, :,
+dnl  [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
+dnl  $XML_LIBS)
 AC_SUBST(XML_LIBS)
 AC_SUBST(XML_CFLAGS)
-CORE_LIBS="$CORE_LIBS $XML_LIBS"
-CORE_CFLAGS="$CORE_CFLAGS $XML_CFLAGS"
 
 
 dnl ==========================================================================
@@ -262,7 +310,6 @@ dnl AC_CHECK_LIB(artsflow, convert_stereo_2float_i16le, :, HAVE_ARTS=no, $LIBS)
 
 dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
 dnl FIXME: ensure only suitable flags result from artsc-config --cflags
-CPPFLAGS="$CPPFLAGS $ARTS_CFLAGS"
 AC_CHECK_HEADER(artsflow.h, :, HAVE_ARTS=no)
 
 SUBSTFOR configure.ac:AC_LANG_POP(C++)
@@ -301,15 +348,13 @@ GST_CHECK_FEATURE(LIBXMMS, [xmms plugin], xmms, [
 
 dnl Check for alsa
 GST_CHECK_FEATURE(ALSA, [alsa plugins], gstalsa, [
-  HAVE_ALSA=yes
-  AM_PATH_ALSA(0.9.0, HAVE_ALSA=no; AC_MSG_WARN(Alsa 0.9.x not yet supported),:)
-  if test x$HAVE_ALSA = xno; then
-    ALSA_CFLAGS=
-    ALSA_LIBS=
-  else
-    AM_PATH_ALSA(0.5.0, :, HAVE_ALSA=no)
-  fi
+  AM_PATH_ALSA(0.9.0, HAVE_ALSA=yes, HAVE_ALSA=no)
 ])
+if test x$HAVE_ALSA = xno; then
+  unset USE_ALSA
+  ALSA_CFLAGS=
+  ALSA_LIBS=
+fi
 
 dnl Check for libaudiofile
 GST_CHECK_FEATURE(LIBAUDIOFILE, [use gdk pixbuf], afsink afsrc, [
@@ -359,25 +404,19 @@ if test x$USE_GLIB2 = xyes; then
   LIBGLADE_GNOME_CFLAGS=
   AC_MSG_WARN(libglade disabled for glib2.0)
 else
-  AC_PATH_PROG(LIBGLADE_CONFIG_PATH, libglade-config, no)
-  if test x$LIBGLADE_CONFIG_PATH = xno; then
+  AM_PATH_LIBGLADE(HAVE_LIBGLADE_GNOME="yes", HAVE_LIBGLADE_GNOME="no", gnome)
+  if test x$HAVE_LIBGLADE_GNOME = xno; then
     AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
     LIBGLADE_GNOME_LIBS=
     LIBGLADE_GNOME_CFLAGS=
   else
-    LIBGLADE_GNOME_LIBS=`libglade-config --libs gnome`
-    LIBGLADE_GNOME_CFLAGS=`libglade-config --cflags gnome`
-    libglade_save_CFLAGS="$CFLAGS"
-    libglade_save_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $LIBGLADE_GNOME_CFLAGS $GTK_CFLAGS"
-    LIBS="$LIBS $LIBGLADE_GNOME_LIBS $GTK_LIBS"
-    AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
-               HAVE_LIBGLADE_GNOME="yes",
-               AC_MSG_WARN(
-      [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
-            )
-    CFLAGS="$libglade_save_CFLAGS"
-    LIBS="$libglade_save_LIBS"
+    LIBGLADE_GNOME_LIBS=$LIBGLADE_LIBS
+    LIBGLADE_GNOME_CFLAGS=$LIBGLADE_CFLAGS
+        AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
+                HAVE_LIBGLADE_GNOME="yes"
+                AC_MSG_WARN(
+        [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
+               )
   fi
 fi
 AC_SUBST(LIBGLADE_GNOME_LIBS)
@@ -488,6 +527,18 @@ AC_CHECK_LIB(mad, mad_decoder_finish,
   HAVE_LIBMAD=no,
 )
 
+dnl Check for libmikmod
+AC_MSG_CHECKING(Mikmod library)
+AC_CHECK_LIB(mikmod, MikMod_Init,
+  HAVE_LIBMIKMOD=yes
+  AC_DEFINE(HAVE_LIBMIKMOD, 1, [Define if libmikmod is available]),
+  AC_MSG_WARN(
+***** NOTE: These plugins won't be built: mikmod
+)
+  HAVE_LIBMIKMOD=no,
+)
+
+
 dnl Check for libvorbis
 AC_MSG_CHECKING(Vorbis library)
 AC_CHECK_LIB(vorbis, ogg_sync_init,
@@ -534,7 +585,7 @@ AC_CHECK_HEADER(gsm.h, :,
 AC_SUBST(GSM_CFLAGS)
 AC_SUBST(GSM_LIBS)
 
-if test "x$HAVE_LIBGSM" == "xyes"; then
+if test "x$HAVE_LIBGSM" = "xyes"; then
   AC_DEFINE(HAVE_LIBGSM, 1, [Define if GSM library is available])
 else
   AC_MSG_WARN(
@@ -565,20 +616,29 @@ AC_MSG_CHECKING(mpeg2dec library)
 AC_CHECK_LIB(mpeg2, mpeg2_init, HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no, )
 AC_CHECK_HEADER(mpeg2dec/mpeg2.h, :, HAVE_MPEG2DEC=no)
 
+dnl Check for a52dec
+AC_MSG_CHECKING(a52dec library)
+AC_CHECK_LIB(a52, a52_init, HAVE_A52DEC=yes, HAVE_A52DEC=no, -lm)
+AC_CHECK_HEADER(a52dec/a52.h, :, HAVE_A52DEC=no)
+
 dnl Check for sidplay
 AC_PATH_LIBSIDPLAY
 
-dnl Check for flac
+dnl Check for FLAC
+dnl thomas : checking for compile with main instead of actual function,
+dnl since that made autoconf break (for version 2.13)
 AC_MSG_CHECKING(FLAC library)
-AC_CHECK_LIB(FLAC, FLAC__stream_decoder_new, HAVE_FLAC=yes, HAVE_FLAC=no, -lm)
-AC_CHECK_HEADER(FLAC/all.h, :, HAVE_FLAC=no)
+AC_CHECK_LIB(FLAC, main, HAVE_FLACLIB=yes, HAVE_FLACLIB=no, -lm)
+AC_CHECK_HEADER(FLAC/all.h, :, HAVE_FLACLIB=no)
 
 dnl Check for librtp
 AC_MSG_CHECKING(rtp library)
 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_LIBRTP=yes, HAVE_LIBRTP=no, $GLIB_LIBS $GLIB_CFLAGS)
-AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
-AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
-AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
+
+dnl FIXME can somebody add $GLIB_CFLAGS to the CFLAGS for these next checks?
+dnl AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
+dnl AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
+dnl AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
 
 dnl Check for libraw1394
 AC_MSG_CHECKING(raw1394 library)
@@ -603,44 +663,15 @@ AC_MSG_CHECKING(openquicktime)
 AC_CHECK_LIB(openquicktime, quicktime_init, HAVE_LIBOPENQUICKTIME=yes, HAVE_LIBOPENQUICKTIME=no, )
 AC_CHECK_HEADER(openquicktime/openquicktime.h, :, HAVE_LIBOPENQUICKTIME=no)
 
-
-dnl check if css-auth.c exists (FIXME)
-AC_MSG_CHECKING(DVD CSS code)
-if test -f plugins/dvdsrc/css-auth.c
-then
-  AC_MSG_RESULT(yes)
-  HAVE_CSSAUTH="yes"
-else
-  AC_MSG_RESULT(no)
-  HAVE_CSSAUTH="no"
-fi
+dnl Check for libdvdread
+AC_MSG_CHECKING(libdvdread)
+AC_CHECK_LIB(dvdread, DVDOpen, HAVE_LIBDVDREAD=yes, HAVE_LIBDVDREAD=no, )
+AC_CHECK_HEADER(dvdread/dvd_reader.h, :, HAVE_LIBDVDREAD=no)
 
 dnl Check for SDL library
-AC_MSG_CHECKING(SDL library)
-HAVE_LIBSDL=yes
-if sdl-config --libs > /dev/null 2>&1; then
-  SDL_VERSION=`sdl-config --version`
-  AC_MSG_RESULT([found (version $SDL_VERSION)])
-  SDL_LIBS="`sdl-config --libs`"
-  SDL_CFLAGS="`sdl-config --cflags`"
-  AC_CHECK_LIB(SDL, SDL_Init, :, HAVE_LIBSDL=no, $SDL_LIBS)
-  dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
-  dnl Assume only suitable flags result from artsc-config --cflags
-  sdlcheck_save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
-  AC_CHECK_HEADER(SDL.h, :, HAVE_LIBSDL=no)
-  CPPFLAGS="$sdlcheck_save_CPPFLAGS"
-  AC_CHECK_LIB(SDL, SDL_CreateYUVOverlay, :, HAVE_LIBSDL=no, $SDL_LIBS)
-else
-  AC_MSG_RESULT(not found)
-  HAVE_LIBSDL=no
-  SDL_LIBS=
-  SDL_CFLAGS=
-fi
-AC_SUBST(SDL_LIBS)
-AC_SUBST(SDL_CFLAGS)
+AM_PATH_SDL( ,HAVE_LIBSDL=yes, HAVE_LIBSDL=no)
 
-if test "x$HAVE_LIBSDL" == "xno"; then
+if test "x$HAVE_LIBSDL" = "xno"; then
   AC_MSG_WARN(
 ***** NOTE: These plugins won't be built: sdlvideosink
 )
@@ -744,8 +775,12 @@ AC_ARG_ENABLE(profiling,
 esac], 
 [USE_PROFILING=no]) dnl Default value
 
-dnl Default value
-GST_CONFIG_DIR=${sysconfdir}/gstreamer
+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_CONFIG_DIR=$builddir
+else
+  GST_CONFIG_DIR=/etc/gstreamer
+fi
 AC_ARG_WITH(configdir,
 [  --with-configdir             specify path to use for configdir],
 [case "${withval}" in
@@ -833,8 +868,9 @@ GST_SUBSYSTEM_DISABLE(TYPEFIND,[typefind plugin],)
 GST_SUBSYSTEM_DISABLE(AUTOPLUG,[autoplugger subsystem])
 GST_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
 GST_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem])
+GST_SUBSYSTEM_DISABLE(REGISTRY,[plugin registry])
 
-GST_DEFINE_CFLAGS="$GST_DEFINE_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
+GST_CFLAGS="$GST_CFLAGS $GST_SUBSYSTEM_DISABLE_DEFINES"
 
 
 dnl ################################################
@@ -860,17 +896,21 @@ 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
-  CFLAGS="$CFLAGS -g"
-fi
+dnl if test "x$USE_DEBUG" = xyes; then
+dnl   CFLAGS="$CFLAGS -g"
+dnl fi
 
 if test "x$USE_PROFILING" = xyes; then
-  CFLAGS="$CFLAGS -pg"
+dnl  CFLAGS="$CFLAGS -pg -fprofile-arcs"
   FOMIT_FRAME_POINTER=""
 else
   FOMIT_FRAME_POINTER="-fomit-frame-pointer"
 fi
 
+dnl
+dnl AC_SUBST(FOMIT_FRAME_POINTER)
+dnl
+
 if test "x$HAVE_LIBXV" = xyes; then
   AC_DEFINE(HAVE_LIBXV)
 fi
@@ -887,6 +927,10 @@ if test "x$HAVE_LIBMAD" = xyes; then
   AC_DEFINE(HAVE_LIBMAD)
 fi
 
+if test "x$HAVE_LIBMIKMOD" = xyes; then
+  AC_DEFINE(HAVE_LIBMIKMOD)
+fi
+
 if test "x$HAVE_VORBIS" = xyes; then
   AC_DEFINE(HAVE_VORBIS)
 fi
@@ -903,8 +947,8 @@ if test "x$HAVE_LIBHERMES" = "xyes"; then
   AC_DEFINE(HAVE_LIBHERMES)
 fi
 
-if test "x$HAVE_CSSAUTH" = xyes; then
-  AC_DEFINE(HAVE_CSSAUTH)
+if test "x$HAVE_LIBDVDREAD" = xyes; then
+  AC_DEFINE(HAVE_LIBDVDREAD)
 fi
 
 if test "x$HAVE_LINUX_CDROM" = xyes; then
@@ -919,14 +963,22 @@ if test "x$HAVE_MPEG2DEC" = xyes; then
   AC_DEFINE(HAVE_MPEG2DEC)
 fi
 
-if test "x$HAVE_FLAC" = xyes; then
-  AC_DEFINE(HAVE_FLAC)
+if test "x$HAVE_A52DEC" = xyes; then
+  AC_DEFINE(HAVE_A52DEC)
+fi
+
+if test "x$HAVE_FLACLIB" = xyes; then
+  AC_DEFINE(HAVE_FLACLIB)
 fi
 
 if test "x$HAVE_LIBGSM" = xyes; then
   AC_DEFINE(HAVE_LIBGSM)
 fi
 
+if test "x$HAVE_LIBRTP" = xyes; then
+  AC_DEFINE(HAVE_LIBRTP)
+fi
+
 dnl #############################
 dnl # Set automake conditionals #
 dnl #############################
@@ -943,9 +995,10 @@ AM_CONDITIONAL(HAVE_ATOMIC_H,       test "x$USE_ATOMIC_H" = "xyes")
 AM_CONDITIONAL(HAVE_OSS,            test "x$HAVE_OSS" = "xyes")
 AM_CONDITIONAL(HAVE_XAUDIO,         test "x$HAVE_XAUDIO" = "xyes")
 AM_CONDITIONAL(HAVE_LIBMAD,         test "x$HAVE_LIBMAD" = "xyes")
+AM_CONDITIONAL(HAVE_LIBMIKMOD,      test "x$HAVE_LIBMIKMOD" = "xyes")
 AM_CONDITIONAL(HAVE_LINUX_CDROM,    test "x$HAVE_LINUX_CDROM" = "xyes")
 AM_CONDITIONAL(HAVE_LINUX_VIDEODEV, test "x$HAVE_LINUX_VIDEODEV" = "xyes")
-AM_CONDITIONAL(HAVE_CSSAUTH,        test "x$HAVE_CSSAUTH" = "xyes")
+AM_CONDITIONAL(HAVE_LIBDVDREAD,     test "x$HAVE_LIBDVDREAD" = "xyes")
 AM_CONDITIONAL(HAVE_VORBIS,         test "x$HAVE_VORBIS" = "xyes")
 AM_CONDITIONAL(HAVE_LIBJPEG,        test "x$HAVE_LIBJPEG" = "xyes")
 AM_CONDITIONAL(HAVE_LIBSDL,         test "x$HAVE_LIBSDL" = "xyes")
@@ -954,6 +1007,7 @@ AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
 AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes")
 AM_CONDITIONAL(HAVE_GNOME,          test "x$HAVE_GNOME" = "xyes")
 AM_CONDITIONAL(HAVE_LIBXV,          test "x$HAVE_LIBXV" = "xyes")
+AM_CONDITIONAL(HAVE_GTK,            test "x$HAVE_GTK" = "xyes")
 AM_CONDITIONAL(HAVE_GTK_DOC,        $HAVE_GTK_DOC)
 AM_CONDITIONAL(BUILD_DOCS,          test "x$BUILD_DOCS" = "xyes")
 AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
@@ -968,7 +1022,13 @@ AM_CONDITIONAL(HAVE_CDPARANOIA,     test "x$HAVE_CDPARANOIA" = "xyes")
 AM_CONDITIONAL(HAVE_LIBLAME,        test "x$HAVE_LIBLAME" = "xyes")
 AM_CONDITIONAL(HAVE_LIBSHOUT,       test "x$HAVE_LIBSHOUT" = "xyes")
 AM_CONDITIONAL(HAVE_MPEG2DEC,       test "x$HAVE_MPEG2DEC" = "xyes")
-AM_CONDITIONAL(HAVE_FLAC,                  test "x$HAVE_FLAC" = "xyes")
+AM_CONDITIONAL(HAVE_A52DEC,         test "x$HAVE_A52DEC" = "xyes")
+dnl thomas : the next line gives errors, this is how it is in CVS
+dnl AM_CONDITIONAL(HAVE_FLAC,              test "x$HAVE_FLAC" = "xyes")
+dnl thomas : the next line gives errors as well, I commented it
+dnl AM_CONDITIONAL(HAVE_LAC,               test "x$HAVE_FAC" = "xyes")
+dnl thomas: the next line doesn't give errors
+AM_CONDITIONAL(HAVE_FLACLIB,        test "x$HAVE_FLACLIB" = "xyes")
 AM_CONDITIONAL(HAVE_LIBRTP,         test "x$HAVE_LIBRTP" = "xyes")
 AM_CONDITIONAL(HAVE_ARTS,           test "x$HAVE_ARTS" = "xyes")
 AM_CONDITIONAL(HAVE_RAW1394,        test "x$HAVE_RAW1394" = "xyes")
@@ -1008,21 +1068,6 @@ PLUGINS_BUILDDIR=${builddir}
 AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR,"$PLUGINS_BUILDDIR")
 AC_SUBST(PLUGINS_BUILDDIR)
 
-
-
-dnl ##############################
-dnl # Set up the defaults cflags #
-dnl ##############################
-dnl CC="kgcc"
-if test "x$USE_PROFILING" = xyes; then
-  CFLAGS="$CORE_CFLAGS $CFLAGS -Wall"
-else
-  CFLAGS="$CORE_CFLAGS $CFLAGS -O6 -Wall"
-fi
-LIBS="$CORE_LIBS $LIBS"
-AC_SUBST(CORE_LIBS)
-AC_SUBST(CORE_CFLAGS)
-
 dnl Vars for everyone else
 GST_LIBS="\$(top_builddir)/gst/libgst.la"
 GST_CFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include"
@@ -1030,29 +1075,11 @@ AC_SUBST(GST_LIBS)
 AC_SUBST(GST_CFLAGS)
 
 dnl Private vars for libgst only
-LIBGST_LIBS="$LIBS"
-LIBGST_CFLAGS="$CFLAGS $GST_CFLAGS"
+LIBGST_CFLAGS="$GST_CFLAGS"
 AC_SUBST(LIBGST_LIBS)
 AC_SUBST(LIBGST_CFLAGS)
 
-dnl CFLAGS for everyone else
-CFLAGS="$GST_CFLAGS $CFLAGS"
-
-dnl Needed to make automake 1.4g happy.
-dnl FIXME: find as properly, rather than just using CC
-AS="\$(CC)"
-
-dnl Having to AC_SUBST these is messy, but doesn't seem to do any harm.
-dnl I'm not sure whether it's really necessary, but it removes some warnings
-dnl when automake 1.4g runs, and may be beneficial elsewhere.
-AC_SUBST(LIBS)
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(AS)
-AC_SUBST(ASFLAGS)
-
-AC_SUBST(GST_DEFINE_CFLAGS)
+AC_SUBST(GST_CFLAGS)
 
 dnl #############################
 dnl # Configure the subpackages #
@@ -1084,6 +1111,9 @@ dnl #########################
 dnl # Make the output files #
 dnl #########################
 
+dnl until ffmpeg is handled by configure plugins/ffmpeg/Makefile
+dnl components/bonobo-gstmediaplay/Makefile
+dnl someone should fix this test/misc/Makefile
 SUBSTFOR configure.ac:AC_OUTPUT(
 SUBSTFOR configure.ac:Makefile
 SUBSTFOR configure.in:AC_OUTPUT([Makefile
@@ -1093,13 +1123,18 @@ gst/gstversion.h
 gst/types/Makefile
 gst/elements/Makefile
 gst/autoplug/Makefile
+gst/schedulers/Makefile
 libs/Makefile
 libs/riff/Makefile
 libs/getbits/Makefile
 libs/putbits/Makefile
 libs/idct/Makefile
 libs/audio/Makefile
+libs/bytestream/Makefile
+libs/control/Makefile
+libs/resample/Makefile
 plugins/Makefile
+plugins/a52dec/Makefile
 plugins/aasink/Makefile
 plugins/alsa/Makefile
 plugins/au/Makefile
@@ -1120,6 +1155,7 @@ plugins/mp3decode/mad/Makefile
 plugins/mp3decode/parse/Makefile
 plugins/mp3encode/Makefile
 plugins/mp3encode/lame/Makefile
+plugins/mikmod/Makefile
 plugins/mpeg2/Makefile
 plugins/mpeg2/parse/Makefile
 plugins/mpeg2/ac3parse/Makefile
@@ -1141,10 +1177,8 @@ plugins/mpeg1video/Makefile
 plugins/mpeg1video/parse/Makefile
 plugins/oss/Makefile
 plugins/rtp/Makefile
-plugins/rtp/rtpsend/Makefile
 plugins/mulaw/Makefile
 plugins/alaw/Makefile
-plugins/ffmpeg/Makefile
 plugins/filters/Makefile
 plugins/filters/smooth/Makefile
 plugins/filters/median/Makefile
@@ -1162,6 +1196,7 @@ plugins/filters/cutter/Makefile
 plugins/filters/deinterlace/Makefile
 plugins/filters/volume/Makefile
 plugins/filters/speed/Makefile
+plugins/filters/playondemand/Makefile
 plugins/gnomevfs/Makefile
 plugins/icecast/Makefile
 plugins/icecast/icecastsend/Makefile
@@ -1197,17 +1232,25 @@ plugins/gsm/Makefile
 plugins/1394/Makefile
 plugins/sdlsink/Makefile
 plugins/dv/Makefile
+plugins/synthesis/Makefile
+plugins/synthesis/sinesrc/Makefile
+plugins/silence/Makefile
 gstplay/Makefile
-dnl components/bonobo-gstmediaplay/Makefile
 test/Makefile
 test/xml/Makefile
 test/bindings/Makefile
+test/memchunk/Makefile
+test/events/Makefile
 tests/Makefile
 tests/sched/Makefile
 tests/eos/Makefile
+tests/muxing/Makefile
 testsuite/Makefile
+testsuite/bytestream/Makefile
 testsuite/capsnego/Makefile
 testsuite/refcounting/Makefile
+testsuite/plugin/Makefile
+testsuite/threads/Makefile
 tests/nego/Makefile
 examples/Makefile
 examples/autoplug/Makefile