Merge "BuildSystem: Enable IMAP storage on OpenBSD."
authorJenkins2 <jenkins2@gerrit.asterisk.org>
Tue, 20 Feb 2018 00:09:11 +0000 (18:09 -0600)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Tue, 20 Feb 2018 00:09:11 +0000 (18:09 -0600)
1  2 
configure
configure.ac

diff --combined configure
+++ b/configure
@@@ -657,6 -657,16 +657,6 @@@ GMIME_LIB
  GMIME_CFLAGS
  PBX_SSL_OP_NO_TLSV1_2
  PBX_SSL_OP_NO_TLSV1_1
 -OPENH323_BUILD
 -OPENH323_SUFFIX
 -OPENH323_LIBDIR
 -OPENH323_INCDIR
 -OPENH323DIR
 -PWLIB_PLATFORM
 -PWLIB_LIBDIR
 -PWLIB_INCDIR
 -PWLIBDIR
 -PTLIB_CONFIG
  PYTHONDEV_LIBS
  PYTHONDEV_CFLAGS
  PYTHONDEV_INCLUDE
@@@ -840,6 -850,10 +840,6 @@@ PBX_RADIU
  RADIUS_DIR
  RADIUS_INCLUDE
  RADIUS_LIB
 -PBX_PWLIB
 -PWLIB_DIR
 -PWLIB_INCLUDE
 -PWLIB_LIB
  PBX_PRI_REVERSE_CHARGE
  PRI_REVERSE_CHARGE_DIR
  PRI_REVERSE_CHARGE_INCLUDE
@@@ -1124,6 -1138,10 +1124,6 @@@ PBX_HOAR
  HOARD_DIR
  HOARD_INCLUDE
  HOARD_LIB
 -PBX_OPENH323
 -OPENH323_DIR
 -OPENH323_INCLUDE
 -OPENH323_LIB
  PBX_GMIME
  GMIME_DIR
  GMIME_INCLUDE
@@@ -1389,6 -1407,7 +1389,6 @@@ with_gs
  with_ilbc
  with_gtk2
  with_gmime
 -with_h323
  with_hoard
  with_ical
  with_iconv
@@@ -1428,6 -1447,7 +1428,6 @@@ with_pjprojec
  with_popt
  with_portaudio
  with_pri
 -with_pwlib
  with_radius
  with_fftw3
  with_resample
@@@ -2143,6 -2163,7 +2143,6 @@@ Optional Packages
                            otherwise
    --with-gtk2=PATH        use gtk2 files in PATH
    --with-gmime=PATH       use GMime files in PATH
 -  --with-h323=PATH        use OpenH323 files in PATH
    --with-hoard=PATH       use Hoard Memory Allocator files in PATH
    --with-ical=PATH        use iCal files in PATH
    --with-iconv=PATH       use Iconv files in PATH
    --with-popt=PATH        use popt files in PATH
    --with-portaudio=PATH   use PortAudio files in PATH
    --with-pri=PATH         use ISDN PRI files in PATH
 -  --with-pwlib=PATH       use PWlib files in PATH
    --with-radius=PATH      use Radius Client files in PATH
    --with-fftw3=PATH       use LIBFFTW3 files in PATH
    --with-resample=PATH    use LIBRESAMPLE files in PATH
