res_smdi: Fix shutdown ref.
[asterisk/asterisk.git] / configure
index 70553fc..c672df9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,4 @@
 #! /bin/sh
-# From configure.ac Revision.
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.69 for asterisk trunk.
 #
@@ -952,10 +951,6 @@ PBX_PJSIP_TSX_LAYER_FIND_TSX2
 PJSIP_TSX_LAYER_FIND_TSX2_DIR
 PJSIP_TSX_LAYER_FIND_TSX2_INCLUDE
 PJSIP_TSX_LAYER_FIND_TSX2_LIB
-PBX_PJSIP_EVSUB_SET_UAS_TIMEOUT
-PJSIP_EVSUB_SET_UAS_TIMEOUT_DIR
-PJSIP_EVSUB_SET_UAS_TIMEOUT_INCLUDE
-PJSIP_EVSUB_SET_UAS_TIMEOUT_LIB
 PBX_PJSIP_AUTH_CLT_DEINIT
 PJSIP_AUTH_CLT_DEINIT_DIR
 PJSIP_AUTH_CLT_DEINIT_INCLUDE
@@ -996,6 +991,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
@@ -1277,6 +1276,7 @@ COMPRESS
 FIND
 PYTHON
 FLEX
+CUT
 CAT
 CMP
 BISON
@@ -1443,6 +1443,7 @@ with_opusfile
 with_osptk
 with_oss
 with_postgres
+with_beanstalk
 with_pjproject
 with_popt
 with_portaudio
@@ -2200,6 +2201,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
@@ -3709,7 +3711,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 ac_aux_dir=
-for ac_dir in `pwd` "$srcdir"/`pwd`; do
+for ac_dir in "$srcdir"/; do
   if test -f "$ac_dir/install-sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -3725,7 +3727,7 @@ for ac_dir in `pwd` "$srcdir"/`pwd`; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\"/" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -3740,7 +3742,6 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
-
 # preserve any CFLAGS or LDFLAGS that may be set
 # NOTE: This must be done before calling any macros that end up
 # calling AC_PROG_CC or the like, since they will set a default
@@ -6865,6 +6866,47 @@ $as_echo "no" >&6; }
 fi
 
 
+# Extract the first word of "cut", so it can be a program name with args.
+set dummy cut; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CUT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CUT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_CUT" && ac_cv_path_CUT=":"
+  ;;
+esac
+fi
+CUT=$ac_cv_path_CUT
+if test -n "$CUT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
+$as_echo "$CUT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 # Extract the first word of "flex", so it can be a program name with args.
 set dummy flex; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -9343,6 +9385,12 @@ $as_echo "configuring" >&6; }
        if test "${CAT}" = ":" ; then
                as_fn_error $? "cat is required to build bundled pjproject" "$LINENO" 5
        fi
+       if test "${CUT}" = ":" ; then
+               as_fn_error $? "cut is required to build bundled pjproject" "$LINENO" 5
+       fi
+       if test "${GREP}" = ":" ; then
+               as_fn_error $? "grep is required to build bundled pjproject" "$LINENO" 5
+       fi
 
 
        this_host=$(./config.sub $(./config.guess))
@@ -9353,7 +9401,7 @@ $as_echo "configuring" >&6; }
                PJPROJECT_CONFIGURE_OPTS+=" --host=$host"
        fi
 
-       export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT
+       export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
        export NOISY_BUILD
        ${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
                PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
@@ -9412,9 +9460,6 @@ $as_echo "#define HAVE_PJSIP_INV_SESSION_REF 1" >>confdefs.h
 $as_echo "#define HAVE_PJSIP_AUTH_CLT_DEINIT 1" >>confdefs.h
 
 
-$as_echo "#define HAVE_PJSIP_EVSUB_SET_UAS_TIMEOUT 1" >>confdefs.h
-
-
 $as_echo "#define HAVE_PJSIP_TSX_LAYER_FIND_TSX2 1" >>confdefs.h
 
 
 
 
 
+    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"
@@ -11645,18 +11722,6 @@ PBX_PJSIP_AUTH_CLT_DEINIT=0
 
 
 
-PJSIP_EVSUB_SET_UAS_TIMEOUT_DESCRIP="PJSIP EVSUB Set UAS Timeout support"
-PJSIP_EVSUB_SET_UAS_TIMEOUT_OPTION=pjsip
-PJSIP_EVSUB_SET_UAS_TIMEOUT_DIR=${PJPROJECT_DIR}
-
-PBX_PJSIP_EVSUB_SET_UAS_TIMEOUT=0
-
-
-
-
-
-
-
 PJSIP_TSX_LAYER_FIND_TSX2_DESCRIP="pjsip_tsx_layer_find_tsx2 support"
 PJSIP_TSX_LAYER_FIND_TSX2_OPTION=pjsip
 PJSIP_TSX_LAYER_FIND_TSX2_DIR=${PJPROJECT_DIR}
@@ -13554,16 +13619,12 @@ if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then
          pbxlibdir="-L${TERMCAP_DIR}"
       fi
    fi
-   pbxfuncname="tgetent"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_TERMCAP_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_termcap_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltermcap" >&5
-$as_echo_n "checking for ${pbxfuncname} in -ltermcap... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
+$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
+if ${ac_cv_lib_termcap_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13577,35 +13638,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char tgetent ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return tgetent ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_termcap_tgetent=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_termcap_tgetent=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
+$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
+if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
   AST_TERMCAP_FOUND=yes
 else
   AST_TERMCAP_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_TERMCAP_FOUND}" = "yes"; then
          TERMCAP_INCLUDE="-I${TERMCAP_DIR}/include"
       fi
       TERMCAP_INCLUDE="${TERMCAP_INCLUDE} "
-      if test "x" = "x" ; then # no header, assume found
-         TERMCAP_HEADER_FOUND="1"
-      else                             # check for the header
-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${TERMCAP_INCLUDE}"
-         ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
-if test "x$ac_cv_header_" = xyes; then :
-  TERMCAP_HEADER_FOUND=1
-else
-  TERMCAP_HEADER_FOUND=0
-fi
 
+         # no header, assume found
+         TERMCAP_HEADER_FOUND="1"
 
-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
       if test "x${TERMCAP_HEADER_FOUND}" = "x0" ; then
          TERMCAP_LIB=""
          TERMCAP_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            TERMCAP_LIB=""
-         fi
+
          PBX_TERMCAP=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_TERMCAP 1
@@ -13658,16 +13705,12 @@ if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then
          pbxlibdir="-L${TINFO_DIR}"
       fi
    fi
-   pbxfuncname="tgetent"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_TINFO_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_tinfo_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltinfo" >&5
-$as_echo_n "checking for ${pbxfuncname} in -ltinfo... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
+$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
+if ${ac_cv_lib_tinfo_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13681,35 +13724,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char tgetent ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return tgetent ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_tinfo_tgetent=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_tinfo_tgetent=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
+$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
+if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
   AST_TINFO_FOUND=yes
 else
   AST_TINFO_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_TINFO_FOUND}" = "yes"; then
          TINFO_INCLUDE="-I${TINFO_DIR}/include"
       fi
       TINFO_INCLUDE="${TINFO_INCLUDE} "
-      if test "x" = "x" ; then # no header, assume found
-         TINFO_HEADER_FOUND="1"
-      else                             # check for the header
-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${TINFO_INCLUDE}"
-         ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
-if test "x$ac_cv_header_" = xyes; then :
-  TINFO_HEADER_FOUND=1
-else
-  TINFO_HEADER_FOUND=0
-fi
 
+         # no header, assume found
+         TINFO_HEADER_FOUND="1"
 
-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
       if test "x${TINFO_HEADER_FOUND}" = "x0" ; then
          TINFO_LIB=""
          TINFO_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            TINFO_LIB=""
-         fi
+
          PBX_TINFO=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_TINFO 1
@@ -13762,16 +13791,12 @@ if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then
          pbxlibdir="-L${CURSES_DIR}"
       fi
    fi
-   pbxfuncname="initscr"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_CURSES_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_curses_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcurses" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lcurses... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5
+$as_echo_n "checking for initscr in -lcurses... " >&6; }
+if ${ac_cv_lib_curses_initscr+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13785,35 +13810,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char initscr ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return initscr ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_curses_initscr=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_curses_initscr=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5
+$as_echo "$ac_cv_lib_curses_initscr" >&6; }
+if test "x$ac_cv_lib_curses_initscr" = xyes; then :
   AST_CURSES_FOUND=yes
 else
   AST_CURSES_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_CURSES_FOUND}" = "yes"; then
@@ -13823,9 +13847,8 @@ fi
          CURSES_INCLUDE="-I${CURSES_DIR}/include"
       fi
       CURSES_INCLUDE="${CURSES_INCLUDE} "
-      if test "xcurses.h" = "x" ; then # no header, assume found
-         CURSES_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${CURSES_HEADER_FOUND}" = "x0" ; then
          CURSES_LIB=""
          CURSES_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            CURSES_LIB=""
-         fi
+
          PBX_CURSES=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_CURSES 1
@@ -13866,16 +13887,12 @@ if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then
          pbxlibdir="-L${NCURSES_DIR}"
       fi
    fi
-   pbxfuncname="initscr"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_NCURSES_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ncurses_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lncurses" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lncurses... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5
+$as_echo_n "checking for initscr in -lncurses... " >&6; }
+if ${ac_cv_lib_ncurses_initscr+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13889,35 +13906,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char initscr ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return initscr ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ncurses_initscr=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ncurses_initscr=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5
+$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }
+if test "x$ac_cv_lib_ncurses_initscr" = xyes; then :
   AST_NCURSES_FOUND=yes
 else
   AST_NCURSES_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_NCURSES_FOUND}" = "yes"; then
@@ -13927,9 +13943,8 @@ fi
          NCURSES_INCLUDE="-I${NCURSES_DIR}/include"
       fi
       NCURSES_INCLUDE="${NCURSES_INCLUDE} "
-      if test "xcurses.h" = "x" ; then # no header, assume found
-         NCURSES_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${NCURSES_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${NCURSES_HEADER_FOUND}" = "x0" ; then
          NCURSES_LIB=""
          NCURSES_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            NCURSES_LIB=""
-         fi
+
          PBX_NCURSES=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_NCURSES 1
@@ -13989,16 +14002,12 @@ if test "x${PBX_LIBUUID}" != "x1" -a "${USE_LIBUUID}" != "no"; then
          pbxlibdir="-L${LIBUUID_DIR}"
       fi
    fi
-   pbxfuncname="uuid_generate_random"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_LIBUUID_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_uuid_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -luuid" >&5
-$as_echo_n "checking for ${pbxfuncname} in -luuid... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_random in -luuid" >&5
+$as_echo_n "checking for uuid_generate_random in -luuid... " >&6; }
+if ${ac_cv_lib_uuid_uuid_generate_random+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14012,35 +14021,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char uuid_generate_random ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return uuid_generate_random ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_uuid_uuid_generate_random=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_uuid_uuid_generate_random=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_random" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_generate_random" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate_random" = xyes; then :
   AST_LIBUUID_FOUND=yes
 else
   AST_LIBUUID_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_LIBUUID_FOUND}" = "yes"; then
@@ -14050,9 +14058,8 @@ fi
          LIBUUID_INCLUDE="-I${LIBUUID_DIR}/include"
       fi
       LIBUUID_INCLUDE="${LIBUUID_INCLUDE} "
-      if test "xuuid/uuid.h" = "x" ; then      # no header, assume found
-         LIBUUID_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${LIBUUID_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${LIBUUID_HEADER_FOUND}" = "x0" ; then
          LIBUUID_LIB=""
          LIBUUID_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            LIBUUID_LIB=""
-         fi
+
          PBX_LIBUUID=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBUUID 1
@@ -14093,16 +14098,12 @@ if test "x${PBX_E2FSUUID}" != "x1" -a "${USE_E2FSUUID}" != "no"; then
          pbxlibdir="-L${E2FSUUID_DIR}"
       fi
    fi
-   pbxfuncname="uuid_generate_random"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_E2FSUUID_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_e2fs-uuid_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -le2fs-uuid" >&5
-$as_echo_n "checking for ${pbxfuncname} in -le2fs-uuid... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_random in -le2fs-uuid" >&5
+$as_echo_n "checking for uuid_generate_random in -le2fs-uuid... " >&6; }
+if ${ac_cv_lib_e2fs_uuid_uuid_generate_random+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14116,35 +14117,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char uuid_generate_random ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return uuid_generate_random ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_e2fs_uuid_uuid_generate_random=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_e2fs_uuid_uuid_generate_random=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_e2fs_uuid_uuid_generate_random" >&5
+$as_echo "$ac_cv_lib_e2fs_uuid_uuid_generate_random" >&6; }
+if test "x$ac_cv_lib_e2fs_uuid_uuid_generate_random" = xyes; then :
   AST_E2FSUUID_FOUND=yes
 else
   AST_E2FSUUID_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_E2FSUUID_FOUND}" = "yes"; then
@@ -14154,9 +14154,8 @@ fi
          E2FSUUID_INCLUDE="-I${E2FSUUID_DIR}/include"
       fi
       E2FSUUID_INCLUDE="${E2FSUUID_INCLUDE} "
-      if test "xuuid/uuid.h" = "x" ; then      # no header, assume found
-         E2FSUUID_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${E2FSUUID_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${E2FSUUID_HEADER_FOUND}" = "x0" ; then
          E2FSUUID_LIB=""
          E2FSUUID_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            E2FSUUID_LIB=""
-         fi
+
          PBX_E2FSUUID=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_E2FSUUID 1
@@ -14227,16 +14224,12 @@ if test "x${PBX_JANSSON}" != "x1" -a "${USE_JANSSON}" != "no"; then
          pbxlibdir="-L${JANSSON_DIR}"
       fi
    fi
-   pbxfuncname="json_dumps"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_JANSSON_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_jansson_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ljansson" >&5
-$as_echo_n "checking for ${pbxfuncname} in -ljansson... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_dumps in -ljansson" >&5
+$as_echo_n "checking for json_dumps in -ljansson... " >&6; }
+if ${ac_cv_lib_jansson_json_dumps+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14250,35 +14243,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char json_dumps ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return json_dumps ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_jansson_json_dumps=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_jansson_json_dumps=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jansson_json_dumps" >&5
+$as_echo "$ac_cv_lib_jansson_json_dumps" >&6; }
+if test "x$ac_cv_lib_jansson_json_dumps" = xyes; then :
   AST_JANSSON_FOUND=yes
 else
   AST_JANSSON_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_JANSSON_FOUND}" = "yes"; then
@@ -14288,9 +14280,8 @@ fi
          JANSSON_INCLUDE="-I${JANSSON_DIR}/include"
       fi
       JANSSON_INCLUDE="${JANSSON_INCLUDE} "
-      if test "xjansson.h" = "x" ; then        # no header, assume found
-         JANSSON_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${JANSSON_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "jansson.h" "ac_cv_header_jansson_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${JANSSON_HEADER_FOUND}" = "x0" ; then
          JANSSON_LIB=""
          JANSSON_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            JANSSON_LIB=""
-         fi
+
          PBX_JANSSON=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_JANSSON 1
@@ -14337,16 +14326,12 @@ if test "x${PBX_RT}" != "x1" -a "${USE_RT}" != "no"; then
          pbxlibdir="-L${RT_DIR}"
       fi
    fi
-   pbxfuncname="clock_gettime"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_RT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_rt_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lrt" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lrt... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
+$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+if ${ac_cv_lib_rt_clock_gettime+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14360,35 +14345,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char clock_gettime ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return clock_gettime ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_rt_clock_gettime=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_rt_clock_gettime=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
   AST_RT_FOUND=yes
 else
   AST_RT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_RT_FOUND}" = "yes"; then
          RT_INCLUDE="-I${RT_DIR}/include"
       fi
       RT_INCLUDE="${RT_INCLUDE} "
-      if test "x" = "x" ; then # no header, assume found
-         RT_HEADER_FOUND="1"
-      else                             # check for the header
-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${RT_INCLUDE}"
-         ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
-if test "x$ac_cv_header_" = xyes; then :
-  RT_HEADER_FOUND=1
-else
-  RT_HEADER_FOUND=0
-fi
 
+         # no header, assume found
+         RT_HEADER_FOUND="1"
 
-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
       if test "x${RT_HEADER_FOUND}" = "x0" ; then
          RT_LIB=""
          RT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            RT_LIB=""
-         fi
+
          PBX_RT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_RT 1
@@ -14535,16 +14506,13 @@ else
 fi
 
                if test ! "x${CONFIG_LIBXML2}" = xNo; then
-                       if test x"" = x ; then A=--cflags ; else A="" ; fi
-                       LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
+                       LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} --cflags)
                        LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")
 
-                       if test x"" = x ; then A=--libs ; else A="" ; fi
-                       LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
+                       LIBXML2_LIB=$(${CONFIG_LIBXML2} --libs)
                        LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")
 
-                       if test x"#include <libxml/tree.h>
-        #include <libxml/parser.h>" != x ; then
+
                                saved_cppflags="${CPPFLAGS}"
                                CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"
 
@@ -14572,12 +14540,7 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
                                CPPFLAGS="${saved_cppflags}"
                                LIBS="${saved_libs}"
-                       else
-                               PBX_LIBXML2=1
-
-$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
 
-                       fi
                fi
        fi
 
@@ -14601,16 +14564,12 @@ if test "x${PBX_URIPARSER}" != "x1" -a "${USE_URIPARSER}" != "no"; then
          pbxlibdir="-L${URIPARSER_DIR}"
       fi
    fi
-   pbxfuncname="uriParseUriA"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_URIPARSER_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_uriparser_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -luriparser" >&5
-$as_echo_n "checking for ${pbxfuncname} in -luriparser... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uriParseUriA in -luriparser" >&5
+$as_echo_n "checking for uriParseUriA in -luriparser... " >&6; }
+if ${ac_cv_lib_uriparser_uriParseUriA+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14624,35 +14583,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char uriParseUriA ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return uriParseUriA ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_uriparser_uriParseUriA=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_uriparser_uriParseUriA=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uriparser_uriParseUriA" >&5
+$as_echo "$ac_cv_lib_uriparser_uriParseUriA" >&6; }
+if test "x$ac_cv_lib_uriparser_uriParseUriA" = xyes; then :
   AST_URIPARSER_FOUND=yes
 else
   AST_URIPARSER_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_URIPARSER_FOUND}" = "yes"; then
