[svn] GnuPG - r4069 - trunk

svn author dshaw cvs at cvs.gnupg.org
Sat Mar 18 06:36:32 CET 2006


Author: dshaw
Date: 2006-03-18 06:36:32 +0100 (Sat, 18 Mar 2006)
New Revision: 4069

Modified:
   trunk/ChangeLog
   trunk/configure.ac
Log:
* configure.ac: Allow the DNS stuff to work on OSX by trying the
Apple-specific BIND_8_COMPAT.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-03-17 05:20:13 UTC (rev 4068)
+++ trunk/ChangeLog	2006-03-18 05:36:32 UTC (rev 4069)
@@ -1,3 +1,8 @@
+2006-03-17  David Shaw  <dshaw at jabberwocky.com>
+
+	* configure.ac: Allow the DNS stuff to work on OSX by trying the
+	Apple-specific BIND_8_COMPAT.
+
 2006-03-09  Werner Koch  <wk at g10code.com>
 
 	Released 1.4.3rc2.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2006-03-17 05:20:13 UTC (rev 4068)
+++ trunk/configure.ac	2006-03-18 05:36:32 UTC (rev 4069)
@@ -1,6 +1,6 @@
 dnl configure.ac script for GnuPG
-dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl               2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+dnl               2006 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GnuPG.
 dnl
@@ -593,12 +593,28 @@
   # enabling any code that calls it.  At some point I'll rewrite the
   # code to use the BIND 8 resolver API.
 
+  AC_MSG_CHECKING([whether the resolver is usable])
   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);]])],have_resolver=yes)
+[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ);]])],have_resolver=yes,have_resolver=no)
+  AC_MSG_RESULT($have_resolver)
 
+# This is Apple-specific and somewhat bizarre as they changed the
+# define in bind 8 for some reason.
+
+  if test x"$have_resolver" != xyes ; then
+    AC_MSG_CHECKING([whether I can make the resolver usable with BIND_8_COMPAT])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT
+#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);]])],[have_resolver=yes ; need_compat=yes])
+    AC_MSG_RESULT($have_resolver)
+  fi
+
   if test x"$have_resolver" = xyes ; then
      SRVLIBS=$LIBS
 
@@ -613,6 +629,10 @@
      if test x"$use_dns_cert" = xyes ; then
         AC_DEFINE(USE_DNS_CERT,1,[define to use DNS CERT])
      fi
+
+     if test x"$need_compat" = xyes ; then
+        AC_DEFINE(BIND_8_COMPAT,1,[an Appleism])
+     fi
   else
      use_dns_srv=no
      use_dns_pka=no




More information about the Gnupg-commits mailing list