summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexander Traud <pabstraud@compuserve.com>2018-03-09 10:13:20 +0100
committerAlexander Traud <pabstraud@compuserve.com>2018-03-09 10:13:20 +0100
commitc5f2332953b0871824ed93e99fb10ae625eaeadf (patch)
treeacf1c9ea5bafd987d3006453844969c98d762b53 /configure.ac
parentffdc5c63985c8749eb26a9f5d66b2d796a0623d7 (diff)
BuildSystem: For consistency, avoid double-checking via if clauses.
In the script ./configure, AST_EXT_LIB_CHECK and AST_PKG_CONFIG_CHECK first test whether parameter 1 was already found. Consequently, an if-test on PBX_ just a line below is redundant, if exactly the same parameter 1 is used again. No performance gain is expected by this change. However, because this strategy is used all over in ./configure except for two places, this change aims to create more consistency: Only do something different if there is a reason to do so. Change-Id: I4a6f48127b7af3a48168c917e888be1f70625027
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 6 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index a59646cfd..a3ade9fc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1458,16 +1458,10 @@ PKG_PROG_PKG_CONFIG()
AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h])
-
-if test "${PBX_BFD}" = "0"; then
- # Fedora/RedHat/CentOS require extra libraries
- AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty])
-fi
-
-if test "${PBX_BFD}" = "0"; then
- # openSUSE requires -lz
- AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty -lz])
-fi
+# Fedora/RedHat/CentOS require extra libraries
+AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h], [-ldl -liberty])
+# openSUSE requires -lz
+AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h], [-ldl -liberty -lz])
case "${OSARCH}" in
linux*)
@@ -1575,10 +1569,8 @@ if test "${USE_ILBC}" != "no"; then
fi
AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)
-if test "${PBX_LIBEDIT}" != 1; then
- # some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
- AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])
-fi
+# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
+AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])
if test "${PBX_LIBEDIT}" != 1; then
AC_MSG_ERROR(*** Please install the 'libedit' development package.)
exit 1