diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-11-16 09:36:40 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-11-16 09:36:41 -0600 |
commit | b5ac9c8a78d513fdb88fc36c10e7e35cd1532557 (patch) | |
tree | 38bc4c0158fc5b43793ce0437e68b35c0c5f92d3 /configure | |
parent | f9661d558b696226dbffd00d094faa22f3bd34b3 (diff) | |
parent | 4559cd0e284ee3cb672d9c7c935ab99b3bb16489 (diff) |
Merge "This patch adds a beanstalk CDR backend."
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 143 |
1 files changed, 143 insertions, 0 deletions
@@ -996,6 +996,10 @@ PBX_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_DIR PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_INCLUDE PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_LIB +PBX_BEANSTALK +BEANSTALK_DIR +BEANSTALK_INCLUDE +BEANSTALK_LIB PBX_PGSQL PGSQL_DIR PGSQL_INCLUDE @@ -1443,6 +1447,7 @@ with_opusfile with_osptk with_oss with_postgres +with_beanstalk with_pjproject with_popt with_portaudio @@ -2200,6 +2205,7 @@ Optional Packages: --with-osptk=PATH use OSP Toolkit files in PATH --with-oss=PATH use Open Sound System files in PATH --with-postgres=PATH use PostgreSQL files in PATH + --with-beanstalk=PATH use Beanstalk Job Queue files in PATH --with-pjproject=PATH use PJPROJECT files in PATH --with-popt=PATH use popt files in PATH --with-portaudio=PATH use PortAudio files in PATH @@ -11491,6 +11497,38 @@ fi + BEANSTALK_DESCRIP="Beanstalk Job Queue" + BEANSTALK_OPTION="beanstalk" + PBX_BEANSTALK=0 + +# Check whether --with-beanstalk was given. +if test "${with_beanstalk+set}" = set; then : + withval=$with_beanstalk; + case ${withval} in + n|no) + USE_BEANSTALK=no + # -1 is a magic value used by menuselect to know that the package + # was disabled, other than 'not found' + PBX_BEANSTALK=-1 + ;; + y|ye|yes) + ac_mandatory_list="${ac_mandatory_list} BEANSTALK" + ;; + *) + BEANSTALK_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} BEANSTALK" + ;; + esac + +fi + + + + + + + + if test "x${PBX_PJPROJECT}" != "x1" ; then PJPROJECT_DESCRIP="PJPROJECT" @@ -25185,6 +25223,111 @@ fi + +if test "x${PBX_BEANSTALK}" != "x1" -a "${USE_BEANSTALK}" != "no"; then + pbxlibdir="" + # if --with-BEANSTALK=DIR has been specified, use it. + if test "x${BEANSTALK_DIR}" != "x"; then + if test -d ${BEANSTALK_DIR}/lib; then + pbxlibdir="-L${BEANSTALK_DIR}/lib" + else + pbxlibdir="-L${BEANSTALK_DIR}" + fi + fi + pbxfuncname="bs_version" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_BEANSTALK_FOUND=yes + else + ast_ext_lib_check_save_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} " + as_ac_Lib=`$as_echo "ac_cv_lib_beanstalk_${pbxfuncname}" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbeanstalk" >&5 +$as_echo_n "checking for ${pbxfuncname} in -lbeanstalk... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbeanstalk ${pbxlibdir} $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_BEANSTALK_FOUND=yes +else + AST_BEANSTALK_FOUND=no +fi + + CFLAGS="${ast_ext_lib_check_save_CFLAGS}" + fi + + # now check for the header. + if test "${AST_BEANSTALK_FOUND}" = "yes"; then + BEANSTALK_LIB="${pbxlibdir} -lbeanstalk " + # if --with-BEANSTALK=DIR has been specified, use it. + if test "x${BEANSTALK_DIR}" != "x"; then + BEANSTALK_INCLUDE="-I${BEANSTALK_DIR}/include" + fi + BEANSTALK_INCLUDE="${BEANSTALK_INCLUDE} " + if test "xbeanstalk.h" = "x" ; then # no header, assume found + BEANSTALK_HEADER_FOUND="1" + else # check for the header + ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} ${BEANSTALK_INCLUDE}" + ac_fn_c_check_header_mongrel "$LINENO" "beanstalk.h" "ac_cv_header_beanstalk_h" "$ac_includes_default" +if test "x$ac_cv_header_beanstalk_h" = xyes; then : + BEANSTALK_HEADER_FOUND=1 +else + BEANSTALK_HEADER_FOUND=0 +fi + + + CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" + fi + if test "x${BEANSTALK_HEADER_FOUND}" = "x0" ; then + BEANSTALK_LIB="" + BEANSTALK_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + BEANSTALK_LIB="" + fi + PBX_BEANSTALK=1 + cat >>confdefs.h <<_ACEOF +#define HAVE_BEANSTALK 1 +_ACEOF + + fi + fi +fi + + + # possible places for oss definitions if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then |