[Asterisk-code-review] pjproject_bundled: Fix cross-compilation with SSL libs. (asterisk[20])

Friendly Automation asteriskteam at digium.com
Mon Feb 27 14:48:41 CST 2023


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19896 )

Change subject: pjproject_bundled: Fix cross-compilation with SSL libs.
......................................................................

pjproject_bundled: Fix cross-compilation with SSL libs.

Asterisk makefiles auto-detect SSL library availability,
then they assume that pjproject makefiles will also autodetect
an SSL library at the same time, so they do not pass on the
autodetection result to pjproject.

This normally works, except the pjproject makefiles disables
autodetection when cross-compiling.

Fix by explicitly configuring pjproject to use SSL if we
have been told to use it or it was autodetected

ASTERISK-30424 #close

Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9
---
M configure
M third-party/pjproject/configure.m4
2 files changed, 32 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  N A: Looks good to me, but someone else must approve
  Friendly Automation: Approved for Submit




diff --git a/configure b/configure
index a1d3511..0fd4641 100755
--- a/configure
+++ b/configure
@@ -10107,12 +10107,16 @@
 			y|ye|yes)
 			# Not to mention SSL is the default in PJProject and means "autodetect".
 			# In Asterisk, "./configure --with-ssl" means "must be present".
-			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS}"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl"
 			;;
 			*)
 			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl=${with_ssl}"
 			;;
 			esac
+		else
+			if test $PBX_OPENSSL -eq 1 ; then
+				PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl"
+			fi
 		fi
 
 		# Determine if we're doing an out-of-tree build...
diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4
index aa3ff0a..b16738c 100644
--- a/third-party/pjproject/configure.m4
+++ b/third-party/pjproject/configure.m4
@@ -74,12 +74,16 @@
 			y|ye|yes)
 			# Not to mention SSL is the default in PJProject and means "autodetect".
 			# In Asterisk, "./configure --with-ssl" means "must be present".
-			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS}"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl"
 			;;
 			*)
 			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl=${with_ssl}"
 			;;
 			esac
+		else
+			if test $PBX_OPENSSL -eq 1 ; then
+				PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl"
+			fi
 		fi
 
 		# Determine if we're doing an out-of-tree build...

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19896
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9
Gerrit-Change-Number: 19896
Gerrit-PatchSet: 5
Gerrit-Owner: Nick French <nickfrench at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-CC: Nick French <naf at sdf.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230227/96d9df41/attachment.html>


More information about the asterisk-code-review mailing list