Skip to content
Snippets Groups Projects
configure 927 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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
    
    
    
    Tzafrir Cohen's avatar
    Tzafrir Cohen committed
    for ver in 2.0 2.2 2.4 2.6 3.0; do
    
       if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
    
    pkg_failed=no
    
    { $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
    
    David M. Lee's avatar
    David M. Lee committed
       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    $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
    
    David M. Lee's avatar
    David M. Lee committed
         	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    $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; }
    
                PBX_GMIME=1
                GMIME_INCLUDE="$GMIME_CFLAGS"
                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 "${OSARCH}" = "OpenBSD";
    then
    
    if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
       pbxlibdir=""
       # 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
    
    else
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc -lvorbisfile -logg $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
    else
      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 -logg"
    
          # 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 :
    
      VORBIS_HEADER_FOUND=1
    else
      VORBIS_HEADER_FOUND=0
    fi
    
    
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then
             VORBIS_LIB=""
             VORBIS_INCLUDE=""
          else
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_VORBIS 1
    _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
    
    
    
    ac_ext=cpp
    ac_cpp='$CXXCPP $CPPFLAGS'
    ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpb_open in -lvpb" >&5
    
    $as_echo_n "checking for vpb_open in -lvpb... " >&6; }
    
       saved_libs="${LIBS}"
       saved_cppflags="${CPPFLAGS}"
       if test "x${VPB_DIR}" != "x"; then
          if test -d ${VPB_DIR}/lib; then
             vpblibdir=${VPB_DIR}/lib
          else
             vpblibdir=${VPB_DIR}
          fi
          LIBS="${LIBS} -L${vpblibdir}"
          CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
       fi
    
       CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}"
    
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    
    	#include <vpbapi.h>
    
    if ac_fn_cxx_try_link "$LINENO"; then :
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
       LIBS="${saved_libs}"
       CPPFLAGS="${saved_cppflags}"
       if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
    	VPB_LIB="-lvpb"
    	if test "${VPB_DIR}" != ""; then
    	   VPB_LIB="-L${vpblibdir}  ${VPB_LIB}"
    	   VPB_INCLUDE="-I${VPB_DIR}/include"
    	fi
    	PBX_VPB=1
    
    
    $as_echo "#define HAVE_VPB 1" >>confdefs.h
    
    
       fi
    fi
    
    ac_ext=c
    ac_cpp='$CPP $CPPFLAGS'
    ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    ac_compiler_gnu=$ac_cv_c_compiler_gnu
    
    
    
    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 :
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       # now check for the header.
    
       if test "${AST_ZLIB_FOUND}" = "yes"; then
          ZLIB_LIB="${pbxlibdir} -lz "
          # if --with-ZLIB=DIR has been specified, use it.
          if test "x${ZLIB_DIR}" != "x"; then
    
             ZLIB_INCLUDE="-I${ZLIB_DIR}/include"
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_zlib_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then
             ZLIB_LIB=""
             ZLIB_INCLUDE=""
    
             PBX_ZLIB=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_ZLIB 1
    _ACEOF
    
    
    if test "x${PBX_UNIXODBC}" = "x1" -o "x${PBX_IODBC}" = "x1"; then
    	# Does ODBC support wide characters?
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ODBC has support for Unicode types" >&5
    $as_echo_n "checking whether ODBC has support for Unicode types... " >&6; }
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* end confdefs.h.  */
    
    #include <sql.h>
    #include <sqlext.h>
    int
    main ()
    {
    int foo = SQL_WCHAR
      ;
      return 0;
    }
    
    if ac_fn_c_try_link "$LINENO"; then :
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    $as_echo "yes" >&6; }
    
    $as_echo "#define HAVE_ODBC_WCHAR 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_exeext conftest.$ac_ext
    
    ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
    
    ac_fn_c_check_header_compile "$LINENO" "linux/ixjuser.h" "ac_cv_header_linux_ixjuser_h" "
    
    				   #ifdef HAVE_LINUX_COMPILER_H
    				   #include <linux/compiler.h>
    				   #endif
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_linux_ixjuser_h" = xyes; then :
    
    # Used in res/res_pktccops
    
        if test "x${PBX_MSG_NOSIGNAL}" != "x1"; then
    
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL in sys/socket.h" >&5
    
    $as_echo_n "checking for MSG_NOSIGNAL in sys/socket.h... " >&6; }
    
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${MSG_NOSIGNAL_DIR}" != "x"; then
    	    MSG_NOSIGNAL_INCLUDE="-I${MSG_NOSIGNAL_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${MSG_NOSIGNAL_INCLUDE}"
    
    
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
     #include <sys/socket.h>
    
    if ac_fn_c_try_compile "$LINENO"; then :
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
    $as_echo "#define HAVE_MSG_NOSIGNAL 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_SO_NOSIGPIPE}" != "x1"; then
    
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_NOSIGPIPE in sys/socket.h" >&5
    
    $as_echo_n "checking for SO_NOSIGPIPE in sys/socket.h... " >&6; }