summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-01-13 12:09:45 +0000
committerJoshua Colp <jcolp@digium.com>2015-01-13 12:09:45 +0000
commit0e631a541dc8881861ded54a2bd66227e2233a57 (patch)
treea8adf954adbe984c8b07bb64e4d83da9318a6268 /configure
parent4dd6b6ff5974d87fd754e47962472437a784736b (diff)
chan_pjsip: Add configure check for 'pjsip_get_dest_info' function.
The 'pjsip_get_dest_info' function is used to determine if the signaling transport of the dialog is secure or not. This function was added in PJSIP 2.3 and does not exist in earlier versions. This configure check allows Asterisk to build and run with older versions at the loss of the 'secure' argument for the PJSIP CHANNEL dialplan function. Usage of this argument will require upgrading to PJSIP 2.3. ASTERISK-24665 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/4329/ ........ Merged revisions 430546 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure123
1 files changed, 122 insertions, 1 deletions
diff --git a/configure b/configure
index eb4074442..afe59dcd9 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 425966 .
+# From configure.ac Revision: 426235 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for asterisk trunk.
#
@@ -902,6 +902,10 @@ PBX_PORTAUDIO
PORTAUDIO_DIR
PORTAUDIO_INCLUDE
PORTAUDIO_LIB
+PBX_PJSIP_GET_DEST_INFO
+PJSIP_GET_DEST_INFO_DIR
+PJSIP_GET_DEST_INFO_INCLUDE
+PJSIP_GET_DEST_INFO_LIB
PBX_PJSIP_REPLACE_MEDIA_STREAM
PJSIP_REPLACE_MEDIA_STREAM_DIR
PJSIP_REPLACE_MEDIA_STREAM_INCLUDE
@@ -10270,6 +10274,18 @@ PBX_PJSIP_REPLACE_MEDIA_STREAM=0
+PJSIP_GET_DEST_INFO_DESCRIP="pjsip_get_dest_info support"
+PJSIP_GET_DEST_INFO_OPTION=pjsip
+PJSIP_GET_DEST_INFO_DIR=${PJPROJECT_DIR}
+
+PBX_PJSIP_GET_DEST_INFO=0
+
+
+
+
+
+
+
PORTAUDIO_DESCRIP="PortAudio"
PORTAUDIO_OPTION="portaudio"
PBX_PORTAUDIO=0
@@ -23985,6 +24001,111 @@ LIBS="${saved_libs}"
CPPFLAGS="${saved_cppflags}"
+if test "x${PBX_PJSIP_GET_DEST_INFO}" != "x1" -a "${USE_PJSIP_GET_DEST_INFO}" != "no"; then
+ pbxlibdir=""
+ # if --with-PJSIP_GET_DEST_INFO=DIR has been specified, use it.
+ if test "x${PJSIP_GET_DEST_INFO_DIR}" != "x"; then
+ if test -d ${PJSIP_GET_DEST_INFO_DIR}/lib; then
+ pbxlibdir="-L${PJSIP_GET_DEST_INFO_DIR}/lib"
+ else
+ pbxlibdir="-L${PJSIP_GET_DEST_INFO_DIR}"
+ fi
+ fi
+ pbxfuncname="pjsip_get_dest_info"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_PJSIP_GET_DEST_INFO_FOUND=yes
+ else
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
+ as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
+$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpjsip ${pbxlibdir} $PJPROJECT_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ AST_PJSIP_GET_DEST_INFO_FOUND=yes
+else
+ AST_PJSIP_GET_DEST_INFO_FOUND=no
+fi
+
+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+ fi
+
+ # now check for the header.
+ if test "${AST_PJSIP_GET_DEST_INFO_FOUND}" = "yes"; then
+ PJSIP_GET_DEST_INFO_LIB="${pbxlibdir} -lpjsip $PJPROJECT_LIBS"
+ # if --with-PJSIP_GET_DEST_INFO=DIR has been specified, use it.
+ if test "x${PJSIP_GET_DEST_INFO_DIR}" != "x"; then
+ PJSIP_GET_DEST_INFO_INCLUDE="-I${PJSIP_GET_DEST_INFO_DIR}/include"
+ fi
+ PJSIP_GET_DEST_INFO_INCLUDE="${PJSIP_GET_DEST_INFO_INCLUDE} $PJPROJECT_CFLAGS"
+ if test "xpjsip.h" = "x" ; then # no header, assume found
+ PJSIP_GET_DEST_INFO_HEADER_FOUND="1"
+ else # check for the header
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${PJSIP_GET_DEST_INFO_INCLUDE}"
+ ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
+if test "x$ac_cv_header_pjsip_h" = xyes; then :
+ PJSIP_GET_DEST_INFO_HEADER_FOUND=1
+else
+ PJSIP_GET_DEST_INFO_HEADER_FOUND=0
+fi
+
+
+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
+ fi
+ if test "x${PJSIP_GET_DEST_INFO_HEADER_FOUND}" = "x0" ; then
+ PJSIP_GET_DEST_INFO_LIB=""
+ PJSIP_GET_DEST_INFO_INCLUDE=""
+ else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ PJSIP_GET_DEST_INFO_LIB=""
+ fi
+ PBX_PJSIP_GET_DEST_INFO=1
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PJSIP_GET_DEST_INFO 1
+_ACEOF
+
+ fi
+ fi
+fi
+
+
+
+
if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then
pbxlibdir=""
# if --with-POPT=DIR has been specified, use it.