[Asterisk-code-review] RFC: build-system: Allow building with static pjproject (asterisk[13])

George Joseph asteriskteam at digium.com
Tue Jan 26 16:36:00 CST 2016


Hello Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/2072

to look at the new patch set (#8).

Change subject: RFC: build-system: Allow building with static pjproject
......................................................................

RFC: build-system: Allow building with static pjproject

Background here:
http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html

*** For the time being, to facilitate testing and provide a transition
period, the default behavior is still to dynamically link
to the system-installed shared pjproject libraries.

Static link:

New ./configure option:

--enable-static-pjproject
	If --with-pjproject=PATH was specified, it is assumed that PATH
	points to the pjproject source directory.  If --with-pjproject
	was specified without PATH or not specified at all, PATH is
	assumed to be ./third_party/pjproject/source. Regardless, the
	directory must contain a fully built source tree.

To build, cd to third_party/pjproject and type 'make'.  The Makefile will
download an official tarball from pjsip.org, unpack it into the 'source'
subdirectory, apply any patches located in the 'patches' directory, run
configure with the correct options, do a 'make dep' and a 'make'.  The
default is not to enable shared libraries but it doesn't hurt anything
if the shared libraries are also built.

When that's done, cd to the Asterisk top directory, run './configure' with
the --enable-static-pjproject option and proceed as normal.

Implementation Notes:

The third_party/pjproject directory was created and makefiles were added
that download, configure and build pjproject.  None of the pjproject source
is checked in of course.

configure.ac was modified to process the new option and perform appropriate
checks.

libasteriskpj.so was created and now exposes all pjproject APIs.  It is
created and used just like libasteriskssl.  The build grabs the symbols from
the libpj*.a files, creates the .exports file and links it.  If
HAVE_PJPROJECT_STATIC is not defined, it doesn't get built and ast_pj_init
is a no-op.

Modules should continue to depend on pjproject if they use pjproject APIs
directly.  They should not care about the implementation.  No changes to
any res_pjsip modules were made.

REMINDER:  This is an RFC only at this time.

Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
---
M .gitignore
M configure
M configure.ac
M include/asterisk/_private.h
M include/asterisk/autoconfig.h.in
M main/Makefile
M main/asterisk.c
A main/libasteriskpj.c
M makeopts.in
A third_party/Makefile
A third_party/pjproject/.gitignore
A third_party/pjproject/Makefile
A third_party/pjproject/apply_patches
A third_party/pjproject/patches/0001-2.4.5-fix-for-tls-async-ops.patch
A third_party/pjproject/patches/0002-no_third_party.patch
A third_party/versions.mak
16 files changed, 677 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/2072/8
-- 
To view, visit https://gerrit.asterisk.org/2072
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019



More information about the asterisk-code-review mailing list