PLAYLIST := playlist
INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock input_info
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
-AUDIO_OUTPUT := audio_output aout_ext-dec aout_pcm aout_spdif
+AUDIO_OUTPUT := audio_output filters input mixer output
MISC := mtime modules threads cpu configuration netutils iso_lang messages objects extras
LIBVLC_OBJ := $(LIBVLC:%=src/%.o) \
#! /bin/sh
## bootstrap.sh file for vlc, the VideoLAN Client
-## $Id: bootstrap.sh,v 1.9 2002/08/07 00:29:36 sam Exp $
+## $Id: bootstrap.sh,v 1.10 2002/08/07 21:36:55 massiot Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
echo -n " + fixing glade bugs: "
for file in gnome_interface.c gtk_interface.c
do
-if grep -q "DO NOT EDIT THIS FILE" modules/gui/gtk/$file
+if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
then
rm -f /tmp/$$.$file.bak
cat > /tmp/$$.$file.bak << EOF
done
file=gtk_support.h
-if grep -q "DO NOT EDIT THIS FILE" modules/gui/gtk/$file
+if grep "DO NOT EDIT THIS FILE" modules/gui/gtk/$file 2>&1 > /dev/null
then
rm -f /tmp/$$.$file.bak
sed 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < modules/gui/gtk/$file > /tmp/$$.$file.bak
ac_help="$ac_help
--enable-mp4 MP4 demux module (default disabled)"
ac_help="$ac_help
- --enable-a52 AC3 support with liba52 (default enabled)"
+ --enable-a52 A/52 support with liba52 (default enabled)"
+ac_help="$ac_help
+ --with-a52=PATH a52 headers and libraries"
ac_help="$ac_help
--with-a52-tree=PATH a52dec tree for static linking "
ac_help="$ac_help
ac_help="$ac_help
Audio plugins:"
ac_help="$ac_help
- --enable-dsp Linux /dev/dsp support (enabled on Linux)"
+ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)"
ac_help="$ac_help
--enable-esd Esound library support (default disabled)"
ac_help="$ac_help
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:736: checking host system type" >&5
+echo "configure:738: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:757: checking target system type" >&5
+echo "configure:759: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:775: checking build system type" >&5
+echo "configure:777: checking build system type" >&5
build_alias=$build
case "$build_alias" in
save_LDFLAGS="${LDFLAGS}"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:809: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:811: 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:838: checking for $ac_word" >&5
+echo "configure:840: 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:868: checking for $ac_word" >&5
+echo "configure:870: 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:919: checking for $ac_word" >&5
+echo "configure:921: 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:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:953: 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 962 "configure"
+#line 964 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:969: \"$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:993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:995: 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:998: checking whether we are using GNU C" >&5
+echo "configure:1000: 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:1007: \"$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:1009: \"$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:1026: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1028: 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
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1058: checking how to run the C preprocessor" >&5
+echo "configure:1060: 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 1073 "configure"
+#line 1075 "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:1079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1081: \"$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 1090 "configure"
+#line 1092 "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:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1098: \"$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 1107 "configure"
+#line 1109 "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:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1115: \"$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
:
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1147: checking for $ac_word" >&5
+echo "configure:1149: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1179: checking for $ac_word" >&5
+echo "configure:1181: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1214: checking for $ac_word" >&5
+echo "configure:1216: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1246: checking for $ac_word" >&5
+echo "configure:1248: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmake", so it can be a program name with args.
set dummy gmake; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1282: checking for $ac_word" >&5
+echo "configure:1284: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "x${GMAKE}" = "xno"; then
echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
-echo "configure:1317: checking whether GNU make is installed" >&5
+echo "configure:1319: checking whether GNU make is installed" >&5
if eval "test \"`echo '$''{'ac_cv_gmake'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1349: checking for $ac_word" >&5
+echo "configure:1351: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:1378: checking for strerror in -lcposix" >&5
+echo "configure:1380: checking for strerror in -lcposix" >&5
ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1386 "configure"
+#line 1388 "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
strerror()
; return 0; }
EOF
-if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1399: \"$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 ANSI C header files""... $ac_c" 1>&6
-echo "configure:1420: checking for ANSI C header files" >&5
+echo "configure:1422: 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 1425 "configure"
+#line 1427 "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:1433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1435: \"$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 1450 "configure"
+#line 1452 "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 1468 "configure"
+#line 1470 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1489 "configure"
+#line 1491 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1502: \"$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 working const""... $ac_c" 1>&6
-echo "configure:1524: checking for working const" >&5
+echo "configure:1526: 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 1529 "configure"
+#line 1531 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1580: \"$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 inline""... $ac_c" 1>&6
-echo "configure:1599: checking for inline" >&5
+echo "configure:1601: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1606 "configure"
+#line 1608 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1639: checking for off_t" >&5
+echo "configure:1641: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1644 "configure"
+#line 1646 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1672: checking for size_t" >&5
+echo "configure:1674: 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 1677 "configure"
+#line 1679 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1707: checking for working alloca.h" >&5
+echo "configure:1709: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1712 "configure"
+#line 1714 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1740: checking for alloca" >&5
+echo "configure:1742: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1745 "configure"
+#line 1747 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1805: checking whether alloca needs Cray hooks" >&5
+echo "configure:1807: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1810 "configure"
+#line 1812 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1835: checking for $ac_func" >&5
+echo "configure:1837: 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 1840 "configure"
+#line 1842 "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:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1865: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1890: checking stack direction for C alloca" >&5
+echo "configure:1892: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1898 "configure"
+#line 1900 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1942: checking for $ac_hdr" >&5
+echo "configure:1944: 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 1947 "configure"
+#line 1949 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1954: \"$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:1981: checking for $ac_func" >&5
+echo "configure:1983: 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 1986 "configure"
+#line 1988 "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:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2011: \"$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:2034: checking for working mmap" >&5
+echo "configure:2036: 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 2042 "configure"
+#line 2044 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:2206: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:2208: checking whether we are using the GNU C Library 2.1 or newer" >&5
if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2211 "configure"
+#line 2213 "configure"
#include "confdefs.h"
#include <features.h>
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2247: checking for $ac_hdr" >&5
+echo "configure:2249: 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 2252 "configure"
+#line 2254 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2259: \"$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*
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2288: checking for $ac_func" >&5
+echo "configure:2290: 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 2293 "configure"
+#line 2295 "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:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:2356: checking for iconv" >&5
+echo "configure:2358: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 2364 "configure"
+#line 2366 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 2386 "configure"
+#line 2388 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:2417: checking for iconv declaration" >&5
+echo "configure:2419: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
+#line 2425 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:2471: checking for nl_langinfo and CODESET" >&5
+echo "configure:2473: checking for nl_langinfo and CODESET" >&5
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2476 "configure"
+#line 2478 "configure"
#include "confdefs.h"
#include <langinfo.h>
int main() {
char* cs = nl_langinfo(CODESET);
; return 0; }
EOF
-if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_langinfo_codeset=yes
else
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2506: checking for LC_MESSAGES" >&5
+echo "configure:2508: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2511 "configure"
+#line 2513 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2539: checking whether NLS is requested" >&5
+echo "configure:2541: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2561: checking whether included gettext is requested" >&5
+echo "configure:2563: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2581: checking for libintl.h" >&5
+echo "configure:2583: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2586 "configure"
+#line 2588 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2593: \"$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 GNU gettext in libc""... $ac_c" 1>&6
-echo "configure:2608: checking for GNU gettext in libc" >&5
+echo "configure:2610: checking for GNU gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2613 "configure"
+#line 2615 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gnugettext1_libc=yes
else
if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
-echo "configure:2638: checking for GNU gettext in libintl" >&5
+echo "configure:2640: checking for GNU gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gt_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $LIBICONV"
cat > conftest.$ac_ext <<EOF
-#line 2645 "configure"
+#line 2647 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gnugettext1_libintl=yes
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2687: checking for $ac_func" >&5
+echo "configure:2689: 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 2692 "configure"
+#line 2694 "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:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2717: \"$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
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2744: checking for $ac_word" >&5
+echo "configure:2746: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2778: checking for $ac_word" >&5
+echo "configure:2780: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2815: checking for $ac_word" >&5
+echo "configure:2817: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2865: checking for $ac_word" >&5
+echo "configure:2867: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2899: checking for $ac_word" >&5
+echo "configure:2901: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2935: checking for $ac_word" >&5
+echo "configure:2937: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3006: checking for $ac_word" >&5
+echo "configure:3008: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_verc_fail=yes
else
echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:3039: checking version of bison" >&5
+echo "configure:3041: checking version of bison" >&5
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3086: checking for catalogs to be installed" >&5
+echo "configure:3088: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
useit=no
# 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:3138: checking for a BSD compatible install" >&5
+echo "configure:3140: 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
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3220: checking for $ac_word" >&5
+echo "configure:3222: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3252: checking for $ac_word" >&5
+echo "configure:3254: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3326: checking for $ac_func" >&5
+echo "configure:3328: 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 3331 "configure"
+#line 3333 "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:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:3380: checking for connect" >&5
+echo "configure:3382: 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 3385 "configure"
+#line 3387 "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:3408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3410: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3427: checking for connect in -lsocket" >&5
+echo "configure:3429: 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 3435 "configure"
+#line 3437 "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:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for send""... $ac_c" 1>&6
-echo "configure:3471: checking for send" >&5
+echo "configure:3473: checking for send" >&5
if eval "test \"`echo '$''{'ac_cv_func_send'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3476 "configure"
+#line 3478 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char send(); below. */
; return 0; }
EOF
-if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_send=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for send in -lsocket""... $ac_c" 1>&6
-echo "configure:3518: checking for send in -lsocket" >&5
+echo "configure:3520: checking for send in -lsocket" >&5
ac_lib_var=`echo socket'_'send | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3526 "configure"
+#line 3528 "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
send()
; return 0; }
EOF
-if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3539: \"$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:3561: checking for gethostbyname" >&5
+echo "configure:3563: 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 3566 "configure"
+#line 3568 "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:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3591: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3608: checking for gethostbyname in -lnsl" >&5
+echo "configure:3610: 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 3616 "configure"
+#line 3618 "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:3627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3629: \"$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:3651: checking for gethostbyname" >&5
+echo "configure:3653: 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 3656 "configure"
+#line 3658 "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:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3681: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:3698: checking for gethostbyname in -lbind" >&5
+echo "configure:3700: checking for gethostbyname in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3706 "configure"
+#line 3708 "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:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3719: \"$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
have_nanosleep=0
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
-echo "configure:3742: checking for nanosleep" >&5
+echo "configure:3744: 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 3747 "configure"
+#line 3749 "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:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_nanosleep=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
-echo "configure:3789: checking for nanosleep in -lrt" >&5
+echo "configure:3791: 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 3797 "configure"
+#line 3799 "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:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3810: \"$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:3827: checking for nanosleep in -lposix4" >&5
+echo "configure:3829: 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 3835 "configure"
+#line 3837 "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:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3848: \"$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
# HP/UX port
echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
-echo "configure:3880: checking for sem_init in -lrt" >&5
+echo "configure:3882: checking for sem_init in -lrt" >&5
ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3888 "configure"
+#line 3890 "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
sem_init()
; return 0; }
EOF
-if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3901: \"$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 inet_aton""... $ac_c" 1>&6
-echo "configure:3921: checking for inet_aton" >&5
+echo "configure:3923: 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 3926 "configure"
+#line 3928 "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:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3951: \"$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
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3968: checking for inet_aton in -lresolv" >&5
+echo "configure:3970: 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 3976 "configure"
+#line 3978 "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:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3989: \"$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 textdomain""... $ac_c" 1>&6
-echo "configure:4011: checking for textdomain" >&5
+echo "configure:4013: checking for textdomain" >&5
if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4016 "configure"
+#line 4018 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char textdomain(); below. */
; return 0; }
EOF
-if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_textdomain=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
-echo "configure:4058: checking for textdomain in -lintl" >&5
+echo "configure:4060: checking for textdomain in -lintl" >&5
ac_lib_var=`echo intl'_'textdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4066 "configure"
+#line 4068 "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
textdomain()
; return 0; }
EOF
-if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4079: \"$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
NEED_GETOPT=0
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:4105: checking for getopt_long" >&5
+echo "configure:4107: 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 4110 "configure"
+#line 4112 "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:4133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getopt_long=yes"
else
echo "$ac_t""no" 1>&6
# FreeBSD has a gnugetopt library for this:
echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
-echo "configure:4155: checking for getopt_long in -lgnugetopt" >&5
+echo "configure:4157: checking for getopt_long in -lgnugetopt" >&5
ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4163 "configure"
+#line 4165 "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
getopt_long()
; return 0; }
EOF
-if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4176: \"$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 return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4202: checking return type of signal handlers" >&5
+echo "configure:4204: 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 4207 "configure"
+#line 4209 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4226: \"$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:4243: checking for dlopen in -ldl" >&5
+echo "configure:4245: 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 4251 "configure"
+#line 4253 "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:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4264: \"$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 cos in -lm""... $ac_c" 1>&6
-echo "configure:4283: checking for cos in -lm" >&5
+echo "configure:4285: checking for cos in -lm" >&5
ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4291 "configure"
+#line 4293 "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
cos()
; return 0; }
EOF
-if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4304: \"$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 pow in -lm""... $ac_c" 1>&6
-echo "configure:4324: checking for pow in -lm" >&5
+echo "configure:4326: checking for pow in -lm" >&5
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4332 "configure"
+#line 4334 "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
pow()
; return 0; }
EOF
-if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4345: \"$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
THREAD_LIB=error
if test "x${THREAD_LIB}" = "xerror"; then
echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:4372: checking for main in -lpthread" >&5
+echo "configure:4374: checking for main in -lpthread" >&5
ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4380 "configure"
+#line 4382 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4389: \"$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
if test "x${THREAD_LIB}" = "xerror"; then
echo $ac_n "checking for main in -lpthreads""... $ac_c" 1>&6
-echo "configure:4410: checking for main in -lpthreads" >&5
+echo "configure:4412: checking for main in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4418 "configure"
+#line 4420 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4427: \"$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
if test "x${THREAD_LIB}" = "xerror"; then
echo $ac_n "checking for main in -lc_r""... $ac_c" 1>&6
-echo "configure:4448: checking for main in -lc_r" >&5
+echo "configure:4450: checking for main in -lc_r" >&5
ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4456 "configure"
+#line 4458 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4465: \"$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
if test "x${THREAD_LIB}" = "xerror"; then
echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
-echo "configure:4486: checking for pthread_mutex_lock" >&5
+echo "configure:4488: checking for pthread_mutex_lock" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4491 "configure"
+#line 4493 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_mutex_lock(); below. */
; return 0; }
EOF
-if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pthread_mutex_lock=yes"
else
fi
echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
-echo "configure:4537: checking for cthread_fork in -lthreads" >&5
+echo "configure:4539: checking for cthread_fork in -lthreads" >&5
ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4545 "configure"
+#line 4547 "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
cthread_fork()
; return 0; }
EOF
-if { (eval echo configure:4556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4558: \"$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
cat > conftest.$ac_ext <<EOF
-#line 4578 "configure"
+#line 4580 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4594 "configure"
+#line 4596 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 4610 "configure"
+#line 4612 "configure"
#include "confdefs.h"
#include <strings.h>
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4630: checking for $ac_hdr" >&5
+echo "configure:4632: 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 4635 "configure"
+#line 4637 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4642: \"$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:4670: checking for $ac_hdr" >&5
+echo "configure:4672: 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 4675 "configure"
+#line 4677 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4682: \"$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:4710: checking for $ac_hdr" >&5
+echo "configure:4712: 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 4715 "configure"
+#line 4717 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4722: \"$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:4750: checking for $ac_hdr" >&5
+echo "configure:4752: 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 4755 "configure"
+#line 4757 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4762: \"$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:4790: checking for $ac_hdr" >&5
+echo "configure:4792: 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 4795 "configure"
+#line 4797 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4802: \"$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:4830: checking for $ac_hdr" >&5
+echo "configure:4832: 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 4835 "configure"
+#line 4837 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4842: \"$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*
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4868: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4870: 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 4873 "configure"
+#line 4875 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
cat > conftest.$ac_ext <<EOF
-#line 4904 "configure"
+#line 4906 "configure"
#include "confdefs.h"
#include <time.h>
EOF
cat > conftest.$ac_ext <<EOF
-#line 4922 "configure"
+#line 4924 "configure"
#include "confdefs.h"
#include <sys/time.h>
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4943: checking for $ac_hdr" >&5
+echo "configure:4945: 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 4948 "configure"
+#line 4950 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4955: \"$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:4994: checking for $ac_hdr" >&5
+echo "configure:4996: 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 4999 "configure"
+#line 5001 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5006: \"$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*
EOF
cat > conftest.$ac_ext <<EOF
-#line 5026 "configure"
+#line 5028 "configure"
#include "confdefs.h"
#include <X11/extensions/dpms.h>
EOF
fi
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:5052: checking for ntohl in sys/param.h" >&5
+echo "configure:5054: checking for ntohl in sys/param.h" >&5
if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -Wall -Werror"
cat > conftest.$ac_ext <<EOF
-#line 5058 "configure"
+#line 5060 "configure"
#include "confdefs.h"
#include <sys/param.h>
int main() {
void foo() { int meuh; ntohl(meuh); }
; return 0; }
EOF
-if { (eval echo configure:5065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_ntohl_sys_param_h=yes
else
fi
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
-echo "configure:5086: checking if \$CC accepts -finline-limit" >&5
+echo "configure:5088: checking if \$CC accepts -finline-limit" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -finline-limit-30000"
cat > conftest.$ac_ext <<EOF
-#line 5092 "configure"
+#line 5094 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline_limit=yes
else
fi
echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
-echo "configure:5117: checking if \$CC accepts -Wall -Winline" >&5
+echo "configure:5119: checking if \$CC accepts -Wall -Winline" >&5
if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="-Wall -Winline ${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5123 "configure"
+#line 5125 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_Wall_Winline=yes
else
save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
else
echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
-echo "configure:5147: checking if \$CC accepts -wall -winline" >&5
+echo "configure:5149: checking if \$CC accepts -wall -winline" >&5
if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="-wall -winline ${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5153 "configure"
+#line 5155 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_wall_winline=yes
else
fi
echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
-echo "configure:5179: checking if \$CC accepts -pipe" >&5
+echo "configure:5181: checking if \$CC accepts -pipe" >&5
if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -pipe"
cat > conftest.$ac_ext <<EOF
-#line 5185 "configure"
+#line 5187 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_pipe=yes
else
fi
echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
-echo "configure:5210: checking if \$CC accepts -O3" >&5
+echo "configure:5212: checking if \$CC accepts -O3" >&5
if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -O3"
cat > conftest.$ac_ext <<EOF
-#line 5216 "configure"
+#line 5218 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_o3=yes
else
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
else
echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
-echo "configure:5240: checking if \$CC accepts -O2" >&5
+echo "configure:5242: checking if \$CC accepts -O2" >&5
if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -O2"
cat > conftest.$ac_ext <<EOF
-#line 5246 "configure"
+#line 5248 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_o2=yes
else
CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
else
echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
-echo "configure:5270: checking if \$CC accepts -O" >&5
+echo "configure:5272: checking if \$CC accepts -O" >&5
if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -O"
cat > conftest.$ac_ext <<EOF
-#line 5276 "configure"
+#line 5278 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_o=yes
else
fi
echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
-echo "configure:5303: checking if \$CC accepts -ffast-math" >&5
+echo "configure:5305: checking if \$CC accepts -ffast-math" >&5
if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -ffast-math"
cat > conftest.$ac_ext <<EOF
-#line 5309 "configure"
+#line 5311 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_fast_math=yes
else
fi
echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
-echo "configure:5334: checking if \$CC accepts -funroll-loops" >&5
+echo "configure:5336: checking if \$CC accepts -funroll-loops" >&5
if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -funroll-loops"
cat > conftest.$ac_ext <<EOF
-#line 5340 "configure"
+#line 5342 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_unroll_loops=yes
else
fi
echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
-echo "configure:5365: checking if \$CC accepts -fomit-frame-pointer" >&5
+echo "configure:5367: checking if \$CC accepts -fomit-frame-pointer" >&5
if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
cat > conftest.$ac_ext <<EOF
-#line 5371 "configure"
+#line 5373 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_omit_frame_pointer=yes
else
fi
echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
-echo "configure:5398: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
+echo "configure:5400: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
cat > conftest.$ac_ext <<EOF
-#line 5404 "configure"
+#line 5406 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_ld_darwin=yes
else
fi
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
-echo "configure:5429: checking if \$CC accepts -shared" >&5
+echo "configure:5431: checking if \$CC accepts -shared" >&5
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -shared"
cat > conftest.$ac_ext <<EOF
-#line 5435 "configure"
+#line 5437 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_ld_plugins=yes
else
fi
echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
-echo "configure:5460: checking for variadic cpp macros" >&5
+echo "configure:5462: checking for variadic cpp macros" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5466 "configure"
+#line 5468 "configure"
#include "confdefs.h"
#include <stdio.h>
#define a(b,c...) printf(b,##c)
a("foo");a("%s","bar");a("%s%s","baz","quux");
; return 0; }
EOF
-if { (eval echo configure:5474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cpp_variadic_macros=yes
else
fi
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
-echo "configure:5495: checking __attribute__ ((aligned ())) support" >&5
+echo "configure:5497: checking __attribute__ ((aligned ())) support" >&5
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -Werror"
for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
cat > conftest.$ac_ext <<EOF
-#line 5503 "configure"
+#line 5505 "configure"
#include "confdefs.h"
int main() {
static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;
; return 0; }
EOF
-if { (eval echo configure:5510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"
else
PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts"
-PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/mpeg_video/mpeg_video codec/lpcm/lpcm codec/spdif/spdif codec/spudec/spudec"
+PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec"
+#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm codec/spdif/spdif"
PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
-PLUGINS="${PLUGINS} visualization/scope/scope"
+PLUGINS="${PLUGINS} audio_mixer/trivial"
+PLUGINS="${PLUGINS} audio_output/file"
+#PLUGINS="${PLUGINS} visualization/scope/scope"
PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"
MMX_MODULES="misc/memcpy/memcpymmx codec/mpeg_video/idct/idctmmx codec/mpeg_video/motion/motionmmx video_chroma/i420_rgb_mmx video_chroma/i420_yuy2_mmx video_chroma/i422_yuy2_mmx video_chroma/i420_ymga_mmx"
ALTIVEC_MODULES="codec/mpeg_video/idct/idctaltivec codec/mpeg_video/motion/motionaltivec misc/memcpy/memcpyaltivec"
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
-echo "configure:5555: checking if \$CC groks MMX inline assembly" >&5
+echo "configure:5560: checking if \$CC groks MMX inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5561 "configure"
+#line 5566 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
-if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mmx_inline=yes
else
fi
echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
-echo "configure:5586: checking if \$CC groks MMX EXT inline assembly" >&5
+echo "configure:5591: checking if \$CC groks MMX EXT inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5592 "configure"
+#line 5597 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
-if { (eval echo configure:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mmxext_inline=yes
else
fi
echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
-echo "configure:5617: checking if \$CC groks 3D Now! inline assembly" >&5
+echo "configure:5622: checking if \$CC groks 3D Now! inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5623 "configure"
+#line 5628 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
; return 0; }
EOF
-if { (eval echo configure:5630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_3dnow_inline=yes
else
fi
echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
-echo "configure:5652: checking if \$CC groks SSE inline assembly" >&5
+echo "configure:5657: checking if \$CC groks SSE inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5658 "configure"
+#line 5663 "configure"
#include "confdefs.h"
int main() {
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
; return 0; }
EOF
-if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sse_inline=yes
else
# we should be able to remove this test with future versions of mingw32
if test "x${SYS}" != "xmingw32"; then
echo $ac_n "checking if \$CC groks AltiVec inline assembly""... $ac_c" 1>&6
-echo "configure:5690: checking if \$CC groks AltiVec inline assembly" >&5
+echo "configure:5695: checking if \$CC groks AltiVec inline assembly" >&5
if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS}"
cat > conftest.$ac_ext <<EOF
-#line 5696 "configure"
+#line 5701 "configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
-if { (eval echo configure:5703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_altivec_inline=yes
else
rm -rf conftest*
CFLAGS="${save_CFLAGS} -Wa,-m7400"
cat > conftest.$ac_ext <<EOF
-#line 5712 "configure"
+#line 5717 "configure"
#include "confdefs.h"
int main() {
asm volatile("vperm 0,1,2,3");
; return 0; }
EOF
-if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_altivec_inline="-Wa,-m7400"
else
fi
echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6
-echo "configure:5750: checking if \$CC groks AltiVec C extensions" >&5
+echo "configure:5755: checking if \$CC groks AltiVec C extensions" >&5
if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -faltivec"
# Darwin test
cat > conftest.$ac_ext <<EOF
-#line 5757 "configure"
+#line 5762 "configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
-if { (eval echo configure:5764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_altivec=-faltivec
else
# Linux/PPC test
CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
cat > conftest.$ac_ext <<EOF
-#line 5775 "configure"
+#line 5780 "configure"
#include "confdefs.h"
int main() {
vec_mtvscr((vector unsigned int)(0));
; return 0; }
EOF
-if { (eval echo configure:5782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_altivec="-fvec"
else
fi
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
-echo "configure:5812: checking if linker needs -framework vecLib" >&5
+echo "configure:5817: checking if linker needs -framework vecLib" >&5
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
cat > conftest.$ac_ext <<EOF
-#line 5818 "configure"
+#line 5823 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_ld_altivec=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5957: checking for $ac_hdr" >&5
+echo "configure:5962: 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 5962 "configure"
+#line 5967 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5972: \"$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*
else
echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
-echo "configure:5998: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
+echo "configure:6003: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
if test "x${real_dvdcss_tree}" = "x"
then
;;
*)
echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
-echo "configure:6024: checking for dvdcss headers in ${with_dvdcss}" >&5
+echo "configure:6029: checking for dvdcss headers in ${with_dvdcss}" >&5
if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
then
echo "$ac_t""yes" 1>&6
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6066: checking for $ac_hdr" >&5
+echo "configure:6071: 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 6071 "configure"
+#line 6076 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6081: \"$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*
EOF
cat > conftest.$ac_ext <<EOF
-#line 6098 "configure"
+#line 6103 "configure"
#include "confdefs.h"
#include <dvdread/dvd_reader.h>
int main() {
void foo() { int i=DVD_VIDEO_LB_LEN; }
; return 0; }
EOF
-if { (eval echo configure:6105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
PLUGINS="${PLUGINS} access/dvdread/dvdread"
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6170: checking for $ac_hdr" >&5
+echo "configure:6175: 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 6175 "configure"
+#line 6180 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6185: \"$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:6252: checking for $ac_hdr" >&5
+echo "configure:6257: 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 6257 "configure"
+#line 6262 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6267: \"$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*
else
echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
-echo "configure:6291: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
+echo "configure:6296: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
if test "x${real_dvbpsi_tree}" = "x"
then
;;
*)
echo $ac_n "checking for dvbpsi headers in ${with_dvbpsi}""... $ac_c" 1>&6
-echo "configure:6314: checking for dvbpsi headers in ${with_dvbpsi}" >&5
+echo "configure:6319: checking for dvbpsi headers in ${with_dvbpsi}" >&5
if test "x${with_dvbpsi}" = "x"
then
test_LDFLAGS=""
CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
-echo "configure:6326: checking for dvbpsi/dr.h" >&5
+echo "configure:6331: checking for dvbpsi/dr.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6331 "configure"
+#line 6336 "configure"
#include "confdefs.h"
#include <dvbpsi/dr.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6341: \"$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:6384: checking for $ac_hdr" >&5
+echo "configure:6389: 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 6389 "configure"
+#line 6394 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6399: \"$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 "x${enable_vcd}" != "xno"
then
cat > conftest.$ac_ext <<EOF
-#line 6434 "configure"
+#line 6439 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
cat > conftest.$ac_ext <<EOF
-#line 6449 "configure"
+#line 6454 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
then
have_ipv6=0
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
-echo "configure:6493: checking for inet_pton" >&5
+echo "configure:6498: checking for inet_pton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6498 "configure"
+#line 6503 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_pton(); below. */
; return 0; }
EOF
-if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_pton=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
-echo "configure:6540: checking for inet_pton in -lresolv" >&5
+echo "configure:6545: checking for inet_pton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_pton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6548 "configure"
+#line 6553 "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_pton()
; return 0; }
EOF
-if { (eval echo configure:6559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6564: \"$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 sockaddr_in6 in netinet/in.h""... $ac_c" 1>&6
-echo "configure:6584: checking for sockaddr_in6 in netinet/in.h" >&5
+echo "configure:6589: checking for sockaddr_in6 in netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6586 "configure"
+#line 6591 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
if test "x${SYS}" = "xmingw32"
then
echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
-echo "configure:6607: checking for getaddrinfo in ws2tcpip.h" >&5
+echo "configure:6612: checking for getaddrinfo in ws2tcpip.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6609 "configure"
+#line 6614 "configure"
#include "confdefs.h"
#include <ws2tcpip.h>
EOF
{ echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
fi
echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
-echo "configure:6680: checking for mad.h in ${real_mad_tree}/libmad" >&5
+echo "configure:6685: checking for mad.h in ${real_mad_tree}/libmad" >&5
if test -f ${real_mad_tree}/libmad/mad.h
then
echo "$ac_t""yes" 1>&6
mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6688: checking for mad_bit_init in -lmad" >&5
+echo "configure:6693: checking for mad_bit_init in -lmad" >&5
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6696 "configure"
+#line 6701 "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
mad_bit_init()
; return 0; }
EOF
-if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- BUILTINS="${BUILTINS} codec/mad/mad"
+ #BUILTINS="${BUILTINS} codec/mad/mad"
mad_LDFLAGS="${mad_LDFLAGS} -lmad"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6744: checking for $ac_hdr" >&5
+echo "configure:6749: 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 6749 "configure"
+#line 6754 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6782: checking for mad_bit_init in -lmad" >&5
+echo "configure:6787: checking for mad_bit_init in -lmad" >&5
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lmad $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6790 "configure"
+#line 6795 "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
mad_bit_init()
; return 0; }
EOF
-if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- PLUGINS="${PLUGINS} codec/mad/mad"
+ #PLUGINS="${PLUGINS} codec/mad/mad"
mad_LDFLAGS="${mad_LDFLAGS} -lmad"
else
echo "$ac_t""no" 1>&6
if test "x${with_ffmpeg_tree}" != "x"
then
echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
-echo "configure:6868: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
+echo "configure:6873: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test "x${real_ffmpeg_tree}" = x
then
CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
-echo "configure:6889: checking for avcodec_init in -lavcodec" >&5
+echo "configure:6894: checking for avcodec_init in -lavcodec" >&5
ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lavcodec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6897 "configure"
+#line 6902 "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
avcodec_init()
; return 0; }
EOF
-if { (eval echo configure:6908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6913: \"$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
then
ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
-echo "configure:6946: checking for zlib.h" >&5
+echo "configure:6951: checking for zlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6951 "configure"
+#line 6956 "configure"
#include "confdefs.h"
#include <zlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6961: \"$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 inflateEnd in -lz""... $ac_c" 1>&6
-echo "configure:6973: checking for inflateEnd in -lz" >&5
+echo "configure:6978: checking for inflateEnd in -lz" >&5
ac_lib_var=`echo z'_'inflateEnd | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6981 "configure"
+#line 6986 "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
inflateEnd()
; return 0; }
EOF
-if { (eval echo configure:6992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "x${enable_a52}" != "xno"
then
+ # Check whether --with-a52 or --without-a52 was given.
+if test "${with_a52+set}" = set; then
+ withval="$with_a52"
+ :
+fi
+
# Check whether --with-a52-tree or --without-a52-tree was given.
if test "${with_a52_tree+set}" = set; then
withval="$with_a52_tree"
{ echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
fi
echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
-echo "configure:7044: checking for a52.h in ${real_a52_tree}/include" >&5
+echo "configure:7055: checking for a52.h in ${real_a52_tree}/include" >&5
if test -f ${real_a52_tree}/include/a52.h
then
echo "$ac_t""yes" 1>&6
a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
-echo "configure:7052: checking for a52_free in -la52" >&5
+echo "configure:7063: checking for a52_free in -la52" >&5
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-la52 -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7060 "configure"
+#line 7071 "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
a52_free()
; return 0; }
EOF
-if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7082: \"$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_t""no" 1>&6
{ echo "configure: error: the specified tree doesn't have a52.h" 1>&2; exit 1; }
fi
- else for ac_hdr in a52dec/a52.h
+ else
+ if test "x${with_a52}" = "x"
+ then
+ test_LDFLAGS=""
+ test_CFLAGS=""
+ else
+ test_LDFLAGS="-L${with_a52}/lib"
+ test_CFLAGS="-I${with_a52}/include"
+ fi
+ save_CPPFLAGS="${CPPFLAGS}"
+ save_LDFLAGS="${LDFLAGS}"
+ CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+ LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}"
+ for ac_hdr in a52dec/a52.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7112: checking for $ac_hdr" >&5
+echo "configure:7136: 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 7117 "configure"
+#line 7141 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7146: \"$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*
EOF
echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
-echo "configure:7144: checking for a52_free in -la52" >&5
+echo "configure:7168: checking for a52_free in -la52" >&5
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-la52 -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7152 "configure"
+#line 7176 "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
a52_free()
; return 0; }
EOF
-if { (eval echo configure:7163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7187: \"$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_t""yes" 1>&6
BUILTINS="${BUILTINS} codec/a52/a52"
- a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
- a52_CFLAGS="${a52_CFLAGS}"
+ a52_LDFLAGS="${a52_LDFLAGS} ${test_LDFLAGS} -la52 -lm"
+ a52_CFLAGS="${a52_CFLAGS} ${test_CFLAGS}"
else
echo "$ac_t""no" 1>&6
+
+ if test "x${enable_dvbpsi}" != "x"
+ then
+ { echo "configure: error: Could not find a52 on your system: you may get it from http://liba52.sf.net" 1>&2; exit 1; }
+ fi
+
fi
fi
done
+ CPPFLAGS="${save_CPPFLAGS}"
+ LDFLAGS="${save_LDFLAGS}"
fi
fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7219: checking for $ac_hdr" >&5
+echo "configure:7251: 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 7224 "configure"
+#line 7256 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7261: \"$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:7272: checking for $ac_hdr" >&5
+echo "configure:7304: 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 7277 "configure"
+#line 7309 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7314: \"$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:7334: checking for $ac_hdr" >&5
+echo "configure:7366: 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 7339 "configure"
+#line 7371 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7376: \"$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:7390: checking for $ac_hdr" >&5
+echo "configure:7422: 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 7395 "configure"
+#line 7427 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7432: \"$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="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
-echo "configure:7423: checking for XvPutImage in -lXv_pic" >&5
+echo "configure:7455: checking for XvPutImage in -lXv_pic" >&5
ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXv_pic $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7431 "configure"
+#line 7463 "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
XvPutImage()
; return 0; }
EOF
-if { (eval echo configure:7442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7474: \"$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 XvPutImage in -lXv""... $ac_c" 1>&6
-echo "configure:7464: checking for XvPutImage in -lXv" >&5
+echo "configure:7496: checking for XvPutImage in -lXv" >&5
ac_lib_var=`echo Xv'_'XvPutImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7472 "configure"
+#line 7504 "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
XvPutImage()
; return 0; }
EOF
-if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7515: \"$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
# Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7543: checking for $ac_word" >&5
+echo "configure:7575: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7583: checking for $ac_word" >&5
+echo "configure:7615: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7624: checking for $ac_word" >&5
+echo "configure:7656: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7669: checking for $ac_hdr" >&5
+echo "configure:7701: 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 7674 "configure"
+#line 7706 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7711: \"$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:7749: checking for $ac_hdr" >&5
+echo "configure:7781: 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 7754 "configure"
+#line 7786 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7791: \"$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*
else
echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
-echo "configure:7788: checking for directX headers in ${with_directx}" >&5
+echo "configure:7820: checking for directX headers in ${with_directx}" >&5
if test -f ${with_directx}/ddraw.h
then
PLUGINS="${PLUGINS} video_output/directx/directx"
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7815: checking for $ac_hdr" >&5
+echo "configure:7847: 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 7820 "configure"
+#line 7852 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7857: \"$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*
then
ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
-echo "configure:7920: checking for aalib.h" >&5
+echo "configure:7952: checking for aalib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7925 "configure"
+#line 7957 "configure"
#include "confdefs.h"
#include <aalib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7962: \"$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
-# Check whether --enable-dsp or --disable-dsp was given.
-if test "${enable_dsp+set}" = set; then
- enableval="$enable_dsp"
+# Check whether --enable-oss or --disable-oss was given.
+if test "${enable_oss+set}" = set; then
+ enableval="$enable_oss"
:
fi
-if test "x${enable_dsp}" != "xno" &&
- (test "x${SYS}" != "xmingw32" || test "x${enable_dsp}" = "xyes")
+if test "x${enable_oss}" != "xno" &&
+ (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
then
for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7981: checking for $ac_hdr" >&5
+echo "configure:8013: 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 7986 "configure"
+#line 8018 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8023: \"$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*
#define $ac_tr_hdr 1
EOF
- PLUGINS="${PLUGINS} audio_output/dsp/dsp"
+ #PLUGINS="${PLUGINS} audio_output/oss"
echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
-echo "configure:8014: checking for main in -lossaudio" >&5
+echo "configure:8046: checking for main in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lossaudio $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8022 "configure"
+#line 8054 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:8029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8061: \"$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
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8065: checking for $ac_word" >&5
+echo "configure:8097: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "x${ESD_CONFIG}" != "xno"
then
- PLUGINS="${PLUGINS} audio_output/esd/esd"
+ #PLUGINS="${PLUGINS} audio_output/esd"
esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
fi
# Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8116: checking for $ac_word" >&5
+echo "configure:8148: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "x${ARTS_CONFIG}" != "xno"
then
- PLUGINS="${PLUGINS} audio_output/arts/arts"
+ #PLUGINS="${PLUGINS} audio_output/arts"
arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
fi
then
ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
-echo "configure:8166: checking for alsa/asoundlib.h" >&5
+echo "configure:8198: checking for alsa/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8171 "configure"
+#line 8203 "configure"
#include "confdefs.h"
#include <alsa/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8208: \"$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:8193: checking for main in -lasound" >&5
+echo "configure:8225: 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 8201 "configure"
+#line 8233 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:8208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "x${have_alsa}" = "xtrue"
then
- PLUGINS="${PLUGINS} audio_output/alsa/alsa"
+ #PLUGINS="${PLUGINS} audio_output/alsa"
alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
fi
fi
if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
then
- PLUGINS="${PLUGINS} audio_output/waveout/waveout"
+ #PLUGINS="${PLUGINS} audio_output/waveout"
waveout_LDFLAGS="-lwinmm"
fi
# Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8290: checking for $ac_word" >&5
+echo "configure:8322: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8329: checking for $ac_word" >&5
+echo "configure:8361: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8378: checking for $ac_hdr" >&5
+echo "configure:8410: 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 8383 "configure"
+#line 8415 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8420: \"$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*
# Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8448: checking for $ac_word" >&5
+echo "configure:8480: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8487: checking for $ac_word" >&5
+echo "configure:8519: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8536: checking for $ac_hdr" >&5
+echo "configure:8568: 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 8541 "configure"
+#line 8573 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8578: \"$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*
# Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8591: checking for $ac_word" >&5
+echo "configure:8623: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8635: checking for $ac_hdr" >&5
+echo "configure:8667: 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 8640 "configure"
+#line 8672 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8677: \"$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:8732: checking for $ac_hdr" >&5
+echo "configure:8764: 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 8737 "configure"
+#line 8769 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8774: \"$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:8785: checking for $ac_hdr" >&5
+echo "configure:8817: 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 8790 "configure"
+#line 8822 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8827: \"$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*
then
ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
-echo "configure:8866: checking for xosd.h" >&5
+echo "configure:8898: checking for xosd.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8871 "configure"
+#line 8903 "configure"
#include "confdefs.h"
#include <xosd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8908: \"$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*
then
ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
-echo "configure:8915: checking for lirc/lirc_client.h" >&5
+echo "configure:8947: checking for lirc/lirc_client.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8920 "configure"
+#line 8952 "configure"
#include "confdefs.h"
#include <lirc/lirc_client.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8957: \"$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 lirc_init in -llirc_client""... $ac_c" 1>&6
-echo "configure:8942: checking for lirc_init in -llirc_client" >&5
+echo "configure:8974: checking for lirc_init in -llirc_client" >&5
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-llirc_client $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8950 "configure"
+#line 8982 "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
lirc_init()
; return 0; }
EOF
-if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8993: \"$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 whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:9016: checking whether the byte order is big-endian" >&5
+echo "configure:9048: checking whether the byte order is big-endian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
enableval="$enable_pth"
if test "x${enable_pth}" = "xyes"; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:9098: checking for pth_init in -lpth" >&5
+echo "configure:9130: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9106 "configure"
+#line 9138 "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
pth_init()
; return 0; }
EOF
-if { (eval echo configure:9117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9149: \"$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
cat > conftest.$ac_ext <<EOF
-#line 9145 "configure"
+#line 9177 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
enableval="$enable_st"
if test "x${enable_st}" = "xyes"; then
echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
-echo "configure:9171: checking for st_init in -lst" >&5
+echo "configure:9203: checking for st_init in -lst" >&5
ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lst $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9179 "configure"
+#line 9211 "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
st_init()
; return 0; }
EOF
-if { (eval echo configure:9190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9222: \"$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
cat > conftest.$ac_ext <<EOF
-#line 9218 "configure"
+#line 9250 "configure"
#include "confdefs.h"
#include <st.h>
EOF
# Extract the first word of "mozilla-config", so it can be a program name with args.
set dummy mozilla-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:9254: checking for $ac_word" >&5
+echo "configure:9286: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MOZILLA_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "x${SYS}" != "xmingw32"; then
LDFLAGS="${save_LDFLAGS} -L${x_libraries}"
echo $ac_n "checking for XtStrings in -lXt""... $ac_c" 1>&6
-echo "configure:9292: checking for XtStrings in -lXt" >&5
+echo "configure:9324: checking for XtStrings in -lXt" >&5
ac_lib_var=`echo Xt'_'XtStrings | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9300 "configure"
+#line 9332 "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
XtStrings()
; return 0; }
EOF
-if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9343: \"$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
PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts"
-PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/mpeg_video/mpeg_video codec/lpcm/lpcm codec/spdif/spdif codec/spudec/spudec"
+PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec"
+#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm codec/spdif/spdif"
PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
-PLUGINS="${PLUGINS} visualization/scope/scope"
+PLUGINS="${PLUGINS} audio_mixer/trivial"
+PLUGINS="${PLUGINS} audio_output/file"
+#PLUGINS="${PLUGINS} visualization/scope/scope"
PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"
dnl
fi
;;
xno)
- dnl Compile without dvbpsi (dlopen version, works only under Linux)
+ dnl Compile without dvbpsi
;;
*)
AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
AC_CHECK_LIB(mad, mad_bit_init, [
- BUILTINS="${BUILTINS} codec/mad/mad"
+ #BUILTINS="${BUILTINS} codec/mad/mad"
mad_LDFLAGS="${mad_LDFLAGS} -lmad"
],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
],[])
AC_CHECK_HEADERS(mad.h, ,
[ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
AC_CHECK_LIB(mad, mad_bit_init, [
- PLUGINS="${PLUGINS} codec/mad/mad"
+ #PLUGINS="${PLUGINS} codec/mad/mad"
mad_LDFLAGS="${mad_LDFLAGS} -lmad" ],
[ AC_MSG_ERROR([Cannot find libmad library...]) ])
CFLAGS="${save_CFLAGS}"
dnl a52 AC3 decoder plugin
dnl
AC_ARG_ENABLE(a52,
- [ --enable-a52 AC3 support with liba52 (default enabled)])
+ [ --enable-a52 A/52 support with liba52 (default enabled)])
if test "x${enable_a52}" != "xno"
then
+ AC_ARG_WITH(a52,
+ [ --with-a52=PATH a52 headers and libraries])
AC_ARG_WITH(a52-tree,
[ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have a52.h])
fi
- else dnl no with args
+ else
+ if test "x${with_a52}" = "x"
+ then
+ test_LDFLAGS=""
+ test_CFLAGS=""
+ else
+ test_LDFLAGS="-L${with_a52}/lib"
+ test_CFLAGS="-I${with_a52}/include"
+ fi
+ save_CPPFLAGS="${CPPFLAGS}"
+ save_LDFLAGS="${LDFLAGS}"
+ CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
+ LDFLAGS="${save_LDFLAGS} ${test_LDFLAGS}"
AC_CHECK_HEADERS(a52dec/a52.h, [
AC_CHECK_LIB(a52, a52_free, [
BUILTINS="${BUILTINS} codec/a52/a52"
- a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
- a52_CFLAGS="${a52_CFLAGS}"
- ],[],[-lm])
+ a52_LDFLAGS="${a52_LDFLAGS} ${test_LDFLAGS} -la52 -lm"
+ a52_CFLAGS="${a52_CFLAGS} ${test_CFLAGS}"
+ ],[
+ if test "x${enable_dvbpsi}" != "x"
+ then
+ AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
+ fi
+ ],[-lm])
])
+ CPPFLAGS="${save_CPPFLAGS}"
+ LDFLAGS="${save_LDFLAGS}"
fi
fi
dnl
dnl OSS /dev/dsp module (enabled by default except on win32)
dnl
-AC_ARG_ENABLE(dsp,
- [ --enable-dsp Linux /dev/dsp support (enabled on Linux)])
+AC_ARG_ENABLE(oss,
+ [ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
-if test "x${enable_dsp}" != "xno" &&
- (test "x${SYS}" != "xmingw32" || test "x${enable_dsp}" = "xyes")
+if test "x${enable_oss}" != "xno" &&
+ (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
then
AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
- PLUGINS="${PLUGINS} audio_output/dsp/dsp"
+ #PLUGINS="${PLUGINS} audio_output/oss"
AC_CHECK_LIB(ossaudio,main,dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio")
])
fi
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
if test "x${ESD_CONFIG}" != "xno"
then
- PLUGINS="${PLUGINS} audio_output/esd/esd"
+ #PLUGINS="${PLUGINS} audio_output/esd"
esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
fi
AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
if test "x${ARTS_CONFIG}" != "xno"
then
- PLUGINS="${PLUGINS} audio_output/arts/arts"
+ #PLUGINS="${PLUGINS} audio_output/arts"
arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
fi
AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
if test "x${have_alsa}" = "xtrue"
then
- PLUGINS="${PLUGINS} audio_output/alsa/alsa"
+ #PLUGINS="${PLUGINS} audio_output/alsa"
alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
fi
fi])
[ --enable-waveout Win32 waveOut module (default enabled on Win32)])
if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
then
- PLUGINS="${PLUGINS} audio_output/waveout/waveout"
+ #PLUGINS="${PLUGINS} audio_output/waveout"
waveout_LDFLAGS="-lwinmm"
fi
--- /dev/null
+/*****************************************************************************
+ * aout_internal.h : internal defines for audio output
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: aout_internal.h,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * aout_alloc_t : allocation of memory in the audio output
+ *****************************************************************************/
+typedef struct aout_alloc_t
+{
+ int i_alloc_type;
+ int i_bytes_per_sec; /* -1 if only the alloc_type is
+ * relevant. */
+} aout_alloc_t;
+
+#define AOUT_ALLOC_NONE 0
+#define AOUT_ALLOC_STACK 1
+#define AOUT_ALLOC_HEAP 2
+
+#define aout_BufferAlloc( p_alloc, i_nb_usec, p_previous_buffer, p_new_buffer ) \
+ if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_NONE ) \
+ { \
+ (p_new_buffer) = p_previous_buffer; \
+ } \
+ else \
+ { \
+ if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK ) \
+ { \
+ (p_new_buffer) = alloca( (u64)(p_alloc)->i_bytes_per_sec \
+ * i_nb_usec \
+ / 1000000 + 1 + sizeof(aout_buffer_t) ); \
+ } \
+ else \
+ { \
+ (p_new_buffer) = malloc( (u64)(p_alloc)->i_bytes_per_sec \
+ * i_nb_usec \
+ / 1000000 + 1 + sizeof(aout_buffer_t) ); \
+ } \
+ (p_new_buffer)->i_alloc_type = (p_alloc)->i_alloc_type; \
+ (p_new_buffer)->i_size = (u64)(p_alloc)->i_bytes_per_sec \
+ * i_nb_usec / 1000000 + 1; \
+ (p_new_buffer)->p_buffer = (void *)(p_new_buffer) \
+ + sizeof(aout_buffer_t); \
+ if ( (p_previous_buffer) != NULL ) \
+ { \
+ (p_new_buffer)->start_date = \
+ ((aout_buffer_t *)p_previous_buffer)->start_date; \
+ (p_new_buffer)->end_date = \
+ ((aout_buffer_t *)p_previous_buffer)->end_date; \
+ } \
+ }
+
+#define aout_BufferFree( p_buffer ) \
+ if ( (p_buffer)->i_alloc_type == AOUT_ALLOC_HEAP ) \
+ { \
+ free( p_buffer ); \
+ }
+
+/*****************************************************************************
+ * aout_fifo_t : audio output buffer FIFO
+ *****************************************************************************/
+typedef struct aout_fifo_t
+{
+ vlc_mutex_t lock;
+ struct aout_buffer_t * p_first;
+ struct aout_buffer_t ** pp_last;
+} aout_fifo_t;
+
+static inline void aout_FifoInit( struct aout_instance_t * p_aout,
+ aout_fifo_t * p_fifo )
+{
+ vlc_mutex_init( (vlc_object_t *)p_aout, &p_fifo->lock );
+ p_fifo->p_first = NULL;
+ p_fifo->pp_last = &p_fifo->p_first;
+}
+
+static inline void aout_FifoPush( struct aout_instance_t * p_aout,
+ aout_fifo_t * p_fifo,
+ aout_buffer_t * p_buffer )
+{
+ vlc_mutex_lock( &p_fifo->lock );
+ *p_fifo->pp_last = p_buffer;
+ p_fifo->pp_last = &p_buffer->p_next;
+ *p_fifo->pp_last = NULL;
+ vlc_mutex_unlock( &p_fifo->lock );
+}
+
+/* This function supposes there is one buffer in p_fifo. */
+static inline aout_buffer_t * aout_FifoPop( struct aout_instance_t * p_aout,
+ aout_fifo_t * p_fifo )
+{
+ aout_buffer_t * p_buffer;
+ vlc_mutex_lock( &p_fifo->lock );
+ p_buffer = p_fifo->p_first;
+ p_fifo->p_first = p_buffer->p_next;
+ if ( p_fifo->p_first == NULL )
+ {
+ p_fifo->pp_last = &p_fifo->p_first;
+ }
+ vlc_mutex_unlock( &p_fifo->lock );
+
+ return p_buffer;
+}
+
+static inline void aout_FifoDestroy( struct aout_instance_t * p_aout,
+ aout_fifo_t * p_fifo )
+{
+ aout_buffer_t * p_buffer;
+
+ vlc_mutex_destroy( &p_fifo->lock );
+ p_buffer = p_fifo->p_first;
+ while ( p_buffer != NULL )
+ {
+ aout_buffer_t * p_next = p_buffer->p_next;
+ aout_BufferFree( p_buffer );
+ p_buffer = p_next;
+ }
+}
+
+/*****************************************************************************
+ * aout_filter_t : audio output filter
+ *****************************************************************************/
+typedef struct aout_filter_t
+{
+ VLC_COMMON_MEMBERS
+
+ audio_sample_format_t input;
+ audio_sample_format_t output;
+ aout_alloc_t output_alloc;
+
+ module_t * p_module;
+ struct aout_filter_sys_t * p_sys;
+ void (* pf_do_work)( struct aout_instance_t *,
+ struct aout_filter_t *,
+ struct aout_buffer_t *,
+ struct aout_buffer_t * );
+ vlc_bool_t b_in_place;
+} aout_filter_t;
+
+/*****************************************************************************
+ * aout_mixer_t : audio output mixer
+ *****************************************************************************/
+typedef struct aout_mixer_t
+{
+ audio_sample_format_t input;
+ audio_sample_format_t output;
+ aout_alloc_t output_alloc;
+
+ module_t * p_module;
+ struct aout_mixer_sys_t * p_sys;
+ void (* pf_do_work)( struct aout_instance_t *,
+ struct aout_buffer_t * );
+} aout_mixer_t;
+
+/*****************************************************************************
+ * aout_input_t : input stream for the audio output
+ *****************************************************************************/
+struct aout_input_t
+{
+ audio_sample_format_t input;
+ aout_alloc_t input_alloc;
+
+ /* pre-filters */
+ aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
+ int i_nb_filters;
+
+ aout_fifo_t fifo;
+
+ char * p_first_byte_to_mix;
+};
+
+/*****************************************************************************
+ * aout_output_t : output stream for the audio output
+ *****************************************************************************/
+typedef struct aout_output_t
+{
+ audio_sample_format_t output;
+
+ /* post-filters */
+ aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
+ int i_nb_filters;
+
+ aout_fifo_t fifo;
+ mtime_t last_date;
+
+ struct module_t * p_module;
+ struct aout_sys_t * p_sys;
+ int (* pf_setformat)( aout_instance_t * );
+ void (* pf_play)( aout_instance_t *, aout_buffer_t * );
+ int i_nb_samples;
+} aout_output_t;
+
+/*****************************************************************************
+ * aout_instance_t : audio output thread descriptor
+ *****************************************************************************/
+struct aout_instance_t
+{
+ VLC_COMMON_MEMBERS
+
+ /* Input streams & pre-filters */
+ vlc_mutex_t input_lock;
+ vlc_cond_t input_signal;
+ int i_inputs_active;
+ vlc_bool_t b_change_requested;
+ aout_input_t * pp_inputs[AOUT_MAX_INPUTS];
+ int i_nb_inputs;
+
+ /* Mixer */
+ vlc_mutex_t mixer_lock;
+ vlc_cond_t mixer_signal;
+ vlc_bool_t b_mixer_active;
+ aout_mixer_t mixer;
+
+ /* Output plug-in */
+ aout_output_t output;
+};
+
+/*****************************************************************************
+ * Prototypes
+ *****************************************************************************/
+void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
+ aout_buffer_t * p_buffer );
+
+int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
+ aout_filter_t ** pp_filters,
+ int * pi_nb_filters,
+ audio_sample_format_t * p_input_format,
+ audio_sample_format_t * p_output_format );
+void aout_FiltersDestroyPipeline( aout_instance_t * p_aout,
+ aout_filter_t ** pp_filters,
+ int i_nb_filters );
+void aout_FiltersHintBuffers( aout_instance_t * p_aout,
+ aout_filter_t ** pp_filters,
+ int i_nb_filters, aout_alloc_t * p_first_alloc );
+void aout_FiltersPlay( aout_instance_t * p_aout,
+ aout_filter_t ** pp_filters,
+ int i_nb_filters, aout_buffer_t ** pp_input_buffer );
+
+int aout_MixerNew( aout_instance_t * p_aout );
+void aout_MixerDelete( aout_instance_t * p_aout );
+void aout_MixerRun( aout_instance_t * p_aout );
+
+int aout_OutputNew( aout_instance_t * p_aout,
+ audio_sample_format_t * p_format );
+void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
+void aout_OutputDelete( aout_instance_t * p_aout );
+
+int aout_FormatToBytes( audio_sample_format_t * p_format );
/*****************************************************************************
- * audio_output.h : audio output thread interface
+ * audio_output.h : audio output interface
*****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_output.h,v 1.51 2002/08/04 17:23:41 sam Exp $
+ * Copyright (C) 2002 VideoLAN
+ * $Id: audio_output.h,v 1.52 2002/08/07 21:36:55 massiot Exp $
*
- * Authors: Michel Kaempf <maxx@via.ecp.fr>
- * Cyril Deguet <asmax@via.ecp.fr>
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
/*****************************************************************************
- * aout_increment_t
+ * audio_sample_format_t
*****************************************************************************
- * This structure is used to keep the progression of an index up-to-date, in
- * order to avoid rounding problems and heavy computations, as the function
- * that handles this structure only uses additions.
+ * This structure defines a format for audio samples.
*****************************************************************************/
-typedef struct aout_increment_t
+struct audio_sample_format_t
{
- /* The remainder is used to keep track of the fractional part of the
- * index. */
- int i_r;
-
- /*
- * The increment structure is initialized with the result of an euclidean
- * division :
- *
- * i_x i_b
- * ----- = i_a + -----
- * i_y i_c
- *
- */
- int i_a, i_b, i_c;
-
-} aout_increment_t;
-
-/*****************************************************************************
- * aout_fifo_t
- *****************************************************************************/
-struct aout_fifo_t
-{
- /* See the fifo formats below */
int i_format;
- int i_channels;
int i_rate;
- int i_frame_size;
-
- vlc_bool_t b_die;
- int i_fifo; /* Just to keep track of the fifo index */
-
- vlc_mutex_t data_lock;
- vlc_cond_t data_wait;
-
- u8 * buffer;
- mtime_t * date;
-
- /* The start frame is the first frame in the buffer that contains decoded
- * audio data. It it also the first frame in the current timestamped frame
- * area, ie the first dated frame in the decoded part of the buffer. :-p */
- int i_start_frame;
- vlc_bool_t b_start_frame;
- /* The next frame is the end frame of the current timestamped frame area,
- * ie the first dated frame after the start frame. */
- int i_next_frame;
- vlc_bool_t b_next_frame;
- /* The end frame is the first frame, after the start frame, that doesn't
- * contain decoded audio data. That's why the end frame is the first frame
- * where the audio decoder can store its decoded audio frames. */
- int i_end_frame;
-
- /* Current index in p_aout->buffer */
- int i_unit;
- /* Max index in p_aout->buffer */
- int i_unit_limit;
- /* Structure used to calculate i_unit with a Bresenham algorithm */
- aout_increment_t unit_increment;
-
- /* The following variable is used to store the number of remaining audio
- * units in the current timestamped frame area. */
- int i_units;
-};
-
-#define AOUT_FIFO_ISEMPTY( fifo ) \
- ( (fifo).i_end_frame == (fifo).i_start_frame )
-
-#define AOUT_FIFO_ISFULL( fifo ) \
- ( ((((fifo).i_end_frame + 1) - (fifo).i_start_frame) & AOUT_FIFO_SIZE) == 0 )
-
-#define AOUT_FIFO_INC( i_index ) \
- ( ((i_index) + 1) & AOUT_FIFO_SIZE )
-
-/* List of known fifo formats */
-#define AOUT_FIFO_NONE 0
-#define AOUT_FIFO_PCM 1
-#define AOUT_FIFO_SPDIF 2
-
-/*****************************************************************************
- * aout_thread_t : audio output thread descriptor
- *****************************************************************************/
-struct aout_thread_t
-{
- VLC_COMMON_MEMBERS
-
- vlc_mutex_t fifos_lock;
- aout_fifo_t fifo[ AOUT_MAX_FIFOS ];
-
- /* Plugin used and shortcuts to access its capabilities */
- module_t * p_module;
- int ( *pf_setformat ) ( aout_thread_t * );
- int ( *pf_getbufinfo ) ( aout_thread_t * , int );
- void ( *pf_play ) ( aout_thread_t * , byte_t *, int );
-
- void * buffer;
- /* The s32 buffer is used to mix all the audio fifos together before
- * converting them and storing them in the audio output buffer */
- s32 * s32_buffer;
-
- /* The size of the audio output buffer is kept in audio units, as this is
- * the only unit that is common with every audio decoder and audio fifo */
- int i_units;
-
- /* date is the moment where the first audio unit of the output buffer
- * will be played */
- mtime_t date;
-
- /* The current volume */
- int i_volume;
- int i_savedvolume;
-
- /* Format of the audio output samples, number of channels, and
- * rate and gain (in Hz) of the audio output sound */
- int i_format;
int i_channels;
- int i_rate;
-
- /* Latency of the audio output plugin, in bytes */
- int i_latency;
-
- /* there might be some useful private structure, such as audio_buf_info
- * for the OSS output */
- aout_sys_t * p_sys;
};
-/* Those are from <linux/soundcard.h> but are needed because of formats
- * on other platforms */
-#define AOUT_FMT_U8 0x00000008
-#define AOUT_FMT_S16_LE 0x00000010 /* Little endian signed 16 */
-#define AOUT_FMT_S16_BE 0x00000020 /* Big endian signed 16 */
-#define AOUT_FMT_S8 0x00000040
-#define AOUT_FMT_U16_LE 0x00000080 /* Little endian U16 */
-#define AOUT_FMT_U16_BE 0x00000100 /* Big endian U16 */
-#define AOUT_FMT_A52 0x00000400 /* Dolby Digital A52 */
+#define AOUT_FMT_MU_LAW 0x00000001
+#define AOUT_FMT_A_LAW 0x00000002
+#define AOUT_FMT_IMA_ADPCM 0x00000004
+#define AOUT_FMT_U8 0x00000008
+#define AOUT_FMT_S16_LE 0x00000010 /* Little endian signed 16 */
+#define AOUT_FMT_S16_BE 0x00000020 /* Big endian signed 16 */
+#define AOUT_FMT_S8 0x00000040
+#define AOUT_FMT_U16_LE 0x00000080 /* Little endian U16 */
+#define AOUT_FMT_U16_BE 0x00000100 /* Big endian U16 */
+#define AOUT_FMT_A52 0x00000400 /* ATSC A/52 (for SP/DIF) */
+#define AOUT_FMT_FLOAT32 0x00000800
+#define AOUT_FMT_FIXED32 0x00001000
+
+#define AOUT_FMTS_IDENTICAL( p_first, p_second ) ( \
+ (p_first->i_format == p_second->i_format) \
+ && (p_first->i_rate == p_second->i_rate) \
+ && (p_first->i_channels == p_second->i_channels \
+ || p_first->i_channels == -1 || p_second->i_channels == -1) )
#ifdef WORDS_BIGENDIAN
-#define AOUT_FMT_S16_NE AOUT_FMT_S16_BE
+# define AOUT_FMT_S16_NE AOUT_FMT_S16_BE
+# define AOUT_FMT_U16_NE AOUT_FMT_U16_BE
#else
-#define AOUT_FMT_S16_NE AOUT_FMT_S16_LE
+# define AOUT_FMT_S16_NE AOUT_FMT_S16_LE
+# define AOUT_FMT_U16_NE AOUT_FMT_U16_LE
#endif
-/* Number of samples in an A52 frame */
-#define A52_FRAME_SIZE 1536
+/*****************************************************************************
+ * aout_buffer_t : audio output buffer
+ *****************************************************************************/
+struct aout_buffer_t
+{
+ char * p_buffer;
+ int i_alloc_type;
+ size_t i_size;
+ int i_nb_samples;
+ mtime_t start_date, end_date;
-/* Size of a frame for spdif output */
-#define SPDIF_FRAME_SIZE 6144
+ struct aout_buffer_t * p_next;
+};
/*****************************************************************************
* Prototypes
*****************************************************************************/
-aout_thread_t * aout_CreateThread ( vlc_object_t *, int, int );
-void aout_DestroyThread ( aout_thread_t * );
-
-#define aout_CreateFifo(a,b,c,d,e,f) __aout_CreateFifo(VLC_OBJECT(a),b,c,d,e,f)
-VLC_EXPORT( aout_fifo_t *, __aout_CreateFifo, ( vlc_object_t *, int, int, int, int, void * ) );
-VLC_EXPORT( void, aout_DestroyFifo, ( aout_fifo_t *p_fifo ) );
- void aout_FreeFifo ( aout_fifo_t *p_fifo );
+/* From audio_output.c : */
+#define aout_NewInstance(a) __aout_NewInstance(VLC_OBJECT(a))
+VLC_EXPORT( aout_instance_t *, __aout_NewInstance, ( vlc_object_t * ) );
+VLC_EXPORT( void, aout_DeleteInstance, ( aout_instance_t * ) );
+VLC_EXPORT( aout_buffer_t *, aout_BufferNew, ( aout_instance_t *, aout_input_t *, size_t ) );
+VLC_EXPORT( void, aout_BufferDelete, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
+VLC_EXPORT( void, aout_BufferPlay, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
+
+/* From input.c : */
+#define aout_InputNew(a,b,c) __aout_InputNew(VLC_OBJECT(a),b,c)
+VLC_EXPORT( aout_input_t *, __aout_InputNew, ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) );
+VLC_EXPORT( void, aout_InputDelete, ( aout_instance_t *, aout_input_t * ) );
+
+/* From output.c : */
+VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t ) );
#define VOLUME_MAX 1024
#define VOLUME_MIN 0
-/* Number of audio output frames contained in an audio output fifo.
- * (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
- * %(AOUT_FIFO_SIZE + 1) operation with an &AOUT_FIFO_SIZE.
- * With 255 we have at least 255*384/2/48000=1 second of sound */
-#define AOUT_FIFO_SIZE 255
-
-/* Maximum number of audio fifos. The value of AOUT_MAX_FIFOS should be a power
- * of two, in order to optimize the '/AOUT_MAX_FIFOS' and '*AOUT_MAX_FIFOS'
- * operations with '>>' and '<<' (gcc changes this at compilation-time) */
-#define AOUT_MAX_FIFOS 2
-
-/* Duration (in microseconds) of an audio output buffer should be :
- * - short, in order to be able to play a new song very quickly (especially a
- * song from the interface)
- * - long, in order to perform the buffer calculations as few as possible */
-#define AOUT_BUFFER_DURATION 90000
+/* Max number of pre-filters per input, and max-number of post-filters */
+#define AOUT_MAX_FILTERS 10
+
+/* Max number of inputs */
+#define AOUT_MAX_INPUTS 5
/*****************************************************************************
* Video configuration
-/* include/defs.h.in. Generated automatically from configure.in by autoheader 2.13. */
+/* include/defs.h.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* Maximum supported data alignment */
+#undef ATTRIBUTE_ALIGNED_MAX
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define if $CC groks 3D Now! inline assembly. */
+#undef CAN_COMPILE_3DNOW
+
+/* Define if $CC groks AltiVec inline assembly. */
+#undef CAN_COMPILE_ALTIVEC
+
+/* Define if your compiler groks C AltiVec extensions. */
+#undef CAN_COMPILE_C_ALTIVEC
+
+/* Define if $CC groks SSE inline assembly. */
+#undef CAN_COMPILE_SSE
+
+/* The ./configure command line */
+#undef CONFIGURE_LINE
+
+/* Copyright string */
+#undef COPYRIGHT_MESSAGE
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
#undef CRAY_STACKSEG_END
-/* Define if you have alloca, as a function or macro. */
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
+#undef DPMSINFO_IN_DPMS_H
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#undef ENABLE_NLS
+
+/* Define to 1 if you have the <a52dec/a52.h> header file. */
+#undef HAVE_A52DEC_A52_H
+
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the `atoll' function. */
+#undef HAVE_ATOLL
-/* Define as the return type of signal handlers (int or void). */
-#undef RETSIGTYPE
+/* Define to 1 if you have the <Cocoa/Cocoa.h> header file. */
+#undef HAVE_COCOA_COCOA_H
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the <cthreads.h> header file. */
+#undef HAVE_CTHREADS_H
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have the <ddraw.h> header file. */
+#undef HAVE_DDRAW_H
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
+/* Define if <time.h> defines nanosleep. */
+#undef HAVE_DECL_NANOSLEEP
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the <dvbpsi/dr.h> header file. */
+#undef HAVE_DVBPSI_DR_H
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */
+#undef HAVE_DVDCSS_DVDCSS_H
-/* Define if you have the atoll function. */
-#undef HAVE_ATOLL
+/* Define to 1 if you have the <dvdplay/dvdplay.h> header file. */
+#undef HAVE_DVDPLAY_DVDPLAY_H
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the <dvdread/dvd_reader.h> header file. */
+#undef HAVE_DVDREAD_DVD_READER_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
-/* Define if you have the feof_unlocked function. */
+/* Define to 1 if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
-/* Define if you have the fgets_unlocked function. */
+/* Define to 1 if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
-/* Define if you have the getcwd function. */
+/* Define to 1 if you have the <gdk/gdk.h> header file. */
+#undef HAVE_GDK_GDK_H
+
+/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
-/* Define if you have the getegid function. */
+/* Define to 1 if you have the `getegid' function. */
#undef HAVE_GETEGID
-/* Define if you have the geteuid function. */
+/* Define to 1 if you have the `geteuid' function. */
#undef HAVE_GETEUID
-/* Define if you have the getgid function. */
+/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID
-/* Define if you have the gethostbyname2 function. */
+/* Define to 1 if you have the `gethostbyname2' function. */
#undef HAVE_GETHOSTBYNAME2
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* getopt support */
+#undef HAVE_GETOPT_LONG
+
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the getpwuid function. */
+/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID
-/* Define if you have the gettimeofday function. */
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* Define if you have the getuid function. */
+/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
-/* Define if you have the isatty function. */
-#undef HAVE_ISATTY
-
-/* Define if you have the memalign function. */
-#undef HAVE_MEMALIGN
-
-/* Define if you have the mempcpy function. */
-#undef HAVE_MEMPCPY
-
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the posix_memalign function. */
-#undef HAVE_POSIX_MEMALIGN
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the select function. */
-#undef HAVE_SELECT
-
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the sigrelse function. */
-#undef HAVE_SIGRELSE
+/* Define to 1 if you have the <glib.h> header file. */
+#undef HAVE_GLIB_H
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
+/* Define to 1 if you have the <gnome.h> header file. */
+#undef HAVE_GNOME_H
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
+/* Define to 1 if you have the <gtk/gtk.h> header file. */
+#undef HAVE_GTK_GTK_H
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
-/* Define if you have the strdup function. */
-#undef HAVE_STRDUP
+/* Define to 1 if you have the <image.h> header file. */
+#undef HAVE_IMAGE_H
-/* Define if you have the strerror function. */
-#undef HAVE_STRERROR
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the strndup function. */
-#undef HAVE_STRNDUP
+/* For FreeBSD VCD support */
+#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
-/* Define if you have the strtod function. */
-#undef HAVE_STRTOD
+/* Define to 1 if you have the `isatty' function. */
+#undef HAVE_ISATTY
-/* Define if you have the strtol function. */
-#undef HAVE_STRTOL
+/* Define to 1 if you have the <kernel/OS.h> header file. */
+#undef HAVE_KERNEL_OS_H
-/* Define if you have the strtoul function. */
-#undef HAVE_STRTOUL
+/* Define to 1 if you have the <kernel/scheduler.h> header file. */
+#undef HAVE_KERNEL_SCHEDULER_H
-/* Define if you have the swab function. */
-#undef HAVE_SWAB
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
-/* Define if you have the tsearch function. */
-#undef HAVE_TSEARCH
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the vasprintf function. */
-#undef HAVE_VASPRINTF
+/* Define to 1 if you have the <libdv/dv.h> header file. */
+#undef HAVE_LIBDV_DV_H
-/* Define if you have the <Cocoa/Cocoa.h> header file. */
-#undef HAVE_COCOA_COCOA_H
+/* Define to 1 if you have the `pth' library (-lpth). */
+#undef HAVE_LIBPTH
-/* Define if you have the <Ph.h> header file. */
-#undef HAVE_PH_H
+/* Define to 1 if you have the `st' library (-lst). */
+#undef HAVE_LIBST
-/* Define if you have the <X11/Xlib.h> header file. */
-#undef HAVE_X11_XLIB_H
+/* Define to 1 if you have the <libv4l/v4l.h> header file. */
+#undef HAVE_LIBV4L_V4L_H
-/* Define if you have the <X11/extensions/Xv.h> header file. */
-#undef HAVE_X11_EXTENSIONS_XV_H
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the <X11/extensions/dpms.h> header file. */
-#undef HAVE_X11_EXTENSIONS_DPMS_H
+/* Define to 1 if you have the <linux/fb.h> header file. */
+#undef HAVE_LINUX_FB_H
-/* Define if you have the <a52dec/a52.h> header file. */
-#undef HAVE_A52DEC_A52_H
+/* Define to 1 if you have the <linux/version.h> header file. */
+#undef HAVE_LINUX_VERSION_H
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
+/* Define to 1 if you have the <machine/param.h> header file. */
+#undef HAVE_MACHINE_PARAM_H
-/* Define if you have the <cthreads.h> header file. */
-#undef HAVE_CTHREADS_H
+/* Define to 1 if you have the <machine/soundcard.h> header file. */
+#undef HAVE_MACHINE_SOUNDCARD_H
-/* Define if you have the <ddraw.h> header file. */
-#undef HAVE_DDRAW_H
+/* Define to 1 if you have the <mad.h> header file. */
+#undef HAVE_MAD_H
-/* Define if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the <dvbpsi/dr.h> header file. */
-#undef HAVE_DVBPSI_DR_H
+/* Define to 1 if you have the `memalign' function. */
+#undef HAVE_MEMALIGN
-/* Define if you have the <dvdcss/dvdcss.h> header file. */
-#undef HAVE_DVDCSS_DVDCSS_H
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the <dvdplay/dvdplay.h> header file. */
-#undef HAVE_DVDPLAY_DVDPLAY_H
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
-/* Define if you have the <dvdread/dvd_reader.h> header file. */
-#undef HAVE_DVDREAD_DVD_READER_H
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
-/* Define if you have the <gdk/gdk.h> header file. */
-#undef HAVE_GDK_GDK_H
+/* Define if nanosleep is available. */
+#undef HAVE_NANOSLEEP
-/* Define if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
-/* Define if you have the <glib.h> header file. */
-#undef HAVE_GLIB_H
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
-/* Define if you have the <gnome.h> header file. */
-#undef HAVE_GNOME_H
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
-/* Define if you have the <gtk/gtk.h> header file. */
-#undef HAVE_GTK_GTK_H
+/* Define to 1 if you have the <ogg/ogg.h> header file. */
+#undef HAVE_OGG_OGG_H
-/* Define if you have the <image.h> header file. */
-#undef HAVE_IMAGE_H
+/* Define to 1 if you have the <Ph.h> header file. */
+#undef HAVE_PH_H
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
-/* Define if you have the <kernel/OS.h> header file. */
-#undef HAVE_KERNEL_OS_H
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
-/* Define if you have the <kernel/scheduler.h> header file. */
-#undef HAVE_KERNEL_SCHEDULER_H
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
-/* Define if you have the <libdv/dv.h> header file. */
-#undef HAVE_LIBDV_DV_H
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
-/* Define if you have the <libv4l/v4l.h> header file. */
-#undef HAVE_LIBV4L_V4L_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
-/* Define if you have the <linux/fb.h> header file. */
-#undef HAVE_LINUX_FB_H
+/* Define to 1 if you have the `sigrelse' function. */
+#undef HAVE_SIGRELSE
-/* Define if you have the <linux/version.h> header file. */
-#undef HAVE_LINUX_VERSION_H
+/* Define to 1 if you have the <soundcard.h> header file. */
+#undef HAVE_SOUNDCARD_H
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
-/* Define if you have the <machine/param.h> header file. */
-#undef HAVE_MACHINE_PARAM_H
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
-/* Define if you have the <machine/soundcard.h> header file. */
-#undef HAVE_MACHINE_SOUNDCARD_H
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
-/* Define if you have the <mad.h> header file. */
-#undef HAVE_MAD_H
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
-/* Define if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
-/* Define if you have the <ogg/ogg.h> header file. */
-#undef HAVE_OGG_OGG_H
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
-/* Define if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
-/* Define if you have the <soundcard.h> header file. */
-#undef HAVE_SOUNDCARD_H
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
-/* Define if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
+/* Define to 1 if you have the `strtod' function. */
+#undef HAVE_STRTOD
-/* Define if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if <sys/time.h> defines struct timespec. */
+#undef HAVE_STRUCT_TIMESPEC
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+/* Define to 1 if you have the `swab' function. */
+#undef HAVE_SWAB
-/* Define if you have the <sys/int_types.h> header file. */
+/* Define to 1 if you have the <sys/int_types.h> header file. */
#undef HAVE_SYS_INT_TYPES_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/shm.h> header file. */
+/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
-/* Define if you have the <sys/socket.h> header file. */
+/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
-/* Define if you have the <sys/sockio.h> header file. */
+/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
-/* Define if you have the <sys/soundcard.h> header file. */
+/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
-/* Define if you have the <sys/times.h> header file. */
+/* Define to 1 if you have the <sys/times.h> header file. */
#undef HAVE_SYS_TIMES_H
-/* Define if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the pth library (-lpth). */
-#undef HAVE_LIBPTH
+/* Support for variadic macros */
+#undef HAVE_VARIADIC_MACROS
-/* Define if you have the st library (-lst). */
-#undef HAVE_LIBST
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
-/* Package name */
-#undef VLC_PACKAGE
+/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DPMS_H
-/* Package version */
-#undef VLC_VERSION
+/* Define to 1 if you have the <X11/extensions/Xv.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XV_H
-/* Define if you have the iconv() function. */
-#undef HAVE_ICONV
+/* Define to 1 if you have the <X11/Xlib.h> header file. */
+#undef HAVE_X11_XLIB_H
+
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
-/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-#undef HAVE_LANGINFO_CODESET
+/* String suffix for module functions */
+#undef MODULE_SUFFIX
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Symbol suffix for module functions */
+#undef MODULE_SYMBOL
-/* Define to 1 if translation of program messages to the user's native language
- is requested. */
-#undef ENABLE_NLS
+/* Define if <sys/param.h> defines ntohl. */
+#undef NTOHL_IN_SYS_PARAM_H
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#undef HAVE_GETTEXT
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define if nanosleep is available. */
-#undef HAVE_NANOSLEEP
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* long getopt support */
-#undef HAVE_GETOPT_LONG
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* getopt support */
-#undef HAVE_GETOPT_LONG
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
/* Define if <pthread.h> defines pthread_cond_t. */
#undef PTHREAD_COND_T_IN_PTHREAD_H
/* Define if <pthread.h> defines pthread_once. */
#undef PTHREAD_ONCE_IN_PTHREAD_H
-/* Define if <strings.h> defines strncasecmp. */
-#undef STRNCASECMP_IN_STRINGS_H
-
-/* Define if <time.h> defines nanosleep. */
-#undef HAVE_DECL_NANOSLEEP
-
-/* Define if <sys/time.h> defines struct timespec. */
-#undef HAVE_STRUCT_TIMESPEC
-
-/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
-#undef DPMSINFO_IN_DPMS_H
-
-/* Define if <sys/param.h> defines ntohl. */
-#undef NTOHL_IN_SYS_PARAM_H
-
-/* Support for variadic macros */
-#undef HAVE_VARIADIC_MACROS
-
-/* Maximum supported data alignment */
-#undef ATTRIBUTE_ALIGNED_MAX
-
-/* Define if $CC groks 3D Now! inline assembly. */
-#undef CAN_COMPILE_3DNOW
-
-/* Define if $CC groks SSE inline assembly. */
-#undef CAN_COMPILE_SSE
-
-/* Define if $CC groks AltiVec inline assembly. */
-#undef CAN_COMPILE_ALTIVEC
-
-/* Define if your compiler groks C AltiVec extensions. */
-#undef CAN_COMPILE_C_ALTIVEC
+/* Define if <pth.h> defines pth_init */
+#undef PTH_INIT_IN_PTH_H
-/* For FreeBSD VCD support */
-#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
#undef SDL_INCLUDE_FILE
-/* big endian system */
-#undef WORDS_BIGENDIAN
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
-/* Define if <pth.h> defines pth_init */
-#undef PTH_INIT_IN_PTH_H
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if <strings.h> defines strncasecmp. */
+#undef STRNCASECMP_IN_STRINGS_H
/* Define if <st.h> defines st_init */
#undef ST_INIT_IN_ST_H
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
/* Simple version string */
#undef VERSION_MESSAGE
-/* Copyright string */
-#undef COPYRIGHT_MESSAGE
+/* Package name */
+#undef VLC_PACKAGE
-/* The ./configure command line */
-#undef CONFIGURE_LINE
+/* Package version */
+#undef VLC_VERSION
-/* String suffix for module functions */
-#undef MODULE_SUFFIX
+/* big endian system */
+#undef WORDS_BIGENDIAN
-/* Symbol suffix for module functions */
-#undef MODULE_SYMBOL
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.14 2002/08/07 00:29:36 sam Exp $
+ * $Id: vlc_common.h,v 1.15 2002/08/07 21:36:55 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
VLC_DECLARE_STRUCT(stream_sys_t)
/* Audio */
-VLC_DECLARE_STRUCT(aout_thread_t)
-VLC_DECLARE_STRUCT(aout_sys_t)
-VLC_DECLARE_STRUCT(aout_fifo_t)
+VLC_DECLARE_STRUCT(aout_instance_t)
+VLC_DECLARE_STRUCT(aout_input_t)
+VLC_DECLARE_STRUCT(aout_buffer_t)
+VLC_DECLARE_STRUCT(audio_sample_format_t)
/* Video */
VLC_DECLARE_STRUCT(vout_thread_t)
struct module_symbols_t
{
- aout_fifo_t * (* __aout_CreateFifo_inner) ( vlc_object_t *, int, int, int, int, void * ) ;
+ aout_buffer_t * (* aout_BufferNew_inner) ( aout_instance_t *, aout_input_t *, size_t ) ;
+ aout_buffer_t * (* aout_OutputNextBuffer_inner) ( aout_instance_t *, mtime_t ) ;
+ aout_input_t * (* __aout_InputNew_inner) ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) ;
+ aout_instance_t * (* __aout_NewInstance_inner) ( vlc_object_t * ) ;
char * (* __config_GetPsz_inner) (vlc_object_t *, const char *) ;
char * (* config_GetHomeDir_inner) ( void ) ;
char * (* input_OffsetToTime_inner) ( input_thread_t *, char *, off_t ) ;
void (* __vlc_object_yield_inner) ( vlc_object_t * ) ;
void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ;
void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ;
- void (* aout_DestroyFifo_inner) ( aout_fifo_t *p_fifo ) ;
+ void (* aout_BufferDelete_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
+ void (* aout_BufferPlay_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
+ void (* aout_DeleteInstance_inner) ( aout_instance_t * ) ;
+ void (* aout_InputDelete_inner) ( aout_instance_t *, aout_input_t * ) ;
void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ;
void (* config_SetCallbacks_inner) ( module_config_t *, module_config_t * ) ;
void (* config_UnsetCallbacks_inner) ( module_config_t * ) ;
# define UnalignedGetBits p_symbols->UnalignedGetBits_inner
# define UnalignedRemoveBits p_symbols->UnalignedRemoveBits_inner
# define UnalignedShowBits p_symbols->UnalignedShowBits_inner
-# define __aout_CreateFifo p_symbols->__aout_CreateFifo_inner
+# define __aout_InputNew p_symbols->__aout_InputNew_inner
+# define __aout_NewInstance p_symbols->__aout_NewInstance_inner
# define __config_GetFloat p_symbols->__config_GetFloat_inner
# define __config_GetInt p_symbols->__config_GetInt_inner
# define __config_GetPsz p_symbols->__config_GetPsz_inner
# define __vlc_threads_end p_symbols->__vlc_threads_end_inner
# define __vlc_threads_init p_symbols->__vlc_threads_init_inner
# define __vout_CreateThread p_symbols->__vout_CreateThread_inner
-# define aout_DestroyFifo p_symbols->aout_DestroyFifo_inner
+# define aout_BufferDelete p_symbols->aout_BufferDelete_inner
+# define aout_BufferNew p_symbols->aout_BufferNew_inner
+# define aout_BufferPlay p_symbols->aout_BufferPlay_inner
+# define aout_DeleteInstance p_symbols->aout_DeleteInstance_inner
+# define aout_InputDelete p_symbols->aout_InputDelete_inner
+# define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
# define config_Duplicate p_symbols->config_Duplicate_inner
# define config_FindConfig p_symbols->config_FindConfig_inner
# define config_GetHomeDir p_symbols->config_GetHomeDir_inner
--- /dev/null
+.dep
+*.lo
+*.o.*
+*.lo.*
--- /dev/null
+float32tos16_SOURCES = float32tos16.c
--- /dev/null
+/*****************************************************************************
+ * float32tos16.c : trivial mixer plug-in (1 input, no downmixing)
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: float32tos16.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <errno.h>
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h>
+
+#include <vlc/vlc.h>
+#include "audio_output.h"
+#include "aout_internal.h"
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int Create ( vlc_object_t * );
+
+static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
+ aout_buffer_t * );
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+ set_description( _("aout filter for float32->s16 conversion") );
+ set_capability( "audio filter", 1 );
+ set_callbacks( Create, NULL );
+vlc_module_end();
+
+/*****************************************************************************
+ * Create: allocate trivial mixer
+ *****************************************************************************
+ * This function allocates and initializes a Crop vout method.
+ *****************************************************************************/
+static int Create( vlc_object_t *p_this )
+{
+ aout_filter_t * p_filter = (aout_filter_t *)p_this;
+
+ if ( p_filter->input.i_format != AOUT_FMT_FLOAT32
+ && p_filter->output.i_format != AOUT_FMT_S16_NE )
+ {
+ return -1;
+ }
+
+ if ( p_filter->input.i_rate != p_filter->output.i_rate
+ || p_filter->input.i_channels != p_filter->output.i_channels )
+ {
+ return -1;
+ }
+
+
+ p_filter->pf_do_work = DoWork;
+ p_filter->b_in_place = 1;
+
+ return 0;
+}
+
+/*****************************************************************************
+ * DoWork: convert a buffer
+ *****************************************************************************/
+static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
+ aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
+{
+ int i;
+ float * p_in = (float *)p_in_buf->p_buffer;
+ s16 * p_out = (s16 *)p_out_buf->p_buffer;
+
+ for ( i = 0; i < p_in_buf->i_nb_samples * p_filter->input.i_channels; i++ )
+ {
+ if ( *p_in >= 1.0 ) *p_out = 32767;
+ else if ( *p_in < -1.0 ) *p_out = -32768;
+ else *p_out = *p_in * 32768.0;
+ p_in++; p_out++;
+ }
+}
+
--- /dev/null
+.dep
+*.lo
+*.o.*
+*.lo.*
--- /dev/null
+trivial_SOURCES = trivial.c
--- /dev/null
+/*****************************************************************************
+ * trivial.c : trivial mixer plug-in (1 input, no downmixing)
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: trivial.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <errno.h>
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h>
+
+#include <vlc/vlc.h>
+#include "audio_output.h"
+#include "aout_internal.h"
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int Create ( vlc_object_t * );
+
+static void DoWork ( aout_instance_t *, aout_buffer_t * );
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+ set_description( _("trivial aout mixer module") );
+ set_capability( "audio mixer", 1 );
+ add_shortcut( "trivial" );
+ set_callbacks( Create, NULL );
+vlc_module_end();
+
+/*****************************************************************************
+ * Create: allocate trivial mixer
+ *****************************************************************************
+ * This function allocates and initializes a Crop vout method.
+ *****************************************************************************/
+static int Create( vlc_object_t *p_this )
+{
+ aout_instance_t * p_aout = (aout_instance_t *)p_this;
+
+ if ( p_aout->mixer.output.i_format != AOUT_FMT_FLOAT32
+ && p_aout->mixer.output.i_format != AOUT_FMT_FIXED32 )
+ {
+ return -1;
+ }
+
+ p_aout->mixer.pf_do_work = DoWork;
+
+ return 0;
+}
+
+/*****************************************************************************
+ * SparseCopy: trivially downmix or upmix a buffer
+ *****************************************************************************/
+static void SparseCopy( u32 * p_dest, const u32 * p_src, size_t i_len,
+ int i_output_stride, int i_input_stride )
+{
+ int i;
+ for ( i = 0; i < i_len; i++ )
+ {
+ int j;
+ for ( j = 0; j < i_output_stride; j++ )
+ {
+ p_dest[j] = p_src[j];
+ }
+ p_src += i_input_stride;
+ p_dest += i_output_stride;
+ }
+}
+
+/*****************************************************************************
+ * DoWork: mix a new output buffer
+ *****************************************************************************/
+static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
+{
+ aout_input_t * p_input = p_aout->pp_inputs[0];
+
+ if ( p_input->input.i_channels == p_aout->mixer.output.i_channels )
+ {
+ int i_nb_bytes = p_buffer->i_nb_samples * sizeof(u32)
+ * p_input->input.i_channels;
+ char * p_in = (p_input->p_first_byte_to_mix == NULL) ?
+ p_input->fifo.p_first->p_buffer :
+ p_input->p_first_byte_to_mix;
+ char * p_out = p_buffer->p_buffer;
+
+ for ( ; ; )
+ {
+ ptrdiff_t i_available_bytes = (p_input->fifo.p_first->p_buffer
+ - p_in)
+ + p_input->fifo.p_first->i_nb_samples
+ * sizeof(u32)
+ * p_input->input.i_channels;
+
+ if ( i_available_bytes < i_nb_bytes )
+ {
+ aout_buffer_t * p_old_buffer;
+
+ if ( i_available_bytes > 0 )
+ p_aout->p_vlc->pf_memcpy( p_out, p_in, i_available_bytes );
+ i_nb_bytes -= i_available_bytes;
+ p_out += i_available_bytes;
+
+ /* Next buffer */
+ p_old_buffer = aout_FifoPop( p_aout, &p_input->fifo );
+ aout_BufferFree( p_old_buffer );
+ if ( p_input->fifo.p_first == NULL )
+ {
+ msg_Err( p_aout, "internal amix error" );
+ return;
+ }
+ p_in = p_input->fifo.p_first->p_buffer;
+ }
+ else
+ {
+ p_aout->p_vlc->pf_memcpy( p_out, p_in, i_nb_bytes );
+ p_input->p_first_byte_to_mix = p_in + i_nb_bytes;
+ break;
+ }
+ }
+ }
+ else
+ {
+ /* Downmixing or upmixing. */
+ int i_nb_samples = p_buffer->i_nb_samples;
+ u32 * p_in = (p_input->p_first_byte_to_mix == NULL) ?
+ (u32 *)p_input->fifo.p_first->p_buffer :
+ (u32 *)p_input->p_first_byte_to_mix;
+ u32 * p_out = (u32 *)p_buffer->p_buffer;
+
+
+ if ( p_input->input.i_channels < p_aout->mixer.output.i_channels )
+ {
+ /* Zero out the destination buffer, to avoid static on unavailable
+ * channels. */
+ memset( p_buffer->p_buffer, 0,
+ p_buffer->i_nb_samples * sizeof(u32)
+ * p_aout->mixer.output.i_channels );
+ }
+
+ for ( ; ; )
+ {
+ ptrdiff_t i_available_bytes = (p_input->fifo.p_first->p_buffer
+ - (char *)p_in)
+ + p_input->fifo.p_first->i_nb_samples
+ * sizeof(u32)
+ * p_input->input.i_channels;
+ int i_available_samples = i_available_bytes
+ / p_input->input.i_channels
+ / sizeof(u32);
+
+ if ( i_available_samples < i_nb_samples )
+ {
+ aout_buffer_t * p_old_buffer;
+
+ if ( i_available_samples > 0 )
+ SparseCopy( p_out, p_in, i_available_samples,
+ p_aout->mixer.output.i_channels,
+ p_input->input.i_channels );
+ i_nb_samples -= i_available_samples;
+ p_out += i_available_samples * p_aout->mixer.output.i_channels;
+
+ /* Next buffer */
+ p_old_buffer = aout_FifoPop( p_aout, &p_input->fifo );
+ aout_BufferFree( p_old_buffer );
+ if ( p_input->fifo.p_first == NULL )
+ {
+ msg_Err( p_aout, "internal amix error" );
+ return;
+ }
+ p_in = (u32 *)p_input->fifo.p_first->p_buffer;
+ }
+ else
+ {
+ SparseCopy( p_out, p_in, i_nb_samples,
+ p_aout->mixer.output.i_channels,
+ p_input->input.i_channels );
+ p_input->p_first_byte_to_mix = (char *)p_in
+ + i_nb_samples * p_input->input.i_channels
+ * sizeof(u32);
+ break;
+ }
+ }
+ }
+}
+
--- /dev/null
+.dep
+*.lo
+*.o.*
+*.lo.*
--- /dev/null
+alsa_SOURCES = alsa.c
+arts_SOURCES = arts.c
+esd_SOURCES = esd.c
+file_SOURCES = file.c
+oss_SOURCES = oss.c
+waveout_SOURCES = waveout.c
--- /dev/null
+/*****************************************************************************
+ * alsa.c : alsa plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2000-2001 VideoLAN
+ * $Id: alsa.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Henri Fallon <henri@videolan.org> - Original Author
+ * Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
+ * John Paul Lorenti <jpl31@columbia.edu> - Device selection
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <errno.h> /* ENOMEM */
+#include <string.h> /* strerror() */
+#include <stdlib.h> /* calloc(), malloc(), free() */
+
+#include <vlc/vlc.h>
+#include <vlc/aout.h>
+
+#include <alsa/asoundlib.h>
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+
+static int SetFormat ( aout_thread_t * );
+static int GetBufInfo ( aout_thread_t *, int );
+static void Play ( aout_thread_t *, byte_t *, int );
+
+static void HandleXrun ( aout_thread_t *);
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+ add_category_hint( N_("Device"), NULL );
+ add_string( "alsa-device", NULL, NULL, N_("Name"), NULL );
+ set_description( _("ALSA audio module") );
+ set_capability( "audio output", 50 );
+ set_callbacks( Open, Close );
+vlc_module_end();
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+typedef struct alsa_device_t
+{
+ int i_num;
+} alsa_device_t;
+
+typedef struct alsa_card_t
+{
+ int i_num;
+} alsa_card_t;
+
+/* here we store plugin dependant informations */
+
+struct aout_sys_t
+{
+ snd_pcm_t * p_alsa_handle;
+ unsigned long buffer_time;
+ unsigned long period_time;
+ unsigned long chunk_size;
+ unsigned long buffer_size;
+ unsigned long rate;
+ unsigned int bytes_per_sample;
+ unsigned int samples_per_frame;
+ unsigned int bytes_per_frame;
+};
+
+/*****************************************************************************
+ * Open: create a handle and open an alsa device
+ *****************************************************************************
+ * This function opens an alsa device, through the alsa API
+ *****************************************************************************/
+static int Open( vlc_object_t *p_this )
+{
+ aout_thread_t *p_aout = (aout_thread_t *)p_this;
+
+ /* Allows user to choose which ALSA device to use */
+ char psz_alsadev[128];
+ char *psz_device, *psz_userdev;
+ int i_ret;
+
+ /* Allocate structures */
+ p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
+ if( p_aout->p_sys == NULL )
+ {
+ msg_Err( p_aout, "out of memory" );
+ return -1;
+ }
+
+ p_aout->pf_setformat = SetFormat;
+ p_aout->pf_getbufinfo = GetBufInfo;
+ p_aout->pf_play = Play;
+
+ /* Read in ALSA device preferences from configuration */
+ psz_userdev = config_GetPsz( p_aout, "alsa-device" );
+
+ if( psz_userdev )
+ {
+ psz_device = psz_userdev;
+ }
+ else
+ {
+ /* Use the internal logic to decide on the device name */
+ if( p_aout->i_format != AOUT_FMT_A52 )
+ {
+ psz_device = "default";
+ }
+ else
+ {
+ unsigned char s[4];
+ s[0] = IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO;
+ s[1] = IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER;
+ s[2] = 0;
+ s[3] = IEC958_AES3_CON_FS_48000;
+ sprintf( psz_alsadev,
+ "iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x",
+ s[0], s[1], s[2], s[3] );
+ psz_device = psz_alsadev;
+ }
+ }
+
+ /* Open device */
+ i_ret = snd_pcm_open( &(p_aout->p_sys->p_alsa_handle),
+ psz_device, SND_PCM_STREAM_PLAYBACK, 0);
+ if( i_ret != 0 )
+ {
+ msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
+ psz_device, snd_strerror(i_ret) );
+ if( psz_userdev )
+ {
+ free( psz_userdev );
+ }
+
+ return -1;
+ }
+
+ if( psz_userdev )
+ {
+ free( psz_userdev );
+ }
+
+ return 0;
+}
+
+/*****************************************************************************
+ * SetFormat : sets the alsa output format
+ *****************************************************************************
+ * This function prepares the device, sets the rate, format, the mode
+ * ( "play as soon as you have data" ), and buffer information.
+ *****************************************************************************/
+static int SetFormat( aout_thread_t *p_aout )
+{
+ int i_rv;
+ int i_format;
+
+ snd_pcm_hw_params_t *p_hw;
+ snd_pcm_sw_params_t *p_sw;
+
+ snd_pcm_hw_params_alloca(&p_hw);
+ snd_pcm_sw_params_alloca(&p_sw);
+
+ /* default value for snd_pcm_hw_params_set_buffer_time_near() */
+ p_aout->p_sys->buffer_time = AOUT_BUFFER_DURATION;
+
+ switch (p_aout->i_format)
+ {
+ case AOUT_FMT_S16_LE:
+ i_format = SND_PCM_FORMAT_S16_LE;
+ p_aout->p_sys->bytes_per_sample = 2;
+ break;
+
+ case AOUT_FMT_A52:
+ i_format = SND_PCM_FORMAT_S16_LE;
+ p_aout->p_sys->bytes_per_sample = 2;
+ /* buffer_time must be 500000 to avoid a system crash */
+ p_aout->p_sys->buffer_time = 500000;
+ break;
+
+ default:
+ i_format = SND_PCM_FORMAT_S16_BE;
+ p_aout->p_sys->bytes_per_sample = 2;
+ break;
+ }
+
+ p_aout->p_sys->samples_per_frame = p_aout->i_channels;
+ p_aout->p_sys->bytes_per_frame = p_aout->p_sys->samples_per_frame *
+ p_aout->p_sys->bytes_per_sample;
+
+ i_rv = snd_pcm_hw_params_any( p_aout->p_sys->p_alsa_handle, p_hw );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to retrieve initial parameters" );
+ return -1;
+ }
+
+ i_rv = snd_pcm_hw_params_set_access( p_aout->p_sys->p_alsa_handle, p_hw,
+ SND_PCM_ACCESS_RW_INTERLEAVED );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set interleaved stream format" );
+ return -1;
+ }
+
+ i_rv = snd_pcm_hw_params_set_format( p_aout->p_sys->p_alsa_handle,
+ p_hw, i_format );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set stream sample size and word order" );
+ return -1;
+ }
+
+ i_rv = snd_pcm_hw_params_set_channels( p_aout->p_sys->p_alsa_handle, p_hw,
+ p_aout->i_channels );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set number of output channels" );
+ return -1;
+ }
+
+ i_rv = snd_pcm_hw_params_set_rate_near( p_aout->p_sys->p_alsa_handle, p_hw,
+ p_aout->i_rate, 0 );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set sample rate" );
+ return -1;
+ }
+ p_aout->p_sys->rate = i_rv;
+
+ i_rv = snd_pcm_hw_params_set_buffer_time_near( p_aout->p_sys->p_alsa_handle,
+ p_hw,
+ p_aout->p_sys->buffer_time,
+ 0 );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set buffer time" );
+ return -1;
+ }
+ p_aout->p_sys->buffer_time = i_rv;
+
+ i_rv = snd_pcm_hw_params_set_period_time_near( p_aout->p_sys->p_alsa_handle,
+ p_hw, p_aout->p_sys->buffer_time / p_aout->p_sys->bytes_per_frame, 0 );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set period time" );
+ return -1;
+ }
+ p_aout->p_sys->period_time = i_rv;
+
+ i_rv = snd_pcm_hw_params(p_aout->p_sys->p_alsa_handle, p_hw);
+ if (i_rv < 0)
+ {
+ msg_Err( p_aout, "unable to set hardware configuration" );
+ return -1;
+ }
+
+ p_aout->p_sys->chunk_size = snd_pcm_hw_params_get_period_size( p_hw, 0 );
+ p_aout->p_sys->buffer_size = snd_pcm_hw_params_get_buffer_size( p_hw );
+
+ snd_pcm_sw_params_current( p_aout->p_sys->p_alsa_handle, p_sw );
+ i_rv = snd_pcm_sw_params_set_sleep_min( p_aout->p_sys->p_alsa_handle, p_sw,
+ 0 );
+
+ i_rv = snd_pcm_sw_params_set_avail_min( p_aout->p_sys->p_alsa_handle, p_sw,
+ p_aout->p_sys->chunk_size );
+
+ /* Worked with the CVS version but not with 0.9beta3
+ i_rv = snd_pcm_sw_params_set_start_threshold( p_aout->p_sys->p_alsa_handle,
+ p_sw, p_aout->p_sys->buffer_size );
+
+ i_rv = snd_pcm_sw_params_set_stop_threshold( p_aout->p_sys->p_alsa_handle,
+ p_sw, p_aout->p_sys->buffer_size);
+ */
+ i_rv = snd_pcm_sw_params( p_aout->p_sys->p_alsa_handle, p_sw );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to set software configuration" );
+ return -1;
+ }
+
+ return 0;
+}
+
+/*****************************************************************************
+ * HandleXrun : reprepare the output
+ *****************************************************************************
+ * When buffer gets empty, the driver goes in "Xrun" state, where it needs
+ * to be reprepared before playing again
+ *****************************************************************************/
+static void HandleXrun(aout_thread_t *p_aout)
+{
+ int i_rv;
+
+ msg_Err( p_aout, "resetting output after buffer underrun" );
+
+// i_rv = snd_pcm_reset( p_aout->p_sys->p_alsa_handle );
+ i_rv = snd_pcm_prepare( p_aout->p_sys->p_alsa_handle );
+ if( i_rv < 0 )
+ {
+ msg_Err( p_aout, "unable to recover from buffer underrun (%s)",
+ snd_strerror( i_rv ) );
+ }
+}
+
+
+/*****************************************************************************
+ * BufInfo: buffer status query
+ *****************************************************************************
+ * This function returns the number of used byte in the queue.
+ * It also deals with errors : indeed if the device comes to run out
+ * of data to play, it switches to the "underrun" status. It has to
+ * be flushed and re-prepared
+ *****************************************************************************/
+static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
+{
+ snd_pcm_status_t *p_status;
+ int i_alsa_get_status_returns;
+
+ snd_pcm_status_alloca( &p_status );
+
+ i_alsa_get_status_returns = snd_pcm_status( p_aout->p_sys->p_alsa_handle,
+ p_status );
+
+ if( i_alsa_get_status_returns )
+ {
+ msg_Err( p_aout, "failed getting alsa buffer info (%s)",
+ snd_strerror ( i_alsa_get_status_returns ) );
+ return ( -1 );
+ }
+
+ switch( snd_pcm_status_get_state( p_status ) )
+ {
+ case SND_PCM_STATE_XRUN :
+ HandleXrun( p_aout );
+ break;
+
+ case SND_PCM_STATE_OPEN:
+ case SND_PCM_STATE_PREPARED:
+ case SND_PCM_STATE_RUNNING:
+ break;
+
+ default:
+ msg_Err( p_aout, "unhandled condition %i",
+ snd_pcm_status_get_state( p_status ) );
+ break;
+ }
+
+ return snd_pcm_status_get_avail(p_status) * p_aout->p_sys->bytes_per_frame;
+}
+
+/*****************************************************************************
+ * Play : plays a sample
+ *****************************************************************************
+ * Plays a sample using the snd_pcm_writei function from the alsa API
+ *****************************************************************************/
+static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
+{
+ snd_pcm_uframes_t tot_frames;
+ snd_pcm_uframes_t frames_left;
+ snd_pcm_uframes_t rv;
+
+ tot_frames = i_size / p_aout->p_sys->bytes_per_frame;
+ frames_left = tot_frames;
+
+ while( frames_left > 0 )
+ {
+ rv = snd_pcm_writei( p_aout->p_sys->p_alsa_handle, buffer +
+ (tot_frames - frames_left) *
+ p_aout->p_sys->bytes_per_frame, frames_left );
+
+ if( (signed int) rv < 0 )
+ {
+ msg_Err( p_aout, "failed writing to output (%s)",
+ snd_strerror( rv ) );
+ return;
+ }
+
+ frames_left -= rv;
+ }
+}
+
+/*****************************************************************************
+ * Close: close the Alsa device
+ *****************************************************************************/
+static void Close( vlc_object_t *p_this )
+{
+ aout_thread_t *p_aout = (aout_thread_t *)p_this;
+ int i_close_returns;
+
+ i_close_returns = snd_pcm_close( p_aout->p_sys->p_alsa_handle );
+
+ if( i_close_returns )
+ {
+ msg_Err( p_aout, "failed closing ALSA device (%s)",
+ snd_strerror( i_close_returns ) );
+ }
+
+ free( p_aout->p_sys );
+}
+
+++ /dev/null
-.dep
-*.lo
-*.o.*
-*.lo.*
+++ /dev/null
-alsa_SOURCES = alsa.c
+++ /dev/null
-/*****************************************************************************
- * alsa.c : alsa plugin for vlc
- *****************************************************************************
- * Copyright (C) 2000-2001 VideoLAN
- * $Id: alsa.c,v 1.1 2002/08/04 17:23:42 sam Exp $
- *
- * Authors: Henri Fallon <henri@videolan.org> - Original Author
- * Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
- * John Paul Lorenti <jpl31@columbia.edu> - Device selection
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <errno.h> /* ENOMEM */
-#include <string.h> /* strerror() */
-#include <stdlib.h> /* calloc(), malloc(), free() */
-
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
-
-#include <alsa/asoundlib.h>
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int Open ( vlc_object_t * );
-static void Close ( vlc_object_t * );
-
-static int SetFormat ( aout_thread_t * );
-static int GetBufInfo ( aout_thread_t *, int );
-static void Play ( aout_thread_t *, byte_t *, int );
-
-static void HandleXrun ( aout_thread_t *);
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin();
- add_category_hint( N_("Device"), NULL );
- add_string( "alsa-device", NULL, NULL, N_("Name"), NULL );
- set_description( _("ALSA audio module") );
- set_capability( "audio output", 50 );
- set_callbacks( Open, Close );
-vlc_module_end();
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-typedef struct alsa_device_t
-{
- int i_num;
-} alsa_device_t;
-
-typedef struct alsa_card_t
-{
- int i_num;
-} alsa_card_t;
-
-/* here we store plugin dependant informations */
-
-struct aout_sys_t
-{
- snd_pcm_t * p_alsa_handle;
- unsigned long buffer_time;
- unsigned long period_time;
- unsigned long chunk_size;
- unsigned long buffer_size;
- unsigned long rate;
- unsigned int bytes_per_sample;
- unsigned int samples_per_frame;
- unsigned int bytes_per_frame;
-};
-
-/*****************************************************************************
- * Open: create a handle and open an alsa device
- *****************************************************************************
- * This function opens an alsa device, through the alsa API
- *****************************************************************************/
-static int Open( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
-
- /* Allows user to choose which ALSA device to use */
- char psz_alsadev[128];
- char *psz_device, *psz_userdev;
- int i_ret;
-
- /* Allocate structures */
- p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
- if( p_aout->p_sys == NULL )
- {
- msg_Err( p_aout, "out of memory" );
- return -1;
- }
-
- p_aout->pf_setformat = SetFormat;
- p_aout->pf_getbufinfo = GetBufInfo;
- p_aout->pf_play = Play;
-
- /* Read in ALSA device preferences from configuration */
- psz_userdev = config_GetPsz( p_aout, "alsa-device" );
-
- if( psz_userdev )
- {
- psz_device = psz_userdev;
- }
- else
- {
- /* Use the internal logic to decide on the device name */
- if( p_aout->i_format != AOUT_FMT_A52 )
- {
- psz_device = "default";
- }
- else
- {
- unsigned char s[4];
- s[0] = IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO;
- s[1] = IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER;
- s[2] = 0;
- s[3] = IEC958_AES3_CON_FS_48000;
- sprintf( psz_alsadev,
- "iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x",
- s[0], s[1], s[2], s[3] );
- psz_device = psz_alsadev;
- }
- }
-
- /* Open device */
- i_ret = snd_pcm_open( &(p_aout->p_sys->p_alsa_handle),
- psz_device, SND_PCM_STREAM_PLAYBACK, 0);
- if( i_ret != 0 )
- {
- msg_Err( p_aout, "cannot open ALSA device `%s' (%s)",
- psz_device, snd_strerror(i_ret) );
- if( psz_userdev )
- {
- free( psz_userdev );
- }
-
- return -1;
- }
-
- if( psz_userdev )
- {
- free( psz_userdev );
- }
-
- return 0;
-}
-
-/*****************************************************************************
- * SetFormat : sets the alsa output format
- *****************************************************************************
- * This function prepares the device, sets the rate, format, the mode
- * ( "play as soon as you have data" ), and buffer information.
- *****************************************************************************/
-static int SetFormat( aout_thread_t *p_aout )
-{
- int i_rv;
- int i_format;
-
- snd_pcm_hw_params_t *p_hw;
- snd_pcm_sw_params_t *p_sw;
-
- snd_pcm_hw_params_alloca(&p_hw);
- snd_pcm_sw_params_alloca(&p_sw);
-
- /* default value for snd_pcm_hw_params_set_buffer_time_near() */
- p_aout->p_sys->buffer_time = AOUT_BUFFER_DURATION;
-
- switch (p_aout->i_format)
- {
- case AOUT_FMT_S16_LE:
- i_format = SND_PCM_FORMAT_S16_LE;
- p_aout->p_sys->bytes_per_sample = 2;
- break;
-
- case AOUT_FMT_A52:
- i_format = SND_PCM_FORMAT_S16_LE;
- p_aout->p_sys->bytes_per_sample = 2;
- /* buffer_time must be 500000 to avoid a system crash */
- p_aout->p_sys->buffer_time = 500000;
- break;
-
- default:
- i_format = SND_PCM_FORMAT_S16_BE;
- p_aout->p_sys->bytes_per_sample = 2;
- break;
- }
-
- p_aout->p_sys->samples_per_frame = p_aout->i_channels;
- p_aout->p_sys->bytes_per_frame = p_aout->p_sys->samples_per_frame *
- p_aout->p_sys->bytes_per_sample;
-
- i_rv = snd_pcm_hw_params_any( p_aout->p_sys->p_alsa_handle, p_hw );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to retrieve initial parameters" );
- return -1;
- }
-
- i_rv = snd_pcm_hw_params_set_access( p_aout->p_sys->p_alsa_handle, p_hw,
- SND_PCM_ACCESS_RW_INTERLEAVED );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set interleaved stream format" );
- return -1;
- }
-
- i_rv = snd_pcm_hw_params_set_format( p_aout->p_sys->p_alsa_handle,
- p_hw, i_format );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set stream sample size and word order" );
- return -1;
- }
-
- i_rv = snd_pcm_hw_params_set_channels( p_aout->p_sys->p_alsa_handle, p_hw,
- p_aout->i_channels );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set number of output channels" );
- return -1;
- }
-
- i_rv = snd_pcm_hw_params_set_rate_near( p_aout->p_sys->p_alsa_handle, p_hw,
- p_aout->i_rate, 0 );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set sample rate" );
- return -1;
- }
- p_aout->p_sys->rate = i_rv;
-
- i_rv = snd_pcm_hw_params_set_buffer_time_near( p_aout->p_sys->p_alsa_handle,
- p_hw,
- p_aout->p_sys->buffer_time,
- 0 );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set buffer time" );
- return -1;
- }
- p_aout->p_sys->buffer_time = i_rv;
-
- i_rv = snd_pcm_hw_params_set_period_time_near( p_aout->p_sys->p_alsa_handle,
- p_hw, p_aout->p_sys->buffer_time / p_aout->p_sys->bytes_per_frame, 0 );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set period time" );
- return -1;
- }
- p_aout->p_sys->period_time = i_rv;
-
- i_rv = snd_pcm_hw_params(p_aout->p_sys->p_alsa_handle, p_hw);
- if (i_rv < 0)
- {
- msg_Err( p_aout, "unable to set hardware configuration" );
- return -1;
- }
-
- p_aout->p_sys->chunk_size = snd_pcm_hw_params_get_period_size( p_hw, 0 );
- p_aout->p_sys->buffer_size = snd_pcm_hw_params_get_buffer_size( p_hw );
-
- snd_pcm_sw_params_current( p_aout->p_sys->p_alsa_handle, p_sw );
- i_rv = snd_pcm_sw_params_set_sleep_min( p_aout->p_sys->p_alsa_handle, p_sw,
- 0 );
-
- i_rv = snd_pcm_sw_params_set_avail_min( p_aout->p_sys->p_alsa_handle, p_sw,
- p_aout->p_sys->chunk_size );
-
- /* Worked with the CVS version but not with 0.9beta3
- i_rv = snd_pcm_sw_params_set_start_threshold( p_aout->p_sys->p_alsa_handle,
- p_sw, p_aout->p_sys->buffer_size );
-
- i_rv = snd_pcm_sw_params_set_stop_threshold( p_aout->p_sys->p_alsa_handle,
- p_sw, p_aout->p_sys->buffer_size);
- */
- i_rv = snd_pcm_sw_params( p_aout->p_sys->p_alsa_handle, p_sw );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to set software configuration" );
- return -1;
- }
-
- return 0;
-}
-
-/*****************************************************************************
- * HandleXrun : reprepare the output
- *****************************************************************************
- * When buffer gets empty, the driver goes in "Xrun" state, where it needs
- * to be reprepared before playing again
- *****************************************************************************/
-static void HandleXrun(aout_thread_t *p_aout)
-{
- int i_rv;
-
- msg_Err( p_aout, "resetting output after buffer underrun" );
-
-// i_rv = snd_pcm_reset( p_aout->p_sys->p_alsa_handle );
- i_rv = snd_pcm_prepare( p_aout->p_sys->p_alsa_handle );
- if( i_rv < 0 )
- {
- msg_Err( p_aout, "unable to recover from buffer underrun (%s)",
- snd_strerror( i_rv ) );
- }
-}
-
-
-/*****************************************************************************
- * BufInfo: buffer status query
- *****************************************************************************
- * This function returns the number of used byte in the queue.
- * It also deals with errors : indeed if the device comes to run out
- * of data to play, it switches to the "underrun" status. It has to
- * be flushed and re-prepared
- *****************************************************************************/
-static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
-{
- snd_pcm_status_t *p_status;
- int i_alsa_get_status_returns;
-
- snd_pcm_status_alloca( &p_status );
-
- i_alsa_get_status_returns = snd_pcm_status( p_aout->p_sys->p_alsa_handle,
- p_status );
-
- if( i_alsa_get_status_returns )
- {
- msg_Err( p_aout, "failed getting alsa buffer info (%s)",
- snd_strerror ( i_alsa_get_status_returns ) );
- return ( -1 );
- }
-
- switch( snd_pcm_status_get_state( p_status ) )
- {
- case SND_PCM_STATE_XRUN :
- HandleXrun( p_aout );
- break;
-
- case SND_PCM_STATE_OPEN:
- case SND_PCM_STATE_PREPARED:
- case SND_PCM_STATE_RUNNING:
- break;
-
- default:
- msg_Err( p_aout, "unhandled condition %i",
- snd_pcm_status_get_state( p_status ) );
- break;
- }
-
- return snd_pcm_status_get_avail(p_status) * p_aout->p_sys->bytes_per_frame;
-}
-
-/*****************************************************************************
- * Play : plays a sample
- *****************************************************************************
- * Plays a sample using the snd_pcm_writei function from the alsa API
- *****************************************************************************/
-static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
-{
- snd_pcm_uframes_t tot_frames;
- snd_pcm_uframes_t frames_left;
- snd_pcm_uframes_t rv;
-
- tot_frames = i_size / p_aout->p_sys->bytes_per_frame;
- frames_left = tot_frames;
-
- while( frames_left > 0 )
- {
- rv = snd_pcm_writei( p_aout->p_sys->p_alsa_handle, buffer +
- (tot_frames - frames_left) *
- p_aout->p_sys->bytes_per_frame, frames_left );
-
- if( (signed int) rv < 0 )
- {
- msg_Err( p_aout, "failed writing to output (%s)",
- snd_strerror( rv ) );
- return;
- }
-
- frames_left -= rv;
- }
-}
-
-/*****************************************************************************
- * Close: close the Alsa device
- *****************************************************************************/
-static void Close( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
- int i_close_returns;
-
- i_close_returns = snd_pcm_close( p_aout->p_sys->p_alsa_handle );
-
- if( i_close_returns )
- {
- msg_Err( p_aout, "failed closing ALSA device (%s)",
- snd_strerror( i_close_returns ) );
- }
-
- free( p_aout->p_sys );
-}
-
--- /dev/null
+/*****************************************************************************
+ * arts.c : aRts module
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ *
+ * Authors: Emmanuel Blindauer <manu@agat.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <errno.h> /* ENOMEM */
+#include <fcntl.h> /* open(), O_WRONLY */
+#include <string.h> /* strerror() */
+#include <unistd.h> /* write(), close() */
+#include <stdlib.h> /* calloc(), malloc(), free() */
+
+#include <vlc/vlc.h>
+#include <vlc/aout.h>
+
+#include <artsc.h>
+
+/*****************************************************************************
+ * aout_sys_t: arts audio output method descriptor
+ *****************************************************************************
+ * This structure is part of the audio output thread descriptor.
+ * It describes some arts specific variables.
+ *****************************************************************************/
+struct aout_sys_t
+{
+ arts_stream_t stream;
+};
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+
+static int SetFormat ( aout_thread_t * );
+static int GetBufInfo ( aout_thread_t *, int );
+static void Play ( aout_thread_t *, byte_t *, int );
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+ set_description( _("aRts audio module") );
+ set_capability( "audio output", 50 );
+ set_callbacks( Open, Close );
+vlc_module_end();
+
+/*****************************************************************************
+ * Open: initialize arts connection to server
+ *****************************************************************************/
+static int Open( vlc_object_t *p_this )
+{
+ aout_thread_t *p_aout = (aout_thread_t *)p_this;
+ int i_err = 0;
+
+ /* Allocate structure */
+ p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
+ if( p_aout->p_sys == NULL )
+ {
+ msg_Err( p_aout, "out of memory" );
+ return( 1 );
+ }
+
+ i_err = arts_init();
+
+ if (i_err < 0)
+ {
+ msg_Err( p_aout, "arts_init failed (%s)", arts_error_text(i_err) );
+ free( p_aout->p_sys );
+ return(-1);
+ }
+
+ p_aout->pf_setformat = SetFormat;
+ p_aout->pf_getbufinfo = GetBufInfo;
+ p_aout->pf_play = Play;
+
+ p_aout->p_sys->stream =
+ arts_play_stream( p_aout->i_rate, 16, p_aout->i_channels, "vlc" );
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * SetFormat: set the output format
+ *****************************************************************************/
+static int SetFormat( aout_thread_t *p_aout )
+{
+ /*Not ready*/
+/* p_aout->i_latency = esd_get_latency(i_fd);*/
+ p_aout->i_latency = 0;
+
+ //msg_Dbg( p_aout, "aout_arts_latency: %d", p_aout->i_latency );
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * GetBufInfo: buffer status query
+ *****************************************************************************/
+static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
+{
+ /* arbitrary value that should be changed */
+ return( i_buffer_limit );
+}
+
+/*****************************************************************************
+ * Play: play a sound samples buffer
+ *****************************************************************************
+ * This function writes a buffer of i_length bytes in the socket
+ *****************************************************************************/
+static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
+{
+ int i_err = arts_write( p_aout->p_sys->stream, buffer, i_size );
+
+ if( i_err < 0 )
+ {
+ msg_Err( p_aout, "arts_write failed (%s)", arts_error_text(i_err) );
+ }
+}
+
+/*****************************************************************************
+ * Close: close the Esound socket
+ *****************************************************************************/
+static void Close( vlc_object_t *p_this )
+{
+ aout_thread_t *p_aout = (aout_thread_t *)p_this;
+
+ arts_close_stream( p_aout->p_sys->stream );
+ free( p_aout->p_sys );
+}
+
+++ /dev/null
-.dep
-*.lo
-*.o.*
-*.lo.*
+++ /dev/null
-arts_SOURCES = arts.c
+++ /dev/null
-/*****************************************************************************
- * arts.c : aRts module
- *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- *
- * Authors: Emmanuel Blindauer <manu@agat.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <errno.h> /* ENOMEM */
-#include <fcntl.h> /* open(), O_WRONLY */
-#include <string.h> /* strerror() */
-#include <unistd.h> /* write(), close() */
-#include <stdlib.h> /* calloc(), malloc(), free() */
-
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
-
-#include <artsc.h>
-
-/*****************************************************************************
- * aout_sys_t: arts audio output method descriptor
- *****************************************************************************
- * This structure is part of the audio output thread descriptor.
- * It describes some arts specific variables.
- *****************************************************************************/
-struct aout_sys_t
-{
- arts_stream_t stream;
-};
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int Open ( vlc_object_t * );
-static void Close ( vlc_object_t * );
-
-static int SetFormat ( aout_thread_t * );
-static int GetBufInfo ( aout_thread_t *, int );
-static void Play ( aout_thread_t *, byte_t *, int );
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin();
- set_description( _("aRts audio module") );
- set_capability( "audio output", 50 );
- set_callbacks( Open, Close );
-vlc_module_end();
-
-/*****************************************************************************
- * Open: initialize arts connection to server
- *****************************************************************************/
-static int Open( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
- int i_err = 0;
-
- /* Allocate structure */
- p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
- if( p_aout->p_sys == NULL )
- {
- msg_Err( p_aout, "out of memory" );
- return( 1 );
- }
-
- i_err = arts_init();
-
- if (i_err < 0)
- {
- msg_Err( p_aout, "arts_init failed (%s)", arts_error_text(i_err) );
- free( p_aout->p_sys );
- return(-1);
- }
-
- p_aout->pf_setformat = SetFormat;
- p_aout->pf_getbufinfo = GetBufInfo;
- p_aout->pf_play = Play;
-
- p_aout->p_sys->stream =
- arts_play_stream( p_aout->i_rate, 16, p_aout->i_channels, "vlc" );
-
- return( 0 );
-}
-
-/*****************************************************************************
- * SetFormat: set the output format
- *****************************************************************************/
-static int SetFormat( aout_thread_t *p_aout )
-{
- /*Not ready*/
-/* p_aout->i_latency = esd_get_latency(i_fd);*/
- p_aout->i_latency = 0;
-
- //msg_Dbg( p_aout, "aout_arts_latency: %d", p_aout->i_latency );
-
- return( 0 );
-}
-
-/*****************************************************************************
- * GetBufInfo: buffer status query
- *****************************************************************************/
-static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
-{
- /* arbitrary value that should be changed */
- return( i_buffer_limit );
-}
-
-/*****************************************************************************
- * Play: play a sound samples buffer
- *****************************************************************************
- * This function writes a buffer of i_length bytes in the socket
- *****************************************************************************/
-static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
-{
- int i_err = arts_write( p_aout->p_sys->stream, buffer, i_size );
-
- if( i_err < 0 )
- {
- msg_Err( p_aout, "arts_write failed (%s)", arts_error_text(i_err) );
- }
-}
-
-/*****************************************************************************
- * Close: close the Esound socket
- *****************************************************************************/
-static void Close( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
-
- arts_close_stream( p_aout->p_sys->stream );
- free( p_aout->p_sys );
-}
-
+++ /dev/null
-.dep
-*.lo
-*.o.*
-*.lo.*
+++ /dev/null
-dsp_SOURCES = dsp.c
+++ /dev/null
-/*****************************************************************************
- * dsp.c : OSS /dev/dsp module for vlc
- *****************************************************************************
- * Copyright (C) 2000-2001 VideoLAN
- * $Id: dsp.c,v 1.1 2002/08/04 17:23:42 sam Exp $
- *
- * Authors: Michel Kaempf <maxx@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.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <errno.h> /* ENOMEM */
-#include <fcntl.h> /* open(), O_WRONLY */
-#include <sys/ioctl.h> /* ioctl() */
-#include <string.h> /* strerror() */
-#include <unistd.h> /* write(), close() */
-#include <stdlib.h> /* calloc(), malloc(), free() */
-
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
-
-/* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED,
- * SNDCTL_DSP_GETOSPACE */
-#ifdef HAVE_SOUNDCARD_H
-# include <soundcard.h>
-#elif defined( HAVE_SYS_SOUNDCARD_H )
-# include <sys/soundcard.h>
-#elif defined( HAVE_MACHINE_SOUNDCARD_H )
-# include <machine/soundcard.h>
-#endif
-
-/*****************************************************************************
- * aout_sys_t: dsp audio output method descriptor
- *****************************************************************************
- * This structure is part of the audio output thread descriptor.
- * It describes the dsp specific properties of an audio device.
- *****************************************************************************/
-struct aout_sys_t
-{
- audio_buf_info audio_buf;
-
- /* Path to the audio output device */
- char * psz_device;
- int i_fd;
-};
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int Open ( vlc_object_t * );
-static void Close ( vlc_object_t * );
-
-static int SetFormat ( aout_thread_t * );
-static int GetBufInfo ( aout_thread_t *, int );
-static void Play ( aout_thread_t *, byte_t *, int );
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin();
- add_category_hint( N_("Miscellaneous"), NULL );
- add_file( "dspdev", "/dev/dsp", NULL, N_("OSS dsp device"), NULL );
- set_description( _("Linux OSS /dev/dsp module") );
- set_capability( "audio output", 100 );
- set_callbacks( Open, Close );
-vlc_module_end();
-
-/*****************************************************************************
- * Open: opens the audio device (the digital sound processor)
- *****************************************************************************
- * This function opens the dsp as a usual non-blocking write-only file, and
- * modifies the p_aout->p_sys->i_fd with the file's descriptor.
- *****************************************************************************/
-static int Open( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
-
- /* Allocate structure */
- p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
- if( p_aout->p_sys == NULL )
- {
- msg_Err( p_aout, "out of memory" );
- return( 1 );
- }
-
- /* Initialize some variables */
- if( !(p_aout->p_sys->psz_device = config_GetPsz( p_aout, "dspdev" )) )
- {
- msg_Err( p_aout, "don't know which audio device to open" );
- free( p_aout->p_sys );
- return( -1 );
- }
-
- p_aout->pf_setformat = SetFormat;
- p_aout->pf_getbufinfo = GetBufInfo;
- p_aout->pf_play = Play;
-
- /* Open the sound device */
- if( (p_aout->p_sys->i_fd = open( p_aout->p_sys->psz_device, O_WRONLY ))
- < 0 )
- {
- msg_Err( p_aout, "cannot open audio device (%s)",
- p_aout->p_sys->psz_device );
- free( p_aout->p_sys->psz_device );
- free( p_aout->p_sys );
- return( -1 );
- }
-
- return( 0 );
-}
-
-/*****************************************************************************
- * SetFormat: resets the dsp and sets its format
- *****************************************************************************
- * This functions resets the DSP device, tries to initialize the output
- * format with the value contained in the dsp structure, and if this value
- * could not be set, the default value returned by ioctl is set. It then
- * does the same for the stereo mode, and for the output rate.
- *****************************************************************************/
-static int SetFormat( aout_thread_t *p_aout )
-{
- int i_format;
- int i_rate;
- vlc_bool_t b_stereo;
-
- /* Reset the DSP device */
- if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
- {
- msg_Err( p_aout, "cannot reset audio device (%s)",
- p_aout->p_sys->psz_device );
- return( -1 );
- }
-
- /* Set the output format */
- i_format = p_aout->i_format;
- if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0 )
- {
- msg_Err( p_aout, "cannot set audio output format (%i)",
- p_aout->i_format );
- return( -1 );
- }
-
- if( i_format != p_aout->i_format )
- {
- msg_Warn( p_aout, "audio output format not supported (%i)",
- p_aout->i_format );
- p_aout->i_format = i_format;
- }
-
- /* Set the number of channels */
- b_stereo = ( p_aout->i_channels >= 2 );
-
- if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_STEREO, &b_stereo ) < 0 )
- {
- msg_Err( p_aout, "cannot set number of audio channels (%i)",
- p_aout->i_channels );
- return( -1 );
- }
-
- if( (1 + b_stereo) != p_aout->i_channels )
- {
- msg_Warn( p_aout, "%i audio channels not supported",
- p_aout->i_channels );
- p_aout->i_channels = 1 + b_stereo;
- }
-
- /* Set the output rate */
- i_rate = p_aout->i_rate;
- if( ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_SPEED, &i_rate ) < 0 )
- {
- msg_Err( p_aout, "cannot set audio output rate (%i)", p_aout->i_rate );
- return( -1 );
- }
-
- if( i_rate != p_aout->i_rate )
- {
- msg_Warn( p_aout, "audio output rate not supported (%li)",
- p_aout->i_rate );
- p_aout->i_rate = i_rate;
- }
-
- return( 0 );
-}
-
-/*****************************************************************************
- * GetBufInfo: buffer status query
- *****************************************************************************
- * This function fills in the audio_buf_info structure :
- * - returns : number of available fragments (not partially used ones)
- * - int fragstotal : total number of fragments allocated
- * - int fragsize : size of a fragment in bytes
- * - int bytes : available space in bytes (includes partially used fragments)
- * Note! 'bytes' could be more than fragments*fragsize
- *****************************************************************************/
-static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
-{
- ioctl( p_aout->p_sys->i_fd, SNDCTL_DSP_GETOSPACE,
- &p_aout->p_sys->audio_buf );
-
- /* returns the allocated space in bytes */
- return ( (p_aout->p_sys->audio_buf.fragstotal
- * p_aout->p_sys->audio_buf.fragsize)
- - p_aout->p_sys->audio_buf.bytes );
-}
-
-/*****************************************************************************
- * Play: plays a sound samples buffer
- *****************************************************************************
- * This function writes a buffer of i_length bytes in the dsp
- *****************************************************************************/
-static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
-{
- int i_tmp;
- i_tmp = write( p_aout->p_sys->i_fd, buffer, i_size );
-
- if( i_tmp < 0 )
- {
- msg_Err( p_aout, "write failed (%s)", strerror(errno) );
- }
-}
-
-/*****************************************************************************
- * Close: closes the dsp audio device
- *****************************************************************************/
-static void Close( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
-
- close( p_aout->p_sys->i_fd );
- free( p_aout->p_sys->psz_device );
-}
--- /dev/null
+/*****************************************************************************
+ * esd.c : EsounD module
+ *****************************************************************************
+ * Copyright (C) 2000, 2001 VideoLAN
+ * $Id: esd.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <errno.h> /* ENOMEM */
+#include <fcntl.h> /* open(), O_WRONLY */
+#include <string.h> /* strerror() */
+#include <unistd.h> /* write(), close() */
+#include <stdlib.h> /* calloc(), malloc(), free() */
+
+#include <vlc/vlc.h>
+#include <vlc/aout.h>
+
+#include <esd.h>
+
+/*****************************************************************************
+ * aout_sys_t: esd audio output method descriptor
+ *****************************************************************************
+ * This structure is part of the audio output thread descriptor.
+ * It describes some esd specific variables.
+ *****************************************************************************/
+struct aout_sys_t
+{
+ esd_format_t esd_format;
+ int i_fd;
+};
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+
+static int SetFormat ( aout_thread_t * );
+static int GetBufInfo ( aout_thread_t *, int );
+static void Play ( aout_thread_t *, byte_t *, int );
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+ set_description( _("EsounD audio module") );
+ set_capability( "audio output", 50 );
+ set_callbacks( Open, Close );
+ add_shortcut( "esound" );
+vlc_module_end();
+
+/*****************************************************************************
+ * Open: open an esd socket
+ *****************************************************************************/
+static int Open( vlc_object_t *p_this )
+{
+ aout_thread_t *p_aout = (aout_thread_t *)p_this;
+
+ /* mpg123 does it this way */
+ int i_bits = ESD_BITS16;
+ int i_mode = ESD_STREAM;
+ int i_func = ESD_PLAY;
+
+ /* Allocate structure */
+ p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
+ if( p_aout->p_sys == NULL )
+ {
+ msg_Err( p_aout, "out of memory" );
+ return( 1 );
+ }
+
+ /* Initialize some variables */
+ p_aout->i_rate = esd_audio_rate; /* We use actual esd rate value, not
+ * initial value */
+
+ i_bits = ESD_BITS16;
+ i_mode = ESD_STREAM;
+ i_func = ESD_PLAY;
+ p_aout->p_sys->esd_format = (i_bits | i_mode | i_func) & (~ESD_MASK_CHAN);
+
+ if( p_aout->i_channels == 1 )
+ {
+ p_aout->p_sys->esd_format |= ESD_MONO;
+ }
+ else
+ {
+ p_aout->p_sys->esd_format |= ESD_STEREO;
+ }
+
+ /* open a socket for playing a stream
+ * and try to open /dev/dsp if there's no EsounD */
+ if ( (p_aout->p_sys->i_fd
+ = esd_play_stream_fallback(p_aout->p_sys->esd_format,
+ p_aout->i_rate, NULL, "vlc")) < 0 )
+ {
+ msg_Err( p_aout, "cannot open esound socket (format 0x%08x at %ld Hz)",
+ p_aout->p_sys->esd_format, p_aout->i_rate );
+ return( -1 );
+ }
+
+ p_aout->pf_setformat = SetFormat;
+ p_aout->pf_getbufinfo = GetBufInfo;
+ p_aout->pf_play = Play;
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * SetFormat: set the output format
+ *****************************************************************************/
+static int SetFormat( aout_thread_t *p_aout )
+{
+ int i_fd;
+
+ i_fd = esd_open_sound(NULL);
+ p_aout->i_latency = esd_get_latency(i_fd);
+
+ msg_Dbg( p_aout, "aout_esd_latency: %d", p_aout->i_latency );
+
+ return( 0 );
+}
+
+/*****************************************************************************
+ * GetBufInfo: buffer status query
+ *****************************************************************************/
+static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
+{
+ /* arbitrary value that should be changed */
+ return( i_buffer_limit );
+}
+
+/*****************************************************************************
+ * Play: play a sound samples buffer
+ *****************************************************************************
+ * This function writes a buffer of i_length bytes in the socket
+ *****************************************************************************/
+static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
+{
+ int i_amount;
+
+ if (p_aout->p_sys->esd_format & ESD_STEREO)
+ {
+ if (p_aout->p_sys->esd_format & ESD_BITS16)
+ {
+ i_amount = (44100 * (ESD_BUF_SIZE + 64)) / p_aout->i_rate;
+ }
+ else
+ {
+ i_amount = (44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate;
+ }
+ }
+ else
+ {
+ if (p_aout->p_sys->esd_format & ESD_BITS16)
+ {
+ i_amount = (2 * 44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate;
+ }
+ else
+ {
+ i_amount = (2 * 44100 * (ESD_BUF_SIZE + 256)) / p_aout->i_rate;
+ }
+ }
+
+ write( p_aout->p_sys->i_fd, buffer, i_size );
+}
+
+/*****************************************************************************
+ * Close: close the Esound socket
+ *****************************************************************************/
+static void Close( vlc_object_t *p_this )
+{
+ aout_thread_t *p_aout = (aout_thread_t *)p_this;
+
+ close( p_aout->p_sys->i_fd );
+}
+
+++ /dev/null
-.dep
-*.lo
-*.o.*
-*.lo.*
+++ /dev/null
-esd_SOURCES = esd.c
+++ /dev/null
-/*****************************************************************************
- * esd.c : EsounD module
- *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
- * $Id: esd.c,v 1.1 2002/08/04 17:23:42 sam Exp $
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <errno.h> /* ENOMEM */
-#include <fcntl.h> /* open(), O_WRONLY */
-#include <string.h> /* strerror() */
-#include <unistd.h> /* write(), close() */
-#include <stdlib.h> /* calloc(), malloc(), free() */
-
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
-
-#include <esd.h>
-
-/*****************************************************************************
- * aout_sys_t: esd audio output method descriptor
- *****************************************************************************
- * This structure is part of the audio output thread descriptor.
- * It describes some esd specific variables.
- *****************************************************************************/
-struct aout_sys_t
-{
- esd_format_t esd_format;
- int i_fd;
-};
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int Open ( vlc_object_t * );
-static void Close ( vlc_object_t * );
-
-static int SetFormat ( aout_thread_t * );
-static int GetBufInfo ( aout_thread_t *, int );
-static void Play ( aout_thread_t *, byte_t *, int );
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin();
- set_description( _("EsounD audio module") );
- set_capability( "audio output", 50 );
- set_callbacks( Open, Close );
- add_shortcut( "esound" );
-vlc_module_end();
-
-/*****************************************************************************
- * Open: open an esd socket
- *****************************************************************************/
-static int Open( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
-
- /* mpg123 does it this way */
- int i_bits = ESD_BITS16;
- int i_mode = ESD_STREAM;
- int i_func = ESD_PLAY;
-
- /* Allocate structure */
- p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
- if( p_aout->p_sys == NULL )
- {
- msg_Err( p_aout, "out of memory" );
- return( 1 );
- }
-
- /* Initialize some variables */
- p_aout->i_rate = esd_audio_rate; /* We use actual esd rate value, not
- * initial value */
-
- i_bits = ESD_BITS16;
- i_mode = ESD_STREAM;
- i_func = ESD_PLAY;
- p_aout->p_sys->esd_format = (i_bits | i_mode | i_func) & (~ESD_MASK_CHAN);
-
- if( p_aout->i_channels == 1 )
- {
- p_aout->p_sys->esd_format |= ESD_MONO;
- }
- else
- {
- p_aout->p_sys->esd_format |= ESD_STEREO;
- }
-
- /* open a socket for playing a stream
- * and try to open /dev/dsp if there's no EsounD */
- if ( (p_aout->p_sys->i_fd
- = esd_play_stream_fallback(p_aout->p_sys->esd_format,
- p_aout->i_rate, NULL, "vlc")) < 0 )
- {
- msg_Err( p_aout, "cannot open esound socket (format 0x%08x at %ld Hz)",
- p_aout->p_sys->esd_format, p_aout->i_rate );
- return( -1 );
- }
-
- p_aout->pf_setformat = SetFormat;
- p_aout->pf_getbufinfo = GetBufInfo;
- p_aout->pf_play = Play;
-
- return( 0 );
-}
-
-/*****************************************************************************
- * SetFormat: set the output format
- *****************************************************************************/
-static int SetFormat( aout_thread_t *p_aout )
-{
- int i_fd;
-
- i_fd = esd_open_sound(NULL);
- p_aout->i_latency = esd_get_latency(i_fd);
-
- msg_Dbg( p_aout, "aout_esd_latency: %d", p_aout->i_latency );
-
- return( 0 );
-}
-
-/*****************************************************************************
- * GetBufInfo: buffer status query
- *****************************************************************************/
-static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit )
-{
- /* arbitrary value that should be changed */
- return( i_buffer_limit );
-}
-
-/*****************************************************************************
- * Play: play a sound samples buffer
- *****************************************************************************
- * This function writes a buffer of i_length bytes in the socket
- *****************************************************************************/
-static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
-{
- int i_amount;
-
- if (p_aout->p_sys->esd_format & ESD_STEREO)
- {
- if (p_aout->p_sys->esd_format & ESD_BITS16)
- {
- i_amount = (44100 * (ESD_BUF_SIZE + 64)) / p_aout->i_rate;
- }
- else
- {
- i_amount = (44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate;
- }
- }
- else
- {
- if (p_aout->p_sys->esd_format & ESD_BITS16)
- {
- i_amount = (2 * 44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate;
- }
- else
- {
- i_amount = (2 * 44100 * (ESD_BUF_SIZE + 256)) / p_aout->i_rate;
- }
- }
-
- write( p_aout->p_sys->i_fd, buffer, i_size );
-}
-
-/*****************************************************************************
- * Close: close the Esound socket
- *****************************************************************************/
-static void Close( vlc_object_t *p_this )
-{
- aout_thread_t *p_aout = (aout_thread_t *)p_this;
-
- close( p_aout->p_sys->i_fd );
-}
-
--- /dev/null
+/*****************************************************************************
+ * file.c : audio output which writes the samples to a file
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: file.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <string.h>
+#include <stdlib.h>
+
+#include <vlc/vlc.h>
+#include <vlc/aout.h>
+
+#include "aout_internal.h"
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+static int SetFormat ( aout_instance_t * );
+static void Play ( aout_instance_t *, aout_buffer_t * );
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+#define FORMAT_TEXT N_("Output format")
+#define FORMAT_LONGTEXT N_("one of \"u8\", \"s8\", \"u16\", \"s16\"," \
+ " \"u16_le\", \"s16_le\", \"u16_be\"," \
+ " \"s16_be\", \"fixed32\", \"float32\" or \"spdif\"")
+
+static char *format_list[] = { "u8", "s8", "u16", "s16", "u16_le", "s16_le",
+ "u16_be", "s16_be", "fixed32", "float32",
+ "spdif", NULL };
+static int format_int[] = { AOUT_FMT_U8, AOUT_FMT_S8, AOUT_FMT_U16_NE,
+ AOUT_FMT_S16_NE, AOUT_FMT_U16_LE, AOUT_FMT_S16_LE,
+ AOUT_FMT_U16_BE, AOUT_FMT_S16_BE, AOUT_FMT_FIXED32,
+ AOUT_FMT_FLOAT32, AOUT_FMT_A52 };
+
+#define PATH_TEXT N_("Path of the output file")
+#define PATH_LONGTEXT N_("By default samples.raw")
+
+vlc_module_begin();
+ add_category_hint( N_("Audio"), NULL );
+ add_string_from_list( "format", "s16", format_list, NULL,
+ FORMAT_TEXT, FORMAT_LONGTEXT );
+ add_string( "path", "samples.raw", NULL, PATH_TEXT, PATH_LONGTEXT );
+ set_description( _("file output module") );
+ set_capability( "audio output", 0 );
+ add_shortcut( "file" );
+ set_callbacks( Open, Close );
+vlc_module_end();
+
+/*****************************************************************************
+ * Open: open a dummy audio device
+ *****************************************************************************/
+static int Open( vlc_object_t * p_this )
+{
+ aout_instance_t * p_aout = (aout_instance_t *)p_this;
+ FILE * p_file;
+ char * psz_name = config_GetPsz( p_this, "path" );
+
+ (FILE *)p_aout->output.p_sys = p_file = fopen( psz_name, "wb" );
+ free( psz_name );
+ if ( p_file == NULL ) return -1;
+
+ p_aout->output.pf_setformat = SetFormat;
+ p_aout->output.pf_play = Play;
+
+ return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * Close: close our file
+ *****************************************************************************/
+static void Close( vlc_object_t * p_this )
+{
+ aout_instance_t * p_aout = (aout_instance_t *)p_this;
+
+ fclose( (FILE *)p_aout->output.p_sys );
+}
+
+/*****************************************************************************
+ * SetFormat: pretend to set the dsp output format
+ *****************************************************************************/
+static int SetFormat( aout_instance_t * p_aout )
+{
+ char * psz_format = config_GetPsz( p_aout, "format" );
+ char ** ppsz_compare = format_list;
+ int i = 0;
+
+ while ( *ppsz_compare != NULL )
+ {
+ if ( !strncmp( *ppsz_compare, psz_format, strlen(*ppsz_compare) ) )
+ {
+ break;
+ }
+ ppsz_compare++; i++;
+ }
+
+ if ( *ppsz_compare == NULL )
+ {
+ msg_Err( p_aout, "Cannot understand the format string (%s)",
+ psz_format );
+ return -1;
+ }
+
+ p_aout->output.output.i_format = format_int[i];
+ p_aout->output.i_nb_samples = 2048;
+ return 0;
+}
+
+/*****************************************************************************
+ * Play: pretend to play a sound
+ *****************************************************************************/
+static void Play( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
+{
+ if( fwrite( p_buffer->p_buffer,
+ p_buffer->i_nb_samples
+ * aout_FormatToBytes( &p_aout->output.output ), 1,
+ (FILE *)p_aout->output.p_sys ) != 1 )
+ {
+ msg_Err( p_aout, "write error (%s)", strerror(errno) );
+ }
+
+ aout_BufferFree( p_buffer );
+}
+
--- /dev/null
+/*****************************************************************************
+ * oss.c : OSS /dev/dsp module for vlc
+ *****************************************************************************
+ * Copyright (C) 2000-2002 VideoLAN
+ * $Id: oss.c,v 1.1 2002/08/07 21:36:55 massiot Exp $
+ *
+ * Authors: Michel Kaempf <maxx@via.ecp.fr>
+ * Samuel Hocevar <sam@zoy.org>
+ * Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <errno.h> /* ENOMEM */
+#include <fcntl.h> /* open(), O_WRONLY */
+#include <sys/ioctl.h> /* ioctl() */
+#include <string.h> /* strerror() */
+#include <unistd.h> /* write(), close() */
+#include <stdlib.h> /* calloc(), malloc(), free() */
+
+#include <vlc/vlc.h>
+
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+
+#include <vlc/aout.h>
+#include "aout_internal.h"
+
+/* SNDCTL_DSP_RESET, SNDCTL_DSP_SETFMT, SNDCTL_DSP_STEREO, SNDCTL_DSP_SPEED,
+ * SNDCTL_DSP_GETOSPACE */
+#ifdef HAVE_SOUNDCARD_H
+# include <soundcard.h>
+#elif defined( HAVE_SYS_SOUNDCARD_H )
+# include <sys/soundcard.h>
+#elif defined( HAVE_MACHINE_SOUNDCARD_H )
+# include <machine/soundcard.h>
+#endif
+
+/*****************************************************************************
+ * aout_sys_t: OSS audio output method descriptor
+ *****************************************************************************
+ * This structure is part of the audio output thread descriptor.
+ * It describes the dsp specific properties of an audio device.
+ *****************************************************************************/
+struct aout_sys_t
+{
+ int i_fd;
+ volatile vlc_bool_t b_die;
+};
+
+#define DEFAULT_FRAME_SIZE 2048
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+
+static int SetFormat ( aout_instance_t * );
+static void Play ( aout_instance_t *, aout_buffer_t * );
+static int OSSThread ( aout_instance_t * );
+
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+vlc_module_begin();
+ add_category_hint( N_("Audio"), NULL );
+ add_file( "dspdev", "/dev/dsp", NULL, N_("OSS dsp device"), NULL );
+ set_description( _("Linux OSS /dev/dsp module") );
+ set_capability( "audio output", 100 );
+ set_callbacks( Open, Close );
+vlc_module_end();
+
+/*****************************************************************************
+ * Open: open the audio device (the digital sound processor)
+ *****************************************************************************
+ * This function opens the dsp as a usual non-blocking write-only file, and
+ * modifies the p_aout->p_sys->i_fd with the file's descriptor.
+ *****************************************************************************/
+static int Open( vlc_object_t *p_this )
+{
+ aout_instance_t * p_aout = (aout_instance_t *)p_this;
+ struct aout_sys_t * p_sys;
+ char * psz_device;
+
+ /* Allocate structure */
+ p_aout->output.p_sys = p_sys = malloc( sizeof( aout_sys_t ) );
+ if( p_sys == NULL )
+ {
+ msg_Err( p_aout, "out of memory" );
+ return 1;
+ }
+
+ /* Initialize some variables */
+ if( (psz_device = config_GetPsz( p_aout, "dspdev" )) == NULL )
+ {
+ msg_Err( p_aout, "no audio device given (maybe /dev/dsp ?)" );
+ free( p_aout->p_sys );
+ return -1;
+ }
+
+ /* Open the sound device */
+ if( (p_sys->i_fd = open( psz_device, O_WRONLY )) < 0 )
+ {
+ msg_Err( p_aout, "cannot open audio device (%s)",
+ psz_device );
+ free( psz_device );
+ free( p_sys );
+ return -1;
+ }
+ free( psz_device );
+
+ /* Create OSS thread and wait for its readiness. */
+ p_sys->b_die = 0;
+ if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_TRUE ) )
+ {
+ msg_Err( p_input, "cannot create OSS thread (%s)", strerror(errno) );
+ free( p_aout->p_sys->psz_device );
+ free( p_aout->p_sys );
+ return -1;
+ }
+
+ p_aout->pf_setformat = SetFormat;
+ p_aout->pf_play = Play;
+
+ return 0;
+}
+
+/*****************************************************************************
+ * SetFormat: reset the dsp and set its format
+ *****************************************************************************
+ * This functions resets the DSP device, tries to initialize the output
+ * format with the value contained in the dsp structure, and if this value
+ * could not be set, the default value returned by ioctl is set. It then
+ * does the same for the stereo mode, and for the output rate.
+ *****************************************************************************/
+static int SetFormat( aout_instance_t *p_aout )
+{
+ struct aout_sys_t * p_sys = p_aout->output.p_sys;
+ int i_format;
+ int i_rate;
+ vlc_bool_t b_stereo;
+
+ /* Reset the DSP device */
+ if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
+ {
+ msg_Err( p_aout, "cannot reset OSS audio device" );
+ return -1;
+ }
+
+ /* Set the output format */
+ i_format = AOUT_FMT_S16_NE;
+ if( ioctl( p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0
+ || i_format != AOUT_FMT_S16_NE )
+ {
+ msg_Err( p_aout, "cannot set audio output format (%i)",
+ i_format );
+ return -1;
+ }
+ p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+
+ /* FIXME */
+ if ( p_aout->output.output.i_channels > 2 )
+ {
+ msg_Warn( p_aout, "only two channels are supported at the moment"&nb