res_fax: Resolve module reference leak caused by reserved sessions
[asterisk/asterisk.git] / configure
index a028170..039b796 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 412977 .
+# From configure.ac Revision: 419077 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68 for asterisk trunk.
 #
@@ -629,7 +629,6 @@ CONFIG_SDL
 PBX_SO_NOSIGPIPE
 PBX_MSG_NOSIGNAL
 PBX_IXJUSER
-PBX_H323
 GMIME_LIBS
 GMIME_CFLAGS
 OPENH323_BUILD
@@ -1059,6 +1058,10 @@ PBX_DAHDI
 DAHDI_DIR
 DAHDI_INCLUDE
 DAHDI_LIB
+PBX_OPENSSL_EC
+OPENSSL_EC_DIR
+OPENSSL_EC_INCLUDE
+OPENSSL_EC_LIB
 PBX_OPENSSL_SRTP
 OPENSSL_SRTP_DIR
 OPENSSL_SRTP_INCLUDE
@@ -8472,6 +8475,18 @@ PBX_OPENSSL_SRTP=0
 
 
 
+OPENSSL_EC_DESCRIP="OpenSSL Elliptic Curve Support"
+OPENSSL_EC_OPTION=crypto
+OPENSSL_EC_DIR=${CRYPTO_DIR}
+
+PBX_OPENSSL_EC=0
+
+
+
+
+
+
+
     DAHDI_DESCRIP="DAHDI"
     DAHDI_OPTION="dahdi"
     PBX_DAHDI=0
@@ -12632,128 +12647,9 @@ if test "x$JANSSON_LIB" == "x"; then
 fi
 
 
-if test "x${PBX_URIPARSER}" != "x1" -a "${USE_URIPARSER}" != "no"; then
-   pbxlibdir=""
-   # if --with-URIPARSER=DIR has been specified, use it.
-   if test "x${URIPARSER_DIR}" != "x"; then
-      if test -d ${URIPARSER_DIR}/lib; then
-         pbxlibdir="-L${URIPARSER_DIR}/lib"
-      else
-         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_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luriparser ${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_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
-      URIPARSER_LIB="${pbxlibdir} -luriparser "
-      # if --with-URIPARSER=DIR has been specified, use it.
-      if test "x${URIPARSER_DIR}" != "x"; then
-         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
-         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"
-if test "x$ac_cv_header_uriparser_Uri_h" = xyes; then :
-  URIPARSER_HEADER_FOUND=1
-else
-  URIPARSER_HEADER_FOUND=0
-fi
-
-
-         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
-_ACEOF
-
-      fi
-   fi
-fi
-
-
-
-# Another mandatory item (unless it's explicitly disabled)
-# Check whether --enable-xmldoc was given.
-if test "${enable_xmldoc+set}" = set; then :
-  enableval=$enable_xmldoc; case "${enableval}" in
-               y|ye|yes) disable_xmldoc=no ;;
-               n|no)  disable_xmldoc=yes ;;
-               *) as_fn_error $? "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5  ;;
-       esac
-else
-  disable_xmldoc=no
-fi
-
-
-if test "${disable_xmldoc}" != "yes"; then
-
-    if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
-       PBX_LIBXML2=0
-       if test -n "$ac_tool_prefix"; then
+               if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
+               PBX_LIBXML2=0
+               if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}xml2-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}xml2-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -12853,65 +12749,181 @@ else
   CONFIG_LIBXML2="$ac_cv_path_CONFIG_LIBXML2"
 fi
 
-       if test ! "x${CONFIG_LIBXML2}" = xNo; then
-           if test x"" = x ; then A=--cflags ; else A="" ; fi
-           LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
-           if test x"" = x ; then A=--libs ; else A="" ; fi
-           LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
-           if test x"#include <libxml/tree.h>
-       #include <libxml/parser.h>" != x ; then
-               saved_cppflags="${CPPFLAGS}"
-               if test "x${LIBXML2_DIR}" != "x"; then
-                   LIBXML2_INCLUDE="-I${LIBXML2_DIR}/include"
-               fi
-               CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"
+               if test ! "x${CONFIG_LIBXML2}" = xNo; then
+                       if test x"" = x ; then A=--cflags ; else A="" ; fi
+                       LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
+                       LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")
 
