--- configure.in.orig	Mon May 20 13:47:38 2002
+++ configure.in	Tue May 21 18:43:29 2002
@@ -61,10 +61,19 @@ dnl ------------------------------------
 dnl Test for GTK+ / GNOME
 dnl -----------------------------------------------------------------------
 
+case `uname` in
+  OpenBSD)
+    gtk_threads=""
+    LIBS="$LIBS -pthread -lintl"
+    ;;
+  *)
+    gtk_threads="gthreads"
+    ;;
+esac
 AM_PATH_GTK(1.2.2,
 	    ,
             AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?),
-	    "gthread")
+	    $gtk_threads)
 
 gnome=yes
 AC_ARG_ENABLE(gnome,
@@ -76,7 +85,7 @@ if test "$gnome" = yes; then
   AC_MSG_CHECKING(for Gnome compile flags)
   GNOME_CFLAGS=`$gnomepath gnomeui --cflags 2>/dev/null`
   GNOME_VER=`$gnomepath --version |$sedpath 's/gnome-libs //'`
-  GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([[0-9]*]*\).\([[0-9]*]*\).\([[0-9]*]*\)/\1/'`
+  GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
   if test "_$GNOME_MAJOR" = "_0"; then
     gnome=no
     AC_MSG_RESULT([old Gnome found, building without it.])
@@ -218,6 +227,22 @@ case `uname` in
   fi
   ;;
 esac
+
+
+dnl -----------------------------------------------------------------------
+dnl Test for Sun audio
+dnl -----------------------------------------------------------------------
+
+AC_ARG_ENABLE(sun,
+[  --disable-sun           Disable Sun driver (default = try)],
+sun_support=no)
+
+if test x$sun_support != xno; then
+  AC_CHECK_HEADERS(sys/audioio.h)
+  if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
+    AC_DEFINE(DRIVER_SUN)
+  fi
+fi
 
 dnl -----------------------------------------------------------------------
 dnl Other tests
