[svn-commits] qwell: branch qwell/pjsip-shared-libs r382217 - in /team/qwell/pjsip-shared-l...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 27 16:11:23 CST 2013


Author: qwell
Date: Wed Feb 27 16:11:20 2013
New Revision: 382217

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382217
Log:
Switch back to pkg-config method of finding pjproject.

It would be unlikely for one lib to exist, and not another.

Modified:
    team/qwell/pjsip-shared-libs/build_tools/menuselect-deps.in
    team/qwell/pjsip-shared-libs/configure
    team/qwell/pjsip-shared-libs/configure.ac
    team/qwell/pjsip-shared-libs/include/asterisk/autoconfig.h.in
    team/qwell/pjsip-shared-libs/makeopts.in
    team/qwell/pjsip-shared-libs/res/res_rtp_asterisk.c

Modified: team/qwell/pjsip-shared-libs/build_tools/menuselect-deps.in
URL: http://svnview.digium.com/svn/asterisk/team/qwell/pjsip-shared-libs/build_tools/menuselect-deps.in?view=diff&rev=382217&r1=382216&r2=382217
==============================================================================
--- team/qwell/pjsip-shared-libs/build_tools/menuselect-deps.in (original)
+++ team/qwell/pjsip-shared-libs/build_tools/menuselect-deps.in Wed Feb 27 16:11:20 2013
@@ -44,10 +44,7 @@
 OSPTK=@PBX_OSPTK@
 OSS=@PBX_OSS@
 PGSQL=@PBX_PGSQL@
-PJLIB=@PBX_PJLIB@
-PJLIB_UTIL=@PBX_PJLIB_UTIL@
-PJMEDIA=@PBX_PJMEDIA@
-PJNATH=@PBX_PJNATH@
+PJPROJECT=@PBX_PJPROJECT@
 POPT=@PBX_POPT@
 PORTAUDIO=@PBX_PORTAUDIO@
 PRI=@PBX_PRI@

Modified: team/qwell/pjsip-shared-libs/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/qwell/pjsip-shared-libs/configure.ac?view=diff&rev=382217&r1=382216&r2=382217
==============================================================================
--- team/qwell/pjsip-shared-libs/configure.ac (original)
+++ team/qwell/pjsip-shared-libs/configure.ac Wed Feb 27 16:11:20 2013
@@ -427,10 +427,7 @@
 AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
 AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
 AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
-AST_EXT_LIB_SETUP([PJLIB], [PJLIB], [pj])
-AST_EXT_LIB_SETUP([PJLIB_UTIL], [PJLIB-Util], [pjlib-util])
-AST_EXT_LIB_SETUP([PJMEDIA], [PJMEDIA], [pjmedia])
-AST_EXT_LIB_SETUP([PJNATH], [PJSIP NAT Helper], [pjnath])
+AST_EXT_LIB_SETUP([PJPROJECT], [PJPROJECT], [pjproject])
 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
 AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
@@ -1991,10 +1988,7 @@
    fi
 fi
 
-AST_EXT_LIB_CHECK([PJLIB], [pj], [pj_init], [pjlib.h], [], [-DPJ_AUTOCONF=1])
-AST_EXT_LIB_CHECK([PJLIB_UTIL], [pjlib-util], [pjlib_util_init], [pjlib-util.h], [], [-DPJ_AUTOCONF=1])
-AST_EXT_LIB_CHECK([PJMEDIA], [pjmedia], [pjmedia_session_create], [pjmedia.h], [], [-DPJ_AUTOCONF=1])
-AST_EXT_LIB_CHECK([PJNATH], [pjnath], [pjnath_init], [pjnath.h], [], [-DPJ_AUTOCONF=1])
+AST_PKG_CONFIG_CHECK([PJPROJECT], [libpjproject])
 
 AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
 

Modified: team/qwell/pjsip-shared-libs/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/qwell/pjsip-shared-libs/include/asterisk/autoconfig.h.in?view=diff&rev=382217&r1=382216&r2=382217
==============================================================================
--- team/qwell/pjsip-shared-libs/include/asterisk/autoconfig.h.in (original)
+++ team/qwell/pjsip-shared-libs/include/asterisk/autoconfig.h.in Wed Feb 27 16:11:20 2013
@@ -294,7 +294,7 @@
 /* Define if your system has the GLOB_NOMAGIC headers. */
 #undef HAVE_GLOB_NOMAGIC
 
