$OpenBSD: patch-configure_in,v 1.21 2006/02/16 08:25:11 espie Exp $
--- configure.in.orig	Fri Jan 20 18:47:07 2006
+++ configure.in	Wed Feb 15 12:23:08 2006
@@ -164,22 +164,22 @@ AC_DEFUN([KDE_CHECK_OGGVORBIS],
     [:], [have_oggvorbis=no])
 
   KDE_CHECK_LIB(vorbis, vorbis_info_init,
-    [:], [have_oggvorbis=no])
+    [:], [have_oggvorbis=no], -logg -lm)
 
   KDE_CHECK_LIB(vorbisfile, ov_open,
-    [:], [have_oggvorbis=no], -lvorbis -logg)
+    [:], [have_oggvorbis=no], -lvorbis -logg -lm)
 
   KDE_CHECK_LIB(vorbisenc, vorbis_encode_init,
-    [:], [have_oggvorbis=no], -lvorbis -logg)
+    [:], [have_oggvorbis=no], -lvorbis -logg -lm)
 
   KDE_CHECK_LIB(vorbisenc, vorbis_bitrate_addblock,
     [have_vorbis_value=2], [have_vorbis_value=1])
 
   if test "x$have_oggvorbis" = xyes; then
     # for akode/plugins/xiph_decoder/ kioslave/audiocd/plugins/ and krec/ogg_export/
-    VORBIS_LIBS="-lvorbis -logg"
-    VORBISFILE_LIBS="-lvorbisfile"
-    VORBISENC_LIBS="-lvorbisenc"
+    VORBIS_LIBS="-lvorbis -logg -lm"
+    VORBISFILE_LIBS="-lvorbisfile -lm"
+    VORBISENC_LIBS="-lvorbisenc -lm"
 
     # for akode/plugins/xiph_decoder/
     AC_DEFINE_UNQUOTED(HAVE_OGG_VORBIS, 1, [Define if you have ogg/vorbis installed])
@@ -188,7 +188,7 @@ AC_DEFUN([KDE_CHECK_OGGVORBIS],
     AC_DEFINE_UNQUOTED(HAVE_VORBIS, $have_vorbis_value, [Define if you ogg/vorbis installed])
 
     # for mpeglib/
-    OGG_VORBISLIBS="-lvorbisfile -lvorbis -logg"
+    OGG_VORBISLIBS="-lvorbisfile -lvorbis -logg -lm"
     AC_DEFINE(OGG_VORBIS, 1, [Define if you have ogg/vorbis installed])
   fi
 
@@ -889,7 +889,7 @@ KDE_CHECK_HEADER(theora/theora.h,
   [], [have_theora=no])
 
 KDE_CHECK_LIB(theora, theora_info_init,
-  [], [have_theora=no], [-lvorbis -logg])
+  [], [have_theora=no], [-lvorbis -logg -lm])
 ])
 
 AC_ARG_WITH(theora,
@@ -939,7 +939,7 @@ AC_DEFUN([AC_CHECK_LIBOGGFLAC],
   KDE_CHECK_HEADER(OggFLAC/seekable_stream_decoder.h,
   [
      KDE_CHECK_LIB(OggFLAC,OggFLAC__seekable_stream_decoder_process_single,
-	          have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC])
+	          have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC -logg])
 
     ])
   if test "x$have_libOggFLAC" = "xyes"; then
@@ -1285,6 +1285,9 @@ case "$OS_TYPE" in
   NetBSD)
     kde_mpeglib_compiles=yes
     ;;
+  OpenBSD)
+    kde_mpeglib_compiles=yes
+    ;;
   Linux)
     kde_mpeglib_compiles=yes
     ;;
@@ -1312,6 +1315,12 @@ case "$OS_TYPE" in
     AC_DEFINE(OS_Linux,1,[Define if you have linux pthread])
     ;;
 
+  OpenBSD)
+    OS_TYPE="BSD"
+    AC_CHECK_LIB(c_r, pthread_create, [LIBPTHREAD="-pthread"])
+    AC_DEFINE(OS_BSD,1,[Define if you have BSD pthread])
+    ;;
+
   FreeBSD)
     OS_TYPE="BSD"
     AC_DEFINE(OS_BSD,1,[Define if you have BSD pthread])
@@ -1355,7 +1364,7 @@ KDE_MPEGLIB_COMPILES
 
 THIS_LIB_LIBS="-lX11 -lXext -lm ${XVLIBS} ${DGALIBS} "
 THIS_LIB_LIBS="${THIS_LIB_LIBS} ${XVIDMODELIBS} ${SDLLIB} ${CDDALIBS} "
-THIS_LIB_LIBS="${THIS_LIB_LIBS} ${OGG_VORBISLIBS} ${LIBPTHREAD}"
+THIS_LIB_LIBS="${THIS_LIB_LIBS} ${OGG_VORBISLIBS} ${LIBPTHREAD} ${LIBOSSAUDIO}"
 AC_SUBST(THIS_LIB_LIBS)
 dnl =======================================================
 dnl FILE: ./mpeglib/lib/mpegplay/configure.in.in
