<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/3830/">https://reviewboard.asterisk.org/r/3830/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
 <br />









<p>- Matt Jordan</p>


<br />
<p>On July 18th, 2014, 2:15 p.m. CDT, Sean Bright wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Sean Bright.</div>


<p style="color: grey;"><i>Updated July 18, 2014, 2:15 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When configuring Asterisk to build against a version of pjproject installed in a non-standard location, the checks for "PJSIP Transaction Group Lock Support" and "PJSIP Media Stream Replacement Support" fail.  This is because the secondary checks are not taking the CFLAGS and LIBS returned by the pkg-config check into account.

Given an install of pjproject at /opt/pjsip, the following calls to configure fail:

$ ./configure --with-pjproject=/opt/pjsip
$ PKG_CONFIG_PATH=/opt/pjsip/lib/pkgconfig ./configure

The first fails because the only check we do for pjproject is with pkg-config and the two related checks will not be run because the first fails.  The second incorrectly determines that the two optional features are not present when they are, causing a failure at compile time.  This works:

$ PKG_CONFIG_PATH=/opt/pjsip/lib/pkgconfig ./configure --with-pjproject=/opt/pjsip

Because the primary check succeeds with pkg-config and the optional features succeed using the PJPROJECT_DIR variable setup by the --with-pjproject argument.

While the included diff is certainly not the cleanest, it allows me to configure and compile Asterisk using:

$ PKG_CONFIG_PATH=/opt/pjsip/lib/pkgconfig ./configure</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Configured, compiled.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/configure.ac <span style="color: grey">(418979)</span></li>

 <li>/trunk/configure <span style="color: grey">(UNKNOWN)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/3830/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>