Description: support for kFreeBSD and the Hurd
 On Debian we not only have system with the "linux" kernel, but also with
 alternative kernels (freebsd, hurd), but with the ~same userland tools.
 this patch allows building of 'snd' on such systems.
Origin: Debian
Bug: http://bugs.debian.org/566779
Last-Updated: 2016-02-01
Forwarded: yes
---
 configure.ac |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

--- snd.orig/configure.ac
+++ snd/configure.ac
@@ -657,6 +657,35 @@
     fi
     ;;
 
+    *-*-kfreebsd*|*-*-gnu*)
+        LDSO_FLAGS="-shared"
+        LIBS="$LIBS -lm -ldl"
+        if test "$GCC" = yes ; then
+          SO_FLAGS="-fPIC $SO_FLAGS"
+        fi
+
+        AUDIO_SYSTEM=OSS
+
+        if test "$with_jack" = yes ; then
+               if test "$with_oss" != yes ; then
+                 AUDIO_SYSTEM=JACK
+               fi
+        fi
+
+        case $AUDIO_SYSTEM in
+            JACK)
+                AC_DEFINE(HAVE_JACK_IN_LINUX)
+                AC_DEFINE(HAVE_OSS)
+                AUDIO_LIB="-lsamplerate"
+                ;;
+            OSS)
+                AC_DEFINE(HAVE_OSS)
+                AUDIO_SYSTEM=OSS
+                ;;
+        esac
+        ;;
+
+
   *-*-sunos4*) 
     LIBS="$LIBS -lm"
     ;;
