aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-11-13 01:06:40 +0000
committerDavid Shaw <[email protected]>2003-11-13 01:06:40 +0000
commitfef77d93b7c38b5f0fe89e7c01e3e92a616f2606 (patch)
treed2a7fe826c331941252ff80340e7ffb2bf99062c /configure.ac
parent* mainproc.c (proc_symkey_enc): Don't show algorithm information when (diff)
downloadgnupg-fef77d93b7c38b5f0fe89e7c01e3e92a616f2606.tar.gz
gnupg-fef77d93b7c38b5f0fe89e7c01e3e92a616f2606.zip
* configure.ac: Make sure that the resolver API actually compiles, and not
just that the right functions exist.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 88cb3501d..cc63901b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,10 +461,23 @@ if test x"$try_hkp" = xyes && test x"$use_dns_srv" = xyes ; then
AC_SEARCH_LIBS(__dn_skipname,resolv bind,,use_dns_srv=no))
if test x"$use_dns_srv" = xyes ; then
+
+ # Make sure that the BIND 4 resolver interface is workable before
+ # enabling SRVs. At some point I'll rewrite the code to use the
+ # BIND 8 resolver API.
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>],
+[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],,use_dns_srv=no)
+ fi
+
+ if test x"$use_dns_srv" = xyes ; then
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
SRVLIBS=$LIBS
else
- AC_MSG_WARN([Resolver functions not found. Disabling DNS SRV.])
+ AC_MSG_WARN([Resolver functions not found or not usable. Disabling DNS SRV.])
fi
LIBS=$_srv_save_libs
fi