]> git.sesse.net Git - vlc/blobdiff - configure
* ./AUTHORS: added people locations, just for fun.
[vlc] / configure
index d635156eb55373cd6bc7998f1eaf987935f5cb29..54323d2b493541563272378e0b8aa4f1dd213dca 100755 (executable)
--- a/configure
+++ b/configure
@@ -18,101 +18,124 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-included-gettext use the GNU gettext library included here"
 ac_help="$ac_help
-  --with-words=endianness Set endianness (big or little)"
+"
+ac_help="$ac_help
+Optimization options:"
 ac_help="$ac_help
-  --with-tuning=[arch]    Enable special tuning for an architecture
+  --with-tuning=ARCH      enable special tuning for an architecture
                           (default i686 on IA-32 and 750 on PPC)"
 ac_help="$ac_help
-  --enable-release        Activate extra optimizations (default disabled)"
+  --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          Enable debug mode (default disabled)"
+  --enable-debug          debug mode (default disabled)"
 ac_help="$ac_help
-  --enable-trace          Enable trace mode (default disabled)"
+  --enable-release        activate extra optimizations (default disabled)"
 ac_help="$ac_help
-  --enable-gprof          Enable gprof profiling (default disabled)"
+Input plugins:"
 ac_help="$ac_help
-  --enable-cprof          Enable cprof profiling (default disabled)"
+  --enable-dvd            DVD input module (default enabled)"
 ac_help="$ac_help
-  --disable-optimizations Disable compiler optimizations (default enabled)"
+    --with-dvdcss=PATH    libdvdcss headers and libraries"
 ac_help="$ac_help
-  --enable-pth            Enable GNU Pth support (default disabled)"
+    --with-dvdcss-tree=PATH libdvdcss tree for static linking"
 ac_help="$ac_help
-  --with-dvdcss[=name]    way to use libdvdcss, either 'yes' or 'no',
-                          or 'local-static', 'local-shared', or a path to
-                          another libdvdcss such as '/usr/local'
-                          (default 'local-static')"
+  --enable-dvdread        dvdread input module (default disabled)"
 ac_help="$ac_help
-  --with-dvdread[=name]   way to use libdvdread,
-                          same options as --with-dvdcss (default no)"
+    --with-dvdread=PATH   libdvdread headers and libraries"
 ac_help="$ac_help
-  --enable-vcd            VCD support for Linux (default enabled)"
+  --enable-vcd            VCD support for Linux and MacOS X (default enabled)"
 ac_help="$ac_help
-  --disable-dummy         dummy module (default enabled)"
+  --enable-satellite      satellite card support (default disabled)"
 ac_help="$ac_help
-  --disable-null          Null module (default enabled)"
+Codec plugins:"
 ac_help="$ac_help
-  --disable-rc            Remote Control module (default enabled)"
+  --enable-mad            libmad module (default disabled)"
 ac_help="$ac_help
-  --with-mad[=PATH]       libmad module (default disabled)"
+    --with-mad=PATH       path to libmad"
 ac_help="$ac_help
-  --disable-dsp           Linux /dev/dsp support (default enabled)"
+  --enable-a52            AC3 support with liba52 (default enabled)"
 ac_help="$ac_help
-  --enable-esd            Esound library support (default disabled)"
+  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)"
 ac_help="$ac_help
-  --enable-arts           aRts sound server (default disabled)"
+Video plugins:"
 ac_help="$ac_help
-  --enable-macosx         MacOS X support (default enabled on MacOS X)"
+  --enable-x11            X11 support (default enabled)"
+ac_help="$ac_help
+  --enable-xvideo         XVideo support (default enabled)"
+ac_help="$ac_help
+  --enable-sdl            SDL support (default enabled)"
+ac_help="$ac_help
+    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)"
 ac_help="$ac_help
-  --disable-qnx           QNX RTOS support (default enabled on QNX RTOS)"
+  --enable-directx        Win32 DirectX support (default enabled on Win32)"
 ac_help="$ac_help
-  --disable-a52           AC3 support with liba52 (default enabled)"
+    --with-directx=PATH   Win32 DirectX headers and libraries"
 ac_help="$ac_help
-  --enable-fb             Linux framebuffer support (default disabled)"
+  --enable-fb             Linux framebuffer support (default enabled on Linux)"
 ac_help="$ac_help
   --enable-mga            Linux kernel Matrox support (default disabled)"
 ac_help="$ac_help
-  --with-ggi[=name]       GGI support (default disabled)"
+  --enable-ggi            GGI support (default disabled)"
 ac_help="$ac_help
-  --disable-sdl           SDL support (default enabled)"
+    --with-ggi=PATH       path to libggi"
 ac_help="$ac_help
-  --with-sdl-config-path=path sdl-config path (default search in \$PATH)"
+  --enable-glide          Glide (3dfx) support (default disabled)"
 ac_help="$ac_help
-  --disable-directx       Win32 DirectX support (default enabled on Win32)"
+    --with-glide=PATH     path to libglide"
 ac_help="$ac_help
-  --with-directx-path=path Win32 DirectX headers and libraries"
+  --enable-aa             aalib output (default disabled)"
 ac_help="$ac_help
-  --disable-waveout       Win32 waveOut module (default enabled on Win32)"
+Audio plugins:"
 ac_help="$ac_help
-  --enable-win32          Win32 interface support (default disabled)"
+  --enable-dsp            Linux /dev/dsp support (enabled on Linux)"
 ac_help="$ac_help
-  --with-glide[=name]     Glide (3dfx) support (default disabled)"
+  --enable-esd            Esound library support (default disabled)"
 ac_help="$ac_help
-  --enable-ncurses        ncurses interface support (default disabled)"
+  --enable-arts           aRts sound server (default disabled)"
+ac_help="$ac_help
+  --enable-alsa           ALSA sound support for Linux (default disabled)"
+ac_help="$ac_help
+  --enable-waveout        Win32 waveOut module (default enabled on Win32)"
+ac_help="$ac_help
+Interface plugins:"
+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-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-gnome          Gnome interface support (default disabled)"
+  --enable-macosx         MacOS X support (default enabled on MacOS X)"
 ac_help="$ac_help
-  --disable-gtk           Gtk+ support (default enabled)"
+  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)"
 ac_help="$ac_help
-  --with-gtk-config-path=path gtk-config path (default search in \$PATH)"
+  --enable-intfwin        Win32 interface support (default disabled)"
 ac_help="$ac_help
-  --disable-x11           X11 support (default enabled)"
+    --with-bcbuilder=PATH Borland C++ Builder installation path"
 ac_help="$ac_help
-  --disable-xvideo        XVideo support (default enabled)"
+  --enable-ncurses        ncurses interface support (default disabled)"
 ac_help="$ac_help
   --enable-lirc           lirc support (default disabled)"
 ac_help="$ac_help
-  --enable-alsa           Alsa sound drivers support (Only for linux)
-                          (default disabled)"
+Misc options:"
+ac_help="$ac_help
+  --with-words=endianness set endianness (big or little)"
+ac_help="$ac_help
+  --enable-gprof          gprof profiling (default disabled)"
+ac_help="$ac_help
+  --enable-cprof          cprof profiling (default disabled)"
 ac_help="$ac_help
-  --disable-plugins       Make all plug-ins built-in (default plug-ins enabled)"
+  --enable-pth            GNU Pth support (default disabled)"
 ac_help="$ac_help
-  --with-dll-path=path    Path to Win32 DLLs (default search in \$PWD)"
+  --enable-st             State Threads (default disabled)"
+ac_help="$ac_help
+  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -624,7 +647,6 @@ fi
 
 
 
-
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
@@ -672,7 +694,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:676: checking host system type" >&5
+echo "configure:698: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -693,7 +715,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:697: checking target system type" >&5
+echo "configure:719: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -711,7 +733,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:715: checking build system type" >&5
+echo "configure:737: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -734,31 +756,16 @@ test "$host_alias" != "$target_alias" &&
   program_prefix=${target_alias}-
 
 
-HAVE_VLC=0
-if test -r src/interface/main.c; then
-  HAVE_VLC=1
-  VLC_VERSION="0.2.92-dev"
-  VLC_CODENAME=Ourumov
-fi
-
-HAVE_LIBDVDCSS=0
-if test -r extras/libdvdcss/libdvdcss.c; then
-  HAVE_LIBDVDCSS=1
-  LIBDVDCSS_VERSION="1.0.1-dev"
-  
-  if test -r extras/libdvdcss/csskeys.h; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_CSSKEYS 1
-EOF
-
-  fi
-fi
+PACKAGE="vlc"
+VERSION="0.3.0"
+CODENAME=Ourumov
 
 save_CFLAGS="${CFLAGS}"
+save_CPPFLAGS="${CPPFLAGS}"
 save_LDFLAGS="${LDFLAGS}"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:762: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:769: 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
@@ -787,7 +794,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:791: checking for $ac_word" >&5
+echo "configure:798: 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
@@ -817,7 +824,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:821: checking for $ac_word" >&5
+echo "configure:828: 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
@@ -868,7 +875,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:872: checking for $ac_word" >&5
+echo "configure:879: 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
@@ -900,7 +907,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:911: 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.
@@ -911,12 +918,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 915 "configure"
+#line 922 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:927: \"$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
@@ -942,12 +949,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:946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:953: 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:951: checking whether we are using GNU C" >&5
+echo "configure:958: 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
@@ -956,7 +963,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:960: \"$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:967: \"$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
@@ -975,7 +982,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:979: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:986: 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
@@ -1007,7 +1014,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1011: checking how to run the C preprocessor" >&5
+echo "configure:1018: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1022,13 +1029,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 1026 "configure"
+#line 1033 "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:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1039: \"$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
   :
@@ -1039,13 +1046,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1043 "configure"
+#line 1050 "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:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1056: \"$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
   :
@@ -1056,13 +1063,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1060 "configure"
+#line 1067 "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:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1073: \"$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
   :
