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

George Joseph asteriskteam at digium.com
Thu Feb 4 18:08:19 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 (#9).

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

build-system: Allow building with static pjproject

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

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...

The default make target will...

* Download an official tarball from pjsip.org for the version specified in
  third_party/verisons.mak.
* Unpack it into the 'source' directory.
* Apply any patches located in the 'patches' directory.
* Run 'configure' with the options defined in 'makeopts'.
* Run 'make dep' to build all the dependencies.
* Run 'make'.

When that's done, change back to the Asterisk top directory and run
'./configure --enable-static-pjproject <your normal options>'

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.

Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
---
M .gitignore
M configure
M configure.ac
M include/asterisk/_private.h
M include/asterisk/autoconfig.h.in
M main/.gitignore
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/0000-config_site.patch
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
18 files changed, 670 insertions(+), 67 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/2072/9
-- 
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: 9
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list