<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8445">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Enable OSS Audio Emulation Library in NetBSD.<br><br>ASTERISK-27723<br><br>Change-Id: Ia230d075218551a2f53171c1b37c211914d03268<br>---<br>M configure<br>M configure.ac<br>2 files changed, 107 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/45/8445/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 2456b0c..b373569 100755<br>--- a/configure<br>+++ b/configure<br>@@ -24328,7 +24328,8 @@<br> <br> <br> <br>-# possible places for oss definitions<br>+# possible places for OSS definitions<br>+# Linux<br> <br> if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then<br>    pbxlibdir=""<br>@@ -24385,6 +24386,104 @@<br> fi<br> <br> <br>+# NetBSD: Search for a symbol like _oss_ioctl, to link its OSS Audio Emulation Library.<br>+<br>+if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then<br>+   pbxlibdir=""<br>+   # if --with-OSS=DIR has been specified, use it.<br>+   if test "x${OSS_DIR}" != "x"; then<br>+      if test -d ${OSS_DIR}/lib; then<br>+         pbxlibdir="-L${OSS_DIR}/lib"<br>+      else<br>+         pbxlibdir="-L${OSS_DIR}"<br>+      fi<br>+   fi<br>+<br>+      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>+      CFLAGS="${CFLAGS} "<br>+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5<br>+$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }<br>+if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then :<br>+  $as_echo_n "(cached) " >&6<br>+else<br>+  ac_check_lib_save_LIBS=$LIBS<br>+LIBS="-lossaudio ${pbxlibdir}  $LIBS"<br>+cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>+/* end confdefs.h.  */<br>+<br>+/* Override any GCC internal prototype to avoid an error.<br>+   Use char because int might match the return type of a GCC<br>+   builtin and then its argument prototype would still apply.  */<br>+#ifdef __cplusplus<br>+extern "C"<br>+#endif<br>+char _oss_ioctl ();<br>+int<br>+main ()<br>+{<br>+return _oss_ioctl ();<br>+  ;<br>+  return 0;<br>+}<br>+_ACEOF<br>+if ac_fn_c_try_link "$LINENO"; then :<br>+  ac_cv_lib_ossaudio__oss_ioctl=yes<br>+else<br>+  ac_cv_lib_ossaudio__oss_ioctl=no<br>+fi<br>+rm -f core conftest.err conftest.$ac_objext \<br>+    conftest$ac_exeext conftest.$ac_ext<br>+LIBS=$ac_check_lib_save_LIBS<br>+fi<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5<br>+$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }<br>+if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then :<br>+  AST_OSS_FOUND=yes<br>+else<br>+  AST_OSS_FOUND=no<br>+fi<br>+<br>+      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>+<br>+<br>+   # now check for the header.<br>+   if test "${AST_OSS_FOUND}" = "yes"; then<br>+      OSS_LIB="${pbxlibdir} -lossaudio "<br>+      # if --with-OSS=DIR has been specified, use it.<br>+      if test "x${OSS_DIR}" != "x"; then<br>+         OSS_INCLUDE="-I${OSS_DIR}/include"<br>+      fi<br>+      OSS_INCLUDE="${OSS_INCLUDE} "<br>+<br>+         # check for the header<br>+         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>+         CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"<br>+         ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"<br>+if test "x$ac_cv_header_sys_soundcard_h" = xyes; then :<br>+  OSS_HEADER_FOUND=1<br>+else<br>+  OSS_HEADER_FOUND=0<br>+fi<br>+<br>+<br>+         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br>+<br>+      if test "x${OSS_HEADER_FOUND}" = "x0" ; then<br>+         OSS_LIB=""<br>+         OSS_INCLUDE=""<br>+      else<br>+<br>+         PBX_OSS=1<br>+         cat >>confdefs.h <<_ACEOF<br>+#define HAVE_OSS 1<br>+_ACEOF<br>+<br>+      fi<br>+   fi<br>+fi<br>+<br>+<br>+# FreeBSD<br> <br> if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then<br>    pbxlibdir=""<br>@@ -24441,6 +24540,7 @@<br> fi<br> <br> <br>+# OpenBSD<br> <br> if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then<br>    pbxlibdir=""<br>diff --git a/configure.ac b/configure.ac<br>index 571987c..01eea7c 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2191,9 +2191,14 @@<br> <br> AST_EXT_LIB_CHECK([BLUETOOTH], [bluetooth], [ba2str], [bluetooth/bluetooth.h])<br> <br>-# possible places for oss definitions<br>+# possible places for OSS definitions<br>+# Linux<br> AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [linux/soundcard.h])<br>+# NetBSD: Search for a symbol like _oss_ioctl, to link its OSS Audio Emulation Library.<br>+AST_EXT_LIB_CHECK([OSS], [ossaudio], [_oss_ioctl], [sys/soundcard.h])<br>+# FreeBSD<br> AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [sys/soundcard.h])<br>+# OpenBSD<br> AST_EXT_LIB_CHECK([OSS], [ossaudio], [oss_ioctl_mixer], [soundcard.h])<br> <br> PG_CONFIG=No<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8445">change 8445</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8445"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia230d075218551a2f53171c1b37c211914d03268 </div>
<div style="display:none"> Gerrit-Change-Number: 8445 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>