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

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


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

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:
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




diff --git a/configure b/configure
index f10b615..62c340a 100755
--- a/configure
+++ b/configure
@@ -10198,12 +10198,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/+/19913
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9
Gerrit-Change-Number: 19913
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Nick French <nickfrench at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230227/a6fb17a3/attachment-0001.html>


More information about the asterisk-code-review mailing list