summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-01-13 12:06:50 +0000
committerJoshua Colp <jcolp@digium.com>2015-01-13 12:06:50 +0000
commit056f11ac65fb698ca26fd9a85e1eb81dbc2df381 (patch)
treee065b8c85b89a8fc80f3c0c1644549d945b9bc31 /configure
parent368ecf13bf81d00b5b50d71a849116addf59a3bb (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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430546 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 823e3cbb9..91b3b319d 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 425965 .
+# From configure.ac Revision: 426234 .
# 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.