[Asterisk-code-review] BuildSystem: Consistently allow 'ye' even for Jansson. (asterisk[16])

Alexander Traud asteriskteam at digium.com
Mon Nov 8 10:11:21 CST 2021


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16699 )


Change subject: BuildSystem: Consistently allow 'ye' even for Jansson.
......................................................................

BuildSystem: Consistently allow 'ye' even for Jansson.

Furthermore, consistently use not 'No' but ':' for non-existent file
paths. Finally, use the same pattern for checking file paths:
  a)  = ":"
  b) != "x:"

Change-Id: I0c80c76d2cc98b0e5c859131290f4e3141a1a544
---
M configure
M configure.ac
2 files changed, 35 insertions(+), 33 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/99/16699/1

diff --git a/configure b/configure
index 3caa8a4..b552d8e 100755
--- a/configure
+++ b/configure
@@ -4956,7 +4956,7 @@
 fi
 
   if test "x$ac_pt_UNAME" = x; then
-    UNAME="No"
+    UNAME=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -4970,7 +4970,7 @@
   UNAME="$ac_cv_path_UNAME"
 fi
 
-if test ! x"${UNAME}" = xNo; then
+if test "x${UNAME}" != "x:"; then
    PBX_OSREV=$(${UNAME} -r)
 fi
 
@@ -7694,11 +7694,11 @@
 DOWNLOAD=":"
 DOWNLOAD_TO_STDOUT=
 DOWNLOAD_TIMEOUT=
-if test "${WGET}" != ":" ; then
+if test "x${WGET}" != "x:"; then
   DOWNLOAD=${WGET}
   DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
   DOWNLOAD_TIMEOUT='--timeout=$1'
-elif test "${CURL}" != ":" ; then
+elif test "x${CURL}" != "x:"; then
   DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
   DOWNLOAD_TO_STDOUT="${CURL} -Ls"
   DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'
@@ -7744,7 +7744,7 @@
 fi
 
 
-  if test "${FETCH}" != ":" ; then
+  if test "x${FETCH}" != "x:"; then
     DOWNLOAD=${FETCH}
     DOWNLOAD_TO_STDOUT="${FETCH} -o-"
     DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
@@ -8043,21 +8043,22 @@
 	PBX_BISON=1
 fi
 
-if test "x${FLEX}" = "x:" ; then
+
+if test "${FLEX}" = ":"; then
 	PBX_FLEX=0
 else
 	PBX_FLEX=1
 fi
 
 
-if test "x${XMLSTARLET}" = "x:" ; then
+if test "${XMLSTARLET}" = ":"; then
 	PBX_XMLSTARLET=0
 else
 	PBX_XMLSTARLET=1
 fi
 
 
-if test "x${BASH}" = "x:" ; then
+if test "${BASH}" = ":"; then
 	PBX_BASH=0
 else
 	PBX_BASH=1
@@ -8156,7 +8157,7 @@
   SOXMIX="$ac_cv_prog_SOXMIX"
 fi
 
-if test "${SOXMIX}" != ":" ; then
+if test "x${SOXMIX}" != "x:"; then
 
 $as_echo "#define HAVE_SOXMIX 1" >>confdefs.h
 
@@ -9190,7 +9191,7 @@
 # Check whether --with-jansson-bundled was given.
 if test "${with_jansson_bundled+set}" = set; then :
   withval=$with_jansson_bundled; case "${withval}" in
-		y|yes) JANSSON_BUNDLED=yes ;;
+		y|ye|yes) JANSSON_BUNDLED=yes ;;
 		*) JANSSON_BUNDLED=no ;;
 	esac
 fi
@@ -25103,7 +25104,7 @@
 
 
 
-PG_CONFIG=No
+PG_CONFIG=":"
 if test "${USE_PGSQL}" != "no"; then
    if test "x${PGSQL_DIR}" != "x"; then
       if test -n "$ac_tool_prefix"; then
@@ -25190,7 +25191,7 @@
 fi
 
   if test "x$ac_pt_PG_CONFIG" = x; then
-    PG_CONFIG="No"
+    PG_CONFIG=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -25204,7 +25205,7 @@
   PG_CONFIG="$ac_cv_path_PG_CONFIG"
 fi
 
