]> git.sesse.net Git - vlc/commitdiff
*first version of plugin for libdvdplay. To test it, you need to have
authorStéphane Borel <stef@videolan.org>
Tue, 23 Jul 2002 19:56:19 +0000 (19:56 +0000)
committerStéphane Borel <stef@videolan.org>
Tue, 23 Jul 2002 19:56:19 +0000 (19:56 +0000)
 libdvdplay installed (available from videolan CVS), and request plugins
compilation in the usual way:
--enable-dvdplay.
Note that libdvdplay needs libdvdread and libdvdcss.

Currently it has only been tested under linux, with gnome interface (optional)
and xvideo output.

What works (more or less):
 -DVD reading in some rare cases :) (title and menus),
 -Menu pause,
 -Seeking,
 -Selecting directly a specific title/chapter/angle,
 -Changing audio, sub-picture, angle during playback,
 -Interactive menus with mouse only.

What is missing:
 -Menu buttons highlighting (needs spudec patch),
 -Keyboard interaction (needs a specific part in port specific plugins),
 -A specific interface to navigate through menus (needs that I move my ass),
 -Interactive menus won't work with other output plugins so long as they
  have not been patched to send mouse/keyboard events to vlc interface,
 -Whatever you need.

Known bugs (bugs in libdvdplay mostly):
 -Seeking in some menus or intro titles (bad vobu map),
 -Read/seek error with some DVDs,
 -the configure needs tweaking,
 -numerous segfaults,
 -decoder/output modules locking error,
 -fuzzy colors in menus when spudec is active (default in menus).

The plugin is not guaranteed to work anywhere outside my computer. If it break your, don't come and complain to me :).

20 files changed:
Makefile
Makefile.opts.in
configure
configure.in
include/defs.h.in
include/vlc_symbols.h
plugins/dvdplay/.cvsignore [new file with mode: 0644]
plugins/dvdplay/Makefile [new file with mode: 0644]
plugins/dvdplay/access.c [new file with mode: 0644]
plugins/dvdplay/access.h [new file with mode: 0644]
plugins/dvdplay/demux.c [new file with mode: 0644]
plugins/dvdplay/demux.h [new file with mode: 0644]
plugins/dvdplay/dvd.c [new file with mode: 0644]
plugins/dvdplay/dvd.h [new file with mode: 0644]
plugins/dvdplay/es.c [new file with mode: 0644]
plugins/dvdplay/es.h [new file with mode: 0644]
plugins/dvdplay/intf.c [new file with mode: 0644]
plugins/dvdplay/intf.h [new file with mode: 0644]
plugins/dvdplay/tools.c [new file with mode: 0644]
plugins/dvdplay/tools.h [new file with mode: 0644]

index e80a21a4551aa154146d0e92ea413dfcf4be1c05..0da950464190fdddcd434f55039d5d7aef349664 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ PLUGINS_DIR :=        a52 \
                dummy \
                dvd \
                dvdread \
+               dvdplay \
                esd \
       familiar \
                fb \
@@ -101,6 +102,7 @@ PLUGINS_TARGETS := a52/a52 \
                dummy/null \
                dvd/dvd \
                dvdread/dvdread \
+               dvdplay/dvdplay \
                esd/esd \
       familiar/familiar \
                fb/fb \
index c8bea6a421e375b81b2e01d4b3898b99f3f71e1e..f9d6de878c9a4df9b970d02444b58b6996b184ef 100644 (file)
@@ -64,6 +64,7 @@ chroma_i420_yuy2_mmx_CFLAGS = @chroma_i420_yuy2_mmx_CFLAGS@
 directx_CFLAGS = @directx_CFLAGS@
 dvd_CFLAGS = @dvd_CFLAGS@
 dvdread_CFLAGS = @dvdread_CFLAGS@
+dvdplay_CFLAGS = @dvdplay_CFLAGS@
 esd_CFLAGS = @esd_CFLAGS@
 familiar_CFLAGS = @familiar_CFLAGS@
 ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
@@ -99,6 +100,7 @@ directx_LDFLAGS = @directx_LDFLAGS@
 dsp_LDFLAGS = @dsp_LDFLAGS@
 dvd_LDFLAGS = @dvd_LDFLAGS@
 dvdread_LDFLAGS = @dvdread_LDFLAGS@
+dvdplay_LDFLAGS = @dvdplay_LDFLAGS@
 esd_LDFLAGS = @esd_LDFLAGS@
 familiar_LDFLAGS = @familiar_LDFLAGS@
 filter_distort_LDFLAGS = @filter_distort_LDFLAGS@
index 62d00f932d9c158289b8f1fd9ac1d843c4cbe3c0..483cecb539395482a580ca00081806ae479308c2 100755 (executable)
--- a/configure
+++ b/configure
@@ -44,6 +44,10 @@ ac_help="$ac_help
   --enable-dvdread        dvdread input module (default disabled)"
 ac_help="$ac_help
     --with-dvdread=PATH   libdvdread headers and libraries"
+ac_help="$ac_help
+  --enable-dvdplay        dvdplay input module (default disabled)"
+ac_help="$ac_help
+    --with-dvdplay=PATH   libdvdplay headers and libraries"
 ac_help="$ac_help
   --enable-dvbpsi        dvbpsi ts demux module (default disabled)"
 ac_help="$ac_help
@@ -724,7 +728,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:728: checking host system type" >&5
+echo "configure:732: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -745,7 +749,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:749: checking target system type" >&5
+echo "configure:753: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -763,7 +767,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:767: checking build system type" >&5
+echo "configure:771: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -797,7 +801,7 @@ save_CFLAGS="${CFLAGS}"
 save_LDFLAGS="${LDFLAGS}"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:801: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:805: 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
@@ -826,7 +830,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:830: checking for $ac_word" >&5
+echo "configure:834: 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
@@ -856,7 +860,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:860: checking for $ac_word" >&5
+echo "configure:864: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -907,7 +911,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:911: checking for $ac_word" >&5
+echo "configure:915: 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
@@ -939,7 +943,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:947: 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.
@@ -950,12 +954,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 954 "configure"
+#line 958 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:963: \"$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
@@ -981,12 +985,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:985: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:989: 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:990: checking whether we are using GNU C" >&5
+echo "configure:994: 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
@@ -995,7 +999,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:999: \"$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:1003: \"$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
@@ -1014,7 +1018,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:1018: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1022: 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
@@ -1046,7 +1050,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1050: checking how to run the C preprocessor" >&5
+echo "configure:1054: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1061,13 +1065,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 1065 "configure"
+#line 1069 "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:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1075: \"$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
   :
@@ -1078,13 +1082,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1082 "configure"
+#line 1086 "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:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1092: \"$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
   :
@@ -1095,13 +1099,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1099 "configure"
+#line 1103 "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:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1109: \"$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
   :
@@ -1135,7 +1139,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:1139: checking for $ac_word" >&5
+echo "configure:1143: 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
@@ -1167,7 +1171,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:1171: checking for $ac_word" >&5
+echo "configure:1175: 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
@@ -1202,7 +1206,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1206: checking for $ac_word" >&5
+echo "configure:1210: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1234,7 +1238,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1238: checking for $ac_word" >&5
+echo "configure:1242: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1270,7 +1274,7 @@ fi
 # Extract the first word of "gmake", so it can be a program name with args.
 set dummy gmake; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1274: checking for $ac_word" >&5
+echo "configure:1278: 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
@@ -1305,7 +1309,7 @@ fi
 
 if test "x${GMAKE}" = "xno"; then
   echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
-echo "configure:1309: checking whether GNU make is installed" >&5
+echo "configure:1313: 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
@@ -1337,7 +1341,7 @@ 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:1341: checking for $ac_word" >&5
+echo "configure:1345: 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
@@ -1366,7 +1370,7 @@ fi
 
 
         echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1370: checking for strerror in -lcposix" >&5
+echo "configure:1374: 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
@@ -1374,7 +1378,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1378 "configure"
+#line 1382 "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
@@ -1385,7 +1389,7 @@ int main() {
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:1389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1393: \"$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
@@ -1408,12 +1412,12 @@ fi
   
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1412: checking for ANSI C header files" >&5
+echo "configure:1416: 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 1417 "configure"
+#line 1421 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1421,7 +1425,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1429: \"$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*
@@ -1438,7 +1442,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 1442 "configure"
+#line 1446 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1456,7 +1460,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 1460 "configure"
+#line 1464 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1477,7 +1481,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1481 "configure"
+#line 1485 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1488,7 +1492,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1512,12 +1516,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1516: checking for working const" >&5
+echo "configure:1520: 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 1521 "configure"
+#line 1525 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1566,7 +1570,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1587,21 +1591,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1591: checking for inline" >&5
+echo "configure:1595: 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 1598 "configure"
+#line 1602 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1627,12 +1631,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1631: checking for off_t" >&5
+echo "configure:1635: 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 1636 "configure"
+#line 1640 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1660,12 +1664,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1664: checking for size_t" >&5
+echo "configure:1668: 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 1669 "configure"
+#line 1673 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1695,19 +1699,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:1699: checking for working alloca.h" >&5
+echo "configure:1703: 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 1704 "configure"
+#line 1708 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1715: \"$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
@@ -1728,12 +1732,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1732: checking for alloca" >&5
+echo "configure:1736: 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 1737 "configure"
+#line 1741 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1761,7 +1765,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1769: \"$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
@@ -1793,12 +1797,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1797: checking whether alloca needs Cray hooks" >&5
+echo "configure:1801: 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 1802 "configure"
+#line 1806 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1823,12 +1827,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:1827: checking for $ac_func" >&5
+echo "configure:1831: 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 1832 "configure"
+#line 1836 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1851,7 +1855,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1859: \"$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
@@ -1878,7 +1882,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1882: checking stack direction for C alloca" >&5
+echo "configure:1886: 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
@@ -1886,7 +1890,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1890 "configure"
+#line 1894 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1905,7 +1909,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1913: \"$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
@@ -1926,21 +1930,21 @@ EOF
 
 fi
 
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+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:1934: checking for $ac_hdr" >&5
+echo "configure:1938: 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 1939 "configure"
+#line 1943 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1948: \"$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*
@@ -1969,12 +1973,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1973: checking for $ac_func" >&5
+echo "configure:1977: 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 1978 "configure"
+#line 1982 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1997,7 +2001,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2005: \"$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
@@ -2022,7 +2026,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2026: checking for working mmap" >&5
+echo "configure:2030: 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
@@ -2030,7 +2034,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2034 "configure"
+#line 2038 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2058,24 +2062,11 @@ else
 #include <fcntl.h>
 #include <sys/mman.h>
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
 # ifndef HAVE_SYS_PARAM_H
@@ -2183,7 +2174,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2178: \"$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
@@ -2207,12 +2198,12 @@ fi
 
 
     echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:2211: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:2202: 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 2216 "configure"
+#line 2207 "configure"
 #include "confdefs.h"
 
 #include <features.h>
@@ -2248,17 +2239,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:2252: checking for $ac_hdr" >&5
+echo "configure:2243: 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 2257 "configure"
+#line 2248 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2253: \"$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*
@@ -2289,12 +2280,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:2293: checking for $ac_func" >&5
+echo "configure:2284: 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 2298 "configure"
+#line 2289 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2317,7 +2308,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2312: \"$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
@@ -2357,7 +2348,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2361: checking for iconv" >&5
+echo "configure:2352: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2365,7 +2356,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 2369 "configure"
+#line 2360 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2375,7 +2366,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -2387,7 +2378,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 2391 "configure"
+#line 2382 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -2397,7 +2388,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2392: \"$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
@@ -2418,13 +2409,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:2422: checking for iconv declaration" >&5
+echo "configure:2413: 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 2428 "configure"
+#line 2419 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2443,7 +2434,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -2472,19 +2463,19 @@ EOF
 
    
   echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2476: checking for nl_langinfo and CODESET" >&5
+echo "configure:2467: 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 2481 "configure"
+#line 2472 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 char* cs = nl_langinfo(CODESET);
 ; return 0; }
 EOF
-if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_langinfo_codeset=yes
 else
@@ -2507,19 +2498,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2511: checking for LC_MESSAGES" >&5
+echo "configure:2502: 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 2516 "configure"
+#line 2507 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2523: \"$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*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -2540,7 +2531,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2544: checking whether NLS is requested" >&5
+echo "configure:2535: 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"
@@ -2562,7 +2553,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2566: checking whether included gettext is requested" >&5
+echo "configure:2557: 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"
@@ -2582,17 +2573,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2586: checking for libintl.h" >&5
+echo "configure:2577: 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 2591 "configure"
+#line 2582 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2587: \"$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*
@@ -2609,12 +2600,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:2613: checking for GNU gettext in libc" >&5
+echo "configure:2604: 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 2618 "configure"
+#line 2609 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2623,7 +2614,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2618: \"$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
@@ -2639,14 +2630,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:2643: checking for GNU gettext in libintl" >&5
+echo "configure:2634: 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 2650 "configure"
+#line 2641 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 extern int _nl_msg_cat_cntr;
@@ -2655,7 +2646,7 @@ bindtextdomain ("", "");
 return (int) gettext ("") + _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2650: \"$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
@@ -2688,12 +2679,12 @@ EOF
             for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2692: checking for $ac_func" >&5
+echo "configure:2683: 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 2697 "configure"
+#line 2688 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2716,7 +2707,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2711: \"$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
@@ -2745,7 +2736,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:2749: checking for $ac_word" >&5
+echo "configure:2740: 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
@@ -2779,7 +2770,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:2783: checking for $ac_word" >&5
+echo "configure:2774: 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
@@ -2816,7 +2807,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:2820: checking for $ac_word" >&5
+echo "configure:2811: 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
@@ -2866,7 +2857,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:2870: checking for $ac_word" >&5
+echo "configure:2861: 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
@@ -2900,7 +2891,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:2904: checking for $ac_word" >&5
+echo "configure:2895: 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
@@ -2936,7 +2927,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:2940: checking for $ac_word" >&5
+echo "configure:2931: 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
@@ -3007,7 +2998,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:3011: checking for $ac_word" >&5
+echo "configure:3002: 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
@@ -3040,7 +3031,7 @@ done
       ac_verc_fail=yes
     else
             echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:3044: checking version of bison" >&5
+echo "configure:3035: 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;;
@@ -3087,7 +3078,7 @@ echo "configure:3044: checking version of bison" >&5
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3091: checking for catalogs to be installed" >&5
+echo "configure:3082: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for presentlang in $ALL_LINGUAS; do
          useit=no
@@ -3139,7 +3130,7 @@ echo "configure:3091: 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:3143: checking for a BSD compatible install" >&5
+echo "configure:3134: 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
@@ -3221,7 +3212,7 @@ case "x${target_os}" in
     # 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:3225: checking for $ac_word" >&5
+echo "configure:3216: 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
@@ -3253,7 +3244,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "windres", so it can be a program name with args.
 set dummy windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3257: checking for $ac_word" >&5
+echo "configure:3248: 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
@@ -3324,12 +3315,12 @@ save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefgh
 for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3328: checking for $ac_func" >&5
+echo "configure:3319: 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 3333 "configure"
+#line 3324 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3352,7 +3343,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3347: \"$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
@@ -3378,12 +3369,12 @@ done
 
 
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3382: checking for connect" >&5
+echo "configure:3373: 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 3387 "configure"
+#line 3378 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3406,7 +3397,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3410: \"$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_func_connect=yes"
 else
@@ -3425,7 +3416,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3429: checking for connect in -lsocket" >&5
+echo "configure:3420: 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
@@ -3433,7 +3424,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3437 "configure"
+#line 3428 "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
@@ -3444,7 +3435,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3439: \"$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
@@ -3469,12 +3460,12 @@ fi
 fi
 
 echo $ac_n "checking for send""... $ac_c" 1>&6
-echo "configure:3473: checking for send" >&5
+echo "configure:3464: checking for send" >&5
 if eval "test \"`echo '$''{'ac_cv_func_send'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3478 "configure"
+#line 3469 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char send(); below.  */
@@ -3497,7 +3488,7 @@ send();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_send=yes"
 else
