OSSP CVS Repository

ossp - Check-in [161]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 161
Date: 2000-Sep-18 17:55:21 (local)
2000-Sep-18 15:55:21 (UTC)
User:rse
Branch:
Comment: Merge in conflicts
Tickets:
Inspections:
Files:
ossp-pkg/adns/ChangeLog      1.1 -> 1.2     41 inserted, 1 deleted
ossp-pkg/adns/aclocal.m4      added-> 1.3
ossp-pkg/adns/adns_check.c      1.4 -> 1.5     1 inserted, 1 deleted
ossp-pkg/adns/adns_event.c      1.5 -> 1.6     3 inserted, 2 deleted
ossp-pkg/adns/adns_general.c      added-> 1.6
ossp-pkg/adns/adns_internal.h      added-> 1.7
ossp-pkg/adns/adns_parse.c      added-> 1.6
ossp-pkg/adns/adns_poll.c      added-> 1.4
ossp-pkg/adns/adns_query.c      1.6 -> 1.7     1 inserted, 1 deleted
ossp-pkg/adns/adns_reply.c      1.6 -> 1.7     1 inserted, 1 deleted
ossp-pkg/adns/adns_setup.c      1.4 -> 1.5     1 inserted, 1 deleted
ossp-pkg/adns/adns_test.c      1.5 -> 1.6     4 inserted, 8 deleted
ossp-pkg/adns/adns_transmit.c      1.7 -> 1.8     1 inserted, 1 deleted
ossp-pkg/adns/adns_tvarith.c      added-> 1.3
ossp-pkg/adns/adns_types.c      1.5 -> 1.6     2 inserted, 2 deleted
ossp-pkg/adns/configure      added-> 1.10
ossp-pkg/adns/configure.in      1.11 -> 1.12     8 inserted, 1 deleted

ossp-pkg/adns/ChangeLog 1.1 -> 1.2

--- ChangeLog    2000/08/12 12:01:15     1.1
+++ ChangeLog    2000/09/19 15:55:21     1.2
@@ -1,4 +1,44 @@
-adns (0.9) unstable; urgency=high
+adns (1.0); urgency=medium
+
+  Bugfixes:
+  * Treat 8-bit characters in email addrs as RFC822 `special' (=> quote).
+  * Fix incorrect `compressed datagram contains loop' error.
+  * Actually compile shared libraries by default !
+  * Fix adnsresfilter usage message to include correct default timeout.
+
+  General improvements:
+  * adnshost, adnslogres, adnsresfilter have options for config override. 
+  * adnsresfilter has --debug option.
+  * Improvements to adnslogres (incl. new -c option) from Tony Finch.
+  * adnslogres has --help option, all utilities support --version.
+  * Documentation improved somewhat, including new GPL-vs-LGPL file.
+
+  Changes for non-BETA release:
+  * Change shared library soname to 1.0.
+  * Do not install adnstest test utility.
+
+  Regression test improvements:
+  * Tests now include adnshost, adnslogres and adnsresfilter.
+  * Test cancellation both before and after query completion.
+
+  Portability fixes and cleanups:
+  * adnstest: setvbuf(stdout,...) before we do first output.
+  * Cope with compilers that don't do `inline'.
+  * Add and fix various missing system #includes.
+  * Find install-sh properly when we need to use it, and chmod it +x.
+  * Do not use variadic macro, use stdarg instead (adnslogres.c).
+  * Regression tests work even if some syscalls are already macros.
+  * #include "config.h" before "adns.h".
+  * Cast a sizeof(...) in src/event.c to unsigned long before printing.
+  * Add pre-generated versions of m4-generated files in regress/.
+  * Kill bogus warning, adh-main.c: `arg2' might be used uninitialized ...
+  * Add extra {...} near adnslogres.c:167 to kill spurious warning.
+  * Use `printf' instead of `echo -n'.
+  * Add list of tested platforms in INSTALL file.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Sun, 17 Sep 2000 15:15:58 +0100
+
+adns (0.9) BETA; urgency=high
 
   Bug fixes:
   * Don't make _processany always kill the TCP connection with the message


ossp-pkg/adns/aclocal.m4 -> 1.3

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,73 ----
+ # aclocal.m4 - package-specific macros for autoconf
+ #  
+ #  This file is
+ #    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ #
+ #  It is part of adns, which is
+ #    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ #    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+ #  
+ #  This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson
+ #
+ #  This program is free software; you can redistribute it and/or modify
+ #  it under the terms of the GNU General Public License as published by
+ #  the Free Software Foundation; either version 2, or (at your option)
+ #  any later version.
+ #  
+ #  This program is distributed in the hope that it will be useful,
+ #  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #  GNU General Public License for more details.
+ #  
+ #  You should have received a copy of the GNU General Public License
+ #  along with this program; if not, write to the Free Software Foundation,
+ #  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+ 
+ dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
+ define(DPKG_CACHED_TRY_COMPILE,[
+  AC_MSG_CHECKING($1)
+  AC_CACHE_VAL($2,[
+   AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
+  ])
+  if test "x$$2" = xyes; then
+   true
+   $5
+  else
+   true
+   $6
+  fi
+ ])
+ 
+ define(ADNS_C_GCCATTRIB,[
+  DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),adns_cv_c_attribute_supported,,
+   [extern int testfunction(int x) __attribute__((,,))],
+   AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_GNUC25_ATTRIB)
+    DPKG_CACHED_TRY_COMPILE(__attribute__((noreturn)),adns_cv_c_attribute_noreturn,,
+     [extern int testfunction(int x) __attribute__((noreturn))],
+     AC_MSG_RESULT(yes)
+     AC_DEFINE(HAVE_GNUC25_NORETURN),
+     AC_MSG_RESULT(no))
+    DPKG_CACHED_TRY_COMPILE(__attribute__((const)),adns_cv_c_attribute_const,,
+     [extern int testfunction(int x) __attribute__((const))],
+     AC_MSG_RESULT(yes)
+     AC_DEFINE(HAVE_GNUC25_CONST),
+     AC_MSG_RESULT(no))
+    DPKG_CACHED_TRY_COMPILE(__attribute__((format...)),adns_cv_attribute_format,,
+     [extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))],
+     AC_MSG_RESULT(yes)
+     AC_DEFINE(HAVE_GNUC25_PRINTFFORMAT),
+     AC_MSG_RESULT(no)),
+   AC_MSG_RESULT(no))
+ ])
+ 
+ define(ADNS_C_GETFUNC,[
+  AC_CHECK_FUNC([$1],,[
+   AC_CHECK_LIB([$2],[$1],[$3],[
+     AC_MSG_ERROR([cannot find library function $1])
+   ])
+  ])
+ ])
+ 
+ sinclude(libtool.m4)
+ 


ossp-pkg/adns/adns_check.c 1.4 -> 1.5

--- adns_check.c 2000/08/12 12:01:15     1.4
+++ adns_check.c 2000/09/19 15:55:21     1.5
@@ -8,7 +8,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by


ossp-pkg/adns/adns_event.c 1.5 -> 1.6

--- adns_event.c 2000/08/12 12:01:15     1.5
+++ adns_event.c 2000/09/19 15:55:21     1.6
@@ -10,7 +10,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -394,7 +394,8 @@
       }
       if (udpaddrlen != sizeof(udpaddr)) {
         adns__diag(ads,-1,0,"datagram received with wrong address length %d"
-                   " (expected %d)", udpaddrlen,sizeof(udpaddr));
+                   " (expected %lu)", udpaddrlen,
+                   (unsigned long)sizeof(udpaddr));
         continue;
       }
       if (udpaddr.sin_family != AF_INET) {


ossp-pkg/adns/adns_general.c -> 1.6

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,360 ----
+ /*
+  * general.c
+  * - diagnostic functions
+  * - vbuf handling
+  */
+ /*
+  *  This file is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *
+  *  It is part of adns, which is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+  *  
+  *  This program is free software; you can redistribute it and/or modify
+  *  it under the terms of the GNU General Public License as published by
+  *  the Free Software Foundation; either version 2, or (at your option)
+  *  any later version.
+  *  
+  *  This program is distributed in the hope that it will be useful,
+  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *  GNU General Public License for more details.
+  *  
+  *  You should have received a copy of the GNU General Public License
+  *  along with this program; if not, write to the Free Software Foundation,
+  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+  */
+ 
+ #include <stdlib.h>
+ #include <unistd.h>
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ 
+ #include "adns_internal.h"
+ 
+ /* Core diagnostic functions */
+ 
+ void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent,
+                 int serv, adns_query qu, const char *fmt, va_list al) {
+   const char *bef, *aft;
+   vbuf vb;
+   
+   if (!ads->diagfile ||
+       (!(ads->iflags & adns_if_debug) && (!prevent || (ads->iflags & prevent))))
+     return;
+ 
+   if (ads->iflags & adns_if_logpid) {
+     fprintf(ads->diagfile,"adns%s [%ld]: ",pfx,(long)getpid());
+   } else {
+     fprintf(ads->diagfile,"adns%s: ",pfx);
+   }
+ 
+   vfprintf(ads->diagfile,fmt,al);
+ 
+   bef= " (";
+   aft= "\n";
+ 
+   if (qu && qu->query_dgram) {
+     adns__vbuf_init(&vb);
+     fprintf(ads->diagfile,"%sQNAME=%s, QTYPE=%s",
+            bef,
+            adns__diag_domain(qu->ads,-1,0, &vb,
+                              qu->query_dgram,qu->query_dglen,DNS_HDRSIZE),
+            qu->typei ? qu->typei->rrtname : "<unknown>");
+     if (qu->typei && qu->typei->fmtname)
+       fprintf(ads->diagfile,"(%s)",qu->typei->fmtname);
+     bef=", "; aft=")\n";
+     adns__vbuf_free(&vb);
+   }
+   
+   if (serv>=0) {
+     fprintf(ads->diagfile,"%sNS=%s",bef,inet_ntoa(ads->servers[serv].addr));
+     bef=", "; aft=")\n";
+   }
+ 
+   fputs(aft,ads->diagfile);
+ }
+ 
+ void adns__debug(adns_state ads, int serv, adns_query qu, const char *fmt, ...) {
+   va_list al;
+ 
+   va_start(al,fmt);
+   adns__vdiag(ads," debug",0,serv,qu,fmt,al);
+   va_end(al);
+ }
+ 
+ void adns__warn(adns_state ads, int serv, adns_query qu, const char *fmt, ...) {
+   va_list al;
+ 
+   va_start(al,fmt);
+   adns__vdiag(ads," warning",adns_if_noerrprint|adns_if_noserverwarn,serv,qu,fmt,al);
+   va_end(al);
+ }
+ 
+ void adns__diag(adns_state ads, int serv, adns_query qu, const char *fmt, ...) {
+   va_list al;
+ 
+   va_start(al,fmt);
+   adns__vdiag(ads,"",adns_if_noerrprint,serv,qu,fmt,al);
+   va_end(al);
+ }
+ 
+ /* vbuf functions */
+ 
+ void adns__vbuf_init(vbuf *vb) {
+   vb->used= vb->avail= 0; vb->buf= 0;
+ }
+ 
+ int adns__vbuf_ensure(vbuf *vb, int want) {
+   void *nb;
+   
+   if (vb->avail >= want) return 1;
+   nb= realloc(vb->buf,want); if (!nb) return 0;
+   vb->buf= nb;
+   vb->avail= want;
+   return 1;
+ }
+   
+ void adns__vbuf_appendq(vbuf *vb, const byte *data, int len) {
+   memcpy(vb->buf+vb->used,data,len);
+   vb->used+= len;
+ }
+ 
+ int adns__vbuf_append(vbuf *vb, const byte *data, int len) {
+   int newlen;
+   void *nb;
+ 
+   newlen= vb->used+len;
+   if (vb->avail < newlen) {
+     if (newlen<20) newlen= 20;
+     newlen <<= 1;
+     nb= realloc(vb->buf,newlen);
+     if (!nb) { newlen= vb->used+len; nb= realloc(vb->buf,newlen); }
+     if (!nb) return 0;
+     vb->buf= nb;
+     vb->avail= newlen;
+   }
+   adns__vbuf_appendq(vb,data,len);
+   return 1;
+ }
+ 
+ int adns__vbuf_appendstr(vbuf *vb, const char *data) {
+   int l;
+   l= strlen(data);
+   return adns__vbuf_append(vb,(const byte *)data,l);
+ }
+ 
+ void adns__vbuf_free(vbuf *vb) {
+   free(vb->buf);
+   adns__vbuf_init(vb);
+ }
+ 
+ /* Additional diagnostic functions */
+ 
+ const char *adns__diag_domain(adns_state ads, int serv, adns_query qu,
+                              vbuf *vb, const byte *dgram, int dglen, int cbyte) {
+   adns_status st;
+ 
+   st= adns__parse_domain(ads,serv,qu,vb, pdf_quoteok, dgram,dglen,&cbyte,dglen);
+   if (st == adns_s_nomemory) {
+     return "<cannot report domain... out of memory>";
+   }
+   if (st) {
+     vb->used= 0;
+     if (!(adns__vbuf_appendstr(vb,"<bad format... ") &&
+          adns__vbuf_appendstr(vb,adns_strerror(st)) &&
+          adns__vbuf_appendstr(vb,">") &&
+          adns__vbuf_append(vb,(const byte *)"",1))) {
+       return "<cannot report bad format... out of memory>";
+     }
+   }
+   if (!vb->used) {
+     adns__vbuf_appendstr(vb,"<truncated ...>");
+     adns__vbuf_append(vb,(const byte *)"",1);
+   }
+   return (char *)vb->buf;
+ }
+ 
+ adns_status adns_rr_info(adns_rrtype type,
+                         const char **rrtname_r, const char **fmtname_r,
+                         int *len_r,
+                         const void *datap, char **data_r) {
+   const typeinfo *typei;
+   vbuf vb;
+   adns_status st;
+ 
+   typei= adns__findtype(type);
+   if (!typei) return adns_s_unknownrrtype;
+ 
+   if (rrtname_r) *rrtname_r= typei->rrtname;
+   if (fmtname_r) *fmtname_r= typei->fmtname;
+   if (len_r) *len_r= typei->rrsz;
+ 
+   if (!datap) return adns_s_ok;
+   
+   adns__vbuf_init(&vb);
+   st= typei->convstring(&vb,datap);
+   if (st) goto x_freevb;
+   if (!adns__vbuf_append(&vb,(const byte *)"",1)) { st= adns_s_nomemory; goto x_freevb; }
+   assert(strlen(vb.buf) == vb.used-1);
+   *data_r= realloc(vb.buf,vb.used);
+   if (!*data_r) *data_r= (char *)vb.buf;
+   return adns_s_ok;
+ 
+  x_freevb:
+   adns__vbuf_free(&vb);
+   return st;
+ }
+ 
+ 
+ #define SINFO(n,s) { adns_s_##n, #n, s }
+ 
+ static const struct sinfo {
+   adns_status st;
+   const char *abbrev;
+   const char *string;
+ } sinfos[]= {
+   SINFO(  ok,                  "OK"                                            ),
+ 
+   SINFO(  nomemory,            "Out of memory"                                 ),
+   SINFO(  unknownrrtype,       "Query not implemented in DNS library"          ),
+   SINFO(  systemfail,          "General resolver or system failure"            ),
+ 
+   SINFO(  timeout,             "DNS query timed out"                           ),
+   SINFO(  allservfail,         "All nameservers failed"                        ),
+   SINFO(  norecurse,           "Recursion denied by nameserver"                ),
+   SINFO(  invalidresponse,     "Nameserver sent bad response"                  ),
+   SINFO(  unknownformat,       "Nameserver used unknown format"                ),
+ 
+   SINFO(  rcodeservfail,       "Nameserver reports failure"                    ),
+   SINFO(  rcodeformaterror,    "Query not understood by nameserver"            ),
+   SINFO(  rcodenotimplemented, "Query not implemented by nameserver"           ),
+   SINFO(  rcoderefused,        "Query refused by nameserver"                   ),
+   SINFO(  rcodeunknown,        "Nameserver sent unknown response code"         ),
+   
+   SINFO(  inconsistent,        "Inconsistent resource records in DNS"          ),
+   SINFO(  prohibitedcname,     "DNS alias found where canonical name wanted"   ),
+   SINFO(  answerdomaininvalid, "Found syntactically invalid domain name"       ),
+   SINFO(  answerdomaintoolong, "Found overly-long domain name"                 ),
+   SINFO(  invaliddata,         "Found invalid DNS data"                        ),
+ 
+   SINFO(  querydomainwrong,    "Domain invalid for particular DNS query type"  ),
+   SINFO(  querydomaininvalid,  "Domain name is syntactically invalid"          ),
+   SINFO(  querydomaintoolong,  "Domain name or component is too long"          ),
+ 
+   SINFO(  nxdomain,            "No such domain"                                ),
+   SINFO(  nodata,              "No such data"                                  )
+ };
+ 
+ static int si_compar(const void *key, const void *elem) {
+   const adns_status *st= key;
+   const struct sinfo *si= elem;
+ 
+   return *st < si->st ? -1 : *st > si->st ? 1 : 0;
+ }
+ 
+ static const struct sinfo *findsinfo(adns_status st) {
+   return bsearch(&st,sinfos,sizeof(sinfos)/sizeof(*sinfos),sizeof(*sinfos),si_compar);
+ }
+ 
+ const char *adns_strerror(adns_status st) {
+   const struct sinfo *si;
+ 
+   si= findsinfo(st);
+   return si->string;
+ }
+ 
+ const char *adns_errabbrev(adns_status st) {
+   const struct sinfo *si;
+ 
+   si= findsinfo(st);
+   return si->abbrev;
+ }
+ 
+ 
+ #define STINFO(max) { adns_s_max_##max, #max }
+ 
+ static const struct stinfo {
+   adns_status stmax;
+   const char *abbrev;
+ } stinfos[]= {
+   { adns_s_ok, "ok" },
+   STINFO(  localfail   ),
+   STINFO(  remotefail  ),
+   STINFO(  tempfail    ),
+   STINFO(  misconfig   ),
+   STINFO(  misquery    ),
+   STINFO(  permfail    )
+ };
+ 
+ static int sti_compar(const void *key, const void *elem) {
+   const adns_status *st= key;
+   const struct stinfo *sti= elem;
+ 
+   adns_status here, min, max;
+ 
+   here= *st;
+   min= (sti==stinfos) ? 0 : sti[-1].stmax+1;
+   max= sti->stmax;
+   
+   return here < min  ? -1 : here > max ? 1 : 0;
+ }
+ 
+ const char *adns_errtypeabbrev(adns_status st) {
+   const struct stinfo *sti;
+ 
+   sti= bsearch(&st,stinfos,sizeof(stinfos)/sizeof(*stinfos),sizeof(*stinfos),sti_compar);
+   return sti->abbrev;
+ }
+ 
+ 
+ void adns__isort(void *array, int nobjs, int sz, void *tempbuf,
+                 int (*needswap)(void *context, const void *a, const void *b),
+                 void *context) {
+   byte *data= array;
+   int i, place;
+ 
+   for (i=0; i<nobjs; i++) {
+     for (place= i;
+         place>0 && needswap(context, data + (place-1)*sz, data + i*sz);
+         place--);
+     if (place != i) {
+       memcpy(tempbuf, data + i*sz, sz);
+       memmove(data + (place+1)*sz, data + place*sz, (i-place)*sz);
+       memcpy(data + place*sz, tempbuf, sz);
+     }
+   }
+ }
+ 
+ /* SIGPIPE protection. */
+ 
+ void adns__sigpipe_protect(adns_state ads) {
+   sigset_t toblock;
+   struct sigaction sa;
+   int r;
+ 
+   if (ads->iflags & adns_if_nosigpipe) return;
+ 
+   sigfillset(&toblock);
+   sigdelset(&toblock,SIGPIPE);
+ 
+   sa.sa_handler= SIG_IGN;
+   sigfillset(&sa.sa_mask);
+   sa.sa_flags= 0;
+   
+   r= sigprocmask(SIG_SETMASK,&toblock,&ads->stdsigmask); assert(!r);
+   r= sigaction(SIGPIPE,&sa,&ads->stdsigpipe); assert(!r);
+ }
+ 
+ void adns__sigpipe_unprotect(adns_state ads) {
+   int r;
+ 
+   if (ads->iflags & adns_if_nosigpipe) return;
+ 
+   r= sigaction(SIGPIPE,&ads->stdsigpipe,0); assert(!r);
+   r= sigprocmask(SIG_SETMASK,&ads->stdsigmask,0); assert(!r);
+ }