@@ -1096,7 +1103,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:1100: checking for $ac_word" >&5
+echo "configure:1107: 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
@@ -1128,7 +1135,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:1132: checking for $ac_word" >&5
+echo "configure:1139: 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
@@ -1160,21 +1167,145 @@ else
 fi
 fi
 
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1174: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1206: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  STRIP=":"
+fi
+fi
+
+
+# Extract the first word of "gmake", so it can be a program name with args.
+set dummy gmake; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1242: 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
+  case "$GMAKE" in
+  /*)
+  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_GMAKE="$GMAKE" # 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_GMAKE="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GMAKE" && ac_cv_path_GMAKE="no"
+  ;;
+esac
+fi
+GMAKE="$ac_cv_path_GMAKE"
+if test -n "$GMAKE"; then
+  echo "$ac_t""$GMAKE" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+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
+if eval "test \"`echo '$''{'ac_cv_gmake'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if make --version | grep -q -i gnu; then
+         ac_cv_gmake="yes"
+       else
+         echo "This software needs you to install GNU make to compile properly."
+         echo "You can get it from http://www.gnu.org/."
+         exit
+       fi
+fi
+
+echo "$ac_t""$ac_cv_gmake" 1>&6
+  VLC_MAKE="make"
+else
+  VLC_MAKE="gmake"
+fi
 
-ALL_LINGUAS="de fr ru"
+ALL_LINGUAS="de fr ja no ru nl"
 
 cat >> confdefs.h <<EOF
-#define PACKAGE "vlc"
+#define VLC_PACKAGE "$PACKAGE"
 EOF
 
 cat >> confdefs.h <<EOF
-#define VERSION "$VLC_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:1178: checking for $ac_word" >&5
+echo "configure:1309: 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
@@ -1203,7 +1334,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1207: checking for strerror in -lcposix" >&5
+echo "configure:1338: 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
@@ -1211,7 +1342,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1215 "configure"
+#line 1346 "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
@@ -1222,7 +1353,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1357: \"$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
@@ -1245,12 +1376,12 @@ fi
   
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1249: checking for ANSI C header files" >&5
+echo "configure:1380: 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 1254 "configure"
+#line 1385 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1258,7 +1389,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1393: \"$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*
@@ -1275,7 +1406,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 1279 "configure"
+#line 1410 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1293,7 +1424,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 1297 "configure"
+#line 1428 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1314,7 +1445,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1318 "configure"
+#line 1449 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1325,7 +1456,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1349,12 +1480,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1353: checking for working const" >&5
+echo "configure:1484: 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 1358 "configure"
+#line 1489 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1403,7 +1534,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1424,21 +1555,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1428: checking for inline" >&5
+echo "configure:1559: 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 1435 "configure"
+#line 1566 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1464,12 +1595,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1468: checking for off_t" >&5
+echo "configure:1599: 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 1473 "configure"
+#line 1604 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1497,12 +1628,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1501: checking for size_t" >&5
+echo "configure:1632: 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 1506 "configure"
+#line 1637 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1532,19 +1663,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:1536: checking for working alloca.h" >&5
+echo "configure:1667: 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 1541 "configure"
+#line 1672 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1679: \"$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
@@ -1565,12 +1696,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1569: checking for alloca" >&5
+echo "configure:1700: 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 1574 "configure"
+#line 1705 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1598,7 +1729,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1733: \"$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
@@ -1630,12 +1761,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1634: checking whether alloca needs Cray hooks" >&5
+echo "configure:1765: 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 1639 "configure"
+#line 1770 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1660,12 +1791,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:1664: checking for $ac_func" >&5
+echo "configure:1795: 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 1669 "configure"
+#line 1800 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1688,7 +1819,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1823: \"$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
@@ -1715,7 +1846,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1719: checking stack direction for C alloca" >&5
+echo "configure:1850: 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
@@ -1723,7 +1854,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1727 "configure"
+#line 1858 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1742,7 +1873,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1877: \"$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
@@ -1767,17 +1898,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:1771: checking for $ac_hdr" >&5
+echo "configure:1902: 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 1776 "configure"
+#line 1907 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1912: \"$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*
@@ -1806,12 +1937,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1810: checking for $ac_func" >&5
+echo "configure:1941: 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 1815 "configure"
+#line 1946 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1834,7 +1965,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1969: \"$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
@@ -1859,7 +1990,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1863: checking for working mmap" >&5
+echo "configure:1994: 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
@@ -1867,7 +1998,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1871 "configure"
+#line 2002 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2007,7 +2138,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2142: \"$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
@@ -2031,12 +2162,12 @@ fi
 
 
     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:2035: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:2166: 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 2040 "configure"
+#line 2171 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -2072,17 +2203,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:2076: checking for $ac_hdr" >&5
+echo "configure:2207: 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 2081 "configure"
+#line 2212 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2217: \"$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*
@@ -2113,12 +2244,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:2117: checking for $ac_func" >&5
+echo "configure:2248: 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 2122 "configure"
+#line 2253 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2141,7 +2272,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2276: \"$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
@@ -2181,7 +2312,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2185: checking for iconv" >&5
+echo "configure:2316: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2189,7 +2320,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 2193 "configure"
+#line 2324 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2199,7 +2330,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -2211,7 +2342,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 2215 "configure"
+#line 2346 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2221,7 +2352,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2356: \"$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
@@ -2242,13 +2373,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:2246: checking for iconv declaration" >&5
+echo "configure:2377: 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 2252 "configure"
+#line 2383 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2267,7 +2398,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -2296,19 +2427,19 @@ EOF
 
    
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2300: checking for nl_langinfo and CODESET" >&5
+echo "configure:2431: 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 2305 "configure"
+#line 2436 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_langinfo_codeset=yes
 else
@@ -2331,19 +2462,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2335: checking for LC_MESSAGES" >&5
+echo "configure:2466: 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 2340 "configure"
+#line 2471 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2478: \"$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
@@ -2364,7 +2495,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2368: checking whether NLS is requested" >&5
+echo "configure:2499: 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"
@@ -2386,7 +2517,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2390: checking whether included gettext is requested" >&5
+echo "configure:2521: 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"
@@ -2406,17 +2537,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2410: checking for libintl.h" >&5
+echo "configure:2541: 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 2415 "configure"
+#line 2546 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2551: \"$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*
@@ -2433,12 +2564,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:2437: checking for GNU gettext in libc" >&5
+echo "configure:2568: 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 2442 "configure"
+#line 2573 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2447,7 +2578,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2582: \"$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
@@ -2463,14 +2594,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:2467: checking for GNU gettext in libintl" >&5
+echo "configure:2598: 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 2474 "configure"
+#line 2605 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2479,7 +2610,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2614: \"$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
@@ -2512,12 +2643,12 @@ EOF
             for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2516: checking for $ac_func" >&5
+echo "configure:2647: 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 2521 "configure"
+#line 2652 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2540,7 +2671,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2675: \"$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
@@ -2569,7 +2700,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:2573: checking for $ac_word" >&5
+echo "configure:2704: 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
@@ -2603,7 +2734,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:2607: checking for $ac_word" >&5
+echo "configure:2738: 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
@@ -2640,7 +2771,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:2644: checking for $ac_word" >&5
+echo "configure:2775: 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
@@ -2690,7 +2821,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:2694: checking for $ac_word" >&5
+echo "configure:2825: 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
@@ -2724,7 +2855,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:2728: checking for $ac_word" >&5
+echo "configure:2859: 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
@@ -2760,7 +2891,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:2764: checking for $ac_word" >&5
+echo "configure:2895: 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
@@ -2831,7 +2962,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:2835: checking for $ac_word" >&5
+echo "configure:2966: 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
@@ -2864,7 +2995,7 @@ done
       ac_verc_fail=yes
     else
             echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:2868: checking version of bison" >&5
+echo "configure:2999: 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;;
@@ -2911,7 +3042,7 @@ echo "configure:2868: checking version of bison" >&5
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2915: checking for catalogs to be installed" >&5
+echo "configure:3046: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for presentlang in $ALL_LINGUAS; do
          useit=no
@@ -2963,7 +3094,7 @@ echo "configure:2915: 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:2967: checking for a BSD compatible install" >&5
+echo "configure:3098: 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
@@ -3016,78 +3147,138 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
-# Check whether --with-words or --without-words was given.
-if test "${with_words+set}" = set; then
-  withval="$with_words"
-  :
+case x"${target_os}" in
+  x)
+    SYS=unknown
+    ;;
+  xlinux*)
+    SYS=linux
+    ;;
+  xbsdi*)
+    SYS=bsdi
+    save_CFLAGS="${save_CFLAGS} -pthread"
+    dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
+    vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
+    ;;
+  x*bsd*)
+    SYS="${target_os}"
+    save_CFLAGS="${save_CFLAGS} -pthread"
+    ;;
+  xdarwin*)
+    SYS=darwin
+    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"
+    ;;
+  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
+if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+  echo "$ac_t""$WINDRES" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-  case "x$withval" in
-    xbig)
-      ac_cv_c_bigendian=yes
-      ;;
-    xlittle)
-      ac_cv_c_bigendian=no
-      ;;
-    *)
-                  echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:3035: checking whether the byte order is big-endian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+
+if test -z "$ac_cv_prog_WINDRES"; then
+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
+if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  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 };
-        void _a(void) { char*s = (char*)am; s = (char *)ai; }
-        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
-        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
-        void _e(void) { char*s = (char*)em; s = (char*)ei; }
-        int main(void) { _a(); _e(); return 0; }
-EOF
-        
-        if test -f conftest.c
-        then 
-          if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
-              && test -f conftest.o
-          then
-            if test `grep -l BIGenDianSyS conftest.o`
-            then
-              ac_cv_c_bigendian=yes
-            fi
-            if test `grep -l LiTTleEnDian conftest.o`
-            then
-              ac_cv_c_bigendian=no
-            fi
-          fi
-        fi
-      
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_WINDRES="windres"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
+fi
+fi
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+  echo "$ac_t""$WINDRES" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-      if test $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
-then
-  cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
+else
+  WINDRES=":"
+fi
+fi
+
+    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
+    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
+    rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
+    ;;
+  x*nto*)
+    SYS=nto
+    x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
+    xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
+    ;;
+  xbeos)
+    SYS=beos
+    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
+    plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
+    beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
+    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
+    ;;
+  x*)
+    SYS="${target_os}"
+    ;;
+esac
 
+if test x"${SYS}" = xmingw32
+then
+  plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
+else
+  plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
 fi
 
-for ac_func in gettimeofday select strerror strtod strtol isatty
+save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
+
+for ac_func in gettimeofday select strerror strtod strtol isatty usleep vasprintf swab sigrelse getpwuid memalign posix_memalign
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3086: checking for $ac_func" >&5
+echo "configure:3277: 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 3091 "configure"
+#line 3282 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3110,7 +3301,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3305: \"$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
@@ -3134,13 +3325,14 @@ else
 fi
 done
 
+
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3139: checking for connect" >&5
+echo "configure:3331: 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 3144 "configure"
+#line 3336 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3163,7 +3355,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3359: \"$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
@@ -3182,7 +3374,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3186: checking for connect in -lsocket" >&5
+echo "configure:3378: 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
@@ -3190,7 +3382,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3194 "configure"
+#line 3386 "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
@@ -3201,7 +3393,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3397: \"$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
@@ -3216,21 +3408,22 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB="${LIB} -lsocket"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
+
 else
   echo "$ac_t""no" 1>&6
 fi
 
-
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3229: checking for gethostbyname" >&5
+echo "configure:3422: 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 3234 "configure"
+#line 3427 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3253,7 +3446,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3450: \"$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
@@ -3272,7 +3465,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3276: checking for gethostbyname in -lnsl" >&5
+echo "configure:3469: 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
@@ -3280,7 +3473,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3284 "configure"
+#line 3477 "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
@@ -3291,7 +3484,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3488: \"$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
@@ -3306,7 +3499,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB="${LIB} -lnsl"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3314,74 +3507,74 @@ fi
 
 fi
 
-echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3319: checking for nanosleep" >&5
-if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
+echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:3512: 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 3324 "configure"
+#line 3517 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char nanosleep(); below.  */
+    which can conflict with char gethostbyname(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char nanosleep();
+char gethostbyname();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 choke me
 #else
-nanosleep();
+gethostbyname();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_nanosleep=yes"
+  eval "ac_cv_func_gethostbyname=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_nanosleep=no"
+  eval "ac_cv_func_gethostbyname=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   :
 else
   echo "$ac_t""no" 1>&6
 
-  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:3366: checking for nanosleep in -lrt" >&5
-ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
+echo "configure:3559: checking for gethostbyname in -lbind" >&5
+ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lrt  $LIBS"
+LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3374 "configure"
+#line 3567 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char nanosleep();
+char gethostbyname();
 
 int main() {
-nanosleep()
+gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3578: \"$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
@@ -3396,20 +3589,71 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB="${LIB} -lrt"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
 else
   echo "$ac_t""no" 1>&6
+fi
 
-    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:3405: checking for nanosleep in -lposix4" >&5
-ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
+
+fi
+
+echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
+echo "configure:3602: 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"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char nanosleep(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char nanosleep();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
+choke me
+#else
+nanosleep();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_nanosleep=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_nanosleep=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+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
+ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lposix4  $LIBS"
+LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3413 "configure"
+#line 3657 "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
@@ -3420,7 +3664,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3668: \"$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
@@ -3435,79 +3679,63 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB="${LIB} -lposix4"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"
 else
   echo "$ac_t""no" 1>&6
-fi
-
-  
-fi
 
-
-fi
-
-for ac_func in usleep
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3453: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
+echo "configure:3688: checking for nanosleep in -lposix4" >&5
+ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 3458 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lposix4  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3696 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char nanosleep();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"
 else
   echo "$ac_t""no" 1>&6
 fi
-done
+
+  
+fi
+
+
+fi
 
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:3506: checking for inet_aton" >&5
+echo "configure:3734: 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 3511 "configure"
+#line 3739 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -3530,7 +3758,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3762: \"$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
@@ -3549,7 +3777,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3553: checking for inet_aton in -lresolv" >&5
+echo "configure:3781: 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
@@ -3557,7 +3785,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3561 "configure"
+#line 3789 "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
@@ -3568,7 +3796,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3800: \"$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
@@ -3583,7 +3811,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB="${LIB} -lresolv"
+  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
 
-for ac_func in vasprintf
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3598: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+echo $ac_n "checking for textdomain""... $ac_c" 1>&6
+echo "configure:3824: 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 3603 "configure"
+#line 3829 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char textdomain(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char textdomain();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_textdomain) || defined (__stub___textdomain)
 choke me
 #else
-$ac_func();
+textdomain();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_func_textdomain=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_func_textdomain=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'textdomain`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
+  :
 else
   echo "$ac_t""no" 1>&6
-fi
-done
 
-for ac_func in swab
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3653: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
+echo "configure:3871: 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
 else
-  cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lintl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3879 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char textdomain();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+textdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
+  vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
 else
   echo "$ac_t""no" 1>&6
 fi
-done
 
-for ac_func in memalign valloc
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3708: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+
+fi
+
+
+NEED_GETOPT=0
+echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
+echo "configure:3916: 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 3713 "configure"
+#line 3921 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char getopt_long(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char getopt_long();
 
 int main() {
 
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
 choke me
 #else
-$ac_func();
+getopt_long();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_func_getopt_long=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_func_getopt_long=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+  cat >> confdefs.h <<\EOF
+#define HAVE_GETOPT_LONG 1
 EOF
+
 else
   echo "$ac_t""no" 1>&6
-fi
-done
-
-
-for ac_func in sigrelse
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3764: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ # FreeBSD has a gnugetopt library for this:
+  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
+echo "configure:3966: checking for getopt_long in -lgnugetopt" >&5
+ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 3769 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lgnugetopt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3974 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char $ac_func();
+char getopt_long();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+getopt_long()
 ; return 0; }
 EOF
-if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-NEED_GETOPT=0
-echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:3819: 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 3824 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getopt_long(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char getopt_long();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
-choke me
-#else
-getopt_long();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_getopt_long=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_getopt_long=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_GETOPT_LONG 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
- # FreeBSD has a gnugetopt library for this:
-  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:3869: checking for getopt_long in -lgnugetopt" >&5
-ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lgnugetopt  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3877 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char getopt_long();
-
-int main() {
-getopt_long()
-; return 0; }
-EOF
-if { (eval echo configure:3888: \"$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
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   cat >> confdefs.h <<\EOF
 #define HAVE_GETOPT_LONG 1
 EOF
LIB="${LIB} -lgnugetopt"
vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"
 else
   echo "$ac_t""no" 1>&6
 NEED_GETOPT=1
@@ -3912,12 +4009,12 @@ fi
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3916: checking return type of signal handlers" >&5
+echo "configure:4013: 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 3921 "configure"
+#line 4018 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3934,7 +4031,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3953,7 +4050,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3957: checking for dlopen in -ldl" >&5
+echo "configure:4054: 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
@@ -3961,7 +4058,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3965 "configure"
+#line 4062 "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
@@ -3972,7 +4069,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4073: \"$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
@@ -3987,13 +4084,13 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB="${LIB} -ldl"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -ldl"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
-echo "configure:3997: checking for cos in -lm" >&5
+echo "configure:4094: 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
@@ -4001,7 +4098,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4005 "configure"
+#line 4102 "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
@@ -4012,7 +4109,7 @@ int main() {
 cos()
 ; return 0; }
 EOF
-if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4113: \"$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
@@ -4027,14 +4124,14 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IMDCT="${LIB_IMDCT} -lm"
-  LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
+  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
+  filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm"
 else
   echo "$ac_t""no" 1>&6
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:4038: checking for pow in -lm" >&5
+echo "configure:4135: 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
@@ -4042,7 +4139,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4046 "configure"
+#line 4143 "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
@@ -4053,7 +4150,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4154: \"$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
@@ -4068,9 +4165,10 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IMDCT="${LIB_IMDCT} -lm"
-  LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
-  LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
+  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
+  imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
+  imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
+  chroma_i420_rgb_LDFLAGS="${chroma_i420_rgb_LDFLAGS} -lm"
 
 else
   echo "$ac_t""no" 1>&6
@@ -4080,7 +4178,7 @@ 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:4084: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:4182: checking for pthread_attr_init in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_attr_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
@@ -4088,7 +4186,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4092 "configure"
+#line 4190 "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
@@ -4099,7 +4197,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4201: \"$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
@@ -4122,7 +4220,7 @@ 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:4126: checking for pthread_attr_init in -lpthreads" >&5
+echo "configure:4224: checking for pthread_attr_init in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'pthread_attr_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
@@ -4130,7 +4228,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4134 "configure"
+#line 4232 "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
@@ -4141,7 +4239,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4243: \"$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
@@ -4164,7 +4262,7 @@ 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:4168: checking for pthread_attr_init in -lc_r" >&5
+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 eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4172,7 +4270,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4176 "configure"
+#line 4274 "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
@@ -4183,7 +4281,7 @@ int main() {
 pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4285: \"$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
@@ -4206,12 +4304,12 @@ fi
 fi
 if test "x${THREAD_LIB}" = xerror; then
   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
-echo "configure:4210: checking for pthread_attr_init" >&5
+echo "configure:4308: checking for pthread_attr_init" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4215 "configure"
+#line 4313 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_attr_init(); below.  */
@@ -4234,7 +4332,7 @@ pthread_attr_init();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4336: \"$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"
 else
@@ -4257,7 +4355,7 @@ fi
 fi
 
 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4261: checking for cthread_fork in -lthreads" >&5
+echo "configure:4359: 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
@@ -4265,7 +4363,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4269 "configure"
+#line 4367 "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
@@ -4276,7 +4374,7 @@ int main() {
 cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4378: \"$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
@@ -4298,7 +4396,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4302 "configure"
+#line 4400 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -4314,7 +4412,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4318 "configure"
+#line 4416 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
@@ -4334,17 +4432,17 @@ for ac_hdr in getopt.h strings.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4338: checking for $ac_hdr" >&5
+echo "configure:4436: 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 4343 "configure"
+#line 4441 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4446: \"$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*
@@ -4370,21 +4468,21 @@ else
 fi
 done
 
-for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
+for ac_hdr in sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4378: checking for $ac_hdr" >&5
+echo "configure:4476: 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 4383 "configure"
+#line 4481 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4486: \"$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*
@@ -4410,21 +4508,21 @@ else
 fi
 done
 
-for ac_hdr in sys/soundcard.h machine/soundcard.h
+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:4418: checking for $ac_hdr" >&5
+echo "configure:4516: 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 4423 "configure"
+#line 4521 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4526: \"$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*
@@ -4450,21 +4548,21 @@ else
 fi
 done
 
-for ac_hdr in dlfcn.h image.h
+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:4458: checking for $ac_hdr" >&5
+echo "configure:4556: 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 4463 "configure"
+#line 4561 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4566: \"$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*
@@ -4490,21 +4588,21 @@ else
 fi
 done
 
-for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
+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:4498: checking for $ac_hdr" >&5
+echo "configure:4596: 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 4503 "configure"
+#line 4601 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4606: \"$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*
@@ -4530,21 +4628,21 @@ else
 fi
 done
 
-for ac_hdr in machine/param.h
+for ac_hdr in linux/version.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4538: checking for $ac_hdr" >&5
+echo "configure:4636: 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 4543 "configure"
+#line 4641 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4646: \"$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*
@@ -4572,12 +4670,12 @@ done
 
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4576: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4674: 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 4581 "configure"
+#line 4679 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -4586,7 +4684,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:4590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -4611,17 +4709,17 @@ 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:4615: checking for $ac_hdr" >&5
+echo "configure:4713: 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 4620 "configure"
+#line 4718 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4723: \"$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*
@@ -4656,23 +4754,22 @@ then
   if test x$x_libraries = xNONE; then
     x_libraries=/usr/X11R6/lib
   fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS -I$x_includes"
+  CPPFLAGS="$save_CPPFLAGS -I$x_includes"
   for ac_hdr in X11/extensions/dpms.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4666: checking for $ac_hdr" >&5
+echo "configure:4763: 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 4671 "configure"
+#line 4768 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4773: \"$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*
@@ -4694,7 +4791,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
     cat > conftest.$ac_ext <<EOF
-#line 4698 "configure"
+#line 4795 "configure"
 #include "confdefs.h"
 #include <X11/extensions/dpms.h>
 EOF
@@ -4716,24 +4813,24 @@ else
 fi
 done
 
-  CPPFLAGS=$saved_CPPFLAGS
+  CPPFLAGS="$save_CPPFLAGS"
 fi
 
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:4724: checking for ntohl in sys/param.h" >&5
+echo "configure:4821: 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 4730 "configure"
+#line 4827 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 int main() {
 void foo() { int meuh; ntohl(meuh); }
 ; return 0; }
 EOF
-if { (eval echo configure:4737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_ntohl_sys_param_h=yes
 else
@@ -4754,20 +4851,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:4758: checking if \$CC accepts -finline-limit" >&5
+echo "configure:4855: 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 4764 "configure"
+#line 4861 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline_limit=yes
 else
@@ -4785,20 +4882,20 @@ if test x"$ac_cv_c_inline_limit" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
-echo "configure:4789: checking if \$CC accepts -Wall -Winline" >&5
+echo "configure:4886: 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"
      cat > conftest.$ac_ext <<EOF
-#line 4795 "configure"
+#line 4892 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_Wall_Winline=yes
 else
@@ -4815,20 +4912,20 @@ if test x"$ac_cv_c_Wall_Winline" != x"no"; then
     save_CFLAGS="${save_CFLAGS} -Wall -Winline"
 else
     echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
-echo "configure:4819: checking if \$CC accepts -wall -winline" >&5
+echo "configure:4916: 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"
          cat > conftest.$ac_ext <<EOF
-#line 4825 "configure"
+#line 4922 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_wall_winline=yes
 else
@@ -4847,20 +4944,20 @@ echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
 fi
 
 echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
-echo "configure:4851: checking if \$CC accepts -pipe" >&5
+echo "configure:4948: 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 4857 "configure"
+#line 4954 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_pipe=yes
 else
@@ -4878,20 +4975,20 @@ if test x"$ac_cv_c_pipe" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
-echo "configure:4882: checking if \$CC accepts -O3" >&5
+echo "configure:4979: 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 4888 "configure"
+#line 4985 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o3=yes
 else
@@ -4908,20 +5005,20 @@ if test x"$ac_cv_c_o3" != x"no"; then
     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
 else
     echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
-echo "configure:4912: checking if \$CC accepts -O2" >&5
+echo "configure:5009: 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 4918 "configure"
+#line 5015 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o2=yes
 else
@@ -4938,20 +5035,20 @@ echo "$ac_t""$ac_cv_c_o2" 1>&6
         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
     else
         echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
-echo "configure:4942: checking if \$CC accepts -O" >&5
+echo "configure:5039: 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 4948 "configure"
+#line 5045 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o=yes
 else
@@ -4971,20 +5068,20 @@ echo "$ac_t""$ac_cv_c_o" 1>&6
 fi
 
 echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
-echo "configure:4975: checking if \$CC accepts -ffast-math" >&5
+echo "configure:5072: 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 4981 "configure"
+#line 5078 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_fast_math=yes
 else
@@ -5002,20 +5099,20 @@ if test x"$ac_cv_c_fast_math" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
-echo "configure:5006: checking if \$CC accepts -funroll-loops" >&5
+echo "configure:5103: 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 5012 "configure"
+#line 5109 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_unroll_loops=yes
 else
@@ -5033,20 +5130,20 @@ if test x"$ac_cv_c_unroll_loops" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
-echo "configure:5037: checking if \$CC accepts -fomit-frame-pointer" >&5
+echo "configure:5134: 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 5043 "configure"
+#line 5140 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_omit_frame_pointer=yes
 else
@@ -5063,21 +5160,21 @@ if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
 fi
 
-echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
-echo "configure:5068: checking if \$CC accepts -bundle -undefined error" >&5
+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
 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"
+  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
      cat > conftest.$ac_ext <<EOF
-#line 5074 "configure"
+#line 5171 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_darwin=yes
 else
@@ -5091,24 +5188,24 @@ fi
 
 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
 if test x"$ac_cv_ld_darwin" != x"no"; then
-    PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
+    plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
 fi
 
 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:5099: checking if \$CC accepts -shared" >&5
+echo "configure:5196: 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 5105 "configure"
+#line 5202 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_plugins=yes
 else
@@ -5122,76 +5219,11 @@ fi
 
 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
 if test x"$ac_cv_ld_plugins" != x"no"; then
-    PLDFLAGS="${PLDFLAGS} -shared"
-fi
-        
-if test x"${SOFLAGS}" = x; then
-    echo $ac_n "checking for soname setting""... $ac_c" 1>&6
-echo "configure:5131: checking for soname setting" >&5
-if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-        # Standard
-        try_SOFLAGS="-Wl,-soname -Wl,"
-        LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
-        cat > conftest.$ac_ext <<EOF
-#line 5140 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_ld_soname="${try_SOFLAGS}"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-            # SunOS
-            try_SOFLAGS="-Wl,-h -Wl,"
-            LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
-            cat > conftest.$ac_ext <<EOF
-#line 5159 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_ld_soname="${try_SOFLAGS}"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_ld_soname=none
+    plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
 fi
-rm -f conftest*
         
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_ld_soname" 1>&6
-    if test x"$ac_cv_ld_soname" != x"none"; then
-        SOFLAGS=$ac_cv_ld_soname
-    else
-        echo "
-------------
-Your system doesn't seem to have support for dynamic linking. You may
-have problems using libdvdcss.
-------------
-"
-    fi
-fi
-
 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:5195: checking __attribute__ ((aligned ())) support" >&5
+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
@@ -5199,14 +5231,14 @@ else
         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 5203 "configure"
+#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:5210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+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
@@ -5226,22 +5258,23 @@ 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:5233: checking for boolean_t in sys/types.h" >&5
+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 "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5238 "configure"
+#line 5271 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_sys_types_h=yes
 else
@@ -5262,19 +5295,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:5266: checking for boolean_t in pthread.h" >&5
+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 "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5271 "configure"
+#line 5304 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+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
@@ -5295,19 +5328,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
-echo "configure:5299: checking for boolean_t in cthreads.h" >&5
+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 5304 "configure"
+#line 5337 "configure"
 #include "confdefs.h"
 #include <cthreads.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_cthreads_h=yes
 else
@@ -5332,33 +5365,33 @@ case x"${target_cpu}" in
     ARCH=unknown
     ;;
   *)
-    ARCH=${target_cpu}
+    ARCH="${target_cpu}"
     ;;
 esac
 
-BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy 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} lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort"
+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"
+ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
 
 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:5350: checking if \$CC groks MMX inline assembly" >&5
+echo "configure:5383: 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 5355 "configure"
+#line 5388 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmx_inline=yes
 else
@@ -5376,19 +5409,19 @@ if test x"$ac_cv_mmx_inline" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
-echo "configure:5380: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:5413: 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 5385 "configure"
+#line 5418 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmxext_inline=yes
 else
@@ -5406,19 +5439,19 @@ if test x"$ac_cv_mmxext_inline" != x"no"; then
 fi
 
 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
-echo "configure:5410: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:5443: 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 5415 "configure"
+#line 5448 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3dnow_inline=yes
 else
@@ -5440,19 +5473,19 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5444: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:5477: 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 5449 "configure"
+#line 5482 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sse_inline=yes
 else
@@ -5465,7 +5498,7 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_sse_inline" 1>&6
-if test x"$ac_cv_sse_inline" != x"no"; then
+if test x"$ac_cv_sse_inline" != x"no" -a x$SYS != xmingw32; then
   cat >> confdefs.h <<\EOF
 #define CAN_COMPILE_SSE 1
 EOF
@@ -5473,20 +5506,23 @@ EOF
   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
 fi
 
+# 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:5478: checking if \$CC groks Altivec inline assembly" >&5
+echo "configure:5514: 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 5483 "configure"
+#line 5519 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes
 else
@@ -5496,14 +5532,14 @@ else
   save_CFLAGS=$CFLAGS
           CFLAGS="$CFLAGS -Wa,-m7400"
           cat > conftest.$ac_ext <<EOF
-#line 5500 "configure"
+#line 5536 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline="-Wa,-m7400"
 else
@@ -5526,15 +5562,16 @@ if test x"$ac_cv_altivec_inline" != x"no"; then
 EOF
 
   if test x"$ac_cv_altivec_inline" != x"yes"; then
-    CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
-    CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
-    CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
+    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:5538: checking if \$CC groks Altivec C extensions" >&5
+echo "configure:5575: 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
@@ -5542,14 +5579,14 @@ else
      CFLAGS="$CFLAGS -faltivec"
      # Darwin test
      cat > conftest.$ac_ext <<EOF
-#line 5546 "configure"
+#line 5583 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec=-faltivec
 else
@@ -5558,16 +5595,16 @@ else
   rm -rf conftest*
   
         # Linux/PPC test
-        CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
+        CFLAGS="$save_CFLAGS $idctaltivec_CFLAGS -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 5564 "configure"
+#line 5601 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec="-fvec"
 else
@@ -5590,28 +5627,29 @@ if test x"$ac_cv_c_altivec" != x"no"; then
 #define CAN_COMPILE_C_ALTIVEC 1
 EOF
 
-  CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
-  CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
-  CFLAGS_VLC="$CFLAGS_VLC $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:5601: checking if linker needs -framework vecLib" >&5
+echo "configure:5639: 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"
      cat > conftest.$ac_ext <<EOF
-#line 5608 "configure"
+#line 5646 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_altivec=yes
 else
 
 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
 if test x"$ac_cv_ld_altivec" != x"no"; then
-  LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
-  LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
-  LIB="${LIB} -framework vecLib"
+  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
+  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
+  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
+  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
 fi
+fi # end if mingw32
 
-case x"${target_os}" in
-  x)
-    SYS=unknown
-    ;;
-  xlinux*)
-    SYS=linux
-    ;;
-  xbsdi*)
-    SYS=bsdi
-    ;;
-  xdarwin*)
-    SYS=darwin
-    ;;
-  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:5654: 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
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
 fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
-  echo "$ac_t""$WINDRES" 1>&6
-else
-  echo "$ac_t""no" 1>&6
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
 fi
 
 
-if test -z "$ac_cv_prog_WINDRES"; then
-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:5686: 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
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+# Check whether --with-tuning or --without-tuning was given.
+if test "${with_tuning+set}" = set; then
+  withval="$with_tuning"
+  :
+fi
+
+if test "x$withval" != "x"; then
+    TUNING=$withval
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_WINDRES="windres"
-      break
+    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
     fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
 fi
+
+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}"
 fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
-  echo "$ac_t""$WINDRES" 1>&6
+
+# 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 
 else
-  echo "$ac_t""no" 1>&6
+   OPTIMS=1 
 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";
+    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
 else
-  WINDRES=":"
-fi
+   if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
+    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
 fi
 
-    LIB_MPEG_TS="${LIB_MPEG_TS} -lws2_32"
-    LIB_RC="${LIB_RC} -lws2_32"
-    ;;
-  x*nto*)
-    SYS=nto
-    LIB_X11="${LIB_X11} -lsocket"
-    LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
-    ;;
-  xbeos)
-    SYS=beos
-    LIB="${LIB} -lbe"
-    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
-    PLDFLAGS="${PLDFLAGS} -nostart"
-    ;;
-  x*)
-    SYS=${target_os}
-    ;;
-esac
 
