#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_previous_changes.dpatch by Sandro Tosi <matrixhasu@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: New patch generated from rplay 3.3.2-12 diff.gz
@DPATCH@
--- rplay-3.3.2.orig/configure
+++ rplay-3.3.2/configure
@@ -527,6 +527,8 @@
+BUILD_TARGETS="include lib adpcm"
+
export srcdir
RPLAY_VERSION=`$srcdir/version`
@@ -544,7 +546,7 @@
# 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:548: checking for $ac_word" >&5
+echo "configure:550: 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
@@ -574,7 +576,7 @@
# 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:578: checking for $ac_word" >&5
+echo "configure:580: 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
@@ -625,7 +627,7 @@
# 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:629: checking for $ac_word" >&5
+echo "configure:631: 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
@@ -657,7 +659,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:663: 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.
@@ -668,12 +670,12 @@
cat > conftest.$ac_ext << EOF
-#line 672 "configure"
+#line 674 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:679: \"$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
@@ -699,12 +701,12 @@
{ 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:703: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:705: 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:708: checking whether we are using GNU C" >&5
+echo "configure:710: 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
@@ -713,7 +715,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:717: \"$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:719: \"$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
@@ -732,7 +734,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:736: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:738: 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
@@ -797,7 +799,7 @@
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:801: checking for POSIXized ISC" >&5
+echo "configure:803: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -818,7 +820,7 @@
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:822: checking how to run the C preprocessor" >&5
+echo "configure:824: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -833,13 +835,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 837 "configure"
+#line 839 "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:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:845: \"$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
:
@@ -850,13 +852,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 854 "configure"
+#line 856 "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:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:862: \"$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
:
@@ -867,13 +869,13 @@
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 871 "configure"
+#line 873 "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:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:879: \"$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
:
@@ -928,7 +930,7 @@
# 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:932: checking for a BSD compatible install" >&5
+echo "configure:934: 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
@@ -981,7 +983,7 @@
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:985: checking whether ln -s works" >&5
+echo "configure:987: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1004,7 +1006,7 @@
# 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:1008: checking for $ac_word" >&5
+echo "configure:1010: 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
@@ -1036,7 +1038,7 @@
# 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:1040: checking for $ac_word" >&5
+echo "configure:1042: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1071,7 +1073,7 @@
# 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:1075: checking for $ac_word" >&5
+echo "configure:1077: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEPEND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1106,7 +1108,7 @@
# 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:1110: checking for $ac_word" >&5
+echo "configure:1112: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1141,7 +1143,7 @@
# 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:1145: checking for $ac_word" >&5
+echo "configure:1147: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1176,7 +1178,7 @@
# 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:1180: checking for $ac_word" >&5
+echo "configure:1182: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1211,7 +1213,7 @@
# 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:1215: checking for $ac_word" >&5
+echo "configure:1217: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DVIPS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1247,12 +1249,12 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1251: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1253: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1256 "configure"
+#line 1258 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1260,7 +1262,7 @@
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1285,7 +1287,7 @@
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1289: checking for opendir in -ldir" >&5
+echo "configure:1291: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1293,7 +1295,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1297 "configure"
+#line 1299 "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
@@ -1304,7 +1306,7 @@
opendir()
; return 0; }
EOF
-if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1310: \"$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
@@ -1326,7 +1328,7 @@
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1330: checking for opendir in -lx" >&5
+echo "configure:1332: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1334,7 +1336,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1338 "configure"
+#line 1340 "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
@@ -1345,7 +1347,7 @@
opendir()
; return 0; }
EOF
-if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1351: \"$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
@@ -1368,12 +1370,12 @@
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1372: checking for ANSI C header files" >&5
+echo "configure:1374: 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 1377 "configure"
+#line 1379 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1381,7 +1383,7 @@
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1387: \"$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*
@@ -1398,7 +1400,7 @@
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 1402 "configure"
+#line 1404 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1416,7 +1418,7 @@
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 1420 "configure"
+#line 1422 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1437,7 +1439,7 @@
:
else
cat > conftest.$ac_ext <<EOF
-#line 1441 "configure"
+#line 1443 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1448,7 +1450,7 @@
exit (0); }
EOF
-if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1472,12 +1474,12 @@
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1476: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1478: 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 1481 "configure"
+#line 1483 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1486,7 +1488,7 @@
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1506,21 +1508,21 @@
fi
-for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h
+for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h regex.h rxposix.h rx/rxposix.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1514: checking for $ac_hdr" >&5
+echo "configure:1516: 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 1519 "configure"
+#line 1521 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1526: \"$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*
@@ -1547,12 +1549,12 @@
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1551: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1553: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1556 "configure"
+#line 1558 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1568,7 +1570,7 @@
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1590,12 +1592,12 @@
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1594: checking for working const" >&5
+echo "configure:1596: 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 1599 "configure"
+#line 1601 "configure"
#include "confdefs.h"
int main() {
@@ -1644,7 +1646,7 @@
; return 0; }
EOF
-if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1665,12 +1667,12 @@
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1669: checking for size_t" >&5
+echo "configure:1671: 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 1674 "configure"
+#line 1676 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1702,17 +1704,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1706: checking for $ac_hdr" >&5
+echo "configure:1708: 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 1711 "configure"
+#line 1713 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1718: \"$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*
@@ -1741,12 +1743,12 @@
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1745: checking for $ac_func" >&5
+echo "configure:1747: 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 1750 "configure"
+#line 1752 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1769,7 +1771,7 @@
; 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*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1794,7 +1796,7 @@
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1798: checking for working mmap" >&5
+echo "configure:1800: 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
@@ -1802,7 +1804,7 @@
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1806 "configure"
+#line 1808 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1942,7 +1944,7 @@
}
EOF
-if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1948: \"$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
@@ -1965,7 +1967,7 @@
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:1969: checking for 8-bit clean memcmp" >&5
+echo "configure:1971: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1973,7 +1975,7 @@
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 1977 "configure"
+#line 1979 "configure"
#include "confdefs.h"
main()
@@ -1983,7 +1985,7 @@
}
EOF
-if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -2001,12 +2003,12 @@
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2005: checking for vprintf" >&5
+echo "configure:2007: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2010 "configure"
+#line 2012 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@@ -2029,7 +2031,7 @@
; return 0; }
EOF
-if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@@ -2053,12 +2055,12 @@
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2057: checking for _doprnt" >&5
+echo "configure:2059: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2062 "configure"
+#line 2064 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@@ -2081,7 +2083,7 @@
; return 0; }
EOF
-if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@@ -2106,12 +2108,12 @@
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2110: checking return type of signal handlers" >&5
+echo "configure:2112: 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 2115 "configure"
+#line 2117 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2128,7 +2130,7 @@
int i;
; return 0; }
EOF
-if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2149,12 +2151,12 @@
for ac_func in getcwd gethostname mkdir re_comp regcomp select snprintf socket strdup strerror strstr fstat fchmod fchown utime utimes memmove sigset vsnprintf waitpid random srandom
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2153: checking for $ac_func" >&5
+echo "configure:2155: 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 2158 "configure"
+#line 2160 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2177,7 +2179,7 @@
; return 0; }
EOF
-if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2183: \"$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
@@ -2202,7 +2204,7 @@
done
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2206: checking for socket in -lsocket" >&5
+echo "configure:2208: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2210,7 +2212,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2214 "configure"
+#line 2216 "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
@@ -2221,7 +2223,7 @@
socket()
; return 0; }
EOF
-if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2227: \"$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
@@ -2242,7 +2244,7 @@
fi
echo $ac_n "checking for t_accept in -lnsl""... $ac_c" 1>&6
-echo "configure:2246: checking for t_accept in -lnsl" >&5
+echo "configure:2248: checking for t_accept in -lnsl" >&5
ac_lib_var=`echo nsl'_'t_accept | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2250,7 +2252,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2254 "configure"
+#line 2256 "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
@@ -2261,7 +2263,7 @@
t_accept()
; return 0; }
EOF
-if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2267: \"$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
@@ -2283,7 +2285,7 @@
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:2287: checking for readline in -lreadline" >&5
+echo "configure:2289: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2291,7 +2293,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
+#line 2297 "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
@@ -2302,7 +2304,7 @@
readline()
; return 0; }
EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2308: \"$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
@@ -2317,7 +2319,10 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- RL_LIBS="-lreadline"
+ cat >> confdefs.h <<\EOF
+#define HAVE_LIBREADLINE 1
+EOF
+ RL_LIBS="-lreadline"
else
echo "$ac_t""no" 1>&6
fi
@@ -2325,7 +2330,7 @@
echo $ac_n "checking for gsm_decode in -lgsm""... $ac_c" 1>&6
-echo "configure:2329: checking for gsm_decode in -lgsm" >&5
+echo "configure:2334: checking for gsm_decode in -lgsm" >&5
ac_lib_var=`echo gsm'_'gsm_decode | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2333,7 +2338,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lgsm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2337 "configure"
+#line 2342 "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
@@ -2344,7 +2349,7 @@
gsm_decode()
; return 0; }
EOF
-if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2353: \"$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
@@ -2359,42 +2364,91 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- HAVE_GSM="yes"
+ GSM_LIBS="-lgsm"; GSM_INCS=""
else
echo "$ac_t""no" 1>&6
+
+ GSM_LIBS="-L../gsm -lgsm"; GSM_INCS="-I\${srcdir}/../gsm"
+ BUILD_TARGETS="$BUILD_TARGETS gsm"
+
fi
-if test "$HAVE_GSM" = "yes"; then
- GSM_LIBS="-lgsm"
- GSM_INCS=""
+
+
+
+for ac_func in regcomp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2383: 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
- GSM_LIBS="-L../gsm -lgsm"
- GSM_INCS="-I\${srcdir}/../gsm"
-fi
+ cat > conftest.$ac_ext <<EOF
+#line 2388 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+int main() {
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
-echo $ac_n "checking for regncomp in -lrx""... $ac_c" 1>&6
-echo "configure:2379: checking for regncomp in -lrx" >&5
-ac_lib_var=`echo rx'_'regncomp | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for regcomp in -lrx""... $ac_c" 1>&6
+echo "configure:2433: checking for regcomp in -lrx" >&5
+ac_lib_var=`echo rx'_'regcomp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lrx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2387 "configure"
+#line 2441 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char regncomp();
+char regcomp();
int main() {
-regncomp()
+regcomp()
; return 0; }
EOF
-if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2452: \"$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
@@ -2409,18 +2463,22 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- HAVE_RX="yes"
+ RX_LIBS="-lrx"; RX_INCS=""
else
echo "$ac_t""no" 1>&6
+
+ RX_LIBS="-L../rx -lrx"; RX_INCS="-I\${srcdir}/../rx"
+ BUILD_TARGETS="$BUILD_TARGETS rx"
+ subdirs="rx"
+s%@subdirs@%$subdirs%g
+
+
fi
-if test "$HAVE_RX" = "yes"; then
- RX_LIBS="-lrx"
- RX_INCS=""
-else
- RX_LIBS="-L../rx -lrx"
- RX_INCS="-I\${srcdir}/../rx"
+
fi
+done
+
@@ -2434,9 +2492,9 @@
if test -z "$RPLAY_TARGET"; then
echo $ac_n "checking for sun""... $ac_c" 1>&6
-echo "configure:2438: checking for sun" >&5
+echo "configure:2496: checking for sun" >&5
cat > conftest.$ac_ext <<EOF
-#line 2440 "configure"
+#line 2498 "configure"
#include "confdefs.h"
#ifdef sun
@@ -2460,7 +2518,7 @@
fi
if test "$RPLAY_TARGET"; then
echo $ac_n "checking for solaris""... $ac_c" 1>&6
-echo "configure:2464: checking for solaris" >&5
+echo "configure:2522: checking for solaris" >&5
if test ! -f /vmunix; then
is_solaris=yes
RPLAY_TARGET="solaris"
@@ -2473,9 +2531,9 @@
if test -z "$RPLAY_TARGET"; then
echo $ac_n "checking for linux""... $ac_c" 1>&6
-echo "configure:2477: checking for linux" >&5
+echo "configure:2535: checking for linux" >&5
cat > conftest.$ac_ext <<EOF
-#line 2479 "configure"
+#line 2537 "configure"
#include "confdefs.h"
#ifdef linux
@@ -2501,9 +2559,9 @@
if test -z "$RPLAY_TARGET"; then
echo $ac_n "checking for hpux""... $ac_c" 1>&6
-echo "configure:2505: checking for hpux" >&5
+echo "configure:2563: checking for hpux" >&5
cat > conftest.$ac_ext <<EOF
-#line 2507 "configure"
+#line 2565 "configure"
#include "confdefs.h"
#ifdef __hpux
@@ -2529,9 +2587,9 @@
if test -z "$RPLAY_TARGET"; then
echo $ac_n "checking for sgi""... $ac_c" 1>&6
-echo "configure:2533: checking for sgi" >&5
+echo "configure:2591: checking for sgi" >&5
cat > conftest.$ac_ext <<EOF
-#line 2535 "configure"
+#line 2593 "configure"
#include "confdefs.h"
#ifdef sgi
@@ -2553,22 +2611,22 @@
if test $is_sgi = "yes"; then
RPLAY_TARGET="sgi"
echo $ac_n "checking for multimedia development kit""... $ac_c" 1>&6
-echo "configure:2557: checking for multimedia development kit" >&5
+echo "configure:2615: checking for multimedia development kit" >&5
for ac_hdr in audio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2562: checking for $ac_hdr" >&5
+echo "configure:2620: 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 2567 "configure"
+#line 2625 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2630: \"$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*
@@ -2604,12 +2662,12 @@
if test -z "$RPLAY_TARGET"; then
echo $ac_n "checking for FreeBSD""... $ac_c" 1>&6
-echo "configure:2608: checking for FreeBSD" >&5
+echo "configure:2666: checking for FreeBSD" >&5
cat > conftest.$ac_ext <<EOF
-#line 2610 "configure"
+#line 2668 "configure"
#include "confdefs.h"
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
yes
#endif
@@ -2633,12 +2691,9 @@
if test -z "$RPLAY_TARGET"; then
echo 'Sorry, I could not figure out what type of system you have.'
- echo -n 'Would you like to try the generic configuration? '
- read ans
- case "$ans" in
- y|Y|yes|Yes|YES|sure|ok|okay) RPLAY_TARGET="generic" ;;
- *) echo configuration aborted; exit 1;
- esac
+ echo 'Will try the generic configuration.'
+ sleep 5
+ RPLAY_TARGET="generic"
fi
echo "using $RPLAY_TARGET configuration"
@@ -2659,21 +2714,11 @@
fi
-BUILD_TARGETS="include lib adpcm"
-if test "$HAVE_RX" != "yes"; then
- BUILD_TARGETS="$BUILD_TARGETS rx"
- subdirs="rx"
-
-fi
-if test "$HAVE_GSM" != "yes"; then
- BUILD_TARGETS="$BUILD_TARGETS gsm"
-fi
-
BUILD_TARGETS="$BUILD_TARGETS librplay rplayd rplay rptp doc"
-if test $RPLAY_TARGET = "oss"; then
- BUILD_TARGETS="$BUILD_TARGETS devrplay"
-fi
+case "$RPLAY_TARGET" in
+ oss|FreeBSD|generic) BUILD_TARGETS="$BUILD_TARGETS devrplay";;
+esac
@@ -2832,7 +2877,6 @@
s%@RX_INCS@%$RX_INCS%g
s%@RPLAY_TOP@%$RPLAY_TOP%g
s%@RPLAY_TARGET@%$RPLAY_TARGET%g
-s%@subdirs@%$subdirs%g
s%@BUILD_TARGETS@%$BUILD_TARGETS%g
CEOF
@@ -3191,7 +3235,7 @@
fi
fi
- cd $ac_popdir
+ cd "$ac_popdir"
done
fi
--- rplay-3.3.2.orig/configure.in
+++ rplay-3.3.2/configure.in
@@ -6,6 +6,8 @@
AC_INIT(rplayd/rplayd.c)
AC_CONFIG_HEADER(include/config.h)
+BUILD_TARGETS="include lib adpcm"
+
dnl
dnl Figure what version of rplay this is.
dnl
@@ -58,7 +60,7 @@
AC_HEADER_STDC
AC_HEADER_TIME
dnl AC_PATH_XTRA
-AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h)
+AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h regex.h rxposix.h rx/rxposix.h)
AC_HEADER_SYS_WAIT
dnl Check for typedefs, structures, and compiler characteristics.
@@ -74,28 +76,31 @@
AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])
AC_CHECK_LIB(nsl, t_accept, [LIBS="$LIBS -lnsl"])
-AC_CHECK_LIB(readline, readline, [RL_LIBS="-lreadline"])
+AC_CHECK_LIB(readline, readline,
+ [AC_DEFINE(HAVE_LIBREADLINE) RL_LIBS="-lreadline"])
AC_SUBST(RL_LIBS)
-AC_CHECK_LIB(gsm, gsm_decode, [HAVE_GSM="yes"])
-if test "$HAVE_GSM" = "yes"; then
- GSM_LIBS="-lgsm"
- GSM_INCS=""
-else
- GSM_LIBS="-L../gsm -lgsm"
- GSM_INCS="-I\${srcdir}/../gsm"
-fi
+AC_CHECK_LIB(gsm, gsm_decode,
+ [GSM_LIBS="-lgsm"; GSM_INCS=""],
+ [
+ GSM_LIBS="-L../gsm -lgsm"; GSM_INCS="-I\${srcdir}/../gsm"
+ BUILD_TARGETS="$BUILD_TARGETS gsm"
+ ])
AC_SUBST(GSM_LIBS)
AC_SUBST(GSM_INCS)
-AC_CHECK_LIB(rx, regncomp, [HAVE_RX="yes"])
-if test "$HAVE_RX" = "yes"; then
- RX_LIBS="-lrx"
- RX_INCS=""
-else
- RX_LIBS="-L../rx -lrx"
- RX_INCS="-I\${srcdir}/../rx"
-fi
+dnl check for regcomp in libc, librx, or build rx
+AC_CHECK_FUNCS(regcomp,
+ [],
+ [
+ AC_CHECK_LIB(rx, regcomp,
+ [RX_LIBS="-lrx"; RX_INCS=""],
+ [
+ RX_LIBS="-L../rx -lrx"; RX_INCS="-I\${srcdir}/../rx"
+ BUILD_TARGETS="$BUILD_TARGETS rx"
+ AC_CONFIG_SUBDIRS(rx)
+ ])
+ ])
AC_SUBST(RX_LIBS)
AC_SUBST(RX_INCS)
@@ -202,7 +207,7 @@
AC_MSG_CHECKING(for FreeBSD)
AC_EGREP_CPP(yes,
[
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
yes
#endif
], is_freebsd=yes, is_freebsd=no)
@@ -221,12 +226,9 @@
dnl
if test -z "$RPLAY_TARGET"; then
echo 'Sorry, I could not figure out what type of system you have.'
- echo -n 'Would you like to try the generic configuration? '
- read ans
- case "$ans" in
- y|Y|yes|Yes|YES|sure|ok|okay) RPLAY_TARGET="generic" ;;
- *) echo configuration aborted; exit 1;
- esac
+ echo 'Will try the generic configuration.'
+ sleep 5
+ RPLAY_TARGET="generic"
fi
echo "using $RPLAY_TARGET configuration"
@@ -250,20 +252,11 @@
fi
AC_SUBST(LIBS)
-BUILD_TARGETS="include lib adpcm"
-if test "$HAVE_RX" != "yes"; then
- BUILD_TARGETS="$BUILD_TARGETS rx"
- AC_CONFIG_SUBDIRS(rx)
-fi
-if test "$HAVE_GSM" != "yes"; then
- BUILD_TARGETS="$BUILD_TARGETS gsm"
-fi
-
BUILD_TARGETS="$BUILD_TARGETS librplay rplayd rplay rptp doc"
-if test $RPLAY_TARGET = "oss"; then
- BUILD_TARGETS="$BUILD_TARGETS devrplay"
-fi
+case "$RPLAY_TARGET" in
+ oss|FreeBSD|generic) BUILD_TARGETS="$BUILD_TARGETS devrplay";;
+esac
AC_SUBST(BUILD_TARGETS)
--- rplay-3.3.2.orig/doc/librplay.info
+++ rplay-3.3.2/doc/librplay.info
@@ -1,5 +1,10 @@
-This is Info file librplay.info, produced by Makeinfo-1.63 from the
-input file librplay.texi.
+This is librplay.info, produced by makeinfo version 4.1 from
+librplay.texi.
+
+INFO-DIR-SECTION Development
+START-INFO-DIR-ENTRY
+* librplay: (librplay). The rplay library.
+END-INFO-DIR-ENTRY
This file documents librplay.
@@ -658,52 +663,52 @@
* Menu:
-* rplay: RPLAY Core Functions.
-* rplay_close: RPLAY Core Functions.
-* rplay_convert: RPLAY Miscellaneous Functions.
-* rplay_create: RPLAY Core Functions.
-* rplay_default: RPLAY Helper Functions.
-* rplay_default_host: RPLAY Helper Functions.
-* rplay_destroy: RPLAY Core Functions.
-* rplay_display: RPLAY Helper Functions.
-* rplay_get: RPLAY Core Functions.
-* rplay_host: RPLAY Helper Functions.
-* rplay_host_volume: RPLAY Helper Functions.
-* rplay_local: RPLAY Helper Functions.
-* rplay_open: RPLAY Core Functions.
-* rplay_open_default: RPLAY Helper Functions.
-* rplay_open_display: RPLAY Helper Functions.
-* rplay_open_port: RPLAY Helper Functions.
-* rplay_open_sockaddr_in: RPLAY Helper Functions.
-* rplay_pack: RPLAY Miscellaneous Functions.
-* rplay_perror: RPLAY Error Reporting.
-* rplay_ping: RPLAY Helper Functions.
-* rplay_ping_sockaddr_in: RPLAY Helper Functions.
-* rplay_ping_sockfd: RPLAY Helper Functions.
-* rplay_set: RPLAY Core Functions.
-* rplay_sound: RPLAY Helper Functions.
-* rplay_unpack: RPLAY Miscellaneous Functions.
-* rptp_close: RPTP Core Functions.
-* rptp_command: RPTP Helper Functions.
-* rptp_getline: RPTP Helper Functions.
-* rptp_open: RPTP Core Functions.
-* rptp_parse: RPTP Helper Functions.
-* rptp_perror: RPTP Error Reporting.
-* rptp_putline: RPTP Helper Functions.
-* rptp_read: RPTP Core Functions.
-* rptp_write: RPTP Core Functions.
+* rplay: RPLAY Core Functions.
+* rplay_close: RPLAY Core Functions.
+* rplay_convert: RPLAY Miscellaneous Functions.
+* rplay_create: RPLAY Core Functions.
+* rplay_default: RPLAY Helper Functions.
+* rplay_default_host: RPLAY Helper Functions.
+* rplay_destroy: RPLAY Core Functions.
+* rplay_display: RPLAY Helper Functions.
+* rplay_get: RPLAY Core Functions.
+* rplay_host: RPLAY Helper Functions.
+* rplay_host_volume: RPLAY Helper Functions.
+* rplay_local: RPLAY Helper Functions.
+* rplay_open: RPLAY Core Functions.
+* rplay_open_default: RPLAY Helper Functions.
+* rplay_open_display: RPLAY Helper Functions.
+* rplay_open_port: RPLAY Helper Functions.
+* rplay_open_sockaddr_in: RPLAY Helper Functions.
+* rplay_pack: RPLAY Miscellaneous Functions.
+* rplay_perror: RPLAY Error Reporting.
+* rplay_ping: RPLAY Helper Functions.
+* rplay_ping_sockaddr_in: RPLAY Helper Functions.
+* rplay_ping_sockfd: RPLAY Helper Functions.
+* rplay_set: RPLAY Core Functions.
+* rplay_sound: RPLAY Helper Functions.
+* rplay_unpack: RPLAY Miscellaneous Functions.
+* rptp_close: RPTP Core Functions.
+* rptp_command: RPTP Helper Functions.
+* rptp_getline: RPTP Helper Functions.
+* rptp_open: RPTP Core Functions.
+* rptp_parse: RPTP Helper Functions.
+* rptp_perror: RPTP Error Reporting.
+* rptp_putline: RPTP Helper Functions.
+* rptp_read: RPTP Core Functions.
+* rptp_write: RPTP Core Functions.
Tag Table:
-Node: Top734
-Node: RPLAY Core Functions1886
-Node: RPLAY Helper Functions7013
-Node: RPLAY Miscellaneous Functions12728
-Node: RPLAY Error Reporting13892
-Node: RPTP Core Functions14398
-Node: RPTP Helper Functions16308
-Node: RPTP Error Reporting19628
-Node: Function Index20113
+Node: Top835
+Node: RPLAY Core Functions1987
+Node: RPLAY Helper Functions7114
+Node: RPLAY Miscellaneous Functions12829
+Node: RPLAY Error Reporting13993
+Node: RPTP Core Functions14499
+Node: RPTP Helper Functions16409
+Node: RPTP Error Reporting19729
+Node: Function Index20214
End Tag Table
--- rplay-3.3.2.orig/doc/librplay.texi
+++ rplay-3.3.2/doc/librplay.texi
@@ -10,6 +10,11 @@
@ifinfo
+@dircategory Development
+@direntry
+* librplay: (librplay). The rplay library.
+@end direntry
+
This file documents librplay.
Copyright (C) 1995 Mark Boyns
--- rplay-3.3.2.orig/doc/rplay.texi
+++ rplay-3.3.2/doc/rplay.texi
@@ -10,6 +10,11 @@
@ifinfo
+@dircategory Development
+@direntry
+* rplay: (rplay). The rplay Network Audio System
+@end direntry
+
This file documents the rplay Network Audio System.
Copyright (C) 1993-97 Mark Boyns
--- rplay-3.3.2.orig/doc/rplay.hosts.5
+++ rplay-3.3.2/doc/rplay.hosts.5
@@ -34,6 +34,9 @@
.B x
the host can play, stop, pause, and continue sounds. This
is normally called execute permission.
+.TP 3
+.B m
+the host can monitor the audio stream written by rplayd to the audio device.
.RE
.TP
"rx" permissions are used when no permissions are specified.
@@ -61,6 +64,12 @@
130.190.*:rx
146.244.234.*:rx
using.default.perms.edu
+
+#
+# Hosts which can monitor the audio stream
+#
+nsa.sdsu.edu:m
+
.fi
.ft R
.LP
--- rplay-3.3.2.orig/doc/rplaydsp.1
+++ rplay-3.3.2/doc/rplaydsp.1
@@ -0,0 +1,34 @@
+.TH RPLAYDSP 1 2000/05/02
+.SH NAME
+rplaydsp \- intercept data bound for /dev/dsp and route it to rplayd
+.SH SYNOPSIS
+.B rplaydsp command [command arguments]
+.SH DESCRIPTION
+rplaydsp allows sound tools to interact with rplayd without having been
+coded to do so. Any program that writes data to /dev/dsp should work with
+rplaydsp.
+
+The following environment variables can be used to modify the default
+behavior of rplaydsp.
+
+RPLAY_HOST: By default, rplaydsp talks to the local rplayd. If you need
+the output to go somewhere else, then set RPLAY_HOST to the remote
+hostname or ip address.
+
+DEVRPLAY_SOUND: Sounds can be named under rplayd, the default name used by
+rplaydsp is 'devrplay'. Use this variable to control the name of the
+sound.
+
+DEVRPLAY_INFO: If your sound isn't the "standard" wav format and speed,
+you can set this variable so that rplayd grok the sound. An example value
+for a .au file is:
+ input-info=ulinear8,8000,1,1,little-endian
+
+DEVRPLAY_OPTS: Set this variable to pass a generic set of RPTP options to
+rplayd.
+
+.SH EXAMPLES
+rplaydsp realplayer http://www.example.com/foo.ram
+.SH SEE ALSO
+.IR rplayd (8),
+.IR rplay (1)
--- rplay-3.3.2.orig/doc/RPTP.info
+++ rplay-3.3.2/doc/RPTP.info
@@ -1,5 +1,9 @@
-This is Info file RPTP.info, produced by Makeinfo-1.63 from the input
-file RPTP.texi.
+This is RPTP.info, produced by makeinfo version 4.1 from RPTP.texi.
+
+INFO-DIR-SECTION Development
+START-INFO-DIR-ENTRY
+* RPTP: (RPTP). The RPTP Protocol.
+END-INFO-DIR-ENTRY
This file documents RPTP protocol.
@@ -570,7 +574,7 @@
info sound=bogus.au
+sound=bogus.au size=9574 bits=8 sample-rate=8000 channels=1
- - Command: list [CONNECTIONS|HOSTS|SERVERS|SPOOL|SOUNDS]
+ - Command: list [connections|hosts|servers|spool|sounds]
List the specified server information.
`connections'
@@ -647,17 +651,29 @@
The `sound' attribute can be preceded by any of the following
attributes:
`count'
+
`list-count'
+
`priority'
+
`random'
+
`sample-rate'
+
`volume'
+
`input'
+
`input-bits'
+
`input-byte-order'
+
`input-channels'
+
`input-format'
+
`input-offset'
+
`input-sample-rate'
This command returns one line containing the `id' attribute.
@@ -699,15 +715,21 @@
`message' attribute. The server will probably close the connect
so the line may not be sent.
- - Command: set NAME[=VALUE] ...
+ - Command: set name[=value] ...
Get and set server attributes. The current set of supported
server attributes is:
`application'
+
`level-notify-rate'
+
`notify'
+
`notify-rate'
+
`position-notify-rate'
+
`priority-threshold'
+
`volume'
This command returns one line containing the server's values for
the specified attributes. If an attribute cannot be set, the
@@ -852,55 +874,55 @@
* Menu:
-* access: Attributes.
-* application: Attributes.
-* audio-bits: Attributes.
-* audio-bufsize: Attributes.
-* audio-byte-order: Attributes.
-* audio-channels: Attributes.
-* audio-device: Attributes.
-* audio-format: Attributes.
-* audio-offset: Attributes.
-* audio-port: Attributes.
-* audio-rate: Attributes.
-* audio-sample-rate: Attributes.
-* audio-volume: Attributes.
-* bits: Attributes.
-* channels: Attributes.
-* count: Attributes.
-* error: Attributes.
-* event: Attributes.
-* format: Attributes.
-* host: Attributes.
-* id: Attributes.
-* idle: Attributes.
-* input: Attributes.
-* input-bits: Attributes.
-* input-byte-order: Attributes.
-* input-channels: Attributes.
-* input-format: Attributes.
-* input-offset: Attributes.
-* input-sample-rate: Attributes.
-* left: Attributes.
-* list-count: Attributes.
-* message: Attributes.
-* notify: Attributes.
-* pause: Attributes.
-* play: Attributes.
-* position: Attributes.
-* priority: Attributes.
-* random: Attributes.
-* remain: Attributes.
-* right: Attributes.
-* sample: Attributes.
-* sample-rate: Attributes.
-* samples: Attributes.
-* seconds: Attributes.
-* size: Attributes.
-* sound: Attributes.
-* uptime: Attributes.
-* version: Attributes.
-* volume: Attributes.
+* access: Attributes.
+* application: Attributes.
+* audio-bits: Attributes.
+* audio-bufsize: Attributes.
+* audio-byte-order: Attributes.
+* audio-channels: Attributes.
+* audio-device: Attributes.
+* audio-format: Attributes.
+* audio-offset: Attributes.
+* audio-port: Attributes.
+* audio-rate: Attributes.
+* audio-sample-rate: Attributes.
+* audio-volume: Attributes.
+* bits: Attributes.
+* channels: Attributes.
+* count: Attributes.
+* error: Attributes.
+* event: Attributes.
+* format: Attributes.
+* host: Attributes.
+* id: Attributes.
+* idle: Attributes.
+* input: Attributes.
+* input-bits: Attributes.
+* input-byte-order: Attributes.
+* input-channels: Attributes.
+* input-format: Attributes.
+* input-offset: Attributes.
+* input-sample-rate: Attributes.
+* left: Attributes.
+* list-count: Attributes.
+* message: Attributes.
+* notify: Attributes.
+* pause: Attributes.
+* play: Attributes.
+* position: Attributes.
+* priority: Attributes.
+* random: Attributes.
+* remain: Attributes.
+* right: Attributes.
+* sample: Attributes.
+* sample-rate: Attributes.
+* samples: Attributes.
+* seconds: Attributes.
+* size: Attributes.
+* sound: Attributes.
+* uptime: Attributes.
+* version: Attributes.
+* volume: Attributes.
File: RPTP.info, Node: Event Index, Next: Command Index, Prev: Attribute Index, Up: Top
@@ -910,19 +932,19 @@
* Menu:
-* all: Events.
-* any: Events.
-* continue: Events.
-* done: Events.
-* level: Events.
-* none: Events.
-* pause: Events.
-* play: Events.
-* position: Events.
-* skip: Events.
-* state: Events.
-* stop: Events.
-* volume: Events.
+* all: Events.
+* any: Events.
+* continue: Events.
+* done: Events.
+* level: Events.
+* none: Events.
+* pause: Events.
+* play: Events.
+* position: Events.
+* skip: Events.
+* state: Events.
+* stop: Events.
+* volume: Events.
File: RPTP.info, Node: Command Index, Prev: Event Index, Up: Top
@@ -932,41 +954,41 @@
* Menu:
-* access: Commands.
-* application: Commands.
-* continue: Commands.
-* done: Commands.
-* find: Commands.
-* get: Commands.
-* help: Commands.
-* info: Commands.
-* list: Commands.
-* pause: Commands.
-* play: Commands.
-* put: Commands.
-* quit: Commands.
-* reset: Commands.
-* set: Commands.
-* skip: Commands.
-* status: Commands.
-* stop: Commands.
-* version: Commands.
-* volume: Commands.
-* wait: Commands.
+* access: Commands.
+* application: Commands.
+* continue: Commands.
+* done: Commands.
+* find: Commands.
+* get: Commands.
+* help: Commands.
+* info: Commands.
+* list: Commands.
+* pause: Commands.
+* play: Commands.
+* put: Commands.
+* quit: Commands.
+* reset: Commands.
+* set: Commands.
+* skip: Commands.
+* status: Commands.
+* stop: Commands.
+* version: Commands.
+* volume: Commands.
+* wait: Commands.
Tag Table:
-Node: Top731
-Node: Overview1170
-Node: Attributes3059
-Node: Events8728
-Node: Event Notification9612
-Node: Commands11672
-Node: Connecting21105
-Node: Timeouts22048
-Node: Attribute Index22548
-Node: Event Index25229
-Node: Command Index25983
+Node: Top824
+Node: Overview1263
+Node: Attributes3152
+Node: Events8821
+Node: Event Notification9705
+Node: Commands11765
+Node: Connecting21216
+Node: Timeouts22159
+Node: Attribute Index22659
+Node: Event Index25389
+Node: Command Index26156
End Tag Table
--- rplay-3.3.2.orig/doc/RPLAY.texi
+++ rplay-3.3.2/doc/RPLAY.texi
@@ -10,6 +10,11 @@
@ifinfo
+@dircategory Development
+@direntry
+* RPLAY: (RPLAY). The RPLAY Protocol.
+@end direntry
+
This file documents RPLAY protocol.
Copyright (C) 1995 Mark Boyns
--- rplay-3.3.2.orig/doc/RPLAY.info
+++ rplay-3.3.2/doc/RPLAY.info
@@ -1,5 +1,9 @@
-This is Info file RPLAY.info, produced by Makeinfo-1.63 from the input
-file RPLAY.texi.
+This is RPLAY.info, produced by makeinfo version 4.1 from RPLAY.texi.
+
+INFO-DIR-SECTION Development
+START-INFO-DIR-ENTRY
+* RPLAY: (RPLAY). The RPLAY Protocol.
+END-INFO-DIR-ENTRY
This file documents RPLAY protocol.
@@ -41,7 +45,7 @@
The `RPLAY' protocol uses simple binary UDP packets to control the
audio server. Communication between the client and server is one-way -
-packets are sent to the server and the server *never* replies.
+packets are sent to the server and the server _never_ replies.
File: RPLAY.info, Node: Commands, Next: Attributes, Prev: Overview, Up: Top
@@ -140,8 +144,8 @@
******************
RPLAY packets always begin with a RPLAY_ID byte followed by a RPLAY
-command. (*note Commands::.) The remaining contents is a list of
-attributes (*note Attributes::.) and their corresponding values. The
+command. (*note Commands::) The remaining contents is a list of
+attributes (*note Attributes::) and their corresponding values. The
packet is terminated with the RPLAY_NULL attribute.
A packet will never contain an attribute that is set to a default
@@ -161,10 +165,10 @@
Tag Table:
-Node: Top734
-Node: Overview1124
-Node: Commands1425
-Node: Attributes2252
-Node: Packet description4129
+Node: Top830
+Node: Overview1220
+Node: Commands1521
+Node: Attributes2348
+Node: Packet description4225
End Tag Table
--- rplay-3.3.2.orig/doc/rplay.info
+++ rplay-3.3.2/doc/rplay.info
@@ -1,5 +1,9 @@
-This is Info file rplay.info, produced by Makeinfo version 1.67 from
-the input file rplay.texi.
+This is rplay.info, produced by makeinfo version 4.1 from rplay.texi.
+
+INFO-DIR-SECTION Development
+START-INFO-DIR-ENTRY
+* rplay: (rplay). The rplay Network Audio System
+END-INFO-DIR-ENTRY
This file documents the rplay Network Audio System.
@@ -156,11 +160,11 @@
Tag Table:
-Node: Top761
-Node: Overview1247
-Node: rplayd2983
-Node: rplay4640
-Node: rptp5094
-Node: xrplay5413
+Node: Top860
+Node: Overview1346
+Node: rplayd3082
+Node: rplay4739
+Node: rptp5193
+Node: xrplay5512
End Tag Table
--- rplay-3.3.2.orig/doc/RPTP.texi
+++ rplay-3.3.2/doc/RPTP.texi
@@ -11,6 +11,11 @@
@ifinfo
+@dircategory Development
+@direntry
+* RPTP: (RPTP). The RPTP Protocol.
+@end direntry
+
This file documents RPTP protocol.
Copyright (C) 1995 Mark Boyns
--- rplay-3.3.2.orig/doc/Makefile.in
+++ rplay-3.3.2/doc/Makefile.in
@@ -41,6 +41,7 @@
install: all
-$(MKINSTALLDIRS) $(mandir)/man1 $(mandir)/man5 $(mandir)/man8 $(infodir)
-$(INSTALL_DATA) rplay.1 $(mandir)/man1
+ -$(INSTALL_DATA) rplaydsp.1 $(mandir)/man1
-$(INSTALL_DATA) rplayd.8 $(mandir)/man8
-$(INSTALL_DATA) rptp.1 $(mandir)/man1
-$(INSTALL_DATA) rplay.conf.5 $(mandir)/man5
--- rplay-3.3.2.orig/devrplay/rplaydsp
+++ rplay-3.3.2/devrplay/rplaydsp
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -z $LD_PRELOAD ]; then
+ LD_PRELOAD=/usr/lib/devrplay.so
+else
+ LD_PRELOAD=/usr/lib/devrplay.so:$LD_PRELOAD
+fi
+
+export LD_PRELOAD
+
+exec "$@"
+
--- rplay-3.3.2.orig/devrplay/Makefile.in
+++ rplay-3.3.2/devrplay/Makefile.in
@@ -24,7 +24,7 @@
#$(TARGET): $(OBJS) ../librplay/librplay.so
# $(CC) -o $@ $(OBJS) ../librplay/rplay.lo ../librplay/rptp.lo $(LDFLAGS)
-$(TARGET): $(OBJS) ../librplay/librplay.so
+$(TARGET): $(OBJS) ../librplay/librplay.so.@RPLAY_VERSION@
$(CC) -o $@ $(OBJS) $(LDFLAGS)
../librplay/librplay.so:
@@ -33,6 +33,8 @@
install: all
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) $(TARGET) $(libdir)
+ $(MKINSTALLDIRS) $(bindir)
+ $(INSTALL_PROGRAM) rplaydsp $(bindir)/rplaydsp
uninstall:
$(RM) $(libdir)/$(TARGET)
--- rplay-3.3.2.orig/devrplay/devrplay.c
+++ rplay-3.3.2/devrplay/devrplay.c
@@ -26,6 +26,9 @@
* Copyright (C) 1998, 1999 Manish Singh <yosh@gimp.org>
*/
+#define _GNU_SOURCE
+#define __USE_GNU
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -34,6 +37,7 @@
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
+#include <sys/errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -56,6 +60,7 @@
static int dsp_speed;
static int dsp_blksize;
static int streaming;
+static int opened;
static char *
getsound()
@@ -95,12 +100,35 @@
if (strcmp(pathname, "/dev/dsp") == 0)
{
+ char response[RPTP_MAX_LINE];
+ char *acc;
+
rplay_fd = rptp_open(rplay_default_host(), RPTP_PORT, response,
sizeof(response));
if (rplay_fd < 0)
{
rptp_perror(rplay_default_host());
}
+ else
+ {
+ rptp_putline(rplay_fd, "access");
+ rptp_getline(rplay_fd, response, sizeof(response));
+ acc = rptp_parse(response, "access");
+
+ if (!acc || !strchr(acc, 'w'))
+ {
+ fprintf(stderr,
+ "RPLAY-ERROR: please add 'w' to rplay.hosts or man rplay.hosts\n");
+ errno = EACCES;
+ close(rplay_fd);
+ rplay_fd = -1;
+ }
+ else
+ {
+ opened = 1;
+ }
+ }
+
return rplay_fd;
}
else
@@ -158,6 +186,7 @@
break;
}
+ /*
if (spool_id == -1 && dsp_fmt && dsp_speed && dsp_channels)
{
char response[RPTP_MAX_LINE];
@@ -174,11 +203,18 @@
getsound());
rptp_getline(rplay_fd, response, sizeof(response));
+ if (response[0] != RPTP_OK)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
spool_id = atoi(1 + rptp_parse(response, "id"));
rptp_putline(rplay_fd, "put id=#%d size=0", spool_id);
rptp_getline(rplay_fd, response, sizeof(response));
}
+ */
return 0;
}
@@ -214,7 +250,7 @@
if (!func)
func = (int (*)(int, const void *, size_t)) dlsym(REAL_LIBC, "write");
- if (fd == rplay_fd && !streaming)
+ if (fd == rplay_fd && !streaming && opened)
{
char info[64];
char response[RPTP_MAX_LINE];
@@ -241,7 +277,7 @@
}
/* otherwise let rplayd figure out the format using
the sound header and/or name. */
-
+
streaming = 1;
rptp_putline(rplay_fd, "play input=flow %s sound=\"%s\"",
info, getsound());
@@ -269,6 +305,7 @@
rplay_fd = -1;
spool_id = -1;
streaming = 0;
+ opened = 0;
dsp_fmt = dsp_speed = dsp_channels = dsp_speed = dsp_blksize = 0;
}
--- rplay-3.3.2.orig/etc/rplay.hosts
+++ rplay-3.3.2/etc/rplay.hosts
@@ -1,5 +1,6 @@
-# Sample rplay.hosts
-#
-# this file describes what machines can read from or write to this server
-# *:rwx
-# would allow anyone to read or write to this server.
+# default rplay.hosts
+# see the rplay.hosts(5) for details on the format and meaning of this
+# file
+
+# give the localhost the default permissions
+localhost
--- rplay-3.3.2.orig/etc/rplay.helpers
+++ rplay-3.3.2/etc/rplay.helpers
@@ -3,7 +3,6 @@
# <regex> <audio-format> <application>
#
## MPEG
-\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo -
+\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo -
-## MODS
-#\.\(669\|alm\|amd\|far\|mod\|mtm\|okt\|ptm\|rad\|s3m\|stm\|wow\|xm\)$ linear16,44100,16,2,little-endian /usr/local/bin/xmp --stereo --little-endian -b 16 -f 44100 --stdout --nocmd /dev/fd/0
+\.ogg$ linear16,44100,16,2,little-endian /usr/bin/ogg123 -q -d raw -o byteorder:little -f - /dev/fd/0
--- rplay-3.3.2.orig/include/config.h.in
+++ rplay-3.3.2/include/config.h.in
@@ -40,7 +40,7 @@
/*
* Use host authentication.
*/
-#define AUTH
+#define AUTH
/*
* Support rplay 2.0 packets. If you define this then you
@@ -75,7 +75,7 @@
* 1 - System and rplayd errors.
* 2 - + RPTP connections, get, put, find.
* 3 - + play, stop, pause, continue, etc.
- * 4 - + Debug messages.
+ * 4 - + Debug messages.
*
* Note that the logging level can also be specified with
* rplayd command line options. This is only used if
@@ -192,6 +192,7 @@
#undef HAVE_LIBREADLINE
#undef HAVE_RANDOM
#undef HAVE_SRANDOM
+#undef HAVE_REGCOMP
#undef HAVE_STDC_HEADERS
#undef HAVE_MEMORY_H
@@ -207,6 +208,7 @@
#undef HAVE_GSM_H
#undef HAVE_GSM_GSM_H
+#undef HAVE_REGEX_H
#undef HAVE_RXPOSIX_H
#undef HAVE_RX_RXPOSIX_H
--- rplay-3.3.2.orig/librplay/Makefile.in
+++ rplay-3.3.2/librplay/Makefile.in
@@ -9,7 +9,7 @@
MKINSTALLDIRS= @srcdir@/../mkinstalldirs
CPPFLAGS= $(CC_OPTIONS) -I. -I../include -I@srcdir@/../include @DEFS@
-LDFLAGS= $(LD_OPTIONS) -shared @LDFLAGS@
+LDFLAGS= $(LD_OPTIONS) -shared -Xlinker -soname -Xlinker librplay.so.3 @LDFLAGS@
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
@@ -33,7 +33,10 @@
$(RANLIB) $@
librplay.so: $(SHAREDOBJS)
- $(CC) -o $@ $(SHAREDOBJS) $(LDFLAGS)
+ $(CC) -o $@.@RPLAY_VERSION@ $(SHAREDOBJS) $(LDFLAGS)
+ ln -fs $@.@RPLAY_VERSION@ $@.3
+ ln -fs $@.@RPLAY_VERSION@ $@
+
#
# For HP-UX comment above and uncomment below.
@@ -50,14 +53,16 @@
install: all
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) $(TARGET) $(libdir)
- $(INSTALL_DATA) librplay.so $(libdir)
+ $(INSTALL_DATA) librplay.so.@RPLAY_VERSION@ $(libdir)
+ (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so.3)
+ (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so)
uninstall:
$(RM) $(libdir)/$(TARGET)
$(RM) $(libdir)/librplay.so
clean:
- $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so a.out core *~ *.bak *.orig TAGS
+ $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so* a.out core *~ *.bak *.orig TAGS
distclean: clean
$(RM) Makefile
--- rplay-3.3.2.orig/perl/RPlay.pm
+++ rplay-3.3.2/perl/RPlay.pm
@@ -44,8 +44,8 @@
my ($that_host, $that_port) = @_;
my ($pat, $name, $aliases, $proto, $port, $udp);
my (@bytes, $addrtype, $length, $old);
- my ($that, $that_addr, $that_addr);
- my ($this, $this_addr, $this_addr);
+ my ($that, $that_addr);
+ my ($this, $this_addr);
$sockaddr = 'S n a4 x8';
--- rplay-3.3.2.orig/rplay/rplay.c
+++ rplay-3.3.2/rplay/rplay.c
@@ -42,6 +42,11 @@
#define OPTIONS "+spcN:P:h:rv:n:R:b:i:"
+/* Make sure MAXPATHLEN is defined. */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
struct option longopts[] =
{
{"continue", no_argument, NULL, 'c'},
--- rplay-3.3.2.orig/rplayd/sound.c
+++ rplay-3.3.2/rplayd/sound.c
@@ -64,6 +64,9 @@
#ifdef HAVE_HELPERS
#include "helper.h"
#endif /* HAVE_HELPERS */
+#ifdef HAVE_REGEX_H
+#include <regex.h>
+#else
#ifdef HAVE_RX_RXPOSIX_H
#include <rx/rxposix.h>
#else
@@ -73,6 +76,12 @@
#include "rxposix.h"
#endif
#endif
+#endif
+
+/* Make sure MAXPATHLEN is defined. */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
SOUND *sounds = NULL;
int sound_count = 0;
@@ -143,9 +152,9 @@
//memset ((char *) &bad_dirs, 0, sizeof (bad_dirs));
- if (regncomp(&bad_dirs, buf, strlen(buf), REG_ICASE | REG_NOSUB))
+ if (regcomp(&bad_dirs, buf, REG_ICASE | REG_NOSUB))
{
- report(REPORT_ERROR, "bad_dirs: regncomp failed\n");
+ report(REPORT_ERROR, "bad_dirs: regcomp failed\n");
done(1);
}
@@ -162,7 +171,7 @@
#endif
{
/* return 1 if bad */
- return regnexec(&bad_dirs, dir, strlen(dir), 0, 0, 0) ? 0 : 1;
+ return regexec(&bad_dirs, dir, 0, 0, 0) ? 0 : 1;
}
#endif /* BAD_DIRS */
--- rplay-3.3.2.orig/rplayd/sound.h
+++ rplay-3.3.2/rplayd/sound.h
@@ -170,9 +170,9 @@
int gsm_bit_frame_bytes; /* Number of bytes in gsm_bit_frame */
int gsm_fixed_buffer_size;
#endif /* HAVE_GSM */
-#ifdef HAVE_CDROM
+#if defined(HAVE_CDROM) || defined(HAVE_HELPERS)
int pid;
-#endif /* HAVE_CDROM */
+#endif /* HAVE_CDROM || HAVE_HELPERS */
}
SINDEX;
--- rplay-3.3.2.orig/rplayd/helper.h
+++ rplay-3.3.2/rplayd/helper.h
@@ -26,6 +26,9 @@
#ifdef HAVE_HELPERS
+#ifdef HAVE_REGEX_H
+#include <regex.h>
+#else
#ifdef HAVE_RX_RXPOSIX_H
#include <rx/rxposix.h>
#else
@@ -35,6 +38,7 @@
#include "rxposix.h"
#endif
#endif
+#endif
typedef struct _helper
{
--- rplay-3.3.2.orig/rplayd/rplayd.h
+++ rplay-3.3.2/rplayd/rplayd.h
@@ -73,7 +73,6 @@
extern fd_set read_mask;
extern fd_set write_mask;
extern int debug;
-extern int inetd;
extern int rptp_timeout;
extern char hostname[];
extern char *hostaddr;
@@ -133,7 +132,7 @@
extern int monitor_count;
extern BUFFER *monitor_buffers;
-extern int errno;
+#include <errno.h>
#ifdef __STDC__
extern void usage ();
--- rplay-3.3.2.orig/rplayd/helper.c
+++ rplay-3.3.2/rplayd/helper.c
@@ -43,6 +43,11 @@
#include "helper.h"
#include "misc.h"
+/* Make sure MAXPATHLEN is defined. */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
HELPER *helpers = NULL;
static time_t helper_read_time;
@@ -110,7 +115,7 @@
done(1);
}
//memset ((char *) &hp->pattern, 0, sizeof (hp->pattern));
- error = regncomp(&hp->pattern, pat, strlen(pat), REG_ICASE | REG_NOSUB);
+ error = regcomp(&hp->pattern, pat, REG_ICASE | REG_NOSUB);
if (error)
{
report(REPORT_ERROR, "helper_read: %d line %d\n", error, line);
@@ -188,7 +193,7 @@
for (hp = helpers; hp; hp = hp->next)
{
- if (regnexec(&hp->pattern, sound, strlen(sound), 0, 0, 0) == 0)
+ if (regexec(&hp->pattern, sound, 0, 0, 0) == 0)
{
return hp;
}
--- rplay-3.3.2.orig/rplayd/native.c
+++ rplay-3.3.2/rplayd/native.c
@@ -22,7 +22,7 @@
*/
-
+#include <string.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
--- rplay-3.3.2.orig/rplayd/rplayd.c
+++ rplay-3.3.2/rplayd/rplayd.c
@@ -333,6 +333,9 @@
progname = argv[0];
+ /* no need to keep stdin around */
+ close(0);
+
servers_file = tilde_expand(RPLAY_SERVERS);
#ifdef HAVE_HELPERS
helpers_file = tilde_expand(RPLAY_HELPERS);
@@ -1466,7 +1469,7 @@
char *buf = rplay_audio_buf;
int size = rplay_audio_size;
int n;
-
+
while (size)
{
n = MIN(BUFFER_SIZE - monitor_buffers->offset, size);
@@ -1483,7 +1486,7 @@
}
}
}
-
+
rplay_audio_size = 0;
/* Flush when the audio stream has ended. */
--- rplay-3.3.2.orig/rplayd/spool.c
+++ rplay-3.3.2/rplayd/spool.c
@@ -43,6 +43,11 @@
#include "flange.h"
#endif
+/* Make sure MAXPATHLEN is defined. */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
SPOOL *spool = NULL; /* List of spool entries. */
int spool_size = 0; /* Number of entries in the spool. */
int spool_nplaying = 0; /* Number of playing sounds. */
@@ -1127,8 +1132,8 @@
spool_flow_pause(sp);
}
}
-#endif /* HAVE_CDROM */
}
+#endif /* HAVE_CDROM */
}
else
{
--- rplay-3.3.2.orig/rplayd/xhash.c
+++ rplay-3.3.2/rplayd/xhash.c
@@ -36,6 +36,11 @@
#include "hash.h"
#include "rplayd.h"
+/* Make sure MAXPATHLEN is defined. */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
static struct hash_control *htable;
#ifdef DEBUG
--- rplay-3.3.2.orig/rplayd/cache.c
+++ rplay-3.3.2/rplayd/cache.c
@@ -47,6 +47,11 @@
#include "spool.h"
#include "cache.h"
+/* Make sure MAXPATHLEN is defined. */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
static DIR *cache_dir;
static char cache_path[MAXPATHLEN];
static char cache_directory[MAXPATHLEN];
--- rplay-3.3.2.orig/rplayd/host.c
+++ rplay-3.3.2/rplayd/host.c
@@ -33,6 +33,9 @@
#include "host.h"
#include "buffer.h"
#include "misc.h"
+#ifdef HAVE_REGEX_H
+#include <regex.h>
+#else
#ifdef HAVE_RX_RXPOSIX_H
#include <rx/rxposix.h>
#else
@@ -42,6 +45,7 @@
#include "rxposix.h"
#endif
#endif
+#endif
#ifdef AUTH
@@ -197,35 +201,31 @@
}
strcat(expr_monitor, "$");
- error = regncomp(&access_read, expr_read, strlen(expr_read),
- REG_ICASE | REG_NOSUB);
+ error = regcomp(&access_read, expr_read, REG_ICASE | REG_NOSUB);
if (error)
{
- report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
+ report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
done(1);
}
- error = regncomp(&access_write, expr_write, strlen(expr_write),
- REG_ICASE | REG_NOSUB);
+ error = regcomp(&access_write, expr_write, REG_ICASE | REG_NOSUB);
if (error)
{
- report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
+ report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
done(1);
}
- error = regncomp(&access_execute, expr_execute, strlen(expr_execute),
- REG_ICASE | REG_NOSUB);
+ error = regcomp(&access_execute, expr_execute, REG_ICASE | REG_NOSUB);
if (error)
{
- report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
+ report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
done(1);
}
- error = regncomp(&access_monitor, expr_monitor, strlen(expr_monitor),
- REG_ICASE | REG_NOSUB);
+ error = regcomp(&access_monitor, expr_monitor, REG_ICASE | REG_NOSUB);
if (error)
{
- report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
+ report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
done(1);
}
}
@@ -432,7 +432,7 @@
done(1);
}
- n = regnexec(re, p, strlen(p), 0, 0, 0);
+ n = regexec(re, p, 0, 0, 0);
return !n;
}
--- rplay-3.3.2.orig/rplayd/timer.c
+++ rplay-3.3.2/rplayd/timer.c
@@ -29,6 +29,7 @@
#include <sys/signal.h>
#include <stdio.h>
#include <unistd.h>
+#include <errno.h>
#include "rplayd.h"
#include "timer.h"
--- rplay-3.3.2.orig/rplayd/Makefile.in
+++ rplay-3.3.2/rplayd/Makefile.in
@@ -25,7 +25,7 @@
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
LDFLAGS= $(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \
- -L../adpcm -ladpcm @GSM_LIBS@ -L../rx -lrx @LDFLAGS@ @LIBS@ -lm
+ -L../adpcm -ladpcm @GSM_LIBS@ @RX_LIBS@ @LDFLAGS@ @LIBS@ -lm
TARGET= rplayd
@@ -54,7 +54,7 @@
install: all
$(MKINSTALLDIRS) $(sbindir)
$(INSTALL_PROGRAM) $(TARGET) $(sbindir)/$(TARGET)
- @test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo ""
+ @(test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "") || true
uninstall:
$(RM) $(bindir)/$(TARGET)
--- rplay-3.3.2.orig/rplayd/audio/audio_FreeBSD.c
+++ rplay-3.3.2/rplayd/audio/audio_FreeBSD.c
@@ -35,7 +35,7 @@
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <errno.h>
-#include <machine/soundcard.h>
+#include <sys/soundcard.h>
/*
* for the poor folks who don't have a sound card, but use the pc speaker
--- rplay-3.3.2.orig/rplayd/audio/audio_gnu.h
+++ rplay-3.3.2/rplayd/audio/audio_gnu.h
@@ -0,0 +1,37 @@
+/* $Id: audio_generic.h,v 1.3 1999/03/10 07:58:10 boyns Exp $ */
+
+/*
+ * Copyright (C) 1993-99 Mark R. Boyns <boyns@doit.org>
+ *
+ * This file is part of rplay.
+ *
+ * rplay 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.
+ *
+ * rplay 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 rplay; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+
+#ifndef _audio_generic_h
+#define _audio_generic_h
+
+#include "rplay.h"
+
+#define RPLAY_AUDIO_DEVICE "/dev/audio"
+#define RPLAY_AUDIO_TIMEOUT 5
+#define RPLAY_AUDIO_FLUSH_TIMEOUT -1
+#define RPLAY_AUDIO_RATE 10
+#define RPLAY_AUDIO_BYTE_ORDER RPLAY_BIG_ENDIAN
+
+#endif /* _audio_generic_h */
--- rplay-3.3.2.orig/rplayd/audio/audio_gnu.c
+++ rplay-3.3.2/rplayd/audio/audio_gnu.c
@@ -0,0 +1,287 @@
+/* $Id: audio_generic.c,v 1.5 1999/03/10 07:58:10 boyns Exp $ */
+
+/*
+ * Copyright (C) 1993-99 Mark R. Boyns <boyns@doit.org>
+ *
+ * This file is part of rplay.
+ *
+ * rplay 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.
+ *
+ * rplay 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 rplay; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+
+#include "rplayd.h"
+
+/*
+ * System audio include files:
+ */
+#include <sys/types.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#ifdef ultrix
+#include <fcntl.h>
+#else
+#include <sys/fcntl.h>
+#endif
+#include <sys/errno.h>
+
+/*
+ * External variables:
+ */
+extern char *rplay_audio_device;
+extern int rplay_audio_sample_rate;
+extern int rplay_audio_channels;
+extern int rplay_audio_precision;
+extern int rplay_audio_format;
+extern int rplay_audio_port;
+extern int optional_sample_rate;
+extern int optional_precision;
+extern int optional_channels;
+extern int optional_format;
+extern int optional_port;
+
+/*
+ * Internal variables:
+ */
+static int rplay_audio_fd = -1;
+
+static RPLAY_AUDIO_TABLE generic_table[] =
+{
+ {8000, RPLAY_FORMAT_ULAW, 1, 1},
+ {0, 0, 0, 0}
+};
+
+/*
+ * Initialize the audio device.
+ * This routine must set the following external variables:
+ * rplay_audio_sample_rate
+ * rplay_audio_precision
+ * rplay_audio_channels
+ * rplay_audio_format
+ * rplay_audio_port
+ *
+ * and may use the following optional parameters:
+ * optional_sample_rate
+ * optional_precision
+ * optional_channels
+ * optional_format
+ * optional_port
+ *
+ * optional_* variables with values of zero should be ignored.
+ *
+ * Return 0 on success and -1 on error.
+ */
+int
+rplay_audio_init()
+{
+ if (rplay_audio_fd == -1)
+ {
+ rplay_audio_open();
+ if (rplay_audio_fd == -1)
+ {
+ report(REPORT_ERROR, "rplay_audio_init: cannot open %s\n",
+ rplay_audio_device);
+ return -1;
+ }
+ }
+
+ rplay_audio_sample_rate = 8000;
+ rplay_audio_precision = 8;
+ rplay_audio_channels = 1;
+ rplay_audio_format = RPLAY_FORMAT_ULAW;
+ rplay_audio_port = RPLAY_AUDIO_PORT_SPEAKER;
+ rplay_audio_table = generic_table;
+
+ return 0;
+}
+
+/*
+ * Open the audio device.
+ *
+ * Return 0 on success and -1 on error.
+ */
+int
+rplay_audio_open()
+{
+ int flags;
+
+ rplay_audio_fd = open(rplay_audio_device, O_WRONLY | O_NDELAY, 0);
+ if (rplay_audio_fd < 0)
+ {
+ return -1;
+ }
+
+ if (fcntl(rplay_audio_fd, F_SETFD, 1) < 0)
+ {
+ report(REPORT_ERROR,
+ "rplay_audio_open: close-on-exec %d\n",
+ sys_err_str(errno));
+ /* return -1; */
+ }
+
+ if (rplay_audio_init() < 0)
+ {
+ return -1;
+ }
+
+ /*
+ * Make sure the audio device writes are non-blocking.
+ */
+ flags = fcntl(rplay_audio_fd, F_GETFL, 0);
+ if (flags < 0)
+ {
+ return -1;
+ }
+ flags |= FNDELAY;
+ if (fcntl(rplay_audio_fd, F_SETFL, flags) < 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ * Is the audio device open?
+ *
+ * Return 1 for true and 0 for false.
+ */
+int
+rplay_audio_isopen()
+{
+ return rplay_audio_fd != -1;
+}
+
+/*
+ * Flush the audio device.
+ *
+ * Return 0 on success and -1 on error.
+ */
+int
+rplay_audio_flush()
+{
+ return 0;
+}
+
+/*
+ * Write nbytes from buf to the audio device.
+ *
+ * Return the number of bytes written on success and -1 on error.
+ */
+#ifdef __STDC__
+int
+rplay_audio_write(char *buf, int nbytes)
+#else
+int
+rplay_audio_write(buf, nbytes)
+ char *buf;
+ int nbytes;
+#endif
+{
+ int n, nleft, nwritten;
+ char *p;
+
+ nleft = nbytes;
+ nwritten = 0;
+
+ for (p = buf; nleft > 0; nleft -= n, p += n)
+ {
+ n = write(rplay_audio_fd, p, nleft);
+ if (n < 0)
+ {
+ if (errno == EWOULDBLOCK)
+ {
+ return nwritten;
+ }
+ else if (errno != EINTR)
+ {
+ return -1;
+ }
+ n = 0;
+ }
+ else
+ {
+ nwritten += n;
+ }
+ }
+
+ return nwritten;
+}
+
+/*
+ * Close the audio device.
+ *
+ * Return 0 on success and -1 on error.
+ */
+int
+rplay_audio_close()
+{
+ if (rplay_audio_fd != -1)
+ {
+ close(rplay_audio_fd);
+ }
+
+ rplay_audio_fd = -1;
+
+ return 0;
+}
+
+/*
+ * Return the volume of the audio device.
+ *
+ * Return 0-255 or -1 on error.
+ */
+int
+rplay_audio_get_volume()
+{
+#ifdef FAKE_VOLUME
+ return rplay_audio_volume;
+#else /* not FAKE_VOLUME */
+ return -1;
+#endif /* not FAKE_VOLUME */
+}
+
+/*
+ * Set the volume of the audio device.
+ * Input should be 0-255.
+ *
+ * Return the volume of the audio device 0-255 or -1.
+ */
+#ifdef __STDC__
+int
+rplay_audio_set_volume(int volume)
+#else
+int
+rplay_audio_set_volume(volume)
+ int volume;
+#endif
+{
+#ifdef FAKE_VOLUME
+ if (volume < RPLAY_MIN_VOLUME)
+ {
+ volume = RPLAY_MIN_VOLUME;
+ }
+ else if (volume > RPLAY_MAX_VOLUME)
+ {
+ volume = RPLAY_MAX_VOLUME;
+ }
+ rplay_audio_volume = volume;
+
+ return rplay_audio_volume;
+#else /* not FAKE_VOLUME */
+ return -1;
+#endif /* not FAKE_VOLUME */
+}
--- rplay-3.3.2.orig/rptp/rptp.c
+++ rplay-3.3.2/rptp/rptp.c
@@ -532,6 +532,8 @@
printf("help Display help information.\n");
printf("info Display sound information.\n");
printf("list Display various server information.\n");
+ printf("monitor Monitor the audio output of rplayd.\n");
+ printf(" Requires \"m\" permission in rplay.hosts\n");
printf("open Connect to a server.\n");
printf("pause Pause sounds that are playing.\n");
printf("play Play sounds\n");
@@ -783,7 +785,7 @@
}
fwrite(rptp_buf, 1, n, fp);
size -= n;
-
+
sprintf(line, "\r%s %d/%d %d%%", filename,
total_size - size, total_size,
(int)(((float)(total_size-size)/total_size)*100));
@@ -1018,7 +1020,7 @@
char line[80];
int n, size;
int sample_rate, precision, channels, sample_size;
-
+
if (!connected())
{
return;