replace oss audio API usage with our native audio API.

--
Patches and code for native audio API support from:
Wilbern Cobb <cobb@vedge.com.ar>
This commit is contained in:
brad 2001-08-04 05:03:19 +00:00
parent 8938e4508d
commit 083ab4c72f
11 changed files with 630 additions and 25 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.24 2001/07/22 22:49:47 brad Exp $
# $OpenBSD: Makefile,v 1.25 2001/08/04 05:03:19 brad Exp $
# $FreeBSD: Makefile,v 1.8 1999/03/09 01:08:46 nectar Exp $
COMMENT= "sound library for Enlightenment"
@ -25,6 +25,9 @@ CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ARGS+= --enable-static --with-libwrap
post-extract:
@cp -f ${FILESDIR}/audio_sun.c ${WRKSRC}
post-install:
@cd ${PREFIX}/share/examples/esound && mv esd.conf esd.conf-sample

View File

@ -0,0 +1,134 @@
/* $OpenBSD: audio_sun.c,v 1.1 2001/08/04 05:03:20 brad Exp $ */
#include "config.h"
#include <sys/audioio.h>
static void sun_panic(int fd, char *s)
{
perror(s);
close(fd);
esd_audio_fd = -1;
}
#define ARCH_esd_audio_devices
const char *esd_audio_devices()
{
return "/dev/audio";
}
#define ARCH_esd_audio_open
int esd_audio_open()
{
const char *device;
int afd = -1;
int fmt = 0, channels = 0;
int mode = O_WRONLY;
audio_encoding_t enc;
audio_info_t info;
AUDIO_INITINFO(&info);
/* number of channels */
channels = (((esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO)
? /* stereo */ 2
: /* mono */ 1);
/* set the appropriate mode */
if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
mode = O_RDWR;
info.mode = AUMODE_PLAY | AUMODE_RECORD;
info.play.channels = channels;
info.record.channels = channels;
} else {
info.mode = AUMODE_PLAY;
info.play.channels = channels;
}
mode |= O_NONBLOCK;
/* open the sound device */
device = esd_audio_device ? esd_audio_device : "/dev/audio";
if ((afd = open(device, mode, 0)) == -1) {
perror(device);
return( -2 );
}
mode = fcntl(afd, F_GETFL);
mode &= ~O_NONBLOCK;
fcntl(afd, F_SETFL, mode);
/* set the requested mode */
if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
sun_panic(afd, "AUDIO_SETINFO");
return(-1);
}
/* set full-duplex mode if we are recording */
if ( (esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD ) {
if (ioctl(afd, AUDIO_SETFD, 1) == -1) {
sun_panic(afd, "AUDIO_SETFD");
return(-1);
}
}
/* pick a supported encoding */
#if defined(WORDS_BIGENDIAN)
fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
? /* 16 bit */ AUDIO_ENCODING_SLINEAR_BE
: /* 8 bit */ AUDIO_ENCODING_PCM8;
#else
fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
? /* 16 bit */ AUDIO_ENCODING_SLINEAR_LE
: /* 8 bit */ AUDIO_ENCODING_PCM8;
#endif
enc.index = 0;
while(!ioctl(afd, AUDIO_GETENC, &enc) && enc.encoding != fmt) {
enc.index++;
}
info.play.encoding = fmt;
info.play.precision = enc.precision;
if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
fprintf(stderr, "Unsupported encoding: %i-bit \"%s\" (0x%x)\n",
enc.precision, enc.name, fmt);
sun_panic(afd, "SETINFO");
return(-1);
}
/* finally, set the sample rate */
info.play.sample_rate = esd_audio_rate;
if(ioctl(afd, AUDIO_SETINFO, &info) < 0 ||
fabs(info.play.sample_rate - esd_audio_rate) > esd_audio_rate * 0.05) {
fprintf(stderr, "Unsupported rate: %i Hz\n", esd_audio_rate);
sun_panic(afd, "SETINFO");
return(-1);
}
return(esd_audio_fd = afd);
}
#define ARCH_esd_audio_pause
void esd_audio_pause()
{
audio_info_t info;
int afd = esd_audio_fd;
AUDIO_INITINFO(&info);
if(ioctl(afd, AUDIO_GETINFO, &info) < 0) {
sun_panic(afd, "AUDIO_GETINFO");
return;
}
if((info.mode & AUMODE_PLAY) == AUMODE_PLAY)
info.play.pause = !info.play.pause;
if((info.mode & AUMODE_RECORD) == AUMODE_RECORD)
info.record.pause = !info.record.pause;
return;
}

View File

@ -0,0 +1,10 @@
--- acconfig.h.orig Sat Jul 21 00:21:12 2001
+++ acconfig.h Sat Jul 21 00:21:18 2001
@@ -8,6 +8,7 @@
#undef DRIVER_ALSA
#undef DRIVER_NEWALSA
#undef DRIVER_DART
+#undef DRIVER_SUN
#undef DRIVER_NONE
#undef HAVE_INET_ATON
#undef HAVE_NANOSLEEP