@@ -14662,9 +14620,8 @@ fi
          URIPARSER_INCLUDE="-I${URIPARSER_DIR}/include"
       fi
       URIPARSER_INCLUDE="${URIPARSER_INCLUDE} "
-      if test "xuriparser/Uri.h" = "x" ; then  # no header, assume found
-         URIPARSER_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${URIPARSER_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "uriparser/Uri.h" "ac_cv_header_uriparser_Uri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${URIPARSER_HEADER_FOUND}" = "x0" ; then
          URIPARSER_LIB=""
          URIPARSER_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            URIPARSER_LIB=""
-         fi
+
          PBX_URIPARSER=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_URIPARSER 1
@@ -14724,16 +14679,12 @@ if test "x${PBX_LIBXSLT}" != "x1" -a "${USE_LIBXSLT}" != "no"; then
          pbxlibdir="-L${LIBXSLT_DIR}"
       fi
    fi
-   pbxfuncname="xsltLoadStylesheetPI"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_LIBXSLT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"
-      as_ac_Lib=`$as_echo "ac_cv_lib_xslt_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lxslt" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lxslt... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltLoadStylesheetPI in -lxslt" >&5
+$as_echo_n "checking for xsltLoadStylesheetPI in -lxslt... " >&6; }
+if ${ac_cv_lib_xslt_xsltLoadStylesheetPI+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14747,35 +14698,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char xsltLoadStylesheetPI ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return xsltLoadStylesheetPI ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_xslt_xsltLoadStylesheetPI=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_xslt_xsltLoadStylesheetPI=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltLoadStylesheetPI" >&5
+$as_echo "$ac_cv_lib_xslt_xsltLoadStylesheetPI" >&6; }
+if test "x$ac_cv_lib_xslt_xsltLoadStylesheetPI" = xyes; then :
   AST_LIBXSLT_FOUND=yes
 else
   AST_LIBXSLT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_LIBXSLT_FOUND}" = "yes"; then
@@ -14785,9 +14735,8 @@ fi
          LIBXSLT_INCLUDE="-I${LIBXSLT_DIR}/include"
       fi
       LIBXSLT_INCLUDE="${LIBXSLT_INCLUDE} ${LIBXML2_INCLUDE}"
-      if test "xlibxslt/xsltInternals.h" = "x" ; then  # no header, assume found
-         LIBXSLT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${LIBXSLT_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${LIBXSLT_HEADER_FOUND}" = "x0" ; then
          LIBXSLT_LIB=""
          LIBXSLT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            LIBXSLT_LIB=""
-         fi
+
          PBX_LIBXSLT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXSLT 1
@@ -14828,16 +14775,12 @@ if test "x${PBX_LIBXSLT_CLEANUP}" != "x1" -a "${USE_LIBXSLT_CLEANUP}" != "no"; t
          pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}"
       fi
    fi
-   pbxfuncname="xsltCleanupGlobals"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_LIBXSLT_CLEANUP_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"
-      as_ac_Lib=`$as_echo "ac_cv_lib_xslt_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lxslt" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lxslt... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
+$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
+if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14851,35 +14794,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char xsltCleanupGlobals ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return xsltCleanupGlobals ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_xslt_xsltCleanupGlobals=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_xslt_xsltCleanupGlobals=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
+$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
+if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
   AST_LIBXSLT_CLEANUP_FOUND=yes
 else
   AST_LIBXSLT_CLEANUP_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_LIBXSLT_CLEANUP_FOUND}" = "yes"; then
@@ -14889,9 +14831,8 @@ fi
          LIBXSLT_CLEANUP_INCLUDE="-I${LIBXSLT_CLEANUP_DIR}/include"
       fi
       LIBXSLT_CLEANUP_INCLUDE="${LIBXSLT_CLEANUP_INCLUDE} ${LIBXML2_INCLUDE}"
-      if test "xlibxslt/xsltInternals.h" = "x" ; then  # no header, assume found
-         LIBXSLT_CLEANUP_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${LIBXSLT_CLEANUP_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${LIBXSLT_CLEANUP_HEADER_FOUND}" = "x0" ; then
          LIBXSLT_CLEANUP_LIB=""
          LIBXSLT_CLEANUP_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            LIBXSLT_CLEANUP_LIB=""
-         fi
+
          PBX_LIBXSLT_CLEANUP=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXSLT_CLEANUP 1
@@ -18141,8 +18080,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_pure=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18170,35 +18107,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_pure=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_pure 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18212,8 +18120,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_malloc=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18241,35 +18147,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_malloc=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_malloc 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18283,8 +18160,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_const=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18312,35 +18187,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_const=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_const 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18354,8 +18200,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_unused=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18383,35 +18227,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_unused=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_unused 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18425,8 +18240,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_always_inline=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18454,35 +18267,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_always_inline=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_always_inline 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18496,8 +18280,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_deprecated=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18525,35 +18307,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_deprecated=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_deprecated 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18567,8 +18320,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_sentinel=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18596,35 +18347,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_sentinel=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_sentinel 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18638,8 +18360,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_warn_unused_result=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18667,35 +18387,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_warn_unused_result=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_warn_unused_result 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18709,8 +18400,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_may_alias=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((may_alias)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18738,35 +18427,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_may_alias=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_may_alias 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18780,8 +18440,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_constructor=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((constructor)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18809,35 +18467,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_constructor=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_constructor 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18855,8 +18484,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_destructor=0
 
-if test "x" = "x"
-then
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((destructor)) *test(void *muffin, ...) {return (void *) 0;}
@@ -18884,35 +18511,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__(()) *test(void *muffin, ...) ;
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_destructor=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_destructor 1
-_ACEOF
-
-else
-  { $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
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -18929,36 +18527,6 @@ CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 ax_cv_have_func_attribute_noreturn=0
 
-if test "xnoreturn" = "x"
-then
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- void __attribute__((noreturn)) *test(void *muffin, ...) {return (void *) 0;}
-int
-main ()
-{
-
-  ;
-  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; }
-
-       ax_cv_have_func_attribute_noreturn=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTRIBUTE_noreturn 1
-_ACEOF
-
-else
-  { $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
-else
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  void __attribute__((noreturn)) *test(void *muffin, ...) ;
@@ -18986,7 +18554,6 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
 
 CFLAGS="$saved_CFLAGS"
@@ -20196,16 +19763,12 @@ if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then
          pbxlibdir="-L${ALSA_DIR}"
       fi
    fi
-   pbxfuncname="snd_spcm_init"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_ALSA_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_asound_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lasound" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lasound... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_spcm_init in -lasound" >&5
+$as_echo_n "checking for snd_spcm_init in -lasound... " >&6; }
+if ${ac_cv_lib_asound_snd_spcm_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20219,35 +19782,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char snd_spcm_init ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return snd_spcm_init ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_asound_snd_spcm_init=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_asound_snd_spcm_init=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_spcm_init" >&5
+$as_echo "$ac_cv_lib_asound_snd_spcm_init" >&6; }
+if test "x$ac_cv_lib_asound_snd_spcm_init" = xyes; then :
   AST_ALSA_FOUND=yes
 else
   AST_ALSA_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_ALSA_FOUND}" = "yes"; then
@@ -20257,9 +19819,8 @@ fi
          ALSA_INCLUDE="-I${ALSA_DIR}/include"
       fi
       ALSA_INCLUDE="${ALSA_INCLUDE} "
-      if test "xalsa/asoundlib.h" = "x" ; then # no header, assume found
-         ALSA_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${ALSA_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${ALSA_HEADER_FOUND}" = "x0" ; then
          ALSA_LIB=""
          ALSA_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            ALSA_LIB=""
-         fi
+
          PBX_ALSA=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_ALSA 1
@@ -20301,16 +19860,12 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
          pbxlibdir="-L${BFD_DIR}"
       fi
    fi
-   pbxfuncname="bfd_openr"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_BFD_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_openr in -lbfd" >&5
+$as_echo_n "checking for bfd_openr in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_openr+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20324,35 +19879,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char bfd_openr ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return bfd_openr ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_bfd_bfd_openr=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_bfd_bfd_openr=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_openr" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_openr" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_openr" = xyes; then :
   AST_BFD_FOUND=yes
 else
   AST_BFD_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_BFD_FOUND}" = "yes"; then
@@ -20362,9 +19916,8 @@ fi
          BFD_INCLUDE="-I${BFD_DIR}/include"
       fi
       BFD_INCLUDE="${BFD_INCLUDE} "
-      if test "xbfd.h" = "x" ; then    # no header, assume found
-         BFD_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${BFD_HEADER_FOUND}" = "x0" ; then
          BFD_LIB=""
          BFD_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            BFD_LIB=""
-         fi
+
          PBX_BFD=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_BFD 1
@@ -20408,16 +19959,12 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
          pbxlibdir="-L${BFD_DIR}"
       fi
    fi
-   pbxfuncname="bfd_check_format"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_BFD_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_check_format in -lbfd" >&5
+$as_echo_n "checking for bfd_check_format in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_check_format+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20431,35 +19978,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char bfd_check_format ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return bfd_check_format ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_bfd_bfd_check_format=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_bfd_bfd_check_format=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_check_format" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_check_format" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_check_format" = xyes; then :
   AST_BFD_FOUND=yes
 else
   AST_BFD_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_BFD_FOUND}" = "yes"; then
@@ -20469,9 +20015,8 @@ fi
          BFD_INCLUDE="-I${BFD_DIR}/include"
       fi
       BFD_INCLUDE="${BFD_INCLUDE} "
-      if test "xbfd.h" = "x" ; then    # no header, assume found
-         BFD_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${BFD_HEADER_FOUND}" = "x0" ; then
          BFD_LIB=""
          BFD_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            BFD_LIB=""
-         fi
+
          PBX_BFD=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_BFD 1
@@ -20516,16 +20059,12 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
          pbxlibdir="-L${BFD_DIR}"
       fi
    fi
-   pbxfuncname="bfd_check_format"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_BFD_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_check_format in -lbfd" >&5
+$as_echo_n "checking for bfd_check_format in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_check_format+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20539,35 +20078,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char bfd_check_format ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return bfd_check_format ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_bfd_bfd_check_format=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_bfd_bfd_check_format=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_check_format" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_check_format" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_check_format" = xyes; then :
   AST_BFD_FOUND=yes
 else
   AST_BFD_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_BFD_FOUND}" = "yes"; then
@@ -20577,9 +20115,8 @@ fi
          BFD_INCLUDE="-I${BFD_DIR}/include"
       fi
       BFD_INCLUDE="${BFD_INCLUDE} "
-      if test "xbfd.h" = "x" ; then    # no header, assume found
-         BFD_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${BFD_HEADER_FOUND}" = "x0" ; then
          BFD_LIB=""
          BFD_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            BFD_LIB=""
-         fi
+
          PBX_BFD=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_BFD 1
@@ -20624,16 +20159,12 @@ if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then
          pbxlibdir="-L${CAP_DIR}"
       fi
    fi
-   pbxfuncname="cap_from_text"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_CAP_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_cap_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcap" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lcap... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_from_text in -lcap" >&5
+$as_echo_n "checking for cap_from_text in -lcap... " >&6; }
+if ${ac_cv_lib_cap_cap_from_text+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20647,35 +20178,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char cap_from_text ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return cap_from_text ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_cap_cap_from_text=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_cap_cap_from_text=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_from_text" >&5
+$as_echo "$ac_cv_lib_cap_cap_from_text" >&6; }
+if test "x$ac_cv_lib_cap_cap_from_text" = xyes; then :
   AST_CAP_FOUND=yes
 else
   AST_CAP_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_CAP_FOUND}" = "yes"; then
@@ -20685,9 +20215,8 @@ fi
          CAP_INCLUDE="-I${CAP_DIR}/include"
       fi
       CAP_INCLUDE="${CAP_INCLUDE} "
-      if test "xsys/capability.h" = "x" ; then # no header, assume found
-         CAP_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${CAP_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${CAP_HEADER_FOUND}" = "x0" ; then
          CAP_LIB=""
          CAP_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            CAP_LIB=""
-         fi
+
          PBX_CAP=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_CAP 1
@@ -20914,13 +20441,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
     if test "x${PBX_DAHDI_LINEREVERSE_VMWI}" != "x1" -a "${USE_DAHDI_LINEREVERSE_VMWI}" != "no"; then
-        if test "xenhanced dahdi vmwi support" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for enhanced dahdi vmwi support" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for enhanced dahdi vmwi support" >&5
 $as_echo_n "checking for enhanced dahdi vmwi support... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct dahdi_vmwi_info booger\" compiles using dahdi/user.h" >&5
-$as_echo_n "checking if \"struct dahdi_vmwi_info booger\" compiles using dahdi/user.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${DAHDI_LINEREVERSE_VMWI_DIR}" != "x"; then
            DAHDI_LINEREVERSE_VMWI_INCLUDE="-I${DAHDI_LINEREVERSE_VMWI_DIR}/include"
@@ -20960,13 +20482,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
     if test "x${PBX_DAHDI_ECHOCANCEL_FAX_MODE}" != "x1" -a "${USE_DAHDI_ECHOCANCEL_FAX_MODE}" != "no"; then
-        if test "x" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
-$as_echo_n "checking for ... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h" >&5
 $as_echo_n "checking if \"int foo = DAHDI_ECHOCANCEL_FAX_MODE\" compiles using dahdi/user.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${DAHDI_ECHOCANCEL_FAX_MODE_DIR}" != "x"; then
            DAHDI_ECHOCANCEL_FAX_MODE_INCLUDE="-I${DAHDI_ECHOCANCEL_FAX_MODE_DIR}/include"
@@ -21006,13 +20523,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
     if test "x${PBX_GETIFADDRS}" != "x1" -a "${USE_GETIFADDRS}" != "no"; then
-        if test "xgetifaddrs() support" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs() support" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs() support" >&5
 $as_echo_n "checking for getifaddrs() support... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct ifaddrs *p; getifaddrs(&p)\" compiles using ifaddrs.h" >&5
-$as_echo_n "checking if \"struct ifaddrs *p; getifaddrs(&p)\" compiles using ifaddrs.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${GETIFADDRS_DIR}" != "x"; then
            GETIFADDRS_INCLUDE="-I${GETIFADDRS_DIR}/include"
@@ -21051,13 +20563,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
     if test "x${PBX_TIMERFD}" != "x1" -a "${USE_TIMERFD}" != "no"; then
-        if test "xtimerfd support" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerfd support" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerfd support" >&5
 $as_echo_n "checking for timerfd support... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);\" compiles using sys/timerfd.h" >&5
-$as_echo_n "checking if \"timerfd_create(0,0); timerfd_settime(0,0,NULL,NULL);\" compiles using sys/timerfd.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${TIMERFD_DIR}" != "x"; then
            TIMERFD_INCLUDE="-I${TIMERFD_DIR}/include"
    else
 
     if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then
-        if test "xTesting for libedit unicode support" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5
 $as_echo_n "checking for Testing for libedit unicode support... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"el_rfunc_t *callback;\" compiles using histedit.h" >&5
-$as_echo_n "checking if \"el_rfunc_t *callback;\" compiles using histedit.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${LIBEDIT_IS_UNICODE_DIR}" != "x"; then
            LIBEDIT_IS_UNICODE_INCLUDE="-I${LIBEDIT_IS_UNICODE_DIR}/include"
@@ -21521,16 +21023,12 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
          pbxlibdir="-L${ICONV_DIR}"
       fi
    fi
-   pbxfuncname="iconv_open"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_ICONV_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5
-$as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
+$as_echo_n "checking for iconv_open in -liconv... " >&6; }
+if ${ac_cv_lib_iconv_iconv_open+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21544,35 +21042,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char iconv_open ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return iconv_open ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_iconv_iconv_open=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_iconv_iconv_open=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
+$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; }
+if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then :
   AST_ICONV_FOUND=yes
 else
   AST_ICONV_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_ICONV_FOUND}" = "yes"; then
@@ -21582,9 +21079,8 @@ fi
          ICONV_INCLUDE="-I${ICONV_DIR}/include"
       fi
       ICONV_INCLUDE="${ICONV_INCLUDE} "
-      if test "xiconv.h" = "x" ; then  # no header, assume found
-         ICONV_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
          ICONV_LIB=""
          ICONV_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            ICONV_LIB=""
-         fi
+
          PBX_ICONV=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_ICONV 1
@@ -21626,16 +21120,12 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
          pbxlibdir="-L${ICONV_DIR}"
       fi
    fi
-   pbxfuncname="libiconv_open"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_ICONV_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5
-$as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5
+$as_echo_n "checking for libiconv_open in -liconv... " >&6; }
+if ${ac_cv_lib_iconv_libiconv_open+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21649,35 +21139,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char libiconv_open ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return libiconv_open ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_iconv_libiconv_open=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_iconv_libiconv_open=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5
+$as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; }
+if test "x$ac_cv_lib_iconv_libiconv_open" = xyes; then :
   AST_ICONV_FOUND=yes
 else
   AST_ICONV_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_ICONV_FOUND}" = "yes"; then
@@ -21687,9 +21176,8 @@ fi
          ICONV_INCLUDE="-I${ICONV_DIR}/include"
       fi
       ICONV_INCLUDE="${ICONV_INCLUDE} "
-      if test "xiconv.h" = "x" ; then  # no header, assume found
-         ICONV_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
          ICONV_LIB=""
          ICONV_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            ICONV_LIB=""
-         fi
+
          PBX_ICONV=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_ICONV 1
@@ -21731,16 +21217,12 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
          pbxlibdir="-L${ICONV_DIR}"
       fi
    fi
-   pbxfuncname="iconv_close"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_ICONV_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_close in -lc" >&5
+$as_echo_n "checking for iconv_close in -lc... " >&6; }
+if ${ac_cv_lib_c_iconv_close+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21754,35 +21236,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char iconv_close ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return iconv_close ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_c_iconv_close=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_c_iconv_close=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv_close" >&5
+$as_echo "$ac_cv_lib_c_iconv_close" >&6; }
+if test "x$ac_cv_lib_c_iconv_close" = xyes; then :
   AST_ICONV_FOUND=yes
 else
   AST_ICONV_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_ICONV_FOUND}" = "yes"; then
@@ -21792,9 +21273,8 @@ fi
          ICONV_INCLUDE="-I${ICONV_DIR}/include"
       fi
       ICONV_INCLUDE="${ICONV_INCLUDE} "
