From 3fbfa49f74cfe8ff7413f1bf9a48bfeaeab1f4e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 30 Jul 2014 01:38:19 +0200
Subject: Add a case for Haiku in configure.in


diff --git a/configure.in b/configure.in
index 13816fb..5c48cf7 100644
--- a/configure.in
+++ b/configure.in
@@ -390,6 +390,22 @@ case "${host_os}" in
         SHARED_FLAGS=""
         ;;
 
+  haiku* )
+        dnl Haiku configuration
+
+        dnl AC_DEFINE(PA_USE_HAIKU,1)
+        AC_DEFINE(PA_USE_SKELETON,1)
+
+        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
+        # -Werror
+        LIBS="-lmedia"
+
+        SHARED_FLAGS="$LIBS -shared"
+        #CFLAGS="$CFLAGS"
+        OTHER_OBJS="src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o src/common/pa_ringbuffer.o"
+        PADLL="libportaudio.so"
+        ;;
+
   *)
         dnl Unix configuration
 
-- 
2.30.2


From 271d0b016f107c7850bdfeac8c0726b710165447 Mon Sep 17 00:00:00 2001
From: Ken Mays <kmays2000@gmail.com>
Date: Sat, 25 Dec 2021 06:19:07 +0200
Subject: Fix OSS detect for Haiku


diff --git a/configure.in b/configure.in
index 5c48cf7..7941bbf 100644
--- a/configure.in
+++ b/configure.in
@@ -127,7 +127,7 @@ fi
 have_libossaudio=no
 have_oss=no
 if test "x$with_oss" != "xno"; then
-    AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
+    AC_CHECK_HEADERS([private/audio/soundcard.h sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
     if test "x$have_oss" = "xyes"; then
         AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
     fi
-- 
2.30.2

