]> 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 2043216486ba3c939a4d76745a312a5caf8f9b32..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,12 +144,18 @@ 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
@@ -120,6 +166,8 @@ 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
@@ -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)"
 
@@ -694,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:698: checking host system type" >&5
+echo "configure:748: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -715,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:719: checking target system type" >&5
+echo "configure:769: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -733,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:737: checking build system type" >&5
+echo "configure:787: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -756,16 +806,18 @@ test "$host_alias" != "$target_alias" &&
   program_prefix=${target_alias}-
 
 
+CONFIGURE_LINE="$0 $*"
+
 PACKAGE="vlc"
-VERSION="0.3.0"
-CODENAME=Ourumov
+VERSION="0.5.0-cvs"
+CODENAME="Natalya"
 
-save_CFLAGS="${CFLAGS}"
 save_CPPFLAGS="${CPPFLAGS}"
+save_CFLAGS="${CFLAGS}"
 save_LDFLAGS="${LDFLAGS}"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:769: 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
@@ -794,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:798: 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
@@ -824,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:828: 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
@@ -875,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:879: 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
@@ -907,7 +959,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:911: 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.
@@ -918,12 +970,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 922 "configure"
+#line 974 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:927: \"$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
@@ -949,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:953: 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:958: 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
@@ -963,7 +1015,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:967: \"$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
@@ -982,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:986: 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
@@ -1014,7 +1066,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1018: 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=
@@ -1029,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 1033 "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:1039: \"$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
   :
@@ -1046,13 +1098,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1050 "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:1056: \"$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
   :
@@ -1063,13 +1115,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1067 "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:1073: \"$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
   :
@@ -1103,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:1107: 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
@@ -1135,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:1139: 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
@@ -1170,7 +1222,7 @@ 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:1174: checking for $ac_word" >&5
+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
@@ -1202,7 +1254,7 @@ 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:1206: checking for $ac_word" >&5
+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
@@ -1238,7 +1290,7 @@ 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:1242: 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
@@ -1271,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:1277: 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
@@ -1292,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 VLC_PACKAGE "$PACKAGE"
+#define VLC_PACKAGE "${PACKAGE}"
 EOF
 
 cat >> confdefs.h <<EOF
-#define VLC_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:1309: 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
@@ -1334,7 +1386,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1338: 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
@@ -1342,7 +1394,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1346 "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
@@ -1353,7 +1405,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:1357: \"$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
@@ -1376,12 +1428,12 @@ fi
   
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1380: 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 1385 "configure"
+#line 1437 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1389,7 +1441,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1393: \"$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*
@@ -1406,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 1410 "configure"
+#line 1462 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1424,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 1428 "configure"
+#line 1480 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1445,7 +1497,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1449 "configure"
+#line 1501 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1456,7 +1508,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1460: \"$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
@@ -1480,12 +1532,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1484: 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 1489 "configure"
+#line 1541 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1534,7 +1586,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1538: \"$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
@@ -1555,21 +1607,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1559: 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 1566 "configure"
+#line 1618 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1573: \"$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
@@ -1595,12 +1647,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1599: 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 1604 "configure"
+#line 1656 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1628,12 +1680,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1632: 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 1637 "configure"
+#line 1689 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1663,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:1667: 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 1672 "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:1679: \"$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
@@ -1696,12 +1748,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1700: 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 1705 "configure"
+#line 1757 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1729,7 +1781,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1733: \"$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
@@ -1761,12 +1813,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1765: 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 1770 "configure"
+#line 1822 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1791,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:1795: 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 1800 "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.  */
@@ -1819,7 +1871,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1823: \"$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
@@ -1846,7 +1898,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1850: 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
@@ -1854,7 +1906,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1858 "configure"
+#line 1910 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1873,7 +1925,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1877: \"$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
@@ -1898,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:1902: 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 1907 "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:1912: \"$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*
@@ -1937,12 +1989,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1941: 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 1946 "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.  */
@@ -1965,7 +2017,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1969: \"$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
@@ -1990,7 +2042,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1994: 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
@@ -1998,7 +2050,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2002 "configure"
+#line 2054 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2138,7 +2190,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2142: \"$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
@@ -2162,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:2166: 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 2171 "configure"
+#line 2223 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -2203,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:2207: 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 2212 "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:2217: \"$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*
@@ -2244,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:2248: 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 2253 "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.  */
@@ -2272,7 +2324,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2276: \"$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
@@ -2312,7 +2364,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2316: 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
@@ -2320,7 +2372,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 2324 "configure"
+#line 2376 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2330,7 +2382,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2334: \"$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
@@ -2342,7 +2394,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 2346 "configure"
+#line 2398 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2352,7 +2404,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2356: \"$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
@@ -2373,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:2377: 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 2383 "configure"
+#line 2435 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2398,7 +2450,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2402: \"$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
@@ -2427,19 +2479,19 @@ EOF
 
    
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2431: 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 2436 "configure"
+#line 2488 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:2443: \"$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
@@ -2462,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:2466: 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 2471 "configure"
+#line 2523 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2478: \"$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
@@ -2495,7 +2547,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2499: 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"
@@ -2517,7 +2569,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2521: 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"
@@ -2537,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:2541: 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 2546 "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:2551: \"$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*
@@ -2564,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:2568: 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 2573 "configure"
+#line 2625 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2578,7 +2630,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2582: \"$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
@@ -2594,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:2598: 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 2605 "configure"
+#line 2657 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2610,7 +2662,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2614: \"$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
@@ -2643,12 +2695,12 @@ EOF
             for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2647: 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 2652 "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.  */
