1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-06-30 22:27:56 +02:00

* configure.ac: Split PKA checking off from DNS SRV checking.

Currently PKA is only enabled if HTTP or HKP is enabled which is not
necessary.
This commit is contained in:
David Shaw 2005-12-23 04:58:25 +00:00
parent f1482aab4e
commit f3c99c604c
2 changed files with 37 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2005-12-22 David Shaw <dshaw@jabberwocky.com>
* configure.ac: Split PKA checking off from DNS SRV checking.
Currently PKA is only enabled if HTTP or HKP is enabled which is
not necessary.
2005-12-08 David Shaw <dshaw@jabberwocky.com> 2005-12-08 David Shaw <dshaw@jabberwocky.com>
* NEWS: Note --fetch-keys. * NEWS: Note --fetch-keys.

View File

@ -558,12 +558,19 @@ AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
dnl Now try for the resolver functions so we can use DNS SRV and our dnl Now try for the resolver functions so we can use DNS SRV and our
dnl PKA feature. dnl PKA feature.
AC_ARG_ENABLE(dns-srv, if test x"$try_hkp" = xyes || test x"$try_http" = xyes ; then
AC_ARG_ENABLE(dns-srv,
AC_HELP_STRING([--disable-dns-srv], AC_HELP_STRING([--disable-dns-srv],
[disable the use of DNS SRV in HKP and HTTP]), [disable the use of DNS SRV in HKP and HTTP]),
use_dns_srv=$enableval,use_dns_srv=yes) use_dns_srv=$enableval,use_dns_srv=yes)
fi
if (test x"$try_hkp" = xyes || test x"$try_http" = xyes) && test x"$use_dns_srv" = xyes ; then AC_ARG_ENABLE(dns-pka,
AC_HELP_STRING([--disable-dns-pka],
[disable the use of PKA records in DNS]),
use_dns_pka=$enableval,use_dns_pka=yes)
if test x"$use_dns_pka" = xyes || test x"$use_dns_srv" = xyes ; then
_srv_save_libs=$LIBS _srv_save_libs=$LIBS
LIBS="" LIBS=""
# the double underscore thing is a glibc-ism? # the double underscore thing is a glibc-ism?
@ -574,30 +581,38 @@ if (test x"$try_hkp" = xyes || test x"$try_http" = xyes) && test x"$use_dns_srv"
AC_SEARCH_LIBS(dn_skipname,resolv bind,, AC_SEARCH_LIBS(dn_skipname,resolv bind,,
AC_SEARCH_LIBS(__dn_skipname,resolv bind,,use_dns_srv=no)) 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 # Make sure that the BIND 4 resolver interface is workable before
# enabling SRVs. At some point I'll rewrite the code to use the # enabling any code that calls it. At some point I'll rewrite the
# BIND 8 resolver API. # code to use the BIND 8 resolver API.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/nameser.h> #include <arpa/nameser.h>
#include <resolv.h>], #include <resolv.h>],
[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],,use_dns_srv=no) [[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],have_resolver=yes)
fi
if test x"$have_resolver" = xyes ; then
SRVLIBS=$LIBS
if test x"$use_dns_srv" = xyes ; then if test x"$use_dns_srv" = xyes ; then
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV]) AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
SRVLIBS=$LIBS fi
if test x"$use_dns_pka" = xyes ; then
AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA]) AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
fi fi
else
use_dns_srv=no
use_dns_pka=no
fi
LIBS=$_srv_save_libs LIBS=$_srv_save_libs
fi fi
AC_SUBST(SRVLIBS) AC_SUBST(SRVLIBS)
AM_CONDITIONAL(USE_DNS_SRV, test x"$use_dns_srv" = xyes)
# Check for LDAP # Check for LDAP
if test "$try_ldap" = yes ; then if test "$try_ldap" = yes ; then