Merge "BuildSystem: For consistency, avoid double-checking via if clauses."

This commit is contained in:
Jenkins2
2018-03-13 10:48:41 -05:00
committed by Gerrit Code Review
2 changed files with 29 additions and 45 deletions

View File

@@ -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