mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
res_corosync: Fix build against corosync 2.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
122
configure
vendored
122
configure
vendored
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac Revision: 360490 .
|
||||
# From configure.ac Revision: 361968 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68 for asterisk trunk.
|
||||
#
|
||||
@@ -1005,6 +1005,10 @@ PBX_CURSES
|
||||
CURSES_DIR
|
||||
CURSES_INCLUDE
|
||||
CURSES_LIB
|
||||
PBX_COROSYNC_CFG_STATE_TRACK
|
||||
COROSYNC_CFG_STATE_TRACK_DIR
|
||||
COROSYNC_CFG_STATE_TRACK_INCLUDE
|
||||
COROSYNC_CFG_STATE_TRACK_LIB
|
||||
PBX_COROSYNC
|
||||
COROSYNC_DIR
|
||||
COROSYNC_INCLUDE
|
||||
@@ -8101,6 +8105,18 @@ fi
|
||||
|
||||
|
||||
|
||||
COROSYNC_CFG_STATE_TRACK_DESCRIP="A callback only in corosync 1.x"
|
||||
COROSYNC_CFG_STATE_TRACK_OPTION=cfg
|
||||
COROSYNC_CFG_STATE_TRACK_DIR=${COROSYNC_DIR}
|
||||
|
||||
PBX_COROSYNC_CFG_STATE_TRACK=0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CURSES_DESCRIP="curses"
|
||||
CURSES_OPTION="curses"
|
||||
PBX_CURSES=0
|
||||
@@ -26002,6 +26018,110 @@ fi
|
||||
|
||||
|
||||
|
||||
if test "x${PBX_COROSYNC_CFG_STATE_TRACK}" != "x1" -a "${USE_COROSYNC_CFG_STATE_TRACK}" != "no"; then
|
||||
pbxlibdir=""
|
||||
# if --with-COROSYNC_CFG_STATE_TRACK=DIR has been specified, use it.
|
||||
if test "x${COROSYNC_CFG_STATE_TRACK_DIR}" != "x"; then
|
||||
if test -d ${COROSYNC_CFG_STATE_TRACK_DIR}/lib; then
|
||||
pbxlibdir="-L${COROSYNC_CFG_STATE_TRACK_DIR}/lib"
|
||||
else
|
||||
pbxlibdir="-L${COROSYNC_CFG_STATE_TRACK_DIR}"
|
||||
fi
|
||||
fi
|
||||
pbxfuncname="corosync_cfg_state_track"
|
||||
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
|
||||
AST_COROSYNC_CFG_STATE_TRACK_FOUND=yes
|
||||
else
|
||||
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} "
|
||||
as_ac_Lib=`$as_echo "ac_cv_lib_cfg_${pbxfuncname}" | $as_tr_sh`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcfg" >&5
|
||||
$as_echo_n "checking for ${pbxfuncname} in -lcfg... " >&6; }
|
||||
if eval \${$as_ac_Lib+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lcfg ${pbxlibdir} -lcfg $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char ${pbxfuncname} ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return ${pbxfuncname} ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
eval "$as_ac_Lib=yes"
|
||||
else
|
||||
eval "$as_ac_Lib=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
eval ac_res=\$$as_ac_Lib
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
|
||||
AST_COROSYNC_CFG_STATE_TRACK_FOUND=yes
|
||||
else
|
||||
AST_COROSYNC_CFG_STATE_TRACK_FOUND=no
|
||||
fi
|
||||
|
||||
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
|
||||
fi
|
||||
|
||||
# now check for the header.
|
||||
if test "${AST_COROSYNC_CFG_STATE_TRACK_FOUND}" = "yes"; then
|
||||
COROSYNC_CFG_STATE_TRACK_LIB="${pbxlibdir} -lcfg -lcfg"
|
||||
# if --with-COROSYNC_CFG_STATE_TRACK=DIR has been specified, use it.
|
||||
if test "x${COROSYNC_CFG_STATE_TRACK_DIR}" != "x"; then
|
||||
COROSYNC_CFG_STATE_TRACK_INCLUDE="-I${COROSYNC_CFG_STATE_TRACK_DIR}/include"
|
||||
fi
|
||||
COROSYNC_CFG_STATE_TRACK_INCLUDE="${COROSYNC_CFG_STATE_TRACK_INCLUDE} "
|
||||
if test "xcorosync/cfg.h" = "x" ; then # no header, assume found
|
||||
COROSYNC_CFG_STATE_TRACK_HEADER_FOUND="1"
|
||||
else # check for the header
|
||||
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
|
||||
CPPFLAGS="${CPPFLAGS} ${COROSYNC_CFG_STATE_TRACK_INCLUDE}"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "corosync/cfg.h" "ac_cv_header_corosync_cfg_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_corosync_cfg_h" = xyes; then :
|
||||
COROSYNC_CFG_STATE_TRACK_HEADER_FOUND=1
|
||||
else
|
||||
COROSYNC_CFG_STATE_TRACK_HEADER_FOUND=0
|
||||
fi
|
||||
|
||||
|
||||
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
|
||||
fi
|
||||
if test "x${COROSYNC_CFG_STATE_TRACK_HEADER_FOUND}" = "x0" ; then
|
||||
COROSYNC_CFG_STATE_TRACK_LIB=""
|
||||
COROSYNC_CFG_STATE_TRACK_INCLUDE=""
|
||||
else
|
||||
if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
|
||||
COROSYNC_CFG_STATE_TRACK_LIB=""
|
||||
fi
|
||||
PBX_COROSYNC_CFG_STATE_TRACK=1
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_COROSYNC_CFG_STATE_TRACK 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
if test "x${PBX_SPEEX}" != "x1" -a "${USE_SPEEX}" != "no"; then
|
||||
pbxlibdir=""
|
||||
|
Reference in New Issue
Block a user