[Asterisk-code-review] autoconf: Use m4 conditional in AST CHECK PWLIB VERSION. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Mon Nov 27 13:48:45 CST 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7379
Change subject: autoconf: Use m4 conditional in AST_CHECK_PWLIB_VERSION.
......................................................................
autoconf: Use m4 conditional in AST_CHECK_PWLIB_VERSION.
Change-Id: I8f6208fd8a8627cdaac3500b2b304c64d9bab238
---
M autoconf/ast_check_pwlib.m4
M configure
2 files changed, 6 insertions(+), 30 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/79/7379/1
diff --git a/autoconf/ast_check_pwlib.m4 b/autoconf/ast_check_pwlib.m4
index 81c3f40..4588fa3 100644
--- a/autoconf/ast_check_pwlib.m4
+++ b/autoconf/ast_check_pwlib.m4
@@ -191,11 +191,7 @@
])
AC_DEFUN([AST_CHECK_PWLIB_VERSION], [
- if test "x$7" != "x"; then
- VNAME="$7"
- else
- VNAME="$2_VERSION"
- fi
+ VNAME="m4_default([$7],[$2_VERSION])"
if test "${HAS_$2:-unset}" != "unset"; then
$2_VERSION=`grep "$VNAME \"" ${$2_INCDIR}/$3 | sed -e 's/[[[:space:]]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
@@ -204,11 +200,7 @@
$2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.`
$2_VER=$((${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER}))
$2_REQ=$(($4*10000+$5*100+$6))
- if test "x$10" = "x"; then
- $2_MAX=9999999
- else
- $2_MAX=$(($8*10000+$9*100+$10))
- fi
+ $2_MAX=m4_ifblank([$10], [9999999], [$(($8*10000+$9*100+$10))])
AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
if test ${$2_VER} -lt ${$2_REQ}; then
diff --git a/configure b/configure
index 6b5aee7..c672df9 100755
--- a/configure
+++ b/configure
@@ -29723,11 +29723,7 @@
- if test "xP[WT]LIB_VERSION" != "x"; then
- VNAME="P[WT]LIB_VERSION"
- else
- VNAME="PWLIB_VERSION"
- fi
+ VNAME="P[WT]LIB_VERSION"
if test "${HAS_PWLIB:-unset}" != "unset"; then
PWLIB_VERSION=`grep "$VNAME \"" ${PWLIB_INCDIR}/ptbuildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
@@ -29736,11 +29732,7 @@
PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
PWLIB_VER=$((${PWLIB_MAJOR_VERSION}*10000+${PWLIB_MINOR_VERSION}*100+${PWLIB_BUILD_NUMBER}))
PWLIB_REQ=$((1*10000+9*100+2))
- if test "x" = "x"; then
- PWLIB_MAX=9999999
- else
- PWLIB_MAX=$((*10000+*100+))
- fi
+ PWLIB_MAX=9999999
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323" >&5
$as_echo_n "checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323... " >&6; }
@@ -30056,11 +30048,7 @@
- if test "x" != "x"; then
- VNAME=""
- else
- VNAME="OPENH323_VERSION"
- fi
+ VNAME="OPENH323_VERSION"
if test "${HAS_OPENH323:-unset}" != "unset"; then
OPENH323_VERSION=`grep "$VNAME \"" ${OPENH323_INCDIR}/openh323buildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
@@ -30069,11 +30057,7 @@
OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
OPENH323_VER=$((${OPENH323_MAJOR_VERSION}*10000+${OPENH323_MINOR_VERSION}*100+${OPENH323_BUILD_NUMBER}))
OPENH323_REQ=$((1*10000+17*100+3))
- if test "x0" = "x"; then
- OPENH323_MAX=9999999
- else
- OPENH323_MAX=$((1*10000+19*100+0))
- fi
+ OPENH323_MAX=$((1*10000+19*100+0))
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323" >&5
$as_echo_n "checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323... " >&6; }
--
To view, visit https://gerrit.asterisk.org/7379
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f6208fd8a8627cdaac3500b2b304c64d9bab238
Gerrit-Change-Number: 7379
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171127/0150c32a/attachment.html>
More information about the asterisk-code-review
mailing list