<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8436">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Enable PortAudio in NetBSD.<br><br>In NetBSD, PortAudio 1 is still the default version. PortAudio 2 can be<br>installed side by side but gets placed in a 'portaudio2' subdirectory. To<br>find PortAudio 2 even in a subdirectory, the tool pkg-config is queried via<br>AST_PKG_CONFIG_CHECK. For those platforms, which do not list PowerAudio 2<br>via pkg-config, the previous check remains and is executed thereafter.<br><br>ASTERISK-27721<br><br>Change-Id: I4175500126909ad1b181fff8e11bb4a3a6ae4fa9<br>---<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>3 files changed, 98 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 18609ca..fec2c65 100755<br>--- a/configure<br>+++ b/configure<br>@@ -657,6 +657,8 @@<br> GMIME_CFLAGS<br> PBX_SSL_OP_NO_TLSV1_2<br> PBX_SSL_OP_NO_TLSV1_1<br>+PORTAUDIO_LIBS<br>+PORTAUDIO_CFLAGS<br> PYTHONDEV_LIBS<br> PYTHONDEV_CFLAGS<br> PYTHONDEV_INCLUDE<br>@@ -1485,6 +1487,8 @@<br> PJPROJECT_LIBS<br> PYTHONDEV_CFLAGS<br> PYTHONDEV_LIBS<br>+PORTAUDIO_CFLAGS<br>+PORTAUDIO_LIBS<br> GMIME_CFLAGS<br> GMIME_LIBS<br> GTK2_CFLAGS<br>@@ -2244,6 +2248,10 @@<br>               C compiler flags for PYTHONDEV, overriding pkg-config<br>   PYTHONDEV_LIBS<br>               linker flags for PYTHONDEV, overriding pkg-config<br>+  PORTAUDIO_CFLAGS<br>+              C compiler flags for PORTAUDIO, overriding pkg-config<br>+  PORTAUDIO_LIBS<br>+              linker flags for PORTAUDIO, overriding pkg-config<br>   GMIME_CFLAGS<br>               C compiler flags for GMIME, overriding pkg-config<br>   GMIME_LIBS  linker flags for GMIME, overriding pkg-config<br>@@ -26345,6 +26353,94 @@<br> <br> <br> <br>+   if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then<br>+<br>+pkg_failed=no<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PORTAUDIO" >&5<br>+$as_echo_n "checking for PORTAUDIO... " >&6; }<br>+<br>+if test -n "$PORTAUDIO_CFLAGS"; then<br>+    pkg_cv_PORTAUDIO_CFLAGS="$PORTAUDIO_CFLAGS"<br>+ elif test -n "$PKG_CONFIG"; then<br>+    if test -n "$PKG_CONFIG" && \<br>+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"portaudio-2.0\""; } >&5<br>+  ($PKG_CONFIG --exists --print-errors "portaudio-2.0") 2>&5<br>+  ac_status=$?<br>+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5<br>+  test $ac_status = 0; }; then<br>+  pkg_cv_PORTAUDIO_CFLAGS=`$PKG_CONFIG --cflags "portaudio-2.0" 2>/dev/null`<br>+                      test "x$?" != "x0" && pkg_failed=yes<br>+else<br>+  pkg_failed=yes<br>+fi<br>+ else<br>+    pkg_failed=untried<br>+fi<br>+if test -n "$PORTAUDIO_LIBS"; then<br>+    pkg_cv_PORTAUDIO_LIBS="$PORTAUDIO_LIBS"<br>+ elif test -n "$PKG_CONFIG"; then<br>+    if test -n "$PKG_CONFIG" && \<br>+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"portaudio-2.0\""; } >&5<br>+  ($PKG_CONFIG --exists --print-errors "portaudio-2.0") 2>&5<br>+  ac_status=$?<br>+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5<br>+  test $ac_status = 0; }; then<br>+  pkg_cv_PORTAUDIO_LIBS=`$PKG_CONFIG --libs "portaudio-2.0" 2>/dev/null`<br>+                      test "x$?" != "x0" && pkg_failed=yes<br>+else<br>+  pkg_failed=yes<br>+fi<br>+ else<br>+    pkg_failed=untried<br>+fi<br>+<br>+<br>+<br>+if test $pkg_failed = yes; then<br>+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+<br>+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then<br>+        _pkg_short_errors_supported=yes<br>+else<br>+        _pkg_short_errors_supported=no<br>+fi<br>+        if test $_pkg_short_errors_supported = yes; then<br>+               PORTAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "portaudio-2.0" 2>&1`<br>+        else<br>+                PORTAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "portaudio-2.0" 2>&1`<br>+        fi<br>+ # Put the nasty error message in config.log where it belongs<br>+ echo "$PORTAUDIO_PKG_ERRORS" >&5<br>+<br>+<br>+            PBX_PORTAUDIO=0<br>+<br>+<br>+elif test $pkg_failed = untried; then<br>+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+<br>+            PBX_PORTAUDIO=0<br>+<br>+<br>+else<br>+      PORTAUDIO_CFLAGS=$pkg_cv_PORTAUDIO_CFLAGS<br>+    PORTAUDIO_LIBS=$pkg_cv_PORTAUDIO_LIBS<br>+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+<br>+            PBX_PORTAUDIO=1<br>+            PORTAUDIO_INCLUDE="$PORTAUDIO_CFLAGS"<br>+            PORTAUDIO_LIB="$PORTAUDIO_LIBS"<br>+<br>+$as_echo "#define HAVE_PORTAUDIO 1" >>confdefs.h<br>+<br>+<br>+fi<br>+   fi<br>+<br>+<br> if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then<br>    pbxlibdir=""<br>    # if --with-PORTAUDIO=DIR has been specified, use it.<br>diff --git a/configure.ac b/configure.ac<br>index a59646c..c962c84 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2294,6 +2294,7 @@<br> <br> AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])<br> <br>+AST_PKG_CONFIG_CHECK([PORTAUDIO], [portaudio-2.0])<br> AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])<br> <br> AST_EXT_LIB_CHECK([PRI], [pri], [pri_connected_line_update], [libpri.h])<br>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in<br>index 0611461..6d747ae 100644<br>--- a/include/asterisk/autoconfig.h.in<br>+++ b/include/asterisk/autoconfig.h.in<br>@@ -663,7 +663,7 @@<br> /* Define to 1 if you have the popt library. */<br> #undef HAVE_POPT<br> <br>-/* Define to 1 if you have the PortAudio library. */<br>+/* Define if your system has the PORTAUDIO libraries. */<br> #undef HAVE_PORTAUDIO<br> <br> /* Define to 1 if you have the `pow' function. */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8436">change 8436</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/8436"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I4175500126909ad1b181fff8e11bb4a3a6ae4fa9 </div>
<div style="display:none"> Gerrit-Change-Number: 8436 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>