ossp-pkg/adns/adns_internal.h -> 1.7

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,709 ----
+ /*
+  * internal.h
+  * - declarations of private objects with external linkage (adns__*)
+  * - definitons of internal macros
+  * - comments regarding library data structures
+  */
+ /*
+  *  This file is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *
+  *  It is part of adns, which is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+  *
+  *  This program is free software; you can redistribute it and/or modify
+  *  it under the terms of the GNU General Public License as published by
+  *  the Free Software Foundation; either version 2, or (at your option)
+  *  any later version.
+  *
+  *  This program is distributed in the hope that it will be useful,
+  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *  GNU General Public License for more details.
+  *
+  *  You should have received a copy of the GNU General Public License
+  *  along with this program; if not, write to the Free Software Foundation,
+  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
+ 
+ #ifndef ADNS_INTERNAL_H_INCLUDED
+ #define ADNS_INTERNAL_H_INCLUDED
+ 
+ /* get rid of assertions -- rse */
+ #define NDEBUG 1
+ 
+ #include "adns_config.h"
+ typedef unsigned char byte;
+ 
+ #include <stdarg.h>
+ #include <assert.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+ #include <string.h>
+ 
+ #include <sys/time.h>
+ 
+ #include "adns.h"
+ #include "adns_dlist.h"
+ 
+ /* Configuration and constants */
+ 
+ #define MAXSERVERS 5
+ #define MAXSORTLIST 15
+ #define UDPMAXRETRIES 15
+ #define UDPRETRYMS 2000
+ #define TCPWAITMS 30000
+ #define TCPCONNMS 14000
+ #define TCPIDLEMS 30000
+ #define MAXTTLBELIEVE (7*86400) /* any TTL > 7 days is capped */
+ 
+ #define DNS_PORT 53
+ #define DNS_MAXUDP 512
+ #define DNS_MAXLABEL 63
+ #define DNS_MAXDOMAIN 255
+ #define DNS_HDRSIZE 12
+ #define DNS_IDOFFSET 0
+ #define DNS_CLASS_IN 1
+ 
+ #define DNS_INADDR_ARPA "in-addr", "arpa"
+ 
+ #define MAX_POLLFDS  ADNS_POLLFDS_RECOMMENDED
+ 
+ typedef enum {
+   cc_user,
+   cc_entex,
+   cc_freq
+ } consistency_checks;
+ 
+ typedef enum {
+   rcode_noerror,
+   rcode_formaterror,
+   rcode_servfail,
+   rcode_nxdomain,
+   rcode_notimp,
+   rcode_refused
+ } dns_rcode;
+ 
+ /* Shared data structures */
+ 
+ typedef union {
+   adns_status status;
+   char *cp;
+   adns_rrtype type;
+   int i;
+   struct in_addr ia;
+   unsigned long ul;
+ } rr_align;
+ 
+ typedef struct {
+   int used, avail;
+   byte *buf;
+ } vbuf;
+ 
+ typedef struct {
+   adns_state ads;
+   adns_query qu;
+   int serv;
+   const byte *dgram;
+   int dglen, nsstart, nscount, arcount;
+   struct timeval now;
+ } parseinfo;
+ 
+ typedef struct {
+   adns_rrtype type;
+   const char *rrtname;
+   const char *fmtname;
+   int rrsz;
+ 
+   void (*makefinal)(adns_query qu, void *data);
+   /* Change memory management of *data.
+    * Previously, used alloc_interim, now use alloc_final.
+    */
+ 
+   adns_status (*convstring)(vbuf *vb, const void *data);
+   /* Converts the RR data to a string representation in vbuf.
+    * vbuf will be appended to (it must have been initialised),
+    * and will not be null-terminated by convstring.
+    */
+ 
+   adns_status (*parse)(const parseinfo *pai, int cbyte, int max, void *store_r);
+   /* Parse one RR, in dgram of length dglen, starting at cbyte and
+    * extending until at most max.
+    *
+    * The RR should be stored at *store_r, of length qu->typei->rrsz.
+    *
+    * If there is an overrun which might indicate truncation, it should set
+    * *rdstart to -1; otherwise it may set it to anything else positive.
+    *
+    * nsstart is the offset of the authority section.
+    */
+ 
+   int (*diff_needswap)(adns_state ads, const void *datap_a, const void *datap_b);
+   /* Returns !0 if RR a should be strictly after RR b in the sort order,
+    * 0 otherwise.  Must not fail.
+    */
+ } typeinfo;
+ 
+ typedef struct allocnode {
+   struct allocnode *next, *back;
+ } allocnode;
+ 
+ union maxalign {
+   byte d[1];
+   struct in_addr ia;
+   long l;
+   void *p;
+   void (*fp)(void);
+   union maxalign *up;
+ } __data;
+ 
+ typedef struct {
+   void *ext;
+   void (*callback)(adns_query parent, adns_query child);
+   union {
+     adns_rr_addr ptr_parent_addr;
+     adns_rr_hostaddr *hostaddr;
+   } info;
+ } qcontext;
+ 
+ struct adns__query {
+   adns_state ads;
+   enum { query_tosend, query_tcpw, query_childw, query_done } state;
+   adns_query back, next, parent;
+   struct { adns_query head, tail; } children;
+   struct { adns_query back, next; } siblings;
+   struct { allocnode *head, *tail; } allocations;
+   int interim_allocd, preserved_allocd;
+   void *final_allocspace;
+ 
+   const typeinfo *typei;
+   byte *query_dgram;
+   int query_dglen;
+ 
+   vbuf vb;
+   /* General-purpose messing-about buffer.
+    * Wherever a `big' interface is crossed, this may be corrupted/changed
+    * unless otherwise specified.
+    */
+ 
+   adns_answer *answer;
+   /* This is allocated when a query is submitted, to avoid being unable
+    * to relate errors to queries if we run out of memory.  During
+    * query processing status, rrs is 0.  cname is set if
+    * we found a cname (this corresponds to cname_dgram in the query
+    * structure).  type is set from the word go.  nrrs and rrs
+    * are set together, when we find how many rrs there are.
+    * owner is set during querying unless we're doing searchlist,
+    * in which case it is set only when we find an answer.
+    */
+ 
+   byte *cname_dgram;
+   int cname_dglen, cname_begin;
+   /* If non-0, has been allocated using . */
+ 
+   vbuf search_vb;
+   int search_origlen, search_pos, search_doneabs;
+   /* Used by the searching algorithm.  The query domain in textual form
+    * is copied into the vbuf, and _origlen set to its length.  Then
+    * we walk the searchlist, if we want to.  _pos says where we are
+    * (next entry to try), and _doneabs says whether we've done the
+    * absolute query yet (0=not yet, 1=done, -1=must do straight away,
+    * but not done yet).  If flags doesn't have adns_qf_search then
+    * the vbuf is initialised but empty and everything else is zero.
+    */
+ 
+   int id, flags, retries;
+   int udpnextserver;
+   unsigned long udpsent; /* bitmap indexed by server */
+   struct timeval timeout;
+   time_t expires; /* Earliest expiry time of any record we used. */
+ 
+   qcontext ctx;
+ 
+   /* Possible states:
+    *
+    *  state   Queue   child  id   nextudpserver  udpsent     tcpfailed
+    *
+    *  tosend  NONE    null   >=0  0              zero        zero
+    *  tosend  udpw    null   >=0  any            nonzero     zero
+    *  tosend  NONE    null   >=0  any            nonzero     zero
+    *
+    *  tcpw    tcpw    null   >=0  irrelevant     any         any
+    *
+    *  child   childw  set    >=0  irrelevant     irrelevant  irrelevant
+    *  child   NONE    null   >=0  irrelevant     irrelevant  irrelevant
+    *  done    output  null   -1   irrelevant     irrelevant  irrelevant
+    *
+    * Queries are only not on a queue when they are actually being processed.
+    * Queries in state tcpw/tcpw have been sent (or are in the to-send buffer)
+    * iff the tcp connection is in state server_ok.
+    *
+    *                         +------------------------+
+    *             START -----> |      tosend/NONE       |
+    *                         +------------------------+
+    *                         /                       |\  \
+    *        too big for UDP /             UDP timeout  \  \ send via UDP
+    *        send via TCP   /              more retries  \  \
+    *        when conn'd   /                  desired     \  \
+    *                     |                                       |  |
+    *                     v                               |  v
+    *              +-----------+                        +-------------+
+    *              | tcpw/tcpw | ________                | tosend/udpw |
+    *              +-----------+         \              +-------------+
+    *                 |    |              |     UDP timeout | |
+    *                 |    |              |      no more    | |
+    *                 |    |              |      retries    | |
+    *                  \   | TCP died     |      desired    | |
+    *                   \   \ no more     |                 | |
+    *                    \   \ servers    | TCP            /  |
+    *                     \   \ to try    | timeout       /   |
+    *                  got \   \          v             |_    | got
+    *                 reply \   _| +------------------+      / reply
+    *                               \     | done/output FAIL |     /
+    *                         \    +------------------+    /
+    *                          \                          /
+    *                           _|                      |_
+    *                             (..... got reply ....)
+    *                              /                   \
+    *        need child query/ies /                     \ no child query
+    *                            /                       \
+    *                          |_                         _|
+    *              +---------------+                   +----------------+
+    *               | childw/childw | ----------------> | done/output OK |
+    *               +---------------+  children done    +----------------+
+    */
+ };
+ 
+ struct query_queue { adns_query head, tail; };
+ 
+ struct adns__state {
+   adns_initflags iflags;
+   FILE *diagfile;
+   int configerrno;
+   struct query_queue udpw, tcpw, childw, output;
+   adns_query forallnext;
+   int nextid, udpsocket, tcpsocket;
+   vbuf tcpsend, tcprecv;
+   int nservers, nsortlist, nsearchlist, searchndots, tcpserver, tcprecv_skip;
+   enum adns__tcpstate {
+     server_disconnected, server_connecting,
+     server_ok, server_broken
+   } tcpstate;
+   struct timeval tcptimeout;
+   /* This will have tv_sec==0 if it is not valid.  It will always be
+    * valid if tcpstate _connecting.  When _ok, it will be nonzero if
+    * we are idle (ie, tcpw queue is empty), in which case it is the
+    * absolute time when we will close the connection.
+    */
+   struct sigaction stdsigpipe;
+   sigset_t stdsigmask;
+   struct pollfd pollfds_buf[MAX_POLLFDS];
+   struct server {
+     struct in_addr addr;
+   } servers[MAXSERVERS];
+   struct sortlist {
+     struct in_addr base, mask;
+   } sortlist[MAXSORTLIST];
+   char **searchlist;
+ };
+ 
+ /* From setup.c: */
+ 
+ int adns__setnonblock(adns_state ads, int fd); /* => errno value */
+ 
+ /* From general.c: */
+ 
+ void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent,
+                 int serv, adns_query qu, const char *fmt, va_list al);
+ 
+ void adns__debug(adns_state ads, int serv, adns_query qu,
+                 const char *fmt, ...) PRINTFFORMAT(4,5);
+ void adns__warn(adns_state ads, int serv, adns_query qu,
+                const char *fmt, ...) PRINTFFORMAT(4,5);
+ void adns__diag(adns_state ads, int serv, adns_query qu,
+                const char *fmt, ...) PRINTFFORMAT(4,5);
+ 
+ int adns__vbuf_ensure(vbuf *vb, int want);
+ int adns__vbuf_appendstr(vbuf *vb, const char *_data); /* does not include nul */
+ int adns__vbuf_append(vbuf *vb, const byte *_data, int len);
+ /* 1=>success, 0=>realloc failed */
+ void adns__vbuf_appendq(vbuf *vb, const byte *_data, int len);
+ void adns__vbuf_init(vbuf *vb);
+ void adns__vbuf_free(vbuf *vb);
+ 
+ const char *adns__diag_domain(adns_state ads, int serv, adns_query qu,
+                              vbuf *vb, const byte *dgram, int dglen, int cbyte);
+ /* Unpicks a domain in a datagram and returns a string suitable for
+  * printing it as.  Never fails - if an error occurs, it will
+  * return some kind of string describing the error.
+  *
+  * serv may be -1 and qu may be 0.  vb must have been initialised,
+  * and will be left in an arbitrary consistent state.
+  *
+  * Returns either vb->buf, or a pointer to a string literal.  Do not modify
+  * vb before using the return value.
+  */
+ 
+ void adns__isort(void *array, int nobjs, int sz, void *tempbuf,
+                 int (*needswap)(void *context, const void *a, const void *b),
+                 void *context);
+ /* Does an insertion sort of array which must contain nobjs objects
+  * each sz bytes long.  tempbuf must point to a buffer at least
+  * sz bytes long.  needswap should return !0 if a>b (strictly, ie
+  * wrong order) 0 if a<=b (ie, order is fine).
+  */
+ 
+ void adns__sigpipe_protect(adns_state);
+ void adns__sigpipe_unprotect(adns_state);
+ /* If SIGPIPE protection is not disabled, will block all signals except
+  * SIGPIPE, and set SIGPIPE's disposition to SIG_IGN.  (And then restore.)
+  * Each call to _protect must be followed by a call to _unprotect before
+  * any significant amount of code gets to run, since the old signal mask
+  * is stored in the adns structure.
+  */
+ 
+ /* From transmit.c: */
+ 
+ adns_status adns__mkquery(adns_state ads, vbuf *vb, int *id_r,
+                          const char *owner, int ol,
+                          const typeinfo *typei, adns_queryflags flags);
+ /* Assembles a query packet in vb.  A new id is allocated and returned.
+  */
+ 
+ adns_status adns__mkquery_frdgram(adns_state ads, vbuf *vb, int *id_r,
+                                  const byte *qd_dgram, int qd_dglen, int qd_begin,
+                                  adns_rrtype type, adns_queryflags flags);
+ /* Same as adns__mkquery, but takes the owner domain from an existing datagram.
+  * That domain must be correct and untruncated.
+  */
+ 
+ void adns__querysend_tcp(adns_query qu, struct timeval now);
+ /* Query must be in state tcpw/tcpw; it will be sent if possible and
+  * no further processing can be done on it for now.  The connection
+  * might be broken, but no reconnect will be attempted.
+  */
+ 
+ void adns__query_send(adns_query qu, struct timeval now);
+ /* Query must be in state tosend/NONE; it will be moved to a new state,
+  * and no further processing can be done on it for now.
+  * (Resulting state is one of udp/timew, tcpwait/timew (if server not connected),
+  *  tcpsent/timew, child/childw or done/output.)
+  * __query_send may decide to use either UDP or TCP depending whether
+  * _qf_usevc is set (or has become set) and whether the query is too
+  * large.
+  */
+ 
+ /* From query.c: */
+ 
+ adns_status adns__internal_submit(adns_state ads, adns_query *query_r,
+                                  const typeinfo *typei, vbuf *qumsg_vb, int id,
+                                  adns_queryflags flags, struct timeval now,
+                                  const qcontext *ctx);
+ /* Submits a query (for internal use, called during external submits).
+  *
+  * The new query is returned in *query_r, or we return adns_s_nomemory.
+  *
+  * The query datagram should already have been assembled in qumsg_vb;
+  * the memory for it is _taken over_ by this routine whether it
+  * succeeds or fails (if it succeeds, the vbuf is reused for qu->vb).
+  *
+  * *ctx is copied byte-for-byte into the query.
+  *
+  * When the child query is done, ctx->callback will be called.  The
+  * child will already have been taken off both the global list of
+  * queries in ads and the list of children in the parent.  The child
+  * will be freed when the callback returns.  The parent will have been
+  * taken off the global childw queue.
+  *
+  * The callback should either call adns__query_done, if it is
+  * complete, or adns__query_fail, if an error has occurred, in which
+  * case the other children (if any) will be cancelled.  If the parent
+  * has more unfinished children (or has just submitted more) then the
+  * callback may choose to wait for them - it must then put the parent
+  * back on the childw queue.
+  */
+ 
+ void adns__search_next(adns_state ads, adns_query qu, struct timeval now);
+ /* Walks down the searchlist for a query with adns_qf_search.
+  * The query should have just had a negative response, or not had
+  * any queries sent yet, and should not be on any queue.
+  * The query_dgram if any will be freed and forgotten and a new
+  * one constructed from the search_* members of the query.
+  *
+  * Cannot fail (in case of error, calls adns__query_fail).
+  */
+ 
+ void *adns__alloc_interim(adns_query qu, size_t sz);
+ void *adns__alloc_preserved(adns_query qu, size_t sz);
+ /* Allocates some memory, and records which query it came from
+  * and how much there was.
+  *
+  * If an error occurs in the query, all the memory from _interim is
+  * simply freed.  If the query succeeds, one large buffer will be made
+  * which is big enough for all these allocations, and then
+  * adns__alloc_final will get memory from this buffer.
+  *
+  * _alloc_interim can fail (and return 0).
+  * The caller must ensure that the query is failed.
+  *
+  * The memory from _preserved is is kept and transferred into the
+  * larger buffer - unless we run out of memory, in which case it too
+  * is freed.  When you use _preserved you have to add code to the
+  * x_nomem error exit case in adns__makefinal_query to clear out the
+  * pointers you made to those allocations, because that's when they're
+  * thrown away; you should also make a note in the declaration of
+  * those pointer variables, to note that they are _preserved rather
+  * than _interim.  If they're in the answer, note it here:
+  *  answer->cname and answer->owner are _preserved.
+  */
+ 
+ void adns__transfer_interim(adns_query from, adns_query to, void *block, size_t sz);
+ /* Transfers an interim allocation from one query to another, so that
+  * the `to' query will have room for the data when we get to makefinal
+  * and so that the free will happen when the `to' query is freed
+  * rather than the `from' query.
+  *
+  * It is legal to call adns__transfer_interim with a null pointer; this
+  * has no effect.
+  *
+  * _transfer_interim also ensures that the expiry time of the `to' query
+  * is no later than that of the `from' query, so that child queries'
+  * TTLs get inherited by their parents.
+  */
+ 
+ void *adns__alloc_mine(adns_query qu, size_t sz);
+ /* Like _interim, but does not record the length for later
+  * copying into the answer.  This just ensures that the memory
+  * will be freed when we're done with the query.
+  */
+ 
+ void *adns__alloc_final(adns_query qu, size_t sz);
+ /* Cannot fail, and cannot return 0.
+  */
+ 
+ void adns__makefinal_block(adns_query qu, void **blpp, size_t sz);
+ void adns__makefinal_str(adns_query qu, char **strp);
+ 
+ void adns__reset_preserved(adns_query qu);
+ /* Resets all of the memory management stuff etc. to take account of
+  * only the _preserved stuff from _alloc_preserved.  Used when we find
+  * an error somewhere and want to just report the error (with perhaps
+  * CNAME, owner, etc. info), and also when we're halfway through RRs
+  * in a datagram and discover that we need to retry the query.
+  */
+ 
+ void adns__query_done(adns_query qu);
+ void adns__query_fail(adns_query qu, adns_status stat);
+ 
+ /* From reply.c: */
+ 
+ void adns__procdgram(adns_state ads, const byte *dgram, int len,
+                     int serv, int viatcp, struct timeval now);
+ /* This function is allowed to cause new datagrams to be constructed
+  * and sent, or even new queries to be started.  However,
+  * query-sending functions are not allowed to call any general event
+  * loop functions in case they accidentally call this.
+  *
+  * Ie, receiving functions may call sending functions.
+  * Sending functions may NOT call receiving functions.
+  */
+ 
+ /* From types.c: */
+ 
+ const typeinfo *adns__findtype(adns_rrtype type);
+ 
+ /* From parse.c: */
+ 
+ typedef struct {
+   adns_state ads;
+   adns_query qu;
+   int serv;
+   const byte *dgram;
+   int dglen, max, cbyte, namelen;
+   int *dmend_r;
+ } findlabel_state;
+ 
+ void adns__findlabel_start(findlabel_state *fls, adns_state ads,
+                           int serv, adns_query qu,
+                           const byte *dgram, int dglen, int max,
+                           int dmbegin, int *dmend_rlater);
+ /* Finds labels in a domain in a datagram.
+  *
+  * Call this routine first.
+  * dmend_rlater may be null.  ads (and of course fls) may not be.
+  * serv may be -1, qu may be null - they are for error reporting.
+  */
+ 
+ adns_status adns__findlabel_next(findlabel_state *fls, int *lablen_r, int *labstart_r);
+ /* Then, call this one repeatedly.
+  *
+  * It will return adns_s_ok if all is well, and tell you the length
+  * and start of successive labels.  labstart_r may be null, but
+  * lablen_r must not be.
+  *
+  * After the last label, it will return with *lablen_r zero.
+  * Do not then call it again; instead, just throw away the findlabel_state.
+  *
+  * *dmend_rlater will have been set to point to the next part of
+  * the datagram after the label (or after the uncompressed part,
+  * if compression was used).  *namelen_rlater will have been set
+  * to the length of the domain name (total length of labels plus
+  * 1 for each intervening dot).
+  *
+  * If the datagram appears to be truncated, *lablen_r will be -1.
+  * *dmend_rlater, *labstart_r and *namelen_r may contain garbage.
+  * Do not call _next again.
+  *
+  * There may also be errors, in which case *dmend_rlater,
+  * *namelen_rlater, *lablen_r and *labstart_r may contain garbage.
+  * Do not then call findlabel_next again.
+  */
+ 
+ typedef enum {
+   pdf_quoteok= 0x001
+ } parsedomain_flags;
+ 
+ adns_status adns__parse_domain(adns_state ads, int serv, adns_query qu,
+                               vbuf *vb, parsedomain_flags flags,
+                               const byte *dgram, int dglen, int *cbyte_io, int max);
+ /* vb must already have been initialised; it will be reset if necessary.
+  * If there is truncation, vb->used will be set to 0; otherwise
+  * (if there is no error) vb will be null-terminated.
+  * If there is an error vb and *cbyte_io may be left indeterminate.
+  *
+  * serv may be -1 and qu may be 0 - they are used for error reporting only.
+  */
+ 
+ adns_status adns__parse_domain_more(findlabel_state *fls, adns_state ads,
+                                    adns_query qu, vbuf *vb, parsedomain_flags flags,
+                                    const byte *dgram);
+ /* Like adns__parse_domain, but you pass it a pre-initialised findlabel_state,
+  * for continuing an existing domain or some such of some kind.  Also, unlike
+  * _parse_domain, the domain data will be appended to vb, rather than replacing
+  * the existing contents.
+  */
+ 
+ adns_status adns__findrr(adns_query qu, int serv,
+                         const byte *dgram, int dglen, int *cbyte_io,
+                         int *type_r, int *class_r, unsigned long *ttl_r,
+                         int *rdlen_r, int *rdstart_r,
+                         int *ownermatchedquery_r);
+ /* Finds the extent and some of the contents of an RR in a datagram
+  * and does some checks.  The datagram is *dgram, length dglen, and
+  * the RR starts at *cbyte_io (which is updated afterwards to point
+  * to the end of the RR).
+  *
+  * The type, class, TTL and RRdata length and start are returned iff
+  * the corresponding pointer variables are not null.  type_r, class_r
+  * and ttl_r may not be null.  The TTL will be capped.
+  *
+  * If ownermatchedquery_r != 0 then the owner domain of this
+  * RR will be compared with that in the query (or, if the query
+  * has gone to a CNAME lookup, with the canonical name).
+  * In this case, *ownermatchedquery_r will be set to 0 or 1.
+  * The query datagram (or CNAME datagram) MUST be valid and not truncated.
+  *
+  * If there is truncation then *type_r will be set to -1 and
+  * *cbyte_io, *class_r, *rdlen_r, *rdstart_r and *eo_matched_r will be
+  * undefined.
+  *
+  * qu must obviously be non-null.
+  *
+  * If an error is returned then *type_r will be undefined too.
+  */
+ 
+ adns_status adns__findrr_anychk(adns_query qu, int serv,
+                                const byte *dgram, int dglen, int *cbyte_io,
+                                int *type_r, int *class_r, unsigned long *ttl_r,
+                                int *rdlen_r, int *rdstart_r,
+                                const byte *eo_dgram, int eo_dglen, int eo_cbyte,
+                                int *eo_matched_r);
+ /* Like adns__findrr_checked, except that the datagram and
+  * owner to compare with can be specified explicitly.
+  *
+  * If the caller thinks they know what the owner of the RR ought to
+  * be they can pass in details in eo_*: this is another (or perhaps
+  * the same datagram), and a pointer to where the putative owner
+  * starts in that datagram.  In this case *eo_matched_r will be set
+  * to 1 if the datagram matched or 0 if it did not.  Either
+  * both eo_dgram and eo_matched_r must both be non-null, or they
+  * must both be null (in which case eo_dglen and eo_cbyte will be ignored).
+  * The eo datagram and contained owner domain MUST be valid and
+  * untruncated.
+  */
+ 
+ void adns__update_expires(adns_query qu, unsigned long ttl, struct timeval now);
+ /* Updates the `expires' field in the query, so that it doesn't exceed
+  * now + ttl.
+  */
+ 
+ int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len);
+ 
+ /* From event.c: */
+ 
+ void adns__tcp_broken(adns_state ads, const char *what, const char *why);
+ /* what and why may be both 0, or both non-0. */
+ 
+ void adns__tcp_tryconnect(adns_state ads, struct timeval now);
+ 
+ void adns__autosys(adns_state ads, struct timeval now);
+ /* Make all the system calls we want to if the application wants us to.
+  * Must not be called from within adns internal processing functions,
+  * lest we end up in recursive descent !
+  */
+ 
+ void adns__must_gettimeofday(adns_state ads, const struct timeval **now_io,
+                             struct timeval *tv_buf);
+ 
+ int adns__pollfds(adns_state ads, struct pollfd pollfds_buf[MAX_POLLFDS]);
+ void adns__fdevents(adns_state ads,
+                    const struct pollfd *pollfds, int npollfds,
+                    int maxfd, const fd_set *readfds,
+                    const fd_set *writefds, const fd_set *exceptfds,
+                    struct timeval now, int *r_r);
+ int adns__internal_check(adns_state ads,
+                         adns_query *query_io,
+                         adns_answer **answer,
+                         void **context_r);
+ 
+ void adns__timeouts(adns_state ads, int act,
+                    struct timeval **tv_io, struct timeval *tvbuf,
+                    struct timeval now);
+ /* If act is !0, then this will also deal with the TCP connection
+  * if previous events broke it or require it to be connected.
+  */
+ 
+ /* From check.c: */
+ 
+ void adns__consistency(adns_state ads, adns_query qu, consistency_checks cc);
+ 
+ /* Useful static inline functions: */
+ #define ctype_whitespace(c) ((c)==' ' || (c)=='\n' || (c)=='\t')
+ #define ctype_digit(c) ((c)>='0' && (c)<='9')
+ #define ctype_alpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z'))
+ #define ctype_822special(c) (strchr("()<>@,;:\\\".[]",(c)) != 0)
+ #define ctype_domainunquoted(c) (ctype_alpha(c) || ctype_digit(c) || (strchr("-_/+",c) != 0))
+ #define errno_resources(e) ((e)==ENOMEM || (e)==ENOBUFS)
+ 
+ /* Useful macros */
+ 
+ #define MEM_ROUND(sz) \
+   (( ((sz)+sizeof(union maxalign)-1) / sizeof(union maxalign) ) \
+    * sizeof(union maxalign) )
+ 
+ #define GETIL_B(cb) (((dgram)[(cb)++]) & 0x0ff)
+ #define GET_B(cb,tv) ((tv)= GETIL_B((cb)))
+ #define GET_W(cb,tv) ((tv)=0, (tv)|=(GETIL_B((cb))<<8), (tv)|=GETIL_B(cb), (tv))
+ #define GET_L(cb,tv) ( (tv)=0, \
+                       (tv)|=(GETIL_B((cb))<<24), \
+                       (tv)|=(GETIL_B((cb))<<16), \
+                       (tv)|=(GETIL_B((cb))<<8), \
+                       (tv)|=GETIL_B(cb), \
+                       (tv) )
+ 
+ /* Misc */
+ extern void _adns_timevaladd(struct timeval *tv_io, long ms);
+ 
+ #endif


