From 7580d1e0bbafd7562ce34d204c29dff32bb1c6fb Mon Sep 17 00:00:00 2001
From: Alexander Traud <pabstraud@compuserve.com>
Date: Tue, 20 Mar 2018 17:55:56 +0100
Subject: [PATCH] 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
* three 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
---
 configure.ac | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index e38a36885e..62f823968f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -608,12 +608,12 @@ AC_SUBST(EDITLINE_LIB)
 #  * -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"
@@ -638,7 +638,7 @@ if test "${PBX_JANSSON}" != 1; then
 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>
@@ -2156,7 +2156,7 @@ AST_EXT_TOOL_CHECK([NETSNMP], [net-snmp-config], , [--agent-libs],
 
 AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.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])
 
-- 
GitLab