@@ -3516,7 +3507,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for send in -lsocket""... $ac_c" 1>&6
-echo "configure:3520: checking for send in -lsocket" >&5
+echo "configure:3511: checking for send in -lsocket" >&5
 ac_lib_var=`echo socket'_'send | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3524,7 +3515,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3528 "configure"
+#line 3519 "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
@@ -3535,7 +3526,7 @@ int main() {
 send()
 ; return 0; }
 EOF
-if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3530: \"$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
@@ -3559,12 +3550,12 @@ fi
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3563: checking for gethostbyname" >&5
+echo "configure:3554: 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 3568 "configure"
+#line 3559 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3587,7 +3578,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3582: \"$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
@@ -3606,7 +3597,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3610: checking for gethostbyname in -lnsl" >&5
+echo "configure:3601: 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
@@ -3614,7 +3605,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3618 "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
@@ -3625,7 +3616,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3629: \"$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
@@ -3649,12 +3640,12 @@ fi
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:3653: checking for gethostbyname" >&5
+echo "configure:3644: 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 3658 "configure"
+#line 3649 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3677,7 +3668,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3672: \"$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
@@ -3696,7 +3687,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:3700: checking for gethostbyname in -lbind" >&5
+echo "configure:3691: 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
@@ -3704,7 +3695,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3708 "configure"
+#line 3699 "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
@@ -3715,7 +3706,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3710: \"$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
@@ -3740,12 +3731,12 @@ fi
 
 have_nanosleep=0
 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3744: checking for nanosleep" >&5
+echo "configure:3735: 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 3749 "configure"
+#line 3740 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nanosleep(); below.  */
@@ -3768,7 +3759,7 @@ nanosleep();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3763: \"$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
@@ -3787,7 +3778,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:3791: checking for nanosleep in -lrt" >&5
+echo "configure:3782: 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
@@ -3795,7 +3786,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3799 "configure"
+#line 3790 "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
@@ -3806,7 +3797,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3801: \"$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
@@ -3825,7 +3816,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:3829: checking for nanosleep in -lposix4" >&5
+echo "configure:3820: 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
@@ -3833,7 +3824,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3837 "configure"
+#line 3828 "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
@@ -3844,7 +3835,7 @@ int main() {
 nanosleep()
 ; return 0; }
 EOF
-if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3839: \"$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
@@ -3878,7 +3869,7 @@ EOF
 fi
 # HP/UX port
 echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
-echo "configure:3882: checking for sem_init in -lrt" >&5
+echo "configure:3873: checking for sem_init in -lrt" >&5
 ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3886,7 +3877,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3890 "configure"
+#line 3881 "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
@@ -3897,7 +3888,7 @@ int main() {
 sem_init()
 ; return 0; }
 EOF
-if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3892: \"$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
@@ -3919,12 +3910,12 @@ fi
 
 
 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:3923: checking for inet_aton" >&5
+echo "configure:3914: 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 3928 "configure"
+#line 3919 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_aton(); below.  */
@@ -3947,7 +3938,7 @@ inet_aton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3942: \"$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
@@ -3966,7 +3957,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3970: checking for inet_aton in -lresolv" >&5
+echo "configure:3961: 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
@@ -3974,7 +3965,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3978 "configure"
+#line 3969 "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
@@ -3985,7 +3976,7 @@ int main() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4009,12 +4000,12 @@ fi
 fi
 
 echo $ac_n "checking for textdomain""... $ac_c" 1>&6
-echo "configure:4013: checking for textdomain" >&5
+echo "configure:4004: 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 4018 "configure"
+#line 4009 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char textdomain(); below.  */
@@ -4037,7 +4028,7 @@ textdomain();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_textdomain=yes"
 else
@@ -4056,7 +4047,7 @@ else
   echo "$ac_t""no" 1>&6
 
   echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
-echo "configure:4060: checking for textdomain in -lintl" >&5
+echo "configure:4051: 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
@@ -4064,7 +4055,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4068 "configure"
+#line 4059 "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
@@ -4075,7 +4066,7 @@ int main() {
 textdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4070: \"$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
@@ -4103,12 +4094,12 @@ fi
 
 NEED_GETOPT=0
 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:4107: checking for getopt_long" >&5
+echo "configure:4098: 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 4112 "configure"
+#line 4103 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -4131,7 +4122,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_getopt_long=yes"
 else
@@ -4153,7 +4144,7 @@ else
   echo "$ac_t""no" 1>&6
  # FreeBSD has a gnugetopt library for this:
   echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:4157: checking for getopt_long in -lgnugetopt" >&5
+echo "configure:4148: 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
@@ -4161,7 +4152,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgnugetopt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4165 "configure"
+#line 4156 "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
@@ -4172,7 +4163,7 @@ int main() {
 getopt_long()
 ; return 0; }
 EOF
-if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4200,12 +4191,12 @@ fi
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4204: checking return type of signal handlers" >&5
+echo "configure:4195: 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 4209 "configure"
+#line 4200 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -4222,7 +4213,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -4241,7 +4232,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4245: checking for dlopen in -ldl" >&5
+echo "configure:4236: 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
@@ -4249,7 +4240,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4253 "configure"
+#line 4244 "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
@@ -4260,7 +4251,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4255: \"$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
@@ -4281,7 +4272,7 @@ else
 fi
 
 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
-echo "configure:4285: checking for cos in -lm" >&5
+echo "configure:4276: 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
@@ -4289,7 +4280,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4293 "configure"
+#line 4284 "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
@@ -4300,7 +4291,7 @@ int main() {
 cos()
 ; return 0; }
 EOF
-if { (eval echo configure:4304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4295: \"$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
@@ -4322,7 +4313,7 @@ else
 fi
 
 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
-echo "configure:4326: checking for pow in -lm" >&5
+echo "configure:4317: 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
@@ -4330,7 +4321,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4334 "configure"
+#line 4325 "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
@@ -4341,7 +4332,7 @@ int main() {
 pow()
 ; return 0; }
 EOF
-if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4370,7 +4361,7 @@ fi
 THREAD_LIB=error
 if test "x${THREAD_LIB}" = "xerror"; then
   echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:4374: checking for main in -lpthread" >&5
+echo "configure:4365: checking for main in -lpthread" >&5
 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4378,14 +4369,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4382 "configure"
+#line 4373 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4380: \"$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
@@ -4408,7 +4399,7 @@ fi
 fi
 if test "x${THREAD_LIB}" = "xerror"; then
   echo $ac_n "checking for main in -lpthreads""... $ac_c" 1>&6
-echo "configure:4412: checking for main in -lpthreads" >&5
+echo "configure:4403: checking for main in -lpthreads" >&5
 ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4416,14 +4407,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4420 "configure"
+#line 4411 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4418: \"$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
@@ -4446,7 +4437,7 @@ fi
 fi
 if test "x${THREAD_LIB}" = "xerror"; then
   echo $ac_n "checking for main in -lc_r""... $ac_c" 1>&6
-echo "configure:4450: checking for main in -lc_r" >&5
+echo "configure:4441: checking for main in -lc_r" >&5
 ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4454,14 +4445,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4458 "configure"
+#line 4449 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4456: \"$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
@@ -4484,12 +4475,12 @@ fi
 fi
 if test "x${THREAD_LIB}" = "xerror"; then
   echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
-echo "configure:4488: checking for pthread_mutex_lock" >&5
+echo "configure:4479: checking for pthread_mutex_lock" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4493 "configure"
+#line 4484 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_mutex_lock(); below.  */
@@ -4512,7 +4503,7 @@ pthread_mutex_lock();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pthread_mutex_lock=yes"
 else
@@ -4535,7 +4526,7 @@ fi
 fi
 
 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4539: checking for cthread_fork in -lthreads" >&5
+echo "configure:4530: 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
@@ -4543,7 +4534,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4547 "configure"
+#line 4538 "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
@@ -4554,7 +4545,7 @@ int main() {
 cthread_fork()
 ; return 0; }
 EOF
-if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4549: \"$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
@@ -4576,7 +4567,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4580 "configure"
+#line 4571 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -4592,7 +4583,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4596 "configure"
+#line 4587 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 EOF
@@ -4608,7 +4599,7 @@ fi
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4612 "configure"
+#line 4603 "configure"
 #include "confdefs.h"
 #include <strings.h>
 EOF
@@ -4628,17 +4619,17 @@ for ac_hdr in stdint.h getopt.h strings.h inttypes.h sys/int_types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4632: checking for $ac_hdr" >&5
+echo "configure:4623: 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 4637 "configure"
+#line 4628 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4633: \"$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*
@@ -4668,17 +4659,17 @@ for ac_hdr in sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4672: checking for $ac_hdr" >&5
+echo "configure:4663: 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 4677 "configure"
+#line 4668 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4673: \"$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*
@@ -4708,17 +4699,17 @@ for ac_hdr in dlfcn.h image.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4712: checking for $ac_hdr" >&5
+echo "configure:4703: 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 4717 "configure"
+#line 4708 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4713: \"$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*
@@ -4748,17 +4739,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4752: checking for $ac_hdr" >&5
+echo "configure:4743: 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 4757 "configure"
+#line 4748 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4753: \"$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*
@@ -4788,17 +4779,17 @@ for ac_hdr in machine/param.h sys/shm.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4792: checking for $ac_hdr" >&5
+echo "configure:4783: 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 4797 "configure"
+#line 4788 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4793: \"$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*
@@ -4828,17 +4819,17 @@ for ac_hdr in linux/version.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4832: checking for $ac_hdr" >&5
+echo "configure:4823: 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 4837 "configure"
+#line 4828 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4833: \"$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*
@@ -4866,12 +4857,12 @@ done
 
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4870: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4861: 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 4875 "configure"
+#line 4866 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -4880,7 +4871,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:4884: \"$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_header_time=yes
 else
@@ -4902,7 +4893,7 @@ fi
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4906 "configure"
+#line 4897 "configure"
 #include "confdefs.h"
 #include <time.h>
 EOF
@@ -4920,7 +4911,7 @@ rm -f conftest*
 
 
 cat > conftest.$ac_ext <<EOF
-#line 4924 "configure"
+#line 4915 "configure"
 #include "confdefs.h"
 #include <sys/time.h>
 EOF
@@ -4941,17 +4932,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4945: checking for $ac_hdr" >&5
+echo "configure:4936: 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 4950 "configure"
+#line 4941 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4946: \"$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*
@@ -4992,17 +4983,17 @@ then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4996: checking for $ac_hdr" >&5
+echo "configure:4987: 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 5001 "configure"
+#line 4992 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4997: \"$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*
@@ -5024,7 +5015,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
     cat > conftest.$ac_ext <<EOF
-#line 5028 "configure"
+#line 5019 "configure"
 #include "confdefs.h"
 #include <X11/extensions/dpms.h>
 EOF
@@ -5050,20 +5041,20 @@ done
 fi
 
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:5054: checking for ntohl in sys/param.h" >&5
+echo "configure:5045: 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 5060 "configure"
+#line 5051 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 int main() {
 void foo() { int meuh; ntohl(meuh); }
 ; return 0; }
 EOF
-if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_ntohl_sys_param_h=yes
 else
@@ -5084,20 +5075,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:5088: checking if \$CC accepts -finline-limit" >&5
+echo "configure:5079: 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 5094 "configure"
+#line 5085 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline_limit=yes
 else
@@ -5115,20 +5106,20 @@ if test "x${ac_cv_c_inline_limit}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
-echo "configure:5119: checking if \$CC accepts -Wall -Winline" >&5
+echo "configure:5110: 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="-Wall -Winline ${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5125 "configure"
+#line 5116 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_Wall_Winline=yes
 else
@@ -5145,20 +5136,20 @@ if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
     save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
 else
     echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
-echo "configure:5149: checking if \$CC accepts -wall -winline" >&5
+echo "configure:5140: 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="-wall -winline ${save_CFLAGS}"
          cat > conftest.$ac_ext <<EOF
-#line 5155 "configure"
+#line 5146 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_wall_winline=yes
 else
@@ -5177,20 +5168,20 @@ echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
 fi
 
 echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
-echo "configure:5181: checking if \$CC accepts -pipe" >&5
+echo "configure:5172: checking if \$CC accepts -pipe" >&5
 if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -pipe"
      cat > conftest.$ac_ext <<EOF
-#line 5187 "configure"
+#line 5178 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_pipe=yes
 else
@@ -5208,20 +5199,20 @@ if test "x${ac_cv_c_pipe}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
-echo "configure:5212: checking if \$CC accepts -O3" >&5
+echo "configure:5203: checking if \$CC accepts -O3" >&5
 if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS} -O3"
      cat > conftest.$ac_ext <<EOF
-#line 5218 "configure"
+#line 5209 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o3=yes
 else
@@ -5238,20 +5229,20 @@ if test "x${ac_cv_c_o3}" != "xno"; then
     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
 else
     echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
-echo "configure:5242: checking if \$CC accepts -O2" >&5
+echo "configure:5233: 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 5248 "configure"
+#line 5239 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o2=yes
 else
@@ -5268,20 +5259,20 @@ echo "$ac_t""$ac_cv_c_o2" 1>&6
         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
     else
         echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
-echo "configure:5272: checking if \$CC accepts -O" >&5
+echo "configure:5263: 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 5278 "configure"
+#line 5269 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_o=yes
 else
@@ -5301,20 +5292,20 @@ echo "$ac_t""$ac_cv_c_o" 1>&6
 fi
 
 echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
-echo "configure:5305: checking if \$CC accepts -ffast-math" >&5
+echo "configure:5296: 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 5311 "configure"
+#line 5302 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_fast_math=yes
 else
@@ -5332,20 +5323,20 @@ if test "x${ac_cv_c_fast_math}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
-echo "configure:5336: checking if \$CC accepts -funroll-loops" >&5
+echo "configure:5327: 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 5342 "configure"
+#line 5333 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_unroll_loops=yes
 else
@@ -5363,20 +5354,20 @@ if test "x${ac_cv_c_unroll_loops}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
-echo "configure:5367: checking if \$CC accepts -fomit-frame-pointer" >&5
+echo "configure:5358: 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 5373 "configure"
+#line 5364 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_omit_frame_pointer=yes
 else
@@ -5396,20 +5387,20 @@ if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
-echo "configure:5400: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
+echo "configure:5391: 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 5406 "configure"
+#line 5397 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_darwin=yes
 else
@@ -5427,20 +5418,20 @@ if test "x${ac_cv_ld_darwin}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:5431: checking if \$CC accepts -shared" >&5
+echo "configure:5422: 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 5437 "configure"
+#line 5428 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_ld_plugins=yes
 else
@@ -5458,13 +5449,13 @@ if test "x${ac_cv_ld_plugins}" != "xno"; then
 fi
         
 echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
-echo "configure:5462: checking for variadic cpp macros" >&5
+echo "configure:5453: checking for variadic cpp macros" >&5
 if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   CFLAGS="${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5468 "configure"
+#line 5459 "configure"
 #include "confdefs.h"
 #include <stdio.h>
           #define a(b,c...) printf(b,##c)
@@ -5472,7 +5463,7 @@ int main() {
 a("foo");a("%s","bar");a("%s%s","baz","quux");
 ; return 0; }
 EOF
-if { (eval echo configure:5476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cpp_variadic_macros=yes
 else
@@ -5493,7 +5484,7 @@ EOF
 fi
 
 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:5497: checking __attribute__ ((aligned ())) support" >&5
+echo "configure:5488: 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
@@ -5501,14 +5492,14 @@ else
         CFLAGS="${save_CFLAGS} -Werror"
     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
         cat > conftest.$ac_ext <<EOF
-#line 5505 "configure"
+#line 5496 "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:5512: \"$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_attribute_aligned="${ac_cv_c_attr_align_try}"
 else
@@ -5547,20 +5538,20 @@ SSE_MODULES="imdctsse downmixsse"
 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
 
 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:5551: checking if \$CC groks MMX inline assembly" >&5
+echo "configure:5542: 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
   CFLAGS="${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5557 "configure"
+#line 5548 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmx_inline=yes
 else
@@ -5578,20 +5569,20 @@ if test "x${ac_cv_mmx_inline}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
-echo "configure:5582: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:5573: 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
   CFLAGS="${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5588 "configure"
+#line 5579 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mmxext_inline=yes
 else
@@ -5609,20 +5600,20 @@ if test "x${ac_cv_mmxext_inline}" != "xno"; then
 fi
 
 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
-echo "configure:5613: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:5604: 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
   CFLAGS="${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5619 "configure"
+#line 5610 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_3dnow_inline=yes
 else
@@ -5644,20 +5635,20 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5648: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:5639: 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
   CFLAGS="${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5654 "configure"
+#line 5645 "configure"
 #include "confdefs.h"
 
 int main() {
 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
 ; return 0; }
 EOF
-if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_sse_inline=yes
 else
@@ -5682,20 +5673,20 @@ fi
 # 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:5686: checking if \$CC groks AltiVec inline assembly" >&5
+echo "configure:5677: 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
   CFLAGS="${save_CFLAGS}"
      cat > conftest.$ac_ext <<EOF
-#line 5692 "configure"
+#line 5683 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline=yes
 else
@@ -5704,14 +5695,14 @@ else
   rm -rf conftest*
   CFLAGS="${save_CFLAGS} -Wa,-m7400"
           cat > conftest.$ac_ext <<EOF
-#line 5708 "configure"
+#line 5699 "configure"
 #include "confdefs.h"
 
 int main() {
 asm volatile("vperm 0,1,2,3");
 ; return 0; }
 EOF
-if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_altivec_inline="-Wa,-m7400"
 else
@@ -5742,21 +5733,21 @@ EOF
 fi
 
 echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6
-echo "configure:5746: checking if \$CC groks AltiVec C extensions" >&5
+echo "configure:5737: 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
   CFLAGS="${save_CFLAGS} -faltivec"
      # Darwin test
      cat > conftest.$ac_ext <<EOF
-#line 5753 "configure"
+#line 5744 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec=-faltivec
 else
@@ -5767,14 +5758,14 @@ else
         # Linux/PPC test
         CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
         cat > conftest.$ac_ext <<EOF
-#line 5771 "configure"
+#line 5762 "configure"
 #include "confdefs.h"
 
 int main() {
 vec_mtvscr((vector unsigned int)(0));
 ; return 0; }
 EOF
-if { (eval echo configure:5778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_altivec="-fvec"
 else
@@ -5804,20 +5795,20 @@ EOF
 fi
 
 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
-echo "configure:5808: checking if linker needs -framework vecLib" >&5
+echo "configure:5799: 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
   LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
      cat > conftest.$ac_ext <<EOF
-#line 5814 "configure"
+#line 5805 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_ld_altivec=yes
 else
@@ -5949,17 +5940,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5953: checking for $ac_hdr" >&5
+echo "configure:5944: 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 5958 "configure"
+#line 5949 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5954: \"$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*
@@ -5990,7 +5981,7 @@ done
 
     else
       echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
-echo "configure:5994: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
+echo "configure:5985: 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
@@ -6016,7 +6007,7 @@ echo "configure:5994: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
   ;;
   *)
     echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
-echo "configure:6020: checking for dvdcss headers in ${with_dvdcss}" >&5
+echo "configure:6011: checking for dvdcss headers in ${with_dvdcss}" >&5
     if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
     then
             echo "$ac_t""yes" 1>&6
@@ -6058,17 +6049,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6062: checking for $ac_hdr" >&5
+echo "configure:6053: 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 6067 "configure"
+#line 6058 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6063: \"$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*
@@ -6090,14 +6081,14 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
      cat > conftest.$ac_ext <<EOF
-#line 6094 "configure"
+#line 6085 "configure"
 #include "confdefs.h"
 #include <dvdread/dvd_reader.h>
 int main() {
 void foo() { int i=DVD_VIDEO_LB_LEN; }
 ; return 0; }
 EOF
-if { (eval echo configure:6101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
           PLUGINS="${PLUGINS} dvdread"
@@ -6129,12 +6120,93 @@ if test "x${enable_dvdread}" != "x"
       fi
     fi
   
+fi
+done
+
+  CPPFLAGS="$save_CPPFLAGS"
+fi
+
+# Check whether --enable-dvdplay or --disable-dvdplay was given.
+if test "${enable_dvdplay+set}" = set; then
+  enableval="$enable_dvdplay"
+  :
+fi
+
+if test "x$enable_dvdplay" != "xno"
+then
+  # Check whether --with-dvdplay or --without-dvdplay was given.
+if test "${with_dvdplay+set}" = set; then
+  withval="$with_dvdplay"
+  :
+fi
+
+  if test "x$with_dvdplay" = x
+  then
+    test_LDFLAGS=""
+    test_CFLAGS=""
+  else
+    test_LDFLAGS="-L${with_dvdplay}/lib"
+    test_CFLAGS="-I${with_dvdplay}/include"
+  fi
+  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
+  for ac_hdr in dvdplay/dvdplay.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6157: 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 6162 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6167: \"$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} dvdplay"
+      dvdplay_LDFLAGS="${dvdplay_LDFLAGS} ${test_LDFLAGS} -ldvdplay -ldvdread"
+      dvdplay_CFLAGS="${dvdplay_CFLAGS} ${test_CFLAGS}"
+    
+else
+  echo "$ac_t""no" 1>&6
+if test "x$enable_dvdplay" != x
+    then
+      if test "x$with_dvdplay" != x
+      then
+        { echo "configure: error: Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include" 1>&2; exit 1; }
+      else
+        { echo "configure: error: Cannot find dvdplay/dvdplay.h" 1>&2; exit 1; }
+      fi
+    fi
+  
 fi
 done
 
   CPPFLAGS="${save_CPPFLAGS}"
 fi
 
+
 # Check whether --enable-dvbpsi or --disable-dvbpsi was given.
 if test "${enable_dvbpsi+set}" = set; then
   enableval="$enable_dvbpsi"
@@ -6163,17 +6235,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6167: checking for $ac_hdr" >&5
+echo "configure:6239: 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 6172 "configure"
+#line 6244 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6249: \"$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*
@@ -6202,7 +6274,7 @@ done
 
     else
       echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
-echo "configure:6206: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
+echo "configure:6278: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
       real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
       if test "x${real_dvbpsi_tree}" = "x"
       then
@@ -6225,7 +6297,7 @@ echo "configure:6206: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
       ;;
   *)
     echo $ac_n "checking for dvbpsi headers in ${with_dvbpsi}""... $ac_c" 1>&6
-echo "configure:6229: checking for dvbpsi headers in ${with_dvbpsi}" >&5
+echo "configure:6301: checking for dvbpsi headers in ${with_dvbpsi}" >&5
     if test "x${with_dvbpsi}" = "x"
     then
       test_LDFLAGS=""
@@ -6237,17 +6309,17 @@ echo "configure:6229: checking for dvbpsi headers in ${with_dvbpsi}" >&5
     CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
     ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
-echo "configure:6241: checking for dvbpsi/dr.h" >&5
+echo "configure:6313: checking for dvbpsi/dr.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6246 "configure"
+#line 6318 "configure"
 #include "confdefs.h"
 #include <dvbpsi/dr.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6323: \"$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*
@@ -6293,7 +6365,7 @@ fi
 if test "x${enable_vcd}" != "xno"
 then
   cat > conftest.$ac_ext <<EOF
-#line 6297 "configure"
+#line 6369 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -6308,7 +6380,7 @@ rm -f conftest*
 
   
   cat > conftest.$ac_ext <<EOF
-#line 6312 "configure"
+#line 6384 "configure"
 #include "confdefs.h"
 #include <sys/cdio.h>
 EOF
@@ -6351,12 +6423,12 @@ fi
 if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
 then
   echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
-echo "configure:6355: checking for inet_pton" >&5
+echo "configure:6427: 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 6360 "configure"
+#line 6432 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char inet_pton(); below.  */
@@ -6379,7 +6451,7 @@ inet_pton();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6455: \"$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
@@ -6398,7 +6470,7 @@ else
   echo "$ac_t""no" 1>&6
 
     echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
-echo "configure:6402: checking for inet_pton in -lresolv" >&5
+echo "configure:6474: checking for inet_pton in -lresolv" >&5
 ac_lib_var=`echo resolv'_'inet_pton | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6406,7 +6478,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6410 "configure"
