[Asterisk-code-review] pjproject_bundled: Honor --without-pjproject. (asterisk[17])

Joshua Colp asteriskteam at digium.com
Fri Apr 17 06:54:49 CDT 2020


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

Change subject: pjproject_bundled: Honor --without-pjproject.
......................................................................

pjproject_bundled: Honor --without-pjproject.

ASTERISK-28837

Change-Id: Id057324912a3cfe6f50af372675626bb515907d9
---
M configure
M menuselect/configure
M third-party/pjproject/configure.m4
3 files changed, 225 insertions(+), 217 deletions(-)

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



diff --git a/configure b/configure
index abb8481..81de6e0 100755
--- a/configure
+++ b/configure
@@ -9194,91 +9194,93 @@
 		as_fn_error $? "--with-pjproject and --with-pjproject-bundled can't both be specified" "$LINENO" 5
 	fi
 
-	ac_mandatory_list="$ac_mandatory_list PJPROJECT"
-	PJPROJECT_DIR="${ac_top_build_prefix}third-party/pjproject"
+	if test "${with_pjproject}" != "no" && test "${with_pjproject}" != "n" ; then
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for embedded pjproject (may have to download)" >&5
+		ac_mandatory_list="$ac_mandatory_list PJPROJECT"
+		PJPROJECT_DIR="${ac_top_build_prefix}third-party/pjproject"
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for embedded pjproject (may have to download)" >&5
 $as_echo_n "checking for embedded pjproject (may have to download)... " >&6; }
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring" >&5
 $as_echo "configuring" >&6; }
 
-	if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
-		as_fn_error $? "A download utility (wget, curl, or fetch) is required to download bundled pjproject" "$LINENO" 5
-	fi
-	if test "${BZIP2}" = ":" ; then
-		as_fn_error $? "bzip2 is required to extract the pjproject tar file" "$LINENO" 5
-	fi
-	if test "${TAR}" = ":" ; then
-		as_fn_error $? "tar is required to extract the pjproject tar file" "$LINENO" 5
-	fi
-	if test "${PATCH}" = ":" ; then
-		as_fn_error $? "patch is required to configure bundled pjproject" "$LINENO" 5
-	fi
-	if test "${SED}" = ":" ; then
-		as_fn_error $? "sed is required to configure bundled pjproject" "$LINENO" 5
-	fi
-	if test "${NM}" = ":" ; then
-		as_fn_error $? "nm is required to build bundled pjproject" "$LINENO" 5
-	fi
-	if test "${MD5}" = ":" ; then
-		as_fn_error $? "md5sum is required to build bundled pjproject" "$LINENO" 5
-	fi
-	if test "${CAT}" = ":" ; then
-		as_fn_error $? "cat is required to build bundled pjproject" "$LINENO" 5
-	fi
-	if test "${CUT}" = ":" ; then
-		as_fn_error $? "cut is required to build bundled pjproject" "$LINENO" 5
-	fi
-	if test "${GREP}" = ":" ; then
-		as_fn_error $? "grep is required to build bundled pjproject" "$LINENO" 5
-	fi
+		if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
+			as_fn_error $? "A download utility (wget, curl, or fetch) is required to download bundled pjproject" "$LINENO" 5
+		fi
+		if test "${BZIP2}" = ":" ; then
+			as_fn_error $? "bzip2 is required to extract the pjproject tar file" "$LINENO" 5
+		fi
+		if test "${TAR}" = ":" ; then
+			as_fn_error $? "tar is required to extract the pjproject tar file" "$LINENO" 5
+		fi
+		if test "${PATCH}" = ":" ; then
+			as_fn_error $? "patch is required to configure bundled pjproject" "$LINENO" 5
+		fi
+		if test "${SED}" = ":" ; then
+			as_fn_error $? "sed is required to configure bundled pjproject" "$LINENO" 5
+		fi
+		if test "${NM}" = ":" ; then
+			as_fn_error $? "nm is required to build bundled pjproject" "$LINENO" 5
+		fi
+		if test "${MD5}" = ":" ; then
+			as_fn_error $? "md5sum is required to build bundled pjproject" "$LINENO" 5
+		fi
+		if test "${CAT}" = ":" ; then
+			as_fn_error $? "cat is required to build bundled pjproject" "$LINENO" 5
+		fi
+		if test "${CUT}" = ":" ; then
+			as_fn_error $? "cut is required to build bundled pjproject" "$LINENO" 5
+		fi
+		if test "${GREP}" = ":" ; then
+			as_fn_error $? "grep is required to build bundled pjproject" "$LINENO" 5
+		fi
 
 
-	this_host=$(./config.sub $(./config.guess))
-	if test "$build" != "$this_host" ; then
-		PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"
-	fi
-	if test "$host" != "$this_host" ; then
-		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"
-		;;
-		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+=" --with-ssl=${with_ssl}"
-		;;
-		esac
-	fi
+		this_host=$(./config.sub $(./config.guess))
+		if test "$build" != "$this_host" ; then
+			PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"
+		fi
+		if test "$host" != "$this_host" ; then
+			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"
+			;;
+			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+=" --with-ssl=${with_ssl}"
+			;;
+			esac
+		fi
 