-      if test "xiconv.h" = "x" ; then  # no header, assume found
-         ICONV_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${ICONV_HEADER_FOUND}" = "x0" ; then
          ICONV_LIB=""
          ICONV_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            ICONV_LIB=""
-         fi
+
          PBX_ICONV=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_ICONV 1
@@ -21837,16 +21315,12 @@ if test "x${PBX_ICAL}" != "x1" -a "${USE_ICAL}" != "no"; then
          pbxlibdir="-L${ICAL_DIR}"
       fi
    fi
-   pbxfuncname="icaltimezone_get_utc_timezone"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_ICAL_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
-      as_ac_Lib=`$as_echo "ac_cv_lib_ical_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lical" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lical... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icaltimezone_get_utc_timezone in -lical" >&5
+$as_echo_n "checking for icaltimezone_get_utc_timezone in -lical... " >&6; }
+if ${ac_cv_lib_ical_icaltimezone_get_utc_timezone+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21860,35 +21334,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char icaltimezone_get_utc_timezone ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return icaltimezone_get_utc_timezone ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ical_icaltimezone_get_utc_timezone=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ical_icaltimezone_get_utc_timezone=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ical_icaltimezone_get_utc_timezone" >&5
+$as_echo "$ac_cv_lib_ical_icaltimezone_get_utc_timezone" >&6; }
+if test "x$ac_cv_lib_ical_icaltimezone_get_utc_timezone" = xyes; then :
   AST_ICAL_FOUND=yes
 else
   AST_ICAL_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_ICAL_FOUND}" = "yes"; then
@@ -21898,9 +21371,8 @@ fi
          ICAL_INCLUDE="-I${ICAL_DIR}/include"
       fi
       ICAL_INCLUDE="${ICAL_INCLUDE} ${PTHREAD_CFLAGS}"
-      if test "xlibical/ical.h" = "x" ; then   # no header, assume found
-         ICAL_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${ICAL_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libical/ical.h" "ac_cv_header_libical_ical_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${ICAL_HEADER_FOUND}" = "x0" ; then
          ICAL_LIB=""
          ICAL_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            ICAL_LIB=""
-         fi
+
          PBX_ICAL=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_ICAL 1
@@ -21942,16 +21412,12 @@ if test "x${PBX_IKSEMEL}" != "x1" -a "${USE_IKSEMEL}" != "no"; then
          pbxlibdir="-L${IKSEMEL_DIR}"
       fi
    fi
-   pbxfuncname="iks_start_sasl"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_IKSEMEL_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_iksemel_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liksemel" >&5
-$as_echo_n "checking for ${pbxfuncname} in -liksemel... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iks_start_sasl in -liksemel" >&5
+$as_echo_n "checking for iks_start_sasl in -liksemel... " >&6; }
+if ${ac_cv_lib_iksemel_iks_start_sasl+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21965,35 +21431,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char iks_start_sasl ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return iks_start_sasl ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_iksemel_iks_start_sasl=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_iksemel_iks_start_sasl=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iksemel_iks_start_sasl" >&5
+$as_echo "$ac_cv_lib_iksemel_iks_start_sasl" >&6; }
+if test "x$ac_cv_lib_iksemel_iks_start_sasl" = xyes; then :
   AST_IKSEMEL_FOUND=yes
 else
   AST_IKSEMEL_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_IKSEMEL_FOUND}" = "yes"; then
@@ -22003,9 +21468,8 @@ fi
          IKSEMEL_INCLUDE="-I${IKSEMEL_DIR}/include"
       fi
       IKSEMEL_INCLUDE="${IKSEMEL_INCLUDE} "
-      if test "xiksemel.h" = "x" ; then        # no header, assume found
-         IKSEMEL_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${IKSEMEL_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "iksemel.h" "ac_cv_header_iksemel_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${IKSEMEL_HEADER_FOUND}" = "x0" ; then
          IKSEMEL_LIB=""
          IKSEMEL_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            IKSEMEL_LIB=""
-         fi
+
          PBX_IKSEMEL=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_IKSEMEL 1
@@ -22675,16 +22137,12 @@ if test "x${PBX_IODBC}" != "x1" -a "${USE_IODBC}" != "no"; then
          pbxlibdir="-L${IODBC_DIR}"
       fi
    fi
-   pbxfuncname="SQLConnect"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_IODBC_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
-      as_ac_Lib=`$as_echo "ac_cv_lib_iodbc_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liodbc" >&5
-$as_echo_n "checking for ${pbxfuncname} in -liodbc... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLConnect in -liodbc" >&5
+$as_echo_n "checking for SQLConnect in -liodbc... " >&6; }
+if ${ac_cv_lib_iodbc_SQLConnect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -22698,35 +22156,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char SQLConnect ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return SQLConnect ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_iodbc_SQLConnect=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_iodbc_SQLConnect=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLConnect" >&5
+$as_echo "$ac_cv_lib_iodbc_SQLConnect" >&6; }
+if test "x$ac_cv_lib_iodbc_SQLConnect" = xyes; then :
   AST_IODBC_FOUND=yes
 else
   AST_IODBC_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_IODBC_FOUND}" = "yes"; then
@@ -22736,9 +22193,8 @@ fi
          IODBC_INCLUDE="-I${IODBC_DIR}/include"
       fi
       IODBC_INCLUDE="${IODBC_INCLUDE} ${PTHREAD_CFLAGS}"
-      if test "xsql.h" = "x" ; then    # no header, assume found
-         IODBC_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${IODBC_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${IODBC_HEADER_FOUND}" = "x0" ; then
          IODBC_LIB=""
          IODBC_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            IODBC_LIB=""
-         fi
+
          PBX_IODBC=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_IODBC 1
@@ -22780,16 +22234,12 @@ if test "x${PBX_INOTIFY}" != "x1" -a "${USE_INOTIFY}" != "no"; then
          pbxlibdir="-L${INOTIFY_DIR}"
       fi
    fi
-   pbxfuncname="inotify_init"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_INOTIFY_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inotify_init in -lc" >&5
+$as_echo_n "checking for inotify_init in -lc... " >&6; }
+if ${ac_cv_lib_c_inotify_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -22803,35 +22253,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char inotify_init ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return inotify_init ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_c_inotify_init=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_c_inotify_init=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inotify_init" >&5
+$as_echo "$ac_cv_lib_c_inotify_init" >&6; }
+if test "x$ac_cv_lib_c_inotify_init" = xyes; then :
   AST_INOTIFY_FOUND=yes
 else
   AST_INOTIFY_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_INOTIFY_FOUND}" = "yes"; then
@@ -22841,9 +22290,8 @@ fi
          INOTIFY_INCLUDE="-I${INOTIFY_DIR}/include"
       fi
       INOTIFY_INCLUDE="${INOTIFY_INCLUDE} "
-      if test "xsys/inotify.h" = "x" ; then    # no header, assume found
-         INOTIFY_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${INOTIFY_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${INOTIFY_HEADER_FOUND}" = "x0" ; then
          INOTIFY_LIB=""
          INOTIFY_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            INOTIFY_LIB=""
-         fi
+
          PBX_INOTIFY=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_INOTIFY 1
@@ -22885,16 +22331,12 @@ if test "x${PBX_JACK}" != "x1" -a "${USE_JACK}" != "no"; then
          pbxlibdir="-L${JACK_DIR}"
       fi
    fi
-   pbxfuncname="jack_activate"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_JACK_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_jack_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ljack" >&5
-$as_echo_n "checking for ${pbxfuncname} in -ljack... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jack_activate in -ljack" >&5
+$as_echo_n "checking for jack_activate in -ljack... " >&6; }
+if ${ac_cv_lib_jack_jack_activate+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -22908,35 +22350,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char jack_activate ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return jack_activate ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_jack_jack_activate=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_jack_jack_activate=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jack_jack_activate" >&5
+$as_echo "$ac_cv_lib_jack_jack_activate" >&6; }
+if test "x$ac_cv_lib_jack_jack_activate" = xyes; then :
   AST_JACK_FOUND=yes
 else
   AST_JACK_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_JACK_FOUND}" = "yes"; then
@@ -22946,9 +22387,8 @@ fi
          JACK_INCLUDE="-I${JACK_DIR}/include"
       fi
       JACK_INCLUDE="${JACK_INCLUDE} "
-      if test "xjack/jack.h" = "x" ; then      # no header, assume found
-         JACK_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${JACK_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "jack/jack.h" "ac_cv_header_jack_jack_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${JACK_HEADER_FOUND}" = "x0" ; then
          JACK_LIB=""
          JACK_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            JACK_LIB=""
-         fi
+
          PBX_JACK=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_JACK 1
@@ -22991,16 +22429,12 @@ if test "x${PBX_KQUEUE}" != "x1" -a "${USE_KQUEUE}" != "no"; then
          pbxlibdir="-L${KQUEUE_DIR}"
       fi
    fi
-   pbxfuncname="kqueue"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_KQUEUE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue in -lc" >&5
+$as_echo_n "checking for kqueue in -lc... " >&6; }
+if ${ac_cv_lib_c_kqueue+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23014,35 +22448,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char kqueue ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return kqueue ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_c_kqueue=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_c_kqueue=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_kqueue" >&5
+$as_echo "$ac_cv_lib_c_kqueue" >&6; }
+if test "x$ac_cv_lib_c_kqueue" = xyes; then :
   AST_KQUEUE_FOUND=yes
 else
   AST_KQUEUE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_KQUEUE_FOUND}" = "yes"; then
@@ -23052,9 +22485,8 @@ fi
          KQUEUE_INCLUDE="-I${KQUEUE_DIR}/include"
       fi
       KQUEUE_INCLUDE="${KQUEUE_INCLUDE} "
-      if test "xsys/event.h" = "x" ; then      # no header, assume found
-         KQUEUE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${KQUEUE_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${KQUEUE_HEADER_FOUND}" = "x0" ; then
          KQUEUE_LIB=""
          KQUEUE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            KQUEUE_LIB=""
-         fi
+
          PBX_KQUEUE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_KQUEUE 1
@@ -23110,16 +22540,12 @@ if test "x${PBX_LTDL}" != "x1" -a "${USE_LTDL}" != "no"; then
          pbxlibdir="-L${LTDL_DIR}"
       fi
    fi
-   pbxfuncname="lt_dlinit"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_LTDL_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ltdl_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lltdl" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lltdl... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
+$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
+if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23133,35 +22559,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char lt_dlinit ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return lt_dlinit ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ltdl_lt_dlinit=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ltdl_lt_dlinit=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then :
   AST_LTDL_FOUND=yes
 else
   AST_LTDL_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_LTDL_FOUND}" = "yes"; then
@@ -23171,9 +22596,8 @@ fi
          LTDL_INCLUDE="-I${LTDL_DIR}/include"
       fi
       LTDL_INCLUDE="${LTDL_INCLUDE} "
-      if test "xltdl.h" = "x" ; then   # no header, assume found
-         LTDL_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${LTDL_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${LTDL_HEADER_FOUND}" = "x0" ; then
          LTDL_LIB=""
          LTDL_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            LTDL_LIB=""
-         fi
+
          PBX_LTDL=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_LTDL 1
@@ -23215,16 +22637,12 @@ if test "x${PBX_LDAP}" != "x1" -a "${USE_LDAP}" != "no"; then
          pbxlibdir="-L${LDAP_DIR}"
       fi
    fi
-   pbxfuncname="ldap_initialize"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_LDAP_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ldap_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lldap" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lldap... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5
+$as_echo_n "checking for ldap_initialize in -lldap... " >&6; }
+if ${ac_cv_lib_ldap_ldap_initialize+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23238,35 +22656,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char ldap_initialize ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return ldap_initialize ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ldap_ldap_initialize=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ldap_ldap_initialize=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+$as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; }
+if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then :
   AST_LDAP_FOUND=yes
 else
   AST_LDAP_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_LDAP_FOUND}" = "yes"; then
@@ -23276,9 +22693,8 @@ fi
          LDAP_INCLUDE="-I${LDAP_DIR}/include"
       fi
       LDAP_INCLUDE="${LDAP_INCLUDE} "
-      if test "xldap.h" = "x" ; then   # no header, assume found
-         LDAP_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${LDAP_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${LDAP_HEADER_FOUND}" = "x0" ; then
          LDAP_LIB=""
          LDAP_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            LDAP_LIB=""
-         fi
+
          PBX_LDAP=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_LDAP 1
@@ -23320,16 +22734,12 @@ if test "x${PBX_MISDN}" != "x1" -a "${USE_MISDN}" != "no"; then
          pbxlibdir="-L${MISDN_DIR}"
       fi
    fi
-   pbxfuncname="mISDN_open"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_MISDN_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_mISDN_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lmISDN" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lmISDN... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mISDN_open in -lmISDN" >&5
+$as_echo_n "checking for mISDN_open in -lmISDN... " >&6; }
+if ${ac_cv_lib_mISDN_mISDN_open+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23343,35 +22753,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char mISDN_open ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return mISDN_open ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_mISDN_mISDN_open=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_mISDN_mISDN_open=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mISDN_mISDN_open" >&5
+$as_echo "$ac_cv_lib_mISDN_mISDN_open" >&6; }
+if test "x$ac_cv_lib_mISDN_mISDN_open" = xyes; then :
   AST_MISDN_FOUND=yes
 else
   AST_MISDN_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_MISDN_FOUND}" = "yes"; then
@@ -23381,9 +22790,8 @@ fi
          MISDN_INCLUDE="-I${MISDN_DIR}/include"
       fi
       MISDN_INCLUDE="${MISDN_INCLUDE} "
-      if test "xmISDNuser/mISDNlib.h" = "x" ; then     # no header, assume found
-         MISDN_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${MISDN_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/mISDNlib.h" "ac_cv_header_mISDNuser_mISDNlib_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${MISDN_HEADER_FOUND}" = "x0" ; then
          MISDN_LIB=""
          MISDN_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            MISDN_LIB=""
-         fi
+
          PBX_MISDN=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_MISDN 1
@@ -23426,16 +22832,12 @@ if test "x${PBX_ISDNNET}" != "x1" -a "${USE_ISDNNET}" != "no"; then
          pbxlibdir="-L${ISDNNET_DIR}"
       fi
    fi
-   pbxfuncname="init_manager"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_ISDNNET_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_isdnnet_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lisdnnet" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lisdnnet... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for init_manager in -lisdnnet" >&5
+$as_echo_n "checking for init_manager in -lisdnnet... " >&6; }
+if ${ac_cv_lib_isdnnet_init_manager+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23449,35 +22851,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char init_manager ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return init_manager ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_isdnnet_init_manager=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_isdnnet_init_manager=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_isdnnet_init_manager" >&5
+$as_echo "$ac_cv_lib_isdnnet_init_manager" >&6; }
+if test "x$ac_cv_lib_isdnnet_init_manager" = xyes; then :
   AST_ISDNNET_FOUND=yes
 else
   AST_ISDNNET_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_ISDNNET_FOUND}" = "yes"; then
@@ -23487,9 +22888,8 @@ fi
          ISDNNET_INCLUDE="-I${ISDNNET_DIR}/include"
       fi
       ISDNNET_INCLUDE="${ISDNNET_INCLUDE} "
-      if test "xmISDNuser/isdn_net.h" = "x" ; then     # no header, assume found
-         ISDNNET_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${ISDNNET_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/isdn_net.h" "ac_cv_header_mISDNuser_isdn_net_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${ISDNNET_HEADER_FOUND}" = "x0" ; then
          ISDNNET_LIB=""
          ISDNNET_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            ISDNNET_LIB=""
-         fi
+
          PBX_ISDNNET=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_ISDNNET 1
@@ -23530,16 +22928,12 @@ if test "x${PBX_SUPPSERV}" != "x1" -a "${USE_SUPPSERV}" != "no"; then
          pbxlibdir="-L${SUPPSERV_DIR}"
       fi
    fi
-   pbxfuncname="encodeFac"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_SUPPSERV_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_suppserv_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsuppserv" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lsuppserv... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for encodeFac in -lsuppserv" >&5
+$as_echo_n "checking for encodeFac in -lsuppserv... " >&6; }
+if ${ac_cv_lib_suppserv_encodeFac+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23553,35 +22947,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char encodeFac ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return encodeFac ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_suppserv_encodeFac=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_suppserv_encodeFac=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_suppserv_encodeFac" >&5
+$as_echo "$ac_cv_lib_suppserv_encodeFac" >&6; }
+if test "x$ac_cv_lib_suppserv_encodeFac" = xyes; then :
   AST_SUPPSERV_FOUND=yes
 else
   AST_SUPPSERV_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_SUPPSERV_FOUND}" = "yes"; then
@@ -23591,9 +22984,8 @@ fi
          SUPPSERV_INCLUDE="-I${SUPPSERV_DIR}/include"
       fi
       SUPPSERV_INCLUDE="${SUPPSERV_INCLUDE} "
-      if test "xmISDNuser/suppserv.h" = "x" ; then     # no header, assume found
-         SUPPSERV_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${SUPPSERV_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/suppserv.h" "ac_cv_header_mISDNuser_suppserv_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${SUPPSERV_HEADER_FOUND}" = "x0" ; then
          SUPPSERV_LIB=""
          SUPPSERV_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            SUPPSERV_LIB=""
-         fi
+
          PBX_SUPPSERV=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_SUPPSERV 1
@@ -23839,47 +23229,18 @@ else
 fi
 
                if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then
-                       if test x"" = x ; then A=--cflags ; else A="" ; fi
-                       MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)
+                       MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} --cflags)
                        MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g")
 
-                       if test x"" = x ; then A=--libs ; else A="" ; fi
-                       MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)
+                       MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} --libs)
                        MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g")
 
-                       if test x"" != x ; then
-                               saved_cppflags="${CPPFLAGS}"
-                               CPPFLAGS="${CPPFLAGS} ${MYSQLCLIENT_INCLUDE}"
-
-                               saved_libs="${LIBS}"
-                               LIBS=${MYSQLCLIENT_LIB}
 
-                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
- ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-   PBX_MYSQLCLIENT=1
-$as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-                               CPPFLAGS="${saved_cppflags}"
-                               LIBS="${saved_libs}"
-                       else
                                PBX_MYSQLCLIENT=1
 
 $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
 
-                       fi
+
                fi
        fi
 
@@ -23895,16 +23256,12 @@ if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then
          pbxlibdir="-L${NBS_DIR}"
       fi
    fi