ossp-pkg/adns/adns_parse.c -> 1.6

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,246 ----
+ /*
+  * parse.c
+  * - parsing assistance functions (mainly for domains inside datagrams)
+  */
+ /*
+  *  This file is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *
+  *  It is part of adns, which is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+  *  
+  *  This program is free software; you can redistribute it and/or modify
+  *  it under the terms of the GNU General Public License as published by
+  *  the Free Software Foundation; either version 2, or (at your option)
+  *  any later version.
+  *  
+  *  This program is distributed in the hope that it will be useful,
+  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *  GNU General Public License for more details.
+  *  
+  *  You should have received a copy of the GNU General Public License
+  *  along with this program; if not, write to the Free Software Foundation,
+  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+  */
+ 
+ #include "adns_internal.h"
+ 
+ int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len) {
+   char qbuf[10];
+   int i, ch;
+   
+   while (len) {
+     qbuf[0]= 0;
+     for (i=0; i<len; i++) {
+       ch= buf[i];
+       if (ch <= ' ' || ch >= 127) {
+        sprintf(qbuf,"\\%03o",ch);
+        break;
+       } else if (!ctype_domainunquoted(ch)) {
+        sprintf(qbuf,"\\%c",ch);
+        break;
+       }
+     }
+     if (!adns__vbuf_append(vb,(const byte *)buf,i) || !adns__vbuf_append(vb,(const byte *)qbuf,strlen(qbuf)))
+       return 0;
+     if (i<len) i++;
+     buf+= i;
+     len-= i;
+   }
+   return 1;
+ }
+ 
+ void adns__findlabel_start(findlabel_state *fls, adns_state ads,
+                           int serv, adns_query qu,
+                           const byte *dgram, int dglen, int max,
+                           int dmbegin, int *dmend_rlater) {
+   fls->ads= ads;
+   fls->qu= qu;
+   fls->serv= serv;
+   fls->dgram= dgram;
+   fls->dglen= dglen;
+   fls->max= max;
+   fls->cbyte= dmbegin;
+   fls->namelen= 0;
+   fls->dmend_r= dmend_rlater;
+ }
+ 
+ adns_status adns__findlabel_next(findlabel_state *fls,
+                                 int *lablen_r, int *labstart_r) {
+   int lablen, jumpto;
+   const char *dgram;
+ 
+   dgram= (const char *)fls->dgram;
+   for (;;) {
+     if (fls->cbyte >= fls->dglen) goto x_truncated;
+     if (fls->cbyte >= fls->max) goto x_badresponse;
+     GET_B(fls->cbyte,lablen);
+     if (!(lablen & 0x0c0)) break;
+     if ((lablen & 0x0c0) != 0x0c0) return adns_s_unknownformat;
+     if (fls->cbyte >= fls->dglen) goto x_truncated;
+     if (fls->cbyte >= fls->max) goto x_badresponse;
+     GET_B(fls->cbyte,jumpto);
+     jumpto |= (lablen&0x3f)<<8;
+     if (fls->dmend_r) *(fls->dmend_r)= fls->cbyte;
+     fls->cbyte= jumpto;
+     fls->dmend_r= 0; fls->max= fls->dglen+1;
+   }
+   if (labstart_r) *labstart_r= fls->cbyte;
+   if (lablen) {
+     if (fls->namelen) fls->namelen++;
+     fls->namelen+= lablen;
+     if (fls->namelen > DNS_MAXDOMAIN) return adns_s_answerdomaintoolong;
+     fls->cbyte+= lablen;
+     if (fls->cbyte > fls->dglen) goto x_truncated;
+     if (fls->cbyte > fls->max) goto x_badresponse;
+   } else {
+     if (fls->dmend_r) *(fls->dmend_r)= fls->cbyte;
+   }
+   *lablen_r= lablen;
+   return adns_s_ok;
+ 
+  x_truncated:
+   *lablen_r= -1;
+   return adns_s_ok;
+ 
+  x_badresponse: 
+   adns__diag(fls->ads,fls->serv,fls->qu,"label in domain runs beyond end of domain");
+   return adns_s_invalidresponse;
+ }
+ 
+ adns_status adns__parse_domain(adns_state ads, int serv, adns_query qu,
+                               vbuf *vb, adns_queryflags flags,
+                               const byte *dgram, int dglen, int *cbyte_io, int max) {
+   findlabel_state fls;
+   
+   adns__findlabel_start(&fls,ads, serv,qu, dgram,dglen,max, *cbyte_io,cbyte_io);
+   vb->used= 0;
+   return adns__parse_domain_more(&fls,ads,qu, vb,flags,dgram);
+ }
+ 
+ adns_status adns__parse_domain_more(findlabel_state *fls, adns_state ads,
+                                    adns_query qu, vbuf *vb, parsedomain_flags flags,
+                                    const byte *dgram) {
+   int lablen, labstart, i, ch, first;
+   adns_status st;
+ 
+   first= 1;
+   for (;;) {
+     st= adns__findlabel_next(fls,&lablen,&labstart);
+     if (st) return st;
+     if (lablen<0) { vb->used=0; return adns_s_ok; }
+     if (!lablen) break;
+     if (first) {
+       first= 0;
+     } else {
+       if (!adns__vbuf_append(vb,(const byte *)".",1)) return adns_s_nomemory;
+     }
+     if (flags & pdf_quoteok) {
+       if (!vbuf__append_quoted1035(vb,dgram+labstart,lablen))
+        return adns_s_nomemory;
+     } else {
+       ch= dgram[labstart];
+       if (!ctype_alpha(ch) && !ctype_digit(ch)) return adns_s_answerdomaininvalid;
+       for (i= labstart+1; i<labstart+lablen; i++) {
+        ch= dgram[i];
+        if (ch != '-' && !ctype_alpha(ch) && !ctype_digit(ch))
+          return adns_s_answerdomaininvalid;
+       }
+       if (!adns__vbuf_append(vb,dgram+labstart,lablen))
+        return adns_s_nomemory;
+     }
+   }
+   if (!adns__vbuf_append(vb,(const byte *)"",1)) return adns_s_nomemory;
+   return adns_s_ok;
+ }
+        
+ adns_status adns__findrr_anychk(adns_query qu, int serv,
+                                const byte *dgram, int dglen, int *cbyte_io,
+                                int *type_r, int *class_r, unsigned long *ttl_r,
+                                int *rdlen_r, int *rdstart_r,
+                                const byte *eo_dgram, int eo_dglen, int eo_cbyte,
+                                int *eo_matched_r) {
+   findlabel_state fls, eo_fls;
+   int cbyte;
+   
+   int tmp, rdlen, mismatch;
+   unsigned long ttl;
+   int lablen, labstart, ch;
+   int eo_lablen, eo_labstart, eo_ch;
+   adns_status st;
+ 
+   cbyte= *cbyte_io;
+ 
+   adns__findlabel_start(&fls,qu->ads, serv,qu, dgram,dglen,dglen,cbyte,&cbyte);
+   if (eo_dgram) {
+     adns__findlabel_start(&eo_fls,qu->ads, -1,0, eo_dgram,eo_dglen,eo_dglen,eo_cbyte,0);
+     mismatch= 0;
+   } else {
+     mismatch= 1;
+   }
+   
+   for (;;) {
+     st= adns__findlabel_next(&fls,&lablen,&labstart);
+     if (st) return st;
+     if (lablen<0) goto x_truncated;
+ 
+     if (!mismatch) {
+       st= adns__findlabel_next(&eo_fls,&eo_lablen,&eo_labstart);
+       assert(!st); assert(eo_lablen>=0);
+       if (lablen != eo_lablen) mismatch= 1;
+       while (!mismatch && eo_lablen-- > 0) {
+        ch= dgram[labstart++]; if (ctype_alpha(ch)) ch &= ~32;
+        eo_ch= eo_dgram[eo_labstart++]; if (ctype_alpha(eo_ch)) eo_ch &= ~32;
+        if (ch != eo_ch) mismatch= 1;
+       }
+     }
+     if (!lablen) break;
+   }
+   if (eo_matched_r) *eo_matched_r= !mismatch;
+    
+   if (cbyte+10>dglen) goto x_truncated;
+   GET_W(cbyte,tmp); *type_r= tmp;
+   GET_W(cbyte,tmp); *class_r= tmp;
+ 
+   GET_L(cbyte,ttl);
+   if (ttl > MAXTTLBELIEVE) ttl= MAXTTLBELIEVE;
+   *ttl_r= ttl;
+   
+   GET_W(cbyte,rdlen); if (rdlen_r) *rdlen_r= rdlen;
+   if (rdstart_r) *rdstart_r= cbyte;
+   cbyte+= rdlen;
+   if (cbyte>dglen) goto x_truncated;
+   *cbyte_io= cbyte;
+   return adns_s_ok;
+ 
+  x_truncated:
+   *type_r= -1;
+   return 0;
+ }
+ 
+ adns_status adns__findrr(adns_query qu, int serv,
+                         const byte *dgram, int dglen, int *cbyte_io,
+                         int *type_r, int *class_r, unsigned long *ttl_r,
+                         int *rdlen_r, int *rdstart_r,
+                         int *ownermatchedquery_r) {
+   if (!ownermatchedquery_r) {
+     return adns__findrr_anychk(qu,serv,
+                               dgram,dglen,cbyte_io,
+                               type_r,class_r,ttl_r,rdlen_r,rdstart_r,
+                               0,0,0, 0);
+   } else if (!qu->cname_dgram) {
+     return adns__findrr_anychk(qu,serv,
+                               dgram,dglen,cbyte_io,
+                               type_r,class_r,ttl_r,rdlen_r,rdstart_r,
+                               qu->query_dgram,qu->query_dglen,DNS_HDRSIZE,
+                               ownermatchedquery_r);
+   } else {
+     return adns__findrr_anychk(qu,serv,
+                               dgram,dglen,cbyte_io,
+                               type_r,class_r,ttl_r,rdlen_r,rdstart_r,
+                               qu->cname_dgram,qu->cname_dglen,qu->cname_begin,
+                               ownermatchedquery_r);
+   }
+ }


