summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2018-03-13 10:48:41 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2018-03-13 10:48:41 -0500
commita979e52c0a351b6784530be04c0b096a7428a720 (patch)
tree3222afbb5b071d2779b1e7edbb6d1d9878c788af
parent7744e8380527ea045b95e156da79a49efbd65523 (diff)
parentc5f2332953b0871824ed93e99fb10ae625eaeadf (diff)
Merge "BuildSystem: For consistency, avoid double-checking via if clauses."
-rwxr-xr-xconfigure54
-rw-r--r--configure.ac20
2 files changed, 29 insertions, 45 deletions
diff --git a/configure b/configure
index ead1b1777..9add31da4 100755
--- a/configure
+++ b/configure
@@ -19762,9 +19762,7 @@ _ACEOF
fi
-
-if test "${PBX_BFD}" = "0"; then
- # Fedora/RedHat/CentOS require extra libraries
+# Fedora/RedHat/CentOS require extra libraries
if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
pbxlibdir=""
@@ -19779,9 +19777,9 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_check_format in -lbfd" >&5
-$as_echo_n "checking for bfd_check_format in -lbfd... " >&6; }
-if ${ac_cv_lib_bfd_bfd_check_format+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_openr in -lbfd" >&5
+$as_echo_n "checking for bfd_openr in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_openr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19795,27 +19793,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char bfd_check_format ();
+char bfd_openr ();
int
main ()
{
-return bfd_check_format ();
+return bfd_openr ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_bfd_bfd_check_format=yes
+ ac_cv_lib_bfd_bfd_openr=yes
else
- ac_cv_lib_bfd_bfd_check_format=no
+ ac_cv_lib_bfd_bfd_openr=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_check_format" >&5
-$as_echo "$ac_cv_lib_bfd_bfd_check_format" >&6; }
-if test "x$ac_cv_lib_bfd_bfd_check_format" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_openr" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_openr" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_openr" = xyes; then :
AST_BFD_FOUND=yes
else
AST_BFD_FOUND=no
@@ -19861,10 +19859,7 @@ _ACEOF
fi
-fi
-
-if test "${PBX_BFD}" = "0"; then
- # openSUSE requires -lz
+# openSUSE requires -lz
if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
pbxlibdir=""
@@ -19879,9 +19874,9 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_check_format in -lbfd" >&5
-$as_echo_n "checking for bfd_check_format in -lbfd... " >&6; }
-if ${ac_cv_lib_bfd_bfd_check_format+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_openr in -lbfd" >&5
+$as_echo_n "checking for bfd_openr in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_openr+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19895,27 +19890,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char bfd_check_format ();
+char bfd_openr ();
int
main ()
{
-return bfd_check_format ();
+return bfd_openr ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_bfd_bfd_check_format=yes
+ ac_cv_lib_bfd_bfd_openr=yes
else
- ac_cv_lib_bfd_bfd_check_format=no
+ ac_cv_lib_bfd_bfd_openr=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_check_format" >&5
-$as_echo "$ac_cv_lib_bfd_bfd_check_format" >&6; }
-if test "x$ac_cv_lib_bfd_bfd_check_format" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_openr" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_openr" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_openr" = xyes; then :
AST_BFD_FOUND=yes
else
AST_BFD_FOUND=no
@@ -19961,7 +19956,6 @@ _ACEOF
fi
-fi
case "${OSARCH}" in
linux*)
@@ -20768,8 +20762,7 @@ $as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h
fi
fi
-if test "${PBX_LIBEDIT}" != 1; then
- # some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
+# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then
pbxlibdir=""
@@ -20866,7 +20859,6 @@ _ACEOF
fi
-fi
if test "${PBX_LIBEDIT}" != 1; then
as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5
exit 1
diff --git a/configure.ac b/configure.ac
index a5e81d208..893489ac3 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