-/* Define to 1 if you have the GMime library. */
+/* Define if your system has the GMIME libraries. */
 #undef HAVE_GMIME
 
 /* Define to indicate the GSM library */
@@ -306,7 +306,7 @@
 /* Define to indicate that gsm.h has no prefix for its location */
 #undef HAVE_GSM_HEADER
 
-/* Define to 1 if you have the gtk2 library. */
+/* Define if your system has the GTK2 libraries. */
 #undef HAVE_GTK2
 
 /* Define to 1 if you have the Hoard Memory Allocator library. */
@@ -324,7 +324,7 @@
 /* Define to 1 if you have the Iksemel Jabber library. */
 #undef HAVE_IKSEMEL
 
-/* Define to 1 if you have the System iLBC library. */
+/* Define if your system has the ILBC libraries. */
 #undef HAVE_ILBC
 
 /* Define if your system has the UW IMAP Toolkit c-client library. */
@@ -376,7 +376,7 @@
 /* Define to 1 if you have the OpenLDAP library. */
 #undef HAVE_LDAP
 
-/* Define to 1 if you have the NetBSD Editline library library. */
+/* Define if your system has the LIBEDIT libraries. */
 #undef HAVE_LIBEDIT
 
 /* Define to 1 if you have the <libintl.h> header file. */
@@ -551,17 +551,8 @@
 /* Define to indicate presence of the pg_encoding_to_char API. */
 #undef HAVE_PGSQL_pg_encoding_to_char
 
-/* Define to 1 if you have the PJLIB library. */
-#undef HAVE_PJLIB
-
-/* Define to 1 if you have the PJLIB-Util library. */
-#undef HAVE_PJLIB_UTIL
-
-/* Define to 1 if you have the PJMEDIA library. */
-#undef HAVE_PJMEDIA
-
-/* Define to 1 if you have the PJSIP NAT Helper library. */
-#undef HAVE_PJNATH
+/* Define if your system has the PJPROJECT libraries. */
+#undef HAVE_PJPROJECT
 
 /* Define to 1 if your system defines IP_PKTINFO. */
 #undef HAVE_PKTINFO
@@ -863,19 +854,19 @@
 /* Define to 1 if you have the `strtoq' function. */
 #undef HAVE_STRTOQ
 
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
 
-/* Define to 1 if `uid' is member of `struct sockpeercred'. */
+/* Define to 1 if `uid' is a member of `struct sockpeercred'. */
 #undef HAVE_STRUCT_SOCKPEERCRED_UID
 
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
-/* Define to 1 if `cr_uid' is member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_CR_UID
 
-/* Define to 1 if `uid' is member of `struct ucred'. */
+/* Define to 1 if `uid' is a member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_UID
 
 /* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1153,11 +1144,11 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
-
-/* Define to 1 if the C compiler supports function prototypes. */
-#undef PROTOTYPES
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1177,11 +1168,6 @@
 
 /* Define to the type of arg 5 for `select'. */
 #undef SELECT_TYPE_ARG5
-
-/* Define to 1 if the `setvbuf' function takes the buffering type as its
-   second argument and the buffer pointer as the third, as on System V before
-   release 3. */
-#undef SETVBUF_REVERSED
 
 /* The size of `char *', as computed by sizeof. */
 #undef SIZEOF_CHAR_P
@@ -1218,23 +1204,33 @@
 /* Define to a type of the same size as fd_set.fds_bits[[0]] */
 #undef TYPEOF_FD_SET_FDS_BITS
 
-/* Define to 1 if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
+/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-
-/* Define to 1 if running on Darwin. */
-#undef _DARWIN_UNLIMITED_SELECT
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to 1 if running on Darwin. */
+#undef _DARWIN_UNLIMITED_SELECT
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
 
 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
 #undef _LARGEFILE_SOURCE
@@ -1251,20 +1247,6 @@
 
 /* Define to 1 if you need to in order for `stat' and other things to work. */
 #undef _POSIX_SOURCE
