]> git.sesse.net Git - vlc/blobdiff - configure
* ./modules/audio_output/oss.c: we spare a variable by using p_aout->b_die
[vlc] / configure
index 64bed0459e3cd9095ccbdbf4a696335f25a613ec..d443df75b9f9015e90437736493d3cb7cb0a8fde 100755 (executable)
--- a/configure
+++ b/configure
@@ -27,7 +27,7 @@ ac_help="$ac_help
 ac_help="$ac_help
   --disable-optimizations disable compiler optimizations (default enabled)"
 ac_help="$ac_help
-  --disable-altivec       disable altivec optimizations (default enabled on PPC)"
+  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)"
 ac_help="$ac_help
   --enable-debug          debug mode (default disabled)"
 ac_help="$ac_help
@@ -45,9 +45,25 @@ ac_help="$ac_help
 ac_help="$ac_help
     --with-dvdread=PATH   libdvdread headers and libraries"
 ac_help="$ac_help
-  --enable-vcd            VCD support for Linux and MacOS X (default enabled)"
+  --enable-dvdplay        dvdplay input module (default disabled)"
+ac_help="$ac_help
+    --with-dvdplay=PATH   libdvdplay headers and libraries"
+ac_help="$ac_help
+  --enable-dvbpsi        dvbpsi ts demux module (default disabled)"
+ac_help="$ac_help
+    --with-dvbpsi=PATH    libdvbpsi headers and libraries"
+ac_help="$ac_help
+    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking"
+ac_help="$ac_help
+  --enable-v4l            Video4Linux input support (default disabled)"
+ac_help="$ac_help
+  --enable-vcd            VCD support for Linux, FreeBSD and MacOS X (default enabled)"
 ac_help="$ac_help
   --enable-satellite      satellite card support (default disabled)"
+ac_help="$ac_help
+  --enable-avi            AVI demux module (default enabled)"
+ac_help="$ac_help
+  --enable-aac            AAC demux module (default enabled)"
 ac_help="$ac_help
 Codec plugins:"
 ac_help="$ac_help
@@ -55,9 +71,33 @@ ac_help="$ac_help
 ac_help="$ac_help
     --with-mad=PATH       path to libmad"
 ac_help="$ac_help
-  --enable-a52            AC3 support with liba52 (default enabled)"
+    --with-mad-tree=PATH  mad tree for static linking"
+ac_help="$ac_help
+  --enable-ffmpeg         ffmpeg codec (default disabled)"
+ac_help="$ac_help
+    --with-ffmpeg=PATH    path to ffmpeg installation"
+ac_help="$ac_help
+    --with-ffmpeg-tree=PATH ffmpeg tree for static linking"
+ac_help="$ac_help
+  --enable-faad           faad codec (default disabled)"
+ac_help="$ac_help
+    --with-faad=PATH      path to faad installation"
+ac_help="$ac_help
+    --with-faad-tree=PATH faad tree for static linking"
+ac_help="$ac_help
+  --enable-mp4            MP4 demux module (default enabled)"
+ac_help="$ac_help
+  --enable-a52            A/52 support with liba52 (default enabled)"
+ac_help="$ac_help
+    --with-a52=PATH       a52 headers and libraries"
+ac_help="$ac_help
+    --with-a52-tree=PATH  a52dec tree for static linking "
+ac_help="$ac_help
+  --enable-cinepak        Cinepak decoder (default enabled)"
 ac_help="$ac_help
   --enable-vorbis         Ogg/Vorbis decoder support (default enabled)"
+ac_help="$ac_help
+  --enable-dv             DV decoder support (default disabled)"
 ac_help="$ac_help
 Video plugins:"
 ac_help="$ac_help
@@ -71,7 +111,7 @@ ac_help="$ac_help
 ac_help="$ac_help
   --enable-directx        Win32 DirectX support (default enabled on Win32)"
 ac_help="$ac_help
-    --with-directx=PATH   Win32 DirectX headers and libraries"
+    --with-directx=PATH   Win32 DirectX headers"
 ac_help="$ac_help
   --enable-fb             Linux framebuffer support (default enabled on Linux)"
 ac_help="$ac_help
@@ -89,7 +129,7 @@ ac_help="$ac_help
 ac_help="$ac_help
 Audio plugins:"
 ac_help="$ac_help
-  --enable-dsp            Linux /dev/dsp support (enabled on Linux)"
+  --enable-oss            Linux OSS /dev/dsp support (enabled on Linux)"
 ac_help="$ac_help
   --enable-esd            Esound library support (default disabled)"
 ac_help="$ac_help
@@ -104,28 +144,36 @@ ac_help="$ac_help
   --enable-gtk            Gtk+ support (default enabled)"
 ac_help="$ac_help
     --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)"
+ac_help="$ac_help
+  --enable-familiar       Familiar Gtk+ support (default disabled)"
+ac_help="$ac_help
+    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)"
 ac_help="$ac_help
   --enable-gnome          Gnome interface support (default disabled)"
 ac_help="$ac_help
   --enable-qt             Qt interface support (default disabled)"
 ac_help="$ac_help
   --enable-kde            KDE interface support (default disabled)"
+ac_help="$ac_help
+  --enable-qte            Qt embedded interface support (default disabled)"
 ac_help="$ac_help
   --enable-macosx         MacOS X support (default enabled on MacOS X)"
 ac_help="$ac_help
   --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)"
 ac_help="$ac_help
-  --enable-win32          Win32 interface support (default disabled)"
+  --enable-intfwin        Win32 interface support (default disabled)"
+ac_help="$ac_help
+    --with-bcbuilder=PATH Borland C++ Builder installation path"
 ac_help="$ac_help
   --enable-ncurses        ncurses interface support (default disabled)"
+ac_help="$ac_help
+  --enable-xosd           xosd interface support (default disabled)"
 ac_help="$ac_help
   --enable-lirc           lirc support (default disabled)"
 ac_help="$ac_help
 Misc options:"
 ac_help="$ac_help
   --with-words=endianness set endianness (big or little)"
-ac_help="$ac_help
-  --with-dll-path=PATH    path to Win32 DLLs (default search in \$PWD)"
 ac_help="$ac_help
   --enable-gprof          gprof profiling (default disabled)"
 ac_help="$ac_help
@@ -134,6 +182,8 @@ ac_help="$ac_help
   --enable-pth            GNU Pth support (default disabled)"
 ac_help="$ac_help
   --enable-st             State Threads (default disabled)"
+ac_help="$ac_help
+  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)"
 ac_help="$ac_help
   --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
 
@@ -647,7 +697,6 @@ fi
 
 
 
-
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
@@ -695,7 +744,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:699: checking host system type" >&5
+echo "configure:748: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -716,7 +765,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:720: checking target system type" >&5
+echo "configure:769: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -734,7 +783,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:738: checking build system type" >&5
+echo "configure:787: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -757,14 +806,18 @@ test "$host_alias" != "$target_alias" &&
   program_prefix=${target_alias}-
 
 
-VERSION="0.2.92-dev"
-CODENAME=Ourumov
+CONFIGURE_LINE="$0 $*"
+
+PACKAGE="vlc"
+VERSION="0.5.0-cvs"
+CODENAME="Natalya"
 
+save_CPPFLAGS="${CPPFLAGS}"
 save_CFLAGS="${CFLAGS}"
 save_LDFLAGS="${LDFLAGS}"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:768: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:821: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -793,7 +846,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:797: checking for $ac_word" >&5
+echo "configure:850: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -823,7 +876,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:827: checking for $ac_word" >&5
+echo "configure:880: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -874,7 +927,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:878: checking for $ac_word" >&5
+echo "configure:931: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -906,7 +959,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -917,12 +970,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 921 "configure"
+#line 974 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -948,12 +1001,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:952: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:957: checking whether we are using GNU C" >&5
+echo "configure:1010: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -962,7 +1015,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -981,7 +1034,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:985: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1038: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1013,7 +1066,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1017: checking how to run the C preprocessor" >&5
+echo "configure:1070: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1028,13 +1081,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1032 "configure"
+#line 1085 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1045,13 +1098,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1049 "configure"
+#line 1102 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1062,13 +1115,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1066 "configure"
+#line 1119 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1102,7 +1155,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1106: checking for $ac_word" >&5
+echo "configure:1159: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1134,7 +1187,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1138: checking for $ac_word" >&5
+echo "configure:1191: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1166,11 +1219,78 @@ else
 fi
 fi
 
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1226: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1258: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  STRIP=":"
+fi
+fi
+
 
 # Extract the first word of "gmake", so it can be a program name with args.
 set dummy gmake; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1174: checking for $ac_word" >&5
+echo "configure:1294: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1203,9 +1323,9 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-if test "x$GMAKE" = "xno"; then
+if test "x${GMAKE}" = "xno"; then
   echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
-echo "configure:1209: checking whether GNU make is installed" >&5
+echo "configure:1329: checking whether GNU make is installed" >&5
 if eval "test \"`echo '$''{'ac_cv_gmake'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1224,20 +1344,20 @@ else
   VLC_MAKE="gmake"
 fi
 
-ALL_LINGUAS="de fr ja no ru nl"
+ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
 
 cat >> confdefs.h <<EOF
-#define PACKAGE "vlc"
+#define VLC_PACKAGE "${PACKAGE}"
 EOF
 
 cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
+#define VLC_VERSION "${VERSION}"
 EOF
 
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
+echo "configure:1361: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1266,7 +1386,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1270: checking for strerror in -lcposix" >&5
+echo "configure:1390: checking for strerror in -lcposix" >&5
 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1274,7 +1394,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1278 "configure"
+#line 1398 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1285,7 +1405,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1308,12 +1428,12 @@ fi
   
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1312: checking for ANSI C header files" >&5
+echo "configure:1432: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1317 "configure"
+#line 1437 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1321,7 +1441,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1338,7 +1458,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1342 "configure"
+#line 1462 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1356,7 +1476,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1360 "configure"
+#line 1480 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1377,7 +1497,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1381 "configure"
+#line 1501 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1388,7 +1508,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1412,12 +1532,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1416: checking for working const" >&5
+echo "configure:1536: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1421 "configure"
+#line 1541 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1466,7 +1586,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1487,21 +1607,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1491: checking for inline" >&5
+echo "configure:1611: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1498 "configure"
+#line 1618 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1527,12 +1647,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1531: checking for off_t" >&5
+echo "configure:1651: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1536 "configure"
+#line 1656 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1560,12 +1680,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1564: checking for size_t" >&5
+echo "configure:1684: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1569 "configure"
+#line 1689 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1595,19 +1715,19 @@ fi
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1599: checking for working alloca.h" >&5
+echo "configure:1719: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1604 "configure"
+#line 1724 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -1628,12 +1748,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1632: checking for alloca" >&5
+echo "configure:1752: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1637 "configure"
+#line 1757 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1661,7 +1781,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -1693,12 +1813,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1697: checking whether alloca needs Cray hooks" >&5
+echo "configure:1817: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1702 "configure"
+#line 1822 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1723,12 +1843,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1727: checking for $ac_func" >&5
+echo "configure:1847: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1732 "configure"
+#line 1852 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1751,7 +1871,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1778,7 +1898,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1782: checking stack direction for C alloca" >&5
+echo "configure:1902: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1786,7 +1906,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1790 "configure"
+#line 1910 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1805,7 +1925,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -1830,17 +1950,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1834: checking for $ac_hdr" >&5
+echo "configure:1954: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1839 "configure"
+#line 1959 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1869,12 +1989,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1873: checking for $ac_func" >&5
+echo "configure:1993: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1878 "configure"
+#line 1998 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1897,7 +2017,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1922,7 +2042,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1926: checking for working mmap" >&5
+echo "configure:2046: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1930,7 +2050,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1934 "configure"
+#line 2054 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2070,7 +2190,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2094,12 +2214,12 @@ fi
 
 
     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:2098: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:2218: checking whether we are using the GNU C Library 2.1 or newer" >&5
 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2103 "configure"
+#line 2223 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -2135,17 +2255,17 @@ stdlib.h string.h unistd.h sys/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2139: checking for $ac_hdr" >&5
+echo "configure:2259: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2144 "configure"
+#line 2264 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2176,12 +2296,12 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2180: checking for $ac_func" >&5
+echo "configure:2300: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2185 "configure"
+#line 2305 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2204,7 +2324,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2244,7 +2364,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2248: checking for iconv" >&5
+echo "configure:2368: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2252,7 +2372,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 2256 "configure"
+#line 2376 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2262,7 +2382,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -2274,7 +2394,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 2278 "configure"
+#line 2398 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2284,7 +2404,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_lib_iconv=yes
         am_cv_func_iconv=yes
@@ -2305,13 +2425,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:2309: checking for iconv declaration" >&5
+echo "configure:2429: checking for iconv declaration" >&5
     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
       cat > conftest.$ac_ext <<EOF
-#line 2315 "configure"
+#line 2435 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2330,7 +2450,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -2359,19 +2479,19 @@ EOF
 
    
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2363: checking for nl_langinfo and CODESET" >&5
+echo "configure:2483: checking for nl_langinfo and CODESET" >&5
 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2368 "configure"
+#line 2488 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_langinfo_codeset=yes
 else
@@ -2394,19 +2514,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2398: checking for LC_MESSAGES" >&5
+echo "configure:2518: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2523 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -2427,7 +2547,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2431: checking whether NLS is requested" >&5
+echo "configure:2551: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
@@ -2449,7 +2569,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2453: checking whether included gettext is requested" >&5
+echo "configure:2573: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
@@ -2469,17 +2589,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2473: checking for libintl.h" >&5
+echo "configure:2593: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2478 "configure"
+#line 2598 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2496,12 +2616,12 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
-echo "configure:2500: checking for GNU gettext in libc" >&5
+echo "configure:2620: checking for GNU gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2505 "configure"
+#line 2625 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2510,7 +2630,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gnugettext1_libc=yes
 else
@@ -2526,14 +2646,14 @@ echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
 
           if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
             echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
-echo "configure:2530: checking for GNU gettext in libintl" >&5
+echo "configure:2650: checking for GNU gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   gt_save_LIBS="$LIBS"
                LIBS="$LIBS -lintl $LIBICONV"
                cat > conftest.$ac_ext <<EOF
-#line 2537 "configure"
+#line 2657 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2542,7 +2662,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gnugettext1_libintl=yes
 else
@@ -2575,12 +2695,12 @@ EOF
             for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2579: checking for $ac_func" >&5
+echo "configure:2699: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2584 "configure"
+#line 2704 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2603,7 +2723,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2632,7 +2752,7 @@ done
                     # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2636: checking for $ac_word" >&5
+echo "configure:2756: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2666,7 +2786,7 @@ fi
             # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2670: checking for $ac_word" >&5
+echo "configure:2790: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2703,7 +2823,7 @@ fi
                     # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2707: checking for $ac_word" >&5
+echo "configure:2827: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2753,7 +2873,7 @@ fi
         # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2757: checking for $ac_word" >&5
+echo "configure:2877: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2787,7 +2907,7 @@ fi
         # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2791: checking for $ac_word" >&5
+echo "configure:2911: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2823,7 +2943,7 @@ fi
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2827: checking for $ac_word" >&5
+echo "configure:2947: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2894,7 +3014,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2898: checking for $ac_word" >&5
+echo "configure:3018: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2927,7 +3047,7 @@ done
       ac_verc_fail=yes
     else
             echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:2931: checking version of bison" >&5
+echo "configure:3051: checking version of bison" >&5
       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
       case $ac_prog_version in
         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -2974,7 +3094,7 @@ echo "configure:2931: checking version of bison" >&5
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2978: checking for catalogs to be installed" >&5
+echo "configure:3098: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for presentlang in $ALL_LINGUAS; do
          useit=no
@@ -3026,7 +3146,7 @@ echo "configure:2978: checking for catalogs to be installed" >&5
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3030: checking for a BSD compatible install" >&5
+echo "configure:3150: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3079,7 +3199,125 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
-case x"${target_os}" in
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:3204: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3209 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:3279: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <<EOF
+#line 3286 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:3293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+ ;;
+  *)  cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+
+vlc_LDFLAGS="${LDFLAGS}"
+
+case "x${target_os}" in
   x)
     SYS=unknown
     ;;
@@ -3088,16 +3326,25 @@ case x"${target_os}" in
     ;;
   xbsdi*)
     SYS=bsdi
+    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
+    dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
+    vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
+    ;;
+  x*bsd*)
+    SYS="${target_os}"
+    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
     ;;
   xdarwin*)
     SYS=darwin
+    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"; CFLAGS="${save_CFLAGS}"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -all_load"
     ;;
   x*mingw32*)
     SYS=mingw32
     # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ac_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3101: checking for $ac_word" >&5
+echo "configure:3348: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3129,7 +3376,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "windres", so it can be a program name with args.
 set dummy windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3133: checking for $ac_word" >&5
+echo "configure:3380: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3161,35 +3408,54 @@ else
 fi
 fi
 
-    LIB_IPV4="${LIB_IPV4} -lws2_32"
-    LIB_RC="${LIB_RC} -lws2_32"
+    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"; CFLAGS="${save_CFLAGS}"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
+    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
+    ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
+    http_LDFLAGS="${http_LDFLAGS} -lws2_32"
+    rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
     ;;
   x*nto*)
     SYS=nto