-case x$SYS in
-  xmingw32)
-    DVD_DEVICE="E:"
-    VCD_DEVICE="E:"
-    ;;
-  *)
-    DVD_DEVICE="/dev/dvd"
-    VCD_DEVICE="/dev/cdrom"
-    ;;
-esac
+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 
+fi
 
-cat >> confdefs.h <<EOF
-#define DVD_DEVICE "$DVD_DEVICE"
-EOF
 
-cat >> confdefs.h <<EOF
-#define VCD_DEVICE "$VCD_DEVICE"
-EOF
+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 
+else
+   VERSION="${VERSION}_`date +%Y-%m-%d`" 
+fi
+
+
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
 
 
+# Check whether --enable-dvd or --disable-dvd was given.
+if test "${enable_dvd+set}" = set; then
+  enableval="$enable_dvd"
+  :
+fi
 
+if test "x$enableval" != "xno"
+then
+  # Check whether --with-dvdcss or --without-dvdcss was given.
+if test "${with_dvdcss+set}" = set; then
+  withval="$with_dvdcss"
+  :
+fi
 
-CAN_BUILD_LIBDVDCSS=0
+  # Check whether --with-dvdcss-tree or --without-dvdcss-tree was given.
+if test "${with_dvdcss_tree+set}" = set; then
+  withval="$with_dvdcss_tree"
+  :
+fi
 