@@@ -3057,6 -3079,97 +3057,6 @@@ rm -f conftest.va
  
  } # ac_fn_c_compute_int
  
 -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
 -# ---------------------------------------------------------
 -# Tests whether HEADER exists, giving a warning if it cannot be compiled using
 -# the include files in INCLUDES and setting the cache variable VAR
 -# accordingly.
 -ac_fn_cxx_check_header_mongrel ()
 -{
 -  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 -  if eval \${$3+:} false; then :
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 -$as_echo_n "checking for $2... " >&6; }
 -if eval \${$3+:} false; then :
 -  $as_echo_n "(cached) " >&6
 -fi
 -eval ac_res=\$$3
 -             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
 -else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
 -$as_echo_n "checking $2 usability... " >&6; }
 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -$4
 -#include <$2>
 -_ACEOF
 -if ac_fn_cxx_try_compile "$LINENO"; then :
 -  ac_header_compiler=yes
 -else
 -  ac_header_compiler=no
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
 -
 -# Is the header present?
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
 -$as_echo_n "checking $2 presence... " >&6; }
 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include <$2>
 -_ACEOF
 -if ac_fn_cxx_try_cpp "$LINENO"; then :
 -  ac_header_preproc=yes
 -else
 -  ac_header_preproc=no
 -fi
 -rm -f conftest.err conftest.i conftest.$ac_ext
 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
 -
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
 -  yes:no: )
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 -    ;;
 -  no:yes:* )
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
 -$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
 -$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 -( $as_echo "## ------------------------------------------ ##
 -## Report this to https://issues.asterisk.org ##
 -## ------------------------------------------ ##"
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
 -    ;;
 -esac
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 -$as_echo_n "checking for $2... " >&6; }
 -if eval \${$3+:} false; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$3=\$ac_header_compiler"
 -fi
 -eval ac_res=\$$3
 -             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
 -fi
 -  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 -
 -} # ac_fn_cxx_check_header_mongrel
 -
  # ac_fn_cxx_try_link LINENO
  # -------------------------
  # Try to link conftest.$ac_ext, and return whether this succeeded.
    as_fn_set_status $ac_retval
  
  } # ac_fn_cxx_try_link
 -
 -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
 -# ---------------------------------------------------------
 -# Tests whether HEADER exists and can be compiled using the include files in
 -# INCLUDES, setting the cache variable VAR accordingly.
 -ac_fn_cxx_check_header_compile ()
 -{
 -  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 -$as_echo_n "checking for $2... " >&6; }
 -if eval \${$3+:} false; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -$4
 -#include <$2>
 -_ACEOF
 -if ac_fn_cxx_try_compile "$LINENO"; then :
 -  eval "$3=yes"
 -else
 -  eval "$3=no"
 -fi
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -eval ac_res=\$$3
 -             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
 -  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 -
 -} # ac_fn_cxx_check_header_compile
  cat >config.log <<_ACEOF
  This file contains any messages produced by compilers while
  running configure, to aid debugging if configure makes a mistake.
  
  
  
 -    OPENH323_DESCRIP="OpenH323"
 -    OPENH323_OPTION="h323"
 -    PBX_OPENH323=0
 -
 -# Check whether --with-h323 was given.
 -if test "${with_h323+set}" = set; then :
 -  withval=$with_h323;
 -      case ${withval} in
 -      n|no)
 -      USE_OPENH323=no
 -      # -1 is a magic value used by menuselect to know that the package
 -      # was disabled, other than 'not found'
 -      PBX_OPENH323=-1
 -      ;;
 -      y|ye|yes)
 -      ac_mandatory_list="${ac_mandatory_list} OPENH323"
 -      ;;
 -      *)
 -      OPENH323_DIR="${withval}"
 -      ac_mandatory_list="${ac_mandatory_list} OPENH323"
 -      ;;
 -      esac
 -
 -fi
 -
 -
 -
 -
 -
 -
 -
 -
      HOARD_DESCRIP="Hoard Memory Allocator"
      HOARD_OPTION="hoard"
      PBX_HOARD=0
@@@ -11873,6 -12049,38 +11873,6 @@@ PBX_PRI_REVERSE_CHARGE=
  
  # ------------------------------------^
  
 -    PWLIB_DESCRIP="PWlib"
 -    PWLIB_OPTION="pwlib"
 -    PBX_PWLIB=0
 -
 -# Check whether --with-pwlib was given.
 -if test "${with_pwlib+set}" = set; then :
 -  withval=$with_pwlib;
 -      case ${withval} in
 -      n|no)
 -      USE_PWLIB=no
 -      # -1 is a magic value used by menuselect to know that the package
 -      # was disabled, other than 'not found'
 -      PBX_PWLIB=-1
 -      ;;
 -      y|ye|yes)
 -      ac_mandatory_list="${ac_mandatory_list} PWLIB"
 -      ;;
 -      *)
 -      PWLIB_DIR="${withval}"
 -      ac_mandatory_list="${ac_mandatory_list} PWLIB"
 -      ;;
 -      esac
 -
 -fi
 -
 -
 -
 -
 -
 -
 -
 -
      RADIUS_DESCRIP="Radius Client"
      RADIUS_OPTION="radius"
      PBX_RADIUS=0
@@@ -20768,109 -20976,6 +20768,109 @@@ $as_echo "#define HAVE_LIBEDIT 1" >>con
  fi
     fi
  
 +if test "${PBX_LIBEDIT}" != 1; then
 +      # some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
 +
 +if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then
 +   pbxlibdir=""
 +   # if --with-LIBEDIT=DIR has been specified, use it.
 +   if test "x${LIBEDIT_DIR}" != "x"; then
 +      if test -d ${LIBEDIT_DIR}/lib; then
 +         pbxlibdir="-L${LIBEDIT_DIR}/lib"
 +      else
 +         pbxlibdir="-L${LIBEDIT_DIR}"
 +      fi
 +   fi
 +
 +      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
 +      CFLAGS="${CFLAGS} "
 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_init in -ledit" >&5
 +$as_echo_n "checking for history_init in -ledit... " >&6; }
 +if ${ac_cv_lib_edit_history_init+:} false; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-ledit ${pbxlibdir} -ltermcap $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 history_init ();
 +int
 +main ()
 +{
 +return history_init ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_edit_history_init=yes
 +else
 +  ac_cv_lib_edit_history_init=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_history_init" >&5
 +$as_echo "$ac_cv_lib_edit_history_init" >&6; }
 +if test "x$ac_cv_lib_edit_history_init" = xyes; then :
 +  AST_LIBEDIT_FOUND=yes
 +else
 +  AST_LIBEDIT_FOUND=no
 +fi
 +
 +      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
 +
 +
 +   # now check for the header.
 +   if test "${AST_LIBEDIT_FOUND}" = "yes"; then
 +      LIBEDIT_LIB="${pbxlibdir} -ledit -ltermcap"
 +      # if --with-LIBEDIT=DIR has been specified, use it.
 +      if test "x${LIBEDIT_DIR}" != "x"; then
 +         LIBEDIT_INCLUDE="-I${LIBEDIT_DIR}/include"
 +      fi
 +      LIBEDIT_INCLUDE="${LIBEDIT_INCLUDE} "
 +
 +         # check for the header
 +         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
 +         CPPFLAGS="${CPPFLAGS} ${LIBEDIT_INCLUDE}"
 +         ac_fn_c_check_header_mongrel "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"
 +if test "x$ac_cv_header_histedit_h" = xyes; then :
 +  LIBEDIT_HEADER_FOUND=1
 +else
 +  LIBEDIT_HEADER_FOUND=0
 +fi
 +
 +
 +         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
 +
 +      if test "x${LIBEDIT_HEADER_FOUND}" = "x0" ; then
 +         LIBEDIT_LIB=""
 +         LIBEDIT_INCLUDE=""
 +      else
 +
 +         PBX_LIBEDIT=1
 +         cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBEDIT 1
 +_ACEOF
 +
 +      fi
 +   fi
 +fi
 +
 +
 +fi
 +if test "${PBX_LIBEDIT}" != 1; then
 +      as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5
 +      exit 1
 +fi
  
      if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5