-
-/* Enable extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
 
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const

Modified: team/qwell/pjsip-shared-libs/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/team/qwell/pjsip-shared-libs/makeopts.in?view=diff&rev=382217&r1=382216&r2=382217
==============================================================================
--- team/qwell/pjsip-shared-libs/makeopts.in (original)
+++ team/qwell/pjsip-shared-libs/makeopts.in Wed Feb 27 16:11:20 2013
@@ -218,17 +218,8 @@
 PGSQL_INCLUDE=@PGSQL_INCLUDE@
 PGSQL_LIB=@PGSQL_LIB@
 
-PJLIB_INCLUDE=@PJLIB_INCLUDE@
-PJLIB_LIB=@PJLIB_LIB@
-
-PJLIB_UTIL_INCLUDE=@PJLIB_UTIL_INCLUDE@
-PJLIB_UTIL_LIB=@PJLIB_UTIL_LIB@
-
-PJMEDIA_INCLUDE=@PJMEDIA_INCLUDE@
-PJMEDIA_LIB=@PJMEDIA_LIB@
-
-PJNATH_INCLUDE=@PJNATH_INCLUDE@
-PJNATH_LIB=@PJNATH_LIB@
+PJPROJECT_INCLUDE=@PJPROJECT_INCLUDE@
+PJPROJECT_LIB=@PJPROJECT_LIB@
 
 POPT_INCLUDE=@POPT_INCLUDE@
 POPT_LIB=@POPT_LIB@

Modified: team/qwell/pjsip-shared-libs/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/pjsip-shared-libs/res/res_rtp_asterisk.c?view=diff&rev=382217&r1=382216&r2=382217
==============================================================================
--- team/qwell/pjsip-shared-libs/res/res_rtp_asterisk.c (original)
+++ team/qwell/pjsip-shared-libs/res/res_rtp_asterisk.c Wed Feb 27 16:11:20 2013
@@ -29,7 +29,7 @@
  */
 
 /*** MODULEINFO
-	<use type="external">pjnath</use>
+	<use type="external">pjproject</use>
 	<support_level>core</support_level>
  ***/
 
@@ -47,14 +47,14 @@
 #include <openssl/bio.h>
 #endif
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 /* Asterisk discourages the use of bzero in favor of memset, in fact if you try to use bzero it will tell you to use memset. As a result bzero has to be undefined
  * here since it is used internally by pjlib. The only other option would be to modify pjlib... which won't happen. */
 #undef bzero
 #define bzero bzero
-#include "pjlib.h"
-#include "pjlib-util.h"
-#include "pjnath.h"
+#include <pjlib.h>
+#include <pjlib-util.h>
+#include <pjnath.h>
 #endif
 
 #include "asterisk/stun.h"
@@ -136,7 +136,7 @@
 #endif
 static int strictrtp = DEFAULT_STRICT_RTP; /*< Only accept RTP frames from a defined source. If we receive an indication of a changing source, enter learning mode. */
 static int learning_min_sequential = DEFAULT_LEARNING_MIN_SEQUENTIAL; /*< Number of sequential RTP frames needed from a single source during learning mode to accept new source. */
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 static int icesupport = DEFAULT_ICESUPPORT;
 static struct sockaddr_in stunaddr;
 static pj_str_t turnaddr;
@@ -256,7 +256,7 @@
 	ast_mutex_t lock;           /*!< Lock for synchronization purposes */
 	ast_cond_t cond;            /*!< Condition for signaling */
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	pj_ice_sess *ice;           /*!< ICE session */
 	pj_turn_sock *turn_rtp;     /*!< RTP TURN relay */
 	pj_turn_sock *turn_rtcp;    /*!< RTCP TURN relay */
