1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-17 15:44:34 +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_HELP_STRING([--disable-dns-srv], AC_ARG_ENABLE(dns-srv,
[disable the use of DNS SRV in HKP and HTTP]), AC_HELP_STRING([--disable-dns-srv],
use_dns_srv=$enableval,use_dns_srv=yes) [disable the use of DNS SRV in HKP and HTTP]),
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,23 +581,29 @@ 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
# enabling any code that calls it. At some point I'll rewrite the
# code to use the BIND 8 resolver API.
# Make sure that the BIND 4 resolver interface is workable before AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# 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 <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"$use_dns_srv" = xyes ; then if test x"$have_resolver" = xyes ; then
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
SRVLIBS=$LIBS SRVLIBS=$LIBS
AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
if test x"$use_dns_srv" = xyes ; then
AC_DEFINE(USE_DNS_SRV,1,[define to use DNS SRV])
fi
if test x"$use_dns_pka" = xyes ; then
AC_DEFINE(USE_DNS_PKA,1,[define to use our experimental DNS PKA])
fi
else
use_dns_srv=no
use_dns_pka=no
fi fi
LIBS=$_srv_save_libs LIBS=$_srv_save_libs
@ -598,6 +611,8 @@ 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