[Asterisk-code-review] pjproject: Remove bashism from configure.m4 script (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue May 5 09:28:04 CDT 2020


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14380 )

Change subject: pjproject: Remove bashism from configure.m4 script
......................................................................

pjproject: Remove bashism from configure.m4 script

The configure.m4 script for pjproject contains some += syntax, which
is specific to bash, replacing it with string substitutions makes
the script compatible with traditional Bourne shells.

ASTERISK-28866 #close
Reported-by: Christoph Moench-Tegeder <cmt at FreeBSD.org>

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

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



diff --git a/configure b/configure
index 81de6e0..f794797 100755
--- a/configure
+++ b/configure
@@ -9238,25 +9238,25 @@
 
 		this_host=$(./config.sub $(./config.guess))
 		if test "$build" != "$this_host" ; then
-			PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --build=$build_alias"
 		fi
 		if test "$host" != "$this_host" ; then
-			PJPROJECT_CONFIGURE_OPTS+=" --host=$host_alias"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --host=$host_alias"
 		fi
 		# This was a copy of the autoconf generated code from the root ./configure.
 		# Hopefully, when you read this, the code is still the same.
 		if test "${with_ssl+set}" = set; then :
 			case $with_ssl in
 			n|no)
-			PJPROJECT_CONFIGURE_OPTS+=" --disable-ssl"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --disable-ssl"
 			;;
 			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=${with_ssl}"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl=${with_ssl}"
 			;;
 			esac
 		fi
diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4
index 7cbb307..485e4f1 100644
--- a/third-party/pjproject/configure.m4
+++ b/third-party/pjproject/configure.m4
@@ -51,25 +51,25 @@
 		AC_ARG_VAR([PJPROJECT_CONFIGURE_OPTS],[Additional configure options to pass to bundled pjproject])
 		this_host=$(./config.sub $(./config.guess))
 		if test "$build" != "$this_host" ; then
-			PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --build=$build_alias"
 		fi
 		if test "$host" != "$this_host" ; then
-			PJPROJECT_CONFIGURE_OPTS+=" --host=$host_alias"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --host=$host_alias"
 		fi
 		# This was a copy of the autoconf generated code from the root ./configure.
 		# Hopefully, when you read this, the code is still the same.
 		if test "${with_ssl+set}" = set; then :
 			case $with_ssl in
 			n|no)
-			PJPROJECT_CONFIGURE_OPTS+=" --disable-ssl"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --disable-ssl"
 			;;
 			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=${with_ssl}"
+			PJPROJECT_CONFIGURE_OPTS="${PJPROJECT_CONFIGURE_OPTS} --with-ssl=${with_ssl}"
 			;;
 			esac
 		fi

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I382a78160e028044598b7da83ec7e1ff42b91c05
Gerrit-Change-Number: 14380
Gerrit-PatchSet: 3
Gerrit-Owner: Guido Falsi <madpilot at freebsd.org>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200505/8ca45d62/attachment-0001.html>


More information about the asterisk-code-review mailing list