summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-03-25 12:32:26 +0000
committerJoshua Colp <jcolp@digium.com>2015-03-25 12:32:26 +0000
commitabf3e40902abe9a3b32aba0d1691b209b4d32e66 (patch)
treeda9c79e72fc4e06ce512f7aa678d6d5ea88afb80 /configure
parent4c2fc5b81103f7942277bf3dd6481742500ddb2d (diff)
dns: Add core DNS API + unit tests and res_resolver_unbound module + unit tests.
This change adds an abstracted core DNS API which resembles the API described here[1]. The API provides a pluggable mechanism for resolvers and also a consistent view for records. Both synchronous and asynchronous queries are supported. This change also adds a res_resolver_unbound module which uses the libunbound library to provide resolution. Unit tests have also been written for all of the above to confirm the API and functionality. ASTERISK-24834 #close Reported by: Matt Jordan ASTERISK-24836 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4474/ Review: https://reviewboard.asterisk.org/r/4512/ [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+DNS+API git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure145
1 files changed, 144 insertions, 1 deletions
diff --git a/configure b/configure
index be5062007..9a2630dc1 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 432282 .
+# From configure.ac Revision: 432815 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for asterisk trunk.
#
@@ -731,6 +731,10 @@ PBX_UNIXODBC
UNIXODBC_DIR
UNIXODBC_INCLUDE
UNIXODBC_LIB
+PBX_UNBOUND
+UNBOUND_DIR
+UNBOUND_INCLUDE
+UNBOUND_LIB
PBX_TONEZONE
TONEZONE_DIR
TONEZONE_INCLUDE
@@ -1357,6 +1361,7 @@ with_termcap
with_timerfd
with_tinfo
with_tonezone
+with_unbound
with_unixodbc
with_vorbis
with_vpb
@@ -2097,6 +2102,7 @@ Optional Packages:
--with-timerfd=PATH use timerfd files in PATH
--with-tinfo=PATH use Term Info files in PATH
--with-tonezone=PATH use tonezone files in PATH
+ --with-unbound=PATH use unbound files in PATH
--with-unixodbc=PATH use unixODBC files in PATH
--with-vorbis=PATH use Vorbis files in PATH
--with-vpb=PATH use Voicetronix API files in PATH
@@ -11299,6 +11305,38 @@ fi
+ UNBOUND_DESCRIP="unbound"
+ UNBOUND_OPTION="unbound"
+ PBX_UNBOUND=0
+
+# Check whether --with-unbound was given.
+if test "${with_unbound+set}" = set; then :
+ withval=$with_unbound;
+ case ${withval} in
+ n|no)
+ USE_UNBOUND=no
+ # -1 is a magic value used by menuselect to know that the package
+ # was disabled, other than 'not found'
+ PBX_UNBOUND=-1
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} UNBOUND"
+ ;;
+ *)
+ UNBOUND_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} UNBOUND"
+ ;;
+ esac
+
+fi
+
+
+
+
+
+
+
+
UNIXODBC_DESCRIP="unixODBC"
UNIXODBC_OPTION="unixodbc"
PBX_UNIXODBC=0
@@ -22704,6 +22742,111 @@ fi
+if test "x${PBX_UNBOUND}" != "x1" -a "${USE_UNBOUND}" != "no"; then
+ pbxlibdir=""
+ # if --with-UNBOUND=DIR has been specified, use it.
+ if test "x${UNBOUND_DIR}" != "x"; then
+ if test -d ${UNBOUND_DIR}/lib; then
+ pbxlibdir="-L${UNBOUND_DIR}/lib"
+ else
+ pbxlibdir="-L${UNBOUND_DIR}"
+ fi
+ fi
+ pbxfuncname="ub_ctx_create"
+ 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_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lunbound ${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_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
+ UNBOUND_LIB="${pbxlibdir} -lunbound "
+ # if --with-UNBOUND=DIR has been specified, use it.
+ if test "x${UNBOUND_DIR}" != "x"; then
+ 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
+ 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"
+if test "x$ac_cv_header_unbound_h" = xyes; then :
+ UNBOUND_HEADER_FOUND=1
+else
+ UNBOUND_HEADER_FOUND=0
+fi
+
+
+ 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
+_ACEOF
+
+ fi
+ fi
+fi
+
+
+
+
if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then
pbxlibdir=""
# if --with-UNIXODBC=DIR has been specified, use it.