]> git.sesse.net Git - vlc/blobdiff - configure
* ./plugins/win32/intfwin.bpr: we now build intfwin.so at the right place.
[vlc] / configure
index 4160d7514bf39dd7e2796e9d02f3f9fec248473e..52bf3a872932a9fded45e43ccd0a5e8407f22bee 100755 (executable)
--- a/configure
+++ b/configure
@@ -18,92 +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-mmx           Disable MMX optimizations (default enabled for x86)"
+  --disable-altivec       disable altivec optimizations (default enabled on PPC)"
 ac_help="$ac_help
-  --disable-altivec       Disable altivec optimizations (default enabled on PPC)"
+  --enable-debug          debug mode (default disabled)"
 ac_help="$ac_help
-  --enable-debug          Enable debug mode (default disabled)"
+  --enable-release        activate extra optimizations (default disabled)"
 ac_help="$ac_help
-  --enable-trace          Enable trace mode (default disabled)"
+Input plugins:"
 ac_help="$ac_help
-  --enable-gprof          Enable gprof profiling (default disabled)"
+  --enable-dvd            DVD input module (default enabled)"
 ac_help="$ac_help
-  --enable-cprof          Enable cprof profiling (default disabled)"
+    --with-dvdcss=PATH    libdvdcss headers and libraries"
 ac_help="$ac_help
-  --disable-optimizations Disable compiler optimizations (default enabled)"
+    --with-dvdcss-tree=PATH libdvdcss tree for static linking"
 ac_help="$ac_help
-  --enable-pth            Enable GNU Pth support (default disabled)"
+  --enable-dvdread        dvdread input module (default disabled)"
 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')"
+    --with-dvdread=PATH   libdvdread headers and libraries"
 ac_help="$ac_help
-  --enable-dvdread          Enable dvdread support (default disabled)"
+  --enable-vcd            VCD support for Linux and MacOS X (default enabled)"
 ac_help="$ac_help
-  --enable-vcd            VCD support for Linux (default enabled)"
+  --enable-satellite      satellite card support (default disabled)"
 ac_help="$ac_help
-  --disable-dummy         dummy module (default enabled)"
+Codec plugins:"
 ac_help="$ac_help
-  --disable-null          Null module (default enabled)"
+  --enable-mad            libmad module (default disabled)"
 ac_help="$ac_help
-  --disable-rc            Remote Control module (default enabled)"
+    --with-mad=PATH       path to libmad"
 ac_help="$ac_help
-  --with-mad[=PATH]       libmad module (default disabled)"
+  --enable-a52            AC3 support with liba52 (default enabled)"
 ac_help="$ac_help
-  --disable-dsp           Linux /dev/dsp support (default enabled)"
+  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)"
 ac_help="$ac_help
-  --enable-esd            Esound library support (default disabled)"
+Video plugins:"
 ac_help="$ac_help
-  --enable-arts           aRts sound server (default disabled)"
+  --enable-x11            X11 support (default enabled)"
 ac_help="$ac_help
-  --enable-macosx         MacOS X support (default enabled on MacOS X)"
+  --enable-xvideo         XVideo support (default enabled)"
 ac_help="$ac_help
-  --disable-qnx           QNX RTOS support (default enabled on QNX RTOS)"
+  --enable-sdl            SDL support (default enabled)"
 ac_help="$ac_help
-  --enable-fb             Linux framebuffer support (default disabled)"
+    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)"
 ac_help="$ac_help
-  --with-ggi[=name]       GGI support (default disabled)"
+  --enable-directx        Win32 DirectX support (default enabled on Win32)"
 ac_help="$ac_help
-  --disable-sdl           SDL support (default enabled)"
+    --with-directx=PATH   Win32 DirectX headers and libraries"
 ac_help="$ac_help
-  --with-sdl-config-path=path sdl-config path (default search in \$PATH)"
+  --enable-fb             Linux framebuffer support (default enabled on Linux)"
 ac_help="$ac_help
-  --disable-directx       Windows DirectX support (default enabled on WIN32)"
+  --enable-mga            Linux kernel Matrox support (default disabled)"
 ac_help="$ac_help
-  --with-directx-path=path Windows DirectX headers and libraries"
+  --enable-ggi            GGI support (default disabled)"
 ac_help="$ac_help
-  --with-glide[=name]     Glide (3dfx) support (default disabled)"
+    --with-ggi=PATH       path to libggi"
 ac_help="$ac_help
-  --enable-ncurses        ncurses interface support (default disabled)"
+  --enable-glide          Glide (3dfx) support (default disabled)"
+ac_help="$ac_help
+    --with-glide=PATH     path to libglide"
+ac_help="$ac_help
+  --enable-aa             aalib output (default disabled)"
+ac_help="$ac_help
+Audio plugins:"
+ac_help="$ac_help
+  --enable-dsp            Linux /dev/dsp support (enabled on Linux)"
+ac_help="$ac_help
+  --enable-esd            Esound library support (default disabled)"
+ac_help="$ac_help
+  --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
+  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)"
 ac_help="$ac_help
-  --disable-gtk           Gtk+ support (default enabled)"
+  --enable-win32          Win32 interface support (default disabled)"
 ac_help="$ac_help
-  --with-gtk-config-path=path gtk-config path (default search in \$PATH)"
+  --enable-ncurses        ncurses interface support (default disabled)"
+ac_help="$ac_help
+  --enable-lirc           lirc support (default disabled)"
+ac_help="$ac_help
+Misc options:"
+ac_help="$ac_help
+  --with-words=endianness set endianness (big or little)"
 ac_help="$ac_help
-  --disable-x11           X11 support (default enabled)"
+  --with-dll-path=PATH    path to Win32 DLLs (default search in \$PWD)"
 ac_help="$ac_help
-  --disable-xvideo        XVideo support (default enabled)"
+  --enable-gprof          gprof profiling (default disabled)"
 ac_help="$ac_help
-  --enable-alsa           Alsa sound drivers support (Only for linux)
-                          (default disabled)"
+  --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
@@ -544,7 +576,7 @@ echo > confdefs.h
 
 # A filename unique to this package, relative to the directory that
 # configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=include/common.h
+ac_unique_file=include/main.h
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
@@ -663,7 +695,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:667: checking host system type" >&5
+echo "configure:699: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -684,7 +716,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:688: checking target system type" >&5
+echo "configure:720: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -702,7 +734,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:706: checking build system type" >&5
+echo "configure:738: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -725,33 +757,14 @@ 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
+VERSION="0.3.0"
+CODENAME=Ourumov
 
 save_CFLAGS="${CFLAGS}"
 save_LDFLAGS="${LDFLAGS}"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:755: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:768: 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
@@ -780,7 +793,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:784: checking for $ac_word" >&5
+echo "configure:797: 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
@@ -810,7 +823,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:814: checking for $ac_word" >&5
+echo "configure:827: 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
@@ -861,7 +874,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:865: checking for $ac_word" >&5
+echo "configure:878: 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
@@ -893,7 +906,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:910: 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.
@@ -904,12 +917,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 908 "configure"
+#line 921 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:926: \"$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
@@ -935,12 +948,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:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:952: 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:944: checking whether we are using GNU C" >&5
+echo "configure:957: 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
@@ -949,7 +962,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:953: \"$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:966: \"$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
@@ -968,7 +981,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:972: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:985: 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
@@ -1000,7 +1013,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1004: checking how to run the C preprocessor" >&5
+echo "configure:1017: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1015,13 +1028,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 1019 "configure"
+#line 1032 "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:1025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1038: \"$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
   :
@@ -1032,13 +1045,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1036 "configure"
+#line 1049 "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:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1055: \"$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
   :
@@ -1049,13 +1062,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1053 "configure"
+#line 1066 "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:1059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1072: \"$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
   :
@@ -1079,6 +1092,7 @@ else
 fi
 echo "$ac_t""$CPP" 1>&6
 
+
 if test $host != $build; then
   ac_tool_prefix=${host_alias}-
 else
@@ -1088,7 +1102,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:1092: checking for $ac_word" >&5
+echo "configure:1106: 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
@@ -1120,7 +1134,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:1124: checking for $ac_word" >&5
+echo "configure:1138: 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
@@ -1153,22 +1167,77 @@ fi
 fi
 
 
-ALL_LINGUAS="de fr ru"
-PACKAGE="vlc"
-VERSION="$VLC_VERSION"
+# Extract the first word of "gmake", so it can be a program name with args.
+set dummy gmake; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1174: checking for $ac_word" >&5
+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:1209: 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 ja no ru nl"
 
 cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
+#define VLC_PACKAGE "vlc"
 EOF
 
 cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
+#define VLC_VERSION "$VERSION"
 EOF
 
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1172: checking for $ac_word" >&5
+echo "configure:1241: 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
@@ -1197,7 +1266,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1201: checking for strerror in -lcposix" >&5
+echo "configure:1270: 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
@@ -1205,7 +1274,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1209 "configure"
+#line 1278 "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
@@ -1216,7 +1285,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:1220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1289: \"$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
@@ -1239,12 +1308,12 @@ fi
   
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1243: checking for ANSI C header files" >&5
+echo "configure:1312: 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 1248 "configure"
+#line 1317 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1252,7 +1321,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1325: \"$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*
@@ -1269,7 +1338,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 1273 "configure"
+#line 1342 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1287,7 +1356,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 1291 "configure"
+#line 1360 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1308,7 +1377,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+#line 1381 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1319,7 +1388,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1343,12 +1412,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1347: checking for working const" >&5
+echo "configure:1416: 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 1352 "configure"
+#line 1421 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1397,7 +1466,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1418,21 +1487,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1422: checking for inline" >&5
+echo "configure:1491: 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 1429 "configure"
+#line 1498 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1458,12 +1527,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1462: checking for off_t" >&5
+echo "configure:1531: 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 1467 "configure"
+#line 1536 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1491,12 +1560,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1495: checking for size_t" >&5
+echo "configure:1564: 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 1500 "configure"
+#line 1569 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1526,19 +1595,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:1530: checking for working alloca.h" >&5
+echo "configure:1599: 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 1535 "configure"
+#line 1604 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1611: \"$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
@@ -1559,12 +1628,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1563: checking for alloca" >&5
+echo "configure:1632: 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 1568 "configure"
+#line 1637 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1592,7 +1661,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1665: \"$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
@@ -1624,12 +1693,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1628: checking whether alloca needs Cray hooks" >&5
+echo "configure:1697: 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 1633 "configure"
+#line 1702 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1654,12 +1723,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:1658: checking for $ac_func" >&5
+echo "configure:1727: 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 1663 "configure"
+#line 1732 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1682,7 +1751,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1755: \"$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
@@ -1709,7 +1778,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1713: checking stack direction for C alloca" >&5
+echo "configure:1782: 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
@@ -1717,7 +1786,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1721 "configure"
+#line 1790 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1736,7 +1805,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1809: \"$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
@@ -1761,17 +1830,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:1765: checking for $ac_hdr" >&5
+echo "configure:1834: 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 1770 "configure"
+#line 1839 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1844: \"$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*
@@ -1800,12 +1869,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1804: checking for $ac_func" >&5
+echo "configure:1873: 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 1809 "configure"
+#line 1878 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1828,7 +1897,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1901: \"$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
@@ -1853,7 +1922,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1857: checking for working mmap" >&5
+echo "configure:1926: 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
@@ -1861,7 +1930,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+#line 1934 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2001,7 +2070,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2074: \"$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
@@ -2025,12 +2094,12 @@ fi
 
 
     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:2029: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:2098: 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 2034 "configure"