@@ -403,7 +403,7 @@
 /*! \brief Helper function which updates an ast_sockaddr with the candidate used for the component */
 static void update_address_with_ice_candidate(struct ast_rtp *rtp, int component, struct ast_sockaddr *cand_address)
 {
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	char address[PJ_INET6_ADDRSTRLEN];
 
 	if (!rtp->ice || (component < 1) || !rtp->ice->comp[component - 1].valid_check) {
@@ -415,7 +415,7 @@
 #endif
 }
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 /*! \brief Destructor for locally created ICE candidates */
 static void ast_rtp_ice_candidate_destroy(void *obj)
 {
@@ -1029,7 +1029,7 @@
 	.stop = ast_rtp_stop,
 	.qos = ast_rtp_qos_set,
 	.sendcng = ast_rtp_sendcng,
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	.ice = &ast_rtp_ice,
 #endif
 #ifdef HAVE_OPENSSL_SRTP
@@ -1038,7 +1038,7 @@
 #endif
 };
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 static void ast_rtp_on_ice_rx_data(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
 {
 	struct ast_rtp *rtp = ice->user_data;
@@ -1448,7 +1448,7 @@
 	}
 #endif
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	if (rtp->ice) {
 		pj_str_t combined = pj_str(ast_sockaddr_stringify(sa));
 		pj_sockaddr address;
@@ -1506,7 +1506,7 @@
 		return -1;
 	}
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	if (rtp->ice) {
 		pj_thread_register_check();
 
@@ -1639,7 +1639,7 @@
 	return probation;
 }
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 static void rtp_add_candidates_to_ice(struct ast_rtp_instance *instance, struct ast_rtp *rtp, struct ast_sockaddr *addr, int port, int component,
 				      int transport, const pj_turn_sock_cb *turn_cb, pj_turn_sock **turn_sock)
 {
@@ -1712,7 +1712,7 @@
 {
 	struct ast_rtp *rtp = NULL;
 	int x, startplace;
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	pj_stun_config stun_config;
 	pj_str_t ufrag, passwd;
 #endif
@@ -1772,7 +1772,7 @@
 		}
 	}
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	pj_thread_register_check();
 
 	pj_stun_config_init(&stun_config, &cachingpool.factory, 0, ioqueue, timerheap);
@@ -1835,7 +1835,7 @@
 		ast_free(rtp->red);
 	}
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	pj_thread_register_check();
 
 	/* Destroy the ICE session if being used */
@@ -3920,7 +3920,7 @@
 			ast_debug(1, "Setup RTCP on RTP instance '%p'\n", instance);
 			rtp->rtcp->schedid = -1;
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 			if (rtp->ice) {
 				rtp_add_candidates_to_ice(instance, rtp, &rtp->rtcp->us, ast_sockaddr_port(&rtp->rtcp->us), COMPONENT_RTCP, TRANSPORT_SOCKET_RTCP,
 							  &ast_rtp_turn_rtcp_sock_cb, &rtp->turn_rtcp);
@@ -4402,7 +4402,7 @@
 	 * the pool this will cause a small memory leak.
 	 */
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	icesupport = DEFAULT_ICESUPPORT;
 	turnport = DEFAULT_TURN_PORT;
 	memset(&stunaddr, 0, sizeof(stunaddr));
@@ -4460,7 +4460,7 @@
 					DEFAULT_LEARNING_MIN_SEQUENTIAL);
 			}
 		}
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 		if ((s = ast_variable_retrieve(cfg, "general", "icesupport"))) {
 			icesupport = ast_true(s);
 		}
@@ -4508,7 +4508,7 @@
 
 static int load_module(void)
 {
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	pj_lock_t *lock;
 
 	pj_log_set_level(0);
@@ -4559,7 +4559,7 @@
 #endif
 
 	if (ast_rtp_engine_register(&asterisk_rtp_engine)) {
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 		worker_terminate = 1;
 		pj_thread_join(thread);
 		pj_thread_destroy(thread);
@@ -4570,7 +4570,7 @@
 	}
 
 	if (ast_cli_register_multiple(cli_rtp, ARRAY_LEN(cli_rtp))) {
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 		worker_terminate = 1;
 		pj_thread_join(thread);
 		pj_thread_destroy(thread);
@@ -4591,7 +4591,7 @@
 	ast_rtp_engine_unregister(&asterisk_rtp_engine);
 	ast_cli_unregister_multiple(cli_rtp, ARRAY_LEN(cli_rtp));
 
-#ifdef HAVE_PJNATH
+#ifdef HAVE_PJPROJECT
 	worker_terminate = 1;
 
 	pj_thread_register_check();




More information about the svn-commits mailing list