View File

@ -0,0 +1,11 @@
--- audio.c.orig Tue Sep 26 11:56:18 2000
+++ audio.c Sun Jul 22 17:41:04 2001
@@ -23,6 +23,8 @@ static int esd_audio_fd = -1;
/* ALSA before OSS as ALSA is OSS compatible */
#if defined(DRIVER_ALSA) || defined(DRIVER_NEWALSA)
# include "audio_alsa.c"
+#elif defined(DRIVER_SUN)
+# include "audio_sun.c"
#elif defined(DRIVER_OSS)
# include "audio_oss.c"
#elif defined(DRIVER_AIX)

View File

@ -1,11 +0,0 @@
--- audio_oss.c.orig Tue Jul 18 12:34:13 2000
+++ audio_oss.c Sun Aug 6 03:27:01 2000
@@ -38,7 +38,7 @@
mode |= O_NONBLOCK;
/* open the sound device */
- device = esd_audio_device ? esd_audio_device : "/dev/dsp";
+ device = esd_audio_device ? esd_audio_device : "/dev/sound";
if ((afd = open(device, mode, 0)) == -1)
{ /* Opening device failed */
perror(device);

View File

@ -0,0 +1,10 @@
--- config.h.in.orig Sat Jul 21 00:26:41 2001
+++ config.h.in Sat Jul 21 00:26:43 2001
@@ -39,6 +39,7 @@
#undef DRIVER_ALSA
#undef DRIVER_NEWALSA
#undef DRIVER_DART
+#undef DRIVER_SUN
#undef DRIVER_NONE
#undef HAVE_INET_ATON
#undef HAVE_NANOSLEEP

View File

@ -1,10 +1,408 @@
--- configure.orig Tue Oct 3 13:59:31 2000
+++ configure Thu Oct 5 19:31:30 2000
@@ -4224,6 +4224,7 @@
--- configure.orig Tue Nov 28 14:41:52 2000
+++ configure Sun Jul 22 19:56:57 2001
@@ -3389,6 +3389,19 @@ EOF
esac
fi
+ if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
+ case ${host_os} in
+ openbsd* | netbsd*)
+ found_sound=yes
+ DRIVER_SUN=1
+ cat >> confdefs.h <<\EOF
+#define DRIVER_SUN 1
+EOF
+
+ ;;
+ esac
+ fi
+
case ${host_os} in
os2*)
found_sound=yes
@@ -3459,13 +3472,14 @@ EOF
echo "---------------------------------------------------------------------"
echo "--- Checking to see which audio libraries are required for linking.";
echo "--- Most of these checks should also fail. Do not be alarmed.";
- echo $ac_n "checking for _oss_ioctl""... $ac_c" 1>&6
-echo "configure:3464: checking for _oss_ioctl" >&5
+ if test ! "$DRIVER_SUN"; then
+ echo $ac_n "checking for _oss_ioctl""... $ac_c" 1>&6
+echo "configure:3478: checking for _oss_ioctl" >&5
if eval "test \"`echo '$''{'ac_cv_func__oss_ioctl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3469 "configure"
+#line 3483 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _oss_ioctl(); below. */
@@ -3488,7 +3502,7 @@ _oss_ioctl();
; return 0; }
EOF
-if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__oss_ioctl=yes"
else
@@ -3506,7 +3520,7 @@ if eval "test \"`echo '$ac_cv_func_'_oss
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
-echo "configure:3510: checking for _oss_ioctl in -lossaudio" >&5
+echo "configure:3524: checking for _oss_ioctl in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3514,7 +3528,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lossaudio $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3518 "configure"
+#line 3532 "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
@@ -3525,7 +3539,7 @@ int main() {
_oss_ioctl()
; return 0; }
EOF
-if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3554,13 +3568,14 @@ fi
fi
+ fi
echo $ac_n "checking for ALnewconfig""... $ac_c" 1>&6
-echo "configure:3559: checking for ALnewconfig" >&5
+echo "configure:3574: checking for ALnewconfig" >&5
if eval "test \"`echo '$''{'ac_cv_func_ALnewconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3564 "configure"
+#line 3579 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char ALnewconfig(); below. */
@@ -3583,7 +3598,7 @@ ALnewconfig();
; return 0; }
EOF
-if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_ALnewconfig=yes"
else
@@ -3601,7 +3616,7 @@ if eval "test \"`echo '$ac_cv_func_'ALne
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for ALnewconfig in -laudio""... $ac_c" 1>&6
-echo "configure:3605: checking for ALnewconfig in -laudio" >&5
+echo "configure:3620: checking for ALnewconfig in -laudio" >&5
ac_lib_var=`echo audio'_'ALnewconfig | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3609,7 +3624,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-laudio $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3613 "configure"
+#line 3628 "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
@@ -3620,7 +3635,7 @@ int main() {
ALnewconfig()
; return 0; }
EOF
-if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3639: \"$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
@@ -3651,12 +3666,12 @@ fi
if test "x$enable_alsa" = "xyes"; then
echo $ac_n "checking for snd_cards""... $ac_c" 1>&6
-echo "configure:3655: checking for snd_cards" >&5
+echo "configure:3670: checking for snd_cards" >&5
if eval "test \"`echo '$''{'ac_cv_func_snd_cards'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3660 "configure"
+#line 3675 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char snd_cards(); below. */
@@ -3679,7 +3694,7 @@ snd_cards();
; return 0; }
EOF
-if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_snd_cards=yes"
else
@@ -3697,7 +3712,7 @@ if eval "test \"`echo '$ac_cv_func_'snd_
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for snd_cards in -lsound""... $ac_c" 1>&6
-echo "configure:3701: checking for snd_cards in -lsound" >&5
+echo "configure:3716: checking for snd_cards in -lsound" >&5
ac_lib_var=`echo sound'_'snd_cards | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3705,7 +3720,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsound $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3709 "configure"
+#line 3724 "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
@@ -3716,7 +3731,7 @@ int main() {
snd_cards()
; return 0; }
EOF
-if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3735: \"$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
@@ -3746,12 +3761,12 @@ fi
fi
echo $ac_n "checking for snd_cards""... $ac_c" 1>&6
-echo "configure:3750: checking for snd_cards" >&5
+echo "configure:3765: checking for snd_cards" >&5
if eval "test \"`echo '$''{'ac_cv_func_snd_cards'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3755 "configure"
+#line 3770 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char snd_cards(); below. */
@@ -3774,7 +3789,7 @@ snd_cards();
; return 0; }
EOF
-if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_snd_cards=yes"
else
@@ -3792,7 +3807,7 @@ if eval "test \"`echo '$ac_cv_func_'snd_
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for snd_cards in -lasound""... $ac_c" 1>&6
-echo "configure:3796: checking for snd_cards in -lasound" >&5
+echo "configure:3811: checking for snd_cards in -lasound" >&5
ac_lib_var=`echo asound'_'snd_cards | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3800,7 +3815,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3804 "configure"
+#line 3819 "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
@@ -3811,7 +3826,7 @@ int main() {
snd_cards()
; return 0; }
EOF
-if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3830: \"$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
@@ -3904,7 +3919,7 @@ fi
# Extract the first word of "audiofile-config", so it can be a program name with args.
set dummy audiofile-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3908: checking for $ac_word" >&5
+echo "configure:3923: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AUDIOFILE_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3939,7 +3954,7 @@ fi
min_audiofile_version=0.1.5
echo $ac_n "checking for AUDIOFILE - version >= $min_audiofile_version""... $ac_c" 1>&6
-echo "configure:3943: checking for AUDIOFILE - version >= $min_audiofile_version" >&5
+echo "configure:3958: checking for AUDIOFILE - version >= $min_audiofile_version" >&5
no_audiofile=""
if test "$AUDIOFILE_CONFIG" = "no" ; then
no_audiofile=yes
@@ -3962,7 +3977,7 @@ echo "configure:3943: checking for AUDIO
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat > conftest.$ac_ext <<EOF
-#line 3966 "configure"
+#line 3981 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4020,7 +4035,7 @@ int main ()
EOF
-if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -4058,7 +4073,7 @@ echo "--- libaudiofile found. Building e
CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
LIBS="$LIBS $AUDIOFILE_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4062 "configure"
+#line 4077 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4068,7 +4083,7 @@ int main() {
return 0;
; return 0; }
EOF
-if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding AUDIOFILE or finding the wrong"
@@ -4133,7 +4148,7 @@ DB2HTML=true
# Extract the first word of "db2html", so it can be a program name with args.
set dummy db2html; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4137: checking for $ac_word" >&5
+echo "configure:4152: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_have_db2html'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4170,7 +4185,7 @@ DB2PS=true
# Extract the first word of "db2ps", so it can be a program name with args.
set dummy db2ps; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4174: checking for $ac_word" >&5
+echo "configure:4189: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_have_db2ps'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4218,12 +4233,13 @@ if test "x$with_libwrap" = "xyes"; then
LIBS="$LIBS -lwrap"
echo $ac_n "checking for tcp_wrapper library and headers""... $ac_c" 1>&6
-echo "configure:4222: checking for tcp_wrapper library and headers" >&5
+echo "configure:4237: checking for tcp_wrapper library and headers" >&5
wrap_ok=no
cat > conftest.$ac_ext <<EOF
#line 4226 "configure"
-#line 4226 "configure"
+#line 4241 "configure"
#include "confdefs.h"
+#include <stdio.h>
#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
@@ -4232,7 +4248,7 @@ int main() {
struct request_info *request; return hosts_access (request);
; return 0; }
EOF
-if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define USE_LIBWRAP 1
@@ -4246,8 +4262,9 @@ else
rm -rf conftest*
LIBS="$LIBS -lnsl"
cat > conftest.$ac_ext <<EOF
-#line 4250 "configure"
+#line 4266 "configure"
#include "confdefs.h"
+#include <stdio.h>
#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
@@ -4256,7 +4273,7 @@ int main() {
struct request_info *request; return hosts_access (request);
; return 0; }
EOF
-if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define USE_LIBWRAP 1
@@ -4280,7 +4297,7 @@ fi
dsp_ok=no ESDDSP= LIBESDDSP= DL_LIB=
echo $ac_n "checking if your platform supports esddsp""... $ac_c" 1>&6
-echo "configure:4284: checking if your platform supports esddsp" >&5
+echo "configure:4301: checking if your platform supports esddsp" >&5
case "$host_os" in
linux* | freebsd* | bsdi4* )
dsp_ok=yes
@@ -4290,12 +4307,12 @@ echo "$ac_t""$dsp_ok" 1>&6
if test "$dsp_ok" = "yes"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4294: checking for dlopen" >&5
+echo "configure:4311: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4299 "configure"
+#line 4316 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4318,7 +4335,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -4336,7 +4353,7 @@ if eval "test \"`echo '$ac_cv_func_'dlop
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4340: checking for dlopen in -ldl" >&5
+echo "configure:4357: 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
@@ -4344,7 +4361,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4348 "configure"
+#line 4365 "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
@@ -4355,7 +4372,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4376: \"$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