+#line 6482 "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
@@ -6417,7 +6489,7 @@ int main() {
 inet_pton()
 ; return 0; }
 EOF
-if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6493: \"$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
@@ -6445,9 +6517,9 @@ fi
 if test "x${SYS}" = "xmingw32"
 then
   echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
-echo "configure:6449: checking for getaddrinfo in ws2tcpip.h" >&5
+echo "configure:6521: checking for getaddrinfo in ws2tcpip.h" >&5
   cat > conftest.$ac_ext <<EOF
-#line 6451 "configure"
+#line 6523 "configure"
 #include "confdefs.h"
 #include <ws2tcpip.h>
 EOF
@@ -6518,7 +6590,7 @@ fi
       { echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
     fi
         echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
-echo "configure:6522: checking for mad.h in ${real_mad_tree}/libmad" >&5
+echo "configure:6594: checking for mad.h in ${real_mad_tree}/libmad" >&5
     if test -f ${real_mad_tree}/libmad/mad.h
     then
       echo "$ac_t""yes" 1>&6
@@ -6526,7 +6598,7 @@ echo "configure:6522: checking for mad.h in ${real_mad_tree}/libmad" >&5
       mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
       LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6530: checking for mad_bit_init in -lmad" >&5
+echo "configure:6602: 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
@@ -6534,7 +6606,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmad  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6538 "configure"
+#line 6610 "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
@@ -6545,7 +6617,7 @@ int main() {
 mad_bit_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6621: \"$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
@@ -6582,17 +6654,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6586: checking for $ac_hdr" >&5
+echo "configure:6658: 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 6591 "configure"
+#line 6663 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6668: \"$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*
@@ -6620,7 +6692,7 @@ fi
 done
 
     echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6624: checking for mad_bit_init in -lmad" >&5
+echo "configure:6696: 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
@@ -6628,7 +6700,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmad  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6632 "configure"
+#line 6704 "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
@@ -6639,7 +6711,7 @@ int main() {
 mad_bit_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6715: \"$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
@@ -6696,7 +6768,7 @@ fi
   if test "x${with_ffmpeg_tree}" != "x"
   then
     echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
-echo "configure:6700: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
+echo "configure:6772: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
     real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
     if test "x${real_ffmpeg_tree}" = x
     then
@@ -6717,7 +6789,7 @@ echo "configure:6700: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
     CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
     LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
     echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
-echo "configure:6721: checking for avcodec_init in -lavcodec" >&5
+echo "configure:6793: checking for avcodec_init in -lavcodec" >&5
 ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6725,7 +6797,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lavcodec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6729 "configure"
+#line 6801 "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
@@ -6736,7 +6808,7 @@ int main() {
 avcodec_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6812: \"$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
@@ -6774,17 +6846,17 @@ if test "x${enable_mp4}" = "xyes"
 then
     ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
-echo "configure:6778: checking for zlib.h" >&5
+echo "configure:6850: checking for zlib.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 6783 "configure"
+#line 6855 "configure"
 #include "confdefs.h"
 #include <zlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6860: \"$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*
@@ -6801,7 +6873,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for inflateEnd in -lz""... $ac_c" 1>&6
-echo "configure:6805: checking for inflateEnd in -lz" >&5
+echo "configure:6877: checking for inflateEnd in -lz" >&5
 ac_lib_var=`echo z'_'inflateEnd | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6809,7 +6881,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6813 "configure"
+#line 6885 "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
@@ -6820,7 +6892,7 @@ int main() {
 inflateEnd()
 ; return 0; }
 EOF
-if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6896: \"$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
@@ -6877,7 +6949,7 @@ fi
       { echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
     fi
         echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
-echo "configure:6881: checking for a52.h in ${real_a52_tree}/include" >&5
+echo "configure:6953: checking for a52.h in ${real_a52_tree}/include" >&5
     if test -f ${real_a52_tree}/include/a52.h
     then
       echo "$ac_t""yes" 1>&6
@@ -6885,7 +6957,7 @@ echo "configure:6881: checking for a52.h in ${real_a52_tree}/include" >&5
       a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
       LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
       echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
-echo "configure:6889: checking for a52_free in -la52" >&5
+echo "configure:6961: checking for a52_free in -la52" >&5
 ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6893,7 +6965,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-la52 -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6897 "configure"
+#line 6969 "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
@@ -6904,7 +6976,7 @@ int main() {
 a52_free()
 ; return 0; }
 EOF
-if { (eval echo configure:6908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6980: \"$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
@@ -6945,17 +7017,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6949: checking for $ac_hdr" >&5
+echo "configure:7021: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6954 "configure"
+#line 7026 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7031: \"$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*
@@ -6977,7 +7049,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 EOF
  
       echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
-echo "configure:6981: checking for a52_free in -la52" >&5
+echo "configure:7053: checking for a52_free in -la52" >&5
 ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6985,7 +7057,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-la52 -lm $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6989 "configure"
+#line 7061 "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
@@ -6996,7 +7068,7 @@ int main() {
 a52_free()
 ; return 0; }
 EOF
-if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7072: \"$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
@@ -7052,17 +7124,17 @@ then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7056: checking for $ac_hdr" >&5
+echo "configure:7128: 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 7061 "configure"
+#line 7133 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7138: \"$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*
@@ -7114,17 +7186,17 @@ if test "x${enable_x11}" != "xno" &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7118: checking for $ac_hdr" >&5
+echo "configure:7190: 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 7123 "configure"
+#line 7195 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7200: \"$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*
@@ -7170,17 +7242,17 @@ if test "x${enable_xvideo}" != "xno" &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7174: checking for $ac_hdr" >&5
+echo "configure:7246: 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 7179 "configure"
+#line 7251 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7203,7 +7275,7 @@ EOF
  
     CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
     echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
-echo "configure:7207: checking for XvPutImage in -lXv_pic" >&5
+echo "configure:7279: checking for XvPutImage in -lXv_pic" >&5
 ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7211,7 +7283,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXv_pic  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7215 "configure"
+#line 7287 "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
@@ -7222,7 +7294,7 @@ int main() {
 XvPutImage()
 ; return 0; }
 EOF
-if { (eval echo configure:7226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7298: \"$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
@@ -7244,7 +7316,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for XvPutImage in -lXv""... $ac_c" 1>&6
-echo "configure:7248: checking for XvPutImage in -lXv" >&5
+echo "configure:7320: checking for XvPutImage in -lXv" >&5
 ac_lib_var=`echo Xv'_'XvPutImage | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7252,7 +7324,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7256 "configure"
+#line 7328 "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
@@ -7263,7 +7335,7 @@ int main() {
 XvPutImage()
 ; return 0; }
 EOF
-if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7339: \"$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
@@ -7322,7 +7394,7 @@ 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:7326: checking for $ac_word" >&5
+echo "configure:7398: 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
@@ -7362,7 +7434,7 @@ fi
     # 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:7366: checking for $ac_word" >&5
+echo "configure:7438: 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
@@ -7403,7 +7475,7 @@ fi
     # 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:7407: checking for $ac_word" >&5
+echo "configure:7479: 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
@@ -7448,17 +7520,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7452: checking for $ac_hdr" >&5
+echo "configure:7524: 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 7457 "configure"
+#line 7529 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7534: \"$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*
@@ -7528,17 +7600,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7532: checking for $ac_hdr" >&5
+echo "configure:7604: 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 7537 "configure"
+#line 7609 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7614: \"$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*
@@ -7567,7 +7639,7 @@ done
 
     else
       echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
-echo "configure:7571: checking for directX headers in ${with_directx}" >&5
+echo "configure:7643: checking for directX headers in ${with_directx}" >&5
       if test -f ${with_directx}/ddraw.h
       then
         PLUGINS="${PLUGINS} directx"
@@ -7594,17 +7666,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7598: checking for $ac_hdr" >&5
+echo "configure:7670: 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 7603 "configure"
+#line 7675 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7699,17 +7771,17 @@ 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:7703: checking for aalib.h" >&5
+echo "configure:7775: 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 7708 "configure"
+#line 7780 "configure"
 #include "confdefs.h"
 #include <aalib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7785: \"$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*
@@ -7760,17 +7832,17 @@ then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7764: checking for $ac_hdr" >&5
+echo "configure:7836: 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 7769 "configure"
+#line 7841 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7846: \"$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*
@@ -7793,7 +7865,7 @@ EOF
  
     PLUGINS="${PLUGINS} dsp"
     echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
-echo "configure:7797: checking for main in -lossaudio" >&5
+echo "configure:7869: 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
@@ -7801,14 +7873,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lossaudio  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7805 "configure"
+#line 7877 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7884: \"$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
@@ -7844,7 +7916,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:7848: checking for $ac_word" >&5
+echo "configure:7920: 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
@@ -7895,7 +7967,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:7899: checking for $ac_word" >&5
+echo "configure:7971: 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
@@ -7945,17 +8017,17 @@ if test "${enable_alsa+set}" = set; then
    then
      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
-echo "configure:7949: checking for alsa/asoundlib.h" >&5
+echo "configure:8021: 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 7954 "configure"
+#line 8026 "configure"
 #include "confdefs.h"
 #include <alsa/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8031: \"$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*
@@ -7972,7 +8044,7 @@ 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:7976: checking for main in -lasound" >&5
+echo "configure:8048: 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
@@ -7980,14 +8052,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7984 "configure"
+#line 8056 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8063: \"$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
@@ -8064,7 +8136,7 @@ fi
   # Extract the first word of "gtk12-config", so it can be a program name with args.
 set dummy gtk12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8068: checking for $ac_word" >&5
+echo "configure:8140: 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
@@ -8103,7 +8175,7 @@ fi
     # 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:8107: checking for $ac_word" >&5
+echo "configure:8179: 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
@@ -8152,17 +8224,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8156: checking for $ac_hdr" >&5
+echo "configure:8228: 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 8161 "configure"
+#line 8233 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8238: \"$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*
@@ -8222,7 +8294,7 @@ fi
   # Extract the first word of "gtk12-config", so it can be a program name with args.
 set dummy gtk12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8226: checking for $ac_word" >&5
+echo "configure:8298: 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
@@ -8261,7 +8333,7 @@ fi
     # 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:8265: checking for $ac_word" >&5
+echo "configure:8337: 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
@@ -8310,17 +8382,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8314: checking for $ac_hdr" >&5
+echo "configure:8386: 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 8319 "configure"
+#line 8391 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8396: \"$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*
@@ -8365,7 +8437,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:8369: checking for $ac_word" >&5
+echo "configure:8441: 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
@@ -8409,17 +8481,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8413: checking for $ac_hdr" >&5
+echo "configure:8485: 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 8418 "configure"
+#line 8490 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8495: \"$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*
@@ -8506,17 +8578,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8510: checking for $ac_hdr" >&5
+echo "configure:8582: 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 8515 "configure"
+#line 8587 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8592: \"$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*
@@ -8559,17 +8631,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8563: checking for $ac_hdr" >&5
+echo "configure:8635: 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 8568 "configure"
+#line 8640 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8645: \"$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*
@@ -8640,17 +8712,17 @@ if test "x${enable_xosd}" = "xyes"
 then
   ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
-echo "configure:8644: checking for xosd.h" >&5
+echo "configure:8716: checking for xosd.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8649 "configure"
+#line 8721 "configure"
 #include "confdefs.h"
 #include <xosd.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8726: \"$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*
@@ -8689,17 +8761,17 @@ if test "x${enable_lirc}" = "xyes"
 then
   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
-echo "configure:8693: checking for lirc/lirc_client.h" >&5
+echo "configure:8765: 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 8698 "configure"
+#line 8770 "configure"
 #include "confdefs.h"
 #include <lirc/lirc_client.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8775: \"$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*
@@ -8716,7 +8788,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
-echo "configure:8720: checking for lirc_init in -llirc_client" >&5
+echo "configure:8792: 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
@@ -8724,7 +8796,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8728 "configure"
+#line 8800 "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
@@ -8735,7 +8807,7 @@ int main() {
 lirc_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8811: \"$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
@@ -8790,7 +8862,7 @@ fi
       ;;
     *)
                   echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:8794: checking whether the byte order is big-endian" >&5
+echo "configure:8866: 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
@@ -8872,7 +8944,7 @@ if test "${enable_pth+set}" = set; then
   enableval="$enable_pth"
    if test "x${enable_pth}" = "xyes"; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:8876: checking for pth_init in -lpth" >&5
+echo "configure:8948: 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
@@ -8880,7 +8952,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8884 "configure"
+#line 8956 "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
@@ -8891,7 +8963,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8967: \"$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
@@ -8919,7 +8991,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8923 "configure"
+#line 8995 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -8945,7 +9017,7 @@ if test "${enable_st+set}" = set; then
   enableval="$enable_st"
    if test "x${enable_st}" = "xyes"; then
     echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
-echo "configure:8949: checking for st_init in -lst" >&5
+echo "configure:9021: 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
@@ -8953,7 +9025,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lst  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8957 "configure"
+#line 9029 "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
@@ -8964,7 +9036,7 @@ int main() {
 st_init()
 ; return 0; }
 EOF
-if { (eval echo configure:8968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9040: \"$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
@@ -8992,7 +9064,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 8996 "configure"
+#line 9068 "configure"
 #include "confdefs.h"
 #include <st.h>
 EOF
@@ -9028,7 +9100,7 @@ then
   # Extract the first word of "mozilla-config", so it can be a program name with args.
 set dummy mozilla-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:9032: checking for $ac_word" >&5
+echo "configure:9104: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MOZILLA_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9121,7 +9193,9 @@ CFLAGS="${save_CFLAGS}"
 LDFLAGS="${save_LDFLAGS}"
 
 libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
-for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} `eval echo '$'{${i}_LDFLAGS}`" ; done
+for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} @libdir@/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
+
+
 
 
 
@@ -9448,6 +9522,7 @@ s%@arts_CFLAGS@%$arts_CFLAGS%g
 s%@chroma_i420_yuy2_mmx_CFLAGS@%$chroma_i420_yuy2_mmx_CFLAGS%g
 s%@dvd_CFLAGS@%$dvd_CFLAGS%g
 s%@dvdread_CFLAGS@%$dvdread_CFLAGS%g
+s%@dvdplay_CFLAGS@%$dvdplay_CFLAGS%g
 s%@mpeg_ts_dvbpsi_CFLAGS@%$mpeg_ts_dvbpsi_CFLAGS%g
 s%@directx_CFLAGS@%$directx_CFLAGS%g
 s%@esd_CFLAGS@%$esd_CFLAGS%g
@@ -9480,6 +9555,7 @@ s%@directx_LDFLAGS@%$directx_LDFLAGS%g
 s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
 s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
 s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
+s%@dvdplay_LDFLAGS@%$dvdplay_LDFLAGS%g
 s%@mpeg_ts_dvbpsi_LDFLAGS@%$mpeg_ts_dvbpsi_LDFLAGS%g
 s%@esd_LDFLAGS@%$esd_LDFLAGS%g
 s%@familiar_LDFLAGS@%$familiar_LDFLAGS%g
index 48f8041a2ea046b6275ed20761c262d3053fa097..918ae3aebf5410dfd60b0bbea10d7a17085e9e8a 100644 (file)
@@ -716,9 +716,46 @@ then
       fi
     fi
   ])
+  CPPFLAGS="$save_CPPFLAGS"
+fi
+
+dnl
+dnl dvdplay module: check for libdvdplay
+dnl
+AC_ARG_ENABLE(dvdplay,
+[  --enable-dvdplay        dvdplay input module (default disabled)])
+if test "x$enable_dvdplay" != "xno"
+then
+  AC_ARG_WITH(dvdplay, 
+  [    --with-dvdplay=PATH   libdvdplay headers and libraries])
+  if test "x$with_dvdplay" = x
+  then
+    test_LDFLAGS=""
+    test_CFLAGS=""
+  else
+    test_LDFLAGS="-L${with_dvdplay}/lib"
+    test_CFLAGS="-I${with_dvdplay}/include"
+  fi
+  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
+  AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
+      PLUGINS="${PLUGINS} dvdplay"
+      dvdplay_LDFLAGS="${dvdplay_LDFLAGS} ${test_LDFLAGS} -ldvdplay -ldvdread"
+      dvdplay_CFLAGS="${dvdplay_CFLAGS} ${test_CFLAGS}"
+    ],[
+    if test "x$enable_dvdplay" != x
+    then
+      if test "x$with_dvdplay" != x
+      then
+        AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include])
+      else
+        AC_MSG_ERROR([Cannot find dvdplay/dvdplay.h])
+      fi
+    fi
+  ])
   CPPFLAGS="${save_CPPFLAGS}"
 fi
 
