[asterisk-commits] pjproject bundled: Fix issue with libasteriskpj needing lib... (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 7 11:55:32 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4289 )

Change subject: pjproject_bundled:  Fix issue with libasteriskpj needing libresample
......................................................................


pjproject_bundled:  Fix issue with libasteriskpj needing libresample

libresample is only needed by pjproject if we're building pjsua, which
we only do if TEST_FRAMEWORK is selected.  It's required by pjsua to
process audio which is needed by some testsuite tests.  Unfortunately,
pjproject relies on a newer version of libresample than the version
that ships by most distros so we need to compile the version that's
bundled with pjproject.  Since we only need it for pjsua, we DON'T want
it's symbols exposed when we actually build asterisk.

There was a problem however... TEST_FRAMEWORK is only known AFTER we've
already run ./configure on both asterisk and pjproject but pjproject's
./configure needs to test it to know whether to set up to build
libresample or not.  The previous way of figuring this out was to
always tell ./configure "yes" but not actually build the library.  This
caused an issue where building libasteriskpj was being told to include
libresample but it wasn't actually there.

The solution is to still do a default pjproject configure during an
asterisk ./configure but if makeopts or menuselect.makeopts changes
subsequently, we now reconfigure pjproject, taking into account the
current state of TEST_FRAMEWORK.  Previously, if makeopts or
menuselect.makeopts changed, only a recompile of pjproject was done.

Change-Id: I9b5d84c61384a3ae07fe30e85c49698378cc4685
---
M third-party/pjproject/Makefile
M third-party/pjproject/Makefile.rules
2 files changed, 11 insertions(+), 7 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index 209e681..106938b 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -103,7 +103,12 @@
 	$(ECHO_PREFIX) Applying custom include file $<
 	$(CMD_PREFIX) cp -f $< source/pjlib/include/pj/
 
-source/build.mak: Makefile.rules source/version.mak source/user.mak $(addprefix source/pjlib/include/pj/,$(notdir $(wildcard patches/*.h)))
+.rebuild_needed: $(wildcard ../../makeopts) $(wildcard ../../menuselect.makeopts)
+	$(ECHO_PREFIX) Rebuilding
+	$(CMD_PREFIX) $(MAKE) clean $(REALLY_QUIET)
+	@touch  .rebuild_needed
+
+source/build.mak: Makefile.rules source/version.mak source/user.mak $(addprefix source/pjlib/include/pj/,$(notdir $(wildcard patches/*.h))) .rebuild_needed
 	$(ECHO_PREFIX) Configuring with $(PJPROJECT_CONFIG_OPTS)
 	$(CMD_PREFIX) (cd source ; ./aconfigure $(QUIET_CONFIGURE) $(PJPROJECT_CONFIG_OPTS))
 
@@ -115,12 +120,7 @@
 echo_cflags: source/build.mak
 	@echo $(PJ_CFLAGS)
 
-.rebuild_needed: ../../makeopts ../../menuselect.makeopts
-	$(ECHO_PREFIX) Rebuilding
-	$(CMD_PREFIX) $(MAKE) clean $(REALLY_QUIET)
-	@touch  .rebuild_needed
-
-libpj%.a: .rebuild_needed source/build.mak
+libpj%.a: source/build.mak
 	$(ECHO_PREFIX) Compiling lib $(@F)
 	$(CMD_PREFIX) $(MAKE) -C $(dir $(shell dirname $@))/build $(@F) $(REALLY_QUIET)
 	- at rm -rf .rebuild_needed
diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules
index 531a259..ae4b6a5 100644
--- a/third-party/pjproject/Makefile.rules
+++ b/third-party/pjproject/Makefile.rules
@@ -28,6 +28,10 @@
 	--without-external-pa \
 	--without-external-srtp
 
+ifeq ($(findstring TEST_FRAMEWORK,$(MENUSELECT_CFLAGS)),)
+    PJPROJECT_CONFIG_OPTS += --disable-resample --disable-g711-codec
+endif
+
 ifeq ($(shell uname -s),Linux)
     PJPROJECT_CONFIG_OPTS +=  --enable-epoll
 endif

-- 
To view, visit https://gerrit.asterisk.org/4289
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b5d84c61384a3ae07fe30e85c49698378cc4685
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list