-               saved_libs="${LIBS}"
-               LIBS="${LIBXML2_LIB}"
+                       if test x"" = x ; then A=--libs ; else A="" ; fi
+                       LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
+                       LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                       if test x"#include <libxml/tree.h>
+        #include <libxml/parser.h>" != x ; then
+                               saved_cppflags="${CPPFLAGS}"
+                               CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"
+
+                               saved_libs="${LIBS}"
+                               LIBS=${LIBXML2_LIB}
+
+                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
   #include <libxml/tree.h>
-       #include <libxml/parser.h>
+        #include <libxml/parser.h>
 int
 main ()
 {
  LIBXML_TEST_VERSION;
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-     PBX_LIBXML2=1
-
+   PBX_LIBXML2=1
 $as_echo "#define HAVE_LIBXML2 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_LIBXML2=1
+                               CPPFLAGS="${saved_cppflags}"
+                               LIBS="${saved_libs}"
+                       else
+                               PBX_LIBXML2=1
 
 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
 
-           fi
+                       fi
+               fi
        fi
-    fi
 
-       if test "${PBX_LIBXML2}" != 1; then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: *** XML documentation will not be available because the 'libxml2' development package is missing." >&5
-$as_echo "$as_me: *** XML documentation will not be available because the 'libxml2' development package is missing." >&6;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option" >&5
-$as_echo "$as_me: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option" >&6;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: *** or install the 'libxml2' development package." >&5
-$as_echo "$as_me: *** or install the 'libxml2' development package." >&6;}
-               exit 1
-       fi
 
+if test "${PBX_LIBXML2}" != 1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: *** The Asterisk menuselect tool requires the 'libxml2' development package." >&5
+$as_echo "$as_me: *** The Asterisk menuselect tool requires the 'libxml2' development package." >&6;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install the 'libxml2' development package." >&5
+$as_echo "$as_me: *** Please install the 'libxml2' development package." >&6;}
+       exit 1
+fi
+
+
+if test "x${PBX_URIPARSER}" != "x1" -a "${USE_URIPARSER}" != "no"; then
+   pbxlibdir=""
+   # if --with-URIPARSER=DIR has been specified, use it.
+   if test "x${URIPARSER_DIR}" != "x"; then
+      if test -d ${URIPARSER_DIR}/lib; then
+         pbxlibdir="-L${URIPARSER_DIR}/lib"
+      else
+         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_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-luriparser ${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_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
+      URIPARSER_LIB="${pbxlibdir} -luriparser "
+      # if --with-URIPARSER=DIR has been specified, use it.
+      if test "x${URIPARSER_DIR}" != "x"; then
+         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
+         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"
+if test "x$ac_cv_header_uriparser_Uri_h" = xyes; then :
+  URIPARSER_HEADER_FOUND=1
+else
+  URIPARSER_HEADER_FOUND=0
+fi
+
+
+         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
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+
+# Another mandatory item (unless it's explicitly disabled)
+# Check whether --enable-xmldoc was given.
+if test "${enable_xmldoc+set}" = set; then :
+  enableval=$enable_xmldoc; case "${enableval}" in
+               y|ye|yes) disable_xmldoc=no ;;
+               n|no)  disable_xmldoc=yes ;;
+               *) as_fn_error $? "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5  ;;
+       esac
+else
+  disable_xmldoc=no
+fi
+
+
+if test "${disable_xmldoc}" != "yes"; then
 
 if test "x${PBX_LIBXSLT}" != "x1" -a "${USE_LIBXSLT}" != "no"; then
    pbxlibdir=""
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FORTIFY_SOURCE support" >&5
 $as_echo_n "checking for _FORTIFY_SOURCE support... " >&6; }
-if $(${CC} -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-       AST_FORTIFY_SOURCE=-D_FORTIFY_SOURCE=2
+       AST_FORTIFY_SOURCE="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
 else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -21654,9 +21666,9 @@ fi
 fi
 
 
-    if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
-       PBX_MYSQLCLIENT=0
-       if test -n "$ac_tool_prefix"; then
+               if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
+               PBX_MYSQLCLIENT=0
+               if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}mysql_config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mysql_config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -21756,52 +21768,50 @@ else
   CONFIG_MYSQLCLIENT="$ac_cv_path_CONFIG_MYSQLCLIENT"
 fi
 
