Skip to content
Snippets Groups Projects
configure 940 KiB
Newer Older
  • Learn to ignore specific revisions
  •          # no header, assume found
             SRTP_256_HEADER_FOUND="1"
    
    
          if test "x${SRTP_256_HEADER_FOUND}" = "x0" ; then
             SRTP_256_LIB=""
             SRTP_256_INCLUDE=""
          else
    
             PBX_SRTP_256=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_SRTP_256 1
    _ACEOF
    
          fi
       fi
    fi
    
    
    
    if test "x${PBX_SRTP_192}" != "x1" -a "${USE_SRTP_192}" != "no"; then
       pbxlibdir=""
       # if --with-SRTP_192=DIR has been specified, use it.
       if test "x${SRTP_192_DIR}" != "x"; then
          if test -d ${SRTP_192_DIR}/lib; then
             pbxlibdir="-L${SRTP_192_DIR}/lib"
          else
             pbxlibdir="-L${SRTP_192_DIR}"
          fi
       fi
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto_policy_set_aes_cm_192_hmac_sha1_80 in -lsrtp" >&5
    $as_echo_n "checking for crypto_policy_set_aes_cm_192_hmac_sha1_80 in -lsrtp... " >&6; }
    if ${ac_cv_lib_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80+:} false; then :
    
      $as_echo_n "(cached) " >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lsrtp ${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 crypto_policy_set_aes_cm_192_hmac_sha1_80 ();
    
    return crypto_policy_set_aes_cm_192_hmac_sha1_80 ();
    
      ;
      return 0;
    }
    _ACEOF
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80=yes
    
      ac_cv_lib_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80=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_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80" >&5
    $as_echo "$ac_cv_lib_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80" >&6; }
    if test "x$ac_cv_lib_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80" = xyes; then :
    
      AST_SRTP_192_FOUND=yes
    else
      AST_SRTP_192_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_SRTP_192_FOUND}" = "yes"; then
          SRTP_192_LIB="${pbxlibdir} -lsrtp "
          # if --with-SRTP_192=DIR has been specified, use it.
          if test "x${SRTP_192_DIR}" != "x"; then
             SRTP_192_INCLUDE="-I${SRTP_192_DIR}/include"
          fi
          SRTP_192_INCLUDE="${SRTP_192_INCLUDE} "
    
    
             # no header, assume found
             SRTP_192_HEADER_FOUND="1"
    
    
          if test "x${SRTP_192_HEADER_FOUND}" = "x0" ; then
             SRTP_192_LIB=""
             SRTP_192_INCLUDE=""
          else
    
             PBX_SRTP_192=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_SRTP_192 1
    _ACEOF
    
          fi
       fi
    fi
    
    
    
    if test "x${PBX_SRTP_GCM}" != "x1" -a "${USE_SRTP_GCM}" != "no"; then
       pbxlibdir=""
       # if --with-SRTP_GCM=DIR has been specified, use it.
       if test "x${SRTP_GCM_DIR}" != "x"; then
          if test -d ${SRTP_GCM_DIR}/lib; then
             pbxlibdir="-L${SRTP_GCM_DIR}/lib"
          else
             pbxlibdir="-L${SRTP_GCM_DIR}"
          fi
       fi
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto_policy_set_aes_gcm_128_8_auth in -lsrtp" >&5
    $as_echo_n "checking for crypto_policy_set_aes_gcm_128_8_auth in -lsrtp... " >&6; }
    if ${ac_cv_lib_srtp_crypto_policy_set_aes_gcm_128_8_auth+:} false; then :
    
      $as_echo_n "(cached) " >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lsrtp ${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 crypto_policy_set_aes_gcm_128_8_auth ();
    
    return crypto_policy_set_aes_gcm_128_8_auth ();
    
      ;
      return 0;
    }
    _ACEOF
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_srtp_crypto_policy_set_aes_gcm_128_8_auth=yes
    
      ac_cv_lib_srtp_crypto_policy_set_aes_gcm_128_8_auth=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_srtp_crypto_policy_set_aes_gcm_128_8_auth" >&5
    $as_echo "$ac_cv_lib_srtp_crypto_policy_set_aes_gcm_128_8_auth" >&6; }
    if test "x$ac_cv_lib_srtp_crypto_policy_set_aes_gcm_128_8_auth" = xyes; then :
    
      AST_SRTP_GCM_FOUND=yes
    else
      AST_SRTP_GCM_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_SRTP_GCM_FOUND}" = "yes"; then
          SRTP_GCM_LIB="${pbxlibdir} -lsrtp "
          # if --with-SRTP_GCM=DIR has been specified, use it.
          if test "x${SRTP_GCM_DIR}" != "x"; then
             SRTP_GCM_INCLUDE="-I${SRTP_GCM_DIR}/include"
          fi
          SRTP_GCM_INCLUDE="${SRTP_GCM_INCLUDE} "
    
    
             # no header, assume found
             SRTP_GCM_HEADER_FOUND="1"
    
    
          if test "x${SRTP_GCM_HEADER_FOUND}" = "x0" ; then
             SRTP_GCM_LIB=""
             SRTP_GCM_INCLUDE=""
          else
    
             PBX_SRTP_GCM=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_SRTP_GCM 1
    _ACEOF
    
          fi
       fi
    fi
    
    
    
    if test "x${PBX_SRTP_SHUTDOWN}" != "x1" -a "${USE_SRTP_SHUTDOWN}" != "no"; then
       pbxlibdir=""
       # if --with-SRTP_SHUTDOWN=DIR has been specified, use it.
       if test "x${SRTP_SHUTDOWN_DIR}" != "x"; then
          if test -d ${SRTP_SHUTDOWN_DIR}/lib; then
             pbxlibdir="-L${SRTP_SHUTDOWN_DIR}/lib"
          else
             pbxlibdir="-L${SRTP_SHUTDOWN_DIR}"
          fi
       fi
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_shutdown in -lsrtp" >&5
    $as_echo_n "checking for srtp_shutdown in -lsrtp... " >&6; }
    if ${ac_cv_lib_srtp_srtp_shutdown+:} false; then :
    
      $as_echo_n "(cached) " >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lsrtp ${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 srtp_shutdown ();
    
    return srtp_shutdown ();
    
      ;
      return 0;
    }
    _ACEOF
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_srtp_srtp_shutdown=yes
    
      ac_cv_lib_srtp_srtp_shutdown=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_srtp_srtp_shutdown" >&5
    $as_echo "$ac_cv_lib_srtp_srtp_shutdown" >&6; }
    if test "x$ac_cv_lib_srtp_srtp_shutdown" = xyes; then :
    
      AST_SRTP_SHUTDOWN_FOUND=yes
    else
      AST_SRTP_SHUTDOWN_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_SRTP_SHUTDOWN_FOUND}" = "yes"; then
          SRTP_SHUTDOWN_LIB="${pbxlibdir} -lsrtp "
          # if --with-SRTP_SHUTDOWN=DIR has been specified, use it.
          if test "x${SRTP_SHUTDOWN_DIR}" != "x"; then
             SRTP_SHUTDOWN_INCLUDE="-I${SRTP_SHUTDOWN_DIR}/include"
          fi
          SRTP_SHUTDOWN_INCLUDE="${SRTP_SHUTDOWN_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${SRTP_SHUTDOWN_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_srtp_srtp_h" = xyes; then :
    
      SRTP_SHUTDOWN_HEADER_FOUND=1
    else
      SRTP_SHUTDOWN_HEADER_FOUND=0
    fi
    
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${SRTP_SHUTDOWN_HEADER_FOUND}" = "x0" ; then
             SRTP_SHUTDOWN_LIB=""
             SRTP_SHUTDOWN_INCLUDE=""
          else
    
             PBX_SRTP_SHUTDOWN=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_SRTP_SHUTDOWN 1
    _ACEOF
    
          fi
       fi
    fi
    
    
    
    
    if test "x${PBX_SRTP_GET_VERSION}" != "x1" -a "${USE_SRTP_GET_VERSION}" != "no"; then
       pbxlibdir=""
       # if --with-SRTP_GET_VERSION=DIR has been specified, use it.
       if test "x${SRTP_GET_VERSION_DIR}" != "x"; then
          if test -d ${SRTP_GET_VERSION_DIR}/lib; then
             pbxlibdir="-L${SRTP_GET_VERSION_DIR}/lib"
          else
             pbxlibdir="-L${SRTP_GET_VERSION_DIR}"
          fi
       fi
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_get_version_string in -lsrtp" >&5
    $as_echo_n "checking for srtp_get_version_string in -lsrtp... " >&6; }
    if ${ac_cv_lib_srtp_srtp_get_version_string+:} false; then :
      $as_echo_n "(cached) " >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lsrtp ${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 srtp_get_version_string ();
    int
    main ()
    {
    return srtp_get_version_string ();
      ;
      return 0;
    }
    _ACEOF
    if ac_fn_c_try_link "$LINENO"; then :
      ac_cv_lib_srtp_srtp_get_version_string=yes
    else
      ac_cv_lib_srtp_srtp_get_version_string=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_srtp_srtp_get_version_string" >&5
    $as_echo "$ac_cv_lib_srtp_srtp_get_version_string" >&6; }
    if test "x$ac_cv_lib_srtp_srtp_get_version_string" = xyes; then :
      AST_SRTP_GET_VERSION_FOUND=yes
    else
      AST_SRTP_GET_VERSION_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_SRTP_GET_VERSION_FOUND}" = "yes"; then
          SRTP_GET_VERSION_LIB="${pbxlibdir} -lsrtp "
          # if --with-SRTP_GET_VERSION=DIR has been specified, use it.
          if test "x${SRTP_GET_VERSION_DIR}" != "x"; then
             SRTP_GET_VERSION_INCLUDE="-I${SRTP_GET_VERSION_DIR}/include"
          fi
          SRTP_GET_VERSION_INCLUDE="${SRTP_GET_VERSION_INCLUDE} "
    
             # check for the header
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${SRTP_GET_VERSION_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default"
    if test "x$ac_cv_header_srtp_srtp_h" = xyes; then :
      SRTP_GET_VERSION_HEADER_FOUND=1
    else
      SRTP_GET_VERSION_HEADER_FOUND=0
    fi
    
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${SRTP_GET_VERSION_HEADER_FOUND}" = "x0" ; then
             SRTP_GET_VERSION_LIB=""
             SRTP_GET_VERSION_INCLUDE=""
          else
    
             PBX_SRTP_GET_VERSION=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_SRTP_GET_VERSION 1
    _ACEOF
    
          fi
       fi
    fi
    
    
    
    for ver in 3.0 2.6 2.4 2.2 2.0; do
    
          if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMIME" >&5
    $as_echo_n "checking for GMIME... " >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if test -n "$GMIME_CFLAGS"; then
        pkg_cv_GMIME_CFLAGS="$GMIME_CFLAGS"
     elif test -n "$PKG_CONFIG"; then
        if test -n "$PKG_CONFIG" && \
    
        { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmime-\$ver\""; } >&5
    
      ($PKG_CONFIG --exists --print-errors "gmime-$ver") 2>&5
      ac_status=$?
    
      $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
      test $ac_status = 0; }; then
    
      pkg_cv_GMIME_CFLAGS=`$PKG_CONFIG --cflags "gmime-$ver" 2>/dev/null`
    
    David M. Lee's avatar
    David M. Lee committed
    		      test "x$?" != "x0" && pkg_failed=yes
    
    David M. Lee's avatar
    David M. Lee committed
     else
        pkg_failed=untried
    
    David M. Lee's avatar
    David M. Lee committed
    if test -n "$GMIME_LIBS"; then
        pkg_cv_GMIME_LIBS="$GMIME_LIBS"
     elif test -n "$PKG_CONFIG"; then
        if test -n "$PKG_CONFIG" && \
    
        { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmime-\$ver\""; } >&5
    
      ($PKG_CONFIG --exists --print-errors "gmime-$ver") 2>&5
      ac_status=$?
    
      $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
      test $ac_status = 0; }; then
    
      pkg_cv_GMIME_LIBS=`$PKG_CONFIG --libs "gmime-$ver" 2>/dev/null`
    
    David M. Lee's avatar
    David M. Lee committed
    		      test "x$?" != "x0" && pkg_failed=yes
    
    David M. Lee's avatar
    David M. Lee committed
     else
        pkg_failed=untried
    
    if test $pkg_failed = yes; then
    
       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    David M. Lee's avatar
    David M. Lee committed
    $as_echo "no" >&6; }
    
    if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
            _pkg_short_errors_supported=yes
    
            _pkg_short_errors_supported=no
    
            if test $_pkg_short_errors_supported = yes; then
    
    David M. Lee's avatar
    David M. Lee committed
    	        GMIME_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gmime-$ver" 2>&1`
    
    David M. Lee's avatar
    David M. Lee committed
    	        GMIME_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gmime-$ver" 2>&1`
    
            fi
    	# Put the nasty error message in config.log where it belongs
    	echo "$GMIME_PKG_ERRORS" >&5
    
    elif test $pkg_failed = untried; then
    
         	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    David M. Lee's avatar
    David M. Lee committed
    $as_echo "no" >&6; }
    
    else
    	GMIME_CFLAGS=$pkg_cv_GMIME_CFLAGS
    	GMIME_LIBS=$pkg_cv_GMIME_LIBS
    
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
                GMIME_INCLUDE=$(echo ${GMIME_CFLAGS} | $SED -e "s|-std=c99||g")
    
                GMIME_LIB="$GMIME_LIBS"
    
    $as_echo "#define HAVE_GMIME 1" >>confdefs.h
    
    	if test "$PBX_GMIME" = 1; then
    
    if test "x${PBX_HOARD}" != "x1" -a "${USE_HOARD}" != "no"; then
       pbxlibdir=""
       # if --with-HOARD=DIR has been specified, use it.
       if test "x${HOARD_DIR}" != "x"; then
          if test -d ${HOARD_DIR}/lib; then
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lhoard" >&5
    $as_echo_n "checking for malloc in -lhoard... " >&6; }
    if ${ac_cv_lib_hoard_malloc+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lhoard ${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
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_hoard_malloc=yes
    
      ac_cv_lib_hoard_malloc=no
    
    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_hoard_malloc" >&5
    $as_echo "$ac_cv_lib_hoard_malloc" >&6; }
    if test "x$ac_cv_lib_hoard_malloc" = xyes; then :
    
      AST_HOARD_FOUND=yes
    else
      AST_HOARD_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_HOARD_FOUND}" = "yes"; then
          HOARD_LIB="${pbxlibdir} -lhoard "
          # if --with-HOARD=DIR has been specified, use it.
          if test "x${HOARD_DIR}" != "x"; then
             HOARD_INCLUDE="-I${HOARD_DIR}/include"
          fi
          HOARD_INCLUDE="${HOARD_INCLUDE} "
    
             # no header, assume found
             HOARD_HEADER_FOUND="1"
    
    
          if test "x${HOARD_HEADER_FOUND}" = "x0" ; then
             HOARD_LIB=""
             HOARD_INCLUDE=""
          else
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_HOARD 1
    _ACEOF
    
    if test "x${PBX_FREETDS}" != "x1" -a "${USE_FREETDS}" != "no"; then
    
       # if --with-FREETDS=DIR has been specified, use it.
       if test "x${FREETDS_DIR}" != "x"; then
          if test -d ${FREETDS_DIR}/lib; then
    
             pbxlibdir="-L${FREETDS_DIR}/lib"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbinit in -lsybdb" >&5
    $as_echo_n "checking for dbinit in -lsybdb... " >&6; }
    if ${ac_cv_lib_sybdb_dbinit+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    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
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_sybdb_dbinit=yes
    
      ac_cv_lib_sybdb_dbinit=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_dbinit" >&5
    $as_echo "$ac_cv_lib_sybdb_dbinit" >&6; }
    if test "x$ac_cv_lib_sybdb_dbinit" = xyes; then :
    
      AST_FREETDS_FOUND=no
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_FREETDS_FOUND}" = "yes"; then
          FREETDS_LIB="${pbxlibdir} -lsybdb "
          # if --with-FREETDS=DIR has been specified, use it.
          if test "x${FREETDS_DIR}" != "x"; then
             FREETDS_INCLUDE="-I${FREETDS_DIR}/include"
          fi
          FREETDS_INCLUDE="${FREETDS_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${FREETDS_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_sybdb_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${FREETDS_HEADER_FOUND}" = "x0" ; then
             FREETDS_LIB=""
             FREETDS_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_FREETDS 1
    _ACEOF
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tone_zone_find_by_num in -ltonezone" >&5
    
    $as_echo_n "checking for tone_zone_find_by_num in -ltonezone... " >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if ${ac_cv_lib_tonezone_tone_zone_find_by_num+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-ltonezone  $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 tone_zone_find_by_num ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_tonezone_tone_zone_find_by_num=yes
    else
    
      ac_cv_lib_tonezone_tone_zone_find_by_num=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tonezone_tone_zone_find_by_num" >&5
    
    $as_echo "$ac_cv_lib_tonezone_tone_zone_find_by_num" >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_lib_tonezone_tone_zone_find_by_num" = xyes; then :
    
      tonezone_does_not_need_lm=yes
    else
      tonezone_does_not_need_lm=no
    fi
    
    
    if test "${tonezone_does_not_need_lm}" = "no" ; then
    
    if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then
    
       # if --with-TONEZONE=DIR has been specified, use it.
       if test "x${TONEZONE_DIR}" != "x"; then
          if test -d ${TONEZONE_DIR}/lib; then
    
             pbxlibdir="-L${TONEZONE_DIR}/lib"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tone_zone_find in -ltonezone" >&5
    $as_echo_n "checking for tone_zone_find in -ltonezone... " >&6; }
    if ${ac_cv_lib_tonezone_tone_zone_find+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    LIBS="-ltonezone ${pbxlibdir} ${tonezone_extra} ${DAHDI_INCLUDE} $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 tone_zone_find ();
    
    return tone_zone_find ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_tonezone_tone_zone_find=yes
    
      ac_cv_lib_tonezone_tone_zone_find=no
    
    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_tonezone_tone_zone_find" >&5
    $as_echo "$ac_cv_lib_tonezone_tone_zone_find" >&6; }
    if test "x$ac_cv_lib_tonezone_tone_zone_find" = xyes; then :
    
      AST_TONEZONE_FOUND=yes
    else
      AST_TONEZONE_FOUND=no
    
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_TONEZONE_FOUND}" = "yes"; then
          TONEZONE_LIB="${pbxlibdir} -ltonezone ${tonezone_extra} ${DAHDI_INCLUDE}"
          # if --with-TONEZONE=DIR has been specified, use it.
          if test "x${TONEZONE_DIR}" != "x"; then
             TONEZONE_INCLUDE="-I${TONEZONE_DIR}/include"
          fi
          TONEZONE_INCLUDE="${TONEZONE_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${TONEZONE_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "dahdi/tonezone.h" "ac_cv_header_dahdi_tonezone_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_dahdi_tonezone_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${TONEZONE_HEADER_FOUND}" = "x0" ; then
             TONEZONE_LIB=""
             TONEZONE_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    
    
    if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
    
       # if --with-VORBIS=DIR has been specified, use it.
       if test "x${VORBIS_DIR}" != "x"; then
          if test -d ${VORBIS_DIR}/lib; then
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbis_info_init in -lvorbis" >&5
    $as_echo_n "checking for vorbis_info_init in -lvorbis... " >&6; }
    if ${ac_cv_lib_vorbis_vorbis_info_init+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc -lvorbisfile $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 vorbis_info_init ();
    
    return vorbis_info_init ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_vorbis_vorbis_info_init=yes
    
      ac_cv_lib_vorbis_vorbis_info_init=no
    
    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_vorbis_vorbis_info_init" >&5
    $as_echo "$ac_cv_lib_vorbis_vorbis_info_init" >&6; }
    if test "x$ac_cv_lib_vorbis_vorbis_info_init" = xyes; then :
    
      AST_VORBIS_FOUND=yes
    
      AST_VORBIS_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_VORBIS_FOUND}" = "yes"; then
    
          VORBIS_LIB="${pbxlibdir} -lvorbis -lm -lvorbisenc -lvorbisfile"
    
          # if --with-VORBIS=DIR has been specified, use it.
          if test "x${VORBIS_DIR}" != "x"; then
             VORBIS_INCLUDE="-I${VORBIS_DIR}/include"
          fi
          VORBIS_INCLUDE="${VORBIS_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${VORBIS_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "vorbis/codec.h" "ac_cv_header_vorbis_codec_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_vorbis_codec_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then
             VORBIS_LIB=""
             VORBIS_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_VORBIS 1
    _ACEOF
    
        if test "x${PBX_VORBIS_OPEN_CALLBACKS}" != "x1" -a "${USE_VORBIS_OPEN_CALLBACKS}" != "no"; then
    
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OV_CALLBACKS_NOCLOSE declared in vorbis/vorbisfile.h" >&5
    
    $as_echo_n "checking for OV_CALLBACKS_NOCLOSE declared in vorbis/vorbisfile.h... " >&6; }
            saved_cppflags="${CPPFLAGS}"
            if test "x${VORBIS_OPEN_CALLBACKS_DIR}" != "x"; then
                VORBIS_OPEN_CALLBACKS_INCLUDE="-I${VORBIS_OPEN_CALLBACKS_DIR}/include"
            fi
            CPPFLAGS="${CPPFLAGS} ${VORBIS_OPEN_CALLBACKS_INCLUDE}"
    
    
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
     #include <vorbis/vorbisfile.h>
    
    int
    main ()
    {
    #if !defined(OV_CALLBACKS_NOCLOSE)
                                        (void) OV_CALLBACKS_NOCLOSE;
                                    #endif
    
      ;
      return 0;
    }
    _ACEOF
    
    if ac_fn_c_try_compile "$LINENO"; then :
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
                    PBX_VORBIS_OPEN_CALLBACKS=1
    
    
    $as_echo "#define HAVE_VORBIS_OPEN_CALLBACKS 1" >>confdefs.h
    
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    fi
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    
            CPPFLAGS="${saved_cppflags}"
        fi
    
    
    
    
    if test "x${PBX_ZLIB}" != "x1" -a "${USE_ZLIB}" != "no"; then
    
       # if --with-ZLIB=DIR has been specified, use it.
       if test "x${ZLIB_DIR}" != "x"; then
          if test -d ${ZLIB_DIR}/lib; then
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
    $as_echo_n "checking for compress in -lz... " >&6; }
    if ${ac_cv_lib_z_compress+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    
    /* 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
    
    return compress ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_z_compress=yes
    
      ac_cv_lib_z_compress=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    LIBS=$ac_check_lib_save_LIBS
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
    $as_echo "$ac_cv_lib_z_compress" >&6; }
    if test "x$ac_cv_lib_z_compress" = xyes; then :