-   pbxfuncname="nbs_connect"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_NBS_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_nbs_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnbs" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lnbs... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nbs_connect in -lnbs" >&5
+$as_echo_n "checking for nbs_connect in -lnbs... " >&6; }
+if ${ac_cv_lib_nbs_nbs_connect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -23918,35 +23275,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char nbs_connect ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return nbs_connect ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_nbs_nbs_connect=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_nbs_nbs_connect=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nbs_nbs_connect" >&5
+$as_echo "$ac_cv_lib_nbs_nbs_connect" >&6; }
+if test "x$ac_cv_lib_nbs_nbs_connect" = xyes; then :
   AST_NBS_FOUND=yes
 else
   AST_NBS_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_NBS_FOUND}" = "yes"; then
@@ -23956,9 +23312,8 @@ fi
          NBS_INCLUDE="-I${NBS_DIR}/include"
       fi
       NBS_INCLUDE="${NBS_INCLUDE} "
-      if test "xnbs.h" = "x" ; then    # no header, assume found
-         NBS_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${NBS_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "nbs.h" "ac_cv_header_nbs_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${NBS_HEADER_FOUND}" = "x0" ; then
          NBS_LIB=""
          NBS_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            NBS_LIB=""
-         fi
+
          PBX_NBS=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_NBS 1
@@ -24093,47 +23446,18 @@ else
 fi
 
                if test ! "x${CONFIG_NEON}" = xNo; then
-                       if test x"" = x ; then A=--cflags ; else A="" ; fi
-                       NEON_INCLUDE=$(${CONFIG_NEON} $A)
+                       NEON_INCLUDE=$(${CONFIG_NEON} --cflags)
                        NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g")
 
-                       if test x"" = x ; then A=--libs ; else A="" ; fi
-                       NEON_LIB=$(${CONFIG_NEON} $A)
+                       NEON_LIB=$(${CONFIG_NEON} --libs)
                        NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g")
 
-                       if test x"" != x ; then
-                               saved_cppflags="${CPPFLAGS}"
-                               CPPFLAGS="${CPPFLAGS} ${NEON_INCLUDE}"
-
-                               saved_libs="${LIBS}"
-                               LIBS=${NEON_LIB}
 
-                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
- ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-   PBX_NEON=1
-$as_echo "#define HAVE_NEON 1" >>confdefs.h
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-                               CPPFLAGS="${saved_cppflags}"
-                               LIBS="${saved_libs}"
-                       else
                                PBX_NEON=1
 
 $as_echo "#define HAVE_NEON 1" >>confdefs.h
 
-                       fi
+
                fi
        fi
 
@@ -24242,15 +23566,13 @@ else
 fi
 
                if test ! "x${CONFIG_NEON29}" = xNo; then
-                       if test x"" = x ; then A=--cflags ; else A="" ; fi
-                       NEON29_INCLUDE=$(${CONFIG_NEON29} $A)
+                       NEON29_INCLUDE=$(${CONFIG_NEON29} --cflags)
                        NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g")
 
-                       if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi
-                       NEON29_LIB=$(${CONFIG_NEON29} $A)
+                       NEON29_LIB=$(${CONFIG_NEON29} --libs)
                        NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g")
 
-                       if test x"#include <ne_auth.h>" != x ; then
+
                                saved_cppflags="${CPPFLAGS}"
                                CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"
 
@@ -24279,12 +23601,7 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
                                CPPFLAGS="${saved_cppflags}"
                                LIBS="${saved_libs}"
-                       else
-                               PBX_NEON29=1
-
-$as_echo "#define HAVE_NEON29 1" >>confdefs.h
 
-                       fi
                fi
        fi
 
@@ -24393,17 +23710,13 @@ else
 fi
 
                if test ! "x${CONFIG_NETSNMP}" = xNo; then
-                       if test x"" = x ; then A=--cflags ; else A="" ; fi
-                       NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
+                       NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} --cflags)
                        NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g")
 
-                       if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi
-                       NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)
+                       NETSNMP_LIB=$(${CONFIG_NETSNMP} --agent-libs)
                        NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g")
 
-                       if test x"#include <net-snmp/net-snmp-config.h>
-#include <net-snmp/net-snmp-includes.h>
-#include <net-snmp/agent/net-snmp-agent-includes.h>" != x ; then
+
                                saved_cppflags="${CPPFLAGS}"
                                CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
 
@@ -24432,12 +23745,7 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
                                CPPFLAGS="${saved_cppflags}"
                                LIBS="${saved_libs}"
-                       else
-                               PBX_NETSNMP=1
-
-$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
 
-                       fi
                fi
        fi
 
@@ -24453,16 +23761,12 @@ if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then
          pbxlibdir="-L${NEWT_DIR}"
       fi
    fi
-   pbxfuncname="newtBell"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_NEWT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnewt" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lnewt... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for newtBell in -lnewt" >&5
+$as_echo_n "checking for newtBell in -lnewt... " >&6; }
+if ${ac_cv_lib_newt_newtBell+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -24476,35 +23780,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char newtBell ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return newtBell ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_newt_newtBell=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_newt_newtBell=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_newt_newtBell" >&5
+$as_echo "$ac_cv_lib_newt_newtBell" >&6; }
+if test "x$ac_cv_lib_newt_newtBell" = xyes; then :
   AST_NEWT_FOUND=yes
 else
   AST_NEWT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_NEWT_FOUND}" = "yes"; then
@@ -24514,9 +23817,8 @@ fi
          NEWT_INCLUDE="-I${NEWT_DIR}/include"
       fi
       NEWT_INCLUDE="${NEWT_INCLUDE} "
-      if test "xnewt.h" = "x" ; then   # no header, assume found
-         NEWT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${NEWT_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "newt.h" "ac_cv_header_newt_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${NEWT_HEADER_FOUND}" = "x0" ; then
          NEWT_LIB=""
          NEWT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            NEWT_LIB=""
-         fi
+
          PBX_NEWT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_NEWT 1
@@ -24565,16 +23865,12 @@ if test "x${PBX_UNBOUND}" != "x1" -a "${USE_UNBOUND}" != "no"; then
          pbxlibdir="-L${UNBOUND_DIR}"
       fi
    fi
-   pbxfuncname="ub_ctx_delete"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_UNBOUND_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_unbound_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lunbound" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lunbound... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ub_ctx_delete in -lunbound" >&5
+$as_echo_n "checking for ub_ctx_delete in -lunbound... " >&6; }
+if ${ac_cv_lib_unbound_ub_ctx_delete+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -24588,35 +23884,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char ub_ctx_delete ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return ub_ctx_delete ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_unbound_ub_ctx_delete=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_unbound_ub_ctx_delete=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unbound_ub_ctx_delete" >&5
+$as_echo "$ac_cv_lib_unbound_ub_ctx_delete" >&6; }
+if test "x$ac_cv_lib_unbound_ub_ctx_delete" = xyes; then :
   AST_UNBOUND_FOUND=yes
 else
   AST_UNBOUND_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_UNBOUND_FOUND}" = "yes"; then
@@ -24626,9 +23921,8 @@ fi
          UNBOUND_INCLUDE="-I${UNBOUND_DIR}/include"
       fi
       UNBOUND_INCLUDE="${UNBOUND_INCLUDE} "
-      if test "xunbound.h" = "x" ; then        # no header, assume found
-         UNBOUND_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${UNBOUND_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "unbound.h" "ac_cv_header_unbound_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${UNBOUND_HEADER_FOUND}" = "x0" ; then
          UNBOUND_LIB=""
          UNBOUND_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            UNBOUND_LIB=""
-         fi
+
          PBX_UNBOUND=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_UNBOUND 1
@@ -24713,16 +24005,12 @@ if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then
          pbxlibdir="-L${UNIXODBC_DIR}"
       fi
    fi
-   pbxfuncname="SQLConnect"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_UNIXODBC_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_odbc_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lodbc" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lodbc... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLConnect in -lodbc" >&5
+$as_echo_n "checking for SQLConnect in -lodbc... " >&6; }
+if ${ac_cv_lib_odbc_SQLConnect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -24736,35 +24024,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char SQLConnect ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return SQLConnect ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_odbc_SQLConnect=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_odbc_SQLConnect=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLConnect" >&5
+$as_echo "$ac_cv_lib_odbc_SQLConnect" >&6; }
+if test "x$ac_cv_lib_odbc_SQLConnect" = xyes; then :
   AST_UNIXODBC_FOUND=yes
 else
   AST_UNIXODBC_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_UNIXODBC_FOUND}" = "yes"; then
@@ -24774,9 +24061,8 @@ fi
          UNIXODBC_INCLUDE="-I${UNIXODBC_DIR}/include"
       fi
       UNIXODBC_INCLUDE="${UNIXODBC_INCLUDE} "
-      if test "xsql.h" = "x" ; then    # no header, assume found
-         UNIXODBC_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${UNIXODBC_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${UNIXODBC_HEADER_FOUND}" = "x0" ; then
          UNIXODBC_LIB=""
          UNIXODBC_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            UNIXODBC_LIB=""
-         fi
+
          PBX_UNIXODBC=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_UNIXODBC 1
@@ -24818,16 +24102,12 @@ if test "x${PBX_OGG}" != "x1" -a "${USE_OGG}" != "no"; then
          pbxlibdir="-L${OGG_DIR}"
       fi
    fi
-   pbxfuncname="ogg_sync_init"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_OGG_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ogg_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -logg" >&5
-$as_echo_n "checking for ${pbxfuncname} in -logg... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ogg_sync_init in -logg" >&5
+$as_echo_n "checking for ogg_sync_init in -logg... " >&6; }
+if ${ac_cv_lib_ogg_ogg_sync_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -24841,35 +24121,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char ogg_sync_init ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return ogg_sync_init ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ogg_ogg_sync_init=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ogg_ogg_sync_init=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ogg_ogg_sync_init" >&5
+$as_echo "$ac_cv_lib_ogg_ogg_sync_init" >&6; }
+if test "x$ac_cv_lib_ogg_ogg_sync_init" = xyes; then :
   AST_OGG_FOUND=yes
 else
   AST_OGG_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_OGG_FOUND}" = "yes"; then
          OGG_INCLUDE="-I${OGG_DIR}/include"
       fi
       OGG_INCLUDE="${OGG_INCLUDE} "
-      if test "x" = "x" ; then # no header, assume found
-         OGG_HEADER_FOUND="1"
-      else                             # check for the header
-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${OGG_INCLUDE}"
-         ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default"
-if test "x$ac_cv_header_" = xyes; then :
-  OGG_HEADER_FOUND=1
-else
-  OGG_HEADER_FOUND=0
-fi
 
+         # no header, assume found
+         OGG_HEADER_FOUND="1"
 
-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
       if test "x${OGG_HEADER_FOUND}" = "x0" ; then
          OGG_LIB=""
          OGG_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            OGG_LIB=""
-         fi
+
          PBX_OGG=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_OGG 1
@@ -24924,16 +24190,12 @@ if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then
          pbxlibdir="-L${BKTR_DIR}"
       fi
    fi
-   pbxfuncname="backtrace"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_BKTR_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_execinfo_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lexecinfo" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lexecinfo... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lexecinfo" >&5
+$as_echo_n "checking for backtrace in -lexecinfo... " >&6; }
+if ${ac_cv_lib_execinfo_backtrace+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -24947,35 +24209,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char backtrace ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return backtrace ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_execinfo_backtrace=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_execinfo_backtrace=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_execinfo_backtrace" >&5
+$as_echo "$ac_cv_lib_execinfo_backtrace" >&6; }
+if test "x$ac_cv_lib_execinfo_backtrace" = xyes; then :
   AST_BKTR_FOUND=yes
 else
   AST_BKTR_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_BKTR_FOUND}" = "yes"; then
@@ -24985,9 +24246,8 @@ fi
          BKTR_INCLUDE="-I${BKTR_DIR}/include"
       fi
       BKTR_INCLUDE="${BKTR_INCLUDE} "
-      if test "xexecinfo.h" = "x" ; then       # no header, assume found
-         BKTR_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${BKTR_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${BKTR_HEADER_FOUND}" = "x0" ; then
          BKTR_LIB=""
          BKTR_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            BKTR_LIB=""
-         fi
+
          PBX_BKTR=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_BKTR 1
@@ -25029,16 +24287,12 @@ if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then
          pbxlibdir="-L${BKTR_DIR}"
       fi
    fi
-   pbxfuncname="backtrace"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_BKTR_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lc" >&5
+$as_echo_n "checking for backtrace in -lc... " >&6; }
+if ${ac_cv_lib_c_backtrace+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -25052,35 +24306,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char backtrace ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return backtrace ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_c_backtrace=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_c_backtrace=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_backtrace" >&5
+$as_echo "$ac_cv_lib_c_backtrace" >&6; }
+if test "x$ac_cv_lib_c_backtrace" = xyes; then :
   AST_BKTR_FOUND=yes
 else
   AST_BKTR_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_BKTR_FOUND}" = "yes"; then
@@ -25090,9 +24343,8 @@ fi
          BKTR_INCLUDE="-I${BKTR_DIR}/include"
       fi
       BKTR_INCLUDE="${BKTR_INCLUDE} "
-      if test "xexecinfo.h" = "x" ; then       # no header, assume found
-         BKTR_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${BKTR_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${BKTR_HEADER_FOUND}" = "x0" ; then
          BKTR_LIB=""
          BKTR_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            BKTR_LIB=""
-         fi
+
          PBX_BKTR=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_BKTR 1
@@ -25134,16 +24384,12 @@ if test "x${PBX_BLUETOOTH}" != "x1" -a "${USE_BLUETOOTH}" != "no"; then
          pbxlibdir="-L${BLUETOOTH_DIR}"
       fi
    fi
-   pbxfuncname="ba2str"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_BLUETOOTH_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_bluetooth_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbluetooth" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lbluetooth... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ba2str in -lbluetooth" >&5
+$as_echo_n "checking for ba2str in -lbluetooth... " >&6; }
+if ${ac_cv_lib_bluetooth_ba2str+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -25157,35 +24403,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char ba2str ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return ba2str ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_bluetooth_ba2str=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_bluetooth_ba2str=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bluetooth_ba2str" >&5
+$as_echo "$ac_cv_lib_bluetooth_ba2str" >&6; }
+if test "x$ac_cv_lib_bluetooth_ba2str" = xyes; then :
   AST_BLUETOOTH_FOUND=yes
 else
   AST_BLUETOOTH_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_BLUETOOTH_FOUND}" = "yes"; then
@@ -25195,9 +24440,8 @@ fi
          BLUETOOTH_INCLUDE="-I${BLUETOOTH_DIR}/include"
       fi
       BLUETOOTH_INCLUDE="${BLUETOOTH_INCLUDE} "
-      if test "xbluetooth/bluetooth.h" = "x" ; then    # no header, assume found
-         BLUETOOTH_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${BLUETOOTH_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${BLUETOOTH_HEADER_FOUND}" = "x0" ; then
          BLUETOOTH_LIB=""
          BLUETOOTH_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            BLUETOOTH_LIB=""
-         fi
+
          PBX_BLUETOOTH=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_BLUETOOTH 1
 
 
 
-# possible places for oss definitions
 
-if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
+if test "x${PBX_BEANSTALK}" != "x1" -a "${USE_BEANSTALK}" != "no"; then
    pbxlibdir=""
-   # if --with-OSS=DIR has been specified, use it.
-   if test "x${OSS_DIR}" != "x"; then
-      if test -d ${OSS_DIR}/lib; then
-         pbxlibdir="-L${OSS_DIR}/lib"
+   # 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${OSS_DIR}"
+         pbxlibdir="-L${BEANSTALK_DIR}"
       fi
    fi
-   pbxfuncname=""
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_OSS_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bs_version in -lbeanstalk" >&5
+$as_echo_n "checking for bs_version in -lbeanstalk... " >&6; }
+if ${ac_cv_lib_beanstalk_bs_version+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lossaudio ${pbxlibdir}  $LIBS"
+LIBS="-lbeanstalk ${pbxlibdir}  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -25263,35 +24500,89 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char bs_version ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return bs_version ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_beanstalk_bs_version=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_beanstalk_bs_version=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_OSS_FOUND=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_beanstalk_bs_version" >&5
+$as_echo "$ac_cv_lib_beanstalk_bs_version" >&6; }
+if test "x$ac_cv_lib_beanstalk_bs_version" = xyes; then :
+  AST_BEANSTALK_FOUND=yes
 else
-  AST_OSS_FOUND=no
+  AST_BEANSTALK_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+
+
+   # 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} "
+
+         # 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}"
+
+      if test "x${BEANSTALK_HEADER_FOUND}" = "x0" ; then
+         BEANSTALK_LIB=""
+         BEANSTALK_INCLUDE=""
+      else
+
+         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
+   pbxlibdir=""
+   # if --with-OSS=DIR has been specified, use it.
+   if test "x${OSS_DIR}" != "x"; then
+      if test -d ${OSS_DIR}/lib; then
+         pbxlibdir="-L${OSS_DIR}/lib"
+      else
+         pbxlibdir="-L${OSS_DIR}"
+      fi
+   fi
+
+      # empty lib, assume only headers
+      AST_OSS_FOUND=yes
+
 
    # now check for the header.
    if test "${AST_OSS_FOUND}" = "yes"; then
@@ -25301,9 +24592,8 @@ fi
          OSS_INCLUDE="-I${OSS_DIR}/include"
       fi
       OSS_INCLUDE="${OSS_INCLUDE} "
-      if test "xlinux/soundcard.h" = "x" ; then        # no header, assume found
-         OSS_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "linux/soundcard.h" "ac_cv_header_linux_soundcard_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${OSS_HEADER_FOUND}" = "x0" ; then
          OSS_LIB=""
          OSS_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
+
+            # only checking headers -> no library
             OSS_LIB=""
-         fi
+
          PBX_OSS=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_OSS 1
@@ -25344,16 +24635,68 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
          pbxlibdir="-L${OSS_DIR}"
       fi
    fi
-   pbxfuncname=""
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+
+      # empty lib, assume only headers
       AST_OSS_FOUND=yes