+
 dnl
 dnl  libdvbpsi ts demux
 dnl
@@ -1827,6 +1864,7 @@ AC_SUBST(arts_CFLAGS)
 AC_SUBST(chroma_i420_yuy2_mmx_CFLAGS)
 AC_SUBST(dvd_CFLAGS)
 AC_SUBST(dvdread_CFLAGS)
+AC_SUBST(dvdplay_CFLAGS)
 AC_SUBST(mpeg_ts_dvbpsi_CFLAGS)
 AC_SUBST(directx_CFLAGS)
 AC_SUBST(esd_CFLAGS)
@@ -1861,6 +1899,7 @@ AC_SUBST(directx_LDFLAGS)
 AC_SUBST(dsp_LDFLAGS)
 AC_SUBST(dvd_LDFLAGS)
 AC_SUBST(dvdread_LDFLAGS)
+AC_SUBST(dvdplay_LDFLAGS)
 AC_SUBST(mpeg_ts_dvbpsi_LDFLAGS)
 AC_SUBST(esd_LDFLAGS)
 AC_SUBST(familiar_LDFLAGS)
index 324b6a40b3085f26c918bf5627141c54b3c57ea0..afd6732fdcc216ec5f4febe1a2958eaf1565fd0a 100644 (file)
 /* Define if you have the <dvdcss/dvdcss.h> header file.  */
 #undef HAVE_DVDCSS_DVDCSS_H
 
+/* Define if you have the <dvdplay/dvdplay.h> header file.  */
+#undef HAVE_DVDPLAY_DVDPLAY_H
+
 /* Define if you have the <dvdread/dvd_reader.h> header file.  */
 #undef HAVE_DVDREAD_DVD_READER_H
 
index 94f9123a65d832467fa343f73fae56ec4fd954fa..977e8797f18d32cd4942536f2dc0f165cdec5a66 100644 (file)
@@ -3,8 +3,8 @@
 struct module_symbols_t
 {
     aout_fifo_t * (* __aout_CreateFifo_inner) ( vlc_object_t *, int, int, int, int, void * ) ;
-    char * (* __config_GetPsz_inner) (vlc_object_t *, const char *) ;
     char * (* config_GetHomeDir_inner) ( void ) ;
+    char * (* __config_GetPsz_inner) (vlc_object_t *, const char *) ;
     char * (* input_OffsetToTime_inner) ( input_thread_t *, char *, off_t ) ;
     char * (* mstrtime_inner) ( char *psz_buffer, mtime_t date ) ;
     const char * (* DecodeLanguage_inner) ( u16 ) ;
@@ -24,16 +24,7 @@ struct module_symbols_t
     int (* __config_LoadCmdLine_inner) ( vlc_object_t *, int *, char *[], vlc_bool_t ) ;
     int (* __config_LoadConfigFile_inner) ( vlc_object_t *, const char * ) ;
     int (* __config_SaveConfigFile_inner) ( vlc_object_t *, const char * ) ;
-    int (* __intf_Eject_inner) ( vlc_object_t *, const char * ) ;
-    int (* __network_ChannelCreate_inner) ( vlc_object_t * ) ;
-    int (* __network_ChannelJoin_inner) ( vlc_object_t *, int ) ;
-    int (* __vlc_cond_destroy_inner) ( char *, int, vlc_cond_t * ) ;
-    int (* __vlc_cond_init_inner) ( vlc_object_t *, vlc_cond_t * ) ;
-    int (* __vlc_mutex_destroy_inner) ( char *, int, vlc_mutex_t * ) ;
-    int (* __vlc_mutex_init_inner) ( vlc_object_t *, vlc_mutex_t * ) ;
-    int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), vlc_bool_t ) ;
-    int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
-    int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
+    intf_thread_t * (* __intf_Create_inner) ( vlc_object_t * ) ;
     int (* input_AccessInit_inner) ( input_thread_t * ) ;
     int (* input_AddInfo_inner) ( input_info_category_t *, char *, char *, ... ) ;
     int (* input_ChangeArea_inner) ( input_thread_t *, input_area_t * ) ;
@@ -44,10 +35,19 @@ struct module_symbols_t
     int (* input_SetProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ;
     int (* input_ToggleES_inner) ( input_thread_t *, es_descriptor_t *, vlc_bool_t ) ;
     int (* input_UnselectES_inner) ( input_thread_t *, es_descriptor_t * ) ;
+    int (* __intf_Eject_inner) ( vlc_object_t *, const char * ) ;
+    int (* __network_ChannelCreate_inner) ( vlc_object_t * ) ;
+    int (* __network_ChannelJoin_inner) ( vlc_object_t *, int ) ;
     int (* playlist_Add_inner) ( playlist_t *, const char *, int, int ) ;
     int (* playlist_Delete_inner) ( playlist_t *, int ) ;
+    int (* __vlc_cond_destroy_inner) ( char *, int, vlc_cond_t * ) ;
+    int (* __vlc_cond_init_inner) ( vlc_object_t *, vlc_cond_t * ) ;
+    int (* __vlc_mutex_destroy_inner) ( char *, int, vlc_mutex_t * ) ;
+    int (* __vlc_mutex_init_inner) ( vlc_object_t *, vlc_mutex_t * ) ;
+    int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), vlc_bool_t ) ;
+    int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
+    int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
     int (* vout_ChromaCmp_inner) ( u32, u32 ) ;
-    intf_thread_t * (* __intf_Create_inner) ( vlc_object_t * ) ;
     module_config_t * (* config_FindConfig_inner) ( vlc_object_t *, const char *psz_name ) ;
     module_t * (* __module_Need_inner) ( vlc_object_t *, int, const char *, void * ) ;
     msg_subscription_t* (* __msg_Subscribe_inner) ( vlc_object_t * ) ;
@@ -69,36 +69,17 @@ struct module_symbols_t
     u32 (* UnalignedShowBits_inner) ( bit_stream_t *, unsigned int ) ;
     vlc_bool_t (* NextDataPacket_inner) ( decoder_fifo_t *, data_packet_t ** ) ;
     vlc_error_t (* intf_RunThread_inner) ( intf_thread_t * ) ;
+    void (* aout_DestroyFifo_inner) ( aout_fifo_t *p_fifo ) ;
     void (* BitstreamNextDataPacket_inner) ( bit_stream_t * ) ;
-    void (* CurrentPTS_inner) ( bit_stream_t *, mtime_t *, mtime_t * ) ;
-    void (* DecoderError_inner) ( decoder_fifo_t * p_fifo ) ;
-    void (* InitBitstream_inner) ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) ;
-    void (* UnalignedRemoveBits_inner) ( bit_stream_t * ) ;
+    void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ;
     void (* __config_PutFloat_inner) (vlc_object_t *, const char *, float) ;
     void (* __config_PutInt_inner) (vlc_object_t *, const char *, int) ;
     void (* __config_PutPsz_inner) (vlc_object_t *, const char *, const char *) ;
-    void (* __input_Seek_inner) ( vlc_object_t *, off_t, int ) ;
-    void (* __input_SetStatus_inner) ( vlc_object_t *, int ) ;
-    void (* __input_Tell_inner) ( vlc_object_t *, stream_position_t * ) ;
-    void (* __msg_Dbg_inner) ( void *, const char *, ... ) ;
-    void (* __msg_Err_inner) ( void *, const char *, ... ) ;
-    void (* __msg_Generic_inner) ( vlc_object_t *, int, const char *, const char *, ... ) ;
-    void (* __msg_Info_inner) ( void *, const char *, ... ) ;
-    void (* __msg_Unsubscribe_inner) ( vlc_object_t *, msg_subscription_t * ) ;
-    void (* __msg_Warn_inner) ( void *, const char *, ... ) ;
-    void (* __vlc_dumpstructure_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_attach_inner) ( vlc_object_t *, vlc_object_t * ) ;
-    void (* __vlc_object_destroy_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_detach_all_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_detach_inner) ( vlc_object_t *, vlc_object_t * ) ;
-    void (* __vlc_object_release_inner) ( vlc_object_t * ) ;
-    void (* __vlc_object_yield_inner) ( vlc_object_t * ) ;
-    void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ;
-    void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ;
-    void (* aout_DestroyFifo_inner) ( aout_fifo_t *p_fifo ) ;
-    void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ;
     void (* config_SetCallbacks_inner) ( module_config_t *, module_config_t * ) ;
     void (* config_UnsetCallbacks_inner) ( module_config_t * ) ;
