--- 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 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