-   else
+
+
+   # now check for the header.
+   if test "${AST_OSS_FOUND}" = "yes"; then
+      OSS_LIB="${pbxlibdir} -lossaudio "
+      # if --with-OSS=DIR has been specified, use it.
+      if test "x${OSS_DIR}" != "x"; then
+         OSS_INCLUDE="-I${OSS_DIR}/include"
+      fi
+      OSS_INCLUDE="${OSS_INCLUDE} "
+
+         # check for the header
+         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
+         ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_soundcard_h" = xyes; then :
+  OSS_HEADER_FOUND=1
+else
+  OSS_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
+
+      if test "x${OSS_HEADER_FOUND}" = "x0" ; then
+         OSS_LIB=""
+         OSS_INCLUDE=""
+      else
+
+            # only checking headers -> no library
+            OSS_LIB=""
+
+         PBX_OSS=1
+         cat >>confdefs.h <<_ACEOF
+#define HAVE_OSS 1
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+
+if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
+   pbxlibdir=""
+   # if --with-OSS=DIR has been specified, use it.
+   if test "x${OSS_DIR}" != "x"; then
+      if test -d ${OSS_DIR}/lib; then
+         pbxlibdir="-L${OSS_DIR}/lib"
+      else
+         pbxlibdir="-L${OSS_DIR}"
+      fi
+   fi
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for oss_ioctl_mixer in -lossaudio" >&5
+$as_echo_n "checking for oss_ioctl_mixer in -lossaudio... " >&6; }
+if ${ac_cv_lib_ossaudio_oss_ioctl_mixer+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -25367,140 +24710,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char oss_ioctl_mixer ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return oss_ioctl_mixer ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ossaudio_oss_ioctl_mixer=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ossaudio_oss_ioctl_mixer=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio_oss_ioctl_mixer" >&5
+$as_echo "$ac_cv_lib_ossaudio_oss_ioctl_mixer" >&6; }
+if test "x$ac_cv_lib_ossaudio_oss_ioctl_mixer" = xyes; then :
   AST_OSS_FOUND=yes
 else
   AST_OSS_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
-
-   # now check for the header.
-   if test "${AST_OSS_FOUND}" = "yes"; then
-      OSS_LIB="${pbxlibdir} -lossaudio "
-      # if --with-OSS=DIR has been specified, use it.
-      if test "x${OSS_DIR}" != "x"; then
-         OSS_INCLUDE="-I${OSS_DIR}/include"
-      fi
-      OSS_INCLUDE="${OSS_INCLUDE} "
-      if test "xsys/soundcard.h" = "x" ; then  # no header, assume found
-         OSS_HEADER_FOUND="1"
-      else                             # check for the header
-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
-         ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_soundcard_h" = xyes; then :
-  OSS_HEADER_FOUND=1
-else
-  OSS_HEADER_FOUND=0
-fi
-
-
-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
-      if test "x${OSS_HEADER_FOUND}" = "x0" ; then
-         OSS_LIB=""
-         OSS_INCLUDE=""
-      else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            OSS_LIB=""
-         fi
-         PBX_OSS=1
-         cat >>confdefs.h <<_ACEOF
-#define HAVE_OSS 1
-_ACEOF
-
-      fi
-   fi
-fi
 
 
-
-if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
-   pbxlibdir=""
-   # if --with-OSS=DIR has been specified, use it.
-   if test "x${OSS_DIR}" != "x"; then
-      if test -d ${OSS_DIR}/lib; then
-         pbxlibdir="-L${OSS_DIR}/lib"
-      else
-         pbxlibdir="-L${OSS_DIR}"
-      fi
-   fi
-   pbxfuncname="oss_ioctl_mixer"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_OSS_FOUND=yes
-   else
-      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
-      CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lossaudio ${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_OSS_FOUND=yes
-else
-  AST_OSS_FOUND=no
-fi
-
-      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
-
    # now check for the header.
    if test "${AST_OSS_FOUND}" = "yes"; then
       OSS_LIB="${pbxlibdir} -lossaudio "
@@ -25509,9 +24747,8 @@ fi
          OSS_INCLUDE="-I${OSS_DIR}/include"
       fi
       OSS_INCLUDE="${OSS_INCLUDE} "
-      if test "xsoundcard.h" = "x" ; then      # no header, assume found
-         OSS_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "soundcard.h" "ac_cv_header_soundcard_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${OSS_HEADER_FOUND}" = "x0" ; then
          OSS_LIB=""
          OSS_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            OSS_LIB=""
-         fi
+
          PBX_OSS=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_OSS 1
@@ -25973,16 +25208,12 @@ if test "x${PBX_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK}" != "x1" -a "${USE_PJSIP_DLG_
          pbxlibdir="-L${PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_dlg_create_uas_and_inc_lock"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_dlg_create_uas_and_inc_lock in -lpjsip" >&5
+$as_echo_n "checking for pjsip_dlg_create_uas_and_inc_lock in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_dlg_create_uas_and_inc_lock+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -25996,35 +25227,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_dlg_create_uas_and_inc_lock ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_dlg_create_uas_and_inc_lock ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_dlg_create_uas_and_inc_lock=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_dlg_create_uas_and_inc_lock=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_dlg_create_uas_and_inc_lock" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_dlg_create_uas_and_inc_lock" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_dlg_create_uas_and_inc_lock" = xyes; then :
   AST_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_FOUND=yes
 else
   AST_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_FOUND}" = "yes"; then
@@ -26034,9 +25264,8 @@ fi
          PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_INCLUDE="-I${PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_DIR}/include"
       fi
       PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_INCLUDE="${PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_HEADER_FOUND}" = "x0" ; then
          PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_LIB=""
          PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_DLG_CREATE_UAS_AND_INC_LOCK_LIB=""
-         fi
+
          PBX_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK 1
@@ -26077,16 +25304,12 @@ if test "x${PBX_PJ_TRANSACTION_GRP_LOCK}" != "x1" -a "${USE_PJ_TRANSACTION_GRP_L
          pbxlibdir="-L${PJ_TRANSACTION_GRP_LOCK_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_tsx_create_uac2"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJ_TRANSACTION_GRP_LOCK_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_tsx_create_uac2 in -lpjsip" >&5
+$as_echo_n "checking for pjsip_tsx_create_uac2 in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_tsx_create_uac2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26100,35 +25323,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_tsx_create_uac2 ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_tsx_create_uac2 ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_tsx_create_uac2=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_tsx_create_uac2=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_tsx_create_uac2" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_tsx_create_uac2" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_tsx_create_uac2" = xyes; then :
   AST_PJ_TRANSACTION_GRP_LOCK_FOUND=yes
 else
   AST_PJ_TRANSACTION_GRP_LOCK_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJ_TRANSACTION_GRP_LOCK_FOUND}" = "yes"; then
@@ -26138,9 +25360,8 @@ fi
          PJ_TRANSACTION_GRP_LOCK_INCLUDE="-I${PJ_TRANSACTION_GRP_LOCK_DIR}/include"
       fi
       PJ_TRANSACTION_GRP_LOCK_INCLUDE="${PJ_TRANSACTION_GRP_LOCK_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJ_TRANSACTION_GRP_LOCK_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND}" = "x0" ; then
          PJ_TRANSACTION_GRP_LOCK_LIB=""
          PJ_TRANSACTION_GRP_LOCK_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJ_TRANSACTION_GRP_LOCK_LIB=""
-         fi
+
          PBX_PJ_TRANSACTION_GRP_LOCK=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJ_TRANSACTION_GRP_LOCK 1
       LIBS="${LIBS} ${PJPROJECT_LIB}"
 
     if test "x${PBX_PJSIP_REPLACE_MEDIA_STREAM}" != "x1" -a "${USE_PJSIP_REPLACE_MEDIA_STREAM}" != "no"; then
-        if test "x" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
-$as_echo_n "checking for ... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h" >&5
 $as_echo_n "checking if \"pjmedia_mod_offer_flag flag = PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE\" compiles using pjmedia.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${PJSIP_REPLACE_MEDIA_STREAM_DIR}" != "x"; then
            PJSIP_REPLACE_MEDIA_STREAM_INCLUDE="-I${PJSIP_REPLACE_MEDIA_STREAM_DIR}/include"
@@ -26234,16 +25448,12 @@ if test "x${PBX_PJSIP_GET_DEST_INFO}" != "x1" -a "${USE_PJSIP_GET_DEST_INFO}" !=
          pbxlibdir="-L${PJSIP_GET_DEST_INFO_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_get_dest_info"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_GET_DEST_INFO_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_get_dest_info in -lpjsip" >&5
+$as_echo_n "checking for pjsip_get_dest_info in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_get_dest_info+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26257,35 +25467,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_get_dest_info ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_get_dest_info ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_get_dest_info=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_get_dest_info=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_get_dest_info" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_get_dest_info" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_get_dest_info" = xyes; then :
   AST_PJSIP_GET_DEST_INFO_FOUND=yes
 else
   AST_PJSIP_GET_DEST_INFO_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_GET_DEST_INFO_FOUND}" = "yes"; then
@@ -26295,9 +25504,8 @@ fi
          PJSIP_GET_DEST_INFO_INCLUDE="-I${PJSIP_GET_DEST_INFO_DIR}/include"
       fi
       PJSIP_GET_DEST_INFO_INCLUDE="${PJSIP_GET_DEST_INFO_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_GET_DEST_INFO_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_GET_DEST_INFO_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_GET_DEST_INFO_HEADER_FOUND}" = "x0" ; then
          PJSIP_GET_DEST_INFO_LIB=""
          PJSIP_GET_DEST_INFO_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_GET_DEST_INFO_LIB=""
-         fi
+
          PBX_PJSIP_GET_DEST_INFO=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_GET_DEST_INFO 1
@@ -26338,16 +25544,12 @@ if test "x${PBX_PJ_SSL_CERT_LOAD_FROM_FILES2}" != "x1" -a "${USE_PJ_SSL_CERT_LOA
          pbxlibdir="-L${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}"
       fi
    fi
-   pbxfuncname="pj_ssl_cert_load_from_files2"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pj_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpj" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpj... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_ssl_cert_load_from_files2 in -lpj" >&5
+$as_echo_n "checking for pj_ssl_cert_load_from_files2 in -lpj... " >&6; }
+if ${ac_cv_lib_pj_pj_ssl_cert_load_from_files2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26361,35 +25563,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pj_ssl_cert_load_from_files2 ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pj_ssl_cert_load_from_files2 ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pj_pj_ssl_cert_load_from_files2=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pj_pj_ssl_cert_load_from_files2=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pj_pj_ssl_cert_load_from_files2" >&5
+$as_echo "$ac_cv_lib_pj_pj_ssl_cert_load_from_files2" >&6; }
+if test "x$ac_cv_lib_pj_pj_ssl_cert_load_from_files2" = xyes; then :
   AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND=yes
 else
   AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJ_SSL_CERT_LOAD_FROM_FILES2_FOUND}" = "yes"; then
@@ -26399,9 +25600,8 @@ fi
          PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE="-I${PJ_SSL_CERT_LOAD_FROM_FILES2_DIR}/include"
       fi
       PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE="${PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjlib.h" = "x" ; then  # no header, assume found
-         PJ_SSL_CERT_LOAD_FROM_FILES2_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjlib.h" "ac_cv_header_pjlib_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJ_SSL_CERT_LOAD_FROM_FILES2_HEADER_FOUND}" = "x0" ; then
          PJ_SSL_CERT_LOAD_FROM_FILES2_LIB=""
          PJ_SSL_CERT_LOAD_FROM_FILES2_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJ_SSL_CERT_LOAD_FROM_FILES2_LIB=""
-         fi
+
          PBX_PJ_SSL_CERT_LOAD_FROM_FILES2=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2 1
@@ -26442,16 +25640,12 @@ if test "x${PBX_PJSIP_EXTERNAL_RESOLVER}" != "x1" -a "${USE_PJSIP_EXTERNAL_RESOL
          pbxlibdir="-L${PJSIP_EXTERNAL_RESOLVER_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_endpt_set_ext_resolver"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_EXTERNAL_RESOLVER_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_endpt_set_ext_resolver in -lpjsip" >&5
+$as_echo_n "checking for pjsip_endpt_set_ext_resolver in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_endpt_set_ext_resolver+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26465,35 +25659,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_endpt_set_ext_resolver ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_endpt_set_ext_resolver ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_endpt_set_ext_resolver=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_endpt_set_ext_resolver=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_endpt_set_ext_resolver" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_endpt_set_ext_resolver" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_endpt_set_ext_resolver" = xyes; then :
   AST_PJSIP_EXTERNAL_RESOLVER_FOUND=yes
 else
   AST_PJSIP_EXTERNAL_RESOLVER_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_EXTERNAL_RESOLVER_FOUND}" = "yes"; then
@@ -26503,9 +25696,8 @@ fi
          PJSIP_EXTERNAL_RESOLVER_INCLUDE="-I${PJSIP_EXTERNAL_RESOLVER_DIR}/include"
       fi
       PJSIP_EXTERNAL_RESOLVER_INCLUDE="${PJSIP_EXTERNAL_RESOLVER_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_EXTERNAL_RESOLVER_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_EXTERNAL_RESOLVER_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_EXTERNAL_RESOLVER_HEADER_FOUND}" = "x0" ; then
          PJSIP_EXTERNAL_RESOLVER_LIB=""
          PJSIP_EXTERNAL_RESOLVER_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_EXTERNAL_RESOLVER_LIB=""
-         fi
+
          PBX_PJSIP_EXTERNAL_RESOLVER=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_EXTERNAL_RESOLVER 1
       LIBS="${LIBS} ${PJPROJECT_LIB}"
 
     if test "x${PBX_PJSIP_TLS_TRANSPORT_PROTO}" != "x1" -a "${USE_PJSIP_TLS_TRANSPORT_PROTO}" != "no"; then
-        if test "x" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5
-$as_echo_n "checking for ... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h" >&5
 $as_echo_n "checking if \"struct pjsip_tls_setting setting; int proto; proto = setting.proto;\" compiles using pjsip.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${PJSIP_TLS_TRANSPORT_PROTO_DIR}" != "x"; then
            PJSIP_TLS_TRANSPORT_PROTO_INCLUDE="-I${PJSIP_TLS_TRANSPORT_PROTO_DIR}/include"
@@ -26599,16 +25784,12 @@ if test "x${PBX_PJSIP_EVSUB_GRP_LOCK}" != "x1" -a "${USE_PJSIP_EVSUB_GRP_LOCK}"
          pbxlibdir="-L${PJSIP_EVSUB_GRP_LOCK_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_evsub_add_ref"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_EVSUB_GRP_LOCK_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_evsub_add_ref in -lpjsip" >&5
+$as_echo_n "checking for pjsip_evsub_add_ref in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_evsub_add_ref+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26622,35 +25803,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_evsub_add_ref ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_evsub_add_ref ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_evsub_add_ref=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_evsub_add_ref=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_evsub_add_ref" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_evsub_add_ref" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_evsub_add_ref" = xyes; then :
   AST_PJSIP_EVSUB_GRP_LOCK_FOUND=yes
 else
   AST_PJSIP_EVSUB_GRP_LOCK_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_EVSUB_GRP_LOCK_FOUND}" = "yes"; then
@@ -26660,9 +25840,8 @@ fi
          PJSIP_EVSUB_GRP_LOCK_INCLUDE="-I${PJSIP_EVSUB_GRP_LOCK_DIR}/include"
       fi
       PJSIP_EVSUB_GRP_LOCK_INCLUDE="${PJSIP_EVSUB_GRP_LOCK_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_EVSUB_GRP_LOCK_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_EVSUB_GRP_LOCK_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_EVSUB_GRP_LOCK_HEADER_FOUND}" = "x0" ; then
          PJSIP_EVSUB_GRP_LOCK_LIB=""
          PJSIP_EVSUB_GRP_LOCK_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_EVSUB_GRP_LOCK_LIB=""
-         fi
+
          PBX_PJSIP_EVSUB_GRP_LOCK=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_EVSUB_GRP_LOCK 1
@@ -26703,16 +25880,12 @@ if test "x${PBX_PJSIP_INV_SESSION_REF}" != "x1" -a "${USE_PJSIP_INV_SESSION_REF}
          pbxlibdir="-L${PJSIP_INV_SESSION_REF_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_inv_add_ref"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_INV_SESSION_REF_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_inv_add_ref in -lpjsip" >&5
+$as_echo_n "checking for pjsip_inv_add_ref in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_inv_add_ref+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26726,35 +25899,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_inv_add_ref ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_inv_add_ref ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_inv_add_ref=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_inv_add_ref=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_inv_add_ref" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_inv_add_ref" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_inv_add_ref" = xyes; then :
   AST_PJSIP_INV_SESSION_REF_FOUND=yes
 else
   AST_PJSIP_INV_SESSION_REF_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_INV_SESSION_REF_FOUND}" = "yes"; then
@@ -26764,9 +25936,8 @@ fi
          PJSIP_INV_SESSION_REF_INCLUDE="-I${PJSIP_INV_SESSION_REF_DIR}/include"
       fi
       PJSIP_INV_SESSION_REF_INCLUDE="${PJSIP_INV_SESSION_REF_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_INV_SESSION_REF_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_INV_SESSION_REF_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_INV_SESSION_REF_HEADER_FOUND}" = "x0" ; then
          PJSIP_INV_SESSION_REF_LIB=""
          PJSIP_INV_SESSION_REF_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_INV_SESSION_REF_LIB=""
-         fi
+
          PBX_PJSIP_INV_SESSION_REF=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_INV_SESSION_REF 1
@@ -26807,16 +25976,12 @@ if test "x${PBX_PJSIP_AUTH_CLT_DEINIT}" != "x1" -a "${USE_PJSIP_AUTH_CLT_DEINIT}
          pbxlibdir="-L${PJSIP_AUTH_CLT_DEINIT_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_auth_clt_deinit"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_AUTH_CLT_DEINIT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_auth_clt_deinit in -lpjsip" >&5
+$as_echo_n "checking for pjsip_auth_clt_deinit in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_auth_clt_deinit+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26830,35 +25995,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_auth_clt_deinit ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_auth_clt_deinit ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_auth_clt_deinit=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_auth_clt_deinit=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_auth_clt_deinit" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_auth_clt_deinit" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_auth_clt_deinit" = xyes; then :
   AST_PJSIP_AUTH_CLT_DEINIT_FOUND=yes
 else
   AST_PJSIP_AUTH_CLT_DEINIT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_AUTH_CLT_DEINIT_FOUND}" = "yes"; then