+    void (* CurrentPTS_inner) ( bit_stream_t *, mtime_t *, mtime_t * ) ;
+    void (* DecoderError_inner) ( decoder_fifo_t * p_fifo ) ;
+    void (* InitBitstream_inner) ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) ;
     void (* input_AccessEnd_inner) ( input_thread_t * ) ;
     void (* input_AccessReinit_inner) ( input_thread_t * ) ;
     void (* input_BuffersEnd_inner) ( input_thread_t *, input_buffers_t * ) ;
@@ -106,9 +87,9 @@ struct module_symbols_t
     void (* input_DecodePES_inner) ( decoder_fifo_t *, pes_packet_t * ) ;
     void (* input_DelArea_inner) ( input_thread_t *, input_area_t * ) ;
     void (* input_DelES_inner) ( input_thread_t *, es_descriptor_t * ) ;
-    void (* input_DelProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ;
-    void (* input_DeletePES_inner) ( input_buffers_t *, pes_packet_t * ) ;
     void (* input_DeletePacket_inner) ( input_buffers_t *, data_packet_t * ) ;
+    void (* input_DeletePES_inner) ( input_buffers_t *, pes_packet_t * ) ;
+    void (* input_DelProgram_inner) ( input_thread_t *, pgrm_descriptor_t * ) ;
     void (* input_DemuxPS_inner) ( input_thread_t *, data_packet_t * ) ;
     void (* input_DemuxTS_inner) ( input_thread_t *, data_packet_t *, void(*) ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t ) ) ;
     void (* input_DumpStream_inner) ( input_thread_t * ) ;
@@ -119,12 +100,33 @@ struct module_symbols_t
     void (* input_GatherPES_inner) ( input_thread_t *, data_packet_t *, es_descriptor_t *, vlc_bool_t, vlc_bool_t ) ;
     void (* input_ParsePES_inner) ( input_thread_t *, es_descriptor_t * ) ;
     void (* input_ReleaseBuffer_inner) ( input_buffers_t *, data_buffer_t * ) ;
+    void (* __input_Seek_inner) ( vlc_object_t *, off_t, int ) ;
+    void (* __input_SetStatus_inner) ( vlc_object_t *, int ) ;
+    void (* __input_Tell_inner) ( vlc_object_t *, stream_position_t * ) ;
     void (* intf_Destroy_inner) ( intf_thread_t * ) ;
     void (* intf_StopThread_inner) ( intf_thread_t * ) ;
     void (* module_Unneed_inner) ( module_t * ) ;
+    void (* __msg_Dbg_inner) ( void *, const char *, ... ) ;
+    void (* __msg_Err_inner) ( void *, const char *, ... ) ;
+    void (* __msg_Generic_inner) ( vlc_object_t *, int, const char *, const char *, ... ) ;
+    void (* __msg_Info_inner) ( void *, const char *, ... ) ;
+    void (* __msg_Unsubscribe_inner) ( vlc_object_t *, msg_subscription_t * ) ;
+    void (* __msg_Warn_inner) ( void *, const char *, ... ) ;
     void (* msleep_inner) ( mtime_t delay ) ;
     void (* mwait_inner) ( mtime_t date ) ;
     void (* playlist_Command_inner) ( playlist_t *, int, int ) ;
+    void (* UnalignedRemoveBits_inner) ( bit_stream_t * ) ;
+    void (* __vlc_dumpstructure_inner) ( vlc_object_t * ) ;
+    void (* __vlc_object_attach_inner) ( vlc_object_t *, vlc_object_t * ) ;
+    void * (* __vlc_object_create_inner) ( vlc_object_t *, int ) ;
+    void (* __vlc_object_destroy_inner) ( vlc_object_t * ) ;
+    void (* __vlc_object_detach_all_inner) ( vlc_object_t * ) ;
+    void (* __vlc_object_detach_inner) ( vlc_object_t *, vlc_object_t * ) ;
+    void * (* __vlc_object_find_inner) ( vlc_object_t *, int, int ) ;
+    void (* __vlc_object_release_inner) ( vlc_object_t * ) ;
+    void (* __vlc_object_yield_inner) ( vlc_object_t * ) ;
+    void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ;
+    void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ;
     void (* vout_AllocatePicture_inner) ( vout_thread_t *, picture_t *, int, int, u32 ) ;
     void (* vout_DatePicture_inner) ( vout_thread_t *, picture_t *, mtime_t ) ;
     void (* vout_DestroyPicture_inner) ( vout_thread_t *, picture_t * ) ;
@@ -135,26 +137,17 @@ struct module_symbols_t
     void (* vout_LinkPicture_inner) ( vout_thread_t *, picture_t * ) ;
     void (* vout_PlacePicture_inner) ( vout_thread_t *, int, int, int *, int *, int *, int * ) ;
     void (* vout_UnlinkPicture_inner) ( vout_thread_t *, picture_t * ) ;
-    void * (* __vlc_object_create_inner) ( vlc_object_t *, int ) ;
-    void * (* __vlc_object_find_inner) ( vlc_object_t *, int, int ) ;
     vout_thread_t * (* __vout_CreateThread_inner) ( vlc_object_t *, int, int, u32, int ) ;
 };
 
 #ifdef __PLUGIN__
-#   define BitstreamNextDataPacket p_symbols->BitstreamNextDataPacket_inner
-#   define CurrentPTS p_symbols->CurrentPTS_inner
-#   define DecodeLanguage p_symbols->DecodeLanguage_inner
-#   define DecoderError p_symbols->DecoderError_inner
-#   define GetLang_1 p_symbols->GetLang_1_inner
-#   define GetLang_2B p_symbols->GetLang_2B_inner
-#   define GetLang_2T p_symbols->GetLang_2T_inner
-#   define InitBitstream p_symbols->InitBitstream_inner
-#   define NextDataPacket p_symbols->NextDataPacket_inner
-#   define UnalignedGetBits p_symbols->UnalignedGetBits_inner
-#   define UnalignedRemoveBits p_symbols->UnalignedRemoveBits_inner
-#   define UnalignedShowBits p_symbols->UnalignedShowBits_inner
 #   define __aout_CreateFifo p_symbols->__aout_CreateFifo_inner
+#   define aout_DestroyFifo p_symbols->aout_DestroyFifo_inner
+#   define BitstreamNextDataPacket p_symbols->BitstreamNextDataPacket_inner
+#   define config_Duplicate p_symbols->config_Duplicate_inner
+#   define config_FindConfig p_symbols->config_FindConfig_inner
 #   define __config_GetFloat p_symbols->__config_GetFloat_inner
+#   define config_GetHomeDir p_symbols->config_GetHomeDir_inner
 #   define __config_GetInt p_symbols->__config_GetInt_inner
 #   define __config_GetPsz p_symbols->__config_GetPsz_inner
 #   define __config_LoadCmdLine p_symbols->__config_LoadCmdLine_inner
@@ -163,46 +156,15 @@ struct module_symbols_t
 #   define __config_PutInt p_symbols->__config_PutInt_inner
 #   define __config_PutPsz p_symbols->__config_PutPsz_inner
 #   define __config_SaveConfigFile p_symbols->__config_SaveConfigFile_inner
-#   define __input_Seek p_symbols->__input_Seek_inner
-#   define __input_SetStatus p_symbols->__input_SetStatus_inner
-#   define __input_Tell p_symbols->__input_Tell_inner
-#   define __intf_Create p_symbols->__intf_Create_inner
-#   define __intf_Eject p_symbols->__intf_Eject_inner
-#   define __module_Need p_symbols->__module_Need_inner
-#   define __msg_Dbg p_symbols->__msg_Dbg_inner
-#   define __msg_Err p_symbols->__msg_Err_inner
-#   define __msg_Generic p_symbols->__msg_Generic_inner
-#   define __msg_Info p_symbols->__msg_Info_inner
-#   define __msg_Subscribe p_symbols->__msg_Subscribe_inner
-#   define __msg_Unsubscribe p_symbols->__msg_Unsubscribe_inner
-#   define __msg_Warn p_symbols->__msg_Warn_inner
-#   define __network_ChannelCreate p_symbols->__network_ChannelCreate_inner
-#   define __network_ChannelJoin p_symbols->__network_ChannelJoin_inner
-#   define __vlc_cond_destroy p_symbols->__vlc_cond_destroy_inner
-#   define __vlc_cond_init p_symbols->__vlc_cond_init_inner
-#   define __vlc_dumpstructure p_symbols->__vlc_dumpstructure_inner
-#   define __vlc_mutex_destroy p_symbols->__vlc_mutex_destroy_inner
-#   define __vlc_mutex_init p_symbols->__vlc_mutex_init_inner
-#   define __vlc_object_attach p_symbols->__vlc_object_attach_inner
-#   define __vlc_object_create p_symbols->__vlc_object_create_inner
-#   define __vlc_object_destroy p_symbols->__vlc_object_destroy_inner
-#   define __vlc_object_detach p_symbols->__vlc_object_detach_inner
-#   define __vlc_object_detach_all p_symbols->__vlc_object_detach_all_inner
-#   define __vlc_object_find p_symbols->__vlc_object_find_inner
-#   define __vlc_object_release p_symbols->__vlc_object_release_inner
-#   define __vlc_object_yield p_symbols->__vlc_object_yield_inner
-#   define __vlc_thread_create p_symbols->__vlc_thread_create_inner
-#   define __vlc_thread_join p_symbols->__vlc_thread_join_inner
-#   define __vlc_thread_ready p_symbols->__vlc_thread_ready_inner
-#   define __vlc_threads_end p_symbols->__vlc_threads_end_inner
-#   define __vlc_threads_init p_symbols->__vlc_threads_init_inner
-#   define __vout_CreateThread p_symbols->__vout_CreateThread_inner
-#   define aout_DestroyFifo p_symbols->aout_DestroyFifo_inner
-#   define config_Duplicate p_symbols->config_Duplicate_inner
-#   define config_FindConfig p_symbols->config_FindConfig_inner
-#   define config_GetHomeDir p_symbols->config_GetHomeDir_inner
 #   define config_SetCallbacks p_symbols->config_SetCallbacks_inner
 #   define config_UnsetCallbacks p_symbols->config_UnsetCallbacks_inner
+#   define CurrentPTS p_symbols->CurrentPTS_inner
+#   define DecodeLanguage p_symbols->DecodeLanguage_inner
+#   define DecoderError p_symbols->DecoderError_inner
+#   define GetLang_1 p_symbols->GetLang_1_inner
+#   define GetLang_2B p_symbols->GetLang_2B_inner
+#   define GetLang_2T p_symbols->GetLang_2T_inner
+#   define InitBitstream p_symbols->InitBitstream_inner
 #   define input_AccessEnd p_symbols->input_AccessEnd_inner
 #   define input_AccessInit p_symbols->input_AccessInit_inner
 #   define input_AccessReinit p_symbols->input_AccessReinit_inner
@@ -219,9 +181,9 @@ struct module_symbols_t
 #   define input_DecodePES p_symbols->input_DecodePES_inner
 #   define input_DelArea p_symbols->input_DelArea_inner
 #   define input_DelES p_symbols->input_DelES_inner
-#   define input_DelProgram p_symbols->input_DelProgram_inner
-#   define input_DeletePES p_symbols->input_DeletePES_inner
 #   define input_DeletePacket p_symbols->input_DeletePacket_inner
+#   define input_DeletePES p_symbols->input_DeletePES_inner
+#   define input_DelProgram p_symbols->input_DelProgram_inner
 #   define input_DemuxPS p_symbols->input_DemuxPS_inner
 #   define input_DemuxTS p_symbols->input_DemuxTS_inner
 #   define input_DumpStream p_symbols->input_DumpStream_inner
@@ -238,8 +200,8 @@ struct module_symbols_t
 #   define input_InfoCategory p_symbols->input_InfoCategory_inner
 #   define input_InitStream p_symbols->input_InitStream_inner
 #   define input_NewBuffer p_symbols->input_NewBuffer_inner
-#   define input_NewPES p_symbols->input_NewPES_inner
 #   define input_NewPacket p_symbols->input_NewPacket_inner
+#   define input_NewPES p_symbols->input_NewPES_inner
 #   define input_OffsetToTime p_symbols->input_OffsetToTime_inner
 #   define input_ParsePES p_symbols->input_ParsePES_inner
 #   define input_ParsePS p_symbols->input_ParsePS_inner
@@ -247,27 +209,65 @@ struct module_symbols_t
 #   define input_ReadPS p_symbols->input_ReadPS_inner
 #   define input_ReadTS p_symbols->input_ReadTS_inner
 #   define input_ReleaseBuffer p_symbols->input_ReleaseBuffer_inner
+#   define __input_Seek p_symbols->__input_Seek_inner
 #   define input_SelectES p_symbols->input_SelectES_inner
 #   define input_SetProgram p_symbols->input_SetProgram_inner
+#   define __input_SetStatus p_symbols->__input_SetStatus_inner
 #   define input_ShareBuffer p_symbols->input_ShareBuffer_inner
 #   define input_SplitBuffer p_symbols->input_SplitBuffer_inner
+#   define __input_Tell p_symbols->__input_Tell_inner
 #   define input_ToggleES p_symbols->input_ToggleES_inner
 #   define input_UnselectES p_symbols->input_UnselectES_inner
+#   define __intf_Create p_symbols->__intf_Create_inner
 #   define intf_Destroy p_symbols->intf_Destroy_inner
+#   define __intf_Eject p_symbols->__intf_Eject_inner
 #   define intf_RunThread p_symbols->intf_RunThread_inner
 #   define intf_StopThread p_symbols->intf_StopThread_inner
 #   define mdate p_symbols->mdate_inner
+#   define __module_Need p_symbols->__module_Need_inner
 #   define module_Unneed p_symbols->module_Unneed_inner
+#   define __msg_Dbg p_symbols->__msg_Dbg_inner
+#   define __msg_Err p_symbols->__msg_Err_inner
+#   define __msg_Generic p_symbols->__msg_Generic_inner
+#   define __msg_Info p_symbols->__msg_Info_inner
+#   define __msg_Subscribe p_symbols->__msg_Subscribe_inner
+#   define __msg_Unsubscribe p_symbols->__msg_Unsubscribe_inner
+#   define __msg_Warn p_symbols->__msg_Warn_inner
 #   define msleep p_symbols->msleep_inner
 #   define mstrtime p_symbols->mstrtime_inner
 #   define mwait p_symbols->mwait_inner
+#   define __network_ChannelCreate p_symbols->__network_ChannelCreate_inner
+#   define __network_ChannelJoin p_symbols->__network_ChannelJoin_inner
+#   define NextDataPacket p_symbols->NextDataPacket_inner
 #   define playlist_Add p_symbols->playlist_Add_inner
 #   define playlist_Command p_symbols->playlist_Command_inner
 #   define playlist_Delete p_symbols->playlist_Delete_inner