ossp-pkg/adns/adns_poll.c -> 1.4

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,131 ----
+ /*
+  * poll.c
+  * - wrappers for poll(2)
+  */
+ /*
+  *  This file is
+  *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+  *
+  *  It is part of adns, which is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+  *  
+  *  This program is free software; you can redistribute it and/or modify
+  *  it under the terms of the GNU General Public License as published by
+  *  the Free Software Foundation; either version 2, or (at your option)
+  *  any later version.
+  *  
+  *  This program is distributed in the hope that it will be useful,
+  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *  GNU General Public License for more details.
+  *  
+  *  You should have received a copy of the GNU General Public License
+  *  along with this program; if not, write to the Free Software Foundation,
+  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+  */
+ 
+ #include <limits.h>
+ #include <string.h>
+ 
+ #include "adns_internal.h"
+ 
+ #ifdef HAVE_POLL
+ 
+ int adns_beforepoll(adns_state ads, struct pollfd *fds, int *nfds_io, int *timeout_io,
+                    const struct timeval *now) {
+   struct timeval tv_nowbuf, tv_tobuf, *tv_to;
+   int space, found, timeout_ms, r;
+   struct pollfd fds_tmp[MAX_POLLFDS];
+ 
+   adns__consistency(ads,0,cc_entex);
+ 
+   if (timeout_io) {
+     adns__must_gettimeofday(ads,&now,&tv_nowbuf);
+     if (!now) { *nfds_io= 0; r= 0; goto xit; }
+ 
+     timeout_ms= *timeout_io;
+     if (timeout_ms == -1) {
+       tv_to= 0;
+     } else {
+       tv_tobuf.tv_sec= timeout_ms / 1000;
+       tv_tobuf.tv_usec= (timeout_ms % 1000)*1000;
+       tv_to= &tv_tobuf;
+     }
+ 
+     adns__timeouts(ads, 0, &tv_to,&tv_tobuf, *now);
+ 
+     if (tv_to) {
+       assert(tv_to == &tv_tobuf);
+       timeout_ms= (tv_tobuf.tv_usec+999)/1000;
+       assert(tv_tobuf.tv_sec < (INT_MAX-timeout_ms)/1000);
+       timeout_ms += tv_tobuf.tv_sec*1000;
+     } else {
+       timeout_ms= -1;
+     }
+     *timeout_io= timeout_ms;
+   }
+   
+   space= *nfds_io;
+   if (space >= MAX_POLLFDS) {
+     found= adns__pollfds(ads,fds);
+     *nfds_io= found;
+   } else {
+     found= adns__pollfds(ads,fds_tmp);
+     *nfds_io= found;
+     if (space < found) { r= ERANGE; goto xit; }
+     memcpy(fds,fds_tmp,sizeof(struct pollfd)*found);
+   }
+   r= 0;
+ xit:
+   adns__consistency(ads,0,cc_entex);
+   return r;
+ }
+ 
+ void adns_afterpoll(adns_state ads, const struct pollfd *fds, int nfds,
+                    const struct timeval *now) {
+   struct timeval tv_buf;
+ 
+   adns__consistency(ads,0,cc_entex);
+   adns__must_gettimeofday(ads,&now,&tv_buf);
+   if (now) {
+     adns__timeouts(ads, 1, 0,0, *now);
+     adns__fdevents(ads, fds,nfds, 0,0,0,0, *now,0);
+   }
+   adns__consistency(ads,0,cc_entex);
+ }
+ 
+ int adns_wait_poll(adns_state ads,
+                   adns_query *query_io,
+                   adns_answer **answer_r,
+                   void **context_r) {
+   int r, nfds, to;
+   struct pollfd fds[MAX_POLLFDS];
+   
+   adns__consistency(ads,0,cc_entex);
+ 
+   for (;;) {
+     r= adns__internal_check(ads,query_io,answer_r,context_r);
+     if (r != EAGAIN) goto xit;
+     nfds= MAX_POLLFDS; to= -1;
+     adns_beforepoll(ads,fds,&nfds,&to,0);
+     r= poll(fds,nfds,to);
+     if (r == -1) {
+       if (errno == EINTR) {
+        if (ads->iflags & adns_if_eintr) { r= EINTR; goto xit; }
+       } else {
+        adns__diag(ads,-1,0,"poll failed in wait: %s",strerror(errno));
+        adns_globalsystemfailure(ads);
+       }
+     } else {
+       assert(r >= 0);
+       adns_afterpoll(ads,fds,nfds,0);
+     }
+   }
+ 
+  xit:
+   adns__consistency(ads,0,cc_entex);
+   return r;
+ }
+ 
+ #endif