+#line 2103 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -2066,17 +2135,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:2070: checking for $ac_hdr" >&5
+echo "configure:2139: 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 2075 "configure"
+#line 2144 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2149: \"$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*
@@ -2107,12 +2176,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:2111: checking for $ac_func" >&5
+echo "configure:2180: 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 2116 "configure"
+#line 2185 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2135,7 +2204,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2208: \"$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
@@ -2175,7 +2244,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2179: checking for iconv" >&5
+echo "configure:2248: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2183,7 +2252,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 2187 "configure"
+#line 2256 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2193,7 +2262,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -2205,7 +2274,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 2209 "configure"
+#line 2278 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2215,7 +2284,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2288: \"$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
@@ -2236,13 +2305,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:2240: checking for iconv declaration" >&5
+echo "configure:2309: 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 2246 "configure"
+#line 2315 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2261,7 +2330,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -2290,19 +2359,19 @@ EOF
 
    
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2294: checking for nl_langinfo and CODESET" >&5
+echo "configure:2363: 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 2299 "configure"
+#line 2368 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_langinfo_codeset=yes
 else
@@ -2325,19 +2394,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2329: checking for LC_MESSAGES" >&5
+echo "configure:2398: 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 2334 "configure"
+#line 2403 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2410: \"$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
@@ -2358,7 +2427,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2362: checking whether NLS is requested" >&5
+echo "configure:2431: 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"
@@ -2380,7 +2449,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2384: checking whether included gettext is requested" >&5
+echo "configure:2453: 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"
@@ -2400,17 +2469,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2404: checking for libintl.h" >&5
+echo "configure:2473: 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 2409 "configure"
+#line 2478 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2483: \"$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*
@@ -2427,12 +2496,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:2431: checking for GNU gettext in libc" >&5
+echo "configure:2500: 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 2436 "configure"
+#line 2505 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2441,7 +2510,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2514: \"$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
@@ -2457,14 +2526,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:2461: checking for GNU gettext in libintl" >&5
+echo "configure:2530: 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 2468 "configure"
+#line 2537 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2473,7 +2542,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2546: \"$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
@@ -2506,12 +2575,12 @@ EOF
             for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2510: checking for $ac_func" >&5
+echo "configure:2579: 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 2515 "configure"
+#line 2584 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2534,7 +2603,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2607: \"$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
@@ -2563,7 +2632,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:2567: checking for $ac_word" >&5
+echo "configure:2636: 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
@@ -2597,7 +2666,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:2601: checking for $ac_word" >&5
+echo "configure:2670: 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
@@ -2634,7 +2703,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:2638: checking for $ac_word" >&5
+echo "configure:2707: 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
@@ -2684,7 +2753,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:2688: checking for $ac_word" >&5
+echo "configure:2757: 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
@@ -2718,7 +2787,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:2722: checking for $ac_word" >&5
+echo "configure:2791: 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
@@ -2754,7 +2823,7 @@ fi
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2758: checking for $ac_word" >&5
+echo "configure:2827: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2825,7 +2894,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:2829: checking for $ac_word" >&5
+echo "configure:2898: 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
@@ -2858,7 +2927,7 @@ done
       ac_verc_fail=yes
     else
             echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:2862: checking version of bison" >&5
+echo "configure:2931: 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;;
@@ -2905,7 +2974,7 @@ echo "configure:2862: checking version of bison" >&5
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2909: checking for catalogs to be installed" >&5
+echo "configure:2978: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for presentlang in $ALL_LINGUAS; do
          useit=no
@@ -2957,7 +3026,7 @@ echo "configure:2909: 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:2961: checking for a BSD compatible install" >&5
+echo "configure:3030: 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
@@ -3010,165 +3079,119 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
-if test x${cross_compiling} != xyes; then
-  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3016: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+case x"${target_os}" in
+  x)
+    SYS=unknown
+    ;;
+  xlinux*)
+    SYS=linux
+    ;;
+  xbsdi*)
+    SYS=bsdi
+    LIB_DVD="${LIB_DVD} -ldvd"
+    LIB_VCD="${LIB_VCD} -ldvd"
+    ;;
+  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:3103: 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
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 3023 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 3038 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_bigendian=yes
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_bigendian=no
+  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
-rm -f conftest*
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
 fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3069 "configure"
-#include "confdefs.h"
-main () {
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long l;
-    char c[sizeof (long)];
-  } u;
-  u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_bigendian=no
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+  echo "$ac_t""$WINDRES" 1>&6
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_bigendian=yes
-fi
-rm -fr conftest*
+  echo "$ac_t""no" 1>&6
 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:3135: 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="windres"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
 fi
 fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
-  cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
+WINDRES="$ac_cv_prog_WINDRES"
+if test -n "$WINDRES"; then
+  echo "$ac_t""$WINDRES" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
 
 else
-      # Check whether --with-words or --without-words was given.
-if test "${with_words+set}" = set; then
-  withval="$with_words"
-  :
+  WINDRES=":"
 fi
-
-  case "x$withval" in
-    xbig)
-      ac_cv_c_bigendian=yes
-      ;;
-    xlittle)
-      ac_cv_c_bigendian=no
-      ;;
-    *)
-                  ac_cv_c_bigendian=unknown
-      echo $ac_n "checking what the byte order looks to be""... $ac_c" 1>&6
-echo "configure:3122: checking what the byte order looks to be" >&5
-        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
-            echo "$ac_t"""big endian"" 1>&6
-            ac_cv_c_bigendian=yes
-          fi
-          if test `grep -l LiTTleEnDian conftest.o`
-          then
-            echo "$ac_t"""little endian"" 1>&6
-            ac_cv_c_bigendian=no
-          fi
-        fi
-      fi
-      if test $ac_cv_c_bigendian = xunknown
-      then
-        { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
-      fi
-            if test $ac_cv_c_bigendian = yes
-      then
-        cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-      fi
-      ;;
-  esac
 fi
 
-for ac_func in gettimeofday select strerror strtod strtol
+    LIB_IPV4="${LIB_IPV4} -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_VLC="${LIB_VLC} -lbe"
+    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
+    LIB_IPV4="${LIB_IPV4} -lbind"
+    PLDFLAGS="${PLDFLAGS} -nostart"
+    ;;
+  x*)
+    SYS="${target_os}"
+    ;;
+esac
+
+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:3167: checking for $ac_func" >&5
+echo "configure:3190: 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 3172 "configure"
+#line 3195 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3191,7 +3214,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3218: \"$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
@@ -3215,129 +3238,166 @@ else
 fi
 done
 
-for ac_func in setenv putenv
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3222: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+
+echo $ac_n "checking for connect""... $ac_c" 1>&6
+echo "configure:3244: 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 3227 "configure"
+#line 3249 "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 connect(); 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 connect();
 
 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_connect) || defined (__stub___connect)
 choke me
 #else
-$ac_func();
+connect();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3272: \"$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_connect=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_connect=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'connect`\" = 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
 
-echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3275: checking for connect" >&5
-if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
+  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+echo "configure:3291: 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
 else
-  cat > conftest.$ac_ext <<EOF
-#line 3280 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3299 "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 connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:3310: \"$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
+  LIB_IPV4="${LIB_IPV4} -lsocket"
+    LIB_VLC="${LIB_VLC} -lsocket"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:3335: 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 3340 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char connect(); 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 connect();
+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_connect) || defined (__stub___connect)
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 choke me
 #else
-connect();
+gethostbyname();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_connect=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_connect=no"
+  eval "ac_cv_func_gethostbyname=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'connect`\" = 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 connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3322: checking for connect in -lsocket" >&5
-ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:3382: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lsocket  $LIBS"
+LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3330 "configure"
+#line 3390 "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 connect();
+char gethostbyname();
 
 int main() {
-connect()
+gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3401: \"$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
@@ -3352,7 +3412,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} -lsocket"
+  LIB_IPV4="${LIB_IPV4} -lnsl"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3361,12 +3421,12 @@ fi
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3365: checking for gethostbyname" >&5
+echo "configure:3425: 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 3370 "configure"
+#line 3430 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3389,7 +3449,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3453: \"$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
@@ -3407,16 +3467,16 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 
-  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3412: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
+echo "configure:3472: 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="-lnsl  $LIBS"
+LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3420 "configure"
+#line 3480 "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
@@ -3427,7 +3487,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3491: \"$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
@@ -3442,7 +3502,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"
+  LIB_IPV4="${LIB_IPV4} -lbind"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3451,12 +3511,12 @@ fi
 fi
 
 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3455: checking for nanosleep" >&5
+echo "configure:3515: 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 3460 "configure"
+#line 3520 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nanosleep(); below.  */
@@ -3479,7 +3539,7 @@ nanosleep();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3543: \"$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
@@ -3498,7 +3558,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:3502: checking for nanosleep in -lrt" >&5
+echo "configure:3562: 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
@@ -3506,7 +3566,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3510 "configure"
+#line 3570 "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
@@ -3517,7 +3577,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3581: \"$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
@@ -3532,12 +3592,12 @@ 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"
+  LIB_VLC="${LIB_VLC} -lrt"
 else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:3541: checking for nanosleep in -lposix4" >&5
+echo "configure:3601: 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
@@ -3545,7 +3605,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3549 "configure"
+#line 3609 "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
@@ -3556,7 +3616,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3620: \"$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
@@ -3571,7 +3631,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} -lposix4"
+  LIB_VLC="${LIB_VLC} -lposix4"
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -3582,68 +3642,13 @@ fi
 
 fi
 