-      if test x"${PG_CONFIG}" = xNo; then
+      if test "${PG_CONFIG}" = ":"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
 $as_echo "$as_me: ***" >&6;}
          { $as_echo "$as_me:${as_lineno-$LINENO}: *** pg_config was not found in the path you specified:" >&5
@@ -25302,7 +25303,7 @@
 fi
 
   if test "x$ac_pt_PG_CONFIG" = x; then
-    PG_CONFIG="No"
+    PG_CONFIG=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -25318,7 +25319,7 @@
 
    fi
 fi
-if test "${PG_CONFIG}" != No; then
+if test "x${PG_CONFIG}" != "x:"; then
    PGSQL_libdir=`${PG_CONFIG} --libdir`
    PGSQL_includedir=`${PG_CONFIG} --includedir`
    if test "x$?" != "x0" ; then
@@ -36497,7 +36498,7 @@
 
 
 ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
-if test "x${ac_cv_path_CMP}" = "x:"; then
+if test "${ac_cv_path_CMP}" = ":"; then
 	( cd "`pwd`/menuselect" && ./configure )
 elif ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else
 	( cd "`pwd`/menuselect" && ./configure )
diff --git a/configure.ac b/configure.ac
index 6f96967..0fbad93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,8 +211,8 @@
 AC_SUBST(CONFIG_SIGNED_CHAR)
 
 #  check for uname
-AC_PATH_TOOL([UNAME], [uname], No)
-if test ! x"${UNAME}" = xNo; then
+AC_PATH_TOOL([UNAME], [uname], :)
+if test "x${UNAME}" != "x:"; then
    PBX_OSREV=$(${UNAME} -r)
 fi
 AC_SUBST(PBX_OSREV)
@@ -289,17 +289,17 @@
 DOWNLOAD=":"
 DOWNLOAD_TO_STDOUT=
 DOWNLOAD_TIMEOUT=
-if test "${WGET}" != ":" ; then
+if test "x${WGET}" != "x:"; then
   DOWNLOAD=${WGET}
   DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
   DOWNLOAD_TIMEOUT='--timeout=$1'
-elif test "${CURL}" != ":" ; then
+elif test "x${CURL}" != "x:"; then
   DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
   DOWNLOAD_TO_STDOUT="${CURL} -Ls"
   DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'
 else
   AC_PATH_PROG([FETCH], [fetch], :)
-  if test "${FETCH}" != ":" ; then
+  if test "x${FETCH}" != "x:"; then
     DOWNLOAD=${FETCH}
     DOWNLOAD_TO_STDOUT="${FETCH} -o-"
     DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
@@ -351,29 +351,30 @@
 	PBX_BISON=1
 fi
 AC_SUBST(PBX_BISON)
-if test "x${FLEX}" = "x:" ; then
+
+if test "${FLEX}" = ":"; then
 	PBX_FLEX=0
 else
 	PBX_FLEX=1
 fi
 AC_SUBST(PBX_FLEX)
 
-if test "x${XMLSTARLET}" = "x:" ; then
+if test "${XMLSTARLET}" = ":"; then
 	PBX_XMLSTARLET=0
 else
 	PBX_XMLSTARLET=1
 fi
 AC_SUBST(PBX_XMLSTARLET)
 
-if test "x${BASH}" = "x:" ; then
+if test "${BASH}" = ":"; then
 	PBX_BASH=0
 else
 	PBX_BASH=1
 fi
 AC_SUBST(PBX_BASH)
 
-AC_CHECK_TOOL([SOXMIX], [soxmix], [:])
-if test "${SOXMIX}" != ":" ; then
+AC_CHECK_TOOL([SOXMIX], [soxmix], :)
+if test "x${SOXMIX}" != "x:"; then
 	AC_DEFINE([HAVE_SOXMIX], 1, [Define to 1 if your system has soxmix application.])
 fi
 
@@ -441,7 +442,7 @@
 	[AS_HELP_STRING([--with-jansson-bundled],
 		[Use bundled jansson library])],
 	[case "${withval}" in
-		y|yes) JANSSON_BUNDLED=yes ;;
+		y|ye|yes) JANSSON_BUNDLED=yes ;;
 		*) JANSSON_BUNDLED=no ;;
 	esac])
 
@@ -2391,11 +2392,11 @@
 AST_EXT_LIB_CHECK([OSS], [ossaudio], [], [sys/soundcard.h])
 AST_EXT_LIB_CHECK([OSS], [ossaudio], [oss_ioctl_mixer], [soundcard.h])
 
-PG_CONFIG=No
+PG_CONFIG=":"
 if test "${USE_PGSQL}" != "no"; then
    if test "x${PGSQL_DIR}" != "x"; then
-      AC_PATH_TOOL([PG_CONFIG], [pg_config], No, [${PGSQL_DIR}/bin])
-      if test x"${PG_CONFIG}" = xNo; then
+      AC_PATH_TOOL([PG_CONFIG], [pg_config], :, [${PGSQL_DIR}/bin])
+      if test "${PG_CONFIG}" = ":"; then
          AC_MSG_NOTICE([***])
          AC_MSG_NOTICE([*** pg_config was not found in the path you specified:])
          AC_MSG_NOTICE([*** ${PGSQL_DIR}/bin])
@@ -2404,10 +2405,10 @@
          exit 1
       fi
    else
-      AC_PATH_TOOL([PG_CONFIG], [pg_config], No)
+      AC_PATH_TOOL([PG_CONFIG], [pg_config], :)
    fi
 fi
-if test "${PG_CONFIG}" != No; then
+if test "x${PG_CONFIG}" != "x:"; then
    PGSQL_libdir=`${PG_CONFIG} --libdir`
    PGSQL_includedir=`${PG_CONFIG} --includedir`
    if test "x$?" != "x0" ; then
@@ -2942,7 +2943,7 @@
 AC_OUTPUT
 
 ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
-if test "x${ac_cv_path_CMP}" = "x:"; then
+if test "${ac_cv_path_CMP}" = ":"; then
 	( cd "`pwd`/menuselect" && ./configure )
 elif ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else
 	( cd "`pwd`/menuselect" && ./configure )

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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I0c80c76d2cc98b0e5c859131290f4e3141a1a544
Gerrit-Change-Number: 16699
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211108/6b67d3f4/attachment-0001.html>


More information about the asterisk-code-review mailing list