@@@ -20912,6 -21017,11 +20912,6 @@@ rm -f core conftest.err conftest.$ac_ob
      fi
  
  
 -if test "${PBX_LIBEDIT}" != 1; then
 -      as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5
 -      exit 1
 -fi
 -
  
  if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
     pbxlibdir=""
@@@ -21858,7 -21968,7 +21858,7 @@@ rm -f core conftest.err conftest.$ac_ob
      conftest$ac_exeext conftest.$ac_ext
                else #looking in imap directory didn't work, try c-client
                        imap_ldflags=""
-                       imap_libs="-lc-client"
+                       imap_libs="-lcrypto -lssl -lc-client"
                        imap_include="-DUSE_SYSTEM_CCLIENT"
                        CPPFLAGS="${saved_cppflags}"
                        LIBS="${saved_libs}"
  
  
  
 -if test "${USE_PWLIB}" != "no"; then
 -      if test -n "${PWLIB_DIR}"; then
 -              PWLIBDIR="${PWLIB_DIR}"
 -      fi
 -
 -
 -
 -PWLIB_INCDIR=
 -PWLIB_LIBDIR=
 -ac_ext=cpp
 -ac_cpp='$CXXCPP $CPPFLAGS'
 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 -
 -if test "${PWLIBDIR:-unset}" != "unset" ; then
 -  as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/version.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/version.h" "$as_ac_Header" "$ac_includes_default"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -  HAS_PWLIB=1
 -fi
 -
 -
 -fi
 -if test "${HAS_PWLIB:-unset}" = "unset" ; then
 -  if test "${OPENH323DIR:-unset}" != "unset"; then
 -    as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/../pwlib/version.h" "$as_ac_Header" "$ac_includes_default"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -  HAS_PWLIB=1
 -fi
 -
 -
 -  fi
 -  if test "${HAS_PWLIB:-unset}" != "unset" ; then
 -    PWLIBDIR="${OPENH323DIR}/../pwlib"
 -  else
 -    as_ac_Header=`$as_echo "ac_cv_header_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_mongrel "$LINENO" "${HOME}/pwlib/include/ptlib.h" "$as_ac_Header" "$ac_includes_default"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -  HAS_PWLIB=1
 -fi
 -
 -
 -    if test "${HAS_PWLIB:-unset}" != "unset" ; then
 -      PWLIBDIR="${HOME}/pwlib"
 -    else
 -      ac_fn_cxx_check_header_mongrel "$LINENO" "/usr/local/include/ptlib.h" "ac_cv_header__usr_local_include_ptlib_h" "$ac_includes_default"
 -if test "x$ac_cv_header__usr_local_include_ptlib_h" = xyes; then :
 -  HAS_PWLIB=1
 -fi
 -
 -
 -      if test "${HAS_PWLIB:-unset}" != "unset" ; then
 -        # Extract the first word of "ptlib-config", so it can be a program name with args.
 -set dummy ptlib-config; 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_PTLIB_CONFIG+:} false; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  case $PTLIB_CONFIG in
 -  [\\/]* | ?:[\\/]*)
 -  ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
 -  ;;
 -  *)
 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 -for as_dir in /usr/local/bin$PATH_SEPARATOR/usr/local/share/ptlib/make$PATH_SEPARATOR/usr/local/share/pwlib/make
 -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_PTLIB_CONFIG="$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
 -
 -  ;;
 -esac
 -fi
 -PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
 -if test -n "$PTLIB_CONFIG"; then
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTLIB_CONFIG" >&5
 -$as_echo "$PTLIB_CONFIG" >&6; }
 -else
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -fi
 -
 -
 -        PWLIB_INCDIR="/usr/local/include"
 -        PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
 -        if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
 -          PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
 -        fi
 -        if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
 -          if test "x$LIB64" != "x"; then
 -            PWLIB_LIBDIR="/usr/local/lib64"
 -          else
 -            PWLIB_LIBDIR="/usr/local/lib"
 -          fi
 -        fi
 -        PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
 -        PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
 -      else
 -        ac_fn_cxx_check_header_mongrel "$LINENO" "/usr/include/ptlib.h" "ac_cv_header__usr_include_ptlib_h" "$ac_includes_default"
 -if test "x$ac_cv_header__usr_include_ptlib_h" = xyes; then :
 -  HAS_PWLIB=1
 -fi
 -
 -
 -        if test "${HAS_PWLIB:-unset}" != "unset" ; then
 -          # Extract the first word of "ptlib-config", so it can be a program name with args.
 -set dummy ptlib-config; 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_PTLIB_CONFIG+:} false; then :
 -  $as_echo_n "(cached) " >&6
 -else
 -  case $PTLIB_CONFIG in
 -  [\\/]* | ?:[\\/]*)
 -  ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
 -  ;;
 -  *)
 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 -for as_dir in /usr/bin$PATH_SEPARATOR/usr/share/ptlib/make$PATH_SEPARATOR/usr/share/pwlib/make
 -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_PTLIB_CONFIG="$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
 -
 -  ;;
 -esac
 -fi
 -PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
 -if test -n "$PTLIB_CONFIG"; then
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTLIB_CONFIG" >&5
 -$as_echo "$PTLIB_CONFIG" >&6; }
 -else
 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -fi
 -
 -
 -          PWLIB_INCDIR="/usr/include"
 -          PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
 -          if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
 -            PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
 -          fi
 -          if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
 -            if test "x$LIB64" != "x"; then
 -              PWLIB_LIBDIR="/usr/lib64"
 -            else
 -              PWLIB_LIBDIR="/usr/lib"
 -            fi
 -          fi
 -          PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
 -          PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
 -        fi
 -      fi
 -    fi
 -  fi
 -fi
 -
 -#if test "${HAS_PWLIB:-unset}" = "unset" ; then
 -#  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
 -#  exit
 -#fi
 -
 -if test "${HAS_PWLIB:-unset}" != "unset" ; then
 -  if test "${PWLIBDIR:-unset}" = "unset" ; then
 -    if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
 -      PWLIBDIR=`$PTLIB_CONFIG --prefix`
 -    else
 -      echo "Cannot find ptlib-config - please install and try again"
 -      exit
 -    fi
 -  fi
 -
 -  if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
 -    PWLIBDIR="/usr/share/pwlib"
 -    PWLIB_INCDIR="/usr/include"
 -    if test "x$LIB64" != "x"; then
 -      PWLIB_LIBDIR="/usr/lib64"
 -    else
 -      PWLIB_LIBDIR="/usr/lib"
 -    fi
 -  fi
 -  if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
 -    PWLIBDIR="/usr/local/share/pwlib"
 -    PWLIB_INCDIR="/usr/local/include"
 -    if test "x$LIB64" != "x"; then
 -      PWLIB_LIBDIR="/usr/local/lib64"
 -    else
 -      PWLIB_LIBDIR="/usr/local/lib"
 -    fi
 -  fi
 -
 -  if test "${PWLIB_INCDIR:-unset}" = "unset"; then
 -    PWLIB_INCDIR="${PWLIBDIR}/include"
 -  fi
 -  if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
 -    PWLIB_LIBDIR="${PWLIBDIR}/lib"
 -  fi
 -
 -
 -
 -
 -fi
 -  ac_ext=c
 -ac_cpp='$CPP $CPPFLAGS'
 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
 -
 -
 -
 -      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'`
 -              PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
 -              PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
 -              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))
 -              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; }
 -              if test ${PWLIB_VER} -lt ${PWLIB_REQ}; then
 -                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -                      unset HAS_PWLIB
 -              else
 -                      if test ${PWLIB_VER} -gt ${PWLIB_MAX}; then
 -                              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -                              unset HAS_PWLIB
 -                      else
 -                              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 -$as_echo "yes" >&6; }
 -                      fi
 -              fi
 -      fi
 -
 -
 -      if test "${HAS_PWLIB:-unset}" != "unset"; then
 -
 -PWLIB_OSTYPE=
 -case "$host_os" in
 -  linux*)          PWLIB_OSTYPE=linux ;
 -              ;;
 -  freebsd* )       PWLIB_OSTYPE=FreeBSD ;
 -              ;;
 -  openbsd* )       PWLIB_OSTYPE=OpenBSD ;
 -                                 ENDLDLIBS="-lossaudio" ;
 -              ;;
 -  netbsd* )        PWLIB_OSTYPE=NetBSD ;
 -                                 ENDLDLIBS="-lossaudio" ;
 -              ;;
 -  solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
 -              ;;
 -  darwin* )          PWLIB_OSTYPE=Darwin ;
 -              ;;
 -  beos*)           PWLIB_OSTYPE=beos ;
 -                   STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
 -              ;;
 -  cygwin*)         PWLIB_OSTYPE=cygwin ;
 -              ;;
 -  mingw*)            PWLIB_OSTYPE=mingw ;
 -                         STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
 -                         ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
 -              ;;
 -  * )                PWLIB_OSTYPE="$host_os" ;
 -                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&5
 -$as_echo "$as_me: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&2;} ;
 -              ;;
 -esac
 -
 -PWLIB_MACHTYPE=
 -case "$host_cpu" in
 -   x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
 -                   ;;
 -
 -   x86_64)       PWLIB_MACHTYPE=x86_64 ;
 -                 P_64BIT=1 ;
 -                   LIB64=1 ;
 -                 ;;
 -
 -   alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
 -                 P_64BIT=1 ;
 -                 ;;
 -
 -   sparc )         PWLIB_MACHTYPE=sparc ;
 -                 ;;
 -
 -   powerpc )       PWLIB_MACHTYPE=ppc ;
 -                 ;;
 -
 -   ppc )           PWLIB_MACHTYPE=ppc ;
 -                 ;;
 -
 -   powerpc64 )     PWLIB_MACHTYPE=ppc64 ;
 -                 P_64BIT=1 ;
 -                   LIB64=1 ;
 -                 ;;
 -
 -   ppc64 )         PWLIB_MACHTYPE=ppc64 ;
 -                 P_64BIT=1 ;
 -                   LIB64=1 ;
 -                 ;;
 -
 -   ia64)         PWLIB_MACHTYPE=ia64 ;
 -                 P_64BIT=1 ;
 -                 ;;
 -
 -   s390x)        PWLIB_MACHTYPE=s390x ;
 -                 P_64BIT=1 ;
 -                   LIB64=1 ;
 -                 ;;
 -
 -   s390)         PWLIB_MACHTYPE=s390 ;
 -                 ;;
 -
 -   * )                   PWLIB_MACHTYPE="$host_cpu";
 -                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"CPU $PWLIB_MACHTYPE not recognized - proceed with caution!\"" >&5
 -$as_echo "$as_me: WARNING: \"CPU $PWLIB_MACHTYPE not recognized - proceed with caution!\"" >&2;} ;;
 -esac
 -
 -PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
 -
 -
 -
 -
 -              PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
 -
 -
 -      if test "${HAS_PWLIB:-unset}" != "unset"; then
 -         { $as_echo "$as_me:${as_lineno-$LINENO}: checking PWLib installation validity" >&5
 -$as_echo_n "checking PWLib installation validity... " >&6; }
 -
 -         saved_cppflags="${CPPFLAGS}"
 -         saved_libs="${LIBS}"
 -         if test "${PWLIB_LIB:-unset}" != "unset"; then
 -            LIBS="${LIBS} ${PWLIB_LIB} "
 -         else
 -            LIBS="${LIBS} -L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB} "
 -         fi
 -         CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR} "
 -
 -         ac_ext=cpp
 -ac_cpp='$CXXCPP $CPPFLAGS'
 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 -
 -
 -         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include "ptlib.h"
 -int
 -main ()
 -{
 -int q = (int) PTime::IsDaylightSavings();
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_cxx_try_link "$LINENO"; then :
 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 -$as_echo "yes" >&6; }
 -                      ac_cv_lib_PWLIB="yes"
 -
 -else
 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -                      ac_cv_lib_PWLIB="no"
 -
 -
 -fi
 -rm -f core conftest.err conftest.$ac_objext \
 -    conftest$ac_exeext conftest.$ac_ext
 -
 -         ac_ext=c
 -ac_cpp='$CPP $CPPFLAGS'
 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
 -
 -
 -         LIBS="${saved_libs}"
 -         CPPFLAGS="${saved_cppflags}"
 -
 -         if test "${ac_cv_lib_PWLIB}" = "yes"; then
 -            if test "${PWLIB_LIB:-undef}" = "undef"; then
 -               if test "${PWLIB_LIBDIR}" != "" -a "${PWLIB_LIBDIR}" != "/usr/lib"; then
 -                  PWLIB_LIB="-L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB}"
 -               else
 -                  PWLIB_LIB="-l${PLATFORM_PWLIB}"
 -               fi
 -            fi
 -            if test "${PWLIB_INCDIR}" != "" -a "${PWLIB_INCDIR}" != "/usr/include"; then
 -               PWLIB_INCLUDE="-I${PWLIB_INCDIR}"
 -            fi
 -                PBX_PWLIB=1
 -
 -$as_echo "#define HAVE_PWLIB 1" >>confdefs.h
 -
 -         fi
 -      fi
 -
 -      fi
 -fi
 -
 -if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
 -      if test -n "${OPENH323_DIR}"; then
 -              OPENH323DIR="${OPENH323_DIR}"
 -      fi
 -
 -OPENH323_INCDIR=
 -OPENH323_LIBDIR=
 -ac_ext=cpp
 -ac_cpp='$CXXCPP $CPPFLAGS'
 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 -
 -if test "${OPENH323DIR:-unset}" != "unset" ; then
 -  as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/version.h" "$as_ac_Header" "$ac_includes_default"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -  HAS_OPENH323=1
 -fi
 -
 -
 -fi
 -if test "${HAS_OPENH323:-unset}" = "unset" ; then
 -  as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/../openh323/version.h" "$as_ac_Header" "$ac_includes_default"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -  OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1
 -fi
 -
 -
 -  if test "${HAS_OPENH323:-unset}" != "unset" ; then
 -    OPENH323DIR="${PWLIBDIR}/../openh323"
 -    saved_cppflags="${CPPFLAGS}"
 -    CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR}/openh323 -I${PWLIB_INCDIR}"
 -    as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/include/h323.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_compile "$LINENO" "${OPENH323DIR}/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
 -"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -
 -else
 -  OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}"
 -fi
 -
 -
 -    CPPFLAGS="${saved_cppflags}"
 -  else
 -    saved_cppflags="${CPPFLAGS}"
 -    CPPFLAGS="${CPPFLAGS} -I${HOME}/openh323/include -I${PWLIB_INCDIR}"
 -    as_ac_Header=`$as_echo "ac_cv_header_${HOME}/openh323/include/h323.h" | $as_tr_sh`
 -ac_fn_cxx_check_header_compile "$LINENO" "${HOME}/openh323/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
 -"
 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 -  HAS_OPENH323=1
 -fi
 -
 -
 -    CPPFLAGS="${saved_cppflags}"
 -    if test "${HAS_OPENH323:-unset}" != "unset" ; then
 -      OPENH323DIR="${HOME}/openh323"
 -    else
 -      saved_cppflags="${CPPFLAGS}"
 -      CPPFLAGS="${CPPFLAGS} -I/usr/local/include/openh323 -I${PWLIB_INCDIR}"
 -      ac_fn_cxx_check_header_compile "$LINENO" "/usr/local/include/openh323/h323.h" "ac_cv_header__usr_local_include_openh323_h323_h" "#include <ptlib.h>
 -"
 -if test "x$ac_cv_header__usr_local_include_openh323_h323_h" = xyes; then :
 -  HAS_OPENH323=1
 -fi
 -
 -
 -      CPPFLAGS="${saved_cppflags}"
 -      if test "${HAS_OPENH323:-unset}" != "unset" ; then
 -        OPENH323DIR="/usr/local/share/openh323"
 -        OPENH323_INCDIR="/usr/local/include/openh323"
 -        if test "x$LIB64" != "x" && test -d "/usr/local/lib64"; then
 -          OPENH323_LIBDIR="/usr/local/lib64"
 -        else
 -          OPENH323_LIBDIR="/usr/local/lib"
 -        fi
 -      else
 -        saved_cppflags="${CPPFLAGS}"
 -        CPPFLAGS="${CPPFLAGS} -I/usr/include/openh323 -I${PWLIB_INCDIR}"
 -        ac_fn_cxx_check_header_compile "$LINENO" "/usr/include/openh323/h323.h" "ac_cv_header__usr_include_openh323_h323_h" "#include <ptlib.h>
 -"
 -if test "x$ac_cv_header__usr_include_openh323_h323_h" = xyes; then :
 -  HAS_OPENH323=1
 -fi
 -
 -
 -        CPPFLAGS="${saved_cppflags}"
 -        if test "${HAS_OPENH323:-unset}" != "unset" ; then
 -          OPENH323DIR="/usr/share/openh323"
 -          OPENH323_INCDIR="/usr/include/openh323"
 -          if test "x$LIB64" != "x" && test -d "/usr/local/lib64"; then
 -            OPENH323_LIBDIR="/usr/lib64"
 -          else
 -            OPENH323_LIBDIR="/usr/lib"
 -          fi
 -        fi
 -      fi
 -    fi
 -  fi
 -fi
 -
 -if test "${HAS_OPENH323:-unset}" != "unset" ; then
 -  if test "${OPENH323_INCDIR:-unset}" = "unset"; then
 -    OPENH323_INCDIR="${OPENH323DIR}/include"
 -  fi
 -  if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
 -    OPENH323_LIBDIR="${OPENH323DIR}/lib"
 -  fi
 -
 -  OPENH323_LIBDIR="`cd ${OPENH323_LIBDIR}; pwd`"
 -  OPENH323_INCDIR="`cd ${OPENH323_INCDIR}; pwd`"
 -  OPENH323DIR="`cd ${OPENH323DIR}; pwd`"
 -
 -
 -
 -
 -fi
 -  ac_ext=c
 -ac_cpp='$CPP $CPPFLAGS'
 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
 -
 -
 -
 -      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'`
 -              OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
 -              OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
 -              OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
 -              OPENH323_VER=$((${OPENH323_MAJOR_VERSION}*10000+${OPENH323_MINOR_VERSION}*100+${OPENH323_BUILD_NUMBER}))
 -              OPENH323_REQ=$((1*10000+17*100+3))
 -              OPENH323_MAX=$((1*10000+19*100+0))
 -
 -              { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323" >&5
 -$as_echo_n "checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323... " >&6; }
 -              if test ${OPENH323_VER} -lt ${OPENH323_REQ}; then
 -                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -                      unset HAS_OPENH323
 -              else
 -                      if test ${OPENH323_VER} -gt ${OPENH323_MAX}; then
 -                              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -                              unset HAS_OPENH323
 -                      else
 -                              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 -$as_echo "yes" >&6; }
 -                      fi
 -              fi
 -      fi
 -
 -
 -      if test "${HAS_OPENH323:-unset}" != "unset"; then
 -              { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 build option" >&5
 -$as_echo_n "checking OpenH323 build option... " >&6; }
 -              OPENH323_SUFFIX=
 -              prefixes="h323_${PWLIB_PLATFORM}_ h323_ openh323"
 -              for pfx in $prefixes; do
 -                      #files=`ls -l /usr/local/lib/lib${pfx}*.so* 2>/dev/null`
 -                      files=`ls -l ${OPENH323_LIBDIR}/lib${pfx}*.so* 2>/dev/null`
 -                      if test -z "$files"; then
 -                              # check the default location
 -                              files=`ls -l /usr/local/lib/lib${pfx}*.so* 2>/dev/null`
 -                      fi
 -                      libfile=
 -                      if test -n "$files"; then
 -                              for f in $files; do
 -                                      if test -f $f -a ! -L $f; then
 -                                              libfile=`basename $f`
 -                                              break;
 -                                      fi
 -                              done
 -                      fi
 -                      if test -n "$libfile"; then
 -                              OPENH323_PREFIX=$pfx
 -                              break;
 -                      fi
 -              done
 -              if test "${libfile:-unset}" != "unset"; then
 -                      OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/lib${OPENH323_PREFIX}\([^.]*\)\..*/\1/'"`
 -              fi
 -              case "${OPENH323_SUFFIX}" in
 -                      n)
 -                              OPENH323_BUILD="notrace";;
 -                      r)
 -                              OPENH323_BUILD="opt";;
 -                      d)
 -                              OPENH323_BUILD="debug";;
 -                      *)
 -                              if test "${OPENH323_PREFIX:-undef}" = "openh323"; then
 -                                      notrace=`eval "grep NOTRACE ${OPENH323DIR}/openh323u.mak | grep = | sed -e 's/[A-Z0-9_]*[       ]*=[    ]*//'"`
 -                                      if test "x$notrace" = "x"; then
 -                                              notrace="0"
 -                                      fi
 -                                      if test "$notrace" -ne 0; then
 -                                              OPENH323_BUILD="notrace"
 -                                      else
 -                                              OPENH323_BUILD="opt"
 -                                      fi
 -                                      OPENH323_LIB="-l${OPENH323_PREFIX}"
 -                              else
 -                                      OPENH323_BUILD="notrace"
 -                              fi
 -                              ;;
 -              esac
 -              { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENH323_BUILD}" >&5
 -$as_echo "${OPENH323_BUILD}" >&6; }
 -
 -
 -
 -      fi
 -
 -      PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
 -
 -      if test "${HAS_OPENH323:-unset}" != "unset"; then
 -         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5
 -$as_echo_n "checking OpenH323 installation validity... " >&6; }
 -
 -         saved_cppflags="${CPPFLAGS}"
 -         saved_libs="${LIBS}"
 -         if test "${OPENH323_LIB:-unset}" != "unset"; then
 -            LIBS="${LIBS} ${OPENH323_LIB} ${PWLIB_LIB}"
 -         else
 -            LIBS="${LIBS} -L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323} ${PWLIB_LIB}"
 -         fi
 -         CPPFLAGS="${CPPFLAGS} -I${OPENH323_INCDIR} ${PWLIB_INCLUDE}"
 -
 -         ac_ext=cpp
 -ac_cpp='$CXXCPP $CPPFLAGS'
 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 -
 -
 -         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 -/* end confdefs.h.  */
 -#include "ptlib.h"
 -              #include "h323.h"
 -              #include "h323ep.h"
 -int
 -main ()
 -{
 -H323EndPoint ep = H323EndPoint();
 -  ;
 -  return 0;
 -}
 -_ACEOF
 -if ac_fn_cxx_try_link "$LINENO"; then :
 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 -$as_echo "yes" >&6; }
 -                      ac_cv_lib_OPENH323="yes"
 -
 -else
 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 -$as_echo "no" >&6; }
 -                      ac_cv_lib_OPENH323="no"
 -
 -
 -fi
 -rm -f core conftest.err conftest.$ac_objext \
 -    conftest$ac_exeext conftest.$ac_ext
 -
 -         ac_ext=c
 -ac_cpp='$CPP $CPPFLAGS'
 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
 -
 -
 -         LIBS="${saved_libs}"
 -         CPPFLAGS="${saved_cppflags}"
 -
 -         if test "${ac_cv_lib_OPENH323}" = "yes"; then
 -            if test "${OPENH323_LIB:-undef}" = "undef"; then
 -               if test "${OPENH323_LIBDIR}" != "" -a "${OPENH323_LIBDIR}" != "/usr/lib"; then
 -                  OPENH323_LIB="-L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323}"
 -               else
 -                  OPENH323_LIB="-l${PLATFORM_OPENH323}"
 -               fi
 -            fi
 -            if test "${OPENH323_INCDIR}" != "" -a "${OPENH323_INCDIR}" != "/usr/include"; then
 -               OPENH323_INCLUDE="-I${OPENH323_INCDIR}"
 -            fi
 -                PBX_OPENH323=1
 -
 -$as_echo "#define HAVE_OPENH323 1" >>confdefs.h
 -
 -         fi
 -      fi
 -
 -fi
 -
  
  if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
     pbxlibdir=""