-       if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then
-           if test x"" = x ; then A=--cflags ; else A="" ; fi
-           MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)
-           if test x"" = x ; then A=--libs ; else A="" ; fi
-           MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)
-           if test x"" != x ; then
-               saved_cppflags="${CPPFLAGS}"
-               if test "x${MYSQLCLIENT_DIR}" != "x"; then
-                   MYSQLCLIENT_INCLUDE="-I${MYSQLCLIENT_DIR}/include"
-               fi
-               CPPFLAGS="${CPPFLAGS} ${MYSQLCLIENT_INCLUDE}"
+               if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then
+                       if test x"" = x ; then A=--cflags ; else A="" ; fi
+                       MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)
+                       MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g")
 
-               saved_libs="${LIBS}"
-               LIBS="${MYSQLCLIENT_LIB}"
+                       if test x"" = x ; then A=--libs ; else A="" ; fi
+                       MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)
+                       MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g")
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                       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
-
+   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
+                               CPPFLAGS="${saved_cppflags}"
+                               LIBS="${saved_libs}"
+                       else
+                               PBX_MYSQLCLIENT=1
 
 $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
 
-           fi
+                       fi
+               fi
        fi
-    fi
 
 
 
@@ -21910,9 +21920,9 @@ fi
 
 
 
-    if test "x${PBX_NEON}" != "x1" -a "${USE_NEON}" != "no"; then
-       PBX_NEON=0
-       if test -n "$ac_tool_prefix"; then
+               if test "x${PBX_NEON}" != "x1" -a "${USE_NEON}" != "no"; then
+               PBX_NEON=0
+               if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}neon-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}neon-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -22012,58 +22022,56 @@ else
   CONFIG_NEON="$ac_cv_path_CONFIG_NEON"
 fi
 
-       if test ! "x${CONFIG_NEON}" = xNo; then
-           if test x"" = x ; then A=--cflags ; else A="" ; fi
-           NEON_INCLUDE=$(${CONFIG_NEON} $A)
-           if test x"" = x ; then A=--libs ; else A="" ; fi
-           NEON_LIB=$(${CONFIG_NEON} $A)
-           if test x"" != x ; then
-               saved_cppflags="${CPPFLAGS}"
-               if test "x${NEON_DIR}" != "x"; then
-                   NEON_INCLUDE="-I${NEON_DIR}/include"
-               fi
-               CPPFLAGS="${CPPFLAGS} ${NEON_INCLUDE}"
+               if test ! "x${CONFIG_NEON}" = xNo; then
+                       if test x"" = x ; then A=--cflags ; else A="" ; fi
+                       NEON_INCLUDE=$(${CONFIG_NEON} $A)
+                       NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g")
 
-               saved_libs="${LIBS}"
-               LIBS="${NEON_LIB}"
+                       if test x"" = x ; then A=--libs ; else A="" ; fi
+                       NEON_LIB=$(${CONFIG_NEON} $A)
+                       NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g")
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                       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
-
+   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
+                               CPPFLAGS="${saved_cppflags}"
+                               LIBS="${saved_libs}"
+                       else
+                               PBX_NEON=1
 
 $as_echo "#define HAVE_NEON 1" >>confdefs.h
 
-           fi
+                       fi
+               fi
        fi
-    fi
 
 
 
-    if test "x${PBX_NEON29}" != "x1" -a "${USE_NEON29}" != "no"; then
-       PBX_NEON29=0
-       if test -n "$ac_tool_prefix"; then
+               if test "x${PBX_NEON29}" != "x1" -a "${USE_NEON29}" != "no"; then
+               PBX_NEON29=0
+               if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}neon-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}neon-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -22163,22 +22171,23 @@ else
   CONFIG_NEON29="$ac_cv_path_CONFIG_NEON29"
 fi
 
