N: Stéphane Borel
E: stef@via.ecp.fr
D: MPEG video decoder
-D: DVD input
+D: DVD input, IFO parsing, CSS decryption
N: Arnaud de Bossoreille de Ribou
E: bozo@via.ecp.fr
E: reno@via.ecp.fr
D: AC3 decoder
+N: Nilmoni Deb
+E: ndeb@ece.cmu.edu
+D: Minor configure.in and Makefile.in fixes
+
N: Colin Delacroix
E: colin@zoy.org
D: MacOS X sound support
N: Shane Harper
E: shanegh@optusnet.com.au
D: SDL plugin fixes and enhancements
+D: XVideo video output
+D: Gnome and Gtk+ interface enhancements
N: Gaël Hendryckx
E: jimmy@via.ecp.fr
CC=@CC@
SHELL=@SHELL@
-LIB_SDL=@LIB_SDL@
-LIB_GLIDE=@LIB_GLIDE@
-LIB_GGI=@LIB_GGI@
-
#----------------- do not change anything below this line ----------------------
################################################################################
#
# C headers directories
#
+INCLUDE += @INCLUDE@
INCLUDE += -Iinclude -I/usr/local/include
#
PLUGIN_TS = plugins/mpeg/ts.o \
plugins/mpeg/input_ts.o
-PLUGIN_X11= plugins/x11/x11.o \
+PLUGIN_XVIDEO = plugins/x11/xvideo.o \
+ plugins/x11/vout_xvideo.o
+
+PLUGIN_X11 = plugins/x11/x11.o \
plugins/x11/vout_x11.o
PLUGIN_YUV = plugins/yuv/yuv.o \
NONSTD_PLUGIN_OBJ = \
$(PLUGIN_X11) \
+ $(PLUGIN_XVIDEO) \
$(PLUGIN_GLIDE) \
$(PLUGIN_GTK) \
$(PLUGIN_GNOME) \
$(STD_PLUGIN_OBJ): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+$(PLUGIN_XVIDEO): %.o: Makefile.dep
+$(PLUGIN_XVIDEO): %.o: .dep/%.d
+$(PLUGIN_XVIDEO): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<
+
$(PLUGIN_X11): %.o: Makefile.dep
$(PLUGIN_X11): %.o: .dep/%.d
$(PLUGIN_X11): %.o: %.c
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
lib/ggi.so: $(PLUGIN_GGI)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GGI)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GGI@
lib/glide.so: $(PLUGIN_GLIDE)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GLIDE)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GLIDE@
lib/gnome.so: $(PLUGIN_GNOME)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
lib/sdl.so: $(PLUGIN_SDL)
- $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_SDL)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
lib/ts.so: $(PLUGIN_TS)
ifeq ($(SYS),darwin)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
endif
+lib/xvideo.so: $(PLUGIN_XVIDEO)
+ifeq ($(SYS),nto-qnx)
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv -lsocket
+else
+ $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv
+endif
+
lib/x11.so: $(PLUGIN_X11)
ifeq ($(SYS),nto-qnx)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
--disable-gtk Gtk+ support (default enabled)"
ac_help="$ac_help
--disable-x11 X11 support (default enabled)"
+ac_help="$ac_help
+ --enable-xvideo XVideo interface support (default disabled)"
ac_help="$ac_help
--enable-alsa Alsa sound drivers support (Only for linux) (default disabled)"
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:601: checking host system type" >&5
+echo "configure:603: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:628: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:630: 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
# 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:658: checking for $ac_word" >&5
+echo "configure:660: 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
# 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:688: checking for $ac_word" >&5
+echo "configure:690: 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
# 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:739: checking for $ac_word" >&5
+echo "configure:741: 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
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:773: 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.
cat > conftest.$ac_ext << EOF
-#line 782 "configure"
+#line 784 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:789: \"$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
{ 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:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:815: 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:818: checking whether we are using GNU C" >&5
+echo "configure:820: 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
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$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:829: \"$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
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:848: 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
fi
if test -z "$CPP"; then
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:880: checking how to run the C preprocessor" >&5
+echo "configure:882: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 895 "configure"
+#line 897 "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:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:903: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 912 "configure"
+#line 914 "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:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:920: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 929 "configure"
+#line 931 "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:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:937: \"$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
:
# 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:973: checking for a BSD compatible install" >&5
+echo "configure:975: 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
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1027: checking for working const" >&5
+echo "configure:1029: 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 1032 "configure"
+#line 1034 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1102: checking whether byte ordering is bigendian" >&5
+echo "configure:1104: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 1109 "configure"
+#line 1111 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:1120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 1124 "configure"
+#line 1126 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:1135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1155 "configure"
+#line 1157 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:1168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
for ac_func in gettimeofday select strerror strtod strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1195: checking for $ac_func" >&5
+echo "configure:1197: 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 1200 "configure"
+#line 1202 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1225: \"$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
for ac_func in setenv putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1250: checking for $ac_func" >&5
+echo "configure:1252: 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 1255 "configure"
+#line 1257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1280: \"$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
done
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1303: checking for connect" >&5
+echo "configure:1305: 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 1308 "configure"
+#line 1310 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1333: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1349: checking for connect in -lsocket" >&5
+echo "configure:1351: 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
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1357 "configure"
+#line 1359 "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
connect()
; return 0; }
EOF
-if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1398: checking for gethostbyname" >&5
+echo "configure:1400: 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 1403 "configure"
+#line 1405 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1428: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1444: checking for gethostbyname in -lnsl" >&5
+echo "configure:1446: 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
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1452 "configure"
+#line 1454 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:1493: checking for nanosleep" >&5
+echo "configure:1495: 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 1498 "configure"
+#line 1500 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char nanosleep(); below. */
; return 0; }
EOF
-if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1523: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:1539: checking for nanosleep in -lrt" >&5
+echo "configure:1541: 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
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1547 "configure"
+#line 1549 "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
nanosleep()
; return 0; }
EOF
-if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1560: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
-echo "configure:1584: checking for nanosleep in -lposix4" >&5
+echo "configure:1586: 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
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1592 "configure"
+#line 1594 "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
nanosleep()
; return 0; }
EOF
-if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1605: \"$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
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1637: checking for $ac_func" >&5
+echo "configure:1639: 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 1642 "configure"
+#line 1644 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1667: \"$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
done
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:1690: checking for inet_aton" >&5
+echo "configure:1692: 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 1695 "configure"
+#line 1697 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
; return 0; }
EOF
-if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1720: \"$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
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:1736: checking for inet_aton in -lresolv" >&5
+echo "configure:1738: 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
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1744 "configure"
+#line 1746 "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
inet_aton()
; return 0; }
EOF
-if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1757: \"$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
for ac_func in vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1787: checking for $ac_func" >&5
+echo "configure:1789: 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 1792 "configure"
+#line 1794 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1817: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1843: checking for $ac_hdr" >&5
+echo "configure:1845: 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 1848 "configure"
+#line 1850 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1855: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1882: checking for $ac_func" >&5
+echo "configure:1884: 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 1887 "configure"
+#line 1889 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1912: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1935: checking for working mmap" >&5
+echo "configure:1937: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1943 "configure"
+#line 1945 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2085: \"$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
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2106: checking return type of signal handlers" >&5
+echo "configure:2108: 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 2111 "configure"
+#line 2113 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2147: checking for dlopen in -ldl" >&5
+echo "configure:2149: 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
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2155 "configure"
+#line 2157 "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
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for optarg in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:2194: checking for optarg in -lgnugetopt" >&5
+echo "configure:2196: checking for optarg in -lgnugetopt" >&5
ac_lib_var=`echo gnugetopt'_'optarg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2202 "configure"
+#line 2204 "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
optarg()
; return 0; }
EOF
-if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for _ in -lbe""... $ac_c" 1>&6
-echo "configure:2241: checking for _ in -lbe" >&5
+echo "configure:2243: checking for _ in -lbe" >&5
ac_lib_var=`echo be'_'_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbe $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2249 "configure"
+#line 2251 "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
_()
; return 0; }
EOF
-if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for _ in -lgame""... $ac_c" 1>&6
-echo "configure:2288: checking for _ in -lgame" >&5
+echo "configure:2290: checking for _ in -lgame" >&5
ac_lib_var=`echo game'_'_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgame $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2296 "configure"
+#line 2298 "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
_()
; return 0; }
EOF
-if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for _ in -lroot""... $ac_c" 1>&6
-echo "configure:2335: checking for _ in -lroot" >&5
+echo "configure:2337: checking for _ in -lroot" >&5
ac_lib_var=`echo root'_'_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lroot $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2343 "configure"
+#line 2345 "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
_()
; return 0; }
EOF
-if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for powl in -lm""... $ac_c" 1>&6
-echo "configure:2382: checking for powl in -lm" >&5
+echo "configure:2384: checking for powl in -lm" >&5
ac_lib_var=`echo m'_'powl | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2390 "configure"
+#line 2392 "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
powl()
; 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:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2429: checking for pthread_create in -lpthread" >&5
+echo "configure:2431: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2437 "configure"
+#line 2439 "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
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
-echo "configure:2476: checking for thread_create in -lthreads" >&5
+echo "configure:2478: checking for thread_create in -lthreads" >&5
ac_lib_var=`echo threads'_'thread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2484 "configure"
+#line 2486 "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
thread_create()
; return 0; }
EOF
-if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:2524: checking for getopt_long" >&5
+echo "configure:2526: 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 2529 "configure"
+#line 2531 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getopt_long(); below. */
; return 0; }
EOF
-if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2554: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2579: checking for $ac_hdr" >&5
+echo "configure:2581: 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 2584 "configure"
+#line 2586 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2591: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2619: checking for $ac_hdr" >&5
+echo "configure:2621: 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 2624 "configure"
+#line 2626 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2631: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2659: checking for $ac_hdr" >&5
+echo "configure:2661: 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 2664 "configure"
+#line 2666 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2671: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_hdr" >&5
+echo "configure:2701: 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 2704 "configure"
+#line 2706 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2711: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2739: checking for $ac_hdr" >&5
+echo "configure:2741: 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 2744 "configure"
+#line 2746 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2751: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2779: checking for $ac_hdr" >&5
+echo "configure:2781: 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 2784 "configure"
+#line 2786 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2791: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2819: checking for $ac_hdr" >&5
+echo "configure:2821: 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 2824 "configure"
+#line 2826 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2831: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2859: checking for $ac_hdr" >&5
+echo "configure:2861: 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 2864 "configure"
+#line 2866 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2871: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2900: checking for $ac_hdr" >&5
+echo "configure:2902: 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 2905 "configure"
+#line 2907 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2912: \"$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*
CFLAGS="${CFLAGS} -Wall -Werror"
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:2941: checking for ntohl in sys/param.h" >&5
+echo "configure:2943: checking for ntohl in sys/param.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2943 "configure"
+#line 2945 "configure"
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
; return 0; }
EOF
-if { (eval echo configure:2951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define NTOHL_IN_SYS_PARAM_H 1
CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
echo $ac_n "checking if \$CC accepts -rdynamic""... $ac_c" 1>&6
-echo "configure:2968: checking if \$CC accepts -rdynamic" >&5
+echo "configure:2970: checking if \$CC accepts -rdynamic" >&5
cat > conftest.$ac_ext <<EOF
-#line 2970 "configure"
+#line 2972 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
DYNAMIC_FLAG="-rdynamic"
echo "$ac_t""yes" 1>&6
CFLAGS=$save_CFLAGS
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2992: checking for boolean_t in sys/types.h" >&5
+echo "configure:2994: checking for boolean_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2994 "configure"
+#line 2996 "configure"
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
; return 0; }
EOF
-if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_H 1
fi
rm -f conftest*
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:3017: checking for boolean_t in pthread.h" >&5
+echo "configure:3019: checking for boolean_t in pthread.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3019 "configure"
+#line 3021 "configure"
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
; return 0; }
EOF
-if { (eval echo configure:3027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_PTHREAD_H 1
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3043: checking for working const" >&5
+echo "configure:3045: 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 3048 "configure"
+#line 3050 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3118: checking for ANSI C header files" >&5
+echo "configure:3120: 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 3123 "configure"
+#line 3125 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3133: \"$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*
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 3148 "configure"
+#line 3150 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 3166 "configure"
+#line 3168 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 3187 "configure"
+#line 3189 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:3198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3222: checking for size_t" >&5
+echo "configure:3224: 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 3227 "configure"
+#line 3229 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3255: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3257: 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 3260 "configure"
+#line 3262 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3301: checking for $ac_hdr" >&5
+echo "configure:3303: 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 3306 "configure"
+#line 3308 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3313: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3336: checking for $ac_hdr" >&5
+echo "configure:3338: 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 3341 "configure"
+#line 3343 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
cat > conftest.$ac_ext <<EOF
-#line 3373 "configure"
+#line 3375 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3501: checking for $ac_hdr" >&5
+echo "configure:3503: 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 3506 "configure"
+#line 3508 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3513: \"$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*
PLUGINS=${PLUGINS}"sdl ";
if test "x$withval" != "xyes";
then
- LIB_SDL="L/usr/X11R6/lib -l"$withval
+ LIB_SDL="-L/usr/X11R6/lib -L"$withval"/lib -l"$withval
+ INCLUDE=${INCLUDE}" -I"$withval"/include"
else
for ac_hdr in SDL/SDL.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3580: checking for $ac_hdr" >&5
+echo "configure:3583: 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 3585 "configure"
+#line 3588 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3593: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3628: checking for $ac_hdr" >&5
+echo "configure:3631: 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 3633 "configure"
+#line 3636 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3641: \"$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*
fi
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
+# Check whether --enable-xvideo or --disable-xvideo was given.
+if test "${enable_xvideo+set}" = set; then
+ enableval="$enable_xvideo"
+ if test x$enable_xvideo = xyes; then PLUGINS=${PLUGINS}"xvideo "; fi
+fi
+
# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:3730: checking for sys/asoundlib.h" >&5
+echo "configure:3739: checking for sys/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 3735 "configure"
+#line 3744 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3749: \"$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*
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:3757: checking for main in -lasound" >&5
+echo "configure:3766: 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
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3765 "configure"
+#line 3774 "configure"
#include "confdefs.h"
int main() {
main()
; 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:3781: \"$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
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
s%@ALIASES@%$ALIASES%g
+s%@INCLUDE@%$INCLUDE%g
s%@DEBUG@%$DEBUG%g
s%@STATS@%$STATS%g
s%@OPTIMS@%$OPTIMS%g
PLUGINS=${PLUGINS}"sdl ";
if test "x$withval" != "xyes";
then
- LIB_SDL="L/usr/X11R6/lib -l"$withval
+ LIB_SDL="-L/usr/X11R6/lib -L"$withval"/lib -l"$withval
+ INCLUDE=${INCLUDE}" -I"$withval"/include"
else
AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit])
LIB_SDL="-L/usr/X11R6/lib -lSDL"
AC_ARG_ENABLE(x11,
[ --disable-x11 X11 support (default enabled)])
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
+AC_ARG_ENABLE(xvideo,
+ [ --enable-xvideo XVideo interface support (default disabled)],
+ [if test x$enable_xvideo = xyes; then PLUGINS=${PLUGINS}"xvideo "; fi])
AC_ARG_ENABLE(alsa,
[ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
AC_SUBST(ARCH)
AC_SUBST(PLUGINS)
AC_SUBST(ALIASES)
+AC_SUBST(INCLUDE)
AC_SUBST(DEBUG)
AC_SUBST(STATS)
AC_SUBST(OPTIMS)
* vout_x11.c: X11 video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_x11.c,v 1.16 2001/03/16 22:37:06 massiot Exp $
+ * $Id: vout_x11.c,v 1.17 2001/04/01 06:21:44 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
{
- intf_ErrMsg("error: %s", strerror(ENOMEM) );
+ intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
return( 1 );
}
if( p_vout->p_sys->p_display == NULL ) /* error */
{
- intf_ErrMsg("error: can't open display %s\n", psz_display );
+ intf_ErrMsg( "vout error: cannot open display %s", psz_display );
free( p_vout->p_sys );
return( 1 );
}
* but also command buttons, subtitles and other indicators */
if( X11CreateWindow( p_vout ) )
{
- intf_ErrMsg("error: can't create interface window\n" );
+ intf_ErrMsg( "vout error: cannot create X11 window" );
XCloseDisplay( p_vout->p_sys->p_display );
free( p_vout->p_sys );
return( 1 );
* id is still valid. */
if( X11InitDisplay( p_vout, psz_display ) )
{
- intf_ErrMsg("error: can't initialize X11 display" );
+ intf_ErrMsg( "vout error: cannot initialize X11 display" );
XCloseDisplay( p_vout->p_sys->p_display );
free( p_vout->p_sys );
return( 1 );
}
if( i_err ) /* an error occured */
{
- intf_Msg("vout: XShm video extension unavailable" );
+ intf_Msg( "vout: XShm video extension unavailable" );
p_vout->p_sys->b_shm = 0;
}
}
{
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[0] ) )
{
- intf_ErrMsg("error: can't create images");
+ intf_ErrMsg( "vout error: cannot create images" );
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
return( 1 );
}
if( X11CreateImage( p_vout, &p_vout->p_sys->p_ximage[1] ) )
{
- intf_ErrMsg("error: can't create images");
+ intf_ErrMsg( "vout error: cannot create images" );
X11DestroyImage( p_vout->p_sys->p_ximage[0] );
p_vout->p_sys->p_ximage[0] = NULL;
p_vout->p_sys->p_ximage[1] = NULL;
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
- intf_DbgMsg("resizing window");
+ intf_DbgMsg( "vout info: resizing window" );
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
/* Resize window */
/* Recreate XImages. If SysInit failed, the thread can't go on. */
if( vout_Init( p_vout ) )
{
- intf_ErrMsg("error: can't resize display");
+ intf_ErrMsg( "vout error: cannot resize display" );
return( 1 );
}
* tables. This is needed since conversion buffer size may have
* changed */
p_vout->i_changes |= VOUT_YUV_CHANGE;
- intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height);
+ intf_Msg( "vout: video display resized (%dx%d)",
+ p_vout->i_width, p_vout->i_height);
}
return 0;
== True );
if( !p_vout->p_sys->b_shm )
{
- intf_Msg("vout: XShm video extension is not available");
+ intf_Msg( "vout: XShm video extension is not available" );
}
/* Get screen depth */
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("vout error: no PseudoColor visual available");
+ intf_ErrMsg( "vout error: no PseudoColor visual available" );
return( 1 );
}
p_vout->i_bytes_per_pixel = 1;
&xvisual_template, &i_count );
if( p_xvisual == NULL )
{
- intf_ErrMsg("vout error: no TrueColor visual available");
+ intf_ErrMsg( "vout error: no TrueColor visual available" );
return( 1 );
}
p_vout->i_red_mask = p_xvisual->red_mask;
pb_data = (byte_t *) malloc( p_vout->i_bytes_per_line * p_vout->i_height );
if( !pb_data ) /* error */
{
- intf_ErrMsg("error: %s", strerror(ENOMEM));
+ intf_ErrMsg( "vout error: %s", strerror(ENOMEM));
return( 1 );
}
p_shm_info, p_vout->i_width, p_vout->i_height );
if(! *pp_ximage ) /* error */
{
- intf_ErrMsg("error: XShmCreateImage() failed");
+ intf_ErrMsg( "vout error: XShmCreateImage() failed" );
return( 1 );
}
* (*pp_ximage)->height, IPC_CREAT | 0777);
if( p_shm_info->shmid < 0) /* error */
{
- intf_ErrMsg("error: can't allocate shared image data (%s)",
+ intf_ErrMsg( "vout error: cannot allocate shared image data (%s)",
strerror(errno));
XDestroyImage( *pp_ximage );
return( 1 );
p_shm_info->shmaddr = (*pp_ximage)->data = shmat(p_shm_info->shmid, 0, 0);
if(! p_shm_info->shmaddr )
{ /* error */
- intf_ErrMsg("error: can't attach shared memory (%s)",
+ intf_ErrMsg( "vout error: cannot attach shared memory (%s)",
strerror(errno));
shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* free shared memory */
XDestroyImage( *pp_ximage );
if( XShmAttach( p_vout->p_sys->p_display, p_shm_info )
== False ) /* error */
{
- intf_ErrMsg("error: can't attach shared memory to X11 server");
+ intf_ErrMsg( "vout error: cannot attach shared memory to X11 server" );
shmdt( p_shm_info->shmaddr ); /* detach shared memory from process
* and automatic free */
XDestroyImage( *pp_ximage );
if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
{ /* also automatic freeing... */
- intf_ErrMsg( "error: can't detach shared memory (%s)",
+ intf_ErrMsg( "error: cannot detach shared memory (%s)",
strerror(errno) );
}
}
&p_vout->p_sys->i_ss_exposure );
/* Disable screen saver */
- intf_DbgMsg("intf: disabling screen saver");
+ intf_DbgMsg( "vout: disabling screen saver" );
XSetScreenSaver( p_vout->p_sys->p_display, 0,
p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking,
--- /dev/null
+/*****************************************************************************
+ * vout_xvideo.c: Xvideo video output display method
+ *****************************************************************************
+ * Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
+ * $Id: vout_xvideo.c,v 1.1 2001/04/01 06:21:44 sam Exp $
+ *
+ * Authors: Shane Harper <shanegh@optusnet.com.au>
+ * Vincent Seguin <seguin@via.ecp.fr>
+ * 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.
+ *****************************************************************************/
+
+#define MODULE_NAME xvideo
+#include "modules_inner.h"
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include "defs.h"
+
+#include <errno.h> /* ENOMEM */
+#include <stdlib.h> /* free() */
+#include <string.h> /* strerror() */
+
+#ifdef HAVE_MACHINE_PARAM_H
+/* BSD */
+#include <machine/param.h>
+#include <sys/types.h> /* typedef ushort */
+#include <sys/ipc.h>
+#endif
+
+#include <sys/shm.h> /* shmget(), shmctl() */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/keysym.h>
+#include <X11/extensions/XShm.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+#include "config.h"
+#include "common.h"
+#include "threads.h"
+#include "mtime.h"
+#include "tests.h"
+#include "modules.h"
+
+#include "video.h"
+#include "video_output.h"
+
+#include "interface.h"
+#include "intf_msg.h"
+
+#include "main.h"
+
+/*****************************************************************************
+ * vout_sys_t: video output X11 method descriptor
+ *****************************************************************************
+ * This structure is part of the video output thread descriptor.
+ * It describes the X11 specific properties of an output thread. X11 video
+ * output is performed through regular resizable windows. Windows can be
+ * dynamically resized to adapt to the size of the streams.
+ *****************************************************************************/
+typedef struct vout_sys_s
+{
+ /* User settings */
+#if 0
+ /* this plugin (currently) requires the SHM Ext... */
+ boolean_t b_shm; /* shared memory extension flag */
+#endif
+
+ /* Internal settings and properties */
+ Display * p_display; /* display pointer */
+ int i_screen; /* screen number */
+ Window window; /* root window */
+ GC gc; /* graphic context instance handler */
+ int xv_port;
+
+ /* Display buffers and shared memory information */
+ /* Note: only 1 buffer (I don't know why the X11 plugin had 2.) */
+ XvImage * p_xvimage;
+ XShmSegmentInfo shm_info; /* shared memory zone information */
+
+ /* X11 generic properties */
+ Atom wm_protocols;
+ Atom wm_delete_window;
+
+ int i_width; /* width of main window */
+ int i_height; /* height of main window */
+
+ /* Screen saver properties */
+ int i_ss_timeout; /* timeout */
+ int i_ss_interval; /* interval between changes */
+ int i_ss_blanking; /* blanking mode */
+ int i_ss_exposure; /* exposure mode */
+
+ /* Mouse pointer properties */
+ boolean_t b_mouse; /* is the mouse pointer displayed ? */
+
+} vout_sys_t;
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int vout_Probe ( probedata_t * );
+static int vout_Create ( vout_thread_t * );
+static int vout_Init ( vout_thread_t * );
+static void vout_End ( vout_thread_t * );
+static void vout_Destroy ( vout_thread_t * );
+static int vout_Manage ( vout_thread_t * );
+static void vout_Display ( vout_thread_t * );
+static void vout_SetPalette( vout_thread_t *, u16 *, u16 *, u16 *, u16 * );
+
+static int XVideoCreateWindow ( vout_thread_t * );
+static int XVideoCreateShmImage ( vout_thread_t *, XvImage **,
+ XShmSegmentInfo *p_shm_info );
+static void XVideoDestroyShmImage ( vout_thread_t *, XvImage *,
+ XShmSegmentInfo * );
+static void XVideoTogglePointer ( vout_thread_t * );
+static void XVideoEnableScreenSaver ( vout_thread_t * );
+static void XVideoDisableScreenSaver ( vout_thread_t * );
+
+static int XVideoCheckForXv ( Display * );
+static void XVideoOutputCoords ( const picture_t *, const boolean_t,
+ const int, const int,
+ int *, int *, int *, int * );
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+void _M( vout_getfunctions )( function_list_t * p_function_list )
+{
+ p_function_list->pf_probe = vout_Probe;
+ p_function_list->functions.vout.pf_create = vout_Create;
+ p_function_list->functions.vout.pf_init = vout_Init;
+ p_function_list->functions.vout.pf_end = vout_End;
+ p_function_list->functions.vout.pf_destroy = vout_Destroy;
+ p_function_list->functions.vout.pf_manage = vout_Manage;
+ p_function_list->functions.vout.pf_display = vout_Display;
+ p_function_list->functions.vout.pf_setpalette = vout_SetPalette;
+}
+
+/*****************************************************************************
+ * vout_Probe: probe the video driver and return a score
+ *****************************************************************************
+ * This returns a score to the plugin manager so that it can select the best
+ * plugin.
+ *****************************************************************************/
+static int vout_Probe( probedata_t *p_data )
+{
+ if( TestMethod( VOUT_METHOD_VAR, "xvideo" ) )
+ {
+ return( 999 );
+ }
+
+ return( 90 );
+}
+
+/*****************************************************************************
+ * vout_Create: allocate XVideo video thread output method
+ *****************************************************************************
+ * This function allocate and initialize a X11 vout method. It uses some of the
+ * vout properties to choose the window size, and change them according to the
+ * actual properties of the display.
+ *****************************************************************************/
+static int vout_Create( vout_thread_t *p_vout )
+{
+ char *psz_display;
+
+ /* Allocate structure */
+ p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
+ if( p_vout->p_sys == NULL )
+ {
+ intf_ErrMsg( "vout error: %s", strerror(ENOMEM) );
+ return( 1 );
+ }
+
+ /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
+ psz_display = XDisplayName( main_GetPszVariable( VOUT_DISPLAY_VAR, NULL ) );
+ p_vout->p_sys->p_display = XOpenDisplay( psz_display );
+
+ if( p_vout->p_sys->p_display == NULL ) /* error */
+ {
+ intf_ErrMsg( "vout error: cannot open display %s", psz_display );
+ free( p_vout->p_sys );
+ return( 1 );
+ }
+ p_vout->p_sys->i_screen = DefaultScreen( p_vout->p_sys->p_display );
+
+ if( !XVideoCheckForXv( p_vout->p_sys->p_display ) )
+ {
+ intf_ErrMsg( "vout error: no XVideo extension" );
+ XCloseDisplay( p_vout->p_sys->p_display );
+ free( p_vout->p_sys );
+ return( 1 );
+ }
+
+ /* Spawn base window - this window will include the video output window,
+ * but also command buttons, subtitles and other indicators */
+ if( XVideoCreateWindow( p_vout ) )
+ {
+ intf_ErrMsg( "vout error: cannot create XVideo window" );
+ XCloseDisplay( p_vout->p_sys->p_display );
+ free( p_vout->p_sys );
+ return( 1 );
+ }
+
+ p_vout->p_sys->b_mouse = 1;
+
+ /* Disable screen saver and return */
+ XVideoDisableScreenSaver( p_vout );
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * vout_Init: initialize XVideo video thread output method
+ *****************************************************************************
+ * This function create the XImages needed by the output thread. It is called
+ * at the beginning of the thread, but also each time the window is resized.
+ *****************************************************************************/
+static int vout_Init( vout_thread_t *p_vout )
+{
+ int i_err;
+
+#ifdef SYS_DARWIN1_3
+ /* FIXME : As of 2001-03-16, XFree4 for MacOS X does not support Xshm. */
+ p_vout->p_sys->b_shm = 0;
+#endif
+
+ /* Create XImages using XShm extension */
+ i_err = XVideoCreateShmImage( p_vout, &p_vout->p_sys->p_xvimage,
+ &p_vout->p_sys->shm_info );
+ if( i_err )
+ {
+ intf_Msg( "vout: XShm video extension unavailable" );
+ /* p_vout->p_sys->b_shm = 0; */
+ }
+ p_vout->b_need_render = 0; /* = 1 if not using Xv extension. */
+
+ /* Set bytes per line and initialize buffers */
+ p_vout->i_bytes_per_line =
+ (p_vout->p_sys->p_xvimage->data_size) /
+ (p_vout->p_sys->p_xvimage->height);
+
+ /* vout_SetBuffers( p_vout, p_vout->p_sys->p_xvimage[0]->data,
+ * p_vout->p_sys->p_xvimage[1]->data ); */
+ p_vout->p_buffer[0].i_pic_x = 0;
+ p_vout->p_buffer[0].i_pic_y = 0;
+ p_vout->p_buffer[0].i_pic_width = 0;
+ p_vout->p_buffer[0].i_pic_height = 0;
+
+ /* The first area covers all the screen */
+ p_vout->p_buffer[0].i_areas = 1;
+ p_vout->p_buffer[0].pi_area_begin[0] = 0;
+ p_vout->p_buffer[0].pi_area_end[0] = p_vout->i_height - 1;
+
+ /* Set addresses */
+ p_vout->p_buffer[0].p_data = p_vout->p_sys->p_xvimage->data;
+ return( 0 );
+}
+
+/*****************************************************************************
+ * vout_End: terminate XVideo video thread output method
+ *****************************************************************************
+ * Destroy the XVideo xImages created by vout_Init. It is called at the end of
+ * the thread, but also each time the window is resized.
+ *****************************************************************************/
+static void vout_End( vout_thread_t *p_vout )
+{
+ XVideoDestroyShmImage( p_vout, p_vout->p_sys->p_xvimage,
+ &p_vout->p_sys->shm_info );
+}
+
+/*****************************************************************************
+ * vout_Destroy: destroy XVideo video thread output method
+ *****************************************************************************
+ * Terminate an output method created by vout_CreateOutputMethod
+ *****************************************************************************/
+static void vout_Destroy( vout_thread_t *p_vout )
+{
+ /* Enable screen saver */
+ XVideoEnableScreenSaver( p_vout );
+
+ /* Destroy window */
+ XUnmapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
+ XFreeGC( p_vout->p_sys->p_display, p_vout->p_sys->gc );
+ XDestroyWindow( p_vout->p_sys->p_display, p_vout->p_sys->window );
+
+ XCloseDisplay( p_vout->p_sys->p_display );
+
+ /* Destroy structure */
+ free( p_vout->p_sys );
+}
+
+/*****************************************************************************
+ * vout_Manage: handle X11 events
+ *****************************************************************************
+ * This function should be called regularly by video output thread. It manages
+ * X11 events and allows window resizing. It returns a non null value on
+ * error.
+ *
+ * XXX Should "factor-out" common code in this and the "same" fn in the x11
+ * XXX plugin!
+ *****************************************************************************/
+static int vout_Manage( vout_thread_t *p_vout )
+{
+ XEvent xevent; /* X11 event */
+ boolean_t b_resized; /* window has been resized */
+ char i_key; /* ISO Latin-1 key */
+
+ /* Handle X11 events: ConfigureNotify events are parsed to know if the
+ * output window's size changed, MapNotify and UnmapNotify to know if the
+ * window is mapped (and if the display is useful), and ClientMessages
+ * to intercept window destruction requests */
+ b_resized = 0;
+ while( XCheckWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ StructureNotifyMask | KeyPressMask |
+ ButtonPressMask | ButtonReleaseMask, &xevent )
+ == True )
+ {
+ /* ConfigureNotify event: prepare */
+ if( (xevent.type == ConfigureNotify)
+ && ((xevent.xconfigure.width != p_vout->p_sys->i_width)
+ || (xevent.xconfigure.height != p_vout->p_sys->i_height)) )
+ {
+ /* Update dimensions */
+#if 0 XXX XXX
+ b_resized = 1;
+ p_vout->p_sys->i_width = xevent.xconfigure.width;
+ p_vout->p_sys->i_height = xevent.xconfigure.height;
+#endif XXX XXX
+ }
+ /* MapNotify event: change window status and disable screen saver */
+ else if( xevent.type == MapNotify)
+ {
+ if( (p_vout != NULL) && !p_vout->b_active )
+ {
+ XVideoDisableScreenSaver( p_vout );
+ p_vout->b_active = 1;
+ }
+ }
+ /* UnmapNotify event: change window status and enable screen saver */
+ else if( xevent.type == UnmapNotify )
+ {
+ if( (p_vout != NULL) && p_vout->b_active )
+ {
+ XVideoEnableScreenSaver( p_vout );
+ p_vout->b_active = 0;
+ }
+ }
+ /* Keyboard event */
+ else if( xevent.type == KeyPress )
+ {
+ if( XLookupString( &xevent.xkey, &i_key, 1, NULL, NULL ) )
+ {
+ /* FIXME: handle stuff here */
+ switch( i_key )
+ {
+ case 'q':
+ /* FIXME: need locking ! */
+ p_main->p_intf->b_die = 1;
+ break;
+ }
+ }
+ }
+ /* Mouse click */
+ else if( xevent.type == ButtonPress )
+ {
+ switch( ((XButtonEvent *)&xevent)->button )
+ {
+ case Button1:
+ /* in this part we will eventually manage
+ * clicks for DVD navigation for instance */
+ break;
+
+ case Button2:
+ XVideoTogglePointer( p_vout );
+ break;
+ }
+ }
+ /* Mouse release */
+ else if( xevent.type == ButtonRelease )
+ {
+ switch( ((XButtonEvent *)&xevent)->button )
+ {
+ case Button3:
+ /* FIXME: need locking ! */
+ p_main->p_intf->b_menu_change = 1;
+ break;
+ }
+ }
+#ifdef DEBUG
+ /* Other event */
+ else
+ {
+ intf_DbgMsg( "%p -> unhandled event type %d received",
+ p_vout, xevent.type );
+ }
+#endif
+ }
+
+ /* ClientMessage event - only WM_PROTOCOLS with WM_DELETE_WINDOW data
+ * are handled - according to the man pages, the format is always 32
+ * in this case */
+ while( XCheckTypedEvent( p_vout->p_sys->p_display,
+ ClientMessage, &xevent ) )
+ {
+ if( (xevent.xclient.message_type == p_vout->p_sys->wm_protocols)
+ && (xevent.xclient.data.l[0] == p_vout->p_sys->wm_delete_window ) )
+ {
+ p_main->p_intf->b_die = 1;
+ }
+ else
+ {
+ intf_DbgMsg( "%p -> unhandled ClientMessage received", p_vout );
+ }
+ }
+
+ if( (p_vout->i_width != p_vout->p_sys->i_width) ||
+ (p_vout->i_height != p_vout->p_sys->i_height) )
+ {
+ /* If video output size has changed, change interface window size */
+ intf_DbgMsg( "resizing output window" );
+ p_vout->p_sys->i_width = p_vout->i_width;
+ p_vout->p_sys->i_height = p_vout->i_height;
+ XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ p_vout->p_sys->i_width, p_vout->p_sys->i_height );
+ }
+
+ if( (p_vout->i_changes & VOUT_GRAYSCALE_CHANGE))
+ {
+ /* FIXME: clear flags ?? */
+ }
+
+ /*
+ * Size change
+ */
+ if( p_vout->i_changes & VOUT_SIZE_CHANGE )
+ {
+ intf_DbgMsg( "vout: resizing window" );
+ p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
+
+ /* Resize window */
+ XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ p_vout->i_width, p_vout->i_height );
+
+ /* Destroy XImages to change their size */
+ vout_End( p_vout );
+
+ /* Recreate XImages. If SysInit failed, the thread cannot go on. */
+ if( vout_Init( p_vout ) )
+ {
+ intf_ErrMsg( "vout error: cannot resize display" );
+ return( 1 );
+ }
+
+ intf_Msg( "vout: video display resized (%dx%d)",
+ p_vout->i_width, p_vout->i_height );
+ }
+
+ return 0;
+}
+
+
+/*****************************************************************************
+ * vout_Display: displays previously rendered output
+ *****************************************************************************
+ * This function send the currently rendered image to X11 server, wait until
+ * it is displayed and switch the two rendering buffer, preparing next frame.
+ *****************************************************************************/
+static void vout_Display( vout_thread_t *p_vout )
+{
+ boolean_t b_draw = 1;
+ const int i_size = p_vout->i_width * p_vout->i_height;
+
+ switch( p_vout->p_rendered_pic->i_type )
+ {
+ case YUV_422_PICTURE:
+ intf_ErrMsg( "vout error: YUV_422_PICTURE not (yet) supported" );
+ b_draw = 0;
+ break;
+
+ case YUV_444_PICTURE:
+ intf_ErrMsg( "vout error: YUV_444_PICTURE not (yet) supported" );
+ b_draw = 0;
+ break;
+
+ case YUV_420_PICTURE:
+ memcpy( p_vout->p_sys->p_xvimage->data,
+ p_vout->p_rendered_pic->p_y, i_size );
+ memcpy( p_vout->p_sys->p_xvimage->data + ( i_size ),
+ p_vout->p_rendered_pic->p_v, i_size / 4 );
+ memcpy( p_vout->p_sys->p_xvimage->data + ( i_size ) + ( i_size / 4 ),
+ p_vout->p_rendered_pic->p_u, i_size / 4 );
+ break;
+ }
+
+ if( b_draw )
+ {
+ int i_dummy, i_src_width, i_src_height,
+ i_dest_width, i_dest_height, i_dest_x, i_dest_y;
+ Window window;
+
+ /* Could use p_vout->p_sys->i_width and p_vout->p_sys->i_height
+ *instead of calling XGetGeometry? */
+ XGetGeometry( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ &window, &i_dummy, &i_dummy,
+ &i_src_width, &i_src_height, &i_dummy, &i_dummy );
+
+ XVideoOutputCoords( p_vout->p_rendered_pic, p_vout->b_scale,
+ i_src_width, i_src_height, &i_dest_x, &i_dest_y,
+ &i_dest_width, &i_dest_height);
+
+ XvShmPutImage( p_vout->p_sys->p_display, p_vout->p_sys->xv_port,
+ p_vout->p_sys->window, p_vout->p_sys->gc,
+ p_vout->p_sys->p_xvimage,
+ 0 /*src_x*/, 0 /*src_y*/,
+ p_vout->p_rendered_pic->i_width,
+ p_vout->p_rendered_pic->i_height,
+ i_dest_x, i_dest_y, i_dest_width, i_dest_height,
+ True );
+ }
+}
+
+static void vout_SetPalette( p_vout_thread_t p_vout,
+ u16 *red, u16 *green, u16 *blue, u16 *transp )
+{
+ return;
+}
+
+/* following functions are local */
+
+/*****************************************************************************
+ * XVideoCheckForXv: check for the XVideo extension
+ *****************************************************************************/
+static int XVideoCheckForXv( Display *dpy )
+{
+ unsigned int i;
+
+ switch( XvQueryExtension( dpy, &i, &i, &i, &i, &i ) )
+ {
+ case Success:
+ return( 1 );
+
+ case XvBadExtension:
+ intf_ErrMsg( "vout error: XvBadExtension" );
+ return( 0 );
+
+ case XvBadAlloc:
+ intf_ErrMsg( "vout error: XvBadAlloc" );
+ return( 0 );
+
+ default:
+ intf_ErrMsg( "vout error: XvQueryExtension failed" );
+ return( 0 );
+ }
+}
+
+/*****************************************************************************
+ * XVideoCreateWindow: open and set-up XVideo main window
+ *****************************************************************************/
+static int XVideoCreateWindow( vout_thread_t *p_vout )
+{
+ XSizeHints xsize_hints;
+ XSetWindowAttributes xwindow_attributes;
+ XGCValues xgcvalues;
+ XEvent xevent;
+ boolean_t b_expose;
+ boolean_t b_configure_notify;
+ boolean_t b_map_notify;
+
+ /* Set main window's size */
+ p_vout->p_sys->i_width = main_GetIntVariable( VOUT_WIDTH_VAR,
+ VOUT_WIDTH_DEFAULT );
+ p_vout->p_sys->i_height = main_GetIntVariable( VOUT_HEIGHT_VAR,
+ VOUT_HEIGHT_DEFAULT );
+
+ /* Prepare window manager hints and properties */
+ xsize_hints.base_width = p_vout->p_sys->i_width;
+ xsize_hints.base_height = p_vout->p_sys->i_height;
+ xsize_hints.flags = PSize;
+ p_vout->p_sys->wm_protocols = XInternAtom( p_vout->p_sys->p_display,
+ "WM_PROTOCOLS", True );
+ p_vout->p_sys->wm_delete_window = XInternAtom( p_vout->p_sys->p_display,
+ "WM_DELETE_WINDOW", True );
+
+ /* Prepare window attributes */
+ xwindow_attributes.backing_store = Always; /* save the hidden part */
+ xwindow_attributes.background_pixel = WhitePixel( p_vout->p_sys->p_display,
+ p_vout->p_sys->i_screen );
+
+ xwindow_attributes.event_mask = ExposureMask | StructureNotifyMask;
+
+ /* Create the window and set hints - the window must receive ConfigureNotify
+ * events, and, until it is displayed, Expose and MapNotify events. */
+ p_vout->p_sys->window =
+ XCreateWindow( p_vout->p_sys->p_display,
+ DefaultRootWindow( p_vout->p_sys->p_display ),
+ 0, 0,
+ p_vout->p_sys->i_width, p_vout->p_sys->i_height, 1,
+ 0, InputOutput, 0,
+ CWBackingStore | CWBackPixel | CWEventMask,
+ &xwindow_attributes );
+
+ /* Set window manager hints and properties: size hints, command,
+ * window's name, and accepted protocols */
+ XSetWMNormalHints( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ &xsize_hints );
+ XSetCommand( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ p_main->ppsz_argv, p_main->i_argc );
+ XStoreName( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ VOUT_TITLE " (XVideo output)" );
+
+ if( (p_vout->p_sys->wm_protocols == None) /* use WM_DELETE_WINDOW */
+ || (p_vout->p_sys->wm_delete_window == None)
+ || !XSetWMProtocols( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ &p_vout->p_sys->wm_delete_window, 1 ) )
+ {
+ /* WM_DELETE_WINDOW is not supported by window manager */
+ intf_Msg( "vout error: missing or bad window manager" );
+ }
+
+ /* Creation of a graphic context that doesn't generate a GraphicsExpose
+ * event when using functions like XCopyArea */
+ xgcvalues.graphics_exposures = False;
+ p_vout->p_sys->gc = XCreateGC( p_vout->p_sys->p_display,
+ p_vout->p_sys->window,
+ GCGraphicsExposures, &xgcvalues);
+
+ /* Send orders to server, and wait until window is displayed - three
+ * events must be received: a MapNotify event, an Expose event allowing
+ * drawing in the window, and a ConfigureNotify to get the window
+ * dimensions. Once those events have been received, only ConfigureNotify
+ * events need to be received. */
+ b_expose = 0;
+ b_configure_notify = 0;
+ b_map_notify = 0;
+ XMapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window);
+ do
+ {
+ XNextEvent( p_vout->p_sys->p_display, &xevent);
+ if( (xevent.type == Expose)
+ && (xevent.xexpose.window == p_vout->p_sys->window) )
+ {
+ b_expose = 1;
+ }
+ else if( (xevent.type == MapNotify)
+ && (xevent.xmap.window == p_vout->p_sys->window) )
+ {
+ b_map_notify = 1;
+ }
+ else if( (xevent.type == ConfigureNotify)
+ && (xevent.xconfigure.window == p_vout->p_sys->window) )
+ {
+ b_configure_notify = 1;
+ p_vout->p_sys->i_width = xevent.xconfigure.width;
+ p_vout->p_sys->i_height = xevent.xconfigure.height;
+ }
+ } while( !( b_expose && b_configure_notify && b_map_notify ) );
+
+ XSelectInput( p_vout->p_sys->p_display, p_vout->p_sys->window,
+ StructureNotifyMask | KeyPressMask |
+ ButtonPressMask | ButtonReleaseMask );
+
+ /* At this stage, the window is open, displayed, and ready to
+ * receive data */
+ return( 0 );
+}
+
+/*****************************************************************************
+ * XVideoCreateShmImage: create an XImage using shared memory extension
+ *****************************************************************************
+ * Prepare an XImage for DisplayX11ShmImage function.
+ * The order of the operations respects the recommandations of the mit-shm
+ * document by J.Corbet and K.Packard. Most of the parameters were copied from
+ * there.
+ *****************************************************************************/
+static int XVideoCreateShmImage( vout_thread_t *p_vout, XvImage **pp_xvimage,
+ XShmSegmentInfo *p_shm_info)
+{
+ int i_adaptors;
+ XvAdaptorInfo *adaptor_info;
+
+ /* find xv_port... */
+ switch( XvQueryAdaptors( p_vout->p_sys->p_display,
+ DefaultRootWindow( p_vout->p_sys->p_display ),
+ &i_adaptors, &adaptor_info ) )
+ {
+ case Success:
+ break;
+
+ case XvBadExtension:
+ intf_ErrMsg( "vout error: XvBadExtension for XvQueryAdaptors" );
+ return( -1 );
+
+ case XvBadAlloc:
+ intf_ErrMsg( "vout error: XvBadAlloc for XvQueryAdaptors" );
+ return( -1 );
+
+ default:
+ intf_ErrMsg( "vout error: XvQueryAdaptors failed" );
+ return( -1 );
+ }
+
+ /* XXX is this right? */
+ p_vout->p_sys->xv_port = adaptor_info[ i_adaptors - 1 ].base_id;
+
+ #define GUID_YUV12_PLANAR 0x32315659
+
+ *pp_xvimage = XvShmCreateImage( p_vout->p_sys->p_display,
+ p_vout->p_sys->xv_port,
+ GUID_YUV12_PLANAR, 0,
+ p_vout->i_width, p_vout->i_height,
+ p_shm_info );
+
+ p_shm_info->shmid = shmget( IPC_PRIVATE, (*pp_xvimage)->data_size,
+ IPC_CREAT | 0777 );
+ p_shm_info->shmaddr = (*pp_xvimage)->data = shmat( p_shm_info->shmid,
+ 0, 0 );
+ p_shm_info->readOnly = False;
+
+ shmctl( p_shm_info->shmid, IPC_RMID, 0 ); /* XXX */
+
+ if( !XShmAttach(p_vout->p_sys->p_display, p_shm_info) )
+ {
+ intf_ErrMsg( "vout error: XShmAttach failed" );
+ return( -1 );
+ }
+
+ /* Send image to X server. This instruction is required, since having
+ * built a Shm XImage and not using it causes an error on XCloseDisplay */
+ XFlush( p_vout->p_sys->p_display );
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * XVideoDestroyShmImage
+ *****************************************************************************
+ * Destroy XImage AND associated data. Detach shared memory segment from
+ * server and process, then free it. If pointer is NULL, the image won't be
+ * destroyed (see vout_ManageOutputMethod())
+ *****************************************************************************/
+static void XVideoDestroyShmImage( vout_thread_t *p_vout, XvImage *p_xvimage,
+ XShmSegmentInfo *p_shm_info )
+{
+ /* If pointer is NULL, do nothing */
+ if( p_xvimage == NULL )
+ {
+ return;
+ }
+
+ XShmDetach( p_vout->p_sys->p_display, p_shm_info );/* detach from server */
+#if 0
+ XDestroyImage( p_ximage );
+#else
+/* XvDestroyImage( p_xvimage ); XXX */
+#endif
+
+ if( shmdt( p_shm_info->shmaddr ) ) /* detach shared memory from process */
+ { /* also automatic freeing... */
+ intf_ErrMsg( "vout error: cannot detach shared memory (%s)",
+ strerror(errno) );
+ }
+}
+
+/*****************************************************************************
+ * XVideoEnableScreenSaver: enable screen saver
+ *****************************************************************************
+ * This function enable the screen saver on a display after it had been
+ * disabled by XDisableScreenSaver. Both functions use a counter mechanism to
+ * know wether the screen saver can be activated or not: if n successive calls
+ * are made to XDisableScreenSaver, n successive calls to XEnableScreenSaver
+ * will be required before the screen saver could effectively be activated.
+ *****************************************************************************/
+void XVideoEnableScreenSaver( vout_thread_t *p_vout )
+{
+ intf_DbgMsg( "intf: enabling screen saver" );
+ XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
+ p_vout->p_sys->i_ss_interval,
+ p_vout->p_sys->i_ss_blanking,
+ p_vout->p_sys->i_ss_exposure );
+}
+
+/*****************************************************************************
+ * XVideoDisableScreenSaver: disable screen saver
+ *****************************************************************************
+ * See XEnableScreenSaver
+ *****************************************************************************/
+void XVideoDisableScreenSaver( vout_thread_t *p_vout )
+{
+ /* Save screen saver informations */
+ XGetScreenSaver( p_vout->p_sys->p_display, &p_vout->p_sys->i_ss_timeout,
+ &p_vout->p_sys->i_ss_interval,
+ &p_vout->p_sys->i_ss_blanking,
+ &p_vout->p_sys->i_ss_exposure );
+
+ /* Disable screen saver */
+ intf_DbgMsg( "intf: disabling screen saver" );
+ XSetScreenSaver( p_vout->p_sys->p_display, 0,
+ p_vout->p_sys->i_ss_interval,
+ p_vout->p_sys->i_ss_blanking,
+ p_vout->p_sys->i_ss_exposure );
+}
+
+/*****************************************************************************
+ * XVideoTogglePointer: hide or show the mouse pointer
+ *****************************************************************************
+ * This function hides the X pointer if it is visible by putting it at
+ * coordinates (32,32) and setting the pointer sprite to a blank one. To
+ * show it again, we disable the sprite and restore the original coordinates.
+ *****************************************************************************/
+void XVideoTogglePointer( vout_thread_t *p_vout )
+{
+ static Cursor cursor;
+ static boolean_t b_cursor = 0;
+
+ if( p_vout->p_sys->b_mouse )
+ {
+ p_vout->p_sys->b_mouse = 0;
+
+ if( !b_cursor )
+ {
+ XColor color;
+ Pixmap blank = XCreatePixmap( p_vout->p_sys->p_display,
+ DefaultRootWindow(p_vout->p_sys->p_display),
+ 1, 1, 1 );
+
+ XParseColor( p_vout->p_sys->p_display,
+ XCreateColormap( p_vout->p_sys->p_display,
+ DefaultRootWindow(
+ p_vout->p_sys->p_display ),
+ DefaultVisual(
+ p_vout->p_sys->p_display,
+ p_vout->p_sys->i_screen ),
+ AllocNone ),
+ "black", &color );
+
+ cursor = XCreatePixmapCursor( p_vout->p_sys->p_display,
+ blank, blank, &color, &color, 1, 1 );
+
+ b_cursor = 1;
+ }
+ XDefineCursor( p_vout->p_sys->p_display,
+ p_vout->p_sys->window, cursor );
+ }
+ else
+ {
+ p_vout->p_sys->b_mouse = 1;
+
+ XUndefineCursor( p_vout->p_sys->p_display, p_vout->p_sys->window );
+ }
+}
+
+/* This based on some code in SetBufferPicture... At the moment it's only
+ * used by the xvideo plugin, but others may want to use it. */
+static void XVideoOutputCoords( const picture_t *p_pic, const boolean_t scale,
+ const int win_w, const int win_h,
+ int *dx, int *dy, int *w, int *h)
+{
+ if( !scale )
+ {
+ *w = p_pic->i_width; *h = p_pic->i_height;
+ }
+ else
+ {
+ *w = win_w;
+ switch( p_pic->i_aspect_ratio )
+ {
+ case AR_3_4_PICTURE: *h = win_w * 3 / 4; break;
+ case AR_16_9_PICTURE: *h = win_w * 9 / 16; break;
+ case AR_221_1_PICTURE: *h = win_w * 100 / 221; break;
+ case AR_SQUARE_PICTURE:
+ default: *h = win_w; break;
+ }
+
+ if( *h > win_h )
+ {
+ *h = win_h;
+ switch( p_pic->i_aspect_ratio )
+ {
+ case AR_3_4_PICTURE: *w = win_h * 4 / 3; break;
+ case AR_16_9_PICTURE: *w = win_h * 16 / 9; break;
+ case AR_221_1_PICTURE: *w = win_h * 221 / 100; break;
+ case AR_SQUARE_PICTURE:
+ default: *w = win_h; break;
+ }
+ }
+ }
+
+ /* Set picture position */
+ *dx = (win_w - *w) / 2;
+ *dy = (win_h - *h) / 2;
+}
+
--- /dev/null
+/*****************************************************************************
+ * xvideo.c : Xvideo plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2000, 2001 VideoLAN
+ * $Id: xvideo.c,v 1.1 2001/04/01 06:21:44 sam Exp $
+ *
+ * Authors: Shane Harper <shanegh@optusnet.com.au>
+ *
+ * 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.
+ *****************************************************************************/
+
+#define MODULE_NAME xvideo
+#include "modules_inner.h"
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include "defs.h"
+
+#include <stdlib.h> /* malloc(), free() */
+
+#include "config.h"
+#include "common.h" /* boolean_t, byte_t */
+#include "threads.h"
+#include "mtime.h"
+
+#include "video.h"
+#include "video_output.h"
+
+#include "modules.h"
+
+/*****************************************************************************
+ * Building configuration tree
+ *****************************************************************************/
+MODULE_CONFIG_START
+ADD_WINDOW( "Configuration for xvideo module" )
+ ADD_COMMENT( "For now, the xvideo module cannot be configured" )
+MODULE_CONFIG_END
+
+/*****************************************************************************
+ * Capabilities defined in the other files.
+ ******************************************************************************/
+void _M( vout_getfunctions )( function_list_t * p_function_list );
+
+/*****************************************************************************
+ * InitModule: get the module structure and configuration.
+ *****************************************************************************
+ * We have to fill psz_name, psz_longname and psz_version. These variables
+ * will be strdup()ed later by the main application because the module can
+ * be unloaded later to save memory, and we want to be able to access this
+ * data even after the module has been unloaded.
+ *****************************************************************************/
+MODULE_INIT
+{
+ p_module->psz_name = MODULE_STRING;
+ p_module->psz_longname = "XVideo extension module";
+ p_module->psz_version = VERSION;
+
+ p_module->i_capabilities = MODULE_CAPABILITY_NULL
+ | MODULE_CAPABILITY_VOUT;
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * ActivateModule: set the module to an usable state.
+ *****************************************************************************
+ * This function fills the capability functions and the configuration
+ * structure. Once ActivateModule() has been called, the i_usage can
+ * be set to 0 and calls to NeedModule() be made to increment it. To unload
+ * the module, one has to wait until i_usage == 0 and call DeactivateModule().
+ *****************************************************************************/
+MODULE_ACTIVATE
+{
+ p_module->p_functions = malloc( sizeof( module_functions_t ) );
+ if( p_module->p_functions == NULL )
+ {
+ return( -1 );
+ }
+
+ _M( vout_getfunctions )( &p_module->p_functions->vout );
+
+ p_module->p_config = p_config;
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * DeactivateModule: make sure the module can be unloaded.
+ *****************************************************************************
+ * This function must only be called when i_usage == 0. If it successfully
+ * returns, i_usage can be set to -1 and the module unloaded. Be careful to
+ * lock usage_lock during the whole process.
+ *****************************************************************************/
+MODULE_DEACTIVATE
+{
+ free( p_module->p_functions );
+
+ return( 0 );
+}
+