From 975c9a365f213057cc52dc0f7421bb7dd5c27c72 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Sat, 26 Aug 2017 23:49:25 -0300 Subject: [PATCH] Add configure cases to select OSS for netbsd and freebsd. --- configure.ac | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.ac b/configure.ac index 80c8c79..bd728c3 100644 --- a/configure.ac +++ b/configure.ac @@ -134,6 +134,22 @@ api="$api -D__UNIX_JACK__" AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))]) case $host in + *-*-netbsd*) + AS_IF([test "$api" == ""], [ + AC_MSG_RESULT(using OSS) + api="$api -D__LINUX_OSS__" + LIBS="$LIBS -lossaudio" + AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))]) + ;; + + *-*-freebsd*) + AS_IF([test "$api" == ""], [ + AC_MSG_RESULT(using OSS) + api="$api -D__LINUX_OSS__" + LIBS="$LIBS -lossaudio" + AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))]) + ;; + *-*-linux*) # Look for ALSA flag AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)])