@@ -2671,7 +2723,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2675: \"$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
@@ -2700,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:2704: 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
@@ -2734,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:2738: 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
@@ -2771,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:2775: 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
@@ -2821,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:2825: 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
@@ -2855,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:2859: 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
@@ -2891,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:2895: 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
@@ -2962,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:2966: 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
@@ -2995,7 +3047,7 @@ done
       ac_verc_fail=yes
     else
             echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:2999: 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;;
@@ -3042,7 +3094,7 @@ echo "configure:2999: checking version of bison" >&5
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3046: 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
@@ -3094,7 +3146,7 @@ echo "configure:3046: 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:3098: 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
@@ -3147,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
     ;;
@@ -3156,24 +3326,25 @@ case x"${target_os}" in
     ;;
   xbsdi*)
     SYS=bsdi
-    save_CFLAGS="${save_CFLAGS} -pthread"
+    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"
+    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
     ;;
   xdarwin*)
     SYS=darwin
-    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"
+    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:3177: 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
@@ -3205,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:3209: 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
@@ -3237,10 +3408,12 @@ else
 fi
 fi
 
-    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"
+    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*)
@@ -3248,9 +3421,12 @@ fi
     x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
     xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
     ;;
+  xsolaris*)
+    SYS=solaris
+    ;;
   xbeos)
     SYS=beos
-    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"
+    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"
@@ -3261,24 +3437,25 @@ fi
     ;;
 esac
 
-if test x"${SYS}" = xmingw32
+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_'`"
+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 usleep vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2
+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:3277: 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 3282 "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.  */
@@ -3301,7 +3478,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3305: \"$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
@@ -3327,12 +3504,12 @@ done
 
 
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3331: 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 3336 "configure"
+#line 3513 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3355,7 +3532,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3359: \"$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
@@ -3374,7 +3551,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3378: 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
@@ -3382,7 +3559,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3386 "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
@@ -3393,7 +3570,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3397: \"$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
 
 fi
 
+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 3604 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    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 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_send) || defined (__stub___send)
+choke me
+#else
+send();
+#endif
+
+; return 0; }
+EOF
+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_send=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_send=no"
+fi
+rm -f conftest*
+fi
+
+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 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="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#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 send();
+
+int main() {
+send()
+; return 0; }
+EOF
+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
+  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
+  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
@@ -3465,7 +3732,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3469: checking for gethostbyname in -lnsl" >&5
+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
@@ -3473,7 +3740,7 @@ else
   ac_save_LIBS="$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
@@ -3508,12 +3775,12 @@ fi
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3512: checking for gethostbyname" >&5
+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 gethostbyname(); below.  */
@@ -3536,7 +3803,7 @@ gethostbyname();
 
 ; 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_gethostbyname=yes"
 else
@@ -3555,7 +3822,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:3559: checking for gethostbyname in -lbind" >&5
+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
@@ -3563,7 +3830,7 @@ else
   ac_save_LIBS="$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
