$NetBSD: patch-ab,v 1.5 2000/06/20 21:12:10 pooka Exp $

--- configure.orig	Wed May 31 21:52:45 2000
+++ configure	Tue Jun 20 00:20:27 2000
@@ -1411,10 +1411,48 @@
 done
 
 
+echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
+echo "configure:1416: checking for main in -lossaudio" >&5
+ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lossaudio  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1424 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBAUDIO=-lossaudio
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
 # Extract the first word of "cp", so it can be a program name with args.
 set dummy cp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1418: checking for $ac_word" >&5
+echo "configure:1456: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1449,7 +1487,7 @@
 
 
 echo $ac_n "checking which audio driver to install""... $ac_c" 1>&6
-echo "configure:1453: checking which audio driver to install" >&5
+echo "configure:1491: checking which audio driver to install" >&5
 case "$host" in 
   *linux*) cat >> confdefs.h <<\EOF
 #define HAVE_LINUX 1
@@ -1669,6 +1707,7 @@
 s%@SIDPLAY_LDFLAGS@%$SIDPLAY_LDFLAGS%g
 s%@SIDPLAY_INCLUDES@%$SIDPLAY_INCLUDES%g
 s%@CXXCPP@%$CXXCPP%g
+s%@LIBAUDIO@%$LIBAUDIO%g
 s%@CP@%$CP%g
 
 CEOF
