Code

Updated copyright for 0.23.3.
[pkg-cadaver.git] / debian / patches / libgnutls-config.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## libgnutls-config.dpatch by Sebastian Harl <tokkee@debian.org>
3 ##
4 ## DP: Support pkg-config as well when checking for gnutls.
5 ## DP:
6 ## DP: The latest versions of gnutls no longer ship libgnutls-config.
8 @DPATCH@
10 diff a/aclocal.m4 b/aclocal.m4
11 --- a/aclocal.m4
12 +++ b/aclocal.m4
13 @@ -1,7 +1,7 @@
14 -# generated automatically by aclocal 1.10 -*- Autoconf -*-
15 +# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
16  
17  # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
18 -# 2005, 2006  Free Software Foundation, Inc.
19 +# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
20  # This file is free software; the Free Software Foundation
21  # gives unlimited permission to copy and/or distribute it,
22  # with or without modifications, as long as this notice is preserved.
23 @@ -2644,6 +2644,1406 @@
24               | (ullmax / ull) | (ullmax % ull));]])
25  ])
26  
27 +# Copyright (C) 2001-2006 Joe Orton <joe@manyfish.co.uk>    -*- autoconf -*-
28 +#
29 +# This file is free software; you may copy and/or distribute it with
30 +# or without modifications, as long as this notice is preserved.
31 +# This software is distributed in the hope that it will be useful, but
32 +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even
33 +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
34 +# PURPOSE.
35 +
36 +# The above license applies to THIS FILE ONLY, the neon library code
37 +# itself may be copied and distributed under the terms of the GNU
38 +# LGPL, see COPYING.LIB for more details
39 +
40 +# This file is part of the neon HTTP/WebDAV client library.
41 +# See http://www.webdav.org/neon/ for the latest version. 
42 +# Please send any feedback to <neon@lists.manyfish.co.uk>
43 +
44 +# Tests needed for the neon-test common test code.
45 +
46 +AC_DEFUN([NE_FORMAT_TIMET], [
47 +NEON_FORMAT(time_t, [
48 +#ifdef HAVE_SYS_TIME_H
49 +#include <sys/time.h>
50 +#endif])
51 +])
52 +
53 +AC_DEFUN([NEON_TEST], [
54 +
55 +AC_REQUIRE([NEON_COMMON_CHECKS])
56 +AC_REQUIRE([NE_FORMAT_TIMET])
57 +
58 +AC_REQUIRE([AC_TYPE_PID_T])
59 +AC_REQUIRE([AC_HEADER_TIME])
60 +
61 +dnl NEON_XML_PARSER may add things (e.g. -I/usr/local/include) to 
62 +dnl CPPFLAGS which make "gcc -Werror" fail in NEON_FORMAT; suggest
63 +dnl this macro is used first.
64 +AC_BEFORE([$0], [NEON_XML_PARSER])
65 +
66 +AC_CHECK_HEADERS(sys/time.h stdint.h locale.h)
67 +
68 +AC_CHECK_FUNCS(pipe isatty usleep shutdown setlocale)
69 +
70 +AC_REQUIRE([NE_FIND_AR])
71 +
72 +])
73 +
74 +# Copyright (C) 1998-2005, 2007 Joe Orton <joe@manyfish.co.uk>    -*- autoconf -*-
75 +#
76 +# This file is free software; you may copy and/or distribute it with
77 +# or without modifications, as long as this notice is preserved.
78 +# This software is distributed in the hope that it will be useful, but
79 +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even
80 +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
81 +# PURPOSE.
82 +
83 +# The above license applies to THIS FILE ONLY, the neon library code
84 +# itself may be copied and distributed under the terms of the GNU
85 +# LGPL, see COPYING.LIB for more details
86 +
87 +# This file is part of the neon HTTP/WebDAV client library.
88 +# See http://www.webdav.org/neon/ for the latest version. 
89 +# Please send any feedback to <neon@lists.manyfish.co.uk>
90 +
91 +# Check for XML parser, supporting libxml 2.x and expat 1.95.x,
92 +# or a bundled copy of expat.
93 +#  *  Bundled expat if a directory name argument is passed
94 +#     -> expat dir must contain minimal expat sources, i.e.
95 +#        xmltok, xmlparse sub-directories.  See sitecopy/cadaver for
96 +#       examples of how to do this.
97 +#
98 +# Usage: 
99 +#  NEON_XML_PARSER()
100 +# or
101 +#  NEON_XML_PARSER([expat-srcdir], [expat-builddir])
103 +dnl Find expat: run $1 if found, else $2
104 +AC_DEFUN([NE_XML_EXPAT], [
105 +AC_CHECK_HEADER(expat.h,
106 +  [AC_CHECK_LIB(expat, XML_SetXmlDeclHandler, [
107 +    AC_DEFINE(HAVE_EXPAT, 1, [Define if you have expat])
108 +    neon_xml_parser_message="expat"
109 +    NEON_LIBS="$NEON_LIBS -lexpat"
110 +    neon_xml_parser=expat
111 +    AC_CHECK_TYPE(XML_Size, 
112 +      [NEON_FORMAT(XML_Size, [#include <expat.h>])],
113 +      [AC_DEFINE_UNQUOTED([NE_FMT_XML_SIZE], ["d"])],
114 +      [#include <expat.h>])
115 +  ], [$1])], [$1])
116 +])
118 +dnl Find libxml2: run $1 if found, else $2
119 +AC_DEFUN([NE_XML_LIBXML2], [
120 +AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config)
121 +if test -n "$XML2_CONFIG"; then
122 +    neon_xml_parser_message="libxml `$XML2_CONFIG --version`"
123 +    AC_DEFINE(HAVE_LIBXML, 1, [Define if you have libxml])
124 +    # xml2-config in some versions erroneously includes -I/include
125 +    # in the --cflags output.
126 +    CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`"
127 +    NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`"
128 +    AC_CHECK_HEADERS(libxml/xmlversion.h libxml/parser.h,,[
129 +      AC_MSG_ERROR([could not find parser.h, libxml installation problem?])])
130 +    neon_xml_parser=libxml2
131 +else
132 +    $1
133 +fi
134 +])
136 +dnl Configure for a bundled expat build.
137 +AC_DEFUN([NE_XML_BUNDLED_EXPAT], [
139 +AC_REQUIRE([AC_C_BIGENDIAN])
140 +# Define XML_BYTE_ORDER for expat sources.
141 +if test $ac_cv_c_bigendian = "yes"; then
142 +  ne_xml_border=21
143 +else
144 +  ne_xml_border=12
145 +fi
147 +# mini-expat doesn't pick up config.h
148 +CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$ne_xml_border -DXML_DTD -I$1/xmlparse -I$1/xmltok"
150 +AC_DEFINE_UNQUOTED([NE_FMT_XML_SIZE], ["d"])
152 +# Use the bundled expat sources
153 +AC_LIBOBJ($2/xmltok/xmltok)
154 +AC_LIBOBJ($2/xmltok/xmlrole)
155 +AC_LIBOBJ($2/xmlparse/xmlparse)
156 +AC_LIBOBJ($2/xmlparse/hashtable)
158 +AC_DEFINE(HAVE_EXPAT)
160 +AC_DEFINE(HAVE_XMLPARSE_H, 1, [Define if using expat which includes xmlparse.h])
162 +])
164 +AC_DEFUN([NEON_XML_PARSER], [
166 +dnl Switches to force choice of library
167 +AC_ARG_WITH([libxml2],
168 +AS_HELP_STRING([--with-libxml2], [force use of libxml 2.x]))
169 +AC_ARG_WITH([expat], 
170 +AS_HELP_STRING([--with-expat], [force use of expat]))
172 +dnl Flag to force choice of included expat, if available.
173 +ifelse($#, 2, [
174 +AC_ARG_WITH([included-expat],
175 +AS_HELP_STRING([--with-included-expat], [use bundled expat sources]),,
176 +with_included_expat=no)],
177 +with_included_expat=no)
179 +if test "$NEON_NEED_XML_PARSER" = "yes"; then
180 +  # Find an XML parser
181 +  neon_xml_parser=none
183 +  # Forced choice of expat:
184 +  case $with_expat in
185 +  yes) NE_XML_EXPAT([AC_MSG_ERROR([expat library not found, cannot proceed])]) ;;
186 +  no) ;;
187 +  */libexpat.la) 
188 +       # Special case for Subversion
189 +       ne_expdir=`echo $with_expat | sed 's:/libexpat.la$::'`
190 +       AC_DEFINE(HAVE_EXPAT)
191 +       AC_DEFINE_UNQUOTED([NE_FMT_XML_SIZE], ["d"])
192 +       CPPFLAGS="$CPPFLAGS -I$ne_expdir"
193 +       if test "x${NEON_TARGET}" = "xlibneon.la"; then
194 +         NEON_LTLIBS=$with_expat
195 +       else
196 +         # no dependency on libexpat => crippled libneon, so do partial install
197 +         ALLOW_INSTALL=lib
198 +       fi
199 +       neon_xml_parser=expat
200 +       neon_xml_parser_message="expat in $ne_expdir"
201 +       ;;
202 +  /*) AC_MSG_ERROR([--with-expat does not take a directory argument]) ;;
203 +  esac
205 +  # If expat wasn't specifically enabled and libxml was:
206 +  if test "${neon_xml_parser}-${with_libxml2}-${with_included_expat}" = "none-yes-no"; then
207 +     NE_XML_LIBXML2(
208 +      [AC_MSG_ERROR([libxml2.x library not found, cannot proceed])])
209 +  fi
211 +  # Otherwise, by default search for expat then libxml2:
212 +  if test "${neon_xml_parser}-${with_included_expat}" = "none-no"; then
213 +     NE_XML_EXPAT([NE_XML_LIBXML2([:])])
214 +  fi
216 +  # If an XML parser still has not been found, fail or use the bundled expat
217 +  if test "$neon_xml_parser" = "none"; then
218 +    m4_if($1, [], 
219 +       [AC_MSG_ERROR([no XML parser was found: expat or libxml 2.x required])],
220 +       [# Configure the bundled copy of expat
221 +        NE_XML_BUNDLED_EXPAT($@)
222 +       neon_xml_parser_message="bundled expat in $1"])
223 +  fi
225 +  AC_MSG_NOTICE([XML parser used: $neon_xml_parser_message])
226 +fi
228 +])
230 +# Copyright (C) 1998-2009 Joe Orton <joe@manyfish.co.uk>    -*- autoconf -*-
231 +# Copyright (C) 2004 Aleix Conchillo Flaque <aleix@member.fsf.org>
232 +#
233 +# This file is free software; you may copy and/or distribute it with
234 +# or without modifications, as long as this notice is preserved.
235 +# This software is distributed in the hope that it will be useful, but
236 +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even
237 +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
238 +# PURPOSE.
240 +# The above license applies to THIS FILE ONLY, the neon library code
241 +# itself may be copied and distributed under the terms of the GNU
242 +# LGPL, see COPYING.LIB for more details
244 +# This file is part of the neon HTTP/WebDAV client library.
245 +# See http://www.webdav.org/neon/ for the latest version. 
246 +# Please send any feedback to <neon@lists.manyfish.co.uk>
248 +#
249 +# Usage:
250 +#
251 +#      NEON_LIBRARY
252 +# or   NEON_BUNDLED(srcdir, [ACTIONS-IF-BUNDLED], [ACTIONS-IF-NOT_BUNDLED]) 
253 +# or   NEON_VPATH_BUNDLED(srcdir, builddir, 
254 +#                        [ACTIONS-IF-BUNDLED], [ACTIONS-IF-NOT-BUNDLED])
255 +#
256 +#   where srcdir is the location of bundled neon 'src' directory.
257 +#   If using a VPATH-enabled build, builddir is the location of the
258 +#   build directory corresponding to srcdir.
259 +#
260 +#   If a bundled build *is* being used, ACTIONS-IF-BUNDLED will be
261 +#   evaluated. These actions should ensure that 'make' is run
262 +#   in srcdir, and that one of NEON_NORMAL_BUILD or NEON_LIBTOOL_BUILD 
263 +#   is called.
264 +#
265 +# After calling one of the above macros, if the NEON_NEED_XML_PARSER
266 +# variable is set to "yes", then you must configure an XML parser
267 +# too. You can do this your own way, or do it easily using the
268 +# NEON_XML_PARSER() macro. Example usage for where we have bundled the
269 +# neon sources in a directory called libneon, and bundled expat
270 +# sources in a directory called 'expat'.
271 +#
272 +#   NEON_BUNDLED(libneon, [
273 +#      NEON_XML_PARSER(expat)
274 +#      NEON_NORMAL_BUILD
275 +#   ])
276 +#
277 +# Alternatively, for a simple standalone app with neon as a
278 +# dependancy, use just:
279 +#
280 +#   NEON_LIBRARY
281 +# 
282 +# and rely on the user installing neon correctly.
283 +#
284 +# You are free to configure an XML parser any other way you like,
285 +# but the end result must be, either expat or libxml will get linked
286 +# in, and HAVE_EXPAT or HAVE_LIBXML is defined appropriately.
287 +#
288 +# To set up the bundled build environment, call 
289 +#
290 +#    NEON_NORMAL_BUILD
291 +# or
292 +#    NEON_LIBTOOL_BUILD
293 +# 
294 +# depending on whether you are using libtool to build, or not.
295 +# Both these macros take an optional argument specifying the set
296 +# of object files you wish to build: if the argument is not given,
297 +# all of neon will be built.
299 +AC_DEFUN([NEON_BUNDLED],[
301 +neon_bundled_srcdir=$1
302 +neon_bundled_builddir=$1
304 +NEON_COMMON_BUNDLED([$2], [$3])
306 +])
308 +AC_DEFUN([NEON_VPATH_BUNDLED],[
310 +neon_bundled_srcdir=$1
311 +neon_bundled_builddir=$2
312 +NEON_COMMON_BUNDLED([$3], [$4])
314 +])
316 +AC_DEFUN([NEON_COMMON_BUNDLED],[
318 +AC_PREREQ(2.50)
320 +AC_ARG_WITH(included-neon,
321 +AS_HELP_STRING([--with-included-neon], [force use of included neon library]),
322 +[neon_force_included="$withval"], [neon_force_included="no"])
324 +NEON_COMMON
326 +# The colons are here so there is something to evaluate
327 +# in case the argument was not passed.
328 +if test "$neon_force_included" = "yes"; then
329 +       :
330 +       $1
331 +else
332 +       :
333 +       $2
334 +fi
336 +])
338 +dnl Not got any bundled sources:
339 +AC_DEFUN([NEON_LIBRARY],[
341 +AC_PREREQ(2.50)
342 +neon_force_included=no
343 +neon_bundled_srcdir=
344 +neon_bundled_builddir=
346 +NEON_COMMON
348 +])
350 +AC_DEFUN([NE_DEFINE_VERSIONS], [
352 +NEON_VERSION="${NE_VERSION_MAJOR}.${NE_VERSION_MINOR}.${NE_VERSION_PATCH}${NE_VERSION_TAG}"
354 +AC_DEFINE_UNQUOTED([NEON_VERSION], ["${NEON_VERSION}"],
355 +                   [Define to be the neon version string])
356 +AC_DEFINE_UNQUOTED([NE_VERSION_MAJOR], [(${NE_VERSION_MAJOR})],
357 +                   [Define to be neon library major version])
358 +AC_DEFINE_UNQUOTED([NE_VERSION_MINOR], [(${NE_VERSION_MINOR})],
359 +                   [Define to be neon library minor version])
360 +AC_DEFINE_UNQUOTED([NE_VERSION_PATCH], [(${NE_VERSION_PATCH})],
361 +                   [Define to be neon library patch version])
362 +])
364 +AC_DEFUN([NE_VERSIONS_BUNDLED], [
366 +# Define the current versions.
367 +NE_VERSION_MAJOR=0
368 +NE_VERSION_MINOR=29
369 +NE_VERSION_PATCH=0
370 +NE_VERSION_TAG=
372 +# 0.29.x is backwards-compatible to 0.27.x, so AGE=2
373 +NE_LIBTOOL_VERSINFO="29:${NE_VERSION_PATCH}:2"
375 +NE_DEFINE_VERSIONS
377 +])
379 +dnl Adds an ABI variation tag which will be added to the SONAME of
380 +dnl a shared library.  e.g. NE_ADD_ABITAG(FOO)
381 +AC_DEFUN([NE_ADD_ABITAG], [
382 +if test "x${NE_LIBTOOL_RELEASE}y" = "xy"; then
383 +   NE_LIBTOOL_RELEASE="$1"
384 +else
385 +   NE_LIBTOOL_RELEASE="${NE_LIBTOOL_RELEASE}-$1"
386 +fi
387 +])
389 +dnl Define the minimum required versions, usage:
390 +dnl   NE_REQUIRE_VERSIONS([major-version], [minor-versions])
391 +dnl e.g.
392 +dnl   NE_REQUIRE_VERSIONS([0], [24 25])
393 +dnl to require neon 0.24.x or neon 0.25.x.
394 +AC_DEFUN([NE_REQUIRE_VERSIONS], [
395 +m4_define([ne_require_major], [$1])
396 +m4_define([ne_require_minor], [$2])
397 +])
399 +dnl Check that the external library found in a given location
400 +dnl matches the min. required version (if any).  Requires that
401 +dnl NEON_CONFIG be set the the full path of a valid neon-config
402 +dnl script
403 +dnl
404 +dnl Usage:
405 +dnl    NEON_CHECK_VERSION(ACTIONS-IF-OKAY, ACTIONS-IF-FAILURE)
406 +dnl
407 +AC_DEFUN([NEON_CHECK_VERSION], [
408 +m4_ifdef([ne_require_major], [
409 +    # Check whether the library is of required version
410 +    ne_save_LIBS="$LIBS"
411 +    ne_save_CFLAGS="$CFLAGS"
412 +    CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`"
413 +    LIBS="$LIBS `$NEON_CONFIG --libs`"
414 +    ne_libver=`$NEON_CONFIG --version | sed -e "s/neon //g"`
415 +    # Check whether it's possible to link against neon
416 +    AC_CACHE_CHECK([linking against neon], [ne_cv_lib_neon],
417 +    [AC_LINK_IFELSE(
418 +        [AC_LANG_PROGRAM([[#include <ne_utils.h>]], [[ne_version_match(0, 0);]])],
419 +       [ne_cv_lib_neon=yes], [ne_cv_lib_neon=no])])
420 +    if test "$ne_cv_lib_neon" = "yes"; then
421 +       ne_cv_lib_neonver=no
422 +       for v in ne_require_minor; do
423 +          case $ne_libver in
424 +          ne_require_major.$v.*) ne_cv_lib_neonver=yes ;;
425 +          esac
426 +       done
427 +    fi
428 +    ne_goodver=$ne_cv_lib_neonver
429 +    LIBS=$ne_save_LIBS
430 +    CFLAGS=$ne_save_CFLAGS
431 +], [
432 +   # NE_REQUIRE_VERSIONS not used; presume all versions OK!
433 +    ne_goodver=yes
434 +    ne_libver="(version unknown)"
435 +])
437 +if test "$ne_goodver" = "yes"; then
438 +    AC_MSG_NOTICE([using neon library $ne_libver])
439 +    $1
440 +else
441 +    AC_MSG_NOTICE([incompatible neon library version $ne_libver: wanted ne_require_major.ne_require_minor])
442 +    $2
443 +fi])
445 +dnl NEON_CHECK_SUPPORT(feature, var, name)
446 +AC_DEFUN([NEON_CHECK_SUPPORT], [
447 +if $NEON_CONFIG --support $1 >/dev/null; then
448 +   NE_ENABLE_SUPPORT($2, [$3 is supported by neon])
449 +else
450 +   NE_DISABLE_SUPPORT($2, [$3 is not supported by neon])
451 +fi
452 +])
454 +dnl enable support for feature $1 with define NE_HAVE_$1, message $2
455 +AC_DEFUN([NE_ENABLE_SUPPORT], [
456 +NE_FLAG_$1=yes
457 +AC_SUBST(NE_FLAG_$1)
458 +AC_DEFINE([NE_HAVE_]$1, 1, [Defined if $1 is supported])
459 +m4_if([$2], [], 
460 + [ne_$1_message="support enabled"
461 +  AC_MSG_NOTICE([$1 support is enabled])],
462 + [ne_$1_message="$2"
463 +  AC_MSG_NOTICE([$2])])
464 +])
466 +dnl Disable support for feature $1, giving message $2
467 +AC_DEFUN([NE_DISABLE_SUPPORT], [
468 +NE_FLAG_$1=no
469 +AC_SUBST(NE_FLAG_$1)
470 +m4_if([$2], [],
471 + [ne_$1_message="not supported"
472 +  AC_MSG_NOTICE([$1 support is not enabled])],
473 + [ne_$1_message="$2"
474 +  AC_MSG_NOTICE([$2])])
475 +])
477 +AC_DEFUN([NEON_USE_EXTERNAL], [
478 +# Configure to use an external neon, given a neon-config script
479 +# found at $NEON_CONFIG.
480 +neon_prefix=`$NEON_CONFIG --prefix`
481 +NEON_CHECK_VERSION([
482 +    # Pick up CFLAGS and LIBS needed
483 +    CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`"
484 +    NEON_LIBS="$NEON_LIBS `$NEON_CONFIG --libs`"
485 +    # Pick up library version
486 +    set dummy `$NEON_CONFIG --version | sed 's/\./ /g'`
487 +    NE_VERSION_MAJOR=[$]3; NE_VERSION_MINOR=[$]4; NE_VERSION_PATCH=[$]5
488 +    NE_DEFINE_VERSIONS
489 +    neon_library_message="library in ${neon_prefix} (${NEON_VERSION})"
490 +    neon_xml_parser_message="using whatever neon uses"
491 +    NEON_CHECK_SUPPORT([ssl], [SSL], [SSL])
492 +    NEON_CHECK_SUPPORT([zlib], [ZLIB], [zlib])
493 +    NEON_CHECK_SUPPORT([ipv6], [IPV6], [IPv6])
494 +    NEON_CHECK_SUPPORT([lfs], [LFS], [LFS])
495 +    NEON_CHECK_SUPPORT([ts_ssl], [TS_SSL], [thread-safe SSL])
496 +    neon_got_library=yes
497 +    if test $NE_FLAG_LFS = yes; then
498 +       NEON_FORMAT(off64_t)
499 +       AC_DEFINE_UNQUOTED([NE_FMT_NE_OFF_T], [NE_FMT_OFF64_T], 
500 +            [Define to be printf format string for ne_off_t])
501 +    else
502 +       AC_DEFINE_UNQUOTED([NE_FMT_NE_OFF_T], [NE_FMT_OFF_T])
503 +    fi
504 +], [neon_got_library=no])
505 +])
507 +AC_DEFUN([NEON_COMMON],[
509 +AC_REQUIRE([NEON_COMMON_CHECKS])
511 +AC_ARG_WITH(neon,
512 +[  --with-neon[[=DIR]]       specify location of neon library],
513 +[case $withval in
514 +yes|no) neon_force_external=$withval; neon_ext_path= ;;
515 +*) neon_force_external=yes; neon_ext_path=$withval ;;
516 +esac;], [
517 +neon_force_external=no
518 +neon_ext_path=
519 +])
521 +if test "$neon_force_included" = "no"; then
522 +    # There is no included neon source directory, or --with-included-neon
523 +    # wasn't given (so we're not forced to use it).
525 +    # Default to no external neon.
526 +    neon_got_library=no
527 +    if test "x$neon_ext_path" = "x"; then
528 +       AC_PATH_PROG([NEON_CONFIG], neon-config, none)
529 +       if test "x${NEON_CONFIG}" = "xnone"; then
530 +           AC_MSG_NOTICE([no external neon library found])
531 +       elif test -x "${NEON_CONFIG}"; then
532 +           NEON_USE_EXTERNAL
533 +       else
534 +           AC_MSG_NOTICE([ignoring non-executable ${NEON_CONFIG}])
535 +       fi
536 +    else
537 +       AC_MSG_CHECKING([for neon library in $neon_ext_path])
538 +       NEON_CONFIG="$neon_ext_path/bin/neon-config"
539 +       if test -x ${NEON_CONFIG}; then
540 +           AC_MSG_RESULT([found])
541 +           NEON_USE_EXTERNAL
542 +       else
543 +           AC_MSG_RESULT([not found])
544 +           # ...will fail since force_external=yes
545 +       fi
546 +    fi
548 +    if test "$neon_got_library" = "no"; then 
549 +       if test $neon_force_external = yes; then
550 +           AC_MSG_ERROR([could not use external neon library])
551 +       elif test -n "$neon_bundled_srcdir"; then
552 +           # Couldn't find external neon, forced to use bundled sources
553 +           neon_force_included="yes"
554 +       else
555 +           # Couldn't find neon, and don't have bundled sources
556 +           AC_MSG_ERROR(could not find neon)
557 +       fi
558 +    fi
559 +fi
561 +if test "$neon_force_included" = "yes"; then
562 +    NE_VERSIONS_BUNDLED
563 +    AC_MSG_NOTICE([using bundled neon ($NEON_VERSION)])
564 +    NEON_BUILD_BUNDLED="yes"
565 +    LIBNEON_SOURCE_CHECKS
566 +    CFLAGS="$CFLAGS -I$neon_bundled_srcdir"
567 +    NEON_LIBS="-L$neon_bundled_builddir -lneon $NEON_LIBS"
568 +    NEON_NEED_XML_PARSER=yes
569 +    neon_library_message="included libneon (${NEON_VERSION})"
570 +else
571 +    # Don't need to configure an XML parser
572 +    NEON_NEED_XML_PARSER=no
573 +    NEON_BUILD_BUNDLED=no
574 +fi
576 +AC_SUBST(NEON_BUILD_BUNDLED)
578 +])
580 +dnl AC_SEARCH_LIBS done differently. Usage:
581 +dnl   NE_SEARCH_LIBS(function, libnames, [extralibs], [actions-if-not-found],
582 +dnl                            [actions-if-found])
583 +dnl Tries to find 'function' by linking againt `-lLIB $NEON_LIBS' for each
584 +dnl LIB in libnames.  If link fails and 'extralibs' is given, will also
585 +dnl try linking against `-lLIB extralibs $NEON_LIBS`.
586 +dnl Once link succeeds, `-lLIB [extralibs]` is prepended to $NEON_LIBS, and
587 +dnl `actions-if-found' are executed, if given.
588 +dnl If link never succeeds, run `actions-if-not-found', if given, else
589 +dnl give an error and fail configure.
590 +AC_DEFUN([NE_SEARCH_LIBS], [
592 +AC_REQUIRE([NE_CHECK_OS])
594 +AC_CACHE_CHECK([for library containing $1], [ne_cv_libsfor_$1], [
595 +AC_LINK_IFELSE(
596 +  [AC_LANG_PROGRAM([], [[$1();]])], 
597 +  [ne_cv_libsfor_$1="none needed"], [
598 +ne_sl_save_LIBS=$LIBS
599 +ne_cv_libsfor_$1="not found"
600 +for lib in $2; do
601 +    # The w32api libraries link using the stdcall calling convention.
602 +    case ${lib}-${ne_cv_os_uname} in
603 +    ws2_32-MINGW*) ne__code="__stdcall $1();" ;;
604 +    *) ne__code="$1();" ;;
605 +    esac
607 +    LIBS="$ne_sl_save_LIBS -l$lib $NEON_LIBS"
608 +    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [$ne__code])],
609 +                   [ne_cv_libsfor_$1="-l$lib"; break])
610 +    m4_if($3, [], [], dnl If $3 is specified, then...
611 +              [LIBS="$ne_sl_save_LIBS -l$lib $3 $NEON_LIBS"
612 +               AC_LINK_IFELSE([AC_LANG_PROGRAM([], [$ne__code])], 
613 +                              [ne_cv_libsfor_$1="-l$lib $3"; break])])
614 +done
615 +LIBS=$ne_sl_save_LIBS])])
617 +if test "$ne_cv_libsfor_$1" = "not found"; then
618 +   m4_if([$4], [], [AC_MSG_ERROR([could not find library containing $1])], [$4])
619 +elif test "$ne_cv_libsfor_$1" = "none needed"; then
620 +   m4_if([$5], [], [:], [$5])
621 +else
622 +   NEON_LIBS="$ne_cv_libsfor_$1 $NEON_LIBS"
623 +   $5
624 +fi])
626 +dnl Check for presence and suitability of zlib library
627 +AC_DEFUN([NEON_ZLIB], [
629 +AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib], [disable zlib support]),
630 +ne_use_zlib=$withval, ne_use_zlib=yes)
632 +if test "$ne_use_zlib" = "yes"; then
633 +    AC_CHECK_HEADER(zlib.h, [
634 +       AC_CHECK_LIB(z, inflate, [ 
635 +           NEON_LIBS="$NEON_LIBS -lz"
636 +            NE_ENABLE_SUPPORT(ZLIB, [zlib support enabled, using -lz])
637 +       ], [NE_DISABLE_SUPPORT(ZLIB, [zlib library not found])])
638 +    ], [NE_DISABLE_SUPPORT(ZLIB, [zlib header not found])])
639 +else
640 +    NE_DISABLE_SUPPORT(ZLIB, [zlib not enabled])
641 +fi
642 +])
644 +AC_DEFUN([NE_CHECK_OS], [
645 +# Check for Darwin, which needs extra cpp and linker flags.
646 +AC_CACHE_CHECK([for uname], ne_cv_os_uname, [
647 + ne_cv_os_uname=`uname -s 2>/dev/null`
648 +])
650 +if test "$ne_cv_os_uname" = "Darwin"; then
651 +  CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
652 +  LDFLAGS="$LDFLAGS -flat_namespace" 
653 +  # poll has various issues in various Darwin releases
654 +  if test x${ac_cv_func_poll+set} != xset; then
655 +    ac_cv_func_poll=no
656 +  fi
657 +fi
658 +])
660 +AC_DEFUN([NEON_COMMON_CHECKS], [
662 +# These checks are done whether or not the bundled neon build
663 +# is used.
665 +ifdef([AC_USE_SYSTEM_EXTENSIONS], 
666 +[AC_USE_SYSTEM_EXTENSIONS],
667 +[AC_ISC_POSIX])
668 +AC_REQUIRE([AC_PROG_CC])
669 +AC_REQUIRE([AC_C_INLINE])
670 +AC_REQUIRE([AC_C_CONST])
671 +AC_REQUIRE([AC_TYPE_SIZE_T])
672 +AC_REQUIRE([AC_TYPE_OFF_T])
674 +AC_REQUIRE([NE_CHECK_OS])
676 +AC_REQUIRE([AC_PROG_MAKE_SET])
678 +AC_REQUIRE([AC_HEADER_STDC])
680 +AC_CHECK_HEADERS([errno.h stdarg.h string.h stdlib.h])
682 +NEON_FORMAT(size_t,,u) dnl size_t is unsigned; use %u formats
683 +NEON_FORMAT(off_t)
684 +NEON_FORMAT(ssize_t)
686 +])
688 +AC_DEFUN([NEON_FORMAT_PREP], [
689 +AC_CHECK_SIZEOF(int)
690 +AC_CHECK_SIZEOF(long)
691 +AC_CHECK_SIZEOF(long long)
692 +if test "$GCC" = "yes"; then
693 +  AC_CACHE_CHECK([for gcc -Wformat -Werror sanity], ne_cv_cc_werror, [
694 +  # See whether a simple test program will compile without errors.
695 +  ne_save_CPPFLAGS=$CPPFLAGS
696 +  CPPFLAGS="$CPPFLAGS -Wformat -Werror"
697 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
698 +#include <stdio.h>]], [[int i = 42; printf("%d", i);]])],
699 +  [ne_cv_cc_werror=yes], [ne_cv_cc_werror=no])
700 +  CPPFLAGS=$ne_save_CPPFLAGS])
701 +  ne_fmt_trycompile=$ne_cv_cc_werror
702 +else
703 +  ne_fmt_trycompile=no
704 +fi
705 +])
707 +dnl Check for LFS support
708 +AC_DEFUN([NE_LARGEFILE], [
709 +dnl Need the size of off_t
710 +AC_REQUIRE([NEON_COMMON_CHECKS])
712 +if test -z "$ac_cv_sizeof_off_t"; then
713 +   NE_DISABLE_SUPPORT(LFS, [LFS support omitted: off_t size unknown!])
714 +elif test $ac_cv_sizeof_off_t != 4; then
715 +   NE_DISABLE_SUPPORT(LFS, [LFS support unnecessary, off_t is not 32-bit])
716 +   AC_CHECK_FUNCS([strtoll strtoq], [break])
717 +elif test -z "$ac_cv_sizeof_long_long"; then
718 +   NE_DISABLE_SUPPORT(LFS, [LFS support omitted: long long size unknown])
719 +elif test $ac_cv_sizeof_long_long != 8; then
720 +   NE_DISABLE_SUPPORT(LFS, [LFS support omitted: long long not 64-bit])
721 +else
722 +   ne_save_CPPFLAGS=$CPPFLAGS
723 +   CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
724 +   AC_CHECK_TYPE(off64_t, [
725 +     NEON_FORMAT(off64_t)
726 +     ne_lfsok=no
727 +     AC_CHECK_FUNCS([strtoll strtoq], [ne_lfsok=yes; break])
728 +     AC_CHECK_FUNCS([lseek64 fstat64], [], [ne_lfsok=no; break])
729 +     if test x$ne_lfsok = xyes; then
730 +       NE_ENABLE_SUPPORT(LFS, [LFS (large file) support enabled])
731 +       NEON_CFLAGS="$NEON_CFLAGS -D_LARGEFILE64_SOURCE -DNE_LFS"
732 +       ne_save_CPPFLAGS="$CPPFLAGS -DNE_LFS"
733 +     else
734 +       NE_DISABLE_SUPPORT(LFS, 
735 +         [LFS support omitted: 64-bit support functions not found])
736 +     fi], [NE_DISABLE_SUPPORT(LFS, [LFS support omitted: off64_t type not found])])
737 +   CPPFLAGS=$ne_save_CPPFLAGS
738 +fi
739 +if test "$NE_FLAG_LFS" = "yes"; then
740 +   AC_DEFINE_UNQUOTED([NE_FMT_NE_OFF_T], [NE_FMT_OFF64_T], 
741 +                      [Define to be printf format string for ne_off_t])
742 +else
743 +   AC_DEFINE_UNQUOTED([NE_FMT_NE_OFF_T], [NE_FMT_OFF_T])
744 +fi
745 +])
747 +dnl NEON_FORMAT(TYPE[, HEADERS[, [SPECIFIER]])
748 +dnl
749 +dnl This macro finds out which modifier is needed to create a
750 +dnl printf format string suitable for printing integer type TYPE (which
751 +dnl may be an int, long, or long long).
752 +dnl The default specifier is 'd', if SPECIFIER is not given.  
753 +dnl TYPE may be defined in HEADERS; sys/types.h is always used first.
754 +AC_DEFUN([NEON_FORMAT], [
756 +AC_REQUIRE([NEON_FORMAT_PREP])
758 +AC_CHECK_SIZEOF($1,, [AC_INCLUDES_DEFAULT
759 +$2])
761 +dnl Work out which specifier character to use
762 +m4_ifdef([ne_spec], [m4_undefine([ne_spec])])
763 +m4_if($#, 3, [m4_define(ne_spec,$3)], [m4_define(ne_spec,d)])
765 +m4_ifdef([ne_cvar], [m4_undefine([ne_cvar])])dnl
766 +m4_define([ne_cvar], m4_translit(ne_cv_fmt_[$1], [ ], [_]))dnl
768 +AC_CACHE_CHECK([how to print $1], [ne_cvar], [
769 +ne_cvar=none
770 +if test $ne_fmt_trycompile = yes; then
771 +  oflags="$CPPFLAGS"
772 +  # Consider format string mismatches as errors
773 +  CPPFLAGS="$CPPFLAGS -Wformat -Werror"
774 +  dnl obscured for m4 quoting: "for str in d ld lld; do"
775 +  for str in ne_spec l]ne_spec[ ll]ne_spec[; do
776 +    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
777 +$2
778 +#include <stdio.h>]], [[$1 i = 1; printf("%$str", i);]])],
779 +       [ne_cvar=$str; break])
780 +  done
781 +  CPPFLAGS=$oflags
782 +else
783 +  # Best guess. Don't have to be too precise since we probably won't
784 +  # get a warning message anyway.
785 +  case $ac_cv_sizeof_]m4_translit($1, [ ], [_])[ in
786 +  $ac_cv_sizeof_int) ne_cvar="ne_spec" ;;
787 +  $ac_cv_sizeof_long) ne_cvar="l]ne_spec[" ;;
788 +  $ac_cv_sizeof_long_long) ne_cvar="ll]ne_spec[" ;;
789 +  esac
790 +fi
791 +])
793 +if test "x$ne_cvar" = "xnone"; then
794 +  AC_MSG_ERROR([format string for $1 not found])
795 +fi
797 +AC_DEFINE_UNQUOTED([NE_FMT_]m4_translit($1, [a-z ], [A-Z_]), "$ne_cvar", 
798 +       [Define to be printf format string for $1])
799 +])
801 +dnl Wrapper for AC_CHECK_FUNCS; uses libraries from $NEON_LIBS.
802 +AC_DEFUN([NE_CHECK_FUNCS], [
803 +ne_cf_save_LIBS=$LIBS
804 +LIBS="$LIBS $NEON_LIBS"
805 +AC_CHECK_FUNCS($@)
806 +LIBS=$ne_cf_save_LIBS])
808 +dnl Checks needed when compiling the neon source.
809 +AC_DEFUN([LIBNEON_SOURCE_CHECKS], [
811 +dnl Run all the normal C language/compiler tests
812 +AC_REQUIRE([NEON_COMMON_CHECKS])
814 +dnl Needed for building the MD5 code.
815 +AC_REQUIRE([AC_C_BIGENDIAN])
816 +dnl Is strerror_r present; if so, which variant
817 +AC_REQUIRE([AC_FUNC_STRERROR_R])
819 +AC_CHECK_HEADERS([sys/time.h limits.h sys/select.h arpa/inet.h libintl.h \
820 +       signal.h sys/socket.h netinet/in.h netinet/tcp.h netdb.h sys/poll.h \
821 +       sys/limits.h fcntl.h iconv.h],,,
822 +[AC_INCLUDES_DEFAULT
823 +/* netinet/tcp.h requires netinet/in.h on some platforms. */
824 +#ifdef HAVE_NETINET_IN_H
825 +#include <netinet/in.h>
826 +#endif])
828 +AC_REQUIRE([NE_SNPRINTF])
830 +AC_CACHE_CHECK([for timezone global], ne_cv_cc_timezone, [
831 +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
832 +#include <time.h>]],
833 +[[time_t t = 0 - timezone; timezone = 1;]])],
834 +ne_cv_cc_timezone=yes, ne_cv_cc_timezone=no)])
836 +if test "$ne_cv_cc_timezone" = "yes"; then
837 +   AC_DEFINE([HAVE_TIMEZONE], 1, [Define if the timezone global is available])
838 +fi
840 +dnl Check for large file support
841 +NE_LARGEFILE
843 +AC_REPLACE_FUNCS(strcasecmp)
845 +AC_CHECK_FUNCS(signal setvbuf setsockopt stpcpy poll fcntl getsockopt)
847 +if test "x${ac_cv_func_poll}${ac_cv_header_sys_poll_h}y" = "xyesyesy"; then
848 +  AC_DEFINE([NE_USE_POLL], 1, [Define if poll() should be used])
849 +fi
851 +if test "$ac_cv_func_stpcpy" = "yes"; then
852 +  AC_CHECK_DECLS(stpcpy)
853 +fi
855 +# Modern AIXes with the "Linux-like" libc have an undeclared stpcpy
856 +AH_BOTTOM([#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy)
857 +char *stpcpy(char *, const char *);
858 +#endif])
860 +# Unixware 7 can only link gethostbyname with -lnsl -lsocket
861 +# Pick up -lsocket first, then the gethostbyname check will work.
862 +# Haiku requires -lnetwork for socket functions.
863 +NE_SEARCH_LIBS(socket, socket inet ws2_32 network)
865 +# Enable getaddrinfo support if it, gai_strerror and inet_ntop are
866 +# all available.
867 +NE_SEARCH_LIBS(getaddrinfo, nsl,,
868 +  [ne_enable_gai=no],
869 +  [# HP-UX boxes commonly get into a state where getaddrinfo is present
870 +   # but borked: http://marc.theaimsgroup.com/?l=apr-dev&m=107730955207120&w=2
871 +   case x`uname -sr 2>/dev/null`y in
872 +   xHP-UX*11.[[01]]*y)
873 +      AC_MSG_NOTICE([getaddrinfo support disabled on HP-UX 11.0x/11.1x]) ;;
874 +   *)
875 +     ne_enable_gai=yes
876 +     NE_CHECK_FUNCS(gai_strerror getnameinfo inet_ntop inet_pton,,
877 +                    [ne_enable_gai=no; break]) ;;
878 +   esac
879 +])
881 +if test $ne_enable_gai = yes; then
882 +   NE_ENABLE_SUPPORT(IPV6, [IPv6 support is enabled])
883 +   AC_DEFINE(USE_GETADDRINFO, 1, [Define if getaddrinfo() should be used])
884 +   AC_CACHE_CHECK([for working AI_ADDRCONFIG], [ne_cv_gai_addrconfig], [
885 +   AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
886 +[struct addrinfo hints = {0}, *result;
887 +hints.ai_flags = AI_ADDRCONFIG;
888 +if (getaddrinfo("localhost", NULL, &hints, &result) != 0) return 1;])],
889 +   ne_cv_gai_addrconfig=yes, ne_cv_gai_addrconfig=no, ne_cv_gai_addrconfig=no)])
890 +   if test $ne_cv_gai_addrconfig = yes; then
891 +      AC_DEFINE(USE_GAI_ADDRCONFIG, 1, [Define if getaddrinfo supports AI_ADDRCONFIG])
892 +   fi
893 +else
894 +   # Checks for non-getaddrinfo() based resolver interfaces.
895 +   # QNX has gethostbyname in -lsocket. BeOS only has it in -lbind.
896 +   # CygWin/Winsock2 has it in -lws2_32, allegedly.
897 +   # Haiku requires -lnetwork for socket functions.
898 +   NE_SEARCH_LIBS(gethostbyname, socket nsl bind ws2_32 network)
899 +   NE_SEARCH_LIBS(hstrerror, resolv,,[:])
900 +   NE_CHECK_FUNCS(hstrerror)
901 +   # Older Unixes don't declare h_errno.
902 +   AC_CHECK_DECLS(h_errno,,,[#include <netdb.h>])
903 +   AC_CHECK_TYPE(in_addr_t,,[
904 +     AC_DEFINE([in_addr_t], [unsigned int], 
905 +                            [Define if in_addr_t is not available])], [
906 +#ifdef HAVE_SYS_TYPES_H
907 +# include <sys/types.h>
908 +#endif
909 +#ifdef HAVE_NETINET_IN_H
910 +# include <netinet/in.h>
911 +#endif
912 +])
913 +fi
915 +AC_CHECK_TYPES(socklen_t,,
916 +# Linux accept(2) says this should be size_t for SunOS 5... gah.
917 +[AC_DEFINE([socklen_t], [int], 
918 +                        [Define if socklen_t is not available])],[
919 +#ifdef HAVE_SYS_TYPES_H
920 +# include <sys/types.h>
921 +#endif
922 +#ifdef HAVE_SYS_SOCKET_H
923 +# include <sys/socket.h>
924 +#endif
925 +])
927 +AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,,
928 +  [#include <time.h>])
930 +if test ${ac_cv_member_struct_tm_tm_gmtoff}${ac_cv_member_struct_tm___tm_gmtoff}${ne_cv_cc_timezone} = nonono; then
931 +  AC_MSG_WARN([no timezone handling in date parsing on this platform])
932 +fi
934 +ifdef([neon_no_zlib], 
935 +  [NE_DISABLE_SUPPORT(ZLIB, [zlib not supported])],
936 +  [NEON_ZLIB()])
938 +# Conditionally enable ACL support
939 +AC_MSG_CHECKING([whether to enable ACL support in neon])
940 +if test "x$neon_no_acl" = "xyes"; then
941 +    AC_MSG_RESULT(no)
942 +else
943 +    AC_MSG_RESULT(yes)
944 +    NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_oldacl ne_acl3744"
945 +fi
947 +NEON_SSL()
948 +NEON_GSSAPI()
949 +NEON_LIBPROXY()
951 +AC_SUBST(NEON_CFLAGS)
952 +AC_SUBST(NEON_LIBS)
953 +AC_SUBST(NEON_LTLIBS)
955 +])
957 +dnl Call to put lib/snprintf.o in LIBOBJS and define HAVE_SNPRINTF_H
958 +dnl if snprintf isn't in libc.
960 +AC_DEFUN([NEON_REPLACE_SNPRINTF], [
961 +# Check for snprintf
962 +AC_CHECK_FUNC(snprintf,,[
963 +       AC_DEFINE(HAVE_SNPRINTF_H, 1, [Define if need to include snprintf.h])
964 +       AC_LIBOBJ(lib/snprintf)])
965 +])
967 +dnl turn off webdav, boo hoo.
968 +AC_DEFUN([NEON_WITHOUT_WEBDAV], [
969 +neon_no_webdav=yes
970 +neon_no_acl=yes
971 +NEON_NEED_XML_PARSER=no
972 +neon_xml_parser_message="none needed"
973 +])
975 +dnl Turn off zlib support
976 +AC_DEFUN([NEON_WITHOUT_ZLIB], [
977 +define(neon_no_zlib, yes)
978 +])
980 +AC_DEFUN([NEON_WITHOUT_ACL], [
981 +# Turn off ACL support
982 +neon_no_acl=yes
983 +])
985 +dnl Common macro to NEON_LIBTOOL_BUILD and NEON_NORMAL_BUILD
986 +dnl Sets NEONOBJS appropriately if it has not already been set.
987 +dnl 
988 +dnl NOT FOR EXTERNAL USE: use LIBTOOL_BUILD or NORMAL_BUILD.
989 +dnl
991 +AC_DEFUN([NEON_COMMON_BUILD], [
993 +# Using the default set of object files to build.
994 +# Add the extension to EXTRAOBJS
995 +ne="$NEON_EXTRAOBJS"
996 +NEON_EXTRAOBJS=
997 +for o in $ne; do
998 +       NEON_EXTRAOBJS="$NEON_EXTRAOBJS $o.$NEON_OBJEXT"
999 +done
1001 +# Was DAV support explicitly turned off?
1002 +if test "x$neon_no_webdav" = "xyes"; then
1003 +  # No WebDAV support
1004 +  NEONOBJS="$NEONOBJS \$(NEON_BASEOBJS)"
1005 +  NE_DISABLE_SUPPORT(DAV, [WebDAV support is not enabled])
1006 +  NE_ADD_ABITAG(NODAV)
1007 +else
1008 +  # WebDAV support
1009 +  NEONOBJS="$NEONOBJS \$(NEON_DAVOBJS)"
1010 +  NE_ENABLE_SUPPORT(DAV, [WebDAV support is enabled])
1011 +fi
1013 +AC_SUBST(NEON_TARGET)
1014 +AC_SUBST(NEON_OBJEXT)
1015 +AC_SUBST(NEONOBJS)
1016 +AC_SUBST(NEON_EXTRAOBJS)
1017 +AC_SUBST(NEON_LINK_FLAGS)
1019 +])
1021 +# The libtoolized build case:
1022 +AC_DEFUN([NEON_LIBTOOL_BUILD], [
1024 +NEON_TARGET=libneon.la
1025 +NEON_OBJEXT=lo
1027 +NEON_COMMON_BUILD($#, $*)
1029 +])
1031 +dnl Find 'ar' and 'ranlib', fail if ar isn't found.
1032 +AC_DEFUN([NE_FIND_AR], [
1034 +# Search in /usr/ccs/bin for Solaris
1035 +ne_PATH=$PATH:/usr/ccs/bin
1036 +AC_PATH_TOOL(AR, ar, notfound, $ne_PATH)
1037 +if test "x$AR" = "xnotfound"; then
1038 +   AC_MSG_ERROR([could not find ar tool])
1039 +fi
1040 +AC_PATH_TOOL(RANLIB, ranlib, :, $ne_PATH)
1042 +])
1044 +# The non-libtool build case:
1045 +AC_DEFUN([NEON_NORMAL_BUILD], [
1047 +NEON_TARGET=libneon.a
1048 +NEON_OBJEXT=o
1050 +AC_REQUIRE([NE_FIND_AR])
1052 +NEON_COMMON_BUILD($#, $*)
1054 +])
1056 +AC_DEFUN([NE_SNPRINTF], [
1057 +AC_CHECK_FUNCS(snprintf vsnprintf,,[
1058 +   ne_save_LIBS=$LIBS
1059 +   LIBS="$LIBS -lm"    # Always need -lm
1060 +   AC_CHECK_LIB(trio, trio_vsnprintf,
1061 +   [AC_CHECK_HEADERS(trio.h,,
1062 +    AC_MSG_ERROR([trio installation problem? libtrio found but not trio.h]))
1063 +    AC_MSG_NOTICE(using trio printf replacement library)
1064 +    NEON_LIBS="$NEON_LIBS -ltrio -lm"
1065 +    AC_DEFINE(HAVE_TRIO, 1, [Use trio printf replacement library])],
1066 +   [AC_MSG_NOTICE([no vsnprintf/snprintf detected in C library])
1067 +    AC_MSG_ERROR([Install the trio library from http://daniel.haxx.se/projects/trio/])])
1068 +   LIBS=$ne_save_LIBS
1069 +   break
1070 +])])
1072 +dnl Usage: NE_CHECK_OPENSSLVER(variable, version-string, version-hex)
1073 +dnl Define 'variable' to 'yes' if OpenSSL version is >= version-hex
1074 +AC_DEFUN([NE_CHECK_OPENSSLVER], [
1075 +AC_CACHE_CHECK([OpenSSL version is >= $2], $1, [
1076 +AC_EGREP_CPP(good, [#include <openssl/opensslv.h>
1077 +#if OPENSSL_VERSION_NUMBER >= $3
1078 +good
1079 +#endif], [$1=yes], [$1=no])])])
1081 +dnl Less noisy replacement for PKG_CHECK_MODULES
1082 +AC_DEFUN([NE_PKG_CONFIG], [
1084 +m4_define([ne_cvar], m4_translit(ne_cv_pkg_[$2], [.-], [__]))dnl
1086 +AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1087 +if test "$PKG_CONFIG" = "no"; then
1088 +   : Not using pkg-config
1089 +   $4
1090 +else
1091 +   AC_CACHE_CHECK([for $2 pkg-config data], ne_cvar,
1092 +     [if $PKG_CONFIG $2; then
1093 +        ne_cvar=yes
1094 +      else
1095 +        ne_cvar=no
1096 +      fi])
1098 +   if test "$ne_cvar" = "yes"; then
1099 +      $1_CFLAGS=`$PKG_CONFIG --cflags $2`
1100 +      $1_LIBS=`$PKG_CONFIG --libs $2`
1101 +      : Using provided pkg-config data
1102 +      $3
1103 +   else
1104 +      : No pkg-config for $2 provided
1105 +      $4
1106 +   fi
1107 +fi
1109 +m4_undefine([ne_cvar])
1110 +])
1112 +dnl Check for an SSL library (GNU TLS or OpenSSL)
1113 +AC_DEFUN([NEON_SSL], [
1115 +AC_ARG_WITH(ssl,
1116 +            AS_HELP_STRING([--with-ssl=openssl|gnutls],
1117 +                           [enable SSL support (default OpenSSL)]))
1119 +AC_ARG_WITH(egd,
1120 +[[  --with-egd[=PATH]       enable EGD support [using EGD socket at PATH]]])
1122 +AC_ARG_WITH(pakchois,
1123 +            AS_HELP_STRING([--without-pakchois],
1124 +                           [disable support for PKCS#11 using pakchois]))
1126 +case $with_ssl in
1127 +/*)
1128 +   AC_MSG_NOTICE([to use SSL libraries in non-standard locations, try --with-ssl --with-libs=$with_ssl])
1129 +   AC_MSG_ERROR([--with-ssl does not take a path argument])
1130 +   ;;
1131 +yes|openssl)
1132 +   NE_PKG_CONFIG(NE_SSL, openssl,
1133 +    [AC_MSG_NOTICE(using SSL library configuration from pkg-config)
1134 +     CPPFLAGS="$CPPFLAGS ${NE_SSL_CFLAGS}"
1135 +     NEON_LIBS="$NEON_LIBS ${NE_SSL_LIBS}"],
1136 +    [# Either OpenSSL library may require -ldl if built with dynamic engine support
1137 +     NE_SEARCH_LIBS(RSA_new, crypto, -ldl)
1138 +     NE_SEARCH_LIBS(SSL_library_init, ssl, -ldl)])
1140 +   AC_CHECK_HEADERS(openssl/ssl.h openssl/opensslv.h,,
1141 +   [AC_MSG_ERROR([OpenSSL headers not found, cannot enable SSL support])])
1143 +   # Enable EGD support if using 0.9.7 or newer
1144 +   NE_CHECK_OPENSSLVER(ne_cv_lib_ssl097, 0.9.7, 0x00907000L)
1145 +   if test "$ne_cv_lib_ssl097" = "yes"; then
1146 +      AC_MSG_NOTICE([OpenSSL >= 0.9.7; EGD support not needed in neon])
1147 +      NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL (0.9.7 or later)])
1148 +      NE_CHECK_FUNCS(CRYPTO_set_idptr_callback SSL_SESSION_cmp)
1149 +   else
1150 +      # Fail if OpenSSL is older than 0.9.6
1151 +      NE_CHECK_OPENSSLVER(ne_cv_lib_ssl096, 0.9.6, 0x00906000L)
1152 +      if test "$ne_cv_lib_ssl096" != "yes"; then
1153 +         AC_MSG_ERROR([OpenSSL 0.9.6 or later is required])
1154 +      fi
1155 +      NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL (0.9.6 or later)])
1157 +      case "$with_egd" in
1158 +      yes|no) ne_cv_lib_sslegd=$with_egd ;;
1159 +      /*) ne_cv_lib_sslegd=yes
1160 +          AC_DEFINE_UNQUOTED([EGD_PATH], "$with_egd", 
1161 +                            [Define to specific EGD socket path]) ;;
1162 +      *) # Guess whether EGD support is needed
1163 +         AC_CACHE_CHECK([whether to enable EGD support], [ne_cv_lib_sslegd],
1164 +        [if test -r /dev/random || test -r /dev/urandom; then
1165 +           ne_cv_lib_sslegd=no
1166 +         else
1167 +           ne_cv_lib_sslegd=yes
1168 +         fi])
1169 +        ;;
1170 +      esac
1171 +      if test "$ne_cv_lib_sslegd" = "yes"; then
1172 +        AC_MSG_NOTICE([EGD support enabled for seeding OpenSSL PRNG])
1173 +        AC_DEFINE([ENABLE_EGD], 1, [Define if EGD should be supported])
1174 +      fi
1175 +   fi
1177 +   AC_DEFINE([HAVE_OPENSSL], 1, [Define if OpenSSL support is enabled])
1178 +   NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_openssl"
1180 +   AC_DEFINE([HAVE_NTLM], 1, [Define if NTLM is supported])
1181 +   ;;
1182 +gnutls)
1183 +   NE_PKG_CONFIG(NE_SSL, gnutls,
1184 +     [AC_MSG_NOTICE(using GnuTLS configuration from pkg-config)
1185 +      CPPFLAGS="$CPPFLAGS ${NE_SSL_CFLAGS}"
1186 +      NEON_LIBS="$NEON_LIBS ${NE_SSL_LIBS}"
1188 +      ne_gnutls_ver=`$PKG_CONFIG --modversion gnutls`
1189 +     ], [
1190 +      # Fall back on libgnutls-config script
1191 +      AC_PATH_PROG(GNUTLS_CONFIG, libgnutls-config, no)
1193 +      if test "$GNUTLS_CONFIG" = "no"; then
1194 +        AC_MSG_ERROR([could not find libgnutls-config in \$PATH])
1195 +      fi
1197 +      CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
1198 +      NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`"
1200 +      ne_gnutls_ver=`$GNUTLS_CONFIG --version`
1201 +     ])
1203 +   AC_CHECK_HEADER([gnutls/gnutls.h],,
1204 +      [AC_MSG_ERROR([could not find gnutls/gnutls.h in include path])])
1206 +   NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using GnuTLS $ne_gnutls_ver])
1207 +   NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_gnutls"
1208 +   AC_DEFINE([HAVE_GNUTLS], 1, [Define if GnuTLS support is enabled])
1210 +   # Check for functions in later releases
1211 +   NE_CHECK_FUNCS([gnutls_session_get_data2 gnutls_x509_dn_get_rdn_ava \
1212 +                  gnutls_sign_callback_set \
1213 +                  gnutls_certificate_get_x509_cas \
1214 +                  gnutls_certificate_verify_peers2])
1216 +   # fail if gnutls_certificate_verify_peers2 is not found
1217 +   if test x${ac_cv_func_gnutls_certificate_verify_peers2} != xyes; then
1218 +       AC_MSG_ERROR([GnuTLS version predates gnutls_certificate_verify_peers2, newer version required])
1219 +   fi
1220 +                  
1221 +   # Check for iconv support if using the new RDN access functions:
1222 +   if test ${ac_cv_func_gnutls_x509_dn_get_rdn_ava}X${ac_cv_header_iconv_h} = yesXyes; then
1223 +      AC_CHECK_FUNCS(iconv)
1224 +   fi
1225 +   ;;
1226 +*) # Default to off; only create crypto-enabled binaries if requested.
1227 +   NE_DISABLE_SUPPORT(SSL, [SSL support is not enabled])
1228 +   NE_DISABLE_SUPPORT(TS_SSL, [Thread-safe SSL support is not enabled])
1229 +   NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_stubssl"
1230 +   ;;
1231 +esac
1232 +AC_SUBST(NEON_SUPPORTS_SSL)
1234 +AC_ARG_WITH(ca-bundle, 
1235 +  AS_HELP_STRING(--with-ca-bundle, specify filename of an SSL CA root bundle),,
1236 +  with_ca_bundle=no)
1238 +case ${NE_FLAG_SSL}-${with_ca_bundle} in
1239 +*-no) ;;
1240 +yes-*)
1241 +   AC_DEFINE_UNQUOTED([NE_SSL_CA_BUNDLE], ["${with_ca_bundle}"],
1242 +                      [Define to be filename of an SSL CA root bundle])
1243 +   AC_MSG_NOTICE([Using ${with_ca_bundle} as default SSL CA bundle])
1244 +   ;;
1245 +esac
1247 +AC_ARG_ENABLE(threadsafe-ssl,
1248 +AS_HELP_STRING(--enable-threadsafe-ssl=posix, 
1249 +[enable SSL library thread-safety using POSIX threads: suitable
1250 +CC/CFLAGS/LIBS must be used to make the POSIX library interfaces
1251 +available]),,
1252 +enable_threadsafe_ssl=no)
1254 +case $enable_threadsafe_ssl in
1255 +posix|yes)
1256 +  ne_pthr_ok=yes
1257 +  AC_CHECK_FUNCS([pthread_mutex_init pthread_mutex_lock],,[ne_pthr_ok=no])
1258 +  if test "${ne_pthr_ok}" = "no"; then
1259 +     AC_MSG_ERROR([could not find POSIX mutex interfaces; (try CC="${CC} -pthread"?)])    
1260 +  fi
1261 +  NE_ENABLE_SUPPORT(TS_SSL, [Thread-safe SSL supported using POSIX threads])
1262 +  ;;
1263 +*)
1264 +  NE_DISABLE_SUPPORT(TS_SSL, [Thread-safe SSL not supported])
1265 +  ;;
1266 +esac
1268 +case ${with_pakchois}X${ac_cv_func_gnutls_sign_callback_set}Y${ne_cv_lib_ssl097} in
1269 +noX*Y*) ;;
1270 +*X*Yyes|*XyesY*)
1271 +    # PKCS#11... ho!
1272 +    NE_PKG_CONFIG(NE_PK11, pakchois,
1273 +      [AC_MSG_NOTICE([[using pakchois for PKCS#11 support]])
1274 +       AC_DEFINE(HAVE_PAKCHOIS, 1, [Define if pakchois library supported])
1275 +       CPPFLAGS="$CPPFLAGS ${NE_PK11_CFLAGS}"
1276 +       NEON_LIBS="${NEON_LIBS} ${NE_PK11_LIBS}"],
1277 +      [AC_MSG_NOTICE([[pakchois library not found; no PKCS#11 support]])])
1278 +   ;;
1279 +esac
1280 +]) dnl -- end defun NEON_SSL
1282 +dnl Check for Kerberos installation
1283 +AC_DEFUN([NEON_GSSAPI], [
1284 +AC_ARG_WITH(gssapi, AS_HELP_STRING(--without-gssapi, disable GSSAPI support))
1285 +if test "$with_gssapi" != "no"; then
1286 +  AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)
1287 +else
1288 +  KRB5_CONFIG=none
1289 +fi
1290 +if test "x$KRB5_CONFIG" != "xnone"; then
1291 +   ne_save_CPPFLAGS=$CPPFLAGS
1292 +   ne_save_LIBS=$NEON_LIBS
1293 +   NEON_LIBS="$NEON_LIBS `${KRB5_CONFIG} --libs gssapi`"
1294 +   CPPFLAGS="$CPPFLAGS `${KRB5_CONFIG} --cflags gssapi`"
1295 +   # MIT and Heimdal put gssapi.h in different places
1296 +   AC_CHECK_HEADERS(gssapi/gssapi.h gssapi.h, [
1297 +     NE_CHECK_FUNCS(gss_init_sec_context, [
1298 +      ne_save_CPPFLAGS=$CPPFLAGS
1299 +      ne_save_LIBS=$NEON_LIBS
1300 +      AC_MSG_NOTICE([GSSAPI authentication support enabled])
1301 +      AC_DEFINE(HAVE_GSSAPI, 1, [Define if GSSAPI support is enabled])
1302 +      AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
1303 +      # Older versions of MIT Kerberos lack GSS_C_NT_HOSTBASED_SERVICE
1304 +      AC_CHECK_DECL([GSS_C_NT_HOSTBASED_SERVICE],,
1305 +        [AC_DEFINE([GSS_C_NT_HOSTBASED_SERVICE], gss_nt_service_name, 
1306 +          [Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise])],
1307 +        [#ifdef HAVE_GSSAPI_GSSAPI_H
1308 +#include <gssapi/gssapi.h>
1309 +#else
1310 +#include <gssapi.h>
1311 +#endif])])
1312 +     break
1313 +   ])
1314 +   CPPFLAGS=$ne_save_CPPFLAGS
1315 +   NEON_LIBS=$ne_save_LIBS
1316 +fi])
1318 +AC_DEFUN([NEON_LIBPROXY], [
1319 +AC_ARG_WITH(libproxy, AS_HELP_STRING(--without-libproxy, disable libproxy support))
1320 +if test "x$with_libproxy" != "xno"; then
1321 +   NE_PKG_CONFIG(NE_PXY, libproxy-1.0,
1322 +     [AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is supported])
1323 +      CPPFLAGS="$CPPFLAGS $NE_PXY_CFLAGS"
1324 +      NEON_LIBS="$NEON_LIBS ${NE_PXY_LIBS}"
1325 +      NE_ENABLE_SUPPORT(LIBPXY, [libproxy support enabled])],
1326 +     [NE_DISABLE_SUPPORT(LIBPXY, [libproxy support not enabled])])
1327 +else
1328 +   NE_DISABLE_SUPPORT(LIBPXY, [libproxy support not enabled])
1329 +fi
1330 +])   
1332 +dnl Adds an --enable-warnings argument to configure to allow enabling
1333 +dnl compiler warnings
1334 +AC_DEFUN([NEON_WARNINGS],[
1336 +AC_REQUIRE([AC_PROG_CC]) dnl so that $GCC is set
1338 +AC_ARG_ENABLE(warnings,
1339 +AS_HELP_STRING(--enable-warnings, [enable compiler warnings]))
1341 +if test "$enable_warnings" = "yes"; then
1342 +   case $GCC:`uname` in
1343 +   yes:*)
1344 +      CFLAGS="$CFLAGS -Wall -Wmissing-declarations -Wshadow -Wreturn-type -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wformat-security"
1345 +      if test -z "$with_ssl" -o "$with_ssl" = "no"; then
1346 +        # OpenSSL headers fail strict prototypes checks
1347 +        CFLAGS="$CFLAGS -Wstrict-prototypes"
1348 +      fi
1349 +      ;;
1350 +   no:OSF1) CFLAGS="$CFLAGS -check -msg_disable returnchecks -msg_disable alignment -msg_disable overflow" ;;
1351 +   no:IRIX) CFLAGS="$CFLAGS -fullwarn" ;;
1352 +   no:UnixWare) CFLAGS="$CFLAGS -v" ;;
1353 +   *) AC_MSG_WARN([warning flags unknown for compiler on this platform]) ;;
1354 +   esac
1355 +fi
1356 +])
1358 +dnl Adds an --disable-debug argument to configure to allow disabling
1359 +dnl debugging messages.
1360 +dnl Usage:
1361 +dnl  NEON_WARNINGS([actions-if-debug-enabled], [actions-if-debug-disabled])
1362 +dnl
1363 +AC_DEFUN([NEON_DEBUG], [
1365 +AC_ARG_ENABLE(debug,
1366 +AS_HELP_STRING(--disable-debug,[disable runtime debugging messages]))
1368 +# default is to enable debugging
1369 +case $enable_debug in
1370 +no) AC_MSG_NOTICE([debugging is disabled])
1371 +$2 ;;
1372 +*) AC_MSG_NOTICE([debugging is enabled])
1373 +AC_DEFINE(NE_DEBUGGING, 1, [Define to enable debugging])
1374 +$1
1375 +;;
1376 +esac])
1378 +dnl Macro to optionally enable socks support
1379 +AC_DEFUN([NEON_SOCKS], [
1380 +])
1382 +AC_DEFUN([NEON_WITH_LIBS], [
1383 +AC_ARG_WITH([libs],
1384 +[[  --with-libs=DIR[:DIR2...] look for support libraries in DIR/{bin,lib,include}]],
1385 +[case $with_libs in
1386 +yes|no) AC_MSG_ERROR([--with-libs must be passed a directory argument]) ;;
1387 +*) ne_save_IFS=$IFS; IFS=:
1388 +   for dir in $with_libs; do
1389 +     ne_add_CPPFLAGS="$ne_add_CPPFLAGS -I${dir}/include"
1390 +     ne_add_LDFLAGS="$ne_add_LDFLAGS -L${dir}/lib"
1391 +     ne_add_PATH="${ne_add_PATH}${dir}/bin:"
1392 +     PKG_CONFIG_PATH=${PKG_CONFIG_PATH}${PKG_CONFIG_PATH+:}${dir}/lib/pkgconfig
1393 +   done
1394 +   IFS=$ne_save_IFS
1395 +   CPPFLAGS="${ne_add_CPPFLAGS} $CPPFLAGS"
1396 +   LDFLAGS="${ne_add_LDFLAGS} $LDFLAGS"
1397 +   PATH=${ne_add_PATH}$PATH 
1398 +   export PKG_CONFIG_PATH ;;
1399 +esac])])
1401 +AC_DEFUN([NEON_I18N], [
1403 +dnl Check for NLS iff libintl.h was detected.
1404 +AC_ARG_ENABLE(nls, 
1405 +  AS_HELP_STRING(--disable-nls, [disable internationalization support]),,
1406 +  [enable_nls=${ac_cv_header_libintl_h}])
1408 +if test x${enable_nls} = xyes; then
1409 +  # presume that dgettext() is available if bindtextdomain() is...
1410 +  # checking for dgettext() itself is awkward because gcc has a 
1411 +  # builtin of that function, which confuses AC_CHECK_FUNCS et al.
1412 +  NE_SEARCH_LIBS(bindtextdomain, intl,,[enable_nls=no])
1413 +  NE_CHECK_FUNCS(bind_textdomain_codeset)
1414 +fi
1416 +if test "$enable_nls" = "no"; then
1417 +  NE_DISABLE_SUPPORT(I18N, [Internationalization support not enabled])
1418 +else
1419 +  NE_ENABLE_SUPPORT(I18N, [Internationalization support enabled])
1420 +  eval localedir="${datadir}/locale"
1421 +  AC_DEFINE_UNQUOTED([LOCALEDIR], "$localedir", 
1422 +                     [Define to be location of localedir])
1423 +fi
1425 +])
1427  # nls.m4 serial 3 (gettext-0.15)
1428  dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1429  dnl This file is free software; the Free Software Foundation
1430 @@ -3534,11 +4934,3 @@
1431  esac
1432  ])
1433  
1434 -m4_include([m4/neon/neon-test.m4])
1435 -m4_include([m4/neon/neon-xml-parser.m4])
1436 -m4_include([m4/neon/neon.m4])
1437 -m4_include([m4/inttypes.m4])
1438 -m4_include([m4/longlong.m4])
1439 -m4_include([m4/prereq.m4])
1440 -m4_include([m4/readline.m4])
1441 -m4_include([m4/strftime.m4])
1442 diff a/configure b/configure
1443 --- a/configure
1444 +++ b/configure
1445 @@ -673,13 +673,13 @@
1446  NE_FLAG_ZLIB
1447  NE_FLAG_IPV6
1448  NE_FLAG_LFS
1449 -NE_FLAG_SOCKS
1450  NE_FLAG_TS_SSL
1451  LIBOBJS
1452  PKG_CONFIG
1453  GNUTLS_CONFIG
1454  NEON_SUPPORTS_SSL
1455  KRB5_CONFIG
1456 +NE_FLAG_LIBPXY
1457  NEON_CFLAGS
1458  NEON_LIBS
1459  NEON_LTLIBS
1460 @@ -1334,7 +1334,6 @@
1461    --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1462    --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1463    --disable-debugging     disable runtime debugging messages
1464 -  --disable-readline      disable readline support
1465    --disable-netrc         enable .netrc support
1466    --enable-threadsafe-ssl=posix
1467                            enable SSL library thread-safety using POSIX
1468 @@ -1358,8 +1357,8 @@
1469    --with-egd[=PATH]       enable EGD support [using EGD socket at PATH]
1470    --without-pakchois      disable support for PKCS#11 using pakchois
1471    --with-ca-bundle        specify filename of an SSL CA root bundle
1472 -  --with-socks            use SOCKSv5 library
1473    --without-gssapi        disable GSSAPI support
1474 +  --without-libproxy      disable libproxy support
1475    --with-libxml2          force use of libxml 2.x
1476    --with-expat            force use of expat
1477    --with-included-expat   use bundled expat sources
1478 @@ -4356,6 +4355,66 @@
1479  
1480  fi
1481  
1482 +CHECK_READLINE()
1484 +# Check whether --enable-netrc was given.
1485 +if test "${enable_netrc+set}" = set; then
1486 +  enableval=$enable_netrc;
1487 +else
1488 +  enable_netrc=yes
1489 +fi
1501 +# Turn off ACL support
1502 +neon_no_acl=yes
1508 +cat >>confdefs.h <<\_ACEOF
1509 +#define _GNU_SOURCE 1
1510 +_ACEOF
1514 +{ echo "$as_me:$LINENO: checking for AIX" >&5
1515 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
1516 +cat >conftest.$ac_ext <<_ACEOF
1517 +/* confdefs.h.  */
1518 +_ACEOF
1519 +cat confdefs.h >>conftest.$ac_ext
1520 +cat >>conftest.$ac_ext <<_ACEOF
1521 +/* end confdefs.h.  */
1522 +#ifdef _AIX
1523 +  yes
1524 +#endif
1526 +_ACEOF
1527 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1528 +  $EGREP "yes" >/dev/null 2>&1; then
1529 +  { echo "$as_me:$LINENO: result: yes" >&5
1530 +echo "${ECHO_T}yes" >&6; }
1531 +cat >>confdefs.h <<\_ACEOF
1532 +#define _ALL_SOURCE 1
1533 +_ACEOF
1535 +else
1536 +  { echo "$as_me:$LINENO: result: no" >&5
1537 +echo "${ECHO_T}no" >&6; }
1538 +fi
1539 +rm -f conftest*
1542  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
1543  
1544  
1545 @@ -4425,53 +4484,35 @@
1546  done
1547  
1548  
1551 -# Check whether --enable-readline was given.
1552 -if test "${enable_readline+set}" = set; then
1553 -  enableval=$enable_readline; use_readline=$enableval
1554 -else
1555 -  use_readline=yes
1556 -fi
1558 -if test "$use_readline" = "yes"; then
1559 -       { echo "$as_me:$LINENO: checking for tputs in -lcurses" >&5
1560 -echo $ECHO_N "checking for tputs in -lcurses... $ECHO_C" >&6; }
1561 -if test "${ac_cv_lib_curses_tputs+set}" = set; then
1562 +if test "${ac_cv_header_minix_config_h+set}" = set; then
1563 +  { echo "$as_me:$LINENO: checking for minix/config.h" >&5
1564 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
1565 +if test "${ac_cv_header_minix_config_h+set}" = set; then
1566    echo $ECHO_N "(cached) $ECHO_C" >&6
1567 +fi
1568 +{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
1569 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
1570  else
1571 -  ac_check_lib_save_LIBS=$LIBS
1572 -LIBS="-lcurses  $LIBS"
1573 +  # Is the header compilable?
1574 +{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
1575 +echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
1576  cat >conftest.$ac_ext <<_ACEOF
1577  /* confdefs.h.  */
1578  _ACEOF
1579  cat confdefs.h >>conftest.$ac_ext
1580  cat >>conftest.$ac_ext <<_ACEOF
1581  /* end confdefs.h.  */
1583 -/* Override any GCC internal prototype to avoid an error.
1584 -   Use char because int might match the return type of a GCC
1585 -   builtin and then its argument prototype would still apply.  */
1586 -#ifdef __cplusplus
1587 -extern "C"
1588 -#endif
1589 -char tputs ();
1590 -int
1591 -main ()
1592 -{
1593 -return tputs ();
1594 -  ;
1595 -  return 0;
1596 -}
1597 +$ac_includes_default
1598 +#include <minix/config.h>
1599  _ACEOF
1600 -rm -f conftest.$ac_objext conftest$ac_exeext
1601 -if { (ac_try="$ac_link"
1602 +rm -f conftest.$ac_objext
1603 +if { (ac_try="$ac_compile"
1604  case "(($ac_try" in
1605    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1606    *) ac_try_echo=$ac_try;;
1607  esac
1608  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1609 -  (eval "$ac_link") 2>conftest.er1
1610 +  (eval "$ac_compile") 2>conftest.er1
1611    ac_status=$?
1612    grep -v '^ *+' conftest.er1 >conftest.err
1613    rm -f conftest.er1
1614 @@ -4480,136 +4521,152 @@
1615    (exit $ac_status); } && {
1616          test -z "$ac_c_werror_flag" ||
1617          test ! -s conftest.err
1618 -       } && test -s conftest$ac_exeext &&
1619 -       $as_test_x conftest$ac_exeext; then
1620 -  ac_cv_lib_curses_tputs=yes
1621 +       } && test -s conftest.$ac_objext; then
1622 +  ac_header_compiler=yes
1623  else
1624    echo "$as_me: failed program was:" >&5
1625  sed 's/^/| /' conftest.$ac_ext >&5
1626  
1627 -       ac_cv_lib_curses_tputs=no
1628 +       ac_header_compiler=no
1629  fi
1630  
1631 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
1632 -      conftest$ac_exeext conftest.$ac_ext
1633 -LIBS=$ac_check_lib_save_LIBS
1634 -fi
1635 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tputs" >&5
1636 -echo "${ECHO_T}$ac_cv_lib_curses_tputs" >&6; }
1637 -if test $ac_cv_lib_curses_tputs = yes; then
1638 -  LIBS="$LIBS -lcurses"
1639 -else
1640 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1641 +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
1642 +echo "${ECHO_T}$ac_header_compiler" >&6; }
1643  
1644 -{ echo "$as_me:$LINENO: checking for tputs in -lncurses" >&5
1645 -echo $ECHO_N "checking for tputs in -lncurses... $ECHO_C" >&6; }
1646 -if test "${ac_cv_lib_ncurses_tputs+set}" = set; then
1647 -  echo $ECHO_N "(cached) $ECHO_C" >&6
1648 -else
1649 -  ac_check_lib_save_LIBS=$LIBS
1650 -LIBS="-lncurses  $LIBS"
1651 +# Is the header present?
1652 +{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
1653 +echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
1654  cat >conftest.$ac_ext <<_ACEOF
1655  /* confdefs.h.  */
1656  _ACEOF
1657  cat confdefs.h >>conftest.$ac_ext
1658  cat >>conftest.$ac_ext <<_ACEOF
1659  /* end confdefs.h.  */
1661 -/* Override any GCC internal prototype to avoid an error.
1662 -   Use char because int might match the return type of a GCC
1663 -   builtin and then its argument prototype would still apply.  */
1664 -#ifdef __cplusplus
1665 -extern "C"
1666 -#endif
1667 -char tputs ();
1668 -int
1669 -main ()
1670 -{
1671 -return tputs ();
1672 -  ;
1673 -  return 0;
1674 -}
1675 +#include <minix/config.h>
1676  _ACEOF
1677 -rm -f conftest.$ac_objext conftest$ac_exeext
1678 -if { (ac_try="$ac_link"
1679 +if { (ac_try="$ac_cpp conftest.$ac_ext"
1680  case "(($ac_try" in
1681    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682    *) ac_try_echo=$ac_try;;
1683  esac
1684  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1685 -  (eval "$ac_link") 2>conftest.er1
1686 +  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
1687    ac_status=$?
1688    grep -v '^ *+' conftest.er1 >conftest.err
1689    rm -f conftest.er1
1690    cat conftest.err >&5
1691    echo "$as_me:$LINENO: \$? = $ac_status" >&5
1692 -  (exit $ac_status); } && {
1693 -        test -z "$ac_c_werror_flag" ||
1694 +  (exit $ac_status); } >/dev/null && {
1695 +        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696          test ! -s conftest.err
1697 -       } && test -s conftest$ac_exeext &&
1698 -       $as_test_x conftest$ac_exeext; then
1699 -  ac_cv_lib_ncurses_tputs=yes
1700 +       }; then
1701 +  ac_header_preproc=yes
1702  else
1703    echo "$as_me: failed program was:" >&5
1704  sed 's/^/| /' conftest.$ac_ext >&5
1705  
1706 -       ac_cv_lib_ncurses_tputs=no
1707 +  ac_header_preproc=no
1708  fi
1709  
1710 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
1711 -      conftest$ac_exeext conftest.$ac_ext
1712 -LIBS=$ac_check_lib_save_LIBS
1713 +rm -f conftest.err conftest.$ac_ext
1714 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
1715 +echo "${ECHO_T}$ac_header_preproc" >&6; }
1717 +# So?  What about this header?
1718 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
1719 +  yes:no: )
1720 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
1721 +echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
1722 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
1723 +echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
1724 +    ac_header_preproc=yes
1725 +    ;;
1726 +  no:yes:* )
1727 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
1728 +echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
1729 +    { echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
1730 +echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
1731 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
1732 +echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
1733 +    { echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
1734 +echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
1735 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
1736 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
1737 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
1738 +echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
1739 +    ( cat <<\_ASBOX
1740 +## --------------------------------- ##
1741 +## Report this to cadaver@webdav.org ##
1742 +## --------------------------------- ##
1743 +_ASBOX
1744 +     ) | sed "s/^/$as_me: WARNING:     /" >&2
1745 +    ;;
1746 +esac
1747 +{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
1748 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
1749 +if test "${ac_cv_header_minix_config_h+set}" = set; then
1750 +  echo $ECHO_N "(cached) $ECHO_C" >&6
1751 +else
1752 +  ac_cv_header_minix_config_h=$ac_header_preproc
1753  fi
1754 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tputs" >&5
1755 -echo "${ECHO_T}$ac_cv_lib_ncurses_tputs" >&6; }
1756 -if test $ac_cv_lib_ncurses_tputs = yes; then
1757 -  cat >>confdefs.h <<_ACEOF
1758 -#define HAVE_LIBNCURSES 1
1759 +{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
1760 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
1762 +fi
1763 +if test $ac_cv_header_minix_config_h = yes; then
1764 +  MINIX=yes
1765 +else
1766 +  MINIX=
1767 +fi
1770 +if test "$MINIX" = yes; then
1772 +cat >>confdefs.h <<\_ACEOF
1773 +#define _POSIX_SOURCE 1
1774  _ACEOF
1775  
1776 -  LIBS="-lncurses $LIBS"
1777  
1778 -fi
1779 +cat >>confdefs.h <<\_ACEOF
1780 +#define _POSIX_1_SOURCE 2
1781 +_ACEOF
1782  
1783 -fi
1784  
1785 +cat >>confdefs.h <<\_ACEOF
1786 +#define _MINIX 1
1787 +_ACEOF
1789 +fi
1790  
1791 -{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
1792 -echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
1793 -if test "${ac_cv_lib_readline_readline+set}" = set; then
1794 +{ echo "$as_me:$LINENO: checking for inline" >&5
1795 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
1796 +if test "${ac_cv_c_inline+set}" = set; then
1797    echo $ECHO_N "(cached) $ECHO_C" >&6
1798  else
1799 -  ac_check_lib_save_LIBS=$LIBS
1800 -LIBS="-lreadline  $LIBS"
1801 -cat >conftest.$ac_ext <<_ACEOF
1802 +  ac_cv_c_inline=no
1803 +for ac_kw in inline __inline__ __inline; do
1804 +  cat >conftest.$ac_ext <<_ACEOF
1805  /* confdefs.h.  */
1806  _ACEOF
1807  cat confdefs.h >>conftest.$ac_ext
1808  cat >>conftest.$ac_ext <<_ACEOF
1809  /* end confdefs.h.  */
1811 -/* Override any GCC internal prototype to avoid an error.
1812 -   Use char because int might match the return type of a GCC
1813 -   builtin and then its argument prototype would still apply.  */
1814 -#ifdef __cplusplus
1815 -extern "C"
1816 +#ifndef __cplusplus
1817 +typedef int foo_t;
1818 +static $ac_kw foo_t static_foo () {return 0; }
1819 +$ac_kw foo_t foo () {return 0; }
1820  #endif
1821 -char readline ();
1822 -int
1823 -main ()
1824 -{
1825 -return readline ();
1826 -  ;
1827 -  return 0;
1828 -}
1830  _ACEOF
1831 -rm -f conftest.$ac_objext conftest$ac_exeext
1832 -if { (ac_try="$ac_link"
1833 +rm -f conftest.$ac_objext
1834 +if { (ac_try="$ac_compile"
1835  case "(($ac_try" in
1836    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837    *) ac_try_echo=$ac_try;;
1838  esac
1839  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1840 -  (eval "$ac_link") 2>conftest.er1
1841 +  (eval "$ac_compile") 2>conftest.er1
1842    ac_status=$?
1843    grep -v '^ *+' conftest.er1 >conftest.err
1844    rm -f conftest.er1
1845 @@ -4618,75 +4675,116 @@
1846    (exit $ac_status); } && {
1847          test -z "$ac_c_werror_flag" ||
1848          test ! -s conftest.err
1849 -       } && test -s conftest$ac_exeext &&
1850 -       $as_test_x conftest$ac_exeext; then
1851 -  ac_cv_lib_readline_readline=yes
1852 +       } && test -s conftest.$ac_objext; then
1853 +  ac_cv_c_inline=$ac_kw
1854  else
1855    echo "$as_me: failed program was:" >&5
1856  sed 's/^/| /' conftest.$ac_ext >&5
1857  
1858 -       ac_cv_lib_readline_readline=no
1859 -fi
1860  
1861 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
1862 -      conftest$ac_exeext conftest.$ac_ext
1863 -LIBS=$ac_check_lib_save_LIBS
1864  fi
1865 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
1866 -echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
1867 -if test $ac_cv_lib_readline_readline = yes; then
1868 -  cat >>confdefs.h <<_ACEOF
1869 -#define HAVE_LIBREADLINE 1
1870 -_ACEOF
1871  
1872 -  LIBS="-lreadline $LIBS"
1873 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1874 +  test "$ac_cv_c_inline" != no && break
1875 +done
1876  
1877  fi
1878 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
1879 +echo "${ECHO_T}$ac_cv_c_inline" >&6; }
1880  
1881  
1882 -       { echo "$as_me:$LINENO: checking for library containing add_history" >&5
1883 -echo $ECHO_N "checking for library containing add_history... $ECHO_C" >&6; }
1884 -if test "${ac_cv_search_add_history+set}" = set; then
1885 +case $ac_cv_c_inline in
1886 +  inline | yes) ;;
1887 +  *)
1888 +    case $ac_cv_c_inline in
1889 +      no) ac_val=;;
1890 +      *) ac_val=$ac_cv_c_inline;;
1891 +    esac
1892 +    cat >>confdefs.h <<_ACEOF
1893 +#ifndef __cplusplus
1894 +#define inline $ac_val
1895 +#endif
1896 +_ACEOF
1897 +    ;;
1898 +esac
1900 +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
1901 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
1902 +if test "${ac_cv_c_const+set}" = set; then
1903    echo $ECHO_N "(cached) $ECHO_C" >&6
1904  else
1905 -  ac_func_search_save_LIBS=$LIBS
1906 -cat >conftest.$ac_ext <<_ACEOF
1907 +  cat >conftest.$ac_ext <<_ACEOF
1908  /* confdefs.h.  */
1909  _ACEOF
1910  cat confdefs.h >>conftest.$ac_ext
1911  cat >>conftest.$ac_ext <<_ACEOF
1912  /* end confdefs.h.  */
1913  
1914 -/* Override any GCC internal prototype to avoid an error.
1915 -   Use char because int might match the return type of a GCC
1916 -   builtin and then its argument prototype would still apply.  */
1917 -#ifdef __cplusplus
1918 -extern "C"
1919 -#endif
1920 -char add_history ();
1921  int
1922  main ()
1923  {
1924 -return add_history ();
1925 +/* FIXME: Include the comments suggested by Paul. */
1926 +#ifndef __cplusplus
1927 +  /* Ultrix mips cc rejects this.  */
1928 +  typedef int charset[2];
1929 +  const charset cs;
1930 +  /* SunOS 4.1.1 cc rejects this.  */
1931 +  char const *const *pcpcc;
1932 +  char **ppc;
1933 +  /* NEC SVR4.0.2 mips cc rejects this.  */
1934 +  struct point {int x, y;};
1935 +  static struct point const zero = {0,0};
1936 +  /* AIX XL C 1.02.0.0 rejects this.
1937 +     It does not let you subtract one const X* pointer from another in
1938 +     an arm of an if-expression whose if-part is not a constant
1939 +     expression */
1940 +  const char *g = "string";
1941 +  pcpcc = &g + (g ? g-g : 0);
1942 +  /* HPUX 7.0 cc rejects these. */
1943 +  ++pcpcc;
1944 +  ppc = (char**) pcpcc;
1945 +  pcpcc = (char const *const *) ppc;
1946 +  { /* SCO 3.2v4 cc rejects this.  */
1947 +    char *t;
1948 +    char const *s = 0 ? (char *) 0 : (char const *) 0;
1950 +    *t++ = 0;
1951 +    if (s) return 0;
1952 +  }
1953 +  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1954 +    int x[] = {25, 17};
1955 +    const int *foo = &x[0];
1956 +    ++foo;
1957 +  }
1958 +  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1959 +    typedef const int *iptr;
1960 +    iptr p = 0;
1961 +    ++p;
1962 +  }
1963 +  { /* AIX XL C 1.02.0.0 rejects this saying
1964 +       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1965 +    struct s { int j; const int *ap[3]; };
1966 +    struct s *b; b->j = 5;
1967 +  }
1968 +  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1969 +    const int foo = 10;
1970 +    if (!foo) return 0;
1971 +  }
1972 +  return !cs[0] && !zero.x;
1973 +#endif
1975    ;
1976    return 0;
1977  }
1978  _ACEOF
1979 -for ac_lib in '' history; do
1980 -  if test -z "$ac_lib"; then
1981 -    ac_res="none required"
1982 -  else
1983 -    ac_res=-l$ac_lib
1984 -    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
1985 -  fi
1986 -  rm -f conftest.$ac_objext conftest$ac_exeext
1987 -if { (ac_try="$ac_link"
1988 +rm -f conftest.$ac_objext
1989 +if { (ac_try="$ac_compile"
1990  case "(($ac_try" in
1991    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1992    *) ac_try_echo=$ac_try;;
1993  esac
1994  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1995 -  (eval "$ac_link") 2>conftest.er1
1996 +  (eval "$ac_compile") 2>conftest.er1
1997    ac_status=$?
1998    grep -v '^ *+' conftest.er1 >conftest.err
1999    rm -f conftest.er1
2000 @@ -4695,72 +4793,50 @@
2001    (exit $ac_status); } && {
2002          test -z "$ac_c_werror_flag" ||
2003          test ! -s conftest.err
2004 -       } && test -s conftest$ac_exeext &&
2005 -       $as_test_x conftest$ac_exeext; then
2006 -  ac_cv_search_add_history=$ac_res
2007 +       } && test -s conftest.$ac_objext; then
2008 +  ac_cv_c_const=yes
2009  else
2010    echo "$as_me: failed program was:" >&5
2011  sed 's/^/| /' conftest.$ac_ext >&5
2012  
2014 +       ac_cv_c_const=no
2015  fi
2016  
2017 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2018 -      conftest$ac_exeext
2019 -  if test "${ac_cv_search_add_history+set}" = set; then
2020 -  break
2021 -fi
2022 -done
2023 -if test "${ac_cv_search_add_history+set}" = set; then
2024 -  :
2025 -else
2026 -  ac_cv_search_add_history=no
2027 -fi
2028 -rm conftest.$ac_ext
2029 -LIBS=$ac_func_search_save_LIBS
2030 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2031  fi
2032 -{ echo "$as_me:$LINENO: result: $ac_cv_search_add_history" >&5
2033 -echo "${ECHO_T}$ac_cv_search_add_history" >&6; }
2034 -ac_res=$ac_cv_search_add_history
2035 -if test "$ac_res" != no; then
2036 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
2037 +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2038 +echo "${ECHO_T}$ac_cv_c_const" >&6; }
2039 +if test $ac_cv_c_const = no; then
2040  
2041  cat >>confdefs.h <<\_ACEOF
2042 -#define HAVE_ADD_HISTORY 1
2043 +#define const
2044  _ACEOF
2045  
2047  fi
2048  
2054 -for ac_header in history.h readline/history.h readline.h readline/readline.h
2055 -do
2056 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2057 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2058 -  { echo "$as_me:$LINENO: checking for $ac_header" >&5
2059 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
2060 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2061 +{ echo "$as_me:$LINENO: checking for size_t" >&5
2062 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
2063 +if test "${ac_cv_type_size_t+set}" = set; then
2064    echo $ECHO_N "(cached) $ECHO_C" >&6
2065 -fi
2066 -ac_res=`eval echo '${'$as_ac_Header'}'`
2067 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
2068 -echo "${ECHO_T}$ac_res" >&6; }
2069  else
2070 -  # Is the header compilable?
2071 -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
2072 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2073 -cat >conftest.$ac_ext <<_ACEOF
2074 +  cat >conftest.$ac_ext <<_ACEOF
2075  /* confdefs.h.  */
2076  _ACEOF
2077  cat confdefs.h >>conftest.$ac_ext
2078  cat >>conftest.$ac_ext <<_ACEOF
2079  /* end confdefs.h.  */
2080  $ac_includes_default
2081 -#include <$ac_header>
2082 +typedef size_t ac__type_new_;
2083 +int
2084 +main ()
2085 +{
2086 +if ((ac__type_new_ *) 0)
2087 +  return 0;
2088 +if (sizeof (ac__type_new_))
2089 +  return 0;
2090 +  ;
2091 +  return 0;
2092 +}
2093  _ACEOF
2094  rm -f conftest.$ac_objext
2095  if { (ac_try="$ac_compile"
2096 @@ -4779,117 +4855,118 @@
2097          test -z "$ac_c_werror_flag" ||
2098          test ! -s conftest.err
2099         } && test -s conftest.$ac_objext; then
2100 -  ac_header_compiler=yes
2101 +  ac_cv_type_size_t=yes
2102  else
2103    echo "$as_me: failed program was:" >&5
2104  sed 's/^/| /' conftest.$ac_ext >&5
2105  
2106 -       ac_header_compiler=no
2107 +       ac_cv_type_size_t=no
2108  fi
2109  
2110  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2112 -echo "${ECHO_T}$ac_header_compiler" >&6; }
2113 +fi
2114 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
2115 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
2116 +if test $ac_cv_type_size_t = yes; then
2117 +  :
2118 +else
2119  
2120 -# Is the header present?
2121 -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
2122 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2123 -cat >conftest.$ac_ext <<_ACEOF
2124 +cat >>confdefs.h <<_ACEOF
2125 +#define size_t unsigned int
2126 +_ACEOF
2128 +fi
2130 +{ echo "$as_me:$LINENO: checking for off_t" >&5
2131 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
2132 +if test "${ac_cv_type_off_t+set}" = set; then
2133 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2134 +else
2135 +  cat >conftest.$ac_ext <<_ACEOF
2136  /* confdefs.h.  */
2137  _ACEOF
2138  cat confdefs.h >>conftest.$ac_ext
2139  cat >>conftest.$ac_ext <<_ACEOF
2140  /* end confdefs.h.  */
2141 -#include <$ac_header>
2142 +$ac_includes_default
2143 +typedef off_t ac__type_new_;
2144 +int
2145 +main ()
2146 +{
2147 +if ((ac__type_new_ *) 0)
2148 +  return 0;
2149 +if (sizeof (ac__type_new_))
2150 +  return 0;
2151 +  ;
2152 +  return 0;
2153 +}
2154  _ACEOF
2155 -if { (ac_try="$ac_cpp conftest.$ac_ext"
2156 +rm -f conftest.$ac_objext
2157 +if { (ac_try="$ac_compile"
2158  case "(($ac_try" in
2159    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2160    *) ac_try_echo=$ac_try;;
2161  esac
2162  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2163 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2164 +  (eval "$ac_compile") 2>conftest.er1
2165    ac_status=$?
2166    grep -v '^ *+' conftest.er1 >conftest.err
2167    rm -f conftest.er1
2168    cat conftest.err >&5
2169    echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 -  (exit $ac_status); } >/dev/null && {
2171 -        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2172 +  (exit $ac_status); } && {
2173 +        test -z "$ac_c_werror_flag" ||
2174          test ! -s conftest.err
2175 -       }; then
2176 -  ac_header_preproc=yes
2177 +       } && test -s conftest.$ac_objext; then
2178 +  ac_cv_type_off_t=yes
2179  else
2180    echo "$as_me: failed program was:" >&5
2181  sed 's/^/| /' conftest.$ac_ext >&5
2182  
2183 -  ac_header_preproc=no
2184 +       ac_cv_type_off_t=no
2185  fi
2186  
2187 -rm -f conftest.err conftest.$ac_ext
2188 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2189 -echo "${ECHO_T}$ac_header_preproc" >&6; }
2191 -# So?  What about this header?
2192 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
2193 -  yes:no: )
2194 -    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
2195 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
2196 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
2197 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
2198 -    ac_header_preproc=yes
2199 -    ;;
2200 -  no:yes:* )
2201 -    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
2202 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
2203 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
2204 -echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
2205 -    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
2206 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
2207 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
2208 -echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
2209 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
2210 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
2211 -    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
2212 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2213 -    ( cat <<\_ASBOX
2214 -## --------------------------------- ##
2215 -## Report this to cadaver@webdav.org ##
2216 -## --------------------------------- ##
2217 -_ASBOX
2218 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
2219 -    ;;
2220 -esac
2221 -{ echo "$as_me:$LINENO: checking for $ac_header" >&5
2222 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
2223 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2224 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2225 -else
2226 -  eval "$as_ac_Header=\$ac_header_preproc"
2227 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228  fi
2229 -ac_res=`eval echo '${'$as_ac_Header'}'`
2230 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
2231 -echo "${ECHO_T}$ac_res" >&6; }
2232 +{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
2233 +echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
2234 +if test $ac_cv_type_off_t = yes; then
2235 +  :
2236 +else
2237  
2238 -fi
2239 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
2240 -  cat >>confdefs.h <<_ACEOF
2241 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2242 +cat >>confdefs.h <<_ACEOF
2243 +#define off_t long int
2244  _ACEOF
2245  
2246  fi
2247  
2248 -done
2249  
2250 +# Check for Darwin, which needs extra cpp and linker flags.
2251 +{ echo "$as_me:$LINENO: checking for uname" >&5
2252 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; }
2253 +if test "${ne_cv_os_uname+set}" = set; then
2254 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2255 +else
2256  
2257 -       # Check for rl_completion_matches as in readline 4.2
2258 + ne_cv_os_uname=`uname -s 2>/dev/null`
2259  
2260 -for ac_func in rl_completion_matches
2261 -do
2262 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2263 -{ echo "$as_me:$LINENO: checking for $ac_func" >&5
2264 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
2265 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
2266 +fi
2267 +{ echo "$as_me:$LINENO: result: $ne_cv_os_uname" >&5
2268 +echo "${ECHO_T}$ne_cv_os_uname" >&6; }
2270 +if test "$ne_cv_os_uname" = "Darwin"; then
2271 +  CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
2272 +  LDFLAGS="$LDFLAGS -flat_namespace"
2273 +  # poll has various issues in various Darwin releases
2274 +  if test x${ac_cv_func_poll+set} != xset; then
2275 +    ac_cv_func_poll=no
2276 +  fi
2277 +fi
2280 +{ echo "$as_me:$LINENO: checking for int" >&5
2281 +echo $ECHO_N "checking for int... $ECHO_C" >&6; }
2282 +if test "${ac_cv_type_int+set}" = set; then
2283    echo $ECHO_N "(cached) $ECHO_C" >&6
2284  else
2285    cat >conftest.$ac_ext <<_ACEOF
2286 @@ -4898,53 +4975,27 @@
2287  cat confdefs.h >>conftest.$ac_ext
2288  cat >>conftest.$ac_ext <<_ACEOF
2289  /* end confdefs.h.  */
2290 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
2291 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2292 -#define $ac_func innocuous_$ac_func
2294 -/* System header to define __stub macros and hopefully few prototypes,
2295 -    which can conflict with char $ac_func (); below.
2296 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2297 -    <limits.h> exists even on freestanding compilers.  */
2299 -#ifdef __STDC__
2300 -# include <limits.h>
2301 -#else
2302 -# include <assert.h>
2303 -#endif
2305 -#undef $ac_func
2307 -/* Override any GCC internal prototype to avoid an error.
2308 -   Use char because int might match the return type of a GCC
2309 -   builtin and then its argument prototype would still apply.  */
2310 -#ifdef __cplusplus
2311 -extern "C"
2312 -#endif
2313 -char $ac_func ();
2314 -/* The GNU C library defines this for functions which it implements
2315 -    to always fail with ENOSYS.  Some functions are actually named
2316 -    something starting with __ and the normal name is an alias.  */
2317 -#if defined __stub_$ac_func || defined __stub___$ac_func
2318 -choke me
2319 -#endif
2321 +$ac_includes_default
2322 +typedef int ac__type_new_;
2323  int
2324  main ()
2325  {
2326 -return $ac_func ();
2327 +if ((ac__type_new_ *) 0)
2328 +  return 0;
2329 +if (sizeof (ac__type_new_))
2330 +  return 0;
2331    ;
2332    return 0;
2333  }
2334  _ACEOF
2335 -rm -f conftest.$ac_objext conftest$ac_exeext
2336 -if { (ac_try="$ac_link"
2337 +rm -f conftest.$ac_objext
2338 +if { (ac_try="$ac_compile"
2339  case "(($ac_try" in
2340    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341    *) ac_try_echo=$ac_try;;
2342  esac
2343  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2344 -  (eval "$ac_link") 2>conftest.er1
2345 +  (eval "$ac_compile") 2>conftest.er1
2346    ac_status=$?
2347    grep -v '^ *+' conftest.er1 >conftest.err
2348    rm -f conftest.er1
2349 @@ -4953,80 +5004,48 @@
2350    (exit $ac_status); } && {
2351          test -z "$ac_c_werror_flag" ||
2352          test ! -s conftest.err
2353 -       } && test -s conftest$ac_exeext &&
2354 -       $as_test_x conftest$ac_exeext; then
2355 -  eval "$as_ac_var=yes"
2356 +       } && test -s conftest.$ac_objext; then
2357 +  ac_cv_type_int=yes
2358  else
2359    echo "$as_me: failed program was:" >&5
2360  sed 's/^/| /' conftest.$ac_ext >&5
2361  
2362 -       eval "$as_ac_var=no"
2363 -fi
2365 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2366 -      conftest$ac_exeext conftest.$ac_ext
2367 -fi
2368 -ac_res=`eval echo '${'$as_ac_var'}'`
2369 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
2370 -echo "${ECHO_T}$ac_res" >&6; }
2371 -if test `eval echo '${'$as_ac_var'}'` = yes; then
2372 -  cat >>confdefs.h <<_ACEOF
2373 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
2374 -_ACEOF
2376 -fi
2377 -done
2380 -       msg_readline="enabled"
2381 -else
2382 -       msg_readline="disabled"
2383 +       ac_cv_type_int=no
2384  fi
2385  
2388 -# Check whether --enable-netrc was given.
2389 -if test "${enable_netrc+set}" = set; then
2390 -  enableval=$enable_netrc;
2391 -else
2392 -  enable_netrc=yes
2393 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394  fi
2395 +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
2396 +echo "${ECHO_T}$ac_cv_type_int" >&6; }
2397  
2408 -# Turn off ACL support
2409 -neon_no_acl=yes
2414 -{ echo "$as_me:$LINENO: checking for inline" >&5
2415 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
2416 -if test "${ac_cv_c_inline+set}" = set; then
2417 +# The cast to long int works around a bug in the HP C Compiler
2418 +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
2419 +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
2420 +# This bug is HP SR number 8606223364.
2421 +{ echo "$as_me:$LINENO: checking size of int" >&5
2422 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
2423 +if test "${ac_cv_sizeof_int+set}" = set; then
2424    echo $ECHO_N "(cached) $ECHO_C" >&6
2425  else
2426 -  ac_cv_c_inline=no
2427 -for ac_kw in inline __inline__ __inline; do
2428 -  cat >conftest.$ac_ext <<_ACEOF
2429 +  if test "$cross_compiling" = yes; then
2430 +  # Depending upon the size, compute the lo and hi bounds.
2431 +cat >conftest.$ac_ext <<_ACEOF
2432  /* confdefs.h.  */
2433  _ACEOF
2434  cat confdefs.h >>conftest.$ac_ext
2435  cat >>conftest.$ac_ext <<_ACEOF
2436  /* end confdefs.h.  */
2437 -#ifndef __cplusplus
2438 -typedef int foo_t;
2439 -static $ac_kw foo_t static_foo () {return 0; }
2440 -$ac_kw foo_t foo () {return 0; }
2441 -#endif
2442 +$ac_includes_default
2443 +   typedef int ac__type_sizeof_;
2444 +int
2445 +main ()
2446 +{
2447 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
2448 +test_array [0] = 0
2449  
2450 +  ;
2451 +  return 0;
2452 +}
2453  _ACEOF
2454  rm -f conftest.$ac_objext
2455  if { (ac_try="$ac_compile"
2456 @@ -5045,102 +5064,21 @@
2457          test -z "$ac_c_werror_flag" ||
2458          test ! -s conftest.err
2459         } && test -s conftest.$ac_objext; then
2460 -  ac_cv_c_inline=$ac_kw
2461 -else
2462 -  echo "$as_me: failed program was:" >&5
2463 -sed 's/^/| /' conftest.$ac_ext >&5
2466 -fi
2468 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2469 -  test "$ac_cv_c_inline" != no && break
2470 -done
2472 -fi
2473 -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2474 -echo "${ECHO_T}$ac_cv_c_inline" >&6; }
2477 -case $ac_cv_c_inline in
2478 -  inline | yes) ;;
2479 -  *)
2480 -    case $ac_cv_c_inline in
2481 -      no) ac_val=;;
2482 -      *) ac_val=$ac_cv_c_inline;;
2483 -    esac
2484 -    cat >>confdefs.h <<_ACEOF
2485 -#ifndef __cplusplus
2486 -#define inline $ac_val
2487 -#endif
2488 -_ACEOF
2489 -    ;;
2490 -esac
2492 -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2493 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
2494 -if test "${ac_cv_c_const+set}" = set; then
2495 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2496 -else
2497 -  cat >conftest.$ac_ext <<_ACEOF
2498 +  ac_lo=0 ac_mid=0
2499 +  while :; do
2500 +    cat >conftest.$ac_ext <<_ACEOF
2501  /* confdefs.h.  */
2502  _ACEOF
2503  cat confdefs.h >>conftest.$ac_ext
2504  cat >>conftest.$ac_ext <<_ACEOF
2505  /* end confdefs.h.  */
2507 +$ac_includes_default
2508 +   typedef int ac__type_sizeof_;
2509  int
2510  main ()
2511  {
2512 -/* FIXME: Include the comments suggested by Paul. */
2513 -#ifndef __cplusplus
2514 -  /* Ultrix mips cc rejects this.  */
2515 -  typedef int charset[2];
2516 -  const charset cs;
2517 -  /* SunOS 4.1.1 cc rejects this.  */
2518 -  char const *const *pcpcc;
2519 -  char **ppc;
2520 -  /* NEC SVR4.0.2 mips cc rejects this.  */
2521 -  struct point {int x, y;};
2522 -  static struct point const zero = {0,0};
2523 -  /* AIX XL C 1.02.0.0 rejects this.
2524 -     It does not let you subtract one const X* pointer from another in
2525 -     an arm of an if-expression whose if-part is not a constant
2526 -     expression */
2527 -  const char *g = "string";
2528 -  pcpcc = &g + (g ? g-g : 0);
2529 -  /* HPUX 7.0 cc rejects these. */
2530 -  ++pcpcc;
2531 -  ppc = (char**) pcpcc;
2532 -  pcpcc = (char const *const *) ppc;
2533 -  { /* SCO 3.2v4 cc rejects this.  */
2534 -    char *t;
2535 -    char const *s = 0 ? (char *) 0 : (char const *) 0;
2537 -    *t++ = 0;
2538 -    if (s) return 0;
2539 -  }
2540 -  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2541 -    int x[] = {25, 17};
2542 -    const int *foo = &x[0];
2543 -    ++foo;
2544 -  }
2545 -  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2546 -    typedef const int *iptr;
2547 -    iptr p = 0;
2548 -    ++p;
2549 -  }
2550 -  { /* AIX XL C 1.02.0.0 rejects this saying
2551 -       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2552 -    struct s { int j; const int *ap[3]; };
2553 -    struct s *b; b->j = 5;
2554 -  }
2555 -  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2556 -    const int foo = 10;
2557 -    if (!foo) return 0;
2558 -  }
2559 -  return !cs[0] && !zero.x;
2560 -#endif
2561 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
2562 +test_array [0] = 0
2563  
2564    ;
2565    return 0;
2566 @@ -5163,46 +5101,39 @@
2567          test -z "$ac_c_werror_flag" ||
2568          test ! -s conftest.err
2569         } && test -s conftest.$ac_objext; then
2570 -  ac_cv_c_const=yes
2571 +  ac_hi=$ac_mid; break
2572  else
2573    echo "$as_me: failed program was:" >&5
2574  sed 's/^/| /' conftest.$ac_ext >&5
2575  
2576 -       ac_cv_c_const=no
2577 +       ac_lo=`expr $ac_mid + 1`
2578 +                       if test $ac_lo -le $ac_mid; then
2579 +                         ac_lo= ac_hi=
2580 +                         break
2581 +                       fi
2582 +                       ac_mid=`expr 2 '*' $ac_mid + 1`
2583  fi
2584  
2585  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2586 -fi
2587 -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2588 -echo "${ECHO_T}$ac_cv_c_const" >&6; }
2589 -if test $ac_cv_c_const = no; then
2591 -cat >>confdefs.h <<\_ACEOF
2592 -#define const
2593 -_ACEOF
2595 -fi
2597 -{ echo "$as_me:$LINENO: checking for size_t" >&5
2598 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
2599 -if test "${ac_cv_type_size_t+set}" = set; then
2600 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2601 +  done
2602  else
2603 -  cat >conftest.$ac_ext <<_ACEOF
2604 +  echo "$as_me: failed program was:" >&5
2605 +sed 's/^/| /' conftest.$ac_ext >&5
2607 +       cat >conftest.$ac_ext <<_ACEOF
2608  /* confdefs.h.  */
2609  _ACEOF
2610  cat confdefs.h >>conftest.$ac_ext
2611  cat >>conftest.$ac_ext <<_ACEOF
2612  /* end confdefs.h.  */
2613  $ac_includes_default
2614 -typedef size_t ac__type_new_;
2615 +   typedef int ac__type_sizeof_;
2616  int
2617  main ()
2618  {
2619 -if ((ac__type_new_ *) 0)
2620 -  return 0;
2621 -if (sizeof (ac__type_new_))
2622 -  return 0;
2623 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
2624 +test_array [0] = 0
2626    ;
2627    return 0;
2628  }
2629 @@ -5224,48 +5155,22 @@
2630          test -z "$ac_c_werror_flag" ||
2631          test ! -s conftest.err
2632         } && test -s conftest.$ac_objext; then
2633 -  ac_cv_type_size_t=yes
2634 -else
2635 -  echo "$as_me: failed program was:" >&5
2636 -sed 's/^/| /' conftest.$ac_ext >&5
2638 -       ac_cv_type_size_t=no
2639 -fi
2641 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642 -fi
2643 -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
2644 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
2645 -if test $ac_cv_type_size_t = yes; then
2646 -  :
2647 -else
2649 -cat >>confdefs.h <<_ACEOF
2650 -#define size_t unsigned int
2651 -_ACEOF
2653 -fi
2655 -{ echo "$as_me:$LINENO: checking for off_t" >&5
2656 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
2657 -if test "${ac_cv_type_off_t+set}" = set; then
2658 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2659 -else
2660 -  cat >conftest.$ac_ext <<_ACEOF
2661 +  ac_hi=-1 ac_mid=-1
2662 +  while :; do
2663 +    cat >conftest.$ac_ext <<_ACEOF
2664  /* confdefs.h.  */
2665  _ACEOF
2666  cat confdefs.h >>conftest.$ac_ext
2667  cat >>conftest.$ac_ext <<_ACEOF
2668  /* end confdefs.h.  */
2669  $ac_includes_default
2670 -typedef off_t ac__type_new_;
2671 +   typedef int ac__type_sizeof_;
2672  int
2673  main ()
2674  {
2675 -if ((ac__type_new_ *) 0)
2676 -  return 0;
2677 -if (sizeof (ac__type_new_))
2678 -  return 0;
2679 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
2680 +test_array [0] = 0
2682    ;
2683    return 0;
2684  }
2685 @@ -5287,57 +5192,35 @@
2686          test -z "$ac_c_werror_flag" ||
2687          test ! -s conftest.err
2688         } && test -s conftest.$ac_objext; then
2689 -  ac_cv_type_off_t=yes
2690 +  ac_lo=$ac_mid; break
2691  else
2692    echo "$as_me: failed program was:" >&5
2693  sed 's/^/| /' conftest.$ac_ext >&5
2694  
2695 -       ac_cv_type_off_t=no
2696 +       ac_hi=`expr '(' $ac_mid ')' - 1`
2697 +                       if test $ac_mid -le $ac_hi; then
2698 +                         ac_lo= ac_hi=
2699 +                         break
2700 +                       fi
2701 +                       ac_mid=`expr 2 '*' $ac_mid`
2702  fi
2703  
2704  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2705 -fi
2706 -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
2707 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
2708 -if test $ac_cv_type_off_t = yes; then
2709 -  :
2710 -else
2712 -cat >>confdefs.h <<_ACEOF
2713 -#define off_t long int
2714 -_ACEOF
2716 -fi
2719 -# Check for Darwin, which needs extra cpp and linker flags.
2720 -{ echo "$as_me:$LINENO: checking for uname" >&5
2721 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; }
2722 -if test "${ne_cv_os_uname+set}" = set; then
2723 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2724 +  done
2725  else
2726 +  echo "$as_me: failed program was:" >&5
2727 +sed 's/^/| /' conftest.$ac_ext >&5
2728  
2729 - ne_cv_os_uname=`uname -s 2>/dev/null`
2731 +       ac_lo= ac_hi=
2732  fi
2733 -{ echo "$as_me:$LINENO: result: $ne_cv_os_uname" >&5
2734 -echo "${ECHO_T}$ne_cv_os_uname" >&6; }
2735  
2736 -if test "$ne_cv_os_uname" = "Darwin"; then
2737 -  CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
2738 -  LDFLAGS="$LDFLAGS -flat_namespace"
2739 -  # poll has various issues in various Darwin releases
2740 -  if test x${ac_cv_func_poll+set} != xset; then
2741 -    ac_cv_func_poll=no
2742 -  fi
2743 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2744  fi
2745  
2747 -{ echo "$as_me:$LINENO: checking for int" >&5
2748 -echo $ECHO_N "checking for int... $ECHO_C" >&6; }
2749 -if test "${ac_cv_type_int+set}" = set; then
2750 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2751 -else
2752 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2753 +# Binary search between lo and hi bounds.
2754 +while test "x$ac_lo" != "x$ac_hi"; do
2755 +  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2756    cat >conftest.$ac_ext <<_ACEOF
2757  /* confdefs.h.  */
2758  _ACEOF
2759 @@ -5345,14 +5228,13 @@
2760  cat >>conftest.$ac_ext <<_ACEOF
2761  /* end confdefs.h.  */
2762  $ac_includes_default
2763 -typedef int ac__type_new_;
2764 +   typedef int ac__type_sizeof_;
2765  int
2766  main ()
2767  {
2768 -if ((ac__type_new_ *) 0)
2769 -  return 0;
2770 -if (sizeof (ac__type_new_))
2771 -  return 0;
2772 +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
2773 +test_array [0] = 0
2775    ;
2776    return 0;
2777  }
2778 @@ -5374,31 +5256,30 @@
2779          test -z "$ac_c_werror_flag" ||
2780          test ! -s conftest.err
2781         } && test -s conftest.$ac_objext; then
2782 -  ac_cv_type_int=yes
2783 +  ac_hi=$ac_mid
2784  else
2785    echo "$as_me: failed program was:" >&5
2786  sed 's/^/| /' conftest.$ac_ext >&5
2787  
2788 -       ac_cv_type_int=no
2789 +       ac_lo=`expr '(' $ac_mid ')' + 1`
2790  fi
2791  
2792  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2793 -fi
2794 -{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
2795 -echo "${ECHO_T}$ac_cv_type_int" >&6; }
2797 -# The cast to long int works around a bug in the HP C Compiler
2798 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
2799 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
2800 -# This bug is HP SR number 8606223364.
2801 -{ echo "$as_me:$LINENO: checking size of int" >&5
2802 -echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
2803 -if test "${ac_cv_sizeof_int+set}" = set; then
2804 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2805 +done
2806 +case $ac_lo in
2807 +?*) ac_cv_sizeof_int=$ac_lo;;
2808 +'') if test "$ac_cv_type_int" = yes; then
2809 +     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
2810 +See \`config.log' for more details." >&5
2811 +echo "$as_me: error: cannot compute sizeof (int)
2812 +See \`config.log' for more details." >&2;}
2813 +   { (exit 77); exit 77; }; }
2814 +   else
2815 +     ac_cv_sizeof_int=0
2816 +   fi ;;
2817 +esac
2818  else
2819 -  if test "$cross_compiling" = yes; then
2820 -  # Depending upon the size, compute the lo and hi bounds.
2821 -cat >conftest.$ac_ext <<_ACEOF
2822 +  cat >conftest.$ac_ext <<_ACEOF
2823  /* confdefs.h.  */
2824  _ACEOF
2825  cat confdefs.h >>conftest.$ac_ext
2826 @@ -5406,311 +5287,61 @@
2827  /* end confdefs.h.  */
2828  $ac_includes_default
2829     typedef int ac__type_sizeof_;
2830 +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
2831 +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
2832 +#include <stdio.h>
2833 +#include <stdlib.h>
2834  int
2835  main ()
2836  {
2837 -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
2838 -test_array [0] = 0
2840 +  FILE *f = fopen ("conftest.val", "w");
2841 +  if (! f)
2842 +    return 1;
2843 +  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
2844 +    {
2845 +      long int i = longval ();
2846 +      if (i != ((long int) (sizeof (ac__type_sizeof_))))
2847 +       return 1;
2848 +      fprintf (f, "%ld\n", i);
2849 +    }
2850 +  else
2851 +    {
2852 +      unsigned long int i = ulongval ();
2853 +      if (i != ((long int) (sizeof (ac__type_sizeof_))))
2854 +       return 1;
2855 +      fprintf (f, "%lu\n", i);
2856 +    }
2857 +  return ferror (f) || fclose (f) != 0;
2858  
2859    ;
2860    return 0;
2861  }
2862  _ACEOF
2863 -rm -f conftest.$ac_objext
2864 -if { (ac_try="$ac_compile"
2865 +rm -f conftest$ac_exeext
2866 +if { (ac_try="$ac_link"
2867  case "(($ac_try" in
2868    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2869    *) ac_try_echo=$ac_try;;
2870  esac
2871  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2872 -  (eval "$ac_compile") 2>conftest.er1
2873 +  (eval "$ac_link") 2>&5
2874    ac_status=$?
2875 -  grep -v '^ *+' conftest.er1 >conftest.err
2876 -  rm -f conftest.er1
2877 -  cat conftest.err >&5
2878    echo "$as_me:$LINENO: \$? = $ac_status" >&5
2879 -  (exit $ac_status); } && {
2880 -        test -z "$ac_c_werror_flag" ||
2881 -        test ! -s conftest.err
2882 -       } && test -s conftest.$ac_objext; then
2883 -  ac_lo=0 ac_mid=0
2884 -  while :; do
2885 -    cat >conftest.$ac_ext <<_ACEOF
2886 -/* confdefs.h.  */
2887 -_ACEOF
2888 -cat confdefs.h >>conftest.$ac_ext
2889 -cat >>conftest.$ac_ext <<_ACEOF
2890 -/* end confdefs.h.  */
2891 -$ac_includes_default
2892 -   typedef int ac__type_sizeof_;
2893 -int
2894 -main ()
2895 -{
2896 -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
2897 -test_array [0] = 0
2899 -  ;
2900 -  return 0;
2901 -}
2902 -_ACEOF
2903 -rm -f conftest.$ac_objext
2904 -if { (ac_try="$ac_compile"
2905 -case "(($ac_try" in
2906 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2907 +  { (case "(($ac_try" in
2908    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2909    *) ac_try_echo=$ac_try;;
2910  esac
2911  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2912 -  (eval "$ac_compile") 2>conftest.er1
2913 +  (eval "$ac_try") 2>&5
2914    ac_status=$?
2915 -  grep -v '^ *+' conftest.er1 >conftest.err
2916 -  rm -f conftest.er1
2917 -  cat conftest.err >&5
2918    echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919 -  (exit $ac_status); } && {
2920 -        test -z "$ac_c_werror_flag" ||
2921 -        test ! -s conftest.err
2922 -       } && test -s conftest.$ac_objext; then
2923 -  ac_hi=$ac_mid; break
2924 +  (exit $ac_status); }; }; then
2925 +  ac_cv_sizeof_int=`cat conftest.val`
2926  else
2927 -  echo "$as_me: failed program was:" >&5
2928 -sed 's/^/| /' conftest.$ac_ext >&5
2930 -       ac_lo=`expr $ac_mid + 1`
2931 -                       if test $ac_lo -le $ac_mid; then
2932 -                         ac_lo= ac_hi=
2933 -                         break
2934 -                       fi
2935 -                       ac_mid=`expr 2 '*' $ac_mid + 1`
2936 -fi
2938 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2939 -  done
2940 -else
2941 -  echo "$as_me: failed program was:" >&5
2942 -sed 's/^/| /' conftest.$ac_ext >&5
2944 -       cat >conftest.$ac_ext <<_ACEOF
2945 -/* confdefs.h.  */
2946 -_ACEOF
2947 -cat confdefs.h >>conftest.$ac_ext
2948 -cat >>conftest.$ac_ext <<_ACEOF
2949 -/* end confdefs.h.  */
2950 -$ac_includes_default
2951 -   typedef int ac__type_sizeof_;
2952 -int
2953 -main ()
2954 -{
2955 -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
2956 -test_array [0] = 0
2958 -  ;
2959 -  return 0;
2960 -}
2961 -_ACEOF
2962 -rm -f conftest.$ac_objext
2963 -if { (ac_try="$ac_compile"
2964 -case "(($ac_try" in
2965 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2966 -  *) ac_try_echo=$ac_try;;
2967 -esac
2968 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2969 -  (eval "$ac_compile") 2>conftest.er1
2970 -  ac_status=$?
2971 -  grep -v '^ *+' conftest.er1 >conftest.err
2972 -  rm -f conftest.er1
2973 -  cat conftest.err >&5
2974 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2975 -  (exit $ac_status); } && {
2976 -        test -z "$ac_c_werror_flag" ||
2977 -        test ! -s conftest.err
2978 -       } && test -s conftest.$ac_objext; then
2979 -  ac_hi=-1 ac_mid=-1
2980 -  while :; do
2981 -    cat >conftest.$ac_ext <<_ACEOF
2982 -/* confdefs.h.  */
2983 -_ACEOF
2984 -cat confdefs.h >>conftest.$ac_ext
2985 -cat >>conftest.$ac_ext <<_ACEOF
2986 -/* end confdefs.h.  */
2987 -$ac_includes_default
2988 -   typedef int ac__type_sizeof_;
2989 -int
2990 -main ()
2991 -{
2992 -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
2993 -test_array [0] = 0
2995 -  ;
2996 -  return 0;
2997 -}
2998 -_ACEOF
2999 -rm -f conftest.$ac_objext
3000 -if { (ac_try="$ac_compile"
3001 -case "(($ac_try" in
3002 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3003 -  *) ac_try_echo=$ac_try;;
3004 -esac
3005 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3006 -  (eval "$ac_compile") 2>conftest.er1
3007 -  ac_status=$?
3008 -  grep -v '^ *+' conftest.er1 >conftest.err
3009 -  rm -f conftest.er1
3010 -  cat conftest.err >&5
3011 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3012 -  (exit $ac_status); } && {
3013 -        test -z "$ac_c_werror_flag" ||
3014 -        test ! -s conftest.err
3015 -       } && test -s conftest.$ac_objext; then
3016 -  ac_lo=$ac_mid; break
3017 -else
3018 -  echo "$as_me: failed program was:" >&5
3019 -sed 's/^/| /' conftest.$ac_ext >&5
3021 -       ac_hi=`expr '(' $ac_mid ')' - 1`
3022 -                       if test $ac_mid -le $ac_hi; then
3023 -                         ac_lo= ac_hi=
3024 -                         break
3025 -                       fi
3026 -                       ac_mid=`expr 2 '*' $ac_mid`
3027 -fi
3029 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3030 -  done
3031 -else
3032 -  echo "$as_me: failed program was:" >&5
3033 -sed 's/^/| /' conftest.$ac_ext >&5
3035 -       ac_lo= ac_hi=
3036 -fi
3038 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3039 -fi
3041 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042 -# Binary search between lo and hi bounds.
3043 -while test "x$ac_lo" != "x$ac_hi"; do
3044 -  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3045 -  cat >conftest.$ac_ext <<_ACEOF
3046 -/* confdefs.h.  */
3047 -_ACEOF
3048 -cat confdefs.h >>conftest.$ac_ext
3049 -cat >>conftest.$ac_ext <<_ACEOF
3050 -/* end confdefs.h.  */
3051 -$ac_includes_default
3052 -   typedef int ac__type_sizeof_;
3053 -int
3054 -main ()
3055 -{
3056 -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
3057 -test_array [0] = 0
3059 -  ;
3060 -  return 0;
3061 -}
3062 -_ACEOF
3063 -rm -f conftest.$ac_objext
3064 -if { (ac_try="$ac_compile"
3065 -case "(($ac_try" in
3066 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3067 -  *) ac_try_echo=$ac_try;;
3068 -esac
3069 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3070 -  (eval "$ac_compile") 2>conftest.er1
3071 -  ac_status=$?
3072 -  grep -v '^ *+' conftest.er1 >conftest.err
3073 -  rm -f conftest.er1
3074 -  cat conftest.err >&5
3075 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076 -  (exit $ac_status); } && {
3077 -        test -z "$ac_c_werror_flag" ||
3078 -        test ! -s conftest.err
3079 -       } && test -s conftest.$ac_objext; then
3080 -  ac_hi=$ac_mid
3081 -else
3082 -  echo "$as_me: failed program was:" >&5
3083 -sed 's/^/| /' conftest.$ac_ext >&5
3085 -       ac_lo=`expr '(' $ac_mid ')' + 1`
3086 -fi
3088 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3089 -done
3090 -case $ac_lo in
3091 -?*) ac_cv_sizeof_int=$ac_lo;;
3092 -'') if test "$ac_cv_type_int" = yes; then
3093 -     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
3094 -See \`config.log' for more details." >&5
3095 -echo "$as_me: error: cannot compute sizeof (int)
3096 -See \`config.log' for more details." >&2;}
3097 -   { (exit 77); exit 77; }; }
3098 -   else
3099 -     ac_cv_sizeof_int=0
3100 -   fi ;;
3101 -esac
3102 -else
3103 -  cat >conftest.$ac_ext <<_ACEOF
3104 -/* confdefs.h.  */
3105 -_ACEOF
3106 -cat confdefs.h >>conftest.$ac_ext
3107 -cat >>conftest.$ac_ext <<_ACEOF
3108 -/* end confdefs.h.  */
3109 -$ac_includes_default
3110 -   typedef int ac__type_sizeof_;
3111 -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
3112 -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
3113 -#include <stdio.h>
3114 -#include <stdlib.h>
3115 -int
3116 -main ()
3117 -{
3119 -  FILE *f = fopen ("conftest.val", "w");
3120 -  if (! f)
3121 -    return 1;
3122 -  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
3123 -    {
3124 -      long int i = longval ();
3125 -      if (i != ((long int) (sizeof (ac__type_sizeof_))))
3126 -       return 1;
3127 -      fprintf (f, "%ld\n", i);
3128 -    }
3129 -  else
3130 -    {
3131 -      unsigned long int i = ulongval ();
3132 -      if (i != ((long int) (sizeof (ac__type_sizeof_))))
3133 -       return 1;
3134 -      fprintf (f, "%lu\n", i);
3135 -    }
3136 -  return ferror (f) || fclose (f) != 0;
3138 -  ;
3139 -  return 0;
3140 -}
3141 -_ACEOF
3142 -rm -f conftest$ac_exeext
3143 -if { (ac_try="$ac_link"
3144 -case "(($ac_try" in
3145 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 -  *) ac_try_echo=$ac_try;;
3147 -esac
3148 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3149 -  (eval "$ac_link") 2>&5
3150 -  ac_status=$?
3151 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3153 -  { (case "(($ac_try" in
3154 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155 -  *) ac_try_echo=$ac_try;;
3156 -esac
3157 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3158 -  (eval "$ac_try") 2>&5
3159 -  ac_status=$?
3160 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3161 -  (exit $ac_status); }; }; then
3162 -  ac_cv_sizeof_int=`cat conftest.val`
3163 -else
3164 -  echo "$as_me: program exited with status $ac_status" >&5
3165 -echo "$as_me: failed program was:" >&5
3166 +  echo "$as_me: program exited with status $ac_status" >&5
3167 +echo "$as_me: failed program was:" >&5
3168  sed 's/^/| /' conftest.$ac_ext >&5
3169  
3170  ( exit $ac_status )
3171 @@ -6624,25 +6255,99 @@
3172  
3173  
3174  
3182 -for ac_header in errno.h stdarg.h string.h stdlib.h
3183 -do
3184 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3185 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3186 -  { echo "$as_me:$LINENO: checking for $ac_header" >&5
3187 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3188 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3189 +  { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3190 +echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
3191 +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3192    echo $ECHO_N "(cached) $ECHO_C" >&6
3193 -fi
3194 -ac_res=`eval echo '${'$as_ac_Header'}'`
3195 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
3196 -echo "${ECHO_T}$ac_res" >&6; }
3197 +else
3198 +  cat >conftest.$ac_ext <<_ACEOF
3199 +/* confdefs.h.  */
3200 +_ACEOF
3201 +cat confdefs.h >>conftest.$ac_ext
3202 +cat >>conftest.$ac_ext <<_ACEOF
3203 +/* end confdefs.h.  */
3205 +#        define __EXTENSIONS__ 1
3206 +         $ac_includes_default
3207 +int
3208 +main ()
3209 +{
3211 +  ;
3212 +  return 0;
3213 +}
3214 +_ACEOF
3215 +rm -f conftest.$ac_objext
3216 +if { (ac_try="$ac_compile"
3217 +case "(($ac_try" in
3218 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3219 +  *) ac_try_echo=$ac_try;;
3220 +esac
3221 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3222 +  (eval "$ac_compile") 2>conftest.er1
3223 +  ac_status=$?
3224 +  grep -v '^ *+' conftest.er1 >conftest.err
3225 +  rm -f conftest.er1
3226 +  cat conftest.err >&5
3227 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3228 +  (exit $ac_status); } && {
3229 +        test -z "$ac_c_werror_flag" ||
3230 +        test ! -s conftest.err
3231 +       } && test -s conftest.$ac_objext; then
3232 +  ac_cv_safe_to_define___extensions__=yes
3233 +else
3234 +  echo "$as_me: failed program was:" >&5
3235 +sed 's/^/| /' conftest.$ac_ext >&5
3237 +       ac_cv_safe_to_define___extensions__=no
3238 +fi
3240 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3241 +fi
3242 +{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3243 +echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
3244 +  test $ac_cv_safe_to_define___extensions__ = yes &&
3245 +    cat >>confdefs.h <<\_ACEOF
3246 +#define __EXTENSIONS__ 1
3247 +_ACEOF
3249 +  cat >>confdefs.h <<\_ACEOF
3250 +#define _POSIX_PTHREAD_SEMANTICS 1
3251 +_ACEOF
3253 +  cat >>confdefs.h <<\_ACEOF
3254 +#define _TANDEM_SOURCE 1
3255 +_ACEOF
3274 +for ac_header in errno.h stdarg.h string.h stdlib.h
3275 +do
3276 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3277 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3278 +  { echo "$as_me:$LINENO: checking for $ac_header" >&5
3279 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3280 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3281 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3282 +fi
3283 +ac_res=`eval echo '${'$as_ac_Header'}'`
3284 +              { echo "$as_me:$LINENO: result: $ac_res" >&5
3285 +echo "${ECHO_T}$ac_res" >&6; }
3286  else
3287    # Is the header compilable?
3288  { echo "$as_me:$LINENO: checking $ac_header usability" >&5
3289 @@ -9348,30 +9053,6 @@
3290  fi
3291  
3292  
3293 -if $NEON_CONFIG --support socks >/dev/null; then
3295 -NE_FLAG_SOCKS=yes
3298 -cat >>confdefs.h <<\_ACEOF
3299 -#define NE_HAVE_SOCKS 1
3300 -_ACEOF
3302 -ne_SOCKS_message="SOCKSv5 is supported by neon"
3303 -  { echo "$as_me:$LINENO: SOCKSv5 is supported by neon" >&5
3304 -echo "$as_me: SOCKSv5 is supported by neon" >&6;}
3306 -else
3308 -NE_FLAG_SOCKS=no
3310 -ne_SOCKS_message="SOCKSv5 is not supported by neon"
3311 -  { echo "$as_me:$LINENO: SOCKSv5 is not supported by neon" >&5
3312 -echo "$as_me: SOCKSv5 is not supported by neon" >&6;}
3314 -fi
3317  if $NEON_CONFIG --support ts_ssl >/dev/null; then
3318  
3319  NE_FLAG_TS_SSL=yes
3320 @@ -10148,30 +9829,6 @@
3321  fi
3322  
3323  
3324 -if $NEON_CONFIG --support socks >/dev/null; then
3326 -NE_FLAG_SOCKS=yes
3329 -cat >>confdefs.h <<\_ACEOF
3330 -#define NE_HAVE_SOCKS 1
3331 -_ACEOF
3333 -ne_SOCKS_message="SOCKSv5 is supported by neon"
3334 -  { echo "$as_me:$LINENO: SOCKSv5 is supported by neon" >&5
3335 -echo "$as_me: SOCKSv5 is supported by neon" >&6;}
3337 -else
3339 -NE_FLAG_SOCKS=no
3341 -ne_SOCKS_message="SOCKSv5 is not supported by neon"
3342 -  { echo "$as_me:$LINENO: SOCKSv5 is not supported by neon" >&5
3343 -echo "$as_me: SOCKSv5 is not supported by neon" >&6;}
3345 -fi
3348  if $NEON_CONFIG --support ts_ssl >/dev/null; then
3349  
3350  NE_FLAG_TS_SSL=yes
3351 @@ -10755,12 +10412,12 @@
3352  
3353  # Define the current versions.
3354  NE_VERSION_MAJOR=0
3355 -NE_VERSION_MINOR=28
3356 +NE_VERSION_MINOR=29
3357  NE_VERSION_PATCH=0
3358  NE_VERSION_TAG=
3359  
3360 -# 0.28.x is backwards-compatible with 0.27.x, so AGE=1
3361 -NE_LIBTOOL_VERSINFO="28:0:1"
3362 +# 0.29.x is backwards-compatible to 0.27.x, so AGE=2
3363 +NE_LIBTOOL_VERSINFO="29:${NE_VERSION_PATCH}:2"
3364  
3365  
3366  
3367 @@ -11875,9 +11532,6 @@
3368  #define NE_FMT_NE_OFF_T NE_FMT_OFF64_T
3369  _ACEOF
3370  
3372 -: Disabled for 0.28 to retain 0.27 ABI
3374  else
3375     cat >>confdefs.h <<_ACEOF
3376  #define NE_FMT_NE_OFF_T NE_FMT_OFF_T
3377 @@ -12175,6 +11829,7 @@
3378  
3379  # Unixware 7 can only link gethostbyname with -lnsl -lsocket
3380  # Pick up -lsocket first, then the gethostbyname check will work.
3381 +# Haiku requires -lnetwork for socket functions.
3382  
3383  
3384  
3385 @@ -12226,7 +11881,7 @@
3386  
3387  ne_sl_save_LIBS=$LIBS
3388  ne_cv_libsfor_socket="not found"
3389 -for lib in socket inet ws2_32; do
3390 +for lib in socket inet ws2_32 network; do
3391      # The w32api libraries link using the stdcall calling convention.
3392      case ${lib}-${ne_cv_os_uname} in
3393      ws2_32-MINGW*) ne__code="__stdcall socket();" ;;
3394 @@ -12431,7 +12086,8 @@
3395  
3396  
3397  
3398 -for ac_func in gai_strerror getnameinfo inet_ntop
3400 +for ac_func in gai_strerror getnameinfo inet_ntop inet_pton
3401  do
3402  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3403  { echo "$as_me:$LINENO: checking for $ac_func" >&5
3404 @@ -12545,7 +12201,8 @@
3405  
3406  
3407  
3408 -for ac_func in gai_strerror getnameinfo inet_ntop
3410 +for ac_func in gai_strerror getnameinfo inet_ntop inet_pton
3411  do
3412  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3413  { echo "$as_me:$LINENO: checking for $ac_func" >&5
3414 @@ -12736,6 +12393,7 @@
3415     # Checks for non-getaddrinfo() based resolver interfaces.
3416     # QNX has gethostbyname in -lsocket. BeOS only has it in -lbind.
3417     # CygWin/Winsock2 has it in -lws2_32, allegedly.
3418 +   # Haiku requires -lnetwork for socket functions.
3419  
3420  
3421  
3422 @@ -12787,7 +12445,7 @@
3423  
3424  ne_sl_save_LIBS=$LIBS
3425  ne_cv_libsfor_gethostbyname="not found"
3426 -for lib in socket nsl bind ws2_32; do
3427 +for lib in socket nsl bind ws2_32 network; do
3428      # The w32api libraries link using the stdcall calling convention.
3429      case ${lib}-${ne_cv_os_uname} in
3430      ws2_32-MINGW*) ne__code="__stdcall gethostbyname();" ;;
3431 @@ -13530,7 +13188,7 @@
3432  else
3433      { echo "$as_me:$LINENO: result: yes" >&5
3434  echo "${ECHO_T}yes" >&6; }
3435 -    NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_acl"
3436 +    NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_oldacl ne_acl3744"
3437  fi
3438  
3439  
3440 @@ -13567,6 +13225,7 @@
3441  yes|openssl)
3442  
3443  
3445  # Extract the first word of "pkg-config", so it can be a program name with args.
3446  set dummy pkg-config; ac_word=$2
3447  { echo "$as_me:$LINENO: checking for $ac_word" >&5
3448 @@ -14306,6 +13965,9 @@
3449  
3450  
3451  
3455  for ac_header in openssl/ssl.h openssl/opensslv.h
3456  do
3457  as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3458 @@ -14504,7 +14166,8 @@
3459  ne_cf_save_LIBS=$LIBS
3460  LIBS="$LIBS $NEON_LIBS"
3461  
3462 -for ac_func in CRYPTO_set_idptr_callback
3464 +for ac_func in CRYPTO_set_idptr_callback SSL_SESSION_cmp
3465  do
3466  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3467  { echo "$as_me:$LINENO: checking for $ac_func" >&5
3468 @@ -14688,9 +14351,63 @@
3469  _ACEOF
3470  
3471     NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_openssl"
3474 +cat >>confdefs.h <<\_ACEOF
3475 +#define HAVE_NTLM 1
3476 +_ACEOF
3478     ;;
3479  gnutls)
3480 -   # Extract the first word of "libgnutls-config", so it can be a program name with args.
3484 +# Extract the first word of "pkg-config", so it can be a program name with args.
3485 +set dummy pkg-config; ac_word=$2
3486 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3487 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3488 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3489 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3490 +else
3491 +  case $PKG_CONFIG in
3492 +  [\\/]* | ?:[\\/]*)
3493 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3494 +  ;;
3495 +  *)
3496 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3497 +for as_dir in $PATH
3498 +do
3499 +  IFS=$as_save_IFS
3500 +  test -z "$as_dir" && as_dir=.
3501 +  for ac_exec_ext in '' $ac_executable_extensions; do
3502 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3503 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3504 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3505 +    break 2
3506 +  fi
3507 +done
3508 +done
3509 +IFS=$as_save_IFS
3511 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
3512 +  ;;
3513 +esac
3514 +fi
3515 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3516 +if test -n "$PKG_CONFIG"; then
3517 +  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
3518 +echo "${ECHO_T}$PKG_CONFIG" >&6; }
3519 +else
3520 +  { echo "$as_me:$LINENO: result: no" >&5
3521 +echo "${ECHO_T}no" >&6; }
3522 +fi
3525 +if test "$PKG_CONFIG" = "no"; then
3526 +   : Not using pkg-config
3528 +      # Fall back on libgnutls-config script
3529 +      # Extract the first word of "libgnutls-config", so it can be a program name with args.
3530  set dummy libgnutls-config; ac_word=$2
3531  { echo "$as_me:$LINENO: checking for $ac_word" >&5
3532  echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3533 @@ -14732,22 +14449,105 @@
3534  
3535  
3536  
3537 -   if test "$GNUTLS_CONFIG" = "no"; then
3538 -     { { echo "$as_me:$LINENO: error: could not find libgnutls-config in \$PATH" >&5
3539 +      if test "$GNUTLS_CONFIG" = "no"; then
3540 +        { { echo "$as_me:$LINENO: error: could not find libgnutls-config in \$PATH" >&5
3541  echo "$as_me: error: could not find libgnutls-config in \$PATH" >&2;}
3542     { (exit 1); exit 1; }; }
3543 -   fi
3544 +      fi
3546 +      CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
3547 +      NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`"
3549 +      ne_gnutls_ver=`$GNUTLS_CONFIG --version`
3551 +else
3552 +   { echo "$as_me:$LINENO: checking for gnutls pkg-config data" >&5
3553 +echo $ECHO_N "checking for gnutls pkg-config data... $ECHO_C" >&6; }
3554 +if test "${ne_cv_pkg_gnutls+set}" = set; then
3555 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3556 +else
3557 +  if $PKG_CONFIG gnutls; then
3558 +        ne_cv_pkg_gnutls=yes
3559 +      else
3560 +        ne_cv_pkg_gnutls=no
3561 +      fi
3562 +fi
3563 +{ echo "$as_me:$LINENO: result: $ne_cv_pkg_gnutls" >&5
3564 +echo "${ECHO_T}$ne_cv_pkg_gnutls" >&6; }
3566 +   if test "$ne_cv_pkg_gnutls" = "yes"; then
3567 +      NE_SSL_CFLAGS=`$PKG_CONFIG --cflags gnutls`
3568 +      NE_SSL_LIBS=`$PKG_CONFIG --libs gnutls`
3569 +      : Using provided pkg-config data
3570 +      { echo "$as_me:$LINENO: using GnuTLS configuration from pkg-config" >&5
3571 +echo "$as_me: using GnuTLS configuration from pkg-config" >&6;}
3572 +      CPPFLAGS="$CPPFLAGS ${NE_SSL_CFLAGS}"
3573 +      NEON_LIBS="$NEON_LIBS ${NE_SSL_LIBS}"
3575 +      ne_gnutls_ver=`$PKG_CONFIG --modversion gnutls`
3576  
3577 -   ne_gnutls_ver=`$GNUTLS_CONFIG --version`
3578 -   case $ne_gnutls_ver in
3579 -   1.0.?|1.0.1?|1.0.20|1.0.21)
3580 -      { { echo "$as_me:$LINENO: error: GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required" >&5
3581 -echo "$as_me: error: GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required" >&2;}
3582 +   else
3583 +      : No pkg-config for gnutls provided
3585 +      # Fall back on libgnutls-config script
3586 +      # Extract the first word of "libgnutls-config", so it can be a program name with args.
3587 +set dummy libgnutls-config; ac_word=$2
3588 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3589 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3590 +if test "${ac_cv_path_GNUTLS_CONFIG+set}" = set; then
3591 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3592 +else
3593 +  case $GNUTLS_CONFIG in
3594 +  [\\/]* | ?:[\\/]*)
3595 +  ac_cv_path_GNUTLS_CONFIG="$GNUTLS_CONFIG" # Let the user override the test with a path.
3596 +  ;;
3597 +  *)
3598 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599 +for as_dir in $PATH
3600 +do
3601 +  IFS=$as_save_IFS
3602 +  test -z "$as_dir" && as_dir=.
3603 +  for ac_exec_ext in '' $ac_executable_extensions; do
3604 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3605 +    ac_cv_path_GNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3606 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3607 +    break 2
3608 +  fi
3609 +done
3610 +done
3611 +IFS=$as_save_IFS
3613 +  test -z "$ac_cv_path_GNUTLS_CONFIG" && ac_cv_path_GNUTLS_CONFIG="no"
3614 +  ;;
3615 +esac
3616 +fi
3617 +GNUTLS_CONFIG=$ac_cv_path_GNUTLS_CONFIG
3618 +if test -n "$GNUTLS_CONFIG"; then
3619 +  { echo "$as_me:$LINENO: result: $GNUTLS_CONFIG" >&5
3620 +echo "${ECHO_T}$GNUTLS_CONFIG" >&6; }
3621 +else
3622 +  { echo "$as_me:$LINENO: result: no" >&5
3623 +echo "${ECHO_T}no" >&6; }
3624 +fi
3628 +      if test "$GNUTLS_CONFIG" = "no"; then
3629 +        { { echo "$as_me:$LINENO: error: could not find libgnutls-config in \$PATH" >&5
3630 +echo "$as_me: error: could not find libgnutls-config in \$PATH" >&2;}
3631     { (exit 1); exit 1; }; }
3632 -      ;;
3633 -   esac
3634 +      fi
3636 +      CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
3637 +      NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`"
3639 +      ne_gnutls_ver=`$GNUTLS_CONFIG --version`
3641 +   fi
3642 +fi
3645  
3646 -   CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
3647  
3648     if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then
3649    { echo "$as_me:$LINENO: checking for gnutls/gnutls.h" >&5
3650 @@ -14902,7 +14702,6 @@
3651  echo "$as_me: SSL support enabled, using GnuTLS $ne_gnutls_ver" >&6;}
3652  
3653     NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_gnutls"
3654 -   NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`"
3655  
3656  cat >>confdefs.h <<\_ACEOF
3657  #define HAVE_GNUTLS 1
3658 @@ -14917,8 +14716,11 @@
3659  
3660  
3661  
3663  for ac_func in gnutls_session_get_data2 gnutls_x509_dn_get_rdn_ava \
3664 -                  gnutls_sign_callback_set
3665 +                  gnutls_sign_callback_set \
3666 +                  gnutls_certificate_get_x509_cas \
3667 +                  gnutls_certificate_verify_peers2
3668  do
3669  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3670  { echo "$as_me:$LINENO: checking for $ac_func" >&5
3671 @@ -15013,6 +14815,13 @@
3672  
3673  LIBS=$ne_cf_save_LIBS
3674  
3675 +   # fail if gnutls_certificate_verify_peers2 is not found
3676 +   if test x${ac_cv_func_gnutls_certificate_verify_peers2} != xyes; then
3677 +       { { echo "$as_me:$LINENO: error: GnuTLS version predates gnutls_certificate_verify_peers2, newer version required" >&5
3678 +echo "$as_me: error: GnuTLS version predates gnutls_certificate_verify_peers2, newer version required" >&2;}
3679 +   { (exit 1); exit 1; }; }
3680 +   fi
3682     # Check for iconv support if using the new RDN access functions:
3683     if test ${ac_cv_func_gnutls_x509_dn_get_rdn_ava}X${ac_cv_header_iconv_h} = yesXyes; then
3684  
3685 @@ -15110,102 +14919,14 @@
3686  done
3687  
3688     fi
3689 +   ;;
3690 +*) # Default to off; only create crypto-enabled binaries if requested.
3691  
3692 -   if test x${ac_cv_func_gnutls_sign_callback_set} = xyes; then
3693 -      if test "$with_pakchois" != "no"; then
3694 -         # PKCS#11... ho!
3695 +NE_FLAG_SSL=no
3696  
3698 -# Extract the first word of "pkg-config", so it can be a program name with args.
3699 -set dummy pkg-config; ac_word=$2
3700 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3701 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3702 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3703 -  echo $ECHO_N "(cached) $ECHO_C" >&6
3704 -else
3705 -  case $PKG_CONFIG in
3706 -  [\\/]* | ?:[\\/]*)
3707 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3708 -  ;;
3709 -  *)
3710 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711 -for as_dir in $PATH
3712 -do
3713 -  IFS=$as_save_IFS
3714 -  test -z "$as_dir" && as_dir=.
3715 -  for ac_exec_ext in '' $ac_executable_extensions; do
3716 -  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3717 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3718 -    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3719 -    break 2
3720 -  fi
3721 -done
3722 -done
3723 -IFS=$as_save_IFS
3725 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
3726 -  ;;
3727 -esac
3728 -fi
3729 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3730 -if test -n "$PKG_CONFIG"; then
3731 -  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
3732 -echo "${ECHO_T}$PKG_CONFIG" >&6; }
3733 -else
3734 -  { echo "$as_me:$LINENO: result: no" >&5
3735 -echo "${ECHO_T}no" >&6; }
3736 -fi
3739 -if test "$PKG_CONFIG" = "no"; then
3740 -   : Not using pkg-config
3741 -   { echo "$as_me:$LINENO: pakchois library not found; no PKCS11 support" >&5
3742 -echo "$as_me: pakchois library not found; no PKCS11 support" >&6;}
3743 -else
3744 -   { echo "$as_me:$LINENO: checking for pakchois pkg-config data" >&5
3745 -echo $ECHO_N "checking for pakchois pkg-config data... $ECHO_C" >&6; }
3746 -if test "${ne_cv_pkg_pakchois+set}" = set; then
3747 -  echo $ECHO_N "(cached) $ECHO_C" >&6
3748 -else
3749 -  if $PKG_CONFIG pakchois; then
3750 -        ne_cv_pkg_pakchois=yes
3751 -      else
3752 -        ne_cv_pkg_pakchois=no
3753 -      fi
3754 -fi
3755 -{ echo "$as_me:$LINENO: result: $ne_cv_pkg_pakchois" >&5
3756 -echo "${ECHO_T}$ne_cv_pkg_pakchois" >&6; }
3758 -   if test "$ne_cv_pkg_pakchois" = "yes"; then
3759 -      NE_PK11_CFLAGS=`$PKG_CONFIG --cflags pakchois`
3760 -      NE_PK11_LIBS=`$PKG_CONFIG --libs pakchois`
3761 -      : Using provided pkg-config data
3762 -      { echo "$as_me:$LINENO: using pakchois for PKCS11 support" >&5
3763 -echo "$as_me: using pakchois for PKCS11 support" >&6;}
3765 -cat >>confdefs.h <<\_ACEOF
3766 -#define HAVE_PAKCHOIS 1
3767 -_ACEOF
3769 -            CPPFLAGS="$CPPFLAGS ${NE_PK11_CFLAGS}"
3770 -            NEON_LIBS="${NEON_LIBS} ${NE_PK11_LIBS}"
3771 -   else
3772 -      : No pkg-config for pakchois provided
3773 -      { echo "$as_me:$LINENO: pakchois library not found; no PKCS11 support" >&5
3774 -echo "$as_me: pakchois library not found; no PKCS11 support" >&6;}
3775 -   fi
3776 -fi
3777 -      fi
3778 -   fi
3780 -   ;;
3781 -*) # Default to off; only create crypto-enabled binaries if requested.
3783 -NE_FLAG_SSL=no
3785 -ne_SSL_message="SSL support is not enabled"
3786 -  { echo "$as_me:$LINENO: SSL support is not enabled" >&5
3787 -echo "$as_me: SSL support is not enabled" >&6;}
3788 +ne_SSL_message="SSL support is not enabled"
3789 +  { echo "$as_me:$LINENO: SSL support is not enabled" >&5
3790 +echo "$as_me: SSL support is not enabled" >&6;}
3791  
3792  
3793  NE_FLAG_TS_SSL=no
3794 @@ -15378,21 +15099,160 @@
3795    ;;
3796  esac
3797  
3798 +case ${with_pakchois}X${ac_cv_func_gnutls_sign_callback_set}Y${ne_cv_lib_ssl097} in
3799 +noX*Y*) ;;
3800 +*X*Yyes|*XyesY*)
3801 +    # PKCS#11... ho!
3805 +# Extract the first word of "pkg-config", so it can be a program name with args.
3806 +set dummy pkg-config; ac_word=$2
3807 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3808 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3809 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3810 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3811 +else
3812 +  case $PKG_CONFIG in
3813 +  [\\/]* | ?:[\\/]*)
3814 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3815 +  ;;
3816 +  *)
3817 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3818 +for as_dir in $PATH
3819 +do
3820 +  IFS=$as_save_IFS
3821 +  test -z "$as_dir" && as_dir=.
3822 +  for ac_exec_ext in '' $ac_executable_extensions; do
3823 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3824 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3825 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3826 +    break 2
3827 +  fi
3828 +done
3829 +done
3830 +IFS=$as_save_IFS
3832 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
3833 +  ;;
3834 +esac
3835 +fi
3836 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3837 +if test -n "$PKG_CONFIG"; then
3838 +  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
3839 +echo "${ECHO_T}$PKG_CONFIG" >&6; }
3840 +else
3841 +  { echo "$as_me:$LINENO: result: no" >&5
3842 +echo "${ECHO_T}no" >&6; }
3843 +fi
3846 +if test "$PKG_CONFIG" = "no"; then
3847 +   : Not using pkg-config
3848 +   { echo "$as_me:$LINENO: pakchois library not found; no PKCS#11 support" >&5
3849 +echo "$as_me: pakchois library not found; no PKCS#11 support" >&6;}
3850 +else
3851 +   { echo "$as_me:$LINENO: checking for pakchois pkg-config data" >&5
3852 +echo $ECHO_N "checking for pakchois pkg-config data... $ECHO_C" >&6; }
3853 +if test "${ne_cv_pkg_pakchois+set}" = set; then
3854 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3855 +else
3856 +  if $PKG_CONFIG pakchois; then
3857 +        ne_cv_pkg_pakchois=yes
3858 +      else
3859 +        ne_cv_pkg_pakchois=no
3860 +      fi
3861 +fi
3862 +{ echo "$as_me:$LINENO: result: $ne_cv_pkg_pakchois" >&5
3863 +echo "${ECHO_T}$ne_cv_pkg_pakchois" >&6; }
3865 +   if test "$ne_cv_pkg_pakchois" = "yes"; then
3866 +      NE_PK11_CFLAGS=`$PKG_CONFIG --cflags pakchois`
3867 +      NE_PK11_LIBS=`$PKG_CONFIG --libs pakchois`
3868 +      : Using provided pkg-config data
3869 +      { echo "$as_me:$LINENO: using pakchois for PKCS#11 support" >&5
3870 +echo "$as_me: using pakchois for PKCS#11 support" >&6;}
3872 +cat >>confdefs.h <<\_ACEOF
3873 +#define HAVE_PAKCHOIS 1
3874 +_ACEOF
3876 +       CPPFLAGS="$CPPFLAGS ${NE_PK11_CFLAGS}"
3877 +       NEON_LIBS="${NEON_LIBS} ${NE_PK11_LIBS}"
3878 +   else
3879 +      : No pkg-config for pakchois provided
3880 +      { echo "$as_me:$LINENO: pakchois library not found; no PKCS#11 support" >&5
3881 +echo "$as_me: pakchois library not found; no PKCS#11 support" >&6;}
3882 +   fi
3883 +fi
3887 +   ;;
3888 +esac
3890  
3891  
3892 +# Check whether --with-gssapi was given.
3893 +if test "${with_gssapi+set}" = set; then
3894 +  withval=$with_gssapi;
3895 +fi
3896  
3897 +if test "$with_gssapi" != "no"; then
3898 +  # Extract the first word of "krb5-config", so it can be a program name with args.
3899 +set dummy krb5-config; ac_word=$2
3900 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3901 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3902 +if test "${ac_cv_path_KRB5_CONFIG+set}" = set; then
3903 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3904 +else
3905 +  case $KRB5_CONFIG in
3906 +  [\\/]* | ?:[\\/]*)
3907 +  ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path.
3908 +  ;;
3909 +  *)
3910 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3911 +as_dummy="$PATH:/usr/kerberos/bin"
3912 +for as_dir in $as_dummy
3913 +do
3914 +  IFS=$as_save_IFS
3915 +  test -z "$as_dir" && as_dir=.
3916 +  for ac_exec_ext in '' $ac_executable_extensions; do
3917 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3918 +    ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3919 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3920 +    break 2
3921 +  fi
3922 +done
3923 +done
3924 +IFS=$as_save_IFS
3925  
3926 -# Check whether --with-socks was given.
3927 -if test "${with_socks+set}" = set; then
3928 -  withval=$with_socks;
3929 +  test -z "$ac_cv_path_KRB5_CONFIG" && ac_cv_path_KRB5_CONFIG="none"
3930 +  ;;
3931 +esac
3932 +fi
3933 +KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG
3934 +if test -n "$KRB5_CONFIG"; then
3935 +  { echo "$as_me:$LINENO: result: $KRB5_CONFIG" >&5
3936 +echo "${ECHO_T}$KRB5_CONFIG" >&6; }
3937 +else
3938 +  { echo "$as_me:$LINENO: result: no" >&5
3939 +echo "${ECHO_T}no" >&6; }
3940  fi
3941  
3942  
3943 -if test "$with_socks" = "yes"; then
3944 -  ne_save_LIBS=$LIBS
3945 +else
3946 +  KRB5_CONFIG=none
3947 +fi
3948 +if test "x$KRB5_CONFIG" != "xnone"; then
3949 +   ne_save_CPPFLAGS=$CPPFLAGS
3950 +   ne_save_LIBS=$NEON_LIBS
3951 +   NEON_LIBS="$NEON_LIBS `${KRB5_CONFIG} --libs gssapi`"
3952 +   CPPFLAGS="$CPPFLAGS `${KRB5_CONFIG} --cflags gssapi`"
3953 +   # MIT and Heimdal put gssapi.h in different places
3954  
3955  
3956 -for ac_header in socks.h
3957 +for ac_header in gssapi/gssapi.h gssapi.h
3958  do
3959  as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3960  if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3961 @@ -15531,19 +15391,41 @@
3962    cat >>confdefs.h <<_ACEOF
3963  #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3964  _ACEOF
3965 - { echo "$as_me:$LINENO: checking for connect in -lsocks5" >&5
3966 -echo $ECHO_N "checking for connect in -lsocks5... $ECHO_C" >&6; }
3967 -if test "${ac_cv_lib_socks5_connect+set}" = set; then
3970 +ne_cf_save_LIBS=$LIBS
3971 +LIBS="$LIBS $NEON_LIBS"
3973 +for ac_func in gss_init_sec_context
3974 +do
3975 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3976 +{ echo "$as_me:$LINENO: checking for $ac_func" >&5
3977 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
3978 +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
3979    echo $ECHO_N "(cached) $ECHO_C" >&6
3980  else
3981 -  ac_check_lib_save_LIBS=$LIBS
3982 -LIBS="-lsocks5  $LIBS"
3983 -cat >conftest.$ac_ext <<_ACEOF
3984 +  cat >conftest.$ac_ext <<_ACEOF
3985  /* confdefs.h.  */
3986  _ACEOF
3987  cat confdefs.h >>conftest.$ac_ext
3988  cat >>conftest.$ac_ext <<_ACEOF
3989  /* end confdefs.h.  */
3990 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
3991 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3992 +#define $ac_func innocuous_$ac_func
3994 +/* System header to define __stub macros and hopefully few prototypes,
3995 +    which can conflict with char $ac_func (); below.
3996 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3997 +    <limits.h> exists even on freestanding compilers.  */
3999 +#ifdef __STDC__
4000 +# include <limits.h>
4001 +#else
4002 +# include <assert.h>
4003 +#endif
4005 +#undef $ac_func
4006  
4007  /* Override any GCC internal prototype to avoid an error.
4008     Use char because int might match the return type of a GCC
4009 @@ -15551,11 +15433,18 @@
4010  #ifdef __cplusplus
4011  extern "C"
4012  #endif
4013 -char connect ();
4014 +char $ac_func ();
4015 +/* The GNU C library defines this for functions which it implements
4016 +    to always fail with ENOSYS.  Some functions are actually named
4017 +    something starting with __ and the normal name is an alias.  */
4018 +#if defined __stub_$ac_func || defined __stub___$ac_func
4019 +choke me
4020 +#endif
4022  int
4023  main ()
4024  {
4025 -return connect ();
4026 +return $ac_func ();
4027    ;
4028    return 0;
4029  }
4030 @@ -15578,122 +15467,36 @@
4031          test ! -s conftest.err
4032         } && test -s conftest$ac_exeext &&
4033         $as_test_x conftest$ac_exeext; then
4034 -  ac_cv_lib_socks5_connect=yes
4035 +  eval "$as_ac_var=yes"
4036  else
4037    echo "$as_me: failed program was:" >&5
4038  sed 's/^/| /' conftest.$ac_ext >&5
4039  
4040 -       ac_cv_lib_socks5_connect=no
4041 +       eval "$as_ac_var=no"
4042  fi
4043  
4044  rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4045        conftest$ac_exeext conftest.$ac_ext
4046 -LIBS=$ac_check_lib_save_LIBS
4047 -fi
4048 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socks5_connect" >&5
4049 -echo "${ECHO_T}$ac_cv_lib_socks5_connect" >&6; }
4050 -if test $ac_cv_lib_socks5_connect = yes; then
4051 -  :
4052 -else
4053 -  { { echo "$as_me:$LINENO: error: could not find libsocks5 for SOCKS support" >&5
4054 -echo "$as_me: error: could not find libsocks5 for SOCKS support" >&2;}
4055 -   { (exit 1); exit 1; }; }
4056 -fi
4058 -else
4059 -  { { echo "$as_me:$LINENO: error: could not find socks.h for SOCKS support" >&5
4060 -echo "$as_me: error: could not find socks.h for SOCKS support" >&2;}
4061 -   { (exit 1); exit 1; }; }
4062  fi
4063 +ac_res=`eval echo '${'$as_ac_var'}'`
4064 +              { echo "$as_me:$LINENO: result: $ac_res" >&5
4065 +echo "${ECHO_T}$ac_res" >&6; }
4066 +if test `eval echo '${'$as_ac_var'}'` = yes; then
4067 +  cat >>confdefs.h <<_ACEOF
4068 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4069 +_ACEOF
4070  
4071 -done
4075 -NE_FLAG_SOCKS=yes
4077 +      ne_save_CPPFLAGS=$CPPFLAGS
4078 +      ne_save_LIBS=$NEON_LIBS
4079 +      { echo "$as_me:$LINENO: GSSAPI authentication support enabled" >&5
4080 +echo "$as_me: GSSAPI authentication support enabled" >&6;}
4081  
4082  cat >>confdefs.h <<\_ACEOF
4083 -#define NE_HAVE_SOCKS 1
4084 +#define HAVE_GSSAPI 1
4085  _ACEOF
4086  
4087 -ne_SOCKS_message="SOCKSv5 support is enabled"
4088 -  { echo "$as_me:$LINENO: SOCKSv5 support is enabled" >&5
4089 -echo "$as_me: SOCKSv5 support is enabled" >&6;}
4091 -  NEON_LIBS="$NEON_LIBS -lsocks5"
4092 -  LIBS=$ne_save_LIBS
4093 -else
4095 -NE_FLAG_SOCKS=no
4097 -ne_SOCKS_message="SOCKSv5 support is not enabled"
4098 -  { echo "$as_me:$LINENO: SOCKSv5 support is not enabled" >&5
4099 -echo "$as_me: SOCKSv5 support is not enabled" >&6;}
4101 -fi
4104 -# Check whether --with-gssapi was given.
4105 -if test "${with_gssapi+set}" = set; then
4106 -  withval=$with_gssapi;
4107 -fi
4109 -if test "$with_gssapi" != "no"; then
4110 -  # Extract the first word of "krb5-config", so it can be a program name with args.
4111 -set dummy krb5-config; ac_word=$2
4112 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4113 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4114 -if test "${ac_cv_path_KRB5_CONFIG+set}" = set; then
4115 -  echo $ECHO_N "(cached) $ECHO_C" >&6
4116 -else
4117 -  case $KRB5_CONFIG in
4118 -  [\\/]* | ?:[\\/]*)
4119 -  ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path.
4120 -  ;;
4121 -  *)
4122 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4123 -as_dummy="$PATH:/usr/kerberos/bin"
4124 -for as_dir in $as_dummy
4125 -do
4126 -  IFS=$as_save_IFS
4127 -  test -z "$as_dir" && as_dir=.
4128 -  for ac_exec_ext in '' $ac_executable_extensions; do
4129 -  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4130 -    ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4131 -    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4132 -    break 2
4133 -  fi
4134 -done
4135 -done
4136 -IFS=$as_save_IFS
4138 -  test -z "$ac_cv_path_KRB5_CONFIG" && ac_cv_path_KRB5_CONFIG="none"
4139 -  ;;
4140 -esac
4141 -fi
4142 -KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG
4143 -if test -n "$KRB5_CONFIG"; then
4144 -  { echo "$as_me:$LINENO: result: $KRB5_CONFIG" >&5
4145 -echo "${ECHO_T}$KRB5_CONFIG" >&6; }
4146 -else
4147 -  { echo "$as_me:$LINENO: result: no" >&5
4148 -echo "${ECHO_T}no" >&6; }
4149 -fi
4152 -else
4153 -  KRB5_CONFIG=none
4154 -fi
4155 -if test "x$KRB5_CONFIG" != "xnone"; then
4156 -   ne_save_CPPFLAGS=$CPPFLAGS
4157 -   ne_save_LIBS=$NEON_LIBS
4158 -   NEON_LIBS="$NEON_LIBS `${KRB5_CONFIG} --libs gssapi`"
4159 -   CPPFLAGS="$CPPFLAGS `${KRB5_CONFIG} --cflags gssapi`"
4160 -   # MIT and Heimdal put gssapi.h in different places
4162  
4163 -for ac_header in gssapi/gssapi.h gssapi.h
4164 +for ac_header in gssapi/gssapi_generic.h
4165  do
4166  as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4167  if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4168 @@ -15833,16 +15636,14 @@
4169  #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4170  _ACEOF
4171  
4172 +fi
4173  
4174 -ne_cf_save_LIBS=$LIBS
4175 -LIBS="$LIBS $NEON_LIBS"
4176 +done
4177  
4178 -for ac_func in gss_init_sec_context
4179 -do
4180 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4181 -{ echo "$as_me:$LINENO: checking for $ac_func" >&5
4182 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
4183 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
4184 +      # Older versions of MIT Kerberos lack GSS_C_NT_HOSTBASED_SERVICE
4185 +      { echo "$as_me:$LINENO: checking whether GSS_C_NT_HOSTBASED_SERVICE is declared" >&5
4186 +echo $ECHO_N "checking whether GSS_C_NT_HOSTBASED_SERVICE is declared... $ECHO_C" >&6; }
4187 +if test "${ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE+set}" = set; then
4188    echo $ECHO_N "(cached) $ECHO_C" >&6
4189  else
4190    cat >conftest.$ac_ext <<_ACEOF
4191 @@ -15851,53 +15652,31 @@
4192  cat confdefs.h >>conftest.$ac_ext
4193  cat >>conftest.$ac_ext <<_ACEOF
4194  /* end confdefs.h.  */
4195 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4196 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4197 -#define $ac_func innocuous_$ac_func
4199 -/* System header to define __stub macros and hopefully few prototypes,
4200 -    which can conflict with char $ac_func (); below.
4201 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4202 -    <limits.h> exists even on freestanding compilers.  */
4204 -#ifdef __STDC__
4205 -# include <limits.h>
4206 +#ifdef HAVE_GSSAPI_GSSAPI_H
4207 +#include <gssapi/gssapi.h>
4208  #else
4209 -# include <assert.h>
4210 -#endif
4212 -#undef $ac_func
4214 -/* Override any GCC internal prototype to avoid an error.
4215 -   Use char because int might match the return type of a GCC
4216 -   builtin and then its argument prototype would still apply.  */
4217 -#ifdef __cplusplus
4218 -extern "C"
4219 -#endif
4220 -char $ac_func ();
4221 -/* The GNU C library defines this for functions which it implements
4222 -    to always fail with ENOSYS.  Some functions are actually named
4223 -    something starting with __ and the normal name is an alias.  */
4224 -#if defined __stub_$ac_func || defined __stub___$ac_func
4225 -choke me
4226 +#include <gssapi.h>
4227  #endif
4228  
4229  int
4230  main ()
4231  {
4232 -return $ac_func ();
4233 +#ifndef GSS_C_NT_HOSTBASED_SERVICE
4234 +  (void) GSS_C_NT_HOSTBASED_SERVICE;
4235 +#endif
4237    ;
4238    return 0;
4239  }
4240  _ACEOF
4241 -rm -f conftest.$ac_objext conftest$ac_exeext
4242 -if { (ac_try="$ac_link"
4243 +rm -f conftest.$ac_objext
4244 +if { (ac_try="$ac_compile"
4245  case "(($ac_try" in
4246    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4247    *) ac_try_echo=$ac_try;;
4248  esac
4249  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4250 -  (eval "$ac_link") 2>conftest.er1
4251 +  (eval "$ac_compile") 2>conftest.er1
4252    ac_status=$?
4253    grep -v '^ *+' conftest.er1 >conftest.err
4254    rm -f conftest.er1
4255 @@ -15906,261 +15685,163 @@
4256    (exit $ac_status); } && {
4257          test -z "$ac_c_werror_flag" ||
4258          test ! -s conftest.err
4259 -       } && test -s conftest$ac_exeext &&
4260 -       $as_test_x conftest$ac_exeext; then
4261 -  eval "$as_ac_var=yes"
4262 +       } && test -s conftest.$ac_objext; then
4263 +  ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=yes
4264  else
4265    echo "$as_me: failed program was:" >&5
4266  sed 's/^/| /' conftest.$ac_ext >&5
4267  
4268 -       eval "$as_ac_var=no"
4269 +       ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=no
4270  fi
4271  
4272 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4273 -      conftest$ac_exeext conftest.$ac_ext
4274 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275  fi
4276 -ac_res=`eval echo '${'$as_ac_var'}'`
4277 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
4278 -echo "${ECHO_T}$ac_res" >&6; }
4279 -if test `eval echo '${'$as_ac_var'}'` = yes; then
4280 -  cat >>confdefs.h <<_ACEOF
4281 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4282 -_ACEOF
4284 -      ne_save_CPPFLAGS=$CPPFLAGS
4285 -      ne_save_LIBS=$NEON_LIBS
4286 -      { echo "$as_me:$LINENO: GSSAPI authentication support enabled" >&5
4287 -echo "$as_me: GSSAPI authentication support enabled" >&6;}
4288 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&5
4289 +echo "${ECHO_T}$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&6; }
4290 +if test $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE = yes; then
4291 +  :
4292 +else
4293  
4294  cat >>confdefs.h <<\_ACEOF
4295 -#define HAVE_GSSAPI 1
4296 +#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
4297  _ACEOF
4298  
4299 +fi
4300  
4301 -for ac_header in gssapi/gssapi_generic.h
4302 -do
4303 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4304 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4305 -  { echo "$as_me:$LINENO: checking for $ac_header" >&5
4306 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4307 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4308 -  echo $ECHO_N "(cached) $ECHO_C" >&6
4309  fi
4310 -ac_res=`eval echo '${'$as_ac_Header'}'`
4311 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
4312 -echo "${ECHO_T}$ac_res" >&6; }
4313 -else
4314 -  # Is the header compilable?
4315 -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
4316 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4317 -cat >conftest.$ac_ext <<_ACEOF
4318 -/* confdefs.h.  */
4319 -_ACEOF
4320 -cat confdefs.h >>conftest.$ac_ext
4321 -cat >>conftest.$ac_ext <<_ACEOF
4322 -/* end confdefs.h.  */
4323 -$ac_includes_default
4324 -#include <$ac_header>
4325 -_ACEOF
4326 -rm -f conftest.$ac_objext
4327 -if { (ac_try="$ac_compile"
4328 -case "(($ac_try" in
4329 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4330 -  *) ac_try_echo=$ac_try;;
4331 -esac
4332 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4333 -  (eval "$ac_compile") 2>conftest.er1
4334 -  ac_status=$?
4335 -  grep -v '^ *+' conftest.er1 >conftest.err
4336 -  rm -f conftest.er1
4337 -  cat conftest.err >&5
4338 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4339 -  (exit $ac_status); } && {
4340 -        test -z "$ac_c_werror_flag" ||
4341 -        test ! -s conftest.err
4342 -       } && test -s conftest.$ac_objext; then
4343 -  ac_header_compiler=yes
4344 -else
4345 -  echo "$as_me: failed program was:" >&5
4346 -sed 's/^/| /' conftest.$ac_ext >&5
4347 +done
4349 +LIBS=$ne_cf_save_LIBS
4350 +     break
4351  
4352 -       ac_header_compiler=no
4353  fi
4354  
4355 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4356 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4357 -echo "${ECHO_T}$ac_header_compiler" >&6; }
4358 +done
4359  
4360 -# Is the header present?
4361 -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
4362 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4363 -cat >conftest.$ac_ext <<_ACEOF
4364 -/* confdefs.h.  */
4365 -_ACEOF
4366 -cat confdefs.h >>conftest.$ac_ext
4367 -cat >>conftest.$ac_ext <<_ACEOF
4368 -/* end confdefs.h.  */
4369 -#include <$ac_header>
4370 -_ACEOF
4371 -if { (ac_try="$ac_cpp conftest.$ac_ext"
4372 -case "(($ac_try" in
4373 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4374 -  *) ac_try_echo=$ac_try;;
4375 -esac
4376 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4377 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4378 -  ac_status=$?
4379 -  grep -v '^ *+' conftest.er1 >conftest.err
4380 -  rm -f conftest.er1
4381 -  cat conftest.err >&5
4382 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4383 -  (exit $ac_status); } >/dev/null && {
4384 -        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4385 -        test ! -s conftest.err
4386 -       }; then
4387 -  ac_header_preproc=yes
4388 -else
4389 -  echo "$as_me: failed program was:" >&5
4390 -sed 's/^/| /' conftest.$ac_ext >&5
4391 +   CPPFLAGS=$ne_save_CPPFLAGS
4392 +   NEON_LIBS=$ne_save_LIBS
4393 +fi
4394  
4395 -  ac_header_preproc=no
4397 +# Check whether --with-libproxy was given.
4398 +if test "${with_libproxy+set}" = set; then
4399 +  withval=$with_libproxy;
4400  fi
4401  
4402 -rm -f conftest.err conftest.$ac_ext
4403 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4404 -echo "${ECHO_T}$ac_header_preproc" >&6; }
4405 +if test "x$with_libproxy" != "xno"; then
4406  
4407 -# So?  What about this header?
4408 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4409 -  yes:no: )
4410 -    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4411 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4412 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4413 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4414 -    ac_header_preproc=yes
4415 -    ;;
4416 -  no:yes:* )
4417 -    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4418 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4419 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4420 -echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4421 -    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4422 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4423 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4424 -echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4425 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4426 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4427 -    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4428 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4429 -    ( cat <<\_ASBOX
4430 -## --------------------------------- ##
4431 -## Report this to cadaver@webdav.org ##
4432 -## --------------------------------- ##
4433 -_ASBOX
4434 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
4435 -    ;;
4436 -esac
4437 -{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4438 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4439 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4442 +# Extract the first word of "pkg-config", so it can be a program name with args.
4443 +set dummy pkg-config; ac_word=$2
4444 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4445 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4446 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4447    echo $ECHO_N "(cached) $ECHO_C" >&6
4448  else
4449 -  eval "$as_ac_Header=\$ac_header_preproc"
4450 -fi
4451 -ac_res=`eval echo '${'$as_ac_Header'}'`
4452 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
4453 -echo "${ECHO_T}$ac_res" >&6; }
4454 +  case $PKG_CONFIG in
4455 +  [\\/]* | ?:[\\/]*)
4456 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4457 +  ;;
4458 +  *)
4459 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460 +for as_dir in $PATH
4461 +do
4462 +  IFS=$as_save_IFS
4463 +  test -z "$as_dir" && as_dir=.
4464 +  for ac_exec_ext in '' $ac_executable_extensions; do
4465 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4466 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4467 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4468 +    break 2
4469 +  fi
4470 +done
4471 +done
4472 +IFS=$as_save_IFS
4473  
4474 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
4475 +  ;;
4476 +esac
4477  fi
4478 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
4479 -  cat >>confdefs.h <<_ACEOF
4480 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4481 -_ACEOF
4483 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4484 +if test -n "$PKG_CONFIG"; then
4485 +  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
4486 +echo "${ECHO_T}$PKG_CONFIG" >&6; }
4487 +else
4488 +  { echo "$as_me:$LINENO: result: no" >&5
4489 +echo "${ECHO_T}no" >&6; }
4490  fi
4491  
4492 -done
4493  
4494 -      # Older versions of MIT Kerberos lack GSS_C_NT_HOSTBASED_SERVICE
4495 -      { echo "$as_me:$LINENO: checking whether GSS_C_NT_HOSTBASED_SERVICE is declared" >&5
4496 -echo $ECHO_N "checking whether GSS_C_NT_HOSTBASED_SERVICE is declared... $ECHO_C" >&6; }
4497 -if test "${ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE+set}" = set; then
4498 +if test "$PKG_CONFIG" = "no"; then
4499 +   : Not using pkg-config
4501 +NE_FLAG_LIBPXY=no
4503 +ne_LIBPXY_message="libproxy support not enabled"
4504 +  { echo "$as_me:$LINENO: libproxy support not enabled" >&5
4505 +echo "$as_me: libproxy support not enabled" >&6;}
4507 +else
4508 +   { echo "$as_me:$LINENO: checking for libproxy-1.0 pkg-config data" >&5
4509 +echo $ECHO_N "checking for libproxy-1.0 pkg-config data... $ECHO_C" >&6; }
4510 +if test "${ne_cv_pkg_libproxy_1_0+set}" = set; then
4511    echo $ECHO_N "(cached) $ECHO_C" >&6
4512  else
4513 -  cat >conftest.$ac_ext <<_ACEOF
4514 -/* confdefs.h.  */
4515 -_ACEOF
4516 -cat confdefs.h >>conftest.$ac_ext
4517 -cat >>conftest.$ac_ext <<_ACEOF
4518 -/* end confdefs.h.  */
4519 -#ifdef HAVE_GSSAPI_GSSAPI_H
4520 -#include <gssapi/gssapi.h>
4521 -#else
4522 -#include <gssapi.h>
4523 -#endif
4524 +  if $PKG_CONFIG libproxy-1.0; then
4525 +        ne_cv_pkg_libproxy_1_0=yes
4526 +      else
4527 +        ne_cv_pkg_libproxy_1_0=no
4528 +      fi
4529 +fi
4530 +{ echo "$as_me:$LINENO: result: $ne_cv_pkg_libproxy_1_0" >&5
4531 +echo "${ECHO_T}$ne_cv_pkg_libproxy_1_0" >&6; }
4532  
4533 -int
4534 -main ()
4535 -{
4536 -#ifndef GSS_C_NT_HOSTBASED_SERVICE
4537 -  (void) GSS_C_NT_HOSTBASED_SERVICE;
4538 -#endif
4539 +   if test "$ne_cv_pkg_libproxy_1_0" = "yes"; then
4540 +      NE_PXY_CFLAGS=`$PKG_CONFIG --cflags libproxy-1.0`
4541 +      NE_PXY_LIBS=`$PKG_CONFIG --libs libproxy-1.0`
4542 +      : Using provided pkg-config data
4543  
4544 -  ;
4545 -  return 0;
4546 -}
4547 +cat >>confdefs.h <<\_ACEOF
4548 +#define HAVE_LIBPROXY 1
4549  _ACEOF
4550 -rm -f conftest.$ac_objext
4551 -if { (ac_try="$ac_compile"
4552 -case "(($ac_try" in
4553 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4554 -  *) ac_try_echo=$ac_try;;
4555 -esac
4556 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4557 -  (eval "$ac_compile") 2>conftest.er1
4558 -  ac_status=$?
4559 -  grep -v '^ *+' conftest.er1 >conftest.err
4560 -  rm -f conftest.er1
4561 -  cat conftest.err >&5
4562 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4563 -  (exit $ac_status); } && {
4564 -        test -z "$ac_c_werror_flag" ||
4565 -        test ! -s conftest.err
4566 -       } && test -s conftest.$ac_objext; then
4567 -  ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=yes
4568 -else
4569 -  echo "$as_me: failed program was:" >&5
4570 -sed 's/^/| /' conftest.$ac_ext >&5
4571  
4572 -       ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=no
4573 -fi
4574 +      CPPFLAGS="$CPPFLAGS $NE_PXY_CFLAGS"
4575 +      NEON_LIBS="$NEON_LIBS ${NE_PXY_LIBS}"
4577 +NE_FLAG_LIBPXY=yes
4578  
4579 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4580 -fi
4581 -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&5
4582 -echo "${ECHO_T}$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&6; }
4583 -if test $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE = yes; then
4584 -  :
4585 -else
4586  
4587  cat >>confdefs.h <<\_ACEOF
4588 -#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
4589 +#define NE_HAVE_LIBPXY 1
4590  _ACEOF
4591  
4592 -fi
4593 +ne_LIBPXY_message="libproxy support enabled"
4594 +  { echo "$as_me:$LINENO: libproxy support enabled" >&5
4595 +echo "$as_me: libproxy support enabled" >&6;}
4596  
4597 -fi
4598 -done
4599 +   else
4600 +      : No pkg-config for libproxy-1.0 provided
4601  
4602 -LIBS=$ne_cf_save_LIBS
4603 -     break
4604 +NE_FLAG_LIBPXY=no
4606 +ne_LIBPXY_message="libproxy support not enabled"
4607 +  { echo "$as_me:$LINENO: libproxy support not enabled" >&5
4608 +echo "$as_me: libproxy support not enabled" >&6;}
4609  
4610 +   fi
4611  fi
4612  
4613 -done
4614  
4615 -   CPPFLAGS=$ne_save_CPPFLAGS
4616 -   NEON_LIBS=$ne_save_LIBS
4618 +else
4620 +NE_FLAG_LIBPXY=no
4622 +ne_LIBPXY_message="libproxy support not enabled"
4623 +  { echo "$as_me:$LINENO: libproxy support not enabled" >&5
4624 +echo "$as_me: libproxy support not enabled" >&6;}
4626  fi
4627  
4628  
4629 @@ -16168,6 +15849,7 @@
4630  
4631  
4632  
4634      CFLAGS="$CFLAGS -I$neon_bundled_srcdir"
4635      NEON_LIBS="-L$neon_bundled_builddir -lneon $NEON_LIBS"
4636      NEON_NEED_XML_PARSER=yes
4637 @@ -17019,6 +16701,10 @@
4638  #define HAVE_EXPAT 1
4639  _ACEOF
4640  
4641 +       cat >>confdefs.h <<_ACEOF
4642 +#define NE_FMT_XML_SIZE "d"
4643 +_ACEOF
4645         CPPFLAGS="$CPPFLAGS -I$ne_expdir"
4646         if test "x${NEON_TARGET}" = "xlibneon.la"; then
4647           NEON_LTLIBS=$with_expat
4648 @@ -18540,7 +18226,11 @@
4649  echo "$as_me: WebDAV support is not enabled" >&6;}
4650  
4651  
4652 -: Disabled for 0.28 to retain 0.27 ABI
4653 +if test "x${NE_LIBTOOL_RELEASE}y" = "xy"; then
4654 +   NE_LIBTOOL_RELEASE="NODAV"
4655 +else
4656 +   NE_LIBTOOL_RELEASE="${NE_LIBTOOL_RELEASE}-NODAV"
4657 +fi
4658  
4659  else
4660    # WebDAV support
4661 @@ -19646,10 +19336,13 @@
4662  fi
4663  
4664  
4665 +jm_PREREQ_TEMPNAME
4666  
4667 -  { echo "$as_me:$LINENO: checking for unsigned long long" >&5
4668 -echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; }
4669 -if test "${ac_cv_type_unsigned_long_long+set}" = set; then
4671 +# Check for snprintf
4672 +{ echo "$as_me:$LINENO: checking for snprintf" >&5
4673 +echo $ECHO_N "checking for snprintf... $ECHO_C" >&6; }
4674 +if test "${ac_cv_func_snprintf+set}" = set; then
4675    echo $ECHO_N "(cached) $ECHO_C" >&6
4676  else
4677    cat >conftest.$ac_ext <<_ACEOF
4678 @@ -19658,12 +19351,41 @@
4679  cat confdefs.h >>conftest.$ac_ext
4680  cat >>conftest.$ac_ext <<_ACEOF
4681  /* end confdefs.h.  */
4682 -unsigned long long ull = 1; int i = 63;
4683 +/* Define snprintf to an innocuous variant, in case <limits.h> declares snprintf.
4684 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4685 +#define snprintf innocuous_snprintf
4687 +/* System header to define __stub macros and hopefully few prototypes,
4688 +    which can conflict with char snprintf (); below.
4689 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4690 +    <limits.h> exists even on freestanding compilers.  */
4692 +#ifdef __STDC__
4693 +# include <limits.h>
4694 +#else
4695 +# include <assert.h>
4696 +#endif
4698 +#undef snprintf
4700 +/* Override any GCC internal prototype to avoid an error.
4701 +   Use char because int might match the return type of a GCC
4702 +   builtin and then its argument prototype would still apply.  */
4703 +#ifdef __cplusplus
4704 +extern "C"
4705 +#endif
4706 +char snprintf ();
4707 +/* The GNU C library defines this for functions which it implements
4708 +    to always fail with ENOSYS.  Some functions are actually named
4709 +    something starting with __ and the normal name is an alias.  */
4710 +#if defined __stub_snprintf || defined __stub___snprintf
4711 +choke me
4712 +#endif
4714  int
4715  main ()
4716  {
4717 -unsigned long long ullmax = (unsigned long long) -1;
4718 -     return ull << i | ull >> i | ullmax / ull | ullmax % ull;
4719 +return snprintf ();
4720    ;
4721    return 0;
4722  }
4723 @@ -19686,100 +19408,141 @@
4724          test ! -s conftest.err
4725         } && test -s conftest$ac_exeext &&
4726         $as_test_x conftest$ac_exeext; then
4727 -  ac_cv_type_unsigned_long_long=yes
4728 +  ac_cv_func_snprintf=yes
4729  else
4730    echo "$as_me: failed program was:" >&5
4731  sed 's/^/| /' conftest.$ac_ext >&5
4732  
4733 -       ac_cv_type_unsigned_long_long=no
4734 +       ac_cv_func_snprintf=no
4735  fi
4736  
4737  rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4738        conftest$ac_exeext conftest.$ac_ext
4739  fi
4740 -{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
4741 -echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; }
4742 -  if test $ac_cv_type_unsigned_long_long = yes; then
4743 +{ echo "$as_me:$LINENO: result: $ac_cv_func_snprintf" >&5
4744 +echo "${ECHO_T}$ac_cv_func_snprintf" >&6; }
4745 +if test $ac_cv_func_snprintf = yes; then
4746 +  :
4747 +else
4749  
4750  cat >>confdefs.h <<\_ACEOF
4751 -#define HAVE_UNSIGNED_LONG_LONG 1
4752 +#define HAVE_SNPRINTF_H 1
4753  _ACEOF
4754  
4755 -  fi
4756 +       case " $LIBOBJS " in
4757 +  *" lib/snprintf.$ac_objext "* ) ;;
4758 +  *) LIBOBJS="$LIBOBJS lib/snprintf.$ac_objext"
4759 + ;;
4760 +esac
4762 +fi
4763  
4764  
4765  
4766 -  { echo "$as_me:$LINENO: checking for uintmax_t" >&5
4767 -echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6; }
4768 -if test "${ac_cv_type_uintmax_t+set}" = set; then
4769 +{ echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
4770 +echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6; }
4771 +if test "${ac_cv_func_fnmatch_works+set}" = set; then
4772    echo $ECHO_N "(cached) $ECHO_C" >&6
4773  else
4774 +  # Some versions of Solaris, SCO, and the GNU C Library
4775 +   # have a broken or incompatible fnmatch.
4776 +   # So we run a test program.  If we are cross-compiling, take no chance.
4777 +   # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
4778 +   if test "$cross_compiling" = yes; then
4779 +  ac_cv_func_fnmatch_works=cross
4780 +else
4781    cat >conftest.$ac_ext <<_ACEOF
4782  /* confdefs.h.  */
4783  _ACEOF
4784  cat confdefs.h >>conftest.$ac_ext
4785  cat >>conftest.$ac_ext <<_ACEOF
4786  /* end confdefs.h.  */
4787 -$ac_includes_default
4788 -typedef uintmax_t ac__type_new_;
4789 -int
4790 -main ()
4791 -{
4792 -if ((ac__type_new_ *) 0)
4793 -  return 0;
4794 -if (sizeof (ac__type_new_))
4795 -  return 0;
4796 +#include <fnmatch.h>
4797 +#         define y(a, b, c) (fnmatch (a, b, c) == 0)
4798 +#         define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
4800 +int
4801 +main ()
4802 +{
4803 +return
4804 +          (!(y ("a*", "abc", 0)
4805 +             && n ("d*/*1", "d/s/1", FNM_PATHNAME)
4806 +             && y ("a\\\\bc", "abc", 0)
4807 +             && n ("a\\\\bc", "abc", FNM_NOESCAPE)
4808 +             && y ("*x", ".x", 0)
4809 +             && n ("*x", ".x", FNM_PERIOD)
4810 +             && 1));
4811    ;
4812    return 0;
4813  }
4814  _ACEOF
4815 -rm -f conftest.$ac_objext
4816 -if { (ac_try="$ac_compile"
4817 +rm -f conftest$ac_exeext
4818 +if { (ac_try="$ac_link"
4819  case "(($ac_try" in
4820    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4821    *) ac_try_echo=$ac_try;;
4822  esac
4823  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4824 -  (eval "$ac_compile") 2>conftest.er1
4825 +  (eval "$ac_link") 2>&5
4826    ac_status=$?
4827 -  grep -v '^ *+' conftest.er1 >conftest.err
4828 -  rm -f conftest.er1
4829 -  cat conftest.err >&5
4830    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831 -  (exit $ac_status); } && {
4832 -        test -z "$ac_c_werror_flag" ||
4833 -        test ! -s conftest.err
4834 -       } && test -s conftest.$ac_objext; then
4835 -  ac_cv_type_uintmax_t=yes
4836 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4837 +  { (case "(($ac_try" in
4838 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4839 +  *) ac_try_echo=$ac_try;;
4840 +esac
4841 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4842 +  (eval "$ac_try") 2>&5
4843 +  ac_status=$?
4844 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4845 +  (exit $ac_status); }; }; then
4846 +  ac_cv_func_fnmatch_works=yes
4847  else
4848 -  echo "$as_me: failed program was:" >&5
4849 +  echo "$as_me: program exited with status $ac_status" >&5
4850 +echo "$as_me: failed program was:" >&5
4851  sed 's/^/| /' conftest.$ac_ext >&5
4852  
4853 -       ac_cv_type_uintmax_t=no
4854 +( exit $ac_status )
4855 +ac_cv_func_fnmatch_works=no
4856 +fi
4857 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4858  fi
4859  
4860 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4862  fi
4863 -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
4864 -echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6; }
4865 -if test $ac_cv_type_uintmax_t = yes; then
4866 -  :
4867 -else
4868 -  test $ac_cv_type_unsigned_long_long = yes \
4869 -       && ac_type='unsigned long long' \
4870 -       || ac_type='unsigned long'
4871 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5
4872 +echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6; }
4873 +if test $ac_cv_func_fnmatch_works = yes; then
4874  
4875 -cat >>confdefs.h <<_ACEOF
4876 -#define uintmax_t $ac_type
4877 +cat >>confdefs.h <<\_ACEOF
4878 +#define HAVE_FNMATCH 1
4879  _ACEOF
4880  
4881  fi
4882  
4883  
4884  
4885 -  { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4886 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4887 -if test "${ac_cv_header_stdc+set}" = set; then
4888 +if test $ac_cv_func_fnmatch_works = no; then
4889 +  case " $LIBOBJS " in
4890 +  *" lib/fnmatch.$ac_objext "* ) ;;
4891 +  *) LIBOBJS="$LIBOBJS lib/fnmatch.$ac_objext"
4892 + ;;
4893 +esac
4895 +fi
4902 +ac_header_dirent=no
4903 +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4904 +  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4905 +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4906 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
4907 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4908    echo $ECHO_N "(cached) $ECHO_C" >&6
4909  else
4910    cat >conftest.$ac_ext <<_ACEOF
4911 @@ -19788,15 +19551,14 @@
4912  cat confdefs.h >>conftest.$ac_ext
4913  cat >>conftest.$ac_ext <<_ACEOF
4914  /* end confdefs.h.  */
4915 -#include <stdlib.h>
4916 -#include <stdarg.h>
4917 -#include <string.h>
4918 -#include <float.h>
4919 +#include <sys/types.h>
4920 +#include <$ac_hdr>
4921  
4922  int
4923  main ()
4924  {
4926 +if ((DIR *) 0)
4927 +return 0;
4928    ;
4929    return 0;
4930  }
4931 @@ -19818,178 +19580,157 @@
4932          test -z "$ac_c_werror_flag" ||
4933          test ! -s conftest.err
4934         } && test -s conftest.$ac_objext; then
4935 -  ac_cv_header_stdc=yes
4936 +  eval "$as_ac_Header=yes"
4937  else
4938    echo "$as_me: failed program was:" >&5
4939  sed 's/^/| /' conftest.$ac_ext >&5
4940  
4941 -       ac_cv_header_stdc=no
4942 +       eval "$as_ac_Header=no"
4943  fi
4944  
4945  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4947 -if test $ac_cv_header_stdc = yes; then
4948 -  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4949 -  cat >conftest.$ac_ext <<_ACEOF
4950 -/* confdefs.h.  */
4951 -_ACEOF
4952 -cat confdefs.h >>conftest.$ac_ext
4953 -cat >>conftest.$ac_ext <<_ACEOF
4954 -/* end confdefs.h.  */
4955 -#include <string.h>
4957 -_ACEOF
4958 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4959 -  $EGREP "memchr" >/dev/null 2>&1; then
4960 -  :
4961 -else
4962 -  ac_cv_header_stdc=no
4963 -fi
4964 -rm -f conftest*
4966  fi
4968 -if test $ac_cv_header_stdc = yes; then
4969 -  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4970 -  cat >conftest.$ac_ext <<_ACEOF
4971 -/* confdefs.h.  */
4972 -_ACEOF
4973 -cat confdefs.h >>conftest.$ac_ext
4974 -cat >>conftest.$ac_ext <<_ACEOF
4975 -/* end confdefs.h.  */
4976 -#include <stdlib.h>
4978 +ac_res=`eval echo '${'$as_ac_Header'}'`
4979 +              { echo "$as_me:$LINENO: result: $ac_res" >&5
4980 +echo "${ECHO_T}$ac_res" >&6; }
4981 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
4982 +  cat >>confdefs.h <<_ACEOF
4983 +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4984  _ACEOF
4985 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4986 -  $EGREP "free" >/dev/null 2>&1; then
4987 -  :
4988 -else
4989 -  ac_cv_header_stdc=no
4990 -fi
4991 -rm -f conftest*
4992  
4993 +ac_header_dirent=$ac_hdr; break
4994  fi
4995  
4996 -if test $ac_cv_header_stdc = yes; then
4997 -  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4998 -  if test "$cross_compiling" = yes; then
4999 -  :
5000 +done
5001 +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5002 +if test $ac_header_dirent = dirent.h; then
5003 +  { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5004 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5005 +if test "${ac_cv_search_opendir+set}" = set; then
5006 +  echo $ECHO_N "(cached) $ECHO_C" >&6
5007  else
5008 -  cat >conftest.$ac_ext <<_ACEOF
5009 +  ac_func_search_save_LIBS=$LIBS
5010 +cat >conftest.$ac_ext <<_ACEOF
5011  /* confdefs.h.  */
5012  _ACEOF
5013  cat confdefs.h >>conftest.$ac_ext
5014  cat >>conftest.$ac_ext <<_ACEOF
5015  /* end confdefs.h.  */
5016 -#include <ctype.h>
5017 -#include <stdlib.h>
5018 -#if ((' ' & 0x0FF) == 0x020)
5019 -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5020 -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5021 -#else
5022 -# define ISLOWER(c) \
5023 -                  (('a' <= (c) && (c) <= 'i') \
5024 -                    || ('j' <= (c) && (c) <= 'r') \
5025 -                    || ('s' <= (c) && (c) <= 'z'))
5026 -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5027 -#endif
5028  
5029 -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5030 +/* Override any GCC internal prototype to avoid an error.
5031 +   Use char because int might match the return type of a GCC
5032 +   builtin and then its argument prototype would still apply.  */
5033 +#ifdef __cplusplus
5034 +extern "C"
5035 +#endif
5036 +char opendir ();
5037  int
5038  main ()
5039  {
5040 -  int i;
5041 -  for (i = 0; i < 256; i++)
5042 -    if (XOR (islower (i), ISLOWER (i))
5043 -       || toupper (i) != TOUPPER (i))
5044 -      return 2;
5045 +return opendir ();
5046 +  ;
5047    return 0;
5048  }
5049  _ACEOF
5050 -rm -f conftest$ac_exeext
5051 +for ac_lib in '' dir; do
5052 +  if test -z "$ac_lib"; then
5053 +    ac_res="none required"
5054 +  else
5055 +    ac_res=-l$ac_lib
5056 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5057 +  fi
5058 +  rm -f conftest.$ac_objext conftest$ac_exeext
5059  if { (ac_try="$ac_link"
5060  case "(($ac_try" in
5061    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5062    *) ac_try_echo=$ac_try;;
5063  esac
5064  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5065 -  (eval "$ac_link") 2>&5
5066 -  ac_status=$?
5067 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5069 -  { (case "(($ac_try" in
5070 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071 -  *) ac_try_echo=$ac_try;;
5072 -esac
5073 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5074 -  (eval "$ac_try") 2>&5
5075 +  (eval "$ac_link") 2>conftest.er1
5076    ac_status=$?
5077 +  grep -v '^ *+' conftest.er1 >conftest.err
5078 +  rm -f conftest.er1
5079 +  cat conftest.err >&5
5080    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 -  (exit $ac_status); }; }; then
5082 -  :
5083 +  (exit $ac_status); } && {
5084 +        test -z "$ac_c_werror_flag" ||
5085 +        test ! -s conftest.err
5086 +       } && test -s conftest$ac_exeext &&
5087 +       $as_test_x conftest$ac_exeext; then
5088 +  ac_cv_search_opendir=$ac_res
5089  else
5090 -  echo "$as_me: program exited with status $ac_status" >&5
5091 -echo "$as_me: failed program was:" >&5
5092 +  echo "$as_me: failed program was:" >&5
5093  sed 's/^/| /' conftest.$ac_ext >&5
5094  
5095 -( exit $ac_status )
5096 -ac_cv_header_stdc=no
5097 -fi
5098 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5099 -fi
5100  
5101 +fi
5102  
5103 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5104 +      conftest$ac_exeext
5105 +  if test "${ac_cv_search_opendir+set}" = set; then
5106 +  break
5107  fi
5108 +done
5109 +if test "${ac_cv_search_opendir+set}" = set; then
5110 +  :
5111 +else
5112 +  ac_cv_search_opendir=no
5113  fi
5114 -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5115 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
5116 -if test $ac_cv_header_stdc = yes; then
5118 -cat >>confdefs.h <<\_ACEOF
5119 -#define STDC_HEADERS 1
5120 -_ACEOF
5121 +rm conftest.$ac_ext
5122 +LIBS=$ac_func_search_save_LIBS
5123 +fi
5124 +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5125 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5126 +ac_res=$ac_cv_search_opendir
5127 +if test "$ac_res" != no; then
5128 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5129  
5130  fi
5131  
5132 -  { echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
5133 -echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; }
5134 -if test "${ac_cv_header_stat_broken+set}" = set; then
5135 +else
5136 +  { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5137 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5138 +if test "${ac_cv_search_opendir+set}" = set; then
5139    echo $ECHO_N "(cached) $ECHO_C" >&6
5140  else
5141 -  cat >conftest.$ac_ext <<_ACEOF
5142 +  ac_func_search_save_LIBS=$LIBS
5143 +cat >conftest.$ac_ext <<_ACEOF
5144  /* confdefs.h.  */
5145  _ACEOF
5146  cat confdefs.h >>conftest.$ac_ext
5147  cat >>conftest.$ac_ext <<_ACEOF
5148  /* end confdefs.h.  */
5149 -#include <sys/types.h>
5150 -#include <sys/stat.h>
5151  
5152 -#if defined S_ISBLK && defined S_IFDIR
5153 -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
5154 -#endif
5156 -#if defined S_ISBLK && defined S_IFCHR
5157 -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
5158 -#endif
5160 -#if defined S_ISLNK && defined S_IFREG
5161 -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
5162 -#endif
5164 -#if defined S_ISSOCK && defined S_IFREG
5165 -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
5166 +/* Override any GCC internal prototype to avoid an error.
5167 +   Use char because int might match the return type of a GCC
5168 +   builtin and then its argument prototype would still apply.  */
5169 +#ifdef __cplusplus
5170 +extern "C"
5171  #endif
5173 +char opendir ();
5174 +int
5175 +main ()
5176 +{
5177 +return opendir ();
5178 +  ;
5179 +  return 0;
5180 +}
5181  _ACEOF
5182 -rm -f conftest.$ac_objext
5183 -if { (ac_try="$ac_compile"
5184 +for ac_lib in '' x; do
5185 +  if test -z "$ac_lib"; then
5186 +    ac_res="none required"
5187 +  else
5188 +    ac_res=-l$ac_lib
5189 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5190 +  fi
5191 +  rm -f conftest.$ac_objext conftest$ac_exeext
5192 +if { (ac_try="$ac_link"
5193  case "(($ac_try" in
5194    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5195    *) ac_try_echo=$ac_try;;
5196  esac
5197  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5198 -  (eval "$ac_compile") 2>conftest.er1
5199 +  (eval "$ac_link") 2>conftest.er1
5200    ac_status=$?
5201    grep -v '^ *+' conftest.er1 >conftest.err
5202    rm -f conftest.er1
5203 @@ -19998,55 +19739,62 @@
5204    (exit $ac_status); } && {
5205          test -z "$ac_c_werror_flag" ||
5206          test ! -s conftest.err
5207 -       } && test -s conftest.$ac_objext; then
5208 -  ac_cv_header_stat_broken=no
5209 +       } && test -s conftest$ac_exeext &&
5210 +       $as_test_x conftest$ac_exeext; then
5211 +  ac_cv_search_opendir=$ac_res
5212  else
5213    echo "$as_me: failed program was:" >&5
5214  sed 's/^/| /' conftest.$ac_ext >&5
5215  
5216 -       ac_cv_header_stat_broken=yes
5217 -fi
5218  
5219 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5220  fi
5221 -{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
5222 -echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; }
5223 -if test $ac_cv_header_stat_broken = yes; then
5225 -cat >>confdefs.h <<\_ACEOF
5226 -#define STAT_MACROS_BROKEN 1
5227 -_ACEOF
5228  
5229 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5230 +      conftest$ac_exeext
5231 +  if test "${ac_cv_search_opendir+set}" = set; then
5232 +  break
5233  fi
5234 +done
5235 +if test "${ac_cv_search_opendir+set}" = set; then
5236 +  :
5237 +else
5238 +  ac_cv_search_opendir=no
5239 +fi
5240 +rm conftest.$ac_ext
5241 +LIBS=$ac_func_search_save_LIBS
5242 +fi
5243 +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5244 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5245 +ac_res=$ac_cv_search_opendir
5246 +if test "$ac_res" != no; then
5247 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5248  
5249 +fi
5250  
5251 +fi
5252  
5253  
5255 -for ac_header in fcntl.h sys/time.h stdint.h unistd.h
5256 -do
5257 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5258 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5259 -  { echo "$as_me:$LINENO: checking for $ac_header" >&5
5260 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5261 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5262 +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5263 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
5264 +if test "${ac_cv_type_signal+set}" = set; then
5265    echo $ECHO_N "(cached) $ECHO_C" >&6
5266 -fi
5267 -ac_res=`eval echo '${'$as_ac_Header'}'`
5268 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
5269 -echo "${ECHO_T}$ac_res" >&6; }
5270  else
5271 -  # Is the header compilable?
5272 -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5273 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5274 -cat >conftest.$ac_ext <<_ACEOF
5275 +  cat >conftest.$ac_ext <<_ACEOF
5276  /* confdefs.h.  */
5277  _ACEOF
5278  cat confdefs.h >>conftest.$ac_ext
5279  cat >>conftest.$ac_ext <<_ACEOF
5280  /* end confdefs.h.  */
5281 -$ac_includes_default
5282 -#include <$ac_header>
5283 +#include <sys/types.h>
5284 +#include <signal.h>
5286 +int
5287 +main ()
5288 +{
5289 +return *(signal (0, 0)) (0) == 1;
5290 +  ;
5291 +  return 0;
5292 +}
5293  _ACEOF
5294  rm -f conftest.$ac_objext
5295  if { (ac_try="$ac_compile"
5296 @@ -20065,111 +19813,34 @@
5297          test -z "$ac_c_werror_flag" ||
5298          test ! -s conftest.err
5299         } && test -s conftest.$ac_objext; then
5300 -  ac_header_compiler=yes
5301 +  ac_cv_type_signal=int
5302  else
5303    echo "$as_me: failed program was:" >&5
5304  sed 's/^/| /' conftest.$ac_ext >&5
5305  
5306 -       ac_header_compiler=no
5307 +       ac_cv_type_signal=void
5308  fi
5309  
5310  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5311 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5312 -echo "${ECHO_T}$ac_header_compiler" >&6; }
5313 +fi
5314 +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5315 +echo "${ECHO_T}$ac_cv_type_signal" >&6; }
5316  
5317 -# Is the header present?
5318 -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5319 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5320 -cat >conftest.$ac_ext <<_ACEOF
5321 -/* confdefs.h.  */
5322 -_ACEOF
5323 -cat confdefs.h >>conftest.$ac_ext
5324 -cat >>conftest.$ac_ext <<_ACEOF
5325 -/* end confdefs.h.  */
5326 -#include <$ac_header>
5327 +cat >>confdefs.h <<_ACEOF
5328 +#define RETSIGTYPE $ac_cv_type_signal
5329  _ACEOF
5330 -if { (ac_try="$ac_cpp conftest.$ac_ext"
5331 -case "(($ac_try" in
5332 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5333 -  *) ac_try_echo=$ac_try;;
5334 -esac
5335 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5336 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5337 -  ac_status=$?
5338 -  grep -v '^ *+' conftest.er1 >conftest.err
5339 -  rm -f conftest.er1
5340 -  cat conftest.err >&5
5341 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 -  (exit $ac_status); } >/dev/null && {
5343 -        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5344 -        test ! -s conftest.err
5345 -       }; then
5346 -  ac_header_preproc=yes
5347 -else
5348 -  echo "$as_me: failed program was:" >&5
5349 -sed 's/^/| /' conftest.$ac_ext >&5
5350  
5351 -  ac_header_preproc=no
5352 -fi
5353  
5354 -rm -f conftest.err conftest.$ac_ext
5355 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5356 -echo "${ECHO_T}$ac_header_preproc" >&6; }
5357  
5358 -# So?  What about this header?
5359 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5360 -  yes:no: )
5361 -    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5362 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5363 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5364 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5365 -    ac_header_preproc=yes
5366 -    ;;
5367 -  no:yes:* )
5368 -    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5369 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5370 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5371 -echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5372 -    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5373 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5374 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5375 -echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5376 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5377 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5378 -    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5379 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5380 -    ( cat <<\_ASBOX
5381 -## --------------------------------- ##
5382 -## Report this to cadaver@webdav.org ##
5383 -## --------------------------------- ##
5384 -_ASBOX
5385 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
5386 -    ;;
5387 -esac
5388 -{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5389 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5390 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5391 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5392 -else
5393 -  eval "$as_ac_Header=\$ac_header_preproc"
5394 -fi
5395 -ac_res=`eval echo '${'$as_ac_Header'}'`
5396 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
5397 -echo "${ECHO_T}$ac_res" >&6; }
5398  
5399 -fi
5400 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
5401 -  cat >>confdefs.h <<_ACEOF
5402 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5403 -_ACEOF
5404  
5405 -fi
5406  
5407 -done
5408  
5409  
5410  
5411 -for ac_func in __secure_getenv gettimeofday
5414 +for ac_func in strdup strerror memcpy strcoll tcsetattr getpass stty fchmod
5415  do
5416  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5417  { echo "$as_me:$LINENO: checking for $ac_func" >&5
5418 @@ -20262,28 +19933,40 @@
5419  fi
5420  done
5421  
5422 -  { echo "$as_me:$LINENO: checking whether getenv is declared" >&5
5423 -echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6; }
5424 -if test "${ac_cv_have_decl_getenv+set}" = set; then
5435 +for ac_header in sys/time.h pwd.h stdarg.h vmsdir.h memory.h alloca.h ncurses.h sgtty.h termios.h termio.h
5436 +do
5437 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5438 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5439 +  { echo "$as_me:$LINENO: checking for $ac_header" >&5
5440 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5441 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5442    echo $ECHO_N "(cached) $ECHO_C" >&6
5443 +fi
5444 +ac_res=`eval echo '${'$as_ac_Header'}'`
5445 +              { echo "$as_me:$LINENO: result: $ac_res" >&5
5446 +echo "${ECHO_T}$ac_res" >&6; }
5447  else
5448 -  cat >conftest.$ac_ext <<_ACEOF
5449 +  # Is the header compilable?
5450 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5451 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5452 +cat >conftest.$ac_ext <<_ACEOF
5453  /* confdefs.h.  */
5454  _ACEOF
5455  cat confdefs.h >>conftest.$ac_ext
5456  cat >>conftest.$ac_ext <<_ACEOF
5457  /* end confdefs.h.  */
5458  $ac_includes_default
5459 -int
5460 -main ()
5461 -{
5462 -#ifndef getenv
5463 -  (void) getenv;
5464 -#endif
5466 -  ;
5467 -  return 0;
5468 -}
5469 +#include <$ac_header>
5470  _ACEOF
5471  rm -f conftest.$ac_objext
5472  if { (ac_try="$ac_compile"
5473 @@ -20302,987 +19985,110 @@
5474          test -z "$ac_c_werror_flag" ||
5475          test ! -s conftest.err
5476         } && test -s conftest.$ac_objext; then
5477 -  ac_cv_have_decl_getenv=yes
5478 +  ac_header_compiler=yes
5479  else
5480    echo "$as_me: failed program was:" >&5
5481  sed 's/^/| /' conftest.$ac_ext >&5
5482  
5483 -       ac_cv_have_decl_getenv=no
5484 +       ac_header_compiler=no
5485  fi
5486  
5487  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488 -fi
5489 -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
5490 -echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6; }
5491 -if test $ac_cv_have_decl_getenv = yes; then
5493 -cat >>confdefs.h <<_ACEOF
5494 -#define HAVE_DECL_GETENV 1
5495 -_ACEOF
5498 -else
5499 -  cat >>confdefs.h <<_ACEOF
5500 -#define HAVE_DECL_GETENV 0
5501 -_ACEOF
5504 -fi
5510 +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5511 +echo "${ECHO_T}$ac_header_compiler" >&6; }
5512  
5513 -# Check for snprintf
5514 -{ echo "$as_me:$LINENO: checking for snprintf" >&5
5515 -echo $ECHO_N "checking for snprintf... $ECHO_C" >&6; }
5516 -if test "${ac_cv_func_snprintf+set}" = set; then
5517 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5518 -else
5519 -  cat >conftest.$ac_ext <<_ACEOF
5520 +# Is the header present?
5521 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5522 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5523 +cat >conftest.$ac_ext <<_ACEOF
5524  /* confdefs.h.  */
5525  _ACEOF
5526  cat confdefs.h >>conftest.$ac_ext
5527  cat >>conftest.$ac_ext <<_ACEOF
5528  /* end confdefs.h.  */
5529 -/* Define snprintf to an innocuous variant, in case <limits.h> declares snprintf.
5530 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5531 -#define snprintf innocuous_snprintf
5533 -/* System header to define __stub macros and hopefully few prototypes,
5534 -    which can conflict with char snprintf (); below.
5535 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5536 -    <limits.h> exists even on freestanding compilers.  */
5538 -#ifdef __STDC__
5539 -# include <limits.h>
5540 -#else
5541 -# include <assert.h>
5542 -#endif
5544 -#undef snprintf
5546 -/* Override any GCC internal prototype to avoid an error.
5547 -   Use char because int might match the return type of a GCC
5548 -   builtin and then its argument prototype would still apply.  */
5549 -#ifdef __cplusplus
5550 -extern "C"
5551 -#endif
5552 -char snprintf ();
5553 -/* The GNU C library defines this for functions which it implements
5554 -    to always fail with ENOSYS.  Some functions are actually named
5555 -    something starting with __ and the normal name is an alias.  */
5556 -#if defined __stub_snprintf || defined __stub___snprintf
5557 -choke me
5558 -#endif
5560 -int
5561 -main ()
5562 -{
5563 -return snprintf ();
5564 -  ;
5565 -  return 0;
5566 -}
5567 -_ACEOF
5568 -rm -f conftest.$ac_objext conftest$ac_exeext
5569 -if { (ac_try="$ac_link"
5570 -case "(($ac_try" in
5571 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5572 -  *) ac_try_echo=$ac_try;;
5573 -esac
5574 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5575 -  (eval "$ac_link") 2>conftest.er1
5576 -  ac_status=$?
5577 -  grep -v '^ *+' conftest.er1 >conftest.err
5578 -  rm -f conftest.er1
5579 -  cat conftest.err >&5
5580 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 -  (exit $ac_status); } && {
5582 -        test -z "$ac_c_werror_flag" ||
5583 -        test ! -s conftest.err
5584 -       } && test -s conftest$ac_exeext &&
5585 -       $as_test_x conftest$ac_exeext; then
5586 -  ac_cv_func_snprintf=yes
5587 -else
5588 -  echo "$as_me: failed program was:" >&5
5589 -sed 's/^/| /' conftest.$ac_ext >&5
5591 -       ac_cv_func_snprintf=no
5592 -fi
5594 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5595 -      conftest$ac_exeext conftest.$ac_ext
5596 -fi
5597 -{ echo "$as_me:$LINENO: result: $ac_cv_func_snprintf" >&5
5598 -echo "${ECHO_T}$ac_cv_func_snprintf" >&6; }
5599 -if test $ac_cv_func_snprintf = yes; then
5600 -  :
5601 -else
5604 -cat >>confdefs.h <<\_ACEOF
5605 -#define HAVE_SNPRINTF_H 1
5606 -_ACEOF
5608 -       case " $LIBOBJS " in
5609 -  *" lib/snprintf.$ac_objext "* ) ;;
5610 -  *) LIBOBJS="$LIBOBJS lib/snprintf.$ac_objext"
5611 - ;;
5612 -esac
5614 -fi
5618 -{ echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
5619 -echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6; }
5620 -if test "${ac_cv_func_fnmatch_works+set}" = set; then
5621 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5622 -else
5623 -  # Some versions of Solaris, SCO, and the GNU C Library
5624 -   # have a broken or incompatible fnmatch.
5625 -   # So we run a test program.  If we are cross-compiling, take no chance.
5626 -   # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
5627 -   if test "$cross_compiling" = yes; then
5628 -  ac_cv_func_fnmatch_works=cross
5629 -else
5630 -  cat >conftest.$ac_ext <<_ACEOF
5631 -/* confdefs.h.  */
5632 -_ACEOF
5633 -cat confdefs.h >>conftest.$ac_ext
5634 -cat >>conftest.$ac_ext <<_ACEOF
5635 -/* end confdefs.h.  */
5636 -#include <fnmatch.h>
5637 -#         define y(a, b, c) (fnmatch (a, b, c) == 0)
5638 -#         define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
5640 -int
5641 -main ()
5642 -{
5643 -return
5644 -          (!(y ("a*", "abc", 0)
5645 -             && n ("d*/*1", "d/s/1", FNM_PATHNAME)
5646 -             && y ("a\\\\bc", "abc", 0)
5647 -             && n ("a\\\\bc", "abc", FNM_NOESCAPE)
5648 -             && y ("*x", ".x", 0)
5649 -             && n ("*x", ".x", FNM_PERIOD)
5650 -             && 1));
5651 -  ;
5652 -  return 0;
5653 -}
5654 -_ACEOF
5655 -rm -f conftest$ac_exeext
5656 -if { (ac_try="$ac_link"
5657 -case "(($ac_try" in
5658 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5659 -  *) ac_try_echo=$ac_try;;
5660 -esac
5661 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5662 -  (eval "$ac_link") 2>&5
5663 -  ac_status=$?
5664 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5665 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5666 -  { (case "(($ac_try" in
5667 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5668 -  *) ac_try_echo=$ac_try;;
5669 -esac
5670 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5671 -  (eval "$ac_try") 2>&5
5672 -  ac_status=$?
5673 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5674 -  (exit $ac_status); }; }; then
5675 -  ac_cv_func_fnmatch_works=yes
5676 -else
5677 -  echo "$as_me: program exited with status $ac_status" >&5
5678 -echo "$as_me: failed program was:" >&5
5679 -sed 's/^/| /' conftest.$ac_ext >&5
5681 -( exit $ac_status )
5682 -ac_cv_func_fnmatch_works=no
5683 -fi
5684 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5685 -fi
5688 -fi
5689 -{ echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5
5690 -echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6; }
5691 -if test $ac_cv_func_fnmatch_works = yes; then
5693 -cat >>confdefs.h <<\_ACEOF
5694 -#define HAVE_FNMATCH 1
5695 -_ACEOF
5697 -fi
5701 -if test $ac_cv_func_fnmatch_works = no; then
5702 -  case " $LIBOBJS " in
5703 -  *" lib/fnmatch.$ac_objext "* ) ;;
5704 -  *) LIBOBJS="$LIBOBJS lib/fnmatch.$ac_objext"
5705 - ;;
5706 -esac
5708 -fi
5715 -ac_header_dirent=no
5716 -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5717 -  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5718 -{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5719 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5720 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5721 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5722 -else
5723 -  cat >conftest.$ac_ext <<_ACEOF
5724 -/* confdefs.h.  */
5725 -_ACEOF
5726 -cat confdefs.h >>conftest.$ac_ext
5727 -cat >>conftest.$ac_ext <<_ACEOF
5728 -/* end confdefs.h.  */
5729 -#include <sys/types.h>
5730 -#include <$ac_hdr>
5732 -int
5733 -main ()
5734 -{
5735 -if ((DIR *) 0)
5736 -return 0;
5737 -  ;
5738 -  return 0;
5739 -}
5740 -_ACEOF
5741 -rm -f conftest.$ac_objext
5742 -if { (ac_try="$ac_compile"
5743 -case "(($ac_try" in
5744 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5745 -  *) ac_try_echo=$ac_try;;
5746 -esac
5747 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5748 -  (eval "$ac_compile") 2>conftest.er1
5749 -  ac_status=$?
5750 -  grep -v '^ *+' conftest.er1 >conftest.err
5751 -  rm -f conftest.er1
5752 -  cat conftest.err >&5
5753 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5754 -  (exit $ac_status); } && {
5755 -        test -z "$ac_c_werror_flag" ||
5756 -        test ! -s conftest.err
5757 -       } && test -s conftest.$ac_objext; then
5758 -  eval "$as_ac_Header=yes"
5759 -else
5760 -  echo "$as_me: failed program was:" >&5
5761 -sed 's/^/| /' conftest.$ac_ext >&5
5763 -       eval "$as_ac_Header=no"
5764 -fi
5766 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5767 -fi
5768 -ac_res=`eval echo '${'$as_ac_Header'}'`
5769 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
5770 -echo "${ECHO_T}$ac_res" >&6; }
5771 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
5772 -  cat >>confdefs.h <<_ACEOF
5773 -#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5774 -_ACEOF
5776 -ac_header_dirent=$ac_hdr; break
5777 -fi
5779 -done
5780 -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5781 -if test $ac_header_dirent = dirent.h; then
5782 -  { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5783 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5784 -if test "${ac_cv_search_opendir+set}" = set; then
5785 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5786 -else
5787 -  ac_func_search_save_LIBS=$LIBS
5788 -cat >conftest.$ac_ext <<_ACEOF
5789 -/* confdefs.h.  */
5790 -_ACEOF
5791 -cat confdefs.h >>conftest.$ac_ext
5792 -cat >>conftest.$ac_ext <<_ACEOF
5793 -/* end confdefs.h.  */
5795 -/* Override any GCC internal prototype to avoid an error.
5796 -   Use char because int might match the return type of a GCC
5797 -   builtin and then its argument prototype would still apply.  */
5798 -#ifdef __cplusplus
5799 -extern "C"
5800 -#endif
5801 -char opendir ();
5802 -int
5803 -main ()
5804 -{
5805 -return opendir ();
5806 -  ;
5807 -  return 0;
5808 -}
5809 -_ACEOF
5810 -for ac_lib in '' dir; do
5811 -  if test -z "$ac_lib"; then
5812 -    ac_res="none required"
5813 -  else
5814 -    ac_res=-l$ac_lib
5815 -    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5816 -  fi
5817 -  rm -f conftest.$ac_objext conftest$ac_exeext
5818 -if { (ac_try="$ac_link"
5819 -case "(($ac_try" in
5820 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821 -  *) ac_try_echo=$ac_try;;
5822 -esac
5823 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5824 -  (eval "$ac_link") 2>conftest.er1
5825 -  ac_status=$?
5826 -  grep -v '^ *+' conftest.er1 >conftest.err
5827 -  rm -f conftest.er1
5828 -  cat conftest.err >&5
5829 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 -  (exit $ac_status); } && {
5831 -        test -z "$ac_c_werror_flag" ||
5832 -        test ! -s conftest.err
5833 -       } && test -s conftest$ac_exeext &&
5834 -       $as_test_x conftest$ac_exeext; then
5835 -  ac_cv_search_opendir=$ac_res
5836 -else
5837 -  echo "$as_me: failed program was:" >&5
5838 -sed 's/^/| /' conftest.$ac_ext >&5
5841 -fi
5843 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5844 -      conftest$ac_exeext
5845 -  if test "${ac_cv_search_opendir+set}" = set; then
5846 -  break
5847 -fi
5848 -done
5849 -if test "${ac_cv_search_opendir+set}" = set; then
5850 -  :
5851 -else
5852 -  ac_cv_search_opendir=no
5853 -fi
5854 -rm conftest.$ac_ext
5855 -LIBS=$ac_func_search_save_LIBS
5856 -fi
5857 -{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5858 -echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5859 -ac_res=$ac_cv_search_opendir
5860 -if test "$ac_res" != no; then
5861 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5863 -fi
5865 -else
5866 -  { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5867 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5868 -if test "${ac_cv_search_opendir+set}" = set; then
5869 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5870 -else
5871 -  ac_func_search_save_LIBS=$LIBS
5872 -cat >conftest.$ac_ext <<_ACEOF
5873 -/* confdefs.h.  */
5874 -_ACEOF
5875 -cat confdefs.h >>conftest.$ac_ext
5876 -cat >>conftest.$ac_ext <<_ACEOF
5877 -/* end confdefs.h.  */
5879 -/* Override any GCC internal prototype to avoid an error.
5880 -   Use char because int might match the return type of a GCC
5881 -   builtin and then its argument prototype would still apply.  */
5882 -#ifdef __cplusplus
5883 -extern "C"
5884 -#endif
5885 -char opendir ();
5886 -int
5887 -main ()
5888 -{
5889 -return opendir ();
5890 -  ;
5891 -  return 0;
5892 -}
5893 -_ACEOF
5894 -for ac_lib in '' x; do
5895 -  if test -z "$ac_lib"; then
5896 -    ac_res="none required"
5897 -  else
5898 -    ac_res=-l$ac_lib
5899 -    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5900 -  fi
5901 -  rm -f conftest.$ac_objext conftest$ac_exeext
5902 -if { (ac_try="$ac_link"
5903 -case "(($ac_try" in
5904 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5905 -  *) ac_try_echo=$ac_try;;
5906 -esac
5907 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5908 -  (eval "$ac_link") 2>conftest.er1
5909 -  ac_status=$?
5910 -  grep -v '^ *+' conftest.er1 >conftest.err
5911 -  rm -f conftest.er1
5912 -  cat conftest.err >&5
5913 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 -  (exit $ac_status); } && {
5915 -        test -z "$ac_c_werror_flag" ||
5916 -        test ! -s conftest.err
5917 -       } && test -s conftest$ac_exeext &&
5918 -       $as_test_x conftest$ac_exeext; then
5919 -  ac_cv_search_opendir=$ac_res
5920 -else
5921 -  echo "$as_me: failed program was:" >&5
5922 -sed 's/^/| /' conftest.$ac_ext >&5
5925 -fi
5927 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5928 -      conftest$ac_exeext
5929 -  if test "${ac_cv_search_opendir+set}" = set; then
5930 -  break
5931 -fi
5932 -done
5933 -if test "${ac_cv_search_opendir+set}" = set; then
5934 -  :
5935 -else
5936 -  ac_cv_search_opendir=no
5937 -fi
5938 -rm conftest.$ac_ext
5939 -LIBS=$ac_func_search_save_LIBS
5940 -fi
5941 -{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5942 -echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5943 -ac_res=$ac_cv_search_opendir
5944 -if test "$ac_res" != no; then
5945 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5947 -fi
5949 -fi
5952 -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5953 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
5954 -if test "${ac_cv_type_signal+set}" = set; then
5955 -  echo $ECHO_N "(cached) $ECHO_C" >&6
5956 -else
5957 -  cat >conftest.$ac_ext <<_ACEOF
5958 -/* confdefs.h.  */
5959 -_ACEOF
5960 -cat confdefs.h >>conftest.$ac_ext
5961 -cat >>conftest.$ac_ext <<_ACEOF
5962 -/* end confdefs.h.  */
5963 -#include <sys/types.h>
5964 -#include <signal.h>
5966 -int
5967 -main ()
5968 -{
5969 -return *(signal (0, 0)) (0) == 1;
5970 -  ;
5971 -  return 0;
5972 -}
5973 -_ACEOF
5974 -rm -f conftest.$ac_objext
5975 -if { (ac_try="$ac_compile"
5976 -case "(($ac_try" in
5977 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5978 -  *) ac_try_echo=$ac_try;;
5979 -esac
5980 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5981 -  (eval "$ac_compile") 2>conftest.er1
5982 -  ac_status=$?
5983 -  grep -v '^ *+' conftest.er1 >conftest.err
5984 -  rm -f conftest.er1
5985 -  cat conftest.err >&5
5986 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5987 -  (exit $ac_status); } && {
5988 -        test -z "$ac_c_werror_flag" ||
5989 -        test ! -s conftest.err
5990 -       } && test -s conftest.$ac_objext; then
5991 -  ac_cv_type_signal=int
5992 -else
5993 -  echo "$as_me: failed program was:" >&5
5994 -sed 's/^/| /' conftest.$ac_ext >&5
5996 -       ac_cv_type_signal=void
5997 -fi
5999 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6000 -fi
6001 -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6002 -echo "${ECHO_T}$ac_cv_type_signal" >&6; }
6004 -cat >>confdefs.h <<_ACEOF
6005 -#define RETSIGTYPE $ac_cv_type_signal
6006 -_ACEOF
6018 -for ac_func in strdup strerror memcpy strcoll tcsetattr getpass stty fchmod
6019 -do
6020 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6021 -{ echo "$as_me:$LINENO: checking for $ac_func" >&5
6022 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
6023 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6024 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6025 -else
6026 -  cat >conftest.$ac_ext <<_ACEOF
6027 -/* confdefs.h.  */
6028 -_ACEOF
6029 -cat confdefs.h >>conftest.$ac_ext
6030 -cat >>conftest.$ac_ext <<_ACEOF
6031 -/* end confdefs.h.  */
6032 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6033 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6034 -#define $ac_func innocuous_$ac_func
6036 -/* System header to define __stub macros and hopefully few prototypes,
6037 -    which can conflict with char $ac_func (); below.
6038 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6039 -    <limits.h> exists even on freestanding compilers.  */
6041 -#ifdef __STDC__
6042 -# include <limits.h>
6043 -#else
6044 -# include <assert.h>
6045 -#endif
6047 -#undef $ac_func
6049 -/* Override any GCC internal prototype to avoid an error.
6050 -   Use char because int might match the return type of a GCC
6051 -   builtin and then its argument prototype would still apply.  */
6052 -#ifdef __cplusplus
6053 -extern "C"
6054 -#endif
6055 -char $ac_func ();
6056 -/* The GNU C library defines this for functions which it implements
6057 -    to always fail with ENOSYS.  Some functions are actually named
6058 -    something starting with __ and the normal name is an alias.  */
6059 -#if defined __stub_$ac_func || defined __stub___$ac_func
6060 -choke me
6061 -#endif
6063 -int
6064 -main ()
6065 -{
6066 -return $ac_func ();
6067 -  ;
6068 -  return 0;
6069 -}
6070 -_ACEOF
6071 -rm -f conftest.$ac_objext conftest$ac_exeext
6072 -if { (ac_try="$ac_link"
6073 -case "(($ac_try" in
6074 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6075 -  *) ac_try_echo=$ac_try;;
6076 -esac
6077 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6078 -  (eval "$ac_link") 2>conftest.er1
6079 -  ac_status=$?
6080 -  grep -v '^ *+' conftest.er1 >conftest.err
6081 -  rm -f conftest.er1
6082 -  cat conftest.err >&5
6083 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084 -  (exit $ac_status); } && {
6085 -        test -z "$ac_c_werror_flag" ||
6086 -        test ! -s conftest.err
6087 -       } && test -s conftest$ac_exeext &&
6088 -       $as_test_x conftest$ac_exeext; then
6089 -  eval "$as_ac_var=yes"
6090 -else
6091 -  echo "$as_me: failed program was:" >&5
6092 -sed 's/^/| /' conftest.$ac_ext >&5
6094 -       eval "$as_ac_var=no"
6095 -fi
6097 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6098 -      conftest$ac_exeext conftest.$ac_ext
6099 -fi
6100 -ac_res=`eval echo '${'$as_ac_var'}'`
6101 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
6102 -echo "${ECHO_T}$ac_res" >&6; }
6103 -if test `eval echo '${'$as_ac_var'}'` = yes; then
6104 -  cat >>confdefs.h <<_ACEOF
6105 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6106 -_ACEOF
6108 -fi
6109 -done
6121 -for ac_header in sys/time.h pwd.h stdarg.h vmsdir.h memory.h alloca.h ncurses.h sgtty.h termios.h termio.h
6122 -do
6123 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6124 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6125 -  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6126 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6127 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6128 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6129 -fi
6130 -ac_res=`eval echo '${'$as_ac_Header'}'`
6131 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
6132 -echo "${ECHO_T}$ac_res" >&6; }
6133 -else
6134 -  # Is the header compilable?
6135 -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6136 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6137 -cat >conftest.$ac_ext <<_ACEOF
6138 -/* confdefs.h.  */
6139 -_ACEOF
6140 -cat confdefs.h >>conftest.$ac_ext
6141 -cat >>conftest.$ac_ext <<_ACEOF
6142 -/* end confdefs.h.  */
6143 -$ac_includes_default
6144 -#include <$ac_header>
6145 -_ACEOF
6146 -rm -f conftest.$ac_objext
6147 -if { (ac_try="$ac_compile"
6148 -case "(($ac_try" in
6149 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6150 -  *) ac_try_echo=$ac_try;;
6151 -esac
6152 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6153 -  (eval "$ac_compile") 2>conftest.er1
6154 -  ac_status=$?
6155 -  grep -v '^ *+' conftest.er1 >conftest.err
6156 -  rm -f conftest.er1
6157 -  cat conftest.err >&5
6158 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159 -  (exit $ac_status); } && {
6160 -        test -z "$ac_c_werror_flag" ||
6161 -        test ! -s conftest.err
6162 -       } && test -s conftest.$ac_objext; then
6163 -  ac_header_compiler=yes
6164 -else
6165 -  echo "$as_me: failed program was:" >&5
6166 -sed 's/^/| /' conftest.$ac_ext >&5
6168 -       ac_header_compiler=no
6169 -fi
6171 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6172 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6173 -echo "${ECHO_T}$ac_header_compiler" >&6; }
6175 -# Is the header present?
6176 -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6177 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6178 -cat >conftest.$ac_ext <<_ACEOF
6179 -/* confdefs.h.  */
6180 -_ACEOF
6181 -cat confdefs.h >>conftest.$ac_ext
6182 -cat >>conftest.$ac_ext <<_ACEOF
6183 -/* end confdefs.h.  */
6184 -#include <$ac_header>
6185 -_ACEOF
6186 -if { (ac_try="$ac_cpp conftest.$ac_ext"
6187 -case "(($ac_try" in
6188 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6189 -  *) ac_try_echo=$ac_try;;
6190 -esac
6191 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6192 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6193 -  ac_status=$?
6194 -  grep -v '^ *+' conftest.er1 >conftest.err
6195 -  rm -f conftest.er1
6196 -  cat conftest.err >&5
6197 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6198 -  (exit $ac_status); } >/dev/null && {
6199 -        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6200 -        test ! -s conftest.err
6201 -       }; then
6202 -  ac_header_preproc=yes
6203 -else
6204 -  echo "$as_me: failed program was:" >&5
6205 -sed 's/^/| /' conftest.$ac_ext >&5
6207 -  ac_header_preproc=no
6208 -fi
6210 -rm -f conftest.err conftest.$ac_ext
6211 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6212 -echo "${ECHO_T}$ac_header_preproc" >&6; }
6214 -# So?  What about this header?
6215 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6216 -  yes:no: )
6217 -    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6218 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6219 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6220 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6221 -    ac_header_preproc=yes
6222 -    ;;
6223 -  no:yes:* )
6224 -    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6225 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6226 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6227 -echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6228 -    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6229 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6230 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6231 -echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6232 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6233 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6234 -    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6235 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6236 -    ( cat <<\_ASBOX
6237 -## --------------------------------- ##
6238 -## Report this to cadaver@webdav.org ##
6239 -## --------------------------------- ##
6240 -_ASBOX
6241 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
6242 -    ;;
6243 -esac
6244 -{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6245 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6246 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6247 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6248 -else
6249 -  eval "$as_ac_Header=\$ac_header_preproc"
6250 -fi
6251 -ac_res=`eval echo '${'$as_ac_Header'}'`
6252 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
6253 -echo "${ECHO_T}$ac_res" >&6; }
6255 -fi
6256 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
6257 -  cat >>confdefs.h <<_ACEOF
6258 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6259 -_ACEOF
6261 -fi
6263 -done
6269 -for ac_func in localtime_r
6270 -do
6271 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6272 -{ echo "$as_me:$LINENO: checking for $ac_func" >&5
6273 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
6274 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6275 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6276 -else
6277 -  cat >conftest.$ac_ext <<_ACEOF
6278 -/* confdefs.h.  */
6279 -_ACEOF
6280 -cat confdefs.h >>conftest.$ac_ext
6281 -cat >>conftest.$ac_ext <<_ACEOF
6282 -/* end confdefs.h.  */
6283 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6284 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6285 -#define $ac_func innocuous_$ac_func
6287 -/* System header to define __stub macros and hopefully few prototypes,
6288 -    which can conflict with char $ac_func (); below.
6289 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6290 -    <limits.h> exists even on freestanding compilers.  */
6292 -#ifdef __STDC__
6293 -# include <limits.h>
6294 -#else
6295 -# include <assert.h>
6296 -#endif
6298 -#undef $ac_func
6300 -/* Override any GCC internal prototype to avoid an error.
6301 -   Use char because int might match the return type of a GCC
6302 -   builtin and then its argument prototype would still apply.  */
6303 -#ifdef __cplusplus
6304 -extern "C"
6305 -#endif
6306 -char $ac_func ();
6307 -/* The GNU C library defines this for functions which it implements
6308 -    to always fail with ENOSYS.  Some functions are actually named
6309 -    something starting with __ and the normal name is an alias.  */
6310 -#if defined __stub_$ac_func || defined __stub___$ac_func
6311 -choke me
6312 -#endif
6314 -int
6315 -main ()
6316 -{
6317 -return $ac_func ();
6318 -  ;
6319 -  return 0;
6320 -}
6321 -_ACEOF
6322 -rm -f conftest.$ac_objext conftest$ac_exeext
6323 -if { (ac_try="$ac_link"
6324 -case "(($ac_try" in
6325 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6326 -  *) ac_try_echo=$ac_try;;
6327 -esac
6328 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6329 -  (eval "$ac_link") 2>conftest.er1
6330 -  ac_status=$?
6331 -  grep -v '^ *+' conftest.er1 >conftest.err
6332 -  rm -f conftest.er1
6333 -  cat conftest.err >&5
6334 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6335 -  (exit $ac_status); } && {
6336 -        test -z "$ac_c_werror_flag" ||
6337 -        test ! -s conftest.err
6338 -       } && test -s conftest$ac_exeext &&
6339 -       $as_test_x conftest$ac_exeext; then
6340 -  eval "$as_ac_var=yes"
6341 -else
6342 -  echo "$as_me: failed program was:" >&5
6343 -sed 's/^/| /' conftest.$ac_ext >&5
6345 -       eval "$as_ac_var=no"
6346 -fi
6348 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6349 -      conftest$ac_exeext conftest.$ac_ext
6350 -fi
6351 -ac_res=`eval echo '${'$as_ac_var'}'`
6352 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
6353 -echo "${ECHO_T}$ac_res" >&6; }
6354 -if test `eval echo '${'$as_ac_var'}'` = yes; then
6355 -  cat >>confdefs.h <<_ACEOF
6356 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6357 -_ACEOF
6359 -fi
6360 -done
6364 -for ac_func in strftime
6365 -do
6366 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6367 -{ echo "$as_me:$LINENO: checking for $ac_func" >&5
6368 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
6369 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6370 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6371 -else
6372 -  cat >conftest.$ac_ext <<_ACEOF
6373 -/* confdefs.h.  */
6374 -_ACEOF
6375 -cat confdefs.h >>conftest.$ac_ext
6376 -cat >>conftest.$ac_ext <<_ACEOF
6377 -/* end confdefs.h.  */
6378 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6379 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6380 -#define $ac_func innocuous_$ac_func
6382 -/* System header to define __stub macros and hopefully few prototypes,
6383 -    which can conflict with char $ac_func (); below.
6384 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6385 -    <limits.h> exists even on freestanding compilers.  */
6387 -#ifdef __STDC__
6388 -# include <limits.h>
6389 -#else
6390 -# include <assert.h>
6391 -#endif
6393 -#undef $ac_func
6395 -/* Override any GCC internal prototype to avoid an error.
6396 -   Use char because int might match the return type of a GCC
6397 -   builtin and then its argument prototype would still apply.  */
6398 -#ifdef __cplusplus
6399 -extern "C"
6400 -#endif
6401 -char $ac_func ();
6402 -/* The GNU C library defines this for functions which it implements
6403 -    to always fail with ENOSYS.  Some functions are actually named
6404 -    something starting with __ and the normal name is an alias.  */
6405 -#if defined __stub_$ac_func || defined __stub___$ac_func
6406 -choke me
6407 -#endif
6409 -int
6410 -main ()
6411 -{
6412 -return $ac_func ();
6413 -  ;
6414 -  return 0;
6415 -}
6416 +#include <$ac_header>
6417  _ACEOF
6418 -rm -f conftest.$ac_objext conftest$ac_exeext
6419 -if { (ac_try="$ac_link"
6420 +if { (ac_try="$ac_cpp conftest.$ac_ext"
6421  case "(($ac_try" in
6422    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6423    *) ac_try_echo=$ac_try;;
6424  esac
6425  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6426 -  (eval "$ac_link") 2>conftest.er1
6427 +  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6428    ac_status=$?
6429    grep -v '^ *+' conftest.er1 >conftest.err
6430    rm -f conftest.er1
6431    cat conftest.err >&5
6432    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 -  (exit $ac_status); } && {
6434 -        test -z "$ac_c_werror_flag" ||
6435 +  (exit $ac_status); } >/dev/null && {
6436 +        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6437          test ! -s conftest.err
6438 -       } && test -s conftest$ac_exeext &&
6439 -       $as_test_x conftest$ac_exeext; then
6440 -  eval "$as_ac_var=yes"
6441 +       }; then
6442 +  ac_header_preproc=yes
6443  else
6444    echo "$as_me: failed program was:" >&5
6445  sed 's/^/| /' conftest.$ac_ext >&5
6446  
6447 -       eval "$as_ac_var=no"
6448 +  ac_header_preproc=no
6449  fi
6450  
6451 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6452 -      conftest$ac_exeext conftest.$ac_ext
6453 +rm -f conftest.err conftest.$ac_ext
6454 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6455 +echo "${ECHO_T}$ac_header_preproc" >&6; }
6457 +# So?  What about this header?
6458 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6459 +  yes:no: )
6460 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6461 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6462 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6463 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6464 +    ac_header_preproc=yes
6465 +    ;;
6466 +  no:yes:* )
6467 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6468 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6469 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6470 +echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6471 +    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6472 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6473 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6474 +echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6475 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6476 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6477 +    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6478 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6479 +    ( cat <<\_ASBOX
6480 +## --------------------------------- ##
6481 +## Report this to cadaver@webdav.org ##
6482 +## --------------------------------- ##
6483 +_ASBOX
6484 +     ) | sed "s/^/$as_me: WARNING:     /" >&2
6485 +    ;;
6486 +esac
6487 +{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6488 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6489 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6490 +  echo $ECHO_N "(cached) $ECHO_C" >&6
6491 +else
6492 +  eval "$as_ac_Header=\$ac_header_preproc"
6493  fi
6494 -ac_res=`eval echo '${'$as_ac_var'}'`
6495 +ac_res=`eval echo '${'$as_ac_Header'}'`
6496                { echo "$as_me:$LINENO: result: $ac_res" >&5
6497  echo "${ECHO_T}$ac_res" >&6; }
6498 -if test `eval echo '${'$as_ac_var'}'` = yes; then
6500 +fi
6501 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
6502    cat >>confdefs.h <<_ACEOF
6503 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6504 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6505  _ACEOF
6506  
6507 -else
6508 -  case " $LIBOBJS " in
6509 -  *" $ac_func.$ac_objext "* ) ;;
6510 -  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6511 - ;;
6512 -esac
6514  fi
6515 -done
6516  
6517 +done
6518  
6519  
6520 +jm_FUNC_STRFTIME()
6521  
6522  { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
6523  echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
6524 @@ -22721,267 +21527,98 @@
6525    exit (sig != SIGFPE);
6526  }
6527  
6528 -int x = 1;
6529 -int y = 0;
6530 -int z;
6531 -int nan;
6533 -int main ()
6534 -{
6535 -  signal (SIGFPE, sigfpe_handler);
6536 -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
6537 -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
6538 -  signal (SIGTRAP, sigfpe_handler);
6539 -#endif
6540 -/* Linux/SPARC yields signal SIGILL.  */
6541 -#if defined (__sparc__) && defined (__linux__)
6542 -  signal (SIGILL, sigfpe_handler);
6543 -#endif
6545 -  z = x / y;
6546 -  nan = y / y;
6547 -  exit (1);
6548 -}
6550 -_ACEOF
6551 -rm -f conftest$ac_exeext
6552 -if { (ac_try="$ac_link"
6553 -case "(($ac_try" in
6554 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6555 -  *) ac_try_echo=$ac_try;;
6556 -esac
6557 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6558 -  (eval "$ac_link") 2>&5
6559 -  ac_status=$?
6560 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6562 -  { (case "(($ac_try" in
6563 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6564 -  *) ac_try_echo=$ac_try;;
6565 -esac
6566 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6567 -  (eval "$ac_try") 2>&5
6568 -  ac_status=$?
6569 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570 -  (exit $ac_status); }; }; then
6571 -  gt_cv_int_divbyzero_sigfpe=yes
6572 -else
6573 -  echo "$as_me: program exited with status $ac_status" >&5
6574 -echo "$as_me: failed program was:" >&5
6575 -sed 's/^/| /' conftest.$ac_ext >&5
6577 -( exit $ac_status )
6578 -gt_cv_int_divbyzero_sigfpe=no
6579 -fi
6580 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6581 -fi
6584 -      fi
6586 -fi
6587 -{ echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5
6588 -echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6; }
6589 -  case "$gt_cv_int_divbyzero_sigfpe" in
6590 -    *yes) value=1;;
6591 -    *) value=0;;
6592 -  esac
6594 -cat >>confdefs.h <<_ACEOF
6595 -#define INTDIV0_RAISES_SIGFPE $value
6596 -_ACEOF
6600 -  { echo "$as_me:$LINENO: checking for inttypes.h" >&5
6601 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; }
6602 -if test "${gl_cv_header_inttypes_h+set}" = set; then
6603 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6604 -else
6605 -  cat >conftest.$ac_ext <<_ACEOF
6606 -/* confdefs.h.  */
6607 -_ACEOF
6608 -cat confdefs.h >>conftest.$ac_ext
6609 -cat >>conftest.$ac_ext <<_ACEOF
6610 -/* end confdefs.h.  */
6611 -#include <sys/types.h>
6612 -#include <inttypes.h>
6613 -int
6614 -main ()
6615 -{
6616 -uintmax_t i = (uintmax_t) -1; return !i;
6617 -  ;
6618 -  return 0;
6619 -}
6620 -_ACEOF
6621 -rm -f conftest.$ac_objext
6622 -if { (ac_try="$ac_compile"
6623 -case "(($ac_try" in
6624 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6625 -  *) ac_try_echo=$ac_try;;
6626 -esac
6627 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6628 -  (eval "$ac_compile") 2>conftest.er1
6629 -  ac_status=$?
6630 -  grep -v '^ *+' conftest.er1 >conftest.err
6631 -  rm -f conftest.er1
6632 -  cat conftest.err >&5
6633 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 -  (exit $ac_status); } && {
6635 -        test -z "$ac_c_werror_flag" ||
6636 -        test ! -s conftest.err
6637 -       } && test -s conftest.$ac_objext; then
6638 -  gl_cv_header_inttypes_h=yes
6639 -else
6640 -  echo "$as_me: failed program was:" >&5
6641 -sed 's/^/| /' conftest.$ac_ext >&5
6643 -       gl_cv_header_inttypes_h=no
6644 -fi
6646 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6647 -fi
6648 -{ echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
6649 -echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6; }
6650 -  if test $gl_cv_header_inttypes_h = yes; then
6652 -cat >>confdefs.h <<_ACEOF
6653 -#define HAVE_INTTYPES_H_WITH_UINTMAX 1
6654 -_ACEOF
6656 -  fi
6659 -  { echo "$as_me:$LINENO: checking for unsigned long long int" >&5
6660 -echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
6661 -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
6662 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6663 -else
6664 -  cat >conftest.$ac_ext <<_ACEOF
6665 +int x = 1;
6666 +int y = 0;
6667 +int z;
6668 +int nan;
6669  
6670 -  /* confdefs.h.  */
6671 -_ACEOF
6672 -cat confdefs.h >>conftest.$ac_ext
6673 -cat >>conftest.$ac_ext <<_ACEOF
6674 -/* end confdefs.h.  */
6675 -/* Test preprocessor.  */
6676 -      #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6677 -        error in preprocessor;
6678 -      #endif
6679 -      #if ! (18446744073709551615ULL <= -1ull)
6680 -        error in preprocessor;
6681 -      #endif
6682 -      /* Test literals.  */
6683 -      long long int ll = 9223372036854775807ll;
6684 -      long long int nll = -9223372036854775807LL;
6685 -      unsigned long long int ull = 18446744073709551615ULL;
6686 -      /* Test constant expressions.   */
6687 -      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6688 -                    ? 1 : -1)];
6689 -      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6690 -                    ? 1 : -1)];
6691 -      int i = 63;
6692 -int
6693 -main ()
6694 +int main ()
6695  {
6696 -/* Test availability of runtime routines for shift and division.  */
6697 -      long long int llmax = 9223372036854775807ll;
6698 -      unsigned long long int ullmax = 18446744073709551615ull;
6699 -      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6700 -             | (llmax / ll) | (llmax % ll)
6701 -             | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6702 -             | (ullmax / ull) | (ullmax % ull));
6703 -  ;
6704 -  return 0;
6705 +  signal (SIGFPE, sigfpe_handler);
6706 +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
6707 +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
6708 +  signal (SIGTRAP, sigfpe_handler);
6709 +#endif
6710 +/* Linux/SPARC yields signal SIGILL.  */
6711 +#if defined (__sparc__) && defined (__linux__)
6712 +  signal (SIGILL, sigfpe_handler);
6713 +#endif
6715 +  z = x / y;
6716 +  nan = y / y;
6717 +  exit (1);
6718  }
6719  
6720  _ACEOF
6721 -rm -f conftest.$ac_objext conftest$ac_exeext
6722 +rm -f conftest$ac_exeext
6723  if { (ac_try="$ac_link"
6724  case "(($ac_try" in
6725    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6726    *) ac_try_echo=$ac_try;;
6727  esac
6728  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6729 -  (eval "$ac_link") 2>conftest.er1
6730 +  (eval "$ac_link") 2>&5
6731    ac_status=$?
6732 -  grep -v '^ *+' conftest.er1 >conftest.err
6733 -  rm -f conftest.er1
6734 -  cat conftest.err >&5
6735    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736 -  (exit $ac_status); } && {
6737 -        test -z "$ac_c_werror_flag" ||
6738 -        test ! -s conftest.err
6739 -       } && test -s conftest$ac_exeext &&
6740 -       $as_test_x conftest$ac_exeext; then
6741 -  ac_cv_type_unsigned_long_long_int=yes
6742 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6743 +  { (case "(($ac_try" in
6744 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745 +  *) ac_try_echo=$ac_try;;
6746 +esac
6747 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6748 +  (eval "$ac_try") 2>&5
6749 +  ac_status=$?
6750 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6751 +  (exit $ac_status); }; }; then
6752 +  gt_cv_int_divbyzero_sigfpe=yes
6753  else
6754 -  echo "$as_me: failed program was:" >&5
6755 +  echo "$as_me: program exited with status $ac_status" >&5
6756 +echo "$as_me: failed program was:" >&5
6757  sed 's/^/| /' conftest.$ac_ext >&5
6758  
6759 -       ac_cv_type_unsigned_long_long_int=no
6760 +( exit $ac_status )
6761 +gt_cv_int_divbyzero_sigfpe=no
6762  fi
6764 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6765 -      conftest$ac_exeext conftest.$ac_ext
6766 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6767  fi
6768 -{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
6769 -echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
6770 -  if test $ac_cv_type_unsigned_long_long_int = yes; then
6772 -cat >>confdefs.h <<\_ACEOF
6773 -#define HAVE_UNSIGNED_LONG_LONG_INT 1
6774 -_ACEOF
6776 -  fi
6777  
6778  
6779 +      fi
6780  
6782 -  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
6784 -    test $ac_cv_type_unsigned_long_long_int = yes \
6785 -      && ac_type='unsigned long long' \
6786 -      || ac_type='unsigned long'
6787 +fi
6788 +{ echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5
6789 +echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6; }
6790 +  case "$gt_cv_int_divbyzero_sigfpe" in
6791 +    *yes) value=1;;
6792 +    *) value=0;;
6793 +  esac
6794  
6795  cat >>confdefs.h <<_ACEOF
6796 -#define uintmax_t $ac_type
6797 -_ACEOF
6799 -  else
6801 -cat >>confdefs.h <<\_ACEOF
6802 -#define HAVE_UINTMAX_T 1
6803 +#define INTDIV0_RAISES_SIGFPE $value
6804  _ACEOF
6805  
6806 -  fi
6808  
6809  
6810 -for ac_header in inttypes.h
6811 -do
6812 -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6813 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6814 -  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6815 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6816 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6817 +  { echo "$as_me:$LINENO: checking for inttypes.h" >&5
6818 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; }
6819 +if test "${gl_cv_header_inttypes_h+set}" = set; then
6820    echo $ECHO_N "(cached) $ECHO_C" >&6
6821 -fi
6822 -ac_res=`eval echo '${'$as_ac_Header'}'`
6823 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
6824 -echo "${ECHO_T}$ac_res" >&6; }
6825  else
6826 -  # Is the header compilable?
6827 -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6828 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6829 -cat >conftest.$ac_ext <<_ACEOF
6830 +  cat >conftest.$ac_ext <<_ACEOF
6831  /* confdefs.h.  */
6832  _ACEOF
6833  cat confdefs.h >>conftest.$ac_ext
6834  cat >>conftest.$ac_ext <<_ACEOF
6835  /* end confdefs.h.  */
6836 -$ac_includes_default
6837 -#include <$ac_header>
6838 +#include <sys/types.h>
6839 +#include <inttypes.h>
6840 +int
6841 +main ()
6842 +{
6843 +uintmax_t i = (uintmax_t) -1; return !i;
6844 +  ;
6845 +  return 0;
6846 +}
6847  _ACEOF
6848  rm -f conftest.$ac_objext
6849  if { (ac_try="$ac_compile"
6850 @@ -23000,142 +21637,79 @@
6851          test -z "$ac_c_werror_flag" ||
6852          test ! -s conftest.err
6853         } && test -s conftest.$ac_objext; then
6854 -  ac_header_compiler=yes
6855 +  gl_cv_header_inttypes_h=yes
6856  else
6857    echo "$as_me: failed program was:" >&5
6858  sed 's/^/| /' conftest.$ac_ext >&5
6859  
6860 -       ac_header_compiler=no
6861 +       gl_cv_header_inttypes_h=no
6862  fi
6863  
6864  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6865 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6866 -echo "${ECHO_T}$ac_header_compiler" >&6; }
6868 -# Is the header present?
6869 -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6870 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6871 -cat >conftest.$ac_ext <<_ACEOF
6872 -/* confdefs.h.  */
6873 -_ACEOF
6874 -cat confdefs.h >>conftest.$ac_ext
6875 -cat >>conftest.$ac_ext <<_ACEOF
6876 -/* end confdefs.h.  */
6877 -#include <$ac_header>
6878 -_ACEOF
6879 -if { (ac_try="$ac_cpp conftest.$ac_ext"
6880 -case "(($ac_try" in
6881 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6882 -  *) ac_try_echo=$ac_try;;
6883 -esac
6884 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6885 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6886 -  ac_status=$?
6887 -  grep -v '^ *+' conftest.er1 >conftest.err
6888 -  rm -f conftest.er1
6889 -  cat conftest.err >&5
6890 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891 -  (exit $ac_status); } >/dev/null && {
6892 -        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6893 -        test ! -s conftest.err
6894 -       }; then
6895 -  ac_header_preproc=yes
6896 -else
6897 -  echo "$as_me: failed program was:" >&5
6898 -sed 's/^/| /' conftest.$ac_ext >&5
6900 -  ac_header_preproc=no
6901 -fi
6903 -rm -f conftest.err conftest.$ac_ext
6904 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6905 -echo "${ECHO_T}$ac_header_preproc" >&6; }
6907 -# So?  What about this header?
6908 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6909 -  yes:no: )
6910 -    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6911 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6912 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6913 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6914 -    ac_header_preproc=yes
6915 -    ;;
6916 -  no:yes:* )
6917 -    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6918 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6919 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6920 -echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6921 -    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6922 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6923 -    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6924 -echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6925 -    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6926 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6927 -    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6928 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6929 -    ( cat <<\_ASBOX
6930 -## --------------------------------- ##
6931 -## Report this to cadaver@webdav.org ##
6932 -## --------------------------------- ##
6933 -_ASBOX
6934 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
6935 -    ;;
6936 -esac
6937 -{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6938 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6939 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6940 -  echo $ECHO_N "(cached) $ECHO_C" >&6
6941 -else
6942 -  eval "$as_ac_Header=\$ac_header_preproc"
6943  fi
6944 -ac_res=`eval echo '${'$as_ac_Header'}'`
6945 -              { echo "$as_me:$LINENO: result: $ac_res" >&5
6946 -echo "${ECHO_T}$ac_res" >&6; }
6947 +{ echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
6948 +echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6; }
6949 +  if test $gl_cv_header_inttypes_h = yes; then
6950  
6951 -fi
6952 -if test `eval echo '${'$as_ac_Header'}'` = yes; then
6953 -  cat >>confdefs.h <<_ACEOF
6954 -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6955 +cat >>confdefs.h <<_ACEOF
6956 +#define HAVE_INTTYPES_H_WITH_UINTMAX 1
6957  _ACEOF
6958  
6959 -fi
6961 -done
6963 -  if test $ac_cv_header_inttypes_h = yes; then
6964 -    { echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5
6965 -echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6; }
6966 -if test "${gt_cv_inttypes_pri_broken+set}" = set; then
6967 +  fi
6970 +  { echo "$as_me:$LINENO: checking for unsigned long long int" >&5
6971 +echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
6972 +if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
6973    echo $ECHO_N "(cached) $ECHO_C" >&6
6974  else
6975 +  cat >conftest.$ac_ext <<_ACEOF
6976  
6977 -        cat >conftest.$ac_ext <<_ACEOF
6978 -/* confdefs.h.  */
6979 +  /* confdefs.h.  */
6980  _ACEOF
6981  cat confdefs.h >>conftest.$ac_ext
6982  cat >>conftest.$ac_ext <<_ACEOF
6983  /* end confdefs.h.  */
6984 -#include <inttypes.h>
6985 -#ifdef PRId32
6986 -char *p = PRId32;
6987 -#endif
6989 +/* Test preprocessor.  */
6990 +      #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6991 +        error in preprocessor;
6992 +      #endif
6993 +      #if ! (18446744073709551615ULL <= -1ull)
6994 +        error in preprocessor;
6995 +      #endif
6996 +      /* Test literals.  */
6997 +      long long int ll = 9223372036854775807ll;
6998 +      long long int nll = -9223372036854775807LL;
6999 +      unsigned long long int ull = 18446744073709551615ULL;
7000 +      /* Test constant expressions.   */
7001 +      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7002 +                    ? 1 : -1)];
7003 +      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7004 +                    ? 1 : -1)];
7005 +      int i = 63;
7006  int
7007  main ()
7008  {
7010 +/* Test availability of runtime routines for shift and division.  */
7011 +      long long int llmax = 9223372036854775807ll;
7012 +      unsigned long long int ullmax = 18446744073709551615ull;
7013 +      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7014 +             | (llmax / ll) | (llmax % ll)
7015 +             | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7016 +             | (ullmax / ull) | (ullmax % ull));
7017    ;
7018    return 0;
7019  }
7021  _ACEOF
7022 -rm -f conftest.$ac_objext
7023 -if { (ac_try="$ac_compile"
7024 +rm -f conftest.$ac_objext conftest$ac_exeext
7025 +if { (ac_try="$ac_link"
7026  case "(($ac_try" in
7027    *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7028    *) ac_try_echo=$ac_try;;
7029  esac
7030  eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7031 -  (eval "$ac_compile") 2>conftest.er1
7032 +  (eval "$ac_link") 2>conftest.er1
7033    ac_status=$?
7034    grep -v '^ *+' conftest.er1 >conftest.err
7035    rm -f conftest.er1
7036 @@ -23144,80 +21718,68 @@
7037    (exit $ac_status); } && {
7038          test -z "$ac_c_werror_flag" ||
7039          test ! -s conftest.err
7040 -       } && test -s conftest.$ac_objext; then
7041 -  gt_cv_inttypes_pri_broken=no
7042 +       } && test -s conftest$ac_exeext &&
7043 +       $as_test_x conftest$ac_exeext; then
7044 +  ac_cv_type_unsigned_long_long_int=yes
7045  else
7046    echo "$as_me: failed program was:" >&5
7047  sed 's/^/| /' conftest.$ac_ext >&5
7048  
7049 -       gt_cv_inttypes_pri_broken=yes
7050 +       ac_cv_type_unsigned_long_long_int=no
7051  fi
7052  
7053 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7055 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7056 +      conftest$ac_exeext conftest.$ac_ext
7057  fi
7058 -{ echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5
7059 -echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6; }
7060 -  fi
7061 -  if test "$gt_cv_inttypes_pri_broken" = yes; then
7062 +{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
7063 +echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
7064 +  if test $ac_cv_type_unsigned_long_long_int = yes; then
7065  
7066 -cat >>confdefs.h <<_ACEOF
7067 -#define PRI_MACROS_BROKEN 1
7068 +cat >>confdefs.h <<\_ACEOF
7069 +#define HAVE_UNSIGNED_LONG_LONG_INT 1
7070  _ACEOF
7071  
7072 -    PRI_MACROS_BROKEN=1
7073 -  else
7074 -    PRI_MACROS_BROKEN=0
7075    fi
7076  
7077  
7078  
7079 -cat >>confdefs.h <<\_ACEOF
7080 -#define _GNU_SOURCE 1
7081 -_ACEOF
7082  
7083 +  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
7084  
7085 +    test $ac_cv_type_unsigned_long_long_int = yes \
7086 +      && ac_type='unsigned long long' \
7087 +      || ac_type='unsigned long'
7088  
7089 -{ echo "$as_me:$LINENO: checking for AIX" >&5
7090 -echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
7091 -cat >conftest.$ac_ext <<_ACEOF
7092 -/* confdefs.h.  */
7093 +cat >>confdefs.h <<_ACEOF
7094 +#define uintmax_t $ac_type
7095  _ACEOF
7096 -cat confdefs.h >>conftest.$ac_ext
7097 -cat >>conftest.$ac_ext <<_ACEOF
7098 -/* end confdefs.h.  */
7099 -#ifdef _AIX
7100 -  yes
7101 -#endif
7102  
7103 -_ACEOF
7104 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7105 -  $EGREP "yes" >/dev/null 2>&1; then
7106 -  { echo "$as_me:$LINENO: result: yes" >&5
7107 -echo "${ECHO_T}yes" >&6; }
7108 +  else
7110  cat >>confdefs.h <<\_ACEOF
7111 -#define _ALL_SOURCE 1
7112 +#define HAVE_UINTMAX_T 1
7113  _ACEOF
7114  
7115 -else
7116 -  { echo "$as_me:$LINENO: result: no" >&5
7117 -echo "${ECHO_T}no" >&6; }
7118 -fi
7119 -rm -f conftest*
7120 +  fi
7121  
7122  
7123 -if test "${ac_cv_header_minix_config_h+set}" = set; then
7124 -  { echo "$as_me:$LINENO: checking for minix/config.h" >&5
7125 -echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
7126 -if test "${ac_cv_header_minix_config_h+set}" = set; then
7128 +for ac_header in inttypes.h
7129 +do
7130 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7131 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7132 +  { echo "$as_me:$LINENO: checking for $ac_header" >&5
7133 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7134 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7135    echo $ECHO_N "(cached) $ECHO_C" >&6
7136  fi
7137 -{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
7138 -echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
7139 +ac_res=`eval echo '${'$as_ac_Header'}'`
7140 +              { echo "$as_me:$LINENO: result: $ac_res" >&5
7141 +echo "${ECHO_T}$ac_res" >&6; }
7142  else
7143    # Is the header compilable?
7144 -{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
7145 -echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
7146 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7147 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7148  cat >conftest.$ac_ext <<_ACEOF
7149  /* confdefs.h.  */
7150  _ACEOF
7151 @@ -23225,7 +21787,7 @@
7152  cat >>conftest.$ac_ext <<_ACEOF
7153  /* end confdefs.h.  */
7154  $ac_includes_default
7155 -#include <minix/config.h>
7156 +#include <$ac_header>
7157  _ACEOF
7158  rm -f conftest.$ac_objext
7159  if { (ac_try="$ac_compile"
7160 @@ -23257,15 +21819,15 @@
7161  echo "${ECHO_T}$ac_header_compiler" >&6; }
7162  
7163  # Is the header present?
7164 -{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
7165 -echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
7166 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7167 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7168  cat >conftest.$ac_ext <<_ACEOF
7169  /* confdefs.h.  */
7170  _ACEOF
7171  cat confdefs.h >>conftest.$ac_ext
7172  cat >>conftest.$ac_ext <<_ACEOF
7173  /* end confdefs.h.  */
7174 -#include <minix/config.h>
7175 +#include <$ac_header>
7176  _ACEOF
7177  if { (ac_try="$ac_cpp conftest.$ac_ext"
7178  case "(($ac_try" in
7179 @@ -23298,25 +21860,25 @@
7180  # So?  What about this header?
7181  case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7182    yes:no: )
7183 -    { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
7184 -echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7185 -    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
7186 -echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
7187 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7188 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7189 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7190 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7191      ac_header_preproc=yes
7192      ;;
7193    no:yes:* )
7194 -    { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
7195 -echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
7196 -    { echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
7197 -echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
7198 -    { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
7199 -echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
7200 -    { echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
7201 -echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
7202 -    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
7203 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
7204 -    { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
7205 -echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
7206 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7207 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7208 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7209 +echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7210 +    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7211 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7212 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7213 +echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7214 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7215 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7216 +    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7217 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7218      ( cat <<\_ASBOX
7219  ## --------------------------------- ##
7220  ## Report this to cadaver@webdav.org ##
7221 @@ -23325,66 +21887,45 @@
7222       ) | sed "s/^/$as_me: WARNING:     /" >&2
7223      ;;
7224  esac
7225 -{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
7226 -echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
7227 -if test "${ac_cv_header_minix_config_h+set}" = set; then
7228 +{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7229 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7230 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7231    echo $ECHO_N "(cached) $ECHO_C" >&6
7232  else
7233 -  ac_cv_header_minix_config_h=$ac_header_preproc
7234 +  eval "$as_ac_Header=\$ac_header_preproc"
7235  fi
7236 -{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
7237 -echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
7238 +ac_res=`eval echo '${'$as_ac_Header'}'`
7239 +              { echo "$as_me:$LINENO: result: $ac_res" >&5
7240 +echo "${ECHO_T}$ac_res" >&6; }
7241  
7242  fi
7243 -if test $ac_cv_header_minix_config_h = yes; then
7244 -  MINIX=yes
7245 -else
7246 -  MINIX=
7247 -fi
7250 -if test "$MINIX" = yes; then
7252 -cat >>confdefs.h <<\_ACEOF
7253 -#define _POSIX_SOURCE 1
7254 -_ACEOF
7257 -cat >>confdefs.h <<\_ACEOF
7258 -#define _POSIX_1_SOURCE 2
7259 -_ACEOF
7262 -cat >>confdefs.h <<\_ACEOF
7263 -#define _MINIX 1
7264 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
7265 +  cat >>confdefs.h <<_ACEOF
7266 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7267  _ACEOF
7268  
7269  fi
7270  
7271 +done
7272  
7282 -  { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
7283 -echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
7284 -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
7285 +  if test $ac_cv_header_inttypes_h = yes; then
7286 +    { echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5
7287 +echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6; }
7288 +if test "${gt_cv_inttypes_pri_broken+set}" = set; then
7289    echo $ECHO_N "(cached) $ECHO_C" >&6
7290  else
7291 -  cat >conftest.$ac_ext <<_ACEOF
7293 +        cat >conftest.$ac_ext <<_ACEOF
7294  /* confdefs.h.  */
7295  _ACEOF
7296  cat confdefs.h >>conftest.$ac_ext
7297  cat >>conftest.$ac_ext <<_ACEOF
7298  /* end confdefs.h.  */
7299 +#include <inttypes.h>
7300 +#ifdef PRId32
7301 +char *p = PRId32;
7302 +#endif
7303  
7304 -#        define __EXTENSIONS__ 1
7305 -         $ac_includes_default
7306  int
7307  main ()
7308  {
7309 @@ -23410,30 +21951,30 @@
7310          test -z "$ac_c_werror_flag" ||
7311          test ! -s conftest.err
7312         } && test -s conftest.$ac_objext; then
7313 -  ac_cv_safe_to_define___extensions__=yes
7314 +  gt_cv_inttypes_pri_broken=no
7315  else
7316    echo "$as_me: failed program was:" >&5
7317  sed 's/^/| /' conftest.$ac_ext >&5
7318  
7319 -       ac_cv_safe_to_define___extensions__=no
7320 +       gt_cv_inttypes_pri_broken=yes
7321  fi
7322  
7323  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7325  fi
7326 -{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
7327 -echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
7328 -  test $ac_cv_safe_to_define___extensions__ = yes &&
7329 -    cat >>confdefs.h <<\_ACEOF
7330 -#define __EXTENSIONS__ 1
7331 -_ACEOF
7332 +{ echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5
7333 +echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6; }
7334 +  fi
7335 +  if test "$gt_cv_inttypes_pri_broken" = yes; then
7336  
7337 -  cat >>confdefs.h <<\_ACEOF
7338 -#define _POSIX_PTHREAD_SEMANTICS 1
7339 +cat >>confdefs.h <<_ACEOF
7340 +#define PRI_MACROS_BROKEN 1
7341  _ACEOF
7342  
7343 -  cat >>confdefs.h <<\_ACEOF
7344 -#define _TANDEM_SOURCE 1
7345 -_ACEOF
7346 +    PRI_MACROS_BROKEN=1
7347 +  else
7348 +    PRI_MACROS_BROKEN=0
7349 +  fi
7350  
7351  
7352  
7353 @@ -30441,13 +28982,13 @@
7354  NE_FLAG_ZLIB!$NE_FLAG_ZLIB$ac_delim
7355  NE_FLAG_IPV6!$NE_FLAG_IPV6$ac_delim
7356  NE_FLAG_LFS!$NE_FLAG_LFS$ac_delim
7357 -NE_FLAG_SOCKS!$NE_FLAG_SOCKS$ac_delim
7358  NE_FLAG_TS_SSL!$NE_FLAG_TS_SSL$ac_delim
7359  LIBOBJS!$LIBOBJS$ac_delim
7360  PKG_CONFIG!$PKG_CONFIG$ac_delim
7361  GNUTLS_CONFIG!$GNUTLS_CONFIG$ac_delim
7362  NEON_SUPPORTS_SSL!$NEON_SUPPORTS_SSL$ac_delim
7363  KRB5_CONFIG!$KRB5_CONFIG$ac_delim
7364 +NE_FLAG_LIBPXY!$NE_FLAG_LIBPXY$ac_delim
7365  NEON_CFLAGS!$NEON_CFLAGS$ac_delim
7366  NEON_LIBS!$NEON_LIBS$ac_delim
7367  NEON_LTLIBS!$NEON_LTLIBS$ac_delim
7368 diff a/m4/neon/neon.m4 b/m4/neon/neon.m4
7369 --- a/m4/neon/neon.m4
7370 +++ b/m4/neon/neon.m4
7371 @@ -937,27 +937,47 @@
7372     NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_openssl"
7373     ;;
7374  gnutls)
7375 -   AC_PATH_PROG(GNUTLS_CONFIG, libgnutls-config, no)
7376 +   ne_gnutls_use_pkgconfig="yes"
7377 +   if test "$PKG_CONFIG" = "no"; then
7378 +     ne_gnutls_use_pkgconfig="no"
7379 +   else if ! $PKG_CONFIG --exists gnutls; then
7380 +     ne_gnutls_use_pkgconfig="no"
7381 +   fi; fi
7383 +   if test "$ne_gnutls_use_pkgconfig" = "yes"; then
7384 +     ne_gnutls_ver=`$PKG_CONFIG --modversion gnutls`
7385 +   else
7386 +     AC_PATH_PROG(GNUTLS_CONFIG, libgnutls-config, no)
7388 +     if test "$GNUTLS_CONFIG" = "no"; then
7389 +       AC_MSG_ERROR([could not find libgnutls-config in \$PATH])
7390 +     fi
7391  
7392 -   if test "$GNUTLS_CONFIG" = "no"; then
7393 -     AC_MSG_ERROR([could not find libgnutls-config in \$PATH])
7394 +     ne_gnutls_ver=`$GNUTLS_CONFIG --version`
7395     fi
7396  
7397 -   ne_gnutls_ver=`$GNUTLS_CONFIG --version`
7398     case $ne_gnutls_ver in
7399     1.0.?|1.0.1?|1.0.20|1.0.21) 
7400        AC_MSG_ERROR([GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required]) 
7401        ;;
7402     esac
7403  
7404 -   CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
7405 +   if test "$ne_gnutls_use_pkgconfig" = "yes"; then
7406 +     CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags gnutls`"
7407 +   else
7408 +     CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`"
7409 +   fi
7410  
7411     AC_CHECK_HEADER([gnutls/gnutls.h],,
7412        [AC_MSG_ERROR([could not find gnutls/gnutls.h in include path])])
7413  
7414     NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using GnuTLS $ne_gnutls_ver])
7415     NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_gnutls"
7416 -   NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`"
7417 +   if test "$ne_gnutls_use_pkgconfig" = "yes"; then
7418 +     NEON_LIBS="$NEON_LIBS `$PKG_CONFIG --libs gnutls`"
7419 +   else
7420 +     NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`"
7421 +   fi
7422     AC_DEFINE([HAVE_GNUTLS], 1, [Define if GnuTLS support is enabled])
7423  
7424     # Check for functions in later releases