+#   define UnalignedGetBits p_symbols->UnalignedGetBits_inner
+#   define UnalignedRemoveBits p_symbols->UnalignedRemoveBits_inner
+#   define UnalignedShowBits p_symbols->UnalignedShowBits_inner
+#   define __vlc_cond_destroy p_symbols->__vlc_cond_destroy_inner
+#   define __vlc_cond_init p_symbols->__vlc_cond_init_inner
+#   define __vlc_dumpstructure p_symbols->__vlc_dumpstructure_inner
+#   define __vlc_mutex_destroy p_symbols->__vlc_mutex_destroy_inner
+#   define __vlc_mutex_init p_symbols->__vlc_mutex_init_inner
+#   define __vlc_object_attach p_symbols->__vlc_object_attach_inner
+#   define __vlc_object_create p_symbols->__vlc_object_create_inner
+#   define __vlc_object_destroy p_symbols->__vlc_object_destroy_inner
+#   define __vlc_object_detach_all p_symbols->__vlc_object_detach_all_inner
+#   define __vlc_object_detach p_symbols->__vlc_object_detach_inner
+#   define __vlc_object_find p_symbols->__vlc_object_find_inner
+#   define __vlc_object_release p_symbols->__vlc_object_release_inner
+#   define __vlc_object_yield p_symbols->__vlc_object_yield_inner
+#   define __vlc_thread_create p_symbols->__vlc_thread_create_inner
+#   define __vlc_thread_join p_symbols->__vlc_thread_join_inner
+#   define __vlc_thread_ready p_symbols->__vlc_thread_ready_inner
+#   define __vlc_threads_end p_symbols->__vlc_threads_end_inner
+#   define __vlc_threads_init p_symbols->__vlc_threads_init_inner
 #   define vout_AllocatePicture p_symbols->vout_AllocatePicture_inner
 #   define vout_ChromaCmp p_symbols->vout_ChromaCmp_inner
 #   define vout_CreatePicture p_symbols->vout_CreatePicture_inner
 #   define vout_CreateSubPicture p_symbols->vout_CreateSubPicture_inner
+#   define __vout_CreateThread p_symbols->__vout_CreateThread_inner
 #   define vout_DatePicture p_symbols->vout_DatePicture_inner
 #   define vout_DestroyPicture p_symbols->vout_DestroyPicture_inner
 #   define vout_DestroySubPicture p_symbols->vout_DestroySubPicture_inner