-for ac_hdr in winioctl.h
+  case "x$with_dvdcss" in
+  x|xyes)
+    if test "x$with_dvdcss_tree" = x
+    then
+      for ac_hdr in dvdcss/dvdcss.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5765: checking for $ac_hdr" >&5
+echo "configure:5785: 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 5770 "configure"
+#line 5790 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5795: \"$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*
@@ -5791,30 +5811,96 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
-
+  PLUGINS="${PLUGINS} dvd"
+          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
 else
   echo "$ac_t""no" 1>&6
+echo "configure: warning: libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin." 1>&2
+          { echo "configure: error: cannot find libdvdcss headers" 1>&2; exit 1; } 
 fi
 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
+      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
+      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; }
+      fi
+      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"
+        dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
+        dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
+      else
+                echo "$ac_t""no" 1>&6
+        { echo "configure: error: cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}" 1>&2; exit 1; }
+      fi
+    fi
+  ;;
+  xno)
+        PLUGINS="${PLUGINS} 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
+    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
+    then
+            echo "$ac_t""yes" 1>&6
+      PLUGINS="${PLUGINS} dvd"
+      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
+      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
+    else
+            echo "$ac_t""no" 1>&6
+      { echo "configure: error: cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h" 1>&2; exit 1; }
+    fi
+  ;;
+  esac
+fi
+
+# Check whether --enable-dvdread or --disable-dvdread was given.
+if test "${enable_dvdread+set}" = set; then
+  enableval="$enable_dvdread"
+  :
+fi
+
+if test "x$enable_dvdread" != "xno"
+then
+  # Check whether --with-dvdread or --without-dvdread was given.
+if test "${with_dvdread+set}" = set; then
+  withval="$with_dvdread"
+  :
+fi
 