-	export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
-	export NOISY_BUILD AST_DEVMODE
-	${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
-		PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
-		EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \
-		configure
-	if test $? -ne 0 ; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+		export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
+		export NOISY_BUILD AST_DEVMODE
+		${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
+			PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
+			EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \
+			configure
+		if test $? -ne 0 ; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
 $as_echo "failed" >&6; }
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: Unable to configure ${PJPROJECT_DIR}" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: Unable to configure ${PJPROJECT_DIR}" >&5
 $as_echo "$as_me: Unable to configure ${PJPROJECT_DIR}" >&6;}
-		as_fn_error $? "Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details." "$LINENO" 5
-	fi
+			as_fn_error $? "Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details." "$LINENO" 5
+		fi
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bundled pjproject" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bundled pjproject" >&5
 $as_echo_n "checking for bundled pjproject... " >&6; }
 
-	PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)
-	PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"
-	PBX_PJPROJECT=1
+		PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)
+		PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"
+		PBX_PJPROJECT=1
 
 
 $as_echo "#define HAVE_PJPROJECT 1" >>confdefs.h
@@ -9341,11 +9343,13 @@
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 	fi
 
+	fi
+
 
 
 # AST_EXT_LIB_SETUP is used to tell configure to handle variables for
@@ -13472,8 +13476,8 @@
    if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libedit" >&5
-$as_echo_n "checking for libedit... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5
+$as_echo_n "checking for LIBEDIT... " >&6; }
 
 if test -n "$LIBEDIT_CFLAGS"; then
     pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS"
@@ -13513,7 +13517,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13534,7 +13538,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_LIBEDIT=0
@@ -13932,8 +13936,8 @@
    if test "x${PBX_JANSSON}" != "x1" -a "${USE_JANSSON}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jansson >= 2.11" >&5
-$as_echo_n "checking for jansson >= 2.11... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JANSSON" >&5
+$as_echo_n "checking for JANSSON... " >&6; }
 
 if test -n "$JANSSON_CFLAGS"; then
     pkg_cv_JANSSON_CFLAGS="$JANSSON_CFLAGS"
@@ -13973,7 +13977,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13994,7 +13998,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_JANSSON=0
@@ -20620,8 +20624,8 @@
    if test "x${PBX_ILBC}" != "x1" -a "${USE_ILBC}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libilbc" >&5
-$as_echo_n "checking for libilbc... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ILBC" >&5
+$as_echo_n "checking for ILBC... " >&6; }
 
 if test -n "$ILBC_CFLAGS"; then
     pkg_cv_ILBC_CFLAGS="$ILBC_CFLAGS"
