$NetBSD$

--- configure.ac.orig	2006-05-07 02:18:31.000000000 +0200
+++ configure.ac
@@ -1472,10 +1472,10 @@ case "$ac_cv_build" in
     case "ac_cv_build" in
       i[[3-9]]86-*-netbsd*) machine=intel386 ;;
       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
-                      dnl Yes, this is somewhat bogus.
-                      machine=hp9000s300 ;;
+                      machine=m68k ;;
       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
+      alpha-*-netbsd* ) machine=alpha ;;
     esac
   ;;
 
@@ -2751,7 +2751,7 @@ if test "$add_runtime_path" = "yes"; the
     decosf* | linux* | irix*) dash_r="-rpath " ;;
     *)
       dash_r=""
-      for try_dash_r in "-R" "-R " "-rpath "; do
+      for try_dash_r in "-Wl,-R" "-R" "-R " "-rpath "; do
         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
         XE_PROTECT_LINKER_FLAGS(xe_check_libs)
         AC_LINK_IFELSE([AC_LANG_SOURCE([[]])], dash_r="$try_dash_r")
@@ -5770,6 +5770,9 @@ else dnl "$with_tty" = "no"
   done
 fi dnl with_tty
 
+AC_CHECK_LIB(ossaudio, main, LIBOSSAUDIO=-lossaudio)
+AC_SUBST(LIBOSSAUDIO)
+
 dnl Do we need event-unixoid.o ?
 dnl This is needed for X, or for TTY select()
 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" -o "$with_gtk" = "yes" -o "$with_gnome" = "yes" && XE_ADD_OBJS(event-unixoid.o)