@@@ -33446,8 -34280,7 +33446,8 @@@ $as_echo_n "checking for vpb_open in -l
     fi
     LIBS="${PTHREAD_LIBS} ${LIBS} -lvpb"
     CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}"
 -   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
        #include <vpbapi.h>
diff --combined configure.ac
@@@ -460,6 -460,7 +460,6 @@@ AST_EXT_LIB_SETUP([GSM], [External GSM]
  AST_EXT_LIB_SETUP([ILBC], [System iLBC], [ilbc], [, use 'internal' iLBC otherwise])
  AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2])
  AST_EXT_LIB_SETUP([GMIME], [GMime], [gmime])
 -AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
  AST_EXT_LIB_SETUP([HOARD], [Hoard Memory Allocator], [hoard])
  AST_EXT_LIB_SETUP([ICAL], [iCal], [ical])
  AST_EXT_LIB_SETUP([ICONV], [Iconv], [iconv])
@@@ -540,6 -541,7 +540,6 @@@ AST_EXT_LIB_SETUP_OPTIONAL([PRI_PROG_W_
  AST_EXT_LIB_SETUP_OPTIONAL([PRI_SERVICE_MESSAGES], [ISDN service messages], [PRI], [pri])
  AST_EXT_LIB_SETUP_OPTIONAL([PRI_REVERSE_CHARGE], [ISDN reverse charge], [PRI], [pri])
  # ------------------------------------^
 -AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
  AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
  AST_EXT_LIB_SETUP([FFTW3], [LIBFFTW3], [fftw3])
  AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample])