-       if test ! "x${CONFIG_NEON29}" = xNo; then
-           if test x"" = x ; then A=--cflags ; else A="" ; fi
-           NEON29_INCLUDE=$(${CONFIG_NEON29} $A)
-           if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi
-           NEON29_LIB=$(${CONFIG_NEON29} $A)
-           if test x"#include <ne_auth.h>" != x ; then
-               saved_cppflags="${CPPFLAGS}"
-               if test "x${NEON29_DIR}" != "x"; then
-                   NEON29_INCLUDE="-I${NEON29_DIR}/include"
-               fi
-               CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"
+               if test ! "x${CONFIG_NEON29}" = xNo; then
+                       if test x"" = x ; then A=--cflags ; else A="" ; fi
+                       NEON29_INCLUDE=$(${CONFIG_NEON29} $A)
+                       NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g")
 
-               saved_libs="${LIBS}"
-               LIBS="${NEON29_LIB}"
+                       if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi
+                       NEON29_LIB=$(${CONFIG_NEON29} $A)
+                       NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g")
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                       if test x"#include <ne_auth.h>" != x ; then
+                               saved_cppflags="${CPPFLAGS}"
+                               CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"
+
+                               saved_libs="${LIBS}"
+                               LIBS=${NEON29_LIB}
+
+                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
   #include <ne_auth.h>
 int
@@ -22187,36 +22196,33 @@ main ()
  #ifndef NE_AUTH_NTLM
 #error Need libneon >= 0.29.0
 #endif;
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-     PBX_NEON29=1
-
+   PBX_NEON29=1
 $as_echo "#define HAVE_NEON29 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_NEON29=1
+                               CPPFLAGS="${saved_cppflags}"
+                               LIBS="${saved_libs}"
+                       else
+                               PBX_NEON29=1
 
 $as_echo "#define HAVE_NEON29 1" >>confdefs.h
 
-           fi
+                       fi
+               fi
        fi
-    fi
 
 
 
-    if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then
-       PBX_NETSNMP=0
-       if test -n "$ac_tool_prefix"; then
+               if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then
+               PBX_NETSNMP=0
+               if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -22316,24 +22322,25 @@ else
   CONFIG_NETSNMP="$ac_cv_path_CONFIG_NETSNMP"
 fi
 
-       if test ! "x${CONFIG_NETSNMP}" = xNo; then
-           if test x"" = x ; then A=--cflags ; else A="" ; fi
-           NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
-           if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi
-           NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)
-           if test x"#include <net-snmp/net-snmp-config.h>
+               if test ! "x${CONFIG_NETSNMP}" = xNo; then
+                       if test x"" = x ; then A=--cflags ; else A="" ; fi
+                       NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
+                       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=$(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}"
-               if test "x${NETSNMP_DIR}" != "x"; then
-                   NETSNMP_INCLUDE="-I${NETSNMP_DIR}/include"
-               fi
-               CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
+                               saved_cppflags="${CPPFLAGS}"
+                               CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
 
-               saved_libs="${LIBS}"
-               LIBS="${NETSNMP_LIB}"
+                               saved_libs="${LIBS}"
+                               LIBS=${NETSNMP_LIB}
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
   #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-includes.h>
@@ -22342,30 +22349,27 @@ int
 main ()
 {
  int callback = snmp_register_callback(0, 0, NULL, NULL);
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-     PBX_NETSNMP=1
-
+   PBX_NETSNMP=1
 $as_echo "#define HAVE_NETSNMP 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_NETSNMP=1
+                               CPPFLAGS="${saved_cppflags}"
+                               LIBS="${saved_libs}"
+                       else
+                               PBX_NETSNMP=1
 
 $as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
 
-           fi
+                       fi
+               fi
        fi
-    fi
 
 
 
@@ -23747,7 +23751,7 @@ if test "x${PBX_PJ_TRANSACTION_GRP_LOCK}" != "x1" -a "${USE_PJ_TRANSACTION_GRP_L
       AST_PJ_TRANSACTION_GRP_LOCK_FOUND=yes
    else
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
-      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; }
@@ -23755,7 +23759,7 @@ if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpjsip ${pbxlibdir}  $LIBS"
+LIBS="-lpjsip ${pbxlibdir} $PJPROJECT_LIBS $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
    # now check for the header.
    if test "${AST_PJ_TRANSACTION_GRP_LOCK_FOUND}" = "yes"; then