@@ -26868,9 +26032,8 @@ fi
          PJSIP_AUTH_CLT_DEINIT_INCLUDE="-I${PJSIP_AUTH_CLT_DEINIT_DIR}/include"
       fi
       PJSIP_AUTH_CLT_DEINIT_INCLUDE="${PJSIP_AUTH_CLT_DEINIT_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_AUTH_CLT_DEINIT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_AUTH_CLT_DEINIT_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_AUTH_CLT_DEINIT_HEADER_FOUND}" = "x0" ; then
          PJSIP_AUTH_CLT_DEINIT_LIB=""
          PJSIP_AUTH_CLT_DEINIT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_AUTH_CLT_DEINIT_LIB=""
-         fi
+
          PBX_PJSIP_AUTH_CLT_DEINIT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_AUTH_CLT_DEINIT 1
@@ -26911,16 +26072,12 @@ if test "x${PBX_PJSIP_EVSUB_SET_UAS_TIMEOUT}" != "x1" -a "${USE_PJSIP_EVSUB_SET_
          pbxlibdir="-L${PJSIP_EVSUB_SET_UAS_TIMEOUT_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_evsub_set_uas_timeout"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_EVSUB_SET_UAS_TIMEOUT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_evsub_set_uas_timeout in -lpjsip" >&5
+$as_echo_n "checking for pjsip_evsub_set_uas_timeout in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_evsub_set_uas_timeout+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -26934,35 +26091,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_evsub_set_uas_timeout ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_evsub_set_uas_timeout ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_evsub_set_uas_timeout=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_evsub_set_uas_timeout=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_evsub_set_uas_timeout" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_evsub_set_uas_timeout" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_evsub_set_uas_timeout" = xyes; then :
   AST_PJSIP_EVSUB_SET_UAS_TIMEOUT_FOUND=yes
 else
   AST_PJSIP_EVSUB_SET_UAS_TIMEOUT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_EVSUB_SET_UAS_TIMEOUT_FOUND}" = "yes"; then
@@ -26972,9 +26128,8 @@ fi
          PJSIP_EVSUB_SET_UAS_TIMEOUT_INCLUDE="-I${PJSIP_EVSUB_SET_UAS_TIMEOUT_DIR}/include"
       fi
       PJSIP_EVSUB_SET_UAS_TIMEOUT_INCLUDE="${PJSIP_EVSUB_SET_UAS_TIMEOUT_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_EVSUB_SET_UAS_TIMEOUT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_EVSUB_SET_UAS_TIMEOUT_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_EVSUB_SET_UAS_TIMEOUT_HEADER_FOUND}" = "x0" ; then
          PJSIP_EVSUB_SET_UAS_TIMEOUT_LIB=""
          PJSIP_EVSUB_SET_UAS_TIMEOUT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_EVSUB_SET_UAS_TIMEOUT_LIB=""
-         fi
+
          PBX_PJSIP_EVSUB_SET_UAS_TIMEOUT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_EVSUB_SET_UAS_TIMEOUT 1
@@ -27015,16 +26168,12 @@ if test "x${PBX_PJSIP_TSX_LAYER_FIND_TSX2}" != "x1" -a "${USE_PJSIP_TSX_LAYER_FI
          pbxlibdir="-L${PJSIP_TSX_LAYER_FIND_TSX2_DIR}"
       fi
    fi