ossp-pkg/adns/adns_query.c 1.6 -> 1.7

--- adns_query.c 2000/08/12 12:01:15     1.6
+++ adns_query.c 2000/09/19 15:55:21     1.7
@@ -10,7 +10,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by


ossp-pkg/adns/adns_reply.c 1.6 -> 1.7

--- adns_reply.c 2000/08/12 12:01:15     1.6
+++ adns_reply.c 2000/09/19 15:55:21     1.7
@@ -8,7 +8,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by


ossp-pkg/adns/adns_setup.c 1.4 -> 1.5

--- adns_setup.c 2000/08/12 12:01:15     1.4
+++ adns_setup.c 2000/09/19 15:55:21     1.5
@@ -9,7 +9,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by


ossp-pkg/adns/adns_test.c 1.5 -> 1.6

--- adns_test.c  2000/08/12 12:01:15     1.5
+++ adns_test.c  2000/09/19 15:55:21     1.6
@@ -4,11 +4,11 @@
  */
 /*
  *  This file is
- *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -36,10 +36,6 @@
 #include "adns.h"
 #include "adns_config.h"
 
-#ifndef OUTPUTSTREAM
-# define OUTPUTSTREAM stdout
-#endif
-
 struct myctx {
   adns_query qu;
   int doneyet, found;
@@ -219,6 +215,8 @@
   mcs= malloc(tc ? sizeof(*mcs)*qc*tc : 1);
   if (!mcs) { perror("malloc mcs"); quitnow(3); }
 
+  setvbuf(stdout,0,_IOLBF,0);
+  
   if (initstring) {
     r= adns_init_strcfg(&ads,
                         (adns_if_debug|adns_if_noautosys|adns_if_checkc_freq)
@@ -231,8 +229,6 @@
   }
   if (r) failure_errno("init",r);
 
-  setvbuf(stdout,0,_IOLBF,0);
-  
   for (qi=0; qi<qc; qi++) {
     fdom_split(fdomlist[qi],&domain,&qflags,ownflags,sizeof(ownflags));
     if (!consistsof(ownflags,"a")) usageerr("unknown ownqueryflag");


ossp-pkg/adns/adns_transmit.c 1.7 -> 1.8

--- adns_transmit.c      2000/08/12 12:01:15     1.7
+++ adns_transmit.c      2000/09/19 15:55:21     1.8
@@ -9,7 +9,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by


ossp-pkg/adns/adns_tvarith.c -> 1.3

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,39 ----
+ /*
+  * tvarith.c
+  * - static functions for doing arithmetic on timevals
+  */
+ /*
+  *  This file is
+  *    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+  *
+  *  It is part of adns, which is
+  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
+  *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+  *
+  *  This program is free software; you can redistribute it and/or modify
+  *  it under the terms of the GNU General Public License as published by
+  *  the Free Software Foundation; either version 2, or (at your option)
+  *  any later version.
+  *
+  *  This program is distributed in the hope that it will be useful,
+  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *  GNU General Public License for more details.
+  *
+  *  You should have received a copy of the GNU General Public License
+  *  along with this program; if not, write to the Free Software Foundation,
+  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
+ 
+ #include "adns_internal.h"
+ 
+ void _adns_timevaladd(struct timeval *tv_io, long ms) {
+   struct timeval tmp;
+   assert(ms>=0);
+   tmp= *tv_io;
+   tmp.tv_usec += (ms%1000)*1000;
+   tmp.tv_sec += ms/1000;
+   if (tmp.tv_usec >= 1000000) { tmp.tv_sec++; tmp.tv_usec -= 1000000; }
+   *tv_io= tmp;
+ }
+ 


ossp-pkg/adns/adns_types.c 1.5 -> 1.6

--- adns_types.c 2000/08/12 12:01:15     1.5
+++ adns_types.c 2000/09/19 15:55:21     1.6
@@ -8,7 +8,7 @@
  *
  *  It is part of adns, which is
  *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -851,7 +851,7 @@
     c= *p++;
     if ((c&~128) < 32 || (c&~128) == 127) return adns_s_invaliddata;
     if (c == '.' && !neednorm) neednorm= 1;
-    else if (c==' ' || ctype_822special(c)) needquote++;
+    else if (c==' ' || c>=127 || ctype_822special(c)) needquote++;
     else neednorm= 0;
   }
 


ossp-pkg/adns/configure -> 1.10

*** /dev/null    Sat Nov 23 01:18:21 2024
--- -    Sat Nov 23 01:18:33 2024
***************
*** 0 ****
--- 1,2556 ----
+ #! /bin/sh
+ 
+ # From configure.in 1.0
+ 
+ ADNS_VERSION=`./shtool version -l txt -d long VERSION`
+ 
+ ./shtool echo -e "Configuring %BADNS%b (Asynchronous DNS), Version %B${ADNS_VERSION}%b"
+ echo "Copyright (c) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>"
+ echo ""
+ 
+ # aclocal.m4 - package-specific macros for autoconf
+ #  
+ #  This file is
+ #    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ #
+ #  It is part of adns, which is
+ #    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
+ #    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+ #  
+ #  This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson
+ #
+ #  This program is free software; you can redistribute it and/or modify
+ #  it under the terms of the GNU General Public License as published by
+ #  the Free Software Foundation; either version 2, or (at your option)
+ #  any later version.
+ #  
+ #  This program is distributed in the hope that it will be useful,
+ #  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #  GNU General Public License for more details.
+ #  
+ #  You should have received a copy of the GNU General Public License
+ #  along with this program; if not, write to the Free Software Foundation,
+ #  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
+ ## Copyright (C) 1996-1999 Free Software Foundation, Inc.
+ ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+ ##
+ ## This program is free software; you can redistribute it and/or modify
+ ## it under the terms of the GNU General Public License as published by
+ ## the Free Software Foundation; either version 2 of the License, or
+ ## (at your option) any later version.
+ ##
+ ## This program is distributed in the hope that it will be useful, but
+ ## WITHOUT ANY WARRANTY; without even the implied warranty of
+ ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ ## General Public License for more details.
+ ##
+ ## You should have received a copy of the GNU General Public License
+ ## along with this program; if not, write to the Free Software
+ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ##
+ ## As a special exception to the GNU General Public License, if you
+ ## distribute this file as part of a program that contains a
+ ## configuration script generated by Autoconf, you may include it under
+ ## the same distribution terms that you use for the rest of that program.
+ 
+ # serial 40 AC_PROG_LIBTOOL
+ 
+ 
+ 
+ 
+ # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+ 
+ 
+ # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+ 
+ 
+ # AC_ENABLE_SHARED - implement the --enable-shared flag
+ # Usage: AC_ENABLE_SHARED[(DEFAULT)]
+ #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+ #   `yes'.
+ 
+ 
+ # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+ 
+ 
+ # AC_ENABLE_STATIC - implement the --enable-static flag
+ # Usage: AC_ENABLE_STATIC[(DEFAULT)]
+ #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+ #   `yes'.
+ 
+ 
+ # AC_DISABLE_STATIC - set the default static flag to --disable-static
+ 
+ 
+ 
+ # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+ # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+ #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+ #   `yes'.
+ 
+ 
+ # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+ 
+ 
+ # AC_PROG_LD - find the path to the GNU or non-GNU linker
+ 
+ 
+ 
+ 
+ # AC_PROG_NM - find the path to a BSD-compatible name lister
+ 
+ 
+ # AC_CHECK_LIBM - check for math library
+ 
+ 
+ # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+ # the libltdl convenience library, adds --enable-ltdl-convenience to
+ # the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
+ # is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
+ # to be `${top_builddir}/libltdl'.  Make sure you start DIR with
+ # '${top_builddir}/' (note the single quotes!) if your package is not
+ # flat, and, if you're not using automake, define top_builddir as
+ # appropriate in the Makefiles.
+ 
+ 
+ # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+ # the libltdl installable library, and adds --enable-ltdl-install to
+ # the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
+ # is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
+ # to be `${top_builddir}/libltdl'.  Make sure you start DIR with
+ # '${top_builddir}/' (note the single quotes!) if your package is not
+ # flat, and, if you're not using automake, define top_builddir as
+ # appropriate in the Makefiles.
+ # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+ 
+ 
+ 
+ 
+ 
+ # Guess values for system-dependent variables and create Makefiles.
+ # Generated automatically using autoconf version 2.13 
+ # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+ #
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+ 
+ # Defaults:
+ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
+ ac_help="$ac_help
+   --enable-shared[=PKGS]  build shared libraries [default=yes]"
+ ac_help="$ac_help
+   --enable-static[=PKGS]  build static libraries [default=yes]"
+ ac_help="$ac_help
+   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
+ ac_help="$ac_help
+   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
+ ac_help="$ac_help
+   --disable-libtool-lock  avoid locking (might break parallel builds)"
+ 
+ # Initialize some variables set by options.
+ # The variables have the same names as the options, with
+ # dashes changed to underlines.
+ build=NONE
+ cache_file=./config.cache
+ exec_prefix=NONE
+ host=NONE
+ no_create=
+ nonopt=NONE
+ no_recursion=
+ prefix=NONE
+ program_prefix=NONE
+ program_suffix=NONE
+ program_transform_name=s,x,x,
+ silent=
+ site=
+ srcdir=
+ target=NONE
+ verbose=
+ x_includes=NONE
+ x_libraries=NONE
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+ datadir='${prefix}/share'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+ 
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
+ # Maximum number of lines to put in a shell here document.
+ ac_max_here_lines=12
+ 
+ ac_prev=
+ for ac_option
+ do
+ 
+   # If the previous option needs an argument, assign it.
+   if test -n "$ac_prev"; then
+     eval "$ac_prev=\$ac_option"
+     ac_prev=
+     continue
+   fi
+ 
+   case "$ac_option" in
+   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+   *) ac_optarg= ;;
+   esac
+ 
+   # Accept the important Cygnus configure options, so we can diagnose typos.
+ 
+   case "$ac_option" in
+ 
+   -bindir | --bindir | --bindi | --bind | --bin | --bi)
+     ac_prev=bindir ;;
+   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+     bindir="$ac_optarg" ;;
+ 
+   -build | --build | --buil | --bui | --bu)
+     ac_prev=build ;;
+   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+     build="$ac_optarg" ;;
+ 
+   -cache-file | --cache-file | --cache-fil | --cache-fi \
+   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+     ac_prev=cache_file ;;
+   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+     cache_file="$ac_optarg" ;;
+ 
+   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+     ac_prev=datadir ;;
+   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+   | --da=*)
+     datadir="$ac_optarg" ;;
+ 
+   -disable-* | --disable-*)
+     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+     fi
+     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+     eval "enable_${ac_feature}=no" ;;
+ 
+   -enable-* | --enable-*)
+     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+     fi
+     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+     case "$ac_option" in
+       *=*) ;;
+       *) ac_optarg=yes ;;
+     esac
+     eval "enable_${ac_feature}='$ac_optarg'" ;;
+ 
+   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+   | --exec | --exe | --ex)
+     ac_prev=exec_prefix ;;
+   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+   | --exec=* | --exe=* | --ex=*)
+     exec_prefix="$ac_optarg" ;;
+ 
+   -gas | --gas | --ga | --g)
+     # Obsolete; use --with-gas.
+     with_gas=yes ;;
+ 
+   -help | --help | --hel | --he)
+     # Omit some internal or obsolete options to make the list less imposing.
+     # This message is too long to be a string in the A/UX 3.1 sh.
+     cat << EOF
+ Usage: configure [options] [host]
+ Options: [defaults in brackets after descriptions]
+ Configuration:
+   --cache-file=FILE       cache test results in FILE
+   --help                  print this message
+   --no-create             do not create output files
+   --quiet, --silent       do not print \`checking...' messages
+   --version               print the version of autoconf that created configure
+ Directory and file names:
+   --prefix=PREFIX         install architecture-independent files in PREFIX
+                           [$ac_default_prefix]
+   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                           [same as prefix]
+   --bindir=DIR            user executables in DIR [EPREFIX/bin]
+   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+   --datadir=DIR           read-only architecture-independent data in DIR
+                           [PREFIX/share]
+   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                           [PREFIX/com]
+   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+   --includedir=DIR        C header files in DIR [PREFIX/include]
+   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+   --infodir=DIR           info documentation in DIR [PREFIX/info]
+   --mandir=DIR            man documentation in DIR [PREFIX/man]
+   --srcdir=DIR            find the sources in DIR [configure dir or ..]
+   --program-prefix=PREFIX prepend PREFIX to installed program names
+   --program-suffix=SUFFIX append SUFFIX to installed program names
+   --program-transform-name=PROGRAM
+                           run sed PROGRAM on installed program names
+ EOF
+     cat << EOF
+ Host type:
+   --build=BUILD           configure for building on BUILD [BUILD=HOST]
+   --host=HOST             configure for HOST [guessed]
+   --target=TARGET         configure for TARGET [TARGET=HOST]
+ Features and packages:
+   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+   --x-includes=DIR        X include files are in DIR
+   --x-libraries=DIR       X library files are in DIR
+ EOF
+     if test -n "$ac_help"; then
+       echo "--enable and --with options recognized:$ac_help"
+     fi
+     exit 0 ;;
+ 
+   -host | --host | --hos | --ho)
+     ac_prev=host ;;
+   -host=* | --host=* | --hos=* | --ho=*)
+     host="$ac_optarg" ;;
+ 
+   -includedir | --includedir | --includedi | --included | --include \
+   | --includ | --inclu | --incl | --inc)
+     ac_prev=includedir ;;
+   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+   | --includ=* | --inclu=* | --incl=* | --inc=*)
+     includedir="$ac_optarg" ;;
+ 
+   -infodir | --infodir | --infodi | --infod | --info | --inf)
+     ac_prev=infodir ;;
+   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+     infodir="$ac_optarg" ;;
+ 
+   -libdir | --libdir | --libdi | --libd)
+     ac_prev=libdir ;;
+   -libdir=* | --libdir=* | --libdi=* | --libd=*)
+     libdir="$ac_optarg" ;;
+ 
+   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+   | --libexe | --libex | --libe)
+     ac_prev=libexecdir ;;
+   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+   | --libexe=* | --libex=* | --libe=*)
+     libexecdir="$ac_optarg" ;;
+ 
+   -localstatedir | --localstatedir | --localstatedi | --localstated \
+   | --localstate | --localstat | --localsta | --localst \
+   | --locals | --local | --loca | --loc | --lo)
+     ac_prev=localstatedir ;;
+   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+     localstatedir="$ac_optarg" ;;
+ 
+   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+     ac_prev=mandir ;;
+   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+     mandir="$ac_optarg" ;;
+ 
+   -nfp | --nfp | --nf)
+     # Obsolete; use --without-fp.
+     with_fp=no ;;
+ 
+   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+   | --no-cr | --no-c)
+     no_create=yes ;;
+ 
+   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+     no_recursion=yes ;;
+ 
+   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+   | --oldin | --oldi | --old | --ol | --o)
+     ac_prev=oldincludedir ;;
+   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+     oldincludedir="$ac_optarg" ;;
+ 
+   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+     ac_prev=prefix ;;
+   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+     prefix="$ac_optarg" ;;
+ 
+   -program-prefix | --program-prefix | --program-prefi | --program-pref \
+   | --program-pre | --program-pr | --program-p)
+     ac_prev=program_prefix ;;
+   -program-prefix=* | --program-prefix=* | --program-prefi=* \
+   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+     program_prefix="$ac_optarg" ;;
+ 
+   -program-suffix | --program-suffix | --program-suffi | --program-suff \
+   | --program-suf | --program-su | --program-s)
+     ac_prev=program_suffix ;;
+   -program-suffix=* | --program-suffix=* | --program-suffi=* \
+   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+     program_suffix="$ac_optarg" ;;
+ 
+   -program-transform-name | --program-transform-name \
+   | --program-transform-nam | --program-transform-na \
+   | --program-transform-n | --program-transform- \
+   | --program-transform | --program-transfor \
+   | --program-transfo | --program-transf \
+   | --program-trans | --program-tran \
+   | --progr-tra | --program-tr | --program-t)
+     ac_prev=program_transform_name ;;
+   -program-transform-name=* | --program-transform-name=* \
+   | --program-transform-nam=* | --program-transform-na=* \
+   | --program-transform-n=* | --program-transform-=* \
+   | --program-transform=* | --program-transfor=* \
+   | --program-transfo=* | --program-transf=* \
+   | --program-trans=* | --program-tran=* \
+   | --progr-tra=* | --program-tr=* | --program-t=*)
+     program_transform_name="$ac_optarg" ;;
+ 
+   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+   | -silent | --silent | --silen | --sile | --sil)
+     silent=yes ;;
+ 
+   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+     ac_prev=sbindir ;;
+   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+   | --sbi=* | --sb=*)
+     sbindir="$ac_optarg" ;;
+ 
+   -sharedstatedir | --sharedstatedir | --sharedstatedi \
+   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+   | --sharedst | --shareds | --shared | --share | --shar \
+   | --sha | --sh)
+     ac_prev=sharedstatedir ;;
+   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+   | --sha=* | --sh=*)
+     sharedstatedir="$ac_optarg" ;;
+ 
+   -site | --site | --sit)
+     ac_prev=site ;;
+   -site=* | --site=* | --sit=*)
+     site="$ac_optarg" ;;
+ 
+   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+     ac_prev=srcdir ;;
+   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+     srcdir="$ac_optarg" ;;
+ 
+   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+   | --syscon | --sysco | --sysc | --sys | --sy)
+     ac_prev=sysconfdir ;;
+   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+     sysconfdir="$ac_optarg" ;;
+ 
+   -target | --target | --targe | --targ | --tar | --ta | --t)
+     ac_prev=target ;;
+   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+     target="$ac_optarg" ;;
+ 
+   -v | -verbose | --verbose | --verbos | --verbo | --verb)
+     verbose=yes ;;
+ 
+   -version | --version | --versio | --versi | --vers)
+     echo "configure generated by autoconf version 2.13"
+     exit 0 ;;
+ 
+   -with-* | --with-*)
+     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+     fi
+     ac_package=`echo $ac_package| sed 's/-/_/g'`
+     case "$ac_option" in
+       *=*) ;;
+       *) ac_optarg=yes ;;
+     esac
+     eval "with_${ac_package}='$ac_optarg'" ;;
+ 
+   -without-* | --without-*)
+     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+     fi
+     ac_package=`echo $ac_package| sed 's/-/_/g'`
+     eval "with_${ac_package}=no" ;;
+ 
+   --x)
+     # Obsolete; use --with-x.
+     with_x=yes ;;
+ 
+   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+   | --x-incl | --x-inc | --x-in | --x-i)
+     ac_prev=x_includes ;;
+   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+     x_includes="$ac_optarg" ;;
+ 
+   -x-libraries | --x-libraries | --x-librarie | --x-librari \
+   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+     ac_prev=x_libraries ;;
+   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+     x_libraries="$ac_optarg" ;;
+ 
+   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+     ;;
+ 
+   *)
+     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+       echo "configure: warning: $ac_option: invalid host type" 1>&2
+     fi
+     if test "x$nonopt" != xNONE; then
+       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+     fi
+     nonopt="$ac_option"
+     ;;
+ 
+   esac
+ done
+ 
+ if test -n "$ac_prev"; then
+   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ fi
+ 
+ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+ 
+ # File descriptor usage:
+ # 0 standard input
+ # 1 file creation
+ # 2 errors and warnings
+ # 3 some systems may open it to /dev/tty
+ # 4 used on the Kubota Titan
+ # 6 checking for... messages and results
+ # 5 compiler messages saved in config.log
+ if test "$silent" = yes; then
+   exec 6>/dev/null
+ else
+   exec 6>&1
+ fi
+ exec 5>./config.log
+ 
+ echo "\
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+ " 1>&5
+ 
+ # Strip out --no-create and --no-recursion so they do not pile up.
+ # Also quote any args containing shell metacharacters.
+ ac_configure_args=
+ for ac_arg
+ do
+   case "$ac_arg" in
+   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+   | --no-cr | --no-c) ;;
+   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+   *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+   esac
+ done
+ 
+ # NLS nuisances.
+ # Only set these to C if already set.  These must not be set unconditionally
+ # because not all systems understand e.g. LANG=C (notably SCO).
+ # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+ # Non-C LC_CTYPE values break the ctype check.
+ if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+ 
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+ echo > confdefs.h
+ 
+ # A filename unique to this package, relative to the directory that
+ # configure is in, which we can look for to find out if srcdir is correct.
+ ac_unique_file=adns.h
+ 
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+   ac_srcdir_defaulted=yes
+   # Try the directory containing this script, then its parent.
+   ac_prog=$0
+   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+   srcdir=$ac_confdir
+   if test ! -r $srcdir/$ac_unique_file; then
+     srcdir=..
+   fi
+ else
+   ac_srcdir_defaulted=no
+ fi
+ if test ! -r $srcdir/$ac_unique_file; then
+   if test "$ac_srcdir_defaulted" = yes; then
+     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+   else
+     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+   fi
+ fi
+ srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+ 
+ # Prefer explicitly selected file to automatically selected ones.
+ if test -z "$CONFIG_SITE"; then
+   if test "x$prefix" != xNONE; then
+     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+   else
+     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+   fi
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+   if test -r "$ac_site_file"; then
+     echo "loading site script $ac_site_file"
+     . "$ac_site_file"
+   fi
+ done
+ 
+ if test -r "$cache_file"; then
+   echo "loading cache $cache_file"
+   . $cache_file
+ else
+   echo "creating cache $cache_file"
+   > $cache_file
+ fi
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ ac_exeext=
+ ac_objext=o
+ if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+     ac_n= ac_c='
+ ' ac_t='       '
+   else
+     ac_n=-n ac_c= ac_t=
+   fi
+ else
+   ac_n= ac_c='\c' ac_t=
+ fi
+ 
+ 
+ 
+ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+ echo "configure:673: checking whether ${MAKE-make} sets \${MAKE}" >&5
+ set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftestmake <<\EOF
+ all:
+        @echo 'ac_maketemp="${MAKE}"'
+ EOF
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+ if test -n "$ac_maketemp"; then
+   eval ac_cv_prog_make_${ac_make}_set=yes
+ else
+   eval ac_cv_prog_make_${ac_make}_set=no
+ fi
+ rm -f conftestmake
+ fi
+ if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   SET_MAKE=
+ else
+   echo "$ac_t""no" 1>&6
+   SET_MAKE="MAKE=${MAKE-make}"
+ fi
+ 
+ # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:702: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+   ac_dummy="$PATH"
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+       ac_cv_prog_CC="gcc"
+       break
+     fi
+   done
+   IFS="$ac_save_ifs"
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+   echo "$ac_t""$CC" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+ if test -z "$CC"; then
+   # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:732: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+   ac_prog_rejected=no
+   ac_dummy="$PATH"
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+         ac_prog_rejected=yes
+        continue
+       fi
+       ac_cv_prog_CC="cc"
+       break
+     fi
+   done
+   IFS="$ac_save_ifs"
+ if test $ac_prog_rejected = yes; then
+   # We found a bogon in the path, so make sure we never use it.
+   set dummy $ac_cv_prog_CC
+   shift
+   if test $# -gt 0; then
+     # We chose a different compiler from the bogus one.
+     # However, it has the same basename, so the bogon will be chosen
+     # first if we set CC to just the basename; use the full file name.
+     shift
+     set dummy "$ac_dir/$ac_word" "$@"
+     shift
+     ac_cv_prog_CC="$@"
+   fi
+ fi
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+   echo "$ac_t""$CC" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+   if test -z "$CC"; then
+     case "`uname -s`" in
+     *win32* | *WIN32*)
+       # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:783: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+   ac_dummy="$PATH"
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+       ac_cv_prog_CC="cl"
+       break
+     fi
+   done
+   IFS="$ac_save_ifs"
+ fi
+ fi
+ CC="$ac_cv_prog_CC"
+ if test -n "$CC"; then
+   echo "$ac_t""$CC" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+  ;;
+     esac
+   fi
+   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+ fi
+ 
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+ echo "configure:815: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ cat > conftest.$ac_ext << EOF
+ 
+ #line 826 "configure"
+ #include "confdefs.h"
+ 
+ main(){return(0);}
+ EOF
+ if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+   # If we can't run a trivial program, we are probably using a cross compiler.
+   if (./conftest; exit) 2>/dev/null; then
+     ac_cv_prog_cc_cross=no
+   else
+     ac_cv_prog_cc_cross=yes
+   fi
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   ac_cv_prog_cc_works=no
+ fi
+ rm -fr conftest*
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+ if test $ac_cv_prog_cc_works = no; then
+   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+ echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+ echo "configure:862: checking whether we are using GNU C" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.c <<EOF
+ #ifdef __GNUC__
+   yes;
+ #endif
+ EOF
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+   ac_cv_prog_gcc=yes
+ else
+   ac_cv_prog_gcc=no
+ fi
+ fi
+ 
+ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ 
+ if test $ac_cv_prog_gcc = yes; then
+   GCC=yes
+ else
+   GCC=
+ fi
+ 
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+ echo "configure:890: checking whether ${CC-cc} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   echo 'void f(){}' > conftest.c
+ if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+   ac_cv_prog_cc_g=yes
+ else
+   ac_cv_prog_cc_g=no
+ fi
+ rm -f conftest*
+ 
+ fi
+ 
+ echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+   CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+   if test "$GCC" = yes; then
+     CFLAGS="-g -O2"
+   else
+     CFLAGS="-g"
+   fi
+ else
+   if test "$GCC" = yes; then
+     CFLAGS="-O2"
+   else
+     CFLAGS=
+   fi
+ fi
+ 
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+ echo "configure:922: checking how to run the C preprocessor" >&5
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+   CPP=
+ fi
+ if test -z "$CPP"; then
+ if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+     # This must be in double quotes, not single quotes, because CPP may get
+   # substituted into the Makefile and "${CC-cc}" will confuse make.
+   CPP="${CC-cc} -E"
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp.
+   cat > conftest.$ac_ext <<EOF
+ #line 937 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   :
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   CPP="${CC-cc} -E -traditional-cpp"
+   cat > conftest.$ac_ext <<EOF
+ #line 954 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   :
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   CPP="${CC-cc} -nologo -E"
+   cat > conftest.$ac_ext <<EOF
+ #line 971 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   :
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   CPP=/lib/cpp
+ fi
+ rm -f conftest*
+ fi
+ rm -f conftest*
+ fi
+ rm -f conftest*
+   ac_cv_prog_CPP="$CPP"
+ fi
+   CPP="$ac_cv_prog_CPP"
+ else
+   ac_cv_prog_CPP="$CPP"
+ fi
+ echo "$ac_t""$CPP" 1>&6
+ 
+ ac_aux_dir=
+ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+   if test -f $ac_dir/install-sh; then
+     ac_aux_dir=$ac_dir
+     ac_install_sh="$ac_aux_dir/install-sh -c"
+     break
+   elif test -f $ac_dir/install.sh; then
+     ac_aux_dir=$ac_dir
+     ac_install_sh="$ac_aux_dir/install.sh -c"
+     break
+   elif test -f $ac_dir/shtool; then
+     ac_aux_dir=$ac_dir
+     ac_install_sh="$ac_aux_dir/shtool install -c"
+     break
+   fi
+ done
+ if test -z "$ac_aux_dir"; then
+   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ fi
+ ac_config_guess=$ac_aux_dir/config.guess
+ ac_config_sub=$ac_aux_dir/config.sub
+ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ 
+ # Check whether --enable-shared or --disable-shared was given.
+ if test "${enable_shared+set}" = set; then
+   enableval="$enable_shared"
+   p=${PACKAGE-default}
+ case "$enableval" in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+   enable_shared=no
+   # Look at the argument we got.  We use all the common list separators.
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+   for pkg in $enableval; do
+     if test "X$pkg" = "X$p"; then
+       enable_shared=yes
+     fi
+   done
+   IFS="$ac_save_ifs"
+   ;;
+ esac
+ else
+   enable_shared=yes
+ fi
+ 
+ # Check whether --enable-static or --disable-static was given.
+ if test "${enable_static+set}" = set; then
+   enableval="$enable_static"
+   p=${PACKAGE-default}
+ case "$enableval" in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+   enable_static=no
+   # Look at the argument we got.  We use all the common list separators.
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+   for pkg in $enableval; do
+     if test "X$pkg" = "X$p"; then
+       enable_static=yes
+     fi
+   done
+   IFS="$ac_save_ifs"
+   ;;
+ esac
+ else
+   enable_static=yes
+ fi
+ 
+ # Check whether --enable-fast-install or --disable-fast-install was given.
+ if test "${enable_fast_install+set}" = set; then
+   enableval="$enable_fast_install"
+   p=${PACKAGE-default}
+ case "$enableval" in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+   enable_fast_install=no
+   # Look at the argument we got.  We use all the common list separators.
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+   for pkg in $enableval; do
+     if test "X$pkg" = "X$p"; then
+       enable_fast_install=yes
+     fi
+   done
+   IFS="$ac_save_ifs"
+   ;;
+ esac
+ else
+   enable_fast_install=yes
+ fi
+ 
+ 
+ # Make sure we can run config.sub.
+ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+ 
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+ echo "configure:1100: checking host system type" >&5
+ 
+ host_alias=$host
+ case "$host_alias" in
+ NONE)
+   case $nonopt in
+   NONE)
+     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+     fi ;;
+   *) host_alias=$nonopt ;;
+   esac ;;
+ esac
+ 
+ host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$host" 1>&6
+ 
+ echo $ac_n "checking build system type""... $ac_c" 1>&6
+ echo "configure:1121: checking build system type" >&5
+ 
+ build_alias=$build
+ case "$build_alias" in
+ NONE)
+   case $nonopt in
+   NONE) build_alias=$host_alias ;;
+   *) build_alias=$nonopt ;;
+   esac ;;
+ esac
+ 
+ build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+ build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$build" 1>&6
+ 
+ # Extract the first word of "ranlib", so it can be a program name with args.
+ set dummy ranlib; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1141: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$RANLIB"; then
+   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ else
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+   ac_dummy="$PATH"
+   for ac_dir in $ac_dummy; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+       ac_cv_prog_RANLIB="ranlib"
+       break
+     fi
+   done
+   IFS="$ac_save_ifs"
+   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+ fi
+ fi
+ RANLIB="$ac_cv_prog_RANLIB"
+ if test -n "$RANLIB"; then
+   echo "$ac_t""$RANLIB" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+ # Check whether --with-gnu-ld or --without-gnu-ld was given.
+ if test "${with_gnu_ld+set}" = set; then
+   withval="$with_gnu_ld"
+   test "$withval" = no || with_gnu_ld=yes
+ else
+   with_gnu_ld=no
+ fi
+ 
+ ac_prog=ld
+ if test "$ac_cv_prog_gcc" = yes; then
+   # Check if gcc -print-prog-name=ld gives a path.
+   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+ echo "configure:1180: checking for ld used by GCC" >&5
+   ac_prog=`($CC -print-prog-name=ld) 2>&5`
+   case "$ac_prog" in
+     # Accept absolute paths.
+     [\\/]* | [A-Za-z]:[\\/]*)
+       re_direlt='/[^/][^/]*/\.\./'
+       # Canonicalize the path of ld
+       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+       done
+       test -z "$LD" && LD="$ac_prog"
+       ;;
+   "")
+     # If it fails, then pretend we aren't using GCC.
+     ac_prog=ld
+     ;;
+   *)
+     # If it is relative, then search for the first ld in PATH.
+     with_gnu_ld=unknown
+     ;;
+   esac
+ elif test "$with_gnu_ld" = yes; then
+   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+ echo "configure:1204: checking for GNU ld" >&5
+ else
+   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+ echo "configure:1207: checking for non-GNU ld" >&5
+ fi
+ if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -z "$LD"; then
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+   for ac_dir in $PATH; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+       ac_cv_path_LD="$ac_dir/$ac_prog"
+       # Check to see if the program is GNU ld.  I'd rather use --version,
+       # but apparently some GNU ld's only accept -v.
+       # Break only if it was the GNU/non-GNU ld that we prefer.
+       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+        test "$with_gnu_ld" != no && break
+       else
+        test "$with_gnu_ld" != yes && break
+       fi
+     fi
+   done
+   IFS="$ac_save_ifs"
+ else
+   ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ fi
+ fi
+ 
+ LD="$ac_cv_path_LD"
+ if test -n "$LD"; then
+   echo "$ac_t""$LD" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+ 
+ echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+ echo "configure:1243: checking if the linker ($LD) is GNU ld" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+ if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+   ac_cv_prog_gnu_ld=yes
+ else
+   ac_cv_prog_gnu_ld=no
+ fi
+ fi
+ 
+ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+ 
+ 
+ echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+ echo "configure:1259: checking for BSD-compatible nm" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$NM"; then
+   # Let the user override the test.
+   ac_cv_path_NM="$NM"
+ else
+   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+        ac_cv_path_NM="$ac_dir/nm -B"
+        break
+       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+        ac_cv_path_NM="$ac_dir/nm -p"
+        break
+       else
+        ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+        continue # so that we can try to find one that supports BSD flags
+       fi
+     fi
+   done
+   IFS="$ac_save_ifs"
+   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ fi
+ fi
+ 
+ NM="$ac_cv_path_NM"
+ echo "$ac_t""$NM" 1>&6
+ 
+ 
+ echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+ echo "configure:1296: checking whether ln -s works" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   rm -f conftestdata
+ if ln -s X conftestdata 2>/dev/null
+ then
+   rm -f conftestdata
+   ac_cv_prog_LN_S="ln -s"
+ else
+   ac_cv_prog_LN_S=ln
+ fi
+ fi
+ LN_S="$ac_cv_prog_LN_S"
+ if test "$ac_cv_prog_LN_S" = "ln -s"; then
+   echo "$ac_t""yes" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+ 
+ # Check for any special flags to pass to ltconfig.
+ libtool_flags="--cache-file=$cache_file"
+ test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+ test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+ test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+ test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ 
+ 
+ # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+ if test "${enable_libtool_lock+set}" = set; then
+   enableval="$enable_libtool_lock"
+   :
+ fi
+ 
+ test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+ 
+ # Some flags need to be propagated to the compiler or linker for good
+ # libtool support.
+ case "$host" in
+ *-*-irix6*)
+   # Find out which ABI we are using.
+   echo '#line 1340 "configure"' > conftest.$ac_ext
+   if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+     case "`/usr/bin/file conftest.o`" in
+     *32-bit*)
+       LD="${LD-ld} -32"
+       ;;
+     *N32*)
+       LD="${LD-ld} -n32"
+       ;;
+     *64-bit*)
+       LD="${LD-ld} -64"
+       ;;
+     esac
+   fi
+   rm -rf conftest*
+   ;;
+ 
+ *-*-sco3.2v5*)
+   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+   SAVE_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS -belf"
+   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+ echo "configure:1362: checking whether the C compiler needs -belf" >&5
+ if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1367 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   lt_cv_cc_needs_belf=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   lt_cv_cc_needs_belf=no
+ fi
+ rm -f conftest*
+ fi
+ 
+ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+     CFLAGS="$SAVE_CFLAGS"
+   fi
+   ;;
+ 
+ 
+ esac
+ 
+ 
+ # Save cache, so that ltconfig can load it
+ cat > confcache <<\EOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs.  It is not useful on other systems.
+ # If it contains results you don't want to keep, you may remove or edit it.
+ #
+ # By default, configure uses ./config.cache as the cache file,
+ # creating it if it does not exist already.  You can give configure
+ # the --cache-file=FILE option to use a different cache file; that is
+ # what configure does when it calls configure scripts in
+ # subdirectories, so they share the cache.
+ # Giving --cache-file=/dev/null disables caching, for debugging configure.
+ # config.status only pays attention to the cache file if you give it the
+ # --recheck option to rerun configure.
+ #
+ EOF
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+ (set) 2>&1 |
+   case `(ac_space=' '; set | grep ac_space) 2>&1` in
+   *ac_space=\ *)
+     # `set' does not quote correctly, so add quotes (double-quote substitution
+     # turns \\\\ into \\, and sed turns \\ into \).
+     sed -n \
+       -e "s/'/'\\\\''/g" \
+       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+     ;;
+   *)
+     # `set' quotes correctly as required by POSIX, so do not add quotes.
+     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+     ;;
+   esac >> confcache
+ if cmp -s $cache_file confcache; then
+   :
+ else
+   if test -w $cache_file; then
+     echo "updating cache $cache_file"
+     cat confcache > $cache_file
+   else
+     echo "not updating unwritable cache $cache_file"
+   fi
+ fi
+ rm -f confcache
+ 
+ 
+ # Actually configure libtool.  ac_aux_dir is where install-sh is found.
+ CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+ 
+ # Reload cache, that may have been modified by ltconfig
+ if test -r "$cache_file"; then
+   echo "loading cache $cache_file"
+   . $cache_file
+ else
+   echo "creating cache $cache_file"
+   > $cache_file
+ fi
+ 
+ 
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+ 
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+ 
+ # Redirect the config.log output again, so that the ltconfig log is not
+ # clobbered by the next message.
+ exec 5>>./config.log
+ 
+ 
+ for ac_func in poll
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:1479: checking for $ac_func" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1484 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char $ac_func();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+ $ac_func();
+ #endif
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_$ac_func=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_func_$ac_func=no"
+ fi
+ rm -f conftest*
+ fi
+ 
+ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+   cat >> confdefs.h <<EOF
+ #define $ac_tr_func 1
+ EOF
+  
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ done
+ 
+ 
+  echo $ac_n "checking for socket""... $ac_c" 1>&6
+ echo "configure:1533: checking for socket" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1538 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char socket(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char socket();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_socket) || defined (__stub___socket)
+ choke me
+ #else
+ socket();
+ #endif
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_socket=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_func_socket=no"
+ fi
+ rm -f conftest*
+ fi
+ 
+ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   :
+ else
+   echo "$ac_t""no" 1>&6
+ 
+   echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+ echo "configure:1580: checking for socket in -lsocket" >&5
+ ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsocket  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 1588 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char socket();
+ 
+ int main() {
+ socket()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+   cat >> confdefs.h <<EOF
+ #define $ac_tr_lib 1
+ EOF
+ 
+   LIBS="-lsocket $LIBS"
+ 
+ else
+   echo "$ac_t""no" 1>&6
+ 
+     { echo "configure: error: cannot find library function socket" 1>&2; exit 1; }
+   
+ fi
+ 
+  
+ fi
+ 
+ 
+ 
+  echo $ac_n "checking for inet_ntoa""... $ac_c" 1>&6
+ echo "configure:1635: checking for inet_ntoa" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_inet_ntoa'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1640 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char inet_ntoa(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char inet_ntoa();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_inet_ntoa) || defined (__stub___inet_ntoa)
+ choke me
+ #else
+ inet_ntoa();
+ #endif
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_inet_ntoa=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_func_inet_ntoa=no"
+ fi
+ rm -f conftest*
+ fi
+ 
+ if eval "test \"`echo '$ac_cv_func_'inet_ntoa`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   :
+ else
+   echo "$ac_t""no" 1>&6
+ 
+   echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
+ echo "configure:1682: checking for inet_ntoa in -lnsl" >&5
+ ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lnsl  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 1690 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char inet_ntoa();
+ 
+ int main() {
+ inet_ntoa()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+   cat >> confdefs.h <<EOF
+ #define $ac_tr_lib 1
+ EOF
+ 
+   LIBS="-lnsl $LIBS"
+ 
+ else
+   echo "$ac_t""no" 1>&6
+ 
+     { echo "configure: error: cannot find library function inet_ntoa" 1>&2; exit 1; }
+   
+ fi
+ 
+  
+ fi
+ 
+ 
+ 
+ echo $ac_n "checking for INADDR_LOOPBACK""... $ac_c" 1>&6
+ echo "configure:1737: checking for INADDR_LOOPBACK" >&5
+ if eval "test \"`echo '$''{'adns_cv_decl_inaddrloopback'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+  cat > conftest.$ac_ext <<EOF
+ #line 1743 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+  
+ int main() {
+ 
+   INADDR_LOOPBACK;
+  
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   adns_cv_decl_inaddrloopback=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   adns_cv_decl_inaddrloopback=no
+ fi
+ rm -f conftest*
+ fi
+ 
+ if test "$adns_cv_decl_inaddrloopback" = yes; then
+  echo "$ac_t""found" 1>&6
+ else
+  echo "$ac_t""not in standard headers, urgh..." 1>&6
+  ac_safe=`echo "rpc/types.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for rpc/types.h""... $ac_c" 1>&6
+ echo "configure:1774: checking for rpc/types.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1779 "configure"
+ #include "confdefs.h"
+ #include <rpc/types.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:1784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   rm -rf conftest*
+   eval "ac_cv_header_$ac_safe=yes"
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_header_$ac_safe=no"
+ fi
+ rm -f conftest*
+ fi
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   
+   cat >> confdefs.h <<\EOF
+ #define HAVEUSE_RPCTYPES_H 1
+ EOF
+ 
+  
+ else
+   echo "$ac_t""no" 1>&6
+ 
+   { echo "configure: error: cannot find INADDR_LOOPBACK or rpc/types.h" 1>&2; exit 1; }
+  
+ fi
+ 
+ fi
+ 
+ 
+  echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
+ echo "configure:1817: checking for inet_aton" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 1822 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char inet_aton(); below.  */
+ #include <assert.h>
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char inet_aton();
+ 
+ int main() {
+ 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
+ choke me
+ #else
+ inet_aton();
+ #endif
+ 
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_func_inet_aton=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_func_inet_aton=no"
+ fi
+ rm -f conftest*
+ fi
+ 
+ if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   :
+ else
+   echo "$ac_t""no" 1>&6
+ 
+   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
+ echo "configure:1864: checking for inet_aton in -lresolv" >&5
+ ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lresolv  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 1872 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char inet_aton();
+ 
+ int main() {
+ inet_aton()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   
+  LIBS="-lresolv $LIBS";
+  echo "configure: warning: inet_aton is in libresolv, urgh.  Must use -lresolv." 1>&2
+ 
+ else
+   echo "$ac_t""no" 1>&6
+ 
+     { echo "configure: error: cannot find library function inet_aton" 1>&2; exit 1; }
+   
+ fi
+ 
+  
+ fi
+ 
+ 
+ 
+ 
+  echo $ac_n "checking inlines""... $ac_c" 1>&6
+ echo "configure:1916: checking inlines" >&5
+  if eval "test \"`echo '$''{'dpkg_cv_c_inline'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+   cat > conftest.$ac_ext <<EOF
+ #line 1922 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ } inline int foo (int x) {
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   dpkg_cv_c_inline=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   dpkg_cv_c_inline=no
+ fi
+ rm -f conftest*
+  
+ fi
+ 
+  if test "x$dpkg_cv_c_inline" = xyes; then
+   true
+   echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+ #define HAVE_INLINE 1
+ EOF
+ 
+  else
+   true
+   echo "$ac_t""no" 1>&6
+  fi
+ 
+ 
+ 
+  
+  echo $ac_n "checking __attribute__((,,))""... $ac_c" 1>&6
+ echo "configure:1958: checking __attribute__((,,))" >&5
+  if eval "test \"`echo '$''{'adns_cv_c_attribute_supported'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+   cat > conftest.$ac_ext <<EOF
+ #line 1964 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ extern int testfunction(int x) __attribute__((,,))
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   adns_cv_c_attribute_supported=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   adns_cv_c_attribute_supported=no
+ fi
+ rm -f conftest*
+  
+ fi
+ 
+  if test "x$adns_cv_c_attribute_supported" = xyes; then
+   true
+   echo "$ac_t""yes" 1>&6
+   cat >> confdefs.h <<\EOF
+ #define HAVE_GNUC25_ATTRIB 1
+ EOF
+ 
+    
+  echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6
+ echo "configure:1993: checking __attribute__((noreturn))" >&5
+  if eval "test \"`echo '$''{'adns_cv_c_attribute_noreturn'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+   cat > conftest.$ac_ext <<EOF
+ #line 1999 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ extern int testfunction(int x) __attribute__((noreturn))
+ ; return 0; }
+ EOF
+ if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   adns_cv_c_attribute_noreturn=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   adns_cv_c_attribute_noreturn=no
+ fi
+ rm -f conftest*
+  
+ fi
+ 
+  if test "x$adns_cv_c_attribute_noreturn" = xyes; then
+   true
+   echo "$ac_t""yes" 1>&6
+     cat >> confdefs.h <<\EOF
+ #define HAVE_GNUC25_NORETURN 1
+ EOF
+ 
+  else
+   true
+   echo "$ac_t""no" 1>&6
+  fi
+ 
+    
+  echo $ac_n "checking __attribute__((const))""... $ac_c" 1>&6
+ echo "configure:2033: checking __attribute__((const))" >&5
+  if eval "test \"`echo '$''{'adns_cv_c_attribute_const'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+   cat > conftest.$ac_ext <<EOF
+ #line 2039 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ extern int testfunction(int x) __attribute__((const))
+ ; return 0; }
+ EOF
+ if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   adns_cv_c_attribute_const=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   adns_cv_c_attribute_const=no
+ fi
+ rm -f conftest*
+  
+ fi
+ 
+  if test "x$adns_cv_c_attribute_const" = xyes; then
+   true
+   echo "$ac_t""yes" 1>&6
+     cat >> confdefs.h <<\EOF
+ #define HAVE_GNUC25_CONST 1
+ EOF
+ 
+  else
+   true
+   echo "$ac_t""no" 1>&6
+  fi
+ 
+    
+  echo $ac_n "checking __attribute__((format...))""... $ac_c" 1>&6
+ echo "configure:2073: checking __attribute__((format...))" >&5
+  if eval "test \"`echo '$''{'adns_cv_attribute_format'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   
+   cat > conftest.$ac_ext <<EOF
+ #line 2079 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))
+ ; return 0; }
+ EOF
+ if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   adns_cv_attribute_format=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   adns_cv_attribute_format=no
+ fi
+ rm -f conftest*
+  
+ fi
+ 
+  if test "x$adns_cv_attribute_format" = xyes; then
+   true
+   echo "$ac_t""yes" 1>&6
+     cat >> confdefs.h <<\EOF
+ #define HAVE_GNUC25_PRINTFFORMAT 1
+ EOF
+ 
+  else
+   true
+   echo "$ac_t""no" 1>&6
+  fi
+ 
+  else
+   true
+   echo "$ac_t""no" 1>&6
+  fi
+ 
+ 
+ for ac_hdr in sys/select.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+ echo "configure:2121: checking for $ac_hdr" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 2126 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:2131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   rm -rf conftest*
+   eval "ac_cv_header_$ac_safe=yes"
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_header_$ac_safe=no"
+ fi
+ rm -f conftest*
+ fi
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+   cat >> confdefs.h <<EOF
+ #define $ac_tr_hdr 1
+ EOF
+  
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ done
+ 
+ 
+ 
+ 
+ if test "${GCC-no}" = yes; then
+        WARNS="-Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith"
+ else
+        WARNS=
+ fi
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ SHLIBFORLINK='libadns.so'
+ SHLIBSONAME='$(SHLIBFORLINK).$(MAJOR)'
+ SHLIBFILE='$(SHLIBSONAME).$(MINOR)'
+ 
+ SHLIBCC='$(CC) $(CFLAGS) -fpic'
+ MKSHLIB_1='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME) -o'
+ MKSHLIB_2=''
+ MKSHLIB_3='-lc'
+ 
+ trap '' 1 2 15
+ cat > confcache <<\EOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs.  It is not useful on other systems.
+ # If it contains results you don't want to keep, you may remove or edit it.
+ #
+ # By default, configure uses ./config.cache as the cache file,
+ # creating it if it does not exist already.  You can give configure
+ # the --cache-file=FILE option to use a different cache file; that is
+ # what configure does when it calls configure scripts in
+ # subdirectories, so they share the cache.
+ # Giving --cache-file=/dev/null disables caching, for debugging configure.
+ # config.status only pays attention to the cache file if you give it the
+ # --recheck option to rerun configure.
+ #
+ EOF
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+ (set) 2>&1 |
+   case `(ac_space=' '; set | grep ac_space) 2>&1` in
+   *ac_space=\ *)
+     # `set' does not quote correctly, so add quotes (double-quote substitution
+     # turns \\\\ into \\, and sed turns \\ into \).
+     sed -n \
+       -e "s/'/'\\\\''/g" \
+       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+     ;;
+   *)
+     # `set' quotes correctly as required by POSIX, so do not add quotes.
+     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+     ;;
+   esac >> confcache
+ if cmp -s $cache_file confcache; then
+   :
+ else
+   if test -w $cache_file; then
+     echo "updating cache $cache_file"
+     cat confcache > $cache_file
+   else
+     echo "not updating unwritable cache $cache_file"
+   fi
+ fi
+ rm -f confcache
+ 
+ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+ 
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ 
+ # Any assignment to VPATH causes Sun make to only execute
+ # the first set of double-colon rules, so remove it if not needed.
+ # If there is a colon in the path, we need to keep it.
+ if test "x$srcdir" = x.; then
+   ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
+ fi
+ 
+ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+ 
+ DEFS=-DHAVE_CONFIG_H
+ 
+ # Without the "./", some shells look in PATH for config.status.
+ : ${CONFIG_STATUS=./config.status}
+ 
+ echo creating $CONFIG_STATUS
+ rm -f $CONFIG_STATUS
+ cat > $CONFIG_STATUS <<EOF
+ #! /bin/sh
+ # Generated automatically by configure.
+ # Run this file to recreate the current configuration.
+ # This directory was configured as follows,
+ # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ #
+ # $0 $ac_configure_args
+ #
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+ 
+ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ for ac_option
+ do
+   case "\$ac_option" in
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+     echo "$CONFIG_STATUS generated by autoconf version 2.13"
+     exit 0 ;;
+   -help | --help | --hel | --he | --h)
+     echo "\$ac_cs_usage"; exit 0 ;;
+   *) echo "\$ac_cs_usage"; exit 1 ;;
+   esac
+ done
+ 
+ ac_given_srcdir=$srcdir
+ 
+ trap 'rm -fr `echo "Makefile adns-config  adns_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+ 
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+ $ac_vpsub
+ $extrasub
+ s%@ADNS_VERSION@%$ADNS_VERSION%g
+ s%@SHELL@%$SHELL%g
+ s%@CFLAGS@%$CFLAGS%g
+ s%@CPPFLAGS@%$CPPFLAGS%g
+ s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@FFLAGS@%$FFLAGS%g
+ s%@DEFS@%$DEFS%g
+ s%@LDFLAGS@%$LDFLAGS%g
+ s%@LIBS@%$LIBS%g
+ s%@exec_prefix@%$exec_prefix%g
+ s%@prefix@%$prefix%g
+ s%@program_transform_name@%$program_transform_name%g
+ s%@bindir@%$bindir%g
+ s%@sbindir@%$sbindir%g
+ s%@libexecdir@%$libexecdir%g
+ s%@datadir@%$datadir%g
+ s%@sysconfdir@%$sysconfdir%g
+ s%@sharedstatedir@%$sharedstatedir%g
+ s%@localstatedir@%$localstatedir%g
+ s%@libdir@%$libdir%g
+ s%@includedir@%$includedir%g
+ s%@oldincludedir@%$oldincludedir%g
+ s%@infodir@%$infodir%g
+ s%@mandir@%$mandir%g
+ s%@SET_MAKE@%$SET_MAKE%g
+ s%@CC@%$CC%g
+ s%@CPP@%$CPP%g
+ s%@host@%$host%g
+ s%@host_alias@%$host_alias%g
+ s%@host_cpu@%$host_cpu%g
+ s%@host_vendor@%$host_vendor%g
+ s%@host_os@%$host_os%g
+ s%@build@%$build%g
+ s%@build_alias@%$build_alias%g
+ s%@build_cpu@%$build_cpu%g
+ s%@build_vendor@%$build_vendor%g
+ s%@build_os@%$build_os%g
+ s%@RANLIB@%$RANLIB%g
+ s%@LD@%$LD%g
+ s%@NM@%$NM%g
+ s%@LN_S@%$LN_S%g
+ s%@LIBTOOL@%$LIBTOOL%g
+ s%@WARNS@%$WARNS%g
+ s%@SHLIBCC@%$SHLIBCC%g
+ s%@MKSHLIB_1@%$MKSHLIB_1%g
+ s%@MKSHLIB_2@%$MKSHLIB_2%g
+ s%@MKSHLIB_3@%$MKSHLIB_3%g
+ s%@SHLIBFORLINK@%$SHLIBFORLINK%g
+ s%@SHLIBFILE@%$SHLIBFILE%g
+ s%@SHLIBSONAME@%$SHLIBSONAME%g
+ 
+ CEOF
+ EOF
+ 
+ cat >> $CONFIG_STATUS <<\EOF
+ 
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ ac_file=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=""
+ while $ac_more_lines; do
+   if test $ac_beg -gt 1; then
+     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+   else
+     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+   fi
+   if test ! -s conftest.s$ac_file; then
+     ac_more_lines=false
+     rm -f conftest.s$ac_file
+   else
+     if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f conftest.s$ac_file"
+     else
+       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+     fi
+     ac_file=`expr $ac_file + 1`
+     ac_beg=$ac_end
+     ac_end=`expr $ac_end + $ac_max_sed_cmds`
+   fi
+ done
+ if test -z "$ac_sed_cmds"; then
+   ac_sed_cmds=cat
+ fi
+ EOF
+ 
+ cat >> $CONFIG_STATUS <<EOF
+ 
+ CONFIG_FILES=\${CONFIG_FILES-"Makefile adns-config "}
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+   case "$ac_file" in
+   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+   *) ac_file_in="${ac_file}.in" ;;
+   esac
+ 
+   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+ 
+   # Remove last slash and all that follows it.  Not all systems have dirname.
+   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+     # The file is in a subdirectory.
+     test ! -d "$ac_dir" && mkdir "$ac_dir"
+     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+     # A "../" for each directory in $ac_dir_suffix.
+     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+   else
+     ac_dir_suffix= ac_dots=
+   fi
+ 
+   case "$ac_given_srcdir" in
+   .)  srcdir=.
+       if test -z "$ac_dots"; then top_srcdir=.
+       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+   *) # Relative path.
+     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+     top_srcdir="$ac_dots$ac_given_srcdir" ;;
+   esac
+ 
+ 
+   echo creating "$ac_file"
+   rm -f "$ac_file"
+   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+   case "$ac_file" in
+   *Makefile*) ac_comsub="1i\\
+ # $configure_input" ;;
+   *) ac_comsub= ;;
+   esac
+ 
+   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+   sed -e "$ac_comsub
+ s%@configure_input@%$configure_input%g
+ s%@srcdir@%$srcdir%g
+ s%@top_srcdir@%$top_srcdir%g
+ " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+ fi; done
+ rm -f conftest.s*
+ 
+ # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+ # NAME is the cpp macro being defined and VALUE is the value it is being given.
+ #
+ # ac_d sets the value in "#define NAME VALUE" lines.
+ ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
+ ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
+ ac_dC='\3'
+ ac_dD='%g'
+ # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ ac_uB='\([     ]\)%\1#\2define\3'
+ ac_uC=' '
+ ac_uD='\4%g'
+ # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ ac_eB='$%\1#\2define\3'
+ ac_eC=' '
+ ac_eD='%g'
+ 
+ if test "${CONFIG_HEADERS+set}" != set; then
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+   CONFIG_HEADERS="adns_config.h"
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+ fi
+ for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+   case "$ac_file" in
+   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+   *) ac_file_in="${ac_file}.in" ;;
+   esac
+ 
+   echo creating $ac_file
+ 
+   rm -f conftest.frag conftest.in conftest.out
+   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+   cat $ac_file_inputs > conftest.in
+ 
+ EOF
+ 
+ # Transform confdefs.h into a sed script conftest.vals that substitutes
+ # the proper values into config.h.in to produce config.h.  And first:
+ # Protect against being on the right side of a sed subst in config.status.
+ # Protect against being in an unquoted here document in config.status.
+ rm -f conftest.vals
+ cat > conftest.hdr <<\EOF
+ s/[\\&%]/\\&/g
+ s%[\\$`]%\\&%g
+ s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+ s%ac_d%ac_u%gp
+ s%ac_u%ac_e%gp
+ EOF
+ sed -n -f conftest.hdr confdefs.h > conftest.vals
+ rm -f conftest.hdr
+ 
+ # This sed command replaces #undef with comments.  This is necessary, for
+ # example, in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ cat >> conftest.vals <<\EOF
+ s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+ EOF
+ 
+ # Break up conftest.vals because some shells have a limit on
+ # the size of here documents, and old seds have small limits too.
+ 
+ rm -f conftest.tail
+ while :
+ do
+   ac_lines=`grep -c . conftest.vals`
+   # grep -c gives empty output for an empty file on some AIX systems.
+   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+   # Write a limited-size here document to conftest.frag.
+   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+   echo 'CEOF
+   sed -f conftest.frag conftest.in > conftest.out
+   rm -f conftest.in
+   mv conftest.out conftest.in
+ ' >> $CONFIG_STATUS
+   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+   rm -f conftest.vals
+   mv conftest.tail conftest.vals
+ done
+ rm -f conftest.vals
+ 
+ cat >> $CONFIG_STATUS <<\EOF
+   rm -f conftest.frag conftest.h
+   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+   cat conftest.in >> conftest.h
+   rm -f conftest.in
+   if cmp -s $ac_file conftest.h 2>/dev/null; then
+     echo "$ac_file is unchanged"
+     rm -f conftest.h
+   else
+     # Remove last slash and all that follows it.  Not all systems have dirname.
+       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+       # The file is in a subdirectory.
+       test ! -d "$ac_dir" && mkdir "$ac_dir"
+     fi
+     rm -f $ac_file
+     mv conftest.h $ac_file
+   fi
+ fi; done
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+ chmod a+x adns-config
+ 
+ exit 0
+ EOF
+ chmod +x $CONFIG_STATUS
+ rm -fr confdefs* $ac_clean_files
+ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ 


ossp-pkg/adns/configure.in 1.11 -> 1.12

--- configure.in 2000/08/12 12:01:15     1.11
+++ configure.in 2000/09/19 15:55:21     1.12
@@ -5,7 +5,7 @@
 #
 #  It is part of adns, which is
 #    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
-#    Copyright (C) 1999 Tony Finch <dot@dotat.at>
+#    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
 #  
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -68,7 +68,14 @@
  AC_MSG_WARN([inet_aton is in libresolv, urgh.  Must use -lresolv.])
 ])
 
+DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,,
+ [} inline int foo (int x) {],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INLINE),
+ AC_MSG_RESULT(no))
+
 ADNS_C_GCCATTRIB
+AC_CHECK_HEADERS(sys/select.h)
 
 AC_SUBST(WARNS)
 

CVSTrac 2.0.1