[Asterisk-code-review] BuildSystem: For consistency, avoid extra libs to be empty. (asterisk[15])

Jenkins2 asteriskteam at digium.com
Tue Mar 20 14:24:18 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8610 )

Change subject: BuildSystem: For consistency, avoid extra libs to be empty.
......................................................................

BuildSystem: For consistency, avoid extra libs to be empty.

AST_EXT_LIB_CHECK has several optional parameters. When an optional parameter
is left empty, [] is used to indicate this. However, this is done in the script
./configure only then, when a further parameter is not empty. For example, when
no extra libraries are needed to test the checked library, parameter 5 is not
mentioned. Except parameter 6 and higher are used, then parameter 5 must be
empty.

However, this general rule was broken
* four times for parameter 5 (extra libs) and
* three times for parameter 4 (header)
as found via the Regular Expression \[\]\). In case of parameter 5, all cases
were changed, because that happened for no reason. In case of parameter 4, an
[] improves readability actually. Therefore for parameter 4, the only case which
did not do it was changed. All this aims to create more consistency: Only do
something different if there is a reason to do so.

Change-Id: I037ef170cf1ad94497151a9ea5071a31c656cafe
---
M configure.ac
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/configure.ac b/configure.ac
index 867ff84..a206e9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -644,12 +644,12 @@
 #  * -luuid on Linux
 #  * -le2fs-uuid on OpenBSD
 #  * in libsystem on OS X
-AST_EXT_LIB_CHECK([LIBUUID], [uuid], [uuid_generate_random], [uuid/uuid.h], [])
+AST_EXT_LIB_CHECK([LIBUUID], [uuid], [uuid_generate_random], [uuid/uuid.h])
 if test "x$LIBUUID_LIB" != "x" ; then
   UUID_INCLUDE="$LIBUUID_INCLUDE"
   UUID_LIB="$LIBUUID_LIB"
 else
-  AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h], [])
+  AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h])
   if test "x$E2FSUUID_LIB" != "x" ; then
     UUID_INCLUDE="$E2FSUUID_INCLUDE"
     UUID_LIB="$E2FSUUID_LIB"
@@ -674,7 +674,7 @@
 fi
 
 # See if clock_gettime is in librt
-AST_EXT_LIB_CHECK([RT], [rt], [clock_gettime])
+AST_EXT_LIB_CHECK([RT], [rt], [clock_gettime], [])
 
 AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
         [#include <libxml/tree.h>
@@ -2197,10 +2197,10 @@
 # script bug which does not find the ldns library.  The bug is fixed in
 # v1.4.22 but that version is not easily detectable.
 #
-AST_EXT_LIB_CHECK([UNBOUND], [unbound], [ub_ctx_delete], [unbound.h], [])
+AST_EXT_LIB_CHECK([UNBOUND], [unbound], [ub_ctx_delete], [unbound.h])
 AST_C_DECLARE_CHECK([UNBOUND_CONST_PARAMS], [UNBOUND_VERSION_MAJOR], [unbound.h])
 
-AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
+AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h])
 
 AST_EXT_LIB_CHECK([OGG], [ogg], [ogg_stream_init], [ogg/ogg.h])
 

-- 
To view, visit https://gerrit.asterisk.org/8610
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I037ef170cf1ad94497151a9ea5071a31c656cafe
Gerrit-Change-Number: 8610
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180320/2e86d9dd/attachment-0001.html>


More information about the asterisk-code-review mailing list