-   pbxfuncname="pjsip_tsx_layer_find_tsx2"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PJSIP_TSX_LAYER_FIND_TSX2_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $PJPROJECT_CFLAGS"
-      as_ac_Lib=`$as_echo "ac_cv_lib_pjsip_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpjsip" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpjsip... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pjsip_tsx_layer_find_tsx2 in -lpjsip" >&5
+$as_echo_n "checking for pjsip_tsx_layer_find_tsx2 in -lpjsip... " >&6; }
+if ${ac_cv_lib_pjsip_pjsip_tsx_layer_find_tsx2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27038,35 +26187,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pjsip_tsx_layer_find_tsx2 ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pjsip_tsx_layer_find_tsx2 ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pjsip_pjsip_tsx_layer_find_tsx2=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pjsip_pjsip_tsx_layer_find_tsx2=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pjsip_pjsip_tsx_layer_find_tsx2" >&5
+$as_echo "$ac_cv_lib_pjsip_pjsip_tsx_layer_find_tsx2" >&6; }
+if test "x$ac_cv_lib_pjsip_pjsip_tsx_layer_find_tsx2" = xyes; then :
   AST_PJSIP_TSX_LAYER_FIND_TSX2_FOUND=yes
 else
   AST_PJSIP_TSX_LAYER_FIND_TSX2_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PJSIP_TSX_LAYER_FIND_TSX2_FOUND}" = "yes"; then
@@ -27076,9 +26224,8 @@ fi
          PJSIP_TSX_LAYER_FIND_TSX2_INCLUDE="-I${PJSIP_TSX_LAYER_FIND_TSX2_DIR}/include"
       fi
       PJSIP_TSX_LAYER_FIND_TSX2_INCLUDE="${PJSIP_TSX_LAYER_FIND_TSX2_INCLUDE} $PJPROJECT_CFLAGS"
-      if test "xpjsip.h" = "x" ; then  # no header, assume found
-         PJSIP_TSX_LAYER_FIND_TSX2_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PJSIP_TSX_LAYER_FIND_TSX2_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PJSIP_TSX_LAYER_FIND_TSX2_HEADER_FOUND}" = "x0" ; then
          PJSIP_TSX_LAYER_FIND_TSX2_LIB=""
          PJSIP_TSX_LAYER_FIND_TSX2_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PJSIP_TSX_LAYER_FIND_TSX2_LIB=""
-         fi
+
          PBX_PJSIP_TSX_LAYER_FIND_TSX2=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PJSIP_TSX_LAYER_FIND_TSX2 1
@@ -27213,16 +26358,12 @@ if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then
          pbxlibdir="-L${POPT_DIR}"
       fi
    fi
-   pbxfuncname="poptStrerror"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_POPT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_popt_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpopt" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpopt... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poptStrerror in -lpopt" >&5
+$as_echo_n "checking for poptStrerror in -lpopt... " >&6; }
+if ${ac_cv_lib_popt_poptStrerror+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27236,35 +26377,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char poptStrerror ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return poptStrerror ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_popt_poptStrerror=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_popt_poptStrerror=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_popt_poptStrerror" >&5
+$as_echo "$ac_cv_lib_popt_poptStrerror" >&6; }
+if test "x$ac_cv_lib_popt_poptStrerror" = xyes; then :
   AST_POPT_FOUND=yes
 else
   AST_POPT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_POPT_FOUND}" = "yes"; then
@@ -27274,9 +26414,8 @@ fi
          POPT_INCLUDE="-I${POPT_DIR}/include"
       fi
       POPT_INCLUDE="${POPT_INCLUDE} "
-      if test "xpopt.h" = "x" ; then   # no header, assume found
-         POPT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${POPT_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "popt.h" "ac_cv_header_popt_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${POPT_HEADER_FOUND}" = "x0" ; then
          POPT_LIB=""
          POPT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            POPT_LIB=""
-         fi
+
          PBX_POPT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_POPT 1
@@ -27318,16 +26455,12 @@ if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then
          pbxlibdir="-L${PORTAUDIO_DIR}"
       fi
    fi
-   pbxfuncname="Pa_GetDeviceCount"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PORTAUDIO_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_portaudio_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lportaudio" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lportaudio... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Pa_GetDeviceCount in -lportaudio" >&5
+$as_echo_n "checking for Pa_GetDeviceCount in -lportaudio... " >&6; }
+if ${ac_cv_lib_portaudio_Pa_GetDeviceCount+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27341,35 +26474,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char Pa_GetDeviceCount ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return Pa_GetDeviceCount ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_portaudio_Pa_GetDeviceCount=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_portaudio_Pa_GetDeviceCount=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_portaudio_Pa_GetDeviceCount" >&5
+$as_echo "$ac_cv_lib_portaudio_Pa_GetDeviceCount" >&6; }
+if test "x$ac_cv_lib_portaudio_Pa_GetDeviceCount" = xyes; then :
   AST_PORTAUDIO_FOUND=yes
 else
   AST_PORTAUDIO_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PORTAUDIO_FOUND}" = "yes"; then
@@ -27379,9 +26511,8 @@ fi
          PORTAUDIO_INCLUDE="-I${PORTAUDIO_DIR}/include"
       fi
       PORTAUDIO_INCLUDE="${PORTAUDIO_INCLUDE} "
-      if test "xportaudio.h" = "x" ; then      # no header, assume found
-         PORTAUDIO_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PORTAUDIO_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "portaudio.h" "ac_cv_header_portaudio_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PORTAUDIO_HEADER_FOUND}" = "x0" ; then
          PORTAUDIO_LIB=""
          PORTAUDIO_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PORTAUDIO_LIB=""
-         fi
+
          PBX_PORTAUDIO=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PORTAUDIO 1
@@ -27423,16 +26552,12 @@ if test "x${PBX_PRI}" != "x1" -a "${USE_PRI}" != "no"; then
          pbxlibdir="-L${PRI_DIR}"
       fi
    fi
-   pbxfuncname="pri_connected_line_update"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_connected_line_update in -lpri" >&5
+$as_echo_n "checking for pri_connected_line_update in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_connected_line_update+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27446,35 +26571,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_connected_line_update ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_connected_line_update ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_connected_line_update=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_connected_line_update=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_connected_line_update" >&5
+$as_echo "$ac_cv_lib_pri_pri_connected_line_update" >&6; }
+if test "x$ac_cv_lib_pri_pri_connected_line_update" = xyes; then :
   AST_PRI_FOUND=yes
 else
   AST_PRI_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_FOUND}" = "yes"; then
@@ -27484,9 +26608,8 @@ fi
          PRI_INCLUDE="-I${PRI_DIR}/include"
       fi
       PRI_INCLUDE="${PRI_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_HEADER_FOUND}" = "x0" ; then
          PRI_LIB=""
          PRI_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_LIB=""
-         fi
+
          PBX_PRI=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI 1
@@ -27527,16 +26648,12 @@ if test "x${PBX_PRI_SETUP_ACK_INBAND}" != "x1" -a "${USE_PRI_SETUP_ACK_INBAND}"
          pbxlibdir="-L${PRI_SETUP_ACK_INBAND_DIR}"
       fi
    fi
-   pbxfuncname="pri_setup_ack"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_SETUP_ACK_INBAND_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_setup_ack in -lpri" >&5
+$as_echo_n "checking for pri_setup_ack in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_setup_ack+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27550,35 +26667,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_setup_ack ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_setup_ack ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_setup_ack=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_setup_ack=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_setup_ack" >&5
+$as_echo "$ac_cv_lib_pri_pri_setup_ack" >&6; }
+if test "x$ac_cv_lib_pri_pri_setup_ack" = xyes; then :
   AST_PRI_SETUP_ACK_INBAND_FOUND=yes
 else
   AST_PRI_SETUP_ACK_INBAND_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_SETUP_ACK_INBAND_FOUND}" = "yes"; then
@@ -27588,9 +26704,8 @@ fi
          PRI_SETUP_ACK_INBAND_INCLUDE="-I${PRI_SETUP_ACK_INBAND_DIR}/include"
       fi
       PRI_SETUP_ACK_INBAND_INCLUDE="${PRI_SETUP_ACK_INBAND_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_SETUP_ACK_INBAND_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_SETUP_ACK_INBAND_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_SETUP_ACK_INBAND_HEADER_FOUND}" = "x0" ; then
          PRI_SETUP_ACK_INBAND_LIB=""
          PRI_SETUP_ACK_INBAND_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_SETUP_ACK_INBAND_LIB=""
-         fi
+
          PBX_PRI_SETUP_ACK_INBAND=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_SETUP_ACK_INBAND 1
@@ -27631,16 +26744,12 @@ if test "x${PBX_PRI_L2_PERSISTENCE}" != "x1" -a "${USE_PRI_L2_PERSISTENCE}" != "
          pbxlibdir="-L${PRI_L2_PERSISTENCE_DIR}"
       fi
    fi
-   pbxfuncname="pri_persistent_layer2_option"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_L2_PERSISTENCE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_persistent_layer2_option in -lpri" >&5
+$as_echo_n "checking for pri_persistent_layer2_option in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_persistent_layer2_option+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27654,35 +26763,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_persistent_layer2_option ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_persistent_layer2_option ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_persistent_layer2_option=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_persistent_layer2_option=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_persistent_layer2_option" >&5
+$as_echo "$ac_cv_lib_pri_pri_persistent_layer2_option" >&6; }
+if test "x$ac_cv_lib_pri_pri_persistent_layer2_option" = xyes; then :
   AST_PRI_L2_PERSISTENCE_FOUND=yes
 else
   AST_PRI_L2_PERSISTENCE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_L2_PERSISTENCE_FOUND}" = "yes"; then
@@ -27692,9 +26800,8 @@ fi
          PRI_L2_PERSISTENCE_INCLUDE="-I${PRI_L2_PERSISTENCE_DIR}/include"
       fi
       PRI_L2_PERSISTENCE_INCLUDE="${PRI_L2_PERSISTENCE_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_L2_PERSISTENCE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_L2_PERSISTENCE_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_L2_PERSISTENCE_HEADER_FOUND}" = "x0" ; then
          PRI_L2_PERSISTENCE_LIB=""
          PRI_L2_PERSISTENCE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_L2_PERSISTENCE_LIB=""
-         fi
+
          PBX_PRI_L2_PERSISTENCE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_L2_PERSISTENCE 1
@@ -27735,16 +26840,12 @@ if test "x${PBX_PRI_DATETIME_SEND}" != "x1" -a "${USE_PRI_DATETIME_SEND}" != "no
          pbxlibdir="-L${PRI_DATETIME_SEND_DIR}"
       fi
    fi
-   pbxfuncname="pri_date_time_send_option"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_DATETIME_SEND_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_date_time_send_option in -lpri" >&5
+$as_echo_n "checking for pri_date_time_send_option in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_date_time_send_option+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27758,35 +26859,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_date_time_send_option ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_date_time_send_option ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_date_time_send_option=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_date_time_send_option=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_date_time_send_option" >&5
+$as_echo "$ac_cv_lib_pri_pri_date_time_send_option" >&6; }
+if test "x$ac_cv_lib_pri_pri_date_time_send_option" = xyes; then :
   AST_PRI_DATETIME_SEND_FOUND=yes
 else
   AST_PRI_DATETIME_SEND_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_DATETIME_SEND_FOUND}" = "yes"; then
@@ -27796,9 +26896,8 @@ fi
          PRI_DATETIME_SEND_INCLUDE="-I${PRI_DATETIME_SEND_DIR}/include"
       fi
       PRI_DATETIME_SEND_INCLUDE="${PRI_DATETIME_SEND_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_DATETIME_SEND_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_DATETIME_SEND_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_DATETIME_SEND_HEADER_FOUND}" = "x0" ; then
          PRI_DATETIME_SEND_LIB=""
          PRI_DATETIME_SEND_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_DATETIME_SEND_LIB=""
-         fi
+
          PBX_PRI_DATETIME_SEND=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_DATETIME_SEND 1
@@ -27839,16 +26936,12 @@ if test "x${PBX_PRI_MWI_V2}" != "x1" -a "${USE_PRI_MWI_V2}" != "no"; then
          pbxlibdir="-L${PRI_MWI_V2_DIR}"
       fi
    fi
-   pbxfuncname="pri_mwi_indicate_v2"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_MWI_V2_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_mwi_indicate_v2 in -lpri" >&5
+$as_echo_n "checking for pri_mwi_indicate_v2 in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_mwi_indicate_v2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27862,35 +26955,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_mwi_indicate_v2 ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_mwi_indicate_v2 ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_mwi_indicate_v2=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_mwi_indicate_v2=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_mwi_indicate_v2" >&5
+$as_echo "$ac_cv_lib_pri_pri_mwi_indicate_v2" >&6; }
+if test "x$ac_cv_lib_pri_pri_mwi_indicate_v2" = xyes; then :
   AST_PRI_MWI_V2_FOUND=yes
 else
   AST_PRI_MWI_V2_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_MWI_V2_FOUND}" = "yes"; then
@@ -27900,9 +26992,8 @@ fi
          PRI_MWI_V2_INCLUDE="-I${PRI_MWI_V2_DIR}/include"
       fi
       PRI_MWI_V2_INCLUDE="${PRI_MWI_V2_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_MWI_V2_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_MWI_V2_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_MWI_V2_HEADER_FOUND}" = "x0" ; then
          PRI_MWI_V2_LIB=""
          PRI_MWI_V2_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_MWI_V2_LIB=""
-         fi
+
          PBX_PRI_MWI_V2=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_MWI_V2 1
@@ -27943,16 +27032,12 @@ if test "x${PBX_PRI_DISPLAY_TEXT}" != "x1" -a "${USE_PRI_DISPLAY_TEXT}" != "no";
          pbxlibdir="-L${PRI_DISPLAY_TEXT_DIR}"
       fi
    fi
-   pbxfuncname="pri_display_text"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_DISPLAY_TEXT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_display_text in -lpri" >&5
+$as_echo_n "checking for pri_display_text in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_display_text+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -27966,35 +27051,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_display_text ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_display_text ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_display_text=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_display_text=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_display_text" >&5
+$as_echo "$ac_cv_lib_pri_pri_display_text" >&6; }
+if test "x$ac_cv_lib_pri_pri_display_text" = xyes; then :
   AST_PRI_DISPLAY_TEXT_FOUND=yes
 else
   AST_PRI_DISPLAY_TEXT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_DISPLAY_TEXT_FOUND}" = "yes"; then
@@ -28004,9 +27088,8 @@ fi
          PRI_DISPLAY_TEXT_INCLUDE="-I${PRI_DISPLAY_TEXT_DIR}/include"
       fi
       PRI_DISPLAY_TEXT_INCLUDE="${PRI_DISPLAY_TEXT_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_DISPLAY_TEXT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_DISPLAY_TEXT_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_DISPLAY_TEXT_HEADER_FOUND}" = "x0" ; then
          PRI_DISPLAY_TEXT_LIB=""
          PRI_DISPLAY_TEXT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_DISPLAY_TEXT_LIB=""
-         fi
+
          PBX_PRI_DISPLAY_TEXT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_DISPLAY_TEXT 1
@@ -28047,16 +27128,12 @@ if test "x${PBX_PRI_MWI}" != "x1" -a "${USE_PRI_MWI}" != "no"; then
          pbxlibdir="-L${PRI_MWI_DIR}"
       fi
    fi
-   pbxfuncname="pri_mwi_indicate"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_MWI_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_mwi_indicate in -lpri" >&5
+$as_echo_n "checking for pri_mwi_indicate in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_mwi_indicate+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28070,35 +27147,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_mwi_indicate ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_mwi_indicate ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_mwi_indicate=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_mwi_indicate=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_mwi_indicate" >&5
+$as_echo "$ac_cv_lib_pri_pri_mwi_indicate" >&6; }
+if test "x$ac_cv_lib_pri_pri_mwi_indicate" = xyes; then :
   AST_PRI_MWI_FOUND=yes
 else
   AST_PRI_MWI_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_MWI_FOUND}" = "yes"; then
@@ -28108,9 +27184,8 @@ fi
          PRI_MWI_INCLUDE="-I${PRI_MWI_DIR}/include"
       fi
       PRI_MWI_INCLUDE="${PRI_MWI_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_MWI_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_MWI_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_MWI_HEADER_FOUND}" = "x0" ; then
          PRI_MWI_LIB=""
          PRI_MWI_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_MWI_LIB=""
-         fi
+
          PBX_PRI_MWI=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_MWI 1
@@ -28151,16 +27224,12 @@ if test "x${PBX_PRI_MCID}" != "x1" -a "${USE_PRI_MCID}" != "no"; then
          pbxlibdir="-L${PRI_MCID_DIR}"
       fi
    fi
-   pbxfuncname="pri_mcid_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_MCID_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_mcid_enable in -lpri" >&5
+$as_echo_n "checking for pri_mcid_enable in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_mcid_enable+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28174,35 +27243,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_mcid_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_mcid_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_mcid_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_mcid_enable=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_mcid_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_mcid_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_mcid_enable" = xyes; then :
   AST_PRI_MCID_FOUND=yes
 else
   AST_PRI_MCID_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_MCID_FOUND}" = "yes"; then
@@ -28212,9 +27280,8 @@ fi
          PRI_MCID_INCLUDE="-I${PRI_MCID_DIR}/include"
       fi
       PRI_MCID_INCLUDE="${PRI_MCID_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_MCID_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_MCID_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_MCID_HEADER_FOUND}" = "x0" ; then
          PRI_MCID_LIB=""
          PRI_MCID_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_MCID_LIB=""
-         fi
+
          PBX_PRI_MCID=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_MCID 1
@@ -28255,16 +27320,12 @@ if test "x${PBX_PRI_CALL_WAITING}" != "x1" -a "${USE_PRI_CALL_WAITING}" != "no";
          pbxlibdir="-L${PRI_CALL_WAITING_DIR}"
       fi
    fi
-   pbxfuncname="pri_connect_ack_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_CALL_WAITING_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_connect_ack_enable in -lpri" >&5
+$as_echo_n "checking for pri_connect_ack_enable in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_connect_ack_enable+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28278,35 +27339,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_connect_ack_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_connect_ack_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_connect_ack_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_connect_ack_enable=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_connect_ack_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_connect_ack_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_connect_ack_enable" = xyes; then :
   AST_PRI_CALL_WAITING_FOUND=yes
 else
   AST_PRI_CALL_WAITING_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_CALL_WAITING_FOUND}" = "yes"; then
@@ -28316,9 +27376,8 @@ fi
          PRI_CALL_WAITING_INCLUDE="-I${PRI_CALL_WAITING_DIR}/include"
       fi
       PRI_CALL_WAITING_INCLUDE="${PRI_CALL_WAITING_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_CALL_WAITING_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_CALL_WAITING_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_CALL_WAITING_HEADER_FOUND}" = "x0" ; then
          PRI_CALL_WAITING_LIB=""
          PRI_CALL_WAITING_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_CALL_WAITING_LIB=""
-         fi
+
          PBX_PRI_CALL_WAITING=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_CALL_WAITING 1
@@ -28359,16 +27416,12 @@ if test "x${PBX_PRI_AOC_EVENTS}" != "x1" -a "${USE_PRI_AOC_EVENTS}" != "no"; the
          pbxlibdir="-L${PRI_AOC_EVENTS_DIR}"
       fi
    fi
-   pbxfuncname="pri_aoc_events_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_AOC_EVENTS_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_aoc_events_enable in -lpri" >&5
+$as_echo_n "checking for pri_aoc_events_enable in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_aoc_events_enable+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28382,35 +27435,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_aoc_events_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_aoc_events_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_aoc_events_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_aoc_events_enable=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_aoc_events_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_aoc_events_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_aoc_events_enable" = xyes; then :
   AST_PRI_AOC_EVENTS_FOUND=yes
 else
   AST_PRI_AOC_EVENTS_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_AOC_EVENTS_FOUND}" = "yes"; then
@@ -28420,9 +27472,8 @@ fi
          PRI_AOC_EVENTS_INCLUDE="-I${PRI_AOC_EVENTS_DIR}/include"
       fi
       PRI_AOC_EVENTS_INCLUDE="${PRI_AOC_EVENTS_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_AOC_EVENTS_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_AOC_EVENTS_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_AOC_EVENTS_HEADER_FOUND}" = "x0" ; then
          PRI_AOC_EVENTS_LIB=""
          PRI_AOC_EVENTS_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_AOC_EVENTS_LIB=""
-         fi
+
          PBX_PRI_AOC_EVENTS=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_AOC_EVENTS 1
@@ -28463,16 +27512,12 @@ if test "x${PBX_PRI_TRANSFER}" != "x1" -a "${USE_PRI_TRANSFER}" != "no"; then
          pbxlibdir="-L${PRI_TRANSFER_DIR}"
       fi
    fi
-   pbxfuncname="pri_transfer_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_TRANSFER_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_transfer_enable in -lpri" >&5
+$as_echo_n "checking for pri_transfer_enable in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_transfer_enable+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28486,35 +27531,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_transfer_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_transfer_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_transfer_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_transfer_enable=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_transfer_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_transfer_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_transfer_enable" = xyes; then :
   AST_PRI_TRANSFER_FOUND=yes
 else
   AST_PRI_TRANSFER_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_TRANSFER_FOUND}" = "yes"; then
@@ -28524,9 +27568,8 @@ fi
          PRI_TRANSFER_INCLUDE="-I${PRI_TRANSFER_DIR}/include"
       fi
       PRI_TRANSFER_INCLUDE="${PRI_TRANSFER_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_TRANSFER_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_TRANSFER_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_TRANSFER_HEADER_FOUND}" = "x0" ; then
          PRI_TRANSFER_LIB=""
          PRI_TRANSFER_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_TRANSFER_LIB=""
-         fi
+
          PBX_PRI_TRANSFER=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_TRANSFER 1
@@ -28567,16 +27608,12 @@ if test "x${PBX_PRI_CCSS}" != "x1" -a "${USE_PRI_CCSS}" != "no"; then
          pbxlibdir="-L${PRI_CCSS_DIR}"
       fi
    fi
-   pbxfuncname="pri_cc_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_CCSS_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_cc_enable in -lpri" >&5
+$as_echo_n "checking for pri_cc_enable in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_cc_enable+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28590,35 +27627,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_cc_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_cc_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_cc_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_cc_enable=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_cc_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_cc_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_cc_enable" = xyes; then :
   AST_PRI_CCSS_FOUND=yes
 else
   AST_PRI_CCSS_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_CCSS_FOUND}" = "yes"; then
@@ -28628,9 +27664,8 @@ fi
          PRI_CCSS_INCLUDE="-I${PRI_CCSS_DIR}/include"
       fi
       PRI_CCSS_INCLUDE="${PRI_CCSS_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_CCSS_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_CCSS_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_CCSS_HEADER_FOUND}" = "x0" ; then
          PRI_CCSS_LIB=""
          PRI_CCSS_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_CCSS_LIB=""
-         fi
+
          PBX_PRI_CCSS=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_CCSS 1
@@ -28671,16 +27704,12 @@ if test "x${PBX_PRI_HANGUP_FIX}" != "x1" -a "${USE_PRI_HANGUP_FIX}" != "no"; the
          pbxlibdir="-L${PRI_HANGUP_FIX_DIR}"
       fi
    fi
-   pbxfuncname="pri_hangup_fix_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_HANGUP_FIX_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_hangup_fix_enable in -lpri" >&5
+$as_echo_n "checking for pri_hangup_fix_enable in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_hangup_fix_enable+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28694,35 +27723,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_hangup_fix_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_hangup_fix_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_hangup_fix_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_hangup_fix_enable=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_hangup_fix_enable" >&5
+$as_echo "$ac_cv_lib_pri_pri_hangup_fix_enable" >&6; }
+if test "x$ac_cv_lib_pri_pri_hangup_fix_enable" = xyes; then :
   AST_PRI_HANGUP_FIX_FOUND=yes
 else
   AST_PRI_HANGUP_FIX_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_HANGUP_FIX_FOUND}" = "yes"; then
@@ -28732,9 +27760,8 @@ fi
          PRI_HANGUP_FIX_INCLUDE="-I${PRI_HANGUP_FIX_DIR}/include"
       fi
       PRI_HANGUP_FIX_INCLUDE="${PRI_HANGUP_FIX_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_HANGUP_FIX_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_HANGUP_FIX_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_HANGUP_FIX_HEADER_FOUND}" = "x0" ; then
          PRI_HANGUP_FIX_LIB=""
          PRI_HANGUP_FIX_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_HANGUP_FIX_LIB=""
-         fi
+
          PBX_PRI_HANGUP_FIX=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_HANGUP_FIX 1
@@ -28775,16 +27800,12 @@ if test "x${PBX_PRI_SUBADDR}" != "x1" -a "${USE_PRI_SUBADDR}" != "no"; then
          pbxlibdir="-L${PRI_SUBADDR_DIR}"
       fi
    fi
-   pbxfuncname="pri_sr_set_called_subaddress"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_SUBADDR_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pri_sr_set_called_subaddress in -lpri" >&5
+$as_echo_n "checking for pri_sr_set_called_subaddress in -lpri... " >&6; }
+if ${ac_cv_lib_pri_pri_sr_set_called_subaddress+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28798,35 +27819,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_sr_set_called_subaddress ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_sr_set_called_subaddress ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_sr_set_called_subaddress=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_sr_set_called_subaddress=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pri_pri_sr_set_called_subaddress" >&5
+$as_echo "$ac_cv_lib_pri_pri_sr_set_called_subaddress" >&6; }
+if test "x$ac_cv_lib_pri_pri_sr_set_called_subaddress" = xyes; then :
   AST_PRI_SUBADDR_FOUND=yes
 else
   AST_PRI_SUBADDR_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_SUBADDR_FOUND}" = "yes"; then
@@ -28836,9 +27856,8 @@ fi
          PRI_SUBADDR_INCLUDE="-I${PRI_SUBADDR_DIR}/include"
       fi
       PRI_SUBADDR_INCLUDE="${PRI_SUBADDR_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_SUBADDR_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${PRI_SUBADDR_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_SUBADDR_HEADER_FOUND}" = "x0" ; then
          PRI_SUBADDR_LIB=""
          PRI_SUBADDR_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_SUBADDR_LIB=""
-         fi
+
          PBX_PRI_SUBADDR=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_SUBADDR 1
@@ -28879,16 +27896,12 @@ if test "x${PBX_PRI_CALL_HOLD}" != "x1" -a "${USE_PRI_CALL_HOLD}" != "no"; then
          pbxlibdir="-L${PRI_CALL_HOLD_DIR}"
       fi
    fi
-   pbxfuncname="pri_hold_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_CALL_HOLD_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
@@ -28902,35 +27915,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_hold_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_hold_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_hold_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_hold_enable=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 :
+{ $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
 else
   AST_PRI_CALL_HOLD_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_CALL_HOLD_FOUND}" = "yes"; then
@@ -28940,9 +27952,8 @@ fi
          PRI_CALL_HOLD_INCLUDE="-I${PRI_CALL_HOLD_DIR}/include"
       fi
       PRI_CALL_HOLD_INCLUDE="${PRI_CALL_HOLD_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_CALL_HOLD_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_CALL_HOLD_HEADER_FOUND}" = "x0" ; then
          PRI_CALL_HOLD_LIB=""
          PRI_CALL_HOLD_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_CALL_HOLD_LIB=""
-         fi
+
          PBX_PRI_CALL_HOLD=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_CALL_HOLD 1
@@ -28983,16 +27992,12 @@ if test "x${PBX_PRI_CALL_REROUTING}" != "x1" -a "${USE_PRI_CALL_REROUTING}" != "
          pbxlibdir="-L${PRI_CALL_REROUTING_DIR}"
       fi
    fi
-   pbxfuncname="pri_reroute_enable"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_CALL_REROUTING_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
@@ -29006,35 +28011,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_reroute_enable ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_reroute_enable ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_reroute_enable=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_reroute_enable=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 :
+{ $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
 else
   AST_PRI_CALL_REROUTING_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_CALL_REROUTING_FOUND}" = "yes"; then
@@ -29044,9 +28048,8 @@ fi
          PRI_CALL_REROUTING_INCLUDE="-I${PRI_CALL_REROUTING_DIR}/include"
       fi
       PRI_CALL_REROUTING_INCLUDE="${PRI_CALL_REROUTING_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_CALL_REROUTING_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_CALL_REROUTING_HEADER_FOUND}" = "x0" ; then
          PRI_CALL_REROUTING_LIB=""
          PRI_CALL_REROUTING_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_CALL_REROUTING_LIB=""
-         fi
+
          PBX_PRI_CALL_REROUTING=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_CALL_REROUTING 1
@@ -29087,16 +28088,12 @@ if test "x${PBX_PRI_SETUP_KEYPAD}" != "x1" -a "${USE_PRI_SETUP_KEYPAD}" != "no";
          pbxlibdir="-L${PRI_SETUP_KEYPAD_DIR}"
       fi
    fi
-   pbxfuncname="pri_sr_set_keypad_digits"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_SETUP_KEYPAD_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -29110,35 +28107,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_sr_set_keypad_digits ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_sr_set_keypad_digits ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_sr_set_keypad_digits=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_sr_set_keypad_digits=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 :
+{ $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
 else
   AST_PRI_SETUP_KEYPAD_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_SETUP_KEYPAD_FOUND}" = "yes"; then
@@ -29148,9 +28144,8 @@ fi
          PRI_SETUP_KEYPAD_INCLUDE="-I${PRI_SETUP_KEYPAD_DIR}/include"
       fi
       PRI_SETUP_KEYPAD_INCLUDE="${PRI_SETUP_KEYPAD_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_SETUP_KEYPAD_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_SETUP_KEYPAD_HEADER_FOUND}" = "x0" ; then
          PRI_SETUP_KEYPAD_LIB=""
          PRI_SETUP_KEYPAD_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_SETUP_KEYPAD_LIB=""
-         fi
+
          PBX_PRI_SETUP_KEYPAD=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_SETUP_KEYPAD 1
@@ -29195,16 +28188,12 @@ if test "x${PBX_PRI_PROG_W_CAUSE}" != "x1" -a "${USE_PRI_PROG_W_CAUSE}" != "no";
          pbxlibdir="-L${PRI_PROG_W_CAUSE_DIR}"
       fi
    fi
-   pbxfuncname="pri_progress_with_cause"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_PROG_W_CAUSE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -29218,35 +28207,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_progress_with_cause ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_progress_with_cause ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_progress_with_cause=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_progress_with_cause=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 :
+{ $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
 else
   AST_PRI_PROG_W_CAUSE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_PROG_W_CAUSE_FOUND}" = "yes"; then
@@ -29256,9 +28244,8 @@ fi
          PRI_PROG_W_CAUSE_INCLUDE="-I${PRI_PROG_W_CAUSE_DIR}/include"
       fi
       PRI_PROG_W_CAUSE_INCLUDE="${PRI_PROG_W_CAUSE_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_PROG_W_CAUSE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_PROG_W_CAUSE_HEADER_FOUND}" = "x0" ; then
          PRI_PROG_W_CAUSE_LIB=""
          PRI_PROG_W_CAUSE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_PROG_W_CAUSE_LIB=""
-         fi
+
          PBX_PRI_PROG_W_CAUSE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_PROG_W_CAUSE 1
@@ -29299,16 +28284,12 @@ if test "x${PBX_PRI_INBANDDISCONNECT}" != "x1" -a "${USE_PRI_INBANDDISCONNECT}"
          pbxlibdir="-L${PRI_INBANDDISCONNECT_DIR}"
       fi
    fi
-   pbxfuncname="pri_set_inbanddisconnect"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_INBANDDISCONNECT_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
@@ -29322,35 +28303,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_set_inbanddisconnect ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_set_inbanddisconnect ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_set_inbanddisconnect=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_pri_pri_set_inbanddisconnect=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 :
+{ $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
 else
   AST_PRI_INBANDDISCONNECT_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_INBANDDISCONNECT_FOUND}" = "yes"; then
@@ -29360,9 +28340,8 @@ fi
          PRI_INBANDDISCONNECT_INCLUDE="-I${PRI_INBANDDISCONNECT_DIR}/include"
       fi
       PRI_INBANDDISCONNECT_INCLUDE="${PRI_INBANDDISCONNECT_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_INBANDDISCONNECT_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_INBANDDISCONNECT_HEADER_FOUND}" = "x0" ; then
          PRI_INBANDDISCONNECT_LIB=""
          PRI_INBANDDISCONNECT_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_INBANDDISCONNECT_LIB=""
-         fi
+
          PBX_PRI_INBANDDISCONNECT=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_INBANDDISCONNECT 1
@@ -29403,16 +28380,12 @@ if test "x${PBX_PRI_SERVICE_MESSAGES}" != "x1" -a "${USE_PRI_SERVICE_MESSAGES}"
          pbxlibdir="-L${PRI_SERVICE_MESSAGES_DIR}"
       fi
    fi
-   pbxfuncname="pri_maintenance_service"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_SERVICE_MESSAGES_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
@@ -29426,35 +28399,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_maintenance_service ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_maintenance_service ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_maintenance_service=yes
 else
-  eval "$as_ac_Lib=no"
+  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
-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 :
+{ $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
 else
   AST_PRI_SERVICE_MESSAGES_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_SERVICE_MESSAGES_FOUND}" = "yes"; then
@@ -29464,9 +28436,8 @@ fi
          PRI_SERVICE_MESSAGES_INCLUDE="-I${PRI_SERVICE_MESSAGES_DIR}/include"
       fi
       PRI_SERVICE_MESSAGES_INCLUDE="${PRI_SERVICE_MESSAGES_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_SERVICE_MESSAGES_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_SERVICE_MESSAGES_HEADER_FOUND}" = "x0" ; then
          PRI_SERVICE_MESSAGES_LIB=""
          PRI_SERVICE_MESSAGES_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_SERVICE_MESSAGES_LIB=""
-         fi
+
          PBX_PRI_SERVICE_MESSAGES=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_SERVICE_MESSAGES 1
@@ -29507,16 +28476,12 @@ if test "x${PBX_PRI_REVERSE_CHARGE}" != "x1" -a "${USE_PRI_REVERSE_CHARGE}" != "
          pbxlibdir="-L${PRI_REVERSE_CHARGE_DIR}"
       fi
    fi
-   pbxfuncname="pri_sr_set_reversecharge"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_PRI_REVERSE_CHARGE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
@@ -29530,35 +28495,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char pri_sr_set_reversecharge ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return pri_sr_set_reversecharge ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_pri_pri_sr_set_reversecharge=yes
 else
-  eval "$as_ac_Lib=no"
+  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
-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 :
+{ $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
 else
   AST_PRI_REVERSE_CHARGE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_PRI_REVERSE_CHARGE_FOUND}" = "yes"; then
@@ -29568,9 +28532,8 @@ fi
          PRI_REVERSE_CHARGE_INCLUDE="-I${PRI_REVERSE_CHARGE_DIR}/include"
       fi
       PRI_REVERSE_CHARGE_INCLUDE="${PRI_REVERSE_CHARGE_INCLUDE} "
-      if test "xlibpri.h" = "x" ; then # no header, assume found
-         PRI_REVERSE_CHARGE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${PRI_REVERSE_CHARGE_HEADER_FOUND}" = "x0" ; then
          PRI_REVERSE_CHARGE_LIB=""
          PRI_REVERSE_CHARGE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            PRI_REVERSE_CHARGE_LIB=""
-         fi
+
          PBX_PRI_REVERSE_CHARGE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_PRI_REVERSE_CHARGE 1
@@ -29613,16 +28574,12 @@ if test "x${PBX_RESAMPLE}" != "x1" -a "${USE_RESAMPLE}" != "no"; then
          pbxlibdir="-L${RESAMPLE_DIR}"
       fi
    fi
-   pbxfuncname="resample_open"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_RESAMPLE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_resample_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lresample" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lresample... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -29636,35 +28593,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char resample_open ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return resample_open ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_resample_resample_open=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_resample_resample_open=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 :
+{ $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
 else
   AST_RESAMPLE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_RESAMPLE_FOUND}" = "yes"; then
@@ -29674,9 +28630,8 @@ fi
          RESAMPLE_INCLUDE="-I${RESAMPLE_DIR}/include"
       fi
       RESAMPLE_INCLUDE="${RESAMPLE_INCLUDE} "
-      if test "xlibresample.h" = "x" ; then    # no header, assume found
-         RESAMPLE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${RESAMPLE_HEADER_FOUND}" = "x0" ; then
          RESAMPLE_LIB=""
          RESAMPLE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            RESAMPLE_LIB=""
-         fi
+
          PBX_RESAMPLE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_RESAMPLE 1
@@ -29717,16 +28670,12 @@ if test "x${PBX_FFTW3}" != "x1" -a "${USE_FFTW3}" != "no"; then
          pbxlibdir="-L${FFTW3_DIR}"
       fi
    fi
-   pbxfuncname="fftw_alloc_real"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_FFTW3_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_fftw3_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lfftw3" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lfftw3... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_alloc_real in -lfftw3" >&5
+$as_echo_n "checking for fftw_alloc_real in -lfftw3... " >&6; }
+if ${ac_cv_lib_fftw3_fftw_alloc_real+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -29740,35 +28689,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char fftw_alloc_real ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return fftw_alloc_real ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_fftw3_fftw_alloc_real=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_fftw3_fftw_alloc_real=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_alloc_real" >&5
+$as_echo "$ac_cv_lib_fftw3_fftw_alloc_real" >&6; }
+if test "x$ac_cv_lib_fftw3_fftw_alloc_real" = xyes; then :
   AST_FFTW3_FOUND=yes
 else
   AST_FFTW3_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_FFTW3_FOUND}" = "yes"; then
@@ -29778,9 +28726,8 @@ fi
          FFTW3_INCLUDE="-I${FFTW3_DIR}/include"
       fi
       FFTW3_INCLUDE="${FFTW3_INCLUDE} "
-      if test "xfftw3.h" = "x" ; then  # no header, assume found
-         FFTW3_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${FFTW3_HEADER_FOUND}" = "x0" ; then
          FFTW3_LIB=""
          FFTW3_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            FFTW3_LIB=""
-         fi
+
          PBX_FFTW3=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_FFTW3 1
@@ -29821,16 +28766,12 @@ if test "x${PBX_SNDFILE}" != "x1" -a "${USE_SNDFILE}" != "no"; then
          pbxlibdir="-L${SNDFILE_DIR}"
       fi
    fi
-   pbxfuncname="sf_open"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_SNDFILE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_sndfile_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsndfile" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lsndfile... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $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
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -29844,35 +28785,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char sf_open ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return sf_open ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_sndfile_sf_open=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_sndfile_sf_open=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 :
+{ $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
 else
   AST_SNDFILE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_SNDFILE_FOUND}" = "yes"; then
@@ -29882,9 +28822,8 @@ fi
          SNDFILE_INCLUDE="-I${SNDFILE_DIR}/include"
       fi
       SNDFILE_INCLUDE="${SNDFILE_INCLUDE} "
-      if test "xsndfile.h" = "x" ; then        # no header, assume found
-         SNDFILE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          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"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${SNDFILE_HEADER_FOUND}" = "x0" ; then
          SNDFILE_LIB=""
          SNDFILE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            SNDFILE_LIB=""
-         fi
+
          PBX_SNDFILE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_SNDFILE 1
 
 
     if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
-        if test "xminimum version of SpanDSP" != "x"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for minimum version of SpanDSP" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for minimum version of SpanDSP" >&5
 $as_echo_n "checking for minimum version of SpanDSP... " >&6; }
-       else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"
-               #if SPANDSP_RELEASE_DATE < 20080516
-               #error \"spandsp 0.0.5 or greater is required\"
-               #endif
-       \" compiles using spandsp/version.h" >&5
-$as_echo_n "checking if \"
-               #if SPANDSP_RELEASE_DATE < 20080516
-               #error \"spandsp 0.0.5 or greater is required\"
-               #endif
-       \" compiles using spandsp/version.h... " >&6; }
-       fi
        saved_cppflags="${CPPFLAGS}"
        if test "x${SPANDSP_DIR}" != "x"; then
            SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
@@ -29988,16 +28912,12 @@ if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
          pbxlibdir="-L${SPANDSP_DIR}"
       fi
    fi
-   pbxfuncname="span_set_message_handler"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_SPANDSP_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for span_set_message_handler in -lspandsp" >&5
+$as_echo_n "checking for span_set_message_handler in -lspandsp... " >&6; }
+if ${ac_cv_lib_spandsp_span_set_message_handler+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -30011,35 +28931,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char span_set_message_handler ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return span_set_message_handler ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_spandsp_span_set_message_handler=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_spandsp_span_set_message_handler=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_spandsp_span_set_message_handler" >&5
+$as_echo "$ac_cv_lib_spandsp_span_set_message_handler" >&6; }
+if test "x$ac_cv_lib_spandsp_span_set_message_handler" = xyes; then :
   AST_SPANDSP_FOUND=yes
 else
   AST_SPANDSP_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_SPANDSP_FOUND}" = "yes"; then
@@ -30049,9 +28968,8 @@ fi
          SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
       fi
       SPANDSP_INCLUDE="${SPANDSP_INCLUDE} "
-      if test "xspandsp.h" = "x" ; then        # no header, assume found
-         SPANDSP_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "spandsp.h" "ac_cv_header_spandsp_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${SPANDSP_HEADER_FOUND}" = "x0" ; then
          SPANDSP_LIB=""
          SPANDSP_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            SPANDSP_LIB=""
-         fi
+
          PBX_SPANDSP=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_SPANDSP 1
@@ -30097,16 +29013,12 @@ if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
          pbxlibdir="-L${SPANDSP_DIR}"
       fi
    fi
-   pbxfuncname="t38_terminal_init"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_SPANDSP_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t38_terminal_init in -lspandsp" >&5
+$as_echo_n "checking for t38_terminal_init in -lspandsp... " >&6; }
+if ${ac_cv_lib_spandsp_t38_terminal_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -30120,35 +29032,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char t38_terminal_init ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return t38_terminal_init ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_spandsp_t38_terminal_init=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_spandsp_t38_terminal_init=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_spandsp_t38_terminal_init" >&5
+$as_echo "$ac_cv_lib_spandsp_t38_terminal_init" >&6; }
+if test "x$ac_cv_lib_spandsp_t38_terminal_init" = xyes; then :
   AST_SPANDSP_FOUND=yes
 else
   AST_SPANDSP_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_SPANDSP_FOUND}" = "yes"; then
@@ -30158,9 +29069,8 @@ fi
          SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
       fi
       SPANDSP_INCLUDE="${SPANDSP_INCLUDE} "
-      if test "xspandsp.h" = "x" ; then        # no header, assume found
-         SPANDSP_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "spandsp.h" "ac_cv_header_spandsp_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${SPANDSP_HEADER_FOUND}" = "x0" ; then
          SPANDSP_LIB=""
          SPANDSP_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            SPANDSP_LIB=""
-         fi
+
          PBX_SPANDSP=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_SPANDSP 1
@@ -30204,16 +29112,12 @@ if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then
          pbxlibdir="-L${SS7_DIR}"
       fi
    fi
-   pbxfuncname="ss7_set_isup_timer"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_SS7_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_ss7_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lss7" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lss7... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss7_set_isup_timer in -lss7" >&5
+$as_echo_n "checking for ss7_set_isup_timer in -lss7... " >&6; }
+if ${ac_cv_lib_ss7_ss7_set_isup_timer+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -30227,35 +29131,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char ss7_set_isup_timer ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return ss7_set_isup_timer ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_ss7_ss7_set_isup_timer=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_ss7_ss7_set_isup_timer=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ss7_ss7_set_isup_timer" >&5
+$as_echo "$ac_cv_lib_ss7_ss7_set_isup_timer" >&6; }
+if test "x$ac_cv_lib_ss7_ss7_set_isup_timer" = xyes; then :
   AST_SS7_FOUND=yes
 else
   AST_SS7_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_SS7_FOUND}" = "yes"; then
@@ -30265,9 +29168,8 @@ fi
          SS7_INCLUDE="-I${SS7_DIR}/include"
       fi
       SS7_INCLUDE="${SS7_INCLUDE} "
-      if test "xlibss7.h" = "x" ; then # no header, assume found
-         SS7_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${SS7_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "libss7.h" "ac_cv_header_libss7_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${SS7_HEADER_FOUND}" = "x0" ; then
          SS7_LIB=""
          SS7_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            SS7_LIB=""
-         fi
+
          PBX_SS7=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_SS7 1
@@ -30309,16 +29209,12 @@ if test "x${PBX_OPENR2}" != "x1" -a "${USE_OPENR2}" != "no"; then
          pbxlibdir="-L${OPENR2_DIR}"
       fi
    fi
-   pbxfuncname="openr2_chan_new"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_OPENR2_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_openr2_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopenr2" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lopenr2... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openr2_chan_new in -lopenr2" >&5
+$as_echo_n "checking for openr2_chan_new in -lopenr2... " >&6; }
+if ${ac_cv_lib_openr2_openr2_chan_new+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -30332,35 +29228,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char openr2_chan_new ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return openr2_chan_new ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_openr2_openr2_chan_new=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_openr2_openr2_chan_new=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openr2_openr2_chan_new" >&5
+$as_echo "$ac_cv_lib_openr2_openr2_chan_new" >&6; }
+if test "x$ac_cv_lib_openr2_openr2_chan_new" = xyes; then :
   AST_OPENR2_FOUND=yes
 else
   AST_OPENR2_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_OPENR2_FOUND}" = "yes"; then
@@ -30370,9 +29265,8 @@ fi
          OPENR2_INCLUDE="-I${OPENR2_DIR}/include"
       fi
       OPENR2_INCLUDE="${OPENR2_INCLUDE} "
-      if test "xopenr2.h" = "x" ; then # no header, assume found
-         OPENR2_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${OPENR2_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "openr2.h" "ac_cv_header_openr2_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${OPENR2_HEADER_FOUND}" = "x0" ; then
          OPENR2_LIB=""
          OPENR2_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            OPENR2_LIB=""
-         fi
+
          PBX_OPENR2=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_OPENR2 1
@@ -30414,16 +29306,12 @@ if test "x${PBX_OPUS}" != "x1" -a "${USE_OPUS}" != "no"; then
          pbxlibdir="-L${OPUS_DIR}"
       fi
    fi
-   pbxfuncname="opus_encoder_create"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_OPUS_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      as_ac_Lib=`$as_echo "ac_cv_lib_opus_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopus" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lopus... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opus_encoder_create in -lopus" >&5
+$as_echo_n "checking for opus_encoder_create in -lopus... " >&6; }
+if ${ac_cv_lib_opus_opus_encoder_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -30437,35 +29325,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char opus_encoder_create ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return opus_encoder_create ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_opus_opus_encoder_create=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_opus_opus_encoder_create=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_opus_opus_encoder_create" >&5
+$as_echo "$ac_cv_lib_opus_opus_encoder_create" >&6; }
+if test "x$ac_cv_lib_opus_opus_encoder_create" = xyes; then :
   AST_OPUS_FOUND=yes
 else
   AST_OPUS_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_OPUS_FOUND}" = "yes"; then