View File

@ -0,0 +1,50 @@
--- configure.in.orig Tue Nov 28 14:29:37 2000
+++ configure.in Sun Jul 22 19:56:41 2001
@@ -150,6 +150,16 @@ if test "x$enable_local_sound" = "xyes";
esac
fi
+ if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
+ case ${host_os} in
+ openbsd* | netbsd*)
+ found_sound=yes
+ DRIVER_SUN=1
+ AC_DEFINE(DRIVER_SUN)
+ ;;
+ esac
+ fi
+
case ${host_os} in
os2*)
found_sound=yes
@@ -199,7 +209,9 @@ if test "x$enable_local_sound" = "xyes";
echo "---------------------------------------------------------------------"
echo "--- Checking to see which audio libraries are required for linking.";
echo "--- Most of these checks should also fail. Do not be alarmed.";
- AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
+ if test ! "$DRIVER_SUN"; then
+ AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
+ fi
AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
if test "x$enable_alsa" = "xyes"; then
AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
@@ -284,7 +296,8 @@ if test "x$with_libwrap" = "xyes"; then
wrap_ok=no
AC_TRY_LINK(
-[#include <tcpd.h>
+[#include <stdio.h>
+#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],
@@ -294,7 +307,8 @@ int deny_severity = LOG_WARNING;],
wrap_ok=yes],
[LIBS="$LIBS -lnsl"
AC_TRY_LINK(
-[#include <tcpd.h>
+[#include <stdio.h>
+#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],

View File

@ -1,6 +1,6 @@
--- esd.c.orig Wed Jan 3 08:56:09 2001
+++ esd.c Wed Jan 3 08:58:00 2001
@@ -210,12 +210,12 @@
--- esd.c.orig Tue Nov 28 14:27:30 2000
+++ esd.c Sun Jul 22 17:41:06 2001
@@ -210,12 +210,12 @@ struct stat dir_stats;
#if defined(S_ISVTX)
#define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\

View File

@ -1,6 +1,6 @@
--- esd.h.orig Thu Oct 5 19:34:39 2000
+++ esd.h Thu Oct 5 19:35:35 2000
@@ -7,8 +7,13 @@
--- esd.h.orig Mon Oct 9 11:09:24 2000
+++ esd.h Sun Jul 22 17:41:06 2001
@@ -7,8 +7,13 @@ extern "C" {
#endif
/* path and name of the default EsounD domain socket */

View File

@ -1,5 +1,5 @@
--- esdlib.c.orig Mon Oct 2 12:44:18 2000
+++ esdlib.c Thu Oct 5 19:39:59 2000
--- esdlib.c.orig Tue Nov 28 14:27:30 2000
+++ esdlib.c Sun Jul 22 17:41:06 2001
@@ -19,6 +19,8 @@
#include <arpa/inet.h>
#include <errno.h>
@ -9,7 +9,7 @@
#include <sys/un.h>
@@ -1422,4 +1424,34 @@
@@ -1422,4 +1424,34 @@ int esd_close( int esd )
*/
return close( esd );