]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pjproject_bundled: fix cross-compilation with ssl libs
authorNick French <nickfrench@gmail.com>
Sat, 11 Feb 2023 12:58:43 +0000 (06:58 -0600)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Mon, 27 Feb 2023 20:49:28 +0000 (14:49 -0600)
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

configure
third-party/pjproject/configure.m4

index 70a368e43a7d09aef3dbee59c87266516be67e6f..e155e245616e2c42845f640704337ab2da667216 100755 (executable)
--- a/configure
+++ b/configure
@@ -10093,12 +10093,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...
index aa3ff0a911bd068e85b4f36a7ae4f05ba09680d7..b16738c9ac738fe3b7497a42d87fb56aa4b18610 100644 (file)
@@ -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...