@@ -30475,9 +29362,8 @@ fi
          OPUS_INCLUDE="-I${OPUS_DIR}/include"
       fi
       OPUS_INCLUDE="${OPUS_INCLUDE} "
-      if test "xopus/opus.h" = "x" ; then      # no header, assume found
-         OPUS_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${OPUS_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "opus/opus.h" "ac_cv_header_opus_opus_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${OPUS_HEADER_FOUND}" = "x0" ; then
          OPUS_LIB=""
          OPUS_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            OPUS_LIB=""
-         fi
+
          PBX_OPUS=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_OPUS 1
@@ -30524,16 +29408,12 @@ if test "x${PBX_OPUSFILE}" != "x1" -a "${USE_OPUSFILE}" != "no"; then
          pbxlibdir="-L${OPUSFILE_DIR}"
       fi
    fi
-   pbxfuncname="op_open_callbacks"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_OPUSFILE_FOUND=yes
-   else
+
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $__opus_include"
-      as_ac_Lib=`$as_echo "ac_cv_lib_opusfile_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopusfile" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lopusfile... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for op_open_callbacks in -lopusfile" >&5
+$as_echo_n "checking for op_open_callbacks in -lopusfile... " >&6; }
+if ${ac_cv_lib_opusfile_op_open_callbacks+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -30547,35 +29427,34 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ${pbxfuncname} ();
+char op_open_callbacks ();
 int
 main ()
 {
-return ${pbxfuncname} ();
+return op_open_callbacks ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_opusfile_op_open_callbacks=yes
 else
-  eval "$as_ac_Lib=no"
+  ac_cv_lib_opusfile_op_open_callbacks=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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_opusfile_op_open_callbacks" >&5
+$as_echo "$ac_cv_lib_opusfile_op_open_callbacks" >&6; }
+if test "x$ac_cv_lib_opusfile_op_open_callbacks" = xyes; then :
   AST_OPUSFILE_FOUND=yes
 else
   AST_OPUSFILE_FOUND=no
 fi
 
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
-   fi
+
 
    # now check for the header.
    if test "${AST_OPUSFILE_FOUND}" = "yes"; then
@@ -30585,9 +29464,8 @@ fi
          OPUSFILE_INCLUDE="-I${OPUSFILE_DIR}/include"
       fi
       OPUSFILE_INCLUDE="${OPUSFILE_INCLUDE} $__opus_include"
-      if test "xopus/opusfile.h" = "x" ; then  # no header, assume found
-         OPUSFILE_HEADER_FOUND="1"
-      else                             # check for the header
+
+         # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${OPUSFILE_INCLUDE}"
          ac_fn_c_check_header_mongrel "$LINENO" "opus/opusfile.h" "ac_cv_header_opus_opusfile_h" "$ac_includes_default"
 
 
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
-      fi
+
       if test "x${OPUSFILE_HEADER_FOUND}" = "x0" ; then
          OPUSFILE_LIB=""
          OPUSFILE_INCLUDE=""
       else
-         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
-            OPUSFILE_LIB=""
-         fi
+
          PBX_OPUSFILE=1
          cat >>confdefs.h <<_ACEOF
 #define HAVE_OPUSFILE 1
@@ -30847,11 +29723,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-       if test "xP[WT]LIB_VERSION" != "x"; then
-               VNAME="P[WT]LIB_VERSION"
-               else
-               VNAME="PWLIB_VERSION"
-       fi
+       VNAME="P[WT]LIB_VERSION"
 
        if test "${HAS_PWLIB:-unset}" != "unset"; then
                PWLIB_VERSION=`grep "$VNAME \"" ${PWLIB_INCDIR}/ptbuildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
@@ -30860,11 +29732,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
                PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
                PWLIB_VER=$((${PWLIB_MAJOR_VERSION}*10000+${PWLIB_MINOR_VERSION}*100+${PWLIB_BUILD_NUMBER}))
                PWLIB_REQ=$((1*10000+9*100+2))
-               if test "x" = "x"; then
-                       PWLIB_MAX=9999999
-               else
-                       PWLIB_MAX=$((*10000+*100+))
-               fi
+               PWLIB_MAX=9999999
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323" >&5
 $as_echo_n "checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323... " >&6; }
@@ -31180,11 +30048,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-       if test "x" != "x"; then
-               VNAME=""
-               else
-               VNAME="OPENH323_VERSION"
-       fi
+       VNAME="OPENH323_VERSION"
 
        if test "${HAS_OPENH323:-unset}" != "unset"; then
                OPENH323_VERSION=`grep "$VNAME \"" ${OPENH323_INCDIR}/openh323buildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
@@