-for ac_hdr in sys/ioctl.h
+  if test "x$withval" = x
+  then
+    test_LDFLAGS=""
+    test_CFLAGS=""
+  else
+    test_LDFLAGS="-L${withval}/lib"
+    test_CFLAGS="-I${withval}/include"
+  fi
+  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
+  for ac_hdr in dvdread/dvd_reader.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5808: checking for $ac_hdr" >&5
+echo "configure:5894: 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 5813 "configure"
+#line 5899 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5904: \"$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*
@@ -5835,169 +5921,198 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
-  for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5844: 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 5849 "configure"
+     cat > conftest.$ac_ext <<EOF
+#line 5926 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+#include <dvdread/dvd_reader.h>
+int main() {
+void foo() { int i=DVD_VIDEO_LB_LEN; }
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5854: \"$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
+if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  
+          PLUGINS="${PLUGINS} dvdread"
+          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
+          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
+        
 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"
+  
+          if test "x$enable_dvdread" != x
+          then
+            { echo "configure: error: Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later" 1>&2; exit 1; }
+          fi
+        
 fi
 rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_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
+if test "x$enable_dvdread" != x
+    then
+      if test "x$withval" != x
+      then
+        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${withval}/include" 1>&2; exit 1; }
+      else
+        { echo "configure: error: Cannot find dvdread/dvd_reader.h" 1>&2; exit 1; }
+      fi
+    fi
+  
 fi
 done
 
-  BSD_DVD_STRUCT=0
-  LINUX_DVD_STRUCT=0
-  OPENBSD_DVD_STRUCT=0
-        cat > conftest.$ac_ext <<EOF
-#line 5884 "configure"
-#include "confdefs.h"
-#include <sys/cdio.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "dvd_struct" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-    cat >> confdefs.h <<\EOF
-#define DVD_STRUCT_IN_SYS_CDIO_H 1
-EOF
+  CPPFLAGS="$save_CPPFLAGS"
+fi
 
-    cat > conftest.$ac_ext <<EOF
-#line 5897 "configure"
+# 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 5981 "configure"
 #include "confdefs.h"
-#include <sys/cdio.h>
+#include <linux/cdrom.h>
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "struct dvd_struct" >/dev/null 2>&1; then
+  egrep "cdrom_msf0" >/dev/null 2>&1; then
   rm -rf conftest*
   
-                    BSD_DVD_STRUCT=1
-else
-  rm -rf conftest*
-  LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
+    PLUGINS="${PLUGINS} vcd"
+  
 fi
 rm -f conftest*
 
-  
+
+  if test "x${SYS}" = "xbsdi"
+  then
+    PLUGINS="${PLUGINS} vcd"
+  fi
+
+  if test "x${SYS}" = "xdarwin"
+  then
+    PLUGINS="${PLUGINS} vcd"
+    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
+  fi
 fi
-rm -f conftest*
 
-        cat > conftest.$ac_ext <<EOF
-#line 5917 "configure"
-#include "confdefs.h"
-#include <sys/dvdio.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "dvd_struct" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-    cat >> confdefs.h <<\EOF
-#define DVD_STRUCT_IN_SYS_DVDIO_H 1
+# 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
 
-    cat > conftest.$ac_ext <<EOF
-#line 5930 "configure"
+    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
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6027 "configure"
 #include "confdefs.h"
-#include <sys/dvdio.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 "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "struct dvd_struct" >/dev/null 2>&1; then
+if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  
-                    BSD_DVD_STRUCT=1
+  eval "ac_cv_func_inet_pton=yes"
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  LINUX_DVD_STRUCT=1
+  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
+  PLUGINS="${PLUGINS} ipv6"
+else
+  echo "$ac_t""no" 1>&6
 fi
-rm -f conftest*
 
-        cat > conftest.$ac_ext <<EOF
-#line 5950 "configure"
-#include "confdefs.h"
-#include <linux/cdrom.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "dvd_struct" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-    cat >> confdefs.h <<\EOF
-#define DVD_STRUCT_IN_LINUX_CDROM_H 1
-EOF
 
-    LINUX_DVD_STRUCT=1
-  
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
 fi
-rm -f conftest*
 
-        NEED_BSDI_LIBDVD=0
-  cat > conftest.$ac_ext <<EOF
-#line 5969 "configure"
-#include "confdefs.h"
-#include <dvd.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "dvd_struct" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-    cat >> confdefs.h <<\EOF
-#define DVD_STRUCT_IN_DVD_H 1
-EOF
 
-    LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
-    LINUX_DVD_STRUCT=1
-  
-else
-  rm -rf conftest*
-  
-                for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
+# 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
+  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 
+fi
+
+  save_CFLAGS=$CFLAGS
+  save_LDFLAGS=$LDFLAGS
+  CFLAGS="$CFLAGS $mad_CFLAGS"
+  LDFLAGS="$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:5991: checking for $ac_hdr" >&5
+echo "configure:6106: 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 5996 "configure"
+#line 6111 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6116: \"$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*
@@ -6018,108 +6133,96 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-      NEED_BSDI_LIBDVD=1
-      cat >> confdefs.h <<\EOF
-#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
-EOF
-
-      SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
-      LINUX_DVD_STRUCT=1
-    
 else
   echo "$ac_t""no" 1>&6
-fi
-done
-
+echo "Cannot find development headers for libmad..."
+    exit 1
   
 fi
-rm -f conftest*
+done
 
-        ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
-echo "configure:6041: checking for sys/scsi/scsi_types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  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
-  cat > conftest.$ac_ext <<EOF
-#line 6046 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lmad  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6154 "configure"
 #include "confdefs.h"
-#include <sys/scsi/scsi_types.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
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6051: \"$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
+if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=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"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  
-    ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
-echo "configure:6070: checking for sys/scsi/impl/uscsi.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 6075 "configure"
-#include "confdefs.h"
-#include <sys/scsi/impl/uscsi.h>
+    ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6080: \"$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"
+
+  LIBS="-lmad $LIBS"
+
 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"
+  echo "$ac_t""no" 1>&6
+ echo "Cannot find libmad library..."
+    exit 1
+  
 fi
-rm -f conftest*
+
+  CFLAGS=$save_CFLAGS
+  LDFLAGS=$save_LDFLAGS
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  
-      cat >> confdefs.h <<\EOF
-#define SOLARIS_USCSI 1
-EOF
 
-    
-else
-  echo "$ac_t""no" 1>&6
+if test x$SYS = xbeos
+then
+    PLUGINS="${PLUGINS} beos"
 fi
 
-  
-else
-  echo "$ac_t""no" 1>&6
+# Check whether --enable-a52 or --disable-a52 was given.
+if test "${enable_a52+set}" = set; then
+  enableval="$enable_a52"
+  :
 fi
 
-        ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
-echo "configure:6113: checking for sys/scsi.h" >&5
+if test "x$enableval" != "xno" -a x$SYS != xmingw32
+  then
+    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:6216: 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 6118 "configure"
+#line 6221 "configure"
 #include "confdefs.h"
-#include <sys/scsi.h>
+#include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6226: \"$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*
@@ -6135,438 +6238,175 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  
-    cat > conftest.$ac_ext <<EOF
-#line 6141 "configure"
-#include "confdefs.h"
-#include <sys/scsi.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "sctl_io" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-      cat >> confdefs.h <<\EOF
-#define HPUX_SCTL_IO 1
-EOF
-
-    
-fi
-rm -f conftest*
-
-  
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-        if test x$LINUX_DVD_STRUCT = x1; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_LINUX_DVD_STRUCT 1
-EOF
-
-    if test x$OPENBSD_DVD_STRUCT = x1; then
-      cat >> confdefs.h <<\EOF
-#define HAVE_OPENBSD_DVD_STRUCT 1
-EOF
-
-    fi
-  else
-    if test x$BSD_DVD_STRUCT = x1; then
-      cat >> confdefs.h <<\EOF
-#define HAVE_BSD_DVD_STRUCT 1
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
 EOF
-
-    fi
-  fi
-
+      BUILTINS="${BUILTINS} a52"
+      a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
+     
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-
-# Check whether --with-tuning or --without-tuning was given.
-if test "${with_tuning+set}" = set; then
-  withval="$with_tuning"
-  :
 fi
 
-if test "x$withval" != "x"; then
-    TUNING=$withval
-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"
-    else
-        if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
-    fi
-fi
-
-# 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 
-else
-   VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
-  LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
+# Check whether --enable-vorbis or --disable-vorbis was given.
+if test "${enable_vorbis+set}" = set; then
+  enableval="$enable_vorbis"
+  :
 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$enableval" != "xno"
 then
-    ARCH="${ARCH} mmx"
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
-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";
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
-else
-   if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
-fi
-
-
-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 
-fi
-
-
-TRACE=0
-# Check whether --enable-trace or --disable-trace was given.
-if test "${enable_trace+set}" = set; then
-  enableval="$enable_trace"
-   if test x$enableval = xyes; then TRACE=1; fi 
-fi
-
-
-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 
-fi
-
-
-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;
-  then
-    LIB="${LIB} -lcprof"
-    CPROF=1
-  fi
-
-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 
-else
-   OPTIMS=1 
-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
-    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:6281: 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
+  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:6269: 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
-  ac_save_LIBS="$LIBS"
-LIBS="-lpth  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6289 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 6274 "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 pth_init();
-
-int main() {
-pth_init()
-; return 0; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:6300: \"$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:6279: \"$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_lib_$ac_lib_var=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_lib_$ac_lib_var=no"
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+    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
-
-  LIBS="-lpth $LIBS"
-
+    PLUGINS="${PLUGINS} vorbis"
+    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
+   
 else
   echo "$ac_t""no" 1>&6
 fi
-
-    cat > conftest.$ac_ext <<EOF
-#line 6328 "configure"
-#include "confdefs.h"
-#include <pth.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pth_init" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-      cat >> confdefs.h <<\EOF
-#define PTH_INIT_IN_PTH_H 1
-EOF
-
-    THREAD_LIB="-lpth"
-    fi
-fi
-rm -f conftest*
-
+done
 
 fi
 
 
-LIB="${LIB} ${THREAD_LIB}"
-
-NEED_LIBDVDCSS=0
-STATIC_LIBDVDCSS=0
-DUMMY_LIBDVDCSS=0
-# Check whether --with-dvdcss or --without-dvdcss was given.
-if test "${with_dvdcss+set}" = set; then
-  withval="$with_dvdcss"
-   case "x${withval}" in
-    xlocal-static|xyes)
-      # local libdvdcss, statically linked
-      BUILTINS="${BUILTINS} dvd"
-      if test x${CAN_BUILD_LIBDVDCSS} = x1
-      then
-        NEED_LIBDVDCSS=1
-        STATIC_LIBDVDCSS=1
-        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
-        LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
-      fi
-    ;;
-    xlocal-shared)
-      # local libdvdcss, dynamically linked
-      PLUGINS="${PLUGINS} dvd"
-      if test x${CAN_BUILD_LIBDVDCSS} = x1
-      then
-        NEED_LIBDVDCSS=1
-        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
-        LIB_DVD="${LIB_DVD} -L../../lib -ldvdcss"
-      fi
-    ;;
-    xno)
-      # don't use libdvdcss at all, build a DVD module that can dlopen() it
-      BUILTINS="${BUILTINS} dvd"
-      DUMMY_LIBDVDCSS=1
-      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
-      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
-      CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
-      LIB_DVD="${LIB_DVD} -ldl"
-    ;;
-    *)
-      # existing libdvdcss
-      PLUGINS="${PLUGINS} dvd"
-      if test "x$withval" != "xyes"
-      then
-        LIB_DVD="${LIB_DVD} -L"$withval"/lib"
-        CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
-      fi
-      LIB_DVD="${LIB_DVD} -ldvdcss"
-    esac 
-else
-  # user didn't decide, we choose to use local libdvdcss and link statically
-  # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
-   if test x${CAN_BUILD_LIBDVDCSS} = x1
-    then
-      BUILTINS="${BUILTINS} dvd"
-      NEED_LIBDVDCSS=1
-      STATIC_LIBDVDCSS=1
-      CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
-      LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
-    else
-      # XXX: no check for libdl is done, don't try this at home !
-      BUILTINS="${BUILTINS} dvd"
-      DUMMY_LIBDVDCSS=1
-      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
-      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
-      LIB_DVD="${LIB_DVD} -ldl"
-    fi 
-fi
-
-
-if test x${DUMMY_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
-if test x${STATIC_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
-# Check whether --with-dvdread or --without-dvdread was given.
-if test "${with_dvdread+set}" = set; then
-  withval="$with_dvdread"
-   case "x${withval}" in
-    xlocal-static|xyes)
-      if test x${STATIC_LIBDVDREAD} = x1
-      then
-        BUILTINS="${BUILTINS} dvdread" 
-        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
-        LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
-      else
-        { echo "configure: error: Can't link static dvdread with shared dvdcss" 1>&2; exit 1; }
-      fi
-    ;;
-    xno)
-    ;;
-    x)
-      if test x${STATIC_LIBDVDREAD} = x1
-      then
-        BUILTINS="${BUILTINS} dvdread" 
-        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
-        LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
-      else
-        PLUGINS="${PLUGINS} dvdread"
-        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread  ${CFLAGS_DVD}"
-        LIB_DVDREAD="${LIB_DVDREAD} -Llib -ldvdread ${LIB_DVD}"
-      fi 
-    ;;
-    *)
-      if test "x$withval" != "xlocal-shared"
-      then
-        LIB_DVDREAD="${LIB_DVDREAD} -L"$withval"/lib"
-        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I"$withval"/include"
-      else
-        LIB_DVDREAD="${LIB_DVDREAD} -L../../lib"
-        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
-      fi
-      if test x${STATIC_LIBDVDCSS} = x1
-      then
-        { echo "configure: error: Can't link shared dvdread with static dvdcss" 1>&2; exit 1; }
-      else
-        PLUGINS="${PLUGINS} dvdread"
-        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD}"
-        LIB_DVDREAD="${LIB_DVDREAD} -ldvdread ${LIB_DVD}"
-      fi
-    esac
-    if test x${DUMMY_LIBDVDCSS} = x1
-    then
-      LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -ldl"
-    else
-      LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -L../../lib -ldvdcss"
-    fi 
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
 fi
 
 
-# Check whether --enable-vcd or --disable-vcd was given.
-if test "${enable_vcd+set}" = set; then
-  enableval="$enable_vcd"
+# Check whether --enable-x11 or --disable-x11 was given.
+if test "${enable_x11+set}" = set; then
+  enableval="$enable_x11"
   :
 fi
 
-
-if test x$enable_vcd != xno
-then
+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"
+  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
+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 6486 "configure"
+#line 6342 "configure"
 #include "confdefs.h"
-#include <linux/cdrom.h>
+#include <$ac_hdr>
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "cdrom_msf0" >/dev/null 2>&1; then
+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; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
   rm -rf conftest*
-  
-    BUILTINS="${BUILTINS} vcd"
-  
-fi
-rm -f conftest*
-
-fi
-
-if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
-then
-  BUILTINS="${BUILTINS} vcd"
-fi
-
-# Check whether --enable-dummy or --disable-dummy was given.
-if test "${enable_dummy+set}" = set; then
-  enableval="$enable_dummy"
-  :
-fi
-
-
-if test x$enable_dummy != xno
-then
-  BUILTINS="${BUILTINS} dummy"
+  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
-
-# Check whether --enable-null or --disable-null was given.
-if test "${enable_null+set}" = set; then
-  enableval="$enable_null"
-  :
+rm -f conftest*
 fi
-
-
-if test x$enable_null != xno
-then
-  BUILTINS="${BUILTINS} null"
+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} 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
 
-# Check whether --enable-rc or --disable-rc was given.
-if test "${enable_rc+set}" = set; then
-  enableval="$enable_rc"
-  :
+  CPPFLAGS="$save_CPPFLAGS"
 fi
 
-
-if test x$enable_rc != xno
-then
-  BUILTINS="${BUILTINS} rc"
+# Check whether --enable-xvideo or --disable-xvideo was given.
+if test "${enable_xvideo+set}" = set; then
+  enableval="$enable_xvideo"
+  :
 fi
 
-# 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"; then
-      if test -n $with_val; then
-        CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
-        LIB_MAD="${LIB_MAD} -L$with_val/lib -lmad"
-      else
-        LIB_MAD="${LIB_MAD} -lmad"
-      fi
-      save_CFLAGS=$CFLAGS
-      save_LDFLAGS=$LDFLAGS
-      CFLAGS="$CFLAGS $CFLAGS_MAD"
-      LDFLAGS="$LDFLAGS $LIB_MAD"
-      for ac_hdr in mad.h
+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"
+  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:6560: checking for $ac_hdr" >&5
+echo "configure:6400: 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 6565 "configure"
+#line 6405 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6410: \"$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*
@@ -6587,35 +6427,29 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-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:6600: checking for mad_bit_init in -lmad" >&5
-ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
+    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_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lmad  $LIBS"
+LIBS="-lXv_pic  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6608 "configure"
+#line 6442 "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 XvSetPortAttribute();
 
 int main() {
-mad_bit_init()
+XvSetPortAttribute()
 ; return 0; }
 EOF