-    LIB_X11="${LIB_X11} -lsocket"
-    LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
+    x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
+    xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
+    ;;
+  xsolaris*)
+    SYS=solaris
     ;;
   xbeos)
     SYS=beos
-    LIB_VLC="${LIB_VLC} -lbe"
-    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
-    LIB_IPV4="${LIB_IPV4} -lbind"
-    PLDFLAGS="${PLDFLAGS} -nostart"
+    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
+    plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
+    beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
+    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
     ;;
   x*)
-    SYS=${target_os}
+    SYS="${target_os}"
     ;;
 esac
 
-for ac_func in gettimeofday select strerror strtod strtol isatty
+if test "x${SYS}" = "xmingw32"
+then
+  plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
+else
+  plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
+  plugins_LDFLAGS="${plugins_LDFLAGS} -fPIC"
+fi
+
+save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CFLAGS="${save_CFLAGS}"
+
+for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3188: checking for $ac_func" >&5
+echo "configure:3454: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3193 "configure"
+#line 3459 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3212,7 +3478,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3236,13 +3502,14 @@ else
 fi
 done
 
+
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3241: checking for connect" >&5
+echo "configure:3508: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3246 "configure"
+#line 3513 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3265,7 +3532,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -3284,7 +3551,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3288: checking for connect in -lsocket" >&5
+echo "configure:3555: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3292,7 +3559,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3296 "configure"
+#line 3563 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3303,7 +3570,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3318,8 +3585,8 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IPV4="${LIB_IPV4} -lsocket"
-    LIB_VLC="${LIB_VLC} -lsocket"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
 
 else
   echo "$ac_t""no" 1>&6
@@ -3327,74 +3594,74 @@ fi
 
 fi
 
-echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3332: checking for gethostbyname" >&5
-if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+echo $ac_n "checking for send""... $ac_c" 1>&6
+echo "configure:3599: checking for send" >&5
+if eval "test \"`echo '$''{'ac_cv_func_send'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3337 "configure"
+#line 3604 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gethostbyname(); below.  */
+    which can conflict with char send(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char gethostbyname();
+char send();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+#if defined (__stub_send) || defined (__stub___send)
 choke me
 #else
-gethostbyname();
+send();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_gethostbyname=yes"
+  eval "ac_cv_func_send=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_gethostbyname=no"
+  eval "ac_cv_func_send=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'send`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 
-  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3379: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for send in -lsocket""... $ac_c" 1>&6
+echo "configure:3646: checking for send in -lsocket" >&5
+ac_lib_var=`echo socket'_'send | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lnsl  $LIBS"
+LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3387 "configure"
+#line 3654 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char gethostbyname();
+char send();
 
 int main() {
-gethostbyname()
+send()
 ; return 0; }
 EOF
-if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3409,21 +3676,21 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IPV4="${LIB_IPV4} -lnsl"
+  http_LDFLAGS="${http_LDFLAGS} -lsocket"
+
 else
   echo "$ac_t""no" 1>&6
 fi
 
-
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3422: checking for gethostbyname" >&5
+echo "configure:3689: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3427 "configure"
+#line 3694 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3446,7 +3713,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -3464,16 +3731,16 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 
-  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:3469: checking for gethostbyname in -lbind" >&5
-ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:3736: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lbind  $LIBS"
+LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3477 "configure"
+#line 3744 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3484,7 +3751,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3499,7 +3766,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IPV4="${LIB_IPV4} -lbind"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3507,74 +3774,74 @@ fi
 
 fi
 
-echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3512: checking for nanosleep" >&5
-if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
+echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:3779: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3517 "configure"
+#line 3784 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char nanosleep(); below.  */
+    which can conflict with char gethostbyname(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char nanosleep();
+char gethostbyname();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 choke me
 #else
-nanosleep();
+gethostbyname();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_nanosleep=yes"
+  eval "ac_cv_func_gethostbyname=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_nanosleep=no"
+  eval "ac_cv_func_gethostbyname=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 
-  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:3559: checking for nanosleep in -lrt" >&5
-ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
+echo "configure:3826: checking for gethostbyname in -lbind" >&5
+ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lrt  $LIBS"
+LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3567 "configure"
+#line 3834 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char nanosleep();
+char gethostbyname();
 
 int main() {
-nanosleep()
+gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3589,20 +3856,110 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_VLC="${LIB_VLC} -lrt"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
 else
   echo "$ac_t""no" 1>&6
+fi
 
-    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:3598: checking for nanosleep in -lposix4" >&5
-ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+
+fi
+
+have_nanosleep=0
+echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
+echo "configure:3870: checking for nanosleep" >&5
+if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lposix4  $LIBS"
+  cat > conftest.$ac_ext <<EOF
+#line 3875 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char nanosleep(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char nanosleep();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
+choke me
+#else
+nanosleep();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_nanosleep=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_nanosleep=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_nanosleep=1
+else
+  echo "$ac_t""no" 1>&6
+
+  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
+echo "configure:3917: checking for nanosleep in -lrt" >&5
+ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lrt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3925 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char nanosleep();
+
+int main() {
+nanosleep()
+; return 0; }
+EOF
+if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"; have_nanosleep=1
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
+echo "configure:3955: checking for nanosleep in -lposix4" >&5
+ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3606 "configure"
+#line 3963 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3613,7 +3970,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3628,7 +3985,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_VLC="${LIB_VLC} -lposix4"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3639,68 +3996,61 @@ fi
 
 fi
 
-for ac_func in usleep
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3646: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+if test x$have_nanosleep = x1; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_NANOSLEEP 1
+EOF
+
+fi
+# HP/UX port
+echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
+echo "configure:4008: checking for sem_init in -lrt" >&5
+ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 3651 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lrt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4016 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char sem_init();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+sem_init()
 ; return 0; }
 EOF
-if { (eval echo configure:3674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"
 else
   echo "$ac_t""no" 1>&6
 fi
-done
+
 
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:3699: checking for inet_aton" >&5
+echo "configure:4049: checking for inet_aton" >&5
 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3704 "configure"
+#line 4054 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -3723,7 +4073,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_inet_aton=yes"
 else
@@ -3742,7 +4092,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3746: checking for inet_aton in -lresolv" >&5
+echo "configure:4096: checking for inet_aton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3750,7 +4100,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3754 "configure"
+#line 4104 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3761,7 +4111,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3776,7 +4126,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_VLC="${LIB_IPV4} -lresolv"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3785,12 +4135,12 @@ fi
 fi
 
 echo $ac_n "checking for textdomain""... $ac_c" 1>&6
-echo "configure:3789: checking for textdomain" >&5
+echo "configure:4139: checking for textdomain" >&5
 if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3794 "configure"
+#line 4144 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char textdomain(); below.  */
@@ -3813,7 +4163,7 @@ textdomain();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_textdomain=yes"
 else
@@ -3832,7 +4182,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3836: checking for textdomain in -lintl" >&5
+echo "configure:4186: checking for textdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'textdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3840,7 +4190,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3844 "configure"
+#line 4194 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3851,7 +4201,7 @@ int main() {
 textdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3866,7 +4216,9 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_VLC="${LIB_VLC} -lintl"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
+    plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
+  
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
 
-for ac_func in vasprintf
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3881: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+
+NEED_GETOPT=0
+echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
+echo "configure:4233: checking for getopt_long" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3886 "configure"
+#line 4238 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char getopt_long(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char getopt_long();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
 choke me
 #else
-$ac_func();
+getopt_long();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_func_getopt_long=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_func_getopt_long=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+  cat >> confdefs.h <<\EOF
+#define HAVE_GETOPT_LONG 1
 EOF
+
 else
   echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in swab
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3936: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ # FreeBSD has a gnugetopt library for this:
+  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
+echo "configure:4283: checking for getopt_long in -lgnugetopt" >&5
+ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 3941 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lgnugetopt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4291 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char getopt_long();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+getopt_long()
 ; return 0; }
 EOF
-if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+  cat >> confdefs.h <<\EOF
+#define HAVE_GETOPT_LONG 1
 EOF
+ vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"
 else
   echo "$ac_t""no" 1>&6
+NEED_GETOPT=1
 fi
-done
 
-for ac_func in memalign valloc
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3991: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+fi
+
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:4330: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3996 "configure"
+#line 4335 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
 #else
-$ac_func();
+void (*signal ()) ();
 #endif
 
+int main() {
+int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  ac_cv_type_signal=void
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  ac_cv_type_signal=int
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
 EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
 
-for ac_func in sigrelse
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4047: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4052 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpwuid
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4102: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4107 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-NEED_GETOPT=0
-echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:4157: checking for getopt_long" >&5
-if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4162 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getopt_long(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char getopt_long();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
-choke me
-#else
-getopt_long();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_getopt_long=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_getopt_long=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_GETOPT_LONG 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
- # FreeBSD has a gnugetopt library for this:
-  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:4207: checking for getopt_long in -lgnugetopt" >&5
-ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lgnugetopt  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4215 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char getopt_long();
-
-int main() {
-getopt_long()
-; return 0; }
-EOF
-if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_GETOPT_LONG 1
-EOF
- LIB_VLC="${LIB_VLC} -lgnugetopt"
-else
-  echo "$ac_t""no" 1>&6
-NEED_GETOPT=1
-fi
-
-fi
-
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4254: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4259 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:4276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_type_signal=void
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4295: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:4371: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4303 "configure"
+#line 4379 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4310,7 +4386,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4325,13 +4401,13 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_VLC="${LIB_VLC} -ldl"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -ldl"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
-echo "configure:4335: checking for cos in -lm" >&5
+echo "configure:4411: checking for cos in -lm" >&5
 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4339,7 +4415,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4343 "configure"
+#line 4419 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4350,7 +4426,7 @@ int main() {
 cos()
 ; return 0; }
 EOF
-if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4365,14 +4441,14 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IMDCT="${LIB_IMDCT} -lm"
-  LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
+  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
+  filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:4376: checking for pow in -lm" >&5
+echo "configure:4452: checking for pow in -lm" >&5
 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4380,7 +4456,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4384 "configure"
+#line 4460 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4391,7 +4467,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4406,10 +4482,11 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IMDCT="${LIB_IMDCT} -lm"
-  LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
-  LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
-  LIB_CHROMA_I420_RGB="${LIB_CHROMA_I420_RGB} -lm"
+  ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
+  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
+  imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
+  imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
+  i420_rgb_LDFLAGS="${i420_rgb_LDFLAGS} -lm"
 
 else
   echo "$ac_t""no" 1>&6
@@ -4417,28 +4494,24 @@ fi
 
 
 THREAD_LIB=error
-if test "x${THREAD_LIB}" = xerror; then
-  echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
-echo "configure:4423: checking for pthread_attr_init in -lpthread" >&5
-ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
+if test "x${THREAD_LIB}" = "xerror"; then
+  echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
+echo "configure:4500: checking for main in -lpthread" >&5
+ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4431 "configure"
+#line 4508 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
 
 int main() {
-pthread_attr_init()
+main()
 ; return 0; }
 EOF
-if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4459,28 +4532,24 @@ else
 fi
 
 fi
-if test "x${THREAD_LIB}" = xerror; then
-  echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:4465: checking for pthread_attr_init in -lpthreads" >&5
-ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
+if test "x${THREAD_LIB}" = "xerror"; then
+  echo $ac_n "checking for main in -lpthreads""... $ac_c" 1>&6
+echo "configure:4538: checking for main in -lpthreads" >&5
+ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4473 "configure"
+#line 4546 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
 
 int main() {
-pthread_attr_init()
+main()
 ; return 0; }
 EOF
-if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4501,28 +4570,24 @@ else
 fi
 
 fi
-if test "x${THREAD_LIB}" = xerror; then
-  echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
-echo "configure:4507: checking for pthread_attr_init in -lc_r" >&5
-ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
+if test "x${THREAD_LIB}" = "xerror"; then
+  echo $ac_n "checking for main in -lc_r""... $ac_c" 1>&6
+echo "configure:4576: checking for main in -lc_r" >&5
+ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4515 "configure"
+#line 4584 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
 
 int main() {
-pthread_attr_init()
+main()
 ; return 0; }
 EOF
-if { (eval echo configure:4526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4543,49 +4608,49 @@ else
 fi
 
 fi
-if test "x${THREAD_LIB}" = xerror; then
-  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
-echo "configure:4549: checking for pthread_attr_init" >&5
-if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
+if test "x${THREAD_LIB}" = "xerror"; then
+  echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
+echo "configure:4614: checking for pthread_mutex_lock" >&5
+if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4554 "configure"
+#line 4619 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pthread_attr_init(); below.  */
+    which can conflict with char pthread_mutex_lock(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
+char pthread_mutex_lock();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
+#if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock)
 choke me
 #else
-pthread_attr_init();
+pthread_mutex_lock();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_pthread_attr_init=yes"
+  eval "ac_cv_func_pthread_mutex_lock=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_pthread_attr_init=no"
+  eval "ac_cv_func_pthread_mutex_lock=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
@@ -4596,7 +4661,7 @@ fi
 fi
 
 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4600: checking for cthread_fork in -lthreads" >&5
+echo "configure:4665: checking for cthread_fork in -lthreads" >&5
 ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4604,7 +4669,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4608 "configure"
+#line 4673 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4615,7 +4680,7 @@ int main() {
 cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4637,7 +4702,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4641 "configure"
+#line 4706 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -4653,7 +4718,23 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4657 "configure"
+#line 4722 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pthread_once" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+  cat >> confdefs.h <<\EOF
+#define PTHREAD_ONCE_IN_PTHREAD_H 1
+EOF
+
+fi
+rm -f conftest*
+
+cat > conftest.$ac_ext <<EOF
+#line 4738 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
@@ -4669,21 +4750,21 @@ fi
 rm -f conftest*
 
 
-for ac_hdr in getopt.h strings.h
+for ac_hdr in stdint.h getopt.h strings.h inttypes.h sys/int_types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4677: checking for $ac_hdr" >&5
+echo "configure:4758: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4682 "configure"
+#line 4763 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4709,21 +4790,21 @@ else
 fi
 done
 
-for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
+for ac_hdr in sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4717: checking for $ac_hdr" >&5
+echo "configure:4798: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4722 "configure"
+#line 4803 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4753,17 +4834,17 @@ for ac_hdr in dlfcn.h image.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4757: checking for $ac_hdr" >&5
+echo "configure:4838: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4762 "configure"
+#line 4843 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4793,17 +4874,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4797: checking for $ac_hdr" >&5
+echo "configure:4878: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4802 "configure"
+#line 4883 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4833,17 +4914,17 @@ for ac_hdr in machine/param.h sys/shm.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4837: checking for $ac_hdr" >&5
+echo "configure:4918: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4842 "configure"
+#line 4923 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4869,21 +4950,21 @@ else
 fi
 done
 
-for ac_hdr in scsi/scsi_ioctl.h
+for ac_hdr in linux/version.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4877: checking for $ac_hdr" >&5
+echo "configure:4958: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4882 "configure"
+#line 4963 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4911,12 +4992,12 @@ done
 
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4915: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4996: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4920 "configure"
+#line 5001 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -4925,7 +5006,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:4929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -4946,21 +5027,57 @@ EOF
 fi
 
 
+cat > conftest.$ac_ext <<EOF
+#line 5032 "configure"
+#include "confdefs.h"
+#include <time.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "nanosleep" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+  cat >> confdefs.h <<\EOF
+#define HAVE_DECL_NANOSLEEP 1
+EOF
+
+
+fi
+rm -f conftest*
+
+
+cat > conftest.$ac_ext <<EOF
+#line 5050 "configure"
+#include "confdefs.h"
+#include <sys/time.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "timespec" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_TIMESPEC 1
+EOF
+
+
+fi
+rm -f conftest*
+
+
 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4954: checking for $ac_hdr" >&5
+echo "configure:5071: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4959 "configure"
+#line 5076 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4987,31 +5104,31 @@ fi
 done
 
 
-if test x$SYS != xmingw32
+if test "x${x_includes}" = "xNONE"; then
+  x_includes="/usr/X11R6/include"
+fi
+if test "x${x_libraries}" = "xNONE"; then
+  x_libraries="/usr/X11R6/lib"
+fi
+
+if test "x${SYS}" != "xmingw32"
 then
-  if test x$x_includes = xNONE; then
-    x_includes=/usr/X11R6/include
-  fi
-  if test x$x_libraries = xNONE; then
-    x_libraries=/usr/X11R6/lib
-  fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS -I$x_includes"
+  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
   for ac_hdr in X11/extensions/dpms.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5005: checking for $ac_hdr" >&5
+echo "configure:5122: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5010 "configure"
+#line 5127 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5033,7 +5150,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
     cat > conftest.$ac_ext <<EOF
-#line 5037 "configure"
+#line 5154 "configure"
 #include "confdefs.h"
 #include <X11/extensions/dpms.h>
 EOF
@@ -5055,24 +5172,24 @@ else
 fi
 done
 
-  CPPFLAGS=$saved_CPPFLAGS
+  CPPFLAGS="${save_CPPFLAGS}"
 fi
 
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:5063: checking for ntohl in sys/param.h" >&5
+echo "configure:5180: checking for ntohl in sys/param.h" >&5
 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -Wall -Werror"
      cat > conftest.$ac_ext <<EOF
-#line 5069 "configure"
+#line 5186 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 int main() {
 void foo() { int meuh; ntohl(meuh); }
 ; return 0; }
 EOF
-if { (eval echo configure:5076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_ntohl_sys_param_h=yes
 else
@@ -5085,7 +5202,7 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
-if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
+if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
     cat >> confdefs.h <<\EOF
 #define NTOHL_IN_SYS_PARAM_H 1
 EOF
@@ -5093,20 +5210,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:5097: checking if \$CC accepts -finline-limit" >&5
+echo "configure:5214: checking if \$CC accepts -finline-limit" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -finline-limit-30000"
      cat > conftest.$ac_ext <<EOF
-#line 5103 "configure"
+#line 5220 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline_limit=yes
 else
@@ -5119,25 +5236,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
-if test x"$ac_cv_c_inline_limit" != x"no"; then
-    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
+if test "x${ac_cv_c_inline_limit}" != "xno"; then
+    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}"
 fi
 
 echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
-echo "configure:5128: checking if \$CC accepts -Wall -Winline" >&5
+echo "configure:5245: checking if \$CC accepts -Wall -Winline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  CFLAGS="${save_CFLAGS} -Wall -Winline"
+  CFLAGS="-Wall -Winline ${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5134 "configure"
+#line 5251 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_Wall_Winline=yes
 else
@@ -5150,24 +5267,24 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
-if test x"$ac_cv_c_Wall_Winline" != x"no"; then
-    save_CFLAGS="${save_CFLAGS} -Wall -Winline"
+if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
+    save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
 else
     echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
-echo "configure:5158: checking if \$CC accepts -wall -winline" >&5
+echo "configure:5275: checking if \$CC accepts -wall -winline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  CFLAGS="${save_CFLAGS} -wall -winline"
+  CFLAGS="-wall -winline ${save_CFLAGS}"
          cat > conftest.$ac_ext <<EOF
-#line 5164 "configure"
+#line 5281 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_wall_winline=yes
 else
@@ -5180,26 +5297,26 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
-    if test x"$ac_cv_c_wall_winline" != x"no"; then
-        save_CFLAGS="${save_CFLAGS} -wall -winline"
+    if test "x${ac_cv_c_wall_winline}" != "xno"; then
+        save_CFLAGS="-wall -winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
     fi
 fi
 
 echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
-echo "configure:5190: checking if \$CC accepts -pipe" >&5
+echo "configure:5307: checking if \$CC accepts -pipe" >&5
 if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -pipe"
      cat > conftest.$ac_ext <<EOF
-#line 5196 "configure"
+#line 5313 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_pipe=yes
 else
@@ -5212,25 +5329,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_pipe" 1>&6
-if test x"$ac_cv_c_pipe" != x"no"; then
-    save_CFLAGS="${save_CFLAGS} -pipe"
+if test "x${ac_cv_c_pipe}" != "xno"; then
+    save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}"
 fi
 
 echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
-echo "configure:5221: checking if \$CC accepts -O3" >&5
+echo "configure:5338: checking if \$CC accepts -O3" >&5
 if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -O3"
      cat > conftest.$ac_ext <<EOF
-#line 5227 "configure"
+#line 5344 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o3=yes
 else
@@ -5243,24 +5360,24 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_o3" 1>&6
-if test x"$ac_cv_c_o3" != x"no"; then
+if test "x${ac_cv_c_o3}" != "xno"; then
     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
 else
     echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
-echo "configure:5251: checking if \$CC accepts -O2" >&5
+echo "configure:5368: checking if \$CC accepts -O2" >&5
 if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -O2"
          cat > conftest.$ac_ext <<EOF
-#line 5257 "configure"
+#line 5374 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o2=yes
 else
@@ -5273,24 +5390,24 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_o2" 1>&6
-    if test x"$ac_cv_c_o2" != x"no"; then
+    if test "x${ac_cv_c_o2}" != "xno"; then
         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
     else
         echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
-echo "configure:5281: checking if \$CC accepts -O" >&5
+echo "configure:5398: checking if \$CC accepts -O" >&5
 if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -O"
              cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
+#line 5404 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o=yes
 else
@@ -5303,27 +5420,27 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_o" 1>&6
-        if test x"$ac_cv_c_o" != x"no"; then
+        if test "x${ac_cv_c_o}" != "xno"; then
             CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
         fi
     fi
 fi
 
 echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
-echo "configure:5314: checking if \$CC accepts -ffast-math" >&5
+echo "configure:5431: checking if \$CC accepts -ffast-math" >&5
 if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -ffast-math"
      cat > conftest.$ac_ext <<EOF
-#line 5320 "configure"
+#line 5437 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_fast_math=yes
 else
@@ -5336,25 +5453,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_fast_math" 1>&6
-if test x"$ac_cv_c_fast_math" != x"no"; then
+if test "x${ac_cv_c_fast_math}" != "xno"; then
     CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
 fi
 
 echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
-echo "configure:5345: checking if \$CC accepts -funroll-loops" >&5
+echo "configure:5462: checking if \$CC accepts -funroll-loops" >&5
 if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -funroll-loops"
      cat > conftest.$ac_ext <<EOF
-#line 5351 "configure"
+#line 5468 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_unroll_loops=yes
 else
@@ -5367,25 +5484,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
-if test x"$ac_cv_c_unroll_loops" != x"no"; then
+if test "x${ac_cv_c_unroll_loops}" != "xno"; then
     CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
 fi
 
 echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
-echo "configure:5376: checking if \$CC accepts -fomit-frame-pointer" >&5
+echo "configure:5493: checking if \$CC accepts -fomit-frame-pointer" >&5
 if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
      cat > conftest.$ac_ext <<EOF
-#line 5382 "configure"
+#line 5499 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_omit_frame_pointer=yes
 else
@@ -5398,25 +5515,27 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
-if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
+if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
+    # this plugin does not compile without -fomit-frame-pointer, damn gcc!
+    i420_yuy2_mmx_CFLAGS="${i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer"
 fi
 
 echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
-echo "configure:5407: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
+echo "configure:5526: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
      cat > conftest.$ac_ext <<EOF
-#line 5413 "configure"
+#line 5532 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_darwin=yes
 else
@@ -5429,25 +5548,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
-if test x"$ac_cv_ld_darwin" != x"no"; then
-    PLDFLAGS="${PLDFLAGS} -bundle -undefined error -lcc_dynamic"
+if test "x${ac_cv_ld_darwin}" != "xno"; then
+    plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
 fi
 
 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:5438: checking if \$CC accepts -shared" >&5
+echo "configure:5557: checking if \$CC accepts -shared" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -shared"
      cat > conftest.$ac_ext <<EOF
-#line 5444 "configure"
+#line 5563 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_plugins=yes
 else
@@ -5460,181 +5579,125 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
-if test x"$ac_cv_ld_plugins" != x"no"; then
-    PLDFLAGS="${PLDFLAGS} -shared"
+if test "x${ac_cv_ld_plugins}" != "xno"; then
+    plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
 fi
         
-echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:5469: checking __attribute__ ((aligned ())) support" >&5
-if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_c_attribute_aligned=0
-        CFLAGS="${save_CFLAGS} -Werror"
-    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
-        cat > conftest.$ac_ext <<EOF
-#line 5477 "configure"
-#include "confdefs.h"
-
-int main() {
-static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
-; return 0; }
-EOF
-if { (eval echo configure:5484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-    done
-fi
-
-echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
-if test x"$ac_cv_c_attribute_aligned" != x"0"; then
-    cat >> confdefs.h <<EOF
-#define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
-EOF
-
-fi
-
-CFLAGS="${save_CFLAGS}"
-LDFLAGS="${save_LDFLAGS}"
-
-echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5507: checking for boolean_t in sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
+echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
+echo "configure:5588: checking for variadic cpp macros" >&5
+if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5512 "configure"
+  CFLAGS="${save_CFLAGS}"
+     cat > conftest.$ac_ext <<EOF
+#line 5594 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
+#include <stdio.h>
+          #define a(b,c...) printf(b,##c)
 int main() {
-boolean_t foo;
+a("foo");a("%s","bar");a("%s%s","baz","quux");
 ; return 0; }
 EOF
-if { (eval echo configure:5519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_c_boolean_t_sys_types_h=yes
+  ac_cv_cpp_variadic_macros=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_c_boolean_t_sys_types_h=no
+  ac_cv_cpp_variadic_macros=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
-if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
+echo "$ac_t""$ac_cv_cpp_variadic_macros" 1>&6
+if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
     cat >> confdefs.h <<\EOF
-#define BOOLEAN_T_IN_SYS_TYPES_H 1
+#define HAVE_VARIADIC_MACROS 1
 EOF
 
 fi
 
-echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:5540: checking for boolean_t in pthread.h" >&5
-if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
+echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
+echo "configure:5623: checking __attribute__ ((aligned ())) support" >&5
+if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5545 "configure"
+  ac_cv_c_attribute_aligned=0
+        CFLAGS="${save_CFLAGS} -Werror"
+    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
+        cat > conftest.$ac_ext <<EOF
+#line 5631 "configure"
 #include "confdefs.h"
-#include <pthread.h>
-int main() {
-boolean_t foo;
-; return 0; }
-EOF
-if { (eval echo configure:5552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_boolean_t_pthread_h=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_boolean_t_pthread_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
-if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
-    cat >> confdefs.h <<\EOF
-#define BOOLEAN_T_IN_PTHREAD_H 1
-EOF
-
-fi
 
-echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
-echo "configure:5573: checking for boolean_t in cthreads.h" >&5
-if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5578 "configure"
-#include "confdefs.h"
-#include <cthreads.h>
 int main() {
-boolean_t foo;
+static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;
 ; return 0; }
 EOF
-if { (eval echo configure:5585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_c_boolean_t_cthreads_h=yes
+  ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_boolean_t_cthreads_h=no
 fi
 rm -f conftest*
+    done
+        CFLAGS="${save_CFLAGS}"
 fi
 
-echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
-if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
-    cat >> confdefs.h <<\EOF
-#define BOOLEAN_T_IN_CTHREADS_H 1
+echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
+if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
+    cat >> confdefs.h <<EOF
+#define ATTRIBUTE_ALIGNED_MAX ${ac_cv_c_attribute_aligned}
 EOF
 
 fi
 
-case x"${target_cpu}" in
+case "x${target_cpu}" in
   x)
     ARCH=unknown
     ;;
   *)
-    ARCH=${target_cpu}
+    ARCH="${target_cpu}"
     ;;
 esac
 
-BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
-PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
-
-MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
-MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
-THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
-if test x$SYS != xmingw32; then
-SSE_MODULES="imdctsse downmixsse"
-fi
-ALTIVEC_MODULES="idctaltivec motionaltivec"
+BUILTINS="${BUILTINS}"
+PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
+PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
+PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts"
+PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec codec/spdif"
+#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm"
+PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
+PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/a52tospdif"
+PLUGINS="${PLUGINS} audio_filter/resampler/trivial"
+PLUGINS="${PLUGINS} audio_mixer/trivial audio_mixer/spdif"
+PLUGINS="${PLUGINS} audio_output/file"
+#PLUGINS="${PLUGINS} visualization/scope/scope"
+PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"
+
+MMX_MODULES="misc/memcpy/memcpymmx codec/mpeg_video/idct/idctmmx codec/mpeg_video/motion/motionmmx video_chroma/i420_rgb_mmx video_chroma/i420_yuy2_mmx video_chroma/i422_yuy2_mmx video_chroma/i420_ymga_mmx"
+MMXEXT_MODULES="misc/memcpy/memcpymmxext codec/mpeg_video/idct/idctmmxext codec/mpeg_video/motion/motionmmxext"
+THREEDNOW_MODULES="misc/memcpy/memcpy3dn codec/a52old/imdct/imdct3dn codec/a52old/downmix/downmix3dn"
+SSE_MODULES="codec/a52old/imdct/imdctsse codec/a52old/downmix/downmixsse"
+ALTIVEC_MODULES="codec/mpeg_video/idct/idctaltivec codec/mpeg_video/motion/motionaltivec misc/memcpy/memcpyaltivec"
 
 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:5626: checking if \$CC groks MMX inline assembly" >&5
+echo "configure:5688: checking if \$CC groks MMX inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5631 "configure"
+  CFLAGS="${save_CFLAGS}"
+     cat > conftest.$ac_ext <<EOF
+#line 5694 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmx_inline=yes
 else
@@ -5647,24 +5710,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_mmx_inline" 1>&6
-if test x"$ac_cv_mmx_inline" != x"no"; then
+if test "x${ac_cv_mmx_inline}" != "xno"; then
   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
 fi
 
 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
-echo "configure:5656: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:5719: checking if \$CC groks MMX EXT inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
+  CFLAGS="${save_CFLAGS}"
+     cat > conftest.$ac_ext <<EOF
+#line 5725 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmxext_inline=yes
 else
@@ -5677,24 +5741,25 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
-if test x"$ac_cv_mmxext_inline" != x"no"; then
+if test "x${ac_cv_mmxext_inline}" != "xno"; then
   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
 fi
 
 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
-echo "configure:5686: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:5750: checking if \$CC groks 3D Now! inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5691 "configure"
+  CFLAGS="${save_CFLAGS}"
+     cat > conftest.$ac_ext <<EOF
+#line 5756 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3dnow_inline=yes
 else
@@ -5707,7 +5772,7 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
-if test x"$ac_cv_3dnow_inline" != x"no"; then
+if test "x${ac_cv_3dnow_inline}" != "xno"; then
   cat >> confdefs.h <<\EOF
 #define CAN_COMPILE_3DNOW 1
 EOF
@@ -5716,19 +5781,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5720: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:5785: checking if \$CC groks SSE inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5725 "configure"
+  CFLAGS="${save_CFLAGS}"
+     cat > conftest.$ac_ext <<EOF
+#line 5791 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sse_inline=yes
 else
@@ -5741,7 +5807,7 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_sse_inline" 1>&6
-if test x"$ac_cv_sse_inline" != x"no"; then
+if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
   cat >> confdefs.h <<\EOF
 #define CAN_COMPILE_SSE 1
 EOF
@@ -5749,40 +5815,40 @@ EOF
   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
 fi
 
-# don't try to grok altivec with native mingw32 it doesn't work right now
+# don't try to grok AltiVec with native mingw32 it doesn't work right now
 # we should be able to remove this test with future versions of mingw32
-if test x$SYS != xmingw32; then
-echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
-echo "configure:5757: checking if \$CC groks Altivec inline assembly" >&5
+if test "x${SYS}" != "xmingw32"; then
+echo $ac_n "checking if \$CC groks AltiVec inline assembly""... $ac_c" 1>&6
+echo "configure:5823: checking if \$CC groks AltiVec inline assembly" >&5
 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 5762 "configure"
+  CFLAGS="${save_CFLAGS}"
+     cat > conftest.$ac_ext <<EOF
+#line 5829 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  save_CFLAGS=$CFLAGS
-          CFLAGS="$CFLAGS -Wa,-m7400"
+  CFLAGS="${save_CFLAGS} -Wa,-m7400"
           cat > conftest.$ac_ext <<EOF
-#line 5779 "configure"
+#line 5845 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline="-Wa,-m7400"
 else
@@ -5792,43 +5858,42 @@ else
   ac_cv_altivec_inline=no
 fi
 rm -f conftest*
-          CFLAGS=$save_CFLAGS
          
 fi
 rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_altivec_inline" 1>&6
-if test x"$ac_cv_altivec_inline" != x"no"; then
+if test "x${ac_cv_altivec_inline}" != "xno"; then
   cat >> confdefs.h <<\EOF
 #define CAN_COMPILE_ALTIVEC 1
 EOF
 
-  if test x"$ac_cv_altivec_inline" != x"yes"; then
-    CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
-    CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
-    CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
+  if test "x${ac_cv_altivec_inline}" != "xyes"; then
+    idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_altivec_inline}"
+    motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_altivec_inline}"
+    memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_altivec_inline}"
+    vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_altivec_inline}"
   fi
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
-echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
-echo "configure:5817: checking if \$CC groks Altivec C extensions" >&5
+echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6
+echo "configure:5883: checking if \$CC groks AltiVec C extensions" >&5
 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  save_CFLAGS=$CFLAGS
-     CFLAGS="$CFLAGS -faltivec"
+  CFLAGS="${save_CFLAGS} -faltivec"
      # Darwin test
      cat > conftest.$ac_ext <<EOF
-#line 5825 "configure"
+#line 5890 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec=-faltivec
 else
@@ -5837,16 +5902,16 @@ else
   rm -rf conftest*
   
         # Linux/PPC test
-        CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
+        CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 5843 "configure"
+#line 5908 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec="-fvec"
 else
@@ -5859,39 +5924,37 @@ rm -f conftest*
         
 fi
 rm -f conftest*
-     CFLAGS=$save_CFLAGS
-    
+     CFLAGS="${save_CFLAGS}"
 fi
 
 echo "$ac_t""$ac_cv_c_altivec" 1>&6
-if test x"$ac_cv_c_altivec" != x"no"; then
+if test "x${ac_cv_c_altivec}" != "xno"; then
   cat >> confdefs.h <<\EOF
 #define CAN_COMPILE_C_ALTIVEC 1
 EOF
 
-  CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
-  CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
-  CFLAGS_MEMCPYALTIVEC="$CFLAGS_MEMCPYALTIVEC $ac_cv_c_altivec"
-  CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
-  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES} memcpyaltivec"
+  idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_c_altivec}"
+  motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_c_altivec}"
+  memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_c_altivec}"
+  vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_c_altivec}"
+  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
-echo "configure:5881: checking if linker needs -framework vecLib" >&5
+echo "configure:5945: checking if linker needs -framework vecLib" >&5
 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  save_LDFLAGS=$LDFLAGS
-     LDFLAGS="$LDFLAGS -framework vecLib"
+  LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
      cat > conftest.$ac_ext <<EOF
-#line 5888 "configure"
+#line 5951 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_altivec=yes
 else
@@ -5901,16 +5964,16 @@ else
   ac_cv_ld_altivec=no
 fi
 rm -f conftest*
-     LDFLAGS=$save_LDFLAGS
+     LDFLAGS="${save_LDFLAGS}"
     
 fi
 
 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
-if test x"$ac_cv_ld_altivec" != x"no"; then
-  LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
-  LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
-  LIB_MEMCPYALTIVEC="${LIB_MEMCPYALTIVEC} -framework vecLib"
-  LIB_VLC="${LIB_VLC} -framework vecLib"
+if test "x${ac_cv_ld_altivec}" != "xno"; then
+  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
+  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
+  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
 fi
 fi # end if mingw32
 
@@ -5934,25 +5997,25 @@ if test "${with_tuning+set}" = set; then
   :
 fi
 
-if test "x$withval" != "x"; then
-    TUNING=$withval
+if test "x${with_tuning}" != "x"; then
+    TUNING="${with_tuning}"
 else
-    if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
+    if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then TUNING="pentiumpro"
     else
-        if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
+        if test "x${target_cpu}" = "xpowerpc"; then TUNING="750"; fi
     fi
 fi
 
-if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
+if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
 then
     ARCH="${ARCH} mmx"
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
+    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
 fi
 
 # Check whether --enable-optimizations or --disable-optimizations was given.
 if test "${enable_optimizations+set}" = set; then
   enableval="$enable_optimizations"
-   if test x$enableval = xno; then OPTIMS=0; fi 
+   if test "x${enable_optimizations}" = "xno"; then OPTIMS=0; fi 
 else
    OPTIMS=1 
 fi
@@ -5961,10 +6024,10 @@ fi
 # Check whether --enable-altivec or --disable-altivec was given.
 if test "${enable_altivec+set}" = set; then
   enableval="$enable_altivec"
-   if test x$enableval = xyes; then ARCH="${ARCH} altivec";
+   if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
 else
-   if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
+   if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
 fi
 
@@ -5973,14 +6036,15 @@ DEBUG=0
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
-   if test x$enableval = xyes; then DEBUG=1; fi 
+   if test "x${enable_debug}" = "xyes"; then DEBUG=1; fi 
 fi
 
 
+RELEASE=0
 # Check whether --enable-release or --disable-release was given.
 if test "${enable_release+set}" = set; then
   enableval="$enable_release"
-   if test x$enableval = xyes; then RELEASE=1; fi 
+   if test "x${enable_release}" = "xyes"; then RELEASE=1; fi 
 else
    VERSION="${VERSION}_`date +%Y-%m-%d`" 
 fi
@@ -6000,7 +6064,7 @@ if test "${enable_dvd+set}" = set; then
   :
 fi
 
-if test "x$enableval" != "xno"
+if test "x${enable_dvd}" != "xno"
 then
   # Check whether --with-dvdcss or --without-dvdcss was given.
 if test "${with_dvdcss+set}" = set; then
@@ -6014,25 +6078,25 @@ if test "${with_dvdcss_tree+set}" = set; then
   :
 fi
 
-  case "x$with_dvdcss" in
-  x)
-    if test "x$with_dvdcss_tree" = x
+  case "x${with_dvdcss}" in
+  x|xyes)
+    if test "x${with_dvdcss_tree}" = x
     then
       for ac_hdr in dvdcss/dvdcss.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6026: checking for $ac_hdr" >&5
+echo "configure:6090: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6031 "configure"
+#line 6095 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6052,8 +6116,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-  PLUGINS="${PLUGINS} dvd"
-          LIB_DVD="${LIB_DVD} -ldvdcss" 
+  PLUGINS="${PLUGINS} access/dvd/dvd"
+          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
 else
   echo "$ac_t""no" 1>&6
 echo "configure: warning: libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin." 1>&2
@@ -6063,9 +6127,9 @@ done
 
     else
       echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
-echo "configure:6067: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
+echo "configure:6131: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
       real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
-      if test "x$real_dvdcss_tree" = x
+      if test "x${real_dvdcss_tree}" = "x"
       then
                 echo "$ac_t""no" 1>&6
         { echo "configure: error: cannot cd to ${with_dvdcss_tree}" 1>&2; exit 1; }
@@ -6073,9 +6137,9 @@ echo "configure:6067: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
       if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
       then
                 echo "$ac_t""${real_dvdcss_tree}/src/.libs/libdvdcss.a" 1>&6
-        BUILTINS="${BUILTINS} dvd"
-        LIB_DVD="${LIB_DVD} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
-        CFLAGS_DVD="${CFLAGS_DVD} -I${real_dvdcss_tree}/src"
+        BUILTINS="${BUILTINS} access/dvd/dvd"
+        dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
+        dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
       else
                 echo "$ac_t""no" 1>&6
         { echo "configure: error: cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}" 1>&2; exit 1; }
@@ -6083,19 +6147,19 @@ echo "configure:6067: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
     fi
   ;;
   xno)
-        PLUGINS="${PLUGINS} dvd"
-    CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
-    LIB_DVD="${LIB_DVD} -ldl"
+        PLUGINS="${PLUGINS} access/dvd/dvd"
+    dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
+    dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
   ;;
   *)
     echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
-echo "configure:6093: checking for dvdcss headers in ${with_dvdcss}" >&5
+echo "configure:6157: checking for dvdcss headers in ${with_dvdcss}" >&5
     if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
     then
             echo "$ac_t""yes" 1>&6
-      PLUGINS="${PLUGINS} dvd"
-      LIB_DVD="${LIB_DVD} -L${with_dvdcss}/lib -ldvd"
-      CFLAGS_DVD="${CFLAGS_DVD} -I${with_dvdcss}/include"
+      PLUGINS="${PLUGINS} access/dvd/dvd"
+      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
+      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
     else
             echo "$ac_t""no" 1>&6
       { echo "configure: error: cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h" 1>&2; exit 1; }
@@ -6110,7 +6174,7 @@ if test "${enable_dvdread+set}" = set; then
   :
 fi
 
-if test "x$enableval" != "xno"
+if test "x${enable_dvdread}" != "xno"
 then
   # Check whether --with-dvdread or --without-dvdread was given.
 if test "${with_dvdread+set}" = set; then
@@ -6118,23 +6182,30 @@ if test "${with_dvdread+set}" = set; then
   :
 fi
 
-  case "x$with_dvdread" in
-  x)
-    for ac_hdr in dvdread/dvd_reader.h
+  if test "x${with_dvdread}" = "x"
+  then
+    test_LDFLAGS=""
+    test_CFLAGS=""
+  else
+    test_LDFLAGS="-L${with_dvdread}/lib"
+    test_CFLAGS="-I${with_dvdread}/include"
+  fi
+  CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+  for ac_hdr in dvdread/dvd_reader.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6128: checking for $ac_hdr" >&5
+echo "configure:6199: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6133 "configure"
+#line 6204 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6154,177 +6225,91 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-  PLUGINS="${PLUGINS} dvdread"
-        LIB_DVDREAD="${LIB_DVDREAD} -ldvdread" 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-  ;;
-  *)
-    echo $ac_n "checking for dvdread headers in ${withval}""... $ac_c" 1>&6
-echo "configure:6168: checking for dvdread headers in ${withval}" >&5
-    if test -f ${withval}/include/dvdread/dvd_reader.h
-    then
-      echo "$ac_t""yes" 1>&6
-      PLUGINS="${PLUGINS} dvdread"
-      LIB_DVDREAD="${LIB_DVDREAD} -L${withval}/lib -ldvdread"
-      CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I${withval}/include"
-    else
-      echo "$ac_t""no" 1>&6
-      { echo "configure: error: Cannot find ${withval}/dvdread/dvd_reader.h" 1>&2; exit 1; }
-    fi
-  ;;
-  esac
-fi
-
-# Check whether --enable-vcd or --disable-vcd was given.
-if test "${enable_vcd+set}" = set; then
-  enableval="$enable_vcd"
-  :
-fi
-
-
-if test x$enable_vcd != xno
-then
-  cat > conftest.$ac_ext <<EOF
-#line 6193 "configure"
-#include "confdefs.h"
-#include <linux/cdrom.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "cdrom_msf0" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-    PLUGINS="${PLUGINS} vcd"
-  
-fi
-rm -f conftest*
-
-
-  if test "x${SYS}" = "xbsdi"
-  then
-    PLUGINS="${PLUGINS} vcd"
-  fi
-
-  if test "x${SYS}" = "xdarwin"
-  then
-    PLUGINS="${PLUGINS} vcd"
-    LIB_VCD="${LIB_VCD} -framework IOKit -framework CoreFoundation" 
-  fi
-fi
-
-# Check whether --enable-satellite or --disable-satellite was given.
-if test "${enable_satellite+set}" = set; then
-  enableval="$enable_satellite"
-   if test x$enable_satellite = xyes
-    then
-      BUILTINS="${BUILTINS} satellite"
-      cat >> confdefs.h <<\EOF
-#define HAVE_SATELLITE 1
-EOF
-
-    fi
-fi
-
-
-echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
-echo "configure:6234: checking for inet_pton" >&5
-if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6239 "configure"
+     cat > conftest.$ac_ext <<EOF
+#line 6231 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char inet_pton(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char inet_pton();
-
+#include <dvdread/dvd_reader.h>
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_inet_pton) || defined (__stub___inet_pton)
-choke me
-#else
-inet_pton();
-#endif
-
+void foo() { int i=DVD_VIDEO_LB_LEN; }
 ; return 0; }
 EOF
-if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_func_inet_pton=yes"
+  
+          PLUGINS="${PLUGINS} access/dvdread/dvdread"
+          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
+          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
+        
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_inet_pton=no"
+  
+          if test "x${enable_dvdread}" != "x"
+          then
+            { echo "configure: error: Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later" 1>&2; exit 1; }
+          fi
+        
 fi
 rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  PLUGINS="${PLUGINS} ipv6"
+  
 else
   echo "$ac_t""no" 1>&6
+if test "x${enable_dvdread}" != "x"
+    then
+      if test "x${with_dvdread}" != "x"
+      then
+        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include" 1>&2; exit 1; }
+      else
+        { echo "configure: error: Cannot find dvdread/dvd_reader.h" 1>&2; exit 1; }
+      fi
+    fi
+  
 fi
+done
 
-
-
-# Check whether --with- or --without- was given.
-if test "${with_+set}" = set; then
-  withval="$with_"
-  :
+  CPPFLAGS="$save_CPPFLAGS"
 fi
 
-
-# Check whether --enable-mad or --disable-mad was given.
-if test "${enable_mad+set}" = set; then
-  enableval="$enable_mad"
+# Check whether --enable-dvdplay or --disable-dvdplay was given.
+if test "${enable_dvdplay+set}" = set; then
+  enableval="$enable_dvdplay"
   :
 fi
 
-if test x$enable_mad = xyes
+if test "x$enable_dvdplay" != "xno"
 then
-  PLUGINS="${PLUGINS} mad"
-  LIB_MAD="${LIB_MAD} -lmad"
-  # Check whether --with-mad or --without-mad was given.
-if test "${with_mad+set}" = set; then
-  withval="$with_mad"
-   if test "x$with_val" != "xno" -a "x$with_val" != "x"
-      then
-        CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
-        LIB_MAD="${LIB_MAD} -L$with_val/lib"
-      fi 
+  # Check whether --with-dvdplay or --without-dvdplay was given.
+if test "${with_dvdplay+set}" = set; then
+  withval="$with_dvdplay"
+  :
 fi
 
-  save_CFLAGS=$CFLAGS
-  save_LDFLAGS=$LDFLAGS
-  CFLAGS="$CFLAGS $CFLAGS_MAD"
-  LDFLAGS="$LDFLAGS $LIB_MAD"
-  for ac_hdr in mad.h
+  if test "x$with_dvdplay" = x
+  then
+    test_LDFLAGS=""
+    test_CFLAGS=""
+  else
+    test_LDFLAGS="-L${with_dvdplay}/lib"
+    test_CFLAGS="-I${with_dvdplay}/include"
+  fi
+  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
+  for ac_hdr in dvdplay/dvdplay.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6318: checking for $ac_hdr" >&5
+echo "configure:6303: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6323 "configure"
+#line 6308 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6345,35 +6330,864 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
+      PLUGINS="${PLUGINS} access/dvdplay/dvdplay"
+      dvdplay_LDFLAGS="${dvdplay_LDFLAGS} ${test_LDFLAGS} -ldvdplay -ldvdread"
+      dvdplay_CFLAGS="${dvdplay_CFLAGS} ${test_CFLAGS}"
+    
 else
   echo "$ac_t""no" 1>&6
-echo "Cannot find development headers for libmad..."
-    exit 1
+if test "x$enable_dvdplay" != x
+    then
+      if test "x$with_dvdplay" != x
+      then
+        { echo "configure: error: Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include" 1>&2; exit 1; }
+      else
+        { echo "configure: error: Cannot find dvdplay/dvdplay.h" 1>&2; exit 1; }
+      fi
+    fi
   
 fi
 done
 
-  echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6358: checking for mad_bit_init in -lmad" >&5
+  CPPFLAGS="${save_CPPFLAGS}"
+fi
+
+
+# Check whether --enable-dvbpsi or --disable-dvbpsi was given.
+if test "${enable_dvbpsi+set}" = set; then
+  enableval="$enable_dvbpsi"
+  :
+fi
+
+if test "x${enable_dvbpsi}" != "xno"
+then
+  # Check whether --with-dvbpsi or --without-dvbpsi was given.
+if test "${with_dvbpsi+set}" = set; then
+  withval="$with_dvbpsi"
+  :
+fi
+
+  # Check whether --with-dvbpsi or --without-dvbpsi was given.
+if test "${with_dvbpsi+set}" = set; then
+  withval="$with_dvbpsi"
+  :
+fi
+
+  case "x${with_dvbpsi}" in
+  x|xyes)
+    if test "x${with_dvbpsi_tree}" = "x"
+    then
+      for ac_hdr in dvbpsi/dr.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6385: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6390 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+  PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
+          ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} -ldvbpsi" 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    else
+      echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
+echo "configure:6424: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
+      real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
+      if test "x${real_dvbpsi_tree}" = "x"
+      then
+                echo "$ac_t""no" 1>&6
+        { echo "configure: error: cannot cd to ${with_dvbpsi_tree}" 1>&2; exit 1; }
+      fi
+      if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+      then
+                echo "$ac_t""${real_dvbpsi_tree}/src/.libs/libdvbpsi.a" 1>&6
+        BUILTINS="${BUILTINS} demux/mpeg/ts_dvbpsi"
+        ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
+        ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
+      else
+                echo "$ac_t""no" 1>&6
+        { echo "configure: error: cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}" 1>&2; exit 1; }
+      fi
+    fi
+  ;;
+  xno)
+      ;;
+  *)
+    echo $ac_n "checking for dvbpsi headers in ${with_dvbpsi}""... $ac_c" 1>&6
+echo "configure:6447: checking for dvbpsi headers in ${with_dvbpsi}" >&5
+    if test "x${with_dvbpsi}" = "x"
+    then
+      test_LDFLAGS=""
+      test_CFLAGS=""
+    else
+      test_LDFLAGS="-L${with_dvbpsi}/lib"
+      test_CFLAGS="-I${with_dvbpsi}/include"
+    fi
+    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+    ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
+echo "configure:6459: checking for dvbpsi/dr.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6464 "configure"
+#include "confdefs.h"
+#include <dvbpsi/dr.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+      PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
+      ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
+      ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
+      
+else
+  echo "$ac_t""no" 1>&6
+
+      if test "x${enable_dvbpsi}" != "x"
+      then
+        { echo "configure: error: Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1" 1>&2; exit 1; }
+      fi
+    
+fi
+
+    CPPFLAGS="${save_CPPFLAGS}"
+  ;;
+  esac
+fi
+
+# Check whether --enable-v4l or --disable-v4l was given.
+if test "${enable_v4l+set}" = set; then
+  enableval="$enable_v4l"
+  :
+fi
+
+if test "x${enable_v4l}" = "xyes"
+then
+  for ac_hdr in libv4l/v4l.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6517: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6522 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+    PLUGINS="${PLUGINS} access/v4l/v4l"
+   
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+# Check whether --enable-vcd or --disable-vcd was given.
+if test "${enable_vcd+set}" = set; then
+  enableval="$enable_vcd"
+  :
+fi
+
+
+if test "x${enable_vcd}" != "xno"
+then
+  cat > conftest.$ac_ext <<EOF
+#line 6567 "configure"
+#include "confdefs.h"
+#include <linux/cdrom.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "cdrom_msf0" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+    PLUGINS="${PLUGINS} access/vcd/vcd"
+  
+fi
+rm -f conftest*
+
+  
+  cat > conftest.$ac_ext <<EOF
+#line 6582 "configure"
+#include "confdefs.h"
+#include <sys/cdio.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ioc_toc_header " >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+    PLUGINS="${PLUGINS} access/vcd/vcd"
+    cat >> confdefs.h <<\EOF
+#define HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H 1
+EOF
+
+  
+fi
+rm -f conftest*
+
+  
+  if test "x${SYS}" = "xbsdi"
+  then
+    PLUGINS="${PLUGINS} access/vcd/vcd"
+  fi
+
+  if test "x${SYS}" = "xdarwin"
+  then
+    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
+    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
+  fi
+fi
+
+# Check whether --enable-satellite or --disable-satellite was given.
+if test "${enable_satellite+set}" = set; then
+  enableval="$enable_satellite"
+   if test "x${enable_satellite}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} access/satellite/satellite"
+    fi
+fi
+
+
+if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
+then
+  have_ipv6=0
+  echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
+echo "configure:6626: checking for inet_pton" >&5
+if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6631 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char inet_pton(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char inet_pton();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_inet_pton) || defined (__stub___inet_pton)
+choke me
+#else
+inet_pton();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_inet_pton=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_inet_pton=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_ipv6=1
+else
+  echo "$ac_t""no" 1>&6
+
+    echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
+echo "configure:6673: checking for inet_pton in -lresolv" >&5
+ac_lib_var=`echo resolv'_'inet_pton | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6681 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char inet_pton();
+
+int main() {
+inet_pton()
+; return 0; }
+EOF
+if { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_ipv6=1
+       ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  
+fi
+
+  echo $ac_n "checking for sockaddr_in6 in netinet/in.h""... $ac_c" 1>&6
+echo "configure:6717: checking for sockaddr_in6 in netinet/in.h" >&5
+  cat > conftest.$ac_ext <<EOF
+#line 6719 "configure"
+#include "confdefs.h"
+#include <netinet/in.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "sockaddr_in6" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+else
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6; have_ipv6=0
+fi
+rm -f conftest*
+
+  if test x$have_ipv6 = x1; then
+    PLUGINS="${PLUGINS} misc/network/ipv6"
+  fi
+fi
+if test "x${SYS}" = "xmingw32"
+then
+  echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
+echo "configure:6740: checking for getaddrinfo in ws2tcpip.h" >&5
+  cat > conftest.$ac_ext <<EOF
+#line 6742 "configure"
+#include "confdefs.h"
+#include <ws2tcpip.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "addrinfo" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+    PLUGINS="${PLUGINS} misc/network/ipv6"
+else
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+fi
+
+# Check whether --enable-avi or --disable-avi was given.
+if test "${enable_avi+set}" = set; then
+  enableval="$enable_avi"
+  :
+fi
+
+if test "x${enable_avi}" != "xno"
+then
+  PLUGINS="${PLUGINS} demux/avi/avi"
+fi
+
+# Check whether --enable-aac or --disable-aac was given.
+if test "${enable_aac+set}" = set; then
+  enableval="$enable_aac"
+  :
+fi
+
+if test "x${enable_aac}" != "xno"
+then
+  PLUGINS="${PLUGINS} demux/aac/aac"
+fi
+
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+# Check whether --enable-mad or --disable-mad was given.
+if test "${enable_mad+set}" = set; then
+  enableval="$enable_mad"
+  :
+fi
+
+if test "x${enable_mad}" = "xyes"
+then
+  # Check whether --with-mad or --without-mad was given.
+if test "${with_mad+set}" = set; then
+  withval="$with_mad"
+  :
+fi
+
+  if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
+  then
+    mad_CFLAGS="${mad_CFLAGS} -I${with_mad}/include"
+    mad_LDFLAGS="${mad_LDFLAGS} -L${with_mad}/lib"
+  fi
+
+  # Check whether --with-mad-tree or --without-mad-tree was given.
+if test "${with_mad_tree+set}" = set; then
+  withval="$with_mad_tree"
+  :
+fi
+
+  if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
+  then
+    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
+    if test "x${real_mad_tree}" = "x"
+    then
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
+    fi
+        echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
+echo "configure:6824: checking for mad.h in ${real_mad_tree}/libmad" >&5
+    if test -f ${real_mad_tree}/libmad/mad.h
+    then
+      echo "$ac_t""yes" 1>&6
+      mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
+      mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
+      LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
+      echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
+echo "configure:6832: checking for mad_bit_init in -lmad" >&5
 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lmad  $LIBS"
+LIBS="-lmad  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6840 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char mad_bit_init();
+
+int main() {
+mad_bit_init()
+; return 0; }
+EOF
+if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+        BUILTINS="${BUILTINS} codec/mad/mad"
+        mad_LDFLAGS="${mad_LDFLAGS} -lmad"
+        
+else
+  echo "$ac_t""no" 1>&6
+ { echo "configure: error: the specified tree hasn't been compiled " 1>&2; exit 1; }
+      
+fi
+
+      LDFLAGS="${save_LDFLAGS}"
+    else
+      echo "$ac_t""no" 1>&6
+      { echo "configure: error: the specified tree doesn't have mad.h" 1>&2; exit 1; }
+    fi
+  else
+    CFLAGS="${save_CFLAGS} ${mad_CFLAGS}"
+    LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
+    for ac_hdr in mad.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6888: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6893 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Cannot find development headers for libmad..." 1>&2; exit 1; } 
+fi
+done
+
+    echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
+echo "configure:6926: checking for mad_bit_init in -lmad" >&5
+ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lmad  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6934 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char mad_bit_init();
+
+int main() {
+mad_bit_init()
+; return 0; }
+EOF
+if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+      PLUGINS="${PLUGINS} codec/mad/mad"
+      mad_LDFLAGS="${mad_LDFLAGS} -lmad" 
+else
+  echo "$ac_t""no" 1>&6
+ { echo "configure: error: Cannot find libmad library..." 1>&2; exit 1; } 
+fi
+
+    CFLAGS="${save_CFLAGS}"
+    LDFLAGS="${save_LDFLAGS}"
+  fi
+fi
+
+# Check whether --enable-ffmpeg or --disable-ffmpeg was given.
+if test "${enable_ffmpeg+set}" = set; then
+  enableval="$enable_ffmpeg"
+  :
+fi
+
+if test "x${enable_ffmpeg}" = "xyes"
+then
+  # Check whether --with-ffmpeg or --without-ffmpeg was given.
+if test "${with_ffmpeg+set}" = set; then
+  withval="$with_ffmpeg"
+  :
+fi
+
+  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
+  then
+    ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${with_ffmpeg}/include/libffmpeg"
+    ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L${with_ffmpeg}/lib"
+  fi
+
+    PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_c"
+  if test "x${ac_cv_mmx_inline}" != "xno"; then
+    PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_mmx"
+  fi
+
+  if test "x${ac_cv_mmxext_inline}" != "xno"; then
+    PLUGINS="${PLUGINS} codec/ffmpeg/postprocessing/postprocessing_mmxext"
+  fi
+
+
+  # Check whether --with-ffmpeg-tree or --without-ffmpeg-tree was given.
+if test "${with_ffmpeg_tree+set}" = set; then
+  withval="$with_ffmpeg_tree"
+  :
+fi
+
+  if test "x${with_ffmpeg_tree}" != "x"
+  then
+    echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
+echo "configure:7012: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
+    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
+    if test "x${real_ffmpeg_tree}" = x
+    then
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: cannot cd to ${with_ffmpeg_tree}" 1>&2; exit 1; }
+    fi
+    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
+    then
+            echo "$ac_t""${real_ffmpeg_tree}/libavcodec/libavcodec.a" 1>&6
+      BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
+      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
+      ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
+    else
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}" 1>&2; exit 1; }
+    fi
+  else
+    CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
+    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
+    echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
+echo "configure:7033: checking for avcodec_init in -lavcodec" >&5
+ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lavcodec  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7041 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char avcodec_init();
+
+int main() {
+avcodec_init()
+; return 0; }
+EOF
+if { (eval echo configure:7052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+      BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
+      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" 
+else
+  echo "$ac_t""no" 1>&6
+ { echo "configure: error: Cannot find libavcodec library..." 1>&2; exit 1; } 
+fi
+
+    LDFLAGS="${save_LDFLAGS}"
+    CFLAGS="${save_CFLAGS}"
+  fi
+fi
+
+# Check whether --enable-faad or --disable-faad was given.
+if test "${enable_faad+set}" = set; then
+  enableval="$enable_faad"
+  :
+fi
+
+if test "x${enable_faad}" = "xyes"
+then
+  # Check whether --with-faad or --without-faad was given.
+if test "${with_faad+set}" = set; then
+  withval="$with_faad"
+  :
+fi
+
+  if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
+  then
+    faad_CFLAGS="${faad_CFLAGS} -I${with_faad}/include"
+    faad_LDFLAGS="${faad_LDFLAGS} -L${with_faad}/lib"
+  fi
+  faad_LDFLAGS="${faad_LDFLAGS} -lm"
+
+  # Check whether --with-faad-tree or --without-faad-tree was given.
+if test "${with_faad_tree+set}" = set; then
+  withval="$with_faad_tree"
+  :
+fi
+
+  if test "x${with_faad_tree}" != "x"
+  then
+    echo $ac_n "checking for libfaad.a in ${with_faad_tree}""... $ac_c" 1>&6
+echo "configure:7110: checking for libfaad.a in ${with_faad_tree}" >&5
+    real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
+    if test "x${real_faad_tree}" = x
+    then
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: cannot cd to ${with_faad_tree}" 1>&2; exit 1; }
+    fi
+    if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
+    then
+            echo "$ac_t""${real_faad_tree}/libfaad/.libs/libfaad.a" 1>&6
+      BUILTINS="${BUILTINS} codec/faad/faad"
+      faad_LDFLAGS="${faad_LDFLAGS} ${real_faad_tree}/libfaad/.libs/libfaad.a"
+      faad_CFLAGS="${faad_CFLAGS} -I${real_faad_tree}/include"
+    else
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}" 1>&2; exit 1; }
+    fi
+  else
+    CFLAGS="${save_CFLAGS} ${faad_CFLAGS}"
+    LDFLAGS="${save_LDFLAGS} ${faad_LDFLAGS}"
+    for ac_hdr in faad.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7134: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7139 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Cannot find development headers for libfaad..." 1>&2; exit 1; } 
+fi
+done
+
+    echo $ac_n "checking for faacDecOpen in -lfaad""... $ac_c" 1>&6
+echo "configure:7172: checking for faacDecOpen in -lfaad" >&5
+ac_lib_var=`echo faad'_'faacDecOpen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lfaad  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6366 "configure"
+#line 7180 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char mad_bit_init();
+char faacDecOpen();
 
 int main() {
-mad_bit_init()
+faacDecOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:6377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6388,54 +7202,309 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  
+      PLUGINS="${PLUGINS} codec/faad/faad"
+      faad_LDFLAGS="${faad_LDFLAGS} -lfaad" 
+else
+  echo "$ac_t""no" 1>&6
+ { echo "configure: error: Cannot find libfaad library..." 1>&2; exit 1; } 
+fi
+
+    LDFLAGS="${save_LDFLAGS}"
+    CFLAGS="${save_CFLAGS}"
+  fi
+fi
+
+
+
+# Check whether --enable-mp4 or --disable-mp4 was given.
+if test "${enable_mp4+set}" = set; then
+  enableval="$enable_mp4"
+  :
+fi
+
+if test "x${enable_mp4}" != "xno"
+then
+
+    PLUGINS="${PLUGINS} demux/mp4/mp4"
+    for ac_hdr in zlib.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7235: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7240 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+#define $ac_tr_hdr 1
+EOF
+  mp4_LDFLAGS="${mp4_LDFLAGS} -lz"  
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+# Check whether --enable-a52 or --disable-a52 was given.
+if test "${enable_a52+set}" = set; then
+  enableval="$enable_a52"
+  :
+fi
+
+if test "x${enable_a52}" != "xno"
+then
+  # Check whether --with-a52 or --without-a52 was given.
+if test "${with_a52+set}" = set; then
+  withval="$with_a52"
+  :
+fi
+
+  # Check whether --with-a52-tree or --without-a52-tree was given.
+if test "${with_a52_tree+set}" = set; then
+  withval="$with_a52_tree"
+  :
+fi
+
+  if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
+  then
+    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
+    if test "x${real_a52_tree}" = "x"
+    then
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
+    fi
+        echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
+echo "configure:7302: checking for a52.h in ${real_a52_tree}/include" >&5
+    if test -f ${real_a52_tree}/include/a52.h
+    then
+      echo "$ac_t""yes" 1>&6
+      a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
+      a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
+      LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
+      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
+echo "configure:7310: checking for a52_free in -la52" >&5
+ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-la52 -lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7318 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char a52_free();
+
+int main() {
+a52_free()
+; return 0; }
+EOF
+if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+        BUILTINS="${BUILTINS} codec/a52"
+        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
+        a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
+        
+else
+  echo "$ac_t""no" 1>&6
+
+        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
+        then
+          { echo "configure: error: make sure you have at least a52dec-0.7.3" 1>&2; exit 1; }
+        else
+          { echo "configure: error: the specified tree hasn't been compiled" 1>&2; exit 1; }
+        fi
+      
+fi
+
+      LDFLAGS="${save_LDFLAGS}"
+    else
+      echo "$ac_t""no" 1>&6
+      { echo "configure: error: the specified tree doesn't have a52.h" 1>&2; exit 1; }
+    fi
+  else
+    if test "x${with_a52}" = "x"
+    then
+      test_LDFLAGS=""
+      test_CFLAGS=""
+    else
+      test_LDFLAGS="-L${with_a52}/lib"
+      test_CFLAGS="-I${with_a52}/include"
+    fi
+    save_CPPFLAGS="${CPPFLAGS}"
+    save_LDFLAGS="${LDFLAGS}"
+    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+    LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}"
+    for ac_hdr in a52dec/a52.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7383: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7388 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
+echo "configure:7415: checking for a52_free in -la52" >&5
+ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-la52 -lm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7423 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char a52_free();
+
+int main() {
+a52_free()
+; return 0; }
 EOF
+if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+        BUILTINS="${BUILTINS} codec/a52"
+        a52_LDFLAGS="${a52_LDFLAGS} ${test_LDFLAGS} -la52 -lm"
+        a52_CFLAGS="${a52_CFLAGS} ${test_CFLAGS}"
+      
+else
+  echo "$ac_t""no" 1>&6
 
-  LIBS="-lmad $LIBS"
+        if test "x${enable_dvbpsi}" != "x"
+        then
+          { echo "configure: error: Could not find a52 on your system: you may get it from http://liba52.sf.net" 1>&2; exit 1; }
+        fi
+      
+fi
 
+    
 else
   echo "$ac_t""no" 1>&6
- echo "Cannot find libmad library..."
-    exit 1
-  
 fi
+done
 
-  CFLAGS=$save_CFLAGS
-  LDFLAGS=$save_LDFLAGS
+    CPPFLAGS="${save_CPPFLAGS}"
+    LDFLAGS="${save_LDFLAGS}"
+  fi
 fi
 
-if test x$SYS = xbeos
-then
-    PLUGINS="${PLUGINS} beos"
+# Check whether --enable-cinepak or --disable-cinepak was given.
+if test "${enable_cinepak+set}" = set; then
+  enableval="$enable_cinepak"
+  :
+fi
 
-else
+if test "x${enable_cinepak}" != "xno"
+then
+  PLUGINS="${PLUGINS} codec/cinepak/cinepak"
+fi
 
-# Check whether --enable-a52 or --disable-a52 was given.
-if test "${enable_a52+set}" = set; then
-  enableval="$enable_a52"
+# Check whether --enable-vorbis or --disable-vorbis was given.
+if test "${enable_vorbis+set}" = set; then
+  enableval="$enable_vorbis"
   :
 fi
 
-if test "x$enableval" != "xno" -a x$SYS != xmingw32
-  then
-    for ac_hdr in a52dec/a52.h
+if test "x${enable_vorbis}" != "xno"
+then
+  for ac_hdr in ogg/ogg.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6429: checking for $ac_hdr" >&5
+echo "configure:7498: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6434 "configure"
+#line 7503 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6456,9 +7525,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-      BUILTINS="${BUILTINS} a52"
-      LIB_A52="${LIB_A52} -la52 -lm"
-     
+        #PLUGINS="${PLUGINS} demux/ogg/ogg codec/vorbis/vorbis"
+    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
+   
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -6466,29 +7535,29 @@ done
 
 fi
 
-# Check whether --enable-vorbis or --disable-vorbis was given.
-if test "${enable_vorbis+set}" = set; then
-  enableval="$enable_vorbis"
+# Check whether --enable-dv or --disable-dv was given.
+if test "${enable_dv+set}" = set; then
+  enableval="$enable_dv"
   :
 fi
 
-if test "x$enableval" != "xno"
+if test "x${enable_dv}" = "xyes"
 then
-  for ac_hdr in ogg/ogg.h
+  for ac_hdr in libdv/dv.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6482: checking for $ac_hdr" >&5
+echo "configure:7551: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6487 "configure"
+#line 7556 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6509,15 +7578,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    PLUGINS="${PLUGINS} vorbis"
-    LIB_VORBIS="${LIB_VORBIS} -lvorbis"
+    BUILTINS="${BUILTINS} codec/dv/dv"
+    dv_LDFLAGS="${dv_LDFLAGS} -ldv"
    
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-fi
+fi  
 
 
 # Check whether --with- or --without- was given.
@@ -6533,31 +7602,24 @@ if test "${enable_x11+set}" = set; then
   :
 fi
 
-if test x$enable_x11 != xno &&
-  (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
-  if test x$x_includes = xNONE; then
-    x_includes=/usr/X11R6/include
-  fi
-  if test x$x_libraries = xNONE; then
-    x_libraries=/usr/X11R6/lib
-  fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS -I$x_includes"
+if test "x${enable_x11}" != "xno" &&
+  (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
+  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
   for ac_hdr in X11/Xlib.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6551: checking for $ac_hdr" >&5
+echo "configure:7613: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6556 "configure"
+#line 7618 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6578,16 +7640,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    PLUGINS="${PLUGINS} x11"
-    LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
-    CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
+    PLUGINS="${PLUGINS} video_output/x11/x11"
+    x11_LDFLAGS="${x11_LDFLAGS} -L${x_libraries} -lX11 -lXext"
+    x11_CFLAGS="${x11_CFLAGS} -I${x_includes}"
   
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-  CPPFLAGS=$saved_CPPFLAGS
+  CPPFLAGS="${save_CPPFLAGS}"
 fi
 
 # Check whether --enable-xvideo or --disable-xvideo was given.
@@ -6596,31 +7658,24 @@ if test "${enable_xvideo+set}" = set; then
   :
 fi
 
-if test x$enable_xvideo != xno &&
-  (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
-  if test x$x_includes = xNONE; then
-    x_includes=/usr/X11R6/include
-  fi
-  if test x$x_libraries = xNONE; then
-    x_libraries=/usr/X11R6/lib
-  fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS -I$x_includes"
+if test "x${enable_xvideo}" != "xno" &&
+  (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
+  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
   for ac_hdr in X11/extensions/Xv.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6614: checking for $ac_hdr" >&5
+echo "configure:7669: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6619 "configure"
+#line 7674 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6641,29 +7696,28 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    saved_CFLAGS=$CFLAGS
-    CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
-    echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
-echo "configure:6648: checking for XvSetPortAttribute in -lXv_pic" >&5
-ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
+    CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
+    echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
+echo "configure:7702: checking for XvPutImage in -lXv_pic" >&5
+ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lXv_pic  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6656 "configure"
+#line 7710 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char XvSetPortAttribute();
+char XvPutImage();
 
 int main() {
-XvSetPortAttribute()
+XvPutImage()
 ; return 0; }
 EOF
-if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6679,20 +7733,63 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   # We have Xv_pic, that's good, we can build an xvideo.so plugin !
-      PLUGINS="${PLUGINS} xvideo"
-      LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
-      CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
+      PLUGINS="${PLUGINS} video_output/x11/xvideo"
+      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv_pic"
+      xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for XvPutImage in -lXv""... $ac_c" 1>&6
+echo "configure:7743: checking for XvPutImage in -lXv" >&5
+ac_lib_var=`echo Xv'_'XvPutImage | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7751 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XvPutImage();
+
+int main() {
+XvPutImage()
+; return 0; }
+EOF
+if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
+        PLUGINS="${PLUGINS} video_output/x11/xvideo"
+        xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv"
+        xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
 else
   echo "$ac_t""no" 1>&6
-# We don't have Xv_pic, let's make xvideo.a as builtin
-      BUILTINS="${BUILTINS} xvideo"
-      LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
-      CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
+# Otherwise... well, do nothing.
+        :
+      
+fi
+
+    
 fi
 
-    CFLAGS=$saved_CFLAGS
+    CFLAGS="${save_CFLAGS}"
   
-  CPPFLAGS=$saved_CPPFLAGS
+  CPPFLAGS="${save_CPPFLAGS}"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -6706,22 +7803,22 @@ if test "${enable_sdl+set}" = set; then
   :
 fi
 
-if test "x$enable_sdl" != "xno"
+if test "x${enable_sdl}" != "xno"
 then
-  SDL_PATH=$PATH
+  SDL_PATH="${PATH}"
   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
 if test "${with_sdl_config_path+set}" = set; then
   withval="$with_sdl_config_path"
-   if test "x$withval" != "xno"
+   if test "x${with_sdl_config_path}" != "xno"
       then
-        SDL_PATH=$withval:$PATH
+        SDL_PATH="${with_sdl_config_path}:${PATH}"
       fi 
 fi
 
   # Extract the first word of "sdl12-config", so it can be a program name with args.
 set dummy sdl12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6725: checking for $ac_word" >&5
+echo "configure:7822: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6734,7 +7831,7 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$SDL_PATH"
+  ac_dummy="${SDL_PATH}"
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -6754,14 +7851,14 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-  SDL_CONFIG=${SDL12_CONFIG}
+  SDL_CONFIG="${SDL12_CONFIG}"
   SDL_HEADER="SDL12/SDL.h"
-  if test x${SDL_CONFIG} = xno
+  if test "x${SDL_CONFIG}" = "xno"
   then
     # Extract the first word of "sdl11-config", so it can be a program name with args.
 set dummy sdl11-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6765: checking for $ac_word" >&5
+echo "configure:7862: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6774,7 +7871,7 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$SDL_PATH"
+  ac_dummy="${SDL_PATH}"
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -6797,12 +7894,12 @@ fi
     SDL_CONFIG=${SDL11_CONFIG}
     SDL_HEADER="SDL11/SDL.h"
   fi
-  if test x${SDL_CONFIG} = xno
+  if test "x${SDL_CONFIG}" = "xno"
   then
     # Extract the first word of "sdl-config", so it can be a program name with args.
 set dummy sdl-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6806: checking for $ac_word" >&5
+echo "configure:7903: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6815,7 +7912,7 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$SDL_PATH"
+  ac_dummy="${SDL_PATH}"
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -6837,28 +7934,27 @@ fi
 
     SDL_HEADER="SDL/SDL.h"
   fi
-  if test x${SDL_CONFIG} != xno
+  if test "x${SDL_CONFIG}" != "xno"
   then
-    PLUGINS="${PLUGINS} sdl"
-    CFLAGS_SDL="${CFLAGS_SDL} `${SDL_CONFIG} --cflags`"
-    LIB_SDL="${LIB_SDL} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
-    save_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
+    PLUGINS="${PLUGINS} video_output/sdl audio_output/sdl"
+    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
+    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
+    CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
     for ac_hdr in ${SDL_HEADER}
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6852: checking for $ac_hdr" >&5
+echo "configure:7948: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6857 "configure"
+#line 7953 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6891,14 +7987,14 @@ Please install it and try again. Alternatively you can also configure with
 fi
 done
 
-    CPPFLAGS=$save_CPPFLAGS
-    if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
+    CPPFLAGS="${save_CPPFLAGS}"
+    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
     then
       { echo "configure: error: The development package for SDL is not installed.
 Please install it and try again. Alternatively you can also configure with
 --disable-sdl." 1>&2; exit 1; }
     fi
-  elif test "x$enable_sdl" =  "xyes"
+  elif test "x${enable_sdl}" =  "xyes"
   then
     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
@@ -6912,9 +8008,9 @@ if test "${enable_directx+set}" = set; then
   :
 fi
 
-if test "x$enableval" != "xno"
+if test "x${enable_directx}" != "xno"
 then
-  if test x$SYS = xmingw32
+  if test "x${SYS}" = "xmingw32"
   then
     # Check whether --with-directx or --without-directx was given.
 if test "${with_directx+set}" = set; then
@@ -6922,23 +8018,23 @@ if test "${with_directx+set}" = set; then
   :
 fi
 
-    if test "x$with_directx" = "x"
+    if test "x${with_directx}" = "x"
     then
       for ac_hdr in ddraw.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6932: checking for $ac_hdr" >&5
+echo "configure:8028: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6937 "configure"
+#line 8033 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6958,25 +8054,25 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-  PLUGINS="${PLUGINS} directx"
-        LIB_DIRECTX="${LIB_DIRECTX} -lgdi32" 
+  PLUGINS="${PLUGINS} video_output/directx/directx"
+        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
     else
-      echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
-echo "configure:6971: checking for directX headers in ${withval}" >&5
-      if test -f ${withval}/ddraw.h
+      echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
+echo "configure:8067: checking for directX headers in ${with_directx}" >&5
+      if test -f ${with_directx}/ddraw.h
       then
-        PLUGINS="${PLUGINS} directx"
-        LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
-        INCLUDE="${INCLUDE} -I${withval}"
+        PLUGINS="${PLUGINS} video_output/directx/directx"
+        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
+        directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
         echo "$ac_t""yes" 1>&6
       else
         echo "$ac_t""no" 1>&6
-        { echo "configure: error: Cannot find ${withval}/ddraw.h!" 1>&2; exit 1; }
+        { echo "configure: error: Cannot find ${with_directx}/ddraw.h!" 1>&2; exit 1; }
       fi
     fi
   fi
@@ -6988,23 +8084,23 @@ if test "${enable_fb+set}" = set; then
   :
 fi
 
-    if test x$enable_fb != xno
+    if test "x${enable_fb}" != "xno"
     then
       for ac_hdr in linux/fb.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6998: checking for $ac_hdr" >&5
+echo "configure:8094: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7003 "configure"
+#line 8099 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7025,7 +8121,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-        PLUGINS="${PLUGINS} fb"
+        PLUGINS="${PLUGINS} video_output/fb"
       
 else
   echo "$ac_t""no" 1>&6
@@ -7037,9 +8133,9 @@ done
 # Check whether --enable-mga or --disable-mga was given.
 if test "${enable_mga+set}" = set; then
   enableval="$enable_mga"
-   if test x$enable_mga = xyes
+   if test "x${enable_mga}" = "xyes"
     then
-      PLUGINS="${PLUGINS} mga xmga"
+      PLUGINS="${PLUGINS} video_output/mga/mga video_output/mga/xmga"
     fi 
 fi
 
@@ -7050,17 +8146,17 @@ if test "${enable_ggi+set}" = set; then
   :
 fi
 
-if test x$enable_ggi = xyes
+if test "x${enable_ggi}" = "xyes"
 then
-  PLUGINS="${PLUGINS} ggi"
-  LIB_GGI="${LIB_GGI} -lggi"
+  PLUGINS="${PLUGINS} video_output/ggi"
+  ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
   # Check whether --with-ggi or --without-ggi was given.
 if test "${with_ggi+set}" = set; then
   withval="$with_ggi"
-   if test "x$with_val" != "xno" -a "x$with_val" != "x"
+   if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
       then
-        CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include"
-        LIB_GGI="${LIB_GGI} -L$with_val/lib"
+        CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
+        ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
       fi 
 fi
 
@@ -7072,18 +8168,18 @@ if test "${enable_glide+set}" = set; then
   :
 fi
 
-if test x$enable_glide = xyes
+if test "x${enable_glide}" = "xyes"
 then
-  PLUGINS="${PLUGINS} glide"
-  LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
-  CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
+  PLUGINS="${PLUGINS} video_output/glide"
+  glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
+  glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
   # Check whether --with-glide or --without-glide was given.
 if test "${with_glide+set}" = set; then
   withval="$with_glide"
-   if test "x$with_val" != "xno" -a "x$with_val" != "x"
+   if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
       then
-        CFLAGS_GLIDE="${CFLAGS_GLIDE} -I$with_val/include"
-        LIB_GLIDE="${LIB_GLIDE} -L$with_val/lib"
+        glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
+        glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
       fi 
 fi
 
@@ -7095,21 +8191,21 @@ if test "${enable_aa+set}" = set; then
   :
 fi
 
-if test x$enable_aa = xyes
+if test "x${enable_aa}" = "xyes"
 then
   ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
-echo "configure:7103: checking for aalib.h" >&5
+echo "configure:8199: checking for aalib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7108 "configure"
+#line 8204 "configure"
 #include "confdefs.h"
 #include <aalib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7131,10 +8227,10 @@ else
 have_aa="false"
 fi
 
-  if test x$have_aa = xtrue
+  if test "x${have_aa}" = "xtrue"
   then
-    PLUGINS="${PLUGINS} aa"
-    LIB_AA="${LIB_AA} -laa"
+    PLUGINS="${PLUGINS} video_output/aa"
+    aa_LDFLAGS="${aa_LDFLAGS} -laa"
   fi
 fi
 
@@ -7146,31 +8242,31 @@ if test "${with_+set}" = set; then
 fi
 
 
-# Check whether --enable-dsp or --disable-dsp was given.
-if test "${enable_dsp+set}" = set; then
-  enableval="$enable_dsp"
+# Check whether --enable-oss or --disable-oss was given.
+if test "${enable_oss+set}" = set; then
+  enableval="$enable_oss"
   :
 fi
 
 
-if test x$enable_dsp != xno &&
-  (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
+if test "x${enable_oss}" != "xno" &&
+  (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
 then
   for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7164: checking for $ac_hdr" >&5
+echo "configure:8260: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7169 "configure"
+#line 8265 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7191,9 +8287,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    PLUGINS="${PLUGINS} dsp"
+    PLUGINS="${PLUGINS} audio_output/oss"
     echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
-echo "configure:7197: checking for main in -lossaudio" >&5
+echo "configure:8293: checking for main in -lossaudio" >&5
 ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7201,14 +8297,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lossaudio  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7205 "configure"
+#line 8301 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7223,7 +8319,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_DSP="${LIB_DSP} -lossaudio"
+  oss_LDFLAGS="${oss_LDFLAGS} -lossaudio"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -7239,12 +8335,12 @@ fi
 # Check whether --enable-esd or --disable-esd was given.
 if test "${enable_esd+set}" = set; then
   enableval="$enable_esd"
-  if test x$enable_esd = xyes
+  if test "x${enable_esd}" = "xyes"
    then
      # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7248: checking for $ac_word" >&5
+echo "configure:8344: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7277,11 +8373,11 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-     if test x${ESD_CONFIG} != xno
+     if test "x${ESD_CONFIG}" != "xno"
      then
-       PLUGINS="${PLUGINS} esd"
-       CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
-       LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
+       #PLUGINS="${PLUGINS} audio_output/esd"
+       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
+       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
      fi
    fi
 fi
@@ -7290,12 +8386,12 @@ fi
 # Check whether --enable-arts or --disable-arts was given.
 if test "${enable_arts+set}" = set; then
   enableval="$enable_arts"
-  if test x$enable_arts = xyes
+  if test "x${enable_arts}" = "xyes"
    then
      # Extract the first word of "artsc-config", so it can be a program name with args.
 set dummy artsc-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7299: checking for $ac_word" >&5
+echo "configure:8395: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7321,41 +8417,253 @@ else
   ;;
 esac
 fi
-ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
-if test -n "$ARTS_CONFIG"; then
-  echo "$ac_t""$ARTS_CONFIG" 1>&6
+ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
+if test -n "$ARTS_CONFIG"; then
+  echo "$ac_t""$ARTS_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+     if test "x${ARTS_CONFIG}" != "xno"
+     then
+       #PLUGINS="${PLUGINS} audio_output/arts"
+       arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
+       arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
+     fi
+   fi
+fi
+
+
+# Check whether --enable-alsa or --disable-alsa was given.
+if test "${enable_alsa+set}" = set; then
+  enableval="$enable_alsa"
+  if test "x${enable_alsa}" = "xyes"
+   then
+     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
+echo "configure:8445: checking for alsa/asoundlib.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 8450 "configure"
+#include "confdefs.h"
+#include <alsa/asoundlib.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
+echo "configure:8472: checking for main in -lasound" >&5
+ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lasound  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 8480 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:8487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_alsa="true"
+else
+  echo "$ac_t""no" 1>&6
+have_alsa="false"
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+have_alsa="false"
+fi
+
+     if test "x${have_alsa}" = "xtrue"
+     then
+       #PLUGINS="${PLUGINS} audio_output/alsa"
+       alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
+     fi
+   fi
+fi
+
+
+# Check whether --enable-waveout or --disable-waveout was given.
+if test "${enable_waveout+set}" = set; then
+  enableval="$enable_waveout"
+  :
+fi
+
+if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
+  then
+    PLUGINS="${PLUGINS} audio_output/waveout"
+    waveout_LDFLAGS="-lwinmm"
+fi
+
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+if test "x${SYS}" = "xbeos"
+then
+    PLUGINS="${PLUGINS} gui/beos/beos"
+fi
+
+# Check whether --enable-gtk or --disable-gtk was given.
+if test "${enable_gtk+set}" = set; then
+  enableval="$enable_gtk"
+  :
+fi
+
+if test "x${enable_gtk}" != "xno"
+then
+  GTK_PATH="${PATH}"
+  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
+if test "${with_gtk_config_path+set}" = set; then
+  withval="$with_gtk_config_path"
+   if test "x${with_gtk_config_path}" != "xno"
+      then
+        GTK_PATH="${with_gtk_config_path}:${PATH}"
+      fi 
+fi
+
+  # look for gtk-config
+  # Extract the first word of "gtk12-config", so it can be a program name with args.
+set dummy gtk12-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:8569: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GTK12_CONFIG" in
+  /*)
+  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="${GTK_PATH}"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
+  ;;
+esac
+fi
+GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
+if test -n "$GTK12_CONFIG"; then
+  echo "$ac_t""$GTK12_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  GTK_CONFIG=${GTK12_CONFIG}
+  if test "x${GTK_CONFIG}" = "xno"
+  then
+    # Extract the first word of "gtk-config", so it can be a program name with args.
+set dummy gtk-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:8608: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GTK_CONFIG" in
+  /*)
+  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="${GTK_PATH}"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
+  ;;
+esac
+fi
+GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
+if test -n "$GTK_CONFIG"; then
+  echo "$ac_t""$GTK_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-     if test x${ARTS_CONFIG} != xno
-     then
-       PLUGINS="${PLUGINS} arts"
-       CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
-       LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
-     fi
-   fi
-fi
-
-
-# Check whether --enable-alsa or --disable-alsa was given.
-if test "${enable_alsa+set}" = set; then
-  enableval="$enable_alsa"
-  if test x$enable_alsa = xyes
-   then
-     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
-echo "configure:7349: checking for alsa/asoundlib.h" >&5
+  fi
+  if test "x${GTK_CONFIG}" != "xno"
+  then
+    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
+    then
+      { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk." 1>&2; exit 1; }
+    fi
+    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
+    gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+    # now look for the gtk.h header
+    CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
+    ac_cv_gtk_headers=yes
+    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:8657: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7354 "configure"
+#line 8662 "configure"
 #include "confdefs.h"
-#include <alsa/asoundlib.h>
+#include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7371,92 +8679,43 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:7376: checking for main in -lasound" >&5
-ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lasound  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7384 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
 EOF
-if { (eval echo configure:7391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  have_alsa="true"
-else
-  echo "$ac_t""no" 1>&6
-have_alsa="false"
-fi
-
 else
   echo "$ac_t""no" 1>&6
-have_alsa="false"
-fi
-
-     if test x$have_alsa = xtrue
-     then
-       PLUGINS="${PLUGINS} alsa"
-       LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
-     fi
-   fi
-fi
-
-
-# Check whether --enable-waveout or --disable-waveout was given.
-if test "${enable_waveout+set}" = set; then
-  enableval="$enable_waveout"
-  :
-fi
-
-if test "x$enableval" != "xno" -a x$SYS = xmingw32
-  then
-    PLUGINS="${PLUGINS} waveout"
-    LIB_WAVEOUT="-lwinmm"
+ac_cv_gtk_headers=no
+      echo "Cannot find gtk development headers."
+    
 fi
+done
 
-
-# Check whether --with- or --without- was given.
-if test "${with_+set}" = set; then
-  withval="$with_"
-  :
+    if test "x${ac_cv_gtk_headers}" = "xyes"
+    then
+      PLUGINS="${PLUGINS} gui/gtk/gtk"
+      ALIASES="${ALIASES} gvlc"
+    fi
+    CPPFLAGS="${save_CPPFLAGS}"
+  fi
 fi
 
-
-# Check whether --enable-gtk or --disable-gtk was given.
-if test "${enable_gtk+set}" = set; then
-  enableval="$enable_gtk"
+# Check whether --enable-familiar or --disable-familiar was given.
+if test "${enable_familiar+set}" = set; then
+  enableval="$enable_familiar"
   :
 fi
 
-if test x$enable_gtk != xno
+if test "x${enable_familiar}" = "xyes"
 then
-  GTK_PATH=$PATH
+  GTK_PATH="${PATH}"
   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
 if test "${with_gtk_config_path+set}" = set; then
   withval="$with_gtk_config_path"
-   if test "x$withval" != "xno"
+   if test "x${with_gtk_config_path}" != "xno"
       then
-        GTK_PATH=$withval:$PATH
+        GTK_PATH="${with_gtk_config_path}:${PATH}"
       fi 
 fi
 
@@ -7464,7 +8723,7 @@ fi
   # Extract the first word of "gtk12-config", so it can be a program name with args.
 set dummy gtk12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7468: checking for $ac_word" >&5
+echo "configure:8727: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7477,7 +8736,7 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$GTK_PATH"
+  ac_dummy="${GTK_PATH}"
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -7498,12 +8757,12 @@ else
 fi
 
   GTK_CONFIG=${GTK12_CONFIG}
-  if test x${GTK_CONFIG} = xno
+  if test "x${GTK_CONFIG}" = "xno"
   then
     # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7507: checking for $ac_word" >&5
+echo "configure:8766: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7516,7 +8775,7 @@ else
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$GTK_PATH"
+  ac_dummy="${GTK_PATH}"
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -7537,33 +8796,32 @@ else
 fi
 
   fi
-  if test x${GTK_CONFIG} != xno
+  if test "x${GTK_CONFIG}" != "xno"
   then
-    if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
+    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
     then
-      { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk." 1>&2; exit 1; }
+      { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar." 1>&2; exit 1; }
     fi
-    CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
-    LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+    familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
+    familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
     # now look for the gtk.h header
-    saved_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
+    CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
     ac_cv_gtk_headers=yes
     for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7557: checking for $ac_hdr" >&5
+echo "configure:8815: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7562 "configure"
+#line 8820 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7592,24 +8850,23 @@ ac_cv_gtk_headers=no
 fi
 done
 
-    if test "x$ac_cv_gtk_headers" = xyes
+    if test "x${ac_cv_gtk_headers}" = "xyes"
     then
-      PLUGINS="${PLUGINS} gtk"
-      ALIASES="${ALIASES} gvlc"
+      PLUGINS="${PLUGINS} gui/familiar/familiar"
     fi
-    CPPFLAGS=$saved_CPPFLAGS
+    CPPFLAGS="${save_CPPFLAGS}"
   fi
 fi
 
 # Check whether --enable-gnome or --disable-gnome was given.
 if test "${enable_gnome+set}" = set; then
   enableval="$enable_gnome"
-  if test x$enable_gnome = xyes; then
+  if test "x${enable_gnome}" = "xyes"; then
     # look for gnome-config
     # Extract the first word of "gnome-config", so it can be a program name with args.
 set dummy gnome-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7613: checking for $ac_word" >&5
+echo "configure:8870: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7644,27 +8901,26 @@ fi
 
     if test -x ${GNOME_CONFIG}
     then
-       CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
-       LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
+       gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
+       gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
     fi
     # now look for the gnome.h header
-    saved_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
+    CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
     for ac_hdr in gnome.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7658: checking for $ac_hdr" >&5
+echo "configure:8914: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7663 "configure"
+#line 8919 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7685,7 +8941,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-      PLUGINS="${PLUGINS} gnome"
+      PLUGINS="${PLUGINS} gui/gtk/gnome"
       ALIASES="${ALIASES} gnome-vlc"
      
 else
@@ -7696,8 +8952,7 @@ developement tools or remove the --enable-gnome option" 1>&2; exit 1; }
 fi
 done
 
-  
-    CPPFLAGS=$saved_CPPFLAGS
+    CPPFLAGS="${save_CPPFLAGS}"
   fi
 fi
 
@@ -7705,11 +8960,11 @@ fi
 # Check whether --enable-qt or --disable-qt was given.
 if test "${enable_qt+set}" = set; then
   enableval="$enable_qt"
-  if test x$enable_qt = xyes; then
-     PLUGINS="${PLUGINS} qt"
+  if test "x${enable_qt}" = "xyes"; then
+     PLUGINS="${PLUGINS} gui/qt/qt"
      ALIASES="${ALIASES} qvlc"
-     LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
-     CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
+     qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
+     qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -7723,12 +8978,12 @@ fi
 # Check whether --enable-kde or --disable-kde was given.
 if test "${enable_kde+set}" = set; then
   enableval="$enable_kde"
-  if test x$enable_kde = xyes; then
-     PLUGINS="${PLUGINS} kde"
+  if test "x${enable_kde}" = "xyes"; then
+     PLUGINS="${PLUGINS} gui/kde/kde"
      ALIASES="${ALIASES} kvlc"
-     LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
-     CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
-     CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
+     kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
+     kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
+     kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
      if test -x ${QTDIR}/bin/moc
      then
        MOC=${QTDIR}/bin/moc
@@ -7739,32 +8994,48 @@ if test "${enable_kde+set}" = set; then
 fi
 
 
+# Check whether --enable-qte or --disable-qte was given.
+if test "${enable_qte+set}" = set; then
+  enableval="$enable_qte"
+  if test "x${enable_qte}" = "xyes"; then
+     PLUGINS="${PLUGINS} gui/qte/qte"
+     qte_LDFLAGS="${qte_LDFLAGS} -lqte -L${QTEDIR}/lib"
+     qte_CFLAGS="${qte_CFLAGS} -I/usr/include/qte -I${QTEDIR}/include"
+     if test -x ${QTEDIR}/bin/moc
+     then
+       MOC=${QTEDIR}/bin/moc
+     else
+       MOC=moc
+     fi
+   fi
+fi
+
+
+
 # Check whether --enable-macosx or --disable-macosx was given.
 if test "${enable_macosx+set}" = set; then
   enableval="$enable_macosx"
-  if test x$enable_macosx = xyes
+  if test "x${enable_macosx}" = "xyes"
    then
-     BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
-     LIB_COMMON="${LIB_COMMON} -ObjC"
+     BUILTINS="${BUILTINS} gui/macosx/macosx"
+     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
    fi
 else
   for ac_hdr in Cocoa/Cocoa.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7758: checking for $ac_hdr" >&5
+echo "configure:9029: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7763 "configure"
+#line 9034 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7784,10 +9055,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
- BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
-     LIB_COMMON="${LIB_COMMON} -ObjC"
+ BUILTINS="${BUILTINS} gui/macosx/macosx"
+     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
    
 else
   echo "$ac_t""no" 1>&6
@@ -7803,23 +9072,23 @@ if test "${enable_qnx+set}" = set; then
   :
 fi
 
-    if test x$enable_qnx != xno
+    if test "x${enable_qnx}" != "xno"
     then
       for ac_hdr in Ph.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7813: checking for $ac_hdr" >&5
+echo "configure:9082: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7818 "configure"
+#line 9087 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7840,8 +9109,8 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-        PLUGINS="${PLUGINS} qnx"
-        LIB_QNX="${LIB_QNX} -lasound -lph"
+        PLUGINS="${PLUGINS} gui/qnx/qnx"
+        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
       
 else
   echo "$ac_t""no" 1>&6
@@ -7850,47 +9119,106 @@ done
 
     fi
 
-# Check whether --enable-win32 or --disable-win32 was given.
-if test "${enable_win32+set}" = set; then
-  enableval="$enable_win32"
-   if test "x$enableval" != "xno"
+# Check whether --enable-intfwin or --disable-intfwin was given.
+if test "${enable_intfwin+set}" = set; then
+  enableval="$enable_intfwin"
+   if test "x${enable_intfwin}" != "xno"
+  then
+    # Check whether --with-bcbuilder or --without-bcbuilder was given.
+if test "${with_bcbuilder+set}" = set; then
+  withval="$with_bcbuilder"
+  :
+fi
+
+    if test "x${with_bcbuilder}" != "x"
     then
-      PLUGINS="${PLUGINS} win32"
-    fi 
+      BCBUILDER="${with_bcbuilder}"
+    fi
+    PLUGINS="${PLUGINS} gui/win32/win32"
+  fi 
 fi
 
 
 # Check whether --enable-ncurses or --disable-ncurses was given.
 if test "${enable_ncurses+set}" = set; then
   enableval="$enable_ncurses"
-  if test x$enable_ncurses = xyes; then
-     PLUGINS="${PLUGINS} ncurses"
-     LIB_NCURSES="${LIB_NCURSES} -lncurses"
+  if test "x${enable_ncurses}" = "xyes"; then
+     PLUGINS="${PLUGINS} gui/ncurses/ncurses"
+     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
    fi
 fi
 
 
+# Check whether --enable-xosd or --disable-xosd was given.
+if test "${enable_xosd+set}" = set; then
+  enableval="$enable_xosd"
+  :
+fi
+
+if test "x${enable_xosd}" = "xyes"
+then
+  ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
+echo "configure:9163: checking for xosd.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9168 "configure"
+#include "confdefs.h"
+#include <xosd.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_xosd="true"
+else
+  echo "$ac_t""no" 1>&6
+have_xosd="false"
+fi
+
+  if test "x${have_xosd}" = "xtrue"
+  then
+    PLUGINS="${PLUGINS} visualization/xosd/xosd"
+    xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd"
+  fi
+fi
+
 # Check whether --enable-lirc or --disable-lirc was given.
 if test "${enable_lirc+set}" = set; then
   enableval="$enable_lirc"
   :
 fi
 
-if test x$enable_lirc = xyes
+if test "x${enable_lirc}" = "xyes"
 then
   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
-echo "configure:7884: checking for lirc/lirc_client.h" >&5
+echo "configure:9212: checking for lirc/lirc_client.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7889 "configure"
+#line 9217 "configure"
 #include "confdefs.h"
 #include <lirc/lirc_client.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7907,7 +9235,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
-echo "configure:7911: checking for lirc_init in -llirc_client" >&5
+echo "configure:9239: checking for lirc_init in -llirc_client" >&5
 ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7915,7 +9243,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7919 "configure"
+#line 9247 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7926,7 +9254,7 @@ int main() {
 lirc_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7952,15 +9280,13 @@ else
 have_lirc="false"
 fi
 
-  if test x$have_lirc = xtrue
+  if test "x${have_lirc}" = "xtrue"
   then
-    PLUGINS="${PLUGINS} lirc"
-    LIB_LIRC="${LIB_LIRC} -llirc_client"
+    PLUGINS="${PLUGINS} control/lirc/lirc"
+    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
   fi
 fi
 
-fi
-
 # Check whether --with- or --without- was given.
 if test "${with_+set}" = set; then
   withval="$with_"
@@ -7974,7 +9300,7 @@ if test "${with_words+set}" = set; then
   :
 fi
 
-  case "x$withval" in
+  case "x${with_words}" in
     xbig)
       ac_cv_c_bigendian=yes
       ;;
@@ -7983,11 +9309,11 @@ fi
       ;;
     *)
                   echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:7987: checking whether the byte order is big-endian" >&5
+echo "configure:9313: checking whether the byte order is big-endian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_cv_c_bigendian=unknown
+  ac_cv_c_bigendian="unknown"
         cat >conftest.c <<EOF
         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
@@ -8000,16 +9326,16 @@ EOF
         
         if test -f conftest.c
         then 
-          if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
+          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
               && test -f conftest.o
           then
             if test "`strings conftest.o | grep BIGenDianSyS`"
             then
-              ac_cv_c_bigendian=yes
+              ac_cv_c_bigendian="yes"
             fi
             if test "`strings conftest.o | grep LiTTleEnDian`"
             then
-              ac_cv_c_bigendian=no
+              ac_cv_c_bigendian="no"
             fi
           fi
         fi
@@ -8017,13 +9343,13 @@ EOF
 fi
 
 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-      if test x$ac_cv_c_bigendian = xunknown
+      if test "x${ac_cv_c_bigendian}" = "xunknown"
       then
         { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
       fi
       ;;
   esac
-if test $ac_cv_c_bigendian = yes
+if test "${ac_cv_c_bigendian}" = "yes"
 then
   cat >> confdefs.h <<\EOF
 #define WORDS_BIGENDIAN 1
@@ -8031,22 +9357,18 @@ EOF
 
 fi
 
-DLL_PATH=.
-# Check whether --with-dll-path or --without-dll-path was given.
-if test "${with_dll_path+set}" = set; then
-  withval="$with_dll_path"
-   if test "x$withval" != "xno"
-    then
-      DLL_PATH=$withval
-    fi 
-fi
-
+PROFILING=0
 
 GPROF=0
 # Check whether --enable-gprof or --disable-gprof was given.
 if test "${enable_gprof+set}" = set; then
   enableval="$enable_gprof"
-   if test x$enableval = xyes; then GPROF=1; fi 
+   if test "x${enable_gprof}" = "xyes"
+  then
+    GPROF=1
+    PROFILING="gprof"
+  fi
+
 fi
 
 
@@ -8054,10 +9376,11 @@ CPROF=0
 # Check whether --enable-cprof or --disable-cprof was given.
 if test "${enable_cprof+set}" = set; then
   enableval="$enable_cprof"
-   if test x$enableval = xyes;
+   if test "x${enable_cprof}" = "xyes"
   then
-    LIB_COMMON="${LIB_COMMON} -lcprof"
+    save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
     CPROF=1
+    PROFILING="cprof"
   fi
 
 fi
@@ -8066,9 +9389,9 @@ fi
 # Check whether --enable-pth or --disable-pth was given.
 if test "${enable_pth+set}" = set; then
   enableval="$enable_pth"
-   if test x$enableval = xyes; then
+   if test "x${enable_pth}" = "xyes"; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:8072: checking for pth_init in -lpth" >&5
+echo "configure:9395: checking for pth_init in -lpth" >&5
 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8076,7 +9399,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8080 "configure"
+#line 9403 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8087,7 +9410,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8115,7 +9438,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8119 "configure"
+#line 9442 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -8139,9 +9462,9 @@ fi
 # Check whether --enable-st or --disable-st was given.
 if test "${enable_st+set}" = set; then
   enableval="$enable_st"
-   if test x$enableval = xyes; then
+   if test "x${enable_st}" = "xyes"; then
     echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
-echo "configure:8145: checking for st_init in -lst" >&5
+echo "configure:9468: checking for st_init in -lst" >&5
 ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8149,7 +9472,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lst  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8153 "configure"
+#line 9476 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8160,7 +9483,7 @@ int main() {
 st_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8188,7 +9511,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8192 "configure"
+#line 9515 "configure"
 #include "confdefs.h"
 #include <st.h>
 EOF
@@ -8209,12 +9532,112 @@ rm -f conftest*
 fi
 
 
-LIB_COMMON="${LIB_COMMON} ${THREAD_LIB}"
+vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}"
+plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}"
+
+MOZILLA=0
+# Check whether --enable-mozilla or --disable-mozilla was given.
+if test "${enable_mozilla+set}" = set; then
+  enableval="$enable_mozilla"
+  :
+fi
+
+if test "x${enable_mozilla}" = "xyes"
+then
+  # Extract the first word of "mozilla-config", so it can be a program name with args.
+set dummy mozilla-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:9551: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MOZILLA_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$MOZILLA_CONFIG" in
+  /*)
+  ac_cv_path_MOZILLA_CONFIG="$MOZILLA_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_MOZILLA_CONFIG="$MOZILLA_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_MOZILLA_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MOZILLA_CONFIG" && ac_cv_path_MOZILLA_CONFIG="no"
+  ;;
+esac
+fi
+MOZILLA_CONFIG="$ac_cv_path_MOZILLA_CONFIG"
+if test -n "$MOZILLA_CONFIG"; then
+  echo "$ac_t""$MOZILLA_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test "x${MOZILLA_CONFIG}" != "xno"
+  then
+    if test "x${SYS}" != "xmingw32"; then
+      LDFLAGS="${save_LDFLAGS} -L${x_libraries}"
+      echo $ac_n "checking for XtStrings in -lXt""... $ac_c" 1>&6
+echo "configure:9589: checking for XtStrings in -lXt" >&5
+ac_lib_var=`echo Xt'_'XtStrings | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 9597 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XtStrings();
+
+int main() {
+XtStrings()
+; return 0; }
+EOF
+if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+        mozilla_LDFLAGS="${mozilla_LDFLAGS} -L${x_libraries} -lXt"
+      
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      LDFLAGS="${save_LDFLAGS}"
+    fi
+    MOZILLA=1
+    mozilla_CFLAGS="${mozilla_CFLAGS} `${MOZILLA_CONFIG} --cflags plugin java --defines | xargs`"
+        mozilla_LDFLAGS="${mozilla_LDFLAGS} `${MOZILLA_CONFIG} --libs | sed 's#-I\(.*\)/mozilla/\([^ ]*\)#-I\1/\2 -I\1/mozilla/\2#g'`"
+  fi
+fi
 
 # Check whether --enable-plugins or --disable-plugins was given.
 if test "${enable_plugins+set}" = set; then
   enableval="$enable_plugins"
-  if test x$enable_plugins = xno
+  if test "x${enable_plugins}" = "xno"
    then
      BUILTINS="${BUILTINS} ${PLUGINS}"
      PLUGINS=
@@ -8222,7 +9645,7 @@ if test "${enable_plugins+set}" = set; then
 fi
 
 
-if test x$ac_cv_header_dlfcn_h = xno -a x$ac_cv_header_image_h = xno -a x$SYS != xmingw32
+if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
 then
   echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
   echo "as built-in"
@@ -8231,21 +9654,25 @@ then
 fi
 
 cat >> confdefs.h <<EOF
-#define VERSION_MESSAGE "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN\n"
+#define VERSION_MESSAGE "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN"
+EOF
+
+cat >> confdefs.h <<EOF
+#define COPYRIGHT_MESSAGE "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN"
 EOF
 
 cat >> confdefs.h <<EOF
-#define COPYRIGHT_MESSAGE "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN"
+#define CONFIGURE_LINE "${CONFIGURE_LINE}"
 EOF
 
 
 VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
 cat >> confdefs.h <<EOF
-#define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
+#define MODULE_SUFFIX "__${VLC_SYMBOL}"
 EOF
 
 cat >> confdefs.h <<EOF
-#define MODULE_SYMBOL $VLC_SYMBOL
+#define MODULE_SYMBOL ${VLC_SYMBOL}
 EOF
 
 
@@ -8254,6 +9681,31 @@ DATA_PATH="${ac_tool_prefix}/share/videolan"
 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
 
 
+CPPFLAGS="${save_CPPFLAGS}"
+CFLAGS="${save_CFLAGS}"
+LDFLAGS="${save_LDFLAGS}"
+
+libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
+for i in `echo ${BUILTINS} | sed -e 's#[^ ]*/##g'` ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -8448,7 +9900,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile.config Makefile.opts po/Makefile.in vlc-config include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -8499,6 +9951,7 @@ s%@SET_MAKE@%$SET_MAKE%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
 s%@RANLIB@%$RANLIB%g
+s%@STRIP@%$STRIP%g
 s%@GMAKE@%$GMAKE%g
 s%@ALLOCA@%$ALLOCA%g
 s%@GLIBC21@%$GLIBC21%g
@@ -8534,14 +9987,15 @@ s%@ARTS_CONFIG@%$ARTS_CONFIG%g
 s%@GTK12_CONFIG@%$GTK12_CONFIG%g
 s%@GTK_CONFIG@%$GTK_CONFIG%g
 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
+s%@MOZILLA_CONFIG@%$MOZILLA_CONFIG%g
 s%@DATA_PATH@%$DATA_PATH%g
 s%@PLUGIN_PATH@%$PLUGIN_PATH%g
+s%@libvlc_LDFLAGS@%$libvlc_LDFLAGS%g
 s%@SYS@%$SYS%g
 s%@ARCH@%$ARCH%g
 s%@PLUGINS@%$PLUGINS%g
 s%@BUILTINS@%$BUILTINS%g
 s%@ALIASES@%$ALIASES%g
-s%@INCLUDE@%$INCLUDE%g
 s%@DEBUG@%$DEBUG%g
 s%@ASM@%$ASM%g
 s%@CPROF@%$CPROF%g
@@ -8550,76 +10004,95 @@ s%@OPTIMS@%$OPTIMS%g
 s%@TUNING@%$TUNING%g
 s%@RELEASE@%$RELEASE%g
 s%@MOC@%$MOC%g
-s%@DLL_PATH@%$DLL_PATH%g
+s%@BCBUILDER@%$BCBUILDER%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%g
-s%@PLDFLAGS@%$PLDFLAGS%g
-s%@LIB_COMMON@%$LIB_COMMON%g
-s%@LIB_VLC@%$LIB_VLC%g
-s%@LIB_A52@%$LIB_A52%g
-s%@LIB_AA@%$LIB_AA%g
-s%@LIB_ALSA@%$LIB_ALSA%g
-s%@LIB_ARTS@%$LIB_ARTS%g
-s%@LIB_BEOS@%$LIB_BEOS%g
-s%@LIB_CHROMA_I420_RGB@%$LIB_CHROMA_I420_RGB%g
-s%@LIB_DARWIN@%$LIB_DARWIN%g
-s%@LIB_DIRECTX@%$LIB_DIRECTX%g
-s%@LIB_DSP@%$LIB_DSP%g
-s%@LIB_DVD@%$LIB_DVD%g
-s%@LIB_DVDREAD@%$LIB_DVDREAD%g
-s%@LIB_ESD@%$LIB_ESD%g
-s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
-s%@LIB_GGI@%$LIB_GGI%g
-s%@LIB_GLIDE@%$LIB_GLIDE%g
-s%@LIB_GNOME@%$LIB_GNOME%g
-s%@LIB_GTK@%$LIB_GTK%g
-s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
-s%@LIB_IMDCT@%$LIB_IMDCT%g
-s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
-s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
-s%@LIB_IPV4@%$LIB_IPV4%g
-s%@LIB_IPV6@%$LIB_IPV6%g
-s%@LIB_KDE@%$LIB_KDE%g
-s%@LIB_LIRC@%$LIB_LIRC%g
-s%@LIB_MACOSX@%$LIB_MACOSX%g
-s%@LIB_MAD@%$LIB_MAD%g
-s%@LIB_MEMCPYALTIVEC@%$LIB_MEMCPYALTIVEC%g
-s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
-s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
-s%@LIB_NCURSES@%$LIB_NCURSES%g
-s%@LIB_QNX@%$LIB_QNX%g
-s%@LIB_QT@%$LIB_QT%g
-s%@LIB_RC@%$LIB_RC%g
-s%@LIB_SDL@%$LIB_SDL%g
-s%@LIB_VCD@%$LIB_VCD%g
-s%@LIB_VORBIS@%$LIB_VORBIS%g
-s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
-s%@LIB_WIN32@%$LIB_WIN32%g
-s%@LIB_X11@%$LIB_X11%g
-s%@LIB_XVIDEO@%$LIB_XVIDEO%g
-s%@CFLAGS_COMMON@%$CFLAGS_COMMON%g
-s%@CFLAGS_VLC@%$CFLAGS_VLC%g
-s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
-s%@CFLAGS_DVD@%$CFLAGS_DVD%g
-s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
-s%@CFLAGS_ESD@%$CFLAGS_ESD%g
-s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
-s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
-s%@CFLAGS_GTK@%$CFLAGS_GTK%g
-s%@CFLAGS_KDE@%$CFLAGS_KDE%g
-s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
-s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
-s%@CFLAGS_MAD@%$CFLAGS_MAD%g
-s%@CFLAGS_MEMCPYALTIVEC@%$CFLAGS_MEMCPYALTIVEC%g
-s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
+s%@NEED_GETOPT@%$NEED_GETOPT%g
+s%@MOZILLA@%$MOZILLA%g
 s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
 s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
-s%@CFLAGS_QT@%$CFLAGS_QT%g
-s%@CFLAGS_SDL@%$CFLAGS_SDL%g
-s%@CFLAGS_WIN32@%$CFLAGS_WIN32%g
-s%@CFLAGS_X11@%$CFLAGS_X11%g
-s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
-s%@NEED_GETOPT@%$NEED_GETOPT%g
+s%@vlc_CFLAGS@%$vlc_CFLAGS%g
+s%@plugins_CFLAGS@%$plugins_CFLAGS%g
+s%@builtins_CFLAGS@%$builtins_CFLAGS%g
+s%@mozilla_CFLAGS@%$mozilla_CFLAGS%g
+s%@a52_CFLAGS@%$a52_CFLAGS%g
+s%@arts_CFLAGS@%$arts_CFLAGS%g
+s%@i420_yuy2_mmx_CFLAGS@%$i420_yuy2_mmx_CFLAGS%g
+s%@dvd_CFLAGS@%$dvd_CFLAGS%g
+s%@dvdread_CFLAGS@%$dvdread_CFLAGS%g
+s%@dvdplay_CFLAGS@%$dvdplay_CFLAGS%g
+s%@ts_dvbpsi_CFLAGS@%$ts_dvbpsi_CFLAGS%g
+s%@directx_CFLAGS@%$directx_CFLAGS%g
+s%@esd_CFLAGS@%$esd_CFLAGS%g
+s%@familiar_CFLAGS@%$familiar_CFLAGS%g
+s%@faad_CFLAGS@%$faad_CFLAGS%g
+s%@ffmpeg_CFLAGS@%$ffmpeg_CFLAGS%g
+s%@glide_CFLAGS@%$glide_CFLAGS%g
+s%@gnome_CFLAGS@%$gnome_CFLAGS%g
+s%@gtk_CFLAGS@%$gtk_CFLAGS%g
+s%@kde_CFLAGS@%$kde_CFLAGS%g
+s%@idctaltivec_CFLAGS@%$idctaltivec_CFLAGS%g
+s%@macosx_CFLAGS@%$macosx_CFLAGS%g
+s%@mad_CFLAGS@%$mad_CFLAGS%g
+s%@memcpyaltivec_CFLAGS@%$memcpyaltivec_CFLAGS%g
+s%@motionaltivec_CFLAGS@%$motionaltivec_CFLAGS%g
+s%@qt_CFLAGS@%$qt_CFLAGS%g
+s%@qte_CFLAGS@%$qte_CFLAGS%g
+s%@sdl_CFLAGS@%$sdl_CFLAGS%g
+s%@x11_CFLAGS@%$x11_CFLAGS%g
+s%@xvideo_CFLAGS@%$xvideo_CFLAGS%g
+s%@vlc_LDFLAGS@%$vlc_LDFLAGS%g
+s%@plugins_LDFLAGS@%$plugins_LDFLAGS%g
+s%@builtins_LDFLAGS@%$builtins_LDFLAGS%g
+s%@mozilla_LDFLAGS@%$mozilla_LDFLAGS%g
+s%@a52_LDFLAGS@%$a52_LDFLAGS%g
+s%@aa_LDFLAGS@%$aa_LDFLAGS%g
+s%@alsa_LDFLAGS@%$alsa_LDFLAGS%g
+s%@arts_LDFLAGS@%$arts_LDFLAGS%g
+s%@beos_LDFLAGS@%$beos_LDFLAGS%g
+s%@i420_rgb_LDFLAGS@%$i420_rgb_LDFLAGS%g
+s%@directx_LDFLAGS@%$directx_LDFLAGS%g
+s%@dv_LDFLAGS@%$dv_LDFLAGS%g
+s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
+s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
+s%@dvdplay_LDFLAGS@%$dvdplay_LDFLAGS%g
+s%@ts_dvbpsi_LDFLAGS@%$ts_dvbpsi_LDFLAGS%g
+s%@esd_LDFLAGS@%$esd_LDFLAGS%g
+s%@familiar_LDFLAGS@%$familiar_LDFLAGS%g
+s%@distort_LDFLAGS@%$distort_LDFLAGS%g
+s%@faad_LDFLAGS@%$faad_LDFLAGS%g
+s%@ffmpeg_LDFLAGS@%$ffmpeg_LDFLAGS%g
+s%@mp4_LDFLAGS@%$mp4_LDFLAGS%g
+s%@ggi_LDFLAGS@%$ggi_LDFLAGS%g
+s%@glide_LDFLAGS@%$glide_LDFLAGS%g
+s%@gnome_LDFLAGS@%$gnome_LDFLAGS%g
+s%@gtk_LDFLAGS@%$gtk_LDFLAGS%g
+s%@http_LDFLAGS@%$http_LDFLAGS%g
+s%@idctaltivec_LDFLAGS@%$idctaltivec_LDFLAGS%g
+s%@imdct_LDFLAGS@%$imdct_LDFLAGS%g
+s%@imdct3dn_LDFLAGS@%$imdct3dn_LDFLAGS%g
+s%@imdctsse_LDFLAGS@%$imdctsse_LDFLAGS%g
+s%@ipv4_LDFLAGS@%$ipv4_LDFLAGS%g
+s%@ipv6_LDFLAGS@%$ipv6_LDFLAGS%g
+s%@kde_LDFLAGS@%$kde_LDFLAGS%g
+s%@lirc_LDFLAGS@%$lirc_LDFLAGS%g
+s%@macosx_LDFLAGS@%$macosx_LDFLAGS%g
+s%@mad_LDFLAGS@%$mad_LDFLAGS%g
+s%@memcpyaltivec_LDFLAGS@%$memcpyaltivec_LDFLAGS%g
+s%@motionaltivec_LDFLAGS@%$motionaltivec_LDFLAGS%g
+s%@ncurses_LDFLAGS@%$ncurses_LDFLAGS%g
+s%@oss_LDFLAGS@%$oss_LDFLAGS%g
+s%@qnx_LDFLAGS@%$qnx_LDFLAGS%g
+s%@qt_LDFLAGS@%$qt_LDFLAGS%g
+s%@qte_LDFLAGS@%$qte_LDFLAGS%g
+s%@rc_LDFLAGS@%$rc_LDFLAGS%g
+s%@sdl_LDFLAGS@%$sdl_LDFLAGS%g
+s%@vcd_LDFLAGS@%$vcd_LDFLAGS%g
+s%@vorbis_LDFLAGS@%$vorbis_LDFLAGS%g
+s%@waveout_LDFLAGS@%$waveout_LDFLAGS%g
+s%@x11_LDFLAGS@%$x11_LDFLAGS%g
+s%@xvideo_LDFLAGS@%$xvideo_LDFLAGS%g
+s%@xosd_LDFLAGS@%$xosd_LDFLAGS%g
 
 CEOF
 EOF
@@ -8661,7 +10134,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts po/Makefile.in"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile.config Makefile.opts po/Makefile.in vlc-config"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -8869,6 +10342,7 @@ chmod +x $CONFIG_STATUS
 rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
+chmod a+x vlc-config
 
 echo "
 vlc configuration
@@ -8880,15 +10354,16 @@ optimizations         : ${OPTIMS}
 tuning                : ${TUNING}
 debug mode            : ${DEBUG}
 release               : ${RELEASE}
-cprof/gprof support   : ${CPROF}/${GPROF}
+profiling             : ${PROFILING}
 need builtin getopt   : ${NEED_GETOPT}
 built-in modules      :${BUILTINS}
 plug-in modules       :${PLUGINS}
+mozilla plugin        : ${MOZILLA}
 vlc aliases           :${ALIASES}
 
 You may now tune Makefile.opts at your convenience, for instance to choose
 which modules get compiled as plugins.
 
-To build vlc and its plugins, type \`$VLC_MAKE'.
+To build vlc and its plugins, type \`${VLC_MAKE}'.
 "