From: Nick French Date: Sat, 11 Feb 2023 12:58:43 +0000 (-0600) Subject: pjproject_bundled: Fix cross-compilation with SSL libs. X-Git-Tag: 18.17.0-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7196eb524bbc0944e9a616e39250b01539b3bc96;p=thirdparty%2Fasterisk.git 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 --- diff --git a/configure b/configure index f10b615940..62c340a78b 100755 --- a/configure +++ b/configure @@ -10198,12 +10198,16 @@ $as_echo "configuring" >&6; } 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 aa3ff0a911..b16738c9ac 100644 --- a/third-party/pjproject/configure.m4 +++ b/third-party/pjproject/configure.m4 @@ -74,12 +74,16 @@ AC_DEFUN([_PJPROJECT_CONFIGURE], 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...