-      PJ_TRANSACTION_GRP_LOCK_LIB="${pbxlibdir} -lpjsip "
+      PJ_TRANSACTION_GRP_LOCK_LIB="${pbxlibdir} -lpjsip $PJPROJECT_LIBS"
       # if --with-PJ_TRANSACTION_GRP_LOCK=DIR has been specified, use it.
       if test "x${PJ_TRANSACTION_GRP_LOCK_DIR}" != "x"; then
          PJ_TRANSACTION_GRP_LOCK_INCLUDE="-I${PJ_TRANSACTION_GRP_LOCK_DIR}/include"
       fi
-      PJ_TRANSACTION_GRP_LOCK_INCLUDE="${PJ_TRANSACTION_GRP_LOCK_INCLUDE} "
+      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
 
 
 
+saved_cppflags="${CPPFLAGS}"
+saved_libs="${LIBS}"
+CPPFLAGS="${CPPFLAGS} ${PJPROJECT_CFLAGS}"
+LIBS="${LIBS} ${PJPROJECT_LIBS}"
 
     if test "x${PBX_PJSIP_REPLACE_MEDIA_STREAM}" != "x1" -a "${USE_PJSIP_REPLACE_MEDIA_STREAM}" != "no"; then
         if test "x" != "x"; then
@@ -23881,6 +23889,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
        CPPFLAGS="${saved_cppflags}"
     fi
 
+LIBS="${saved_libs}"
+CPPFLAGS="${saved_cppflags}"
 
 
 if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then
@@ -26664,7 +26674,7 @@ fi
 
 fi
 
-# Check for libss7 v1.0 branch compatible version.
+# Check for libss7 v2.0 branch compatible version.
 
 if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then
    pbxlibdir=""
@@ -26676,7 +26686,7 @@ if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then
          pbxlibdir="-L${SS7_DIR}"
       fi
    fi
-   pbxfuncname="ss7_set_adjpc"
+   pbxfuncname="ss7_set_isup_timer"
    if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
       AST_SS7_FOUND=yes
    else
 
 fi
 
