Skip to content
Snippets Groups Projects
configure 940 KiB
Newer Older
  • Learn to ignore specific revisions
  • if test "x${PBX_PRI_CALL_HOLD}" != "x1" -a "${USE_PRI_CALL_HOLD}" != "no"; then
    
       # if --with-PRI_CALL_HOLD=DIR has been specified, use it.
       if test "x${PRI_CALL_HOLD_DIR}" != "x"; then
          if test -d ${PRI_CALL_HOLD_DIR}/lib; then
             pbxlibdir="-L${PRI_CALL_HOLD_DIR}/lib"
    
             pbxlibdir="-L${PRI_CALL_HOLD_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_hold_enable in -lpri" >&5
    $as_echo_n "checking for pri_hold_enable in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_hold_enable+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lpri ${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 pri_hold_enable ();
    
    return pri_hold_enable ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_pri_pri_hold_enable=yes
    
      ac_cv_lib_pri_pri_hold_enable=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_pri_pri_hold_enable" >&5
    $as_echo "$ac_cv_lib_pri_pri_hold_enable" >&6; }
    if test "x$ac_cv_lib_pri_pri_hold_enable" = xyes; then :
      AST_PRI_CALL_HOLD_FOUND=yes
    
      AST_PRI_CALL_HOLD_FOUND=no
    
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       if test "${AST_PRI_CALL_HOLD_FOUND}" = "yes"; then
          PRI_CALL_HOLD_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_CALL_HOLD=DIR has been specified, use it.
          if test "x${PRI_CALL_HOLD_DIR}" != "x"; then
             PRI_CALL_HOLD_INCLUDE="-I${PRI_CALL_HOLD_DIR}/include"
    
          PRI_CALL_HOLD_INCLUDE="${PRI_CALL_HOLD_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_CALL_HOLD_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_libpri_h" = xyes; then :
    
      PRI_CALL_HOLD_HEADER_FOUND=1
    
      PRI_CALL_HOLD_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${PRI_CALL_HOLD_HEADER_FOUND}" = "x0" ; then
             PRI_CALL_HOLD_LIB=""
             PRI_CALL_HOLD_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_PRI_CALL_HOLD 1
    
    if test "x${PBX_PRI_CALL_REROUTING}" != "x1" -a "${USE_PRI_CALL_REROUTING}" != "no"; then
    
       # if --with-PRI_CALL_REROUTING=DIR has been specified, use it.
       if test "x${PRI_CALL_REROUTING_DIR}" != "x"; then
          if test -d ${PRI_CALL_REROUTING_DIR}/lib; then
             pbxlibdir="-L${PRI_CALL_REROUTING_DIR}/lib"
    
             pbxlibdir="-L${PRI_CALL_REROUTING_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_reroute_enable in -lpri" >&5
    $as_echo_n "checking for pri_reroute_enable in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_reroute_enable+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lpri ${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 pri_reroute_enable ();
    
    return pri_reroute_enable ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_pri_pri_reroute_enable=yes
    
      ac_cv_lib_pri_pri_reroute_enable=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_pri_pri_reroute_enable" >&5
    $as_echo "$ac_cv_lib_pri_pri_reroute_enable" >&6; }
    if test "x$ac_cv_lib_pri_pri_reroute_enable" = xyes; then :
      AST_PRI_CALL_REROUTING_FOUND=yes
    
      AST_PRI_CALL_REROUTING_FOUND=no
    
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       if test "${AST_PRI_CALL_REROUTING_FOUND}" = "yes"; then
          PRI_CALL_REROUTING_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_CALL_REROUTING=DIR has been specified, use it.
          if test "x${PRI_CALL_REROUTING_DIR}" != "x"; then
             PRI_CALL_REROUTING_INCLUDE="-I${PRI_CALL_REROUTING_DIR}/include"
    
          PRI_CALL_REROUTING_INCLUDE="${PRI_CALL_REROUTING_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_CALL_REROUTING_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_libpri_h" = xyes; then :
    
      PRI_CALL_REROUTING_HEADER_FOUND=1
    
      PRI_CALL_REROUTING_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${PRI_CALL_REROUTING_HEADER_FOUND}" = "x0" ; then
             PRI_CALL_REROUTING_LIB=""
             PRI_CALL_REROUTING_INCLUDE=""
    
             PBX_PRI_CALL_REROUTING=1
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_PRI_CALL_REROUTING 1
    
    if test "x${PBX_PRI_SETUP_KEYPAD}" != "x1" -a "${USE_PRI_SETUP_KEYPAD}" != "no"; then
    
       # if --with-PRI_SETUP_KEYPAD=DIR has been specified, use it.
       if test "x${PRI_SETUP_KEYPAD_DIR}" != "x"; then
          if test -d ${PRI_SETUP_KEYPAD_DIR}/lib; then
             pbxlibdir="-L${PRI_SETUP_KEYPAD_DIR}/lib"
    
             pbxlibdir="-L${PRI_SETUP_KEYPAD_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_sr_set_keypad_digits in -lpri" >&5
    $as_echo_n "checking for pri_sr_set_keypad_digits in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_sr_set_keypad_digits+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lpri ${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 pri_sr_set_keypad_digits ();
    
    return pri_sr_set_keypad_digits ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_pri_pri_sr_set_keypad_digits=yes
    
      ac_cv_lib_pri_pri_sr_set_keypad_digits=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_pri_pri_sr_set_keypad_digits" >&5
    $as_echo "$ac_cv_lib_pri_pri_sr_set_keypad_digits" >&6; }
    if test "x$ac_cv_lib_pri_pri_sr_set_keypad_digits" = xyes; then :
      AST_PRI_SETUP_KEYPAD_FOUND=yes
    
      AST_PRI_SETUP_KEYPAD_FOUND=no
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       # now check for the header.
    
       if test "${AST_PRI_SETUP_KEYPAD_FOUND}" = "yes"; then
          PRI_SETUP_KEYPAD_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_SETUP_KEYPAD=DIR has been specified, use it.
          if test "x${PRI_SETUP_KEYPAD_DIR}" != "x"; then
             PRI_SETUP_KEYPAD_INCLUDE="-I${PRI_SETUP_KEYPAD_DIR}/include"
    
          PRI_SETUP_KEYPAD_INCLUDE="${PRI_SETUP_KEYPAD_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_SETUP_KEYPAD_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_libpri_h" = xyes; then :
    
      PRI_SETUP_KEYPAD_HEADER_FOUND=1
    
      PRI_SETUP_KEYPAD_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${PRI_SETUP_KEYPAD_HEADER_FOUND}" = "x0" ; then
             PRI_SETUP_KEYPAD_LIB=""
             PRI_SETUP_KEYPAD_INCLUDE=""
    
             PBX_PRI_SETUP_KEYPAD=1
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_PRI_SETUP_KEYPAD 1
    
       # ------------------------------------v
       # TODO: The code can be changed to always include these features now.
       # These features will always be present if pri_connected_line_update is available.
    
    if test "x${PBX_PRI_PROG_W_CAUSE}" != "x1" -a "${USE_PRI_PROG_W_CAUSE}" != "no"; then
    
       # if --with-PRI_PROG_W_CAUSE=DIR has been specified, use it.
       if test "x${PRI_PROG_W_CAUSE_DIR}" != "x"; then
          if test -d ${PRI_PROG_W_CAUSE_DIR}/lib; then
             pbxlibdir="-L${PRI_PROG_W_CAUSE_DIR}/lib"
    
             pbxlibdir="-L${PRI_PROG_W_CAUSE_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_progress_with_cause in -lpri" >&5
    $as_echo_n "checking for pri_progress_with_cause in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_progress_with_cause+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lpri ${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 pri_progress_with_cause ();
    
    return pri_progress_with_cause ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_pri_pri_progress_with_cause=yes
    
      ac_cv_lib_pri_pri_progress_with_cause=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_pri_pri_progress_with_cause" >&5
    $as_echo "$ac_cv_lib_pri_pri_progress_with_cause" >&6; }
    if test "x$ac_cv_lib_pri_pri_progress_with_cause" = xyes; then :
      AST_PRI_PROG_W_CAUSE_FOUND=yes
    
      AST_PRI_PROG_W_CAUSE_FOUND=no
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       # now check for the header.
    
       if test "${AST_PRI_PROG_W_CAUSE_FOUND}" = "yes"; then
          PRI_PROG_W_CAUSE_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_PROG_W_CAUSE=DIR has been specified, use it.
          if test "x${PRI_PROG_W_CAUSE_DIR}" != "x"; then
             PRI_PROG_W_CAUSE_INCLUDE="-I${PRI_PROG_W_CAUSE_DIR}/include"
    
          PRI_PROG_W_CAUSE_INCLUDE="${PRI_PROG_W_CAUSE_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_PROG_W_CAUSE_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_libpri_h" = xyes; then :
    
      PRI_PROG_W_CAUSE_HEADER_FOUND=1
    
      PRI_PROG_W_CAUSE_HEADER_FOUND=0
    
    fi
    
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${PRI_PROG_W_CAUSE_HEADER_FOUND}" = "x0" ; then
             PRI_PROG_W_CAUSE_LIB=""
             PRI_PROG_W_CAUSE_INCLUDE=""
    
             PBX_PRI_PROG_W_CAUSE=1
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_PRI_PROG_W_CAUSE 1
    
    if test "x${PBX_PRI_INBANDDISCONNECT}" != "x1" -a "${USE_PRI_INBANDDISCONNECT}" != "no"; then
    
       # if --with-PRI_INBANDDISCONNECT=DIR has been specified, use it.
       if test "x${PRI_INBANDDISCONNECT_DIR}" != "x"; then
          if test -d ${PRI_INBANDDISCONNECT_DIR}/lib; then
             pbxlibdir="-L${PRI_INBANDDISCONNECT_DIR}/lib"
    
             pbxlibdir="-L${PRI_INBANDDISCONNECT_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_set_inbanddisconnect in -lpri" >&5
    $as_echo_n "checking for pri_set_inbanddisconnect in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_set_inbanddisconnect+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lpri ${pbxlibdir}  $LIBS"
    
    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
    
    char pri_set_inbanddisconnect ();
    
    return pri_set_inbanddisconnect ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_pri_pri_set_inbanddisconnect=yes
    
      ac_cv_lib_pri_pri_set_inbanddisconnect=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_pri_pri_set_inbanddisconnect" >&5
    $as_echo "$ac_cv_lib_pri_pri_set_inbanddisconnect" >&6; }
    if test "x$ac_cv_lib_pri_pri_set_inbanddisconnect" = xyes; then :
      AST_PRI_INBANDDISCONNECT_FOUND=yes
    
      AST_PRI_INBANDDISCONNECT_FOUND=no
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       # now check for the header.
    
       if test "${AST_PRI_INBANDDISCONNECT_FOUND}" = "yes"; then
          PRI_INBANDDISCONNECT_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_INBANDDISCONNECT=DIR has been specified, use it.
          if test "x${PRI_INBANDDISCONNECT_DIR}" != "x"; then
             PRI_INBANDDISCONNECT_INCLUDE="-I${PRI_INBANDDISCONNECT_DIR}/include"
    
          PRI_INBANDDISCONNECT_INCLUDE="${PRI_INBANDDISCONNECT_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_INBANDDISCONNECT_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    if test "x$ac_cv_header_libpri_h" = xyes; then :
      PRI_INBANDDISCONNECT_HEADER_FOUND=1
    
      PRI_INBANDDISCONNECT_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${PRI_INBANDDISCONNECT_HEADER_FOUND}" = "x0" ; then
             PRI_INBANDDISCONNECT_LIB=""
             PRI_INBANDDISCONNECT_INCLUDE=""
    
             PBX_PRI_INBANDDISCONNECT=1
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_PRI_INBANDDISCONNECT 1
    
    if test "x${PBX_PRI_SERVICE_MESSAGES}" != "x1" -a "${USE_PRI_SERVICE_MESSAGES}" != "no"; then
    
       # if --with-PRI_SERVICE_MESSAGES=DIR has been specified, use it.
       if test "x${PRI_SERVICE_MESSAGES_DIR}" != "x"; then
          if test -d ${PRI_SERVICE_MESSAGES_DIR}/lib; then
             pbxlibdir="-L${PRI_SERVICE_MESSAGES_DIR}/lib"
    
             pbxlibdir="-L${PRI_SERVICE_MESSAGES_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_maintenance_service in -lpri" >&5
    $as_echo_n "checking for pri_maintenance_service in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_maintenance_service+:} false; then :
    
      $as_echo_n "(cached) " >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lpri ${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 pri_maintenance_service ();
    
    return pri_maintenance_service ();
    
      ;
      return 0;
    }
    _ACEOF
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_pri_pri_maintenance_service=yes
    
      ac_cv_lib_pri_pri_maintenance_service=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_pri_pri_maintenance_service" >&5
    $as_echo "$ac_cv_lib_pri_pri_maintenance_service" >&6; }
    if test "x$ac_cv_lib_pri_pri_maintenance_service" = xyes; then :
      AST_PRI_SERVICE_MESSAGES_FOUND=yes
    
      AST_PRI_SERVICE_MESSAGES_FOUND=no
    
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       if test "${AST_PRI_SERVICE_MESSAGES_FOUND}" = "yes"; then
          PRI_SERVICE_MESSAGES_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_SERVICE_MESSAGES=DIR has been specified, use it.
          if test "x${PRI_SERVICE_MESSAGES_DIR}" != "x"; then
             PRI_SERVICE_MESSAGES_INCLUDE="-I${PRI_SERVICE_MESSAGES_DIR}/include"
    
          PRI_SERVICE_MESSAGES_INCLUDE="${PRI_SERVICE_MESSAGES_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_SERVICE_MESSAGES_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    if test "x$ac_cv_header_libpri_h" = xyes; then :
      PRI_SERVICE_MESSAGES_HEADER_FOUND=1
    
      PRI_SERVICE_MESSAGES_HEADER_FOUND=0
    
    fi
    
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${PRI_SERVICE_MESSAGES_HEADER_FOUND}" = "x0" ; then
             PRI_SERVICE_MESSAGES_LIB=""
             PRI_SERVICE_MESSAGES_INCLUDE=""
    
             PBX_PRI_SERVICE_MESSAGES=1
    
    #define HAVE_PRI_SERVICE_MESSAGES 1
    
    if test "x${PBX_PRI_REVERSE_CHARGE}" != "x1" -a "${USE_PRI_REVERSE_CHARGE}" != "no"; then
    
       # if --with-PRI_REVERSE_CHARGE=DIR has been specified, use it.
       if test "x${PRI_REVERSE_CHARGE_DIR}" != "x"; then
          if test -d ${PRI_REVERSE_CHARGE_DIR}/lib; then
             pbxlibdir="-L${PRI_REVERSE_CHARGE_DIR}/lib"
    
             pbxlibdir="-L${PRI_REVERSE_CHARGE_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_sr_set_reversecharge in -lpri" >&5
    $as_echo_n "checking for pri_sr_set_reversecharge in -lpri... " >&6; }
    if ${ac_cv_lib_pri_pri_sr_set_reversecharge+:} false; then :
    
      $as_echo_n "(cached) " >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lpri ${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 pri_sr_set_reversecharge ();
    
    return pri_sr_set_reversecharge ();
    
      ac_cv_lib_pri_pri_sr_set_reversecharge=yes
    
      ac_cv_lib_pri_pri_sr_set_reversecharge=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_pri_pri_sr_set_reversecharge" >&5
    $as_echo "$ac_cv_lib_pri_pri_sr_set_reversecharge" >&6; }
    if test "x$ac_cv_lib_pri_pri_sr_set_reversecharge" = xyes; then :
      AST_PRI_REVERSE_CHARGE_FOUND=yes
    
      AST_PRI_REVERSE_CHARGE_FOUND=no
    
       if test "${AST_PRI_REVERSE_CHARGE_FOUND}" = "yes"; then
          PRI_REVERSE_CHARGE_LIB="${pbxlibdir} -lpri "
          # if --with-PRI_REVERSE_CHARGE=DIR has been specified, use it.
          if test "x${PRI_REVERSE_CHARGE_DIR}" != "x"; then
             PRI_REVERSE_CHARGE_INCLUDE="-I${PRI_REVERSE_CHARGE_DIR}/include"
    
          PRI_REVERSE_CHARGE_INCLUDE="${PRI_REVERSE_CHARGE_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${PRI_REVERSE_CHARGE_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
    if test "x$ac_cv_header_libpri_h" = xyes; then :
      PRI_REVERSE_CHARGE_HEADER_FOUND=1
    
      PRI_REVERSE_CHARGE_HEADER_FOUND=0
    
          if test "x${PRI_REVERSE_CHARGE_HEADER_FOUND}" = "x0" ; then
             PRI_REVERSE_CHARGE_LIB=""
             PRI_REVERSE_CHARGE_INCLUDE=""
    
             PBX_PRI_REVERSE_CHARGE=1
    
    #define HAVE_PRI_REVERSE_CHARGE 1
    
       # ------------------------------------^
    
    if test "x${PBX_RESAMPLE}" != "x1" -a "${USE_RESAMPLE}" != "no"; then
    
       # if --with-RESAMPLE=DIR has been specified, use it.
       if test "x${RESAMPLE_DIR}" != "x"; then
          if test -d ${RESAMPLE_DIR}/lib; then
             pbxlibdir="-L${RESAMPLE_DIR}/lib"
    
             pbxlibdir="-L${RESAMPLE_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resample_open in -lresample" >&5
    $as_echo_n "checking for resample_open in -lresample... " >&6; }
    if ${ac_cv_lib_resample_resample_open+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lresample ${pbxlibdir} -lm $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 resample_open ();
    
    return resample_open ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_resample_resample_open=yes
    
      ac_cv_lib_resample_resample_open=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_resample_resample_open" >&5
    $as_echo "$ac_cv_lib_resample_resample_open" >&6; }
    if test "x$ac_cv_lib_resample_resample_open" = xyes; then :
      AST_RESAMPLE_FOUND=yes
    
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
    
       if test "${AST_RESAMPLE_FOUND}" = "yes"; then
          RESAMPLE_LIB="${pbxlibdir} -lresample -lm"
          # if --with-RESAMPLE=DIR has been specified, use it.
          if test "x${RESAMPLE_DIR}" != "x"; then
             RESAMPLE_INCLUDE="-I${RESAMPLE_DIR}/include"
    
          RESAMPLE_INCLUDE="${RESAMPLE_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${RESAMPLE_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "libresample.h" "ac_cv_header_libresample_h" "$ac_includes_default"
    if test "x$ac_cv_header_libresample_h" = xyes; then :
      RESAMPLE_HEADER_FOUND=1
    
      RESAMPLE_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${RESAMPLE_HEADER_FOUND}" = "x0" ; then
             RESAMPLE_LIB=""
             RESAMPLE_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_RESAMPLE 1
    
    if test "x${PBX_FFTW3}" != "x1" -a "${USE_FFTW3}" != "no"; then
    
       # if --with-FFTW3=DIR has been specified, use it.
       if test "x${FFTW3_DIR}" != "x"; then
          if test -d ${FFTW3_DIR}/lib; then
             pbxlibdir="-L${FFTW3_DIR}/lib"
    
             pbxlibdir="-L${FFTW3_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_malloc in -lfftw3" >&5
    $as_echo_n "checking for fftw_malloc in -lfftw3... " >&6; }
    if ${ac_cv_lib_fftw3_fftw_malloc+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lfftw3 ${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
    
    return fftw_malloc ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_fftw3_fftw_malloc=yes
    
      ac_cv_lib_fftw3_fftw_malloc=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_fftw3_fftw_malloc" >&5
    $as_echo "$ac_cv_lib_fftw3_fftw_malloc" >&6; }
    if test "x$ac_cv_lib_fftw3_fftw_malloc" = xyes; then :
      AST_FFTW3_FOUND=yes
    
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       if test "${AST_FFTW3_FOUND}" = "yes"; then
          FFTW3_LIB="${pbxlibdir} -lfftw3 "
          # if --with-FFTW3=DIR has been specified, use it.
          if test "x${FFTW3_DIR}" != "x"; then
             FFTW3_INCLUDE="-I${FFTW3_DIR}/include"
    
          FFTW3_INCLUDE="${FFTW3_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${FFTW3_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
    if test "x$ac_cv_header_fftw3_h" = xyes; then :
      FFTW3_HEADER_FOUND=1
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${FFTW3_HEADER_FOUND}" = "x0" ; then
             FFTW3_LIB=""
             FFTW3_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    if test "x${PBX_SNDFILE}" != "x1" -a "${USE_SNDFILE}" != "no"; then
    
       # if --with-SNDFILE=DIR has been specified, use it.
       if test "x${SNDFILE_DIR}" != "x"; then
          if test -d ${SNDFILE_DIR}/lib; then
             pbxlibdir="-L${SNDFILE_DIR}/lib"
    
             pbxlibdir="-L${SNDFILE_DIR}"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sf_open in -lsndfile" >&5
    $as_echo_n "checking for sf_open in -lsndfile... " >&6; }
    if ${ac_cv_lib_sndfile_sf_open+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      ac_check_lib_save_LIBS=$LIBS
    
    LIBS="-lsndfile ${pbxlibdir}  $LIBS"
    
    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
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_sndfile_sf_open=yes
    
      ac_cv_lib_sndfile_sf_open=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_sndfile_sf_open" >&5
    $as_echo "$ac_cv_lib_sndfile_sf_open" >&6; }
    if test "x$ac_cv_lib_sndfile_sf_open" = xyes; then :
      AST_SNDFILE_FOUND=yes
    
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
    
       if test "${AST_SNDFILE_FOUND}" = "yes"; then
          SNDFILE_LIB="${pbxlibdir} -lsndfile "
          # if --with-SNDFILE=DIR has been specified, use it.
          if test "x${SNDFILE_DIR}" != "x"; then
             SNDFILE_INCLUDE="-I${SNDFILE_DIR}/include"
    
          SNDFILE_INCLUDE="${SNDFILE_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${SNDFILE_INCLUDE}"
             ac_fn_c_check_header_mongrel "$LINENO" "sndfile.h" "ac_cv_header_sndfile_h" "$ac_includes_default"
    if test "x$ac_cv_header_sndfile_h" = xyes; then :
      SNDFILE_HEADER_FOUND=1
    
      SNDFILE_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${SNDFILE_HEADER_FOUND}" = "x0" ; then
             SNDFILE_LIB=""
             SNDFILE_INCLUDE=""
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_SNDFILE 1
    
        if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for minimum version of SpanDSP" >&5
    $as_echo_n "checking for minimum version of SpanDSP... " >&6; }
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${SPANDSP_DIR}" != "x"; then
    	    SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
    
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    /* end confdefs.h.  */
     #include <spandsp/version.h>
    int
    main ()
    {
    
    		#if SPANDSP_RELEASE_DATE < 20080516
    		#error "spandsp 0.0.5 or greater is required"
    		#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_SPANDSP=1