-for ac_func in usleep
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3589: 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 3594 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:3642: checking for inet_aton" >&5
+echo "configure:3647: 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 3647 "configure"
+#line 3652 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -3666,7 +3671,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3675: \"$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
@@ -3685,7 +3690,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3689: checking for inet_aton in -lresolv" >&5
+echo "configure:3694: 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
@@ -3693,7 +3698,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3697 "configure"
+#line 3702 "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
@@ -3704,7 +3709,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3713: \"$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
@@ -3719,7 +3724,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"
+  LIB_IPV4="${LIB_IPV4} -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:3734: 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:3737: 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 3739 "configure"
+#line 3742 "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:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3765: \"$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:3789: 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:3784: 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 3794 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lintl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3792 "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:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3803: \"$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
+  LIB_VLC="${LIB_VLC} -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:3844: 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:3829: 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 3849 "configure"
+#line 3834 "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:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3857: \"$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:3900: 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:3879: 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 3905 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lgnugetopt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3887 "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:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-fi
+LIBS="$ac_save_LIBS"
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+  cat >> confdefs.h <<\EOF
+#define HAVE_GETOPT_LONG 1
 EOF
+ LIB_VLC="${LIB_VLC} -lgnugetopt"
 else
   echo "$ac_t""no" 1>&6
+NEED_GETOPT=1
 fi
-done
 
+fi
 
-NEED_GETOPT=0
-echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:3955: 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
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:3926: 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 3960 "configure"
+#line 3931 "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
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
 #else
-getopt_long();
+void (*signal ()) ();
 #endif
 