+if test "$PBX_OPENSSL" = "1";
+then
+
+if test "x${PBX_OPENSSL_EC}" != "x1" -a "${USE_OPENSSL_EC}" != "no"; then
+   pbxlibdir=""
+   # if --with-OPENSSL_EC=DIR has been specified, use it.
+   if test "x${OPENSSL_EC_DIR}" != "x"; then
+      if test -d ${OPENSSL_EC_DIR}/lib; then
+         pbxlibdir="-L${OPENSSL_EC_DIR}/lib"
+      else
+         pbxlibdir="-L${OPENSSL_EC_DIR}"
+      fi
+   fi
+   pbxfuncname="EC_KEY_new_by_curve_name"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_OPENSSL_EC_FOUND=yes
+   else
+      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+      CFLAGS="${CFLAGS} "
+      as_ac_Lib=`$as_echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lssl" >&5
+$as_echo_n "checking for ${pbxfuncname} in -lssl... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl ${pbxlibdir} -lcrypto $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_OPENSSL_EC_FOUND=yes
+else
+  AST_OPENSSL_EC_FOUND=no
+fi
+
+      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+   fi
+
+   # now check for the header.
+   if test "${AST_OPENSSL_EC_FOUND}" = "yes"; then
+      OPENSSL_EC_LIB="${pbxlibdir} -lssl -lcrypto"
+      # if --with-OPENSSL_EC=DIR has been specified, use it.
+      if test "x${OPENSSL_EC_DIR}" != "x"; then
+         OPENSSL_EC_INCLUDE="-I${OPENSSL_EC_DIR}/include"
+      fi
+      OPENSSL_EC_INCLUDE="${OPENSSL_EC_INCLUDE} "
+      if test "xopenssl/ec.h" = "x" ; then     # no header, assume found
+         OPENSSL_EC_HEADER_FOUND="1"
+      else                             # check for the header
+         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${OPENSSL_EC_INCLUDE}"
+         ac_fn_c_check_header_mongrel "$LINENO" "openssl/ec.h" "ac_cv_header_openssl_ec_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ec_h" = xyes; then :
+  OPENSSL_EC_HEADER_FOUND=1
+else
+  OPENSSL_EC_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
+      fi
+      if test "x${OPENSSL_EC_HEADER_FOUND}" = "x0" ; then
+         OPENSSL_EC_LIB=""
+         OPENSSL_EC_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
+            OPENSSL_EC_LIB=""
+         fi
+         PBX_OPENSSL_EC=1
+         cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_EC 1
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+fi
+
 
 if test "x${PBX_SRTP}" != "x1" -a "${USE_SRTP}" != "no"; then
    pbxlibdir=""
@@ -30729,16 +30847,6 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
-ac_fn_c_check_header_mongrel "$LINENO" "h323.h" "ac_cv_header_h323_h" "$ac_includes_default"
-if test "x$ac_cv_header_h323_h" = xyes; then :
-  PBX_H323=1
-else
-  PBX_H323=0
-fi
-
-
-
-
 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
 if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
 
@@ -30861,9 +30969,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
-    if test "x${PBX_SDL}" != "x1" -a "${USE_SDL}" != "no"; then
-       PBX_SDL=0
-       if test -n "$ac_tool_prefix"; then
+               if test "x${PBX_SDL}" != "x1" -a "${USE_SDL}" != "no"; then
+               PBX_SDL=0
+               if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}sdl-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}sdl-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -30963,52 +31071,50 @@ else
   CONFIG_SDL="$ac_cv_path_CONFIG_SDL"
 fi
 
-       if test ! "x${CONFIG_SDL}" = xNo; then
-           if test x"" = x ; then A=--cflags ; else A="" ; fi
-           SDL_INCLUDE=$(${CONFIG_SDL} $A)
-           if test x"" = x ; then A=--libs ; else A="" ; fi
-           SDL_LIB=$(${CONFIG_SDL} $A)
-           if test x"" != x ; then
-               saved_cppflags="${CPPFLAGS}"
-               if test "x${SDL_DIR}" != "x"; then
-                   SDL_INCLUDE="-I${SDL_DIR}/include"
-               fi
-               CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}"
+               if test ! "x${CONFIG_SDL}" = xNo; then
+                       if test x"" = x ; then A=--cflags ; else A="" ; fi
+                       SDL_INCLUDE=$(${CONFIG_SDL} $A)
+                       SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g")
 
-               saved_libs="${LIBS}"
-               LIBS="${SDL_LIB}"
+                       if test x"" = x ; then A=--libs ; else A="" ; fi
+                       SDL_LIB=$(${CONFIG_SDL} $A)
+                       SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g")
 
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                       if test x"" != x ; then
+                               saved_cppflags="${CPPFLAGS}"
+                               CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}"
+
+                               saved_libs="${LIBS}"
+                               LIBS=${SDL_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_SDL=1
-
+   PBX_SDL=1
 $as_echo "#define HAVE_SDL 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_SDL=1
+                               CPPFLAGS="${saved_cppflags}"
+                               LIBS="${saved_libs}"
+                       else
+                               PBX_SDL=1
 
 $as_echo "#define HAVE_SDL 1" >>confdefs.h
 
-           fi
+                       fi
+               fi
        fi
-    fi
 
 
 if test "x${PBX_SDL_IMAGE}" != "x1" -a "${USE_SDL_IMAGE}" != "no"; then
@@ -32108,7 +32214,7 @@ else
        touch makeopts.acbak
 fi
 
-ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts channels/h323/Makefile"
+ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mandatory modules: ${ac_mandatory_list}" >&5
@@ -32853,7 +32959,6 @@ do
     "include/asterisk/autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/asterisk/autoconfig.h" ;;
     "build_tools/menuselect-deps") CONFIG_FILES="$CONFIG_FILES build_tools/menuselect-deps" ;;
     "makeopts") CONFIG_FILES="$CONFIG_FILES makeopts" ;;
-    "channels/h323/Makefile") CONFIG_FILES="$CONFIG_FILES channels/h323/Makefile" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac