<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7862">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">codec_opus: Check only for presence of libcurl<br><br>We don't need the development headers of libcurl to be able to load the<br>library at runtime. Instead, add a simple library check for libcurl and<br>use that as codec_opus's dependency instead.<br><br>Change-Id: I34357d6fe58679bfdfe5b841391b6a12db770e18<br>---<br>M build_tools/menuselect-deps.in<br>M codecs/codecs.xml<br>M configure<br>M configure.ac<br>4 files changed, 72 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/7862/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in<br>index 1d25145..e00b4f9 100644<br>--- a/build_tools/menuselect-deps.in<br>+++ b/build_tools/menuselect-deps.in<br>@@ -28,6 +28,7 @@<br> URIPARSER=@PBX_URIPARSER@<br> KQUEUE=@PBX_KQUEUE@<br> LDAP=@PBX_LDAP@<br>+LIBCURL=@PBX_LIBCURL@<br> LIBEDIT=@PBX_LIBEDIT@<br> LIBXML2=@PBX_LIBXML2@<br> XMLSTARLET=@PBX_XMLSTARLET@<br>diff --git a/codecs/codecs.xml b/codecs/codecs.xml<br>index c3ccf00..c1b434a 100644<br>--- a/codecs/codecs.xml<br>+++ b/codecs/codecs.xml<br>@@ -3,7 +3,7 @@<br> <depend>xmlstarlet</depend><br> <depend>bash</depend><br> <depend>res_format_attr_opus</depend><br>- <depend>curl</depend><br>+ <depend>libcurl</depend><br> <defaultenabled>no</defaultenabled><br> </member><br> <member name="codec_silk" displayname="Download the SILK codec from Digium. See http://downloads.digium.com/pub/telephony/codec_silk/README."><br>diff --git a/configure b/configure<br>index 2dd0277..3209384 100755<br>--- a/configure<br>+++ b/configure<br>@@ -653,6 +653,7 @@<br> PBX_SO_NOSIGPIPE<br> PBX_MSG_NOSIGNAL<br> PBX_IXJUSER<br>+PBX_LIBCURL<br> GMIME_LIBS<br> GMIME_CFLAGS<br> PBX_SSL_OP_NO_TLSV1_2<br>@@ -1331,6 +1332,7 @@<br> docdir<br> oldincludedir<br> includedir<br>+runstatedir<br> localstatedir<br> sharedstatedir<br> sysconfdir<br>@@ -1513,6 +1515,7 @@<br> sysconfdir='${prefix}/etc'<br> sharedstatedir='${prefix}/com'<br> localstatedir='${prefix}/var'<br>+runstatedir='${localstatedir}/run'<br> includedir='${prefix}/include'<br> oldincludedir='/usr/include'<br> docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'<br>@@ -1765,6 +1768,15 @@<br> | -silent | --silent | --silen | --sile | --sil)<br> silent=yes ;;<br> <br>+ -runstatedir | --runstatedir | --runstatedi | --runstated \<br>+ | --runstate | --runstat | --runsta | --runst | --runs \<br>+ | --run | --ru | --r)<br>+ ac_prev=runstatedir ;;<br>+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \<br>+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \<br>+ | --run=* | --ru=* | --r=*)<br>+ runstatedir=$ac_optarg ;;<br>+<br> -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)<br> ac_prev=sbindir ;;<br> -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \<br>@@ -1902,7 +1914,7 @@<br> for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \<br> datadir sysconfdir sharedstatedir localstatedir includedir \<br> oldincludedir docdir infodir htmldir dvidir pdfdir psdir \<br>- libdir localedir mandir<br>+ libdir localedir mandir runstatedir<br> do<br> eval ac_val=\$$ac_var<br> # Remove trailing slashes.<br>@@ -2055,6 +2067,7 @@<br> --sysconfdir=DIR read-only single-machine data [PREFIX/etc]<br> --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]<br> --localstatedir=DIR modifiable single-machine data [PREFIX/var]<br>+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]<br> --libdir=DIR object code libraries [EPREFIX/lib]<br> --includedir=DIR C header files [PREFIX/include]<br> --oldincludedir=DIR C header files for non-gcc [/usr/include]<br>@@ -14647,7 +14660,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br>+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14693,7 +14706,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br>+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14717,7 +14730,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br>+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14762,7 +14775,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br>+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -14786,7 +14799,7 @@<br> We can't simply define LARGE_OFF_T to be 9223372036854775807,<br> since some C++ compilers masquerading as C compilers<br> incorrectly reject 9223372036854775807. */<br>-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))<br>+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))<br> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721<br> && LARGE_OFF_T % 2147483647 == 1)<br> ? 1 : -1];<br>@@ -32152,6 +32165,52 @@<br> fi<br> done<br> <br>+# We are just looking for the curl library itself, we don't need development<br>+# headers. That check is done elsewhere.<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5<br>+$as_echo_n "checking for curl_version in -lcurl... " >&6; }<br>+if ${ac_cv_lib_curl_curl_version+:} false; then :<br>+ $as_echo_n "(cached) " >&6<br>+else<br>+ ac_check_lib_save_LIBS=$LIBS<br>+LIBS="-lcurl $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 curl_version ();<br>+int<br>+main ()<br>+{<br>+return curl_version ();<br>+ ;<br>+ return 0;<br>+}<br>+_ACEOF<br>+if ac_fn_c_try_link "$LINENO"; then :<br>+ ac_cv_lib_curl_curl_version=yes<br>+else<br>+ ac_cv_lib_curl_curl_version=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_curl_curl_version" >&5<br>+$as_echo "$ac_cv_lib_curl_curl_version" >&6; }<br>+if test "x$ac_cv_lib_curl_curl_version" = xyes; then :<br>+ PBX_LIBCURL=1<br>+else<br>+ PBX_LIBCURL=0<br>+fi<br>+<br>+<br>+<br> <br> if test "x${PBX_HOARD}" != "x1" -a "${USE_HOARD}" != "no"; then<br> pbxlibdir=""<br>diff --git a/configure.ac b/configure.ac<br>index c617cf0..37b9a12 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2526,6 +2526,11 @@<br> fi<br> done<br> <br>+# We are just looking for the curl library itself, we don't need development<br>+# headers. That check is done elsewhere.<br>+AC_CHECK_LIB([curl], [curl_version], [PBX_LIBCURL=1], [PBX_LIBCURL=0])<br>+AC_SUBST([PBX_LIBCURL])<br>+<br> AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])<br> <br> AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h])<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7862">change 7862</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/7862"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I34357d6fe58679bfdfe5b841391b6a12db770e18 </div>
<div style="display:none"> Gerrit-Change-Number: 7862 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>