diff --git a/plugins/dvdplay/.cvsignore b/plugins/dvdplay/.cvsignore
new file mode 100644 (file)
index 0000000..435f39e
--- /dev/null
@@ -0,0 +1,4 @@
+.dep
+*.lo
+*.o.*
+*.lo.*
diff --git a/plugins/dvdplay/Makefile b/plugins/dvdplay/Makefile
new file mode 100644 (file)
index 0000000..2d87cf4
--- /dev/null
@@ -0,0 +1 @@
+dvdplay_SOURCES = dvd.c access.c demux.c intf.c es.c tools.c
diff --git a/plugins/dvdplay/access.c b/plugins/dvdplay/access.c
new file mode 100644 (file)
index 0000000..4e83983
--- /dev/null
@@ -0,0 +1,514 @@
+/*****************************************************************************
+ * access.c: access capabilities for dvdplay plugin.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: access.c,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <vlc/vlc.h>
+#include <vlc/input.h>
+
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
+
+#if defined( WIN32 )
+#   include <io.h>                                                 /* read() */
+#else
+#   include <sys/uio.h>                                      /* struct iovec */
+#endif
+
+#if defined( WIN32 )
+#   include "input_iovec.h"
+#endif
+
+#include "dvd.h"
+#include "es.h"
+#include "tools.h"
+#include "intf.h"
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+/* called from outside */
+static int    dvdplay_Open          ( input_thread_t * );
+static void   dvdplay_Close         ( input_thread_t * );
+static int    dvdplay_SetArea       ( input_thread_t *,
+                                      input_area_t * );
+static int    dvdplay_SetProgram    ( input_thread_t *,
+                                      pgrm_descriptor_t * );
+static int    dvdplay_Read          ( input_thread_t *,
+                                      byte_t *, size_t );
+static void   dvdplay_Seek          ( input_thread_t *, off_t );
+
+static void   pf_vmg_callback       ( void*, dvdplay_event_t );
+
+/* only from inside */
+
+static int dvdNewArea( input_thread_t *, input_area_t * );
+static int dvdNewPGC ( input_thread_t * );
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+void _M( access_getfunctions )( function_list_t * p_function_list )
+{
+#define access p_function_list->functions.access
+    access.pf_open             = dvdplay_Open;
+    access.pf_close            = dvdplay_Close;
+    access.pf_read             = dvdplay_Read;
+    access.pf_set_area         = dvdplay_SetArea;
+    access.pf_set_program      = dvdplay_SetProgram;
+    access.pf_seek             = dvdplay_Seek;
+#undef access
+}
+
+/*****************************************************************************
+ * dvdplay_Open: open libdvdplay
+ *****************************************************************************/
+static int dvdplay_Open( input_thread_t *p_input )
+{
+    char *                  psz_source;
+    dvd_data_t *            p_dvd;
+    input_area_t *          p_area;
+    int                     i_title_nr;
+    int                     i_title;
+    int                     i_chapter;
+    int                     i_angle;
+    int                     i;
+    
+    p_dvd = malloc( sizeof(dvd_data_t) );
+    if( p_dvd == NULL )
+    {
+        msg_Err( p_input, "dvdplay error: out of memory" );
+        return -1;
+    }
+
+    p_input->p_access_data = (void *)p_dvd;
+
+    /* command line */
+    if( ( psz_source = dvdplay_ParseCL( p_input, 
+                        &i_title, &i_chapter, &i_angle ) ) == NULL )
+    {
+        free( p_dvd );
+        return -1;
+    }
+
+    /* Open libdvdplay */
+    p_dvd->vmg = dvdplay_open( psz_source, pf_vmg_callback, (void*)p_input );
+
+    /* free allocated strings */
+    free( psz_source );
+
+    if( p_dvd->vmg == NULL )
+    {
+        msg_Err( p_input, "dvdplay error: can't open source" );
+        free( p_dvd );
+        return -1;
+    }
+
+    p_dvd->p_intf = NULL;
+
+    p_dvd->i_still_time = 0;
+    
+    /* set up input  */
+    p_input->i_mtu = 0;
+
+    /* Set stream and area data */
+    vlc_mutex_lock( &p_input->stream.stream_lock );
+
+    /* If we are here we can control the pace... */
+    p_input->stream.b_pace_control = 1;
+    /* seek is only allowed when we have size info */
+    p_input->stream.b_seekable = 0;
+    
+    /* Initialize ES structures */
+    input_InitStream( p_input, sizeof( stream_ps_data_t ) );
+
+    /* disc input method */
+    p_input->stream.i_method = INPUT_METHOD_DVD;
+
+    i_title_nr = dvdplay_title_nr( p_dvd->vmg );
+#define area p_input->stream.pp_areas
+
+    /* Area 0 for menu */
+    area[0]->i_plugin_data = 0;
+    
+    for( i = 1 ; i <= i_title_nr ; i++ )
+    {
+        input_AddArea( p_input );
+        
+        /* Titles id */
+        area[i]->i_id = i;
+
+        /* Number of chapters */
+        area[i]->i_part_nb = dvdplay_chapter_nr( p_dvd->vmg, i );
+
+        area[i]->i_plugin_data = 0;
+    }
+#undef area
+    msg_Dbg( p_input, "number of titles: %d", i_title_nr );
+
+    i_title = i_title <= i_title_nr ? i_title : 0;
+
+    p_area = p_input->stream.pp_areas[i_title];
+    p_area->i_part = i_chapter;
+    p_input->stream.p_selected_area = NULL;
+
+    /* set title, chapter, audio and subpic */
+    if( dvdplay_SetArea( p_input, p_area ) )
+    {
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+        return -1;
+    }
+    
+    if( i_angle <= p_input->stream.i_pgrm_number )
+    {
+        dvdplay_SetProgram( p_input,
+                            p_input->stream.pp_programs[i_angle - 1] );
+    }
+
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+    p_input->psz_demux = "dvdplay";
+
+    return 0;
+}
+
+/*****************************************************************************
+ * dvdplay_Close: close libdvdplay
+ *****************************************************************************/
+static void dvdplay_Close( input_thread_t *p_input )
+{
+    dvd_data_t *     p_dvd;
+
+    p_dvd = (dvd_data_t *)p_input->p_access_data;
+
+    /* close libdvdplay */
+    dvdplay_close( p_dvd->vmg );
+
+    free( p_dvd );
+    p_input->p_access_data = NULL;
+
+}
+
+/*****************************************************************************
+ * dvdplay_SetProgram: set dvd angle.
+ *****************************************************************************
+ * This is actually a hack to make angle change through vlc interface with
+ * no need for a specific button.
+ *****************************************************************************/
+static int dvdplay_SetProgram( input_thread_t *     p_input,
+                               pgrm_descriptor_t *  p_program )
+{
+    if( p_input->stream.p_selected_program != p_program )
+    {
+        dvd_data_t *    p_dvd;
+        int             i_angle;
+    
+        p_dvd = (dvd_data_t*)(p_input->p_access_data);
+        i_angle = p_program->i_number;
+
+        if( !dvdplay_angle( p_dvd->vmg, i_angle ) )
+        {
+            memcpy( p_program, p_input->stream.p_selected_program,
+                    sizeof(pgrm_descriptor_t) );
+            p_program->i_number = i_angle;
+            p_input->stream.p_selected_program = p_program;
+
+            msg_Dbg( p_input, "angle %d selected", i_angle );
+        }
+    }
+
+    return 0;
+}
+
+/*****************************************************************************
+ * dvdplay_SetArea: initialize input data for title x, chapter y.
+ * It should be called for each user navigation request.
+ *****************************************************************************
+ * Take care that i_title starts from 0 (vmg) and i_chapter start from 1.
+ * Note that you have to take the lock before entering here.
+ *****************************************************************************/
+static int dvdplay_SetArea( input_thread_t * p_input, input_area_t * p_area )
+{
+    dvd_data_t *    p_dvd;
+
+    p_dvd = (dvd_data_t*)p_input->p_access_data;
+
+    /*
+     * Title selection
+     */
+    if( p_area != p_input->stream.p_selected_area )
+    {
+        int i_chapter;
+        
+        /* Store selected chapter */
+        i_chapter = p_area->i_part;
+
+        dvdNewArea( p_input, p_area );
+        
+        dvdplay_start( p_dvd->vmg, p_area->i_id );
+
+        p_area->i_part = i_chapter;
+    } /* i_title >= 0 */
+    else
+    {
+        p_area = p_input->stream.p_selected_area;
+    }
+
+    /*
+     * Chapter selection
+     */
+
+    if( p_area->i_part != dvdplay_chapter_cur( p_dvd->vmg ) )
+    {
+        if( ( p_area->i_part > 0 ) &&
+            ( p_area->i_part <= p_area->i_part_nb ))
+        {
+            dvdplay_pg( p_dvd->vmg, p_area->i_part );
+        }
+        p_area->i_part = dvdplay_chapter_cur( p_dvd->vmg );
+    }
+
+    /* warn interface that something has changed */
+    p_area->i_tell =
+        LB2OFF( dvdplay_position( p_dvd->vmg ) ) - p_area->i_start;
+    p_input->stream.b_changed = 1;
+
+    return 0;
+}
+
+/*****************************************************************************
+ * dvdplay_Read: reads data packets.
+ *****************************************************************************
+ * Returns -1 in case of error, the number of bytes read if everything went
+ * well.
+ *****************************************************************************/
+static int dvdplay_Read( input_thread_t * p_input,
+                         byte_t * p_buffer, size_t i_count )
+{
+    dvd_data_t *    p_dvd;
+    off_t           i_read;
+    
+    p_dvd = (dvd_data_t *)p_input->p_access_data;
+
+    vlc_mutex_lock( &p_input->stream.stream_lock );
+
+    i_read = LB2OFF( dvdplay_read( p_dvd->vmg, p_buffer, OFF2LB( i_count ) ) );
+    
+    p_input->stream.p_selected_area->i_tell  =
+        LB2OFF( dvdplay_position( p_dvd->vmg ) ) -
+        p_input->stream.p_selected_area->i_start;
+
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+    
+    return i_read;
+}
+
+/*****************************************************************************
+ * dvdplay_Seek : Goes to a given position on the stream.
+ *****************************************************************************
+ * This one is used by the input and translate chronological position from
+ * input to logical position on the device.
+ * The lock should be taken before calling this function.
+ *****************************************************************************/
+static void dvdplay_Seek( input_thread_t * p_input, off_t i_off )
+{
+    dvd_data_t *     p_dvd;
+    
+    p_dvd = (dvd_data_t *)p_input->p_access_data;
+
+    vlc_mutex_lock( &p_input->stream.stream_lock );
+    
+    dvdplay_seek( p_dvd->vmg, OFF2LB( i_off ) );
+
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+
+    return;
+}
+
+
+/*****************************************************************************
+ * pf_vmg_callback: called by libdvdplay when some event happens
+ *****************************************************************************
+ * The stream lock has to be taken before entering here
+ *****************************************************************************/
+static void pf_vmg_callback( void* p_args, dvdplay_event_t event )
+{
+    input_thread_t *    p_input;
+    dvd_data_t *        p_dvd;
+    int                 i;
+
+    p_input = (input_thread_t*)p_args;
+    p_dvd   = (dvd_data_t*)p_input->p_access_data;
+    
+    switch( event )
+    {
+    case NEW_DOMAIN:
+        break;
+    case NEW_VTS:
+        break;
+    case NEW_FILE:
+
+        break;
+    case NEW_PGC:
+        if( ( i = dvdplay_title_cur( p_dvd->vmg ) ) != 
+                p_input->stream.p_selected_area->i_id )
+        {
+            /* the title number has changed: update area */
+            msg_Warn( p_input, "new title %d (%d)", i,
+                               p_input->stream.p_selected_area->i_id );
+            dvdNewArea( p_input,
+                        p_input->stream.pp_areas[i] );
+        }
+        else
+        {
+            /* new pgc in same title: reinit ES */
+            dvdNewPGC( p_input );
+            
+            p_input->stream.b_changed = 1;
+        }
+
+        break;
+    case NEW_PG:
+        /* update current chapter */
+        p_input->stream.p_selected_area->i_part =
+            dvdplay_chapter_cur( p_dvd->vmg );
+        break;
+    case NEW_CELL:
+        p_dvd->b_end_of_cell = 0;
+        break;
+    case END_OF_CELL:
+        p_dvd->b_end_of_cell = 1;
+        break;
+    case JUMP:
+        dvdplay_ES( p_input );
+        break;
+    case STILL_TIME:
+        /* we must pause only from demux
+         * when the data in cache has been decoded */
+        p_dvd->i_still_time = dvdplay_still_time( p_dvd->vmg );
+        msg_Dbg( p_input, "still time %d", p_dvd->i_still_time );
+        break;
+    case COMPLETE_VIDEO:
+        break;
+    case NEW_HIGHLIGHT:
+        
+        break;
+    default:
+        msg_Err( p_input, "unknown event from libdvdplay (%d)",
+                      event );
+    }
+
+    return;
+}
+
+static int dvdNewArea( input_thread_t * p_input, input_area_t * p_area )
+{
+    dvd_data_t *    p_dvd;
+    int             i_angle_nb, i_angle;
+    int             i;
+
+    p_dvd = (dvd_data_t*)p_input->p_access_data;
+
+    p_input->stream.p_selected_area = p_area;
+
+    /*
+     * One program for each angle
+     */
+    while( p_input->stream.i_pgrm_number )
+    {
+        input_DelProgram( p_input, p_input->stream.pp_programs[0] );
+    }
+
+    input_AddProgram( p_input, 1, sizeof( stream_ps_data_t ) );
+    p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
+
+    dvdplay_angle_info( p_dvd->vmg, &i_angle_nb, &i_angle );
+    for( i = 1 ; i < i_angle_nb ; i++ )
+    {
+        input_AddProgram( p_input, i+1, 0 );
+    }
+    
+    dvdplay_SetProgram( p_input,
+                       p_input->stream.pp_programs[i_angle-1] ); 
+
+    dvdNewPGC( p_input );
+
+    /* No PSM to read in DVD mode, we already have all information */
+    p_input->stream.p_selected_program->b_is_ok = 1;
+
+    return 0;
+}
+
+static int dvdNewPGC( input_thread_t * p_input )
+{
+    dvd_data_t *    p_dvd;
+//    int             i_audio_nr  = -1;
+//    int             i_audio     = -1;
+//    int             i_subp_nr   = -1;
+//    int             i_subp      = -1;
+//    int             i_sec;
+    
+    p_dvd = (dvd_data_t*)p_input->p_access_data;
+
+//    dvdplay_audio_info( p_dvd->vmg, &i_audio_nr, &i_audio );
+//    dvdplay_subp_info( p_dvd->vmg, &i_subp_nr, &i_subp );
+
+    dvdplay_ES( p_input );
+    p_input->stream.p_selected_area->i_start =
+        LB2OFF( dvdplay_title_first( p_dvd->vmg ) );
+    p_input->stream.p_selected_area->i_size  =
+        LB2OFF( dvdplay_title_end ( p_dvd->vmg ) ) -
+        p_input->stream.p_selected_area->i_start;
+
+    if( p_input->stream.p_selected_area->i_size > 0 )
+    {
+        p_input->stream.b_seekable = 1;
+    }
+    else
+    {
+        p_input->stream.b_seekable = 0;
+    }
+    
+#if 0
+    i_sec = dvdplay_title_time( p_dvd->vmg );
+    msg_Dbg( p_input, "title time: %d:%02d:%02d (%d)",
+                     i_sec/3600, (i_sec%3600)/60, i_sec%60, i_sec );
+#endif
+
+    return 0;
+}
diff --git a/plugins/dvdplay/access.h b/plugins/dvdplay/access.h
new file mode 100644 (file)
index 0000000..d7ecf82
--- /dev/null
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * access.h: send info to access plugin.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: access.h,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+union dvdplay_ctrl_u;
+
+void dvdAccessSendControl( struct input_thread_t *, union dvdplay_ctrl_u * );
diff --git a/plugins/dvdplay/demux.c b/plugins/dvdplay/demux.c
new file mode 100644 (file)
index 0000000..e6e39b2
--- /dev/null
@@ -0,0 +1,197 @@
+/*****************************************************************************
+ * demux.c: demux functions for dvdplay.
+ *****************************************************************************
+ * Copyright (C) 1998-2001 VideoLAN
+ * $Id: demux.c,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <vlc/vlc.h>
+#include <vlc/input.h>
+
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
+
+#include "interface.h"
+#include "dvd.h"
+#include "intf.h"
+#include "es.h"
+
+/* how many packets dvdplay_Demux will read in each loop */
+#define dvdplay_READ_ONCE 64
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+
+/* called from outside */
+static int  dvdplay_Rewind        ( struct input_thread_t * );
+static int  dvdplay_Demux         ( struct input_thread_t * );
+static int  dvdplay_Init          ( struct input_thread_t * );
+static void dvdplay_End           ( struct input_thread_t * );
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+void _M( demux_getfunctions)( function_list_t * p_function_list )
+{
+#define demux p_function_list->functions.demux
+    demux.pf_init             = dvdplay_Init;
+    demux.pf_end              = dvdplay_End;
+    demux.pf_demux            = dvdplay_Demux;
+    demux.pf_rewind           = dvdplay_Rewind;
+#undef demux
+}
+
+/*
+ * Data demux functions
+ */
+
+/*****************************************************************************
+ * dvdplay_Init: initializes dvdplay structures
+ *****************************************************************************/
+static int dvdplay_Init( input_thread_t * p_input )
+{
+    dvd_data_t *    p_dvd;
+    char *          psz_intf = NULL;
+
+    if( p_input->stream.i_method != INPUT_METHOD_DVD )
+    {
+        return -1;
+    }
+
+    p_input->p_demux_data = (void*)p_input->p_access_data;
+    p_dvd = (dvd_data_t *)p_input->p_demux_data;
+
+    psz_intf = config_GetPsz( p_input, "intf" );
+    config_PutPsz( p_input, "intf", "dvdplay" );
+    p_dvd->p_intf = intf_Create( p_input );
+    p_dvd->p_intf->b_block = VLC_FALSE;
+    intf_RunThread( p_dvd->p_intf );
+    
+    if( psz_intf != NULL )
+    {
+        config_PutPsz( p_input, "intf", psz_intf );
+    }
+
+    return 0;
+}
+
+/*****************************************************************************
+ * dvdplay_End: frees unused data
+ *****************************************************************************/
+static void dvdplay_End( input_thread_t * p_input )
+{
+    dvd_data_t *    p_dvd;
+    intf_thread_t * p_intf = NULL;
+
+    p_intf = vlc_object_find( p_input, VLC_OBJECT_INTF, FIND_CHILD );
+    if( p_intf != NULL )
+    {
+        intf_StopThread( p_intf );
+        vlc_object_detach_all( p_intf );
+        vlc_object_release( p_intf );
+        intf_Destroy( p_intf );
+    }
+
+    p_dvd = (dvd_data_t *)p_input->p_demux_data;
+    p_dvd->p_intf = NULL;
+}
+
+/*****************************************************************************
+ * dvdplay_Demux
+ *****************************************************************************/
+static int dvdplay_Demux( input_thread_t * p_input )
+{
+    dvd_data_t *            p_dvd;
+    data_packet_t *         p_data;
+    ssize_t                 i_result;
+    ptrdiff_t               i_remains;
+    int                     i_data_nb = 0;
+
+    p_dvd = (dvd_data_t *)p_input->p_demux_data;
+   
+    /* Read headers to compute payload length */
+    do
+    {
+        if( ( i_result = input_ReadPS( p_input, &p_data ) ) <= 0)
+        {
+            return i_result;
+        }
+
+        i_remains = p_input->p_last_data - p_input->p_current_data;
+
+        input_DemuxPS( p_input, p_data );
+        
+
+        ++i_data_nb;
+    }
+    while( i_remains );
+    
+
+    
+//    if( p_dvd->b_still && p_dvd->b_end_of_cell && p_dvd->p_intf != NULL )
+    if( p_dvd->i_still_time && p_dvd->b_end_of_cell && p_dvd->p_intf != NULL )
+    {
+        pgrm_descriptor_t * p_pgrm;
+
+        /* when we receive still_time flag, we have to pause immediately */
+        input_SetStatus( p_input, INPUT_STATUS_PAUSE );
+
+        dvdIntfStillTime( p_dvd->p_intf, p_dvd->i_still_time );
+        p_dvd->i_still_time = 0;
+        
+        vlc_mutex_lock( &p_input->stream.stream_lock );
+        
+        p_pgrm = p_input->stream.p_selected_program;
+        p_pgrm->i_synchro_state = SYNCHRO_REINIT;
+        
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
+        
+        input_ClockManageControl( p_input, p_pgrm, 0 );
+    }
+
+    return i_data_nb;
+}
+
+/*****************************************************************************
+ * dvdplay_Rewind : reads a stream backward
+ *****************************************************************************/
+static int dvdplay_Rewind( input_thread_t * p_input )
+{
+    return( -1 );
+}
diff --git a/plugins/dvdplay/demux.h b/plugins/dvdplay/demux.h
new file mode 100644 (file)
index 0000000..dd4255e
--- /dev/null
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * es.h: functions to handle elementary streams.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: demux.h,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+void dvdplay_DeleteES( struct input_thread_s * );
+void dvdplay_Video( struct input_thread_s * );
+void dvdplay_Audio( struct input_thread_s * );
+void dvdplay_Subp( struct input_thread_s * );
+void dvdplay_ES( struct input_thread_s * );
+void dvdplay_LaunchDecoders( struct input_thread_s * );
diff --git a/plugins/dvdplay/dvd.c b/plugins/dvdplay/dvd.c
new file mode 100644 (file)
index 0000000..261d1f9
--- /dev/null
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * dvd.c : dvdplay module for vlc
+ *****************************************************************************
+ * This plugins should handle all the known specificities of the DVD format,
+ * especially the 2048 bytes logical block size.
+ * It depends on: libdvdplay for ifo files and block reading.
+ *****************************************************************************
+ *    
+ * Copyright (C) 2001 VideoLAN
+ * $Id: dvd.c,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdlib.h>                                      /* malloc(), free() */
+#include <string.h>                                              /* strdup() */
+
+#include <vlc/vlc.h>
+
+/*****************************************************************************
+ * Capabilities defined in the other files.
+ *****************************************************************************/
+void _M( access_getfunctions)( function_list_t * p_function_list );
+void _M( demux_getfunctions)( function_list_t * p_function_list );
+void _M( intf_getfunctions)( function_list_t * p_function_list );
+
+/*****************************************************************************
+ * Build configuration tree.
+ *****************************************************************************/
+MODULE_CONFIG_START
+ADD_CATEGORY_HINT( "[dvdplay:][device][@[title][,[chapter][,angle]]]", NULL )
+MODULE_CONFIG_STOP
+
+MODULE_INIT_START
+    SET_DESCRIPTION( "dvdplay input module" )
+    ADD_CAPABILITY( INTF, 0 )
+    ADD_CAPABILITY( DEMUX, 0 )
+    ADD_CAPABILITY( ACCESS, 120 )
+    ADD_SHORTCUT( "dvd" )
+MODULE_INIT_STOP
+
+MODULE_ACTIVATE_START
+    _M( access_getfunctions)( &p_module->p_functions->access );
+    _M( demux_getfunctions)( &p_module->p_functions->demux );
+    _M( intf_getfunctions)( &p_module->p_functions->intf );
+MODULE_ACTIVATE_STOP
+
+MODULE_DEACTIVATE_START
+MODULE_DEACTIVATE_STOP
diff --git a/plugins/dvdplay/dvd.h b/plugins/dvdplay/dvd.h
new file mode 100644 (file)
index 0000000..a9ab899
--- /dev/null
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * dvd.h: structure of the dvdplay plugin
+ *****************************************************************************
+ * Copyright (C) 1999-2001 VideoLAN
+ * $Id: dvd.h,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <dvdread/dvd_reader.h>
+#include <dvdread/ifo_types.h>
+#include <dvdread/ifo_read.h>
+#include <dvdread/nav_read.h>
+#include <dvdread/nav_print.h>
+
+#include <dvdplay/dvdplay.h>
+#include <dvdplay/info.h>
+#include <dvdplay/nav.h>
+#include <dvdplay/state.h>
+
+#define LB2OFF(x) ((off_t)(x) * (off_t)(DVD_VIDEO_LB_LEN))
+#define OFF2LB(x) ((x) / DVD_VIDEO_LB_LEN)
+
+
+/*****************************************************************************
+ * dvd_data_t: structure for communication between dvdplay access, demux
+ * and intf.
+ *****************************************************************************/
+typedef struct
+{
+    dvdplay_ptr             vmg;
+    intf_thread_t *         p_intf;
+
+    int                     i_audio_nb;
+    int                     i_spu_nb;
+
+    int                     i_still_time;
+    vlc_bool_t              b_end_of_cell;
+
+    dvdplay_event_t         event;
+    dvdplay_ctrl_t          control;   
+
+} dvd_data_t;
+
diff --git a/plugins/dvdplay/es.c b/plugins/dvdplay/es.c
new file mode 100644 (file)
index 0000000..bb81ed5
--- /dev/null
@@ -0,0 +1,299 @@
+/*****************************************************************************
+ * es.c: functions to handle elementary streams.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: es.c,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <vlc/vlc.h>
+#include <vlc/input.h>
+
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef STRNCASECMP_IN_STRINGS_H
+#   include <strings.h>
+#endif
+
+#include "dvd.h"
+#include "iso_lang.h"
+
+void dvdplay_LaunchDecoders( input_thread_t * p_input );
+
+/*****************************************************************************
+ * dvdplay_DeleteES:
+ *****************************************************************************/
+void dvdplay_DeleteES( input_thread_t* p_input )
+{
+    free( p_input->stream.pp_selected_es );
+
+    p_input->stream.pp_selected_es = NULL;
+    p_input->stream.i_selected_es_number = 0;
+    
+    while( p_input->stream.i_es_number )
+    {
+        input_DelES( p_input, p_input->stream.pp_es[0] );
+    }
+
+    free( p_input->stream.pp_es );
+
+    p_input->stream.pp_es = NULL;
+    p_input->stream.i_es_number = 0;
+
+}
+
+#define ADDES( id, fourcc, cat, lang, size )                            \
+    msg_Dbg( p_input, "new es 0x%x", i_id );                            \
+    p_es = input_AddES( p_input, NULL, id, size );                      \
+    p_es->i_stream_id = i_id & 0xff;                                    \
+    p_es->i_fourcc = (fourcc);                                          \
+    p_es->i_cat = (cat);                                                \
+    if( lang )                                                          \
+    {                                                                   \
+        strcpy( p_es->psz_desc, DecodeLanguage( lang ) );               \
+    }
+
+/*****************************************************************************
+ * dvdplay_Video: read video ES
+ *****************************************************************************/
+void dvdplay_Video( input_thread_t * p_input )
+{
+    dvd_data_t *            p_dvd;
+    es_descriptor_t *       p_es;
+    video_attr_t *          p_attr;
+    int                     i_id;
+
+    p_dvd = (dvd_data_t*)(p_input->p_access_data);
+    p_attr = dvdplay_video_attr( p_dvd->vmg );
+    
+    /* ES 0 -> video MPEG2 */
+    i_id = 0xe0;
+    
+    if( p_attr->display_aspect_ratio )
+    {
+        ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, sizeof(int) );
+        *(int*)(p_es->p_demux_data) = p_attr->display_aspect_ratio;
+    }
+    else
+    {
+        ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, 0 );
+    }
+        
+}
+
+/*****************************************************************************
+ * dvdplay_Audio: read audio ES
+ *****************************************************************************/
+void dvdplay_Audio( input_thread_t * p_input )
+{
+    dvd_data_t *            p_dvd;
+    es_descriptor_t *       p_es;
+    audio_attr_t *          p_attr;
+    int                     i_audio_nr  = -1;
+    int                     i_audio     = -1;
+    int                     i_channels;
+    int                     i_lang;
+    int                     i_id;
+    int                     i;
+
+    p_dvd = (dvd_data_t*)(p_input->p_access_data);
+    p_dvd->i_audio_nb = 0;
+    dvdplay_audio_info( p_dvd->vmg, &i_audio_nr, &i_audio );
+    
+    /* Audio ES, in the order they appear in .ifo */
+    for( i = 1 ; i <= i_audio_nr ; i++ )
+    {
+        if( ( i_id = dvdplay_audio_id( p_dvd->vmg, i-1 ) ) > 0 )
+        {
+            p_attr     = dvdplay_audio_attr( p_dvd->vmg, i-1 );
+            i_channels = p_attr->channels;
+            i_lang     = p_attr->lang_code;
+
+            ++p_dvd->i_audio_nb;
+
+            switch( p_attr->audio_format )
+            {
+            case 0x00:              /* AC3 */
+                ADDES( i_id, VLC_FOURCC('a','5','2',' '), AUDIO_ES, i_lang, 0 );
+                strcat( p_es->psz_desc, " (ac3)" );
+
+                break;
+            case 0x02:
+            case 0x03:              /* MPEG audio */
+                ADDES( i_id, VLC_FOURCC('m','p','g','a'), AUDIO_ES, i_lang, 0 );
+                strcat( p_es->psz_desc, " (mpeg)" );
+
+                break;
+            case 0x04:              /* LPCM */
+                ADDES( i_id, VLC_FOURCC('l','p','c','m'), AUDIO_ES, i_lang, 0 );
+                strcat( p_es->psz_desc, " (lpcm)" );
+
+                break;
+            case 0x05:              /* SDDS */
+                msg_Warn( p_input, "SDDS audio not handled" );
+                break;
+            case 0x06:              /* DTS */
+                msg_Warn( p_input, "DTS audio not handled yet"
+                             "(0x%x)", i_id );
+                break;
+            default:
+                i_id = 0;
+                msg_Warn( p_input, "unknown audio type %.2x",
+                             p_attr->audio_format );
+            }
+        }
+    }
+}
+
+/*****************************************************************************
+ * dvdplay_Subp: read subpictures ES
+ *****************************************************************************/
+void dvdplay_Subp( input_thread_t * p_input )
+{
+    dvd_data_t *            p_dvd;
+    es_descriptor_t *       p_es;
+    subp_attr_t *           p_attr;
+    u32 *                   pi_palette;
+    int                     i_subp_nr   = -1;
+    int                     i_subp      = -1;
+    int                     i_id;
+    int                     i;
+           
+    p_dvd = (dvd_data_t*)(p_input->p_access_data);
+    p_dvd->i_spu_nb = 0;
+
+    dvdplay_subp_info( p_dvd->vmg, &i_subp_nr, &i_subp );
+    pi_palette = dvdplay_subp_palette( p_dvd->vmg );
+
+    for( i = 1 ; i <= i_subp_nr; i++ )
+    {
+        if( ( i_id = dvdplay_subp_id( p_dvd->vmg, i-1 ) ) >= 0 )
+        {
+            p_attr = dvdplay_subp_attr( p_dvd->vmg, i-1 );
+            ++p_dvd->i_spu_nb;
+            
+            if( pi_palette )
+            {
+                ADDES( i_id, VLC_FOURCC('s','p','u',' '), SPU_ES,
+                       p_attr->lang_code, 16*sizeof(u32) );
+                *(int*)p_es->p_demux_data = 0xBeeF;
+                memcpy( (void*)p_es->p_demux_data + sizeof(int),
+                        pi_palette, 16*sizeof(u32) ); 
+            }
+            else
+            {
+                ADDES( i_id, VLC_FOURCC('s','p','u',' '), SPU_ES,
+                       p_attr->lang_code, 0 );
+            }
+        }
+    }
+}
+
+/*****************************************************************************
+ * dvdplay_LaunchDecoders
+ *****************************************************************************/
+void dvdplay_LaunchDecoders( input_thread_t * p_input )
+{
+    dvd_data_t *            p_dvd;
+    int                     i_audio_nr  = -1;
+    int                     i_audio     = -1;
+    int                     i_subp_nr   = -1;
+    int                     i_subp      = -1;
+
+    p_dvd = (dvd_data_t*)(p_input->p_access_data);
+
+    dvdplay_audio_info( p_dvd->vmg, &i_audio_nr, &i_audio );
+    dvdplay_subp_info( p_dvd->vmg, &i_subp_nr, &i_subp );
+            
+    if( config_GetInt( p_input, "video" ) )
+    {
+        input_SelectES( p_input, p_input->stream.pp_es[0] );
+    }
+
+//    if( !i_audio ) i_audio = 1;
+    if( i_audio > p_dvd->i_audio_nb ) i_audio = 1;
+    if( config_GetInt( p_input, "audio" )
+            &&( i_audio > 0 ) && ( p_dvd->i_audio_nb > 0 ) )
+    {
+        if( config_GetInt( p_input, "audio-type" ) == REQUESTED_AC3 )
+        {
+            int     i_ac3 = i_audio;
+            
+            while( ( i_ac3 < p_dvd->i_audio_nb ) &&
+                   ( p_input->stream.pp_es[i_ac3]->i_fourcc !=
+                        VLC_FOURCC('a','5','2',' ') ) )
+            {
+                i_ac3++;
+            }
+            if( p_input->stream.pp_es[i_ac3]->i_fourcc ==
+                    VLC_FOURCC('a','5','2',' ') )
+            {
+                input_SelectES( p_input,
+                                p_input->stream.pp_es[i_ac3] );
+                
+                /* warn libdvdplay that we have chosen another stream */
+                dvdplay_audio_info( p_dvd->vmg, &i_audio_nr, &i_ac3 );
+            }
+            else
+            {
+//                input_SelectES( p_input,
+//                                p_input->stream.pp_es[i_audio] );
+            }
+        }
+        else
+        {
+            input_SelectES( p_input,
+                            p_input->stream.pp_es[i_audio] );
+        }
+    }
+
+    if( config_GetInt( p_input, "video" )
+            && ( i_subp > 0 ) && ( p_dvd->i_spu_nb > 0 ) )
+    {
+        i_subp += p_dvd->i_audio_nb;
+        input_SelectES( p_input, p_input->stream.pp_es[i_subp] );
+    }
+}
+
+/*****************************************************************************
+ * dvdplay_ES:
+ *****************************************************************************/
+void dvdplay_ES( input_thread_t * p_input )
+{
+    dvdplay_DeleteES      ( p_input );
+    dvdplay_Video         ( p_input );
+    dvdplay_Audio         ( p_input );
+    dvdplay_Subp          ( p_input );
+    dvdplay_LaunchDecoders( p_input );
+}
+
+
diff --git a/plugins/dvdplay/es.h b/plugins/dvdplay/es.h
new file mode 100644 (file)
index 0000000..55128f9
--- /dev/null
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * es.h: functions to handle elementary streams.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: es.h,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+void dvdplay_DeleteES( struct input_thread_t * );
+void dvdplay_Video( struct input_thread_t * );
+void dvdplay_Audio( struct input_thread_t * );
+void dvdplay_Subp( struct input_thread_t * );
+void dvdplay_ES( struct input_thread_t * );
+void dvdplay_LaunchDecoders( struct input_thread_t * );
diff --git a/plugins/dvdplay/intf.c b/plugins/dvdplay/intf.c
new file mode 100644 (file)
index 0000000..a3c4165
--- /dev/null
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * intf.c: interface for DVD video manager
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: intf.c,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Authors: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdlib.h>                                      /* malloc(), free() */
+#include <string.h>
+#include <unistd.h>
+
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
+#include "stream_control.h"
+#include "input_ext-intf.h"
+
+#include "video.h"
+#include "video_output.h"
+
+#include "dvd.h"
+
+/*****************************************************************************
+ * intf_sys_t: description and status of interface
+ *****************************************************************************/
+struct intf_sys_t
+{
+    input_thread_t *    p_input;
+    dvd_data_t *        p_dvd;
+
+    vlc_bool_t          b_still;
+    vlc_bool_t          b_inf_still;
+    mtime_t             m_still_time;
+
+};
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+static int  InitThread     ( intf_thread_t *p_intf );
+
+/* Exported functions */
+static int  intf_Open      ( intf_thread_t *p_intf );
+static void intf_Close     ( intf_thread_t *p_intf );
+static void intf_Run       ( intf_thread_t *p_intf );
+
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+void _M( intf_getfunctions )( function_list_t * p_function_list )
+{
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+/*****************************************************************************
+ * intf_Open: initialize dummy interface
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        return( 1 );
+    };
+
+    p_intf->p_sys->m_still_time = 0;
+    p_intf->p_sys->b_inf_still = 0;
+    p_intf->p_sys->b_still = 0;
+
+    return( 0 );
+}
+
+/*****************************************************************************
+ * intf_Close: destroy dummy interface
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+
+/*****************************************************************************
+ * intf_Run: main loop
+ *****************************************************************************/
+static void intf_Run( intf_thread_t *p_intf )
+{
+    vout_thread_t *     p_vout;
+    dvdplay_ctrl_t      control;
+    mtime_t             mtime = 0;
+    mtime_t             mlast = 0;
+    
+    if( InitThread( p_intf ) < 0 )
+    {
+        msg_Err( p_intf, "can't initialize intf" );
+        return;
+    }
+    msg_Dbg( p_intf, "intf initialized" );
+
+    p_vout = NULL;
+    control.mouse.i_x = 0;
+    control.mouse.i_y = 0;
+    
+    /* Main loop */
+    while( !p_intf->b_die )
+    {
+        vlc_mutex_lock( &p_intf->change_lock );
+
+        /*
+         * still images
+         */
+#if 1
+        if( p_intf->p_sys->b_still && !p_intf->p_sys->b_inf_still )
+        {
+            if( p_intf->p_sys->m_still_time > 0 )
+            {
+                /* update remaining still time */
+                mtime = mdate();
+                if( mlast )
+                {
+                    p_intf->p_sys->m_still_time -= mtime - mlast;
+                }
+
+                mlast = mtime;
+            }
+            else
+            {
+                /* still time elasped */
+                input_SetStatus( p_intf->p_sys->p_input,
+                                 INPUT_STATUS_PLAY );
+                p_intf->p_sys->m_still_time = 0;
+                p_intf->p_sys->b_still = 0;
+                mlast = 0;
+            }
+        }
+#else
+        if( p_intf->p_sys->m_still_time != (mtime_t)(-1) )
+        {
+            if( p_intf->p_sys->m_still_time )
+            {
+                mtime = mdate();
+                if( mlast )
+                {
+                    p_intf->p_sys->m_still_time -= mtime - mlast;
+                }
+                if( !p_intf->p_sys->m_still_time )
+                {
+                    input_SetStatus( p_intf->p_sys->p_input,
+                                     INPUT_STATUS_PLAY );
+                }
+                mlast = mtime;
+            }
+
+        }
+#endif
+
+        /* 
+         * mouse cursor
+         */
+        p_vout = vlc_object_find( p_intf->p_sys->p_input,
+                                  VLC_OBJECT_VOUT, FIND_CHILD );
+        if( p_vout != NULL )
+        {
+            vlc_mutex_lock( &p_vout->change_lock );
+
+            if( control.mouse.i_x != p_vout->i_mouse_x ||
+                control.mouse.i_y != p_vout->i_mouse_y ||
+                p_vout->i_mouse_button )
+            {
+                int i_activate = 0;
+                
+                control.mouse.i_x = p_vout->i_mouse_x;
+                control.mouse.i_y = p_vout->i_mouse_y;
+
+                if( p_vout->i_mouse_button )
+                {
+                    control.type = DVDCtrlMouseActivate;
+                    
+                    msg_Dbg( p_intf, "Activate coordinates: %dx%d",
+                                 p_vout->i_mouse_x, p_vout->i_mouse_y );
+                }
+                else
+                {
+                    control.type = DVDCtrlMouseSelect;
+                    
+                    msg_Dbg( p_intf, "Select coordinates: %dx%d",
+                                 p_vout->i_mouse_x, p_vout->i_mouse_y );
+                }
+                p_vout->i_mouse_button = 0;
+                vlc_mutex_unlock( &p_vout->change_lock );
+                
+                msg_Dbg( p_intf, "send button" );
+                
+                /* we can safely interact with libdvdplay
+                 * with the stream lock */
+                vlc_mutex_lock( &p_intf->p_sys->p_input->stream.stream_lock );
+                
+                i_activate =
+                    dvdplay_button( p_intf->p_sys->p_dvd->vmg, &control );
+                  
+                vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
+                
+
+                if( i_activate && p_intf->p_sys->b_still )
+                {
+                    input_SetStatus( p_intf->p_sys->p_input,
+                                     INPUT_STATUS_PLAY );
+                    p_intf->p_sys->b_still = 0;
+                    p_intf->p_sys->b_inf_still = 0;
+                    p_intf->p_sys->m_still_time = 0;
+                }
+            }
+            else
+            {
+                vlc_mutex_unlock( &p_vout->change_lock );
+            }
+            
+
+            vlc_object_release( p_vout );
+        }
+            
+        vlc_mutex_unlock( &p_intf->change_lock );
+          
+        /* Wait a bit */
+        msleep( INTF_IDLE_SLEEP );
+    }
+    
+    vlc_object_release( p_intf->p_sys->p_input );
+
+}
+
+/*****************************************************************************
+ * InitThread:
+ *****************************************************************************/
+static int InitThread( intf_thread_t * p_intf )
+{
+    /* we might need some locking here */
+    if( !p_intf->b_die )
+    {
+        input_thread_t * p_input;
+        dvd_data_t * p_dvd;
+        
+        p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_PARENT );
+        p_dvd = (dvd_data_t*)p_input->p_access_data;
+
+        p_dvd->p_intf = p_intf;
+                    
+        vlc_mutex_lock( &p_intf->change_lock );
+    
+        p_intf->p_sys->p_input = p_input;
+        p_intf->p_sys->p_dvd = p_dvd;
+
+        vlc_mutex_unlock( &p_intf->change_lock );
+
+        return 0;
+    }
+    else
+    {
+        return -1;
+    }
+}
+
+/*****************************************************************************
+ * dvdIntfStillTime: function provided to demux plugin to request
+ * still images
+ *****************************************************************************/
+int dvdIntfStillTime( intf_thread_t *p_intf, int i_sec )
+{
+    vlc_mutex_lock( &p_intf->change_lock );
+#if 1
+    
+    if( i_sec == 0xff )
+    {
+        p_intf->p_sys->b_still = 1;
+        p_intf->p_sys->b_inf_still = 1;
+    }
+    else if( i_sec > 0 )
+    {
+        p_intf->p_sys->b_still = 1;
+        p_intf->p_sys->m_still_time = 1000000 * i_sec;
+    }
+#else
+    if( i_sec > 0 )
+    {
+        if( i_sec == 0xff )
+        {
+            p_intf->p_sys->m_still_time = (mtime_t)(-1);
+            msg_Warn( p_intf, "%lld", p_intf->p_sys->m_still_time );
+        }
+        else
+        {
+            p_intf->p_sys->m_still_time = 1000000 * i_sec;
+        }
+        
+    }
+#endif
+    vlc_mutex_unlock( &p_intf->change_lock );
+
+    return 0;
+}
+
+
diff --git a/plugins/dvdplay/intf.h b/plugins/dvdplay/intf.h
new file mode 100644 (file)
index 0000000..00d9cc9
--- /dev/null
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * intf.h: send info to intf.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: intf.h,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+int dvdIntfStillTime( struct intf_thread_t *, int );
diff --git a/plugins/dvdplay/tools.c b/plugins/dvdplay/tools.c
new file mode 100644 (file)
index 0000000..a52d84e
--- /dev/null
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * tools.c: tools for dvd plugin.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: tools.c,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#include <vlc/vlc.h>
+
+#include "stream_control.h"
+#include "input_ext-intf.h"
+#include "input_ext-dec.h"
+#include "input_ext-plugins.h"
+
+#include "dvd.h"
+
+/*****************************************************************************
+ * dvdplay_ParseCL: parse command line
+ *****************************************************************************/
+char * dvdplay_ParseCL( input_thread_t * p_input,
+                       int * i_title, int * i_chapter, int * i_angle )
+{
+    dvd_data_t *            p_dvd;
+    struct stat             stat_info;
+    char *                  psz_parser;
+    char *                  psz_source;
+    char *                  psz_next;
+    
+    p_dvd = (dvd_data_t*)(p_input->p_access_data);
+
+    psz_parser = psz_source = strdup( p_input->psz_name );
+    if( !psz_parser )
+    {
+        return NULL;
+    }
+
+    while( *psz_parser && *psz_parser != '@' )
+    {
+        psz_parser++;
+    }
+
+    *i_title = 0;
+    *i_chapter = 1;
+    *i_angle = 1;
+    
+    if( *psz_parser == '@' )
+    {
+        /* Found options */
+        *psz_parser = '\0';
+        ++psz_parser;
+
+        *i_title = (int)strtol( psz_parser, &psz_next, 10 );
+        if( *psz_next )
+        {
+            psz_parser = psz_next + 1;
+            *i_chapter = (int)strtol( psz_parser, &psz_next, 10 );
+            if( *psz_next )
+            {
+                *i_angle = (int)strtol( psz_next + 1, NULL, 10 );
+            }
+        }
+    }
+
+    *i_title   = *i_title >= 0 ? *i_title : 0;
+    *i_chapter = *i_chapter    ? *i_chapter : 1;
+    *i_angle   = *i_angle      ? *i_angle : 1;
+
+    if( !*psz_source )
+    {
+        free( psz_source );
+        if( !p_input->psz_access )
+        {
+            return NULL;
+        }
+        psz_source = config_GetPsz( p_input, "dvd" );
+    }
+
+    if( stat( psz_source, &stat_info ) == -1 )
+    {
+        msg_Err( p_input, "cannot stat() source `%s' (%s)",
+                     psz_source, strerror(errno));
+        return NULL;
+    }
+    if( !S_ISBLK(stat_info.st_mode) &&
+        !S_ISCHR(stat_info.st_mode) &&
+        !S_ISDIR(stat_info.st_mode) )
+    {
+        msg_Dbg( p_input, "plugin discarded"
+                         " (not a valid source)" );
+        return NULL;
+    }
+    
+    msg_Dbg( p_input, "dvdroot=%s title=%d chapter=%d angle=%d",
+                  psz_source,  *i_title, *i_chapter, *i_angle );
+    
+    return psz_source;
+}
diff --git a/plugins/dvdplay/tools.h b/plugins/dvdplay/tools.h
new file mode 100644 (file)
index 0000000..1453811
--- /dev/null
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * tools.h: tools for dvdplay plugin.
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: tools.h,v 1.1 2002/07/23 19:56:19 stef Exp $
+ *
+ * Author: Stéphane Borel <stef@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+char * dvdplay_ParseCL( struct input_thread_t *, int*, int*, int* );