[Asterisk-code-review] autoconf: Use m4 conditional in AST C COMPILE CHECK. (asterisk[15])
Corey Farrell
asteriskteam at digium.com
Mon Nov 27 14:02:12 CST 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7382
Change subject: autoconf: Use m4 conditional in AST_C_COMPILE_CHECK.
......................................................................
autoconf: Use m4 conditional in AST_C_COMPILE_CHECK.
Change-Id: I530c0a72f965437acef6a9a4fbfe5c487f078b65
---
M autoconf/ast_c_compile_check.m4
M configure
2 files changed, 9 insertions(+), 61 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/7382/1
diff --git a/autoconf/ast_c_compile_check.m4 b/autoconf/ast_c_compile_check.m4
index ed15630..ebdaefa 100644
--- a/autoconf/ast_c_compile_check.m4
+++ b/autoconf/ast_c_compile_check.m4
@@ -4,11 +4,7 @@
AC_DEFUN([AST_C_COMPILE_CHECK],
[
if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
- if test "x$5" != "x"; then
- AC_MSG_CHECKING([for $5])
- else
- AC_MSG_CHECKING([if "$2" compiles using $3])
- fi
+ AC_MSG_CHECKING(m4_ifval([$5],[for $5],[if "$2" compiles using $3]))
saved_cppflags="${CPPFLAGS}"
if test "x${$1_DIR}" != "x"; then
$1_INCLUDE="-I${$1_DIR}/include"
diff --git a/configure b/configure
index 1382f17..4ffcc73 100755
--- a/configure
+++ b/configure
@@ -20941,13 +20941,8 @@
if test "x${PBX_DAHDI_LINEREVERSE_VMWI}" != "x1" -a "${USE_DAHDI_LINEREVERSE_VMWI}" != "no"; then
- if test "xenhanced dahdi vmwi support" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for enhanced dahdi vmwi support" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for enhanced dahdi vmwi support" >&5
$as_echo_n "checking for enhanced dahdi vmwi support... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct dahdi_vmwi_info booger\" compiles using dahdi/user.h" >&5
-$as_echo_n "checking if \"struct dahdi_vmwi_info booger\" compiles using dahdi/user.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${DAHDI_LINEREVERSE_VMWI_DIR}" != "x"; then
DAHDI_LINEREVERSE_VMWI_INCLUDE="-I${DAHDI_LINEREVERSE_VMWI_DIR}/include"
@@ -20987,13 +20982,8 @@
if test "x${PBX_DAHDI_ECHOCANCEL_FAX_MODE}" != "x1" -a "${USE_DAHDI_ECHOCANCEL_FAX_MODE}" != "no"; then
- if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
-$as_echo_n "checking for ... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h" >&5
$as_echo_n "checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${DAHDI_ECHOCANCEL_FAX_MODE_DIR}" != "x"; then
DAHDI_ECHOCANCEL_FAX_MODE_INCLUDE="-I${DAHDI_ECHOCANCEL_FAX_MODE_DIR}/include"
@@ -21033,13 +21023,8 @@
if test "x${PBX_GETIFADDRS}" != "x1" -a "${USE_GETIFADDRS}" != "no"; then
- if test "xgetifaddrs() support" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs() support" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs() support" >&5
$as_echo_n "checking for getifaddrs() support... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct ifaddrs *p; getifaddrs(&p)\" compiles using ifaddrs.h" >&5
-$as_echo_n "checking if \"struct ifaddrs *p; getifaddrs(&p)\" compiles using ifaddrs.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${GETIFADDRS_DIR}" != "x"; then
GETIFADDRS_INCLUDE="-I${GETIFADDRS_DIR}/include"
@@ -21078,13 +21063,8 @@
if test "x${PBX_TIMERFD}" != "x1" -a "${USE_TIMERFD}" != "no"; then
- if test "xtimerfd support" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerfd support" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerfd support" >&5
$as_echo_n "checking for timerfd support... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);\" compiles using sys/timerfd.h" >&5
-$as_echo_n "checking if \"timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);\" compiles using sys/timerfd.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${TIMERFD_DIR}" != "x"; then
TIMERFD_INCLUDE="-I${TIMERFD_DIR}/include"
@@ -21491,13 +21471,8 @@
else
if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then
- if test "xTesting for libedit unicode support" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5
$as_echo_n "checking for Testing for libedit unicode support... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"el_rfunc_t *callback;\" compiles using histedit.h" >&5
-$as_echo_n "checking if \"el_rfunc_t *callback;\" compiles using histedit.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${LIBEDIT_IS_UNICODE_DIR}" != "x"; then
LIBEDIT_IS_UNICODE_INCLUDE="-I${LIBEDIT_IS_UNICODE_DIR}/include"
@@ -26204,13 +26179,8 @@
LIBS="${LIBS} ${PJPROJECT_LIB}"
if test "x${PBX_PJSIP_REPLACE_MEDIA_STREAM}" != "x1" -a "${USE_PJSIP_REPLACE_MEDIA_STREAM}" != "no"; then
- if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
-$as_echo_n "checking for ... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h" >&5
$as_echo_n "checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${PJSIP_REPLACE_MEDIA_STREAM_DIR}" != "x"; then
PJSIP_REPLACE_MEDIA_STREAM_INCLUDE="-I${PJSIP_REPLACE_MEDIA_STREAM_DIR}/include"
@@ -26569,13 +26539,8 @@
LIBS="${LIBS} ${PJPROJECT_LIB}"
if test "x${PBX_PJSIP_TLS_TRANSPORT_PROTO}" != "x1" -a "${USE_PJSIP_TLS_TRANSPORT_PROTO}" != "no"; then
- if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
-$as_echo_n "checking for ... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h" >&5
$as_echo_n "checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${PJSIP_TLS_TRANSPORT_PROTO_DIR}" != "x"; then
PJSIP_TLS_TRANSPORT_PROTO_INCLUDE="-I${PJSIP_TLS_TRANSPORT_PROTO_DIR}/include"
@@ -29944,21 +29909,8 @@
if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
- if test "xminimum version of SpanDSP" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for minimum version of SpanDSP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for minimum version of SpanDSP" >&5
$as_echo_n "checking for minimum version of SpanDSP... " >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"
- #if SPANDSP_RELEASE_DATE < 20080516
- #error \"spandsp 0.0.5 or greater is required\"
- #endif
- \" compiles using spandsp/version.h" >&5
-$as_echo_n "checking if \"
- #if SPANDSP_RELEASE_DATE < 20080516
- #error \"spandsp 0.0.5 or greater is required\"
- #endif
- \" compiles using spandsp/version.h... " >&6; }
- fi
saved_cppflags="${CPPFLAGS}"
if test "x${SPANDSP_DIR}" != "x"; then
SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
--
To view, visit https://gerrit.asterisk.org/7382
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I530c0a72f965437acef6a9a4fbfe5c487f078b65
Gerrit-Change-Number: 7382
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/8f199f0a/attachment-0001.html>
More information about the asterisk-code-review
mailing list