@@ -20661,7 +20665,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -20682,7 +20686,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_ILBC=0
@@ -24861,8 +24865,8 @@
    if test "x${PBX_PJPROJECT}" != "x1" -a "${USE_PJPROJECT}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpjproject" >&5
-$as_echo_n "checking for libpjproject... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PJPROJECT" >&5
+$as_echo_n "checking for PJPROJECT... " >&6; }
 
 if test -n "$PJPROJECT_CFLAGS"; then
     pkg_cv_PJPROJECT_CFLAGS="$PJPROJECT_CFLAGS"
@@ -24902,7 +24906,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -24923,7 +24927,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_PJPROJECT=0
@@ -26290,8 +26294,8 @@
    if test "x${PBX_PYTHONDEV}" != "x1" -a "${USE_PYTHONDEV}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
-$as_echo_n "checking for python... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHONDEV" >&5
+$as_echo_n "checking for PYTHONDEV... " >&6; }
 
 if test -n "$PYTHONDEV_CFLAGS"; then
     pkg_cv_PYTHONDEV_CFLAGS="$PYTHONDEV_CFLAGS"
@@ -26331,7 +26335,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -26352,7 +26356,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_PYTHONDEV=0
@@ -26486,8 +26490,8 @@
    if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for portaudio-2.0" >&5
-$as_echo_n "checking for portaudio-2.0... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PORTAUDIO" >&5
+$as_echo_n "checking for PORTAUDIO... " >&6; }
 
 if test -n "$PORTAUDIO_CFLAGS"; then
     pkg_cv_PORTAUDIO_CFLAGS="$PORTAUDIO_CFLAGS"
@@ -26527,7 +26531,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -26548,7 +26552,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_PORTAUDIO=0
@@ -32788,8 +32792,8 @@
    if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmime-$ver" >&5
-$as_echo_n "checking for gmime-$ver... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMIME" >&5
+$as_echo_n "checking for GMIME... " >&6; }
 
 if test -n "$GMIME_CFLAGS"; then
     pkg_cv_GMIME_CFLAGS="$GMIME_CFLAGS"
@@ -32829,7 +32833,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -32850,7 +32854,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_GMIME=0
@@ -34225,8 +34229,8 @@
    if test "x${PBX_GTK2}" != "x1" -a "${USE_GTK2}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0" >&5
-$as_echo_n "checking for gtk+-2.0... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5
+$as_echo_n "checking for GTK2... " >&6; }
 
 if test -n "$GTK2_CFLAGS"; then
     pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS"
@@ -34266,7 +34270,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -34287,7 +34291,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_GTK2=0
@@ -34336,8 +34340,8 @@
    if test "x${PBX_SYSTEMD}" != "x1" -a "${USE_SYSTEMD}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
-$as_echo_n "checking for libsystemd... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
+$as_echo_n "checking for SYSTEMD... " >&6; }
 
 if test -n "$SYSTEMD_CFLAGS"; then
     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
@@ -34377,7 +34381,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -34398,7 +34402,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_SYSTEMD=0
diff --git a/menuselect/configure b/menuselect/configure
index df7b81e..1d15c1c 100755
--- a/menuselect/configure
+++ b/menuselect/configure
@@ -4982,8 +4982,8 @@
    if test "x${PBX_GTK2}" != "x1" -a "${USE_GTK2}" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0" >&5
-$as_echo_n "checking for gtk+-2.0... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5
+$as_echo_n "checking for GTK2... " >&6; }
 
 if test -n "$GTK2_CFLAGS"; then
     pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS"
@@ -5023,7 +5023,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -5044,7 +5044,7 @@
 
 
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
             PBX_GTK2=0
diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4
index 7621232..7cbb307 100644
--- a/third-party/pjproject/configure.m4
+++ b/third-party/pjproject/configure.m4
@@ -9,113 +9,117 @@
 		AC_MSG_ERROR(--with-pjproject and --with-pjproject-bundled can't both be specified)
 	fi
 
-	ac_mandatory_list="$ac_mandatory_list PJPROJECT"
-	PJPROJECT_DIR="${ac_top_build_prefix}third-party/pjproject"
+	if test "${with_pjproject}" != "no" && test "${with_pjproject}" != "n" ; then
 
-	AC_MSG_CHECKING(for embedded pjproject (may have to download))
-	AC_MSG_RESULT(configuring)
+		ac_mandatory_list="$ac_mandatory_list PJPROJECT"
+		PJPROJECT_DIR="${ac_top_build_prefix}third-party/pjproject"
 
-	if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
-		AC_MSG_ERROR(A download utility (wget, curl, or fetch) is required to download bundled pjproject)
-	fi
-	if test "${BZIP2}" = ":" ; then
-		AC_MSG_ERROR(bzip2 is required to extract the pjproject tar file)
-	fi
-	if test "${TAR}" = ":" ; then
-		AC_MSG_ERROR(tar is required to extract the pjproject tar file)
-	fi
-	if test "${PATCH}" = ":" ; then
-		AC_MSG_ERROR(patch is required to configure bundled pjproject)
-	fi
-	if test "${SED}" = ":" ; then
-		AC_MSG_ERROR(sed is required to configure bundled pjproject)
-	fi
-	if test "${NM}" = ":" ; then
-		AC_MSG_ERROR(nm is required to build bundled pjproject)
-	fi
-	if test "${MD5}" = ":" ; then
-		AC_MSG_ERROR(md5sum is required to build bundled pjproject)
-	fi
-	if test "${CAT}" = ":" ; then
-		AC_MSG_ERROR(cat is required to build bundled pjproject)
-	fi
-	if test "${CUT}" = ":" ; then
-		AC_MSG_ERROR(cut is required to build bundled pjproject)
-	fi
-	if test "${GREP}" = ":" ; then
-		AC_MSG_ERROR(grep is required to build bundled pjproject)
-	fi
+		AC_MSG_CHECKING(for embedded pjproject (may have to download))
+		AC_MSG_RESULT(configuring)
 
-	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"
+		if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
+			AC_MSG_ERROR(A download utility (wget, curl, or fetch) is required to download bundled pjproject)
+		fi
+		if test "${BZIP2}" = ":" ; then
+			AC_MSG_ERROR(bzip2 is required to extract the pjproject tar file)
+		fi
+		if test "${TAR}" = ":" ; then
+			AC_MSG_ERROR(tar is required to extract the pjproject tar file)
+		fi
+		if test "${PATCH}" = ":" ; then
+			AC_MSG_ERROR(patch is required to configure bundled pjproject)
+		fi
+		if test "${SED}" = ":" ; then
+			AC_MSG_ERROR(sed is required to configure bundled pjproject)
+		fi
+		if test "${NM}" = ":" ; then
+			AC_MSG_ERROR(nm is required to build bundled pjproject)
+		fi
+		if test "${MD5}" = ":" ; then
+			AC_MSG_ERROR(md5sum is required to build bundled pjproject)
+		fi
+		if test "${CAT}" = ":" ; then
+			AC_MSG_ERROR(cat is required to build bundled pjproject)
+		fi
+		if test "${CUT}" = ":" ; then
+			AC_MSG_ERROR(cut is required to build bundled pjproject)
+		fi
+		if test "${GREP}" = ":" ; then
+			AC_MSG_ERROR(grep is required to build bundled pjproject)
+		fi
+
+		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"
+		fi
+		if test "$host" != "$this_host" ; then
+			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"
+			;;
+			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+=" --with-ssl=${with_ssl}"
+			;;
+			esac
+		fi
+
+		export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
+		export NOISY_BUILD AST_DEVMODE
+		${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
+			PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
+			EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \
+			configure
+		if test $? -ne 0 ; then
+			AC_MSG_RESULT(failed)
+			AC_MSG_NOTICE(Unable to configure ${PJPROJECT_DIR})
+			AC_MSG_ERROR(Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.)
+		fi
+
+		AC_MSG_CHECKING(for bundled pjproject)
+
+		PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)
+		PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"
+		PBX_PJPROJECT=1
+
+		AC_DEFINE([HAVE_PJPROJECT], 1, [Define if your system has PJPROJECT])
+		AC_DEFINE([HAVE_PJPROJECT_BUNDLED], 1, [Define if your system has PJPROJECT_BUNDLED])
+
+		AC_DEFINE([HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK], 1, [Define if your system has pjsip_dlg_create_uas_and_inc_lock declared.])
+		AC_DEFINE([HAVE_PJ_TRANSACTION_GRP_LOCK], 1, [Define if your system has pjsip_tsx_create_uac2 declared.])
+		AC_DEFINE([HAVE_PJSIP_REPLACE_MEDIA_STREAM], 1, [Define if your system has PJSIP_REPLACE_MEDIA_STREAM declared])
+		AC_DEFINE([HAVE_PJSIP_GET_DEST_INFO], 1, [Define if your system has pjsip_get_dest_info declared.])
+		AC_DEFINE([HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2], 1, [Define if your system has pj_ssl_cert_load_from_files2 declared.])
+		AC_DEFINE([HAVE_PJSIP_EXTERNAL_RESOLVER], 1, [Define if your system has pjsip_endpt_set_ext_resolver declared.])
+		AC_DEFINE([HAVE_PJSIP_TLS_TRANSPORT_PROTO], 1, [Define if your system has PJSIP_TLS_TRANSPORT_PROTO])
+		AC_DEFINE([HAVE_PJSIP_EVSUB_GRP_LOCK], 1, [Define if your system has PJSIP_EVSUB_GRP_LOCK])
+		AC_DEFINE([HAVE_PJSIP_INV_SESSION_REF], 1, [Define if your system has PJSIP_INV_SESSION_REF])
+		AC_DEFINE([HAVE_PJSIP_AUTH_CLT_DEINIT], 1, [Define if your system has pjsip_auth_clt_deinit declared.])
+		AC_DEFINE([HAVE_PJSIP_TSX_LAYER_FIND_TSX2], 1, [Define if your system has pjsip_tsx_layer_find_tsx2 declared.])
+		AC_DEFINE([HAVE_PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS], 1, [Define if your system has HAVE_PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS declared.])
+		AC_DEFINE([HAVE_PJSIP_ENDPOINT_COMPACT_FORM], 1, [Define if your system has HAVE_PJSIP_ENDPOINT_COMPACT_FORM declared.])
+		AC_DEFINE([HAVE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE], 1, [Define if your system has HAVE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE declared])
+		AC_DEFINE([HAVE_PJSIP_OAUTH_AUTHENTICATION], 1, [Define if your system has HAVE_PJSIP_OAUTH_AUTHENTICATION declared])
+		AC_DEFINE([HAVE_PJPROJECT_ON_VALID_ICE_PAIR_CALLBACK], 1, [Define if your system has the on_valid_pair pjnath callback.])
+
+		AC_SUBST([PJPROJECT_BUNDLED])
+		AC_SUBST([PJPROJECT_DIR])
+		AC_SUBST([PBX_PJPROJECT])
+		AC_SUBST([PJPROJECT_LIB])
+		AC_SUBST([PJPROJECT_INCLUDE])
+		AC_MSG_RESULT(yes)
+
 	fi
-	if test "$host" != "$this_host" ; then
-		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"
-		;;
-		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+=" --with-ssl=${with_ssl}"
-		;;
-		esac
-	fi
-
-	export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
-	export NOISY_BUILD AST_DEVMODE
-	${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
-		PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
-		EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \
-		configure
-	if test $? -ne 0 ; then
-		AC_MSG_RESULT(failed)
-		AC_MSG_NOTICE(Unable to configure ${PJPROJECT_DIR})
-		AC_MSG_ERROR(Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.)
-	fi
-
-	AC_MSG_CHECKING(for bundled pjproject)
-
-	PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" echo_cflags)
-	PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE"
-	PBX_PJPROJECT=1
-
-	AC_DEFINE([HAVE_PJPROJECT], 1, [Define if your system has PJPROJECT])
-	AC_DEFINE([HAVE_PJPROJECT_BUNDLED], 1, [Define if your system has PJPROJECT_BUNDLED])
-
-	AC_DEFINE([HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK], 1, [Define if your system has pjsip_dlg_create_uas_and_inc_lock declared.])
-	AC_DEFINE([HAVE_PJ_TRANSACTION_GRP_LOCK], 1, [Define if your system has pjsip_tsx_create_uac2 declared.])
-	AC_DEFINE([HAVE_PJSIP_REPLACE_MEDIA_STREAM], 1, [Define if your system has PJSIP_REPLACE_MEDIA_STREAM declared])
-	AC_DEFINE([HAVE_PJSIP_GET_DEST_INFO], 1, [Define if your system has pjsip_get_dest_info declared.])
-	AC_DEFINE([HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2], 1, [Define if your system has pj_ssl_cert_load_from_files2 declared.])
-	AC_DEFINE([HAVE_PJSIP_EXTERNAL_RESOLVER], 1, [Define if your system has pjsip_endpt_set_ext_resolver declared.])
-	AC_DEFINE([HAVE_PJSIP_TLS_TRANSPORT_PROTO], 1, [Define if your system has PJSIP_TLS_TRANSPORT_PROTO])
-	AC_DEFINE([HAVE_PJSIP_EVSUB_GRP_LOCK], 1, [Define if your system has PJSIP_EVSUB_GRP_LOCK])
-	AC_DEFINE([HAVE_PJSIP_INV_SESSION_REF], 1, [Define if your system has PJSIP_INV_SESSION_REF])
-	AC_DEFINE([HAVE_PJSIP_AUTH_CLT_DEINIT], 1, [Define if your system has pjsip_auth_clt_deinit declared.])
-	AC_DEFINE([HAVE_PJSIP_TSX_LAYER_FIND_TSX2], 1, [Define if your system has pjsip_tsx_layer_find_tsx2 declared.])
-	AC_DEFINE([HAVE_PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS], 1, [Define if your system has HAVE_PJSIP_INV_ACCEPT_MULTIPLE_SDP_ANSWERS declared.])
-	AC_DEFINE([HAVE_PJSIP_ENDPOINT_COMPACT_FORM], 1, [Define if your system has HAVE_PJSIP_ENDPOINT_COMPACT_FORM declared.])
-	AC_DEFINE([HAVE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE], 1, [Define if your system has HAVE_PJSIP_TRANSPORT_DISABLE_CONNECTION_REUSE declared])
-	AC_DEFINE([HAVE_PJSIP_OAUTH_AUTHENTICATION], 1, [Define if your system has HAVE_PJSIP_OAUTH_AUTHENTICATION declared])
-	AC_DEFINE([HAVE_PJPROJECT_ON_VALID_ICE_PAIR_CALLBACK], 1, [Define if your system has the on_valid_pair pjnath callback.])
-
-	AC_SUBST([PJPROJECT_BUNDLED])
-	AC_SUBST([PJPROJECT_DIR])
-	AC_SUBST([PBX_PJPROJECT])
-	AC_SUBST([PJPROJECT_LIB])
-	AC_SUBST([PJPROJECT_INCLUDE])
-	AC_MSG_RESULT(yes)
 ])
 
 AC_DEFUN([PJPROJECT_CONFIGURE],

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

Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: Id057324912a3cfe6f50af372675626bb515907d9
Gerrit-Change-Number: 14249
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
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/20200417/a11a852c/attachment-0001.html>


More information about the asterisk-code-review mailing list