@@@ -1575,15 -1577,12 +1575,15 @@@ if test "${USE_ILBC}" != "no"; the
  fi
  
  AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)
 -AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])
 -
 +if test "${PBX_LIBEDIT}" != 1; then
 +      # some platforms do not list libedit via pkg-config, for example OpenBSD 6.2
 +      AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])
 +fi
  if test "${PBX_LIBEDIT}" != 1; then
        AC_MSG_ERROR(*** Please install the 'libedit' development package.)
        exit 1
  fi
 +AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])
  
  AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h])
  # GNU libiconv #define's iconv_open to libiconv_open, so we need to search for that symbol
@@@ -1980,7 -1979,7 +1980,7 @@@ if test "${USE_IMAP_TK}" != "no"; the
                        )
                else #looking in imap directory didn't work, try c-client
                        imap_ldflags=""
-                       imap_libs="-lc-client"
+                       imap_libs="-lcrypto -lssl -lc-client"
                        imap_include="-DUSE_SYSTEM_CCLIENT"
                        CPPFLAGS="${saved_cppflags}"
                        LIBS="${saved_libs}"
@@@ -2360,6 -2359,42 +2360,6 @@@ if test -z "$__opus_include" -o x"$__op
  fi
  AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
  
 -if test "${USE_PWLIB}" != "no"; then
 -      if test -n "${PWLIB_DIR}"; then
 -              PWLIBDIR="${PWLIB_DIR}"
 -      fi
 -      AST_CHECK_PWLIB()
 -      AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2], [P[[WT]]LIB_VERSION])
 -
 -      if test "${HAS_PWLIB:-unset}" != "unset"; then
 -              AST_CHECK_PWLIB_PLATFORM()
 -
 -              PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
 -
 -              AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB],
 -                      [Define if your system has the PWLib libraries.],
 -                      [#include "ptlib.h"],
 -                      [int q = (int) PTime::IsDaylightSavings();])
 -      fi
 -fi
 -
 -if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
 -      if test -n "${OPENH323_DIR}"; then
 -              OPENH323DIR="${OPENH323_DIR}"
 -      fi
 -      AST_CHECK_OPENH323()
 -      AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [openh323buildopts.h], [1], [17], [3], [], [1], [19], [0])
 -      AST_CHECK_OPENH323_BUILD()
 -      PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
 -      AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],
 -              [Define if your system has the OpenH323 libraries.],
 -              [#include "ptlib.h"
 -              #include "h323.h"
 -              #include "h323ep.h"],
 -              [H323EndPoint ep = H323EndPoint();],
 -              [${PWLIB_INCLUDE}], [${PWLIB_LIB}])
 -fi
 -
  AST_EXT_LIB_CHECK([LUA], [lua5.3], [luaL_newstate], [lua5.3/lua.h], [-lm])
  if test "x${PBX_LUA}" = "x1" ; then
        if test x"${LUA_DIR}" = x; then