+int main() {
+int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_func_getopt_long=yes"
+  ac_cv_type_signal=void
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_getopt_long=no"
+  ac_cv_type_signal=int
 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
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
- # FreeBSD has a gnugetopt library for this:
-  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:4005: checking for getopt_long in -lgnugetopt" >&5
-ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
+
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:3967: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lgnugetopt  $LIBS"
+LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4013 "configure"
+#line 3975 "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();
+char dlopen();
 
 int main() {
-getopt_long()
+dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3986: \"$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
@@ -4035,346 +3997,204 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_GETOPT_LONG 1
-EOF
- LIB="${LIB} -lgnugetopt"
+  LIB_VLC="${LIB_VLC} -ldl"
 else
   echo "$ac_t""no" 1>&6
-NEED_GETOPT=1
 fi
 
+echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
+echo "configure:4007: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4015 "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 cos();
+
+int main() {
+cos()
+; return 0; }
+EOF
+if { (eval echo configure:4026: \"$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
+  LIB_IMDCT="${LIB_IMDCT} -lm"
+  LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-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:4055: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
+echo "configure:4048: 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
 else
-  cat > conftest.$ac_ext <<EOF
-#line 4060 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4056 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+/* 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 pow();
+
+int main() {
+pow()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4065: \"$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:4067: \"$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
+  LIB_IMDCT="${LIB_IMDCT} -lm"
+  LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
+  LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
+  LIB_CHROMA_I420_RGB="${LIB_CHROMA_I420_RGB} -lm"
+
 else
   echo "$ac_t""no" 1>&6
 fi
-done
 
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4094: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+
+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:4095: 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
 else
-  cat > conftest.$ac_ext <<EOF
-#line 4099 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lpthread  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4103 "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 pthread_attr_init();
 
 int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4114: \"$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
+  THREAD_LIB="-lpthread"
 else
   echo "$ac_t""no" 1>&6
 fi
-done
 
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4147: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+fi
+if test "x${THREAD_LIB}" = xerror; then
+  echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
+echo "configure:4137: 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
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4155 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lpthreads  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4145 "configure"
 #include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char pthread_attr_init();
 
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+int main() {
+pthread_attr_init()
+; return 0; }
+EOF
+if { (eval echo configure:4156: \"$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"
 
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  THREAD_LIB="-lpthreads"
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192  /* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
-       char *data, *data2, *data3;
-       int i, pagesize;
-       int fd;
-
-       pagesize = getpagesize();
-
-       /*
-        * First, make a file with some known garbage in it.
-        */
-       data = malloc(pagesize);
-       if (!data)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               *(data + i) = rand();
-       umask(0);
-       fd = creat("conftestmmap", 0600);
-       if (fd < 0)
-               exit(1);
-       if (write(fd, data, pagesize) != pagesize)
-               exit(1);
-       close(fd);
-
-       /*
-        * Next, try to mmap the file at a fixed address which
-        * already has something else allocated at it.  If we can,
-        * also make sure that we see the same garbage.
-        */
-       fd = open("conftestmmap", O_RDWR);
-       if (fd < 0)
-               exit(1);
-       data2 = malloc(2 * pagesize);
-       if (!data2)
-               exit(1);
-       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-           MAP_PRIVATE | MAP_FIXED, fd, 0L))
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data2 + i))
-                       exit(1);
-
-       /*
-        * Finally, make sure that changes to the mapped area
-        * do not percolate back to the file as seen by read().
-        * (This is a bug on some variants of i386 svr4.0.)
-        */
-       for (i = 0; i < pagesize; ++i)
-               *(data2 + i) = *(data2 + i) + 1;
-       data3 = malloc(pagesize);
-       if (!data3)
-               exit(1);
-       if (read(fd, data3, pagesize) != pagesize)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data3 + i))
-                       exit(1);
-       close(fd);
-       unlink("conftestmmap");
-       exit(0);
-}
-
-EOF
-if { (eval echo configure:4295: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4318: 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 4323 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_type_signal=void
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_type_signal=int
-fi
-rm -f conftest*
 fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4359: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if test "x${THREAD_LIB}" = xerror; then
+  echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
+echo "configure:4179: 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
 else
   ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
+LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4367 "configure"
+#line 4187 "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 dlopen();
+char pthread_attr_init();
 
 int main() {
-dlopen()
+pthread_attr_init()
 ; return 0; }
 EOF
-if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4198: \"$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
@@ -4389,72 +4209,85 @@ 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"
+  THREAD_LIB="-lc_r"
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
-echo "configure:4399: 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
+fi
+if test "x${THREAD_LIB}" = xerror; then
+  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
+echo "configure:4221: 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
-  ac_save_LIBS="$LIBS"
-LIBS="-lm  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4407 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 4226 "configure"
 #include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char pthread_attr_init(); 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 cos();
+char pthread_attr_init();
 
 int main() {
-cos()
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
+choke me
+#else
+pthread_attr_init();
+#endif
+
 ; return 0; }
 EOF
-if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4249: \"$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"
+  eval "ac_cv_func_pthread_attr_init=yes"
 else
   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_func_pthread_attr_init=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_func_'pthread_attr_init`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIB_IMDCT="${LIB_IMDCT} -lm"
+  :
 else
   echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:4439: checking for pow in -lm" >&5
-ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
+  THREAD_LIB=""
+fi
+
+echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
+echo "configure:4272: 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
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lm  $LIBS"
+LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4447 "configure"
+#line 4280 "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 pow();
+char cthread_fork();
 
 int main() {
-pow()
+cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4291: \"$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
@@ -4469,242 +4302,19 @@ 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"
-
+  THREAD_LIB="-lthreads"
 else
   echo "$ac_t""no" 1>&6
 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:4485: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4493 "configure"
+#line 4313 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
-
-int main() {
-pthread_attr_init()
-; return 0; }
+#include <pthread.h>
 EOF
-if { (eval echo configure:4504: \"$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
-  THREAD_LIB="-lpthread"
-else
-  echo "$ac_t""no" 1>&6
-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:4527: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4535 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
-
-int main() {
-pthread_attr_init()
-; return 0; }
-EOF
-if { (eval echo configure:4546: \"$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
-  THREAD_LIB="-lpthreads"
-else
-  echo "$ac_t""no" 1>&6
-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:4569: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lc_r  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4577 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
-
-int main() {
-pthread_attr_init()
-; return 0; }
-EOF
-if { (eval echo configure:4588: \"$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
-  THREAD_LIB="-lc_r"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test "x${THREAD_LIB}" = xerror; then
-  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
-echo "configure:4611: 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 4616 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pthread_attr_init(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_attr_init();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
-choke me
-#else
-pthread_attr_init();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4639: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_pthread_attr_init=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  THREAD_LIB=""
-fi
-
-echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4662: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lthreads  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4670 "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 cthread_fork();
-
-int main() {
-cthread_fork()
-; return 0; }
-EOF
-if { (eval echo configure:4681: \"$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
-  THREAD_LIB="-lthreads"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-cat > conftest.$ac_ext <<EOF
-#line 4703 "configure"
-#include "confdefs.h"
-#include <pthread.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pthread_cond_t" >/dev/null 2>&1; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pthread_cond_t" >/dev/null 2>&1; then
   rm -rf conftest*
   
   cat >> confdefs.h <<\EOF
@@ -4715,7 +4325,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4719 "configure"
+#line 4329 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
@@ -4731,21 +4341,21 @@ fi
 rm -f conftest*
 
 
-for ac_hdr in stddef.h getopt.h strings.h
+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:4739: checking for $ac_hdr" >&5
+echo "configure:4349: 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 4744 "configure"
+#line 4354 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4359: \"$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*
@@ -4775,17 +4385,17 @@ for ac_hdr in sys/sockio.h fcntl.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:4779: checking for $ac_hdr" >&5
+echo "configure:4389: 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 4784 "configure"
+#line 4394 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4399: \"$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*
@@ -4811,21 +4421,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:4819: checking for $ac_hdr" >&5
+echo "configure:4429: 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 4824 "configure"
+#line 4434 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4439: \"$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*
@@ -4851,21 +4461,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:4859: checking for $ac_hdr" >&5
+echo "configure:4469: 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 4864 "configure"
+#line 4474 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4479: \"$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*
@@ -4891,21 +4501,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:4899: checking for $ac_hdr" >&5
+echo "configure:4509: 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 4904 "configure"
+#line 4514 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4519: \"$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*
@@ -4931,21 +4541,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:4939: checking for $ac_hdr" >&5
+echo "configure:4549: 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 4944 "configure"
+#line 4554 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4559: \"$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*
@@ -4972,21 +4582,57 @@ fi
 done
 
 
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:4587: 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 4592 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:4601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+
 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:4980: checking for $ac_hdr" >&5
+echo "configure:4626: 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 4985 "configure"
+#line 4631 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4636: \"$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*
 done
 
 
-echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:5018: checking for ntohl in sys/param.h" >&5
-if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
+if test x$SYS != xmingw32
+then
+  if test x$x_includes = xNONE; then
+    x_includes=/usr/X11R6/include
+  fi
+  if test x$x_libraries = xNONE; then
+    x_libraries=/usr/X11R6/lib
+  fi
+  saved_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS -I$x_includes"
+  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:4677: 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
-  CFLAGS="${save_CFLAGS} -Wall -Werror"
-     cat > conftest.$ac_ext <<EOF
-#line 5024 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 4682 "configure"
 #include "confdefs.h"
-#include <sys/param.h>
-int main() {
-void foo() { int meuh; ntohl(meuh); }
-; return 0; }
+#include <$ac_hdr>
 EOF
-if { (eval echo configure:5031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
   rm -rf conftest*
-  ac_cv_c_ntohl_sys_param_h=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*
-  ac_cv_c_ntohl_sys_param_h=no
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
 fi
-
-echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
-if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
-    cat >> confdefs.h <<\EOF
-#define NTOHL_IN_SYS_PARAM_H 1
-EOF
+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 > conftest.$ac_ext <<EOF
+#line 4709 "configure"
+#include "confdefs.h"
+#include <X11/extensions/dpms.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "DPMSInfo" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+      cat >> confdefs.h <<\EOF
+#define DPMSINFO_IN_DPMS_H 1
+EOF
+
+    
+fi
+rm -f conftest*
+
+  
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  CPPFLAGS=$saved_CPPFLAGS
+fi
+
+echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
+echo "configure:4735: 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 4741 "configure"
+#include "confdefs.h"
+#include <sys/param.h>
+int main() {
+void foo() { int meuh; ntohl(meuh); }
+; return 0; }
+EOF
+if { (eval echo configure:4748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_ntohl_sys_param_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_ntohl_sys_param_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
+if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
+    cat >> confdefs.h <<\EOF
+#define NTOHL_IN_SYS_PARAM_H 1
+EOF
 
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:5052: checking if \$CC accepts -finline-limit" >&5
+echo "configure:4769: 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 5058 "configure"
+#line 4775 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline_limit=yes
 else
@@ -5078,150 +4795,364 @@ if test x"$ac_cv_c_inline_limit" != x"no"; then
     save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
 fi
 
-echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
-echo "configure:5083: checking if \$CC accepts -bundle -undefined error" >&5
-if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
+echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
+echo "configure:4800: 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} -bundle -undefined error"
+  CFLAGS="${save_CFLAGS} -Wall -Winline"
      cat > conftest.$ac_ext <<EOF
-#line 5089 "configure"
+#line 4806 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_ld_darwin=yes
+  ac_cv_c_Wall_Winline=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_ld_darwin=no
+  ac_cv_c_Wall_Winline=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_ld_darwin" 1>&6
-if test x"$ac_cv_ld_darwin" != x"no"; then
-    PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
+echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
+if test x"$ac_cv_c_Wall_Winline" != x"no"; then
+    save_CFLAGS="${save_CFLAGS} -Wall -Winline"
+else
+    echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
+echo "configure:4830: 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 4836 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_wall_winline=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_wall_winline=no
+fi
+rm -f conftest*
 fi
 
-echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:5114: checking if \$CC accepts -shared" >&5
-if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
+echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
+    if test x"$ac_cv_c_wall_winline" != x"no"; then
+        save_CFLAGS="${save_CFLAGS} -wall -winline"
+    fi
+fi
+
+echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
+echo "configure:4862: 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} -shared"
+  CFLAGS="${save_CFLAGS} -pipe"
      cat > conftest.$ac_ext <<EOF
-#line 5120 "configure"
+#line 4868 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_ld_plugins=yes
+  ac_cv_c_pipe=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_ld_plugins=no
+  ac_cv_c_pipe=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_ld_plugins" 1>&6
-if test x"$ac_cv_ld_plugins" != x"no"; then
-    PLCFLAGS="${PLCFLAGS} -shared"
+echo "$ac_t""$ac_cv_c_pipe" 1>&6
+if test x"$ac_cv_c_pipe" != x"no"; then
+    save_CFLAGS="${save_CFLAGS} -pipe"
 fi
-        
-if test x"${SOFLAGS}" = x; then
-    echo $ac_n "checking for soname setting""... $ac_c" 1>&6
-echo "configure:5146: checking for soname setting" >&5
-if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
+
+echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
+echo "configure:4893: 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
-  
-        # Standard
-        try_SOFLAGS="-Wl,-soname -Wl,"
-        LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
-        cat > conftest.$ac_ext <<EOF
-#line 5155 "configure"
+  CFLAGS="${save_CFLAGS} -O3"
+     cat > conftest.$ac_ext <<EOF
+#line 4899 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_ld_soname="${try_SOFLAGS}"
+  ac_cv_c_o3=yes
 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 5174 "configure"
+  ac_cv_c_o3=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_o3" 1>&6
+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:4923: 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 4929 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_ld_soname="${try_SOFLAGS}"
+  ac_cv_c_o2=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_ld_soname=none
+  ac_cv_c_o2=no
 fi
 rm -f conftest*
-        
+fi
+
+echo "$ac_t""$ac_cv_c_o2" 1>&6
+    if test x"$ac_cv_c_o2" != x"no"; then
+        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
+    else
+        echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
+echo "configure:4953: 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 4959 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_o=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_o=no
 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.
-------------
-"
+echo "$ac_t""$ac_cv_c_o" 1>&6
+        if test x"$ac_cv_c_o" != x"no"; then
+            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
+        fi
     fi
 fi
 
+echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
+echo "configure:4986: 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 4992 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_fast_math=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_fast_math=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_fast_math" 1>&6
+if test x"$ac_cv_c_fast_math" != x"no"; then
+    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
+fi
+
+echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
+echo "configure:5017: 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 5023 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:5030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_unroll_loops=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_unroll_loops=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
+if test x"$ac_cv_c_unroll_loops" != x"no"; then
+    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
+fi
+
+echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
+echo "configure:5048: 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 5054 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:5061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_omit_frame_pointer=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_omit_frame_pointer=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
+if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
+    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
+fi
+
+echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
+echo "configure:5079: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
+if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
+     cat > conftest.$ac_ext <<EOF
+#line 5085 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:5092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_ld_darwin=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_ld_darwin=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_ld_darwin" 1>&6
+if test x"$ac_cv_ld_darwin" != x"no"; then
+    PLDFLAGS="${PLDFLAGS} -bundle -undefined error -lcc_dynamic"
+fi
+
+echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
+echo "configure:5110: 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 5116 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:5123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_ld_plugins=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_ld_plugins=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_ld_plugins" 1>&6
+if test x"$ac_cv_ld_plugins" != x"no"; then
+    PLDFLAGS="${PLDFLAGS} -shared"
+fi
+        
 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:5210: checking __attribute__ ((aligned ())) support" >&5
+echo "configure:5141: checking __attribute__ ((aligned ())) support" >&5
 if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_attribute_aligned=0
-       CFLAGS="${save_CFLAGS} -Werror"
+        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 5218 "configure"
+#line 5149 "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:5225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5156: \"$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
@@ -5244,19 +5175,19 @@ CFLAGS="${save_CFLAGS}"
 LDFLAGS="${save_LDFLAGS}"
 
 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5248: checking for boolean_t in sys/types.h" >&5
+echo "configure:5179: 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 5253 "configure"
+#line 5184 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_sys_types_h=yes
 else
@@ -5277,19 +5208,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:5281: checking for boolean_t in pthread.h" >&5
+echo "configure:5212: 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 5286 "configure"
+#line 5217 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_pthread_h=yes
 else
@@ -5310,19 +5241,19 @@ EOF
 fi
 
 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
-echo "configure:5314: checking for boolean_t in cthreads.h" >&5
+echo "configure:5245: 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 5319 "configure"
+#line 5250 "configure"
 #include "confdefs.h"
 #include <cthreads.h>
 int main() {
 boolean_t foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_boolean_t_cthreads_h=yes
 else
@@ -5342,176 +5273,38 @@ EOF
 
 fi
 
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5347: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+case x"${target_cpu}" in
+  x)
+    ARCH=unknown
+    ;;
+  *)
+    ARCH="${target_cpu}"
+    ;;
+esac
+
+BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
+PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
+
+MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
+MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
+THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
+SSE_MODULES="imdctsse downmixsse"
+ALTIVEC_MODULES="idctaltivec motionaltivec"
+
+echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
+echo "configure:5296: 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 5352 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:5422: 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 5427 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:5455: 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 5460 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:5469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_header_time=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
-  cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
-
-fi
-
-
-
-ARCH=${target_cpu}
-
-BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
-PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_bob422"
-
-MMX_MODULES="memcpymmx idctmmx motionmmx"
-MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
-THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
-SSE_MODULES="imdctsse downmixsse"
-ALTIVEC_MODULES="idctaltivec motionaltivec"
-
-echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:5503: 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 5508 "configure"
+#line 5301 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmx_inline=yes
 else
@@ -5529,19 +5322,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:5533: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:5326: 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 5538 "configure"
+#line 5331 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmxext_inline=yes
 else
@@ -5559,19 +5352,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:5563: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:5356: 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 5568 "configure"
+#line 5361 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3dnow_inline=yes
 else
@@ -5593,19 +5386,19 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5597: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:5390: 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 5602 "configure"
+#line 5395 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sse_inline=yes
 else
@@ -5626,20 +5419,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:5631: checking if \$CC groks Altivec inline assembly" >&5
+echo "configure:5427: 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 5636 "configure"
+#line 5432 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes
 else
@@ -5649,14 +5445,14 @@ else
   save_CFLAGS=$CFLAGS
           CFLAGS="$CFLAGS -Wa,-m7400"
           cat > conftest.$ac_ext <<EOF
-#line 5653 "configure"
+#line 5449 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline="-Wa,-m7400"
 else
@@ -5679,13 +5475,16 @@ if test x"$ac_cv_altivec_inline" != x"no"; then
 EOF
 
   if test x"$ac_cv_altivec_inline" != x"yes"; then
-    CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_MEMCPYALTIVEC="$CFLAGS_MEMCPYALTIVEC $ac_cv_altivec_inline"
+    CFLAGS_VLC="$CFLAGS_VLC $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:5689: checking if \$CC groks Altivec C extensions" >&5
+echo "configure:5488: 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
@@ -5693,14 +5492,14 @@ else
      CFLAGS="$CFLAGS -faltivec"
      # Darwin test
      cat > conftest.$ac_ext <<EOF
-#line 5697 "configure"
+#line 5496 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec=-faltivec
 else
@@ -5709,16 +5508,16 @@ else
   rm -rf conftest*
   
         # Linux/PPC test
-        CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
+        CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 5715 "configure"
+#line 5514 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec="-fvec"
 else
@@ -5741,26 +5540,29 @@ if test x"$ac_cv_c_altivec" != x"no"; then
 #define CAN_COMPILE_C_ALTIVEC 1
 EOF
 
-  CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
+  CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
+  CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
+  CFLAGS_MEMCPYALTIVEC="$CFLAGS_MEMCPYALTIVEC $ac_cv_c_altivec"
+  CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
 fi
 
 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
-echo "configure:5750: checking if linker needs -framework vecLib" >&5
+echo "configure:5552: 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 5757 "configure"
+#line 5559 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5566: \"$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_ALTIVEC="-framework vecLib"
+  LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
+  LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
+  LIB_MEMCPYALTIVEC="${LIB_MEMCPYALTIVEC} -framework vecLib"
+  LIB_VLC="${LIB_VLC} -framework vecLib"
 fi
+fi # end if mingw32
 
-case ${target_os} in
-  linux*)
-    SYS=linux
-       ;;
-  bsdi*)
-    SYS=bsdi
-    ;;
-  darwin*)
-    SYS=darwin
-    ;;
-  *mingw32*)
-    SYS=mingw32
-    ;;
-  *nto*)
-    SYS=nto
-    LIB_X11="${LIB_X11} -lsocket"
-    LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
-    ;;
-  *)
-    SYS=${target_os}
-    ;;
-esac
 
-if test $SYS = mingw32; then
-# 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:5810: 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- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+# 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="${ac_tool_prefix}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"
 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
 
 
-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:5842: 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 --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
-  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=":"
+   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
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
-  echo "$ac_t""$WINDRES" 1>&6
+
+
+# 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
-  echo "$ac_t""no" 1>&6
+   VERSION="${VERSION}_`date +%Y-%m-%d`" 
 fi
 
-else
-  WINDRES=":"
+
+
+# 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
 
-LIB_MPEG_TS="-lws2_32"
-LIB_RC="-lws2_32"
+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
 
+  # Check whether --with-dvdcss-tree or --without-dvdcss-tree was given.
+if test "${with_dvdcss_tree+set}" = set; then
+  withval="$with_dvdcss_tree"
+  :
+fi
 
-CAN_BUILD_LIBDVDCSS=0
-
-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:5885: checking for $ac_hdr" >&5
+echo "configure:5697: 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 5890 "configure"
+#line 5702 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5707: \"$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*
@@ -5911,30 +5723,89 @@ 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"
+          LIB_DVD="${LIB_DVD} -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:5738: 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"
+        LIB_DVD="${LIB_DVD} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
+        CFLAGS_DVD="${CFLAGS_DVD} -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"
+    CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
+    LIB_DVD="${LIB_DVD} -ldl"
+  ;;
+  *)
+    echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
+echo "configure:5764: checking for dvdcss headers in ${with_dvdcss}" >&5
+    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
+    then
+            echo "$ac_t""yes" 1>&6
+      PLUGINS="${PLUGINS} dvd"
+      LIB_DVD="${LIB_DVD} -L${with_dvdcss}/lib -ldvdcss"
+      CFLAGS_DVD="${CFLAGS_DVD} -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$enableval" != "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
+  case "x$with_dvdread" in
+  x)
+    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:5928: checking for $ac_hdr" >&5
+echo "configure:5799: 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 5933 "configure"
+#line 5804 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5809: \"$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*
@@ -5954,23 +5825,177 @@ 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}"
-  for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
+  PLUGINS="${PLUGINS} dvdread"
+        LIB_DVDREAD="${LIB_DVDREAD} -ldvdread" 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  ;;
+  *)
+    echo $ac_n "checking for dvdread headers in ${withval}""... $ac_c" 1>&6
+echo "configure:5839: checking for dvdread headers in ${withval}" >&5
+    if test -f ${withval}/include/dvdread/dvd_reader.h
+    then
+      echo "$ac_t""yes" 1>&6
+      PLUGINS="${PLUGINS} dvdread"
+      LIB_DVDREAD="${LIB_DVDREAD} -L${withval}/lib -ldvdread"
+      CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I${withval}/include"
+    else
+      echo "$ac_t""no" 1>&6
+      { echo "configure: error: Cannot find ${withval}/dvdread/dvd_reader.h" 1>&2; exit 1; }
+    fi
+  ;;
+  esac
+fi
+
+# Check whether --enable-vcd or --disable-vcd was given.
+if test "${enable_vcd+set}" = set; then
+  enableval="$enable_vcd"
+  :
+fi
+
+
+if test x$enable_vcd != xno
+then
+  cat > conftest.$ac_ext <<EOF
+#line 5864 "configure"
+#include "confdefs.h"
+#include <linux/cdrom.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "cdrom_msf0" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+    PLUGINS="${PLUGINS} vcd"
+  
+fi
+rm -f conftest*
+
+
+  if test "x${SYS}" = "xbsdi"
+  then
+    PLUGINS="${PLUGINS} vcd"
+  fi
+
+  if test "x${SYS}" = "xdarwin"
+  then
+    PLUGINS="${PLUGINS} vcd"
+    LIB_VCD="${LIB_VCD} -framework IOKit -framework CoreFoundation" 
+  fi
+fi
+
+# Check whether --enable-satellite or --disable-satellite was given.
+if test "${enable_satellite+set}" = set; then
+  enableval="$enable_satellite"
+   if test x$enable_satellite = xyes
+    then
+      BUILTINS="${BUILTINS} satellite"
+      cat >> confdefs.h <<\EOF
+#define HAVE_SATELLITE 1
+EOF
+
+    fi
+fi
+
+
+echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
+echo "configure:5905: 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 5910 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char inet_pton(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char inet_pton();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_inet_pton) || defined (__stub___inet_pton)
+choke me
+#else
+inet_pton();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_inet_pton=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_inet_pton=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  PLUGINS="${PLUGINS} ipv6"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+# Check whether --enable-mad or --disable-mad was given.
+if test "${enable_mad+set}" = set; then
+  enableval="$enable_mad"
+  :
+fi
+
+if test x$enable_mad = xyes
+then
+  PLUGINS="${PLUGINS} mad"
+  LIB_MAD="${LIB_MAD} -lmad"
+  # Check whether --with-mad or --without-mad was given.
+if test "${with_mad+set}" = set; then
+  withval="$with_mad"
+   if test "x$with_val" != "xno" -a "x$with_val" != "x"
+      then
+        CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
+        LIB_MAD="${LIB_MAD} -L$with_val/lib"
+      fi 
+fi
+
+  save_CFLAGS=$CFLAGS
+  save_LDFLAGS=$LDFLAGS
+  CFLAGS="$CFLAGS $CFLAGS_MAD"
+  LDFLAGS="$LDFLAGS $LIB_MAD"
+  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:5964: checking for $ac_hdr" >&5
+echo "configure:5989: 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 5969 "configure"
+#line 5994 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5999: \"$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*
@@ -5993,131 +6018,95 @@ EOF
  
 else
   echo "$ac_t""no" 1>&6
+echo "Cannot find development headers for libmad..."
+    exit 1
+  
 fi
 done
 
-  BSD_DVD_STRUCT=0
-  LINUX_DVD_STRUCT=0
-  OPENBSD_DVD_STRUCT=0
-        cat > conftest.$ac_ext <<EOF
-#line 6004 "configure"
+  echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
+echo "configure:6029: checking for mad_bit_init in -lmad" >&5
+ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lmad  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6037 "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
+/* 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();
 
-    cat > conftest.$ac_ext <<EOF
-#line 6017 "configure"
-#include "confdefs.h"
-#include <sys/cdio.h>
+int main() {
+mad_bit_init()
+; 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:6048: \"$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_lib_$ac_lib_var=yes"
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-  
 fi
-rm -f conftest*
-
-        cat > conftest.$ac_ext <<EOF
-#line 6037 "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
+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
 
-    cat > conftest.$ac_ext <<EOF
-#line 6050 "configure"
-#include "confdefs.h"
-#include <sys/dvdio.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "struct dvd_struct" >/dev/null 2>&1; then
-  rm -rf conftest*
-  
-                    BSD_DVD_STRUCT=1
-else
-  rm -rf conftest*
-  LINUX_DVD_STRUCT=1
-fi
-rm -f conftest*
+  LIBS="-lmad $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
+ echo "Cannot find libmad library..."
+    exit 1
   
 fi
-rm -f conftest*
-
-        cat > conftest.$ac_ext <<EOF
-#line 6070 "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
-  
+  CFLAGS=$save_CFLAGS
+  LDFLAGS=$save_LDFLAGS
 fi
-rm -f conftest*
 
-        NEED_BSDI_LIBDVD=0
-  cat > conftest.$ac_ext <<EOF
-#line 6089 "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
+if test x$SYS = xbeos
+then
+    PLUGINS="${PLUGINS} beos"
 
-    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-a52 or --disable-a52 was given.
+if test "${enable_a52+set}" = set; then
+  enableval="$enable_a52"
+  :
+fi
+
+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:6111: checking for $ac_hdr" >&5
+echo "configure:6100: 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 6116 "configure"
+#line 6105 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6110: \"$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*
@@ -6138,36 +6127,39 @@ 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
-
-      OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
-      LINUX_DVD_STRUCT=1
-    
+      BUILTINS="${BUILTINS} a52"
+      LIB_A52="${LIB_A52} -la52 -lm"
+     
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-  
 fi
-rm -f conftest*
 
-        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:6161: checking for sys/scsi/scsi_types.h" >&5
+# Check whether --enable-vorbis or --disable-vorbis was given.
+if test "${enable_vorbis+set}" = set; then
+  enableval="$enable_vorbis"
+  :
+fi
+
+if test "x$enableval" != "xno"
+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:6153: 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 6166 "configure"
+#line 6158 "configure"
 #include "confdefs.h"
-#include <sys/scsi/scsi_types.h>
+#include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6163: \"$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*
@@ -6183,20 +6175,60 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = 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:6190: 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 6195 "configure"
-#include "confdefs.h"
-#include <sys/scsi/impl/uscsi.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+    PLUGINS="${PLUGINS} vorbis"
+    LIB_VORBIS="${LIB_VORBIS} -lvorbis"
+   
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
+  :
+fi
+
+
+# Check whether --enable-x11 or --disable-x11 was given.
+if test "${enable_x11+set}" = set; then
+  enableval="$enable_x11"
+  :
+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
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6222: 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 6227 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6232: \"$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*
@@ -6212,34 +6244,54 @@ rm -f conftest*
 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
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  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"
+  
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-  
-else
-  echo "$ac_t""no" 1>&6
+  CPPFLAGS=$saved_CPPFLAGS
+fi
+
+# Check whether --enable-xvideo or --disable-xvideo was given.
+if test "${enable_xvideo+set}" = set; then
+  enableval="$enable_xvideo"
+  :
 fi
 
-        ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
-echo "configure:6233: checking for sys/scsi.h" >&5
+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
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6285: 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 6238 "configure"
+#line 6290 "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:6243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6295: \"$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*
@@ -6255,407 +6307,541 @@ 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 6261 "configure"
+    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:6319: 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 6327 "configure"
 #include "confdefs.h"
-#include <sys/scsi.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 "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "sctl_io" >/dev/null 2>&1; then
+if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  
-      cat >> confdefs.h <<\EOF
-#define HPUX_SCTL_IO 1
-EOF
-
-    
+  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
 
-        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
-EOF
-
-    fi
-  fi
-
+    CFLAGS=$saved_CFLAGS
+  
+  CPPFLAGS=$saved_CPPFLAGS
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
+fi
 
-
-# Check whether --with-tuning or --without-tuning was given.
-if test "${with_tuning+set}" = set; then
-  withval="$with_tuning"
+# Check whether --enable-sdl or --disable-sdl was given.
+if test "${enable_sdl+set}" = set; then
+  enableval="$enable_sdl"
   :
 fi
 
-if test "x$withval" != "x"; then
-    TUNING=$withval
+if test "x$enable_sdl" != "xno"
+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:6396: 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
-    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
+  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
-
-# 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 
+SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
+if test -n "$SDL12_CONFIG"; then
+  echo "$ac_t""$SDL12_CONFIG" 1>&6
 else
-   VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
-  LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
+  echo "$ac_t""no" 1>&6
 fi
 
-
-# Check whether --enable-mmx or --disable-mmx was given.
-if test "${enable_mmx+set}" = set; then
-  enableval="$enable_mmx"
-   if test x$enableval = xyes; then ARCH="${ARCH} mmx";
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
+  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:6436: 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
-   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 
+  case "$SDL11_CONFIG" in
+  /*)
+  ac_cv_path_SDL11_CONFIG="$SDL11_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.
+  ;;
+  *)
+  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_SDL11_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"
+  ;;
+esac
 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 
+SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
+if test -n "$SDL11_CONFIG"; then
+  echo "$ac_t""$SDL11_CONFIG" 1>&6
 else
-   if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
-    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
+  echo "$ac_t""no" 1>&6
 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 
+    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:6477: 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 "$SDL_CONFIG" in
+  /*)
+  ac_cv_path_SDL_CONFIG="$SDL_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.
+  ;;
+  *)
+  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_SDL_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"
+  ;;
+esac
 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 
+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
 
-
-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 
+    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:6523: 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 6528 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6533: \"$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
+ 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
 
-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;
+    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
-    LIB="${LIB} -lcprof"
-    CPROF=1
+    { 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 or --without-directx was given.
+if test "${with_directx+set}" = set; then
+  withval="$with_directx"
+  :
+fi
 
-# Check whether --enable-optimizations or --disable-optimizations was given.
-if test "${enable_optimizations+set}" = set; then
-  enableval="$enable_optimizations"
-   if test x$enableval = xno; then OPTIMS=0; fi 
+    if test "x$with_directx" = "x"
+    then
+      for ac_hdr in ddraw.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6603: 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
-   OPTIMS=1 
+  cat > conftest.$ac_ext <<EOF
+#line 6608 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6613: \"$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} directx"
+        LIB_DIRECTX="${LIB_DIRECTX} -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:6642: checking for directX headers in ${withval}" >&5
+      if test -f ${withval}/ddraw.h
+      then
+        PLUGINS="${PLUGINS} directx"
+        LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
+        INCLUDE="${INCLUDE} -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-fb or --disable-fb was given.
+if test "${enable_fb+set}" = set; then
+  enableval="$enable_fb"
+  :
+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:6407: 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
+    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:6669: 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 6415 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 6674 "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:6426: \"$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:6679: \"$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} fb"
+      
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-    cat > conftest.$ac_ext <<EOF
-#line 6454 "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*
-
 
+# Check whether --enable-mga or --disable-mga was given.
+if test "${enable_mga+set}" = set; then
+  enableval="$enable_mga"
+   if test x$enable_mga = xyes
+    then
+      PLUGINS="${PLUGINS} mga xmga"
+    fi 
 fi
 
 
-LIB="${LIB} ${THREAD_LIB}"
+# Check whether --enable-ggi or --disable-ggi was given.
+if test "${enable_ggi+set}" = set; then
+  enableval="$enable_ggi"
+  :
+fi
 
-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
-      if test x${CAN_BUILD_LIBDVDCSS} = x1
-      then
-        NEED_LIBDVDCSS=1
-        STATIC_LIBDVDCSS=1
-        BUILTINS="${BUILTINS} dvd"
-        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
-        LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
-        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
-      fi
-    ;;
-    xlocal-shared)
-      # local libdvdcss, dynamically linked
-      if test x${CAN_BUILD_LIBDVDCSS} = x1
-      then
-        NEED_LIBDVDCSS=1
-        BUILTINS="${BUILTINS} dvd"
-        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
-        LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
-        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
-      fi
-    ;;
-    xno)
-      # don't use libdvdcss at all, build a DVD module that can dlopen() it
-      DUMMY_LIBDVDCSS=1
-      BUILTINS="${BUILTINS} dvd"
-      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
-      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
-      CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
-      LIB_DVD="${LIB_DVD} -ldl"
-      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
-    ;;
-    *)
-      # existing libdvdcss
-      BUILTINS="${BUILTINS} dvd"
-      if test "x$withval" != "xyes"
+if test x$enable_ggi = xyes
+then
+  PLUGINS="${PLUGINS} ggi"
+  LIB_GGI="${LIB_GGI} -lggi"
+  # Check whether --with-ggi or --without-ggi was given.
+if test "${with_ggi+set}" = set; then
+  withval="$with_ggi"
+   if test "x$with_val" != "xno" -a "x$with_val" != "x"
       then
-        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
-        CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
-      fi
-      LIB_DVD="${LIB_DVD} -ldvdcss"
-      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -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
-      NEED_LIBDVDCSS=1
-      STATIC_LIBDVDCSS=1
-      BUILTINS="${BUILTINS} dvd"
-      CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
-      LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
-      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
-    else
-      # XXX: no check for libdl is done, don't try this at home !
-      DUMMY_LIBDVDCSS=1
-      BUILTINS="${BUILTINS} dvd"
-      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
-      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
-      LIB_DVD="${LIB_DVD} -ldl"
-      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
-    fi 
+        CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include"
+        LIB_GGI="${LIB_GGI} -L$with_val/lib"
+      fi 
 fi
 
+fi
 
-# Check whether --enable-dvdread or --disable-dvdread was given.
-if test "${enable_dvdread+set}" = set; then
-  enableval="$enable_dvdread"
-   if test x$enableval = xyes
-  then
-    NEED_LIBDVDCSS=1
-    STATIC_LIBDVDCSS=1
-    BUILTINS="${BUILTINS} dvdread" 
-    CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
-    LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a lib/libdvdcss.a"
-  fi 
+# Check whether --enable-glide or --disable-glide was given.
+if test "${enable_glide+set}" = set; then
+  enableval="$enable_glide"
+  :
 fi
 
+if test x$enable_glide = xyes
+then
+  PLUGINS="${PLUGINS} glide"
+  LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
+  CFLAGS_GLIDE="${CFLAGS_GLIDE} -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
+        CFLAGS_GLIDE="${CFLAGS_GLIDE} -I$with_val/include"
+        LIB_GLIDE="${LIB_GLIDE} -L$with_val/lib"
+      fi 
+fi
 
-# Check whether --enable-vcd or --disable-vcd was given.
-if test "${enable_vcd+set}" = set; then
-  enableval="$enable_vcd"
-  :
 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_vcd != xno
+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:6774: checking for aalib.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
   cat > conftest.$ac_ext <<EOF
-#line 6575 "configure"
+#line 6779 "configure"
 #include "confdefs.h"
-#include <linux/cdrom.h>
+#include <aalib.h>
 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:6784: \"$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"
-  
+  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 test x$enable_vcd != xno -a "${SYS}" = "bsdi"
-then
-  BUILTINS="${BUILTINS} vcd"
+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
 
-# Check whether --enable-dummy or --disable-dummy was given.
-if test "${enable_dummy+set}" = set; then
-  enableval="$enable_dummy"
-  :
+  if test x$have_aa = xtrue
+  then
+    PLUGINS="${PLUGINS} aa"
+    LIB_AA="${LIB_AA} -laa"
+  fi
 fi
 
 
-if test x$enable_dummy != xno
-then
-  BUILTINS="${BUILTINS} dummy"
-fi
-
-# Check whether --enable-null or --disable-null was given.
-if test "${enable_null+set}" = set; then
-  enableval="$enable_null"
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
   :
 fi
 
 
-if test x$enable_null != xno
-then
-  BUILTINS="${BUILTINS} null"
-fi
-
-# Check whether --enable-rc or --disable-rc was given.
-if test "${enable_rc+set}" = set; then
-  enableval="$enable_rc"
+# Check whether --enable-dsp or --disable-dsp was given.
+if test "${enable_dsp+set}" = set; then
+  enableval="$enable_dsp"
   :
 fi
 
 
-if test x$enable_rc != xno
+if test x$enable_dsp != xno &&
+  (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
 then
-  BUILTINS="${BUILTINS} rc"
-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="-I$with_val/include"
-        LIB_MAD="-L$with_val/lib -lmad"
-      else
-        LIB_MAD="-lmad"
-      fi
-      save_CFLAGS=$CFLAGS
-      save_LDFLAGS=$LDFLAGS
-      CFLAGS="$CFLAGS $CFLAGS_MAD"
-      LDFLAGS="$LDFLAGS $LIB_MAD"
-      for ac_hdr in mad.h
+  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:6649: checking for $ac_hdr" >&5
+echo "configure:6835: 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 6654 "configure"
+#line 6840 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6676,35 +6862,24 @@ 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:6689: checking for mad_bit_init in -lmad" >&5
-ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
+    PLUGINS="${PLUGINS} dsp"
+    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
+echo "configure:6868: 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="-lmad  $LIBS"
+LIBS="-lossaudio  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6697 "configure"
+#line 6876 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char mad_bit_init();
 
 int main() {
-mad_bit_init()
+main()
 ; return 0; }
 EOF
-if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6883: \"$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
@@ -6719,51 +6894,17 @@ 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"
-
+  LIB_DSP="${LIB_DSP} -lossaudio"
 else
   echo "$ac_t""no" 1>&6
- echo "Cannot find libmad library..."
-        exit 1
-      
-fi
-
-      CFLAGS=$save_CFLAGS
-      LDFLAGS=$save_LDFLAGS
-      PLUGINS="${PLUGINS} mad"
-    fi 
 fi
 
-
-if test x$SYS = xbeos
-then
-    LIB="${LIB} -lbe"
-    BUILTINS="${BUILTINS} beos"
-    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
-    PLCFLAGS="${PLCFLAGS} -nostart"
-
+  
 else
-
-# Check whether --enable-dsp or --disable-dsp was given.
-if test "${enable_dsp+set}" = set; then
-  enableval="$enable_dsp"
-  :
+  echo "$ac_t""no" 1>&6
 fi
+done
 
-
-if test x$enable_dsp != xno &&
-  (test $SYS != mingw32 || test x$enable_dsp = xyes)
-then
-  if test -c /dev/dsp
-  then
-    PLUGINS="${PLUGINS} dsp"
-  fi
 fi
 
 # Check whether --enable-esd or --disable-esd was given.
@@ -6774,7 +6915,7 @@ if test "${enable_esd+set}" = set; 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:6778: checking for $ac_word" >&5
+echo "configure:6919: 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
@@ -6810,8 +6951,8 @@ fi
      if test x${ESD_CONFIG} != xno
      then
        PLUGINS="${PLUGINS} esd"
-       CFLAGS_ESD="`${ESD_CONFIG} --cflags`"
-       LIB_ESD="`${ESD_CONFIG} --libs`"
+       CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
+       LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
      fi
    fi
 fi
@@ -6825,7 +6966,7 @@ if test "${enable_arts+set}" = set; 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:6829: checking for $ac_word" >&5
+echo "configure:6970: 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
@@ -6861,38 +7002,31 @@ fi
      if test x${ARTS_CONFIG} != xno
      then
        PLUGINS="${PLUGINS} arts"
-       CFLAGS_ARTS="`${ARTS_CONFIG} --cflags`"
-       LIB_ARTS="`${ARTS_CONFIG} --libs `"
+       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
+# 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
-     BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
-     LIB="${LIB} -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:6886: checking for $ac_hdr" >&5
+     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
+echo "configure:7020: 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 6891 "configure"
+#line 7025 "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:6896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7030: \"$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*
@@ -6908,340 +7042,199 @@ 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
- BUILTINS="${BUILTINS} macosx"
-     LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
-     LIB="${LIB} -ObjC"
-   
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-fi
-
-
-# Check whether --enable-qnx or --disable-qnx was given.
-if test "${enable_qnx+set}" = set; then
-  enableval="$enable_qnx"
-  :
-fi
-
-    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:6940: 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:7047: 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 6945 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lasound  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7055 "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:6950: \"$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:7062: \"$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} qnx"
-        LIB_QNX="-lasound -lph"
-      
+  have_alsa="true"
 else
   echo "$ac_t""no" 1>&6
+have_alsa="false"
 fi
-done
 
-    fi
+else
+  echo "$ac_t""no" 1>&6
+have_alsa="false"
+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 
+     if test x$have_alsa = xtrue
+     then
+       PLUGINS="${PLUGINS} alsa"
+       LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
+     fi
+   fi
 fi
 
 
-# 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"
-      then
-        LIB_GGI="-l"$withval
-      else
-        LIB_GGI="-lggi"
-      fi
-    fi 
+# Check whether --enable-waveout or --disable-waveout was given.
+if test "${enable_waveout+set}" = set; then
+  enableval="$enable_waveout"
+  :
 fi
 
+if test "x$enableval" != "xno" -a x$SYS = xmingw32
+  then
+    PLUGINS="${PLUGINS} waveout"
+    LIB_WAVEOUT="-lwinmm"
+fi
 
-# Check whether --enable-sdl or --disable-sdl was given.
-if test "${enable_sdl+set}" = set; then
-  enableval="$enable_sdl"
+
+# Check whether --with- or --without- was given.
+if test "${with_+set}" = set; then
+  withval="$with_"
   :
 fi
 
-if test "x$enable_sdl" != "xno"
+
+# 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
-  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"
+  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
-        SDL_PATH=$withval:$PATH
+        GTK_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:7028: 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
-  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
-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
-
-  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
+  # 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:7068: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
+echo "configure:7139: 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 "$SDL11_CONFIG" in
+  case "$GTK12_CONFIG" in
   /*)
-  ac_cv_path_SDL11_CONFIG="$SDL11_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 path.
   ;;
   ?:/*)                         
-  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos 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="$SDL_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_SDL11_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_GTK12_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_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
   ;;
 esac
 fi
-SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
-if test -n "$SDL11_CONFIG"; then
-  echo "$ac_t""$SDL11_CONFIG" 1>&6
+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
 
-    SDL_CONFIG=${SDL11_CONFIG}
-    SDL_HEADER="SDL11/SDL.h"
-  fi
-  if test x${SDL_CONFIG} = xno
+  GTK_CONFIG=${GTK12_CONFIG}
+  if test x${GTK_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
+    # 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:7109: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
+echo "configure:7178: 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 "$SDL_CONFIG" in
+  case "$GTK_CONFIG" in
   /*)
-  ac_cv_path_SDL_CONFIG="$SDL_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_SDL_CONFIG="$SDL_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="$SDL_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_SDL_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_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
   ;;
 esac
 fi
-SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
-if test -n "$SDL_CONFIG"; then
-  echo "$ac_t""$SDL_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
 
-    SDL_HEADER="SDL/SDL.h"
   fi
-  if test x${SDL_CONFIG} != xno
+  if test x${GTK_CONFIG} != xno
   then
-    PLUGINS="${PLUGINS} sdl"
-    CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
-    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:7155: 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 7160 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7165: \"$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
- 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
+    if expr 1.2.0 \> `$GTK_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; }
+      { 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
-  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 $SYS = mingw32
-  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 directx.h
+    CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
+    LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+    # 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
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7235: checking for $ac_hdr" >&5
+echo "configure:7228: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7240 "configure"
+#line 7233 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7238: \"$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*
@@ -7255,95 +7248,29 @@ else
 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} directx"
-        LIB_DIRECTX="-lgdi32 -ldxguid" 
-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:7274: checking for directX headers in ${withval}" >&5
-      if test -f ${withval}/include/directx.h
-      then
-        PLUGINS="${PLUGINS} directx"
-        LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid"
-        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
-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="-l"$withval" -lm"
-      else
-        LIB_GLIDE="-lglide2x -lm"
-      fi
-    fi 
-fi
-
-
-# Check whether --enable-ncurses or --disable-ncurses was given.
-if test "${enable_ncurses+set}" = set; then
-  enableval="$enable_ncurses"
-  if test x$enable_ncurses = xyes; then
-     PLUGINS="${PLUGINS} ncurses"
-     LIB_NCURSES="-lncurses"
-   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="-lqt -L${QTDIR}/lib"
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     fi
-   fi
-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="-L${KDEDIR}/lib -lkfile"
-     if test -x ${QTDIR}/bin/moc
-     then
-       MOC=${QTDIR}/bin/moc
-     else
-       MOC=moc
-     fi
-   fi
-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
+ac_cv_gtk_headers=no
+      echo "Cannot find gtk development headers."
+    
+fi
+done
 
+    if test "x$ac_cv_gtk_headers" = xyes
+    then
+      PLUGINS="${PLUGINS} gtk"
+      ALIASES="${ALIASES} gvlc"
+    fi
+    CPPFLAGS=$saved_CPPFLAGS
+  fi
+fi
 
 # Check whether --enable-gnome or --disable-gnome was given.
 if test "${enable_gnome+set}" = set; then
@@ -7353,7 +7280,7 @@ if test "${enable_gnome+set}" = set; then
     # 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:7357: checking for $ac_word" >&5
+echo "configure:7284: 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
@@ -7388,8 +7315,8 @@ fi
 
     if test -x ${GNOME_CONFIG}
     then
-       CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gnomeui`"
-       LIB_GNOME="`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
+       CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
+       LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
     fi
     # now look for the gnome.h header
     saved_CPPFLAGS=$CPPFLAGS
@@ -7398,17 +7325,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7402: checking for $ac_hdr" >&5
+echo "configure:7329: 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 7407 "configure"
+#line 7334 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7339: \"$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*
@@ -7435,7 +7362,7 @@ EOF
 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; }
+developement tools or remove the --enable-gnome option" 1>&2; exit 1; }
      
 fi
 done
@@ -7446,85 +7373,124 @@ done
 fi
 
 
-# Check whether --enable-gtk or --disable-gtk was given.
-if test "${enable_gtk+set}" = set; then
-  enableval="$enable_gtk"
-  :
+# 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
 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 
+
+# 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
 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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7472: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
+
+# 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 AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
+     LIB_COMMON="${LIB_COMMON} -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:7429: 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
-  case "$GTK_CONFIG" in
-  /*)
-  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$GTK_PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
-  ;;
-esac
+  cat > conftest.$ac_ext <<EOF
+#line 7434 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7439: \"$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
-GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
-if test -n "$GTK_CONFIG"; then
-  echo "$ac_t""$GTK_CONFIG" 1>&6
+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
+ BUILTINS="${BUILTINS} macosx"
+     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
+     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
+     LIB_COMMON="${LIB_COMMON} -ObjC"
+   
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-  if test -x ${GTK_CONFIG}
-  then
-    CFLAGS_GTK="`${GTK_CONFIG} --cflags 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"
-  FOUND=
-  for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
+fi
+
+
+# Check whether --enable-qnx or --disable-qnx was given.
+if test "${enable_qnx+set}" = set; then
+  enableval="$enable_qnx"
+  :
+fi
+
+    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:7518: checking for $ac_hdr" >&5
+echo "configure:7484: 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 7523 "configure"
+#line 7489 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7494: \"$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*
@@ -7545,52 +7511,57 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 #define $ac_tr_hdr 1
 EOF
  
+        PLUGINS="${PLUGINS} qnx"
+        LIB_QNX="${LIB_QNX} -lasound -lph"
+      
 else
   echo "$ac_t""no" 1>&6
-FOUND=no
-       echo "Cannot find gtk development headers."
-  
 fi
 done
 
-  if test -z $FOUND; then
-    PLUGINS="${PLUGINS} gtk"
-    ALIASES="${ALIASES} gvlc"
-  fi
-  CPPFLAGS=$saved_CPPFLAGS
+    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 
 fi
 
-# Check whether --enable-x11 or --disable-x11 was given.
-if test "${enable_x11+set}" = set; then
-  enableval="$enable_x11"
+
+# 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
+fi
+
+
+# Check whether --enable-lirc or --disable-lirc was given.
+if test "${enable_lirc+set}" = set; then
+  enableval="$enable_lirc"
   :
 fi
 
-if test x$enable_x11 != xno &&
-  (test $SYS != mingw32 || 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
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7584: checking for $ac_hdr" >&5
+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:7555: 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 7589 "configure"
+#line 7560 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+#include <lirc/lirc_client.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7565: \"$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*
@@ -7604,138 +7575,263 @@ else
 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
+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:7582: 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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-llirc_client  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7590 "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 lirc_init();
+
+int main() {
+lirc_init()
+; return 0; }
+EOF
+if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_lirc="true"
+else
+  echo "$ac_t""no" 1>&6
+have_lirc="false"
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+have_lirc="false"
+fi
+
+  if test x$have_lirc = xtrue
+  then
+    PLUGINS="${PLUGINS} lirc"
+    LIB_LIRC="${LIB_LIRC} -llirc_client"
+  fi
+fi
+
+fi
+
+# 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:7658: checking whether the byte order is big-endian" >&5
+if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_bigendian=unknown
+        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 "`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
-    #PLUGINS="${PLUGINS} x11"
-    LIB_X11="-L$x_libraries -lX11 -lXext"
-    CFLAGS_X11="-I$x_includes"
-  
-  CPPFLAGS=$saved_CPPFLAGS
-else
-  echo "$ac_t""no" 1>&6
+
 fi
-done
 
+DLL_PATH=.
+# Check whether --with-dll-path or --without-dll-path was given.
+if test "${with_dll_path+set}" = set; then
+  withval="$with_dll_path"
+   if test "x$withval" != "xno"
+    then
+      DLL_PATH=$withval
+    fi 
 fi
 
-# Check whether --enable-xvideo or --disable-xvideo was given.
-if test "${enable_xvideo+set}" = set; then
-  enableval="$enable_xvideo"
-  :
+
+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
 
-if test x$enable_xvideo != xno &&
-  (test $SYS != mingw32 || 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
+
+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_COMMON="${LIB_COMMON} -lcprof"
+    CPROF=1
   fi
-  saved_CPPFLAGS=$CPPFLAGS
-  CPPFLAGS="$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:7647: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+
+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:7743: 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
-  cat > conftest.$ac_ext <<EOF
-#line 7652 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lpth  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7751 "configure"
 #include "confdefs.h"
-#include <$ac_hdr>
+/* 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:7657: \"$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:7762: \"$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___%'`
+    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_hdr 1
+#define $ac_tr_lib 1
 EOF
-    BUILTINS="${BUILTINS} xvideo"
-    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
-    CFLAGS_XVIDEO="-I$x_includes"
-  
-  CPPFLAGS=$saved_CPPFLAGS
+
+  LIBS="-lpth $LIBS"
+
 else
   echo "$ac_t""no" 1>&6
 fi
-done
-
-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:7697: 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 7702 "configure"
+    cat > conftest.$ac_ext <<EOF
+#line 7790 "configure"
 #include "confdefs.h"
-#include <alsa/asoundlib.h>
+#include <pth.h>
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7707: \"$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
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pth_init" >/dev/null 2>&1; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  
+      cat >> confdefs.h <<\EOF
+#define PTH_INIT_IN_PTH_H 1
+EOF
+
+    THREAD_LIB="-lpth"
+    fi
 fi
 rm -f conftest*
+
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:7724: checking for main in -lasound" >&5
-ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
+
+
+# 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:7816: 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 7732 "configure"
+#line 7824 "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:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7835: \"$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
@@ -7750,28 +7846,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="-lasound"
-     fi
-   fi
+    cat > conftest.$ac_ext <<EOF
+#line 7863 "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
 
+
+LIB_COMMON="${LIB_COMMON} ${THREAD_LIB}"
+
 # Check whether --enable-plugins or --disable-plugins was given.
 if test "${enable_plugins+set}" = set; then
   enableval="$enable_plugins"
@@ -7783,16 +7893,54 @@ 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 $VERSION $CODENAME Copyright 1996-2002 VideoLAN\n"
+EOF
+
+cat >> confdefs.h <<EOF
+#define COPYRIGHT_MESSAGE "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN"
+EOF
+
+
+VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
+cat >> confdefs.h <<EOF
+#define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
+EOF
+
+cat >> confdefs.h <<EOF
+#define MODULE_SYMBOL $VLC_SYMBOL
+EOF
+
+
+DATA_PATH="${ac_tool_prefix}/share/videolan"
+
+PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -7971,7 +8119,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile.opts include/config.h po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -8018,13 +8166,11 @@ 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%@VLC_VERSION@%$VLC_VERSION%g
-s%@VLC_CODENAME@%$VLC_CODENAME%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%@GMAKE@%$GMAKE%g
 s%@ALLOCA@%$ALLOCA%g
 s%@GLIBC21@%$GLIBC21%g
 s%@LIBICONV@%$LIBICONV%g
@@ -8051,23 +8197,24 @@ 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
 s%@ARCH@%$ARCH%g
 s%@PLUGINS@%$PLUGINS%g
 s%@BUILTINS@%$BUILTINS%g
 s%@ALIASES@%$ALIASES%g
-s%@DEFINE@%$DEFINE%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
@@ -8075,58 +8222,75 @@ s%@TUNING@%$TUNING%g
 s%@RELEASE@%$RELEASE%g
 s%@MOC@%$MOC%g
 s%@DLL_PATH@%$DLL_PATH%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@LCFLAGS@%$LCFLAGS%g
-s%@PLCFLAGS@%$PLCFLAGS%g
-s%@SOFLAGS@%$SOFLAGS%g
-s%@LIB@%$LIB%g
+s%@VLC_PACKAGE@%$VLC_PACKAGE%g
+s%@VLC_VERSION@%$VLC_VERSION%g
+s%@PLDFLAGS@%$PLDFLAGS%g
+s%@LIB_COMMON@%$LIB_COMMON%g
+s%@LIB_VLC@%$LIB_VLC%g
+s%@LIB_A52@%$LIB_A52%g
+s%@LIB_AA@%$LIB_AA%g
 s%@LIB_ALSA@%$LIB_ALSA%g
-s%@LIB_ALTIVEC@%$LIB_ALTIVEC%g
 s%@LIB_ARTS@%$LIB_ARTS%g
 s%@LIB_BEOS@%$LIB_BEOS%g
+s%@LIB_CHROMA_I420_RGB@%$LIB_CHROMA_I420_RGB%g
 s%@LIB_DARWIN@%$LIB_DARWIN%g
 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
+s%@LIB_DSP@%$LIB_DSP%g
 s%@LIB_DVD@%$LIB_DVD%g
-s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
 s%@LIB_DVDREAD@%$LIB_DVDREAD%g
-s%@LIB_DVDREAD_PLUGIN@%$LIB_DVDREAD_PLUGIN%g
 s%@LIB_ESD@%$LIB_ESD%g
+s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
 s%@LIB_GGI@%$LIB_GGI%g
 s%@LIB_GLIDE@%$LIB_GLIDE%g
 s%@LIB_GNOME@%$LIB_GNOME%g
 s%@LIB_GTK@%$LIB_GTK%g
+s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
 s%@LIB_IMDCT@%$LIB_IMDCT%g
 s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
 s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
+s%@LIB_IPV4@%$LIB_IPV4%g
+s%@LIB_IPV6@%$LIB_IPV6%g
 s%@LIB_KDE@%$LIB_KDE%g
-s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
+s%@LIB_LIRC@%$LIB_LIRC%g
 s%@LIB_MACOSX@%$LIB_MACOSX%g
 s%@LIB_MAD@%$LIB_MAD%g
+s%@LIB_MEMCPYALTIVEC@%$LIB_MEMCPYALTIVEC%g
+s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
 s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
 s%@LIB_NCURSES@%$LIB_NCURSES%g
 s%@LIB_QNX@%$LIB_QNX%g
 s%@LIB_QT@%$LIB_QT%g
 s%@LIB_RC@%$LIB_RC%g
 s%@LIB_SDL@%$LIB_SDL%g
+s%@LIB_VCD@%$LIB_VCD%g
+s%@LIB_VORBIS@%$LIB_VORBIS%g
+s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
+s%@LIB_WIN32@%$LIB_WIN32%g
 s%@LIB_X11@%$LIB_X11%g
 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
+s%@CFLAGS_COMMON@%$CFLAGS_COMMON%g
 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
-s%@CFLAGS_ALTIVEC@%$CFLAGS_ALTIVEC%g
+s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
-s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
-s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
+s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
+s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
+s%@CFLAGS_KDE@%$CFLAGS_KDE%g
+s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
+s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
 s%@CFLAGS_MAD@%$CFLAGS_MAD%g
+s%@CFLAGS_MEMCPYALTIVEC@%$CFLAGS_MEMCPYALTIVEC%g
+s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
+s%@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%@OBJ_DVD@%$OBJ_DVD%g
-s%@OBJ_LIBDVDCSS@%$OBJ_LIBDVDCSS%g
 s%@NEED_GETOPT@%$NEED_GETOPT%g
-s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
 
 CEOF
 EOF
@@ -8168,7 +8332,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h po/Makefile.in"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts po/Makefile.in"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -8378,53 +8542,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 ""