-if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6453: \"$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
@@ -6630,216 +6464,186 @@ 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/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lmad $LIBS"
-
+  # 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"
 else
   echo "$ac_t""no" 1>&6
- echo "Cannot find libmad library..."
-        exit 1
-      
+# 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"
 fi
 
-      CFLAGS=$save_CFLAGS
-      LDFLAGS=$save_LDFLAGS
-      PLUGINS="${PLUGINS} mad"
-    fi 
+    CFLAGS="$save_CFLAGS"
+  
+  CPPFLAGS="$save_CPPFLAGS"
+else
+  echo "$ac_t""no" 1>&6
 fi
+done
 
+fi
 
-if test x$SYS = xbeos
-then
-    PLUGINS="${PLUGINS} beos"
-
-else
-
-# Check whether --enable-dsp or --disable-dsp was given.
-if test "${enable_dsp+set}" = set; then
-  enableval="$enable_dsp"
+# Check whether --enable-sdl or --disable-sdl was given.
+if test "${enable_sdl+set}" = set; then
+  enableval="$enable_sdl"
   :
 fi
 
-
-if test x$enable_dsp != xno &&
-  (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
+if test "x$enable_sdl" != "xno"
 then
-  for ac_hdr in 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:6676: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  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"
+      then
+        SDL_PATH=$withval:$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
+if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6681 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6686: \"$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*
+  case "$SDL12_CONFIG" in
+  /*)
+  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  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
+      ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
+  ;;
+esac
 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} dsp"
-  
+SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
+if test -n "$SDL12_CONFIG"; then
+  echo "$ac_t""$SDL12_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
-done
-
-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
-   then
-     # Extract the first word of "esd-config", so it can be a program name with args.
-set dummy esd-config; ac_word=$2
+  SDL_CONFIG=${SDL12_CONFIG}
+  SDL_HEADER="SDL12/SDL.h"
+  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:6724: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
+echo "configure:6551: 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
-  case "$ESD_CONFIG" in
+  case "$SDL11_CONFIG" in
   /*)
-  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)                         
-  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
+  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$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
-      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
+  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
   ;;
 esac
 fi
-ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
-if test -n "$ESD_CONFIG"; then
-  echo "$ac_t""$ESD_CONFIG" 1>&6
+SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
+if test -n "$SDL11_CONFIG"; then
+  echo "$ac_t""$SDL11_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-     if test x${ESD_CONFIG} != xno
-     then
-       PLUGINS="${PLUGINS} esd"
-       CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
-       LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
-     fi
-   fi
-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
-   then
-     # Extract the first word of "artsc-config", so it can be a program name with args.
-set dummy artsc-config; ac_word=$2
+    SDL_CONFIG=${SDL11_CONFIG}
+    SDL_HEADER="SDL11/SDL.h"
+  fi
+  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:6775: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
+echo "configure:6592: 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
-  case "$ARTS_CONFIG" in
+  case "$SDL_CONFIG" in
   /*)
-  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)                         
-  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
+  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$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
-      ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
+  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
   ;;
 esac
 fi
-ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
-if test -n "$ARTS_CONFIG"; then
-  echo "$ac_t""$ARTS_CONFIG" 1>&6
+SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
+if test -n "$SDL_CONFIG"; then
+  echo "$ac_t""$SDL_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-     if test x${ARTS_CONFIG} != xno
-     then
-       PLUGINS="${PLUGINS} arts"
-       CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
-       LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
-     fi
-   fi
-fi
-
-
-# Check whether --enable-macosx or --disable-macosx was given.
-if test "${enable_macosx+set}" = set; then
-  enableval="$enable_macosx"
-  if test x$enable_macosx = xyes
-   then
-     BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
-     LIB="${LIB} -ObjC"
-   fi
-else
-  for ac_hdr in Cocoa/Cocoa.h
+    SDL_HEADER="SDL/SDL.h"
+  fi
+  if test x${SDL_CONFIG} != xno
+  then
+    PLUGINS="${PLUGINS} sdl"
+    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
+    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
+    CPPFLAGS="$save_CPPFLAGS $sdl_CFLAGS"
+    for ac_hdr in ${SDL_HEADER}
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6833: checking for $ac_hdr" >&5
+echo "configure:6637: 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 6838 "configure"
+#line 6642 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6647: \"$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*
@@ -6859,42 +6663,67 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
- BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
-     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
-     LIB="${LIB} -ObjC"
-   
+ cat >> confdefs.h <<EOF
+#define SDL_INCLUDE_FILE <${SDL_HEADER}>
+EOF
+
 else
   echo "$ac_t""no" 1>&6
+{ 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
 done
 
+    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"
+  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.
+    " 1>&2; exit 1; }
+  fi
 fi
 
+# Check whether --enable-directx or --disable-directx was given.
+if test "${enable_directx+set}" = set; then
+  enableval="$enable_directx"
+  :
+fi
 
-# Check whether --enable-qnx or --disable-qnx was given.
-if test "${enable_qnx+set}" = set; then
-  enableval="$enable_qnx"
+if test "x$enableval" != "xno"
+then
+  if test x$SYS = xmingw32
+  then
+    # Check whether --with-directx or --without-directx was given.
+if test "${with_directx+set}" = set; then
+  withval="$with_directx"
   :
 fi
 
-    if test x$enable_qnx != xno
+    if test "x$with_directx" = "x"
     then
-      for ac_hdr in Ph.h
+      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:6888: checking for $ac_hdr" >&5
+echo "configure:6717: 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"
+#line 6722 "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; }
+{ (eval echo configure:6727: \"$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*
@@ -6914,40 +6743,53 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-        PLUGINS="${PLUGINS} qnx"
-        LIB_QNX="${LIB_QNX} -lasound -lph"
-      
+  PLUGINS="${PLUGINS} directx"
+        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
+    else
+      echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
+echo "configure:6756: checking for directX headers in ${withval}" >&5
+      if test -f ${withval}/ddraw.h
+      then
+        PLUGINS="${PLUGINS} directx"
+        directx_LDFLAGS="${directx_LDFLAGS} -L${withval}/lib -lgdi32"
+        directx_CFLAGS="${directx_CFLAGS} -I${withval}"
+        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; }
+      fi
     fi
+  fi
+fi
 
-# Check whether --enable-a52 or --disable-a52 was given.
-if test "${enable_a52+set}" = set; then
-  enableval="$enable_a52"
+# Check whether --enable-fb or --disable-fb was given.
+if test "${enable_fb+set}" = set; then
+  enableval="$enable_fb"
   :
 fi
 
-if ((test "x$enableval" != "xno") && (test x$SYS != xmingw32))
-  then
-    for ac_hdr in a52dec/a52.h
+    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:6941: checking for $ac_hdr" >&5
+echo "configure:6783: 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 6946 "configure"
+#line 6788 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6793: \"$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*
@@ -6968,25 +6810,14 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-      BUILTINS="${BUILTINS} a52"
-      LIB_A52="${LIB_A52} -la52"
-     
+        PLUGINS="${PLUGINS} fb"
+      
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-fi
-
-# Check whether --enable-fb or --disable-fb was given.
-if test "${enable_fb+set}" = set; then
-  enableval="$enable_fb"
-   if test x$enable_fb = xyes
-    then
-      PLUGINS="${PLUGINS} fb"
-    fi 
-fi
-
+    fi
 
 # Check whether --enable-mga or --disable-mga was given.
 if test "${enable_mga+set}" = set; then
@@ -6998,181 +6829,318 @@ if test "${enable_mga+set}" = set; then
 fi
 
 
-# Check whether --with-ggi or --without-ggi was given.
+# Check whether --enable-ggi or --disable-ggi was given.
+if test "${enable_ggi+set}" = set; then
+  enableval="$enable_ggi"
+  :
+fi
+
+if test x$enable_ggi = xyes
+then
+  PLUGINS="${PLUGINS} 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$withval" != "xno"
-    then
-      PLUGINS="${PLUGINS} ggi"
-      if test "x$withval" != "xyes"
+   if test "x$with_val" != "xno" -a "x$with_val" != "x"
       then
-        LIB_GGI="${LIB_GGI} -l$withval"
-      else
-        LIB_GGI="${LIB_GGI} -lggi"
-      fi
-    fi 
+        CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include"
+        ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_val/lib"
+      fi 
 fi
 
+fi
 
-# Check whether --enable-sdl or --disable-sdl was given.
-if test "${enable_sdl+set}" = set; then
-  enableval="$enable_sdl"
+# Check whether --enable-glide or --disable-glide was given.
+if test "${enable_glide+set}" = set; then
+  enableval="$enable_glide"
   :
 fi
 
-if test "x$enable_sdl" != "xno"
+if test x$enable_glide = xyes
 then
-  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"
+  PLUGINS="${PLUGINS} 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"
       then
-        SDL_PATH=$withval:$PATH
+        glide_CFLAGS="${glide_CFLAGS} -I$with_val/include"
+        glide_LDFLAGS="${glide_LDFLAGS} -L$with_val/lib"
       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:7039: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
+fi
+
+# Check whether --enable-aa or --disable-aa was given.
+if test "${enable_aa+set}" = set; then
+  enableval="$enable_aa"
+  :
+fi
+
+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
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case "$SDL12_CONFIG" in
-  /*)
-  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  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
-      ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
-  ;;
-esac
+  cat > conftest.$ac_ext <<EOF
+#line 6893 "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; }
+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
-SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
-if test -n "$SDL12_CONFIG"; then
-  echo "$ac_t""$SDL12_CONFIG" 1>&6
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_aa="true"
 else
   echo "$ac_t""no" 1>&6
+have_aa="false"
 fi
 
-  SDL_CONFIG=${SDL12_CONFIG}
-  SDL_HEADER="SDL12/SDL.h"
-  if test x${SDL_CONFIG} = xno
+  if test x$have_aa = xtrue
   then
-    # Extract the first word of "sdl11-config", so it can be a program name with args.
-set dummy sdl11-config; ac_word=$2
+    PLUGINS="${PLUGINS} aa"
+    aa_LDFLAGS="${aa_LDFLAGS} -laa"
+  fi
+fi
+
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+# Check whether --enable-dsp or --disable-dsp was given.
+if test "${enable_dsp+set}" = set; then
+  enableval="$enable_dsp"
+  :
+fi
+
+
+if test x$enable_dsp != xno &&
+  (test x$SYS != xmingw32 || test x$enable_dsp = 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
+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"
+#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; }
+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} dsp"
+    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
+echo "configure:6982: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lossaudio  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6990 "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
+  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
+  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+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
+   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:7079: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
+echo "configure:7033: 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
-  case "$SDL11_CONFIG" in
+  case "$ESD_CONFIG" in
   /*)
-  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)                         
-  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
+  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$SDL_PATH"
+  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_SDL11_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
+  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
   ;;
 esac
 fi
-SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
-if test -n "$SDL11_CONFIG"; then
-  echo "$ac_t""$SDL11_CONFIG" 1>&6
+ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
+if test -n "$ESD_CONFIG"; then
+  echo "$ac_t""$ESD_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-    SDL_CONFIG=${SDL11_CONFIG}
-    SDL_HEADER="SDL11/SDL.h"
-  fi
-  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
+     if test x${ESD_CONFIG} != xno
+     then
+       PLUGINS="${PLUGINS} esd"
+       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
+       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
+     fi
+   fi
+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
+   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:7120: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
+echo "configure:7084: 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
-  case "$SDL_CONFIG" in
+  case "$ARTS_CONFIG" in
   /*)
-  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)                         
-  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
+  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$SDL_PATH"
+  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_SDL_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
   ;;
 esac
 fi
-SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
-if test -n "$SDL_CONFIG"; then
-  echo "$ac_t""$SDL_CONFIG" 1>&6
+ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
+if test -n "$ARTS_CONFIG"; then
+  echo "$ac_t""$ARTS_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-    SDL_HEADER="SDL/SDL.h"
-  fi
-  if test x${SDL_CONFIG} != xno
-  then
-    PLUGINS="${PLUGINS} sdl"
-    CFLAGS_SDL="${CFLAGS_SDL} `${SDL_CONFIG} --cflags`"
-    LIB_SDL="${LIB_SDL} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
-    save_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
-    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:7166: checking for $ac_hdr" >&5
+     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 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 7171 "configure"
+#line 7139 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+#include <alsa/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (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*
@@ -7188,264 +7156,198 @@ 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
- cat >> confdefs.h <<EOF
-#define SDL_INCLUDE_FILE <${SDL_HEADER}>
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-{ 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
-done
-
-    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"
-  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.
-    " 1>&2; exit 1; }
-  fi
-fi
-
-# Check whether --enable-directx or --disable-directx was given.
-if test "${enable_directx+set}" = set; then
-  enableval="$enable_directx"
-  :
-fi
-
-if test "x$enableval" != "xno"
-then
-  if test x$SYS = xmingw32
-  then
-    # Check whether --with-directx-path or --without-directx-path was given.
-if test "${with_directx_path+set}" = set; then
-  withval="$with_directx_path"
-  :
-fi
-
-    if test "x$with_directx_path" = "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:7246: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  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
-  cat > conftest.$ac_ext <<EOF
-#line 7251 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lasound  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7169 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+
+int main() {
+main()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7256: \"$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
+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_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=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"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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} directx"
-        LIB_DIRECTX="${LIB_DIRECTX} -lgdi32" 
+  have_alsa="true"
 else
   echo "$ac_t""no" 1>&6
+have_alsa="false"
 fi
-done
 
-    else
-      echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
-echo "configure:7285: checking for directX headers in ${withval}" >&5
-      if test -f ${withval}/include/ddraw.h
-      then
-        PLUGINS="${PLUGINS} directx"
-        LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
-        INCLUDE="${INCLUDE} -I${withval}/include"
-        echo "$ac_t""yes" 1>&6
-      else
-        echo "$ac_t""no" 1>&6
-        { echo "configure: error: Cannot find ${withval}/include/directx.h!" 1>&2; exit 1; }
-      fi
-    fi
-  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") && (test x$SYS = xmingw32))
+if test "x$enableval" != "xno" -a x$SYS = xmingw32
   then
     PLUGINS="${PLUGINS} waveout"
-    LIB_WAVEOUT="-lwinmm"
-fi
-
-# Check whether --enable-win32 or --disable-win32 was given.
-if test "${enable_win32+set}" = set; then
-  enableval="$enable_win32"
-   if test "x$enableval" != "xno"
-    then
-      PLUGINS="${PLUGINS} win32"
-    fi 
+    waveout_LDFLAGS="-lwinmm"
 fi
 
 
-# Check whether --with-glide or --without-glide was given.
-if test "${with_glide+set}" = set; then
-  withval="$with_glide"
-   if test "x$withval" != "xno"
-    then
-      PLUGINS="${PLUGINS} glide"
-      if test "x$withval" != "xyes"
-      then
-        LIB_GLIDE="${LIB_GLIDE} -l$withval -lm"
-      else
-        LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
-      fi
-      CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
-    fi 
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
 fi
 
 
-# Check whether --enable-ncurses or --disable-ncurses was given.
-if test "${enable_ncurses+set}" = set; then
-  enableval="$enable_ncurses"
-  if test x$enable_ncurses = xyes; then
-     PLUGINS="${PLUGINS} ncurses"
-     LIB_NCURSES="${LIB_NCURSES} -lncurses"
-   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$withval" != "xno"
+      then
+        GTK_PATH=$withval:$PATH
+      fi 
+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"
-     ALIASES="${ALIASES} qvlc"
-     LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
-     CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     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:7253: 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
-
-
-# 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"
-     ALIASES="${ALIASES} kvlc"
-     LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
-     CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
-     CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     fi
-   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
 
-
-# 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
-    # 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
+  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:7394: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
+echo "configure:7292: 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 "$GNOME_CONFIG" in
+  case "$GTK_CONFIG" in
   /*)
-  ac_cv_path_GNOME_CONFIG="$GNOME_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 path.
   ;;
   ?:/*)                         
-  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos 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="$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
-      ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
+  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
   ;;
 esac
 fi
-GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
-if test -n "$GNOME_CONFIG"; then
-  echo "$ac_t""$GNOME_CONFIG" 1>&6
+GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
+if test -n "$GTK_CONFIG"; then
+  echo "$ac_t""$GTK_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-    if test -x ${GNOME_CONFIG}
+  fi
+  if test x${GTK_CONFIG} != xno
+  then
+    if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
     then
-       CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
-       LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
+      { 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
-    # now look for the gnome.h header
-    saved_CPPFLAGS=$CPPFLAGS
-    CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
-    for ac_hdr in gnome.h
+    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:7439: checking for $ac_hdr" >&5
+echo "configure:7341: 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 7444 "configure"
+#line 7346 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7351: \"$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*
@@ -7466,106 +7368,86 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
-      PLUGINS="${PLUGINS} gnome"
-      ALIASES="${ALIASES} gnome-vlc"
-     
 else
   echo "$ac_t""no" 1>&6
-{ echo "configure: error: Can't find gnome headers. Please install the gnome
-developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
-     
+ac_cv_gtk_headers=no
+      echo "Cannot find gtk development headers."
+    
 fi
 done
 
-  
-    CPPFLAGS=$saved_CPPFLAGS
+    if test "x$ac_cv_gtk_headers" = xyes
+    then
+      PLUGINS="${PLUGINS} 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"
-  :
-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$withval" != "xno"
-      then
-        GTK_PATH=$withval:$PATH
-      fi 
-fi
-
-  # look for gtk-config
-  # Extract the first word of "gtk-config", so it can be a program name with args.
-set dummy gtk-config; ac_word=$2
+# 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
+    # 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:7509: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
+echo "configure:7397: 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
-  case "$GTK_CONFIG" in
+  case "$GNOME_CONFIG" in
   /*)
-  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_GNOME_CONFIG="$GNOME_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.
+  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$GTK_PATH"
+  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_GTK_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_GNOME_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"
+  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
   ;;
 esac
 fi
-GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
-if test -n "$GTK_CONFIG"; then
-  echo "$ac_t""$GTK_CONFIG" 1>&6
+GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
+if test -n "$GNOME_CONFIG"; then
+  echo "$ac_t""$GNOME_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-  if test -x ${GTK_CONFIG}
-  then
-    if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
+    if test -x ${GNOME_CONFIG}
     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; }
+       gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
+       gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
     fi
-    CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
-    LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
-  fi
-  # now look for the gtk.h header
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
-  ac_cv_gtk_headers=yes
-  for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
+    # now look for the gnome.h header
+    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:7559: checking for $ac_hdr" >&5
+echo "configure:7441: 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 7564 "configure"
+#line 7446 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7451: \"$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*
@@ -7586,53 +7468,85 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
+      PLUGINS="${PLUGINS} gnome"
+      ALIASES="${ALIASES} gnome-vlc"
+     
 else
   echo "$ac_t""no" 1>&6
-ac_cv_gtk_headers=no
-    echo "Cannot find gtk development headers."
-  
+{ echo "configure: error: Can't find gnome headers. Please install the gnome
+developement tools or remove the --enable-gnome option" 1>&2; exit 1; }
+     
 fi
 done
 
-  if test "x$ac_cv_gtk_headers" = xyes
-  then
-    PLUGINS="${PLUGINS} gtk"
-    ALIASES="${ALIASES} gvlc"
+    CPPFLAGS="$save_CPPFLAGS"
   fi
-  CPPFLAGS=$saved_CPPFLAGS
 fi
 
-# Check whether --enable-x11 or --disable-x11 was given.
-if test "${enable_x11+set}" = set; then
-  enableval="$enable_x11"
-  :
+
+# 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"
+     ALIASES="${ALIASES} qvlc"
+     qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
+     qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
+     if test -x ${QTDIR}/bin/moc
+     then
+       MOC=${QTDIR}/bin/moc
+     else
+       MOC=moc
+     fi
+   fi
 fi
 
-if test x$enable_x11 != xno &&
-  (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
-  if test x$x_includes = xNONE; then
-    x_includes=/usr/X11R6/include
-  fi
-  if test x$x_libraries = xNONE; then
-    x_libraries=/usr/X11R6/lib
-  fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS -I$x_includes"
-  for ac_hdr in X11/Xlib.h
+
+# 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"
+     ALIASES="${ALIASES} kvlc"
+     kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
+     kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
+     kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
+     if test -x ${QTDIR}/bin/moc
+     then
+       MOC=${QTDIR}/bin/moc
+     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
+   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"
+   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:7626: checking for $ac_hdr" >&5
+echo "configure:7540: 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 7631 "configure"
+#line 7545 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7550: \"$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*
@@ -7652,50 +7566,42 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
-    PLUGINS="${PLUGINS} x11"
-    LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
-    CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
-  
+ 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"
+   
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-  CPPFLAGS=$saved_CPPFLAGS
 fi
 
-# Check whether --enable-xvideo or --disable-xvideo was given.
-if test "${enable_xvideo+set}" = set; then
-  enableval="$enable_xvideo"
+
+# Check whether --enable-qnx or --disable-qnx was given.
+if test "${enable_qnx+set}" = set; then
+  enableval="$enable_qnx"
   :
 fi
 
-if test x$enable_xvideo != xno &&
-  (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
-  if test x$x_includes = xNONE; then
-    x_includes=/usr/X11R6/include
-  fi
-  if test x$x_libraries = xNONE; then
-    x_libraries=/usr/X11R6/lib
-  fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$CPPFLAGS -I$x_includes"
-  for ac_hdr in X11/extensions/Xv.h
+    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:7689: checking for $ac_hdr" >&5
+echo "configure:7595: 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 7694 "configure"
+#line 7600 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7605: \"$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*
@@ -7707,74 +7613,55 @@ else
   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
-    saved_CFLAGS=$CFLAGS
-    CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
-    echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
-echo "configure:7723: checking for XvSetPortAttribute in -lXv_pic" >&5
-ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | 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 7731 "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();
-
-int main() {
-XvSetPortAttribute()
-; return 0; }
-EOF
-if { (eval echo configure:7742: \"$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 have Xv_pic, that's good, we can build an xvideo.so plugin !
-      PLUGINS="${PLUGINS} xvideo"
-      LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
-      CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
-else
-  echo "$ac_t""no" 1>&6
-# We don't have Xv_pic, let's make xvideo.a as builtin
-      BUILTINS="${BUILTINS} xvideo"
-      LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
-      CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
-fi
-
-    CFLAGS=$saved_CFLAGS
-  
-  CPPFLAGS=$saved_CPPFLAGS
+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} qnx"
+        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
+      
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
+    fi
+
+# Check whether --enable-intfwin or --disable-intfwin was given.
+if test "${enable_intfwin+set}" = set; then
+  enableval="$enable_intfwin"
+   if test "x$enableval" != "xno"
+  then
+    # Check whether --with-bcbuilder or --without-bcbuilder was given.
+if test "${with_bcbuilder+set}" = set; then
+  withval="$with_bcbuilder"
+  :
+fi
+
+    if test "x$with_bcbuilder" != "x"
+    then
+      BCBUILDER="$with_bcbuilder"
+    fi
+    PLUGINS="${PLUGINS} intfwin"
+  fi 
+fi
+
+
+# Check whether --enable-ncurses or --disable-ncurses was given.
+if test "${enable_ncurses+set}" = set; then
+  enableval="$enable_ncurses"
+  if test x$enable_ncurses = xyes; then
+     PLUGINS="${PLUGINS} ncurses"
+     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
+   fi
 fi
 
+
 # Check whether --enable-lirc or --disable-lirc was given.
 if test "${enable_lirc+set}" = set; then
   enableval="$enable_lirc"
@@ -7785,17 +7672,17 @@ 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:7789: checking for lirc/lirc_client.h" >&5
+echo "configure:7676: 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 7794 "configure"
+#line 7681 "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:7799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7686: \"$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*
@@ -7812,7 +7699,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:7816: checking for lirc_init in -llirc_client" >&5
+echo "configure:7703: 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
@@ -7820,7 +7707,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7824 "configure"
+#line 7711 "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
@@ -7831,7 +7718,7 @@ int main() {
 lirc_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7722: \"$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
   if test x$have_lirc = xtrue
   then
     PLUGINS="${PLUGINS} lirc"
-    LIB_LIRC="${LIB_LIRC} -llirc_client"
+    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
   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:7875: checking for alsa/asoundlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+# Check whether --with-words or --without-words was given.
+if test "${with_words+set}" = set; then
+  withval="$with_words"
+  :
+fi
+
+  case "x$withval" in
+    xbig)
+      ac_cv_c_bigendian=yes
+      ;;
+    xlittle)
+      ac_cv_c_bigendian=no
+      ;;
+    *)
+                  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
+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 7880 "configure"
+  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 };
+        void _a(void) { char*s = (char*)am; s = (char *)ai; }
+        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
+        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
+        void _e(void) { char*s = (char*)em; s = (char*)ei; }
+        int main(void) { _a(); _e(); return 0; }
+EOF
+        
+        if test -f conftest.c
+        then 
+          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
+              && test -f conftest.o
+          then
+            if test "`strings conftest.o | grep BIGenDianSyS`"
+            then
+              ac_cv_c_bigendian=yes
+            fi
+            if test "`strings conftest.o | grep LiTTleEnDian`"
+            then
+              ac_cv_c_bigendian=no
+            fi
+          fi
+        fi
+      
+fi
+
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+      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
+then
+  cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+
+fi
+
+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 
+fi
+
+
+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;
+  then
+    LDFLAGS="${LDFLAGS} -lcprof"
+    CPROF=1
+  fi
+
+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
+    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
+echo "configure:7851: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lpth  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7859 "configure"
 #include "confdefs.h"
-#include <alsa/asoundlib.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 pth_init();
+
+int main() {
+pth_init()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7885: \"$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
+if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=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"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:7902: checking for main in -lasound" >&5
-ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
+    ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lpth $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    cat > conftest.$ac_ext <<EOF
+#line 7898 "configure"
+#include "confdefs.h"
+#include <pth.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pth_init" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+      cat >> confdefs.h <<\EOF
+#define PTH_INIT_IN_PTH_H 1
+EOF
+
+    THREAD_LIB="-lpth"
+    fi
+fi
+rm -f conftest*
+
+
+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
+    echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
+echo "configure:7924: 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
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lasound  $LIBS"
+LIBS="-lst  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7910 "configure"
+#line 7932 "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 st_init();
 
 int main() {
-main()
+st_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7943: \"$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
@@ -7928,28 +7954,42 @@ 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
+    ac_tr_lib=HAVE_LIB`echo st | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lst $LIBS"
 
 else
   echo "$ac_t""no" 1>&6
-have_alsa="false"
 fi
 
-     if test x$have_alsa = xtrue
-     then
-       PLUGINS="${PLUGINS} alsa"
-       LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
-     fi
-   fi
+    cat > conftest.$ac_ext <<EOF
+#line 7971 "configure"
+#include "confdefs.h"
+#include <st.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "st_init" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+      cat >> confdefs.h <<\EOF
+#define ST_INIT_IN_ST_H 1
+EOF
+
+    THREAD_LIB="-lst"
+    fi
 fi
+rm -f conftest*
 
 
 fi
 
+
+LDFLAGS="${LDFLAGS} ${THREAD_LIB}"
+
 # Check whether --enable-plugins or --disable-plugins was given.
 if test "${enable_plugins+set}" = set; then
   enableval="$enable_plugins"
@@ -7961,27 +8001,24 @@ if test "${enable_plugins+set}" = set; then
 fi
 
 
-DLL_PATH=.
-# Check whether --with-dll-path or --without-dll-path was given.
-if test "${with_dll_path+set}" = set; then
-  withval="$with_dll_path"
-   if test "x$withval" != "xno"
-    then
-      DLL_PATH=$withval
-    fi 
+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"
+  BUILTINS="${BUILTINS} ${PLUGINS}"
+  PLUGINS=
 fi
 
-
 cat >> confdefs.h <<EOF
-#define VERSION_MESSAGE "vlc $VLC_VERSION $VLC_CODENAME Copyright 1996-2001 VideoLAN\n"
+#define VERSION_MESSAGE "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN"
 EOF
 
 cat >> confdefs.h <<EOF
-#define COPYRIGHT_MESSAGE "VideoLAN Client - version $VLC_VERSION $VLC_CODENAME - (c) 1996-2002 VideoLAN"
+#define COPYRIGHT_MESSAGE "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN"
 EOF
 
 
-VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
+VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
 cat >> confdefs.h <<EOF
 #define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
 EOF
@@ -8080,9 +8117,6 @@ PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
 
 
 
-
-
-
 
 
 
@@ -8235,11 +8269,12 @@ s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
-s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
 s%@SET_MAKE@%$SET_MAKE%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
 s%@RANLIB@%$RANLIB%g
+s%@STRIP@%$STRIP%g
+s%@GMAKE@%$GMAKE%g
 s%@ALLOCA@%$ALLOCA%g
 s%@GLIBC21@%$GLIBC21%g
 s%@LIBICONV@%$LIBICONV%g
@@ -8266,13 +8301,14 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@WINDRES@%$WINDRES%g
-s%@ESD_CONFIG@%$ESD_CONFIG%g
-s%@ARTS_CONFIG@%$ARTS_CONFIG%g
 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
 s%@SDL_CONFIG@%$SDL_CONFIG%g
-s%@GNOME_CONFIG@%$GNOME_CONFIG%g
+s%@ESD_CONFIG@%$ESD_CONFIG%g
+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%@DATA_PATH@%$DATA_PATH%g
 s%@PLUGIN_PATH@%$PLUGIN_PATH%g
 s%@SYS@%$SYS%g
@@ -8280,84 +8316,81 @@ s%@ARCH@%$ARCH%g
 s%@PLUGINS@%$PLUGINS%g
 s%@BUILTINS@%$BUILTINS%g
 s%@ALIASES@%$ALIASES%g
-s%@INCLUDE@%$INCLUDE%g
 s%@DEBUG@%$DEBUG%g
 s%@ASM@%$ASM%g
-s%@TRACE@%$TRACE%g
 s%@CPROF@%$CPROF%g
 s%@GPROF@%$GPROF%g
 s%@OPTIMS@%$OPTIMS%g
 s%@TUNING@%$TUNING%g
 s%@RELEASE@%$RELEASE%g
 s%@MOC@%$MOC%g
-s%@DLL_PATH@%$DLL_PATH%g
+s%@BCBUILDER@%$BCBUILDER%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%g
-s%@VCD_DEVICE@%$VCD_DEVICE%g
-s%@DVD_DEVICE@%$DVD_DEVICE%g
-s%@PLDFLAGS@%$PLDFLAGS%g
-s%@SOFLAGS@%$SOFLAGS%g
-s%@LIB@%$LIB%g
-s%@LIB_ALSA@%$LIB_ALSA%g
-s%@LIB_ARTS@%$LIB_ARTS%g
-s%@LIB_BEOS@%$LIB_BEOS%g
-s%@LIB_DARWIN@%$LIB_DARWIN%g
-s%@LIB_DIRECTX@%$LIB_DIRECTX%g
-s%@LIB_DVD@%$LIB_DVD%g
-s%@LIB_DVDREAD@%$LIB_DVDREAD%g
-s%@LIB_ESD@%$LIB_ESD%g
-s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
-s%@LIB_GGI@%$LIB_GGI%g
-s%@LIB_GLIDE@%$LIB_GLIDE%g
-s%@LIB_GNOME@%$LIB_GNOME%g
-s%@LIB_GTK@%$LIB_GTK%g
-s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
-s%@LIB_IMDCT@%$LIB_IMDCT%g
-s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
-s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
-s%@LIB_KDE@%$LIB_KDE%g
-s%@LIB_A52@%$LIB_A52%g
-s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
-s%@LIB_LIBDVDREAD@%$LIB_LIBDVDREAD%g
-s%@LIB_LIRC@%$LIB_LIRC%g
-s%@LIB_MACOSX@%$LIB_MACOSX%g
-s%@LIB_MAD@%$LIB_MAD%g
-s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
-s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
-s%@LIB_NCURSES@%$LIB_NCURSES%g
-s%@LIB_QNX@%$LIB_QNX%g
-s%@LIB_QT@%$LIB_QT%g
-s%@LIB_RC@%$LIB_RC%g
-s%@LIB_SDL@%$LIB_SDL%g
-s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
-s%@LIB_WIN32@%$LIB_WIN32%g
-s%@LIB_X11@%$LIB_X11%g
-s%@LIB_XVIDEO@%$LIB_XVIDEO%g
-s%@CFLAGS_VLC@%$CFLAGS_VLC%g
-s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
-s%@CFLAGS_DVD@%$CFLAGS_DVD%g
-s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
-s%@CFLAGS_ESD@%$CFLAGS_ESD%g
-s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
-s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
-s%@CFLAGS_GTK@%$CFLAGS_GTK%g
-s%@CFLAGS_KDE@%$CFLAGS_KDE%g
-s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
-s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
-s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
-s%@CFLAGS_MAD@%$CFLAGS_MAD%g
-s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
+s%@NEED_GETOPT@%$NEED_GETOPT%g
 s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
 s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
-s%@CFLAGS_QT@%$CFLAGS_QT%g
-s%@CFLAGS_SDL@%$CFLAGS_SDL%g
-s%@CFLAGS_WIN32@%$CFLAGS_WIN32%g
-s%@CFLAGS_X11@%$CFLAGS_X11%g
-s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
-s%@SRC_DVD_EXTRA@%$SRC_DVD_EXTRA%g
-s%@SRC_DVDCSS_EXTRA@%$SRC_DVDCSS_EXTRA%g
-s%@NEED_GETOPT@%$NEED_GETOPT%g
-s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
+s%@vlc_CFLAGS@%$vlc_CFLAGS%g
+s%@plugins_CFLAGS@%$plugins_CFLAGS%g
+s%@builtins_CFLAGS@%$builtins_CFLAGS%g
+s%@arts_CFLAGS@%$arts_CFLAGS%g
+s%@dvd_CFLAGS@%$dvd_CFLAGS%g
+s%@dvdread_CFLAGS@%$dvdread_CFLAGS%g
+s%@directx_CFLAGS@%$directx_CFLAGS%g
+s%@esd_CFLAGS@%$esd_CFLAGS%g
+s%@glide_CFLAGS@%$glide_CFLAGS%g
+s%@gnome_CFLAGS@%$gnome_CFLAGS%g
+s%@gtk_CFLAGS@%$gtk_CFLAGS%g
+s%@kde_CFLAGS@%$kde_CFLAGS%g
+s%@idctaltivec_CFLAGS@%$idctaltivec_CFLAGS%g
+s%@macosx_CFLAGS@%$macosx_CFLAGS%g
+s%@mad_CFLAGS@%$mad_CFLAGS%g
+s%@memcpyaltivec_CFLAGS@%$memcpyaltivec_CFLAGS%g
+s%@motionaltivec_CFLAGS@%$motionaltivec_CFLAGS%g
+s%@qt_CFLAGS@%$qt_CFLAGS%g
+s%@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%@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%@directx_LDFLAGS@%$directx_LDFLAGS%g
+s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
+s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
+s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
+s%@esd_LDFLAGS@%$esd_LDFLAGS%g
+s%@filter_distort_LDFLAGS@%$filter_distort_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%@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%@kde_LDFLAGS@%$kde_LDFLAGS%g
+s%@lirc_LDFLAGS@%$lirc_LDFLAGS%g
+s%@macosx_LDFLAGS@%$macosx_LDFLAGS%g
+s%@mad_LDFLAGS@%$mad_LDFLAGS%g
+s%@memcpyaltivec_LDFLAGS@%$memcpyaltivec_LDFLAGS%g
+s%@motionaltivec_LDFLAGS@%$motionaltivec_LDFLAGS%g
+s%@ncurses_LDFLAGS@%$ncurses_LDFLAGS%g
+s%@qnx_LDFLAGS@%$qnx_LDFLAGS%g
+s%@qt_LDFLAGS@%$qt_LDFLAGS%g
+s%@rc_LDFLAGS@%$rc_LDFLAGS%g
+s%@sdl_LDFLAGS@%$sdl_LDFLAGS%g
+s%@vcd_LDFLAGS@%$vcd_LDFLAGS%g
+s%@vorbis_LDFLAGS@%$vorbis_LDFLAGS%g
+s%@waveout_LDFLAGS@%$waveout_LDFLAGS%g
+s%@x11_LDFLAGS@%$x11_LDFLAGS%g
+s%@xvideo_LDFLAGS@%$xvideo_LDFLAGS%g
 
 CEOF
 EOF
@@ -8609,53 +8642,24 @@ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
 
 echo "
-global configuration
+vlc configuration
 --------------------
+vlc version           : ${VERSION}
 system                : ${SYS}
 architecture          : ${ARCH}
 optimizations         : ${OPTIMS}
-tuning:               : ${TUNING}
-release:              : ${RELEASE}"
-
-if test x${HAVE_VLC} = x1
-then
-  echo "
-vlc configuration
------------------
-vlc version           : ${VLC_VERSION}
+tuning                : ${TUNING}
 debug mode            : ${DEBUG}
-trace mode            : ${TRACE}
+release               : ${RELEASE}
 cprof/gprof support   : ${CPROF}/${GPROF}
 need builtin getopt   : ${NEED_GETOPT}
 built-in modules      :${BUILTINS}
 plug-in modules       :${PLUGINS}
-vlc aliases           :${ALIASES}"
-fi
-
-echo "
-libdvdcss configuration
------------------------
-can be built          : ${CAN_BUILD_LIBDVDCSS}
-will be built         : ${NEED_LIBDVDCSS}"
-if test x${NEED_LIBDVDCSS} = x1
-then
-  echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
-  echo "link statically       : ${STATIC_LIBDVDCSS}"
-else
-  echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
-fi
+vlc aliases           :${ALIASES}
 
-echo "
 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'.
 "
-if test x${HAVE_VLC} = x1
-then
-  echo "To build vlc and its plugins, type \`make vlc plugins'."
-fi
-if test x${HAVE_LIBDVDCSS} = x1
-then
-  echo "To build libdvdcss only, type \`make libdvdcss'."
-fi
-echo ""