@@ -3574,7 +3841,7 @@ int main() {
 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
@@ -3597,13 +3864,14 @@ fi
 
 fi
 
+have_nanosleep=0
 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3602: checking for nanosleep" >&5
+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
   cat > conftest.$ac_ext <<EOF
-#line 3607 "configure"
+#line 3875 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nanosleep(); below.  */
@@ -3626,7 +3894,7 @@ nanosleep();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+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
@@ -3640,12 +3908,12 @@ 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:3649: checking for nanosleep in -lrt" >&5
+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
@@ -3653,7 +3921,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3657 "configure"
+#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
@@ -3664,7 +3932,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+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
@@ -3679,12 +3947,11 @@ 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"
+  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:3688: checking for nanosleep in -lposix4" >&5
+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
@@ -3692,7 +3959,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3696 "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
@@ -3703,7 +3970,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3707: \"$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
@@ -3718,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
-  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3729,13 +3996,61 @@ fi
 
 fi
 
+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
+  ac_save_LIBS="$LIBS"
+LIBS="-lrt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4016 "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 sem_init();
+
+int main() {
+sem_init()
+; return 0; }
+EOF
+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_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"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:3734: 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 3739 "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.  */
@@ -3758,7 +4073,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3762: \"$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
@@ -3777,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:3781: 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
@@ -3785,7 +4100,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3789 "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
@@ -3796,7 +4111,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3800: \"$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
@@ -3820,12 +4135,12 @@ fi
 fi
 
 echo $ac_n "checking for textdomain""... $ac_c" 1>&6
-echo "configure:3824: 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 3829 "configure"
+#line 4144 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char textdomain(); below.  */
@@ -3848,7 +4163,7 @@ textdomain();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3852: \"$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
@@ -3867,7 +4182,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3871: 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
@@ -3875,7 +4190,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3879 "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
@@ -3886,7 +4201,7 @@ int main() {
 textdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:3890: \"$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
@@ -3902,6 +4217,8 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
+    plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
+  
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3912,12 +4229,12 @@ fi
 
 NEED_GETOPT=0
 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:3916: checking for getopt_long" >&5
+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 3921 "configure"
+#line 4238 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -3940,7 +4257,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3944: \"$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_getopt_long=yes"
 else
@@ -3962,7 +4279,7 @@ 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:3966: checking for getopt_long in -lgnugetopt" >&5
+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
@@ -3970,7 +4287,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgnugetopt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3974 "configure"
+#line 4291 "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
@@ -3981,7 +4298,7 @@ int main() {
 getopt_long()
 ; return 0; }
 EOF
-if { (eval echo configure:3985: \"$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_lib_$ac_lib_var=yes"
 else
@@ -4009,12 +4326,12 @@ fi
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4013: checking return type of signal handlers" >&5
+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 4018 "configure"
+#line 4335 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -4031,7 +4348,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -4050,7 +4367,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4054: checking for dlopen in -ldl" >&5
+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
@@ -4058,7 +4375,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4062 "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
@@ -4069,7 +4386,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4073: \"$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
@@ -4090,7 +4407,7 @@ else
 fi
 
 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
-echo "configure:4094: 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
@@ -4098,7 +4415,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4102 "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
@@ -4109,7 +4426,7 @@ int main() {
 cos()
 ; return 0; }
 EOF
-if { (eval echo configure:4113: \"$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
@@ -4131,7 +4448,7 @@ else
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:4135: 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
@@ -4139,7 +4456,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4143 "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
@@ -4150,7 +4467,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:4154: \"$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
@@ -4165,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
+  ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
   imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
   imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
   imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
-  chroma_i420_rgb_LDFLAGS="${chroma_i420_rgb_LDFLAGS} -lm"
+  i420_rgb_LDFLAGS="${i420_rgb_LDFLAGS} -lm"
 
 else
   echo "$ac_t""no" 1>&6
@@ -4176,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:4182: 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 4190 "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:4201: \"$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
@@ -4218,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:4224: 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 4232 "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:4243: \"$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
@@ -4260,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:4266: 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 4274 "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:4285: \"$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
@@ -4302,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:4308: 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 4313 "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:4336: \"$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
@@ -4355,7 +4661,7 @@ fi
 fi
 
 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4359: 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
@@ -4363,7 +4669,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4367 "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
@@ -4374,7 +4680,7 @@ int main() {
 cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:4378: \"$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
@@ -4396,7 +4702,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4400 "configure"
+#line 4706 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -4412,7 +4718,23 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4416 "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
@@ -4428,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:4436: 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 4441 "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:4446: \"$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*
@@ -4472,17 +4794,17 @@ 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:4476: 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 4481 "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:4486: \"$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*
@@ -4512,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:4516: 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 4521 "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:4526: \"$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*
@@ -4552,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:4556: 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 4561 "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:4566: \"$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*
@@ -4592,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:4596: 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 4601 "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:4606: \"$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*
@@ -4632,17 +4954,17 @@ 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:4636: 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 4641 "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:4646: \"$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*
@@ -4670,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:4674: 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 4679 "configure"
+#line 5001 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -4684,7 +5006,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:4688: \"$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
@@ -4705,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:4713: 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 4718 "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:4723: \"$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*
@@ -4746,30 +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
-  CPPFLAGS="$save_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:4763: 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 4768 "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:4773: \"$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*
@@ -4791,7 +5150,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
     cat > conftest.$ac_ext <<EOF
-#line 4795 "configure"
+#line 5154 "configure"
 #include "confdefs.h"
 #include <X11/extensions/dpms.h>
 EOF
@@ -4813,24 +5172,24 @@ else
 fi
 done
 
-  CPPFLAGS="$save_CPPFLAGS"
+  CPPFLAGS="${save_CPPFLAGS}"
 fi
 
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:4821: 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 4827 "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:4834: \"$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
@@ -4843,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
@@ -4851,20 +5210,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:4855: 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 4861 "configure"
+#line 5220 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4868: \"$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
@@ -4877,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:4886: 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 4892 "configure"
+#line 5251 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4899: \"$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
@@ -4908,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:4916: 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 4922 "configure"
+#line 5281 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4929: \"$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
@@ -4938,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:4948: 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 4954 "configure"
+#line 5313 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4961: \"$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
@@ -4970,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:4979: 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 4985 "configure"
+#line 5344 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4992: \"$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
@@ -5001,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:5009: 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 5015 "configure"
+#line 5374 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5022: \"$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
@@ -5031,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:5039: 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 5045 "configure"
+#line 5404 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5052: \"$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
@@ -5061,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:5072: 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 5078 "configure"
+#line 5437 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5085: \"$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
@@ -5094,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:5103: 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 5109 "configure"
+#line 5468 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5116: \"$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
@@ -5125,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:5134: 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 5140 "configure"
+#line 5499 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5147: \"$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
@@ -5156,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:5165: 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 5171 "configure"
+#line 5532 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5178: \"$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
@@ -5187,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
+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:5196: 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 5202 "configure"
+#line 5563 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5209: \"$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
@@ -5218,149 +5579,82 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
-if test x"$ac_cv_ld_plugins" != x"no"; then
+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:5227: 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 5235 "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:5242: \"$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}"
-CPPFLAGS="${save_CPPFLAGS}"
-LDFLAGS="${save_LDFLAGS}"
-
-echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5266: 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 5271 "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:5278: \"$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:5299: 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 5304 "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:5311: \"$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:5332: 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 5337 "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:5344: \"$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
     ;;
@@ -5369,29 +5663,41 @@ case x"${target_cpu}" in
     ;;
 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"
-SSE_MODULES="imdctsse downmixsse"
-ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
+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:5383: 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 5388 "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:5395: \"$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
@@ -5404,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:5413: 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 5418 "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:5425: \"$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
@@ -5434,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:5443: 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 5448 "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:5455: \"$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
@@ -5464,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
@@ -5473,19 +5781,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5477: 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 5482 "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:5489: \"$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
@@ -5498,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" -a x$SYS != xmingw32; then
+if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
   cat >> confdefs.h <<\EOF
 #define CAN_COMPILE_SSE 1
 EOF
@@ -5506,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:5514: 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 5519 "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:5526: \"$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 5536 "configure"
+#line 5845 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5543: \"$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
@@ -5549,44 +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
-    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"
+  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:5575: 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 5583 "configure"
+#line 5890 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5590: \"$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
@@ -5595,16 +5902,16 @@ else
   rm -rf conftest*
   
         # Linux/PPC test
-        CFLAGS="$save_CFLAGS $idctaltivec_CFLAGS -fvec"
+        CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 5601 "configure"
+#line 5908 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5608: \"$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
@@ -5617,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
 
-  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"
+  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:5639: 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 5646 "configure"
+#line 5951 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5653: \"$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
@@ -5659,12 +5964,12 @@ 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
+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"
@@ -5692,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
@@ -5719,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
 
@@ -5731,7 +6036,7 @@ 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
 
 
@@ -5739,7 +6044,7 @@ 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
@@ -5759,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
@@ -5773,25 +6078,25 @@ if test "${with_dvdcss_tree+set}" = set; then
   :
 fi
 
-  case "x$with_dvdcss" in
+  case "x${with_dvdcss}" in
   x|xyes)
-    if test "x$with_dvdcss_tree" = x
+    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:5785: 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 5790 "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:5795: \"$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*
@@ -5811,7 +6116,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-  PLUGINS="${PLUGINS} dvd"
+  PLUGINS="${PLUGINS} access/dvd/dvd"
           dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
 else
   echo "$ac_t""no" 1>&6
@@ -5822,9 +6127,9 @@ done
 
     else
       echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
-echo "configure:5826: 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; }
@@ -5832,7 +6137,7 @@ echo "configure:5826: 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"
+        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
@@ -5842,17 +6147,17 @@ echo "configure:5826: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
     fi
   ;;
   xno)
-        PLUGINS="${PLUGINS} dvd"
+        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:5852: 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"
+      PLUGINS="${PLUGINS} access/dvd/dvd"
       dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
       dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
     else
@@ -5869,7 +6174,7 @@ if test "${enable_dvdread+set}" = set; then
   :
 fi
 
-if test "x$enable_dvdread" != "xno"
+if test "x${enable_dvdread}" != "xno"
 then
   # Check whether --with-dvdread or --without-dvdread was given.
 if test "${with_dvdread+set}" = set; then
@@ -5877,30 +6182,30 @@ if test "${with_dvdread+set}" = set; then
   :
 fi
 
-  if test "x$withval" = x
+  if test "x${with_dvdread}" = "x"
   then
     test_LDFLAGS=""
     test_CFLAGS=""
   else
-    test_LDFLAGS="-L${withval}/lib"
-    test_CFLAGS="-I${withval}/include"
+    test_LDFLAGS="-L${with_dvdread}/lib"
+    test_CFLAGS="-I${with_dvdread}/include"
   fi
-  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
+  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:5894: 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 5899 "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:5904: \"$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*
@@ -5922,17 +6227,17 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
      cat > conftest.$ac_ext <<EOF
-#line 5926 "configure"
+#line 6231 "configure"
 #include "confdefs.h"
 #include <dvdread/dvd_reader.h>
 int main() {
 void foo() { int i=DVD_VIDEO_LB_LEN; }
 ; return 0; }
 EOF
-if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
-          PLUGINS="${PLUGINS} dvdread"
+          PLUGINS="${PLUGINS} access/dvdread/dvdread"
           dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
           dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
         
@@ -5941,7 +6246,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   
-          if test "x$enable_dvdread" != x
+          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
@@ -5951,11 +6256,11 @@ rm -f conftest*
   
 else
   echo "$ac_t""no" 1>&6
-if test "x$enable_dvdread" != x
+if test "x${enable_dvdread}" != "x"
     then
-      if test "x$withval" != x
+      if test "x${with_dvdread}" != "x"
       then
-        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${withval}/include" 1>&2; exit 1; }
+        { 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
@@ -5967,152 +6272,126 @@ done
   CPPFLAGS="$save_CPPFLAGS"
 fi
 
-# Check whether --enable-vcd or --disable-vcd was given.
-if test "${enable_vcd+set}" = set; then
-  enableval="$enable_vcd"
+# Check whether --enable-dvdplay or --disable-dvdplay was given.
+if test "${enable_dvdplay+set}" = set; then
+  enableval="$enable_dvdplay"
   :
 fi
 
-
-if test x$enable_vcd != xno
+if test "x$enable_dvdplay" != "xno"
 then
-  cat > conftest.$ac_ext <<EOF
-#line 5981 "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"
-  
+  # Check whether --with-dvdplay or --without-dvdplay was given.
+if test "${with_dvdplay+set}" = set; then
+  withval="$with_dvdplay"
+  :
 fi
-rm -f conftest*
-
-
-  if test "x${SYS}" = "xbsdi"
-  then
-    PLUGINS="${PLUGINS} vcd"
-  fi
 
-  if test "x${SYS}" = "xdarwin"
+  if test "x$with_dvdplay" = x
   then
-    PLUGINS="${PLUGINS} vcd"
-    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
+    test_LDFLAGS=""
+    test_CFLAGS=""
+  else
+    test_LDFLAGS="-L${with_dvdplay}/lib"
+    test_CFLAGS="-I${with_dvdplay}/include"
   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:6022: checking for inet_pton" >&5
-if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
+  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: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 6027 "configure"
+#line 6308 "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; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (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*
-  eval "ac_cv_func_inet_pton=yes"
+  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_func_inet_pton=no"
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
 fi
-
-if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  PLUGINS="${PLUGINS} ipv6"
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#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
+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
 
+  CPPFLAGS="${save_CPPFLAGS}"
+fi
 
 
-# Check whether --with- or --without- was given.
-if test "${with_+set}" = set; then
-  withval="$with_"
+# Check whether --enable-dvbpsi or --disable-dvbpsi was given.
+if test "${enable_dvbpsi+set}" = set; then
+  enableval="$enable_dvbpsi"
   :
 fi
 
-
-# Check whether --enable-mad or --disable-mad was given.
-if test "${enable_mad+set}" = set; then
-  enableval="$enable_mad"
+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
 
-if test x$enable_mad = xyes
-then
-  PLUGINS="${PLUGINS} mad"
-  mad_LDFLAGS="${mad_LDFLAGS} -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
-        mad_CFLAGS="${mad_CFLAGS} -I$with_val/include"
-        mad_LDFLAGS="${mad_LDFLAGS} -L$with_val/lib"
-      fi 
+  # Check whether --with-dvbpsi or --without-dvbpsi was given.
+if test "${with_dvbpsi+set}" = set; then
+  withval="$with_dvbpsi"
+  :
 fi
 
-  save_CFLAGS=$CFLAGS
-  save_LDFLAGS=$LDFLAGS
-  CFLAGS="$CFLAGS $mad_CFLAGS"
-  LDFLAGS="$LDFLAGS $mad_LDFLAGS"
-  for ac_hdr in mad.h
+  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:6106: checking for $ac_hdr" >&5
+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 6111 "configure"
+#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:6116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (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*
@@ -6132,36 +6411,783 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   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
-echo "Cannot find development headers for libmad..."
-    exit 1
-  
 fi
 done
 
-  echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6146: 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 6154 "configure"
-#include "confdefs.h"
+    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"
+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 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:6165: \"$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
@@ -6176,53 +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
+
+    CPPFLAGS="${save_CPPFLAGS}"
+    LDFLAGS="${save_LDFLAGS}"
+  fi
 fi
 
-  CFLAGS=$save_CFLAGS
-  LDFLAGS=$save_LDFLAGS
+# Check whether --enable-cinepak or --disable-cinepak was given.
+if test "${enable_cinepak+set}" = set; then
+  enableval="$enable_cinepak"
+  :
 fi
 
-if test x$SYS = xbeos
+if test "x${enable_cinepak}" != "xno"
 then
-    PLUGINS="${PLUGINS} beos"
+  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:6216: 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 6221 "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:6226: \"$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*
@@ -6243,9 +7525,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-      BUILTINS="${BUILTINS} a52"
-      a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
-     
+        #PLUGINS="${PLUGINS} demux/ogg/ogg codec/vorbis/vorbis"
+    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
+   
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -6253,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:6269: 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 6274 "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:6279: \"$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*
@@ -6296,15 +7578,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    PLUGINS="${PLUGINS} vorbis"
-    vorbis_LDFLAGS="${vorbis_LDFLAGS} -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.
@@ -6320,30 +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
-  CPPFLAGS="$save_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:6337: 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 6342 "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:6347: \"$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*
@@ -6364,16 +7640,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    PLUGINS="${PLUGINS} x11"
-    x11_LDFLAGS="${x11_LDFLAGS} -L$x_libraries -lX11 -lXext"
-    x11_CFLAGS="${x11_CFLAGS} -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="$save_CPPFLAGS"
+  CPPFLAGS="${save_CPPFLAGS}"
 fi
 
 # Check whether --enable-xvideo or --disable-xvideo was given.
@@ -6382,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
-  save_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$save_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:6400: 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 6405 "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:6410: \"$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*
@@ -6427,29 +7696,28 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-    save_CFLAGS=$CFLAGS
-    CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
-    echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
-echo "configure:6434: 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 6442 "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:6453: \"$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
@@ -6465,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"
-      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv_pic"
-      xvideo_CFLAGS="${xvideo_CFLAGS} -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"
-      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv"
-      xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes"
+# Otherwise... well, do nothing.
+        :
+      
+fi
+
+    
 fi
 
-    CFLAGS="$save_CFLAGS"
+    CFLAGS="${save_CFLAGS}"
   
-  CPPFLAGS="$save_CPPFLAGS"
+  CPPFLAGS="${save_CPPFLAGS}"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -6492,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:6511: 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
@@ -6520,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
@@ -6540,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:6551: 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
@@ -6560,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
@@ -6583,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:6592: 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
@@ -6601,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
@@ -6623,27 +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"
+    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"
+    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:6637: 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 6642 "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:6647: \"$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*
@@ -6676,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.
@@ -6697,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
@@ -6707,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:6717: 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 6722 "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:6727: \"$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*
@@ -6743,7 +8054,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-  PLUGINS="${PLUGINS} directx"
+  PLUGINS="${PLUGINS} video_output/directx/directx"
         directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
 else
   echo "$ac_t""no" 1>&6
@@ -6751,17 +8062,17 @@ fi
 done
 
     else
-      echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
-echo "configure:6756: 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"
-        directx_LDFLAGS="${directx_LDFLAGS} -L${withval}/lib -lgdi32"
-        directx_CFLAGS="${directx_CFLAGS} -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
@@ -6773,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:6783: 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 6788 "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:6793: \"$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*
@@ -6810,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
@@ -6822,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
 
@@ -6835,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"
+  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"
-        ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_val/lib"
+        CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
+        ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
       fi 
 fi
 
@@ -6857,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"
+  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
-        glide_CFLAGS="${glide_CFLAGS} -I$with_val/include"
-        glide_LDFLAGS="${glide_LDFLAGS} -L$with_val/lib"
+        glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
+        glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
       fi 
 fi
 
@@ -6880,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:6888: 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 6893 "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:6898: \"$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*
@@ -6916,9 +8227,9 @@ else
 have_aa="false"
 fi
 
-  if test x$have_aa = xtrue
+  if test "x${have_aa}" = "xtrue"
   then
-    PLUGINS="${PLUGINS} aa"
+    PLUGINS="${PLUGINS} video_output/aa"
     aa_LDFLAGS="${aa_LDFLAGS} -laa"
   fi
 fi
@@ -6931,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:6949: 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 6954 "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:6959: \"$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*
@@ -6976,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:6982: 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
@@ -6986,14 +8297,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lossaudio  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6990 "configure"
+#line 8301 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:6997: \"$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
@@ -7008,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
-  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
+  oss_LDFLAGS="${oss_LDFLAGS} -lossaudio"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -7024,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:7033: 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
@@ -7062,9 +8373,9 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-     if test x${ESD_CONFIG} != xno
+     if test "x${ESD_CONFIG}" != "xno"
      then
-       PLUGINS="${PLUGINS} esd"
+       #PLUGINS="${PLUGINS} audio_output/esd"
        esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
        esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
      fi
@@ -7075,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:7084: 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
@@ -7113,34 +8424,246 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-     if test x${ARTS_CONFIG} != xno
-     then
-       PLUGINS="${PLUGINS} 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:7134: checking for alsa/asoundlib.h" >&5
+     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
+
+  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 7139 "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:7144: \"$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*
@@ -7156,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:7161: 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 7169 "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:7176: \"$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"
-       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$enableval" != "xno" -a x$SYS = xmingw32
-  then
-    PLUGINS="${PLUGINS} waveout"
-    waveout_LDFLAGS="-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
 
@@ -7249,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:7253: 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
@@ -7262,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
@@ -7283,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:7292: 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
@@ -7301,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
@@ -7322,32 +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
-    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
-    gtk_LDFLAGS="${gtk_LDFLAGS} `${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
-    CPPFLAGS="$save_CPPFLAGS $gtk_CFLAGS"
+    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:7341: 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 7346 "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:7351: \"$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*
@@ -7376,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="$save_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:7397: 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
@@ -7432,22 +8905,22 @@ fi
        gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
     fi
     # now look for the gnome.h header
-    CPPFLAGS="$save_CPPFLAGS $gnome_CFLAGS"
+    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:7441: 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 7446 "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:7451: \"$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*
@@ -7468,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
@@ -7479,7 +8952,7 @@ developement tools or remove the --enable-gnome option" 1>&2; exit 1; }
 fi
 done
 
-    CPPFLAGS="$save_CPPFLAGS"
+    CPPFLAGS="${save_CPPFLAGS}"
   fi
 fi
 
@@ -7487,8 +8960,8 @@ 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"
      qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
      qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
@@ -7505,8 +8978,8 @@ 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"
      kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
      kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
@@ -7521,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"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
-     LDFLAGS="${LDFLAGS} -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:7540: 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 7545 "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:7550: \"$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*
@@ -7566,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"
-     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     macosx_CFLAGS="${macosx_CFLAGS} -ObjC"
-     LDFLAGS="${LDFLAGS} -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
@@ -7585,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:7595: 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 7600 "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:7605: \"$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*
@@ -7622,7 +9109,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-        PLUGINS="${PLUGINS} qnx"
+        PLUGINS="${PLUGINS} gui/qnx/qnx"
         qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
       
 else
@@ -7635,7 +9122,7 @@ done
 # Check whether --enable-intfwin or --disable-intfwin was given.
 if test "${enable_intfwin+set}" = set; then
   enableval="$enable_intfwin"
-   if test "x$enableval" != "xno"
+   if test "x${enable_intfwin}" != "xno"
   then
     # Check whether --with-bcbuilder or --without-bcbuilder was given.
 if test "${with_bcbuilder+set}" = set; then
@@ -7643,11 +9130,11 @@ if test "${with_bcbuilder+set}" = set; then
   :
 fi
 
-    if test "x$with_bcbuilder" != "x"
+    if test "x${with_bcbuilder}" != "x"
     then
-      BCBUILDER="$with_bcbuilder"
+      BCBUILDER="${with_bcbuilder}"
     fi
-    PLUGINS="${PLUGINS} intfwin"
+    PLUGINS="${PLUGINS} gui/win32/win32"
   fi 
 fi
 
@@ -7655,34 +9142,83 @@ 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"
+  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:7676: 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 7681 "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:7686: \"$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*
@@ -7699,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:7703: 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
@@ -7707,7 +9243,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7711 "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
@@ -7718,7 +9254,7 @@ int main() {
 lirc_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7722: \"$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
@@ -7744,9 +9280,9 @@ else
 have_lirc="false"
 fi
 
-  if test x$have_lirc = xtrue
+  if test "x${have_lirc}" = "xtrue"
   then
-    PLUGINS="${PLUGINS} lirc"
+    PLUGINS="${PLUGINS} control/lirc/lirc"
     lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
   fi
 fi
@@ -7764,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
       ;;
@@ -7773,11 +9309,11 @@ fi
       ;;
     *)
                   echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:7777: 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 };
@@ -7795,11 +9331,11 @@ EOF
           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
@@ -7807,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
@@ -7821,11 +9357,18 @@ EOF
 
 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
 
 
@@ -7833,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
-    LDFLAGS="${LDFLAGS} -lcprof"
+    save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
     CPROF=1
+    PROFILING="cprof"
   fi
 
 fi
@@ -7845,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:7851: 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
@@ -7855,7 +9399,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7859 "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
@@ -7866,7 +9410,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7870: \"$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
@@ -7894,7 +9438,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 7898 "configure"
+#line 9442 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -7918,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:7924: 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
@@ -7928,7 +9472,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lst  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7932 "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
@@ -7939,7 +9483,7 @@ int main() {
 st_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7943: \"$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
@@ -7967,7 +9511,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 7971 "configure"
+#line 9515 "configure"
 #include "confdefs.h"
 #include <st.h>
 EOF
@@ -7988,12 +9532,112 @@ rm -f conftest*
 fi
 
 
-LDFLAGS="${LDFLAGS} ${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=
@@ -8001,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"
@@ -8010,21 +9654,25 @@ then
 fi
 
 cat >> confdefs.h <<EOF
-#define VERSION_MESSAGE "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN"
+#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
 
 
@@ -8033,6 +9681,36 @@ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -8222,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
 
@@ -8309,8 +9987,10 @@ 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
@@ -8328,16 +10008,25 @@ s%@BCBUILDER@%$BCBUILDER%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%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%@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
@@ -8348,33 +10037,43 @@ 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%@chroma_i420_rgb_LDFLAGS@%$chroma_i420_rgb_LDFLAGS%g
+s%@i420_rgb_LDFLAGS@%$i420_rgb_LDFLAGS%g
 s%@directx_LDFLAGS@%$directx_LDFLAGS%g
-s%@dsp_LDFLAGS@%$dsp_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%@filter_distort_LDFLAGS@%$filter_distort_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
@@ -8382,8 +10081,10 @@ 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
@@ -8391,6 +10092,7 @@ 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
@@ -8432,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
@@ -8640,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
@@ -8651,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}'.
 "