~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to srclib/apr-util/configure

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# Guess values for system-dependent variables and create Makefiles.
 
3
# Generated by GNU Autoconf 2.59.
 
4
#
 
5
# Copyright (C) 2003 Free Software Foundation, Inc.
 
6
# This configure script is free software; the Free Software Foundation
 
7
# gives unlimited permission to copy, distribute and modify it.
 
8
## --------------------- ##
 
9
## M4sh Initialization.  ##
 
10
## --------------------- ##
 
11
 
 
12
# Be Bourne compatible
 
13
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 
14
  emulate sh
 
15
  NULLCMD=:
 
16
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
 
17
  # is contrary to our usage.  Disable this feature.
 
18
  alias -g '${1+"$@"}'='"$@"'
 
19
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
 
20
  set -o posix
 
21
fi
 
22
DUALCASE=1; export DUALCASE # for MKS sh
 
23
 
 
24
# Support unset when possible.
 
25
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 
26
  as_unset=unset
 
27
else
 
28
  as_unset=false
 
29
fi
 
30
 
 
31
 
 
32
# Work around bugs in pre-3.0 UWIN ksh.
 
33
$as_unset ENV MAIL MAILPATH
 
34
PS1='$ '
 
35
PS2='> '
 
36
PS4='+ '
 
37
 
 
38
# NLS nuisances.
 
39
for as_var in \
 
40
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
 
41
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
 
42
  LC_TELEPHONE LC_TIME
 
43
do
 
44
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
 
45
    eval $as_var=C; export $as_var
 
46
  else
 
47
    $as_unset $as_var
 
48
  fi
 
49
done
 
50
 
 
51
# Required to use basename.
 
52
if expr a : '\(a\)' >/dev/null 2>&1; then
 
53
  as_expr=expr
 
54
else
 
55
  as_expr=false
 
56
fi
 
57
 
 
58
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
 
59
  as_basename=basename
 
60
else
 
61
  as_basename=false
 
62
fi
 
63
 
 
64
 
 
65
# Name of the executable.
 
66
as_me=`$as_basename "$0" ||
 
67
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 
68
         X"$0" : 'X\(//\)$' \| \
 
69
         X"$0" : 'X\(/\)$' \| \
 
70
         .     : '\(.\)' 2>/dev/null ||
 
71
echo X/"$0" |
 
72
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
 
73
          /^X\/\(\/\/\)$/{ s//\1/; q; }
 
74
          /^X\/\(\/\).*/{ s//\1/; q; }
 
75
          s/.*/./; q'`
 
76
 
 
77
 
 
78
# PATH needs CR, and LINENO needs CR and PATH.
 
79
# Avoid depending upon Character Ranges.
 
80
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 
81
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
82
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 
83
as_cr_digits='0123456789'
 
84
as_cr_alnum=$as_cr_Letters$as_cr_digits
 
85
 
 
86
# The user is always right.
 
87
if test "${PATH_SEPARATOR+set}" != set; then
 
88
  echo "#! /bin/sh" >conf$$.sh
 
89
  echo  "exit 0"   >>conf$$.sh
 
90
  chmod +x conf$$.sh
 
91
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
92
    PATH_SEPARATOR=';'
 
93
  else
 
94
    PATH_SEPARATOR=:
 
95
  fi
 
96
  rm -f conf$$.sh
 
97
fi
 
98
 
 
99
 
 
100
  as_lineno_1=$LINENO
 
101
  as_lineno_2=$LINENO
 
102
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
 
103
  test "x$as_lineno_1" != "x$as_lineno_2" &&
 
104
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
 
105
  # Find who we are.  Look in the path if we contain no path at all
 
106
  # relative or not.
 
107
  case $0 in
 
108
    *[\\/]* ) as_myself=$0 ;;
 
109
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
110
for as_dir in $PATH
 
111
do
 
112
  IFS=$as_save_IFS
 
113
  test -z "$as_dir" && as_dir=.
 
114
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 
115
done
 
116
 
 
117
       ;;
 
118
  esac
 
119
  # We did not find ourselves, most probably we were run as `sh COMMAND'
 
120
  # in which case we are not to be found in the path.
 
121
  if test "x$as_myself" = x; then
 
122
    as_myself=$0
 
123
  fi
 
124
  if test ! -f "$as_myself"; then
 
125
    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
 
126
   { (exit 1); exit 1; }; }
 
127
  fi
 
128
  case $CONFIG_SHELL in
 
129
  '')
 
130
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
131
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 
132
do
 
133
  IFS=$as_save_IFS
 
134
  test -z "$as_dir" && as_dir=.
 
135
  for as_base in sh bash ksh sh5; do
 
136
         case $as_dir in
 
137
         /*)
 
138
           if ("$as_dir/$as_base" -c '
 
139
  as_lineno_1=$LINENO
 
140
  as_lineno_2=$LINENO
 
141
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
 
142
  test "x$as_lineno_1" != "x$as_lineno_2" &&
 
143
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
 
144
             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
 
145
             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
 
146
             CONFIG_SHELL=$as_dir/$as_base
 
147
             export CONFIG_SHELL
 
148
             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
 
149
           fi;;
 
150
         esac
 
151
       done
 
152
done
 
153
;;
 
154
  esac
 
155
 
 
156
  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
 
157
  # uniformly replaced by the line number.  The first 'sed' inserts a
 
158
  # line-number line before each line; the second 'sed' does the real
 
159
  # work.  The second script uses 'N' to pair each line-number line
 
160
  # with the numbered line, and appends trailing '-' during
 
161
  # substitution so that $LINENO is not a special case at line end.
 
162
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
 
163
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
 
164
  sed '=' <$as_myself |
 
165
    sed '
 
166
      N
 
167
      s,$,-,
 
168
      : loop
 
169
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
 
170
      t loop
 
171
      s,-$,,
 
172
      s,^['$as_cr_digits']*\n,,
 
173
    ' >$as_me.lineno &&
 
174
  chmod +x $as_me.lineno ||
 
175
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
 
176
   { (exit 1); exit 1; }; }
 
177
 
 
178
  # Don't try to exec as it changes $[0], causing all sort of problems
 
179
  # (the dirname of $[0] is not the place where we might find the
 
180
  # original and so on.  Autoconf is especially sensible to this).
 
181
  . ./$as_me.lineno
 
182
  # Exit status is that of the last command.
 
183
  exit
 
184
}
 
185
 
 
186
 
 
187
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
 
188
  *c*,-n*) ECHO_N= ECHO_C='
 
189
' ECHO_T='      ' ;;
 
190
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
 
191
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
 
192
esac
 
193
 
 
194
if expr a : '\(a\)' >/dev/null 2>&1; then
 
195
  as_expr=expr
 
196
else
 
197
  as_expr=false
 
198
fi
 
199
 
 
200
rm -f conf$$ conf$$.exe conf$$.file
 
201
echo >conf$$.file
 
202
if ln -s conf$$.file conf$$ 2>/dev/null; then
 
203
  # We could just check for DJGPP; but this test a) works b) is more generic
 
204
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
 
205
  if test -f conf$$.exe; then
 
206
    # Don't use ln at all; we don't have any links
 
207
    as_ln_s='cp -p'
 
208
  else
 
209
    as_ln_s='ln -s'
 
210
  fi
 
211
elif ln conf$$.file conf$$ 2>/dev/null; then
 
212
  as_ln_s=ln
 
213
else
 
214
  as_ln_s='cp -p'
 
215
fi
 
216
rm -f conf$$ conf$$.exe conf$$.file
 
217
 
 
218
if mkdir -p . 2>/dev/null; then
 
219
  as_mkdir_p=:
 
220
else
 
221
  test -d ./-p && rmdir ./-p
 
222
  as_mkdir_p=false
 
223
fi
 
224
 
 
225
as_executable_p="test -f"
 
226
 
 
227
# Sed expression to map a string onto a valid CPP name.
 
228
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
229
 
 
230
# Sed expression to map a string onto a valid variable name.
 
231
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
232
 
 
233
 
 
234
# IFS
 
235
# We need space, tab and new line, in precisely that order.
 
236
as_nl='
 
237
'
 
238
IFS="   $as_nl"
 
239
 
 
240
# CDPATH.
 
241
$as_unset CDPATH
 
242
 
 
243
 
 
244
# Name of the host.
 
245
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 
246
# so uname gets run too.
 
247
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
248
 
 
249
exec 6>&1
 
250
 
 
251
#
 
252
# Initializations.
 
253
#
 
254
ac_default_prefix=/usr/local
 
255
ac_config_libobj_dir=.
 
256
cross_compiling=no
 
257
subdirs=
 
258
MFLAGS=
 
259
MAKEFLAGS=
 
260
SHELL=${CONFIG_SHELL-/bin/sh}
 
261
 
 
262
# Maximum number of lines to put in a shell here document.
 
263
# This variable seems obsolete.  It should probably be removed, and
 
264
# only ac_max_sed_lines should be used.
 
265
: ${ac_max_here_lines=38}
 
266
 
 
267
# Identity of this package.
 
268
PACKAGE_NAME=
 
269
PACKAGE_TARNAME=
 
270
PACKAGE_VERSION=
 
271
PACKAGE_STRING=
 
272
PACKAGE_BUGREPORT=
 
273
 
 
274
ac_unique_file="export_vars.sh.in"
 
275
# Factoring default headers for most tests.
 
276
ac_includes_default="\
 
277
#include <stdio.h>
 
278
#if HAVE_SYS_TYPES_H
 
279
# include <sys/types.h>
 
280
#endif
 
281
#if HAVE_SYS_STAT_H
 
282
# include <sys/stat.h>
 
283
#endif
 
284
#if STDC_HEADERS
 
285
# include <stdlib.h>
 
286
# include <stddef.h>
 
287
#else
 
288
# if HAVE_STDLIB_H
 
289
#  include <stdlib.h>
 
290
# endif
 
291
#endif
 
292
#if HAVE_STRING_H
 
293
# if !STDC_HEADERS && HAVE_MEMORY_H
 
294
#  include <memory.h>
 
295
# endif
 
296
# include <string.h>
 
297
#endif
 
298
#if HAVE_STRINGS_H
 
299
# include <strings.h>
 
300
#endif
 
301
#if HAVE_INTTYPES_H
 
302
# include <inttypes.h>
 
303
#else
 
304
# if HAVE_STDINT_H
 
305
#  include <stdint.h>
 
306
# endif
 
307
#endif
 
308
#if HAVE_UNISTD_H
 
309
# include <unistd.h>
 
310
#endif"
 
311
 
 
312
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS APU_CONFIG_LOCATION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA top_builddir abs_srcdir abs_builddir APRUTIL_DOTTED_VERSION APRUTIL_MAJOR_VERSION APR_INCLUDES APR_LIBS APR_BUILD_DIR APR_ICONV_DIR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ldap_h lber_h ldap_ssl_h apu_has_ldapssl_client_init apu_has_ldapssl_client_deinit apu_has_ldapssl_add_trusted_cert apu_has_ldap_start_tls_s apu_has_ldapssl_init apu_has_ldap_sslinit apu_has_ldapssl_install_routines apu_has_ldap apu_has_ldap_openldap apu_has_ldap_solaris apu_has_ldap_novell apu_has_ldap_microsoft apu_has_ldap_netscape apu_has_ldap_mozilla apu_has_ldap_other apu_use_sdbm apu_use_gdbm apu_use_ndbm apu_use_db apu_have_sdbm apu_have_gdbm apu_have_ndbm apu_have_db apu_db_header apu_db_version apu_have_pgsql apu_have_mysql apu_have_sqlite3 apu_have_sqlite2 APR_XML_SUBDIRS APR_XML_DIR APR_XML_EXPAT_OLD have_iconv have_apr_iconv so_ext lib_target APRUTIL_LIBNAME APRUTIL_EXPORT_LIBS APRUTIL_PRIV_INCLUDES APRUTIL_INCLUDES APRUTIL_LDFLAGS APRUTIL_LIBS INCLUDE_RULES INCLUDE_OUTPUTS LIBOBJS LTLIBOBJS'
 
313
ac_subst_files=''
 
314
 
 
315
# Initialize some variables set by options.
 
316
ac_init_help=
 
317
ac_init_version=false
 
318
# The variables have the same names as the options, with
 
319
# dashes changed to underlines.
 
320
cache_file=/dev/null
 
321
exec_prefix=NONE
 
322
no_create=
 
323
no_recursion=
 
324
prefix=NONE
 
325
program_prefix=NONE
 
326
program_suffix=NONE
 
327
program_transform_name=s,x,x,
 
328
silent=
 
329
site=
 
330
srcdir=
 
331
verbose=
 
332
x_includes=NONE
 
333
x_libraries=NONE
 
334
 
 
335
# Installation directory options.
 
336
# These are left unexpanded so users can "make install exec_prefix=/foo"
 
337
# and all the variables that are supposed to be based on exec_prefix
 
338
# by default will actually change.
 
339
# Use braces instead of parens because sh, perl, etc. also accept them.
 
340
bindir='${exec_prefix}/bin'
 
341
sbindir='${exec_prefix}/sbin'
 
342
libexecdir='${exec_prefix}/libexec'
 
343
datadir='${prefix}/share'
 
344
sysconfdir='${prefix}/etc'
 
345
sharedstatedir='${prefix}/com'
 
346
localstatedir='${prefix}/var'
 
347
libdir='${exec_prefix}/lib'
 
348
includedir='${prefix}/include'
 
349
oldincludedir='/usr/include'
 
350
infodir='${prefix}/info'
 
351
mandir='${prefix}/man'
 
352
 
 
353
ac_prev=
 
354
for ac_option
 
355
do
 
356
  # If the previous option needs an argument, assign it.
 
357
  if test -n "$ac_prev"; then
 
358
    eval "$ac_prev=\$ac_option"
 
359
    ac_prev=
 
360
    continue
 
361
  fi
 
362
 
 
363
  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
 
364
 
 
365
  # Accept the important Cygnus configure options, so we can diagnose typos.
 
366
 
 
367
  case $ac_option in
 
368
 
 
369
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
 
370
    ac_prev=bindir ;;
 
371
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
 
372
    bindir=$ac_optarg ;;
 
373
 
 
374
  -build | --build | --buil | --bui | --bu)
 
375
    ac_prev=build_alias ;;
 
376
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
 
377
    build_alias=$ac_optarg ;;
 
378
 
 
379
  -cache-file | --cache-file | --cache-fil | --cache-fi \
 
380
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
 
381
    ac_prev=cache_file ;;
 
382
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
 
383
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
 
384
    cache_file=$ac_optarg ;;
 
385
 
 
386
  --config-cache | -C)
 
387
    cache_file=config.cache ;;
 
388
 
 
389
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
 
390
    ac_prev=datadir ;;
 
391
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
 
392
  | --da=*)
 
393
    datadir=$ac_optarg ;;
 
394
 
 
395
  -disable-* | --disable-*)
 
396
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
 
397
    # Reject names that are not valid shell variable names.
 
398
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
 
399
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
 
400
   { (exit 1); exit 1; }; }
 
401
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
 
402
    eval "enable_$ac_feature=no" ;;
 
403
 
 
404
  -enable-* | --enable-*)
 
405
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
 
406
    # Reject names that are not valid shell variable names.
 
407
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
 
408
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
 
409
   { (exit 1); exit 1; }; }
 
410
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
 
411
    case $ac_option in
 
412
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
 
413
      *) ac_optarg=yes ;;
 
414
    esac
 
415
    eval "enable_$ac_feature='$ac_optarg'" ;;
 
416
 
 
417
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
 
418
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
 
419
  | --exec | --exe | --ex)
 
420
    ac_prev=exec_prefix ;;
 
421
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
 
422
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
 
423
  | --exec=* | --exe=* | --ex=*)
 
424
    exec_prefix=$ac_optarg ;;
 
425
 
 
426
  -gas | --gas | --ga | --g)
 
427
    # Obsolete; use --with-gas.
 
428
    with_gas=yes ;;
 
429
 
 
430
  -help | --help | --hel | --he | -h)
 
431
    ac_init_help=long ;;
 
432
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
 
433
    ac_init_help=recursive ;;
 
434
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
 
435
    ac_init_help=short ;;
 
436
 
 
437
  -host | --host | --hos | --ho)
 
438
    ac_prev=host_alias ;;
 
439
  -host=* | --host=* | --hos=* | --ho=*)
 
440
    host_alias=$ac_optarg ;;
 
441
 
 
442
  -includedir | --includedir | --includedi | --included | --include \
 
443
  | --includ | --inclu | --incl | --inc)
 
444
    ac_prev=includedir ;;
 
445
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
 
446
  | --includ=* | --inclu=* | --incl=* | --inc=*)
 
447
    includedir=$ac_optarg ;;
 
448
 
 
449
  -infodir | --infodir | --infodi | --infod | --info | --inf)
 
450
    ac_prev=infodir ;;
 
451
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
 
452
    infodir=$ac_optarg ;;
 
453
 
 
454
  -libdir | --libdir | --libdi | --libd)
 
455
    ac_prev=libdir ;;
 
456
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
 
457
    libdir=$ac_optarg ;;
 
458
 
 
459
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
 
460
  | --libexe | --libex | --libe)
 
461
    ac_prev=libexecdir ;;
 
462
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
 
463
  | --libexe=* | --libex=* | --libe=*)
 
464
    libexecdir=$ac_optarg ;;
 
465
 
 
466
  -localstatedir | --localstatedir | --localstatedi | --localstated \
 
467
  | --localstate | --localstat | --localsta | --localst \
 
468
  | --locals | --local | --loca | --loc | --lo)
 
469
    ac_prev=localstatedir ;;
 
470
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
 
471
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
 
472
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
 
473
    localstatedir=$ac_optarg ;;
 
474
 
 
475
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
 
476
    ac_prev=mandir ;;
 
477
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
 
478
    mandir=$ac_optarg ;;
 
479
 
 
480
  -nfp | --nfp | --nf)
 
481
    # Obsolete; use --without-fp.
 
482
    with_fp=no ;;
 
483
 
 
484
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
485
  | --no-cr | --no-c | -n)
 
486
    no_create=yes ;;
 
487
 
 
488
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
489
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
 
490
    no_recursion=yes ;;
 
491
 
 
492
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
 
493
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
 
494
  | --oldin | --oldi | --old | --ol | --o)
 
495
    ac_prev=oldincludedir ;;
 
496
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
 
497
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
 
498
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
 
499
    oldincludedir=$ac_optarg ;;
 
500
 
 
501
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
 
502
    ac_prev=prefix ;;
 
503
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
 
504
    prefix=$ac_optarg ;;
 
505
 
 
506
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
 
507
  | --program-pre | --program-pr | --program-p)
 
508
    ac_prev=program_prefix ;;
 
509
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
 
510
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
 
511
    program_prefix=$ac_optarg ;;
 
512
 
 
513
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
 
514
  | --program-suf | --program-su | --program-s)
 
515
    ac_prev=program_suffix ;;
 
516
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
 
517
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
 
518
    program_suffix=$ac_optarg ;;
 
519
 
 
520
  -program-transform-name | --program-transform-name \
 
521
  | --program-transform-nam | --program-transform-na \
 
522
  | --program-transform-n | --program-transform- \
 
523
  | --program-transform | --program-transfor \
 
524
  | --program-transfo | --program-transf \
 
525
  | --program-trans | --program-tran \
 
526
  | --progr-tra | --program-tr | --program-t)
 
527
    ac_prev=program_transform_name ;;
 
528
  -program-transform-name=* | --program-transform-name=* \
 
529
  | --program-transform-nam=* | --program-transform-na=* \
 
530
  | --program-transform-n=* | --program-transform-=* \
 
531
  | --program-transform=* | --program-transfor=* \
 
532
  | --program-transfo=* | --program-transf=* \
 
533
  | --program-trans=* | --program-tran=* \
 
534
  | --progr-tra=* | --program-tr=* | --program-t=*)
 
535
    program_transform_name=$ac_optarg ;;
 
536
 
 
537
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 
538
  | -silent | --silent | --silen | --sile | --sil)
 
539
    silent=yes ;;
 
540
 
 
541
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
 
542
    ac_prev=sbindir ;;
 
543
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
 
544
  | --sbi=* | --sb=*)
 
545
    sbindir=$ac_optarg ;;
 
546
 
 
547
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
 
548
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
 
549
  | --sharedst | --shareds | --shared | --share | --shar \
 
550
  | --sha | --sh)
 
551
    ac_prev=sharedstatedir ;;
 
552
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
 
553
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
 
554
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
 
555
  | --sha=* | --sh=*)
 
556
    sharedstatedir=$ac_optarg ;;
 
557
 
 
558
  -site | --site | --sit)
 
559
    ac_prev=site ;;
 
560
  -site=* | --site=* | --sit=*)
 
561
    site=$ac_optarg ;;
 
562
 
 
563
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
 
564
    ac_prev=srcdir ;;
 
565
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
 
566
    srcdir=$ac_optarg ;;
 
567
 
 
568
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
 
569
  | --syscon | --sysco | --sysc | --sys | --sy)
 
570
    ac_prev=sysconfdir ;;
 
571
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
 
572
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
 
573
    sysconfdir=$ac_optarg ;;
 
574
 
 
575
  -target | --target | --targe | --targ | --tar | --ta | --t)
 
576
    ac_prev=target_alias ;;
 
577
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
 
578
    target_alias=$ac_optarg ;;
 
579
 
 
580
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
 
581
    verbose=yes ;;
 
582
 
 
583
  -version | --version | --versio | --versi | --vers | -V)
 
584
    ac_init_version=: ;;
 
585
 
 
586
  -with-* | --with-*)
 
587
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
 
588
    # Reject names that are not valid shell variable names.
 
589
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
 
590
      { echo "$as_me: error: invalid package name: $ac_package" >&2
 
591
   { (exit 1); exit 1; }; }
 
592
    ac_package=`echo $ac_package| sed 's/-/_/g'`
 
593
    case $ac_option in
 
594
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
 
595
      *) ac_optarg=yes ;;
 
596
    esac
 
597
    eval "with_$ac_package='$ac_optarg'" ;;
 
598
 
 
599
  -without-* | --without-*)
 
600
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
 
601
    # Reject names that are not valid shell variable names.
 
602
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
 
603
      { echo "$as_me: error: invalid package name: $ac_package" >&2
 
604
   { (exit 1); exit 1; }; }
 
605
    ac_package=`echo $ac_package | sed 's/-/_/g'`
 
606
    eval "with_$ac_package=no" ;;
 
607
 
 
608
  --x)
 
609
    # Obsolete; use --with-x.
 
610
    with_x=yes ;;
 
611
 
 
612
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
 
613
  | --x-incl | --x-inc | --x-in | --x-i)
 
614
    ac_prev=x_includes ;;
 
615
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
 
616
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
 
617
    x_includes=$ac_optarg ;;
 
618
 
 
619
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
 
620
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
 
621
    ac_prev=x_libraries ;;
 
622
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
 
623
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
 
624
    x_libraries=$ac_optarg ;;
 
625
 
 
626
  -*) { echo "$as_me: error: unrecognized option: $ac_option
 
627
Try \`$0 --help' for more information." >&2
 
628
   { (exit 1); exit 1; }; }
 
629
    ;;
 
630
 
 
631
  *=*)
 
632
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
 
633
    # Reject names that are not valid shell variable names.
 
634
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
 
635
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
 
636
   { (exit 1); exit 1; }; }
 
637
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
 
638
    eval "$ac_envvar='$ac_optarg'"
 
639
    export $ac_envvar ;;
 
640
 
 
641
  *)
 
642
    # FIXME: should be removed in autoconf 3.0.
 
643
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
 
644
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
 
645
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
 
646
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
 
647
    ;;
 
648
 
 
649
  esac
 
650
done
 
651
 
 
652
if test -n "$ac_prev"; then
 
653
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
 
654
  { echo "$as_me: error: missing argument to $ac_option" >&2
 
655
   { (exit 1); exit 1; }; }
 
656
fi
 
657
 
 
658
# Be sure to have absolute paths.
 
659
for ac_var in exec_prefix prefix
 
660
do
 
661
  eval ac_val=$`echo $ac_var`
 
662
  case $ac_val in
 
663
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
 
664
    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
 
665
   { (exit 1); exit 1; }; };;
 
666
  esac
 
667
done
 
668
 
 
669
# Be sure to have absolute paths.
 
670
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
 
671
              localstatedir libdir includedir oldincludedir infodir mandir
 
672
do
 
673
  eval ac_val=$`echo $ac_var`
 
674
  case $ac_val in
 
675
    [\\/$]* | ?:[\\/]* ) ;;
 
676
    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
 
677
   { (exit 1); exit 1; }; };;
 
678
  esac
 
679
done
 
680
 
 
681
# There might be people who depend on the old broken behavior: `$host'
 
682
# used to hold the argument of --host etc.
 
683
# FIXME: To remove some day.
 
684
build=$build_alias
 
685
host=$host_alias
 
686
target=$target_alias
 
687
 
 
688
# FIXME: To remove some day.
 
689
if test "x$host_alias" != x; then
 
690
  if test "x$build_alias" = x; then
 
691
    cross_compiling=maybe
 
692
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
 
693
    If a cross compiler is detected then cross compile mode will be used." >&2
 
694
  elif test "x$build_alias" != "x$host_alias"; then
 
695
    cross_compiling=yes
 
696
  fi
 
697
fi
 
698
 
 
699
ac_tool_prefix=
 
700
test -n "$host_alias" && ac_tool_prefix=$host_alias-
 
701
 
 
702
test "$silent" = yes && exec 6>/dev/null
 
703
 
 
704
 
 
705
# Find the source files, if location was not specified.
 
706
if test -z "$srcdir"; then
 
707
  ac_srcdir_defaulted=yes
 
708
  # Try the directory containing this script, then its parent.
 
709
  ac_confdir=`(dirname "$0") 2>/dev/null ||
 
710
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
711
         X"$0" : 'X\(//\)[^/]' \| \
 
712
         X"$0" : 'X\(//\)$' \| \
 
713
         X"$0" : 'X\(/\)' \| \
 
714
         .     : '\(.\)' 2>/dev/null ||
 
715
echo X"$0" |
 
716
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
717
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
718
          /^X\(\/\/\)$/{ s//\1/; q; }
 
719
          /^X\(\/\).*/{ s//\1/; q; }
 
720
          s/.*/./; q'`
 
721
  srcdir=$ac_confdir
 
722
  if test ! -r $srcdir/$ac_unique_file; then
 
723
    srcdir=..
 
724
  fi
 
725
else
 
726
  ac_srcdir_defaulted=no
 
727
fi
 
728
if test ! -r $srcdir/$ac_unique_file; then
 
729
  if test "$ac_srcdir_defaulted" = yes; then
 
730
    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
 
731
   { (exit 1); exit 1; }; }
 
732
  else
 
733
    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
 
734
   { (exit 1); exit 1; }; }
 
735
  fi
 
736
fi
 
737
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
 
738
  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
 
739
   { (exit 1); exit 1; }; }
 
740
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
 
741
ac_env_build_alias_set=${build_alias+set}
 
742
ac_env_build_alias_value=$build_alias
 
743
ac_cv_env_build_alias_set=${build_alias+set}
 
744
ac_cv_env_build_alias_value=$build_alias
 
745
ac_env_host_alias_set=${host_alias+set}
 
746
ac_env_host_alias_value=$host_alias
 
747
ac_cv_env_host_alias_set=${host_alias+set}
 
748
ac_cv_env_host_alias_value=$host_alias
 
749
ac_env_target_alias_set=${target_alias+set}
 
750
ac_env_target_alias_value=$target_alias
 
751
ac_cv_env_target_alias_set=${target_alias+set}
 
752
ac_cv_env_target_alias_value=$target_alias
 
753
ac_env_CC_set=${CC+set}
 
754
ac_env_CC_value=$CC
 
755
ac_cv_env_CC_set=${CC+set}
 
756
ac_cv_env_CC_value=$CC
 
757
ac_env_CFLAGS_set=${CFLAGS+set}
 
758
ac_env_CFLAGS_value=$CFLAGS
 
759
ac_cv_env_CFLAGS_set=${CFLAGS+set}
 
760
ac_cv_env_CFLAGS_value=$CFLAGS
 
761
ac_env_LDFLAGS_set=${LDFLAGS+set}
 
762
ac_env_LDFLAGS_value=$LDFLAGS
 
763
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
 
764
ac_cv_env_LDFLAGS_value=$LDFLAGS
 
765
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
 
766
ac_env_CPPFLAGS_value=$CPPFLAGS
 
767
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
 
768
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
 
769
ac_env_CPP_set=${CPP+set}
 
770
ac_env_CPP_value=$CPP
 
771
ac_cv_env_CPP_set=${CPP+set}
 
772
ac_cv_env_CPP_value=$CPP
 
773
 
 
774
#
 
775
# Report the --help message.
 
776
#
 
777
if test "$ac_init_help" = "long"; then
 
778
  # Omit some internal or obsolete options to make the list less imposing.
 
779
  # This message is too long to be a string in the A/UX 3.1 sh.
 
780
  cat <<_ACEOF
 
781
\`configure' configures this package to adapt to many kinds of systems.
 
782
 
 
783
Usage: $0 [OPTION]... [VAR=VALUE]...
 
784
 
 
785
To assign environment variables (e.g., CC, CFLAGS...), specify them as
 
786
VAR=VALUE.  See below for descriptions of some of the useful variables.
 
787
 
 
788
Defaults for the options are specified in brackets.
 
789
 
 
790
Configuration:
 
791
  -h, --help              display this help and exit
 
792
      --help=short        display options specific to this package
 
793
      --help=recursive    display the short help of all the included packages
 
794
  -V, --version           display version information and exit
 
795
  -q, --quiet, --silent   do not print \`checking...' messages
 
796
      --cache-file=FILE   cache test results in FILE [disabled]
 
797
  -C, --config-cache      alias for \`--cache-file=config.cache'
 
798
  -n, --no-create         do not create output files
 
799
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
800
 
 
801
_ACEOF
 
802
 
 
803
  cat <<_ACEOF
 
804
Installation directories:
 
805
  --prefix=PREFIX         install architecture-independent files in PREFIX
 
806
                          [$ac_default_prefix]
 
807
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
 
808
                          [PREFIX]
 
809
 
 
810
By default, \`make install' will install all the files in
 
811
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
 
812
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
 
813
for instance \`--prefix=\$HOME'.
 
814
 
 
815
For better control, use the options below.
 
816
 
 
817
Fine tuning of the installation directories:
 
818
  --bindir=DIR           user executables [EPREFIX/bin]
 
819
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
 
820
  --libexecdir=DIR       program executables [EPREFIX/libexec]
 
821
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
 
822
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
 
823
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
 
824
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
 
825
  --libdir=DIR           object code libraries [EPREFIX/lib]
 
826
  --includedir=DIR       C header files [PREFIX/include]
 
827
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
 
828
  --infodir=DIR          info documentation [PREFIX/info]
 
829
  --mandir=DIR           man documentation [PREFIX/man]
 
830
_ACEOF
 
831
 
 
832
  cat <<\_ACEOF
 
833
 
 
834
System types:
 
835
  --build=BUILD     configure for building on BUILD [guessed]
 
836
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 
837
  --target=TARGET   configure for building compilers for TARGET [HOST]
 
838
_ACEOF
 
839
fi
 
840
 
 
841
if test -n "$ac_init_help"; then
 
842
 
 
843
  cat <<\_ACEOF
 
844
 
 
845
Optional Features:
 
846
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
 
847
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
 
848
  --enable-layout=LAYOUT
 
849
 
 
850
Optional Packages:
 
851
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
 
852
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
 
853
  --with-apr=PATH         prefix for installed APR, path to APR build tree,
 
854
                          or the full path to apr-config
 
855
  --with-ldap-include=path  path to ldap include files with trailing slash
 
856
  --with-ldap-lib=path    path to ldap lib file
 
857
  --with-ldap=library     ldap library to use
 
858
 
 
859
    --with-dbm=DBM          choose the DBM type to use.
 
860
      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44}
 
861
 
 
862
 
 
863
    --with-gdbm=DIR          specify GDBM location
 
864
 
 
865
 
 
866
    --with-ndbm=PATH
 
867
      Find the NDBM header and library in \`PATH/include' and
 
868
      \`PATH/lib'.  If PATH is of the form \`HEADER:LIB', then search
 
869
      for header files in HEADER, and the library in LIB.  If you omit
 
870
      the \`=PATH' part completely, the configure script will search
 
871
      for NDBM in a number of standard places.
 
872
 
 
873
 
 
874
    --with-berkeley-db=PATH
 
875
      Find the Berkeley DB header and library in \`PATH/include' and
 
876
      \`PATH/lib'.  If PATH is of the form \`HEADER:LIB', then search
 
877
      for header files in HEADER, and the library in LIB.  If you omit
 
878
      the \`=PATH' part completely, the configure script will search
 
879
      for Berkeley DB in a number of standard places.
 
880
 
 
881
 
 
882
  --with-pgsql=DIR          specify PostgreSQL location
 
883
 
 
884
 
 
885
  --with-mysql=DIR          **** SEE INSTALL.MySQL ****
 
886
 
 
887
 
 
888
  --with-sqlite3=DIR
 
889
 
 
890
 
 
891
  --with-sqlite2=DIR
 
892
 
 
893
  --with-expat=DIR        specify Expat location or 'builtin'
 
894
  --with-iconv=DIR        path to iconv installation
 
895
 
 
896
Some influential environment variables:
 
897
  CC          C compiler command
 
898
  CFLAGS      C compiler flags
 
899
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
 
900
              nonstandard directory <lib dir>
 
901
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
 
902
              headers in a nonstandard directory <include dir>
 
903
  CPP         C preprocessor
 
904
 
 
905
Use these variables to override the choices made by `configure' or to help
 
906
it to find libraries and programs with nonstandard names/locations.
 
907
 
 
908
_ACEOF
 
909
fi
 
910
 
 
911
if test "$ac_init_help" = "recursive"; then
 
912
  # If there are subdirs, report their specific --help.
 
913
  ac_popdir=`pwd`
 
914
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
 
915
    test -d $ac_dir || continue
 
916
    ac_builddir=.
 
917
 
 
918
if test "$ac_dir" != .; then
 
919
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
 
920
  # A "../" for each directory in $ac_dir_suffix.
 
921
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
 
922
else
 
923
  ac_dir_suffix= ac_top_builddir=
 
924
fi
 
925
 
 
926
case $srcdir in
 
927
  .)  # No --srcdir option.  We are building in place.
 
928
    ac_srcdir=.
 
929
    if test -z "$ac_top_builddir"; then
 
930
       ac_top_srcdir=.
 
931
    else
 
932
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
 
933
    fi ;;
 
934
  [\\/]* | ?:[\\/]* )  # Absolute path.
 
935
    ac_srcdir=$srcdir$ac_dir_suffix;
 
936
    ac_top_srcdir=$srcdir ;;
 
937
  *) # Relative path.
 
938
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
 
939
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
 
940
esac
 
941
 
 
942
# Do not use `cd foo && pwd` to compute absolute paths, because
 
943
# the directories may not exist.
 
944
case `pwd` in
 
945
.) ac_abs_builddir="$ac_dir";;
 
946
*)
 
947
  case "$ac_dir" in
 
948
  .) ac_abs_builddir=`pwd`;;
 
949
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
 
950
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
 
951
  esac;;
 
952
esac
 
953
case $ac_abs_builddir in
 
954
.) ac_abs_top_builddir=${ac_top_builddir}.;;
 
955
*)
 
956
  case ${ac_top_builddir}. in
 
957
  .) ac_abs_top_builddir=$ac_abs_builddir;;
 
958
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
 
959
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
 
960
  esac;;
 
961
esac
 
962
case $ac_abs_builddir in
 
963
.) ac_abs_srcdir=$ac_srcdir;;
 
964
*)
 
965
  case $ac_srcdir in
 
966
  .) ac_abs_srcdir=$ac_abs_builddir;;
 
967
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
 
968
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
 
969
  esac;;
 
970
esac
 
971
case $ac_abs_builddir in
 
972
.) ac_abs_top_srcdir=$ac_top_srcdir;;
 
973
*)
 
974
  case $ac_top_srcdir in
 
975
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
 
976
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
 
977
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
 
978
  esac;;
 
979
esac
 
980
 
 
981
    cd $ac_dir
 
982
    # Check for guested configure; otherwise get Cygnus style configure.
 
983
    if test -f $ac_srcdir/configure.gnu; then
 
984
      echo
 
985
      $SHELL $ac_srcdir/configure.gnu  --help=recursive
 
986
    elif test -f $ac_srcdir/configure; then
 
987
      echo
 
988
      $SHELL $ac_srcdir/configure  --help=recursive
 
989
    elif test -f $ac_srcdir/configure.ac ||
 
990
           test -f $ac_srcdir/configure.in; then
 
991
      echo
 
992
      $ac_configure --help
 
993
    else
 
994
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
 
995
    fi
 
996
    cd $ac_popdir
 
997
  done
 
998
fi
 
999
 
 
1000
test -n "$ac_init_help" && exit 0
 
1001
if $ac_init_version; then
 
1002
  cat <<\_ACEOF
 
1003
 
 
1004
Copyright (C) 2003 Free Software Foundation, Inc.
 
1005
This configure script is free software; the Free Software Foundation
 
1006
gives unlimited permission to copy, distribute and modify it.
 
1007
_ACEOF
 
1008
  exit 0
 
1009
fi
 
1010
exec 5>config.log
 
1011
cat >&5 <<_ACEOF
 
1012
This file contains any messages produced by compilers while
 
1013
running configure, to aid debugging if configure makes a mistake.
 
1014
 
 
1015
It was created by $as_me, which was
 
1016
generated by GNU Autoconf 2.59.  Invocation command line was
 
1017
 
 
1018
  $ $0 $@
 
1019
 
 
1020
_ACEOF
 
1021
{
 
1022
cat <<_ASUNAME
 
1023
## --------- ##
 
1024
## Platform. ##
 
1025
## --------- ##
 
1026
 
 
1027
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
 
1028
uname -m = `(uname -m) 2>/dev/null || echo unknown`
 
1029
uname -r = `(uname -r) 2>/dev/null || echo unknown`
 
1030
uname -s = `(uname -s) 2>/dev/null || echo unknown`
 
1031
uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
1032
 
 
1033
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
 
1034
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
 
1035
 
 
1036
/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
 
1037
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
 
1038
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
 
1039
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
 
1040
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
 
1041
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
 
1042
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
 
1043
 
 
1044
_ASUNAME
 
1045
 
 
1046
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
1047
for as_dir in $PATH
 
1048
do
 
1049
  IFS=$as_save_IFS
 
1050
  test -z "$as_dir" && as_dir=.
 
1051
  echo "PATH: $as_dir"
 
1052
done
 
1053
 
 
1054
} >&5
 
1055
 
 
1056
cat >&5 <<_ACEOF
 
1057
 
 
1058
 
 
1059
## ----------- ##
 
1060
## Core tests. ##
 
1061
## ----------- ##
 
1062
 
 
1063
_ACEOF
 
1064
 
 
1065
 
 
1066
# Keep a trace of the command line.
 
1067
# Strip out --no-create and --no-recursion so they do not pile up.
 
1068
# Strip out --silent because we don't want to record it for future runs.
 
1069
# Also quote any args containing shell meta-characters.
 
1070
# Make two passes to allow for proper duplicate-argument suppression.
 
1071
ac_configure_args=
 
1072
ac_configure_args0=
 
1073
ac_configure_args1=
 
1074
ac_sep=
 
1075
ac_must_keep_next=false
 
1076
for ac_pass in 1 2
 
1077
do
 
1078
  for ac_arg
 
1079
  do
 
1080
    case $ac_arg in
 
1081
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
 
1082
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 
1083
    | -silent | --silent | --silen | --sile | --sil)
 
1084
      continue ;;
 
1085
    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
 
1086
      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
 
1087
    esac
 
1088
    case $ac_pass in
 
1089
    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
 
1090
    2)
 
1091
      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
 
1092
      if test $ac_must_keep_next = true; then
 
1093
        ac_must_keep_next=false # Got value, back to normal.
 
1094
      else
 
1095
        case $ac_arg in
 
1096
          *=* | --config-cache | -C | -disable-* | --disable-* \
 
1097
          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
 
1098
          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
 
1099
          | -with-* | --with-* | -without-* | --without-* | --x)
 
1100
            case "$ac_configure_args0 " in
 
1101
              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
 
1102
            esac
 
1103
            ;;
 
1104
          -* ) ac_must_keep_next=true ;;
 
1105
        esac
 
1106
      fi
 
1107
      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
 
1108
      # Get rid of the leading space.
 
1109
      ac_sep=" "
 
1110
      ;;
 
1111
    esac
 
1112
  done
 
1113
done
 
1114
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
 
1115
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 
1116
 
 
1117
# When interrupted or exit'd, cleanup temporary files, and complete
 
1118
# config.log.  We remove comments because anyway the quotes in there
 
1119
# would cause problems or look ugly.
 
1120
# WARNING: Be sure not to use single quotes in there, as some shells,
 
1121
# such as our DU 5.0 friend, will then `close' the trap.
 
1122
trap 'exit_status=$?
 
1123
  # Save into config.log some information that might help in debugging.
 
1124
  {
 
1125
    echo
 
1126
 
 
1127
    cat <<\_ASBOX
 
1128
## ---------------- ##
 
1129
## Cache variables. ##
 
1130
## ---------------- ##
 
1131
_ASBOX
 
1132
    echo
 
1133
    # The following way of writing the cache mishandles newlines in values,
 
1134
{
 
1135
  (set) 2>&1 |
 
1136
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
 
1137
    *ac_space=\ *)
 
1138
      sed -n \
 
1139
        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
 
1140
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
 
1141
      ;;
 
1142
    *)
 
1143
      sed -n \
 
1144
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
 
1145
      ;;
 
1146
    esac;
 
1147
}
 
1148
    echo
 
1149
 
 
1150
    cat <<\_ASBOX
 
1151
## ----------------- ##
 
1152
## Output variables. ##
 
1153
## ----------------- ##
 
1154
_ASBOX
 
1155
    echo
 
1156
    for ac_var in $ac_subst_vars
 
1157
    do
 
1158
      eval ac_val=$`echo $ac_var`
 
1159
      echo "$ac_var='"'"'$ac_val'"'"'"
 
1160
    done | sort
 
1161
    echo
 
1162
 
 
1163
    if test -n "$ac_subst_files"; then
 
1164
      cat <<\_ASBOX
 
1165
## ------------- ##
 
1166
## Output files. ##
 
1167
## ------------- ##
 
1168
_ASBOX
 
1169
      echo
 
1170
      for ac_var in $ac_subst_files
 
1171
      do
 
1172
        eval ac_val=$`echo $ac_var`
 
1173
        echo "$ac_var='"'"'$ac_val'"'"'"
 
1174
      done | sort
 
1175
      echo
 
1176
    fi
 
1177
 
 
1178
    if test -s confdefs.h; then
 
1179
      cat <<\_ASBOX
 
1180
## ----------- ##
 
1181
## confdefs.h. ##
 
1182
## ----------- ##
 
1183
_ASBOX
 
1184
      echo
 
1185
      sed "/^$/d" confdefs.h | sort
 
1186
      echo
 
1187
    fi
 
1188
    test "$ac_signal" != 0 &&
 
1189
      echo "$as_me: caught signal $ac_signal"
 
1190
    echo "$as_me: exit $exit_status"
 
1191
  } >&5
 
1192
  rm -f core *.core &&
 
1193
  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
 
1194
    exit $exit_status
 
1195
     ' 0
 
1196
for ac_signal in 1 2 13 15; do
 
1197
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 
1198
done
 
1199
ac_signal=0
 
1200
 
 
1201
# confdefs.h avoids OS command line length limits that DEFS can exceed.
 
1202
rm -rf conftest* confdefs.h
 
1203
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
 
1204
echo >confdefs.h
 
1205
 
 
1206
# Predefined preprocessor variables.
 
1207
 
 
1208
cat >>confdefs.h <<_ACEOF
 
1209
#define PACKAGE_NAME "$PACKAGE_NAME"
 
1210
_ACEOF
 
1211
 
 
1212
 
 
1213
cat >>confdefs.h <<_ACEOF
 
1214
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
 
1215
_ACEOF
 
1216
 
 
1217
 
 
1218
cat >>confdefs.h <<_ACEOF
 
1219
#define PACKAGE_VERSION "$PACKAGE_VERSION"
 
1220
_ACEOF
 
1221
 
 
1222
 
 
1223
cat >>confdefs.h <<_ACEOF
 
1224
#define PACKAGE_STRING "$PACKAGE_STRING"
 
1225
_ACEOF
 
1226
 
 
1227
 
 
1228
cat >>confdefs.h <<_ACEOF
 
1229
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 
1230
_ACEOF
 
1231
 
 
1232
 
 
1233
# Let the site file select an alternate cache file if it wants to.
 
1234
# Prefer explicitly selected file to automatically selected ones.
 
1235
if test -z "$CONFIG_SITE"; then
 
1236
  if test "x$prefix" != xNONE; then
 
1237
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
 
1238
  else
 
1239
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 
1240
  fi
 
1241
fi
 
1242
for ac_site_file in $CONFIG_SITE; do
 
1243
  if test -r "$ac_site_file"; then
 
1244
    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 
1245
echo "$as_me: loading site script $ac_site_file" >&6;}
 
1246
    sed 's/^/| /' "$ac_site_file" >&5
 
1247
    . "$ac_site_file"
 
1248
  fi
 
1249
done
 
1250
 
 
1251
if test -r "$cache_file"; then
 
1252
  # Some versions of bash will fail to source /dev/null (special
 
1253
  # files actually), so we avoid doing that.
 
1254
  if test -f "$cache_file"; then
 
1255
    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 
1256
echo "$as_me: loading cache $cache_file" >&6;}
 
1257
    case $cache_file in
 
1258
      [\\/]* | ?:[\\/]* ) . $cache_file;;
 
1259
      *)                      . ./$cache_file;;
 
1260
    esac
 
1261
  fi
 
1262
else
 
1263
  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
 
1264
echo "$as_me: creating cache $cache_file" >&6;}
 
1265
  >$cache_file
 
1266
fi
 
1267
 
 
1268
# Check that the precious variables saved in the cache have kept the same
 
1269
# value.
 
1270
ac_cache_corrupted=false
 
1271
for ac_var in `(set) 2>&1 |
 
1272
               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
 
1273
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
 
1274
  eval ac_new_set=\$ac_env_${ac_var}_set
 
1275
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
 
1276
  eval ac_new_val="\$ac_env_${ac_var}_value"
 
1277
  case $ac_old_set,$ac_new_set in
 
1278
    set,)
 
1279
      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 
1280
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
 
1281
      ac_cache_corrupted=: ;;
 
1282
    ,set)
 
1283
      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
 
1284
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
 
1285
      ac_cache_corrupted=: ;;
 
1286
    ,);;
 
1287
    *)
 
1288
      if test "x$ac_old_val" != "x$ac_new_val"; then
 
1289
        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
 
1290
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
 
1291
        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
 
1292
echo "$as_me:   former value:  $ac_old_val" >&2;}
 
1293
        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
 
1294
echo "$as_me:   current value: $ac_new_val" >&2;}
 
1295
        ac_cache_corrupted=:
 
1296
      fi;;
 
1297
  esac
 
1298
  # Pass precious variables to config.status.
 
1299
  if test "$ac_new_set" = set; then
 
1300
    case $ac_new_val in
 
1301
    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
 
1302
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
 
1303
    *) ac_arg=$ac_var=$ac_new_val ;;
 
1304
    esac
 
1305
    case " $ac_configure_args " in
 
1306
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
 
1307
      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
 
1308
    esac
 
1309
  fi
 
1310
done
 
1311
if $ac_cache_corrupted; then
 
1312
  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
 
1313
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
 
1314
  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
 
1315
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
 
1316
   { (exit 1); exit 1; }; }
 
1317
fi
 
1318
 
 
1319
ac_ext=c
 
1320
ac_cpp='$CPP $CPPFLAGS'
 
1321
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 
1322
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 
1323
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
1324
 
 
1325
 
 
1326
 
 
1327
 
 
1328
 
 
1329
 
 
1330
 
 
1331
 
 
1332
 
 
1333
 
 
1334
 
 
1335
 
 
1336
 
 
1337
 
 
1338
 
 
1339
 
 
1340
 
 
1341
 
 
1342
 
 
1343
 
 
1344
          ac_config_headers="$ac_config_headers include/private/apu_config.h"
 
1345
 
 
1346
ac_aux_dir=
 
1347
for ac_dir in build $srcdir/build; do
 
1348
  if test -f $ac_dir/install-sh; then
 
1349
    ac_aux_dir=$ac_dir
 
1350
    ac_install_sh="$ac_aux_dir/install-sh -c"
 
1351
    break
 
1352
  elif test -f $ac_dir/install.sh; then
 
1353
    ac_aux_dir=$ac_dir
 
1354
    ac_install_sh="$ac_aux_dir/install.sh -c"
 
1355
    break
 
1356
  elif test -f $ac_dir/shtool; then
 
1357
    ac_aux_dir=$ac_dir
 
1358
    ac_install_sh="$ac_aux_dir/shtool install -c"
 
1359
    break
 
1360
  fi
 
1361
done
 
1362
if test -z "$ac_aux_dir"; then
 
1363
  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
 
1364
echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
 
1365
   { (exit 1); exit 1; }; }
 
1366
fi
 
1367
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
 
1368
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 
1369
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
1370
 
 
1371
 
 
1372
 
 
1373
 
 
1374
 
 
1375
 
 
1376
 
 
1377
 
 
1378
 
 
1379
 
 
1380
 
 
1381
 
 
1382
 
 
1383
 
 
1384
 
 
1385
 
 
1386
 
 
1387
 
 
1388
 
 
1389
 
 
1390
 
 
1391
 
 
1392
 
 
1393
 
 
1394
 
 
1395
 
 
1396
 
 
1397
 
 
1398
 
 
1399
 
 
1400
 
 
1401
 
 
1402
 
 
1403
 
 
1404
 
 
1405
 
 
1406
 
 
1407
 
 
1408
 
 
1409
 
 
1410
 
 
1411
 
 
1412
 
 
1413
 
 
1414
 
 
1415
 
 
1416
 
 
1417
 
 
1418
 
 
1419
 
 
1420
 
 
1421
 
 
1422
 
 
1423
 
 
1424
 
 
1425
 
 
1426
 
 
1427
 
 
1428
 
 
1429
 
 
1430
 
 
1431
 
 
1432
 
 
1433
 
 
1434
 
 
1435
 
 
1436
 
 
1437
 
 
1438
 
 
1439
 
 
1440
 
 
1441
 
 
1442
 
 
1443
 
 
1444
 
 
1445
 
 
1446
 
 
1447
 
 
1448
 
 
1449
 
 
1450
 
 
1451
 
 
1452
 
 
1453
 
 
1454
 
 
1455
 
 
1456
 
 
1457
 
 
1458
 
 
1459
 
 
1460
 
 
1461
 
 
1462
 
 
1463
 
 
1464
 
 
1465
 
 
1466
 
 
1467
 
 
1468
 
 
1469
 
 
1470
 
 
1471
 
 
1472
 
 
1473
 
 
1474
 
 
1475
 
 
1476
 
 
1477
 
 
1478
 
 
1479
 
 
1480
 
 
1481
 
 
1482
 
 
1483
 
 
1484
 
 
1485
 
 
1486
 
 
1487
 
 
1488
 
 
1489
 
 
1490
 
 
1491
 
 
1492
 
 
1493
 
 
1494
 
 
1495
 
 
1496
 
 
1497
 
 
1498
 
 
1499
 
 
1500
 
 
1501
 
 
1502
 
 
1503
 
 
1504
 
 
1505
 
 
1506
 
 
1507
 
 
1508
 
 
1509
 
 
1510
 
 
1511
 
 
1512
 
 
1513
 
 
1514
 
 
1515
 
 
1516
 
 
1517
 
 
1518
 
 
1519
 
 
1520
 
 
1521
 
 
1522
 
 
1523
 
 
1524
 
 
1525
 
 
1526
 
 
1527
 
 
1528
 
 
1529
 
 
1530
 
 
1531
 
 
1532
 
 
1533
 
 
1534
 
 
1535
  rm -f config.nice
 
1536
  cat >config.nice<<EOF
 
1537
#! /bin/sh
 
1538
#
 
1539
# Created by configure
 
1540
 
 
1541
EOF
 
1542
  if test -n "$CC"; then
 
1543
    echo "CC=\"$CC\"; export CC" >> config.nice
 
1544
  fi
 
1545
  if test -n "$CFLAGS"; then
 
1546
    echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> config.nice
 
1547
  fi
 
1548
  if test -n "$CPPFLAGS"; then
 
1549
    echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> config.nice
 
1550
  fi
 
1551
  if test -n "$LDFLAGS"; then
 
1552
    echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> config.nice
 
1553
  fi
 
1554
  if test -n "$LTFLAGS"; then
 
1555
    echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> config.nice
 
1556
  fi
 
1557
  if test -n "$LIBS"; then
 
1558
    echo "LIBS=\"$LIBS\"; export LIBS" >> config.nice
 
1559
  fi
 
1560
  if test -n "$INCLUDES"; then
 
1561
    echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> config.nice
 
1562
  fi
 
1563
  if test -n "$NOTEST_CFLAGS"; then
 
1564
    echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> config.nice
 
1565
  fi
 
1566
  if test -n "$NOTEST_CPPFLAGS"; then
 
1567
    echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> config.nice
 
1568
  fi
 
1569
  if test -n "$NOTEST_LDFLAGS"; then
 
1570
    echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> config.nice
 
1571
  fi
 
1572
  if test -n "$NOTEST_LIBS"; then
 
1573
    echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> config.nice
 
1574
  fi
 
1575
 
 
1576
  for arg in $0 "$@"; do
 
1577
 
 
1578
ap_last=
 
1579
ap_cur="$arg"
 
1580
while test "x${ap_cur}" != "x${ap_last}";
 
1581
do
 
1582
  ap_last="${ap_cur}"
 
1583
  ap_cur=`eval "echo ${ap_cur}"`
 
1584
done
 
1585
arg="${ap_cur}"
 
1586
 
 
1587
    echo "\"$arg\" \\" >> config.nice
 
1588
  done
 
1589
  echo '"$@"' >> config.nice
 
1590
  chmod +x config.nice
 
1591
 
 
1592
 
 
1593
 
 
1594
abs_srcdir=`(cd $srcdir && pwd)`
 
1595
abs_builddir=`pwd`
 
1596
 
 
1597
if test "$abs_builddir" != "$abs_srcdir"; then
 
1598
  USE_VPATH=1
 
1599
  APU_CONFIG_LOCATION=build
 
1600
else
 
1601
  APU_CONFIG_LOCATION=source
 
1602
fi
 
1603
 
 
1604
 
 
1605
 
 
1606
# Make sure we can run config.sub.
 
1607
$ac_config_sub sun4 >/dev/null 2>&1 ||
 
1608
  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
 
1609
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
 
1610
   { (exit 1); exit 1; }; }
 
1611
 
 
1612
echo "$as_me:$LINENO: checking build system type" >&5
 
1613
echo $ECHO_N "checking build system type... $ECHO_C" >&6
 
1614
if test "${ac_cv_build+set}" = set; then
 
1615
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
1616
else
 
1617
  ac_cv_build_alias=$build_alias
 
1618
test -z "$ac_cv_build_alias" &&
 
1619
  ac_cv_build_alias=`$ac_config_guess`
 
1620
test -z "$ac_cv_build_alias" &&
 
1621
  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
 
1622
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
 
1623
   { (exit 1); exit 1; }; }
 
1624
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
 
1625
  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
 
1626
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
 
1627
   { (exit 1); exit 1; }; }
 
1628
 
 
1629
fi
 
1630
echo "$as_me:$LINENO: result: $ac_cv_build" >&5
 
1631
echo "${ECHO_T}$ac_cv_build" >&6
 
1632
build=$ac_cv_build
 
1633
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 
1634
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 
1635
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
1636
 
 
1637
 
 
1638
echo "$as_me:$LINENO: checking host system type" >&5
 
1639
echo $ECHO_N "checking host system type... $ECHO_C" >&6
 
1640
if test "${ac_cv_host+set}" = set; then
 
1641
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
1642
else
 
1643
  ac_cv_host_alias=$host_alias
 
1644
test -z "$ac_cv_host_alias" &&
 
1645
  ac_cv_host_alias=$ac_cv_build_alias
 
1646
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
 
1647
  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
 
1648
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
 
1649
   { (exit 1); exit 1; }; }
 
1650
 
 
1651
fi
 
1652
echo "$as_me:$LINENO: result: $ac_cv_host" >&5
 
1653
echo "${ECHO_T}$ac_cv_host" >&6
 
1654
host=$ac_cv_host
 
1655
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 
1656
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 
1657
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
1658
 
 
1659
 
 
1660
echo "$as_me:$LINENO: checking target system type" >&5
 
1661
echo $ECHO_N "checking target system type... $ECHO_C" >&6
 
1662
if test "${ac_cv_target+set}" = set; then
 
1663
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
1664
else
 
1665
  ac_cv_target_alias=$target_alias
 
1666
test "x$ac_cv_target_alias" = "x" &&
 
1667
  ac_cv_target_alias=$ac_cv_host_alias
 
1668
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
 
1669
  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
 
1670
echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
 
1671
   { (exit 1); exit 1; }; }
 
1672
 
 
1673
fi
 
1674
echo "$as_me:$LINENO: result: $ac_cv_target" >&5
 
1675
echo "${ECHO_T}$ac_cv_target" >&6
 
1676
target=$ac_cv_target
 
1677
target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 
1678
target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 
1679
target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
1680
 
 
1681
 
 
1682
# The aliases save the names the user supplied, while $host etc.
 
1683
# will get canonicalized.
 
1684
test -n "$target_alias" &&
 
1685
  test "$program_prefix$program_suffix$program_transform_name" = \
 
1686
    NONENONEs,x,x, &&
 
1687
  program_prefix=${target_alias}-
 
1688
 
 
1689
# Find a good install program.  We prefer a C program (faster),
 
1690
# so one script is as good as another.  But avoid the broken or
 
1691
# incompatible versions:
 
1692
# SysV /etc/install, /usr/sbin/install
 
1693
# SunOS /usr/etc/install
 
1694
# IRIX /sbin/install
 
1695
# AIX /bin/install
 
1696
# AmigaOS /C/install, which installs bootblocks on floppy discs
 
1697
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 
1698
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
 
1699
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 
1700
# OS/2's system install, which has a completely different semantic
 
1701
# ./install, which can be erroneously created by make from ./install.sh.
 
1702
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
 
1703
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
 
1704
if test -z "$INSTALL"; then
 
1705
if test "${ac_cv_path_install+set}" = set; then
 
1706
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
1707
else
 
1708
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
1709
for as_dir in $PATH
 
1710
do
 
1711
  IFS=$as_save_IFS
 
1712
  test -z "$as_dir" && as_dir=.
 
1713
  # Account for people who put trailing slashes in PATH elements.
 
1714
case $as_dir/ in
 
1715
  ./ | .// | /cC/* | \
 
1716
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
 
1717
  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
 
1718
  /usr/ucb/* ) ;;
 
1719
  *)
 
1720
    # OSF1 and SCO ODT 3.0 have their own names for install.
 
1721
    # Don't use installbsd from OSF since it installs stuff as root
 
1722
    # by default.
 
1723
    for ac_prog in ginstall scoinst install; do
 
1724
      for ac_exec_ext in '' $ac_executable_extensions; do
 
1725
        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 
1726
          if test $ac_prog = install &&
 
1727
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 
1728
            # AIX install.  It has an incompatible calling convention.
 
1729
            :
 
1730
          elif test $ac_prog = install &&
 
1731
            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 
1732
            # program-specific install script used by HP pwplus--don't use.
 
1733
            :
 
1734
          else
 
1735
            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
 
1736
            break 3
 
1737
          fi
 
1738
        fi
 
1739
      done
 
1740
    done
 
1741
    ;;
 
1742
esac
 
1743
done
 
1744
 
 
1745
 
 
1746
fi
 
1747
  if test "${ac_cv_path_install+set}" = set; then
 
1748
    INSTALL=$ac_cv_path_install
 
1749
  else
 
1750
    # As a last resort, use the slow shell script.  We don't cache a
 
1751
    # path for INSTALL within a source directory, because that will
 
1752
    # break other packages using the cache if that directory is
 
1753
    # removed, or if the path is relative.
 
1754
    INSTALL=$ac_install_sh
 
1755
  fi
 
1756
fi
 
1757
echo "$as_me:$LINENO: result: $INSTALL" >&5
 
1758
echo "${ECHO_T}$INSTALL" >&6
 
1759
 
 
1760
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 
1761
# It thinks the first close brace ends the variable substitution.
 
1762
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
1763
 
 
1764
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
1765
 
 
1766
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
1767
 
 
1768
 
 
1769
top_builddir="$abs_builddir"
 
1770
 
 
1771
 
 
1772
 
 
1773
 
 
1774
 
 
1775
  echo "$as_me:$LINENO: checking for working mkdir -p" >&5
 
1776
echo $ECHO_N "checking for working mkdir -p... $ECHO_C" >&6
 
1777
if test "${ac_cv_mkdir_p+set}" = set; then
 
1778
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
1779
else
 
1780
 
 
1781
    test -d conftestdir && rm -rf conftestdir
 
1782
    mkdir -p conftestdir/somedir >/dev/null 2>&1
 
1783
    if test -d conftestdir/somedir; then
 
1784
      ac_cv_mkdir_p=yes
 
1785
    else
 
1786
      ac_cv_mkdir_p=no
 
1787
    fi
 
1788
    rm -rf conftestdir
 
1789
 
 
1790
fi
 
1791
echo "$as_me:$LINENO: result: $ac_cv_mkdir_p" >&5
 
1792
echo "${ECHO_T}$ac_cv_mkdir_p" >&6
 
1793
  if test "$ac_cv_mkdir_p" = "yes"; then
 
1794
      mkdir_p="mkdir -p"
 
1795
  else
 
1796
      mkdir_p="$abs_srcdir/build/mkdir.sh"
 
1797
  fi
 
1798
 
 
1799
 
 
1800
get_version="$abs_srcdir/build/get-version.sh"
 
1801
version_hdr="$abs_srcdir/include/apu_version.h"
 
1802
APRUTIL_MAJOR_VERSION="`$get_version major $version_hdr APU`"
 
1803
APRUTIL_DOTTED_VERSION="`$get_version all $version_hdr APU`"
 
1804
 
 
1805
 
 
1806
 
 
1807
 
 
1808
echo "APR-util Version: ${APRUTIL_DOTTED_VERSION}"
 
1809
 
 
1810
 
 
1811
# Check whether --enable-layout or --disable-layout was given.
 
1812
if test "${enable_layout+set}" = set; then
 
1813
  enableval="$enable_layout"
 
1814
 
 
1815
  LAYOUT=$enableval
 
1816
 
 
1817
fi;
 
1818
 
 
1819
if test -z "$LAYOUT"; then
 
1820
  LAYOUT="apr-util"
 
1821
fi
 
1822
 
 
1823
  if test ! -f $srcdir/config.layout; then
 
1824
    echo "** Error: Layout file $srcdir/config.layout not found"
 
1825
    echo "** Error: Cannot use undefined layout '$LAYOUT'"
 
1826
    exit 1
 
1827
  fi
 
1828
  # Catch layout names including a slash which will otherwise
 
1829
  # confuse the heck out of the sed script.
 
1830
  case $LAYOUT in
 
1831
  */*)
 
1832
    echo "** Error: $LAYOUT is not a valid layout name"
 
1833
    exit 1 ;;
 
1834
  esac
 
1835
  pldconf=./config.pld
 
1836
 
 
1837
  sed -e "1s/[  ]*<[lL]ayout[   ]*$LAYOUT[      ]*>[    ]*//;1t" \
 
1838
      -e "1,/[  ]*<[lL]ayout[   ]*$LAYOUT[      ]*>[    ]*/d" \
 
1839
      -e '/[    ]*<\/Layout>[   ]*/,$d' \
 
1840
      -e "s/^[  ]*//g" \
 
1841
      -e "s/:[  ]*/=\'/g" \
 
1842
      -e "s/[   ]*$/'/g" \
 
1843
      $srcdir/config.layout > $pldconf
 
1844
  layout_name=$LAYOUT
 
1845
  if test ! -s $pldconf; then
 
1846
    echo "** Error: unable to find layout $layout_name"
 
1847
    exit 1
 
1848
  fi
 
1849
  . $pldconf
 
1850
  rm $pldconf
 
1851
  for var in prefix exec_prefix bindir sbindir libexecdir mandir \
 
1852
             sysconfdir datadir includedir localstatedir runtimedir \
 
1853
             logfiledir libdir installbuilddir libsuffix ; do
 
1854
    eval "val=\"\$$var\""
 
1855
    case $val in
 
1856
      *+)
 
1857
        val=`echo $val | sed -e 's;\+$;;'`
 
1858
        eval "$var=\"\$val\""
 
1859
        autosuffix=yes
 
1860
        ;;
 
1861
      *)
 
1862
        autosuffix=no
 
1863
        ;;
 
1864
    esac
 
1865
    val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
 
1866
    val=`echo $val | sed -e 's:[\$]\([a-z_]*\):$\1:g'`
 
1867
    if test "$autosuffix" = "yes"; then
 
1868
      if echo $val | grep apache >/dev/null; then
 
1869
        addtarget=no
 
1870
      else
 
1871
        addtarget=yes
 
1872
      fi
 
1873
      if test "$addtarget" = "yes"; then
 
1874
        val="$val/apache2"
 
1875
      fi
 
1876
    fi
 
1877
    eval "$var='$val'"
 
1878
  done
 
1879
 
 
1880
 
 
1881
 
 
1882
echo "$as_me:$LINENO: checking for chosen layout" >&5
 
1883
echo $ECHO_N "checking for chosen layout... $ECHO_C" >&6
 
1884
echo "$as_me:$LINENO: result: $layout_name" >&5
 
1885
echo "${ECHO_T}$layout_name" >&6
 
1886
 
 
1887
 
 
1888
ac_prev=
 
1889
for ac_option
 
1890
do
 
1891
  # If the previous option needs an argument, assign it.
 
1892
  if test -n "$ac_prev"; then
 
1893
    eval "$ac_prev=\$ac_option"
 
1894
    ac_prev=
 
1895
    continue
 
1896
  fi
 
1897
 
 
1898
  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
 
1899
 
 
1900
  case $ac_option in
 
1901
 
 
1902
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
 
1903
    ac_prev=bindir ;;
 
1904
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
 
1905
    bindir="$ac_optarg" ;;
 
1906
 
 
1907
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
 
1908
    ac_prev=datadir ;;
 
1909
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
 
1910
  | --da=*)
 
1911
    datadir="$ac_optarg" ;;
 
1912
 
 
1913
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
 
1914
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
 
1915
  | --exec | --exe | --ex)
 
1916
    ac_prev=exec_prefix ;;
 
1917
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
 
1918
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
 
1919
  | --exec=* | --exe=* | --ex=*)
 
1920
    exec_prefix="$ac_optarg" ;;
 
1921
 
 
1922
  -includedir | --includedir | --includedi | --included | --include \
 
1923
  | --includ | --inclu | --incl | --inc)
 
1924
    ac_prev=includedir ;;
 
1925
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
 
1926
  | --includ=* | --inclu=* | --incl=* | --inc=*)
 
1927
    includedir="$ac_optarg" ;;
 
1928
 
 
1929
  -infodir | --infodir | --infodi | --infod | --info | --inf)
 
1930
    ac_prev=infodir ;;
 
1931
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
 
1932
    infodir="$ac_optarg" ;;
 
1933
 
 
1934
  -libdir | --libdir | --libdi | --libd)
 
1935
    ac_prev=libdir ;;
 
1936
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
 
1937
    libdir="$ac_optarg" ;;
 
1938
 
 
1939
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
 
1940
  | --libexe | --libex | --libe)
 
1941
    ac_prev=libexecdir ;;
 
1942
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
 
1943
  | --libexe=* | --libex=* | --libe=*)
 
1944
    libexecdir="$ac_optarg" ;;
 
1945
 
 
1946
  -localstatedir | --localstatedir | --localstatedi | --localstated \
 
1947
  | --localstate | --localstat | --localsta | --localst \
 
1948
  | --locals | --local | --loca | --loc | --lo)
 
1949
    ac_prev=localstatedir ;;
 
1950
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
 
1951
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
 
1952
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
 
1953
    localstatedir="$ac_optarg" ;;
 
1954
 
 
1955
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
 
1956
    ac_prev=mandir ;;
 
1957
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
 
1958
    mandir="$ac_optarg" ;;
 
1959
 
 
1960
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
 
1961
    ac_prev=prefix ;;
 
1962
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
 
1963
    prefix="$ac_optarg" ;;
 
1964
 
 
1965
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
 
1966
    ac_prev=sbindir ;;
 
1967
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
 
1968
  | --sbi=* | --sb=*)
 
1969
    sbindir="$ac_optarg" ;;
 
1970
 
 
1971
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
 
1972
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
 
1973
  | --sharedst | --shareds | --shared | --share | --shar \
 
1974
  | --sha | --sh)
 
1975
    ac_prev=sharedstatedir ;;
 
1976
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
 
1977
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
 
1978
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
 
1979
  | --sha=* | --sh=*)
 
1980
    sharedstatedir="$ac_optarg" ;;
 
1981
 
 
1982
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
 
1983
  | --syscon | --sysco | --sysc | --sys | --sy)
 
1984
    ac_prev=sysconfdir ;;
 
1985
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
 
1986
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
 
1987
    sysconfdir="$ac_optarg" ;;
 
1988
 
 
1989
  esac
 
1990
done
 
1991
 
 
1992
# Be sure to have absolute paths.
 
1993
for ac_var in exec_prefix prefix
 
1994
do
 
1995
  eval ac_val=$`echo $ac_var`
 
1996
  case $ac_val in
 
1997
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
 
1998
    *)  { { echo "$as_me:$LINENO: error: expected an absolute path for --$ac_var: $ac_val" >&5
 
1999
echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2;}
 
2000
   { (exit 1); exit 1; }; };;
 
2001
  esac
 
2002
done
 
2003
 
 
2004
 
 
2005
 
 
2006
 
 
2007
if test "x$apu_preload_done" != "xyes" ; then
 
2008
    apu_preload_done="yes"
 
2009
 
 
2010
    echo "Applying apr-util hints file rules for $host"
 
2011
 
 
2012
    case "$host" in
 
2013
    *-dec-osf*)
 
2014
 
 
2015
  if test -z "$apu_crypt_threadsafe"; then
 
2016
    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
 
2017
    apu_crypt_threadsafe="1"
 
2018
  fi
 
2019
 
 
2020
        ;;
 
2021
    *-hp-hpux11.*)
 
2022
 
 
2023
  if test -z "$apu_crypt_threadsafe"; then
 
2024
    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
 
2025
    apu_crypt_threadsafe="1"
 
2026
  fi
 
2027
 
 
2028
        ;;
 
2029
    *-ibm-aix4*|*-ibm-aix5.1*)
 
2030
 
 
2031
  if test -z "$apu_iconv_inbuf_const"; then
 
2032
    test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
 
2033
    apu_iconv_inbuf_const="1"
 
2034
  fi
 
2035
 
 
2036
        ;;
 
2037
    *-ibm-os390)
 
2038
 
 
2039
  if test -z "$apu_crypt_threadsafe"; then
 
2040
    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
 
2041
    apu_crypt_threadsafe="1"
 
2042
  fi
 
2043
 
 
2044
        ;;
 
2045
    *-solaris2*)
 
2046
 
 
2047
  if test -z "$apu_iconv_inbuf_const"; then
 
2048
    test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
 
2049
    apu_iconv_inbuf_const="1"
 
2050
  fi
 
2051
 
 
2052
 
 
2053
  if test -z "$apu_crypt_threadsafe"; then
 
2054
    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
 
2055
    apu_crypt_threadsafe="1"
 
2056
  fi
 
2057
 
 
2058
        ;;
 
2059
    *-sco3.2v5*)
 
2060
 
 
2061
  if test -z "$apu_db_xtra_libs"; then
 
2062
    test "x$silent" != "xyes" && echo "  setting apu_db_xtra_libs to \"-lsocket\""
 
2063
    apu_db_xtra_libs="-lsocket"
 
2064
  fi
 
2065
 
 
2066
        ;;
 
2067
    esac
 
2068
 
 
2069
fi
 
2070
 
 
2071
 
 
2072
 
 
2073
APRUTIL_INCLUDES=""
 
2074
APRUTIL_PRIV_INCLUDES="-I$top_builddir/include -I$top_builddir/include/private"
 
2075
if test -n "$USE_VPATH"; then
 
2076
    APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES -I$abs_srcdir/include/private -I$abs_srcdir/include"
 
2077
fi
 
2078
 
 
2079
 
 
2080
 
 
2081
 
 
2082
  apr_found="no"
 
2083
 
 
2084
  if test "$target_os" = "os2-emx"; then
 
2085
    # Scripts don't pass test -x on OS/2
 
2086
    TEST_X="test -f"
 
2087
  else
 
2088
    TEST_X="test -x"
 
2089
  fi
 
2090
 
 
2091
  acceptable_majors="1"
 
2092
 
 
2093
  apr_temp_acceptable_apr_config=""
 
2094
  for apr_temp_major in $acceptable_majors
 
2095
  do
 
2096
    case $apr_temp_major in
 
2097
      0)
 
2098
      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
 
2099
      ;;
 
2100
      *)
 
2101
      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
 
2102
      ;;
 
2103
    esac
 
2104
  done
 
2105
 
 
2106
  echo "$as_me:$LINENO: checking for APR" >&5
 
2107
echo $ECHO_N "checking for APR... $ECHO_C" >&6
 
2108
 
 
2109
# Check whether --with-apr or --without-apr was given.
 
2110
if test "${with_apr+set}" = set; then
 
2111
  withval="$with_apr"
 
2112
 
 
2113
    if test "$withval" = "no" || test "$withval" = "yes"; then
 
2114
      { { echo "$as_me:$LINENO: error: --with-apr requires a directory or file to be provided" >&5
 
2115
echo "$as_me: error: --with-apr requires a directory or file to be provided" >&2;}
 
2116
   { (exit 1); exit 1; }; }
 
2117
    fi
 
2118
 
 
2119
    for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
 
2120
    do
 
2121
      for lookdir in "$withval/bin" "$withval"
 
2122
      do
 
2123
        if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
 
2124
          apr_found="yes"
 
2125
          apr_config="$lookdir/$apr_temp_apr_config_file"
 
2126
          break 2
 
2127
        fi
 
2128
      done
 
2129
    done
 
2130
 
 
2131
    if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
 
2132
      apr_found="yes"
 
2133
      apr_config="$withval"
 
2134
    fi
 
2135
 
 
2136
            if test "$apr_found" != "yes"; then
 
2137
      { { echo "$as_me:$LINENO: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file." >&5
 
2138
echo "$as_me: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file." >&2;}
 
2139
   { (exit 1); exit 1; }; }
 
2140
    fi
 
2141
 
 
2142
else
 
2143
 
 
2144
        if test -n "" && test "" = "1"; then
 
2145
      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
 
2146
      do
 
2147
        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
 
2148
          apr_found="yes"
 
2149
          apr_config="$apr_temp_apr_config_file"
 
2150
          break
 
2151
        else
 
2152
                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr /usr/local/apache2; do
 
2153
            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
 
2154
              apr_found="yes"
 
2155
              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
 
2156
              break 2
 
2157
            fi
 
2158
          done
 
2159
        fi
 
2160
      done
 
2161
    fi
 
2162
        if test "$apr_found" = "no" && test -d ""; then
 
2163
      apr_temp_abs_srcdir="`cd  && pwd`"
 
2164
      apr_found="reconfig"
 
2165
      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
 
2166
      case $apr_bundled_major in
 
2167
        "")
 
2168
          { { echo "$as_me:$LINENO: error: failed to find major version of bundled APR" >&5
 
2169
echo "$as_me: error: failed to find major version of bundled APR" >&2;}
 
2170
   { (exit 1); exit 1; }; }
 
2171
        ;;
 
2172
        0)
 
2173
          apr_temp_apr_config_file="apr-config"
 
2174
        ;;
 
2175
        *)
 
2176
          apr_temp_apr_config_file="apr-$apr_bundled_major-config"
 
2177
        ;;
 
2178
      esac
 
2179
      if test -n ""; then
 
2180
        apr_config="/$apr_temp_apr_config_file"
 
2181
      else
 
2182
        apr_config="/$apr_temp_apr_config_file"
 
2183
      fi
 
2184
    fi
 
2185
 
 
2186
fi;
 
2187
 
 
2188
  echo "$as_me:$LINENO: result: $apr_found" >&5
 
2189
echo "${ECHO_T}$apr_found" >&6
 
2190
 
 
2191
  if test "$apr_found" = "no"; then
 
2192
    { { echo "$as_me:$LINENO: error: APR could not be located. Please use the --with-apr option." >&5
 
2193
echo "$as_me: error: APR could not be located. Please use the --with-apr option." >&2;}
 
2194
   { (exit 1); exit 1; }; }
 
2195
  fi
 
2196
 
 
2197
  APR_BUILD_DIR="`$apr_config --installbuilddir`"
 
2198
 
 
2199
      APR_BUILD_DIR="`cd $APR_BUILD_DIR && pwd`"
 
2200
 
 
2201
  APR_INCLUDES="`$apr_config --includes`"
 
2202
  APR_LIBS="`$apr_config --link-libtool --libs`"
 
2203
  APR_SO_EXT="`$apr_config --apr-so-ext`"
 
2204
  APR_LIB_TARGET="`$apr_config --apr-lib-target`"
 
2205
 
 
2206
 
 
2207
 
 
2208
 
 
2209
 
 
2210
 
 
2211
 
 
2212
  if test -z "$CC"; then
 
2213
    test "x$silent" != "xyes" && echo "  setting CC to \"`$apr_config --cc`\""
 
2214
    CC="`$apr_config --cc`"
 
2215
  fi
 
2216
 
 
2217
 
 
2218
  if test -z "$CPP"; then
 
2219
    test "x$silent" != "xyes" && echo "  setting CPP to \"`$apr_config --cpp`\""
 
2220
    CPP="`$apr_config --cpp`"
 
2221
  fi
 
2222
 
 
2223
 
 
2224
  if test "x$CFLAGS" = "x"; then
 
2225
    test "x$silent" != "xyes" && echo "  setting CFLAGS to \"`$apr_config --cflags`\""
 
2226
    CFLAGS="`$apr_config --cflags`"
 
2227
  else
 
2228
    apr_addto_bugger="`$apr_config --cflags`"
 
2229
    for i in $apr_addto_bugger; do
 
2230
      apr_addto_duplicate="0"
 
2231
      for j in $CFLAGS; do
 
2232
        if test "x$i" = "x$j"; then
 
2233
          apr_addto_duplicate="1"
 
2234
          break
 
2235
        fi
 
2236
      done
 
2237
      if test $apr_addto_duplicate = "0"; then
 
2238
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CFLAGS"
 
2239
        CFLAGS="$CFLAGS $i"
 
2240
      fi
 
2241
    done
 
2242
  fi
 
2243
 
 
2244
 
 
2245
  if test "x$CPPFLAGS" = "x"; then
 
2246
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"`$apr_config --cppflags`\""
 
2247
    CPPFLAGS="`$apr_config --cppflags`"
 
2248
  else
 
2249
    apr_addto_bugger="`$apr_config --cppflags`"
 
2250
    for i in $apr_addto_bugger; do
 
2251
      apr_addto_duplicate="0"
 
2252
      for j in $CPPFLAGS; do
 
2253
        if test "x$i" = "x$j"; then
 
2254
          apr_addto_duplicate="1"
 
2255
          break
 
2256
        fi
 
2257
      done
 
2258
      if test $apr_addto_duplicate = "0"; then
 
2259
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
2260
        CPPFLAGS="$CPPFLAGS $i"
 
2261
      fi
 
2262
    done
 
2263
  fi
 
2264
 
 
2265
 
 
2266
if test -d ../apr-iconv; then
 
2267
 
 
2268
  # save our work to this point; this allows the sub-package to use it
 
2269
  cat >confcache <<\_ACEOF
 
2270
# This file is a shell script that caches the results of configure
 
2271
# tests run on this system so they can be shared between configure
 
2272
# scripts and configure runs, see configure's option --config-cache.
 
2273
# It is not useful on other systems.  If it contains results you don't
 
2274
# want to keep, you may remove or edit it.
 
2275
#
 
2276
# config.status only pays attention to the cache file if you give it
 
2277
# the --recheck option to rerun configure.
 
2278
#
 
2279
# `ac_cv_env_foo' variables (set or unset) will be overridden when
 
2280
# loading this file, other *unset* `ac_cv_foo' will be assigned the
 
2281
# following values.
 
2282
 
 
2283
_ACEOF
 
2284
 
 
2285
# The following way of writing the cache mishandles newlines in values,
 
2286
# but we know of no workaround that is simple, portable, and efficient.
 
2287
# So, don't put newlines in cache variables' values.
 
2288
# Ultrix sh set writes to stderr and can't be redirected directly,
 
2289
# and sets the high bit in the cache file unless we assign to the vars.
 
2290
{
 
2291
  (set) 2>&1 |
 
2292
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
 
2293
    *ac_space=\ *)
 
2294
      # `set' does not quote correctly, so add quotes (double-quote
 
2295
      # substitution turns \\\\ into \\, and sed turns \\ into \).
 
2296
      sed -n \
 
2297
        "s/'/'\\\\''/g;
 
2298
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
 
2299
      ;;
 
2300
    *)
 
2301
      # `set' quotes correctly as required by POSIX, so do not add quotes.
 
2302
      sed -n \
 
2303
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
 
2304
      ;;
 
2305
    esac;
 
2306
} |
 
2307
  sed '
 
2308
     t clear
 
2309
     : clear
 
2310
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
 
2311
     t end
 
2312
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
 
2313
     : end' >>confcache
 
2314
if diff $cache_file confcache >/dev/null 2>&1; then :; else
 
2315
  if test -w $cache_file; then
 
2316
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
 
2317
    cat confcache >$cache_file
 
2318
  else
 
2319
    echo "not updating unwritable cache $cache_file"
 
2320
  fi
 
2321
fi
 
2322
rm -f confcache
 
2323
 
 
2324
  echo "configuring package in ../apr-iconv now"
 
2325
  ac_popdir=`pwd`
 
2326
  apr_config_subdirs="../apr-iconv"
 
2327
  test -d ../apr-iconv || $mkdir_p ../apr-iconv
 
2328
  ac_abs_srcdir=`(cd $srcdir/../apr-iconv && pwd)`
 
2329
  cd ../apr-iconv
 
2330
 
 
2331
      # A "../" for each directory in /$config_subdirs.
 
2332
      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
 
2333
 
 
2334
  # Make the cache file pathname absolute for the subdirs
 
2335
  # required to correctly handle subdirs that might actually
 
2336
  # be symlinks
 
2337
  case "$cache_file" in
 
2338
  /*) # already absolute
 
2339
    ac_sub_cache_file=$cache_file ;;
 
2340
  *)  # Was relative path.
 
2341
    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
 
2342
  esac
 
2343
 
 
2344
 
 
2345
  apr_configure_args=
 
2346
  apr_sep=
 
2347
  for apr_configure_arg in $ac_configure_args
 
2348
  do
 
2349
    case "$apr_configure_arg" in
 
2350
      --enable-layout=*|\'--enable-layout=*)
 
2351
        continue ;;
 
2352
    esac
 
2353
    apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
 
2354
    apr_sep=" "
 
2355
  done
 
2356
 
 
2357
 
 
2358
  # autoconf doesn't add --silent to ac_configure_args; explicitly pass it
 
2359
  test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
 
2360
 
 
2361
              if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir
 
2362
  then :
 
2363
    echo "../apr-iconv configured properly"
 
2364
  else
 
2365
    echo "configure failed for ../apr-iconv"
 
2366
    exit 1
 
2367
  fi
 
2368
 
 
2369
  cd $ac_popdir
 
2370
 
 
2371
  # grab any updates from the sub-package
 
2372
  if test -r "$cache_file"; then
 
2373
  # Some versions of bash will fail to source /dev/null (special
 
2374
  # files actually), so we avoid doing that.
 
2375
  if test -f "$cache_file"; then
 
2376
    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 
2377
echo "$as_me: loading cache $cache_file" >&6;}
 
2378
    case $cache_file in
 
2379
      [\\/]* | ?:[\\/]* ) . $cache_file;;
 
2380
      *)                      . ./$cache_file;;
 
2381
    esac
 
2382
  fi
 
2383
else
 
2384
  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
 
2385
echo "$as_me: creating cache $cache_file" >&6;}
 
2386
  >$cache_file
 
2387
fi
 
2388
 
 
2389
 
 
2390
  APRUTIL_EXPORT_LIBS="$abs_srcdir/../apr-iconv/lib/libapriconv.la $APRUTIL_EXPORT_LIBS"
 
2391
  APRUTIL_INCLUDES="-I$abs_srcdir/../apr-iconv/include $APRUTIL_INCLUDES"
 
2392
  APR_ICONV_DIR=../apr-iconv
 
2393
else
 
2394
  APR_ICONV_DIR=""
 
2395
fi
 
2396
 
 
2397
 
 
2398
ac_ext=c
 
2399
ac_cpp='$CPP $CPPFLAGS'
 
2400
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 
2401
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 
2402
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
2403
if test -n "$ac_tool_prefix"; then
 
2404
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 
2405
set dummy ${ac_tool_prefix}gcc; ac_word=$2
 
2406
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2407
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2408
if test "${ac_cv_prog_CC+set}" = set; then
 
2409
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2410
else
 
2411
  if test -n "$CC"; then
 
2412
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
2413
else
 
2414
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2415
for as_dir in $PATH
 
2416
do
 
2417
  IFS=$as_save_IFS
 
2418
  test -z "$as_dir" && as_dir=.
 
2419
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2420
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2421
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
 
2422
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2423
    break 2
 
2424
  fi
 
2425
done
 
2426
done
 
2427
 
 
2428
fi
 
2429
fi
 
2430
CC=$ac_cv_prog_CC
 
2431
if test -n "$CC"; then
 
2432
  echo "$as_me:$LINENO: result: $CC" >&5
 
2433
echo "${ECHO_T}$CC" >&6
 
2434
else
 
2435
  echo "$as_me:$LINENO: result: no" >&5
 
2436
echo "${ECHO_T}no" >&6
 
2437
fi
 
2438
 
 
2439
fi
 
2440
if test -z "$ac_cv_prog_CC"; then
 
2441
  ac_ct_CC=$CC
 
2442
  # Extract the first word of "gcc", so it can be a program name with args.
 
2443
set dummy gcc; ac_word=$2
 
2444
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2445
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2446
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
 
2447
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2448
else
 
2449
  if test -n "$ac_ct_CC"; then
 
2450
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 
2451
else
 
2452
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2453
for as_dir in $PATH
 
2454
do
 
2455
  IFS=$as_save_IFS
 
2456
  test -z "$as_dir" && as_dir=.
 
2457
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2458
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2459
    ac_cv_prog_ac_ct_CC="gcc"
 
2460
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2461
    break 2
 
2462
  fi
 
2463
done
 
2464
done
 
2465
 
 
2466
fi
 
2467
fi
 
2468
ac_ct_CC=$ac_cv_prog_ac_ct_CC
 
2469
if test -n "$ac_ct_CC"; then
 
2470
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 
2471
echo "${ECHO_T}$ac_ct_CC" >&6
 
2472
else
 
2473
  echo "$as_me:$LINENO: result: no" >&5
 
2474
echo "${ECHO_T}no" >&6
 
2475
fi
 
2476
 
 
2477
  CC=$ac_ct_CC
 
2478
else
 
2479
  CC="$ac_cv_prog_CC"
 
2480
fi
 
2481
 
 
2482
if test -z "$CC"; then
 
2483
  if test -n "$ac_tool_prefix"; then
 
2484
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 
2485
set dummy ${ac_tool_prefix}cc; ac_word=$2
 
2486
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2487
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2488
if test "${ac_cv_prog_CC+set}" = set; then
 
2489
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2490
else
 
2491
  if test -n "$CC"; then
 
2492
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
2493
else
 
2494
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2495
for as_dir in $PATH
 
2496
do
 
2497
  IFS=$as_save_IFS
 
2498
  test -z "$as_dir" && as_dir=.
 
2499
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2500
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2501
    ac_cv_prog_CC="${ac_tool_prefix}cc"
 
2502
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2503
    break 2
 
2504
  fi
 
2505
done
 
2506
done
 
2507
 
 
2508
fi
 
2509
fi
 
2510
CC=$ac_cv_prog_CC
 
2511
if test -n "$CC"; then
 
2512
  echo "$as_me:$LINENO: result: $CC" >&5
 
2513
echo "${ECHO_T}$CC" >&6
 
2514
else
 
2515
  echo "$as_me:$LINENO: result: no" >&5
 
2516
echo "${ECHO_T}no" >&6
 
2517
fi
 
2518
 
 
2519
fi
 
2520
if test -z "$ac_cv_prog_CC"; then
 
2521
  ac_ct_CC=$CC
 
2522
  # Extract the first word of "cc", so it can be a program name with args.
 
2523
set dummy cc; ac_word=$2
 
2524
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2525
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2526
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
 
2527
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2528
else
 
2529
  if test -n "$ac_ct_CC"; then
 
2530
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 
2531
else
 
2532
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2533
for as_dir in $PATH
 
2534
do
 
2535
  IFS=$as_save_IFS
 
2536
  test -z "$as_dir" && as_dir=.
 
2537
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2538
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2539
    ac_cv_prog_ac_ct_CC="cc"
 
2540
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2541
    break 2
 
2542
  fi
 
2543
done
 
2544
done
 
2545
 
 
2546
fi
 
2547
fi
 
2548
ac_ct_CC=$ac_cv_prog_ac_ct_CC
 
2549
if test -n "$ac_ct_CC"; then
 
2550
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 
2551
echo "${ECHO_T}$ac_ct_CC" >&6
 
2552
else
 
2553
  echo "$as_me:$LINENO: result: no" >&5
 
2554
echo "${ECHO_T}no" >&6
 
2555
fi
 
2556
 
 
2557
  CC=$ac_ct_CC
 
2558
else
 
2559
  CC="$ac_cv_prog_CC"
 
2560
fi
 
2561
 
 
2562
fi
 
2563
if test -z "$CC"; then
 
2564
  # Extract the first word of "cc", so it can be a program name with args.
 
2565
set dummy cc; ac_word=$2
 
2566
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2567
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2568
if test "${ac_cv_prog_CC+set}" = set; then
 
2569
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2570
else
 
2571
  if test -n "$CC"; then
 
2572
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
2573
else
 
2574
  ac_prog_rejected=no
 
2575
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2576
for as_dir in $PATH
 
2577
do
 
2578
  IFS=$as_save_IFS
 
2579
  test -z "$as_dir" && as_dir=.
 
2580
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2581
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2582
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
 
2583
       ac_prog_rejected=yes
 
2584
       continue
 
2585
     fi
 
2586
    ac_cv_prog_CC="cc"
 
2587
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2588
    break 2
 
2589
  fi
 
2590
done
 
2591
done
 
2592
 
 
2593
if test $ac_prog_rejected = yes; then
 
2594
  # We found a bogon in the path, so make sure we never use it.
 
2595
  set dummy $ac_cv_prog_CC
 
2596
  shift
 
2597
  if test $# != 0; then
 
2598
    # We chose a different compiler from the bogus one.
 
2599
    # However, it has the same basename, so the bogon will be chosen
 
2600
    # first if we set CC to just the basename; use the full file name.
 
2601
    shift
 
2602
    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
 
2603
  fi
 
2604
fi
 
2605
fi
 
2606
fi
 
2607
CC=$ac_cv_prog_CC
 
2608
if test -n "$CC"; then
 
2609
  echo "$as_me:$LINENO: result: $CC" >&5
 
2610
echo "${ECHO_T}$CC" >&6
 
2611
else
 
2612
  echo "$as_me:$LINENO: result: no" >&5
 
2613
echo "${ECHO_T}no" >&6
 
2614
fi
 
2615
 
 
2616
fi
 
2617
if test -z "$CC"; then
 
2618
  if test -n "$ac_tool_prefix"; then
 
2619
  for ac_prog in cl
 
2620
  do
 
2621
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 
2622
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 
2623
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2624
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2625
if test "${ac_cv_prog_CC+set}" = set; then
 
2626
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2627
else
 
2628
  if test -n "$CC"; then
 
2629
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
2630
else
 
2631
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2632
for as_dir in $PATH
 
2633
do
 
2634
  IFS=$as_save_IFS
 
2635
  test -z "$as_dir" && as_dir=.
 
2636
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2637
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2638
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
 
2639
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2640
    break 2
 
2641
  fi
 
2642
done
 
2643
done
 
2644
 
 
2645
fi
 
2646
fi
 
2647
CC=$ac_cv_prog_CC
 
2648
if test -n "$CC"; then
 
2649
  echo "$as_me:$LINENO: result: $CC" >&5
 
2650
echo "${ECHO_T}$CC" >&6
 
2651
else
 
2652
  echo "$as_me:$LINENO: result: no" >&5
 
2653
echo "${ECHO_T}no" >&6
 
2654
fi
 
2655
 
 
2656
    test -n "$CC" && break
 
2657
  done
 
2658
fi
 
2659
if test -z "$CC"; then
 
2660
  ac_ct_CC=$CC
 
2661
  for ac_prog in cl
 
2662
do
 
2663
  # Extract the first word of "$ac_prog", so it can be a program name with args.
 
2664
set dummy $ac_prog; ac_word=$2
 
2665
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2666
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2667
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
 
2668
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2669
else
 
2670
  if test -n "$ac_ct_CC"; then
 
2671
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 
2672
else
 
2673
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2674
for as_dir in $PATH
 
2675
do
 
2676
  IFS=$as_save_IFS
 
2677
  test -z "$as_dir" && as_dir=.
 
2678
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2679
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2680
    ac_cv_prog_ac_ct_CC="$ac_prog"
 
2681
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2682
    break 2
 
2683
  fi
 
2684
done
 
2685
done
 
2686
 
 
2687
fi
 
2688
fi
 
2689
ac_ct_CC=$ac_cv_prog_ac_ct_CC
 
2690
if test -n "$ac_ct_CC"; then
 
2691
  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
 
2692
echo "${ECHO_T}$ac_ct_CC" >&6
 
2693
else
 
2694
  echo "$as_me:$LINENO: result: no" >&5
 
2695
echo "${ECHO_T}no" >&6
 
2696
fi
 
2697
 
 
2698
  test -n "$ac_ct_CC" && break
 
2699
done
 
2700
 
 
2701
  CC=$ac_ct_CC
 
2702
fi
 
2703
 
 
2704
fi
 
2705
 
 
2706
 
 
2707
test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
 
2708
See \`config.log' for more details." >&5
 
2709
echo "$as_me: error: no acceptable C compiler found in \$PATH
 
2710
See \`config.log' for more details." >&2;}
 
2711
   { (exit 1); exit 1; }; }
 
2712
 
 
2713
# Provide some information about the compiler.
 
2714
echo "$as_me:$LINENO:" \
 
2715
     "checking for C compiler version" >&5
 
2716
ac_compiler=`set X $ac_compile; echo $2`
 
2717
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
 
2718
  (eval $ac_compiler --version </dev/null >&5) 2>&5
 
2719
  ac_status=$?
 
2720
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2721
  (exit $ac_status); }
 
2722
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
 
2723
  (eval $ac_compiler -v </dev/null >&5) 2>&5
 
2724
  ac_status=$?
 
2725
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2726
  (exit $ac_status); }
 
2727
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
 
2728
  (eval $ac_compiler -V </dev/null >&5) 2>&5
 
2729
  ac_status=$?
 
2730
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2731
  (exit $ac_status); }
 
2732
 
 
2733
cat >conftest.$ac_ext <<_ACEOF
 
2734
/* confdefs.h.  */
 
2735
_ACEOF
 
2736
cat confdefs.h >>conftest.$ac_ext
 
2737
cat >>conftest.$ac_ext <<_ACEOF
 
2738
/* end confdefs.h.  */
 
2739
 
 
2740
int
 
2741
main ()
 
2742
{
 
2743
 
 
2744
  ;
 
2745
  return 0;
 
2746
}
 
2747
_ACEOF
 
2748
ac_clean_files_save=$ac_clean_files
 
2749
ac_clean_files="$ac_clean_files a.out a.exe b.out"
 
2750
# Try to create an executable without -o first, disregard a.out.
 
2751
# It will help us diagnose broken compilers, and finding out an intuition
 
2752
# of exeext.
 
2753
echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
 
2754
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
 
2755
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
2756
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
 
2757
  (eval $ac_link_default) 2>&5
 
2758
  ac_status=$?
 
2759
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2760
  (exit $ac_status); }; then
 
2761
  # Find the output, starting from the most likely.  This scheme is
 
2762
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
 
2763
# resort.
 
2764
 
 
2765
# Be careful to initialize this variable, since it used to be cached.
 
2766
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
 
2767
ac_cv_exeext=
 
2768
# b.out is created by i960 compilers.
 
2769
for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
 
2770
do
 
2771
  test -f "$ac_file" || continue
 
2772
  case $ac_file in
 
2773
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
 
2774
        ;;
 
2775
    conftest.$ac_ext )
 
2776
        # This is the source file.
 
2777
        ;;
 
2778
    [ab].out )
 
2779
        # We found the default executable, but exeext='' is most
 
2780
        # certainly right.
 
2781
        break;;
 
2782
    *.* )
 
2783
        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 
2784
        # FIXME: I believe we export ac_cv_exeext for Libtool,
 
2785
        # but it would be cool to find out if it's true.  Does anybody
 
2786
        # maintain Libtool? --akim.
 
2787
        export ac_cv_exeext
 
2788
        break;;
 
2789
    * )
 
2790
        break;;
 
2791
  esac
 
2792
done
 
2793
else
 
2794
  echo "$as_me: failed program was:" >&5
 
2795
sed 's/^/| /' conftest.$ac_ext >&5
 
2796
 
 
2797
{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
 
2798
See \`config.log' for more details." >&5
 
2799
echo "$as_me: error: C compiler cannot create executables
 
2800
See \`config.log' for more details." >&2;}
 
2801
   { (exit 77); exit 77; }; }
 
2802
fi
 
2803
 
 
2804
ac_exeext=$ac_cv_exeext
 
2805
echo "$as_me:$LINENO: result: $ac_file" >&5
 
2806
echo "${ECHO_T}$ac_file" >&6
 
2807
 
 
2808
# Check the compiler produces executables we can run.  If not, either
 
2809
# the compiler is broken, or we cross compile.
 
2810
echo "$as_me:$LINENO: checking whether the C compiler works" >&5
 
2811
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
 
2812
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 
2813
# If not cross compiling, check that we can run a simple program.
 
2814
if test "$cross_compiling" != yes; then
 
2815
  if { ac_try='./$ac_file'
 
2816
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
2817
  (eval $ac_try) 2>&5
 
2818
  ac_status=$?
 
2819
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2820
  (exit $ac_status); }; }; then
 
2821
    cross_compiling=no
 
2822
  else
 
2823
    if test "$cross_compiling" = maybe; then
 
2824
        cross_compiling=yes
 
2825
    else
 
2826
        { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
 
2827
If you meant to cross compile, use \`--host'.
 
2828
See \`config.log' for more details." >&5
 
2829
echo "$as_me: error: cannot run C compiled programs.
 
2830
If you meant to cross compile, use \`--host'.
 
2831
See \`config.log' for more details." >&2;}
 
2832
   { (exit 1); exit 1; }; }
 
2833
    fi
 
2834
  fi
 
2835
fi
 
2836
echo "$as_me:$LINENO: result: yes" >&5
 
2837
echo "${ECHO_T}yes" >&6
 
2838
 
 
2839
rm -f a.out a.exe conftest$ac_cv_exeext b.out
 
2840
ac_clean_files=$ac_clean_files_save
 
2841
# Check the compiler produces executables we can run.  If not, either
 
2842
# the compiler is broken, or we cross compile.
 
2843
echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
 
2844
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
 
2845
echo "$as_me:$LINENO: result: $cross_compiling" >&5
 
2846
echo "${ECHO_T}$cross_compiling" >&6
 
2847
 
 
2848
echo "$as_me:$LINENO: checking for suffix of executables" >&5
 
2849
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
 
2850
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
2851
  (eval $ac_link) 2>&5
 
2852
  ac_status=$?
 
2853
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2854
  (exit $ac_status); }; then
 
2855
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
 
2856
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 
2857
# work properly (i.e., refer to `conftest.exe'), while it won't with
 
2858
# `rm'.
 
2859
for ac_file in conftest.exe conftest conftest.*; do
 
2860
  test -f "$ac_file" || continue
 
2861
  case $ac_file in
 
2862
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
 
2863
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 
2864
          export ac_cv_exeext
 
2865
          break;;
 
2866
    * ) break;;
 
2867
  esac
 
2868
done
 
2869
else
 
2870
  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
 
2871
See \`config.log' for more details." >&5
 
2872
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
 
2873
See \`config.log' for more details." >&2;}
 
2874
   { (exit 1); exit 1; }; }
 
2875
fi
 
2876
 
 
2877
rm -f conftest$ac_cv_exeext
 
2878
echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
 
2879
echo "${ECHO_T}$ac_cv_exeext" >&6
 
2880
 
 
2881
rm -f conftest.$ac_ext
 
2882
EXEEXT=$ac_cv_exeext
 
2883
ac_exeext=$EXEEXT
 
2884
echo "$as_me:$LINENO: checking for suffix of object files" >&5
 
2885
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
 
2886
if test "${ac_cv_objext+set}" = set; then
 
2887
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2888
else
 
2889
  cat >conftest.$ac_ext <<_ACEOF
 
2890
/* confdefs.h.  */
 
2891
_ACEOF
 
2892
cat confdefs.h >>conftest.$ac_ext
 
2893
cat >>conftest.$ac_ext <<_ACEOF
 
2894
/* end confdefs.h.  */
 
2895
 
 
2896
int
 
2897
main ()
 
2898
{
 
2899
 
 
2900
  ;
 
2901
  return 0;
 
2902
}
 
2903
_ACEOF
 
2904
rm -f conftest.o conftest.obj
 
2905
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
2906
  (eval $ac_compile) 2>&5
 
2907
  ac_status=$?
 
2908
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2909
  (exit $ac_status); }; then
 
2910
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
 
2911
  case $ac_file in
 
2912
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
 
2913
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
 
2914
       break;;
 
2915
  esac
 
2916
done
 
2917
else
 
2918
  echo "$as_me: failed program was:" >&5
 
2919
sed 's/^/| /' conftest.$ac_ext >&5
 
2920
 
 
2921
{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
 
2922
See \`config.log' for more details." >&5
 
2923
echo "$as_me: error: cannot compute suffix of object files: cannot compile
 
2924
See \`config.log' for more details." >&2;}
 
2925
   { (exit 1); exit 1; }; }
 
2926
fi
 
2927
 
 
2928
rm -f conftest.$ac_cv_objext conftest.$ac_ext
 
2929
fi
 
2930
echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
 
2931
echo "${ECHO_T}$ac_cv_objext" >&6
 
2932
OBJEXT=$ac_cv_objext
 
2933
ac_objext=$OBJEXT
 
2934
echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
 
2935
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
 
2936
if test "${ac_cv_c_compiler_gnu+set}" = set; then
 
2937
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2938
else
 
2939
  cat >conftest.$ac_ext <<_ACEOF
 
2940
/* confdefs.h.  */
 
2941
_ACEOF
 
2942
cat confdefs.h >>conftest.$ac_ext
 
2943
cat >>conftest.$ac_ext <<_ACEOF
 
2944
/* end confdefs.h.  */
 
2945
 
 
2946
int
 
2947
main ()
 
2948
{
 
2949
#ifndef __GNUC__
 
2950
       choke me
 
2951
#endif
 
2952
 
 
2953
  ;
 
2954
  return 0;
 
2955
}
 
2956
_ACEOF
 
2957
rm -f conftest.$ac_objext
 
2958
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
2959
  (eval $ac_compile) 2>conftest.er1
 
2960
  ac_status=$?
 
2961
  grep -v '^ *+' conftest.er1 >conftest.err
 
2962
  rm -f conftest.er1
 
2963
  cat conftest.err >&5
 
2964
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2965
  (exit $ac_status); } &&
 
2966
         { ac_try='test -z "$ac_c_werror_flag"
 
2967
                         || test ! -s conftest.err'
 
2968
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
2969
  (eval $ac_try) 2>&5
 
2970
  ac_status=$?
 
2971
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2972
  (exit $ac_status); }; } &&
 
2973
         { ac_try='test -s conftest.$ac_objext'
 
2974
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
2975
  (eval $ac_try) 2>&5
 
2976
  ac_status=$?
 
2977
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
2978
  (exit $ac_status); }; }; then
 
2979
  ac_compiler_gnu=yes
 
2980
else
 
2981
  echo "$as_me: failed program was:" >&5
 
2982
sed 's/^/| /' conftest.$ac_ext >&5
 
2983
 
 
2984
ac_compiler_gnu=no
 
2985
fi
 
2986
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
2987
ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
2988
 
 
2989
fi
 
2990
echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
 
2991
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
 
2992
GCC=`test $ac_compiler_gnu = yes && echo yes`
 
2993
ac_test_CFLAGS=${CFLAGS+set}
 
2994
ac_save_CFLAGS=$CFLAGS
 
2995
CFLAGS="-g"
 
2996
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
 
2997
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
 
2998
if test "${ac_cv_prog_cc_g+set}" = set; then
 
2999
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3000
else
 
3001
  cat >conftest.$ac_ext <<_ACEOF
 
3002
/* confdefs.h.  */
 
3003
_ACEOF
 
3004
cat confdefs.h >>conftest.$ac_ext
 
3005
cat >>conftest.$ac_ext <<_ACEOF
 
3006
/* end confdefs.h.  */
 
3007
 
 
3008
int
 
3009
main ()
 
3010
{
 
3011
 
 
3012
  ;
 
3013
  return 0;
 
3014
}
 
3015
_ACEOF
 
3016
rm -f conftest.$ac_objext
 
3017
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3018
  (eval $ac_compile) 2>conftest.er1
 
3019
  ac_status=$?
 
3020
  grep -v '^ *+' conftest.er1 >conftest.err
 
3021
  rm -f conftest.er1
 
3022
  cat conftest.err >&5
 
3023
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3024
  (exit $ac_status); } &&
 
3025
         { ac_try='test -z "$ac_c_werror_flag"
 
3026
                         || test ! -s conftest.err'
 
3027
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3028
  (eval $ac_try) 2>&5
 
3029
  ac_status=$?
 
3030
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3031
  (exit $ac_status); }; } &&
 
3032
         { ac_try='test -s conftest.$ac_objext'
 
3033
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3034
  (eval $ac_try) 2>&5
 
3035
  ac_status=$?
 
3036
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3037
  (exit $ac_status); }; }; then
 
3038
  ac_cv_prog_cc_g=yes
 
3039
else
 
3040
  echo "$as_me: failed program was:" >&5
 
3041
sed 's/^/| /' conftest.$ac_ext >&5
 
3042
 
 
3043
ac_cv_prog_cc_g=no
 
3044
fi
 
3045
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
3046
fi
 
3047
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
 
3048
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 
3049
if test "$ac_test_CFLAGS" = set; then
 
3050
  CFLAGS=$ac_save_CFLAGS
 
3051
elif test $ac_cv_prog_cc_g = yes; then
 
3052
  if test "$GCC" = yes; then
 
3053
    CFLAGS="-g -O2"
 
3054
  else
 
3055
    CFLAGS="-g"
 
3056
  fi
 
3057
else
 
3058
  if test "$GCC" = yes; then
 
3059
    CFLAGS="-O2"
 
3060
  else
 
3061
    CFLAGS=
 
3062
  fi
 
3063
fi
 
3064
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
 
3065
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
 
3066
if test "${ac_cv_prog_cc_stdc+set}" = set; then
 
3067
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3068
else
 
3069
  ac_cv_prog_cc_stdc=no
 
3070
ac_save_CC=$CC
 
3071
cat >conftest.$ac_ext <<_ACEOF
 
3072
/* confdefs.h.  */
 
3073
_ACEOF
 
3074
cat confdefs.h >>conftest.$ac_ext
 
3075
cat >>conftest.$ac_ext <<_ACEOF
 
3076
/* end confdefs.h.  */
 
3077
#include <stdarg.h>
 
3078
#include <stdio.h>
 
3079
#include <sys/types.h>
 
3080
#include <sys/stat.h>
 
3081
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 
3082
struct buf { int x; };
 
3083
FILE * (*rcsopen) (struct buf *, struct stat *, int);
 
3084
static char *e (p, i)
 
3085
     char **p;
 
3086
     int i;
 
3087
{
 
3088
  return p[i];
 
3089
}
 
3090
static char *f (char * (*g) (char **, int), char **p, ...)
 
3091
{
 
3092
  char *s;
 
3093
  va_list v;
 
3094
  va_start (v,p);
 
3095
  s = g (p, va_arg (v,int));
 
3096
  va_end (v);
 
3097
  return s;
 
3098
}
 
3099
 
 
3100
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
 
3101
   function prototypes and stuff, but not '\xHH' hex character constants.
 
3102
   These don't provoke an error unfortunately, instead are silently treated
 
3103
   as 'x'.  The following induces an error, until -std1 is added to get
 
3104
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
 
3105
   array size at least.  It's necessary to write '\x00'==0 to get something
 
3106
   that's true only with -std1.  */
 
3107
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
3108
 
 
3109
int test (int i, double x);
 
3110
struct s1 {int (*f) (int a);};
 
3111
struct s2 {int (*f) (double a);};
 
3112
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
 
3113
int argc;
 
3114
char **argv;
 
3115
int
 
3116
main ()
 
3117
{
 
3118
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
 
3119
  ;
 
3120
  return 0;
 
3121
}
 
3122
_ACEOF
 
3123
# Don't try gcc -ansi; that turns off useful extensions and
 
3124
# breaks some systems' header files.
 
3125
# AIX                   -qlanglvl=ansi
 
3126
# Ultrix and OSF/1      -std1
 
3127
# HP-UX 10.20 and later -Ae
 
3128
# HP-UX older versions  -Aa -D_HPUX_SOURCE
 
3129
# SVR4                  -Xc -D__EXTENSIONS__
 
3130
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 
3131
do
 
3132
  CC="$ac_save_CC $ac_arg"
 
3133
  rm -f conftest.$ac_objext
 
3134
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3135
  (eval $ac_compile) 2>conftest.er1
 
3136
  ac_status=$?
 
3137
  grep -v '^ *+' conftest.er1 >conftest.err
 
3138
  rm -f conftest.er1
 
3139
  cat conftest.err >&5
 
3140
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3141
  (exit $ac_status); } &&
 
3142
         { ac_try='test -z "$ac_c_werror_flag"
 
3143
                         || test ! -s conftest.err'
 
3144
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3145
  (eval $ac_try) 2>&5
 
3146
  ac_status=$?
 
3147
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3148
  (exit $ac_status); }; } &&
 
3149
         { ac_try='test -s conftest.$ac_objext'
 
3150
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3151
  (eval $ac_try) 2>&5
 
3152
  ac_status=$?
 
3153
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3154
  (exit $ac_status); }; }; then
 
3155
  ac_cv_prog_cc_stdc=$ac_arg
 
3156
break
 
3157
else
 
3158
  echo "$as_me: failed program was:" >&5
 
3159
sed 's/^/| /' conftest.$ac_ext >&5
 
3160
 
 
3161
fi
 
3162
rm -f conftest.err conftest.$ac_objext
 
3163
done
 
3164
rm -f conftest.$ac_ext conftest.$ac_objext
 
3165
CC=$ac_save_CC
 
3166
 
 
3167
fi
 
3168
 
 
3169
case "x$ac_cv_prog_cc_stdc" in
 
3170
  x|xno)
 
3171
    echo "$as_me:$LINENO: result: none needed" >&5
 
3172
echo "${ECHO_T}none needed" >&6 ;;
 
3173
  *)
 
3174
    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
 
3175
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
 
3176
    CC="$CC $ac_cv_prog_cc_stdc" ;;
 
3177
esac
 
3178
 
 
3179
# Some people use a C++ compiler to compile C.  Since we use `exit',
 
3180
# in C++ we need to declare it.  In case someone uses the same compiler
 
3181
# for both compiling C and C++ we need to have the C++ compiler decide
 
3182
# the declaration of exit, since it's the most demanding environment.
 
3183
cat >conftest.$ac_ext <<_ACEOF
 
3184
#ifndef __cplusplus
 
3185
  choke me
 
3186
#endif
 
3187
_ACEOF
 
3188
rm -f conftest.$ac_objext
 
3189
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3190
  (eval $ac_compile) 2>conftest.er1
 
3191
  ac_status=$?
 
3192
  grep -v '^ *+' conftest.er1 >conftest.err
 
3193
  rm -f conftest.er1
 
3194
  cat conftest.err >&5
 
3195
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3196
  (exit $ac_status); } &&
 
3197
         { ac_try='test -z "$ac_c_werror_flag"
 
3198
                         || test ! -s conftest.err'
 
3199
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3200
  (eval $ac_try) 2>&5
 
3201
  ac_status=$?
 
3202
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3203
  (exit $ac_status); }; } &&
 
3204
         { ac_try='test -s conftest.$ac_objext'
 
3205
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3206
  (eval $ac_try) 2>&5
 
3207
  ac_status=$?
 
3208
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3209
  (exit $ac_status); }; }; then
 
3210
  for ac_declaration in \
 
3211
   '' \
 
3212
   'extern "C" void std::exit (int) throw (); using std::exit;' \
 
3213
   'extern "C" void std::exit (int); using std::exit;' \
 
3214
   'extern "C" void exit (int) throw ();' \
 
3215
   'extern "C" void exit (int);' \
 
3216
   'void exit (int);'
 
3217
do
 
3218
  cat >conftest.$ac_ext <<_ACEOF
 
3219
/* confdefs.h.  */
 
3220
_ACEOF
 
3221
cat confdefs.h >>conftest.$ac_ext
 
3222
cat >>conftest.$ac_ext <<_ACEOF
 
3223
/* end confdefs.h.  */
 
3224
$ac_declaration
 
3225
#include <stdlib.h>
 
3226
int
 
3227
main ()
 
3228
{
 
3229
exit (42);
 
3230
  ;
 
3231
  return 0;
 
3232
}
 
3233
_ACEOF
 
3234
rm -f conftest.$ac_objext
 
3235
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3236
  (eval $ac_compile) 2>conftest.er1
 
3237
  ac_status=$?
 
3238
  grep -v '^ *+' conftest.er1 >conftest.err
 
3239
  rm -f conftest.er1
 
3240
  cat conftest.err >&5
 
3241
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3242
  (exit $ac_status); } &&
 
3243
         { ac_try='test -z "$ac_c_werror_flag"
 
3244
                         || test ! -s conftest.err'
 
3245
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3246
  (eval $ac_try) 2>&5
 
3247
  ac_status=$?
 
3248
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3249
  (exit $ac_status); }; } &&
 
3250
         { ac_try='test -s conftest.$ac_objext'
 
3251
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3252
  (eval $ac_try) 2>&5
 
3253
  ac_status=$?
 
3254
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3255
  (exit $ac_status); }; }; then
 
3256
  :
 
3257
else
 
3258
  echo "$as_me: failed program was:" >&5
 
3259
sed 's/^/| /' conftest.$ac_ext >&5
 
3260
 
 
3261
continue
 
3262
fi
 
3263
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
3264
  cat >conftest.$ac_ext <<_ACEOF
 
3265
/* confdefs.h.  */
 
3266
_ACEOF
 
3267
cat confdefs.h >>conftest.$ac_ext
 
3268
cat >>conftest.$ac_ext <<_ACEOF
 
3269
/* end confdefs.h.  */
 
3270
$ac_declaration
 
3271
int
 
3272
main ()
 
3273
{
 
3274
exit (42);
 
3275
  ;
 
3276
  return 0;
 
3277
}
 
3278
_ACEOF
 
3279
rm -f conftest.$ac_objext
 
3280
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3281
  (eval $ac_compile) 2>conftest.er1
 
3282
  ac_status=$?
 
3283
  grep -v '^ *+' conftest.er1 >conftest.err
 
3284
  rm -f conftest.er1
 
3285
  cat conftest.err >&5
 
3286
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3287
  (exit $ac_status); } &&
 
3288
         { ac_try='test -z "$ac_c_werror_flag"
 
3289
                         || test ! -s conftest.err'
 
3290
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3291
  (eval $ac_try) 2>&5
 
3292
  ac_status=$?
 
3293
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3294
  (exit $ac_status); }; } &&
 
3295
         { ac_try='test -s conftest.$ac_objext'
 
3296
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3297
  (eval $ac_try) 2>&5
 
3298
  ac_status=$?
 
3299
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3300
  (exit $ac_status); }; }; then
 
3301
  break
 
3302
else
 
3303
  echo "$as_me: failed program was:" >&5
 
3304
sed 's/^/| /' conftest.$ac_ext >&5
 
3305
 
 
3306
fi
 
3307
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
3308
done
 
3309
rm -f conftest*
 
3310
if test -n "$ac_declaration"; then
 
3311
  echo '#ifdef __cplusplus' >>confdefs.h
 
3312
  echo $ac_declaration      >>confdefs.h
 
3313
  echo '#endif'             >>confdefs.h
 
3314
fi
 
3315
 
 
3316
else
 
3317
  echo "$as_me: failed program was:" >&5
 
3318
sed 's/^/| /' conftest.$ac_ext >&5
 
3319
 
 
3320
fi
 
3321
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
3322
ac_ext=c
 
3323
ac_cpp='$CPP $CPPFLAGS'
 
3324
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 
3325
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 
3326
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
3327
 
 
3328
 
 
3329
ac_ext=c
 
3330
ac_cpp='$CPP $CPPFLAGS'
 
3331
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 
3332
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 
3333
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
3334
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
 
3335
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 
3336
# On Suns, sometimes $CPP names a directory.
 
3337
if test -n "$CPP" && test -d "$CPP"; then
 
3338
  CPP=
 
3339
fi
 
3340
if test -z "$CPP"; then
 
3341
  if test "${ac_cv_prog_CPP+set}" = set; then
 
3342
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3343
else
 
3344
      # Double quotes because CPP needs to be expanded
 
3345
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
 
3346
    do
 
3347
      ac_preproc_ok=false
 
3348
for ac_c_preproc_warn_flag in '' yes
 
3349
do
 
3350
  # Use a header file that comes with gcc, so configuring glibc
 
3351
  # with a fresh cross-compiler works.
 
3352
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
3353
  # <limits.h> exists even on freestanding compilers.
 
3354
  # On the NeXT, cc -E runs the code through the compiler's parser,
 
3355
  # not just through cpp. "Syntax error" is here to catch this case.
 
3356
  cat >conftest.$ac_ext <<_ACEOF
 
3357
/* confdefs.h.  */
 
3358
_ACEOF
 
3359
cat confdefs.h >>conftest.$ac_ext
 
3360
cat >>conftest.$ac_ext <<_ACEOF
 
3361
/* end confdefs.h.  */
 
3362
#ifdef __STDC__
 
3363
# include <limits.h>
 
3364
#else
 
3365
# include <assert.h>
 
3366
#endif
 
3367
                     Syntax error
 
3368
_ACEOF
 
3369
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
3370
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
3371
  ac_status=$?
 
3372
  grep -v '^ *+' conftest.er1 >conftest.err
 
3373
  rm -f conftest.er1
 
3374
  cat conftest.err >&5
 
3375
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3376
  (exit $ac_status); } >/dev/null; then
 
3377
  if test -s conftest.err; then
 
3378
    ac_cpp_err=$ac_c_preproc_warn_flag
 
3379
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
3380
  else
 
3381
    ac_cpp_err=
 
3382
  fi
 
3383
else
 
3384
  ac_cpp_err=yes
 
3385
fi
 
3386
if test -z "$ac_cpp_err"; then
 
3387
  :
 
3388
else
 
3389
  echo "$as_me: failed program was:" >&5
 
3390
sed 's/^/| /' conftest.$ac_ext >&5
 
3391
 
 
3392
  # Broken: fails on valid input.
 
3393
continue
 
3394
fi
 
3395
rm -f conftest.err conftest.$ac_ext
 
3396
 
 
3397
  # OK, works on sane cases.  Now check whether non-existent headers
 
3398
  # can be detected and how.
 
3399
  cat >conftest.$ac_ext <<_ACEOF
 
3400
/* confdefs.h.  */
 
3401
_ACEOF
 
3402
cat confdefs.h >>conftest.$ac_ext
 
3403
cat >>conftest.$ac_ext <<_ACEOF
 
3404
/* end confdefs.h.  */
 
3405
#include <ac_nonexistent.h>
 
3406
_ACEOF
 
3407
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
3408
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
3409
  ac_status=$?
 
3410
  grep -v '^ *+' conftest.er1 >conftest.err
 
3411
  rm -f conftest.er1
 
3412
  cat conftest.err >&5
 
3413
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3414
  (exit $ac_status); } >/dev/null; then
 
3415
  if test -s conftest.err; then
 
3416
    ac_cpp_err=$ac_c_preproc_warn_flag
 
3417
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
3418
  else
 
3419
    ac_cpp_err=
 
3420
  fi
 
3421
else
 
3422
  ac_cpp_err=yes
 
3423
fi
 
3424
if test -z "$ac_cpp_err"; then
 
3425
  # Broken: success on invalid input.
 
3426
continue
 
3427
else
 
3428
  echo "$as_me: failed program was:" >&5
 
3429
sed 's/^/| /' conftest.$ac_ext >&5
 
3430
 
 
3431
  # Passes both tests.
 
3432
ac_preproc_ok=:
 
3433
break
 
3434
fi
 
3435
rm -f conftest.err conftest.$ac_ext
 
3436
 
 
3437
done
 
3438
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 
3439
rm -f conftest.err conftest.$ac_ext
 
3440
if $ac_preproc_ok; then
 
3441
  break
 
3442
fi
 
3443
 
 
3444
    done
 
3445
    ac_cv_prog_CPP=$CPP
 
3446
 
 
3447
fi
 
3448
  CPP=$ac_cv_prog_CPP
 
3449
else
 
3450
  ac_cv_prog_CPP=$CPP
 
3451
fi
 
3452
echo "$as_me:$LINENO: result: $CPP" >&5
 
3453
echo "${ECHO_T}$CPP" >&6
 
3454
ac_preproc_ok=false
 
3455
for ac_c_preproc_warn_flag in '' yes
 
3456
do
 
3457
  # Use a header file that comes with gcc, so configuring glibc
 
3458
  # with a fresh cross-compiler works.
 
3459
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
3460
  # <limits.h> exists even on freestanding compilers.
 
3461
  # On the NeXT, cc -E runs the code through the compiler's parser,
 
3462
  # not just through cpp. "Syntax error" is here to catch this case.
 
3463
  cat >conftest.$ac_ext <<_ACEOF
 
3464
/* confdefs.h.  */
 
3465
_ACEOF
 
3466
cat confdefs.h >>conftest.$ac_ext
 
3467
cat >>conftest.$ac_ext <<_ACEOF
 
3468
/* end confdefs.h.  */
 
3469
#ifdef __STDC__
 
3470
# include <limits.h>
 
3471
#else
 
3472
# include <assert.h>
 
3473
#endif
 
3474
                     Syntax error
 
3475
_ACEOF
 
3476
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
3477
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
3478
  ac_status=$?
 
3479
  grep -v '^ *+' conftest.er1 >conftest.err
 
3480
  rm -f conftest.er1
 
3481
  cat conftest.err >&5
 
3482
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3483
  (exit $ac_status); } >/dev/null; then
 
3484
  if test -s conftest.err; then
 
3485
    ac_cpp_err=$ac_c_preproc_warn_flag
 
3486
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
3487
  else
 
3488
    ac_cpp_err=
 
3489
  fi
 
3490
else
 
3491
  ac_cpp_err=yes
 
3492
fi
 
3493
if test -z "$ac_cpp_err"; then
 
3494
  :
 
3495
else
 
3496
  echo "$as_me: failed program was:" >&5
 
3497
sed 's/^/| /' conftest.$ac_ext >&5
 
3498
 
 
3499
  # Broken: fails on valid input.
 
3500
continue
 
3501
fi
 
3502
rm -f conftest.err conftest.$ac_ext
 
3503
 
 
3504
  # OK, works on sane cases.  Now check whether non-existent headers
 
3505
  # can be detected and how.
 
3506
  cat >conftest.$ac_ext <<_ACEOF
 
3507
/* confdefs.h.  */
 
3508
_ACEOF
 
3509
cat confdefs.h >>conftest.$ac_ext
 
3510
cat >>conftest.$ac_ext <<_ACEOF
 
3511
/* end confdefs.h.  */
 
3512
#include <ac_nonexistent.h>
 
3513
_ACEOF
 
3514
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
3515
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
3516
  ac_status=$?
 
3517
  grep -v '^ *+' conftest.er1 >conftest.err
 
3518
  rm -f conftest.er1
 
3519
  cat conftest.err >&5
 
3520
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3521
  (exit $ac_status); } >/dev/null; then
 
3522
  if test -s conftest.err; then
 
3523
    ac_cpp_err=$ac_c_preproc_warn_flag
 
3524
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
3525
  else
 
3526
    ac_cpp_err=
 
3527
  fi
 
3528
else
 
3529
  ac_cpp_err=yes
 
3530
fi
 
3531
if test -z "$ac_cpp_err"; then
 
3532
  # Broken: success on invalid input.
 
3533
continue
 
3534
else
 
3535
  echo "$as_me: failed program was:" >&5
 
3536
sed 's/^/| /' conftest.$ac_ext >&5
 
3537
 
 
3538
  # Passes both tests.
 
3539
ac_preproc_ok=:
 
3540
break
 
3541
fi
 
3542
rm -f conftest.err conftest.$ac_ext
 
3543
 
 
3544
done
 
3545
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 
3546
rm -f conftest.err conftest.$ac_ext
 
3547
if $ac_preproc_ok; then
 
3548
  :
 
3549
else
 
3550
  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
 
3551
See \`config.log' for more details." >&5
 
3552
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
 
3553
See \`config.log' for more details." >&2;}
 
3554
   { (exit 1); exit 1; }; }
 
3555
fi
 
3556
 
 
3557
ac_ext=c
 
3558
ac_cpp='$CPP $CPPFLAGS'
 
3559
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 
3560
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 
3561
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
3562
 
 
3563
 
 
3564
echo "$as_me:$LINENO: checking for egrep" >&5
 
3565
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
 
3566
if test "${ac_cv_prog_egrep+set}" = set; then
 
3567
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3568
else
 
3569
  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
3570
    then ac_cv_prog_egrep='grep -E'
 
3571
    else ac_cv_prog_egrep='egrep'
 
3572
    fi
 
3573
fi
 
3574
echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
 
3575
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
 
3576
 EGREP=$ac_cv_prog_egrep
 
3577
 
 
3578
 
 
3579
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 
3580
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
 
3581
if test "${ac_cv_header_stdc+set}" = set; then
 
3582
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3583
else
 
3584
  cat >conftest.$ac_ext <<_ACEOF
 
3585
/* confdefs.h.  */
 
3586
_ACEOF
 
3587
cat confdefs.h >>conftest.$ac_ext
 
3588
cat >>conftest.$ac_ext <<_ACEOF
 
3589
/* end confdefs.h.  */
 
3590
#include <stdlib.h>
 
3591
#include <stdarg.h>
 
3592
#include <string.h>
 
3593
#include <float.h>
 
3594
 
 
3595
int
 
3596
main ()
 
3597
{
 
3598
 
 
3599
  ;
 
3600
  return 0;
 
3601
}
 
3602
_ACEOF
 
3603
rm -f conftest.$ac_objext
 
3604
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3605
  (eval $ac_compile) 2>conftest.er1
 
3606
  ac_status=$?
 
3607
  grep -v '^ *+' conftest.er1 >conftest.err
 
3608
  rm -f conftest.er1
 
3609
  cat conftest.err >&5
 
3610
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3611
  (exit $ac_status); } &&
 
3612
         { ac_try='test -z "$ac_c_werror_flag"
 
3613
                         || test ! -s conftest.err'
 
3614
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3615
  (eval $ac_try) 2>&5
 
3616
  ac_status=$?
 
3617
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3618
  (exit $ac_status); }; } &&
 
3619
         { ac_try='test -s conftest.$ac_objext'
 
3620
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3621
  (eval $ac_try) 2>&5
 
3622
  ac_status=$?
 
3623
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3624
  (exit $ac_status); }; }; then
 
3625
  ac_cv_header_stdc=yes
 
3626
else
 
3627
  echo "$as_me: failed program was:" >&5
 
3628
sed 's/^/| /' conftest.$ac_ext >&5
 
3629
 
 
3630
ac_cv_header_stdc=no
 
3631
fi
 
3632
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
3633
 
 
3634
if test $ac_cv_header_stdc = yes; then
 
3635
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 
3636
  cat >conftest.$ac_ext <<_ACEOF
 
3637
/* confdefs.h.  */
 
3638
_ACEOF
 
3639
cat confdefs.h >>conftest.$ac_ext
 
3640
cat >>conftest.$ac_ext <<_ACEOF
 
3641
/* end confdefs.h.  */
 
3642
#include <string.h>
 
3643
 
 
3644
_ACEOF
 
3645
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
3646
  $EGREP "memchr" >/dev/null 2>&1; then
 
3647
  :
 
3648
else
 
3649
  ac_cv_header_stdc=no
 
3650
fi
 
3651
rm -f conftest*
 
3652
 
 
3653
fi
 
3654
 
 
3655
if test $ac_cv_header_stdc = yes; then
 
3656
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 
3657
  cat >conftest.$ac_ext <<_ACEOF
 
3658
/* confdefs.h.  */
 
3659
_ACEOF
 
3660
cat confdefs.h >>conftest.$ac_ext
 
3661
cat >>conftest.$ac_ext <<_ACEOF
 
3662
/* end confdefs.h.  */
 
3663
#include <stdlib.h>
 
3664
 
 
3665
_ACEOF
 
3666
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
3667
  $EGREP "free" >/dev/null 2>&1; then
 
3668
  :
 
3669
else
 
3670
  ac_cv_header_stdc=no
 
3671
fi
 
3672
rm -f conftest*
 
3673
 
 
3674
fi
 
3675
 
 
3676
if test $ac_cv_header_stdc = yes; then
 
3677
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 
3678
  if test "$cross_compiling" = yes; then
 
3679
  :
 
3680
else
 
3681
  cat >conftest.$ac_ext <<_ACEOF
 
3682
/* confdefs.h.  */
 
3683
_ACEOF
 
3684
cat confdefs.h >>conftest.$ac_ext
 
3685
cat >>conftest.$ac_ext <<_ACEOF
 
3686
/* end confdefs.h.  */
 
3687
#include <ctype.h>
 
3688
#if ((' ' & 0x0FF) == 0x020)
 
3689
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 
3690
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 
3691
#else
 
3692
# define ISLOWER(c) \
 
3693
                   (('a' <= (c) && (c) <= 'i') \
 
3694
                     || ('j' <= (c) && (c) <= 'r') \
 
3695
                     || ('s' <= (c) && (c) <= 'z'))
 
3696
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
 
3697
#endif
 
3698
 
 
3699
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 
3700
int
 
3701
main ()
 
3702
{
 
3703
  int i;
 
3704
  for (i = 0; i < 256; i++)
 
3705
    if (XOR (islower (i), ISLOWER (i))
 
3706
        || toupper (i) != TOUPPER (i))
 
3707
      exit(2);
 
3708
  exit (0);
 
3709
}
 
3710
_ACEOF
 
3711
rm -f conftest$ac_exeext
 
3712
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
3713
  (eval $ac_link) 2>&5
 
3714
  ac_status=$?
 
3715
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3716
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
3717
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3718
  (eval $ac_try) 2>&5
 
3719
  ac_status=$?
 
3720
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3721
  (exit $ac_status); }; }; then
 
3722
  :
 
3723
else
 
3724
  echo "$as_me: program exited with status $ac_status" >&5
 
3725
echo "$as_me: failed program was:" >&5
 
3726
sed 's/^/| /' conftest.$ac_ext >&5
 
3727
 
 
3728
( exit $ac_status )
 
3729
ac_cv_header_stdc=no
 
3730
fi
 
3731
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
3732
fi
 
3733
fi
 
3734
fi
 
3735
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
 
3736
echo "${ECHO_T}$ac_cv_header_stdc" >&6
 
3737
if test $ac_cv_header_stdc = yes; then
 
3738
 
 
3739
cat >>confdefs.h <<\_ACEOF
 
3740
#define STDC_HEADERS 1
 
3741
_ACEOF
 
3742
 
 
3743
fi
 
3744
 
 
3745
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
3746
 
 
3747
 
 
3748
 
 
3749
 
 
3750
 
 
3751
 
 
3752
 
 
3753
 
 
3754
 
 
3755
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
 
3756
                  inttypes.h stdint.h unistd.h
 
3757
do
 
3758
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
3759
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
3760
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
3761
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
3762
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3763
else
 
3764
  cat >conftest.$ac_ext <<_ACEOF
 
3765
/* confdefs.h.  */
 
3766
_ACEOF
 
3767
cat confdefs.h >>conftest.$ac_ext
 
3768
cat >>conftest.$ac_ext <<_ACEOF
 
3769
/* end confdefs.h.  */
 
3770
$ac_includes_default
 
3771
 
 
3772
#include <$ac_header>
 
3773
_ACEOF
 
3774
rm -f conftest.$ac_objext
 
3775
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
3776
  (eval $ac_compile) 2>conftest.er1
 
3777
  ac_status=$?
 
3778
  grep -v '^ *+' conftest.er1 >conftest.err
 
3779
  rm -f conftest.er1
 
3780
  cat conftest.err >&5
 
3781
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3782
  (exit $ac_status); } &&
 
3783
         { ac_try='test -z "$ac_c_werror_flag"
 
3784
                         || test ! -s conftest.err'
 
3785
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3786
  (eval $ac_try) 2>&5
 
3787
  ac_status=$?
 
3788
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3789
  (exit $ac_status); }; } &&
 
3790
         { ac_try='test -s conftest.$ac_objext'
 
3791
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3792
  (eval $ac_try) 2>&5
 
3793
  ac_status=$?
 
3794
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3795
  (exit $ac_status); }; }; then
 
3796
  eval "$as_ac_Header=yes"
 
3797
else
 
3798
  echo "$as_me: failed program was:" >&5
 
3799
sed 's/^/| /' conftest.$ac_ext >&5
 
3800
 
 
3801
eval "$as_ac_Header=no"
 
3802
fi
 
3803
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
3804
fi
 
3805
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
3806
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
3807
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
3808
  cat >>confdefs.h <<_ACEOF
 
3809
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
3810
_ACEOF
 
3811
 
 
3812
fi
 
3813
 
 
3814
done
 
3815
 
 
3816
 
 
3817
 
 
3818
 
 
3819
echo $ac_n "${nl}checking for ldap support..."
 
3820
 
 
3821
apu_has_ldap="0";
 
3822
apu_has_ldapssl_client_init="0"
 
3823
apu_has_ldapssl_client_deinit="0"
 
3824
apu_has_ldapssl_add_trusted_cert="0"
 
3825
apu_has_ldap_start_tls_s="0"
 
3826
apu_has_ldapssl_init="0"
 
3827
apu_has_ldap_sslinit="0"
 
3828
apu_has_ldapssl_install_routines="0"
 
3829
apu_has_ldap_openldap="0"
 
3830
apu_has_ldap_solaris="0"
 
3831
apu_has_ldap_novell="0"
 
3832
apu_has_ldap_microsoft="0"
 
3833
apu_has_ldap_netscape="0"
 
3834
apu_has_ldap_mozilla="0"
 
3835
apu_has_ldap_other="0"
 
3836
 
 
3837
 
 
3838
# Check whether --with-ldap-include or --without-ldap-include was given.
 
3839
if test "${with_ldap_include+set}" = set; then
 
3840
  withval="$with_ldap_include"
 
3841
 
 
3842
fi;
 
3843
 
 
3844
# Check whether --with-ldap-lib or --without-ldap-lib was given.
 
3845
if test "${with_ldap_lib+set}" = set; then
 
3846
  withval="$with_ldap_lib"
 
3847
 
 
3848
fi;
 
3849
 
 
3850
# Check whether --with-ldap or --without-ldap was given.
 
3851
if test "${with_ldap+set}" = set; then
 
3852
  withval="$with_ldap"
 
3853
 
 
3854
    save_cppflags="$CPPFLAGS"
 
3855
    save_ldflags="$LDFLAGS"
 
3856
    save_libs="$LIBS"
 
3857
    if test -n "$with_ldap_include"; then
 
3858
      CPPFLAGS="$CPPFLAGS -I$with_ldap_include"
 
3859
 
 
3860
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
3861
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$with_ldap_include\""
 
3862
    APRUTIL_INCLUDES="-I$with_ldap_include"
 
3863
  else
 
3864
    apr_addto_bugger="-I$with_ldap_include"
 
3865
    for i in $apr_addto_bugger; do
 
3866
      apr_addto_duplicate="0"
 
3867
      for j in $APRUTIL_INCLUDES; do
 
3868
        if test "x$i" = "x$j"; then
 
3869
          apr_addto_duplicate="1"
 
3870
          break
 
3871
        fi
 
3872
      done
 
3873
      if test $apr_addto_duplicate = "0"; then
 
3874
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
3875
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
3876
      fi
 
3877
    done
 
3878
  fi
 
3879
 
 
3880
    fi
 
3881
    if test -n "$with_ldap_lib"; then
 
3882
      LDFLAGS="$LDFLAGS -L$with_ldap_lib"
 
3883
 
 
3884
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
3885
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$with_ldap_lib\""
 
3886
    APRUTIL_LDFLAGS="-L$with_ldap_lib"
 
3887
  else
 
3888
    apr_addto_bugger="-L$with_ldap_lib"
 
3889
    for i in $apr_addto_bugger; do
 
3890
      apr_addto_duplicate="0"
 
3891
      for j in $APRUTIL_LDFLAGS; do
 
3892
        if test "x$i" = "x$j"; then
 
3893
          apr_addto_duplicate="1"
 
3894
          break
 
3895
        fi
 
3896
      done
 
3897
      if test $apr_addto_duplicate = "0"; then
 
3898
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
3899
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
3900
      fi
 
3901
    done
 
3902
  fi
 
3903
 
 
3904
    fi
 
3905
 
 
3906
    LIBLDAP="$withval"
 
3907
    if test "$LIBLDAP" = "yes"; then
 
3908
 
 
3909
  if test ${apu_has_ldap} != "1"; then
 
3910
    ldaplib="ldap50"
 
3911
    extralib="-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50"
 
3912
    unset ac_cv_lib_${ldaplib}_ldap_init
 
3913
    unset ac_cv_lib_${ldaplib}___ldap_init
 
3914
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
3915
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
3916
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
3917
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
3918
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3919
else
 
3920
  ac_check_lib_save_LIBS=$LIBS
 
3921
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
3922
cat >conftest.$ac_ext <<_ACEOF
 
3923
/* confdefs.h.  */
 
3924
_ACEOF
 
3925
cat confdefs.h >>conftest.$ac_ext
 
3926
cat >>conftest.$ac_ext <<_ACEOF
 
3927
/* end confdefs.h.  */
 
3928
 
 
3929
/* Override any gcc2 internal prototype to avoid an error.  */
 
3930
#ifdef __cplusplus
 
3931
extern "C"
 
3932
#endif
 
3933
/* We use char because int might match the return type of a gcc2
 
3934
   builtin and then its argument prototype would still apply.  */
 
3935
char ldap_init ();
 
3936
int
 
3937
main ()
 
3938
{
 
3939
ldap_init ();
 
3940
  ;
 
3941
  return 0;
 
3942
}
 
3943
_ACEOF
 
3944
rm -f conftest.$ac_objext conftest$ac_exeext
 
3945
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
3946
  (eval $ac_link) 2>conftest.er1
 
3947
  ac_status=$?
 
3948
  grep -v '^ *+' conftest.er1 >conftest.err
 
3949
  rm -f conftest.er1
 
3950
  cat conftest.err >&5
 
3951
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3952
  (exit $ac_status); } &&
 
3953
         { ac_try='test -z "$ac_c_werror_flag"
 
3954
                         || test ! -s conftest.err'
 
3955
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3956
  (eval $ac_try) 2>&5
 
3957
  ac_status=$?
 
3958
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3959
  (exit $ac_status); }; } &&
 
3960
         { ac_try='test -s conftest$ac_exeext'
 
3961
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
3962
  (eval $ac_try) 2>&5
 
3963
  ac_status=$?
 
3964
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
3965
  (exit $ac_status); }; }; then
 
3966
  eval "$as_ac_Lib=yes"
 
3967
else
 
3968
  echo "$as_me: failed program was:" >&5
 
3969
sed 's/^/| /' conftest.$ac_ext >&5
 
3970
 
 
3971
eval "$as_ac_Lib=no"
 
3972
fi
 
3973
rm -f conftest.err conftest.$ac_objext \
 
3974
      conftest$ac_exeext conftest.$ac_ext
 
3975
LIBS=$ac_check_lib_save_LIBS
 
3976
fi
 
3977
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
3978
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
3979
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
3980
 
 
3981
 
 
3982
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
3983
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
3984
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
3985
  else
 
3986
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
3987
    for i in $apr_addto_bugger; do
 
3988
      apr_addto_duplicate="0"
 
3989
      for j in $APRUTIL_EXPORT_LIBS; do
 
3990
        if test "x$i" = "x$j"; then
 
3991
          apr_addto_duplicate="1"
 
3992
          break
 
3993
        fi
 
3994
      done
 
3995
      if test $apr_addto_duplicate = "0"; then
 
3996
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
3997
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
3998
      fi
 
3999
    done
 
4000
  fi
 
4001
 
 
4002
 
 
4003
  if test "x$APRUTIL_LIBS" = "x"; then
 
4004
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
4005
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
4006
  else
 
4007
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
4008
    for i in $apr_addto_bugger; do
 
4009
      apr_addto_duplicate="0"
 
4010
      for j in $APRUTIL_LIBS; do
 
4011
        if test "x$i" = "x$j"; then
 
4012
          apr_addto_duplicate="1"
 
4013
          break
 
4014
        fi
 
4015
      done
 
4016
      if test $apr_addto_duplicate = "0"; then
 
4017
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
4018
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
4019
      fi
 
4020
    done
 
4021
  fi
 
4022
 
 
4023
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
4024
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
4025
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
4026
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4027
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4028
else
 
4029
  ac_check_lib_save_LIBS=$LIBS
 
4030
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4031
cat >conftest.$ac_ext <<_ACEOF
 
4032
/* confdefs.h.  */
 
4033
_ACEOF
 
4034
cat confdefs.h >>conftest.$ac_ext
 
4035
cat >>conftest.$ac_ext <<_ACEOF
 
4036
/* end confdefs.h.  */
 
4037
 
 
4038
/* Override any gcc2 internal prototype to avoid an error.  */
 
4039
#ifdef __cplusplus
 
4040
extern "C"
 
4041
#endif
 
4042
/* We use char because int might match the return type of a gcc2
 
4043
   builtin and then its argument prototype would still apply.  */
 
4044
char ldapssl_client_init ();
 
4045
int
 
4046
main ()
 
4047
{
 
4048
ldapssl_client_init ();
 
4049
  ;
 
4050
  return 0;
 
4051
}
 
4052
_ACEOF
 
4053
rm -f conftest.$ac_objext conftest$ac_exeext
 
4054
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4055
  (eval $ac_link) 2>conftest.er1
 
4056
  ac_status=$?
 
4057
  grep -v '^ *+' conftest.er1 >conftest.err
 
4058
  rm -f conftest.er1
 
4059
  cat conftest.err >&5
 
4060
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4061
  (exit $ac_status); } &&
 
4062
         { ac_try='test -z "$ac_c_werror_flag"
 
4063
                         || test ! -s conftest.err'
 
4064
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4065
  (eval $ac_try) 2>&5
 
4066
  ac_status=$?
 
4067
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4068
  (exit $ac_status); }; } &&
 
4069
         { ac_try='test -s conftest$ac_exeext'
 
4070
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4071
  (eval $ac_try) 2>&5
 
4072
  ac_status=$?
 
4073
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4074
  (exit $ac_status); }; }; then
 
4075
  eval "$as_ac_Lib=yes"
 
4076
else
 
4077
  echo "$as_me: failed program was:" >&5
 
4078
sed 's/^/| /' conftest.$ac_ext >&5
 
4079
 
 
4080
eval "$as_ac_Lib=no"
 
4081
fi
 
4082
rm -f conftest.err conftest.$ac_objext \
 
4083
      conftest$ac_exeext conftest.$ac_ext
 
4084
LIBS=$ac_check_lib_save_LIBS
 
4085
fi
 
4086
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4087
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4088
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4089
  apu_has_ldapssl_client_init="1"
 
4090
fi
 
4091
 
 
4092
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
4093
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
4094
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
4095
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4096
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4097
else
 
4098
  ac_check_lib_save_LIBS=$LIBS
 
4099
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4100
cat >conftest.$ac_ext <<_ACEOF
 
4101
/* confdefs.h.  */
 
4102
_ACEOF
 
4103
cat confdefs.h >>conftest.$ac_ext
 
4104
cat >>conftest.$ac_ext <<_ACEOF
 
4105
/* end confdefs.h.  */
 
4106
 
 
4107
/* Override any gcc2 internal prototype to avoid an error.  */
 
4108
#ifdef __cplusplus
 
4109
extern "C"
 
4110
#endif
 
4111
/* We use char because int might match the return type of a gcc2
 
4112
   builtin and then its argument prototype would still apply.  */
 
4113
char ldapssl_client_deinit ();
 
4114
int
 
4115
main ()
 
4116
{
 
4117
ldapssl_client_deinit ();
 
4118
  ;
 
4119
  return 0;
 
4120
}
 
4121
_ACEOF
 
4122
rm -f conftest.$ac_objext conftest$ac_exeext
 
4123
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4124
  (eval $ac_link) 2>conftest.er1
 
4125
  ac_status=$?
 
4126
  grep -v '^ *+' conftest.er1 >conftest.err
 
4127
  rm -f conftest.er1
 
4128
  cat conftest.err >&5
 
4129
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4130
  (exit $ac_status); } &&
 
4131
         { ac_try='test -z "$ac_c_werror_flag"
 
4132
                         || test ! -s conftest.err'
 
4133
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4134
  (eval $ac_try) 2>&5
 
4135
  ac_status=$?
 
4136
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4137
  (exit $ac_status); }; } &&
 
4138
         { ac_try='test -s conftest$ac_exeext'
 
4139
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4140
  (eval $ac_try) 2>&5
 
4141
  ac_status=$?
 
4142
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4143
  (exit $ac_status); }; }; then
 
4144
  eval "$as_ac_Lib=yes"
 
4145
else
 
4146
  echo "$as_me: failed program was:" >&5
 
4147
sed 's/^/| /' conftest.$ac_ext >&5
 
4148
 
 
4149
eval "$as_ac_Lib=no"
 
4150
fi
 
4151
rm -f conftest.err conftest.$ac_objext \
 
4152
      conftest$ac_exeext conftest.$ac_ext
 
4153
LIBS=$ac_check_lib_save_LIBS
 
4154
fi
 
4155
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4156
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4157
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4158
  apu_has_ldapssl_client_deinit="1"
 
4159
fi
 
4160
 
 
4161
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
4162
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
4163
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
4164
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4165
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4166
else
 
4167
  ac_check_lib_save_LIBS=$LIBS
 
4168
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4169
cat >conftest.$ac_ext <<_ACEOF
 
4170
/* confdefs.h.  */
 
4171
_ACEOF
 
4172
cat confdefs.h >>conftest.$ac_ext
 
4173
cat >>conftest.$ac_ext <<_ACEOF
 
4174
/* end confdefs.h.  */
 
4175
 
 
4176
/* Override any gcc2 internal prototype to avoid an error.  */
 
4177
#ifdef __cplusplus
 
4178
extern "C"
 
4179
#endif
 
4180
/* We use char because int might match the return type of a gcc2
 
4181
   builtin and then its argument prototype would still apply.  */
 
4182
char ldapssl_add_trusted_cert ();
 
4183
int
 
4184
main ()
 
4185
{
 
4186
ldapssl_add_trusted_cert ();
 
4187
  ;
 
4188
  return 0;
 
4189
}
 
4190
_ACEOF
 
4191
rm -f conftest.$ac_objext conftest$ac_exeext
 
4192
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4193
  (eval $ac_link) 2>conftest.er1
 
4194
  ac_status=$?
 
4195
  grep -v '^ *+' conftest.er1 >conftest.err
 
4196
  rm -f conftest.er1
 
4197
  cat conftest.err >&5
 
4198
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4199
  (exit $ac_status); } &&
 
4200
         { ac_try='test -z "$ac_c_werror_flag"
 
4201
                         || test ! -s conftest.err'
 
4202
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4203
  (eval $ac_try) 2>&5
 
4204
  ac_status=$?
 
4205
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4206
  (exit $ac_status); }; } &&
 
4207
         { ac_try='test -s conftest$ac_exeext'
 
4208
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4209
  (eval $ac_try) 2>&5
 
4210
  ac_status=$?
 
4211
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4212
  (exit $ac_status); }; }; then
 
4213
  eval "$as_ac_Lib=yes"
 
4214
else
 
4215
  echo "$as_me: failed program was:" >&5
 
4216
sed 's/^/| /' conftest.$ac_ext >&5
 
4217
 
 
4218
eval "$as_ac_Lib=no"
 
4219
fi
 
4220
rm -f conftest.err conftest.$ac_objext \
 
4221
      conftest$ac_exeext conftest.$ac_ext
 
4222
LIBS=$ac_check_lib_save_LIBS
 
4223
fi
 
4224
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4225
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4226
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4227
  apu_has_ldapssl_add_trusted_cert="1"
 
4228
fi
 
4229
 
 
4230
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
4231
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
4232
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
4233
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4234
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4235
else
 
4236
  ac_check_lib_save_LIBS=$LIBS
 
4237
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4238
cat >conftest.$ac_ext <<_ACEOF
 
4239
/* confdefs.h.  */
 
4240
_ACEOF
 
4241
cat confdefs.h >>conftest.$ac_ext
 
4242
cat >>conftest.$ac_ext <<_ACEOF
 
4243
/* end confdefs.h.  */
 
4244
 
 
4245
/* Override any gcc2 internal prototype to avoid an error.  */
 
4246
#ifdef __cplusplus
 
4247
extern "C"
 
4248
#endif
 
4249
/* We use char because int might match the return type of a gcc2
 
4250
   builtin and then its argument prototype would still apply.  */
 
4251
char ldap_start_tls_s ();
 
4252
int
 
4253
main ()
 
4254
{
 
4255
ldap_start_tls_s ();
 
4256
  ;
 
4257
  return 0;
 
4258
}
 
4259
_ACEOF
 
4260
rm -f conftest.$ac_objext conftest$ac_exeext
 
4261
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4262
  (eval $ac_link) 2>conftest.er1
 
4263
  ac_status=$?
 
4264
  grep -v '^ *+' conftest.er1 >conftest.err
 
4265
  rm -f conftest.er1
 
4266
  cat conftest.err >&5
 
4267
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4268
  (exit $ac_status); } &&
 
4269
         { ac_try='test -z "$ac_c_werror_flag"
 
4270
                         || test ! -s conftest.err'
 
4271
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4272
  (eval $ac_try) 2>&5
 
4273
  ac_status=$?
 
4274
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4275
  (exit $ac_status); }; } &&
 
4276
         { ac_try='test -s conftest$ac_exeext'
 
4277
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4278
  (eval $ac_try) 2>&5
 
4279
  ac_status=$?
 
4280
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4281
  (exit $ac_status); }; }; then
 
4282
  eval "$as_ac_Lib=yes"
 
4283
else
 
4284
  echo "$as_me: failed program was:" >&5
 
4285
sed 's/^/| /' conftest.$ac_ext >&5
 
4286
 
 
4287
eval "$as_ac_Lib=no"
 
4288
fi
 
4289
rm -f conftest.err conftest.$ac_objext \
 
4290
      conftest$ac_exeext conftest.$ac_ext
 
4291
LIBS=$ac_check_lib_save_LIBS
 
4292
fi
 
4293
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4294
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4295
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4296
  apu_has_ldap_start_tls_s="1"
 
4297
fi
 
4298
 
 
4299
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
4300
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
4301
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
4302
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4303
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4304
else
 
4305
  ac_check_lib_save_LIBS=$LIBS
 
4306
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4307
cat >conftest.$ac_ext <<_ACEOF
 
4308
/* confdefs.h.  */
 
4309
_ACEOF
 
4310
cat confdefs.h >>conftest.$ac_ext
 
4311
cat >>conftest.$ac_ext <<_ACEOF
 
4312
/* end confdefs.h.  */
 
4313
 
 
4314
/* Override any gcc2 internal prototype to avoid an error.  */
 
4315
#ifdef __cplusplus
 
4316
extern "C"
 
4317
#endif
 
4318
/* We use char because int might match the return type of a gcc2
 
4319
   builtin and then its argument prototype would still apply.  */
 
4320
char ldap_sslinit ();
 
4321
int
 
4322
main ()
 
4323
{
 
4324
ldap_sslinit ();
 
4325
  ;
 
4326
  return 0;
 
4327
}
 
4328
_ACEOF
 
4329
rm -f conftest.$ac_objext conftest$ac_exeext
 
4330
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4331
  (eval $ac_link) 2>conftest.er1
 
4332
  ac_status=$?
 
4333
  grep -v '^ *+' conftest.er1 >conftest.err
 
4334
  rm -f conftest.er1
 
4335
  cat conftest.err >&5
 
4336
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4337
  (exit $ac_status); } &&
 
4338
         { ac_try='test -z "$ac_c_werror_flag"
 
4339
                         || test ! -s conftest.err'
 
4340
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4341
  (eval $ac_try) 2>&5
 
4342
  ac_status=$?
 
4343
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4344
  (exit $ac_status); }; } &&
 
4345
         { ac_try='test -s conftest$ac_exeext'
 
4346
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4347
  (eval $ac_try) 2>&5
 
4348
  ac_status=$?
 
4349
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4350
  (exit $ac_status); }; }; then
 
4351
  eval "$as_ac_Lib=yes"
 
4352
else
 
4353
  echo "$as_me: failed program was:" >&5
 
4354
sed 's/^/| /' conftest.$ac_ext >&5
 
4355
 
 
4356
eval "$as_ac_Lib=no"
 
4357
fi
 
4358
rm -f conftest.err conftest.$ac_objext \
 
4359
      conftest$ac_exeext conftest.$ac_ext
 
4360
LIBS=$ac_check_lib_save_LIBS
 
4361
fi
 
4362
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4363
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4364
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4365
  apu_has_ldap_sslinit="1"
 
4366
fi
 
4367
 
 
4368
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
4369
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
4370
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
4371
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4372
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4373
else
 
4374
  ac_check_lib_save_LIBS=$LIBS
 
4375
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4376
cat >conftest.$ac_ext <<_ACEOF
 
4377
/* confdefs.h.  */
 
4378
_ACEOF
 
4379
cat confdefs.h >>conftest.$ac_ext
 
4380
cat >>conftest.$ac_ext <<_ACEOF
 
4381
/* end confdefs.h.  */
 
4382
 
 
4383
/* Override any gcc2 internal prototype to avoid an error.  */
 
4384
#ifdef __cplusplus
 
4385
extern "C"
 
4386
#endif
 
4387
/* We use char because int might match the return type of a gcc2
 
4388
   builtin and then its argument prototype would still apply.  */
 
4389
char ldapssl_init ();
 
4390
int
 
4391
main ()
 
4392
{
 
4393
ldapssl_init ();
 
4394
  ;
 
4395
  return 0;
 
4396
}
 
4397
_ACEOF
 
4398
rm -f conftest.$ac_objext conftest$ac_exeext
 
4399
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4400
  (eval $ac_link) 2>conftest.er1
 
4401
  ac_status=$?
 
4402
  grep -v '^ *+' conftest.er1 >conftest.err
 
4403
  rm -f conftest.er1
 
4404
  cat conftest.err >&5
 
4405
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4406
  (exit $ac_status); } &&
 
4407
         { ac_try='test -z "$ac_c_werror_flag"
 
4408
                         || test ! -s conftest.err'
 
4409
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4410
  (eval $ac_try) 2>&5
 
4411
  ac_status=$?
 
4412
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4413
  (exit $ac_status); }; } &&
 
4414
         { ac_try='test -s conftest$ac_exeext'
 
4415
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4416
  (eval $ac_try) 2>&5
 
4417
  ac_status=$?
 
4418
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4419
  (exit $ac_status); }; }; then
 
4420
  eval "$as_ac_Lib=yes"
 
4421
else
 
4422
  echo "$as_me: failed program was:" >&5
 
4423
sed 's/^/| /' conftest.$ac_ext >&5
 
4424
 
 
4425
eval "$as_ac_Lib=no"
 
4426
fi
 
4427
rm -f conftest.err conftest.$ac_objext \
 
4428
      conftest$ac_exeext conftest.$ac_ext
 
4429
LIBS=$ac_check_lib_save_LIBS
 
4430
fi
 
4431
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4432
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4433
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4434
  apu_has_ldapssl_init="1"
 
4435
fi
 
4436
 
 
4437
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
4438
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
4439
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
4440
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4441
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4442
else
 
4443
  ac_check_lib_save_LIBS=$LIBS
 
4444
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4445
cat >conftest.$ac_ext <<_ACEOF
 
4446
/* confdefs.h.  */
 
4447
_ACEOF
 
4448
cat confdefs.h >>conftest.$ac_ext
 
4449
cat >>conftest.$ac_ext <<_ACEOF
 
4450
/* end confdefs.h.  */
 
4451
 
 
4452
/* Override any gcc2 internal prototype to avoid an error.  */
 
4453
#ifdef __cplusplus
 
4454
extern "C"
 
4455
#endif
 
4456
/* We use char because int might match the return type of a gcc2
 
4457
   builtin and then its argument prototype would still apply.  */
 
4458
char ldapssl_install_routines ();
 
4459
int
 
4460
main ()
 
4461
{
 
4462
ldapssl_install_routines ();
 
4463
  ;
 
4464
  return 0;
 
4465
}
 
4466
_ACEOF
 
4467
rm -f conftest.$ac_objext conftest$ac_exeext
 
4468
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4469
  (eval $ac_link) 2>conftest.er1
 
4470
  ac_status=$?
 
4471
  grep -v '^ *+' conftest.er1 >conftest.err
 
4472
  rm -f conftest.er1
 
4473
  cat conftest.err >&5
 
4474
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4475
  (exit $ac_status); } &&
 
4476
         { ac_try='test -z "$ac_c_werror_flag"
 
4477
                         || test ! -s conftest.err'
 
4478
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4479
  (eval $ac_try) 2>&5
 
4480
  ac_status=$?
 
4481
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4482
  (exit $ac_status); }; } &&
 
4483
         { ac_try='test -s conftest$ac_exeext'
 
4484
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4485
  (eval $ac_try) 2>&5
 
4486
  ac_status=$?
 
4487
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4488
  (exit $ac_status); }; }; then
 
4489
  eval "$as_ac_Lib=yes"
 
4490
else
 
4491
  echo "$as_me: failed program was:" >&5
 
4492
sed 's/^/| /' conftest.$ac_ext >&5
 
4493
 
 
4494
eval "$as_ac_Lib=no"
 
4495
fi
 
4496
rm -f conftest.err conftest.$ac_objext \
 
4497
      conftest$ac_exeext conftest.$ac_ext
 
4498
LIBS=$ac_check_lib_save_LIBS
 
4499
fi
 
4500
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4501
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4502
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4503
  apu_has_ldapssl_install_routines="1"
 
4504
fi
 
4505
 
 
4506
        apu_has_ldap="1";
 
4507
 
 
4508
fi
 
4509
 
 
4510
  fi
 
4511
 
 
4512
 
 
4513
  if test ${apu_has_ldap} != "1"; then
 
4514
    ldaplib="ldapssl41"
 
4515
    extralib="-lnspr3 -lplc3 -lplds3"
 
4516
    unset ac_cv_lib_${ldaplib}_ldap_init
 
4517
    unset ac_cv_lib_${ldaplib}___ldap_init
 
4518
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
4519
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
4520
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
4521
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4522
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4523
else
 
4524
  ac_check_lib_save_LIBS=$LIBS
 
4525
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4526
cat >conftest.$ac_ext <<_ACEOF
 
4527
/* confdefs.h.  */
 
4528
_ACEOF
 
4529
cat confdefs.h >>conftest.$ac_ext
 
4530
cat >>conftest.$ac_ext <<_ACEOF
 
4531
/* end confdefs.h.  */
 
4532
 
 
4533
/* Override any gcc2 internal prototype to avoid an error.  */
 
4534
#ifdef __cplusplus
 
4535
extern "C"
 
4536
#endif
 
4537
/* We use char because int might match the return type of a gcc2
 
4538
   builtin and then its argument prototype would still apply.  */
 
4539
char ldap_init ();
 
4540
int
 
4541
main ()
 
4542
{
 
4543
ldap_init ();
 
4544
  ;
 
4545
  return 0;
 
4546
}
 
4547
_ACEOF
 
4548
rm -f conftest.$ac_objext conftest$ac_exeext
 
4549
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4550
  (eval $ac_link) 2>conftest.er1
 
4551
  ac_status=$?
 
4552
  grep -v '^ *+' conftest.er1 >conftest.err
 
4553
  rm -f conftest.er1
 
4554
  cat conftest.err >&5
 
4555
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4556
  (exit $ac_status); } &&
 
4557
         { ac_try='test -z "$ac_c_werror_flag"
 
4558
                         || test ! -s conftest.err'
 
4559
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4560
  (eval $ac_try) 2>&5
 
4561
  ac_status=$?
 
4562
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4563
  (exit $ac_status); }; } &&
 
4564
         { ac_try='test -s conftest$ac_exeext'
 
4565
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4566
  (eval $ac_try) 2>&5
 
4567
  ac_status=$?
 
4568
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4569
  (exit $ac_status); }; }; then
 
4570
  eval "$as_ac_Lib=yes"
 
4571
else
 
4572
  echo "$as_me: failed program was:" >&5
 
4573
sed 's/^/| /' conftest.$ac_ext >&5
 
4574
 
 
4575
eval "$as_ac_Lib=no"
 
4576
fi
 
4577
rm -f conftest.err conftest.$ac_objext \
 
4578
      conftest$ac_exeext conftest.$ac_ext
 
4579
LIBS=$ac_check_lib_save_LIBS
 
4580
fi
 
4581
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4582
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4583
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4584
 
 
4585
 
 
4586
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
4587
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
4588
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
4589
  else
 
4590
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
4591
    for i in $apr_addto_bugger; do
 
4592
      apr_addto_duplicate="0"
 
4593
      for j in $APRUTIL_EXPORT_LIBS; do
 
4594
        if test "x$i" = "x$j"; then
 
4595
          apr_addto_duplicate="1"
 
4596
          break
 
4597
        fi
 
4598
      done
 
4599
      if test $apr_addto_duplicate = "0"; then
 
4600
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
4601
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
4602
      fi
 
4603
    done
 
4604
  fi
 
4605
 
 
4606
 
 
4607
  if test "x$APRUTIL_LIBS" = "x"; then
 
4608
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
4609
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
4610
  else
 
4611
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
4612
    for i in $apr_addto_bugger; do
 
4613
      apr_addto_duplicate="0"
 
4614
      for j in $APRUTIL_LIBS; do
 
4615
        if test "x$i" = "x$j"; then
 
4616
          apr_addto_duplicate="1"
 
4617
          break
 
4618
        fi
 
4619
      done
 
4620
      if test $apr_addto_duplicate = "0"; then
 
4621
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
4622
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
4623
      fi
 
4624
    done
 
4625
  fi
 
4626
 
 
4627
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
4628
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
4629
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
4630
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4631
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4632
else
 
4633
  ac_check_lib_save_LIBS=$LIBS
 
4634
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4635
cat >conftest.$ac_ext <<_ACEOF
 
4636
/* confdefs.h.  */
 
4637
_ACEOF
 
4638
cat confdefs.h >>conftest.$ac_ext
 
4639
cat >>conftest.$ac_ext <<_ACEOF
 
4640
/* end confdefs.h.  */
 
4641
 
 
4642
/* Override any gcc2 internal prototype to avoid an error.  */
 
4643
#ifdef __cplusplus
 
4644
extern "C"
 
4645
#endif
 
4646
/* We use char because int might match the return type of a gcc2
 
4647
   builtin and then its argument prototype would still apply.  */
 
4648
char ldapssl_client_init ();
 
4649
int
 
4650
main ()
 
4651
{
 
4652
ldapssl_client_init ();
 
4653
  ;
 
4654
  return 0;
 
4655
}
 
4656
_ACEOF
 
4657
rm -f conftest.$ac_objext conftest$ac_exeext
 
4658
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4659
  (eval $ac_link) 2>conftest.er1
 
4660
  ac_status=$?
 
4661
  grep -v '^ *+' conftest.er1 >conftest.err
 
4662
  rm -f conftest.er1
 
4663
  cat conftest.err >&5
 
4664
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4665
  (exit $ac_status); } &&
 
4666
         { ac_try='test -z "$ac_c_werror_flag"
 
4667
                         || test ! -s conftest.err'
 
4668
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4669
  (eval $ac_try) 2>&5
 
4670
  ac_status=$?
 
4671
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4672
  (exit $ac_status); }; } &&
 
4673
         { ac_try='test -s conftest$ac_exeext'
 
4674
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4675
  (eval $ac_try) 2>&5
 
4676
  ac_status=$?
 
4677
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4678
  (exit $ac_status); }; }; then
 
4679
  eval "$as_ac_Lib=yes"
 
4680
else
 
4681
  echo "$as_me: failed program was:" >&5
 
4682
sed 's/^/| /' conftest.$ac_ext >&5
 
4683
 
 
4684
eval "$as_ac_Lib=no"
 
4685
fi
 
4686
rm -f conftest.err conftest.$ac_objext \
 
4687
      conftest$ac_exeext conftest.$ac_ext
 
4688
LIBS=$ac_check_lib_save_LIBS
 
4689
fi
 
4690
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4691
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4692
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4693
  apu_has_ldapssl_client_init="1"
 
4694
fi
 
4695
 
 
4696
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
4697
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
4698
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
4699
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4700
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4701
else
 
4702
  ac_check_lib_save_LIBS=$LIBS
 
4703
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4704
cat >conftest.$ac_ext <<_ACEOF
 
4705
/* confdefs.h.  */
 
4706
_ACEOF
 
4707
cat confdefs.h >>conftest.$ac_ext
 
4708
cat >>conftest.$ac_ext <<_ACEOF
 
4709
/* end confdefs.h.  */
 
4710
 
 
4711
/* Override any gcc2 internal prototype to avoid an error.  */
 
4712
#ifdef __cplusplus
 
4713
extern "C"
 
4714
#endif
 
4715
/* We use char because int might match the return type of a gcc2
 
4716
   builtin and then its argument prototype would still apply.  */
 
4717
char ldapssl_client_deinit ();
 
4718
int
 
4719
main ()
 
4720
{
 
4721
ldapssl_client_deinit ();
 
4722
  ;
 
4723
  return 0;
 
4724
}
 
4725
_ACEOF
 
4726
rm -f conftest.$ac_objext conftest$ac_exeext
 
4727
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4728
  (eval $ac_link) 2>conftest.er1
 
4729
  ac_status=$?
 
4730
  grep -v '^ *+' conftest.er1 >conftest.err
 
4731
  rm -f conftest.er1
 
4732
  cat conftest.err >&5
 
4733
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4734
  (exit $ac_status); } &&
 
4735
         { ac_try='test -z "$ac_c_werror_flag"
 
4736
                         || test ! -s conftest.err'
 
4737
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4738
  (eval $ac_try) 2>&5
 
4739
  ac_status=$?
 
4740
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4741
  (exit $ac_status); }; } &&
 
4742
         { ac_try='test -s conftest$ac_exeext'
 
4743
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4744
  (eval $ac_try) 2>&5
 
4745
  ac_status=$?
 
4746
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4747
  (exit $ac_status); }; }; then
 
4748
  eval "$as_ac_Lib=yes"
 
4749
else
 
4750
  echo "$as_me: failed program was:" >&5
 
4751
sed 's/^/| /' conftest.$ac_ext >&5
 
4752
 
 
4753
eval "$as_ac_Lib=no"
 
4754
fi
 
4755
rm -f conftest.err conftest.$ac_objext \
 
4756
      conftest$ac_exeext conftest.$ac_ext
 
4757
LIBS=$ac_check_lib_save_LIBS
 
4758
fi
 
4759
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4760
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4761
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4762
  apu_has_ldapssl_client_deinit="1"
 
4763
fi
 
4764
 
 
4765
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
4766
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
4767
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
4768
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4769
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4770
else
 
4771
  ac_check_lib_save_LIBS=$LIBS
 
4772
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4773
cat >conftest.$ac_ext <<_ACEOF
 
4774
/* confdefs.h.  */
 
4775
_ACEOF
 
4776
cat confdefs.h >>conftest.$ac_ext
 
4777
cat >>conftest.$ac_ext <<_ACEOF
 
4778
/* end confdefs.h.  */
 
4779
 
 
4780
/* Override any gcc2 internal prototype to avoid an error.  */
 
4781
#ifdef __cplusplus
 
4782
extern "C"
 
4783
#endif
 
4784
/* We use char because int might match the return type of a gcc2
 
4785
   builtin and then its argument prototype would still apply.  */
 
4786
char ldapssl_add_trusted_cert ();
 
4787
int
 
4788
main ()
 
4789
{
 
4790
ldapssl_add_trusted_cert ();
 
4791
  ;
 
4792
  return 0;
 
4793
}
 
4794
_ACEOF
 
4795
rm -f conftest.$ac_objext conftest$ac_exeext
 
4796
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4797
  (eval $ac_link) 2>conftest.er1
 
4798
  ac_status=$?
 
4799
  grep -v '^ *+' conftest.er1 >conftest.err
 
4800
  rm -f conftest.er1
 
4801
  cat conftest.err >&5
 
4802
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4803
  (exit $ac_status); } &&
 
4804
         { ac_try='test -z "$ac_c_werror_flag"
 
4805
                         || test ! -s conftest.err'
 
4806
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4807
  (eval $ac_try) 2>&5
 
4808
  ac_status=$?
 
4809
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4810
  (exit $ac_status); }; } &&
 
4811
         { ac_try='test -s conftest$ac_exeext'
 
4812
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4813
  (eval $ac_try) 2>&5
 
4814
  ac_status=$?
 
4815
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4816
  (exit $ac_status); }; }; then
 
4817
  eval "$as_ac_Lib=yes"
 
4818
else
 
4819
  echo "$as_me: failed program was:" >&5
 
4820
sed 's/^/| /' conftest.$ac_ext >&5
 
4821
 
 
4822
eval "$as_ac_Lib=no"
 
4823
fi
 
4824
rm -f conftest.err conftest.$ac_objext \
 
4825
      conftest$ac_exeext conftest.$ac_ext
 
4826
LIBS=$ac_check_lib_save_LIBS
 
4827
fi
 
4828
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4829
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4830
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4831
  apu_has_ldapssl_add_trusted_cert="1"
 
4832
fi
 
4833
 
 
4834
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
4835
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
4836
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
4837
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4838
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4839
else
 
4840
  ac_check_lib_save_LIBS=$LIBS
 
4841
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4842
cat >conftest.$ac_ext <<_ACEOF
 
4843
/* confdefs.h.  */
 
4844
_ACEOF
 
4845
cat confdefs.h >>conftest.$ac_ext
 
4846
cat >>conftest.$ac_ext <<_ACEOF
 
4847
/* end confdefs.h.  */
 
4848
 
 
4849
/* Override any gcc2 internal prototype to avoid an error.  */
 
4850
#ifdef __cplusplus
 
4851
extern "C"
 
4852
#endif
 
4853
/* We use char because int might match the return type of a gcc2
 
4854
   builtin and then its argument prototype would still apply.  */
 
4855
char ldap_start_tls_s ();
 
4856
int
 
4857
main ()
 
4858
{
 
4859
ldap_start_tls_s ();
 
4860
  ;
 
4861
  return 0;
 
4862
}
 
4863
_ACEOF
 
4864
rm -f conftest.$ac_objext conftest$ac_exeext
 
4865
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4866
  (eval $ac_link) 2>conftest.er1
 
4867
  ac_status=$?
 
4868
  grep -v '^ *+' conftest.er1 >conftest.err
 
4869
  rm -f conftest.er1
 
4870
  cat conftest.err >&5
 
4871
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4872
  (exit $ac_status); } &&
 
4873
         { ac_try='test -z "$ac_c_werror_flag"
 
4874
                         || test ! -s conftest.err'
 
4875
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4876
  (eval $ac_try) 2>&5
 
4877
  ac_status=$?
 
4878
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4879
  (exit $ac_status); }; } &&
 
4880
         { ac_try='test -s conftest$ac_exeext'
 
4881
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4882
  (eval $ac_try) 2>&5
 
4883
  ac_status=$?
 
4884
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4885
  (exit $ac_status); }; }; then
 
4886
  eval "$as_ac_Lib=yes"
 
4887
else
 
4888
  echo "$as_me: failed program was:" >&5
 
4889
sed 's/^/| /' conftest.$ac_ext >&5
 
4890
 
 
4891
eval "$as_ac_Lib=no"
 
4892
fi
 
4893
rm -f conftest.err conftest.$ac_objext \
 
4894
      conftest$ac_exeext conftest.$ac_ext
 
4895
LIBS=$ac_check_lib_save_LIBS
 
4896
fi
 
4897
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4898
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4899
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4900
  apu_has_ldap_start_tls_s="1"
 
4901
fi
 
4902
 
 
4903
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
4904
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
4905
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
4906
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4907
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4908
else
 
4909
  ac_check_lib_save_LIBS=$LIBS
 
4910
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4911
cat >conftest.$ac_ext <<_ACEOF
 
4912
/* confdefs.h.  */
 
4913
_ACEOF
 
4914
cat confdefs.h >>conftest.$ac_ext
 
4915
cat >>conftest.$ac_ext <<_ACEOF
 
4916
/* end confdefs.h.  */
 
4917
 
 
4918
/* Override any gcc2 internal prototype to avoid an error.  */
 
4919
#ifdef __cplusplus
 
4920
extern "C"
 
4921
#endif
 
4922
/* We use char because int might match the return type of a gcc2
 
4923
   builtin and then its argument prototype would still apply.  */
 
4924
char ldap_sslinit ();
 
4925
int
 
4926
main ()
 
4927
{
 
4928
ldap_sslinit ();
 
4929
  ;
 
4930
  return 0;
 
4931
}
 
4932
_ACEOF
 
4933
rm -f conftest.$ac_objext conftest$ac_exeext
 
4934
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
4935
  (eval $ac_link) 2>conftest.er1
 
4936
  ac_status=$?
 
4937
  grep -v '^ *+' conftest.er1 >conftest.err
 
4938
  rm -f conftest.er1
 
4939
  cat conftest.err >&5
 
4940
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4941
  (exit $ac_status); } &&
 
4942
         { ac_try='test -z "$ac_c_werror_flag"
 
4943
                         || test ! -s conftest.err'
 
4944
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4945
  (eval $ac_try) 2>&5
 
4946
  ac_status=$?
 
4947
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4948
  (exit $ac_status); }; } &&
 
4949
         { ac_try='test -s conftest$ac_exeext'
 
4950
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
4951
  (eval $ac_try) 2>&5
 
4952
  ac_status=$?
 
4953
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
4954
  (exit $ac_status); }; }; then
 
4955
  eval "$as_ac_Lib=yes"
 
4956
else
 
4957
  echo "$as_me: failed program was:" >&5
 
4958
sed 's/^/| /' conftest.$ac_ext >&5
 
4959
 
 
4960
eval "$as_ac_Lib=no"
 
4961
fi
 
4962
rm -f conftest.err conftest.$ac_objext \
 
4963
      conftest$ac_exeext conftest.$ac_ext
 
4964
LIBS=$ac_check_lib_save_LIBS
 
4965
fi
 
4966
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
4967
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
4968
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
4969
  apu_has_ldap_sslinit="1"
 
4970
fi
 
4971
 
 
4972
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
4973
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
4974
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
4975
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
4976
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4977
else
 
4978
  ac_check_lib_save_LIBS=$LIBS
 
4979
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
4980
cat >conftest.$ac_ext <<_ACEOF
 
4981
/* confdefs.h.  */
 
4982
_ACEOF
 
4983
cat confdefs.h >>conftest.$ac_ext
 
4984
cat >>conftest.$ac_ext <<_ACEOF
 
4985
/* end confdefs.h.  */
 
4986
 
 
4987
/* Override any gcc2 internal prototype to avoid an error.  */
 
4988
#ifdef __cplusplus
 
4989
extern "C"
 
4990
#endif
 
4991
/* We use char because int might match the return type of a gcc2
 
4992
   builtin and then its argument prototype would still apply.  */
 
4993
char ldapssl_init ();
 
4994
int
 
4995
main ()
 
4996
{
 
4997
ldapssl_init ();
 
4998
  ;
 
4999
  return 0;
 
5000
}
 
5001
_ACEOF
 
5002
rm -f conftest.$ac_objext conftest$ac_exeext
 
5003
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5004
  (eval $ac_link) 2>conftest.er1
 
5005
  ac_status=$?
 
5006
  grep -v '^ *+' conftest.er1 >conftest.err
 
5007
  rm -f conftest.er1
 
5008
  cat conftest.err >&5
 
5009
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5010
  (exit $ac_status); } &&
 
5011
         { ac_try='test -z "$ac_c_werror_flag"
 
5012
                         || test ! -s conftest.err'
 
5013
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5014
  (eval $ac_try) 2>&5
 
5015
  ac_status=$?
 
5016
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5017
  (exit $ac_status); }; } &&
 
5018
         { ac_try='test -s conftest$ac_exeext'
 
5019
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5020
  (eval $ac_try) 2>&5
 
5021
  ac_status=$?
 
5022
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5023
  (exit $ac_status); }; }; then
 
5024
  eval "$as_ac_Lib=yes"
 
5025
else
 
5026
  echo "$as_me: failed program was:" >&5
 
5027
sed 's/^/| /' conftest.$ac_ext >&5
 
5028
 
 
5029
eval "$as_ac_Lib=no"
 
5030
fi
 
5031
rm -f conftest.err conftest.$ac_objext \
 
5032
      conftest$ac_exeext conftest.$ac_ext
 
5033
LIBS=$ac_check_lib_save_LIBS
 
5034
fi
 
5035
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5036
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5037
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5038
  apu_has_ldapssl_init="1"
 
5039
fi
 
5040
 
 
5041
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
5042
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
5043
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
5044
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5045
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5046
else
 
5047
  ac_check_lib_save_LIBS=$LIBS
 
5048
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5049
cat >conftest.$ac_ext <<_ACEOF
 
5050
/* confdefs.h.  */
 
5051
_ACEOF
 
5052
cat confdefs.h >>conftest.$ac_ext
 
5053
cat >>conftest.$ac_ext <<_ACEOF
 
5054
/* end confdefs.h.  */
 
5055
 
 
5056
/* Override any gcc2 internal prototype to avoid an error.  */
 
5057
#ifdef __cplusplus
 
5058
extern "C"
 
5059
#endif
 
5060
/* We use char because int might match the return type of a gcc2
 
5061
   builtin and then its argument prototype would still apply.  */
 
5062
char ldapssl_install_routines ();
 
5063
int
 
5064
main ()
 
5065
{
 
5066
ldapssl_install_routines ();
 
5067
  ;
 
5068
  return 0;
 
5069
}
 
5070
_ACEOF
 
5071
rm -f conftest.$ac_objext conftest$ac_exeext
 
5072
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5073
  (eval $ac_link) 2>conftest.er1
 
5074
  ac_status=$?
 
5075
  grep -v '^ *+' conftest.er1 >conftest.err
 
5076
  rm -f conftest.er1
 
5077
  cat conftest.err >&5
 
5078
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5079
  (exit $ac_status); } &&
 
5080
         { ac_try='test -z "$ac_c_werror_flag"
 
5081
                         || test ! -s conftest.err'
 
5082
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5083
  (eval $ac_try) 2>&5
 
5084
  ac_status=$?
 
5085
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5086
  (exit $ac_status); }; } &&
 
5087
         { ac_try='test -s conftest$ac_exeext'
 
5088
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5089
  (eval $ac_try) 2>&5
 
5090
  ac_status=$?
 
5091
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5092
  (exit $ac_status); }; }; then
 
5093
  eval "$as_ac_Lib=yes"
 
5094
else
 
5095
  echo "$as_me: failed program was:" >&5
 
5096
sed 's/^/| /' conftest.$ac_ext >&5
 
5097
 
 
5098
eval "$as_ac_Lib=no"
 
5099
fi
 
5100
rm -f conftest.err conftest.$ac_objext \
 
5101
      conftest$ac_exeext conftest.$ac_ext
 
5102
LIBS=$ac_check_lib_save_LIBS
 
5103
fi
 
5104
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5105
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5106
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5107
  apu_has_ldapssl_install_routines="1"
 
5108
fi
 
5109
 
 
5110
        apu_has_ldap="1";
 
5111
 
 
5112
fi
 
5113
 
 
5114
  fi
 
5115
 
 
5116
 
 
5117
  if test ${apu_has_ldap} != "1"; then
 
5118
    ldaplib="ldapssl40"
 
5119
    extralib=
 
5120
    unset ac_cv_lib_${ldaplib}_ldap_init
 
5121
    unset ac_cv_lib_${ldaplib}___ldap_init
 
5122
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
5123
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
5124
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
5125
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5126
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5127
else
 
5128
  ac_check_lib_save_LIBS=$LIBS
 
5129
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5130
cat >conftest.$ac_ext <<_ACEOF
 
5131
/* confdefs.h.  */
 
5132
_ACEOF
 
5133
cat confdefs.h >>conftest.$ac_ext
 
5134
cat >>conftest.$ac_ext <<_ACEOF
 
5135
/* end confdefs.h.  */
 
5136
 
 
5137
/* Override any gcc2 internal prototype to avoid an error.  */
 
5138
#ifdef __cplusplus
 
5139
extern "C"
 
5140
#endif
 
5141
/* We use char because int might match the return type of a gcc2
 
5142
   builtin and then its argument prototype would still apply.  */
 
5143
char ldap_init ();
 
5144
int
 
5145
main ()
 
5146
{
 
5147
ldap_init ();
 
5148
  ;
 
5149
  return 0;
 
5150
}
 
5151
_ACEOF
 
5152
rm -f conftest.$ac_objext conftest$ac_exeext
 
5153
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5154
  (eval $ac_link) 2>conftest.er1
 
5155
  ac_status=$?
 
5156
  grep -v '^ *+' conftest.er1 >conftest.err
 
5157
  rm -f conftest.er1
 
5158
  cat conftest.err >&5
 
5159
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5160
  (exit $ac_status); } &&
 
5161
         { ac_try='test -z "$ac_c_werror_flag"
 
5162
                         || test ! -s conftest.err'
 
5163
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5164
  (eval $ac_try) 2>&5
 
5165
  ac_status=$?
 
5166
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5167
  (exit $ac_status); }; } &&
 
5168
         { ac_try='test -s conftest$ac_exeext'
 
5169
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5170
  (eval $ac_try) 2>&5
 
5171
  ac_status=$?
 
5172
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5173
  (exit $ac_status); }; }; then
 
5174
  eval "$as_ac_Lib=yes"
 
5175
else
 
5176
  echo "$as_me: failed program was:" >&5
 
5177
sed 's/^/| /' conftest.$ac_ext >&5
 
5178
 
 
5179
eval "$as_ac_Lib=no"
 
5180
fi
 
5181
rm -f conftest.err conftest.$ac_objext \
 
5182
      conftest$ac_exeext conftest.$ac_ext
 
5183
LIBS=$ac_check_lib_save_LIBS
 
5184
fi
 
5185
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5186
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5187
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5188
 
 
5189
 
 
5190
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
5191
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
5192
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
5193
  else
 
5194
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
5195
    for i in $apr_addto_bugger; do
 
5196
      apr_addto_duplicate="0"
 
5197
      for j in $APRUTIL_EXPORT_LIBS; do
 
5198
        if test "x$i" = "x$j"; then
 
5199
          apr_addto_duplicate="1"
 
5200
          break
 
5201
        fi
 
5202
      done
 
5203
      if test $apr_addto_duplicate = "0"; then
 
5204
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
5205
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
5206
      fi
 
5207
    done
 
5208
  fi
 
5209
 
 
5210
 
 
5211
  if test "x$APRUTIL_LIBS" = "x"; then
 
5212
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
5213
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
5214
  else
 
5215
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
5216
    for i in $apr_addto_bugger; do
 
5217
      apr_addto_duplicate="0"
 
5218
      for j in $APRUTIL_LIBS; do
 
5219
        if test "x$i" = "x$j"; then
 
5220
          apr_addto_duplicate="1"
 
5221
          break
 
5222
        fi
 
5223
      done
 
5224
      if test $apr_addto_duplicate = "0"; then
 
5225
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
5226
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
5227
      fi
 
5228
    done
 
5229
  fi
 
5230
 
 
5231
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
5232
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
5233
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
5234
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5235
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5236
else
 
5237
  ac_check_lib_save_LIBS=$LIBS
 
5238
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5239
cat >conftest.$ac_ext <<_ACEOF
 
5240
/* confdefs.h.  */
 
5241
_ACEOF
 
5242
cat confdefs.h >>conftest.$ac_ext
 
5243
cat >>conftest.$ac_ext <<_ACEOF
 
5244
/* end confdefs.h.  */
 
5245
 
 
5246
/* Override any gcc2 internal prototype to avoid an error.  */
 
5247
#ifdef __cplusplus
 
5248
extern "C"
 
5249
#endif
 
5250
/* We use char because int might match the return type of a gcc2
 
5251
   builtin and then its argument prototype would still apply.  */
 
5252
char ldapssl_client_init ();
 
5253
int
 
5254
main ()
 
5255
{
 
5256
ldapssl_client_init ();
 
5257
  ;
 
5258
  return 0;
 
5259
}
 
5260
_ACEOF
 
5261
rm -f conftest.$ac_objext conftest$ac_exeext
 
5262
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5263
  (eval $ac_link) 2>conftest.er1
 
5264
  ac_status=$?
 
5265
  grep -v '^ *+' conftest.er1 >conftest.err
 
5266
  rm -f conftest.er1
 
5267
  cat conftest.err >&5
 
5268
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5269
  (exit $ac_status); } &&
 
5270
         { ac_try='test -z "$ac_c_werror_flag"
 
5271
                         || test ! -s conftest.err'
 
5272
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5273
  (eval $ac_try) 2>&5
 
5274
  ac_status=$?
 
5275
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5276
  (exit $ac_status); }; } &&
 
5277
         { ac_try='test -s conftest$ac_exeext'
 
5278
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5279
  (eval $ac_try) 2>&5
 
5280
  ac_status=$?
 
5281
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5282
  (exit $ac_status); }; }; then
 
5283
  eval "$as_ac_Lib=yes"
 
5284
else
 
5285
  echo "$as_me: failed program was:" >&5
 
5286
sed 's/^/| /' conftest.$ac_ext >&5
 
5287
 
 
5288
eval "$as_ac_Lib=no"
 
5289
fi
 
5290
rm -f conftest.err conftest.$ac_objext \
 
5291
      conftest$ac_exeext conftest.$ac_ext
 
5292
LIBS=$ac_check_lib_save_LIBS
 
5293
fi
 
5294
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5295
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5296
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5297
  apu_has_ldapssl_client_init="1"
 
5298
fi
 
5299
 
 
5300
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
5301
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
5302
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
5303
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5304
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5305
else
 
5306
  ac_check_lib_save_LIBS=$LIBS
 
5307
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5308
cat >conftest.$ac_ext <<_ACEOF
 
5309
/* confdefs.h.  */
 
5310
_ACEOF
 
5311
cat confdefs.h >>conftest.$ac_ext
 
5312
cat >>conftest.$ac_ext <<_ACEOF
 
5313
/* end confdefs.h.  */
 
5314
 
 
5315
/* Override any gcc2 internal prototype to avoid an error.  */
 
5316
#ifdef __cplusplus
 
5317
extern "C"
 
5318
#endif
 
5319
/* We use char because int might match the return type of a gcc2
 
5320
   builtin and then its argument prototype would still apply.  */
 
5321
char ldapssl_client_deinit ();
 
5322
int
 
5323
main ()
 
5324
{
 
5325
ldapssl_client_deinit ();
 
5326
  ;
 
5327
  return 0;
 
5328
}
 
5329
_ACEOF
 
5330
rm -f conftest.$ac_objext conftest$ac_exeext
 
5331
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5332
  (eval $ac_link) 2>conftest.er1
 
5333
  ac_status=$?
 
5334
  grep -v '^ *+' conftest.er1 >conftest.err
 
5335
  rm -f conftest.er1
 
5336
  cat conftest.err >&5
 
5337
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5338
  (exit $ac_status); } &&
 
5339
         { ac_try='test -z "$ac_c_werror_flag"
 
5340
                         || test ! -s conftest.err'
 
5341
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5342
  (eval $ac_try) 2>&5
 
5343
  ac_status=$?
 
5344
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5345
  (exit $ac_status); }; } &&
 
5346
         { ac_try='test -s conftest$ac_exeext'
 
5347
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5348
  (eval $ac_try) 2>&5
 
5349
  ac_status=$?
 
5350
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5351
  (exit $ac_status); }; }; then
 
5352
  eval "$as_ac_Lib=yes"
 
5353
else
 
5354
  echo "$as_me: failed program was:" >&5
 
5355
sed 's/^/| /' conftest.$ac_ext >&5
 
5356
 
 
5357
eval "$as_ac_Lib=no"
 
5358
fi
 
5359
rm -f conftest.err conftest.$ac_objext \
 
5360
      conftest$ac_exeext conftest.$ac_ext
 
5361
LIBS=$ac_check_lib_save_LIBS
 
5362
fi
 
5363
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5364
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5365
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5366
  apu_has_ldapssl_client_deinit="1"
 
5367
fi
 
5368
 
 
5369
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
5370
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
5371
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
5372
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5373
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5374
else
 
5375
  ac_check_lib_save_LIBS=$LIBS
 
5376
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5377
cat >conftest.$ac_ext <<_ACEOF
 
5378
/* confdefs.h.  */
 
5379
_ACEOF
 
5380
cat confdefs.h >>conftest.$ac_ext
 
5381
cat >>conftest.$ac_ext <<_ACEOF
 
5382
/* end confdefs.h.  */
 
5383
 
 
5384
/* Override any gcc2 internal prototype to avoid an error.  */
 
5385
#ifdef __cplusplus
 
5386
extern "C"
 
5387
#endif
 
5388
/* We use char because int might match the return type of a gcc2
 
5389
   builtin and then its argument prototype would still apply.  */
 
5390
char ldapssl_add_trusted_cert ();
 
5391
int
 
5392
main ()
 
5393
{
 
5394
ldapssl_add_trusted_cert ();
 
5395
  ;
 
5396
  return 0;
 
5397
}
 
5398
_ACEOF
 
5399
rm -f conftest.$ac_objext conftest$ac_exeext
 
5400
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5401
  (eval $ac_link) 2>conftest.er1
 
5402
  ac_status=$?
 
5403
  grep -v '^ *+' conftest.er1 >conftest.err
 
5404
  rm -f conftest.er1
 
5405
  cat conftest.err >&5
 
5406
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5407
  (exit $ac_status); } &&
 
5408
         { ac_try='test -z "$ac_c_werror_flag"
 
5409
                         || test ! -s conftest.err'
 
5410
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5411
  (eval $ac_try) 2>&5
 
5412
  ac_status=$?
 
5413
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5414
  (exit $ac_status); }; } &&
 
5415
         { ac_try='test -s conftest$ac_exeext'
 
5416
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5417
  (eval $ac_try) 2>&5
 
5418
  ac_status=$?
 
5419
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5420
  (exit $ac_status); }; }; then
 
5421
  eval "$as_ac_Lib=yes"
 
5422
else
 
5423
  echo "$as_me: failed program was:" >&5
 
5424
sed 's/^/| /' conftest.$ac_ext >&5
 
5425
 
 
5426
eval "$as_ac_Lib=no"
 
5427
fi
 
5428
rm -f conftest.err conftest.$ac_objext \
 
5429
      conftest$ac_exeext conftest.$ac_ext
 
5430
LIBS=$ac_check_lib_save_LIBS
 
5431
fi
 
5432
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5433
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5434
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5435
  apu_has_ldapssl_add_trusted_cert="1"
 
5436
fi
 
5437
 
 
5438
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
5439
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
5440
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
5441
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5442
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5443
else
 
5444
  ac_check_lib_save_LIBS=$LIBS
 
5445
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5446
cat >conftest.$ac_ext <<_ACEOF
 
5447
/* confdefs.h.  */
 
5448
_ACEOF
 
5449
cat confdefs.h >>conftest.$ac_ext
 
5450
cat >>conftest.$ac_ext <<_ACEOF
 
5451
/* end confdefs.h.  */
 
5452
 
 
5453
/* Override any gcc2 internal prototype to avoid an error.  */
 
5454
#ifdef __cplusplus
 
5455
extern "C"
 
5456
#endif
 
5457
/* We use char because int might match the return type of a gcc2
 
5458
   builtin and then its argument prototype would still apply.  */
 
5459
char ldap_start_tls_s ();
 
5460
int
 
5461
main ()
 
5462
{
 
5463
ldap_start_tls_s ();
 
5464
  ;
 
5465
  return 0;
 
5466
}
 
5467
_ACEOF
 
5468
rm -f conftest.$ac_objext conftest$ac_exeext
 
5469
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5470
  (eval $ac_link) 2>conftest.er1
 
5471
  ac_status=$?
 
5472
  grep -v '^ *+' conftest.er1 >conftest.err
 
5473
  rm -f conftest.er1
 
5474
  cat conftest.err >&5
 
5475
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5476
  (exit $ac_status); } &&
 
5477
         { ac_try='test -z "$ac_c_werror_flag"
 
5478
                         || test ! -s conftest.err'
 
5479
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5480
  (eval $ac_try) 2>&5
 
5481
  ac_status=$?
 
5482
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5483
  (exit $ac_status); }; } &&
 
5484
         { ac_try='test -s conftest$ac_exeext'
 
5485
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5486
  (eval $ac_try) 2>&5
 
5487
  ac_status=$?
 
5488
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5489
  (exit $ac_status); }; }; then
 
5490
  eval "$as_ac_Lib=yes"
 
5491
else
 
5492
  echo "$as_me: failed program was:" >&5
 
5493
sed 's/^/| /' conftest.$ac_ext >&5
 
5494
 
 
5495
eval "$as_ac_Lib=no"
 
5496
fi
 
5497
rm -f conftest.err conftest.$ac_objext \
 
5498
      conftest$ac_exeext conftest.$ac_ext
 
5499
LIBS=$ac_check_lib_save_LIBS
 
5500
fi
 
5501
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5502
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5503
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5504
  apu_has_ldap_start_tls_s="1"
 
5505
fi
 
5506
 
 
5507
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
5508
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
5509
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
5510
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5511
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5512
else
 
5513
  ac_check_lib_save_LIBS=$LIBS
 
5514
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5515
cat >conftest.$ac_ext <<_ACEOF
 
5516
/* confdefs.h.  */
 
5517
_ACEOF
 
5518
cat confdefs.h >>conftest.$ac_ext
 
5519
cat >>conftest.$ac_ext <<_ACEOF
 
5520
/* end confdefs.h.  */
 
5521
 
 
5522
/* Override any gcc2 internal prototype to avoid an error.  */
 
5523
#ifdef __cplusplus
 
5524
extern "C"
 
5525
#endif
 
5526
/* We use char because int might match the return type of a gcc2
 
5527
   builtin and then its argument prototype would still apply.  */
 
5528
char ldap_sslinit ();
 
5529
int
 
5530
main ()
 
5531
{
 
5532
ldap_sslinit ();
 
5533
  ;
 
5534
  return 0;
 
5535
}
 
5536
_ACEOF
 
5537
rm -f conftest.$ac_objext conftest$ac_exeext
 
5538
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5539
  (eval $ac_link) 2>conftest.er1
 
5540
  ac_status=$?
 
5541
  grep -v '^ *+' conftest.er1 >conftest.err
 
5542
  rm -f conftest.er1
 
5543
  cat conftest.err >&5
 
5544
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5545
  (exit $ac_status); } &&
 
5546
         { ac_try='test -z "$ac_c_werror_flag"
 
5547
                         || test ! -s conftest.err'
 
5548
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5549
  (eval $ac_try) 2>&5
 
5550
  ac_status=$?
 
5551
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5552
  (exit $ac_status); }; } &&
 
5553
         { ac_try='test -s conftest$ac_exeext'
 
5554
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5555
  (eval $ac_try) 2>&5
 
5556
  ac_status=$?
 
5557
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5558
  (exit $ac_status); }; }; then
 
5559
  eval "$as_ac_Lib=yes"
 
5560
else
 
5561
  echo "$as_me: failed program was:" >&5
 
5562
sed 's/^/| /' conftest.$ac_ext >&5
 
5563
 
 
5564
eval "$as_ac_Lib=no"
 
5565
fi
 
5566
rm -f conftest.err conftest.$ac_objext \
 
5567
      conftest$ac_exeext conftest.$ac_ext
 
5568
LIBS=$ac_check_lib_save_LIBS
 
5569
fi
 
5570
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5571
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5572
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5573
  apu_has_ldap_sslinit="1"
 
5574
fi
 
5575
 
 
5576
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
5577
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
5578
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
5579
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5580
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5581
else
 
5582
  ac_check_lib_save_LIBS=$LIBS
 
5583
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5584
cat >conftest.$ac_ext <<_ACEOF
 
5585
/* confdefs.h.  */
 
5586
_ACEOF
 
5587
cat confdefs.h >>conftest.$ac_ext
 
5588
cat >>conftest.$ac_ext <<_ACEOF
 
5589
/* end confdefs.h.  */
 
5590
 
 
5591
/* Override any gcc2 internal prototype to avoid an error.  */
 
5592
#ifdef __cplusplus
 
5593
extern "C"
 
5594
#endif
 
5595
/* We use char because int might match the return type of a gcc2
 
5596
   builtin and then its argument prototype would still apply.  */
 
5597
char ldapssl_init ();
 
5598
int
 
5599
main ()
 
5600
{
 
5601
ldapssl_init ();
 
5602
  ;
 
5603
  return 0;
 
5604
}
 
5605
_ACEOF
 
5606
rm -f conftest.$ac_objext conftest$ac_exeext
 
5607
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5608
  (eval $ac_link) 2>conftest.er1
 
5609
  ac_status=$?
 
5610
  grep -v '^ *+' conftest.er1 >conftest.err
 
5611
  rm -f conftest.er1
 
5612
  cat conftest.err >&5
 
5613
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5614
  (exit $ac_status); } &&
 
5615
         { ac_try='test -z "$ac_c_werror_flag"
 
5616
                         || test ! -s conftest.err'
 
5617
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5618
  (eval $ac_try) 2>&5
 
5619
  ac_status=$?
 
5620
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5621
  (exit $ac_status); }; } &&
 
5622
         { ac_try='test -s conftest$ac_exeext'
 
5623
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5624
  (eval $ac_try) 2>&5
 
5625
  ac_status=$?
 
5626
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5627
  (exit $ac_status); }; }; then
 
5628
  eval "$as_ac_Lib=yes"
 
5629
else
 
5630
  echo "$as_me: failed program was:" >&5
 
5631
sed 's/^/| /' conftest.$ac_ext >&5
 
5632
 
 
5633
eval "$as_ac_Lib=no"
 
5634
fi
 
5635
rm -f conftest.err conftest.$ac_objext \
 
5636
      conftest$ac_exeext conftest.$ac_ext
 
5637
LIBS=$ac_check_lib_save_LIBS
 
5638
fi
 
5639
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5640
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5641
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5642
  apu_has_ldapssl_init="1"
 
5643
fi
 
5644
 
 
5645
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
5646
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
5647
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
5648
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5649
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5650
else
 
5651
  ac_check_lib_save_LIBS=$LIBS
 
5652
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5653
cat >conftest.$ac_ext <<_ACEOF
 
5654
/* confdefs.h.  */
 
5655
_ACEOF
 
5656
cat confdefs.h >>conftest.$ac_ext
 
5657
cat >>conftest.$ac_ext <<_ACEOF
 
5658
/* end confdefs.h.  */
 
5659
 
 
5660
/* Override any gcc2 internal prototype to avoid an error.  */
 
5661
#ifdef __cplusplus
 
5662
extern "C"
 
5663
#endif
 
5664
/* We use char because int might match the return type of a gcc2
 
5665
   builtin and then its argument prototype would still apply.  */
 
5666
char ldapssl_install_routines ();
 
5667
int
 
5668
main ()
 
5669
{
 
5670
ldapssl_install_routines ();
 
5671
  ;
 
5672
  return 0;
 
5673
}
 
5674
_ACEOF
 
5675
rm -f conftest.$ac_objext conftest$ac_exeext
 
5676
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5677
  (eval $ac_link) 2>conftest.er1
 
5678
  ac_status=$?
 
5679
  grep -v '^ *+' conftest.er1 >conftest.err
 
5680
  rm -f conftest.er1
 
5681
  cat conftest.err >&5
 
5682
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5683
  (exit $ac_status); } &&
 
5684
         { ac_try='test -z "$ac_c_werror_flag"
 
5685
                         || test ! -s conftest.err'
 
5686
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5687
  (eval $ac_try) 2>&5
 
5688
  ac_status=$?
 
5689
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5690
  (exit $ac_status); }; } &&
 
5691
         { ac_try='test -s conftest$ac_exeext'
 
5692
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5693
  (eval $ac_try) 2>&5
 
5694
  ac_status=$?
 
5695
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5696
  (exit $ac_status); }; }; then
 
5697
  eval "$as_ac_Lib=yes"
 
5698
else
 
5699
  echo "$as_me: failed program was:" >&5
 
5700
sed 's/^/| /' conftest.$ac_ext >&5
 
5701
 
 
5702
eval "$as_ac_Lib=no"
 
5703
fi
 
5704
rm -f conftest.err conftest.$ac_objext \
 
5705
      conftest$ac_exeext conftest.$ac_ext
 
5706
LIBS=$ac_check_lib_save_LIBS
 
5707
fi
 
5708
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5709
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5710
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5711
  apu_has_ldapssl_install_routines="1"
 
5712
fi
 
5713
 
 
5714
        apu_has_ldap="1";
 
5715
 
 
5716
fi
 
5717
 
 
5718
  fi
 
5719
 
 
5720
 
 
5721
  if test ${apu_has_ldap} != "1"; then
 
5722
    ldaplib="ldapssl30"
 
5723
    extralib=
 
5724
    unset ac_cv_lib_${ldaplib}_ldap_init
 
5725
    unset ac_cv_lib_${ldaplib}___ldap_init
 
5726
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
5727
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
5728
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
5729
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5730
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5731
else
 
5732
  ac_check_lib_save_LIBS=$LIBS
 
5733
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5734
cat >conftest.$ac_ext <<_ACEOF
 
5735
/* confdefs.h.  */
 
5736
_ACEOF
 
5737
cat confdefs.h >>conftest.$ac_ext
 
5738
cat >>conftest.$ac_ext <<_ACEOF
 
5739
/* end confdefs.h.  */
 
5740
 
 
5741
/* Override any gcc2 internal prototype to avoid an error.  */
 
5742
#ifdef __cplusplus
 
5743
extern "C"
 
5744
#endif
 
5745
/* We use char because int might match the return type of a gcc2
 
5746
   builtin and then its argument prototype would still apply.  */
 
5747
char ldap_init ();
 
5748
int
 
5749
main ()
 
5750
{
 
5751
ldap_init ();
 
5752
  ;
 
5753
  return 0;
 
5754
}
 
5755
_ACEOF
 
5756
rm -f conftest.$ac_objext conftest$ac_exeext
 
5757
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5758
  (eval $ac_link) 2>conftest.er1
 
5759
  ac_status=$?
 
5760
  grep -v '^ *+' conftest.er1 >conftest.err
 
5761
  rm -f conftest.er1
 
5762
  cat conftest.err >&5
 
5763
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5764
  (exit $ac_status); } &&
 
5765
         { ac_try='test -z "$ac_c_werror_flag"
 
5766
                         || test ! -s conftest.err'
 
5767
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5768
  (eval $ac_try) 2>&5
 
5769
  ac_status=$?
 
5770
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5771
  (exit $ac_status); }; } &&
 
5772
         { ac_try='test -s conftest$ac_exeext'
 
5773
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5774
  (eval $ac_try) 2>&5
 
5775
  ac_status=$?
 
5776
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5777
  (exit $ac_status); }; }; then
 
5778
  eval "$as_ac_Lib=yes"
 
5779
else
 
5780
  echo "$as_me: failed program was:" >&5
 
5781
sed 's/^/| /' conftest.$ac_ext >&5
 
5782
 
 
5783
eval "$as_ac_Lib=no"
 
5784
fi
 
5785
rm -f conftest.err conftest.$ac_objext \
 
5786
      conftest$ac_exeext conftest.$ac_ext
 
5787
LIBS=$ac_check_lib_save_LIBS
 
5788
fi
 
5789
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5790
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5791
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5792
 
 
5793
 
 
5794
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
5795
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
5796
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
5797
  else
 
5798
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
5799
    for i in $apr_addto_bugger; do
 
5800
      apr_addto_duplicate="0"
 
5801
      for j in $APRUTIL_EXPORT_LIBS; do
 
5802
        if test "x$i" = "x$j"; then
 
5803
          apr_addto_duplicate="1"
 
5804
          break
 
5805
        fi
 
5806
      done
 
5807
      if test $apr_addto_duplicate = "0"; then
 
5808
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
5809
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
5810
      fi
 
5811
    done
 
5812
  fi
 
5813
 
 
5814
 
 
5815
  if test "x$APRUTIL_LIBS" = "x"; then
 
5816
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
5817
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
5818
  else
 
5819
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
5820
    for i in $apr_addto_bugger; do
 
5821
      apr_addto_duplicate="0"
 
5822
      for j in $APRUTIL_LIBS; do
 
5823
        if test "x$i" = "x$j"; then
 
5824
          apr_addto_duplicate="1"
 
5825
          break
 
5826
        fi
 
5827
      done
 
5828
      if test $apr_addto_duplicate = "0"; then
 
5829
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
5830
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
5831
      fi
 
5832
    done
 
5833
  fi
 
5834
 
 
5835
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
5836
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
5837
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
5838
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5839
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5840
else
 
5841
  ac_check_lib_save_LIBS=$LIBS
 
5842
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5843
cat >conftest.$ac_ext <<_ACEOF
 
5844
/* confdefs.h.  */
 
5845
_ACEOF
 
5846
cat confdefs.h >>conftest.$ac_ext
 
5847
cat >>conftest.$ac_ext <<_ACEOF
 
5848
/* end confdefs.h.  */
 
5849
 
 
5850
/* Override any gcc2 internal prototype to avoid an error.  */
 
5851
#ifdef __cplusplus
 
5852
extern "C"
 
5853
#endif
 
5854
/* We use char because int might match the return type of a gcc2
 
5855
   builtin and then its argument prototype would still apply.  */
 
5856
char ldapssl_client_init ();
 
5857
int
 
5858
main ()
 
5859
{
 
5860
ldapssl_client_init ();
 
5861
  ;
 
5862
  return 0;
 
5863
}
 
5864
_ACEOF
 
5865
rm -f conftest.$ac_objext conftest$ac_exeext
 
5866
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5867
  (eval $ac_link) 2>conftest.er1
 
5868
  ac_status=$?
 
5869
  grep -v '^ *+' conftest.er1 >conftest.err
 
5870
  rm -f conftest.er1
 
5871
  cat conftest.err >&5
 
5872
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5873
  (exit $ac_status); } &&
 
5874
         { ac_try='test -z "$ac_c_werror_flag"
 
5875
                         || test ! -s conftest.err'
 
5876
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5877
  (eval $ac_try) 2>&5
 
5878
  ac_status=$?
 
5879
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5880
  (exit $ac_status); }; } &&
 
5881
         { ac_try='test -s conftest$ac_exeext'
 
5882
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5883
  (eval $ac_try) 2>&5
 
5884
  ac_status=$?
 
5885
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5886
  (exit $ac_status); }; }; then
 
5887
  eval "$as_ac_Lib=yes"
 
5888
else
 
5889
  echo "$as_me: failed program was:" >&5
 
5890
sed 's/^/| /' conftest.$ac_ext >&5
 
5891
 
 
5892
eval "$as_ac_Lib=no"
 
5893
fi
 
5894
rm -f conftest.err conftest.$ac_objext \
 
5895
      conftest$ac_exeext conftest.$ac_ext
 
5896
LIBS=$ac_check_lib_save_LIBS
 
5897
fi
 
5898
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5899
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5900
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5901
  apu_has_ldapssl_client_init="1"
 
5902
fi
 
5903
 
 
5904
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
5905
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
5906
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
5907
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5908
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5909
else
 
5910
  ac_check_lib_save_LIBS=$LIBS
 
5911
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5912
cat >conftest.$ac_ext <<_ACEOF
 
5913
/* confdefs.h.  */
 
5914
_ACEOF
 
5915
cat confdefs.h >>conftest.$ac_ext
 
5916
cat >>conftest.$ac_ext <<_ACEOF
 
5917
/* end confdefs.h.  */
 
5918
 
 
5919
/* Override any gcc2 internal prototype to avoid an error.  */
 
5920
#ifdef __cplusplus
 
5921
extern "C"
 
5922
#endif
 
5923
/* We use char because int might match the return type of a gcc2
 
5924
   builtin and then its argument prototype would still apply.  */
 
5925
char ldapssl_client_deinit ();
 
5926
int
 
5927
main ()
 
5928
{
 
5929
ldapssl_client_deinit ();
 
5930
  ;
 
5931
  return 0;
 
5932
}
 
5933
_ACEOF
 
5934
rm -f conftest.$ac_objext conftest$ac_exeext
 
5935
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
5936
  (eval $ac_link) 2>conftest.er1
 
5937
  ac_status=$?
 
5938
  grep -v '^ *+' conftest.er1 >conftest.err
 
5939
  rm -f conftest.er1
 
5940
  cat conftest.err >&5
 
5941
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5942
  (exit $ac_status); } &&
 
5943
         { ac_try='test -z "$ac_c_werror_flag"
 
5944
                         || test ! -s conftest.err'
 
5945
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5946
  (eval $ac_try) 2>&5
 
5947
  ac_status=$?
 
5948
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5949
  (exit $ac_status); }; } &&
 
5950
         { ac_try='test -s conftest$ac_exeext'
 
5951
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
5952
  (eval $ac_try) 2>&5
 
5953
  ac_status=$?
 
5954
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
5955
  (exit $ac_status); }; }; then
 
5956
  eval "$as_ac_Lib=yes"
 
5957
else
 
5958
  echo "$as_me: failed program was:" >&5
 
5959
sed 's/^/| /' conftest.$ac_ext >&5
 
5960
 
 
5961
eval "$as_ac_Lib=no"
 
5962
fi
 
5963
rm -f conftest.err conftest.$ac_objext \
 
5964
      conftest$ac_exeext conftest.$ac_ext
 
5965
LIBS=$ac_check_lib_save_LIBS
 
5966
fi
 
5967
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
5968
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
5969
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
5970
  apu_has_ldapssl_client_deinit="1"
 
5971
fi
 
5972
 
 
5973
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
5974
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
5975
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
5976
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
5977
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5978
else
 
5979
  ac_check_lib_save_LIBS=$LIBS
 
5980
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
5981
cat >conftest.$ac_ext <<_ACEOF
 
5982
/* confdefs.h.  */
 
5983
_ACEOF
 
5984
cat confdefs.h >>conftest.$ac_ext
 
5985
cat >>conftest.$ac_ext <<_ACEOF
 
5986
/* end confdefs.h.  */
 
5987
 
 
5988
/* Override any gcc2 internal prototype to avoid an error.  */
 
5989
#ifdef __cplusplus
 
5990
extern "C"
 
5991
#endif
 
5992
/* We use char because int might match the return type of a gcc2
 
5993
   builtin and then its argument prototype would still apply.  */
 
5994
char ldapssl_add_trusted_cert ();
 
5995
int
 
5996
main ()
 
5997
{
 
5998
ldapssl_add_trusted_cert ();
 
5999
  ;
 
6000
  return 0;
 
6001
}
 
6002
_ACEOF
 
6003
rm -f conftest.$ac_objext conftest$ac_exeext
 
6004
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6005
  (eval $ac_link) 2>conftest.er1
 
6006
  ac_status=$?
 
6007
  grep -v '^ *+' conftest.er1 >conftest.err
 
6008
  rm -f conftest.er1
 
6009
  cat conftest.err >&5
 
6010
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6011
  (exit $ac_status); } &&
 
6012
         { ac_try='test -z "$ac_c_werror_flag"
 
6013
                         || test ! -s conftest.err'
 
6014
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6015
  (eval $ac_try) 2>&5
 
6016
  ac_status=$?
 
6017
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6018
  (exit $ac_status); }; } &&
 
6019
         { ac_try='test -s conftest$ac_exeext'
 
6020
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6021
  (eval $ac_try) 2>&5
 
6022
  ac_status=$?
 
6023
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6024
  (exit $ac_status); }; }; then
 
6025
  eval "$as_ac_Lib=yes"
 
6026
else
 
6027
  echo "$as_me: failed program was:" >&5
 
6028
sed 's/^/| /' conftest.$ac_ext >&5
 
6029
 
 
6030
eval "$as_ac_Lib=no"
 
6031
fi
 
6032
rm -f conftest.err conftest.$ac_objext \
 
6033
      conftest$ac_exeext conftest.$ac_ext
 
6034
LIBS=$ac_check_lib_save_LIBS
 
6035
fi
 
6036
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6037
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6038
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6039
  apu_has_ldapssl_add_trusted_cert="1"
 
6040
fi
 
6041
 
 
6042
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
6043
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
6044
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
6045
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6046
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6047
else
 
6048
  ac_check_lib_save_LIBS=$LIBS
 
6049
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6050
cat >conftest.$ac_ext <<_ACEOF
 
6051
/* confdefs.h.  */
 
6052
_ACEOF
 
6053
cat confdefs.h >>conftest.$ac_ext
 
6054
cat >>conftest.$ac_ext <<_ACEOF
 
6055
/* end confdefs.h.  */
 
6056
 
 
6057
/* Override any gcc2 internal prototype to avoid an error.  */
 
6058
#ifdef __cplusplus
 
6059
extern "C"
 
6060
#endif
 
6061
/* We use char because int might match the return type of a gcc2
 
6062
   builtin and then its argument prototype would still apply.  */
 
6063
char ldap_start_tls_s ();
 
6064
int
 
6065
main ()
 
6066
{
 
6067
ldap_start_tls_s ();
 
6068
  ;
 
6069
  return 0;
 
6070
}
 
6071
_ACEOF
 
6072
rm -f conftest.$ac_objext conftest$ac_exeext
 
6073
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6074
  (eval $ac_link) 2>conftest.er1
 
6075
  ac_status=$?
 
6076
  grep -v '^ *+' conftest.er1 >conftest.err
 
6077
  rm -f conftest.er1
 
6078
  cat conftest.err >&5
 
6079
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6080
  (exit $ac_status); } &&
 
6081
         { ac_try='test -z "$ac_c_werror_flag"
 
6082
                         || test ! -s conftest.err'
 
6083
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6084
  (eval $ac_try) 2>&5
 
6085
  ac_status=$?
 
6086
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6087
  (exit $ac_status); }; } &&
 
6088
         { ac_try='test -s conftest$ac_exeext'
 
6089
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6090
  (eval $ac_try) 2>&5
 
6091
  ac_status=$?
 
6092
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6093
  (exit $ac_status); }; }; then
 
6094
  eval "$as_ac_Lib=yes"
 
6095
else
 
6096
  echo "$as_me: failed program was:" >&5
 
6097
sed 's/^/| /' conftest.$ac_ext >&5
 
6098
 
 
6099
eval "$as_ac_Lib=no"
 
6100
fi
 
6101
rm -f conftest.err conftest.$ac_objext \
 
6102
      conftest$ac_exeext conftest.$ac_ext
 
6103
LIBS=$ac_check_lib_save_LIBS
 
6104
fi
 
6105
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6106
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6107
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6108
  apu_has_ldap_start_tls_s="1"
 
6109
fi
 
6110
 
 
6111
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
6112
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
6113
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
6114
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6115
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6116
else
 
6117
  ac_check_lib_save_LIBS=$LIBS
 
6118
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6119
cat >conftest.$ac_ext <<_ACEOF
 
6120
/* confdefs.h.  */
 
6121
_ACEOF
 
6122
cat confdefs.h >>conftest.$ac_ext
 
6123
cat >>conftest.$ac_ext <<_ACEOF
 
6124
/* end confdefs.h.  */
 
6125
 
 
6126
/* Override any gcc2 internal prototype to avoid an error.  */
 
6127
#ifdef __cplusplus
 
6128
extern "C"
 
6129
#endif
 
6130
/* We use char because int might match the return type of a gcc2
 
6131
   builtin and then its argument prototype would still apply.  */
 
6132
char ldap_sslinit ();
 
6133
int
 
6134
main ()
 
6135
{
 
6136
ldap_sslinit ();
 
6137
  ;
 
6138
  return 0;
 
6139
}
 
6140
_ACEOF
 
6141
rm -f conftest.$ac_objext conftest$ac_exeext
 
6142
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6143
  (eval $ac_link) 2>conftest.er1
 
6144
  ac_status=$?
 
6145
  grep -v '^ *+' conftest.er1 >conftest.err
 
6146
  rm -f conftest.er1
 
6147
  cat conftest.err >&5
 
6148
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6149
  (exit $ac_status); } &&
 
6150
         { ac_try='test -z "$ac_c_werror_flag"
 
6151
                         || test ! -s conftest.err'
 
6152
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6153
  (eval $ac_try) 2>&5
 
6154
  ac_status=$?
 
6155
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6156
  (exit $ac_status); }; } &&
 
6157
         { ac_try='test -s conftest$ac_exeext'
 
6158
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6159
  (eval $ac_try) 2>&5
 
6160
  ac_status=$?
 
6161
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6162
  (exit $ac_status); }; }; then
 
6163
  eval "$as_ac_Lib=yes"
 
6164
else
 
6165
  echo "$as_me: failed program was:" >&5
 
6166
sed 's/^/| /' conftest.$ac_ext >&5
 
6167
 
 
6168
eval "$as_ac_Lib=no"
 
6169
fi
 
6170
rm -f conftest.err conftest.$ac_objext \
 
6171
      conftest$ac_exeext conftest.$ac_ext
 
6172
LIBS=$ac_check_lib_save_LIBS
 
6173
fi
 
6174
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6175
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6176
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6177
  apu_has_ldap_sslinit="1"
 
6178
fi
 
6179
 
 
6180
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
6181
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
6182
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
6183
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6184
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6185
else
 
6186
  ac_check_lib_save_LIBS=$LIBS
 
6187
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6188
cat >conftest.$ac_ext <<_ACEOF
 
6189
/* confdefs.h.  */
 
6190
_ACEOF
 
6191
cat confdefs.h >>conftest.$ac_ext
 
6192
cat >>conftest.$ac_ext <<_ACEOF
 
6193
/* end confdefs.h.  */
 
6194
 
 
6195
/* Override any gcc2 internal prototype to avoid an error.  */
 
6196
#ifdef __cplusplus
 
6197
extern "C"
 
6198
#endif
 
6199
/* We use char because int might match the return type of a gcc2
 
6200
   builtin and then its argument prototype would still apply.  */
 
6201
char ldapssl_init ();
 
6202
int
 
6203
main ()
 
6204
{
 
6205
ldapssl_init ();
 
6206
  ;
 
6207
  return 0;
 
6208
}
 
6209
_ACEOF
 
6210
rm -f conftest.$ac_objext conftest$ac_exeext
 
6211
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6212
  (eval $ac_link) 2>conftest.er1
 
6213
  ac_status=$?
 
6214
  grep -v '^ *+' conftest.er1 >conftest.err
 
6215
  rm -f conftest.er1
 
6216
  cat conftest.err >&5
 
6217
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6218
  (exit $ac_status); } &&
 
6219
         { ac_try='test -z "$ac_c_werror_flag"
 
6220
                         || test ! -s conftest.err'
 
6221
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6222
  (eval $ac_try) 2>&5
 
6223
  ac_status=$?
 
6224
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6225
  (exit $ac_status); }; } &&
 
6226
         { ac_try='test -s conftest$ac_exeext'
 
6227
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6228
  (eval $ac_try) 2>&5
 
6229
  ac_status=$?
 
6230
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6231
  (exit $ac_status); }; }; then
 
6232
  eval "$as_ac_Lib=yes"
 
6233
else
 
6234
  echo "$as_me: failed program was:" >&5
 
6235
sed 's/^/| /' conftest.$ac_ext >&5
 
6236
 
 
6237
eval "$as_ac_Lib=no"
 
6238
fi
 
6239
rm -f conftest.err conftest.$ac_objext \
 
6240
      conftest$ac_exeext conftest.$ac_ext
 
6241
LIBS=$ac_check_lib_save_LIBS
 
6242
fi
 
6243
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6244
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6245
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6246
  apu_has_ldapssl_init="1"
 
6247
fi
 
6248
 
 
6249
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
6250
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
6251
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
6252
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6253
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6254
else
 
6255
  ac_check_lib_save_LIBS=$LIBS
 
6256
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6257
cat >conftest.$ac_ext <<_ACEOF
 
6258
/* confdefs.h.  */
 
6259
_ACEOF
 
6260
cat confdefs.h >>conftest.$ac_ext
 
6261
cat >>conftest.$ac_ext <<_ACEOF
 
6262
/* end confdefs.h.  */
 
6263
 
 
6264
/* Override any gcc2 internal prototype to avoid an error.  */
 
6265
#ifdef __cplusplus
 
6266
extern "C"
 
6267
#endif
 
6268
/* We use char because int might match the return type of a gcc2
 
6269
   builtin and then its argument prototype would still apply.  */
 
6270
char ldapssl_install_routines ();
 
6271
int
 
6272
main ()
 
6273
{
 
6274
ldapssl_install_routines ();
 
6275
  ;
 
6276
  return 0;
 
6277
}
 
6278
_ACEOF
 
6279
rm -f conftest.$ac_objext conftest$ac_exeext
 
6280
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6281
  (eval $ac_link) 2>conftest.er1
 
6282
  ac_status=$?
 
6283
  grep -v '^ *+' conftest.er1 >conftest.err
 
6284
  rm -f conftest.er1
 
6285
  cat conftest.err >&5
 
6286
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6287
  (exit $ac_status); } &&
 
6288
         { ac_try='test -z "$ac_c_werror_flag"
 
6289
                         || test ! -s conftest.err'
 
6290
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6291
  (eval $ac_try) 2>&5
 
6292
  ac_status=$?
 
6293
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6294
  (exit $ac_status); }; } &&
 
6295
         { ac_try='test -s conftest$ac_exeext'
 
6296
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6297
  (eval $ac_try) 2>&5
 
6298
  ac_status=$?
 
6299
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6300
  (exit $ac_status); }; }; then
 
6301
  eval "$as_ac_Lib=yes"
 
6302
else
 
6303
  echo "$as_me: failed program was:" >&5
 
6304
sed 's/^/| /' conftest.$ac_ext >&5
 
6305
 
 
6306
eval "$as_ac_Lib=no"
 
6307
fi
 
6308
rm -f conftest.err conftest.$ac_objext \
 
6309
      conftest$ac_exeext conftest.$ac_ext
 
6310
LIBS=$ac_check_lib_save_LIBS
 
6311
fi
 
6312
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6313
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6314
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6315
  apu_has_ldapssl_install_routines="1"
 
6316
fi
 
6317
 
 
6318
        apu_has_ldap="1";
 
6319
 
 
6320
fi
 
6321
 
 
6322
  fi
 
6323
 
 
6324
 
 
6325
  if test ${apu_has_ldap} != "1"; then
 
6326
    ldaplib="ldapssl20"
 
6327
    extralib=
 
6328
    unset ac_cv_lib_${ldaplib}_ldap_init
 
6329
    unset ac_cv_lib_${ldaplib}___ldap_init
 
6330
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
6331
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
6332
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
6333
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6334
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6335
else
 
6336
  ac_check_lib_save_LIBS=$LIBS
 
6337
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6338
cat >conftest.$ac_ext <<_ACEOF
 
6339
/* confdefs.h.  */
 
6340
_ACEOF
 
6341
cat confdefs.h >>conftest.$ac_ext
 
6342
cat >>conftest.$ac_ext <<_ACEOF
 
6343
/* end confdefs.h.  */
 
6344
 
 
6345
/* Override any gcc2 internal prototype to avoid an error.  */
 
6346
#ifdef __cplusplus
 
6347
extern "C"
 
6348
#endif
 
6349
/* We use char because int might match the return type of a gcc2
 
6350
   builtin and then its argument prototype would still apply.  */
 
6351
char ldap_init ();
 
6352
int
 
6353
main ()
 
6354
{
 
6355
ldap_init ();
 
6356
  ;
 
6357
  return 0;
 
6358
}
 
6359
_ACEOF
 
6360
rm -f conftest.$ac_objext conftest$ac_exeext
 
6361
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6362
  (eval $ac_link) 2>conftest.er1
 
6363
  ac_status=$?
 
6364
  grep -v '^ *+' conftest.er1 >conftest.err
 
6365
  rm -f conftest.er1
 
6366
  cat conftest.err >&5
 
6367
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6368
  (exit $ac_status); } &&
 
6369
         { ac_try='test -z "$ac_c_werror_flag"
 
6370
                         || test ! -s conftest.err'
 
6371
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6372
  (eval $ac_try) 2>&5
 
6373
  ac_status=$?
 
6374
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6375
  (exit $ac_status); }; } &&
 
6376
         { ac_try='test -s conftest$ac_exeext'
 
6377
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6378
  (eval $ac_try) 2>&5
 
6379
  ac_status=$?
 
6380
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6381
  (exit $ac_status); }; }; then
 
6382
  eval "$as_ac_Lib=yes"
 
6383
else
 
6384
  echo "$as_me: failed program was:" >&5
 
6385
sed 's/^/| /' conftest.$ac_ext >&5
 
6386
 
 
6387
eval "$as_ac_Lib=no"
 
6388
fi
 
6389
rm -f conftest.err conftest.$ac_objext \
 
6390
      conftest$ac_exeext conftest.$ac_ext
 
6391
LIBS=$ac_check_lib_save_LIBS
 
6392
fi
 
6393
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6394
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6395
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6396
 
 
6397
 
 
6398
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
6399
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
6400
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
6401
  else
 
6402
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
6403
    for i in $apr_addto_bugger; do
 
6404
      apr_addto_duplicate="0"
 
6405
      for j in $APRUTIL_EXPORT_LIBS; do
 
6406
        if test "x$i" = "x$j"; then
 
6407
          apr_addto_duplicate="1"
 
6408
          break
 
6409
        fi
 
6410
      done
 
6411
      if test $apr_addto_duplicate = "0"; then
 
6412
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
6413
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
6414
      fi
 
6415
    done
 
6416
  fi
 
6417
 
 
6418
 
 
6419
  if test "x$APRUTIL_LIBS" = "x"; then
 
6420
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
6421
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
6422
  else
 
6423
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
6424
    for i in $apr_addto_bugger; do
 
6425
      apr_addto_duplicate="0"
 
6426
      for j in $APRUTIL_LIBS; do
 
6427
        if test "x$i" = "x$j"; then
 
6428
          apr_addto_duplicate="1"
 
6429
          break
 
6430
        fi
 
6431
      done
 
6432
      if test $apr_addto_duplicate = "0"; then
 
6433
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
6434
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
6435
      fi
 
6436
    done
 
6437
  fi
 
6438
 
 
6439
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
6440
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
6441
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
6442
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6443
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6444
else
 
6445
  ac_check_lib_save_LIBS=$LIBS
 
6446
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6447
cat >conftest.$ac_ext <<_ACEOF
 
6448
/* confdefs.h.  */
 
6449
_ACEOF
 
6450
cat confdefs.h >>conftest.$ac_ext
 
6451
cat >>conftest.$ac_ext <<_ACEOF
 
6452
/* end confdefs.h.  */
 
6453
 
 
6454
/* Override any gcc2 internal prototype to avoid an error.  */
 
6455
#ifdef __cplusplus
 
6456
extern "C"
 
6457
#endif
 
6458
/* We use char because int might match the return type of a gcc2
 
6459
   builtin and then its argument prototype would still apply.  */
 
6460
char ldapssl_client_init ();
 
6461
int
 
6462
main ()
 
6463
{
 
6464
ldapssl_client_init ();
 
6465
  ;
 
6466
  return 0;
 
6467
}
 
6468
_ACEOF
 
6469
rm -f conftest.$ac_objext conftest$ac_exeext
 
6470
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6471
  (eval $ac_link) 2>conftest.er1
 
6472
  ac_status=$?
 
6473
  grep -v '^ *+' conftest.er1 >conftest.err
 
6474
  rm -f conftest.er1
 
6475
  cat conftest.err >&5
 
6476
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6477
  (exit $ac_status); } &&
 
6478
         { ac_try='test -z "$ac_c_werror_flag"
 
6479
                         || test ! -s conftest.err'
 
6480
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6481
  (eval $ac_try) 2>&5
 
6482
  ac_status=$?
 
6483
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6484
  (exit $ac_status); }; } &&
 
6485
         { ac_try='test -s conftest$ac_exeext'
 
6486
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6487
  (eval $ac_try) 2>&5
 
6488
  ac_status=$?
 
6489
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6490
  (exit $ac_status); }; }; then
 
6491
  eval "$as_ac_Lib=yes"
 
6492
else
 
6493
  echo "$as_me: failed program was:" >&5
 
6494
sed 's/^/| /' conftest.$ac_ext >&5
 
6495
 
 
6496
eval "$as_ac_Lib=no"
 
6497
fi
 
6498
rm -f conftest.err conftest.$ac_objext \
 
6499
      conftest$ac_exeext conftest.$ac_ext
 
6500
LIBS=$ac_check_lib_save_LIBS
 
6501
fi
 
6502
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6503
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6504
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6505
  apu_has_ldapssl_client_init="1"
 
6506
fi
 
6507
 
 
6508
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
6509
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
6510
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
6511
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6512
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6513
else
 
6514
  ac_check_lib_save_LIBS=$LIBS
 
6515
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6516
cat >conftest.$ac_ext <<_ACEOF
 
6517
/* confdefs.h.  */
 
6518
_ACEOF
 
6519
cat confdefs.h >>conftest.$ac_ext
 
6520
cat >>conftest.$ac_ext <<_ACEOF
 
6521
/* end confdefs.h.  */
 
6522
 
 
6523
/* Override any gcc2 internal prototype to avoid an error.  */
 
6524
#ifdef __cplusplus
 
6525
extern "C"
 
6526
#endif
 
6527
/* We use char because int might match the return type of a gcc2
 
6528
   builtin and then its argument prototype would still apply.  */
 
6529
char ldapssl_client_deinit ();
 
6530
int
 
6531
main ()
 
6532
{
 
6533
ldapssl_client_deinit ();
 
6534
  ;
 
6535
  return 0;
 
6536
}
 
6537
_ACEOF
 
6538
rm -f conftest.$ac_objext conftest$ac_exeext
 
6539
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6540
  (eval $ac_link) 2>conftest.er1
 
6541
  ac_status=$?
 
6542
  grep -v '^ *+' conftest.er1 >conftest.err
 
6543
  rm -f conftest.er1
 
6544
  cat conftest.err >&5
 
6545
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6546
  (exit $ac_status); } &&
 
6547
         { ac_try='test -z "$ac_c_werror_flag"
 
6548
                         || test ! -s conftest.err'
 
6549
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6550
  (eval $ac_try) 2>&5
 
6551
  ac_status=$?
 
6552
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6553
  (exit $ac_status); }; } &&
 
6554
         { ac_try='test -s conftest$ac_exeext'
 
6555
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6556
  (eval $ac_try) 2>&5
 
6557
  ac_status=$?
 
6558
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6559
  (exit $ac_status); }; }; then
 
6560
  eval "$as_ac_Lib=yes"
 
6561
else
 
6562
  echo "$as_me: failed program was:" >&5
 
6563
sed 's/^/| /' conftest.$ac_ext >&5
 
6564
 
 
6565
eval "$as_ac_Lib=no"
 
6566
fi
 
6567
rm -f conftest.err conftest.$ac_objext \
 
6568
      conftest$ac_exeext conftest.$ac_ext
 
6569
LIBS=$ac_check_lib_save_LIBS
 
6570
fi
 
6571
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6572
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6573
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6574
  apu_has_ldapssl_client_deinit="1"
 
6575
fi
 
6576
 
 
6577
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
6578
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
6579
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
6580
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6581
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6582
else
 
6583
  ac_check_lib_save_LIBS=$LIBS
 
6584
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6585
cat >conftest.$ac_ext <<_ACEOF
 
6586
/* confdefs.h.  */
 
6587
_ACEOF
 
6588
cat confdefs.h >>conftest.$ac_ext
 
6589
cat >>conftest.$ac_ext <<_ACEOF
 
6590
/* end confdefs.h.  */
 
6591
 
 
6592
/* Override any gcc2 internal prototype to avoid an error.  */
 
6593
#ifdef __cplusplus
 
6594
extern "C"
 
6595
#endif
 
6596
/* We use char because int might match the return type of a gcc2
 
6597
   builtin and then its argument prototype would still apply.  */
 
6598
char ldapssl_add_trusted_cert ();
 
6599
int
 
6600
main ()
 
6601
{
 
6602
ldapssl_add_trusted_cert ();
 
6603
  ;
 
6604
  return 0;
 
6605
}
 
6606
_ACEOF
 
6607
rm -f conftest.$ac_objext conftest$ac_exeext
 
6608
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6609
  (eval $ac_link) 2>conftest.er1
 
6610
  ac_status=$?
 
6611
  grep -v '^ *+' conftest.er1 >conftest.err
 
6612
  rm -f conftest.er1
 
6613
  cat conftest.err >&5
 
6614
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6615
  (exit $ac_status); } &&
 
6616
         { ac_try='test -z "$ac_c_werror_flag"
 
6617
                         || test ! -s conftest.err'
 
6618
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6619
  (eval $ac_try) 2>&5
 
6620
  ac_status=$?
 
6621
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6622
  (exit $ac_status); }; } &&
 
6623
         { ac_try='test -s conftest$ac_exeext'
 
6624
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6625
  (eval $ac_try) 2>&5
 
6626
  ac_status=$?
 
6627
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6628
  (exit $ac_status); }; }; then
 
6629
  eval "$as_ac_Lib=yes"
 
6630
else
 
6631
  echo "$as_me: failed program was:" >&5
 
6632
sed 's/^/| /' conftest.$ac_ext >&5
 
6633
 
 
6634
eval "$as_ac_Lib=no"
 
6635
fi
 
6636
rm -f conftest.err conftest.$ac_objext \
 
6637
      conftest$ac_exeext conftest.$ac_ext
 
6638
LIBS=$ac_check_lib_save_LIBS
 
6639
fi
 
6640
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6641
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6642
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6643
  apu_has_ldapssl_add_trusted_cert="1"
 
6644
fi
 
6645
 
 
6646
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
6647
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
6648
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
6649
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6650
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6651
else
 
6652
  ac_check_lib_save_LIBS=$LIBS
 
6653
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6654
cat >conftest.$ac_ext <<_ACEOF
 
6655
/* confdefs.h.  */
 
6656
_ACEOF
 
6657
cat confdefs.h >>conftest.$ac_ext
 
6658
cat >>conftest.$ac_ext <<_ACEOF
 
6659
/* end confdefs.h.  */
 
6660
 
 
6661
/* Override any gcc2 internal prototype to avoid an error.  */
 
6662
#ifdef __cplusplus
 
6663
extern "C"
 
6664
#endif
 
6665
/* We use char because int might match the return type of a gcc2
 
6666
   builtin and then its argument prototype would still apply.  */
 
6667
char ldap_start_tls_s ();
 
6668
int
 
6669
main ()
 
6670
{
 
6671
ldap_start_tls_s ();
 
6672
  ;
 
6673
  return 0;
 
6674
}
 
6675
_ACEOF
 
6676
rm -f conftest.$ac_objext conftest$ac_exeext
 
6677
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6678
  (eval $ac_link) 2>conftest.er1
 
6679
  ac_status=$?
 
6680
  grep -v '^ *+' conftest.er1 >conftest.err
 
6681
  rm -f conftest.er1
 
6682
  cat conftest.err >&5
 
6683
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6684
  (exit $ac_status); } &&
 
6685
         { ac_try='test -z "$ac_c_werror_flag"
 
6686
                         || test ! -s conftest.err'
 
6687
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6688
  (eval $ac_try) 2>&5
 
6689
  ac_status=$?
 
6690
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6691
  (exit $ac_status); }; } &&
 
6692
         { ac_try='test -s conftest$ac_exeext'
 
6693
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6694
  (eval $ac_try) 2>&5
 
6695
  ac_status=$?
 
6696
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6697
  (exit $ac_status); }; }; then
 
6698
  eval "$as_ac_Lib=yes"
 
6699
else
 
6700
  echo "$as_me: failed program was:" >&5
 
6701
sed 's/^/| /' conftest.$ac_ext >&5
 
6702
 
 
6703
eval "$as_ac_Lib=no"
 
6704
fi
 
6705
rm -f conftest.err conftest.$ac_objext \
 
6706
      conftest$ac_exeext conftest.$ac_ext
 
6707
LIBS=$ac_check_lib_save_LIBS
 
6708
fi
 
6709
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6710
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6711
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6712
  apu_has_ldap_start_tls_s="1"
 
6713
fi
 
6714
 
 
6715
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
6716
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
6717
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
6718
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6719
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6720
else
 
6721
  ac_check_lib_save_LIBS=$LIBS
 
6722
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6723
cat >conftest.$ac_ext <<_ACEOF
 
6724
/* confdefs.h.  */
 
6725
_ACEOF
 
6726
cat confdefs.h >>conftest.$ac_ext
 
6727
cat >>conftest.$ac_ext <<_ACEOF
 
6728
/* end confdefs.h.  */
 
6729
 
 
6730
/* Override any gcc2 internal prototype to avoid an error.  */
 
6731
#ifdef __cplusplus
 
6732
extern "C"
 
6733
#endif
 
6734
/* We use char because int might match the return type of a gcc2
 
6735
   builtin and then its argument prototype would still apply.  */
 
6736
char ldap_sslinit ();
 
6737
int
 
6738
main ()
 
6739
{
 
6740
ldap_sslinit ();
 
6741
  ;
 
6742
  return 0;
 
6743
}
 
6744
_ACEOF
 
6745
rm -f conftest.$ac_objext conftest$ac_exeext
 
6746
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6747
  (eval $ac_link) 2>conftest.er1
 
6748
  ac_status=$?
 
6749
  grep -v '^ *+' conftest.er1 >conftest.err
 
6750
  rm -f conftest.er1
 
6751
  cat conftest.err >&5
 
6752
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6753
  (exit $ac_status); } &&
 
6754
         { ac_try='test -z "$ac_c_werror_flag"
 
6755
                         || test ! -s conftest.err'
 
6756
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6757
  (eval $ac_try) 2>&5
 
6758
  ac_status=$?
 
6759
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6760
  (exit $ac_status); }; } &&
 
6761
         { ac_try='test -s conftest$ac_exeext'
 
6762
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6763
  (eval $ac_try) 2>&5
 
6764
  ac_status=$?
 
6765
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6766
  (exit $ac_status); }; }; then
 
6767
  eval "$as_ac_Lib=yes"
 
6768
else
 
6769
  echo "$as_me: failed program was:" >&5
 
6770
sed 's/^/| /' conftest.$ac_ext >&5
 
6771
 
 
6772
eval "$as_ac_Lib=no"
 
6773
fi
 
6774
rm -f conftest.err conftest.$ac_objext \
 
6775
      conftest$ac_exeext conftest.$ac_ext
 
6776
LIBS=$ac_check_lib_save_LIBS
 
6777
fi
 
6778
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6779
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6780
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6781
  apu_has_ldap_sslinit="1"
 
6782
fi
 
6783
 
 
6784
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
6785
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
6786
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
6787
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6788
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6789
else
 
6790
  ac_check_lib_save_LIBS=$LIBS
 
6791
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6792
cat >conftest.$ac_ext <<_ACEOF
 
6793
/* confdefs.h.  */
 
6794
_ACEOF
 
6795
cat confdefs.h >>conftest.$ac_ext
 
6796
cat >>conftest.$ac_ext <<_ACEOF
 
6797
/* end confdefs.h.  */
 
6798
 
 
6799
/* Override any gcc2 internal prototype to avoid an error.  */
 
6800
#ifdef __cplusplus
 
6801
extern "C"
 
6802
#endif
 
6803
/* We use char because int might match the return type of a gcc2
 
6804
   builtin and then its argument prototype would still apply.  */
 
6805
char ldapssl_init ();
 
6806
int
 
6807
main ()
 
6808
{
 
6809
ldapssl_init ();
 
6810
  ;
 
6811
  return 0;
 
6812
}
 
6813
_ACEOF
 
6814
rm -f conftest.$ac_objext conftest$ac_exeext
 
6815
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6816
  (eval $ac_link) 2>conftest.er1
 
6817
  ac_status=$?
 
6818
  grep -v '^ *+' conftest.er1 >conftest.err
 
6819
  rm -f conftest.er1
 
6820
  cat conftest.err >&5
 
6821
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6822
  (exit $ac_status); } &&
 
6823
         { ac_try='test -z "$ac_c_werror_flag"
 
6824
                         || test ! -s conftest.err'
 
6825
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6826
  (eval $ac_try) 2>&5
 
6827
  ac_status=$?
 
6828
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6829
  (exit $ac_status); }; } &&
 
6830
         { ac_try='test -s conftest$ac_exeext'
 
6831
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6832
  (eval $ac_try) 2>&5
 
6833
  ac_status=$?
 
6834
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6835
  (exit $ac_status); }; }; then
 
6836
  eval "$as_ac_Lib=yes"
 
6837
else
 
6838
  echo "$as_me: failed program was:" >&5
 
6839
sed 's/^/| /' conftest.$ac_ext >&5
 
6840
 
 
6841
eval "$as_ac_Lib=no"
 
6842
fi
 
6843
rm -f conftest.err conftest.$ac_objext \
 
6844
      conftest$ac_exeext conftest.$ac_ext
 
6845
LIBS=$ac_check_lib_save_LIBS
 
6846
fi
 
6847
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6848
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6849
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6850
  apu_has_ldapssl_init="1"
 
6851
fi
 
6852
 
 
6853
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
6854
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
6855
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
6856
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6857
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6858
else
 
6859
  ac_check_lib_save_LIBS=$LIBS
 
6860
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6861
cat >conftest.$ac_ext <<_ACEOF
 
6862
/* confdefs.h.  */
 
6863
_ACEOF
 
6864
cat confdefs.h >>conftest.$ac_ext
 
6865
cat >>conftest.$ac_ext <<_ACEOF
 
6866
/* end confdefs.h.  */
 
6867
 
 
6868
/* Override any gcc2 internal prototype to avoid an error.  */
 
6869
#ifdef __cplusplus
 
6870
extern "C"
 
6871
#endif
 
6872
/* We use char because int might match the return type of a gcc2
 
6873
   builtin and then its argument prototype would still apply.  */
 
6874
char ldapssl_install_routines ();
 
6875
int
 
6876
main ()
 
6877
{
 
6878
ldapssl_install_routines ();
 
6879
  ;
 
6880
  return 0;
 
6881
}
 
6882
_ACEOF
 
6883
rm -f conftest.$ac_objext conftest$ac_exeext
 
6884
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6885
  (eval $ac_link) 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); } &&
 
6892
         { ac_try='test -z "$ac_c_werror_flag"
 
6893
                         || test ! -s conftest.err'
 
6894
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6895
  (eval $ac_try) 2>&5
 
6896
  ac_status=$?
 
6897
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6898
  (exit $ac_status); }; } &&
 
6899
         { ac_try='test -s conftest$ac_exeext'
 
6900
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6901
  (eval $ac_try) 2>&5
 
6902
  ac_status=$?
 
6903
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6904
  (exit $ac_status); }; }; then
 
6905
  eval "$as_ac_Lib=yes"
 
6906
else
 
6907
  echo "$as_me: failed program was:" >&5
 
6908
sed 's/^/| /' conftest.$ac_ext >&5
 
6909
 
 
6910
eval "$as_ac_Lib=no"
 
6911
fi
 
6912
rm -f conftest.err conftest.$ac_objext \
 
6913
      conftest$ac_exeext conftest.$ac_ext
 
6914
LIBS=$ac_check_lib_save_LIBS
 
6915
fi
 
6916
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6917
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6918
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
6919
  apu_has_ldapssl_install_routines="1"
 
6920
fi
 
6921
 
 
6922
        apu_has_ldap="1";
 
6923
 
 
6924
fi
 
6925
 
 
6926
  fi
 
6927
 
 
6928
 
 
6929
  if test ${apu_has_ldap} != "1"; then
 
6930
    ldaplib="ldapsdk"
 
6931
    extralib="-lldapx -lldapssl -lldapgss -lgssapi_krb5"
 
6932
    unset ac_cv_lib_${ldaplib}_ldap_init
 
6933
    unset ac_cv_lib_${ldaplib}___ldap_init
 
6934
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
6935
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
6936
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
6937
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
6938
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6939
else
 
6940
  ac_check_lib_save_LIBS=$LIBS
 
6941
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
6942
cat >conftest.$ac_ext <<_ACEOF
 
6943
/* confdefs.h.  */
 
6944
_ACEOF
 
6945
cat confdefs.h >>conftest.$ac_ext
 
6946
cat >>conftest.$ac_ext <<_ACEOF
 
6947
/* end confdefs.h.  */
 
6948
 
 
6949
/* Override any gcc2 internal prototype to avoid an error.  */
 
6950
#ifdef __cplusplus
 
6951
extern "C"
 
6952
#endif
 
6953
/* We use char because int might match the return type of a gcc2
 
6954
   builtin and then its argument prototype would still apply.  */
 
6955
char ldap_init ();
 
6956
int
 
6957
main ()
 
6958
{
 
6959
ldap_init ();
 
6960
  ;
 
6961
  return 0;
 
6962
}
 
6963
_ACEOF
 
6964
rm -f conftest.$ac_objext conftest$ac_exeext
 
6965
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
6966
  (eval $ac_link) 2>conftest.er1
 
6967
  ac_status=$?
 
6968
  grep -v '^ *+' conftest.er1 >conftest.err
 
6969
  rm -f conftest.er1
 
6970
  cat conftest.err >&5
 
6971
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6972
  (exit $ac_status); } &&
 
6973
         { ac_try='test -z "$ac_c_werror_flag"
 
6974
                         || test ! -s conftest.err'
 
6975
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6976
  (eval $ac_try) 2>&5
 
6977
  ac_status=$?
 
6978
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6979
  (exit $ac_status); }; } &&
 
6980
         { ac_try='test -s conftest$ac_exeext'
 
6981
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
6982
  (eval $ac_try) 2>&5
 
6983
  ac_status=$?
 
6984
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
6985
  (exit $ac_status); }; }; then
 
6986
  eval "$as_ac_Lib=yes"
 
6987
else
 
6988
  echo "$as_me: failed program was:" >&5
 
6989
sed 's/^/| /' conftest.$ac_ext >&5
 
6990
 
 
6991
eval "$as_ac_Lib=no"
 
6992
fi
 
6993
rm -f conftest.err conftest.$ac_objext \
 
6994
      conftest$ac_exeext conftest.$ac_ext
 
6995
LIBS=$ac_check_lib_save_LIBS
 
6996
fi
 
6997
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
6998
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
6999
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7000
 
 
7001
 
 
7002
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
7003
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
7004
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
7005
  else
 
7006
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
7007
    for i in $apr_addto_bugger; do
 
7008
      apr_addto_duplicate="0"
 
7009
      for j in $APRUTIL_EXPORT_LIBS; do
 
7010
        if test "x$i" = "x$j"; then
 
7011
          apr_addto_duplicate="1"
 
7012
          break
 
7013
        fi
 
7014
      done
 
7015
      if test $apr_addto_duplicate = "0"; then
 
7016
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
7017
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
7018
      fi
 
7019
    done
 
7020
  fi
 
7021
 
 
7022
 
 
7023
  if test "x$APRUTIL_LIBS" = "x"; then
 
7024
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
7025
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
7026
  else
 
7027
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
7028
    for i in $apr_addto_bugger; do
 
7029
      apr_addto_duplicate="0"
 
7030
      for j in $APRUTIL_LIBS; do
 
7031
        if test "x$i" = "x$j"; then
 
7032
          apr_addto_duplicate="1"
 
7033
          break
 
7034
        fi
 
7035
      done
 
7036
      if test $apr_addto_duplicate = "0"; then
 
7037
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
7038
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
7039
      fi
 
7040
    done
 
7041
  fi
 
7042
 
 
7043
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
7044
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
7045
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
7046
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7047
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7048
else
 
7049
  ac_check_lib_save_LIBS=$LIBS
 
7050
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7051
cat >conftest.$ac_ext <<_ACEOF
 
7052
/* confdefs.h.  */
 
7053
_ACEOF
 
7054
cat confdefs.h >>conftest.$ac_ext
 
7055
cat >>conftest.$ac_ext <<_ACEOF
 
7056
/* end confdefs.h.  */
 
7057
 
 
7058
/* Override any gcc2 internal prototype to avoid an error.  */
 
7059
#ifdef __cplusplus
 
7060
extern "C"
 
7061
#endif
 
7062
/* We use char because int might match the return type of a gcc2
 
7063
   builtin and then its argument prototype would still apply.  */
 
7064
char ldapssl_client_init ();
 
7065
int
 
7066
main ()
 
7067
{
 
7068
ldapssl_client_init ();
 
7069
  ;
 
7070
  return 0;
 
7071
}
 
7072
_ACEOF
 
7073
rm -f conftest.$ac_objext conftest$ac_exeext
 
7074
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7075
  (eval $ac_link) 2>conftest.er1
 
7076
  ac_status=$?
 
7077
  grep -v '^ *+' conftest.er1 >conftest.err
 
7078
  rm -f conftest.er1
 
7079
  cat conftest.err >&5
 
7080
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7081
  (exit $ac_status); } &&
 
7082
         { ac_try='test -z "$ac_c_werror_flag"
 
7083
                         || test ! -s conftest.err'
 
7084
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7085
  (eval $ac_try) 2>&5
 
7086
  ac_status=$?
 
7087
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7088
  (exit $ac_status); }; } &&
 
7089
         { ac_try='test -s conftest$ac_exeext'
 
7090
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7091
  (eval $ac_try) 2>&5
 
7092
  ac_status=$?
 
7093
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7094
  (exit $ac_status); }; }; then
 
7095
  eval "$as_ac_Lib=yes"
 
7096
else
 
7097
  echo "$as_me: failed program was:" >&5
 
7098
sed 's/^/| /' conftest.$ac_ext >&5
 
7099
 
 
7100
eval "$as_ac_Lib=no"
 
7101
fi
 
7102
rm -f conftest.err conftest.$ac_objext \
 
7103
      conftest$ac_exeext conftest.$ac_ext
 
7104
LIBS=$ac_check_lib_save_LIBS
 
7105
fi
 
7106
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7107
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7108
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7109
  apu_has_ldapssl_client_init="1"
 
7110
fi
 
7111
 
 
7112
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
7113
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
7114
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
7115
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7116
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7117
else
 
7118
  ac_check_lib_save_LIBS=$LIBS
 
7119
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7120
cat >conftest.$ac_ext <<_ACEOF
 
7121
/* confdefs.h.  */
 
7122
_ACEOF
 
7123
cat confdefs.h >>conftest.$ac_ext
 
7124
cat >>conftest.$ac_ext <<_ACEOF
 
7125
/* end confdefs.h.  */
 
7126
 
 
7127
/* Override any gcc2 internal prototype to avoid an error.  */
 
7128
#ifdef __cplusplus
 
7129
extern "C"
 
7130
#endif
 
7131
/* We use char because int might match the return type of a gcc2
 
7132
   builtin and then its argument prototype would still apply.  */
 
7133
char ldapssl_client_deinit ();
 
7134
int
 
7135
main ()
 
7136
{
 
7137
ldapssl_client_deinit ();
 
7138
  ;
 
7139
  return 0;
 
7140
}
 
7141
_ACEOF
 
7142
rm -f conftest.$ac_objext conftest$ac_exeext
 
7143
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7144
  (eval $ac_link) 2>conftest.er1
 
7145
  ac_status=$?
 
7146
  grep -v '^ *+' conftest.er1 >conftest.err
 
7147
  rm -f conftest.er1
 
7148
  cat conftest.err >&5
 
7149
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7150
  (exit $ac_status); } &&
 
7151
         { ac_try='test -z "$ac_c_werror_flag"
 
7152
                         || test ! -s conftest.err'
 
7153
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7154
  (eval $ac_try) 2>&5
 
7155
  ac_status=$?
 
7156
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7157
  (exit $ac_status); }; } &&
 
7158
         { ac_try='test -s conftest$ac_exeext'
 
7159
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7160
  (eval $ac_try) 2>&5
 
7161
  ac_status=$?
 
7162
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7163
  (exit $ac_status); }; }; then
 
7164
  eval "$as_ac_Lib=yes"
 
7165
else
 
7166
  echo "$as_me: failed program was:" >&5
 
7167
sed 's/^/| /' conftest.$ac_ext >&5
 
7168
 
 
7169
eval "$as_ac_Lib=no"
 
7170
fi
 
7171
rm -f conftest.err conftest.$ac_objext \
 
7172
      conftest$ac_exeext conftest.$ac_ext
 
7173
LIBS=$ac_check_lib_save_LIBS
 
7174
fi
 
7175
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7176
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7177
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7178
  apu_has_ldapssl_client_deinit="1"
 
7179
fi
 
7180
 
 
7181
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
7182
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
7183
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
7184
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7185
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7186
else
 
7187
  ac_check_lib_save_LIBS=$LIBS
 
7188
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7189
cat >conftest.$ac_ext <<_ACEOF
 
7190
/* confdefs.h.  */
 
7191
_ACEOF
 
7192
cat confdefs.h >>conftest.$ac_ext
 
7193
cat >>conftest.$ac_ext <<_ACEOF
 
7194
/* end confdefs.h.  */
 
7195
 
 
7196
/* Override any gcc2 internal prototype to avoid an error.  */
 
7197
#ifdef __cplusplus
 
7198
extern "C"
 
7199
#endif
 
7200
/* We use char because int might match the return type of a gcc2
 
7201
   builtin and then its argument prototype would still apply.  */
 
7202
char ldapssl_add_trusted_cert ();
 
7203
int
 
7204
main ()
 
7205
{
 
7206
ldapssl_add_trusted_cert ();
 
7207
  ;
 
7208
  return 0;
 
7209
}
 
7210
_ACEOF
 
7211
rm -f conftest.$ac_objext conftest$ac_exeext
 
7212
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7213
  (eval $ac_link) 2>conftest.er1
 
7214
  ac_status=$?
 
7215
  grep -v '^ *+' conftest.er1 >conftest.err
 
7216
  rm -f conftest.er1
 
7217
  cat conftest.err >&5
 
7218
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7219
  (exit $ac_status); } &&
 
7220
         { ac_try='test -z "$ac_c_werror_flag"
 
7221
                         || test ! -s conftest.err'
 
7222
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7223
  (eval $ac_try) 2>&5
 
7224
  ac_status=$?
 
7225
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7226
  (exit $ac_status); }; } &&
 
7227
         { ac_try='test -s conftest$ac_exeext'
 
7228
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7229
  (eval $ac_try) 2>&5
 
7230
  ac_status=$?
 
7231
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7232
  (exit $ac_status); }; }; then
 
7233
  eval "$as_ac_Lib=yes"
 
7234
else
 
7235
  echo "$as_me: failed program was:" >&5
 
7236
sed 's/^/| /' conftest.$ac_ext >&5
 
7237
 
 
7238
eval "$as_ac_Lib=no"
 
7239
fi
 
7240
rm -f conftest.err conftest.$ac_objext \
 
7241
      conftest$ac_exeext conftest.$ac_ext
 
7242
LIBS=$ac_check_lib_save_LIBS
 
7243
fi
 
7244
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7245
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7246
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7247
  apu_has_ldapssl_add_trusted_cert="1"
 
7248
fi
 
7249
 
 
7250
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
7251
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
7252
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
7253
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7254
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7255
else
 
7256
  ac_check_lib_save_LIBS=$LIBS
 
7257
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7258
cat >conftest.$ac_ext <<_ACEOF
 
7259
/* confdefs.h.  */
 
7260
_ACEOF
 
7261
cat confdefs.h >>conftest.$ac_ext
 
7262
cat >>conftest.$ac_ext <<_ACEOF
 
7263
/* end confdefs.h.  */
 
7264
 
 
7265
/* Override any gcc2 internal prototype to avoid an error.  */
 
7266
#ifdef __cplusplus
 
7267
extern "C"
 
7268
#endif
 
7269
/* We use char because int might match the return type of a gcc2
 
7270
   builtin and then its argument prototype would still apply.  */
 
7271
char ldap_start_tls_s ();
 
7272
int
 
7273
main ()
 
7274
{
 
7275
ldap_start_tls_s ();
 
7276
  ;
 
7277
  return 0;
 
7278
}
 
7279
_ACEOF
 
7280
rm -f conftest.$ac_objext conftest$ac_exeext
 
7281
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7282
  (eval $ac_link) 2>conftest.er1
 
7283
  ac_status=$?
 
7284
  grep -v '^ *+' conftest.er1 >conftest.err
 
7285
  rm -f conftest.er1
 
7286
  cat conftest.err >&5
 
7287
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7288
  (exit $ac_status); } &&
 
7289
         { ac_try='test -z "$ac_c_werror_flag"
 
7290
                         || test ! -s conftest.err'
 
7291
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7292
  (eval $ac_try) 2>&5
 
7293
  ac_status=$?
 
7294
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7295
  (exit $ac_status); }; } &&
 
7296
         { ac_try='test -s conftest$ac_exeext'
 
7297
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7298
  (eval $ac_try) 2>&5
 
7299
  ac_status=$?
 
7300
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7301
  (exit $ac_status); }; }; then
 
7302
  eval "$as_ac_Lib=yes"
 
7303
else
 
7304
  echo "$as_me: failed program was:" >&5
 
7305
sed 's/^/| /' conftest.$ac_ext >&5
 
7306
 
 
7307
eval "$as_ac_Lib=no"
 
7308
fi
 
7309
rm -f conftest.err conftest.$ac_objext \
 
7310
      conftest$ac_exeext conftest.$ac_ext
 
7311
LIBS=$ac_check_lib_save_LIBS
 
7312
fi
 
7313
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7314
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7315
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7316
  apu_has_ldap_start_tls_s="1"
 
7317
fi
 
7318
 
 
7319
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
7320
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
7321
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
7322
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7323
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7324
else
 
7325
  ac_check_lib_save_LIBS=$LIBS
 
7326
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7327
cat >conftest.$ac_ext <<_ACEOF
 
7328
/* confdefs.h.  */
 
7329
_ACEOF
 
7330
cat confdefs.h >>conftest.$ac_ext
 
7331
cat >>conftest.$ac_ext <<_ACEOF
 
7332
/* end confdefs.h.  */
 
7333
 
 
7334
/* Override any gcc2 internal prototype to avoid an error.  */
 
7335
#ifdef __cplusplus
 
7336
extern "C"
 
7337
#endif
 
7338
/* We use char because int might match the return type of a gcc2
 
7339
   builtin and then its argument prototype would still apply.  */
 
7340
char ldap_sslinit ();
 
7341
int
 
7342
main ()
 
7343
{
 
7344
ldap_sslinit ();
 
7345
  ;
 
7346
  return 0;
 
7347
}
 
7348
_ACEOF
 
7349
rm -f conftest.$ac_objext conftest$ac_exeext
 
7350
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7351
  (eval $ac_link) 2>conftest.er1
 
7352
  ac_status=$?
 
7353
  grep -v '^ *+' conftest.er1 >conftest.err
 
7354
  rm -f conftest.er1
 
7355
  cat conftest.err >&5
 
7356
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7357
  (exit $ac_status); } &&
 
7358
         { ac_try='test -z "$ac_c_werror_flag"
 
7359
                         || test ! -s conftest.err'
 
7360
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7361
  (eval $ac_try) 2>&5
 
7362
  ac_status=$?
 
7363
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7364
  (exit $ac_status); }; } &&
 
7365
         { ac_try='test -s conftest$ac_exeext'
 
7366
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7367
  (eval $ac_try) 2>&5
 
7368
  ac_status=$?
 
7369
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7370
  (exit $ac_status); }; }; then
 
7371
  eval "$as_ac_Lib=yes"
 
7372
else
 
7373
  echo "$as_me: failed program was:" >&5
 
7374
sed 's/^/| /' conftest.$ac_ext >&5
 
7375
 
 
7376
eval "$as_ac_Lib=no"
 
7377
fi
 
7378
rm -f conftest.err conftest.$ac_objext \
 
7379
      conftest$ac_exeext conftest.$ac_ext
 
7380
LIBS=$ac_check_lib_save_LIBS
 
7381
fi
 
7382
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7383
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7384
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7385
  apu_has_ldap_sslinit="1"
 
7386
fi
 
7387
 
 
7388
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
7389
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
7390
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
7391
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7392
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7393
else
 
7394
  ac_check_lib_save_LIBS=$LIBS
 
7395
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7396
cat >conftest.$ac_ext <<_ACEOF
 
7397
/* confdefs.h.  */
 
7398
_ACEOF
 
7399
cat confdefs.h >>conftest.$ac_ext
 
7400
cat >>conftest.$ac_ext <<_ACEOF
 
7401
/* end confdefs.h.  */
 
7402
 
 
7403
/* Override any gcc2 internal prototype to avoid an error.  */
 
7404
#ifdef __cplusplus
 
7405
extern "C"
 
7406
#endif
 
7407
/* We use char because int might match the return type of a gcc2
 
7408
   builtin and then its argument prototype would still apply.  */
 
7409
char ldapssl_init ();
 
7410
int
 
7411
main ()
 
7412
{
 
7413
ldapssl_init ();
 
7414
  ;
 
7415
  return 0;
 
7416
}
 
7417
_ACEOF
 
7418
rm -f conftest.$ac_objext conftest$ac_exeext
 
7419
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7420
  (eval $ac_link) 2>conftest.er1
 
7421
  ac_status=$?
 
7422
  grep -v '^ *+' conftest.er1 >conftest.err
 
7423
  rm -f conftest.er1
 
7424
  cat conftest.err >&5
 
7425
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7426
  (exit $ac_status); } &&
 
7427
         { ac_try='test -z "$ac_c_werror_flag"
 
7428
                         || test ! -s conftest.err'
 
7429
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7430
  (eval $ac_try) 2>&5
 
7431
  ac_status=$?
 
7432
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7433
  (exit $ac_status); }; } &&
 
7434
         { ac_try='test -s conftest$ac_exeext'
 
7435
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7436
  (eval $ac_try) 2>&5
 
7437
  ac_status=$?
 
7438
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7439
  (exit $ac_status); }; }; then
 
7440
  eval "$as_ac_Lib=yes"
 
7441
else
 
7442
  echo "$as_me: failed program was:" >&5
 
7443
sed 's/^/| /' conftest.$ac_ext >&5
 
7444
 
 
7445
eval "$as_ac_Lib=no"
 
7446
fi
 
7447
rm -f conftest.err conftest.$ac_objext \
 
7448
      conftest$ac_exeext conftest.$ac_ext
 
7449
LIBS=$ac_check_lib_save_LIBS
 
7450
fi
 
7451
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7452
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7453
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7454
  apu_has_ldapssl_init="1"
 
7455
fi
 
7456
 
 
7457
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
7458
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
7459
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
7460
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7461
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7462
else
 
7463
  ac_check_lib_save_LIBS=$LIBS
 
7464
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7465
cat >conftest.$ac_ext <<_ACEOF
 
7466
/* confdefs.h.  */
 
7467
_ACEOF
 
7468
cat confdefs.h >>conftest.$ac_ext
 
7469
cat >>conftest.$ac_ext <<_ACEOF
 
7470
/* end confdefs.h.  */
 
7471
 
 
7472
/* Override any gcc2 internal prototype to avoid an error.  */
 
7473
#ifdef __cplusplus
 
7474
extern "C"
 
7475
#endif
 
7476
/* We use char because int might match the return type of a gcc2
 
7477
   builtin and then its argument prototype would still apply.  */
 
7478
char ldapssl_install_routines ();
 
7479
int
 
7480
main ()
 
7481
{
 
7482
ldapssl_install_routines ();
 
7483
  ;
 
7484
  return 0;
 
7485
}
 
7486
_ACEOF
 
7487
rm -f conftest.$ac_objext conftest$ac_exeext
 
7488
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7489
  (eval $ac_link) 2>conftest.er1
 
7490
  ac_status=$?
 
7491
  grep -v '^ *+' conftest.er1 >conftest.err
 
7492
  rm -f conftest.er1
 
7493
  cat conftest.err >&5
 
7494
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7495
  (exit $ac_status); } &&
 
7496
         { ac_try='test -z "$ac_c_werror_flag"
 
7497
                         || test ! -s conftest.err'
 
7498
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7499
  (eval $ac_try) 2>&5
 
7500
  ac_status=$?
 
7501
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7502
  (exit $ac_status); }; } &&
 
7503
         { ac_try='test -s conftest$ac_exeext'
 
7504
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7505
  (eval $ac_try) 2>&5
 
7506
  ac_status=$?
 
7507
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7508
  (exit $ac_status); }; }; then
 
7509
  eval "$as_ac_Lib=yes"
 
7510
else
 
7511
  echo "$as_me: failed program was:" >&5
 
7512
sed 's/^/| /' conftest.$ac_ext >&5
 
7513
 
 
7514
eval "$as_ac_Lib=no"
 
7515
fi
 
7516
rm -f conftest.err conftest.$ac_objext \
 
7517
      conftest$ac_exeext conftest.$ac_ext
 
7518
LIBS=$ac_check_lib_save_LIBS
 
7519
fi
 
7520
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7521
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7522
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7523
  apu_has_ldapssl_install_routines="1"
 
7524
fi
 
7525
 
 
7526
        apu_has_ldap="1";
 
7527
 
 
7528
fi
 
7529
 
 
7530
  fi
 
7531
 
 
7532
 
 
7533
  if test ${apu_has_ldap} != "1"; then
 
7534
    ldaplib="ldapsdk"
 
7535
    extralib="-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket"
 
7536
    unset ac_cv_lib_${ldaplib}_ldap_init
 
7537
    unset ac_cv_lib_${ldaplib}___ldap_init
 
7538
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
7539
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
7540
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
7541
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7542
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7543
else
 
7544
  ac_check_lib_save_LIBS=$LIBS
 
7545
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7546
cat >conftest.$ac_ext <<_ACEOF
 
7547
/* confdefs.h.  */
 
7548
_ACEOF
 
7549
cat confdefs.h >>conftest.$ac_ext
 
7550
cat >>conftest.$ac_ext <<_ACEOF
 
7551
/* end confdefs.h.  */
 
7552
 
 
7553
/* Override any gcc2 internal prototype to avoid an error.  */
 
7554
#ifdef __cplusplus
 
7555
extern "C"
 
7556
#endif
 
7557
/* We use char because int might match the return type of a gcc2
 
7558
   builtin and then its argument prototype would still apply.  */
 
7559
char ldap_init ();
 
7560
int
 
7561
main ()
 
7562
{
 
7563
ldap_init ();
 
7564
  ;
 
7565
  return 0;
 
7566
}
 
7567
_ACEOF
 
7568
rm -f conftest.$ac_objext conftest$ac_exeext
 
7569
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7570
  (eval $ac_link) 2>conftest.er1
 
7571
  ac_status=$?
 
7572
  grep -v '^ *+' conftest.er1 >conftest.err
 
7573
  rm -f conftest.er1
 
7574
  cat conftest.err >&5
 
7575
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7576
  (exit $ac_status); } &&
 
7577
         { ac_try='test -z "$ac_c_werror_flag"
 
7578
                         || test ! -s conftest.err'
 
7579
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7580
  (eval $ac_try) 2>&5
 
7581
  ac_status=$?
 
7582
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7583
  (exit $ac_status); }; } &&
 
7584
         { ac_try='test -s conftest$ac_exeext'
 
7585
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7586
  (eval $ac_try) 2>&5
 
7587
  ac_status=$?
 
7588
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7589
  (exit $ac_status); }; }; then
 
7590
  eval "$as_ac_Lib=yes"
 
7591
else
 
7592
  echo "$as_me: failed program was:" >&5
 
7593
sed 's/^/| /' conftest.$ac_ext >&5
 
7594
 
 
7595
eval "$as_ac_Lib=no"
 
7596
fi
 
7597
rm -f conftest.err conftest.$ac_objext \
 
7598
      conftest$ac_exeext conftest.$ac_ext
 
7599
LIBS=$ac_check_lib_save_LIBS
 
7600
fi
 
7601
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7602
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7603
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7604
 
 
7605
 
 
7606
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
7607
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
7608
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
7609
  else
 
7610
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
7611
    for i in $apr_addto_bugger; do
 
7612
      apr_addto_duplicate="0"
 
7613
      for j in $APRUTIL_EXPORT_LIBS; do
 
7614
        if test "x$i" = "x$j"; then
 
7615
          apr_addto_duplicate="1"
 
7616
          break
 
7617
        fi
 
7618
      done
 
7619
      if test $apr_addto_duplicate = "0"; then
 
7620
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
7621
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
7622
      fi
 
7623
    done
 
7624
  fi
 
7625
 
 
7626
 
 
7627
  if test "x$APRUTIL_LIBS" = "x"; then
 
7628
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
7629
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
7630
  else
 
7631
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
7632
    for i in $apr_addto_bugger; do
 
7633
      apr_addto_duplicate="0"
 
7634
      for j in $APRUTIL_LIBS; do
 
7635
        if test "x$i" = "x$j"; then
 
7636
          apr_addto_duplicate="1"
 
7637
          break
 
7638
        fi
 
7639
      done
 
7640
      if test $apr_addto_duplicate = "0"; then
 
7641
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
7642
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
7643
      fi
 
7644
    done
 
7645
  fi
 
7646
 
 
7647
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
7648
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
7649
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
7650
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7651
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7652
else
 
7653
  ac_check_lib_save_LIBS=$LIBS
 
7654
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7655
cat >conftest.$ac_ext <<_ACEOF
 
7656
/* confdefs.h.  */
 
7657
_ACEOF
 
7658
cat confdefs.h >>conftest.$ac_ext
 
7659
cat >>conftest.$ac_ext <<_ACEOF
 
7660
/* end confdefs.h.  */
 
7661
 
 
7662
/* Override any gcc2 internal prototype to avoid an error.  */
 
7663
#ifdef __cplusplus
 
7664
extern "C"
 
7665
#endif
 
7666
/* We use char because int might match the return type of a gcc2
 
7667
   builtin and then its argument prototype would still apply.  */
 
7668
char ldapssl_client_init ();
 
7669
int
 
7670
main ()
 
7671
{
 
7672
ldapssl_client_init ();
 
7673
  ;
 
7674
  return 0;
 
7675
}
 
7676
_ACEOF
 
7677
rm -f conftest.$ac_objext conftest$ac_exeext
 
7678
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7679
  (eval $ac_link) 2>conftest.er1
 
7680
  ac_status=$?
 
7681
  grep -v '^ *+' conftest.er1 >conftest.err
 
7682
  rm -f conftest.er1
 
7683
  cat conftest.err >&5
 
7684
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7685
  (exit $ac_status); } &&
 
7686
         { ac_try='test -z "$ac_c_werror_flag"
 
7687
                         || test ! -s conftest.err'
 
7688
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7689
  (eval $ac_try) 2>&5
 
7690
  ac_status=$?
 
7691
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7692
  (exit $ac_status); }; } &&
 
7693
         { ac_try='test -s conftest$ac_exeext'
 
7694
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7695
  (eval $ac_try) 2>&5
 
7696
  ac_status=$?
 
7697
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7698
  (exit $ac_status); }; }; then
 
7699
  eval "$as_ac_Lib=yes"
 
7700
else
 
7701
  echo "$as_me: failed program was:" >&5
 
7702
sed 's/^/| /' conftest.$ac_ext >&5
 
7703
 
 
7704
eval "$as_ac_Lib=no"
 
7705
fi
 
7706
rm -f conftest.err conftest.$ac_objext \
 
7707
      conftest$ac_exeext conftest.$ac_ext
 
7708
LIBS=$ac_check_lib_save_LIBS
 
7709
fi
 
7710
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7711
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7712
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7713
  apu_has_ldapssl_client_init="1"
 
7714
fi
 
7715
 
 
7716
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
7717
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
7718
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
7719
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7720
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7721
else
 
7722
  ac_check_lib_save_LIBS=$LIBS
 
7723
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7724
cat >conftest.$ac_ext <<_ACEOF
 
7725
/* confdefs.h.  */
 
7726
_ACEOF
 
7727
cat confdefs.h >>conftest.$ac_ext
 
7728
cat >>conftest.$ac_ext <<_ACEOF
 
7729
/* end confdefs.h.  */
 
7730
 
 
7731
/* Override any gcc2 internal prototype to avoid an error.  */
 
7732
#ifdef __cplusplus
 
7733
extern "C"
 
7734
#endif
 
7735
/* We use char because int might match the return type of a gcc2
 
7736
   builtin and then its argument prototype would still apply.  */
 
7737
char ldapssl_client_deinit ();
 
7738
int
 
7739
main ()
 
7740
{
 
7741
ldapssl_client_deinit ();
 
7742
  ;
 
7743
  return 0;
 
7744
}
 
7745
_ACEOF
 
7746
rm -f conftest.$ac_objext conftest$ac_exeext
 
7747
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7748
  (eval $ac_link) 2>conftest.er1
 
7749
  ac_status=$?
 
7750
  grep -v '^ *+' conftest.er1 >conftest.err
 
7751
  rm -f conftest.er1
 
7752
  cat conftest.err >&5
 
7753
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7754
  (exit $ac_status); } &&
 
7755
         { ac_try='test -z "$ac_c_werror_flag"
 
7756
                         || test ! -s conftest.err'
 
7757
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7758
  (eval $ac_try) 2>&5
 
7759
  ac_status=$?
 
7760
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7761
  (exit $ac_status); }; } &&
 
7762
         { ac_try='test -s conftest$ac_exeext'
 
7763
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7764
  (eval $ac_try) 2>&5
 
7765
  ac_status=$?
 
7766
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7767
  (exit $ac_status); }; }; then
 
7768
  eval "$as_ac_Lib=yes"
 
7769
else
 
7770
  echo "$as_me: failed program was:" >&5
 
7771
sed 's/^/| /' conftest.$ac_ext >&5
 
7772
 
 
7773
eval "$as_ac_Lib=no"
 
7774
fi
 
7775
rm -f conftest.err conftest.$ac_objext \
 
7776
      conftest$ac_exeext conftest.$ac_ext
 
7777
LIBS=$ac_check_lib_save_LIBS
 
7778
fi
 
7779
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7780
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7781
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7782
  apu_has_ldapssl_client_deinit="1"
 
7783
fi
 
7784
 
 
7785
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
7786
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
7787
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
7788
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7789
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7790
else
 
7791
  ac_check_lib_save_LIBS=$LIBS
 
7792
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7793
cat >conftest.$ac_ext <<_ACEOF
 
7794
/* confdefs.h.  */
 
7795
_ACEOF
 
7796
cat confdefs.h >>conftest.$ac_ext
 
7797
cat >>conftest.$ac_ext <<_ACEOF
 
7798
/* end confdefs.h.  */
 
7799
 
 
7800
/* Override any gcc2 internal prototype to avoid an error.  */
 
7801
#ifdef __cplusplus
 
7802
extern "C"
 
7803
#endif
 
7804
/* We use char because int might match the return type of a gcc2
 
7805
   builtin and then its argument prototype would still apply.  */
 
7806
char ldapssl_add_trusted_cert ();
 
7807
int
 
7808
main ()
 
7809
{
 
7810
ldapssl_add_trusted_cert ();
 
7811
  ;
 
7812
  return 0;
 
7813
}
 
7814
_ACEOF
 
7815
rm -f conftest.$ac_objext conftest$ac_exeext
 
7816
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7817
  (eval $ac_link) 2>conftest.er1
 
7818
  ac_status=$?
 
7819
  grep -v '^ *+' conftest.er1 >conftest.err
 
7820
  rm -f conftest.er1
 
7821
  cat conftest.err >&5
 
7822
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7823
  (exit $ac_status); } &&
 
7824
         { ac_try='test -z "$ac_c_werror_flag"
 
7825
                         || test ! -s conftest.err'
 
7826
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7827
  (eval $ac_try) 2>&5
 
7828
  ac_status=$?
 
7829
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7830
  (exit $ac_status); }; } &&
 
7831
         { ac_try='test -s conftest$ac_exeext'
 
7832
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7833
  (eval $ac_try) 2>&5
 
7834
  ac_status=$?
 
7835
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7836
  (exit $ac_status); }; }; then
 
7837
  eval "$as_ac_Lib=yes"
 
7838
else
 
7839
  echo "$as_me: failed program was:" >&5
 
7840
sed 's/^/| /' conftest.$ac_ext >&5
 
7841
 
 
7842
eval "$as_ac_Lib=no"
 
7843
fi
 
7844
rm -f conftest.err conftest.$ac_objext \
 
7845
      conftest$ac_exeext conftest.$ac_ext
 
7846
LIBS=$ac_check_lib_save_LIBS
 
7847
fi
 
7848
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7849
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7850
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7851
  apu_has_ldapssl_add_trusted_cert="1"
 
7852
fi
 
7853
 
 
7854
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
7855
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
7856
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
7857
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7858
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7859
else
 
7860
  ac_check_lib_save_LIBS=$LIBS
 
7861
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7862
cat >conftest.$ac_ext <<_ACEOF
 
7863
/* confdefs.h.  */
 
7864
_ACEOF
 
7865
cat confdefs.h >>conftest.$ac_ext
 
7866
cat >>conftest.$ac_ext <<_ACEOF
 
7867
/* end confdefs.h.  */
 
7868
 
 
7869
/* Override any gcc2 internal prototype to avoid an error.  */
 
7870
#ifdef __cplusplus
 
7871
extern "C"
 
7872
#endif
 
7873
/* We use char because int might match the return type of a gcc2
 
7874
   builtin and then its argument prototype would still apply.  */
 
7875
char ldap_start_tls_s ();
 
7876
int
 
7877
main ()
 
7878
{
 
7879
ldap_start_tls_s ();
 
7880
  ;
 
7881
  return 0;
 
7882
}
 
7883
_ACEOF
 
7884
rm -f conftest.$ac_objext conftest$ac_exeext
 
7885
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7886
  (eval $ac_link) 2>conftest.er1
 
7887
  ac_status=$?
 
7888
  grep -v '^ *+' conftest.er1 >conftest.err
 
7889
  rm -f conftest.er1
 
7890
  cat conftest.err >&5
 
7891
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7892
  (exit $ac_status); } &&
 
7893
         { ac_try='test -z "$ac_c_werror_flag"
 
7894
                         || test ! -s conftest.err'
 
7895
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7896
  (eval $ac_try) 2>&5
 
7897
  ac_status=$?
 
7898
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7899
  (exit $ac_status); }; } &&
 
7900
         { ac_try='test -s conftest$ac_exeext'
 
7901
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7902
  (eval $ac_try) 2>&5
 
7903
  ac_status=$?
 
7904
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7905
  (exit $ac_status); }; }; then
 
7906
  eval "$as_ac_Lib=yes"
 
7907
else
 
7908
  echo "$as_me: failed program was:" >&5
 
7909
sed 's/^/| /' conftest.$ac_ext >&5
 
7910
 
 
7911
eval "$as_ac_Lib=no"
 
7912
fi
 
7913
rm -f conftest.err conftest.$ac_objext \
 
7914
      conftest$ac_exeext conftest.$ac_ext
 
7915
LIBS=$ac_check_lib_save_LIBS
 
7916
fi
 
7917
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7918
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7919
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7920
  apu_has_ldap_start_tls_s="1"
 
7921
fi
 
7922
 
 
7923
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
7924
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
7925
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
7926
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7927
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7928
else
 
7929
  ac_check_lib_save_LIBS=$LIBS
 
7930
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
7931
cat >conftest.$ac_ext <<_ACEOF
 
7932
/* confdefs.h.  */
 
7933
_ACEOF
 
7934
cat confdefs.h >>conftest.$ac_ext
 
7935
cat >>conftest.$ac_ext <<_ACEOF
 
7936
/* end confdefs.h.  */
 
7937
 
 
7938
/* Override any gcc2 internal prototype to avoid an error.  */
 
7939
#ifdef __cplusplus
 
7940
extern "C"
 
7941
#endif
 
7942
/* We use char because int might match the return type of a gcc2
 
7943
   builtin and then its argument prototype would still apply.  */
 
7944
char ldap_sslinit ();
 
7945
int
 
7946
main ()
 
7947
{
 
7948
ldap_sslinit ();
 
7949
  ;
 
7950
  return 0;
 
7951
}
 
7952
_ACEOF
 
7953
rm -f conftest.$ac_objext conftest$ac_exeext
 
7954
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7955
  (eval $ac_link) 2>conftest.er1
 
7956
  ac_status=$?
 
7957
  grep -v '^ *+' conftest.er1 >conftest.err
 
7958
  rm -f conftest.er1
 
7959
  cat conftest.err >&5
 
7960
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7961
  (exit $ac_status); } &&
 
7962
         { ac_try='test -z "$ac_c_werror_flag"
 
7963
                         || test ! -s conftest.err'
 
7964
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7965
  (eval $ac_try) 2>&5
 
7966
  ac_status=$?
 
7967
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7968
  (exit $ac_status); }; } &&
 
7969
         { ac_try='test -s conftest$ac_exeext'
 
7970
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7971
  (eval $ac_try) 2>&5
 
7972
  ac_status=$?
 
7973
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7974
  (exit $ac_status); }; }; then
 
7975
  eval "$as_ac_Lib=yes"
 
7976
else
 
7977
  echo "$as_me: failed program was:" >&5
 
7978
sed 's/^/| /' conftest.$ac_ext >&5
 
7979
 
 
7980
eval "$as_ac_Lib=no"
 
7981
fi
 
7982
rm -f conftest.err conftest.$ac_objext \
 
7983
      conftest$ac_exeext conftest.$ac_ext
 
7984
LIBS=$ac_check_lib_save_LIBS
 
7985
fi
 
7986
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
7987
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
7988
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
7989
  apu_has_ldap_sslinit="1"
 
7990
fi
 
7991
 
 
7992
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
7993
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
7994
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
7995
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
7996
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7997
else
 
7998
  ac_check_lib_save_LIBS=$LIBS
 
7999
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8000
cat >conftest.$ac_ext <<_ACEOF
 
8001
/* confdefs.h.  */
 
8002
_ACEOF
 
8003
cat confdefs.h >>conftest.$ac_ext
 
8004
cat >>conftest.$ac_ext <<_ACEOF
 
8005
/* end confdefs.h.  */
 
8006
 
 
8007
/* Override any gcc2 internal prototype to avoid an error.  */
 
8008
#ifdef __cplusplus
 
8009
extern "C"
 
8010
#endif
 
8011
/* We use char because int might match the return type of a gcc2
 
8012
   builtin and then its argument prototype would still apply.  */
 
8013
char ldapssl_init ();
 
8014
int
 
8015
main ()
 
8016
{
 
8017
ldapssl_init ();
 
8018
  ;
 
8019
  return 0;
 
8020
}
 
8021
_ACEOF
 
8022
rm -f conftest.$ac_objext conftest$ac_exeext
 
8023
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8024
  (eval $ac_link) 2>conftest.er1
 
8025
  ac_status=$?
 
8026
  grep -v '^ *+' conftest.er1 >conftest.err
 
8027
  rm -f conftest.er1
 
8028
  cat conftest.err >&5
 
8029
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8030
  (exit $ac_status); } &&
 
8031
         { ac_try='test -z "$ac_c_werror_flag"
 
8032
                         || test ! -s conftest.err'
 
8033
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8034
  (eval $ac_try) 2>&5
 
8035
  ac_status=$?
 
8036
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8037
  (exit $ac_status); }; } &&
 
8038
         { ac_try='test -s conftest$ac_exeext'
 
8039
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8040
  (eval $ac_try) 2>&5
 
8041
  ac_status=$?
 
8042
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8043
  (exit $ac_status); }; }; then
 
8044
  eval "$as_ac_Lib=yes"
 
8045
else
 
8046
  echo "$as_me: failed program was:" >&5
 
8047
sed 's/^/| /' conftest.$ac_ext >&5
 
8048
 
 
8049
eval "$as_ac_Lib=no"
 
8050
fi
 
8051
rm -f conftest.err conftest.$ac_objext \
 
8052
      conftest$ac_exeext conftest.$ac_ext
 
8053
LIBS=$ac_check_lib_save_LIBS
 
8054
fi
 
8055
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8056
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8057
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8058
  apu_has_ldapssl_init="1"
 
8059
fi
 
8060
 
 
8061
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
8062
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
8063
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
8064
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8065
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8066
else
 
8067
  ac_check_lib_save_LIBS=$LIBS
 
8068
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8069
cat >conftest.$ac_ext <<_ACEOF
 
8070
/* confdefs.h.  */
 
8071
_ACEOF
 
8072
cat confdefs.h >>conftest.$ac_ext
 
8073
cat >>conftest.$ac_ext <<_ACEOF
 
8074
/* end confdefs.h.  */
 
8075
 
 
8076
/* Override any gcc2 internal prototype to avoid an error.  */
 
8077
#ifdef __cplusplus
 
8078
extern "C"
 
8079
#endif
 
8080
/* We use char because int might match the return type of a gcc2
 
8081
   builtin and then its argument prototype would still apply.  */
 
8082
char ldapssl_install_routines ();
 
8083
int
 
8084
main ()
 
8085
{
 
8086
ldapssl_install_routines ();
 
8087
  ;
 
8088
  return 0;
 
8089
}
 
8090
_ACEOF
 
8091
rm -f conftest.$ac_objext conftest$ac_exeext
 
8092
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8093
  (eval $ac_link) 2>conftest.er1
 
8094
  ac_status=$?
 
8095
  grep -v '^ *+' conftest.er1 >conftest.err
 
8096
  rm -f conftest.er1
 
8097
  cat conftest.err >&5
 
8098
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8099
  (exit $ac_status); } &&
 
8100
         { ac_try='test -z "$ac_c_werror_flag"
 
8101
                         || test ! -s conftest.err'
 
8102
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8103
  (eval $ac_try) 2>&5
 
8104
  ac_status=$?
 
8105
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8106
  (exit $ac_status); }; } &&
 
8107
         { ac_try='test -s conftest$ac_exeext'
 
8108
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8109
  (eval $ac_try) 2>&5
 
8110
  ac_status=$?
 
8111
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8112
  (exit $ac_status); }; }; then
 
8113
  eval "$as_ac_Lib=yes"
 
8114
else
 
8115
  echo "$as_me: failed program was:" >&5
 
8116
sed 's/^/| /' conftest.$ac_ext >&5
 
8117
 
 
8118
eval "$as_ac_Lib=no"
 
8119
fi
 
8120
rm -f conftest.err conftest.$ac_objext \
 
8121
      conftest$ac_exeext conftest.$ac_ext
 
8122
LIBS=$ac_check_lib_save_LIBS
 
8123
fi
 
8124
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8125
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8126
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8127
  apu_has_ldapssl_install_routines="1"
 
8128
fi
 
8129
 
 
8130
        apu_has_ldap="1";
 
8131
 
 
8132
fi
 
8133
 
 
8134
  fi
 
8135
 
 
8136
 
 
8137
  if test ${apu_has_ldap} != "1"; then
 
8138
    ldaplib="ldap"
 
8139
    extralib="-llber"
 
8140
    unset ac_cv_lib_${ldaplib}_ldap_init
 
8141
    unset ac_cv_lib_${ldaplib}___ldap_init
 
8142
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
8143
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
8144
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
8145
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8146
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8147
else
 
8148
  ac_check_lib_save_LIBS=$LIBS
 
8149
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8150
cat >conftest.$ac_ext <<_ACEOF
 
8151
/* confdefs.h.  */
 
8152
_ACEOF
 
8153
cat confdefs.h >>conftest.$ac_ext
 
8154
cat >>conftest.$ac_ext <<_ACEOF
 
8155
/* end confdefs.h.  */
 
8156
 
 
8157
/* Override any gcc2 internal prototype to avoid an error.  */
 
8158
#ifdef __cplusplus
 
8159
extern "C"
 
8160
#endif
 
8161
/* We use char because int might match the return type of a gcc2
 
8162
   builtin and then its argument prototype would still apply.  */
 
8163
char ldap_init ();
 
8164
int
 
8165
main ()
 
8166
{
 
8167
ldap_init ();
 
8168
  ;
 
8169
  return 0;
 
8170
}
 
8171
_ACEOF
 
8172
rm -f conftest.$ac_objext conftest$ac_exeext
 
8173
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8174
  (eval $ac_link) 2>conftest.er1
 
8175
  ac_status=$?
 
8176
  grep -v '^ *+' conftest.er1 >conftest.err
 
8177
  rm -f conftest.er1
 
8178
  cat conftest.err >&5
 
8179
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8180
  (exit $ac_status); } &&
 
8181
         { ac_try='test -z "$ac_c_werror_flag"
 
8182
                         || test ! -s conftest.err'
 
8183
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8184
  (eval $ac_try) 2>&5
 
8185
  ac_status=$?
 
8186
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8187
  (exit $ac_status); }; } &&
 
8188
         { ac_try='test -s conftest$ac_exeext'
 
8189
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8190
  (eval $ac_try) 2>&5
 
8191
  ac_status=$?
 
8192
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8193
  (exit $ac_status); }; }; then
 
8194
  eval "$as_ac_Lib=yes"
 
8195
else
 
8196
  echo "$as_me: failed program was:" >&5
 
8197
sed 's/^/| /' conftest.$ac_ext >&5
 
8198
 
 
8199
eval "$as_ac_Lib=no"
 
8200
fi
 
8201
rm -f conftest.err conftest.$ac_objext \
 
8202
      conftest$ac_exeext conftest.$ac_ext
 
8203
LIBS=$ac_check_lib_save_LIBS
 
8204
fi
 
8205
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8206
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8207
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8208
 
 
8209
 
 
8210
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
8211
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
8212
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
8213
  else
 
8214
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
8215
    for i in $apr_addto_bugger; do
 
8216
      apr_addto_duplicate="0"
 
8217
      for j in $APRUTIL_EXPORT_LIBS; do
 
8218
        if test "x$i" = "x$j"; then
 
8219
          apr_addto_duplicate="1"
 
8220
          break
 
8221
        fi
 
8222
      done
 
8223
      if test $apr_addto_duplicate = "0"; then
 
8224
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
8225
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
8226
      fi
 
8227
    done
 
8228
  fi
 
8229
 
 
8230
 
 
8231
  if test "x$APRUTIL_LIBS" = "x"; then
 
8232
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
8233
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
8234
  else
 
8235
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
8236
    for i in $apr_addto_bugger; do
 
8237
      apr_addto_duplicate="0"
 
8238
      for j in $APRUTIL_LIBS; do
 
8239
        if test "x$i" = "x$j"; then
 
8240
          apr_addto_duplicate="1"
 
8241
          break
 
8242
        fi
 
8243
      done
 
8244
      if test $apr_addto_duplicate = "0"; then
 
8245
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
8246
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
8247
      fi
 
8248
    done
 
8249
  fi
 
8250
 
 
8251
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
8252
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
8253
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
8254
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8255
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8256
else
 
8257
  ac_check_lib_save_LIBS=$LIBS
 
8258
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8259
cat >conftest.$ac_ext <<_ACEOF
 
8260
/* confdefs.h.  */
 
8261
_ACEOF
 
8262
cat confdefs.h >>conftest.$ac_ext
 
8263
cat >>conftest.$ac_ext <<_ACEOF
 
8264
/* end confdefs.h.  */
 
8265
 
 
8266
/* Override any gcc2 internal prototype to avoid an error.  */
 
8267
#ifdef __cplusplus
 
8268
extern "C"
 
8269
#endif
 
8270
/* We use char because int might match the return type of a gcc2
 
8271
   builtin and then its argument prototype would still apply.  */
 
8272
char ldapssl_client_init ();
 
8273
int
 
8274
main ()
 
8275
{
 
8276
ldapssl_client_init ();
 
8277
  ;
 
8278
  return 0;
 
8279
}
 
8280
_ACEOF
 
8281
rm -f conftest.$ac_objext conftest$ac_exeext
 
8282
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8283
  (eval $ac_link) 2>conftest.er1
 
8284
  ac_status=$?
 
8285
  grep -v '^ *+' conftest.er1 >conftest.err
 
8286
  rm -f conftest.er1
 
8287
  cat conftest.err >&5
 
8288
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8289
  (exit $ac_status); } &&
 
8290
         { ac_try='test -z "$ac_c_werror_flag"
 
8291
                         || test ! -s conftest.err'
 
8292
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8293
  (eval $ac_try) 2>&5
 
8294
  ac_status=$?
 
8295
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8296
  (exit $ac_status); }; } &&
 
8297
         { ac_try='test -s conftest$ac_exeext'
 
8298
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8299
  (eval $ac_try) 2>&5
 
8300
  ac_status=$?
 
8301
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8302
  (exit $ac_status); }; }; then
 
8303
  eval "$as_ac_Lib=yes"
 
8304
else
 
8305
  echo "$as_me: failed program was:" >&5
 
8306
sed 's/^/| /' conftest.$ac_ext >&5
 
8307
 
 
8308
eval "$as_ac_Lib=no"
 
8309
fi
 
8310
rm -f conftest.err conftest.$ac_objext \
 
8311
      conftest$ac_exeext conftest.$ac_ext
 
8312
LIBS=$ac_check_lib_save_LIBS
 
8313
fi
 
8314
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8315
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8316
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8317
  apu_has_ldapssl_client_init="1"
 
8318
fi
 
8319
 
 
8320
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
8321
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
8322
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
8323
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8324
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8325
else
 
8326
  ac_check_lib_save_LIBS=$LIBS
 
8327
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8328
cat >conftest.$ac_ext <<_ACEOF
 
8329
/* confdefs.h.  */
 
8330
_ACEOF
 
8331
cat confdefs.h >>conftest.$ac_ext
 
8332
cat >>conftest.$ac_ext <<_ACEOF
 
8333
/* end confdefs.h.  */
 
8334
 
 
8335
/* Override any gcc2 internal prototype to avoid an error.  */
 
8336
#ifdef __cplusplus
 
8337
extern "C"
 
8338
#endif
 
8339
/* We use char because int might match the return type of a gcc2
 
8340
   builtin and then its argument prototype would still apply.  */
 
8341
char ldapssl_client_deinit ();
 
8342
int
 
8343
main ()
 
8344
{
 
8345
ldapssl_client_deinit ();
 
8346
  ;
 
8347
  return 0;
 
8348
}
 
8349
_ACEOF
 
8350
rm -f conftest.$ac_objext conftest$ac_exeext
 
8351
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8352
  (eval $ac_link) 2>conftest.er1
 
8353
  ac_status=$?
 
8354
  grep -v '^ *+' conftest.er1 >conftest.err
 
8355
  rm -f conftest.er1
 
8356
  cat conftest.err >&5
 
8357
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8358
  (exit $ac_status); } &&
 
8359
         { ac_try='test -z "$ac_c_werror_flag"
 
8360
                         || test ! -s conftest.err'
 
8361
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8362
  (eval $ac_try) 2>&5
 
8363
  ac_status=$?
 
8364
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8365
  (exit $ac_status); }; } &&
 
8366
         { ac_try='test -s conftest$ac_exeext'
 
8367
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8368
  (eval $ac_try) 2>&5
 
8369
  ac_status=$?
 
8370
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8371
  (exit $ac_status); }; }; then
 
8372
  eval "$as_ac_Lib=yes"
 
8373
else
 
8374
  echo "$as_me: failed program was:" >&5
 
8375
sed 's/^/| /' conftest.$ac_ext >&5
 
8376
 
 
8377
eval "$as_ac_Lib=no"
 
8378
fi
 
8379
rm -f conftest.err conftest.$ac_objext \
 
8380
      conftest$ac_exeext conftest.$ac_ext
 
8381
LIBS=$ac_check_lib_save_LIBS
 
8382
fi
 
8383
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8384
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8385
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8386
  apu_has_ldapssl_client_deinit="1"
 
8387
fi
 
8388
 
 
8389
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
8390
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
8391
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
8392
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8393
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8394
else
 
8395
  ac_check_lib_save_LIBS=$LIBS
 
8396
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8397
cat >conftest.$ac_ext <<_ACEOF
 
8398
/* confdefs.h.  */
 
8399
_ACEOF
 
8400
cat confdefs.h >>conftest.$ac_ext
 
8401
cat >>conftest.$ac_ext <<_ACEOF
 
8402
/* end confdefs.h.  */
 
8403
 
 
8404
/* Override any gcc2 internal prototype to avoid an error.  */
 
8405
#ifdef __cplusplus
 
8406
extern "C"
 
8407
#endif
 
8408
/* We use char because int might match the return type of a gcc2
 
8409
   builtin and then its argument prototype would still apply.  */
 
8410
char ldapssl_add_trusted_cert ();
 
8411
int
 
8412
main ()
 
8413
{
 
8414
ldapssl_add_trusted_cert ();
 
8415
  ;
 
8416
  return 0;
 
8417
}
 
8418
_ACEOF
 
8419
rm -f conftest.$ac_objext conftest$ac_exeext
 
8420
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8421
  (eval $ac_link) 2>conftest.er1
 
8422
  ac_status=$?
 
8423
  grep -v '^ *+' conftest.er1 >conftest.err
 
8424
  rm -f conftest.er1
 
8425
  cat conftest.err >&5
 
8426
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8427
  (exit $ac_status); } &&
 
8428
         { ac_try='test -z "$ac_c_werror_flag"
 
8429
                         || test ! -s conftest.err'
 
8430
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8431
  (eval $ac_try) 2>&5
 
8432
  ac_status=$?
 
8433
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8434
  (exit $ac_status); }; } &&
 
8435
         { ac_try='test -s conftest$ac_exeext'
 
8436
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8437
  (eval $ac_try) 2>&5
 
8438
  ac_status=$?
 
8439
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8440
  (exit $ac_status); }; }; then
 
8441
  eval "$as_ac_Lib=yes"
 
8442
else
 
8443
  echo "$as_me: failed program was:" >&5
 
8444
sed 's/^/| /' conftest.$ac_ext >&5
 
8445
 
 
8446
eval "$as_ac_Lib=no"
 
8447
fi
 
8448
rm -f conftest.err conftest.$ac_objext \
 
8449
      conftest$ac_exeext conftest.$ac_ext
 
8450
LIBS=$ac_check_lib_save_LIBS
 
8451
fi
 
8452
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8453
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8454
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8455
  apu_has_ldapssl_add_trusted_cert="1"
 
8456
fi
 
8457
 
 
8458
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
8459
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
8460
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
8461
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8462
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8463
else
 
8464
  ac_check_lib_save_LIBS=$LIBS
 
8465
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8466
cat >conftest.$ac_ext <<_ACEOF
 
8467
/* confdefs.h.  */
 
8468
_ACEOF
 
8469
cat confdefs.h >>conftest.$ac_ext
 
8470
cat >>conftest.$ac_ext <<_ACEOF
 
8471
/* end confdefs.h.  */
 
8472
 
 
8473
/* Override any gcc2 internal prototype to avoid an error.  */
 
8474
#ifdef __cplusplus
 
8475
extern "C"
 
8476
#endif
 
8477
/* We use char because int might match the return type of a gcc2
 
8478
   builtin and then its argument prototype would still apply.  */
 
8479
char ldap_start_tls_s ();
 
8480
int
 
8481
main ()
 
8482
{
 
8483
ldap_start_tls_s ();
 
8484
  ;
 
8485
  return 0;
 
8486
}
 
8487
_ACEOF
 
8488
rm -f conftest.$ac_objext conftest$ac_exeext
 
8489
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8490
  (eval $ac_link) 2>conftest.er1
 
8491
  ac_status=$?
 
8492
  grep -v '^ *+' conftest.er1 >conftest.err
 
8493
  rm -f conftest.er1
 
8494
  cat conftest.err >&5
 
8495
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8496
  (exit $ac_status); } &&
 
8497
         { ac_try='test -z "$ac_c_werror_flag"
 
8498
                         || test ! -s conftest.err'
 
8499
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8500
  (eval $ac_try) 2>&5
 
8501
  ac_status=$?
 
8502
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8503
  (exit $ac_status); }; } &&
 
8504
         { ac_try='test -s conftest$ac_exeext'
 
8505
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8506
  (eval $ac_try) 2>&5
 
8507
  ac_status=$?
 
8508
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8509
  (exit $ac_status); }; }; then
 
8510
  eval "$as_ac_Lib=yes"
 
8511
else
 
8512
  echo "$as_me: failed program was:" >&5
 
8513
sed 's/^/| /' conftest.$ac_ext >&5
 
8514
 
 
8515
eval "$as_ac_Lib=no"
 
8516
fi
 
8517
rm -f conftest.err conftest.$ac_objext \
 
8518
      conftest$ac_exeext conftest.$ac_ext
 
8519
LIBS=$ac_check_lib_save_LIBS
 
8520
fi
 
8521
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8522
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8523
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8524
  apu_has_ldap_start_tls_s="1"
 
8525
fi
 
8526
 
 
8527
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
8528
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
8529
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
8530
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8531
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8532
else
 
8533
  ac_check_lib_save_LIBS=$LIBS
 
8534
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8535
cat >conftest.$ac_ext <<_ACEOF
 
8536
/* confdefs.h.  */
 
8537
_ACEOF
 
8538
cat confdefs.h >>conftest.$ac_ext
 
8539
cat >>conftest.$ac_ext <<_ACEOF
 
8540
/* end confdefs.h.  */
 
8541
 
 
8542
/* Override any gcc2 internal prototype to avoid an error.  */
 
8543
#ifdef __cplusplus
 
8544
extern "C"
 
8545
#endif
 
8546
/* We use char because int might match the return type of a gcc2
 
8547
   builtin and then its argument prototype would still apply.  */
 
8548
char ldap_sslinit ();
 
8549
int
 
8550
main ()
 
8551
{
 
8552
ldap_sslinit ();
 
8553
  ;
 
8554
  return 0;
 
8555
}
 
8556
_ACEOF
 
8557
rm -f conftest.$ac_objext conftest$ac_exeext
 
8558
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8559
  (eval $ac_link) 2>conftest.er1
 
8560
  ac_status=$?
 
8561
  grep -v '^ *+' conftest.er1 >conftest.err
 
8562
  rm -f conftest.er1
 
8563
  cat conftest.err >&5
 
8564
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8565
  (exit $ac_status); } &&
 
8566
         { ac_try='test -z "$ac_c_werror_flag"
 
8567
                         || test ! -s conftest.err'
 
8568
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8569
  (eval $ac_try) 2>&5
 
8570
  ac_status=$?
 
8571
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8572
  (exit $ac_status); }; } &&
 
8573
         { ac_try='test -s conftest$ac_exeext'
 
8574
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8575
  (eval $ac_try) 2>&5
 
8576
  ac_status=$?
 
8577
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8578
  (exit $ac_status); }; }; then
 
8579
  eval "$as_ac_Lib=yes"
 
8580
else
 
8581
  echo "$as_me: failed program was:" >&5
 
8582
sed 's/^/| /' conftest.$ac_ext >&5
 
8583
 
 
8584
eval "$as_ac_Lib=no"
 
8585
fi
 
8586
rm -f conftest.err conftest.$ac_objext \
 
8587
      conftest$ac_exeext conftest.$ac_ext
 
8588
LIBS=$ac_check_lib_save_LIBS
 
8589
fi
 
8590
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8591
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8592
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8593
  apu_has_ldap_sslinit="1"
 
8594
fi
 
8595
 
 
8596
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
8597
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
8598
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
8599
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8600
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8601
else
 
8602
  ac_check_lib_save_LIBS=$LIBS
 
8603
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8604
cat >conftest.$ac_ext <<_ACEOF
 
8605
/* confdefs.h.  */
 
8606
_ACEOF
 
8607
cat confdefs.h >>conftest.$ac_ext
 
8608
cat >>conftest.$ac_ext <<_ACEOF
 
8609
/* end confdefs.h.  */
 
8610
 
 
8611
/* Override any gcc2 internal prototype to avoid an error.  */
 
8612
#ifdef __cplusplus
 
8613
extern "C"
 
8614
#endif
 
8615
/* We use char because int might match the return type of a gcc2
 
8616
   builtin and then its argument prototype would still apply.  */
 
8617
char ldapssl_init ();
 
8618
int
 
8619
main ()
 
8620
{
 
8621
ldapssl_init ();
 
8622
  ;
 
8623
  return 0;
 
8624
}
 
8625
_ACEOF
 
8626
rm -f conftest.$ac_objext conftest$ac_exeext
 
8627
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8628
  (eval $ac_link) 2>conftest.er1
 
8629
  ac_status=$?
 
8630
  grep -v '^ *+' conftest.er1 >conftest.err
 
8631
  rm -f conftest.er1
 
8632
  cat conftest.err >&5
 
8633
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8634
  (exit $ac_status); } &&
 
8635
         { ac_try='test -z "$ac_c_werror_flag"
 
8636
                         || test ! -s conftest.err'
 
8637
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8638
  (eval $ac_try) 2>&5
 
8639
  ac_status=$?
 
8640
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8641
  (exit $ac_status); }; } &&
 
8642
         { ac_try='test -s conftest$ac_exeext'
 
8643
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8644
  (eval $ac_try) 2>&5
 
8645
  ac_status=$?
 
8646
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8647
  (exit $ac_status); }; }; then
 
8648
  eval "$as_ac_Lib=yes"
 
8649
else
 
8650
  echo "$as_me: failed program was:" >&5
 
8651
sed 's/^/| /' conftest.$ac_ext >&5
 
8652
 
 
8653
eval "$as_ac_Lib=no"
 
8654
fi
 
8655
rm -f conftest.err conftest.$ac_objext \
 
8656
      conftest$ac_exeext conftest.$ac_ext
 
8657
LIBS=$ac_check_lib_save_LIBS
 
8658
fi
 
8659
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8660
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8661
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8662
  apu_has_ldapssl_init="1"
 
8663
fi
 
8664
 
 
8665
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
8666
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
8667
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
8668
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8669
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8670
else
 
8671
  ac_check_lib_save_LIBS=$LIBS
 
8672
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8673
cat >conftest.$ac_ext <<_ACEOF
 
8674
/* confdefs.h.  */
 
8675
_ACEOF
 
8676
cat confdefs.h >>conftest.$ac_ext
 
8677
cat >>conftest.$ac_ext <<_ACEOF
 
8678
/* end confdefs.h.  */
 
8679
 
 
8680
/* Override any gcc2 internal prototype to avoid an error.  */
 
8681
#ifdef __cplusplus
 
8682
extern "C"
 
8683
#endif
 
8684
/* We use char because int might match the return type of a gcc2
 
8685
   builtin and then its argument prototype would still apply.  */
 
8686
char ldapssl_install_routines ();
 
8687
int
 
8688
main ()
 
8689
{
 
8690
ldapssl_install_routines ();
 
8691
  ;
 
8692
  return 0;
 
8693
}
 
8694
_ACEOF
 
8695
rm -f conftest.$ac_objext conftest$ac_exeext
 
8696
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8697
  (eval $ac_link) 2>conftest.er1
 
8698
  ac_status=$?
 
8699
  grep -v '^ *+' conftest.er1 >conftest.err
 
8700
  rm -f conftest.er1
 
8701
  cat conftest.err >&5
 
8702
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8703
  (exit $ac_status); } &&
 
8704
         { ac_try='test -z "$ac_c_werror_flag"
 
8705
                         || test ! -s conftest.err'
 
8706
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8707
  (eval $ac_try) 2>&5
 
8708
  ac_status=$?
 
8709
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8710
  (exit $ac_status); }; } &&
 
8711
         { ac_try='test -s conftest$ac_exeext'
 
8712
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8713
  (eval $ac_try) 2>&5
 
8714
  ac_status=$?
 
8715
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8716
  (exit $ac_status); }; }; then
 
8717
  eval "$as_ac_Lib=yes"
 
8718
else
 
8719
  echo "$as_me: failed program was:" >&5
 
8720
sed 's/^/| /' conftest.$ac_ext >&5
 
8721
 
 
8722
eval "$as_ac_Lib=no"
 
8723
fi
 
8724
rm -f conftest.err conftest.$ac_objext \
 
8725
      conftest$ac_exeext conftest.$ac_ext
 
8726
LIBS=$ac_check_lib_save_LIBS
 
8727
fi
 
8728
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8729
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8730
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8731
  apu_has_ldapssl_install_routines="1"
 
8732
fi
 
8733
 
 
8734
        apu_has_ldap="1";
 
8735
 
 
8736
fi
 
8737
 
 
8738
  fi
 
8739
 
 
8740
 
 
8741
  if test ${apu_has_ldap} != "1"; then
 
8742
    ldaplib="ldap"
 
8743
    extralib="-llber -lresolv"
 
8744
    unset ac_cv_lib_${ldaplib}_ldap_init
 
8745
    unset ac_cv_lib_${ldaplib}___ldap_init
 
8746
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
8747
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
8748
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
8749
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8750
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8751
else
 
8752
  ac_check_lib_save_LIBS=$LIBS
 
8753
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8754
cat >conftest.$ac_ext <<_ACEOF
 
8755
/* confdefs.h.  */
 
8756
_ACEOF
 
8757
cat confdefs.h >>conftest.$ac_ext
 
8758
cat >>conftest.$ac_ext <<_ACEOF
 
8759
/* end confdefs.h.  */
 
8760
 
 
8761
/* Override any gcc2 internal prototype to avoid an error.  */
 
8762
#ifdef __cplusplus
 
8763
extern "C"
 
8764
#endif
 
8765
/* We use char because int might match the return type of a gcc2
 
8766
   builtin and then its argument prototype would still apply.  */
 
8767
char ldap_init ();
 
8768
int
 
8769
main ()
 
8770
{
 
8771
ldap_init ();
 
8772
  ;
 
8773
  return 0;
 
8774
}
 
8775
_ACEOF
 
8776
rm -f conftest.$ac_objext conftest$ac_exeext
 
8777
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8778
  (eval $ac_link) 2>conftest.er1
 
8779
  ac_status=$?
 
8780
  grep -v '^ *+' conftest.er1 >conftest.err
 
8781
  rm -f conftest.er1
 
8782
  cat conftest.err >&5
 
8783
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8784
  (exit $ac_status); } &&
 
8785
         { ac_try='test -z "$ac_c_werror_flag"
 
8786
                         || test ! -s conftest.err'
 
8787
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8788
  (eval $ac_try) 2>&5
 
8789
  ac_status=$?
 
8790
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8791
  (exit $ac_status); }; } &&
 
8792
         { ac_try='test -s conftest$ac_exeext'
 
8793
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8794
  (eval $ac_try) 2>&5
 
8795
  ac_status=$?
 
8796
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8797
  (exit $ac_status); }; }; then
 
8798
  eval "$as_ac_Lib=yes"
 
8799
else
 
8800
  echo "$as_me: failed program was:" >&5
 
8801
sed 's/^/| /' conftest.$ac_ext >&5
 
8802
 
 
8803
eval "$as_ac_Lib=no"
 
8804
fi
 
8805
rm -f conftest.err conftest.$ac_objext \
 
8806
      conftest$ac_exeext conftest.$ac_ext
 
8807
LIBS=$ac_check_lib_save_LIBS
 
8808
fi
 
8809
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8810
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8811
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8812
 
 
8813
 
 
8814
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
8815
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
8816
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
8817
  else
 
8818
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
8819
    for i in $apr_addto_bugger; do
 
8820
      apr_addto_duplicate="0"
 
8821
      for j in $APRUTIL_EXPORT_LIBS; do
 
8822
        if test "x$i" = "x$j"; then
 
8823
          apr_addto_duplicate="1"
 
8824
          break
 
8825
        fi
 
8826
      done
 
8827
      if test $apr_addto_duplicate = "0"; then
 
8828
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
8829
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
8830
      fi
 
8831
    done
 
8832
  fi
 
8833
 
 
8834
 
 
8835
  if test "x$APRUTIL_LIBS" = "x"; then
 
8836
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
8837
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
8838
  else
 
8839
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
8840
    for i in $apr_addto_bugger; do
 
8841
      apr_addto_duplicate="0"
 
8842
      for j in $APRUTIL_LIBS; do
 
8843
        if test "x$i" = "x$j"; then
 
8844
          apr_addto_duplicate="1"
 
8845
          break
 
8846
        fi
 
8847
      done
 
8848
      if test $apr_addto_duplicate = "0"; then
 
8849
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
8850
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
8851
      fi
 
8852
    done
 
8853
  fi
 
8854
 
 
8855
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
8856
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
8857
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
8858
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8859
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8860
else
 
8861
  ac_check_lib_save_LIBS=$LIBS
 
8862
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8863
cat >conftest.$ac_ext <<_ACEOF
 
8864
/* confdefs.h.  */
 
8865
_ACEOF
 
8866
cat confdefs.h >>conftest.$ac_ext
 
8867
cat >>conftest.$ac_ext <<_ACEOF
 
8868
/* end confdefs.h.  */
 
8869
 
 
8870
/* Override any gcc2 internal prototype to avoid an error.  */
 
8871
#ifdef __cplusplus
 
8872
extern "C"
 
8873
#endif
 
8874
/* We use char because int might match the return type of a gcc2
 
8875
   builtin and then its argument prototype would still apply.  */
 
8876
char ldapssl_client_init ();
 
8877
int
 
8878
main ()
 
8879
{
 
8880
ldapssl_client_init ();
 
8881
  ;
 
8882
  return 0;
 
8883
}
 
8884
_ACEOF
 
8885
rm -f conftest.$ac_objext conftest$ac_exeext
 
8886
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8887
  (eval $ac_link) 2>conftest.er1
 
8888
  ac_status=$?
 
8889
  grep -v '^ *+' conftest.er1 >conftest.err
 
8890
  rm -f conftest.er1
 
8891
  cat conftest.err >&5
 
8892
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8893
  (exit $ac_status); } &&
 
8894
         { ac_try='test -z "$ac_c_werror_flag"
 
8895
                         || test ! -s conftest.err'
 
8896
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8897
  (eval $ac_try) 2>&5
 
8898
  ac_status=$?
 
8899
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8900
  (exit $ac_status); }; } &&
 
8901
         { ac_try='test -s conftest$ac_exeext'
 
8902
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8903
  (eval $ac_try) 2>&5
 
8904
  ac_status=$?
 
8905
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8906
  (exit $ac_status); }; }; then
 
8907
  eval "$as_ac_Lib=yes"
 
8908
else
 
8909
  echo "$as_me: failed program was:" >&5
 
8910
sed 's/^/| /' conftest.$ac_ext >&5
 
8911
 
 
8912
eval "$as_ac_Lib=no"
 
8913
fi
 
8914
rm -f conftest.err conftest.$ac_objext \
 
8915
      conftest$ac_exeext conftest.$ac_ext
 
8916
LIBS=$ac_check_lib_save_LIBS
 
8917
fi
 
8918
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8919
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8920
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8921
  apu_has_ldapssl_client_init="1"
 
8922
fi
 
8923
 
 
8924
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
8925
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
8926
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
8927
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8928
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8929
else
 
8930
  ac_check_lib_save_LIBS=$LIBS
 
8931
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
8932
cat >conftest.$ac_ext <<_ACEOF
 
8933
/* confdefs.h.  */
 
8934
_ACEOF
 
8935
cat confdefs.h >>conftest.$ac_ext
 
8936
cat >>conftest.$ac_ext <<_ACEOF
 
8937
/* end confdefs.h.  */
 
8938
 
 
8939
/* Override any gcc2 internal prototype to avoid an error.  */
 
8940
#ifdef __cplusplus
 
8941
extern "C"
 
8942
#endif
 
8943
/* We use char because int might match the return type of a gcc2
 
8944
   builtin and then its argument prototype would still apply.  */
 
8945
char ldapssl_client_deinit ();
 
8946
int
 
8947
main ()
 
8948
{
 
8949
ldapssl_client_deinit ();
 
8950
  ;
 
8951
  return 0;
 
8952
}
 
8953
_ACEOF
 
8954
rm -f conftest.$ac_objext conftest$ac_exeext
 
8955
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8956
  (eval $ac_link) 2>conftest.er1
 
8957
  ac_status=$?
 
8958
  grep -v '^ *+' conftest.er1 >conftest.err
 
8959
  rm -f conftest.er1
 
8960
  cat conftest.err >&5
 
8961
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8962
  (exit $ac_status); } &&
 
8963
         { ac_try='test -z "$ac_c_werror_flag"
 
8964
                         || test ! -s conftest.err'
 
8965
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8966
  (eval $ac_try) 2>&5
 
8967
  ac_status=$?
 
8968
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8969
  (exit $ac_status); }; } &&
 
8970
         { ac_try='test -s conftest$ac_exeext'
 
8971
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8972
  (eval $ac_try) 2>&5
 
8973
  ac_status=$?
 
8974
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8975
  (exit $ac_status); }; }; then
 
8976
  eval "$as_ac_Lib=yes"
 
8977
else
 
8978
  echo "$as_me: failed program was:" >&5
 
8979
sed 's/^/| /' conftest.$ac_ext >&5
 
8980
 
 
8981
eval "$as_ac_Lib=no"
 
8982
fi
 
8983
rm -f conftest.err conftest.$ac_objext \
 
8984
      conftest$ac_exeext conftest.$ac_ext
 
8985
LIBS=$ac_check_lib_save_LIBS
 
8986
fi
 
8987
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
8988
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
8989
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
8990
  apu_has_ldapssl_client_deinit="1"
 
8991
fi
 
8992
 
 
8993
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
8994
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
8995
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
8996
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
8997
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8998
else
 
8999
  ac_check_lib_save_LIBS=$LIBS
 
9000
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9001
cat >conftest.$ac_ext <<_ACEOF
 
9002
/* confdefs.h.  */
 
9003
_ACEOF
 
9004
cat confdefs.h >>conftest.$ac_ext
 
9005
cat >>conftest.$ac_ext <<_ACEOF
 
9006
/* end confdefs.h.  */
 
9007
 
 
9008
/* Override any gcc2 internal prototype to avoid an error.  */
 
9009
#ifdef __cplusplus
 
9010
extern "C"
 
9011
#endif
 
9012
/* We use char because int might match the return type of a gcc2
 
9013
   builtin and then its argument prototype would still apply.  */
 
9014
char ldapssl_add_trusted_cert ();
 
9015
int
 
9016
main ()
 
9017
{
 
9018
ldapssl_add_trusted_cert ();
 
9019
  ;
 
9020
  return 0;
 
9021
}
 
9022
_ACEOF
 
9023
rm -f conftest.$ac_objext conftest$ac_exeext
 
9024
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9025
  (eval $ac_link) 2>conftest.er1
 
9026
  ac_status=$?
 
9027
  grep -v '^ *+' conftest.er1 >conftest.err
 
9028
  rm -f conftest.er1
 
9029
  cat conftest.err >&5
 
9030
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9031
  (exit $ac_status); } &&
 
9032
         { ac_try='test -z "$ac_c_werror_flag"
 
9033
                         || test ! -s conftest.err'
 
9034
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9035
  (eval $ac_try) 2>&5
 
9036
  ac_status=$?
 
9037
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9038
  (exit $ac_status); }; } &&
 
9039
         { ac_try='test -s conftest$ac_exeext'
 
9040
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9041
  (eval $ac_try) 2>&5
 
9042
  ac_status=$?
 
9043
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9044
  (exit $ac_status); }; }; then
 
9045
  eval "$as_ac_Lib=yes"
 
9046
else
 
9047
  echo "$as_me: failed program was:" >&5
 
9048
sed 's/^/| /' conftest.$ac_ext >&5
 
9049
 
 
9050
eval "$as_ac_Lib=no"
 
9051
fi
 
9052
rm -f conftest.err conftest.$ac_objext \
 
9053
      conftest$ac_exeext conftest.$ac_ext
 
9054
LIBS=$ac_check_lib_save_LIBS
 
9055
fi
 
9056
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9057
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9058
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9059
  apu_has_ldapssl_add_trusted_cert="1"
 
9060
fi
 
9061
 
 
9062
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
9063
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
9064
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
9065
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9066
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9067
else
 
9068
  ac_check_lib_save_LIBS=$LIBS
 
9069
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9070
cat >conftest.$ac_ext <<_ACEOF
 
9071
/* confdefs.h.  */
 
9072
_ACEOF
 
9073
cat confdefs.h >>conftest.$ac_ext
 
9074
cat >>conftest.$ac_ext <<_ACEOF
 
9075
/* end confdefs.h.  */
 
9076
 
 
9077
/* Override any gcc2 internal prototype to avoid an error.  */
 
9078
#ifdef __cplusplus
 
9079
extern "C"
 
9080
#endif
 
9081
/* We use char because int might match the return type of a gcc2
 
9082
   builtin and then its argument prototype would still apply.  */
 
9083
char ldap_start_tls_s ();
 
9084
int
 
9085
main ()
 
9086
{
 
9087
ldap_start_tls_s ();
 
9088
  ;
 
9089
  return 0;
 
9090
}
 
9091
_ACEOF
 
9092
rm -f conftest.$ac_objext conftest$ac_exeext
 
9093
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9094
  (eval $ac_link) 2>conftest.er1
 
9095
  ac_status=$?
 
9096
  grep -v '^ *+' conftest.er1 >conftest.err
 
9097
  rm -f conftest.er1
 
9098
  cat conftest.err >&5
 
9099
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9100
  (exit $ac_status); } &&
 
9101
         { ac_try='test -z "$ac_c_werror_flag"
 
9102
                         || test ! -s conftest.err'
 
9103
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9104
  (eval $ac_try) 2>&5
 
9105
  ac_status=$?
 
9106
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9107
  (exit $ac_status); }; } &&
 
9108
         { ac_try='test -s conftest$ac_exeext'
 
9109
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9110
  (eval $ac_try) 2>&5
 
9111
  ac_status=$?
 
9112
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9113
  (exit $ac_status); }; }; then
 
9114
  eval "$as_ac_Lib=yes"
 
9115
else
 
9116
  echo "$as_me: failed program was:" >&5
 
9117
sed 's/^/| /' conftest.$ac_ext >&5
 
9118
 
 
9119
eval "$as_ac_Lib=no"
 
9120
fi
 
9121
rm -f conftest.err conftest.$ac_objext \
 
9122
      conftest$ac_exeext conftest.$ac_ext
 
9123
LIBS=$ac_check_lib_save_LIBS
 
9124
fi
 
9125
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9126
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9127
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9128
  apu_has_ldap_start_tls_s="1"
 
9129
fi
 
9130
 
 
9131
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
9132
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
9133
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
9134
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9135
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9136
else
 
9137
  ac_check_lib_save_LIBS=$LIBS
 
9138
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9139
cat >conftest.$ac_ext <<_ACEOF
 
9140
/* confdefs.h.  */
 
9141
_ACEOF
 
9142
cat confdefs.h >>conftest.$ac_ext
 
9143
cat >>conftest.$ac_ext <<_ACEOF
 
9144
/* end confdefs.h.  */
 
9145
 
 
9146
/* Override any gcc2 internal prototype to avoid an error.  */
 
9147
#ifdef __cplusplus
 
9148
extern "C"
 
9149
#endif
 
9150
/* We use char because int might match the return type of a gcc2
 
9151
   builtin and then its argument prototype would still apply.  */
 
9152
char ldap_sslinit ();
 
9153
int
 
9154
main ()
 
9155
{
 
9156
ldap_sslinit ();
 
9157
  ;
 
9158
  return 0;
 
9159
}
 
9160
_ACEOF
 
9161
rm -f conftest.$ac_objext conftest$ac_exeext
 
9162
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9163
  (eval $ac_link) 2>conftest.er1
 
9164
  ac_status=$?
 
9165
  grep -v '^ *+' conftest.er1 >conftest.err
 
9166
  rm -f conftest.er1
 
9167
  cat conftest.err >&5
 
9168
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9169
  (exit $ac_status); } &&
 
9170
         { ac_try='test -z "$ac_c_werror_flag"
 
9171
                         || test ! -s conftest.err'
 
9172
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9173
  (eval $ac_try) 2>&5
 
9174
  ac_status=$?
 
9175
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9176
  (exit $ac_status); }; } &&
 
9177
         { ac_try='test -s conftest$ac_exeext'
 
9178
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9179
  (eval $ac_try) 2>&5
 
9180
  ac_status=$?
 
9181
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9182
  (exit $ac_status); }; }; then
 
9183
  eval "$as_ac_Lib=yes"
 
9184
else
 
9185
  echo "$as_me: failed program was:" >&5
 
9186
sed 's/^/| /' conftest.$ac_ext >&5
 
9187
 
 
9188
eval "$as_ac_Lib=no"
 
9189
fi
 
9190
rm -f conftest.err conftest.$ac_objext \
 
9191
      conftest$ac_exeext conftest.$ac_ext
 
9192
LIBS=$ac_check_lib_save_LIBS
 
9193
fi
 
9194
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9195
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9196
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9197
  apu_has_ldap_sslinit="1"
 
9198
fi
 
9199
 
 
9200
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
9201
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
9202
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
9203
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9204
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9205
else
 
9206
  ac_check_lib_save_LIBS=$LIBS
 
9207
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9208
cat >conftest.$ac_ext <<_ACEOF
 
9209
/* confdefs.h.  */
 
9210
_ACEOF
 
9211
cat confdefs.h >>conftest.$ac_ext
 
9212
cat >>conftest.$ac_ext <<_ACEOF
 
9213
/* end confdefs.h.  */
 
9214
 
 
9215
/* Override any gcc2 internal prototype to avoid an error.  */
 
9216
#ifdef __cplusplus
 
9217
extern "C"
 
9218
#endif
 
9219
/* We use char because int might match the return type of a gcc2
 
9220
   builtin and then its argument prototype would still apply.  */
 
9221
char ldapssl_init ();
 
9222
int
 
9223
main ()
 
9224
{
 
9225
ldapssl_init ();
 
9226
  ;
 
9227
  return 0;
 
9228
}
 
9229
_ACEOF
 
9230
rm -f conftest.$ac_objext conftest$ac_exeext
 
9231
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9232
  (eval $ac_link) 2>conftest.er1
 
9233
  ac_status=$?
 
9234
  grep -v '^ *+' conftest.er1 >conftest.err
 
9235
  rm -f conftest.er1
 
9236
  cat conftest.err >&5
 
9237
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9238
  (exit $ac_status); } &&
 
9239
         { ac_try='test -z "$ac_c_werror_flag"
 
9240
                         || test ! -s conftest.err'
 
9241
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9242
  (eval $ac_try) 2>&5
 
9243
  ac_status=$?
 
9244
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9245
  (exit $ac_status); }; } &&
 
9246
         { ac_try='test -s conftest$ac_exeext'
 
9247
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9248
  (eval $ac_try) 2>&5
 
9249
  ac_status=$?
 
9250
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9251
  (exit $ac_status); }; }; then
 
9252
  eval "$as_ac_Lib=yes"
 
9253
else
 
9254
  echo "$as_me: failed program was:" >&5
 
9255
sed 's/^/| /' conftest.$ac_ext >&5
 
9256
 
 
9257
eval "$as_ac_Lib=no"
 
9258
fi
 
9259
rm -f conftest.err conftest.$ac_objext \
 
9260
      conftest$ac_exeext conftest.$ac_ext
 
9261
LIBS=$ac_check_lib_save_LIBS
 
9262
fi
 
9263
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9264
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9265
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9266
  apu_has_ldapssl_init="1"
 
9267
fi
 
9268
 
 
9269
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
9270
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
9271
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
9272
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9273
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9274
else
 
9275
  ac_check_lib_save_LIBS=$LIBS
 
9276
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9277
cat >conftest.$ac_ext <<_ACEOF
 
9278
/* confdefs.h.  */
 
9279
_ACEOF
 
9280
cat confdefs.h >>conftest.$ac_ext
 
9281
cat >>conftest.$ac_ext <<_ACEOF
 
9282
/* end confdefs.h.  */
 
9283
 
 
9284
/* Override any gcc2 internal prototype to avoid an error.  */
 
9285
#ifdef __cplusplus
 
9286
extern "C"
 
9287
#endif
 
9288
/* We use char because int might match the return type of a gcc2
 
9289
   builtin and then its argument prototype would still apply.  */
 
9290
char ldapssl_install_routines ();
 
9291
int
 
9292
main ()
 
9293
{
 
9294
ldapssl_install_routines ();
 
9295
  ;
 
9296
  return 0;
 
9297
}
 
9298
_ACEOF
 
9299
rm -f conftest.$ac_objext conftest$ac_exeext
 
9300
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9301
  (eval $ac_link) 2>conftest.er1
 
9302
  ac_status=$?
 
9303
  grep -v '^ *+' conftest.er1 >conftest.err
 
9304
  rm -f conftest.er1
 
9305
  cat conftest.err >&5
 
9306
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9307
  (exit $ac_status); } &&
 
9308
         { ac_try='test -z "$ac_c_werror_flag"
 
9309
                         || test ! -s conftest.err'
 
9310
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9311
  (eval $ac_try) 2>&5
 
9312
  ac_status=$?
 
9313
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9314
  (exit $ac_status); }; } &&
 
9315
         { ac_try='test -s conftest$ac_exeext'
 
9316
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9317
  (eval $ac_try) 2>&5
 
9318
  ac_status=$?
 
9319
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9320
  (exit $ac_status); }; }; then
 
9321
  eval "$as_ac_Lib=yes"
 
9322
else
 
9323
  echo "$as_me: failed program was:" >&5
 
9324
sed 's/^/| /' conftest.$ac_ext >&5
 
9325
 
 
9326
eval "$as_ac_Lib=no"
 
9327
fi
 
9328
rm -f conftest.err conftest.$ac_objext \
 
9329
      conftest$ac_exeext conftest.$ac_ext
 
9330
LIBS=$ac_check_lib_save_LIBS
 
9331
fi
 
9332
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9333
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9334
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9335
  apu_has_ldapssl_install_routines="1"
 
9336
fi
 
9337
 
 
9338
        apu_has_ldap="1";
 
9339
 
 
9340
fi
 
9341
 
 
9342
  fi
 
9343
 
 
9344
 
 
9345
  if test ${apu_has_ldap} != "1"; then
 
9346
    ldaplib="ldap"
 
9347
    extralib="-llber -lresolv -lsocket -lnsl"
 
9348
    unset ac_cv_lib_${ldaplib}_ldap_init
 
9349
    unset ac_cv_lib_${ldaplib}___ldap_init
 
9350
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
9351
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
9352
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
9353
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9354
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9355
else
 
9356
  ac_check_lib_save_LIBS=$LIBS
 
9357
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9358
cat >conftest.$ac_ext <<_ACEOF
 
9359
/* confdefs.h.  */
 
9360
_ACEOF
 
9361
cat confdefs.h >>conftest.$ac_ext
 
9362
cat >>conftest.$ac_ext <<_ACEOF
 
9363
/* end confdefs.h.  */
 
9364
 
 
9365
/* Override any gcc2 internal prototype to avoid an error.  */
 
9366
#ifdef __cplusplus
 
9367
extern "C"
 
9368
#endif
 
9369
/* We use char because int might match the return type of a gcc2
 
9370
   builtin and then its argument prototype would still apply.  */
 
9371
char ldap_init ();
 
9372
int
 
9373
main ()
 
9374
{
 
9375
ldap_init ();
 
9376
  ;
 
9377
  return 0;
 
9378
}
 
9379
_ACEOF
 
9380
rm -f conftest.$ac_objext conftest$ac_exeext
 
9381
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9382
  (eval $ac_link) 2>conftest.er1
 
9383
  ac_status=$?
 
9384
  grep -v '^ *+' conftest.er1 >conftest.err
 
9385
  rm -f conftest.er1
 
9386
  cat conftest.err >&5
 
9387
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9388
  (exit $ac_status); } &&
 
9389
         { ac_try='test -z "$ac_c_werror_flag"
 
9390
                         || test ! -s conftest.err'
 
9391
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9392
  (eval $ac_try) 2>&5
 
9393
  ac_status=$?
 
9394
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9395
  (exit $ac_status); }; } &&
 
9396
         { ac_try='test -s conftest$ac_exeext'
 
9397
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9398
  (eval $ac_try) 2>&5
 
9399
  ac_status=$?
 
9400
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9401
  (exit $ac_status); }; }; then
 
9402
  eval "$as_ac_Lib=yes"
 
9403
else
 
9404
  echo "$as_me: failed program was:" >&5
 
9405
sed 's/^/| /' conftest.$ac_ext >&5
 
9406
 
 
9407
eval "$as_ac_Lib=no"
 
9408
fi
 
9409
rm -f conftest.err conftest.$ac_objext \
 
9410
      conftest$ac_exeext conftest.$ac_ext
 
9411
LIBS=$ac_check_lib_save_LIBS
 
9412
fi
 
9413
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9414
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9415
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9416
 
 
9417
 
 
9418
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
9419
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
9420
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
9421
  else
 
9422
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
9423
    for i in $apr_addto_bugger; do
 
9424
      apr_addto_duplicate="0"
 
9425
      for j in $APRUTIL_EXPORT_LIBS; do
 
9426
        if test "x$i" = "x$j"; then
 
9427
          apr_addto_duplicate="1"
 
9428
          break
 
9429
        fi
 
9430
      done
 
9431
      if test $apr_addto_duplicate = "0"; then
 
9432
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
9433
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
9434
      fi
 
9435
    done
 
9436
  fi
 
9437
 
 
9438
 
 
9439
  if test "x$APRUTIL_LIBS" = "x"; then
 
9440
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
9441
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
9442
  else
 
9443
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
9444
    for i in $apr_addto_bugger; do
 
9445
      apr_addto_duplicate="0"
 
9446
      for j in $APRUTIL_LIBS; do
 
9447
        if test "x$i" = "x$j"; then
 
9448
          apr_addto_duplicate="1"
 
9449
          break
 
9450
        fi
 
9451
      done
 
9452
      if test $apr_addto_duplicate = "0"; then
 
9453
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
9454
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
9455
      fi
 
9456
    done
 
9457
  fi
 
9458
 
 
9459
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
9460
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
9461
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
9462
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9463
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9464
else
 
9465
  ac_check_lib_save_LIBS=$LIBS
 
9466
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9467
cat >conftest.$ac_ext <<_ACEOF
 
9468
/* confdefs.h.  */
 
9469
_ACEOF
 
9470
cat confdefs.h >>conftest.$ac_ext
 
9471
cat >>conftest.$ac_ext <<_ACEOF
 
9472
/* end confdefs.h.  */
 
9473
 
 
9474
/* Override any gcc2 internal prototype to avoid an error.  */
 
9475
#ifdef __cplusplus
 
9476
extern "C"
 
9477
#endif
 
9478
/* We use char because int might match the return type of a gcc2
 
9479
   builtin and then its argument prototype would still apply.  */
 
9480
char ldapssl_client_init ();
 
9481
int
 
9482
main ()
 
9483
{
 
9484
ldapssl_client_init ();
 
9485
  ;
 
9486
  return 0;
 
9487
}
 
9488
_ACEOF
 
9489
rm -f conftest.$ac_objext conftest$ac_exeext
 
9490
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9491
  (eval $ac_link) 2>conftest.er1
 
9492
  ac_status=$?
 
9493
  grep -v '^ *+' conftest.er1 >conftest.err
 
9494
  rm -f conftest.er1
 
9495
  cat conftest.err >&5
 
9496
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9497
  (exit $ac_status); } &&
 
9498
         { ac_try='test -z "$ac_c_werror_flag"
 
9499
                         || test ! -s conftest.err'
 
9500
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9501
  (eval $ac_try) 2>&5
 
9502
  ac_status=$?
 
9503
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9504
  (exit $ac_status); }; } &&
 
9505
         { ac_try='test -s conftest$ac_exeext'
 
9506
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9507
  (eval $ac_try) 2>&5
 
9508
  ac_status=$?
 
9509
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9510
  (exit $ac_status); }; }; then
 
9511
  eval "$as_ac_Lib=yes"
 
9512
else
 
9513
  echo "$as_me: failed program was:" >&5
 
9514
sed 's/^/| /' conftest.$ac_ext >&5
 
9515
 
 
9516
eval "$as_ac_Lib=no"
 
9517
fi
 
9518
rm -f conftest.err conftest.$ac_objext \
 
9519
      conftest$ac_exeext conftest.$ac_ext
 
9520
LIBS=$ac_check_lib_save_LIBS
 
9521
fi
 
9522
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9523
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9524
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9525
  apu_has_ldapssl_client_init="1"
 
9526
fi
 
9527
 
 
9528
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
9529
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
9530
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
9531
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9532
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9533
else
 
9534
  ac_check_lib_save_LIBS=$LIBS
 
9535
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9536
cat >conftest.$ac_ext <<_ACEOF
 
9537
/* confdefs.h.  */
 
9538
_ACEOF
 
9539
cat confdefs.h >>conftest.$ac_ext
 
9540
cat >>conftest.$ac_ext <<_ACEOF
 
9541
/* end confdefs.h.  */
 
9542
 
 
9543
/* Override any gcc2 internal prototype to avoid an error.  */
 
9544
#ifdef __cplusplus
 
9545
extern "C"
 
9546
#endif
 
9547
/* We use char because int might match the return type of a gcc2
 
9548
   builtin and then its argument prototype would still apply.  */
 
9549
char ldapssl_client_deinit ();
 
9550
int
 
9551
main ()
 
9552
{
 
9553
ldapssl_client_deinit ();
 
9554
  ;
 
9555
  return 0;
 
9556
}
 
9557
_ACEOF
 
9558
rm -f conftest.$ac_objext conftest$ac_exeext
 
9559
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9560
  (eval $ac_link) 2>conftest.er1
 
9561
  ac_status=$?
 
9562
  grep -v '^ *+' conftest.er1 >conftest.err
 
9563
  rm -f conftest.er1
 
9564
  cat conftest.err >&5
 
9565
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9566
  (exit $ac_status); } &&
 
9567
         { ac_try='test -z "$ac_c_werror_flag"
 
9568
                         || test ! -s conftest.err'
 
9569
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9570
  (eval $ac_try) 2>&5
 
9571
  ac_status=$?
 
9572
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9573
  (exit $ac_status); }; } &&
 
9574
         { ac_try='test -s conftest$ac_exeext'
 
9575
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9576
  (eval $ac_try) 2>&5
 
9577
  ac_status=$?
 
9578
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9579
  (exit $ac_status); }; }; then
 
9580
  eval "$as_ac_Lib=yes"
 
9581
else
 
9582
  echo "$as_me: failed program was:" >&5
 
9583
sed 's/^/| /' conftest.$ac_ext >&5
 
9584
 
 
9585
eval "$as_ac_Lib=no"
 
9586
fi
 
9587
rm -f conftest.err conftest.$ac_objext \
 
9588
      conftest$ac_exeext conftest.$ac_ext
 
9589
LIBS=$ac_check_lib_save_LIBS
 
9590
fi
 
9591
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9592
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9593
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9594
  apu_has_ldapssl_client_deinit="1"
 
9595
fi
 
9596
 
 
9597
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
9598
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
9599
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
9600
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9601
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9602
else
 
9603
  ac_check_lib_save_LIBS=$LIBS
 
9604
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9605
cat >conftest.$ac_ext <<_ACEOF
 
9606
/* confdefs.h.  */
 
9607
_ACEOF
 
9608
cat confdefs.h >>conftest.$ac_ext
 
9609
cat >>conftest.$ac_ext <<_ACEOF
 
9610
/* end confdefs.h.  */
 
9611
 
 
9612
/* Override any gcc2 internal prototype to avoid an error.  */
 
9613
#ifdef __cplusplus
 
9614
extern "C"
 
9615
#endif
 
9616
/* We use char because int might match the return type of a gcc2
 
9617
   builtin and then its argument prototype would still apply.  */
 
9618
char ldapssl_add_trusted_cert ();
 
9619
int
 
9620
main ()
 
9621
{
 
9622
ldapssl_add_trusted_cert ();
 
9623
  ;
 
9624
  return 0;
 
9625
}
 
9626
_ACEOF
 
9627
rm -f conftest.$ac_objext conftest$ac_exeext
 
9628
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9629
  (eval $ac_link) 2>conftest.er1
 
9630
  ac_status=$?
 
9631
  grep -v '^ *+' conftest.er1 >conftest.err
 
9632
  rm -f conftest.er1
 
9633
  cat conftest.err >&5
 
9634
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9635
  (exit $ac_status); } &&
 
9636
         { ac_try='test -z "$ac_c_werror_flag"
 
9637
                         || test ! -s conftest.err'
 
9638
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9639
  (eval $ac_try) 2>&5
 
9640
  ac_status=$?
 
9641
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9642
  (exit $ac_status); }; } &&
 
9643
         { ac_try='test -s conftest$ac_exeext'
 
9644
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9645
  (eval $ac_try) 2>&5
 
9646
  ac_status=$?
 
9647
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9648
  (exit $ac_status); }; }; then
 
9649
  eval "$as_ac_Lib=yes"
 
9650
else
 
9651
  echo "$as_me: failed program was:" >&5
 
9652
sed 's/^/| /' conftest.$ac_ext >&5
 
9653
 
 
9654
eval "$as_ac_Lib=no"
 
9655
fi
 
9656
rm -f conftest.err conftest.$ac_objext \
 
9657
      conftest$ac_exeext conftest.$ac_ext
 
9658
LIBS=$ac_check_lib_save_LIBS
 
9659
fi
 
9660
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9661
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9662
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9663
  apu_has_ldapssl_add_trusted_cert="1"
 
9664
fi
 
9665
 
 
9666
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
9667
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
9668
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
9669
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9670
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9671
else
 
9672
  ac_check_lib_save_LIBS=$LIBS
 
9673
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9674
cat >conftest.$ac_ext <<_ACEOF
 
9675
/* confdefs.h.  */
 
9676
_ACEOF
 
9677
cat confdefs.h >>conftest.$ac_ext
 
9678
cat >>conftest.$ac_ext <<_ACEOF
 
9679
/* end confdefs.h.  */
 
9680
 
 
9681
/* Override any gcc2 internal prototype to avoid an error.  */
 
9682
#ifdef __cplusplus
 
9683
extern "C"
 
9684
#endif
 
9685
/* We use char because int might match the return type of a gcc2
 
9686
   builtin and then its argument prototype would still apply.  */
 
9687
char ldap_start_tls_s ();
 
9688
int
 
9689
main ()
 
9690
{
 
9691
ldap_start_tls_s ();
 
9692
  ;
 
9693
  return 0;
 
9694
}
 
9695
_ACEOF
 
9696
rm -f conftest.$ac_objext conftest$ac_exeext
 
9697
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9698
  (eval $ac_link) 2>conftest.er1
 
9699
  ac_status=$?
 
9700
  grep -v '^ *+' conftest.er1 >conftest.err
 
9701
  rm -f conftest.er1
 
9702
  cat conftest.err >&5
 
9703
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9704
  (exit $ac_status); } &&
 
9705
         { ac_try='test -z "$ac_c_werror_flag"
 
9706
                         || test ! -s conftest.err'
 
9707
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9708
  (eval $ac_try) 2>&5
 
9709
  ac_status=$?
 
9710
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9711
  (exit $ac_status); }; } &&
 
9712
         { ac_try='test -s conftest$ac_exeext'
 
9713
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9714
  (eval $ac_try) 2>&5
 
9715
  ac_status=$?
 
9716
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9717
  (exit $ac_status); }; }; then
 
9718
  eval "$as_ac_Lib=yes"
 
9719
else
 
9720
  echo "$as_me: failed program was:" >&5
 
9721
sed 's/^/| /' conftest.$ac_ext >&5
 
9722
 
 
9723
eval "$as_ac_Lib=no"
 
9724
fi
 
9725
rm -f conftest.err conftest.$ac_objext \
 
9726
      conftest$ac_exeext conftest.$ac_ext
 
9727
LIBS=$ac_check_lib_save_LIBS
 
9728
fi
 
9729
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9730
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9731
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9732
  apu_has_ldap_start_tls_s="1"
 
9733
fi
 
9734
 
 
9735
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
9736
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
9737
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
9738
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9739
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9740
else
 
9741
  ac_check_lib_save_LIBS=$LIBS
 
9742
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9743
cat >conftest.$ac_ext <<_ACEOF
 
9744
/* confdefs.h.  */
 
9745
_ACEOF
 
9746
cat confdefs.h >>conftest.$ac_ext
 
9747
cat >>conftest.$ac_ext <<_ACEOF
 
9748
/* end confdefs.h.  */
 
9749
 
 
9750
/* Override any gcc2 internal prototype to avoid an error.  */
 
9751
#ifdef __cplusplus
 
9752
extern "C"
 
9753
#endif
 
9754
/* We use char because int might match the return type of a gcc2
 
9755
   builtin and then its argument prototype would still apply.  */
 
9756
char ldap_sslinit ();
 
9757
int
 
9758
main ()
 
9759
{
 
9760
ldap_sslinit ();
 
9761
  ;
 
9762
  return 0;
 
9763
}
 
9764
_ACEOF
 
9765
rm -f conftest.$ac_objext conftest$ac_exeext
 
9766
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9767
  (eval $ac_link) 2>conftest.er1
 
9768
  ac_status=$?
 
9769
  grep -v '^ *+' conftest.er1 >conftest.err
 
9770
  rm -f conftest.er1
 
9771
  cat conftest.err >&5
 
9772
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9773
  (exit $ac_status); } &&
 
9774
         { ac_try='test -z "$ac_c_werror_flag"
 
9775
                         || test ! -s conftest.err'
 
9776
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9777
  (eval $ac_try) 2>&5
 
9778
  ac_status=$?
 
9779
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9780
  (exit $ac_status); }; } &&
 
9781
         { ac_try='test -s conftest$ac_exeext'
 
9782
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9783
  (eval $ac_try) 2>&5
 
9784
  ac_status=$?
 
9785
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9786
  (exit $ac_status); }; }; then
 
9787
  eval "$as_ac_Lib=yes"
 
9788
else
 
9789
  echo "$as_me: failed program was:" >&5
 
9790
sed 's/^/| /' conftest.$ac_ext >&5
 
9791
 
 
9792
eval "$as_ac_Lib=no"
 
9793
fi
 
9794
rm -f conftest.err conftest.$ac_objext \
 
9795
      conftest$ac_exeext conftest.$ac_ext
 
9796
LIBS=$ac_check_lib_save_LIBS
 
9797
fi
 
9798
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9799
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9800
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9801
  apu_has_ldap_sslinit="1"
 
9802
fi
 
9803
 
 
9804
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
9805
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
9806
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
9807
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9808
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9809
else
 
9810
  ac_check_lib_save_LIBS=$LIBS
 
9811
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9812
cat >conftest.$ac_ext <<_ACEOF
 
9813
/* confdefs.h.  */
 
9814
_ACEOF
 
9815
cat confdefs.h >>conftest.$ac_ext
 
9816
cat >>conftest.$ac_ext <<_ACEOF
 
9817
/* end confdefs.h.  */
 
9818
 
 
9819
/* Override any gcc2 internal prototype to avoid an error.  */
 
9820
#ifdef __cplusplus
 
9821
extern "C"
 
9822
#endif
 
9823
/* We use char because int might match the return type of a gcc2
 
9824
   builtin and then its argument prototype would still apply.  */
 
9825
char ldapssl_init ();
 
9826
int
 
9827
main ()
 
9828
{
 
9829
ldapssl_init ();
 
9830
  ;
 
9831
  return 0;
 
9832
}
 
9833
_ACEOF
 
9834
rm -f conftest.$ac_objext conftest$ac_exeext
 
9835
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9836
  (eval $ac_link) 2>conftest.er1
 
9837
  ac_status=$?
 
9838
  grep -v '^ *+' conftest.er1 >conftest.err
 
9839
  rm -f conftest.er1
 
9840
  cat conftest.err >&5
 
9841
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9842
  (exit $ac_status); } &&
 
9843
         { ac_try='test -z "$ac_c_werror_flag"
 
9844
                         || test ! -s conftest.err'
 
9845
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9846
  (eval $ac_try) 2>&5
 
9847
  ac_status=$?
 
9848
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9849
  (exit $ac_status); }; } &&
 
9850
         { ac_try='test -s conftest$ac_exeext'
 
9851
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9852
  (eval $ac_try) 2>&5
 
9853
  ac_status=$?
 
9854
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9855
  (exit $ac_status); }; }; then
 
9856
  eval "$as_ac_Lib=yes"
 
9857
else
 
9858
  echo "$as_me: failed program was:" >&5
 
9859
sed 's/^/| /' conftest.$ac_ext >&5
 
9860
 
 
9861
eval "$as_ac_Lib=no"
 
9862
fi
 
9863
rm -f conftest.err conftest.$ac_objext \
 
9864
      conftest$ac_exeext conftest.$ac_ext
 
9865
LIBS=$ac_check_lib_save_LIBS
 
9866
fi
 
9867
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9868
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9869
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9870
  apu_has_ldapssl_init="1"
 
9871
fi
 
9872
 
 
9873
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
9874
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
9875
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
9876
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9877
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9878
else
 
9879
  ac_check_lib_save_LIBS=$LIBS
 
9880
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9881
cat >conftest.$ac_ext <<_ACEOF
 
9882
/* confdefs.h.  */
 
9883
_ACEOF
 
9884
cat confdefs.h >>conftest.$ac_ext
 
9885
cat >>conftest.$ac_ext <<_ACEOF
 
9886
/* end confdefs.h.  */
 
9887
 
 
9888
/* Override any gcc2 internal prototype to avoid an error.  */
 
9889
#ifdef __cplusplus
 
9890
extern "C"
 
9891
#endif
 
9892
/* We use char because int might match the return type of a gcc2
 
9893
   builtin and then its argument prototype would still apply.  */
 
9894
char ldapssl_install_routines ();
 
9895
int
 
9896
main ()
 
9897
{
 
9898
ldapssl_install_routines ();
 
9899
  ;
 
9900
  return 0;
 
9901
}
 
9902
_ACEOF
 
9903
rm -f conftest.$ac_objext conftest$ac_exeext
 
9904
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9905
  (eval $ac_link) 2>conftest.er1
 
9906
  ac_status=$?
 
9907
  grep -v '^ *+' conftest.er1 >conftest.err
 
9908
  rm -f conftest.er1
 
9909
  cat conftest.err >&5
 
9910
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9911
  (exit $ac_status); } &&
 
9912
         { ac_try='test -z "$ac_c_werror_flag"
 
9913
                         || test ! -s conftest.err'
 
9914
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9915
  (eval $ac_try) 2>&5
 
9916
  ac_status=$?
 
9917
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9918
  (exit $ac_status); }; } &&
 
9919
         { ac_try='test -s conftest$ac_exeext'
 
9920
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9921
  (eval $ac_try) 2>&5
 
9922
  ac_status=$?
 
9923
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9924
  (exit $ac_status); }; }; then
 
9925
  eval "$as_ac_Lib=yes"
 
9926
else
 
9927
  echo "$as_me: failed program was:" >&5
 
9928
sed 's/^/| /' conftest.$ac_ext >&5
 
9929
 
 
9930
eval "$as_ac_Lib=no"
 
9931
fi
 
9932
rm -f conftest.err conftest.$ac_objext \
 
9933
      conftest$ac_exeext conftest.$ac_ext
 
9934
LIBS=$ac_check_lib_save_LIBS
 
9935
fi
 
9936
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
9937
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
9938
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
9939
  apu_has_ldapssl_install_routines="1"
 
9940
fi
 
9941
 
 
9942
        apu_has_ldap="1";
 
9943
 
 
9944
fi
 
9945
 
 
9946
  fi
 
9947
 
 
9948
 
 
9949
  if test ${apu_has_ldap} != "1"; then
 
9950
    ldaplib="ldap"
 
9951
    extralib="-ldl -lpthread"
 
9952
    unset ac_cv_lib_${ldaplib}_ldap_init
 
9953
    unset ac_cv_lib_${ldaplib}___ldap_init
 
9954
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
9955
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
9956
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
9957
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
9958
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9959
else
 
9960
  ac_check_lib_save_LIBS=$LIBS
 
9961
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
9962
cat >conftest.$ac_ext <<_ACEOF
 
9963
/* confdefs.h.  */
 
9964
_ACEOF
 
9965
cat confdefs.h >>conftest.$ac_ext
 
9966
cat >>conftest.$ac_ext <<_ACEOF
 
9967
/* end confdefs.h.  */
 
9968
 
 
9969
/* Override any gcc2 internal prototype to avoid an error.  */
 
9970
#ifdef __cplusplus
 
9971
extern "C"
 
9972
#endif
 
9973
/* We use char because int might match the return type of a gcc2
 
9974
   builtin and then its argument prototype would still apply.  */
 
9975
char ldap_init ();
 
9976
int
 
9977
main ()
 
9978
{
 
9979
ldap_init ();
 
9980
  ;
 
9981
  return 0;
 
9982
}
 
9983
_ACEOF
 
9984
rm -f conftest.$ac_objext conftest$ac_exeext
 
9985
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9986
  (eval $ac_link) 2>conftest.er1
 
9987
  ac_status=$?
 
9988
  grep -v '^ *+' conftest.er1 >conftest.err
 
9989
  rm -f conftest.er1
 
9990
  cat conftest.err >&5
 
9991
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9992
  (exit $ac_status); } &&
 
9993
         { ac_try='test -z "$ac_c_werror_flag"
 
9994
                         || test ! -s conftest.err'
 
9995
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9996
  (eval $ac_try) 2>&5
 
9997
  ac_status=$?
 
9998
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9999
  (exit $ac_status); }; } &&
 
10000
         { ac_try='test -s conftest$ac_exeext'
 
10001
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10002
  (eval $ac_try) 2>&5
 
10003
  ac_status=$?
 
10004
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10005
  (exit $ac_status); }; }; then
 
10006
  eval "$as_ac_Lib=yes"
 
10007
else
 
10008
  echo "$as_me: failed program was:" >&5
 
10009
sed 's/^/| /' conftest.$ac_ext >&5
 
10010
 
 
10011
eval "$as_ac_Lib=no"
 
10012
fi
 
10013
rm -f conftest.err conftest.$ac_objext \
 
10014
      conftest$ac_exeext conftest.$ac_ext
 
10015
LIBS=$ac_check_lib_save_LIBS
 
10016
fi
 
10017
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10018
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10019
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10020
 
 
10021
 
 
10022
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
10023
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
10024
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
10025
  else
 
10026
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
10027
    for i in $apr_addto_bugger; do
 
10028
      apr_addto_duplicate="0"
 
10029
      for j in $APRUTIL_EXPORT_LIBS; do
 
10030
        if test "x$i" = "x$j"; then
 
10031
          apr_addto_duplicate="1"
 
10032
          break
 
10033
        fi
 
10034
      done
 
10035
      if test $apr_addto_duplicate = "0"; then
 
10036
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
10037
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
10038
      fi
 
10039
    done
 
10040
  fi
 
10041
 
 
10042
 
 
10043
  if test "x$APRUTIL_LIBS" = "x"; then
 
10044
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
10045
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
10046
  else
 
10047
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
10048
    for i in $apr_addto_bugger; do
 
10049
      apr_addto_duplicate="0"
 
10050
      for j in $APRUTIL_LIBS; do
 
10051
        if test "x$i" = "x$j"; then
 
10052
          apr_addto_duplicate="1"
 
10053
          break
 
10054
        fi
 
10055
      done
 
10056
      if test $apr_addto_duplicate = "0"; then
 
10057
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
10058
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
10059
      fi
 
10060
    done
 
10061
  fi
 
10062
 
 
10063
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
10064
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
10065
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
10066
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10067
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10068
else
 
10069
  ac_check_lib_save_LIBS=$LIBS
 
10070
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10071
cat >conftest.$ac_ext <<_ACEOF
 
10072
/* confdefs.h.  */
 
10073
_ACEOF
 
10074
cat confdefs.h >>conftest.$ac_ext
 
10075
cat >>conftest.$ac_ext <<_ACEOF
 
10076
/* end confdefs.h.  */
 
10077
 
 
10078
/* Override any gcc2 internal prototype to avoid an error.  */
 
10079
#ifdef __cplusplus
 
10080
extern "C"
 
10081
#endif
 
10082
/* We use char because int might match the return type of a gcc2
 
10083
   builtin and then its argument prototype would still apply.  */
 
10084
char ldapssl_client_init ();
 
10085
int
 
10086
main ()
 
10087
{
 
10088
ldapssl_client_init ();
 
10089
  ;
 
10090
  return 0;
 
10091
}
 
10092
_ACEOF
 
10093
rm -f conftest.$ac_objext conftest$ac_exeext
 
10094
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10095
  (eval $ac_link) 2>conftest.er1
 
10096
  ac_status=$?
 
10097
  grep -v '^ *+' conftest.er1 >conftest.err
 
10098
  rm -f conftest.er1
 
10099
  cat conftest.err >&5
 
10100
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10101
  (exit $ac_status); } &&
 
10102
         { ac_try='test -z "$ac_c_werror_flag"
 
10103
                         || test ! -s conftest.err'
 
10104
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10105
  (eval $ac_try) 2>&5
 
10106
  ac_status=$?
 
10107
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10108
  (exit $ac_status); }; } &&
 
10109
         { ac_try='test -s conftest$ac_exeext'
 
10110
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10111
  (eval $ac_try) 2>&5
 
10112
  ac_status=$?
 
10113
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10114
  (exit $ac_status); }; }; then
 
10115
  eval "$as_ac_Lib=yes"
 
10116
else
 
10117
  echo "$as_me: failed program was:" >&5
 
10118
sed 's/^/| /' conftest.$ac_ext >&5
 
10119
 
 
10120
eval "$as_ac_Lib=no"
 
10121
fi
 
10122
rm -f conftest.err conftest.$ac_objext \
 
10123
      conftest$ac_exeext conftest.$ac_ext
 
10124
LIBS=$ac_check_lib_save_LIBS
 
10125
fi
 
10126
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10127
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10128
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10129
  apu_has_ldapssl_client_init="1"
 
10130
fi
 
10131
 
 
10132
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
10133
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
10134
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
10135
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10136
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10137
else
 
10138
  ac_check_lib_save_LIBS=$LIBS
 
10139
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10140
cat >conftest.$ac_ext <<_ACEOF
 
10141
/* confdefs.h.  */
 
10142
_ACEOF
 
10143
cat confdefs.h >>conftest.$ac_ext
 
10144
cat >>conftest.$ac_ext <<_ACEOF
 
10145
/* end confdefs.h.  */
 
10146
 
 
10147
/* Override any gcc2 internal prototype to avoid an error.  */
 
10148
#ifdef __cplusplus
 
10149
extern "C"
 
10150
#endif
 
10151
/* We use char because int might match the return type of a gcc2
 
10152
   builtin and then its argument prototype would still apply.  */
 
10153
char ldapssl_client_deinit ();
 
10154
int
 
10155
main ()
 
10156
{
 
10157
ldapssl_client_deinit ();
 
10158
  ;
 
10159
  return 0;
 
10160
}
 
10161
_ACEOF
 
10162
rm -f conftest.$ac_objext conftest$ac_exeext
 
10163
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10164
  (eval $ac_link) 2>conftest.er1
 
10165
  ac_status=$?
 
10166
  grep -v '^ *+' conftest.er1 >conftest.err
 
10167
  rm -f conftest.er1
 
10168
  cat conftest.err >&5
 
10169
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10170
  (exit $ac_status); } &&
 
10171
         { ac_try='test -z "$ac_c_werror_flag"
 
10172
                         || test ! -s conftest.err'
 
10173
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10174
  (eval $ac_try) 2>&5
 
10175
  ac_status=$?
 
10176
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10177
  (exit $ac_status); }; } &&
 
10178
         { ac_try='test -s conftest$ac_exeext'
 
10179
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10180
  (eval $ac_try) 2>&5
 
10181
  ac_status=$?
 
10182
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10183
  (exit $ac_status); }; }; then
 
10184
  eval "$as_ac_Lib=yes"
 
10185
else
 
10186
  echo "$as_me: failed program was:" >&5
 
10187
sed 's/^/| /' conftest.$ac_ext >&5
 
10188
 
 
10189
eval "$as_ac_Lib=no"
 
10190
fi
 
10191
rm -f conftest.err conftest.$ac_objext \
 
10192
      conftest$ac_exeext conftest.$ac_ext
 
10193
LIBS=$ac_check_lib_save_LIBS
 
10194
fi
 
10195
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10196
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10197
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10198
  apu_has_ldapssl_client_deinit="1"
 
10199
fi
 
10200
 
 
10201
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
10202
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
10203
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
10204
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10205
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10206
else
 
10207
  ac_check_lib_save_LIBS=$LIBS
 
10208
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10209
cat >conftest.$ac_ext <<_ACEOF
 
10210
/* confdefs.h.  */
 
10211
_ACEOF
 
10212
cat confdefs.h >>conftest.$ac_ext
 
10213
cat >>conftest.$ac_ext <<_ACEOF
 
10214
/* end confdefs.h.  */
 
10215
 
 
10216
/* Override any gcc2 internal prototype to avoid an error.  */
 
10217
#ifdef __cplusplus
 
10218
extern "C"
 
10219
#endif
 
10220
/* We use char because int might match the return type of a gcc2
 
10221
   builtin and then its argument prototype would still apply.  */
 
10222
char ldapssl_add_trusted_cert ();
 
10223
int
 
10224
main ()
 
10225
{
 
10226
ldapssl_add_trusted_cert ();
 
10227
  ;
 
10228
  return 0;
 
10229
}
 
10230
_ACEOF
 
10231
rm -f conftest.$ac_objext conftest$ac_exeext
 
10232
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10233
  (eval $ac_link) 2>conftest.er1
 
10234
  ac_status=$?
 
10235
  grep -v '^ *+' conftest.er1 >conftest.err
 
10236
  rm -f conftest.er1
 
10237
  cat conftest.err >&5
 
10238
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10239
  (exit $ac_status); } &&
 
10240
         { ac_try='test -z "$ac_c_werror_flag"
 
10241
                         || test ! -s conftest.err'
 
10242
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10243
  (eval $ac_try) 2>&5
 
10244
  ac_status=$?
 
10245
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10246
  (exit $ac_status); }; } &&
 
10247
         { ac_try='test -s conftest$ac_exeext'
 
10248
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10249
  (eval $ac_try) 2>&5
 
10250
  ac_status=$?
 
10251
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10252
  (exit $ac_status); }; }; then
 
10253
  eval "$as_ac_Lib=yes"
 
10254
else
 
10255
  echo "$as_me: failed program was:" >&5
 
10256
sed 's/^/| /' conftest.$ac_ext >&5
 
10257
 
 
10258
eval "$as_ac_Lib=no"
 
10259
fi
 
10260
rm -f conftest.err conftest.$ac_objext \
 
10261
      conftest$ac_exeext conftest.$ac_ext
 
10262
LIBS=$ac_check_lib_save_LIBS
 
10263
fi
 
10264
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10265
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10266
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10267
  apu_has_ldapssl_add_trusted_cert="1"
 
10268
fi
 
10269
 
 
10270
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
10271
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
10272
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
10273
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10274
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10275
else
 
10276
  ac_check_lib_save_LIBS=$LIBS
 
10277
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10278
cat >conftest.$ac_ext <<_ACEOF
 
10279
/* confdefs.h.  */
 
10280
_ACEOF
 
10281
cat confdefs.h >>conftest.$ac_ext
 
10282
cat >>conftest.$ac_ext <<_ACEOF
 
10283
/* end confdefs.h.  */
 
10284
 
 
10285
/* Override any gcc2 internal prototype to avoid an error.  */
 
10286
#ifdef __cplusplus
 
10287
extern "C"
 
10288
#endif
 
10289
/* We use char because int might match the return type of a gcc2
 
10290
   builtin and then its argument prototype would still apply.  */
 
10291
char ldap_start_tls_s ();
 
10292
int
 
10293
main ()
 
10294
{
 
10295
ldap_start_tls_s ();
 
10296
  ;
 
10297
  return 0;
 
10298
}
 
10299
_ACEOF
 
10300
rm -f conftest.$ac_objext conftest$ac_exeext
 
10301
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10302
  (eval $ac_link) 2>conftest.er1
 
10303
  ac_status=$?
 
10304
  grep -v '^ *+' conftest.er1 >conftest.err
 
10305
  rm -f conftest.er1
 
10306
  cat conftest.err >&5
 
10307
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10308
  (exit $ac_status); } &&
 
10309
         { ac_try='test -z "$ac_c_werror_flag"
 
10310
                         || test ! -s conftest.err'
 
10311
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10312
  (eval $ac_try) 2>&5
 
10313
  ac_status=$?
 
10314
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10315
  (exit $ac_status); }; } &&
 
10316
         { ac_try='test -s conftest$ac_exeext'
 
10317
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10318
  (eval $ac_try) 2>&5
 
10319
  ac_status=$?
 
10320
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10321
  (exit $ac_status); }; }; then
 
10322
  eval "$as_ac_Lib=yes"
 
10323
else
 
10324
  echo "$as_me: failed program was:" >&5
 
10325
sed 's/^/| /' conftest.$ac_ext >&5
 
10326
 
 
10327
eval "$as_ac_Lib=no"
 
10328
fi
 
10329
rm -f conftest.err conftest.$ac_objext \
 
10330
      conftest$ac_exeext conftest.$ac_ext
 
10331
LIBS=$ac_check_lib_save_LIBS
 
10332
fi
 
10333
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10334
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10335
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10336
  apu_has_ldap_start_tls_s="1"
 
10337
fi
 
10338
 
 
10339
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
10340
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
10341
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
10342
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10343
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10344
else
 
10345
  ac_check_lib_save_LIBS=$LIBS
 
10346
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10347
cat >conftest.$ac_ext <<_ACEOF
 
10348
/* confdefs.h.  */
 
10349
_ACEOF
 
10350
cat confdefs.h >>conftest.$ac_ext
 
10351
cat >>conftest.$ac_ext <<_ACEOF
 
10352
/* end confdefs.h.  */
 
10353
 
 
10354
/* Override any gcc2 internal prototype to avoid an error.  */
 
10355
#ifdef __cplusplus
 
10356
extern "C"
 
10357
#endif
 
10358
/* We use char because int might match the return type of a gcc2
 
10359
   builtin and then its argument prototype would still apply.  */
 
10360
char ldap_sslinit ();
 
10361
int
 
10362
main ()
 
10363
{
 
10364
ldap_sslinit ();
 
10365
  ;
 
10366
  return 0;
 
10367
}
 
10368
_ACEOF
 
10369
rm -f conftest.$ac_objext conftest$ac_exeext
 
10370
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10371
  (eval $ac_link) 2>conftest.er1
 
10372
  ac_status=$?
 
10373
  grep -v '^ *+' conftest.er1 >conftest.err
 
10374
  rm -f conftest.er1
 
10375
  cat conftest.err >&5
 
10376
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10377
  (exit $ac_status); } &&
 
10378
         { ac_try='test -z "$ac_c_werror_flag"
 
10379
                         || test ! -s conftest.err'
 
10380
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10381
  (eval $ac_try) 2>&5
 
10382
  ac_status=$?
 
10383
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10384
  (exit $ac_status); }; } &&
 
10385
         { ac_try='test -s conftest$ac_exeext'
 
10386
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10387
  (eval $ac_try) 2>&5
 
10388
  ac_status=$?
 
10389
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10390
  (exit $ac_status); }; }; then
 
10391
  eval "$as_ac_Lib=yes"
 
10392
else
 
10393
  echo "$as_me: failed program was:" >&5
 
10394
sed 's/^/| /' conftest.$ac_ext >&5
 
10395
 
 
10396
eval "$as_ac_Lib=no"
 
10397
fi
 
10398
rm -f conftest.err conftest.$ac_objext \
 
10399
      conftest$ac_exeext conftest.$ac_ext
 
10400
LIBS=$ac_check_lib_save_LIBS
 
10401
fi
 
10402
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10403
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10404
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10405
  apu_has_ldap_sslinit="1"
 
10406
fi
 
10407
 
 
10408
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
10409
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
10410
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
10411
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10412
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10413
else
 
10414
  ac_check_lib_save_LIBS=$LIBS
 
10415
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10416
cat >conftest.$ac_ext <<_ACEOF
 
10417
/* confdefs.h.  */
 
10418
_ACEOF
 
10419
cat confdefs.h >>conftest.$ac_ext
 
10420
cat >>conftest.$ac_ext <<_ACEOF
 
10421
/* end confdefs.h.  */
 
10422
 
 
10423
/* Override any gcc2 internal prototype to avoid an error.  */
 
10424
#ifdef __cplusplus
 
10425
extern "C"
 
10426
#endif
 
10427
/* We use char because int might match the return type of a gcc2
 
10428
   builtin and then its argument prototype would still apply.  */
 
10429
char ldapssl_init ();
 
10430
int
 
10431
main ()
 
10432
{
 
10433
ldapssl_init ();
 
10434
  ;
 
10435
  return 0;
 
10436
}
 
10437
_ACEOF
 
10438
rm -f conftest.$ac_objext conftest$ac_exeext
 
10439
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10440
  (eval $ac_link) 2>conftest.er1
 
10441
  ac_status=$?
 
10442
  grep -v '^ *+' conftest.er1 >conftest.err
 
10443
  rm -f conftest.er1
 
10444
  cat conftest.err >&5
 
10445
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10446
  (exit $ac_status); } &&
 
10447
         { ac_try='test -z "$ac_c_werror_flag"
 
10448
                         || test ! -s conftest.err'
 
10449
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10450
  (eval $ac_try) 2>&5
 
10451
  ac_status=$?
 
10452
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10453
  (exit $ac_status); }; } &&
 
10454
         { ac_try='test -s conftest$ac_exeext'
 
10455
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10456
  (eval $ac_try) 2>&5
 
10457
  ac_status=$?
 
10458
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10459
  (exit $ac_status); }; }; then
 
10460
  eval "$as_ac_Lib=yes"
 
10461
else
 
10462
  echo "$as_me: failed program was:" >&5
 
10463
sed 's/^/| /' conftest.$ac_ext >&5
 
10464
 
 
10465
eval "$as_ac_Lib=no"
 
10466
fi
 
10467
rm -f conftest.err conftest.$ac_objext \
 
10468
      conftest$ac_exeext conftest.$ac_ext
 
10469
LIBS=$ac_check_lib_save_LIBS
 
10470
fi
 
10471
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10472
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10473
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10474
  apu_has_ldapssl_init="1"
 
10475
fi
 
10476
 
 
10477
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
10478
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
10479
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
10480
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10481
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10482
else
 
10483
  ac_check_lib_save_LIBS=$LIBS
 
10484
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10485
cat >conftest.$ac_ext <<_ACEOF
 
10486
/* confdefs.h.  */
 
10487
_ACEOF
 
10488
cat confdefs.h >>conftest.$ac_ext
 
10489
cat >>conftest.$ac_ext <<_ACEOF
 
10490
/* end confdefs.h.  */
 
10491
 
 
10492
/* Override any gcc2 internal prototype to avoid an error.  */
 
10493
#ifdef __cplusplus
 
10494
extern "C"
 
10495
#endif
 
10496
/* We use char because int might match the return type of a gcc2
 
10497
   builtin and then its argument prototype would still apply.  */
 
10498
char ldapssl_install_routines ();
 
10499
int
 
10500
main ()
 
10501
{
 
10502
ldapssl_install_routines ();
 
10503
  ;
 
10504
  return 0;
 
10505
}
 
10506
_ACEOF
 
10507
rm -f conftest.$ac_objext conftest$ac_exeext
 
10508
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10509
  (eval $ac_link) 2>conftest.er1
 
10510
  ac_status=$?
 
10511
  grep -v '^ *+' conftest.er1 >conftest.err
 
10512
  rm -f conftest.er1
 
10513
  cat conftest.err >&5
 
10514
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10515
  (exit $ac_status); } &&
 
10516
         { ac_try='test -z "$ac_c_werror_flag"
 
10517
                         || test ! -s conftest.err'
 
10518
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10519
  (eval $ac_try) 2>&5
 
10520
  ac_status=$?
 
10521
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10522
  (exit $ac_status); }; } &&
 
10523
         { ac_try='test -s conftest$ac_exeext'
 
10524
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10525
  (eval $ac_try) 2>&5
 
10526
  ac_status=$?
 
10527
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10528
  (exit $ac_status); }; }; then
 
10529
  eval "$as_ac_Lib=yes"
 
10530
else
 
10531
  echo "$as_me: failed program was:" >&5
 
10532
sed 's/^/| /' conftest.$ac_ext >&5
 
10533
 
 
10534
eval "$as_ac_Lib=no"
 
10535
fi
 
10536
rm -f conftest.err conftest.$ac_objext \
 
10537
      conftest$ac_exeext conftest.$ac_ext
 
10538
LIBS=$ac_check_lib_save_LIBS
 
10539
fi
 
10540
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10541
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10542
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10543
  apu_has_ldapssl_install_routines="1"
 
10544
fi
 
10545
 
 
10546
        apu_has_ldap="1";
 
10547
 
 
10548
fi
 
10549
 
 
10550
  fi
 
10551
 
 
10552
    else
 
10553
 
 
10554
  if test ${apu_has_ldap} != "1"; then
 
10555
    ldaplib=$LIBLDAP
 
10556
    extralib=
 
10557
    unset ac_cv_lib_${ldaplib}_ldap_init
 
10558
    unset ac_cv_lib_${ldaplib}___ldap_init
 
10559
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
10560
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
10561
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
10562
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10563
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10564
else
 
10565
  ac_check_lib_save_LIBS=$LIBS
 
10566
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10567
cat >conftest.$ac_ext <<_ACEOF
 
10568
/* confdefs.h.  */
 
10569
_ACEOF
 
10570
cat confdefs.h >>conftest.$ac_ext
 
10571
cat >>conftest.$ac_ext <<_ACEOF
 
10572
/* end confdefs.h.  */
 
10573
 
 
10574
/* Override any gcc2 internal prototype to avoid an error.  */
 
10575
#ifdef __cplusplus
 
10576
extern "C"
 
10577
#endif
 
10578
/* We use char because int might match the return type of a gcc2
 
10579
   builtin and then its argument prototype would still apply.  */
 
10580
char ldap_init ();
 
10581
int
 
10582
main ()
 
10583
{
 
10584
ldap_init ();
 
10585
  ;
 
10586
  return 0;
 
10587
}
 
10588
_ACEOF
 
10589
rm -f conftest.$ac_objext conftest$ac_exeext
 
10590
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10591
  (eval $ac_link) 2>conftest.er1
 
10592
  ac_status=$?
 
10593
  grep -v '^ *+' conftest.er1 >conftest.err
 
10594
  rm -f conftest.er1
 
10595
  cat conftest.err >&5
 
10596
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10597
  (exit $ac_status); } &&
 
10598
         { ac_try='test -z "$ac_c_werror_flag"
 
10599
                         || test ! -s conftest.err'
 
10600
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10601
  (eval $ac_try) 2>&5
 
10602
  ac_status=$?
 
10603
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10604
  (exit $ac_status); }; } &&
 
10605
         { ac_try='test -s conftest$ac_exeext'
 
10606
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10607
  (eval $ac_try) 2>&5
 
10608
  ac_status=$?
 
10609
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10610
  (exit $ac_status); }; }; then
 
10611
  eval "$as_ac_Lib=yes"
 
10612
else
 
10613
  echo "$as_me: failed program was:" >&5
 
10614
sed 's/^/| /' conftest.$ac_ext >&5
 
10615
 
 
10616
eval "$as_ac_Lib=no"
 
10617
fi
 
10618
rm -f conftest.err conftest.$ac_objext \
 
10619
      conftest$ac_exeext conftest.$ac_ext
 
10620
LIBS=$ac_check_lib_save_LIBS
 
10621
fi
 
10622
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10623
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10624
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10625
 
 
10626
 
 
10627
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
10628
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
10629
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
10630
  else
 
10631
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
10632
    for i in $apr_addto_bugger; do
 
10633
      apr_addto_duplicate="0"
 
10634
      for j in $APRUTIL_EXPORT_LIBS; do
 
10635
        if test "x$i" = "x$j"; then
 
10636
          apr_addto_duplicate="1"
 
10637
          break
 
10638
        fi
 
10639
      done
 
10640
      if test $apr_addto_duplicate = "0"; then
 
10641
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
10642
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
10643
      fi
 
10644
    done
 
10645
  fi
 
10646
 
 
10647
 
 
10648
  if test "x$APRUTIL_LIBS" = "x"; then
 
10649
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
10650
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
10651
  else
 
10652
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
10653
    for i in $apr_addto_bugger; do
 
10654
      apr_addto_duplicate="0"
 
10655
      for j in $APRUTIL_LIBS; do
 
10656
        if test "x$i" = "x$j"; then
 
10657
          apr_addto_duplicate="1"
 
10658
          break
 
10659
        fi
 
10660
      done
 
10661
      if test $apr_addto_duplicate = "0"; then
 
10662
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
10663
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
10664
      fi
 
10665
    done
 
10666
  fi
 
10667
 
 
10668
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
10669
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
10670
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
10671
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10672
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10673
else
 
10674
  ac_check_lib_save_LIBS=$LIBS
 
10675
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10676
cat >conftest.$ac_ext <<_ACEOF
 
10677
/* confdefs.h.  */
 
10678
_ACEOF
 
10679
cat confdefs.h >>conftest.$ac_ext
 
10680
cat >>conftest.$ac_ext <<_ACEOF
 
10681
/* end confdefs.h.  */
 
10682
 
 
10683
/* Override any gcc2 internal prototype to avoid an error.  */
 
10684
#ifdef __cplusplus
 
10685
extern "C"
 
10686
#endif
 
10687
/* We use char because int might match the return type of a gcc2
 
10688
   builtin and then its argument prototype would still apply.  */
 
10689
char ldapssl_client_init ();
 
10690
int
 
10691
main ()
 
10692
{
 
10693
ldapssl_client_init ();
 
10694
  ;
 
10695
  return 0;
 
10696
}
 
10697
_ACEOF
 
10698
rm -f conftest.$ac_objext conftest$ac_exeext
 
10699
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10700
  (eval $ac_link) 2>conftest.er1
 
10701
  ac_status=$?
 
10702
  grep -v '^ *+' conftest.er1 >conftest.err
 
10703
  rm -f conftest.er1
 
10704
  cat conftest.err >&5
 
10705
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10706
  (exit $ac_status); } &&
 
10707
         { ac_try='test -z "$ac_c_werror_flag"
 
10708
                         || test ! -s conftest.err'
 
10709
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10710
  (eval $ac_try) 2>&5
 
10711
  ac_status=$?
 
10712
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10713
  (exit $ac_status); }; } &&
 
10714
         { ac_try='test -s conftest$ac_exeext'
 
10715
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10716
  (eval $ac_try) 2>&5
 
10717
  ac_status=$?
 
10718
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10719
  (exit $ac_status); }; }; then
 
10720
  eval "$as_ac_Lib=yes"
 
10721
else
 
10722
  echo "$as_me: failed program was:" >&5
 
10723
sed 's/^/| /' conftest.$ac_ext >&5
 
10724
 
 
10725
eval "$as_ac_Lib=no"
 
10726
fi
 
10727
rm -f conftest.err conftest.$ac_objext \
 
10728
      conftest$ac_exeext conftest.$ac_ext
 
10729
LIBS=$ac_check_lib_save_LIBS
 
10730
fi
 
10731
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10732
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10733
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10734
  apu_has_ldapssl_client_init="1"
 
10735
fi
 
10736
 
 
10737
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
10738
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
10739
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
10740
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10741
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10742
else
 
10743
  ac_check_lib_save_LIBS=$LIBS
 
10744
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10745
cat >conftest.$ac_ext <<_ACEOF
 
10746
/* confdefs.h.  */
 
10747
_ACEOF
 
10748
cat confdefs.h >>conftest.$ac_ext
 
10749
cat >>conftest.$ac_ext <<_ACEOF
 
10750
/* end confdefs.h.  */
 
10751
 
 
10752
/* Override any gcc2 internal prototype to avoid an error.  */
 
10753
#ifdef __cplusplus
 
10754
extern "C"
 
10755
#endif
 
10756
/* We use char because int might match the return type of a gcc2
 
10757
   builtin and then its argument prototype would still apply.  */
 
10758
char ldapssl_client_deinit ();
 
10759
int
 
10760
main ()
 
10761
{
 
10762
ldapssl_client_deinit ();
 
10763
  ;
 
10764
  return 0;
 
10765
}
 
10766
_ACEOF
 
10767
rm -f conftest.$ac_objext conftest$ac_exeext
 
10768
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10769
  (eval $ac_link) 2>conftest.er1
 
10770
  ac_status=$?
 
10771
  grep -v '^ *+' conftest.er1 >conftest.err
 
10772
  rm -f conftest.er1
 
10773
  cat conftest.err >&5
 
10774
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10775
  (exit $ac_status); } &&
 
10776
         { ac_try='test -z "$ac_c_werror_flag"
 
10777
                         || test ! -s conftest.err'
 
10778
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10779
  (eval $ac_try) 2>&5
 
10780
  ac_status=$?
 
10781
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10782
  (exit $ac_status); }; } &&
 
10783
         { ac_try='test -s conftest$ac_exeext'
 
10784
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10785
  (eval $ac_try) 2>&5
 
10786
  ac_status=$?
 
10787
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10788
  (exit $ac_status); }; }; then
 
10789
  eval "$as_ac_Lib=yes"
 
10790
else
 
10791
  echo "$as_me: failed program was:" >&5
 
10792
sed 's/^/| /' conftest.$ac_ext >&5
 
10793
 
 
10794
eval "$as_ac_Lib=no"
 
10795
fi
 
10796
rm -f conftest.err conftest.$ac_objext \
 
10797
      conftest$ac_exeext conftest.$ac_ext
 
10798
LIBS=$ac_check_lib_save_LIBS
 
10799
fi
 
10800
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10801
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10802
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10803
  apu_has_ldapssl_client_deinit="1"
 
10804
fi
 
10805
 
 
10806
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
10807
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
10808
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
10809
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10810
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10811
else
 
10812
  ac_check_lib_save_LIBS=$LIBS
 
10813
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10814
cat >conftest.$ac_ext <<_ACEOF
 
10815
/* confdefs.h.  */
 
10816
_ACEOF
 
10817
cat confdefs.h >>conftest.$ac_ext
 
10818
cat >>conftest.$ac_ext <<_ACEOF
 
10819
/* end confdefs.h.  */
 
10820
 
 
10821
/* Override any gcc2 internal prototype to avoid an error.  */
 
10822
#ifdef __cplusplus
 
10823
extern "C"
 
10824
#endif
 
10825
/* We use char because int might match the return type of a gcc2
 
10826
   builtin and then its argument prototype would still apply.  */
 
10827
char ldapssl_add_trusted_cert ();
 
10828
int
 
10829
main ()
 
10830
{
 
10831
ldapssl_add_trusted_cert ();
 
10832
  ;
 
10833
  return 0;
 
10834
}
 
10835
_ACEOF
 
10836
rm -f conftest.$ac_objext conftest$ac_exeext
 
10837
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10838
  (eval $ac_link) 2>conftest.er1
 
10839
  ac_status=$?
 
10840
  grep -v '^ *+' conftest.er1 >conftest.err
 
10841
  rm -f conftest.er1
 
10842
  cat conftest.err >&5
 
10843
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10844
  (exit $ac_status); } &&
 
10845
         { ac_try='test -z "$ac_c_werror_flag"
 
10846
                         || test ! -s conftest.err'
 
10847
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10848
  (eval $ac_try) 2>&5
 
10849
  ac_status=$?
 
10850
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10851
  (exit $ac_status); }; } &&
 
10852
         { ac_try='test -s conftest$ac_exeext'
 
10853
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10854
  (eval $ac_try) 2>&5
 
10855
  ac_status=$?
 
10856
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10857
  (exit $ac_status); }; }; then
 
10858
  eval "$as_ac_Lib=yes"
 
10859
else
 
10860
  echo "$as_me: failed program was:" >&5
 
10861
sed 's/^/| /' conftest.$ac_ext >&5
 
10862
 
 
10863
eval "$as_ac_Lib=no"
 
10864
fi
 
10865
rm -f conftest.err conftest.$ac_objext \
 
10866
      conftest$ac_exeext conftest.$ac_ext
 
10867
LIBS=$ac_check_lib_save_LIBS
 
10868
fi
 
10869
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10870
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10871
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10872
  apu_has_ldapssl_add_trusted_cert="1"
 
10873
fi
 
10874
 
 
10875
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
10876
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
10877
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
10878
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10879
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10880
else
 
10881
  ac_check_lib_save_LIBS=$LIBS
 
10882
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10883
cat >conftest.$ac_ext <<_ACEOF
 
10884
/* confdefs.h.  */
 
10885
_ACEOF
 
10886
cat confdefs.h >>conftest.$ac_ext
 
10887
cat >>conftest.$ac_ext <<_ACEOF
 
10888
/* end confdefs.h.  */
 
10889
 
 
10890
/* Override any gcc2 internal prototype to avoid an error.  */
 
10891
#ifdef __cplusplus
 
10892
extern "C"
 
10893
#endif
 
10894
/* We use char because int might match the return type of a gcc2
 
10895
   builtin and then its argument prototype would still apply.  */
 
10896
char ldap_start_tls_s ();
 
10897
int
 
10898
main ()
 
10899
{
 
10900
ldap_start_tls_s ();
 
10901
  ;
 
10902
  return 0;
 
10903
}
 
10904
_ACEOF
 
10905
rm -f conftest.$ac_objext conftest$ac_exeext
 
10906
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10907
  (eval $ac_link) 2>conftest.er1
 
10908
  ac_status=$?
 
10909
  grep -v '^ *+' conftest.er1 >conftest.err
 
10910
  rm -f conftest.er1
 
10911
  cat conftest.err >&5
 
10912
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10913
  (exit $ac_status); } &&
 
10914
         { ac_try='test -z "$ac_c_werror_flag"
 
10915
                         || test ! -s conftest.err'
 
10916
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10917
  (eval $ac_try) 2>&5
 
10918
  ac_status=$?
 
10919
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10920
  (exit $ac_status); }; } &&
 
10921
         { ac_try='test -s conftest$ac_exeext'
 
10922
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10923
  (eval $ac_try) 2>&5
 
10924
  ac_status=$?
 
10925
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10926
  (exit $ac_status); }; }; then
 
10927
  eval "$as_ac_Lib=yes"
 
10928
else
 
10929
  echo "$as_me: failed program was:" >&5
 
10930
sed 's/^/| /' conftest.$ac_ext >&5
 
10931
 
 
10932
eval "$as_ac_Lib=no"
 
10933
fi
 
10934
rm -f conftest.err conftest.$ac_objext \
 
10935
      conftest$ac_exeext conftest.$ac_ext
 
10936
LIBS=$ac_check_lib_save_LIBS
 
10937
fi
 
10938
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
10939
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
10940
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
10941
  apu_has_ldap_start_tls_s="1"
 
10942
fi
 
10943
 
 
10944
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
10945
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
10946
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
10947
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
10948
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10949
else
 
10950
  ac_check_lib_save_LIBS=$LIBS
 
10951
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
10952
cat >conftest.$ac_ext <<_ACEOF
 
10953
/* confdefs.h.  */
 
10954
_ACEOF
 
10955
cat confdefs.h >>conftest.$ac_ext
 
10956
cat >>conftest.$ac_ext <<_ACEOF
 
10957
/* end confdefs.h.  */
 
10958
 
 
10959
/* Override any gcc2 internal prototype to avoid an error.  */
 
10960
#ifdef __cplusplus
 
10961
extern "C"
 
10962
#endif
 
10963
/* We use char because int might match the return type of a gcc2
 
10964
   builtin and then its argument prototype would still apply.  */
 
10965
char ldap_sslinit ();
 
10966
int
 
10967
main ()
 
10968
{
 
10969
ldap_sslinit ();
 
10970
  ;
 
10971
  return 0;
 
10972
}
 
10973
_ACEOF
 
10974
rm -f conftest.$ac_objext conftest$ac_exeext
 
10975
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10976
  (eval $ac_link) 2>conftest.er1
 
10977
  ac_status=$?
 
10978
  grep -v '^ *+' conftest.er1 >conftest.err
 
10979
  rm -f conftest.er1
 
10980
  cat conftest.err >&5
 
10981
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10982
  (exit $ac_status); } &&
 
10983
         { ac_try='test -z "$ac_c_werror_flag"
 
10984
                         || test ! -s conftest.err'
 
10985
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10986
  (eval $ac_try) 2>&5
 
10987
  ac_status=$?
 
10988
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10989
  (exit $ac_status); }; } &&
 
10990
         { ac_try='test -s conftest$ac_exeext'
 
10991
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10992
  (eval $ac_try) 2>&5
 
10993
  ac_status=$?
 
10994
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10995
  (exit $ac_status); }; }; then
 
10996
  eval "$as_ac_Lib=yes"
 
10997
else
 
10998
  echo "$as_me: failed program was:" >&5
 
10999
sed 's/^/| /' conftest.$ac_ext >&5
 
11000
 
 
11001
eval "$as_ac_Lib=no"
 
11002
fi
 
11003
rm -f conftest.err conftest.$ac_objext \
 
11004
      conftest$ac_exeext conftest.$ac_ext
 
11005
LIBS=$ac_check_lib_save_LIBS
 
11006
fi
 
11007
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11008
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11009
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11010
  apu_has_ldap_sslinit="1"
 
11011
fi
 
11012
 
 
11013
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
11014
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
11015
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
11016
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11017
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11018
else
 
11019
  ac_check_lib_save_LIBS=$LIBS
 
11020
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11021
cat >conftest.$ac_ext <<_ACEOF
 
11022
/* confdefs.h.  */
 
11023
_ACEOF
 
11024
cat confdefs.h >>conftest.$ac_ext
 
11025
cat >>conftest.$ac_ext <<_ACEOF
 
11026
/* end confdefs.h.  */
 
11027
 
 
11028
/* Override any gcc2 internal prototype to avoid an error.  */
 
11029
#ifdef __cplusplus
 
11030
extern "C"
 
11031
#endif
 
11032
/* We use char because int might match the return type of a gcc2
 
11033
   builtin and then its argument prototype would still apply.  */
 
11034
char ldapssl_init ();
 
11035
int
 
11036
main ()
 
11037
{
 
11038
ldapssl_init ();
 
11039
  ;
 
11040
  return 0;
 
11041
}
 
11042
_ACEOF
 
11043
rm -f conftest.$ac_objext conftest$ac_exeext
 
11044
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11045
  (eval $ac_link) 2>conftest.er1
 
11046
  ac_status=$?
 
11047
  grep -v '^ *+' conftest.er1 >conftest.err
 
11048
  rm -f conftest.er1
 
11049
  cat conftest.err >&5
 
11050
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11051
  (exit $ac_status); } &&
 
11052
         { ac_try='test -z "$ac_c_werror_flag"
 
11053
                         || test ! -s conftest.err'
 
11054
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11055
  (eval $ac_try) 2>&5
 
11056
  ac_status=$?
 
11057
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11058
  (exit $ac_status); }; } &&
 
11059
         { ac_try='test -s conftest$ac_exeext'
 
11060
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11061
  (eval $ac_try) 2>&5
 
11062
  ac_status=$?
 
11063
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11064
  (exit $ac_status); }; }; then
 
11065
  eval "$as_ac_Lib=yes"
 
11066
else
 
11067
  echo "$as_me: failed program was:" >&5
 
11068
sed 's/^/| /' conftest.$ac_ext >&5
 
11069
 
 
11070
eval "$as_ac_Lib=no"
 
11071
fi
 
11072
rm -f conftest.err conftest.$ac_objext \
 
11073
      conftest$ac_exeext conftest.$ac_ext
 
11074
LIBS=$ac_check_lib_save_LIBS
 
11075
fi
 
11076
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11077
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11078
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11079
  apu_has_ldapssl_init="1"
 
11080
fi
 
11081
 
 
11082
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
11083
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
11084
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
11085
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11086
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11087
else
 
11088
  ac_check_lib_save_LIBS=$LIBS
 
11089
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11090
cat >conftest.$ac_ext <<_ACEOF
 
11091
/* confdefs.h.  */
 
11092
_ACEOF
 
11093
cat confdefs.h >>conftest.$ac_ext
 
11094
cat >>conftest.$ac_ext <<_ACEOF
 
11095
/* end confdefs.h.  */
 
11096
 
 
11097
/* Override any gcc2 internal prototype to avoid an error.  */
 
11098
#ifdef __cplusplus
 
11099
extern "C"
 
11100
#endif
 
11101
/* We use char because int might match the return type of a gcc2
 
11102
   builtin and then its argument prototype would still apply.  */
 
11103
char ldapssl_install_routines ();
 
11104
int
 
11105
main ()
 
11106
{
 
11107
ldapssl_install_routines ();
 
11108
  ;
 
11109
  return 0;
 
11110
}
 
11111
_ACEOF
 
11112
rm -f conftest.$ac_objext conftest$ac_exeext
 
11113
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11114
  (eval $ac_link) 2>conftest.er1
 
11115
  ac_status=$?
 
11116
  grep -v '^ *+' conftest.er1 >conftest.err
 
11117
  rm -f conftest.er1
 
11118
  cat conftest.err >&5
 
11119
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11120
  (exit $ac_status); } &&
 
11121
         { ac_try='test -z "$ac_c_werror_flag"
 
11122
                         || test ! -s conftest.err'
 
11123
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11124
  (eval $ac_try) 2>&5
 
11125
  ac_status=$?
 
11126
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11127
  (exit $ac_status); }; } &&
 
11128
         { ac_try='test -s conftest$ac_exeext'
 
11129
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11130
  (eval $ac_try) 2>&5
 
11131
  ac_status=$?
 
11132
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11133
  (exit $ac_status); }; }; then
 
11134
  eval "$as_ac_Lib=yes"
 
11135
else
 
11136
  echo "$as_me: failed program was:" >&5
 
11137
sed 's/^/| /' conftest.$ac_ext >&5
 
11138
 
 
11139
eval "$as_ac_Lib=no"
 
11140
fi
 
11141
rm -f conftest.err conftest.$ac_objext \
 
11142
      conftest$ac_exeext conftest.$ac_ext
 
11143
LIBS=$ac_check_lib_save_LIBS
 
11144
fi
 
11145
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11146
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11147
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11148
  apu_has_ldapssl_install_routines="1"
 
11149
fi
 
11150
 
 
11151
        apu_has_ldap="1";
 
11152
 
 
11153
fi
 
11154
 
 
11155
  fi
 
11156
 
 
11157
 
 
11158
  if test ${apu_has_ldap} != "1"; then
 
11159
    ldaplib=$LIBLDAP
 
11160
    extralib="-lresolv"
 
11161
    unset ac_cv_lib_${ldaplib}_ldap_init
 
11162
    unset ac_cv_lib_${ldaplib}___ldap_init
 
11163
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
11164
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
11165
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
11166
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11167
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11168
else
 
11169
  ac_check_lib_save_LIBS=$LIBS
 
11170
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11171
cat >conftest.$ac_ext <<_ACEOF
 
11172
/* confdefs.h.  */
 
11173
_ACEOF
 
11174
cat confdefs.h >>conftest.$ac_ext
 
11175
cat >>conftest.$ac_ext <<_ACEOF
 
11176
/* end confdefs.h.  */
 
11177
 
 
11178
/* Override any gcc2 internal prototype to avoid an error.  */
 
11179
#ifdef __cplusplus
 
11180
extern "C"
 
11181
#endif
 
11182
/* We use char because int might match the return type of a gcc2
 
11183
   builtin and then its argument prototype would still apply.  */
 
11184
char ldap_init ();
 
11185
int
 
11186
main ()
 
11187
{
 
11188
ldap_init ();
 
11189
  ;
 
11190
  return 0;
 
11191
}
 
11192
_ACEOF
 
11193
rm -f conftest.$ac_objext conftest$ac_exeext
 
11194
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11195
  (eval $ac_link) 2>conftest.er1
 
11196
  ac_status=$?
 
11197
  grep -v '^ *+' conftest.er1 >conftest.err
 
11198
  rm -f conftest.er1
 
11199
  cat conftest.err >&5
 
11200
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11201
  (exit $ac_status); } &&
 
11202
         { ac_try='test -z "$ac_c_werror_flag"
 
11203
                         || test ! -s conftest.err'
 
11204
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11205
  (eval $ac_try) 2>&5
 
11206
  ac_status=$?
 
11207
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11208
  (exit $ac_status); }; } &&
 
11209
         { ac_try='test -s conftest$ac_exeext'
 
11210
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11211
  (eval $ac_try) 2>&5
 
11212
  ac_status=$?
 
11213
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11214
  (exit $ac_status); }; }; then
 
11215
  eval "$as_ac_Lib=yes"
 
11216
else
 
11217
  echo "$as_me: failed program was:" >&5
 
11218
sed 's/^/| /' conftest.$ac_ext >&5
 
11219
 
 
11220
eval "$as_ac_Lib=no"
 
11221
fi
 
11222
rm -f conftest.err conftest.$ac_objext \
 
11223
      conftest$ac_exeext conftest.$ac_ext
 
11224
LIBS=$ac_check_lib_save_LIBS
 
11225
fi
 
11226
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11227
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11228
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11229
 
 
11230
 
 
11231
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
11232
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
11233
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
11234
  else
 
11235
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
11236
    for i in $apr_addto_bugger; do
 
11237
      apr_addto_duplicate="0"
 
11238
      for j in $APRUTIL_EXPORT_LIBS; do
 
11239
        if test "x$i" = "x$j"; then
 
11240
          apr_addto_duplicate="1"
 
11241
          break
 
11242
        fi
 
11243
      done
 
11244
      if test $apr_addto_duplicate = "0"; then
 
11245
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
11246
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
11247
      fi
 
11248
    done
 
11249
  fi
 
11250
 
 
11251
 
 
11252
  if test "x$APRUTIL_LIBS" = "x"; then
 
11253
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
11254
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
11255
  else
 
11256
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
11257
    for i in $apr_addto_bugger; do
 
11258
      apr_addto_duplicate="0"
 
11259
      for j in $APRUTIL_LIBS; do
 
11260
        if test "x$i" = "x$j"; then
 
11261
          apr_addto_duplicate="1"
 
11262
          break
 
11263
        fi
 
11264
      done
 
11265
      if test $apr_addto_duplicate = "0"; then
 
11266
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
11267
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
11268
      fi
 
11269
    done
 
11270
  fi
 
11271
 
 
11272
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
11273
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
11274
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
11275
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11276
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11277
else
 
11278
  ac_check_lib_save_LIBS=$LIBS
 
11279
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11280
cat >conftest.$ac_ext <<_ACEOF
 
11281
/* confdefs.h.  */
 
11282
_ACEOF
 
11283
cat confdefs.h >>conftest.$ac_ext
 
11284
cat >>conftest.$ac_ext <<_ACEOF
 
11285
/* end confdefs.h.  */
 
11286
 
 
11287
/* Override any gcc2 internal prototype to avoid an error.  */
 
11288
#ifdef __cplusplus
 
11289
extern "C"
 
11290
#endif
 
11291
/* We use char because int might match the return type of a gcc2
 
11292
   builtin and then its argument prototype would still apply.  */
 
11293
char ldapssl_client_init ();
 
11294
int
 
11295
main ()
 
11296
{
 
11297
ldapssl_client_init ();
 
11298
  ;
 
11299
  return 0;
 
11300
}
 
11301
_ACEOF
 
11302
rm -f conftest.$ac_objext conftest$ac_exeext
 
11303
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11304
  (eval $ac_link) 2>conftest.er1
 
11305
  ac_status=$?
 
11306
  grep -v '^ *+' conftest.er1 >conftest.err
 
11307
  rm -f conftest.er1
 
11308
  cat conftest.err >&5
 
11309
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11310
  (exit $ac_status); } &&
 
11311
         { ac_try='test -z "$ac_c_werror_flag"
 
11312
                         || test ! -s conftest.err'
 
11313
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11314
  (eval $ac_try) 2>&5
 
11315
  ac_status=$?
 
11316
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11317
  (exit $ac_status); }; } &&
 
11318
         { ac_try='test -s conftest$ac_exeext'
 
11319
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11320
  (eval $ac_try) 2>&5
 
11321
  ac_status=$?
 
11322
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11323
  (exit $ac_status); }; }; then
 
11324
  eval "$as_ac_Lib=yes"
 
11325
else
 
11326
  echo "$as_me: failed program was:" >&5
 
11327
sed 's/^/| /' conftest.$ac_ext >&5
 
11328
 
 
11329
eval "$as_ac_Lib=no"
 
11330
fi
 
11331
rm -f conftest.err conftest.$ac_objext \
 
11332
      conftest$ac_exeext conftest.$ac_ext
 
11333
LIBS=$ac_check_lib_save_LIBS
 
11334
fi
 
11335
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11336
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11337
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11338
  apu_has_ldapssl_client_init="1"
 
11339
fi
 
11340
 
 
11341
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
11342
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
11343
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
11344
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11345
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11346
else
 
11347
  ac_check_lib_save_LIBS=$LIBS
 
11348
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11349
cat >conftest.$ac_ext <<_ACEOF
 
11350
/* confdefs.h.  */
 
11351
_ACEOF
 
11352
cat confdefs.h >>conftest.$ac_ext
 
11353
cat >>conftest.$ac_ext <<_ACEOF
 
11354
/* end confdefs.h.  */
 
11355
 
 
11356
/* Override any gcc2 internal prototype to avoid an error.  */
 
11357
#ifdef __cplusplus
 
11358
extern "C"
 
11359
#endif
 
11360
/* We use char because int might match the return type of a gcc2
 
11361
   builtin and then its argument prototype would still apply.  */
 
11362
char ldapssl_client_deinit ();
 
11363
int
 
11364
main ()
 
11365
{
 
11366
ldapssl_client_deinit ();
 
11367
  ;
 
11368
  return 0;
 
11369
}
 
11370
_ACEOF
 
11371
rm -f conftest.$ac_objext conftest$ac_exeext
 
11372
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11373
  (eval $ac_link) 2>conftest.er1
 
11374
  ac_status=$?
 
11375
  grep -v '^ *+' conftest.er1 >conftest.err
 
11376
  rm -f conftest.er1
 
11377
  cat conftest.err >&5
 
11378
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11379
  (exit $ac_status); } &&
 
11380
         { ac_try='test -z "$ac_c_werror_flag"
 
11381
                         || test ! -s conftest.err'
 
11382
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11383
  (eval $ac_try) 2>&5
 
11384
  ac_status=$?
 
11385
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11386
  (exit $ac_status); }; } &&
 
11387
         { ac_try='test -s conftest$ac_exeext'
 
11388
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11389
  (eval $ac_try) 2>&5
 
11390
  ac_status=$?
 
11391
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11392
  (exit $ac_status); }; }; then
 
11393
  eval "$as_ac_Lib=yes"
 
11394
else
 
11395
  echo "$as_me: failed program was:" >&5
 
11396
sed 's/^/| /' conftest.$ac_ext >&5
 
11397
 
 
11398
eval "$as_ac_Lib=no"
 
11399
fi
 
11400
rm -f conftest.err conftest.$ac_objext \
 
11401
      conftest$ac_exeext conftest.$ac_ext
 
11402
LIBS=$ac_check_lib_save_LIBS
 
11403
fi
 
11404
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11405
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11406
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11407
  apu_has_ldapssl_client_deinit="1"
 
11408
fi
 
11409
 
 
11410
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
11411
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
11412
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
11413
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11414
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11415
else
 
11416
  ac_check_lib_save_LIBS=$LIBS
 
11417
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11418
cat >conftest.$ac_ext <<_ACEOF
 
11419
/* confdefs.h.  */
 
11420
_ACEOF
 
11421
cat confdefs.h >>conftest.$ac_ext
 
11422
cat >>conftest.$ac_ext <<_ACEOF
 
11423
/* end confdefs.h.  */
 
11424
 
 
11425
/* Override any gcc2 internal prototype to avoid an error.  */
 
11426
#ifdef __cplusplus
 
11427
extern "C"
 
11428
#endif
 
11429
/* We use char because int might match the return type of a gcc2
 
11430
   builtin and then its argument prototype would still apply.  */
 
11431
char ldapssl_add_trusted_cert ();
 
11432
int
 
11433
main ()
 
11434
{
 
11435
ldapssl_add_trusted_cert ();
 
11436
  ;
 
11437
  return 0;
 
11438
}
 
11439
_ACEOF
 
11440
rm -f conftest.$ac_objext conftest$ac_exeext
 
11441
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11442
  (eval $ac_link) 2>conftest.er1
 
11443
  ac_status=$?
 
11444
  grep -v '^ *+' conftest.er1 >conftest.err
 
11445
  rm -f conftest.er1
 
11446
  cat conftest.err >&5
 
11447
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11448
  (exit $ac_status); } &&
 
11449
         { ac_try='test -z "$ac_c_werror_flag"
 
11450
                         || test ! -s conftest.err'
 
11451
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11452
  (eval $ac_try) 2>&5
 
11453
  ac_status=$?
 
11454
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11455
  (exit $ac_status); }; } &&
 
11456
         { ac_try='test -s conftest$ac_exeext'
 
11457
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11458
  (eval $ac_try) 2>&5
 
11459
  ac_status=$?
 
11460
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11461
  (exit $ac_status); }; }; then
 
11462
  eval "$as_ac_Lib=yes"
 
11463
else
 
11464
  echo "$as_me: failed program was:" >&5
 
11465
sed 's/^/| /' conftest.$ac_ext >&5
 
11466
 
 
11467
eval "$as_ac_Lib=no"
 
11468
fi
 
11469
rm -f conftest.err conftest.$ac_objext \
 
11470
      conftest$ac_exeext conftest.$ac_ext
 
11471
LIBS=$ac_check_lib_save_LIBS
 
11472
fi
 
11473
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11474
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11475
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11476
  apu_has_ldapssl_add_trusted_cert="1"
 
11477
fi
 
11478
 
 
11479
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
11480
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
11481
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
11482
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11483
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11484
else
 
11485
  ac_check_lib_save_LIBS=$LIBS
 
11486
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11487
cat >conftest.$ac_ext <<_ACEOF
 
11488
/* confdefs.h.  */
 
11489
_ACEOF
 
11490
cat confdefs.h >>conftest.$ac_ext
 
11491
cat >>conftest.$ac_ext <<_ACEOF
 
11492
/* end confdefs.h.  */
 
11493
 
 
11494
/* Override any gcc2 internal prototype to avoid an error.  */
 
11495
#ifdef __cplusplus
 
11496
extern "C"
 
11497
#endif
 
11498
/* We use char because int might match the return type of a gcc2
 
11499
   builtin and then its argument prototype would still apply.  */
 
11500
char ldap_start_tls_s ();
 
11501
int
 
11502
main ()
 
11503
{
 
11504
ldap_start_tls_s ();
 
11505
  ;
 
11506
  return 0;
 
11507
}
 
11508
_ACEOF
 
11509
rm -f conftest.$ac_objext conftest$ac_exeext
 
11510
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11511
  (eval $ac_link) 2>conftest.er1
 
11512
  ac_status=$?
 
11513
  grep -v '^ *+' conftest.er1 >conftest.err
 
11514
  rm -f conftest.er1
 
11515
  cat conftest.err >&5
 
11516
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11517
  (exit $ac_status); } &&
 
11518
         { ac_try='test -z "$ac_c_werror_flag"
 
11519
                         || test ! -s conftest.err'
 
11520
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11521
  (eval $ac_try) 2>&5
 
11522
  ac_status=$?
 
11523
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11524
  (exit $ac_status); }; } &&
 
11525
         { ac_try='test -s conftest$ac_exeext'
 
11526
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11527
  (eval $ac_try) 2>&5
 
11528
  ac_status=$?
 
11529
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11530
  (exit $ac_status); }; }; then
 
11531
  eval "$as_ac_Lib=yes"
 
11532
else
 
11533
  echo "$as_me: failed program was:" >&5
 
11534
sed 's/^/| /' conftest.$ac_ext >&5
 
11535
 
 
11536
eval "$as_ac_Lib=no"
 
11537
fi
 
11538
rm -f conftest.err conftest.$ac_objext \
 
11539
      conftest$ac_exeext conftest.$ac_ext
 
11540
LIBS=$ac_check_lib_save_LIBS
 
11541
fi
 
11542
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11543
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11544
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11545
  apu_has_ldap_start_tls_s="1"
 
11546
fi
 
11547
 
 
11548
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
11549
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
11550
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
11551
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11552
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11553
else
 
11554
  ac_check_lib_save_LIBS=$LIBS
 
11555
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11556
cat >conftest.$ac_ext <<_ACEOF
 
11557
/* confdefs.h.  */
 
11558
_ACEOF
 
11559
cat confdefs.h >>conftest.$ac_ext
 
11560
cat >>conftest.$ac_ext <<_ACEOF
 
11561
/* end confdefs.h.  */
 
11562
 
 
11563
/* Override any gcc2 internal prototype to avoid an error.  */
 
11564
#ifdef __cplusplus
 
11565
extern "C"
 
11566
#endif
 
11567
/* We use char because int might match the return type of a gcc2
 
11568
   builtin and then its argument prototype would still apply.  */
 
11569
char ldap_sslinit ();
 
11570
int
 
11571
main ()
 
11572
{
 
11573
ldap_sslinit ();
 
11574
  ;
 
11575
  return 0;
 
11576
}
 
11577
_ACEOF
 
11578
rm -f conftest.$ac_objext conftest$ac_exeext
 
11579
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11580
  (eval $ac_link) 2>conftest.er1
 
11581
  ac_status=$?
 
11582
  grep -v '^ *+' conftest.er1 >conftest.err
 
11583
  rm -f conftest.er1
 
11584
  cat conftest.err >&5
 
11585
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11586
  (exit $ac_status); } &&
 
11587
         { ac_try='test -z "$ac_c_werror_flag"
 
11588
                         || test ! -s conftest.err'
 
11589
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11590
  (eval $ac_try) 2>&5
 
11591
  ac_status=$?
 
11592
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11593
  (exit $ac_status); }; } &&
 
11594
         { ac_try='test -s conftest$ac_exeext'
 
11595
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11596
  (eval $ac_try) 2>&5
 
11597
  ac_status=$?
 
11598
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11599
  (exit $ac_status); }; }; then
 
11600
  eval "$as_ac_Lib=yes"
 
11601
else
 
11602
  echo "$as_me: failed program was:" >&5
 
11603
sed 's/^/| /' conftest.$ac_ext >&5
 
11604
 
 
11605
eval "$as_ac_Lib=no"
 
11606
fi
 
11607
rm -f conftest.err conftest.$ac_objext \
 
11608
      conftest$ac_exeext conftest.$ac_ext
 
11609
LIBS=$ac_check_lib_save_LIBS
 
11610
fi
 
11611
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11612
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11613
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11614
  apu_has_ldap_sslinit="1"
 
11615
fi
 
11616
 
 
11617
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
11618
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
11619
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
11620
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11621
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11622
else
 
11623
  ac_check_lib_save_LIBS=$LIBS
 
11624
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11625
cat >conftest.$ac_ext <<_ACEOF
 
11626
/* confdefs.h.  */
 
11627
_ACEOF
 
11628
cat confdefs.h >>conftest.$ac_ext
 
11629
cat >>conftest.$ac_ext <<_ACEOF
 
11630
/* end confdefs.h.  */
 
11631
 
 
11632
/* Override any gcc2 internal prototype to avoid an error.  */
 
11633
#ifdef __cplusplus
 
11634
extern "C"
 
11635
#endif
 
11636
/* We use char because int might match the return type of a gcc2
 
11637
   builtin and then its argument prototype would still apply.  */
 
11638
char ldapssl_init ();
 
11639
int
 
11640
main ()
 
11641
{
 
11642
ldapssl_init ();
 
11643
  ;
 
11644
  return 0;
 
11645
}
 
11646
_ACEOF
 
11647
rm -f conftest.$ac_objext conftest$ac_exeext
 
11648
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11649
  (eval $ac_link) 2>conftest.er1
 
11650
  ac_status=$?
 
11651
  grep -v '^ *+' conftest.er1 >conftest.err
 
11652
  rm -f conftest.er1
 
11653
  cat conftest.err >&5
 
11654
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11655
  (exit $ac_status); } &&
 
11656
         { ac_try='test -z "$ac_c_werror_flag"
 
11657
                         || test ! -s conftest.err'
 
11658
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11659
  (eval $ac_try) 2>&5
 
11660
  ac_status=$?
 
11661
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11662
  (exit $ac_status); }; } &&
 
11663
         { ac_try='test -s conftest$ac_exeext'
 
11664
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11665
  (eval $ac_try) 2>&5
 
11666
  ac_status=$?
 
11667
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11668
  (exit $ac_status); }; }; then
 
11669
  eval "$as_ac_Lib=yes"
 
11670
else
 
11671
  echo "$as_me: failed program was:" >&5
 
11672
sed 's/^/| /' conftest.$ac_ext >&5
 
11673
 
 
11674
eval "$as_ac_Lib=no"
 
11675
fi
 
11676
rm -f conftest.err conftest.$ac_objext \
 
11677
      conftest$ac_exeext conftest.$ac_ext
 
11678
LIBS=$ac_check_lib_save_LIBS
 
11679
fi
 
11680
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11681
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11682
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11683
  apu_has_ldapssl_init="1"
 
11684
fi
 
11685
 
 
11686
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
11687
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
11688
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
11689
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11690
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11691
else
 
11692
  ac_check_lib_save_LIBS=$LIBS
 
11693
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11694
cat >conftest.$ac_ext <<_ACEOF
 
11695
/* confdefs.h.  */
 
11696
_ACEOF
 
11697
cat confdefs.h >>conftest.$ac_ext
 
11698
cat >>conftest.$ac_ext <<_ACEOF
 
11699
/* end confdefs.h.  */
 
11700
 
 
11701
/* Override any gcc2 internal prototype to avoid an error.  */
 
11702
#ifdef __cplusplus
 
11703
extern "C"
 
11704
#endif
 
11705
/* We use char because int might match the return type of a gcc2
 
11706
   builtin and then its argument prototype would still apply.  */
 
11707
char ldapssl_install_routines ();
 
11708
int
 
11709
main ()
 
11710
{
 
11711
ldapssl_install_routines ();
 
11712
  ;
 
11713
  return 0;
 
11714
}
 
11715
_ACEOF
 
11716
rm -f conftest.$ac_objext conftest$ac_exeext
 
11717
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11718
  (eval $ac_link) 2>conftest.er1
 
11719
  ac_status=$?
 
11720
  grep -v '^ *+' conftest.er1 >conftest.err
 
11721
  rm -f conftest.er1
 
11722
  cat conftest.err >&5
 
11723
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11724
  (exit $ac_status); } &&
 
11725
         { ac_try='test -z "$ac_c_werror_flag"
 
11726
                         || test ! -s conftest.err'
 
11727
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11728
  (eval $ac_try) 2>&5
 
11729
  ac_status=$?
 
11730
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11731
  (exit $ac_status); }; } &&
 
11732
         { ac_try='test -s conftest$ac_exeext'
 
11733
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11734
  (eval $ac_try) 2>&5
 
11735
  ac_status=$?
 
11736
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11737
  (exit $ac_status); }; }; then
 
11738
  eval "$as_ac_Lib=yes"
 
11739
else
 
11740
  echo "$as_me: failed program was:" >&5
 
11741
sed 's/^/| /' conftest.$ac_ext >&5
 
11742
 
 
11743
eval "$as_ac_Lib=no"
 
11744
fi
 
11745
rm -f conftest.err conftest.$ac_objext \
 
11746
      conftest$ac_exeext conftest.$ac_ext
 
11747
LIBS=$ac_check_lib_save_LIBS
 
11748
fi
 
11749
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11750
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11751
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11752
  apu_has_ldapssl_install_routines="1"
 
11753
fi
 
11754
 
 
11755
        apu_has_ldap="1";
 
11756
 
 
11757
fi
 
11758
 
 
11759
  fi
 
11760
 
 
11761
 
 
11762
  if test ${apu_has_ldap} != "1"; then
 
11763
    ldaplib=$LIBLDAP
 
11764
    extralib="-lresolv -lsocket -lnsl"
 
11765
    unset ac_cv_lib_${ldaplib}_ldap_init
 
11766
    unset ac_cv_lib_${ldaplib}___ldap_init
 
11767
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
11768
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
11769
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
11770
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11771
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11772
else
 
11773
  ac_check_lib_save_LIBS=$LIBS
 
11774
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11775
cat >conftest.$ac_ext <<_ACEOF
 
11776
/* confdefs.h.  */
 
11777
_ACEOF
 
11778
cat confdefs.h >>conftest.$ac_ext
 
11779
cat >>conftest.$ac_ext <<_ACEOF
 
11780
/* end confdefs.h.  */
 
11781
 
 
11782
/* Override any gcc2 internal prototype to avoid an error.  */
 
11783
#ifdef __cplusplus
 
11784
extern "C"
 
11785
#endif
 
11786
/* We use char because int might match the return type of a gcc2
 
11787
   builtin and then its argument prototype would still apply.  */
 
11788
char ldap_init ();
 
11789
int
 
11790
main ()
 
11791
{
 
11792
ldap_init ();
 
11793
  ;
 
11794
  return 0;
 
11795
}
 
11796
_ACEOF
 
11797
rm -f conftest.$ac_objext conftest$ac_exeext
 
11798
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11799
  (eval $ac_link) 2>conftest.er1
 
11800
  ac_status=$?
 
11801
  grep -v '^ *+' conftest.er1 >conftest.err
 
11802
  rm -f conftest.er1
 
11803
  cat conftest.err >&5
 
11804
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11805
  (exit $ac_status); } &&
 
11806
         { ac_try='test -z "$ac_c_werror_flag"
 
11807
                         || test ! -s conftest.err'
 
11808
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11809
  (eval $ac_try) 2>&5
 
11810
  ac_status=$?
 
11811
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11812
  (exit $ac_status); }; } &&
 
11813
         { ac_try='test -s conftest$ac_exeext'
 
11814
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11815
  (eval $ac_try) 2>&5
 
11816
  ac_status=$?
 
11817
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11818
  (exit $ac_status); }; }; then
 
11819
  eval "$as_ac_Lib=yes"
 
11820
else
 
11821
  echo "$as_me: failed program was:" >&5
 
11822
sed 's/^/| /' conftest.$ac_ext >&5
 
11823
 
 
11824
eval "$as_ac_Lib=no"
 
11825
fi
 
11826
rm -f conftest.err conftest.$ac_objext \
 
11827
      conftest$ac_exeext conftest.$ac_ext
 
11828
LIBS=$ac_check_lib_save_LIBS
 
11829
fi
 
11830
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11831
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11832
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11833
 
 
11834
 
 
11835
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
11836
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
11837
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
11838
  else
 
11839
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
11840
    for i in $apr_addto_bugger; do
 
11841
      apr_addto_duplicate="0"
 
11842
      for j in $APRUTIL_EXPORT_LIBS; do
 
11843
        if test "x$i" = "x$j"; then
 
11844
          apr_addto_duplicate="1"
 
11845
          break
 
11846
        fi
 
11847
      done
 
11848
      if test $apr_addto_duplicate = "0"; then
 
11849
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
11850
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
11851
      fi
 
11852
    done
 
11853
  fi
 
11854
 
 
11855
 
 
11856
  if test "x$APRUTIL_LIBS" = "x"; then
 
11857
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
11858
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
11859
  else
 
11860
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
11861
    for i in $apr_addto_bugger; do
 
11862
      apr_addto_duplicate="0"
 
11863
      for j in $APRUTIL_LIBS; do
 
11864
        if test "x$i" = "x$j"; then
 
11865
          apr_addto_duplicate="1"
 
11866
          break
 
11867
        fi
 
11868
      done
 
11869
      if test $apr_addto_duplicate = "0"; then
 
11870
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
11871
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
11872
      fi
 
11873
    done
 
11874
  fi
 
11875
 
 
11876
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
11877
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
11878
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
11879
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11880
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11881
else
 
11882
  ac_check_lib_save_LIBS=$LIBS
 
11883
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11884
cat >conftest.$ac_ext <<_ACEOF
 
11885
/* confdefs.h.  */
 
11886
_ACEOF
 
11887
cat confdefs.h >>conftest.$ac_ext
 
11888
cat >>conftest.$ac_ext <<_ACEOF
 
11889
/* end confdefs.h.  */
 
11890
 
 
11891
/* Override any gcc2 internal prototype to avoid an error.  */
 
11892
#ifdef __cplusplus
 
11893
extern "C"
 
11894
#endif
 
11895
/* We use char because int might match the return type of a gcc2
 
11896
   builtin and then its argument prototype would still apply.  */
 
11897
char ldapssl_client_init ();
 
11898
int
 
11899
main ()
 
11900
{
 
11901
ldapssl_client_init ();
 
11902
  ;
 
11903
  return 0;
 
11904
}
 
11905
_ACEOF
 
11906
rm -f conftest.$ac_objext conftest$ac_exeext
 
11907
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11908
  (eval $ac_link) 2>conftest.er1
 
11909
  ac_status=$?
 
11910
  grep -v '^ *+' conftest.er1 >conftest.err
 
11911
  rm -f conftest.er1
 
11912
  cat conftest.err >&5
 
11913
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11914
  (exit $ac_status); } &&
 
11915
         { ac_try='test -z "$ac_c_werror_flag"
 
11916
                         || test ! -s conftest.err'
 
11917
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11918
  (eval $ac_try) 2>&5
 
11919
  ac_status=$?
 
11920
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11921
  (exit $ac_status); }; } &&
 
11922
         { ac_try='test -s conftest$ac_exeext'
 
11923
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11924
  (eval $ac_try) 2>&5
 
11925
  ac_status=$?
 
11926
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11927
  (exit $ac_status); }; }; then
 
11928
  eval "$as_ac_Lib=yes"
 
11929
else
 
11930
  echo "$as_me: failed program was:" >&5
 
11931
sed 's/^/| /' conftest.$ac_ext >&5
 
11932
 
 
11933
eval "$as_ac_Lib=no"
 
11934
fi
 
11935
rm -f conftest.err conftest.$ac_objext \
 
11936
      conftest$ac_exeext conftest.$ac_ext
 
11937
LIBS=$ac_check_lib_save_LIBS
 
11938
fi
 
11939
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
11940
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
11941
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
11942
  apu_has_ldapssl_client_init="1"
 
11943
fi
 
11944
 
 
11945
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
11946
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
11947
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
11948
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
11949
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11950
else
 
11951
  ac_check_lib_save_LIBS=$LIBS
 
11952
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
11953
cat >conftest.$ac_ext <<_ACEOF
 
11954
/* confdefs.h.  */
 
11955
_ACEOF
 
11956
cat confdefs.h >>conftest.$ac_ext
 
11957
cat >>conftest.$ac_ext <<_ACEOF
 
11958
/* end confdefs.h.  */
 
11959
 
 
11960
/* Override any gcc2 internal prototype to avoid an error.  */
 
11961
#ifdef __cplusplus
 
11962
extern "C"
 
11963
#endif
 
11964
/* We use char because int might match the return type of a gcc2
 
11965
   builtin and then its argument prototype would still apply.  */
 
11966
char ldapssl_client_deinit ();
 
11967
int
 
11968
main ()
 
11969
{
 
11970
ldapssl_client_deinit ();
 
11971
  ;
 
11972
  return 0;
 
11973
}
 
11974
_ACEOF
 
11975
rm -f conftest.$ac_objext conftest$ac_exeext
 
11976
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11977
  (eval $ac_link) 2>conftest.er1
 
11978
  ac_status=$?
 
11979
  grep -v '^ *+' conftest.er1 >conftest.err
 
11980
  rm -f conftest.er1
 
11981
  cat conftest.err >&5
 
11982
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11983
  (exit $ac_status); } &&
 
11984
         { ac_try='test -z "$ac_c_werror_flag"
 
11985
                         || test ! -s conftest.err'
 
11986
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11987
  (eval $ac_try) 2>&5
 
11988
  ac_status=$?
 
11989
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11990
  (exit $ac_status); }; } &&
 
11991
         { ac_try='test -s conftest$ac_exeext'
 
11992
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11993
  (eval $ac_try) 2>&5
 
11994
  ac_status=$?
 
11995
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11996
  (exit $ac_status); }; }; then
 
11997
  eval "$as_ac_Lib=yes"
 
11998
else
 
11999
  echo "$as_me: failed program was:" >&5
 
12000
sed 's/^/| /' conftest.$ac_ext >&5
 
12001
 
 
12002
eval "$as_ac_Lib=no"
 
12003
fi
 
12004
rm -f conftest.err conftest.$ac_objext \
 
12005
      conftest$ac_exeext conftest.$ac_ext
 
12006
LIBS=$ac_check_lib_save_LIBS
 
12007
fi
 
12008
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12009
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12010
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12011
  apu_has_ldapssl_client_deinit="1"
 
12012
fi
 
12013
 
 
12014
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
12015
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
12016
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
12017
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12018
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12019
else
 
12020
  ac_check_lib_save_LIBS=$LIBS
 
12021
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12022
cat >conftest.$ac_ext <<_ACEOF
 
12023
/* confdefs.h.  */
 
12024
_ACEOF
 
12025
cat confdefs.h >>conftest.$ac_ext
 
12026
cat >>conftest.$ac_ext <<_ACEOF
 
12027
/* end confdefs.h.  */
 
12028
 
 
12029
/* Override any gcc2 internal prototype to avoid an error.  */
 
12030
#ifdef __cplusplus
 
12031
extern "C"
 
12032
#endif
 
12033
/* We use char because int might match the return type of a gcc2
 
12034
   builtin and then its argument prototype would still apply.  */
 
12035
char ldapssl_add_trusted_cert ();
 
12036
int
 
12037
main ()
 
12038
{
 
12039
ldapssl_add_trusted_cert ();
 
12040
  ;
 
12041
  return 0;
 
12042
}
 
12043
_ACEOF
 
12044
rm -f conftest.$ac_objext conftest$ac_exeext
 
12045
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12046
  (eval $ac_link) 2>conftest.er1
 
12047
  ac_status=$?
 
12048
  grep -v '^ *+' conftest.er1 >conftest.err
 
12049
  rm -f conftest.er1
 
12050
  cat conftest.err >&5
 
12051
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12052
  (exit $ac_status); } &&
 
12053
         { ac_try='test -z "$ac_c_werror_flag"
 
12054
                         || test ! -s conftest.err'
 
12055
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12056
  (eval $ac_try) 2>&5
 
12057
  ac_status=$?
 
12058
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12059
  (exit $ac_status); }; } &&
 
12060
         { ac_try='test -s conftest$ac_exeext'
 
12061
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12062
  (eval $ac_try) 2>&5
 
12063
  ac_status=$?
 
12064
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12065
  (exit $ac_status); }; }; then
 
12066
  eval "$as_ac_Lib=yes"
 
12067
else
 
12068
  echo "$as_me: failed program was:" >&5
 
12069
sed 's/^/| /' conftest.$ac_ext >&5
 
12070
 
 
12071
eval "$as_ac_Lib=no"
 
12072
fi
 
12073
rm -f conftest.err conftest.$ac_objext \
 
12074
      conftest$ac_exeext conftest.$ac_ext
 
12075
LIBS=$ac_check_lib_save_LIBS
 
12076
fi
 
12077
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12078
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12079
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12080
  apu_has_ldapssl_add_trusted_cert="1"
 
12081
fi
 
12082
 
 
12083
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
12084
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
12085
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
12086
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12087
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12088
else
 
12089
  ac_check_lib_save_LIBS=$LIBS
 
12090
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12091
cat >conftest.$ac_ext <<_ACEOF
 
12092
/* confdefs.h.  */
 
12093
_ACEOF
 
12094
cat confdefs.h >>conftest.$ac_ext
 
12095
cat >>conftest.$ac_ext <<_ACEOF
 
12096
/* end confdefs.h.  */
 
12097
 
 
12098
/* Override any gcc2 internal prototype to avoid an error.  */
 
12099
#ifdef __cplusplus
 
12100
extern "C"
 
12101
#endif
 
12102
/* We use char because int might match the return type of a gcc2
 
12103
   builtin and then its argument prototype would still apply.  */
 
12104
char ldap_start_tls_s ();
 
12105
int
 
12106
main ()
 
12107
{
 
12108
ldap_start_tls_s ();
 
12109
  ;
 
12110
  return 0;
 
12111
}
 
12112
_ACEOF
 
12113
rm -f conftest.$ac_objext conftest$ac_exeext
 
12114
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12115
  (eval $ac_link) 2>conftest.er1
 
12116
  ac_status=$?
 
12117
  grep -v '^ *+' conftest.er1 >conftest.err
 
12118
  rm -f conftest.er1
 
12119
  cat conftest.err >&5
 
12120
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12121
  (exit $ac_status); } &&
 
12122
         { ac_try='test -z "$ac_c_werror_flag"
 
12123
                         || test ! -s conftest.err'
 
12124
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12125
  (eval $ac_try) 2>&5
 
12126
  ac_status=$?
 
12127
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12128
  (exit $ac_status); }; } &&
 
12129
         { ac_try='test -s conftest$ac_exeext'
 
12130
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12131
  (eval $ac_try) 2>&5
 
12132
  ac_status=$?
 
12133
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12134
  (exit $ac_status); }; }; then
 
12135
  eval "$as_ac_Lib=yes"
 
12136
else
 
12137
  echo "$as_me: failed program was:" >&5
 
12138
sed 's/^/| /' conftest.$ac_ext >&5
 
12139
 
 
12140
eval "$as_ac_Lib=no"
 
12141
fi
 
12142
rm -f conftest.err conftest.$ac_objext \
 
12143
      conftest$ac_exeext conftest.$ac_ext
 
12144
LIBS=$ac_check_lib_save_LIBS
 
12145
fi
 
12146
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12147
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12148
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12149
  apu_has_ldap_start_tls_s="1"
 
12150
fi
 
12151
 
 
12152
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
12153
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
12154
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
12155
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12156
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12157
else
 
12158
  ac_check_lib_save_LIBS=$LIBS
 
12159
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12160
cat >conftest.$ac_ext <<_ACEOF
 
12161
/* confdefs.h.  */
 
12162
_ACEOF
 
12163
cat confdefs.h >>conftest.$ac_ext
 
12164
cat >>conftest.$ac_ext <<_ACEOF
 
12165
/* end confdefs.h.  */
 
12166
 
 
12167
/* Override any gcc2 internal prototype to avoid an error.  */
 
12168
#ifdef __cplusplus
 
12169
extern "C"
 
12170
#endif
 
12171
/* We use char because int might match the return type of a gcc2
 
12172
   builtin and then its argument prototype would still apply.  */
 
12173
char ldap_sslinit ();
 
12174
int
 
12175
main ()
 
12176
{
 
12177
ldap_sslinit ();
 
12178
  ;
 
12179
  return 0;
 
12180
}
 
12181
_ACEOF
 
12182
rm -f conftest.$ac_objext conftest$ac_exeext
 
12183
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12184
  (eval $ac_link) 2>conftest.er1
 
12185
  ac_status=$?
 
12186
  grep -v '^ *+' conftest.er1 >conftest.err
 
12187
  rm -f conftest.er1
 
12188
  cat conftest.err >&5
 
12189
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12190
  (exit $ac_status); } &&
 
12191
         { ac_try='test -z "$ac_c_werror_flag"
 
12192
                         || test ! -s conftest.err'
 
12193
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12194
  (eval $ac_try) 2>&5
 
12195
  ac_status=$?
 
12196
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12197
  (exit $ac_status); }; } &&
 
12198
         { ac_try='test -s conftest$ac_exeext'
 
12199
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12200
  (eval $ac_try) 2>&5
 
12201
  ac_status=$?
 
12202
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12203
  (exit $ac_status); }; }; then
 
12204
  eval "$as_ac_Lib=yes"
 
12205
else
 
12206
  echo "$as_me: failed program was:" >&5
 
12207
sed 's/^/| /' conftest.$ac_ext >&5
 
12208
 
 
12209
eval "$as_ac_Lib=no"
 
12210
fi
 
12211
rm -f conftest.err conftest.$ac_objext \
 
12212
      conftest$ac_exeext conftest.$ac_ext
 
12213
LIBS=$ac_check_lib_save_LIBS
 
12214
fi
 
12215
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12216
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12217
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12218
  apu_has_ldap_sslinit="1"
 
12219
fi
 
12220
 
 
12221
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
12222
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
12223
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
12224
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12225
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12226
else
 
12227
  ac_check_lib_save_LIBS=$LIBS
 
12228
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12229
cat >conftest.$ac_ext <<_ACEOF
 
12230
/* confdefs.h.  */
 
12231
_ACEOF
 
12232
cat confdefs.h >>conftest.$ac_ext
 
12233
cat >>conftest.$ac_ext <<_ACEOF
 
12234
/* end confdefs.h.  */
 
12235
 
 
12236
/* Override any gcc2 internal prototype to avoid an error.  */
 
12237
#ifdef __cplusplus
 
12238
extern "C"
 
12239
#endif
 
12240
/* We use char because int might match the return type of a gcc2
 
12241
   builtin and then its argument prototype would still apply.  */
 
12242
char ldapssl_init ();
 
12243
int
 
12244
main ()
 
12245
{
 
12246
ldapssl_init ();
 
12247
  ;
 
12248
  return 0;
 
12249
}
 
12250
_ACEOF
 
12251
rm -f conftest.$ac_objext conftest$ac_exeext
 
12252
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12253
  (eval $ac_link) 2>conftest.er1
 
12254
  ac_status=$?
 
12255
  grep -v '^ *+' conftest.er1 >conftest.err
 
12256
  rm -f conftest.er1
 
12257
  cat conftest.err >&5
 
12258
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12259
  (exit $ac_status); } &&
 
12260
         { ac_try='test -z "$ac_c_werror_flag"
 
12261
                         || test ! -s conftest.err'
 
12262
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12263
  (eval $ac_try) 2>&5
 
12264
  ac_status=$?
 
12265
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12266
  (exit $ac_status); }; } &&
 
12267
         { ac_try='test -s conftest$ac_exeext'
 
12268
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12269
  (eval $ac_try) 2>&5
 
12270
  ac_status=$?
 
12271
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12272
  (exit $ac_status); }; }; then
 
12273
  eval "$as_ac_Lib=yes"
 
12274
else
 
12275
  echo "$as_me: failed program was:" >&5
 
12276
sed 's/^/| /' conftest.$ac_ext >&5
 
12277
 
 
12278
eval "$as_ac_Lib=no"
 
12279
fi
 
12280
rm -f conftest.err conftest.$ac_objext \
 
12281
      conftest$ac_exeext conftest.$ac_ext
 
12282
LIBS=$ac_check_lib_save_LIBS
 
12283
fi
 
12284
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12285
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12286
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12287
  apu_has_ldapssl_init="1"
 
12288
fi
 
12289
 
 
12290
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
12291
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
12292
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
12293
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12294
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12295
else
 
12296
  ac_check_lib_save_LIBS=$LIBS
 
12297
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12298
cat >conftest.$ac_ext <<_ACEOF
 
12299
/* confdefs.h.  */
 
12300
_ACEOF
 
12301
cat confdefs.h >>conftest.$ac_ext
 
12302
cat >>conftest.$ac_ext <<_ACEOF
 
12303
/* end confdefs.h.  */
 
12304
 
 
12305
/* Override any gcc2 internal prototype to avoid an error.  */
 
12306
#ifdef __cplusplus
 
12307
extern "C"
 
12308
#endif
 
12309
/* We use char because int might match the return type of a gcc2
 
12310
   builtin and then its argument prototype would still apply.  */
 
12311
char ldapssl_install_routines ();
 
12312
int
 
12313
main ()
 
12314
{
 
12315
ldapssl_install_routines ();
 
12316
  ;
 
12317
  return 0;
 
12318
}
 
12319
_ACEOF
 
12320
rm -f conftest.$ac_objext conftest$ac_exeext
 
12321
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12322
  (eval $ac_link) 2>conftest.er1
 
12323
  ac_status=$?
 
12324
  grep -v '^ *+' conftest.er1 >conftest.err
 
12325
  rm -f conftest.er1
 
12326
  cat conftest.err >&5
 
12327
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12328
  (exit $ac_status); } &&
 
12329
         { ac_try='test -z "$ac_c_werror_flag"
 
12330
                         || test ! -s conftest.err'
 
12331
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12332
  (eval $ac_try) 2>&5
 
12333
  ac_status=$?
 
12334
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12335
  (exit $ac_status); }; } &&
 
12336
         { ac_try='test -s conftest$ac_exeext'
 
12337
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12338
  (eval $ac_try) 2>&5
 
12339
  ac_status=$?
 
12340
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12341
  (exit $ac_status); }; }; then
 
12342
  eval "$as_ac_Lib=yes"
 
12343
else
 
12344
  echo "$as_me: failed program was:" >&5
 
12345
sed 's/^/| /' conftest.$ac_ext >&5
 
12346
 
 
12347
eval "$as_ac_Lib=no"
 
12348
fi
 
12349
rm -f conftest.err conftest.$ac_objext \
 
12350
      conftest$ac_exeext conftest.$ac_ext
 
12351
LIBS=$ac_check_lib_save_LIBS
 
12352
fi
 
12353
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12354
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12355
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12356
  apu_has_ldapssl_install_routines="1"
 
12357
fi
 
12358
 
 
12359
        apu_has_ldap="1";
 
12360
 
 
12361
fi
 
12362
 
 
12363
  fi
 
12364
 
 
12365
 
 
12366
  if test ${apu_has_ldap} != "1"; then
 
12367
    ldaplib=$LIBLDAP
 
12368
    extralib="-ldl -lpthread"
 
12369
    unset ac_cv_lib_${ldaplib}_ldap_init
 
12370
    unset ac_cv_lib_${ldaplib}___ldap_init
 
12371
    as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
 
12372
echo "$as_me:$LINENO: checking for ldap_init in -l${ldaplib}" >&5
 
12373
echo $ECHO_N "checking for ldap_init in -l${ldaplib}... $ECHO_C" >&6
 
12374
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12375
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12376
else
 
12377
  ac_check_lib_save_LIBS=$LIBS
 
12378
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12379
cat >conftest.$ac_ext <<_ACEOF
 
12380
/* confdefs.h.  */
 
12381
_ACEOF
 
12382
cat confdefs.h >>conftest.$ac_ext
 
12383
cat >>conftest.$ac_ext <<_ACEOF
 
12384
/* end confdefs.h.  */
 
12385
 
 
12386
/* Override any gcc2 internal prototype to avoid an error.  */
 
12387
#ifdef __cplusplus
 
12388
extern "C"
 
12389
#endif
 
12390
/* We use char because int might match the return type of a gcc2
 
12391
   builtin and then its argument prototype would still apply.  */
 
12392
char ldap_init ();
 
12393
int
 
12394
main ()
 
12395
{
 
12396
ldap_init ();
 
12397
  ;
 
12398
  return 0;
 
12399
}
 
12400
_ACEOF
 
12401
rm -f conftest.$ac_objext conftest$ac_exeext
 
12402
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12403
  (eval $ac_link) 2>conftest.er1
 
12404
  ac_status=$?
 
12405
  grep -v '^ *+' conftest.er1 >conftest.err
 
12406
  rm -f conftest.er1
 
12407
  cat conftest.err >&5
 
12408
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12409
  (exit $ac_status); } &&
 
12410
         { ac_try='test -z "$ac_c_werror_flag"
 
12411
                         || test ! -s conftest.err'
 
12412
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12413
  (eval $ac_try) 2>&5
 
12414
  ac_status=$?
 
12415
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12416
  (exit $ac_status); }; } &&
 
12417
         { ac_try='test -s conftest$ac_exeext'
 
12418
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12419
  (eval $ac_try) 2>&5
 
12420
  ac_status=$?
 
12421
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12422
  (exit $ac_status); }; }; then
 
12423
  eval "$as_ac_Lib=yes"
 
12424
else
 
12425
  echo "$as_me: failed program was:" >&5
 
12426
sed 's/^/| /' conftest.$ac_ext >&5
 
12427
 
 
12428
eval "$as_ac_Lib=no"
 
12429
fi
 
12430
rm -f conftest.err conftest.$ac_objext \
 
12431
      conftest$ac_exeext conftest.$ac_ext
 
12432
LIBS=$ac_check_lib_save_LIBS
 
12433
fi
 
12434
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12435
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12436
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12437
 
 
12438
 
 
12439
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
12440
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l${ldaplib} ${extralib}\""
 
12441
    APRUTIL_EXPORT_LIBS="-l${ldaplib} ${extralib}"
 
12442
  else
 
12443
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
12444
    for i in $apr_addto_bugger; do
 
12445
      apr_addto_duplicate="0"
 
12446
      for j in $APRUTIL_EXPORT_LIBS; do
 
12447
        if test "x$i" = "x$j"; then
 
12448
          apr_addto_duplicate="1"
 
12449
          break
 
12450
        fi
 
12451
      done
 
12452
      if test $apr_addto_duplicate = "0"; then
 
12453
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
12454
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
12455
      fi
 
12456
    done
 
12457
  fi
 
12458
 
 
12459
 
 
12460
  if test "x$APRUTIL_LIBS" = "x"; then
 
12461
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l${ldaplib} ${extralib}\""
 
12462
    APRUTIL_LIBS="-l${ldaplib} ${extralib}"
 
12463
  else
 
12464
    apr_addto_bugger="-l${ldaplib} ${extralib}"
 
12465
    for i in $apr_addto_bugger; do
 
12466
      apr_addto_duplicate="0"
 
12467
      for j in $APRUTIL_LIBS; do
 
12468
        if test "x$i" = "x$j"; then
 
12469
          apr_addto_duplicate="1"
 
12470
          break
 
12471
        fi
 
12472
      done
 
12473
      if test $apr_addto_duplicate = "0"; then
 
12474
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
12475
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
12476
      fi
 
12477
    done
 
12478
  fi
 
12479
 
 
12480
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
 
12481
echo "$as_me:$LINENO: checking for ldapssl_client_init in -l${ldaplib}" >&5
 
12482
echo $ECHO_N "checking for ldapssl_client_init in -l${ldaplib}... $ECHO_C" >&6
 
12483
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12484
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12485
else
 
12486
  ac_check_lib_save_LIBS=$LIBS
 
12487
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12488
cat >conftest.$ac_ext <<_ACEOF
 
12489
/* confdefs.h.  */
 
12490
_ACEOF
 
12491
cat confdefs.h >>conftest.$ac_ext
 
12492
cat >>conftest.$ac_ext <<_ACEOF
 
12493
/* end confdefs.h.  */
 
12494
 
 
12495
/* Override any gcc2 internal prototype to avoid an error.  */
 
12496
#ifdef __cplusplus
 
12497
extern "C"
 
12498
#endif
 
12499
/* We use char because int might match the return type of a gcc2
 
12500
   builtin and then its argument prototype would still apply.  */
 
12501
char ldapssl_client_init ();
 
12502
int
 
12503
main ()
 
12504
{
 
12505
ldapssl_client_init ();
 
12506
  ;
 
12507
  return 0;
 
12508
}
 
12509
_ACEOF
 
12510
rm -f conftest.$ac_objext conftest$ac_exeext
 
12511
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12512
  (eval $ac_link) 2>conftest.er1
 
12513
  ac_status=$?
 
12514
  grep -v '^ *+' conftest.er1 >conftest.err
 
12515
  rm -f conftest.er1
 
12516
  cat conftest.err >&5
 
12517
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12518
  (exit $ac_status); } &&
 
12519
         { ac_try='test -z "$ac_c_werror_flag"
 
12520
                         || test ! -s conftest.err'
 
12521
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12522
  (eval $ac_try) 2>&5
 
12523
  ac_status=$?
 
12524
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12525
  (exit $ac_status); }; } &&
 
12526
         { ac_try='test -s conftest$ac_exeext'
 
12527
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12528
  (eval $ac_try) 2>&5
 
12529
  ac_status=$?
 
12530
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12531
  (exit $ac_status); }; }; then
 
12532
  eval "$as_ac_Lib=yes"
 
12533
else
 
12534
  echo "$as_me: failed program was:" >&5
 
12535
sed 's/^/| /' conftest.$ac_ext >&5
 
12536
 
 
12537
eval "$as_ac_Lib=no"
 
12538
fi
 
12539
rm -f conftest.err conftest.$ac_objext \
 
12540
      conftest$ac_exeext conftest.$ac_ext
 
12541
LIBS=$ac_check_lib_save_LIBS
 
12542
fi
 
12543
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12544
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12545
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12546
  apu_has_ldapssl_client_init="1"
 
12547
fi
 
12548
 
 
12549
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
 
12550
echo "$as_me:$LINENO: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
 
12551
echo $ECHO_N "checking for ldapssl_client_deinit in -l${ldaplib}... $ECHO_C" >&6
 
12552
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12553
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12554
else
 
12555
  ac_check_lib_save_LIBS=$LIBS
 
12556
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12557
cat >conftest.$ac_ext <<_ACEOF
 
12558
/* confdefs.h.  */
 
12559
_ACEOF
 
12560
cat confdefs.h >>conftest.$ac_ext
 
12561
cat >>conftest.$ac_ext <<_ACEOF
 
12562
/* end confdefs.h.  */
 
12563
 
 
12564
/* Override any gcc2 internal prototype to avoid an error.  */
 
12565
#ifdef __cplusplus
 
12566
extern "C"
 
12567
#endif
 
12568
/* We use char because int might match the return type of a gcc2
 
12569
   builtin and then its argument prototype would still apply.  */
 
12570
char ldapssl_client_deinit ();
 
12571
int
 
12572
main ()
 
12573
{
 
12574
ldapssl_client_deinit ();
 
12575
  ;
 
12576
  return 0;
 
12577
}
 
12578
_ACEOF
 
12579
rm -f conftest.$ac_objext conftest$ac_exeext
 
12580
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12581
  (eval $ac_link) 2>conftest.er1
 
12582
  ac_status=$?
 
12583
  grep -v '^ *+' conftest.er1 >conftest.err
 
12584
  rm -f conftest.er1
 
12585
  cat conftest.err >&5
 
12586
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12587
  (exit $ac_status); } &&
 
12588
         { ac_try='test -z "$ac_c_werror_flag"
 
12589
                         || test ! -s conftest.err'
 
12590
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12591
  (eval $ac_try) 2>&5
 
12592
  ac_status=$?
 
12593
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12594
  (exit $ac_status); }; } &&
 
12595
         { ac_try='test -s conftest$ac_exeext'
 
12596
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12597
  (eval $ac_try) 2>&5
 
12598
  ac_status=$?
 
12599
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12600
  (exit $ac_status); }; }; then
 
12601
  eval "$as_ac_Lib=yes"
 
12602
else
 
12603
  echo "$as_me: failed program was:" >&5
 
12604
sed 's/^/| /' conftest.$ac_ext >&5
 
12605
 
 
12606
eval "$as_ac_Lib=no"
 
12607
fi
 
12608
rm -f conftest.err conftest.$ac_objext \
 
12609
      conftest$ac_exeext conftest.$ac_ext
 
12610
LIBS=$ac_check_lib_save_LIBS
 
12611
fi
 
12612
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12613
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12614
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12615
  apu_has_ldapssl_client_deinit="1"
 
12616
fi
 
12617
 
 
12618
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
 
12619
echo "$as_me:$LINENO: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
 
12620
echo $ECHO_N "checking for ldapssl_add_trusted_cert in -l${ldaplib}... $ECHO_C" >&6
 
12621
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12622
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12623
else
 
12624
  ac_check_lib_save_LIBS=$LIBS
 
12625
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12626
cat >conftest.$ac_ext <<_ACEOF
 
12627
/* confdefs.h.  */
 
12628
_ACEOF
 
12629
cat confdefs.h >>conftest.$ac_ext
 
12630
cat >>conftest.$ac_ext <<_ACEOF
 
12631
/* end confdefs.h.  */
 
12632
 
 
12633
/* Override any gcc2 internal prototype to avoid an error.  */
 
12634
#ifdef __cplusplus
 
12635
extern "C"
 
12636
#endif
 
12637
/* We use char because int might match the return type of a gcc2
 
12638
   builtin and then its argument prototype would still apply.  */
 
12639
char ldapssl_add_trusted_cert ();
 
12640
int
 
12641
main ()
 
12642
{
 
12643
ldapssl_add_trusted_cert ();
 
12644
  ;
 
12645
  return 0;
 
12646
}
 
12647
_ACEOF
 
12648
rm -f conftest.$ac_objext conftest$ac_exeext
 
12649
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12650
  (eval $ac_link) 2>conftest.er1
 
12651
  ac_status=$?
 
12652
  grep -v '^ *+' conftest.er1 >conftest.err
 
12653
  rm -f conftest.er1
 
12654
  cat conftest.err >&5
 
12655
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12656
  (exit $ac_status); } &&
 
12657
         { ac_try='test -z "$ac_c_werror_flag"
 
12658
                         || test ! -s conftest.err'
 
12659
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12660
  (eval $ac_try) 2>&5
 
12661
  ac_status=$?
 
12662
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12663
  (exit $ac_status); }; } &&
 
12664
         { ac_try='test -s conftest$ac_exeext'
 
12665
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12666
  (eval $ac_try) 2>&5
 
12667
  ac_status=$?
 
12668
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12669
  (exit $ac_status); }; }; then
 
12670
  eval "$as_ac_Lib=yes"
 
12671
else
 
12672
  echo "$as_me: failed program was:" >&5
 
12673
sed 's/^/| /' conftest.$ac_ext >&5
 
12674
 
 
12675
eval "$as_ac_Lib=no"
 
12676
fi
 
12677
rm -f conftest.err conftest.$ac_objext \
 
12678
      conftest$ac_exeext conftest.$ac_ext
 
12679
LIBS=$ac_check_lib_save_LIBS
 
12680
fi
 
12681
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12682
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12683
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12684
  apu_has_ldapssl_add_trusted_cert="1"
 
12685
fi
 
12686
 
 
12687
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
 
12688
echo "$as_me:$LINENO: checking for ldap_start_tls_s in -l${ldaplib}" >&5
 
12689
echo $ECHO_N "checking for ldap_start_tls_s in -l${ldaplib}... $ECHO_C" >&6
 
12690
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12691
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12692
else
 
12693
  ac_check_lib_save_LIBS=$LIBS
 
12694
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12695
cat >conftest.$ac_ext <<_ACEOF
 
12696
/* confdefs.h.  */
 
12697
_ACEOF
 
12698
cat confdefs.h >>conftest.$ac_ext
 
12699
cat >>conftest.$ac_ext <<_ACEOF
 
12700
/* end confdefs.h.  */
 
12701
 
 
12702
/* Override any gcc2 internal prototype to avoid an error.  */
 
12703
#ifdef __cplusplus
 
12704
extern "C"
 
12705
#endif
 
12706
/* We use char because int might match the return type of a gcc2
 
12707
   builtin and then its argument prototype would still apply.  */
 
12708
char ldap_start_tls_s ();
 
12709
int
 
12710
main ()
 
12711
{
 
12712
ldap_start_tls_s ();
 
12713
  ;
 
12714
  return 0;
 
12715
}
 
12716
_ACEOF
 
12717
rm -f conftest.$ac_objext conftest$ac_exeext
 
12718
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12719
  (eval $ac_link) 2>conftest.er1
 
12720
  ac_status=$?
 
12721
  grep -v '^ *+' conftest.er1 >conftest.err
 
12722
  rm -f conftest.er1
 
12723
  cat conftest.err >&5
 
12724
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12725
  (exit $ac_status); } &&
 
12726
         { ac_try='test -z "$ac_c_werror_flag"
 
12727
                         || test ! -s conftest.err'
 
12728
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12729
  (eval $ac_try) 2>&5
 
12730
  ac_status=$?
 
12731
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12732
  (exit $ac_status); }; } &&
 
12733
         { ac_try='test -s conftest$ac_exeext'
 
12734
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12735
  (eval $ac_try) 2>&5
 
12736
  ac_status=$?
 
12737
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12738
  (exit $ac_status); }; }; then
 
12739
  eval "$as_ac_Lib=yes"
 
12740
else
 
12741
  echo "$as_me: failed program was:" >&5
 
12742
sed 's/^/| /' conftest.$ac_ext >&5
 
12743
 
 
12744
eval "$as_ac_Lib=no"
 
12745
fi
 
12746
rm -f conftest.err conftest.$ac_objext \
 
12747
      conftest$ac_exeext conftest.$ac_ext
 
12748
LIBS=$ac_check_lib_save_LIBS
 
12749
fi
 
12750
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12751
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12752
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12753
  apu_has_ldap_start_tls_s="1"
 
12754
fi
 
12755
 
 
12756
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
 
12757
echo "$as_me:$LINENO: checking for ldap_sslinit in -l${ldaplib}" >&5
 
12758
echo $ECHO_N "checking for ldap_sslinit in -l${ldaplib}... $ECHO_C" >&6
 
12759
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12760
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12761
else
 
12762
  ac_check_lib_save_LIBS=$LIBS
 
12763
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12764
cat >conftest.$ac_ext <<_ACEOF
 
12765
/* confdefs.h.  */
 
12766
_ACEOF
 
12767
cat confdefs.h >>conftest.$ac_ext
 
12768
cat >>conftest.$ac_ext <<_ACEOF
 
12769
/* end confdefs.h.  */
 
12770
 
 
12771
/* Override any gcc2 internal prototype to avoid an error.  */
 
12772
#ifdef __cplusplus
 
12773
extern "C"
 
12774
#endif
 
12775
/* We use char because int might match the return type of a gcc2
 
12776
   builtin and then its argument prototype would still apply.  */
 
12777
char ldap_sslinit ();
 
12778
int
 
12779
main ()
 
12780
{
 
12781
ldap_sslinit ();
 
12782
  ;
 
12783
  return 0;
 
12784
}
 
12785
_ACEOF
 
12786
rm -f conftest.$ac_objext conftest$ac_exeext
 
12787
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12788
  (eval $ac_link) 2>conftest.er1
 
12789
  ac_status=$?
 
12790
  grep -v '^ *+' conftest.er1 >conftest.err
 
12791
  rm -f conftest.er1
 
12792
  cat conftest.err >&5
 
12793
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12794
  (exit $ac_status); } &&
 
12795
         { ac_try='test -z "$ac_c_werror_flag"
 
12796
                         || test ! -s conftest.err'
 
12797
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12798
  (eval $ac_try) 2>&5
 
12799
  ac_status=$?
 
12800
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12801
  (exit $ac_status); }; } &&
 
12802
         { ac_try='test -s conftest$ac_exeext'
 
12803
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12804
  (eval $ac_try) 2>&5
 
12805
  ac_status=$?
 
12806
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12807
  (exit $ac_status); }; }; then
 
12808
  eval "$as_ac_Lib=yes"
 
12809
else
 
12810
  echo "$as_me: failed program was:" >&5
 
12811
sed 's/^/| /' conftest.$ac_ext >&5
 
12812
 
 
12813
eval "$as_ac_Lib=no"
 
12814
fi
 
12815
rm -f conftest.err conftest.$ac_objext \
 
12816
      conftest$ac_exeext conftest.$ac_ext
 
12817
LIBS=$ac_check_lib_save_LIBS
 
12818
fi
 
12819
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12820
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12821
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12822
  apu_has_ldap_sslinit="1"
 
12823
fi
 
12824
 
 
12825
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
 
12826
echo "$as_me:$LINENO: checking for ldapssl_init in -l${ldaplib}" >&5
 
12827
echo $ECHO_N "checking for ldapssl_init in -l${ldaplib}... $ECHO_C" >&6
 
12828
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12829
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12830
else
 
12831
  ac_check_lib_save_LIBS=$LIBS
 
12832
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12833
cat >conftest.$ac_ext <<_ACEOF
 
12834
/* confdefs.h.  */
 
12835
_ACEOF
 
12836
cat confdefs.h >>conftest.$ac_ext
 
12837
cat >>conftest.$ac_ext <<_ACEOF
 
12838
/* end confdefs.h.  */
 
12839
 
 
12840
/* Override any gcc2 internal prototype to avoid an error.  */
 
12841
#ifdef __cplusplus
 
12842
extern "C"
 
12843
#endif
 
12844
/* We use char because int might match the return type of a gcc2
 
12845
   builtin and then its argument prototype would still apply.  */
 
12846
char ldapssl_init ();
 
12847
int
 
12848
main ()
 
12849
{
 
12850
ldapssl_init ();
 
12851
  ;
 
12852
  return 0;
 
12853
}
 
12854
_ACEOF
 
12855
rm -f conftest.$ac_objext conftest$ac_exeext
 
12856
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12857
  (eval $ac_link) 2>conftest.er1
 
12858
  ac_status=$?
 
12859
  grep -v '^ *+' conftest.er1 >conftest.err
 
12860
  rm -f conftest.er1
 
12861
  cat conftest.err >&5
 
12862
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12863
  (exit $ac_status); } &&
 
12864
         { ac_try='test -z "$ac_c_werror_flag"
 
12865
                         || test ! -s conftest.err'
 
12866
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12867
  (eval $ac_try) 2>&5
 
12868
  ac_status=$?
 
12869
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12870
  (exit $ac_status); }; } &&
 
12871
         { ac_try='test -s conftest$ac_exeext'
 
12872
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12873
  (eval $ac_try) 2>&5
 
12874
  ac_status=$?
 
12875
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12876
  (exit $ac_status); }; }; then
 
12877
  eval "$as_ac_Lib=yes"
 
12878
else
 
12879
  echo "$as_me: failed program was:" >&5
 
12880
sed 's/^/| /' conftest.$ac_ext >&5
 
12881
 
 
12882
eval "$as_ac_Lib=no"
 
12883
fi
 
12884
rm -f conftest.err conftest.$ac_objext \
 
12885
      conftest$ac_exeext conftest.$ac_ext
 
12886
LIBS=$ac_check_lib_save_LIBS
 
12887
fi
 
12888
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12889
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12890
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12891
  apu_has_ldapssl_init="1"
 
12892
fi
 
12893
 
 
12894
        as_ac_Lib=`echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
 
12895
echo "$as_me:$LINENO: checking for ldapssl_install_routines in -l${ldaplib}" >&5
 
12896
echo $ECHO_N "checking for ldapssl_install_routines in -l${ldaplib}... $ECHO_C" >&6
 
12897
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
12898
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12899
else
 
12900
  ac_check_lib_save_LIBS=$LIBS
 
12901
LIBS="-l${ldaplib} ${extralib} $LIBS"
 
12902
cat >conftest.$ac_ext <<_ACEOF
 
12903
/* confdefs.h.  */
 
12904
_ACEOF
 
12905
cat confdefs.h >>conftest.$ac_ext
 
12906
cat >>conftest.$ac_ext <<_ACEOF
 
12907
/* end confdefs.h.  */
 
12908
 
 
12909
/* Override any gcc2 internal prototype to avoid an error.  */
 
12910
#ifdef __cplusplus
 
12911
extern "C"
 
12912
#endif
 
12913
/* We use char because int might match the return type of a gcc2
 
12914
   builtin and then its argument prototype would still apply.  */
 
12915
char ldapssl_install_routines ();
 
12916
int
 
12917
main ()
 
12918
{
 
12919
ldapssl_install_routines ();
 
12920
  ;
 
12921
  return 0;
 
12922
}
 
12923
_ACEOF
 
12924
rm -f conftest.$ac_objext conftest$ac_exeext
 
12925
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12926
  (eval $ac_link) 2>conftest.er1
 
12927
  ac_status=$?
 
12928
  grep -v '^ *+' conftest.er1 >conftest.err
 
12929
  rm -f conftest.er1
 
12930
  cat conftest.err >&5
 
12931
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12932
  (exit $ac_status); } &&
 
12933
         { ac_try='test -z "$ac_c_werror_flag"
 
12934
                         || test ! -s conftest.err'
 
12935
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12936
  (eval $ac_try) 2>&5
 
12937
  ac_status=$?
 
12938
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12939
  (exit $ac_status); }; } &&
 
12940
         { ac_try='test -s conftest$ac_exeext'
 
12941
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12942
  (eval $ac_try) 2>&5
 
12943
  ac_status=$?
 
12944
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12945
  (exit $ac_status); }; }; then
 
12946
  eval "$as_ac_Lib=yes"
 
12947
else
 
12948
  echo "$as_me: failed program was:" >&5
 
12949
sed 's/^/| /' conftest.$ac_ext >&5
 
12950
 
 
12951
eval "$as_ac_Lib=no"
 
12952
fi
 
12953
rm -f conftest.err conftest.$ac_objext \
 
12954
      conftest$ac_exeext conftest.$ac_ext
 
12955
LIBS=$ac_check_lib_save_LIBS
 
12956
fi
 
12957
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
12958
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
12959
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
12960
  apu_has_ldapssl_install_routines="1"
 
12961
fi
 
12962
 
 
12963
        apu_has_ldap="1";
 
12964
 
 
12965
fi
 
12966
 
 
12967
  fi
 
12968
 
 
12969
    fi
 
12970
 
 
12971
    test ${apu_has_ldap} != "1" && { { echo "$as_me:$LINENO: error: could not find an LDAP library" >&5
 
12972
echo "$as_me: error: could not find an LDAP library" >&2;}
 
12973
   { (exit 1); exit 1; }; }
 
12974
 
 
12975
echo "$as_me:$LINENO: checking for ber_init in -llber" >&5
 
12976
echo $ECHO_N "checking for ber_init in -llber... $ECHO_C" >&6
 
12977
if test "${ac_cv_lib_lber_ber_init+set}" = set; then
 
12978
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12979
else
 
12980
  ac_check_lib_save_LIBS=$LIBS
 
12981
LIBS="-llber  $LIBS"
 
12982
cat >conftest.$ac_ext <<_ACEOF
 
12983
/* confdefs.h.  */
 
12984
_ACEOF
 
12985
cat confdefs.h >>conftest.$ac_ext
 
12986
cat >>conftest.$ac_ext <<_ACEOF
 
12987
/* end confdefs.h.  */
 
12988
 
 
12989
/* Override any gcc2 internal prototype to avoid an error.  */
 
12990
#ifdef __cplusplus
 
12991
extern "C"
 
12992
#endif
 
12993
/* We use char because int might match the return type of a gcc2
 
12994
   builtin and then its argument prototype would still apply.  */
 
12995
char ber_init ();
 
12996
int
 
12997
main ()
 
12998
{
 
12999
ber_init ();
 
13000
  ;
 
13001
  return 0;
 
13002
}
 
13003
_ACEOF
 
13004
rm -f conftest.$ac_objext conftest$ac_exeext
 
13005
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13006
  (eval $ac_link) 2>conftest.er1
 
13007
  ac_status=$?
 
13008
  grep -v '^ *+' conftest.er1 >conftest.err
 
13009
  rm -f conftest.er1
 
13010
  cat conftest.err >&5
 
13011
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13012
  (exit $ac_status); } &&
 
13013
         { ac_try='test -z "$ac_c_werror_flag"
 
13014
                         || test ! -s conftest.err'
 
13015
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13016
  (eval $ac_try) 2>&5
 
13017
  ac_status=$?
 
13018
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13019
  (exit $ac_status); }; } &&
 
13020
         { ac_try='test -s conftest$ac_exeext'
 
13021
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13022
  (eval $ac_try) 2>&5
 
13023
  ac_status=$?
 
13024
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13025
  (exit $ac_status); }; }; then
 
13026
  ac_cv_lib_lber_ber_init=yes
 
13027
else
 
13028
  echo "$as_me: failed program was:" >&5
 
13029
sed 's/^/| /' conftest.$ac_ext >&5
 
13030
 
 
13031
ac_cv_lib_lber_ber_init=no
 
13032
fi
 
13033
rm -f conftest.err conftest.$ac_objext \
 
13034
      conftest$ac_exeext conftest.$ac_ext
 
13035
LIBS=$ac_check_lib_save_LIBS
 
13036
fi
 
13037
echo "$as_me:$LINENO: result: $ac_cv_lib_lber_ber_init" >&5
 
13038
echo "${ECHO_T}$ac_cv_lib_lber_ber_init" >&6
 
13039
if test $ac_cv_lib_lber_ber_init = yes; then
 
13040
  cat >>confdefs.h <<_ACEOF
 
13041
#define HAVE_LIBLBER 1
 
13042
_ACEOF
 
13043
 
 
13044
  LIBS="-llber $LIBS"
 
13045
 
 
13046
fi
 
13047
 
 
13048
 
 
13049
 
 
13050
for ac_header in lber.h
 
13051
do
 
13052
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
13053
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
13054
  echo "$as_me:$LINENO: checking for $ac_header" >&5
 
13055
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
13056
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
13057
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13058
fi
 
13059
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
13060
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
13061
else
 
13062
  # Is the header compilable?
 
13063
echo "$as_me:$LINENO: checking $ac_header usability" >&5
 
13064
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 
13065
cat >conftest.$ac_ext <<_ACEOF
 
13066
/* confdefs.h.  */
 
13067
_ACEOF
 
13068
cat confdefs.h >>conftest.$ac_ext
 
13069
cat >>conftest.$ac_ext <<_ACEOF
 
13070
/* end confdefs.h.  */
 
13071
$ac_includes_default
 
13072
#include <$ac_header>
 
13073
_ACEOF
 
13074
rm -f conftest.$ac_objext
 
13075
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13076
  (eval $ac_compile) 2>conftest.er1
 
13077
  ac_status=$?
 
13078
  grep -v '^ *+' conftest.er1 >conftest.err
 
13079
  rm -f conftest.er1
 
13080
  cat conftest.err >&5
 
13081
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13082
  (exit $ac_status); } &&
 
13083
         { ac_try='test -z "$ac_c_werror_flag"
 
13084
                         || test ! -s conftest.err'
 
13085
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13086
  (eval $ac_try) 2>&5
 
13087
  ac_status=$?
 
13088
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13089
  (exit $ac_status); }; } &&
 
13090
         { ac_try='test -s conftest.$ac_objext'
 
13091
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13092
  (eval $ac_try) 2>&5
 
13093
  ac_status=$?
 
13094
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13095
  (exit $ac_status); }; }; then
 
13096
  ac_header_compiler=yes
 
13097
else
 
13098
  echo "$as_me: failed program was:" >&5
 
13099
sed 's/^/| /' conftest.$ac_ext >&5
 
13100
 
 
13101
ac_header_compiler=no
 
13102
fi
 
13103
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13104
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
13105
echo "${ECHO_T}$ac_header_compiler" >&6
 
13106
 
 
13107
# Is the header present?
 
13108
echo "$as_me:$LINENO: checking $ac_header presence" >&5
 
13109
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 
13110
cat >conftest.$ac_ext <<_ACEOF
 
13111
/* confdefs.h.  */
 
13112
_ACEOF
 
13113
cat confdefs.h >>conftest.$ac_ext
 
13114
cat >>conftest.$ac_ext <<_ACEOF
 
13115
/* end confdefs.h.  */
 
13116
#include <$ac_header>
 
13117
_ACEOF
 
13118
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
13119
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
13120
  ac_status=$?
 
13121
  grep -v '^ *+' conftest.er1 >conftest.err
 
13122
  rm -f conftest.er1
 
13123
  cat conftest.err >&5
 
13124
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13125
  (exit $ac_status); } >/dev/null; then
 
13126
  if test -s conftest.err; then
 
13127
    ac_cpp_err=$ac_c_preproc_warn_flag
 
13128
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
13129
  else
 
13130
    ac_cpp_err=
 
13131
  fi
 
13132
else
 
13133
  ac_cpp_err=yes
 
13134
fi
 
13135
if test -z "$ac_cpp_err"; then
 
13136
  ac_header_preproc=yes
 
13137
else
 
13138
  echo "$as_me: failed program was:" >&5
 
13139
sed 's/^/| /' conftest.$ac_ext >&5
 
13140
 
 
13141
  ac_header_preproc=no
 
13142
fi
 
13143
rm -f conftest.err conftest.$ac_ext
 
13144
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
13145
echo "${ECHO_T}$ac_header_preproc" >&6
 
13146
 
 
13147
# So?  What about this header?
 
13148
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
13149
  yes:no: )
 
13150
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
13151
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
13152
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 
13153
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 
13154
    ac_header_preproc=yes
 
13155
    ;;
 
13156
  no:yes:* )
 
13157
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 
13158
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 
13159
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
 
13160
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
 
13161
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 
13162
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 
13163
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
 
13164
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
13165
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 
13166
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 
13167
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 
13168
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
13169
    (
 
13170
      cat <<\_ASBOX
 
13171
## ------------------------------------------ ##
 
13172
## Report this to the AC_PACKAGE_NAME lists.  ##
 
13173
## ------------------------------------------ ##
 
13174
_ASBOX
 
13175
    ) |
 
13176
      sed "s/^/$as_me: WARNING:     /" >&2
 
13177
    ;;
 
13178
esac
 
13179
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
13180
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
13181
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
13182
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13183
else
 
13184
  eval "$as_ac_Header=\$ac_header_preproc"
 
13185
fi
 
13186
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
13187
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
13188
 
 
13189
fi
 
13190
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
13191
  cat >>confdefs.h <<_ACEOF
 
13192
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
13193
_ACEOF
 
13194
 lber_h="#include <lber.h>"
 
13195
fi
 
13196
 
 
13197
done
 
13198
 
 
13199
 
 
13200
    # Solaris has a problem in <ldap.h> which prevents it from
 
13201
    # being included by itself.  Check for <ldap.h> manually,
 
13202
    # including lber.h first.
 
13203
    echo "$as_me:$LINENO: checking for ldap.h" >&5
 
13204
echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6
 
13205
if test "${apr_cv_hdr_ldap_h+set}" = set; then
 
13206
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13207
else
 
13208
  cat >conftest.$ac_ext <<_ACEOF
 
13209
/* confdefs.h.  */
 
13210
_ACEOF
 
13211
cat confdefs.h >>conftest.$ac_ext
 
13212
cat >>conftest.$ac_ext <<_ACEOF
 
13213
/* end confdefs.h.  */
 
13214
#ifdef HAVE_LBER_H
 
13215
    #include <lber.h>
 
13216
    #endif
 
13217
    #include <ldap.h>
 
13218
 
 
13219
_ACEOF
 
13220
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
13221
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
13222
  ac_status=$?
 
13223
  grep -v '^ *+' conftest.er1 >conftest.err
 
13224
  rm -f conftest.er1
 
13225
  cat conftest.err >&5
 
13226
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13227
  (exit $ac_status); } >/dev/null; then
 
13228
  if test -s conftest.err; then
 
13229
    ac_cpp_err=$ac_c_preproc_warn_flag
 
13230
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
13231
  else
 
13232
    ac_cpp_err=
 
13233
  fi
 
13234
else
 
13235
  ac_cpp_err=yes
 
13236
fi
 
13237
if test -z "$ac_cpp_err"; then
 
13238
  apr_cv_hdr_ldap_h=yes
 
13239
else
 
13240
  echo "$as_me: failed program was:" >&5
 
13241
sed 's/^/| /' conftest.$ac_ext >&5
 
13242
 
 
13243
  apr_cv_hdr_ldap_h=no
 
13244
fi
 
13245
rm -f conftest.err conftest.$ac_ext
 
13246
fi
 
13247
echo "$as_me:$LINENO: result: $apr_cv_hdr_ldap_h" >&5
 
13248
echo "${ECHO_T}$apr_cv_hdr_ldap_h" >&6
 
13249
    if test "$apr_cv_hdr_ldap_h" = "yes"; then
 
13250
      ldap_h="#include <ldap.h>"
 
13251
 
 
13252
cat >>confdefs.h <<\_ACEOF
 
13253
#define HAVE_LDAP_H 1
 
13254
_ACEOF
 
13255
 
 
13256
    fi
 
13257
 
 
13258
 
 
13259
for ac_header in ldap_ssl.h
 
13260
do
 
13261
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
13262
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
13263
  echo "$as_me:$LINENO: checking for $ac_header" >&5
 
13264
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
13265
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
13266
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13267
fi
 
13268
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
13269
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
13270
else
 
13271
  # Is the header compilable?
 
13272
echo "$as_me:$LINENO: checking $ac_header usability" >&5
 
13273
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 
13274
cat >conftest.$ac_ext <<_ACEOF
 
13275
/* confdefs.h.  */
 
13276
_ACEOF
 
13277
cat confdefs.h >>conftest.$ac_ext
 
13278
cat >>conftest.$ac_ext <<_ACEOF
 
13279
/* end confdefs.h.  */
 
13280
$ac_includes_default
 
13281
#include <$ac_header>
 
13282
_ACEOF
 
13283
rm -f conftest.$ac_objext
 
13284
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13285
  (eval $ac_compile) 2>conftest.er1
 
13286
  ac_status=$?
 
13287
  grep -v '^ *+' conftest.er1 >conftest.err
 
13288
  rm -f conftest.er1
 
13289
  cat conftest.err >&5
 
13290
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13291
  (exit $ac_status); } &&
 
13292
         { ac_try='test -z "$ac_c_werror_flag"
 
13293
                         || test ! -s conftest.err'
 
13294
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13295
  (eval $ac_try) 2>&5
 
13296
  ac_status=$?
 
13297
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13298
  (exit $ac_status); }; } &&
 
13299
         { ac_try='test -s conftest.$ac_objext'
 
13300
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13301
  (eval $ac_try) 2>&5
 
13302
  ac_status=$?
 
13303
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13304
  (exit $ac_status); }; }; then
 
13305
  ac_header_compiler=yes
 
13306
else
 
13307
  echo "$as_me: failed program was:" >&5
 
13308
sed 's/^/| /' conftest.$ac_ext >&5
 
13309
 
 
13310
ac_header_compiler=no
 
13311
fi
 
13312
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13313
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
13314
echo "${ECHO_T}$ac_header_compiler" >&6
 
13315
 
 
13316
# Is the header present?
 
13317
echo "$as_me:$LINENO: checking $ac_header presence" >&5
 
13318
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 
13319
cat >conftest.$ac_ext <<_ACEOF
 
13320
/* confdefs.h.  */
 
13321
_ACEOF
 
13322
cat confdefs.h >>conftest.$ac_ext
 
13323
cat >>conftest.$ac_ext <<_ACEOF
 
13324
/* end confdefs.h.  */
 
13325
#include <$ac_header>
 
13326
_ACEOF
 
13327
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
13328
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
13329
  ac_status=$?
 
13330
  grep -v '^ *+' conftest.er1 >conftest.err
 
13331
  rm -f conftest.er1
 
13332
  cat conftest.err >&5
 
13333
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13334
  (exit $ac_status); } >/dev/null; then
 
13335
  if test -s conftest.err; then
 
13336
    ac_cpp_err=$ac_c_preproc_warn_flag
 
13337
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
13338
  else
 
13339
    ac_cpp_err=
 
13340
  fi
 
13341
else
 
13342
  ac_cpp_err=yes
 
13343
fi
 
13344
if test -z "$ac_cpp_err"; then
 
13345
  ac_header_preproc=yes
 
13346
else
 
13347
  echo "$as_me: failed program was:" >&5
 
13348
sed 's/^/| /' conftest.$ac_ext >&5
 
13349
 
 
13350
  ac_header_preproc=no
 
13351
fi
 
13352
rm -f conftest.err conftest.$ac_ext
 
13353
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
13354
echo "${ECHO_T}$ac_header_preproc" >&6
 
13355
 
 
13356
# So?  What about this header?
 
13357
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
13358
  yes:no: )
 
13359
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
13360
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
13361
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 
13362
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 
13363
    ac_header_preproc=yes
 
13364
    ;;
 
13365
  no:yes:* )
 
13366
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 
13367
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 
13368
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
 
13369
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
 
13370
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 
13371
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 
13372
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
 
13373
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
13374
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 
13375
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 
13376
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 
13377
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
13378
    (
 
13379
      cat <<\_ASBOX
 
13380
## ------------------------------------------ ##
 
13381
## Report this to the AC_PACKAGE_NAME lists.  ##
 
13382
## ------------------------------------------ ##
 
13383
_ASBOX
 
13384
    ) |
 
13385
      sed "s/^/$as_me: WARNING:     /" >&2
 
13386
    ;;
 
13387
esac
 
13388
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
13389
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
13390
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
13391
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13392
else
 
13393
  eval "$as_ac_Header=\$ac_header_preproc"
 
13394
fi
 
13395
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
13396
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
13397
 
 
13398
fi
 
13399
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
13400
  cat >>confdefs.h <<_ACEOF
 
13401
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
13402
_ACEOF
 
13403
 ldap_ssl_h="#include <ldap_ssl.h>"
 
13404
fi
 
13405
 
 
13406
done
 
13407
 
 
13408
 
 
13409
    if test "$apr_cv_hdr_ldap_h" = "yes"; then
 
13410
      echo "$as_me:$LINENO: checking for LDAP toolkit" >&5
 
13411
echo $ECHO_N "checking for LDAP toolkit... $ECHO_C" >&6
 
13412
if test "${apr_cv_ldap_toolkit+set}" = set; then
 
13413
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13414
else
 
13415
 
 
13416
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13417
          cat >conftest.$ac_ext <<_ACEOF
 
13418
/* confdefs.h.  */
 
13419
_ACEOF
 
13420
cat confdefs.h >>conftest.$ac_ext
 
13421
cat >>conftest.$ac_ext <<_ACEOF
 
13422
/* end confdefs.h.  */
 
13423
$lber_h
 
13424
                       $ldap_h
 
13425
                       LDAP_VENDOR_NAME
 
13426
_ACEOF
 
13427
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
13428
  $EGREP "OpenLDAP" >/dev/null 2>&1; then
 
13429
  apu_has_ldap_openldap="1"
 
13430
                                           apr_cv_ldap_toolkit="OpenLDAP"
 
13431
fi
 
13432
rm -f conftest*
 
13433
 
 
13434
        fi
 
13435
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13436
          cat >conftest.$ac_ext <<_ACEOF
 
13437
/* confdefs.h.  */
 
13438
_ACEOF
 
13439
cat confdefs.h >>conftest.$ac_ext
 
13440
cat >>conftest.$ac_ext <<_ACEOF
 
13441
/* end confdefs.h.  */
 
13442
$lber_h
 
13443
                       $ldap_h
 
13444
                       LDAP_VENDOR_NAME
 
13445
_ACEOF
 
13446
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
13447
  $EGREP "Sun Microsystems Inc." >/dev/null 2>&1; then
 
13448
  apu_has_ldap_solaris="1"
 
13449
                                           apr_cv_ldap_toolkit="Solaris"
 
13450
fi
 
13451
rm -f conftest*
 
13452
 
 
13453
        fi
 
13454
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13455
          cat >conftest.$ac_ext <<_ACEOF
 
13456
/* confdefs.h.  */
 
13457
_ACEOF
 
13458
cat confdefs.h >>conftest.$ac_ext
 
13459
cat >>conftest.$ac_ext <<_ACEOF
 
13460
/* end confdefs.h.  */
 
13461
$lber_h
 
13462
                       $ldap_h
 
13463
                       LDAP_VENDOR_NAME
 
13464
_ACEOF
 
13465
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
13466
  $EGREP "Novell" >/dev/null 2>&1; then
 
13467
  apu_has_ldap_novell="1"
 
13468
                                           apr_cv_ldap_toolkit="Novell"
 
13469
fi
 
13470
rm -f conftest*
 
13471
 
 
13472
        fi
 
13473
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13474
          cat >conftest.$ac_ext <<_ACEOF
 
13475
/* confdefs.h.  */
 
13476
_ACEOF
 
13477
cat confdefs.h >>conftest.$ac_ext
 
13478
cat >>conftest.$ac_ext <<_ACEOF
 
13479
/* end confdefs.h.  */
 
13480
$lber_h
 
13481
                       $ldap_h
 
13482
                       LDAP_VENDOR_NAME
 
13483
_ACEOF
 
13484
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
13485
  $EGREP "Microsoft Corporation." >/dev/null 2>&1; then
 
13486
  apu_has_ldap_microsoft="1"
 
13487
                                           apr_cv_ldap_toolkit="Microsoft"
 
13488
fi
 
13489
rm -f conftest*
 
13490
 
 
13491
        fi
 
13492
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13493
          cat >conftest.$ac_ext <<_ACEOF
 
13494
/* confdefs.h.  */
 
13495
_ACEOF
 
13496
cat confdefs.h >>conftest.$ac_ext
 
13497
cat >>conftest.$ac_ext <<_ACEOF
 
13498
/* end confdefs.h.  */
 
13499
$lber_h
 
13500
                       $ldap_h
 
13501
                       LDAP_VENDOR_NAME
 
13502
_ACEOF
 
13503
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
13504
  $EGREP "Netscape Communications Corp." >/dev/null 2>&1; then
 
13505
  apu_has_ldap_netscape="1"
 
13506
                                           apr_cv_ldap_toolkit="Netscape"
 
13507
fi
 
13508
rm -f conftest*
 
13509
 
 
13510
        fi
 
13511
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13512
          cat >conftest.$ac_ext <<_ACEOF
 
13513
/* confdefs.h.  */
 
13514
_ACEOF
 
13515
cat confdefs.h >>conftest.$ac_ext
 
13516
cat >>conftest.$ac_ext <<_ACEOF
 
13517
/* end confdefs.h.  */
 
13518
$lber_h
 
13519
                       $ldap_h
 
13520
                       LDAP_VENDOR_NAME
 
13521
_ACEOF
 
13522
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
13523
  $EGREP "mozilla.org" >/dev/null 2>&1; then
 
13524
  apu_has_ldap_mozilla="1"
 
13525
                                           apr_cv_ldap_toolkit="Mozilla"
 
13526
fi
 
13527
rm -f conftest*
 
13528
 
 
13529
        fi
 
13530
        if test "x$apr_cv_ldap_toolkit" = "x"; then
 
13531
          apu_has_ldap_other="1"
 
13532
          apr_cv_ldap_toolkit="unknown"
 
13533
        fi
 
13534
 
 
13535
fi
 
13536
echo "$as_me:$LINENO: result: $apr_cv_ldap_toolkit" >&5
 
13537
echo "${ECHO_T}$apr_cv_ldap_toolkit" >&6
 
13538
    fi
 
13539
 
 
13540
    CPPFLAGS=$save_cppflags
 
13541
    LDFLAGS=$save_ldflags
 
13542
    LIBS=$save_libs
 
13543
 
 
13544
fi;
 
13545
 
 
13546
 
 
13547
 
 
13548
 
 
13549
 
 
13550
 
 
13551
 
 
13552
 
 
13553
 
 
13554
 
 
13555
 
 
13556
 
 
13557
 
 
13558
 
 
13559
 
 
13560
 
 
13561
 
 
13562
 
 
13563
 
 
13564
 
 
13565
 
 
13566
 
 
13567
  apu_use_sdbm=0
 
13568
  apu_use_ndbm=0
 
13569
  apu_use_gdbm=0
 
13570
  apu_use_db=0
 
13571
    apu_have_sdbm=1
 
13572
  apu_have_gdbm=0
 
13573
  apu_have_ndbm=0
 
13574
  apu_have_db=0
 
13575
 
 
13576
  apu_db_header=db.h                # default so apu_select_dbm.h is syntactically correct
 
13577
  apu_db_version=0
 
13578
 
 
13579
 
 
13580
# Check whether --with-dbm or --without-dbm was given.
 
13581
if test "${with_dbm+set}" = set; then
 
13582
  withval="$with_dbm"
 
13583
 
 
13584
    if test "$withval" = "yes"; then
 
13585
      { { echo "$as_me:$LINENO: error: --with-dbm needs to specify a DBM type to use.
 
13586
        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44" >&5
 
13587
echo "$as_me: error: --with-dbm needs to specify a DBM type to use.
 
13588
        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44" >&2;}
 
13589
   { (exit 1); exit 1; }; }
 
13590
    fi
 
13591
    requested="$withval"
 
13592
 
 
13593
else
 
13594
 
 
13595
    requested=default
 
13596
 
 
13597
fi;
 
13598
 
 
13599
 
 
13600
# Check whether --with-gdbm or --without-gdbm was given.
 
13601
if test "${with_gdbm+set}" = set; then
 
13602
  withval="$with_gdbm"
 
13603
 
 
13604
    apu_have_gdbm=0
 
13605
    if test "$withval" = "yes"; then
 
13606
      if test "${ac_cv_header_gdbm_h+set}" = set; then
 
13607
  echo "$as_me:$LINENO: checking for gdbm.h" >&5
 
13608
echo $ECHO_N "checking for gdbm.h... $ECHO_C" >&6
 
13609
if test "${ac_cv_header_gdbm_h+set}" = set; then
 
13610
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13611
fi
 
13612
echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
 
13613
echo "${ECHO_T}$ac_cv_header_gdbm_h" >&6
 
13614
else
 
13615
  # Is the header compilable?
 
13616
echo "$as_me:$LINENO: checking gdbm.h usability" >&5
 
13617
echo $ECHO_N "checking gdbm.h usability... $ECHO_C" >&6
 
13618
cat >conftest.$ac_ext <<_ACEOF
 
13619
/* confdefs.h.  */
 
13620
_ACEOF
 
13621
cat confdefs.h >>conftest.$ac_ext
 
13622
cat >>conftest.$ac_ext <<_ACEOF
 
13623
/* end confdefs.h.  */
 
13624
$ac_includes_default
 
13625
#include <gdbm.h>
 
13626
_ACEOF
 
13627
rm -f conftest.$ac_objext
 
13628
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13629
  (eval $ac_compile) 2>conftest.er1
 
13630
  ac_status=$?
 
13631
  grep -v '^ *+' conftest.er1 >conftest.err
 
13632
  rm -f conftest.er1
 
13633
  cat conftest.err >&5
 
13634
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13635
  (exit $ac_status); } &&
 
13636
         { ac_try='test -z "$ac_c_werror_flag"
 
13637
                         || test ! -s conftest.err'
 
13638
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13639
  (eval $ac_try) 2>&5
 
13640
  ac_status=$?
 
13641
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13642
  (exit $ac_status); }; } &&
 
13643
         { ac_try='test -s conftest.$ac_objext'
 
13644
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13645
  (eval $ac_try) 2>&5
 
13646
  ac_status=$?
 
13647
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13648
  (exit $ac_status); }; }; then
 
13649
  ac_header_compiler=yes
 
13650
else
 
13651
  echo "$as_me: failed program was:" >&5
 
13652
sed 's/^/| /' conftest.$ac_ext >&5
 
13653
 
 
13654
ac_header_compiler=no
 
13655
fi
 
13656
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13657
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
13658
echo "${ECHO_T}$ac_header_compiler" >&6
 
13659
 
 
13660
# Is the header present?
 
13661
echo "$as_me:$LINENO: checking gdbm.h presence" >&5
 
13662
echo $ECHO_N "checking gdbm.h presence... $ECHO_C" >&6
 
13663
cat >conftest.$ac_ext <<_ACEOF
 
13664
/* confdefs.h.  */
 
13665
_ACEOF
 
13666
cat confdefs.h >>conftest.$ac_ext
 
13667
cat >>conftest.$ac_ext <<_ACEOF
 
13668
/* end confdefs.h.  */
 
13669
#include <gdbm.h>
 
13670
_ACEOF
 
13671
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
13672
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
13673
  ac_status=$?
 
13674
  grep -v '^ *+' conftest.er1 >conftest.err
 
13675
  rm -f conftest.er1
 
13676
  cat conftest.err >&5
 
13677
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13678
  (exit $ac_status); } >/dev/null; then
 
13679
  if test -s conftest.err; then
 
13680
    ac_cpp_err=$ac_c_preproc_warn_flag
 
13681
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
13682
  else
 
13683
    ac_cpp_err=
 
13684
  fi
 
13685
else
 
13686
  ac_cpp_err=yes
 
13687
fi
 
13688
if test -z "$ac_cpp_err"; then
 
13689
  ac_header_preproc=yes
 
13690
else
 
13691
  echo "$as_me: failed program was:" >&5
 
13692
sed 's/^/| /' conftest.$ac_ext >&5
 
13693
 
 
13694
  ac_header_preproc=no
 
13695
fi
 
13696
rm -f conftest.err conftest.$ac_ext
 
13697
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
13698
echo "${ECHO_T}$ac_header_preproc" >&6
 
13699
 
 
13700
# So?  What about this header?
 
13701
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
13702
  yes:no: )
 
13703
    { echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
13704
echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
13705
    { echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
 
13706
echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
 
13707
    ac_header_preproc=yes
 
13708
    ;;
 
13709
  no:yes:* )
 
13710
    { echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
 
13711
echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
 
13712
    { echo "$as_me:$LINENO: WARNING: gdbm.h:     check for missing prerequisite headers?" >&5
 
13713
echo "$as_me: WARNING: gdbm.h:     check for missing prerequisite headers?" >&2;}
 
13714
    { echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
 
13715
echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
 
13716
    { echo "$as_me:$LINENO: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&5
 
13717
echo "$as_me: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
13718
    { echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
 
13719
echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
 
13720
    { echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
 
13721
echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
 
13722
    (
 
13723
      cat <<\_ASBOX
 
13724
## ------------------------------------------ ##
 
13725
## Report this to the AC_PACKAGE_NAME lists.  ##
 
13726
## ------------------------------------------ ##
 
13727
_ASBOX
 
13728
    ) |
 
13729
      sed "s/^/$as_me: WARNING:     /" >&2
 
13730
    ;;
 
13731
esac
 
13732
echo "$as_me:$LINENO: checking for gdbm.h" >&5
 
13733
echo $ECHO_N "checking for gdbm.h... $ECHO_C" >&6
 
13734
if test "${ac_cv_header_gdbm_h+set}" = set; then
 
13735
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13736
else
 
13737
  ac_cv_header_gdbm_h=$ac_header_preproc
 
13738
fi
 
13739
echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
 
13740
echo "${ECHO_T}$ac_cv_header_gdbm_h" >&6
 
13741
 
 
13742
fi
 
13743
if test $ac_cv_header_gdbm_h = yes; then
 
13744
  echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
 
13745
echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
 
13746
if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
 
13747
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13748
else
 
13749
  ac_check_lib_save_LIBS=$LIBS
 
13750
LIBS="-lgdbm  $LIBS"
 
13751
cat >conftest.$ac_ext <<_ACEOF
 
13752
/* confdefs.h.  */
 
13753
_ACEOF
 
13754
cat confdefs.h >>conftest.$ac_ext
 
13755
cat >>conftest.$ac_ext <<_ACEOF
 
13756
/* end confdefs.h.  */
 
13757
 
 
13758
/* Override any gcc2 internal prototype to avoid an error.  */
 
13759
#ifdef __cplusplus
 
13760
extern "C"
 
13761
#endif
 
13762
/* We use char because int might match the return type of a gcc2
 
13763
   builtin and then its argument prototype would still apply.  */
 
13764
char gdbm_open ();
 
13765
int
 
13766
main ()
 
13767
{
 
13768
gdbm_open ();
 
13769
  ;
 
13770
  return 0;
 
13771
}
 
13772
_ACEOF
 
13773
rm -f conftest.$ac_objext conftest$ac_exeext
 
13774
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13775
  (eval $ac_link) 2>conftest.er1
 
13776
  ac_status=$?
 
13777
  grep -v '^ *+' conftest.er1 >conftest.err
 
13778
  rm -f conftest.er1
 
13779
  cat conftest.err >&5
 
13780
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13781
  (exit $ac_status); } &&
 
13782
         { ac_try='test -z "$ac_c_werror_flag"
 
13783
                         || test ! -s conftest.err'
 
13784
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13785
  (eval $ac_try) 2>&5
 
13786
  ac_status=$?
 
13787
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13788
  (exit $ac_status); }; } &&
 
13789
         { ac_try='test -s conftest$ac_exeext'
 
13790
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13791
  (eval $ac_try) 2>&5
 
13792
  ac_status=$?
 
13793
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13794
  (exit $ac_status); }; }; then
 
13795
  ac_cv_lib_gdbm_gdbm_open=yes
 
13796
else
 
13797
  echo "$as_me: failed program was:" >&5
 
13798
sed 's/^/| /' conftest.$ac_ext >&5
 
13799
 
 
13800
ac_cv_lib_gdbm_gdbm_open=no
 
13801
fi
 
13802
rm -f conftest.err conftest.$ac_objext \
 
13803
      conftest$ac_exeext conftest.$ac_ext
 
13804
LIBS=$ac_check_lib_save_LIBS
 
13805
fi
 
13806
echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
 
13807
echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
 
13808
if test $ac_cv_lib_gdbm_gdbm_open = yes; then
 
13809
  apu_have_gdbm=1
 
13810
fi
 
13811
 
 
13812
fi
 
13813
 
 
13814
 
 
13815
    elif test "$withval" = "no"; then
 
13816
      apu_have_gdbm=0
 
13817
    else
 
13818
      CPPFLAGS="-I$withval/include"
 
13819
      LIBS="-L$withval/lib "
 
13820
 
 
13821
      echo "$as_me:$LINENO: checking checking for gdbm in $withval" >&5
 
13822
echo $ECHO_N "checking checking for gdbm in $withval... $ECHO_C" >&6
 
13823
      if test "${ac_cv_header_gdbm_h+set}" = set; then
 
13824
  echo "$as_me:$LINENO: checking for gdbm.h" >&5
 
13825
echo $ECHO_N "checking for gdbm.h... $ECHO_C" >&6
 
13826
if test "${ac_cv_header_gdbm_h+set}" = set; then
 
13827
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13828
fi
 
13829
echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
 
13830
echo "${ECHO_T}$ac_cv_header_gdbm_h" >&6
 
13831
else
 
13832
  # Is the header compilable?
 
13833
echo "$as_me:$LINENO: checking gdbm.h usability" >&5
 
13834
echo $ECHO_N "checking gdbm.h usability... $ECHO_C" >&6
 
13835
cat >conftest.$ac_ext <<_ACEOF
 
13836
/* confdefs.h.  */
 
13837
_ACEOF
 
13838
cat confdefs.h >>conftest.$ac_ext
 
13839
cat >>conftest.$ac_ext <<_ACEOF
 
13840
/* end confdefs.h.  */
 
13841
$ac_includes_default
 
13842
#include <gdbm.h>
 
13843
_ACEOF
 
13844
rm -f conftest.$ac_objext
 
13845
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13846
  (eval $ac_compile) 2>conftest.er1
 
13847
  ac_status=$?
 
13848
  grep -v '^ *+' conftest.er1 >conftest.err
 
13849
  rm -f conftest.er1
 
13850
  cat conftest.err >&5
 
13851
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13852
  (exit $ac_status); } &&
 
13853
         { ac_try='test -z "$ac_c_werror_flag"
 
13854
                         || test ! -s conftest.err'
 
13855
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13856
  (eval $ac_try) 2>&5
 
13857
  ac_status=$?
 
13858
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13859
  (exit $ac_status); }; } &&
 
13860
         { ac_try='test -s conftest.$ac_objext'
 
13861
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13862
  (eval $ac_try) 2>&5
 
13863
  ac_status=$?
 
13864
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13865
  (exit $ac_status); }; }; then
 
13866
  ac_header_compiler=yes
 
13867
else
 
13868
  echo "$as_me: failed program was:" >&5
 
13869
sed 's/^/| /' conftest.$ac_ext >&5
 
13870
 
 
13871
ac_header_compiler=no
 
13872
fi
 
13873
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13874
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
13875
echo "${ECHO_T}$ac_header_compiler" >&6
 
13876
 
 
13877
# Is the header present?
 
13878
echo "$as_me:$LINENO: checking gdbm.h presence" >&5
 
13879
echo $ECHO_N "checking gdbm.h presence... $ECHO_C" >&6
 
13880
cat >conftest.$ac_ext <<_ACEOF
 
13881
/* confdefs.h.  */
 
13882
_ACEOF
 
13883
cat confdefs.h >>conftest.$ac_ext
 
13884
cat >>conftest.$ac_ext <<_ACEOF
 
13885
/* end confdefs.h.  */
 
13886
#include <gdbm.h>
 
13887
_ACEOF
 
13888
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
13889
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
13890
  ac_status=$?
 
13891
  grep -v '^ *+' conftest.er1 >conftest.err
 
13892
  rm -f conftest.er1
 
13893
  cat conftest.err >&5
 
13894
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13895
  (exit $ac_status); } >/dev/null; then
 
13896
  if test -s conftest.err; then
 
13897
    ac_cpp_err=$ac_c_preproc_warn_flag
 
13898
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
13899
  else
 
13900
    ac_cpp_err=
 
13901
  fi
 
13902
else
 
13903
  ac_cpp_err=yes
 
13904
fi
 
13905
if test -z "$ac_cpp_err"; then
 
13906
  ac_header_preproc=yes
 
13907
else
 
13908
  echo "$as_me: failed program was:" >&5
 
13909
sed 's/^/| /' conftest.$ac_ext >&5
 
13910
 
 
13911
  ac_header_preproc=no
 
13912
fi
 
13913
rm -f conftest.err conftest.$ac_ext
 
13914
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
13915
echo "${ECHO_T}$ac_header_preproc" >&6
 
13916
 
 
13917
# So?  What about this header?
 
13918
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
13919
  yes:no: )
 
13920
    { echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
13921
echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
13922
    { echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
 
13923
echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
 
13924
    ac_header_preproc=yes
 
13925
    ;;
 
13926
  no:yes:* )
 
13927
    { echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
 
13928
echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
 
13929
    { echo "$as_me:$LINENO: WARNING: gdbm.h:     check for missing prerequisite headers?" >&5
 
13930
echo "$as_me: WARNING: gdbm.h:     check for missing prerequisite headers?" >&2;}
 
13931
    { echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
 
13932
echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
 
13933
    { echo "$as_me:$LINENO: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&5
 
13934
echo "$as_me: WARNING: gdbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
13935
    { echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
 
13936
echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
 
13937
    { echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
 
13938
echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
 
13939
    (
 
13940
      cat <<\_ASBOX
 
13941
## ------------------------------------------ ##
 
13942
## Report this to the AC_PACKAGE_NAME lists.  ##
 
13943
## ------------------------------------------ ##
 
13944
_ASBOX
 
13945
    ) |
 
13946
      sed "s/^/$as_me: WARNING:     /" >&2
 
13947
    ;;
 
13948
esac
 
13949
echo "$as_me:$LINENO: checking for gdbm.h" >&5
 
13950
echo $ECHO_N "checking for gdbm.h... $ECHO_C" >&6
 
13951
if test "${ac_cv_header_gdbm_h+set}" = set; then
 
13952
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13953
else
 
13954
  ac_cv_header_gdbm_h=$ac_header_preproc
 
13955
fi
 
13956
echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
 
13957
echo "${ECHO_T}$ac_cv_header_gdbm_h" >&6
 
13958
 
 
13959
fi
 
13960
if test $ac_cv_header_gdbm_h = yes; then
 
13961
  echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
 
13962
echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
 
13963
if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
 
13964
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13965
else
 
13966
  ac_check_lib_save_LIBS=$LIBS
 
13967
LIBS="-lgdbm  $LIBS"
 
13968
cat >conftest.$ac_ext <<_ACEOF
 
13969
/* confdefs.h.  */
 
13970
_ACEOF
 
13971
cat confdefs.h >>conftest.$ac_ext
 
13972
cat >>conftest.$ac_ext <<_ACEOF
 
13973
/* end confdefs.h.  */
 
13974
 
 
13975
/* Override any gcc2 internal prototype to avoid an error.  */
 
13976
#ifdef __cplusplus
 
13977
extern "C"
 
13978
#endif
 
13979
/* We use char because int might match the return type of a gcc2
 
13980
   builtin and then its argument prototype would still apply.  */
 
13981
char gdbm_open ();
 
13982
int
 
13983
main ()
 
13984
{
 
13985
gdbm_open ();
 
13986
  ;
 
13987
  return 0;
 
13988
}
 
13989
_ACEOF
 
13990
rm -f conftest.$ac_objext conftest$ac_exeext
 
13991
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13992
  (eval $ac_link) 2>conftest.er1
 
13993
  ac_status=$?
 
13994
  grep -v '^ *+' conftest.er1 >conftest.err
 
13995
  rm -f conftest.er1
 
13996
  cat conftest.err >&5
 
13997
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13998
  (exit $ac_status); } &&
 
13999
         { ac_try='test -z "$ac_c_werror_flag"
 
14000
                         || test ! -s conftest.err'
 
14001
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14002
  (eval $ac_try) 2>&5
 
14003
  ac_status=$?
 
14004
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14005
  (exit $ac_status); }; } &&
 
14006
         { ac_try='test -s conftest$ac_exeext'
 
14007
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14008
  (eval $ac_try) 2>&5
 
14009
  ac_status=$?
 
14010
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14011
  (exit $ac_status); }; }; then
 
14012
  ac_cv_lib_gdbm_gdbm_open=yes
 
14013
else
 
14014
  echo "$as_me: failed program was:" >&5
 
14015
sed 's/^/| /' conftest.$ac_ext >&5
 
14016
 
 
14017
ac_cv_lib_gdbm_gdbm_open=no
 
14018
fi
 
14019
rm -f conftest.err conftest.$ac_objext \
 
14020
      conftest$ac_exeext conftest.$ac_ext
 
14021
LIBS=$ac_check_lib_save_LIBS
 
14022
fi
 
14023
echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
 
14024
echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
 
14025
if test $ac_cv_lib_gdbm_gdbm_open = yes; then
 
14026
  apu_have_gdbm=1
 
14027
fi
 
14028
 
 
14029
fi
 
14030
 
 
14031
 
 
14032
      if test "$apu_have_gdbm" != "0"; then
 
14033
 
 
14034
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
14035
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
14036
    APRUTIL_LDFLAGS="-L$withval/lib"
 
14037
  else
 
14038
    apr_addto_bugger="-L$withval/lib"
 
14039
    for i in $apr_addto_bugger; do
 
14040
      apr_addto_duplicate="0"
 
14041
      for j in $APRUTIL_LDFLAGS; do
 
14042
        if test "x$i" = "x$j"; then
 
14043
          apr_addto_duplicate="1"
 
14044
          break
 
14045
        fi
 
14046
      done
 
14047
      if test $apr_addto_duplicate = "0"; then
 
14048
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
14049
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
14050
      fi
 
14051
    done
 
14052
  fi
 
14053
 
 
14054
 
 
14055
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
14056
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
14057
    APRUTIL_INCLUDES="-I$withval/include"
 
14058
  else
 
14059
    apr_addto_bugger="-I$withval/include"
 
14060
    for i in $apr_addto_bugger; do
 
14061
      apr_addto_duplicate="0"
 
14062
      for j in $APRUTIL_INCLUDES; do
 
14063
        if test "x$i" = "x$j"; then
 
14064
          apr_addto_duplicate="1"
 
14065
          break
 
14066
        fi
 
14067
      done
 
14068
      if test $apr_addto_duplicate = "0"; then
 
14069
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
14070
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
14071
      fi
 
14072
    done
 
14073
  fi
 
14074
 
 
14075
      fi
 
14076
    fi
 
14077
 
 
14078
fi;
 
14079
 
 
14080
 
 
14081
# Check whether --with-ndbm or --without-ndbm was given.
 
14082
if test "${with_ndbm+set}" = set; then
 
14083
  withval="$with_ndbm"
 
14084
 
 
14085
    apu_have_ndbm=0
 
14086
    if test "$withval" = "yes"; then
 
14087
      echo "$as_me:$LINENO: checking checking for ndbm in the usual places" >&5
 
14088
echo $ECHO_N "checking checking for ndbm in the usual places... $ECHO_C" >&6
 
14089
      apu_want_ndbm=1
 
14090
      NDBM_INC=""
 
14091
      NDBM_LDFLAGS=""
 
14092
    elif test "$withval" = "no"; then
 
14093
      apu_want_ndbm=0
 
14094
    else
 
14095
      apu_want_ndbm=1
 
14096
      case "$withval" in
 
14097
        *":"*)
 
14098
          NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
 
14099
          NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
 
14100
          echo "$as_me:$LINENO: checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS " >&5
 
14101
echo $ECHO_N "checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS ... $ECHO_C" >&6
 
14102
        ;;
 
14103
        *)
 
14104
          NDBM_INC="-I$withval/include"
 
14105
          NDBM_LDFLAGS="-L$withval/lib"
 
14106
          echo "$as_me:$LINENO: checking checking for ndbm includes in $withval" >&5
 
14107
echo $ECHO_N "checking checking for ndbm includes in $withval... $ECHO_C" >&6
 
14108
        ;;
 
14109
      esac
 
14110
    fi
 
14111
 
 
14112
    save_cppflags="$CPPFLAGS"
 
14113
    save_ldflags="$LDFLAGS"
 
14114
    CPPFLAGS="$CPPFLAGS $NDBM_INC"
 
14115
    LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
 
14116
        if test "$apu_want_ndbm" != "0"; then
 
14117
      if test "${ac_cv_header_ndbm_h+set}" = set; then
 
14118
  echo "$as_me:$LINENO: checking for ndbm.h" >&5
 
14119
echo $ECHO_N "checking for ndbm.h... $ECHO_C" >&6
 
14120
if test "${ac_cv_header_ndbm_h+set}" = set; then
 
14121
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14122
fi
 
14123
echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
 
14124
echo "${ECHO_T}$ac_cv_header_ndbm_h" >&6
 
14125
else
 
14126
  # Is the header compilable?
 
14127
echo "$as_me:$LINENO: checking ndbm.h usability" >&5
 
14128
echo $ECHO_N "checking ndbm.h usability... $ECHO_C" >&6
 
14129
cat >conftest.$ac_ext <<_ACEOF
 
14130
/* confdefs.h.  */
 
14131
_ACEOF
 
14132
cat confdefs.h >>conftest.$ac_ext
 
14133
cat >>conftest.$ac_ext <<_ACEOF
 
14134
/* end confdefs.h.  */
 
14135
$ac_includes_default
 
14136
#include <ndbm.h>
 
14137
_ACEOF
 
14138
rm -f conftest.$ac_objext
 
14139
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
14140
  (eval $ac_compile) 2>conftest.er1
 
14141
  ac_status=$?
 
14142
  grep -v '^ *+' conftest.er1 >conftest.err
 
14143
  rm -f conftest.er1
 
14144
  cat conftest.err >&5
 
14145
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14146
  (exit $ac_status); } &&
 
14147
         { ac_try='test -z "$ac_c_werror_flag"
 
14148
                         || test ! -s conftest.err'
 
14149
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14150
  (eval $ac_try) 2>&5
 
14151
  ac_status=$?
 
14152
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14153
  (exit $ac_status); }; } &&
 
14154
         { ac_try='test -s conftest.$ac_objext'
 
14155
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14156
  (eval $ac_try) 2>&5
 
14157
  ac_status=$?
 
14158
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14159
  (exit $ac_status); }; }; then
 
14160
  ac_header_compiler=yes
 
14161
else
 
14162
  echo "$as_me: failed program was:" >&5
 
14163
sed 's/^/| /' conftest.$ac_ext >&5
 
14164
 
 
14165
ac_header_compiler=no
 
14166
fi
 
14167
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
14168
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
14169
echo "${ECHO_T}$ac_header_compiler" >&6
 
14170
 
 
14171
# Is the header present?
 
14172
echo "$as_me:$LINENO: checking ndbm.h presence" >&5
 
14173
echo $ECHO_N "checking ndbm.h presence... $ECHO_C" >&6
 
14174
cat >conftest.$ac_ext <<_ACEOF
 
14175
/* confdefs.h.  */
 
14176
_ACEOF
 
14177
cat confdefs.h >>conftest.$ac_ext
 
14178
cat >>conftest.$ac_ext <<_ACEOF
 
14179
/* end confdefs.h.  */
 
14180
#include <ndbm.h>
 
14181
_ACEOF
 
14182
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
14183
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
14184
  ac_status=$?
 
14185
  grep -v '^ *+' conftest.er1 >conftest.err
 
14186
  rm -f conftest.er1
 
14187
  cat conftest.err >&5
 
14188
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14189
  (exit $ac_status); } >/dev/null; then
 
14190
  if test -s conftest.err; then
 
14191
    ac_cpp_err=$ac_c_preproc_warn_flag
 
14192
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
14193
  else
 
14194
    ac_cpp_err=
 
14195
  fi
 
14196
else
 
14197
  ac_cpp_err=yes
 
14198
fi
 
14199
if test -z "$ac_cpp_err"; then
 
14200
  ac_header_preproc=yes
 
14201
else
 
14202
  echo "$as_me: failed program was:" >&5
 
14203
sed 's/^/| /' conftest.$ac_ext >&5
 
14204
 
 
14205
  ac_header_preproc=no
 
14206
fi
 
14207
rm -f conftest.err conftest.$ac_ext
 
14208
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
14209
echo "${ECHO_T}$ac_header_preproc" >&6
 
14210
 
 
14211
# So?  What about this header?
 
14212
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
14213
  yes:no: )
 
14214
    { echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
14215
echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
14216
    { echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
 
14217
echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
 
14218
    ac_header_preproc=yes
 
14219
    ;;
 
14220
  no:yes:* )
 
14221
    { echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
 
14222
echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
 
14223
    { echo "$as_me:$LINENO: WARNING: ndbm.h:     check for missing prerequisite headers?" >&5
 
14224
echo "$as_me: WARNING: ndbm.h:     check for missing prerequisite headers?" >&2;}
 
14225
    { echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
 
14226
echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
 
14227
    { echo "$as_me:$LINENO: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&5
 
14228
echo "$as_me: WARNING: ndbm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
14229
    { echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
 
14230
echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
 
14231
    { echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
 
14232
echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
 
14233
    (
 
14234
      cat <<\_ASBOX
 
14235
## ------------------------------------------ ##
 
14236
## Report this to the AC_PACKAGE_NAME lists.  ##
 
14237
## ------------------------------------------ ##
 
14238
_ASBOX
 
14239
    ) |
 
14240
      sed "s/^/$as_me: WARNING:     /" >&2
 
14241
    ;;
 
14242
esac
 
14243
echo "$as_me:$LINENO: checking for ndbm.h" >&5
 
14244
echo $ECHO_N "checking for ndbm.h... $ECHO_C" >&6
 
14245
if test "${ac_cv_header_ndbm_h+set}" = set; then
 
14246
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14247
else
 
14248
  ac_cv_header_ndbm_h=$ac_header_preproc
 
14249
fi
 
14250
echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
 
14251
echo "${ECHO_T}$ac_cv_header_ndbm_h" >&6
 
14252
 
 
14253
fi
 
14254
if test $ac_cv_header_ndbm_h = yes; then
 
14255
  echo "$as_me:$LINENO: checking for dbm_open in -lc" >&5
 
14256
echo $ECHO_N "checking for dbm_open in -lc... $ECHO_C" >&6
 
14257
if test "${ac_cv_lib_c_dbm_open+set}" = set; then
 
14258
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14259
else
 
14260
  ac_check_lib_save_LIBS=$LIBS
 
14261
LIBS="-lc  $LIBS"
 
14262
cat >conftest.$ac_ext <<_ACEOF
 
14263
/* confdefs.h.  */
 
14264
_ACEOF
 
14265
cat confdefs.h >>conftest.$ac_ext
 
14266
cat >>conftest.$ac_ext <<_ACEOF
 
14267
/* end confdefs.h.  */
 
14268
 
 
14269
/* Override any gcc2 internal prototype to avoid an error.  */
 
14270
#ifdef __cplusplus
 
14271
extern "C"
 
14272
#endif
 
14273
/* We use char because int might match the return type of a gcc2
 
14274
   builtin and then its argument prototype would still apply.  */
 
14275
char dbm_open ();
 
14276
int
 
14277
main ()
 
14278
{
 
14279
dbm_open ();
 
14280
  ;
 
14281
  return 0;
 
14282
}
 
14283
_ACEOF
 
14284
rm -f conftest.$ac_objext conftest$ac_exeext
 
14285
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
14286
  (eval $ac_link) 2>conftest.er1
 
14287
  ac_status=$?
 
14288
  grep -v '^ *+' conftest.er1 >conftest.err
 
14289
  rm -f conftest.er1
 
14290
  cat conftest.err >&5
 
14291
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14292
  (exit $ac_status); } &&
 
14293
         { ac_try='test -z "$ac_c_werror_flag"
 
14294
                         || test ! -s conftest.err'
 
14295
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14296
  (eval $ac_try) 2>&5
 
14297
  ac_status=$?
 
14298
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14299
  (exit $ac_status); }; } &&
 
14300
         { ac_try='test -s conftest$ac_exeext'
 
14301
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14302
  (eval $ac_try) 2>&5
 
14303
  ac_status=$?
 
14304
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14305
  (exit $ac_status); }; }; then
 
14306
  ac_cv_lib_c_dbm_open=yes
 
14307
else
 
14308
  echo "$as_me: failed program was:" >&5
 
14309
sed 's/^/| /' conftest.$ac_ext >&5
 
14310
 
 
14311
ac_cv_lib_c_dbm_open=no
 
14312
fi
 
14313
rm -f conftest.err conftest.$ac_objext \
 
14314
      conftest$ac_exeext conftest.$ac_ext
 
14315
LIBS=$ac_check_lib_save_LIBS
 
14316
fi
 
14317
echo "$as_me:$LINENO: result: $ac_cv_lib_c_dbm_open" >&5
 
14318
echo "${ECHO_T}$ac_cv_lib_c_dbm_open" >&6
 
14319
if test $ac_cv_lib_c_dbm_open = yes; then
 
14320
  apu_have_ndbm=1;apu_ndbm_lib=c
 
14321
else
 
14322
  echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
 
14323
echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
 
14324
if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
 
14325
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14326
else
 
14327
  ac_check_lib_save_LIBS=$LIBS
 
14328
LIBS="-ldbm  $LIBS"
 
14329
cat >conftest.$ac_ext <<_ACEOF
 
14330
/* confdefs.h.  */
 
14331
_ACEOF
 
14332
cat confdefs.h >>conftest.$ac_ext
 
14333
cat >>conftest.$ac_ext <<_ACEOF
 
14334
/* end confdefs.h.  */
 
14335
 
 
14336
/* Override any gcc2 internal prototype to avoid an error.  */
 
14337
#ifdef __cplusplus
 
14338
extern "C"
 
14339
#endif
 
14340
/* We use char because int might match the return type of a gcc2
 
14341
   builtin and then its argument prototype would still apply.  */
 
14342
char dbm_open ();
 
14343
int
 
14344
main ()
 
14345
{
 
14346
dbm_open ();
 
14347
  ;
 
14348
  return 0;
 
14349
}
 
14350
_ACEOF
 
14351
rm -f conftest.$ac_objext conftest$ac_exeext
 
14352
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
14353
  (eval $ac_link) 2>conftest.er1
 
14354
  ac_status=$?
 
14355
  grep -v '^ *+' conftest.er1 >conftest.err
 
14356
  rm -f conftest.er1
 
14357
  cat conftest.err >&5
 
14358
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14359
  (exit $ac_status); } &&
 
14360
         { ac_try='test -z "$ac_c_werror_flag"
 
14361
                         || test ! -s conftest.err'
 
14362
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14363
  (eval $ac_try) 2>&5
 
14364
  ac_status=$?
 
14365
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14366
  (exit $ac_status); }; } &&
 
14367
         { ac_try='test -s conftest$ac_exeext'
 
14368
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14369
  (eval $ac_try) 2>&5
 
14370
  ac_status=$?
 
14371
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14372
  (exit $ac_status); }; }; then
 
14373
  ac_cv_lib_dbm_dbm_open=yes
 
14374
else
 
14375
  echo "$as_me: failed program was:" >&5
 
14376
sed 's/^/| /' conftest.$ac_ext >&5
 
14377
 
 
14378
ac_cv_lib_dbm_dbm_open=no
 
14379
fi
 
14380
rm -f conftest.err conftest.$ac_objext \
 
14381
      conftest$ac_exeext conftest.$ac_ext
 
14382
LIBS=$ac_check_lib_save_LIBS
 
14383
fi
 
14384
echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
 
14385
echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
 
14386
if test $ac_cv_lib_dbm_dbm_open = yes; then
 
14387
  apu_have_ndbm=1;apu_ndbm_lib=dbm
 
14388
else
 
14389
  echo "$as_me:$LINENO: checking for dbm_open in -ldb" >&5
 
14390
echo $ECHO_N "checking for dbm_open in -ldb... $ECHO_C" >&6
 
14391
if test "${ac_cv_lib_db_dbm_open+set}" = set; then
 
14392
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14393
else
 
14394
  ac_check_lib_save_LIBS=$LIBS
 
14395
LIBS="-ldb  $LIBS"
 
14396
cat >conftest.$ac_ext <<_ACEOF
 
14397
/* confdefs.h.  */
 
14398
_ACEOF
 
14399
cat confdefs.h >>conftest.$ac_ext
 
14400
cat >>conftest.$ac_ext <<_ACEOF
 
14401
/* end confdefs.h.  */
 
14402
 
 
14403
/* Override any gcc2 internal prototype to avoid an error.  */
 
14404
#ifdef __cplusplus
 
14405
extern "C"
 
14406
#endif
 
14407
/* We use char because int might match the return type of a gcc2
 
14408
   builtin and then its argument prototype would still apply.  */
 
14409
char dbm_open ();
 
14410
int
 
14411
main ()
 
14412
{
 
14413
dbm_open ();
 
14414
  ;
 
14415
  return 0;
 
14416
}
 
14417
_ACEOF
 
14418
rm -f conftest.$ac_objext conftest$ac_exeext
 
14419
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
14420
  (eval $ac_link) 2>conftest.er1
 
14421
  ac_status=$?
 
14422
  grep -v '^ *+' conftest.er1 >conftest.err
 
14423
  rm -f conftest.er1
 
14424
  cat conftest.err >&5
 
14425
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14426
  (exit $ac_status); } &&
 
14427
         { ac_try='test -z "$ac_c_werror_flag"
 
14428
                         || test ! -s conftest.err'
 
14429
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14430
  (eval $ac_try) 2>&5
 
14431
  ac_status=$?
 
14432
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14433
  (exit $ac_status); }; } &&
 
14434
         { ac_try='test -s conftest$ac_exeext'
 
14435
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14436
  (eval $ac_try) 2>&5
 
14437
  ac_status=$?
 
14438
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14439
  (exit $ac_status); }; }; then
 
14440
  ac_cv_lib_db_dbm_open=yes
 
14441
else
 
14442
  echo "$as_me: failed program was:" >&5
 
14443
sed 's/^/| /' conftest.$ac_ext >&5
 
14444
 
 
14445
ac_cv_lib_db_dbm_open=no
 
14446
fi
 
14447
rm -f conftest.err conftest.$ac_objext \
 
14448
      conftest$ac_exeext conftest.$ac_ext
 
14449
LIBS=$ac_check_lib_save_LIBS
 
14450
fi
 
14451
echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbm_open" >&5
 
14452
echo "${ECHO_T}$ac_cv_lib_db_dbm_open" >&6
 
14453
if test $ac_cv_lib_db_dbm_open = yes; then
 
14454
  apu_have_ndbm=1;apu_ndbm_lib=db
 
14455
else
 
14456
  echo "$as_me:$LINENO: checking for __db_ndbm_open in -ldb" >&5
 
14457
echo $ECHO_N "checking for __db_ndbm_open in -ldb... $ECHO_C" >&6
 
14458
if test "${ac_cv_lib_db___db_ndbm_open+set}" = set; then
 
14459
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14460
else
 
14461
  ac_check_lib_save_LIBS=$LIBS
 
14462
LIBS="-ldb  $LIBS"
 
14463
cat >conftest.$ac_ext <<_ACEOF
 
14464
/* confdefs.h.  */
 
14465
_ACEOF
 
14466
cat confdefs.h >>conftest.$ac_ext
 
14467
cat >>conftest.$ac_ext <<_ACEOF
 
14468
/* end confdefs.h.  */
 
14469
 
 
14470
/* Override any gcc2 internal prototype to avoid an error.  */
 
14471
#ifdef __cplusplus
 
14472
extern "C"
 
14473
#endif
 
14474
/* We use char because int might match the return type of a gcc2
 
14475
   builtin and then its argument prototype would still apply.  */
 
14476
char __db_ndbm_open ();
 
14477
int
 
14478
main ()
 
14479
{
 
14480
__db_ndbm_open ();
 
14481
  ;
 
14482
  return 0;
 
14483
}
 
14484
_ACEOF
 
14485
rm -f conftest.$ac_objext conftest$ac_exeext
 
14486
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
14487
  (eval $ac_link) 2>conftest.er1
 
14488
  ac_status=$?
 
14489
  grep -v '^ *+' conftest.er1 >conftest.err
 
14490
  rm -f conftest.er1
 
14491
  cat conftest.err >&5
 
14492
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14493
  (exit $ac_status); } &&
 
14494
         { ac_try='test -z "$ac_c_werror_flag"
 
14495
                         || test ! -s conftest.err'
 
14496
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14497
  (eval $ac_try) 2>&5
 
14498
  ac_status=$?
 
14499
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14500
  (exit $ac_status); }; } &&
 
14501
         { ac_try='test -s conftest$ac_exeext'
 
14502
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14503
  (eval $ac_try) 2>&5
 
14504
  ac_status=$?
 
14505
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14506
  (exit $ac_status); }; }; then
 
14507
  ac_cv_lib_db___db_ndbm_open=yes
 
14508
else
 
14509
  echo "$as_me: failed program was:" >&5
 
14510
sed 's/^/| /' conftest.$ac_ext >&5
 
14511
 
 
14512
ac_cv_lib_db___db_ndbm_open=no
 
14513
fi
 
14514
rm -f conftest.err conftest.$ac_objext \
 
14515
      conftest$ac_exeext conftest.$ac_ext
 
14516
LIBS=$ac_check_lib_save_LIBS
 
14517
fi
 
14518
echo "$as_me:$LINENO: result: $ac_cv_lib_db___db_ndbm_open" >&5
 
14519
echo "${ECHO_T}$ac_cv_lib_db___db_ndbm_open" >&6
 
14520
if test $ac_cv_lib_db___db_ndbm_open = yes; then
 
14521
  apu_have_ndbm=1;apu_ndbm_lib=db
 
14522
fi
 
14523
 
 
14524
 
 
14525
fi
 
14526
 
 
14527
 
 
14528
fi
 
14529
 
 
14530
 
 
14531
fi
 
14532
 
 
14533
 
 
14534
fi
 
14535
 
 
14536
 
 
14537
      if test "$apu_have_ndbm" != "0";  then
 
14538
        if test "$withval" != "yes"; then
 
14539
 
 
14540
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
14541
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"$NDBM_INC\""
 
14542
    APRUTIL_INCLUDES="$NDBM_INC"
 
14543
  else
 
14544
    apr_addto_bugger="$NDBM_INC"
 
14545
    for i in $apr_addto_bugger; do
 
14546
      apr_addto_duplicate="0"
 
14547
      for j in $APRUTIL_INCLUDES; do
 
14548
        if test "x$i" = "x$j"; then
 
14549
          apr_addto_duplicate="1"
 
14550
          break
 
14551
        fi
 
14552
      done
 
14553
      if test $apr_addto_duplicate = "0"; then
 
14554
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
14555
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
14556
      fi
 
14557
    done
 
14558
  fi
 
14559
 
 
14560
 
 
14561
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
14562
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"$NDBM_LDFLAGS\""
 
14563
    APRUTIL_LDFLAGS="$NDBM_LDFLAGS"
 
14564
  else
 
14565
    apr_addto_bugger="$NDBM_LDFLAGS"
 
14566
    for i in $apr_addto_bugger; do
 
14567
      apr_addto_duplicate="0"
 
14568
      for j in $APRUTIL_LDFLAGS; do
 
14569
        if test "x$i" = "x$j"; then
 
14570
          apr_addto_duplicate="1"
 
14571
          break
 
14572
        fi
 
14573
      done
 
14574
      if test $apr_addto_duplicate = "0"; then
 
14575
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
14576
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
14577
      fi
 
14578
    done
 
14579
  fi
 
14580
 
 
14581
        fi
 
14582
      elif test "$withval" != "yes"; then
 
14583
        { { echo "$as_me:$LINENO: error: NDBM not found in the specified directory" >&5
 
14584
echo "$as_me: error: NDBM not found in the specified directory" >&2;}
 
14585
   { (exit 1); exit 1; }; }
 
14586
      fi
 
14587
    fi
 
14588
    CPPFLAGS="$save_cppflags"
 
14589
    LDFLAGS="$save_ldflags"
 
14590
 
 
14591
else
 
14592
 
 
14593
        apu_have_ndbm=0
 
14594
 
 
14595
fi;
 
14596
 
 
14597
 
 
14598
  if test -n "$apu_db_xtra_libs"; then
 
14599
    saveddbxtralibs="$LIBS"
 
14600
    LIBS="$apu_db_xtra_libs $LIBS"
 
14601
  fi
 
14602
 
 
14603
 
 
14604
# Check whether --with-berkeley-db or --without-berkeley-db was given.
 
14605
if test "${with_berkeley_db+set}" = set; then
 
14606
  withval="$with_berkeley_db"
 
14607
 
 
14608
    if test "$withval" = "yes"; then
 
14609
      apu_want_db=1
 
14610
      user_places=""
 
14611
    elif test "$withval" = "no"; then
 
14612
      apu_want_db=0
 
14613
    else
 
14614
      apu_want_db=1
 
14615
      user_places="$withval"
 
14616
    fi
 
14617
 
 
14618
    if test "$apu_want_db" != "0"; then
 
14619
 
 
14620
  requested=$requested
 
14621
  check_places=$user_places
 
14622
 
 
14623
  case "$requested" in
 
14624
  db)
 
14625
 
 
14626
  all_places="$check_places"
 
14627
 
 
14628
 
 
14629
  places="$all_places"
 
14630
  if test -z "$places"; then
 
14631
    places="std /usr/local/BerkeleyDB.4.4 /boot/home/config"
 
14632
  fi
 
14633
 
 
14634
  bdb_version="4"
 
14635
  if test ""4"" != "-1"; then
 
14636
    bdb_version="$bdb_version."4""
 
14637
    if test ""-1"" != "-1"; then
 
14638
      bdb_version="$bdb_version."-1""
 
14639
    fi
 
14640
  fi
 
14641
  bdb_places="$places"
 
14642
  bdb_default_search_headers="db44/db.h db4/db.h db.h"
 
14643
  bdb_default_search_lib_names="db-4.4 db4-4.4 db44 db4 db"
 
14644
 
 
14645
 
 
14646
  apu_have_db=0
 
14647
 
 
14648
  # Save the original values of the flags we tweak.
 
14649
  apu_check_lib_save_libs="$LIBS"
 
14650
  apu_check_lib_save_ldflags="$LDFLAGS"
 
14651
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
14652
 
 
14653
  # The variable `found' is the prefix under which we've found
 
14654
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
14655
  found=not
 
14656
  for bdb_place in $bdb_places; do
 
14657
 
 
14658
    LDFLAGS="$apu_check_lib_save_ldflags"
 
14659
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
14660
    case "$bdb_place" in
 
14661
      "std" )
 
14662
        description="the standard places"
 
14663
      ;;
 
14664
      *":"* )
 
14665
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
14666
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
14667
        CPPFLAGS="$CPPFLAGS -I$header"
 
14668
        LDFLAGS="$LDFLAGS -L$lib"
 
14669
        description="$header and $lib"
 
14670
      ;;
 
14671
      * )
 
14672
        if test -d $bdb_place; then
 
14673
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
14674
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
14675
        else
 
14676
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
14677
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
14678
          echo "$as_me:$LINENO: result: directory not found" >&5
 
14679
echo "${ECHO_T}directory not found" >&6
 
14680
          continue
 
14681
        fi
 
14682
        description="$bdb_place"
 
14683
      ;;
 
14684
    esac
 
14685
 
 
14686
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
14687
    # trick to display a message instead.
 
14688
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
14689
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
14690
    echo "$as_me:$LINENO: result: " >&5
 
14691
echo "${ECHO_T}" >&6
 
14692
 
 
14693
    for bdb_libname in $bdb_default_search_lib_names; do
 
14694
      for bdb_header in $bdb_default_search_headers; do
 
14695
        # Clear the header cache variable for each location
 
14696
 
 
14697
        cache_id="`echo ac_cv_header_${bdb_header} \
 
14698
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
14699
 
 
14700
        unset $cache_id
 
14701
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
14702
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
14703
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
14704
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
14705
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
14706
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14707
fi
 
14708
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
14709
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
14710
else
 
14711
  # Is the header compilable?
 
14712
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
14713
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
14714
cat >conftest.$ac_ext <<_ACEOF
 
14715
/* confdefs.h.  */
 
14716
_ACEOF
 
14717
cat confdefs.h >>conftest.$ac_ext
 
14718
cat >>conftest.$ac_ext <<_ACEOF
 
14719
/* end confdefs.h.  */
 
14720
$ac_includes_default
 
14721
#include <$bdb_header>
 
14722
_ACEOF
 
14723
rm -f conftest.$ac_objext
 
14724
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
14725
  (eval $ac_compile) 2>conftest.er1
 
14726
  ac_status=$?
 
14727
  grep -v '^ *+' conftest.er1 >conftest.err
 
14728
  rm -f conftest.er1
 
14729
  cat conftest.err >&5
 
14730
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14731
  (exit $ac_status); } &&
 
14732
         { ac_try='test -z "$ac_c_werror_flag"
 
14733
                         || test ! -s conftest.err'
 
14734
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14735
  (eval $ac_try) 2>&5
 
14736
  ac_status=$?
 
14737
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14738
  (exit $ac_status); }; } &&
 
14739
         { ac_try='test -s conftest.$ac_objext'
 
14740
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14741
  (eval $ac_try) 2>&5
 
14742
  ac_status=$?
 
14743
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14744
  (exit $ac_status); }; }; then
 
14745
  ac_header_compiler=yes
 
14746
else
 
14747
  echo "$as_me: failed program was:" >&5
 
14748
sed 's/^/| /' conftest.$ac_ext >&5
 
14749
 
 
14750
ac_header_compiler=no
 
14751
fi
 
14752
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
14753
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
14754
echo "${ECHO_T}$ac_header_compiler" >&6
 
14755
 
 
14756
# Is the header present?
 
14757
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
14758
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
14759
cat >conftest.$ac_ext <<_ACEOF
 
14760
/* confdefs.h.  */
 
14761
_ACEOF
 
14762
cat confdefs.h >>conftest.$ac_ext
 
14763
cat >>conftest.$ac_ext <<_ACEOF
 
14764
/* end confdefs.h.  */
 
14765
#include <$bdb_header>
 
14766
_ACEOF
 
14767
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
14768
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
14769
  ac_status=$?
 
14770
  grep -v '^ *+' conftest.er1 >conftest.err
 
14771
  rm -f conftest.er1
 
14772
  cat conftest.err >&5
 
14773
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14774
  (exit $ac_status); } >/dev/null; then
 
14775
  if test -s conftest.err; then
 
14776
    ac_cpp_err=$ac_c_preproc_warn_flag
 
14777
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
14778
  else
 
14779
    ac_cpp_err=
 
14780
  fi
 
14781
else
 
14782
  ac_cpp_err=yes
 
14783
fi
 
14784
if test -z "$ac_cpp_err"; then
 
14785
  ac_header_preproc=yes
 
14786
else
 
14787
  echo "$as_me: failed program was:" >&5
 
14788
sed 's/^/| /' conftest.$ac_ext >&5
 
14789
 
 
14790
  ac_header_preproc=no
 
14791
fi
 
14792
rm -f conftest.err conftest.$ac_ext
 
14793
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
14794
echo "${ECHO_T}$ac_header_preproc" >&6
 
14795
 
 
14796
# So?  What about this header?
 
14797
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
14798
  yes:no: )
 
14799
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
14800
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
14801
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
14802
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
14803
    ac_header_preproc=yes
 
14804
    ;;
 
14805
  no:yes:* )
 
14806
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
14807
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
14808
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
14809
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
14810
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
14811
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
14812
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
14813
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
14814
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
14815
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
14816
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
14817
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
14818
    (
 
14819
      cat <<\_ASBOX
 
14820
## ------------------------------------------ ##
 
14821
## Report this to the AC_PACKAGE_NAME lists.  ##
 
14822
## ------------------------------------------ ##
 
14823
_ASBOX
 
14824
    ) |
 
14825
      sed "s/^/$as_me: WARNING:     /" >&2
 
14826
    ;;
 
14827
esac
 
14828
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
14829
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
14830
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
14831
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14832
else
 
14833
  eval "$as_ac_Header=\$ac_header_preproc"
 
14834
fi
 
14835
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
14836
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
14837
 
 
14838
fi
 
14839
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
14840
 
 
14841
          if test ""4"" = "3" -o ""4"" = "4"; then
 
14842
            # We generate a separate cache variable for each prefix and libname
 
14843
            # we search under.  That way, we avoid caching information that
 
14844
            # changes if the user runs `configure' with a different set of
 
14845
            # switches.
 
14846
 
 
14847
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"4"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
14848
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
14849
 
 
14850
 
 
14851
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
14852
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
14853
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
14854
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14855
else
 
14856
 
 
14857
 
 
14858
    apu_try_berkeley_db_save_libs="$LIBS"
 
14859
 
 
14860
    apu_check_berkeley_db_major="4"
 
14861
    apu_check_berkeley_db_minor="4"
 
14862
    apu_check_berkeley_db_patch="-1"
 
14863
    apu_try_berkeley_db_header=$bdb_header
 
14864
    apu_try_berkeley_db_libname=$bdb_libname
 
14865
 
 
14866
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
14867
    if test "$cross_compiling" = yes; then
 
14868
  apu_try_berkeley_db=yes
 
14869
 
 
14870
else
 
14871
  cat >conftest.$ac_ext <<_ACEOF
 
14872
/* confdefs.h.  */
 
14873
_ACEOF
 
14874
cat confdefs.h >>conftest.$ac_ext
 
14875
cat >>conftest.$ac_ext <<_ACEOF
 
14876
/* end confdefs.h.  */
 
14877
 
 
14878
#include <stdio.h>
 
14879
#include <$apu_try_berkeley_db_header>
 
14880
main ()
 
14881
{
 
14882
  int major, minor, patch;
 
14883
 
 
14884
  db_version(&major, &minor, &patch);
 
14885
 
 
14886
  /* Sanity check: ensure that db.h constants actually match the db library */
 
14887
  if (major != DB_VERSION_MAJOR
 
14888
      || minor != DB_VERSION_MINOR
 
14889
      || patch != DB_VERSION_PATCH)
 
14890
    exit (1);
 
14891
 
 
14892
  /* Run-time check:  ensure the library claims to be the correct version. */
 
14893
 
 
14894
  if ($apu_check_berkeley_db_major != -1) {
 
14895
    if (major < $apu_check_berkeley_db_major)
 
14896
      exit (1);
 
14897
    if (major > $apu_check_berkeley_db_major)
 
14898
      exit (0);
 
14899
  }
 
14900
 
 
14901
  if ($apu_check_berkeley_db_minor != -1) {
 
14902
    if (minor < $apu_check_berkeley_db_minor)
 
14903
      exit (1);
 
14904
    if (minor > $apu_check_berkeley_db_minor)
 
14905
      exit (0);
 
14906
  }
 
14907
 
 
14908
  if ($apu_check_berkeley_db_patch == -1
 
14909
      || patch >= $apu_check_berkeley_db_patch)
 
14910
    exit (0);
 
14911
  else
 
14912
    exit (1);
 
14913
}
 
14914
 
 
14915
_ACEOF
 
14916
rm -f conftest$ac_exeext
 
14917
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
14918
  (eval $ac_link) 2>&5
 
14919
  ac_status=$?
 
14920
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14921
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
14922
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14923
  (eval $ac_try) 2>&5
 
14924
  ac_status=$?
 
14925
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14926
  (exit $ac_status); }; }; then
 
14927
  apu_try_berkeley_db=yes
 
14928
else
 
14929
  echo "$as_me: program exited with status $ac_status" >&5
 
14930
echo "$as_me: failed program was:" >&5
 
14931
sed 's/^/| /' conftest.$ac_ext >&5
 
14932
 
 
14933
( exit $ac_status )
 
14934
apu_try_berkeley_db=no
 
14935
fi
 
14936
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
14937
fi
 
14938
 
 
14939
    LIBS="$apu_try_berkeley_db_save_libs"
 
14940
 
 
14941
 
 
14942
                eval "$cache_id=$apu_try_berkeley_db"
 
14943
 
 
14944
fi
 
14945
 
 
14946
            result="`eval echo '$'$cache_id`"
 
14947
            echo "$as_me:$LINENO: result: $result" >&5
 
14948
echo "${ECHO_T}$result" >&6
 
14949
          elif test ""4"" = "1"; then
 
14950
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
14951
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
14952
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
14953
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
14954
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
14955
else
 
14956
  ac_check_lib_save_LIBS=$LIBS
 
14957
LIBS="-l$bdb_libname  $LIBS"
 
14958
cat >conftest.$ac_ext <<_ACEOF
 
14959
/* confdefs.h.  */
 
14960
_ACEOF
 
14961
cat confdefs.h >>conftest.$ac_ext
 
14962
cat >>conftest.$ac_ext <<_ACEOF
 
14963
/* end confdefs.h.  */
 
14964
 
 
14965
/* Override any gcc2 internal prototype to avoid an error.  */
 
14966
#ifdef __cplusplus
 
14967
extern "C"
 
14968
#endif
 
14969
/* We use char because int might match the return type of a gcc2
 
14970
   builtin and then its argument prototype would still apply.  */
 
14971
char dbopen ();
 
14972
int
 
14973
main ()
 
14974
{
 
14975
dbopen ();
 
14976
  ;
 
14977
  return 0;
 
14978
}
 
14979
_ACEOF
 
14980
rm -f conftest.$ac_objext conftest$ac_exeext
 
14981
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
14982
  (eval $ac_link) 2>conftest.er1
 
14983
  ac_status=$?
 
14984
  grep -v '^ *+' conftest.er1 >conftest.err
 
14985
  rm -f conftest.er1
 
14986
  cat conftest.err >&5
 
14987
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14988
  (exit $ac_status); } &&
 
14989
         { ac_try='test -z "$ac_c_werror_flag"
 
14990
                         || test ! -s conftest.err'
 
14991
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14992
  (eval $ac_try) 2>&5
 
14993
  ac_status=$?
 
14994
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
14995
  (exit $ac_status); }; } &&
 
14996
         { ac_try='test -s conftest$ac_exeext'
 
14997
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
14998
  (eval $ac_try) 2>&5
 
14999
  ac_status=$?
 
15000
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15001
  (exit $ac_status); }; }; then
 
15002
  eval "$as_ac_Lib=yes"
 
15003
else
 
15004
  echo "$as_me: failed program was:" >&5
 
15005
sed 's/^/| /' conftest.$ac_ext >&5
 
15006
 
 
15007
eval "$as_ac_Lib=no"
 
15008
fi
 
15009
rm -f conftest.err conftest.$ac_objext \
 
15010
      conftest$ac_exeext conftest.$ac_ext
 
15011
LIBS=$ac_check_lib_save_LIBS
 
15012
fi
 
15013
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
15014
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
15015
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
15016
  result=yes
 
15017
else
 
15018
  result=no
 
15019
 
 
15020
fi
 
15021
 
 
15022
          elif test ""4"" = "2"; then
 
15023
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
15024
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
15025
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
15026
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
15027
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15028
else
 
15029
  ac_check_lib_save_LIBS=$LIBS
 
15030
LIBS="-l$bdb_libname  $LIBS"
 
15031
cat >conftest.$ac_ext <<_ACEOF
 
15032
/* confdefs.h.  */
 
15033
_ACEOF
 
15034
cat confdefs.h >>conftest.$ac_ext
 
15035
cat >>conftest.$ac_ext <<_ACEOF
 
15036
/* end confdefs.h.  */
 
15037
 
 
15038
/* Override any gcc2 internal prototype to avoid an error.  */
 
15039
#ifdef __cplusplus
 
15040
extern "C"
 
15041
#endif
 
15042
/* We use char because int might match the return type of a gcc2
 
15043
   builtin and then its argument prototype would still apply.  */
 
15044
char db_open ();
 
15045
int
 
15046
main ()
 
15047
{
 
15048
db_open ();
 
15049
  ;
 
15050
  return 0;
 
15051
}
 
15052
_ACEOF
 
15053
rm -f conftest.$ac_objext conftest$ac_exeext
 
15054
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
15055
  (eval $ac_link) 2>conftest.er1
 
15056
  ac_status=$?
 
15057
  grep -v '^ *+' conftest.er1 >conftest.err
 
15058
  rm -f conftest.er1
 
15059
  cat conftest.err >&5
 
15060
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15061
  (exit $ac_status); } &&
 
15062
         { ac_try='test -z "$ac_c_werror_flag"
 
15063
                         || test ! -s conftest.err'
 
15064
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15065
  (eval $ac_try) 2>&5
 
15066
  ac_status=$?
 
15067
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15068
  (exit $ac_status); }; } &&
 
15069
         { ac_try='test -s conftest$ac_exeext'
 
15070
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15071
  (eval $ac_try) 2>&5
 
15072
  ac_status=$?
 
15073
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15074
  (exit $ac_status); }; }; then
 
15075
  eval "$as_ac_Lib=yes"
 
15076
else
 
15077
  echo "$as_me: failed program was:" >&5
 
15078
sed 's/^/| /' conftest.$ac_ext >&5
 
15079
 
 
15080
eval "$as_ac_Lib=no"
 
15081
fi
 
15082
rm -f conftest.err conftest.$ac_objext \
 
15083
      conftest$ac_exeext conftest.$ac_ext
 
15084
LIBS=$ac_check_lib_save_LIBS
 
15085
fi
 
15086
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
15087
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
15088
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
15089
  result=yes
 
15090
else
 
15091
  result=no
 
15092
 
 
15093
fi
 
15094
 
 
15095
          fi
 
15096
 
 
15097
else
 
15098
  result="no"
 
15099
fi
 
15100
 
 
15101
 
 
15102
 
 
15103
        # If we found it, no need to search any more.
 
15104
        if test "$result" = "yes"; then
 
15105
          found="$bdb_place"
 
15106
          break
 
15107
        fi
 
15108
      done
 
15109
      test "$found" != "not" && break
 
15110
    done
 
15111
    test "$found" != "not" && break
 
15112
  done
 
15113
 
 
15114
  # Restore the original values of the flags we tweak.
 
15115
  LDFLAGS="$apu_check_lib_save_ldflags"
 
15116
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
15117
 
 
15118
  case "$found" in
 
15119
  "not")
 
15120
    apu_have_db=0
 
15121
    ;;
 
15122
  "std")
 
15123
    apu_db_header=$bdb_header
 
15124
    apu_db_lib=$bdb_libname
 
15125
    apu_have_db=1
 
15126
    ;;
 
15127
  *":"*)
 
15128
    header="`echo $found | sed -e 's/:.*$//'`"
 
15129
    lib="`echo $found | sed -e 's/^.*://'`"
 
15130
 
 
15131
 
 
15132
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
15133
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
15134
    APRUTIL_INCLUDES="-I$header"
 
15135
  else
 
15136
    apr_addto_bugger="-I$header"
 
15137
    for i in $apr_addto_bugger; do
 
15138
      apr_addto_duplicate="0"
 
15139
      for j in $APRUTIL_INCLUDES; do
 
15140
        if test "x$i" = "x$j"; then
 
15141
          apr_addto_duplicate="1"
 
15142
          break
 
15143
        fi
 
15144
      done
 
15145
      if test $apr_addto_duplicate = "0"; then
 
15146
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
15147
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
15148
      fi
 
15149
    done
 
15150
  fi
 
15151
 
 
15152
 
 
15153
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
15154
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
15155
    APRUTIL_LDFLAGS="-L$lib"
 
15156
  else
 
15157
    apr_addto_bugger="-L$lib"
 
15158
    for i in $apr_addto_bugger; do
 
15159
      apr_addto_duplicate="0"
 
15160
      for j in $APRUTIL_LDFLAGS; do
 
15161
        if test "x$i" = "x$j"; then
 
15162
          apr_addto_duplicate="1"
 
15163
          break
 
15164
        fi
 
15165
      done
 
15166
      if test $apr_addto_duplicate = "0"; then
 
15167
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
15168
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
15169
      fi
 
15170
    done
 
15171
  fi
 
15172
 
 
15173
    apu_db_header=$bdb_header
 
15174
    apu_db_lib=$bdb_libname
 
15175
    apu_have_db=1
 
15176
    ;;
 
15177
  *)
 
15178
 
 
15179
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
15180
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
15181
    APRUTIL_INCLUDES="-I$found/include"
 
15182
  else
 
15183
    apr_addto_bugger="-I$found/include"
 
15184
    for i in $apr_addto_bugger; do
 
15185
      apr_addto_duplicate="0"
 
15186
      for j in $APRUTIL_INCLUDES; do
 
15187
        if test "x$i" = "x$j"; then
 
15188
          apr_addto_duplicate="1"
 
15189
          break
 
15190
        fi
 
15191
      done
 
15192
      if test $apr_addto_duplicate = "0"; then
 
15193
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
15194
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
15195
      fi
 
15196
    done
 
15197
  fi
 
15198
 
 
15199
 
 
15200
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
15201
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
15202
    APRUTIL_LDFLAGS="-L$found/lib"
 
15203
  else
 
15204
    apr_addto_bugger="-L$found/lib"
 
15205
    for i in $apr_addto_bugger; do
 
15206
      apr_addto_duplicate="0"
 
15207
      for j in $APRUTIL_LDFLAGS; do
 
15208
        if test "x$i" = "x$j"; then
 
15209
          apr_addto_duplicate="1"
 
15210
          break
 
15211
        fi
 
15212
      done
 
15213
      if test $apr_addto_duplicate = "0"; then
 
15214
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
15215
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
15216
      fi
 
15217
    done
 
15218
  fi
 
15219
 
 
15220
    apu_db_header=$bdb_header
 
15221
    apu_db_lib=$bdb_libname
 
15222
    apu_have_db=1
 
15223
    ;;
 
15224
  esac
 
15225
 
 
15226
  if test "$apu_have_db" = "1"; then
 
15227
    apu_db_version=4
 
15228
  fi
 
15229
 
 
15230
  if test "$apu_db_version" != "4"; then
 
15231
 
 
15232
  places="$all_places"
 
15233
  if test -z "$places"; then
 
15234
    places="std /usr/local/BerkeleyDB.4.3 /boot/home/config"
 
15235
  fi
 
15236
 
 
15237
  bdb_version="4"
 
15238
  if test ""3"" != "-1"; then
 
15239
    bdb_version="$bdb_version."3""
 
15240
    if test ""-1"" != "-1"; then
 
15241
      bdb_version="$bdb_version."-1""
 
15242
    fi
 
15243
  fi
 
15244
  bdb_places="$places"
 
15245
  bdb_default_search_headers="db43/db.h db4/db.h db.h"
 
15246
  bdb_default_search_lib_names="db-4.3 db4-4.3 db43 db4 db"
 
15247
 
 
15248
 
 
15249
  apu_have_db=0
 
15250
 
 
15251
  # Save the original values of the flags we tweak.
 
15252
  apu_check_lib_save_libs="$LIBS"
 
15253
  apu_check_lib_save_ldflags="$LDFLAGS"
 
15254
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
15255
 
 
15256
  # The variable `found' is the prefix under which we've found
 
15257
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
15258
  found=not
 
15259
  for bdb_place in $bdb_places; do
 
15260
 
 
15261
    LDFLAGS="$apu_check_lib_save_ldflags"
 
15262
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
15263
    case "$bdb_place" in
 
15264
      "std" )
 
15265
        description="the standard places"
 
15266
      ;;
 
15267
      *":"* )
 
15268
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
15269
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
15270
        CPPFLAGS="$CPPFLAGS -I$header"
 
15271
        LDFLAGS="$LDFLAGS -L$lib"
 
15272
        description="$header and $lib"
 
15273
      ;;
 
15274
      * )
 
15275
        if test -d $bdb_place; then
 
15276
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
15277
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
15278
        else
 
15279
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
15280
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
15281
          echo "$as_me:$LINENO: result: directory not found" >&5
 
15282
echo "${ECHO_T}directory not found" >&6
 
15283
          continue
 
15284
        fi
 
15285
        description="$bdb_place"
 
15286
      ;;
 
15287
    esac
 
15288
 
 
15289
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
15290
    # trick to display a message instead.
 
15291
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
15292
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
15293
    echo "$as_me:$LINENO: result: " >&5
 
15294
echo "${ECHO_T}" >&6
 
15295
 
 
15296
    for bdb_libname in $bdb_default_search_lib_names; do
 
15297
      for bdb_header in $bdb_default_search_headers; do
 
15298
        # Clear the header cache variable for each location
 
15299
 
 
15300
        cache_id="`echo ac_cv_header_${bdb_header} \
 
15301
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
15302
 
 
15303
        unset $cache_id
 
15304
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
15305
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
15306
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
15307
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
15308
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
15309
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15310
fi
 
15311
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
15312
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
15313
else
 
15314
  # Is the header compilable?
 
15315
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
15316
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
15317
cat >conftest.$ac_ext <<_ACEOF
 
15318
/* confdefs.h.  */
 
15319
_ACEOF
 
15320
cat confdefs.h >>conftest.$ac_ext
 
15321
cat >>conftest.$ac_ext <<_ACEOF
 
15322
/* end confdefs.h.  */
 
15323
$ac_includes_default
 
15324
#include <$bdb_header>
 
15325
_ACEOF
 
15326
rm -f conftest.$ac_objext
 
15327
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
15328
  (eval $ac_compile) 2>conftest.er1
 
15329
  ac_status=$?
 
15330
  grep -v '^ *+' conftest.er1 >conftest.err
 
15331
  rm -f conftest.er1
 
15332
  cat conftest.err >&5
 
15333
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15334
  (exit $ac_status); } &&
 
15335
         { ac_try='test -z "$ac_c_werror_flag"
 
15336
                         || test ! -s conftest.err'
 
15337
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15338
  (eval $ac_try) 2>&5
 
15339
  ac_status=$?
 
15340
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15341
  (exit $ac_status); }; } &&
 
15342
         { ac_try='test -s conftest.$ac_objext'
 
15343
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15344
  (eval $ac_try) 2>&5
 
15345
  ac_status=$?
 
15346
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15347
  (exit $ac_status); }; }; then
 
15348
  ac_header_compiler=yes
 
15349
else
 
15350
  echo "$as_me: failed program was:" >&5
 
15351
sed 's/^/| /' conftest.$ac_ext >&5
 
15352
 
 
15353
ac_header_compiler=no
 
15354
fi
 
15355
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
15356
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
15357
echo "${ECHO_T}$ac_header_compiler" >&6
 
15358
 
 
15359
# Is the header present?
 
15360
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
15361
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
15362
cat >conftest.$ac_ext <<_ACEOF
 
15363
/* confdefs.h.  */
 
15364
_ACEOF
 
15365
cat confdefs.h >>conftest.$ac_ext
 
15366
cat >>conftest.$ac_ext <<_ACEOF
 
15367
/* end confdefs.h.  */
 
15368
#include <$bdb_header>
 
15369
_ACEOF
 
15370
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
15371
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
15372
  ac_status=$?
 
15373
  grep -v '^ *+' conftest.er1 >conftest.err
 
15374
  rm -f conftest.er1
 
15375
  cat conftest.err >&5
 
15376
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15377
  (exit $ac_status); } >/dev/null; then
 
15378
  if test -s conftest.err; then
 
15379
    ac_cpp_err=$ac_c_preproc_warn_flag
 
15380
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
15381
  else
 
15382
    ac_cpp_err=
 
15383
  fi
 
15384
else
 
15385
  ac_cpp_err=yes
 
15386
fi
 
15387
if test -z "$ac_cpp_err"; then
 
15388
  ac_header_preproc=yes
 
15389
else
 
15390
  echo "$as_me: failed program was:" >&5
 
15391
sed 's/^/| /' conftest.$ac_ext >&5
 
15392
 
 
15393
  ac_header_preproc=no
 
15394
fi
 
15395
rm -f conftest.err conftest.$ac_ext
 
15396
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
15397
echo "${ECHO_T}$ac_header_preproc" >&6
 
15398
 
 
15399
# So?  What about this header?
 
15400
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
15401
  yes:no: )
 
15402
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
15403
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
15404
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
15405
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
15406
    ac_header_preproc=yes
 
15407
    ;;
 
15408
  no:yes:* )
 
15409
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
15410
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
15411
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
15412
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
15413
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
15414
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
15415
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
15416
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
15417
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
15418
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
15419
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
15420
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
15421
    (
 
15422
      cat <<\_ASBOX
 
15423
## ------------------------------------------ ##
 
15424
## Report this to the AC_PACKAGE_NAME lists.  ##
 
15425
## ------------------------------------------ ##
 
15426
_ASBOX
 
15427
    ) |
 
15428
      sed "s/^/$as_me: WARNING:     /" >&2
 
15429
    ;;
 
15430
esac
 
15431
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
15432
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
15433
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
15434
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15435
else
 
15436
  eval "$as_ac_Header=\$ac_header_preproc"
 
15437
fi
 
15438
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
15439
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
15440
 
 
15441
fi
 
15442
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
15443
 
 
15444
          if test ""4"" = "3" -o ""4"" = "4"; then
 
15445
            # We generate a separate cache variable for each prefix and libname
 
15446
            # we search under.  That way, we avoid caching information that
 
15447
            # changes if the user runs `configure' with a different set of
 
15448
            # switches.
 
15449
 
 
15450
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"3"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
15451
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
15452
 
 
15453
 
 
15454
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
15455
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
15456
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
15457
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15458
else
 
15459
 
 
15460
 
 
15461
    apu_try_berkeley_db_save_libs="$LIBS"
 
15462
 
 
15463
    apu_check_berkeley_db_major="4"
 
15464
    apu_check_berkeley_db_minor="3"
 
15465
    apu_check_berkeley_db_patch="-1"
 
15466
    apu_try_berkeley_db_header=$bdb_header
 
15467
    apu_try_berkeley_db_libname=$bdb_libname
 
15468
 
 
15469
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
15470
    if test "$cross_compiling" = yes; then
 
15471
  apu_try_berkeley_db=yes
 
15472
 
 
15473
else
 
15474
  cat >conftest.$ac_ext <<_ACEOF
 
15475
/* confdefs.h.  */
 
15476
_ACEOF
 
15477
cat confdefs.h >>conftest.$ac_ext
 
15478
cat >>conftest.$ac_ext <<_ACEOF
 
15479
/* end confdefs.h.  */
 
15480
 
 
15481
#include <stdio.h>
 
15482
#include <$apu_try_berkeley_db_header>
 
15483
main ()
 
15484
{
 
15485
  int major, minor, patch;
 
15486
 
 
15487
  db_version(&major, &minor, &patch);
 
15488
 
 
15489
  /* Sanity check: ensure that db.h constants actually match the db library */
 
15490
  if (major != DB_VERSION_MAJOR
 
15491
      || minor != DB_VERSION_MINOR
 
15492
      || patch != DB_VERSION_PATCH)
 
15493
    exit (1);
 
15494
 
 
15495
  /* Run-time check:  ensure the library claims to be the correct version. */
 
15496
 
 
15497
  if ($apu_check_berkeley_db_major != -1) {
 
15498
    if (major < $apu_check_berkeley_db_major)
 
15499
      exit (1);
 
15500
    if (major > $apu_check_berkeley_db_major)
 
15501
      exit (0);
 
15502
  }
 
15503
 
 
15504
  if ($apu_check_berkeley_db_minor != -1) {
 
15505
    if (minor < $apu_check_berkeley_db_minor)
 
15506
      exit (1);
 
15507
    if (minor > $apu_check_berkeley_db_minor)
 
15508
      exit (0);
 
15509
  }
 
15510
 
 
15511
  if ($apu_check_berkeley_db_patch == -1
 
15512
      || patch >= $apu_check_berkeley_db_patch)
 
15513
    exit (0);
 
15514
  else
 
15515
    exit (1);
 
15516
}
 
15517
 
 
15518
_ACEOF
 
15519
rm -f conftest$ac_exeext
 
15520
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
15521
  (eval $ac_link) 2>&5
 
15522
  ac_status=$?
 
15523
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15524
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
15525
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15526
  (eval $ac_try) 2>&5
 
15527
  ac_status=$?
 
15528
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15529
  (exit $ac_status); }; }; then
 
15530
  apu_try_berkeley_db=yes
 
15531
else
 
15532
  echo "$as_me: program exited with status $ac_status" >&5
 
15533
echo "$as_me: failed program was:" >&5
 
15534
sed 's/^/| /' conftest.$ac_ext >&5
 
15535
 
 
15536
( exit $ac_status )
 
15537
apu_try_berkeley_db=no
 
15538
fi
 
15539
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
15540
fi
 
15541
 
 
15542
    LIBS="$apu_try_berkeley_db_save_libs"
 
15543
 
 
15544
 
 
15545
                eval "$cache_id=$apu_try_berkeley_db"
 
15546
 
 
15547
fi
 
15548
 
 
15549
            result="`eval echo '$'$cache_id`"
 
15550
            echo "$as_me:$LINENO: result: $result" >&5
 
15551
echo "${ECHO_T}$result" >&6
 
15552
          elif test ""4"" = "1"; then
 
15553
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
15554
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
15555
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
15556
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
15557
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15558
else
 
15559
  ac_check_lib_save_LIBS=$LIBS
 
15560
LIBS="-l$bdb_libname  $LIBS"
 
15561
cat >conftest.$ac_ext <<_ACEOF
 
15562
/* confdefs.h.  */
 
15563
_ACEOF
 
15564
cat confdefs.h >>conftest.$ac_ext
 
15565
cat >>conftest.$ac_ext <<_ACEOF
 
15566
/* end confdefs.h.  */
 
15567
 
 
15568
/* Override any gcc2 internal prototype to avoid an error.  */
 
15569
#ifdef __cplusplus
 
15570
extern "C"
 
15571
#endif
 
15572
/* We use char because int might match the return type of a gcc2
 
15573
   builtin and then its argument prototype would still apply.  */
 
15574
char dbopen ();
 
15575
int
 
15576
main ()
 
15577
{
 
15578
dbopen ();
 
15579
  ;
 
15580
  return 0;
 
15581
}
 
15582
_ACEOF
 
15583
rm -f conftest.$ac_objext conftest$ac_exeext
 
15584
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
15585
  (eval $ac_link) 2>conftest.er1
 
15586
  ac_status=$?
 
15587
  grep -v '^ *+' conftest.er1 >conftest.err
 
15588
  rm -f conftest.er1
 
15589
  cat conftest.err >&5
 
15590
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15591
  (exit $ac_status); } &&
 
15592
         { ac_try='test -z "$ac_c_werror_flag"
 
15593
                         || test ! -s conftest.err'
 
15594
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15595
  (eval $ac_try) 2>&5
 
15596
  ac_status=$?
 
15597
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15598
  (exit $ac_status); }; } &&
 
15599
         { ac_try='test -s conftest$ac_exeext'
 
15600
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15601
  (eval $ac_try) 2>&5
 
15602
  ac_status=$?
 
15603
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15604
  (exit $ac_status); }; }; then
 
15605
  eval "$as_ac_Lib=yes"
 
15606
else
 
15607
  echo "$as_me: failed program was:" >&5
 
15608
sed 's/^/| /' conftest.$ac_ext >&5
 
15609
 
 
15610
eval "$as_ac_Lib=no"
 
15611
fi
 
15612
rm -f conftest.err conftest.$ac_objext \
 
15613
      conftest$ac_exeext conftest.$ac_ext
 
15614
LIBS=$ac_check_lib_save_LIBS
 
15615
fi
 
15616
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
15617
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
15618
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
15619
  result=yes
 
15620
else
 
15621
  result=no
 
15622
 
 
15623
fi
 
15624
 
 
15625
          elif test ""4"" = "2"; then
 
15626
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
15627
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
15628
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
15629
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
15630
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15631
else
 
15632
  ac_check_lib_save_LIBS=$LIBS
 
15633
LIBS="-l$bdb_libname  $LIBS"
 
15634
cat >conftest.$ac_ext <<_ACEOF
 
15635
/* confdefs.h.  */
 
15636
_ACEOF
 
15637
cat confdefs.h >>conftest.$ac_ext
 
15638
cat >>conftest.$ac_ext <<_ACEOF
 
15639
/* end confdefs.h.  */
 
15640
 
 
15641
/* Override any gcc2 internal prototype to avoid an error.  */
 
15642
#ifdef __cplusplus
 
15643
extern "C"
 
15644
#endif
 
15645
/* We use char because int might match the return type of a gcc2
 
15646
   builtin and then its argument prototype would still apply.  */
 
15647
char db_open ();
 
15648
int
 
15649
main ()
 
15650
{
 
15651
db_open ();
 
15652
  ;
 
15653
  return 0;
 
15654
}
 
15655
_ACEOF
 
15656
rm -f conftest.$ac_objext conftest$ac_exeext
 
15657
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
15658
  (eval $ac_link) 2>conftest.er1
 
15659
  ac_status=$?
 
15660
  grep -v '^ *+' conftest.er1 >conftest.err
 
15661
  rm -f conftest.er1
 
15662
  cat conftest.err >&5
 
15663
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15664
  (exit $ac_status); } &&
 
15665
         { ac_try='test -z "$ac_c_werror_flag"
 
15666
                         || test ! -s conftest.err'
 
15667
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15668
  (eval $ac_try) 2>&5
 
15669
  ac_status=$?
 
15670
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15671
  (exit $ac_status); }; } &&
 
15672
         { ac_try='test -s conftest$ac_exeext'
 
15673
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15674
  (eval $ac_try) 2>&5
 
15675
  ac_status=$?
 
15676
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15677
  (exit $ac_status); }; }; then
 
15678
  eval "$as_ac_Lib=yes"
 
15679
else
 
15680
  echo "$as_me: failed program was:" >&5
 
15681
sed 's/^/| /' conftest.$ac_ext >&5
 
15682
 
 
15683
eval "$as_ac_Lib=no"
 
15684
fi
 
15685
rm -f conftest.err conftest.$ac_objext \
 
15686
      conftest$ac_exeext conftest.$ac_ext
 
15687
LIBS=$ac_check_lib_save_LIBS
 
15688
fi
 
15689
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
15690
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
15691
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
15692
  result=yes
 
15693
else
 
15694
  result=no
 
15695
 
 
15696
fi
 
15697
 
 
15698
          fi
 
15699
 
 
15700
else
 
15701
  result="no"
 
15702
fi
 
15703
 
 
15704
 
 
15705
 
 
15706
        # If we found it, no need to search any more.
 
15707
        if test "$result" = "yes"; then
 
15708
          found="$bdb_place"
 
15709
          break
 
15710
        fi
 
15711
      done
 
15712
      test "$found" != "not" && break
 
15713
    done
 
15714
    test "$found" != "not" && break
 
15715
  done
 
15716
 
 
15717
  # Restore the original values of the flags we tweak.
 
15718
  LDFLAGS="$apu_check_lib_save_ldflags"
 
15719
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
15720
 
 
15721
  case "$found" in
 
15722
  "not")
 
15723
    apu_have_db=0
 
15724
    ;;
 
15725
  "std")
 
15726
    apu_db_header=$bdb_header
 
15727
    apu_db_lib=$bdb_libname
 
15728
    apu_have_db=1
 
15729
    ;;
 
15730
  *":"*)
 
15731
    header="`echo $found | sed -e 's/:.*$//'`"
 
15732
    lib="`echo $found | sed -e 's/^.*://'`"
 
15733
 
 
15734
 
 
15735
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
15736
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
15737
    APRUTIL_INCLUDES="-I$header"
 
15738
  else
 
15739
    apr_addto_bugger="-I$header"
 
15740
    for i in $apr_addto_bugger; do
 
15741
      apr_addto_duplicate="0"
 
15742
      for j in $APRUTIL_INCLUDES; do
 
15743
        if test "x$i" = "x$j"; then
 
15744
          apr_addto_duplicate="1"
 
15745
          break
 
15746
        fi
 
15747
      done
 
15748
      if test $apr_addto_duplicate = "0"; then
 
15749
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
15750
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
15751
      fi
 
15752
    done
 
15753
  fi
 
15754
 
 
15755
 
 
15756
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
15757
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
15758
    APRUTIL_LDFLAGS="-L$lib"
 
15759
  else
 
15760
    apr_addto_bugger="-L$lib"
 
15761
    for i in $apr_addto_bugger; do
 
15762
      apr_addto_duplicate="0"
 
15763
      for j in $APRUTIL_LDFLAGS; do
 
15764
        if test "x$i" = "x$j"; then
 
15765
          apr_addto_duplicate="1"
 
15766
          break
 
15767
        fi
 
15768
      done
 
15769
      if test $apr_addto_duplicate = "0"; then
 
15770
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
15771
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
15772
      fi
 
15773
    done
 
15774
  fi
 
15775
 
 
15776
    apu_db_header=$bdb_header
 
15777
    apu_db_lib=$bdb_libname
 
15778
    apu_have_db=1
 
15779
    ;;
 
15780
  *)
 
15781
 
 
15782
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
15783
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
15784
    APRUTIL_INCLUDES="-I$found/include"
 
15785
  else
 
15786
    apr_addto_bugger="-I$found/include"
 
15787
    for i in $apr_addto_bugger; do
 
15788
      apr_addto_duplicate="0"
 
15789
      for j in $APRUTIL_INCLUDES; do
 
15790
        if test "x$i" = "x$j"; then
 
15791
          apr_addto_duplicate="1"
 
15792
          break
 
15793
        fi
 
15794
      done
 
15795
      if test $apr_addto_duplicate = "0"; then
 
15796
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
15797
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
15798
      fi
 
15799
    done
 
15800
  fi
 
15801
 
 
15802
 
 
15803
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
15804
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
15805
    APRUTIL_LDFLAGS="-L$found/lib"
 
15806
  else
 
15807
    apr_addto_bugger="-L$found/lib"
 
15808
    for i in $apr_addto_bugger; do
 
15809
      apr_addto_duplicate="0"
 
15810
      for j in $APRUTIL_LDFLAGS; do
 
15811
        if test "x$i" = "x$j"; then
 
15812
          apr_addto_duplicate="1"
 
15813
          break
 
15814
        fi
 
15815
      done
 
15816
      if test $apr_addto_duplicate = "0"; then
 
15817
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
15818
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
15819
      fi
 
15820
    done
 
15821
  fi
 
15822
 
 
15823
    apu_db_header=$bdb_header
 
15824
    apu_db_lib=$bdb_libname
 
15825
    apu_have_db=1
 
15826
    ;;
 
15827
  esac
 
15828
 
 
15829
  if test "$apu_have_db" = "1"; then
 
15830
    apu_db_version=4
 
15831
  fi
 
15832
 
 
15833
    if test "$apu_db_version" != "4"; then
 
15834
 
 
15835
  places="$all_places"
 
15836
  if test -z "$places"; then
 
15837
    places="std /usr/local /usr/local/BerkeleyDB.4.2 /boot/home/config"
 
15838
  fi
 
15839
 
 
15840
  bdb_version="4"
 
15841
  if test ""2"" != "-1"; then
 
15842
    bdb_version="$bdb_version."2""
 
15843
    if test ""-1"" != "-1"; then
 
15844
      bdb_version="$bdb_version."-1""
 
15845
    fi
 
15846
  fi
 
15847
  bdb_places="$places"
 
15848
  bdb_default_search_headers="db42/db.h db4/db.h db.h"
 
15849
  bdb_default_search_lib_names="db-4.2 db42 db4 db"
 
15850
 
 
15851
 
 
15852
  apu_have_db=0
 
15853
 
 
15854
  # Save the original values of the flags we tweak.
 
15855
  apu_check_lib_save_libs="$LIBS"
 
15856
  apu_check_lib_save_ldflags="$LDFLAGS"
 
15857
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
15858
 
 
15859
  # The variable `found' is the prefix under which we've found
 
15860
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
15861
  found=not
 
15862
  for bdb_place in $bdb_places; do
 
15863
 
 
15864
    LDFLAGS="$apu_check_lib_save_ldflags"
 
15865
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
15866
    case "$bdb_place" in
 
15867
      "std" )
 
15868
        description="the standard places"
 
15869
      ;;
 
15870
      *":"* )
 
15871
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
15872
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
15873
        CPPFLAGS="$CPPFLAGS -I$header"
 
15874
        LDFLAGS="$LDFLAGS -L$lib"
 
15875
        description="$header and $lib"
 
15876
      ;;
 
15877
      * )
 
15878
        if test -d $bdb_place; then
 
15879
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
15880
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
15881
        else
 
15882
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
15883
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
15884
          echo "$as_me:$LINENO: result: directory not found" >&5
 
15885
echo "${ECHO_T}directory not found" >&6
 
15886
          continue
 
15887
        fi
 
15888
        description="$bdb_place"
 
15889
      ;;
 
15890
    esac
 
15891
 
 
15892
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
15893
    # trick to display a message instead.
 
15894
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
15895
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
15896
    echo "$as_me:$LINENO: result: " >&5
 
15897
echo "${ECHO_T}" >&6
 
15898
 
 
15899
    for bdb_libname in $bdb_default_search_lib_names; do
 
15900
      for bdb_header in $bdb_default_search_headers; do
 
15901
        # Clear the header cache variable for each location
 
15902
 
 
15903
        cache_id="`echo ac_cv_header_${bdb_header} \
 
15904
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
15905
 
 
15906
        unset $cache_id
 
15907
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
15908
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
15909
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
15910
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
15911
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
15912
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
15913
fi
 
15914
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
15915
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
15916
else
 
15917
  # Is the header compilable?
 
15918
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
15919
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
15920
cat >conftest.$ac_ext <<_ACEOF
 
15921
/* confdefs.h.  */
 
15922
_ACEOF
 
15923
cat confdefs.h >>conftest.$ac_ext
 
15924
cat >>conftest.$ac_ext <<_ACEOF
 
15925
/* end confdefs.h.  */
 
15926
$ac_includes_default
 
15927
#include <$bdb_header>
 
15928
_ACEOF
 
15929
rm -f conftest.$ac_objext
 
15930
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
15931
  (eval $ac_compile) 2>conftest.er1
 
15932
  ac_status=$?
 
15933
  grep -v '^ *+' conftest.er1 >conftest.err
 
15934
  rm -f conftest.er1
 
15935
  cat conftest.err >&5
 
15936
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15937
  (exit $ac_status); } &&
 
15938
         { ac_try='test -z "$ac_c_werror_flag"
 
15939
                         || test ! -s conftest.err'
 
15940
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15941
  (eval $ac_try) 2>&5
 
15942
  ac_status=$?
 
15943
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15944
  (exit $ac_status); }; } &&
 
15945
         { ac_try='test -s conftest.$ac_objext'
 
15946
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
15947
  (eval $ac_try) 2>&5
 
15948
  ac_status=$?
 
15949
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15950
  (exit $ac_status); }; }; then
 
15951
  ac_header_compiler=yes
 
15952
else
 
15953
  echo "$as_me: failed program was:" >&5
 
15954
sed 's/^/| /' conftest.$ac_ext >&5
 
15955
 
 
15956
ac_header_compiler=no
 
15957
fi
 
15958
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
15959
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
15960
echo "${ECHO_T}$ac_header_compiler" >&6
 
15961
 
 
15962
# Is the header present?
 
15963
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
15964
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
15965
cat >conftest.$ac_ext <<_ACEOF
 
15966
/* confdefs.h.  */
 
15967
_ACEOF
 
15968
cat confdefs.h >>conftest.$ac_ext
 
15969
cat >>conftest.$ac_ext <<_ACEOF
 
15970
/* end confdefs.h.  */
 
15971
#include <$bdb_header>
 
15972
_ACEOF
 
15973
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
15974
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
15975
  ac_status=$?
 
15976
  grep -v '^ *+' conftest.er1 >conftest.err
 
15977
  rm -f conftest.er1
 
15978
  cat conftest.err >&5
 
15979
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
15980
  (exit $ac_status); } >/dev/null; then
 
15981
  if test -s conftest.err; then
 
15982
    ac_cpp_err=$ac_c_preproc_warn_flag
 
15983
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
15984
  else
 
15985
    ac_cpp_err=
 
15986
  fi
 
15987
else
 
15988
  ac_cpp_err=yes
 
15989
fi
 
15990
if test -z "$ac_cpp_err"; then
 
15991
  ac_header_preproc=yes
 
15992
else
 
15993
  echo "$as_me: failed program was:" >&5
 
15994
sed 's/^/| /' conftest.$ac_ext >&5
 
15995
 
 
15996
  ac_header_preproc=no
 
15997
fi
 
15998
rm -f conftest.err conftest.$ac_ext
 
15999
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
16000
echo "${ECHO_T}$ac_header_preproc" >&6
 
16001
 
 
16002
# So?  What about this header?
 
16003
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
16004
  yes:no: )
 
16005
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
16006
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
16007
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
16008
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
16009
    ac_header_preproc=yes
 
16010
    ;;
 
16011
  no:yes:* )
 
16012
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
16013
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
16014
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
16015
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
16016
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
16017
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
16018
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
16019
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
16020
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
16021
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
16022
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
16023
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
16024
    (
 
16025
      cat <<\_ASBOX
 
16026
## ------------------------------------------ ##
 
16027
## Report this to the AC_PACKAGE_NAME lists.  ##
 
16028
## ------------------------------------------ ##
 
16029
_ASBOX
 
16030
    ) |
 
16031
      sed "s/^/$as_me: WARNING:     /" >&2
 
16032
    ;;
 
16033
esac
 
16034
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
16035
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
16036
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
16037
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16038
else
 
16039
  eval "$as_ac_Header=\$ac_header_preproc"
 
16040
fi
 
16041
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
16042
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
16043
 
 
16044
fi
 
16045
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
16046
 
 
16047
          if test ""4"" = "3" -o ""4"" = "4"; then
 
16048
            # We generate a separate cache variable for each prefix and libname
 
16049
            # we search under.  That way, we avoid caching information that
 
16050
            # changes if the user runs `configure' with a different set of
 
16051
            # switches.
 
16052
 
 
16053
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"2"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
16054
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
16055
 
 
16056
 
 
16057
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
16058
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
16059
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
16060
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16061
else
 
16062
 
 
16063
 
 
16064
    apu_try_berkeley_db_save_libs="$LIBS"
 
16065
 
 
16066
    apu_check_berkeley_db_major="4"
 
16067
    apu_check_berkeley_db_minor="2"
 
16068
    apu_check_berkeley_db_patch="-1"
 
16069
    apu_try_berkeley_db_header=$bdb_header
 
16070
    apu_try_berkeley_db_libname=$bdb_libname
 
16071
 
 
16072
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
16073
    if test "$cross_compiling" = yes; then
 
16074
  apu_try_berkeley_db=yes
 
16075
 
 
16076
else
 
16077
  cat >conftest.$ac_ext <<_ACEOF
 
16078
/* confdefs.h.  */
 
16079
_ACEOF
 
16080
cat confdefs.h >>conftest.$ac_ext
 
16081
cat >>conftest.$ac_ext <<_ACEOF
 
16082
/* end confdefs.h.  */
 
16083
 
 
16084
#include <stdio.h>
 
16085
#include <$apu_try_berkeley_db_header>
 
16086
main ()
 
16087
{
 
16088
  int major, minor, patch;
 
16089
 
 
16090
  db_version(&major, &minor, &patch);
 
16091
 
 
16092
  /* Sanity check: ensure that db.h constants actually match the db library */
 
16093
  if (major != DB_VERSION_MAJOR
 
16094
      || minor != DB_VERSION_MINOR
 
16095
      || patch != DB_VERSION_PATCH)
 
16096
    exit (1);
 
16097
 
 
16098
  /* Run-time check:  ensure the library claims to be the correct version. */
 
16099
 
 
16100
  if ($apu_check_berkeley_db_major != -1) {
 
16101
    if (major < $apu_check_berkeley_db_major)
 
16102
      exit (1);
 
16103
    if (major > $apu_check_berkeley_db_major)
 
16104
      exit (0);
 
16105
  }
 
16106
 
 
16107
  if ($apu_check_berkeley_db_minor != -1) {
 
16108
    if (minor < $apu_check_berkeley_db_minor)
 
16109
      exit (1);
 
16110
    if (minor > $apu_check_berkeley_db_minor)
 
16111
      exit (0);
 
16112
  }
 
16113
 
 
16114
  if ($apu_check_berkeley_db_patch == -1
 
16115
      || patch >= $apu_check_berkeley_db_patch)
 
16116
    exit (0);
 
16117
  else
 
16118
    exit (1);
 
16119
}
 
16120
 
 
16121
_ACEOF
 
16122
rm -f conftest$ac_exeext
 
16123
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
16124
  (eval $ac_link) 2>&5
 
16125
  ac_status=$?
 
16126
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16127
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
16128
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16129
  (eval $ac_try) 2>&5
 
16130
  ac_status=$?
 
16131
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16132
  (exit $ac_status); }; }; then
 
16133
  apu_try_berkeley_db=yes
 
16134
else
 
16135
  echo "$as_me: program exited with status $ac_status" >&5
 
16136
echo "$as_me: failed program was:" >&5
 
16137
sed 's/^/| /' conftest.$ac_ext >&5
 
16138
 
 
16139
( exit $ac_status )
 
16140
apu_try_berkeley_db=no
 
16141
fi
 
16142
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
16143
fi
 
16144
 
 
16145
    LIBS="$apu_try_berkeley_db_save_libs"
 
16146
 
 
16147
 
 
16148
                eval "$cache_id=$apu_try_berkeley_db"
 
16149
 
 
16150
fi
 
16151
 
 
16152
            result="`eval echo '$'$cache_id`"
 
16153
            echo "$as_me:$LINENO: result: $result" >&5
 
16154
echo "${ECHO_T}$result" >&6
 
16155
          elif test ""4"" = "1"; then
 
16156
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
16157
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
16158
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
16159
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
16160
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16161
else
 
16162
  ac_check_lib_save_LIBS=$LIBS
 
16163
LIBS="-l$bdb_libname  $LIBS"
 
16164
cat >conftest.$ac_ext <<_ACEOF
 
16165
/* confdefs.h.  */
 
16166
_ACEOF
 
16167
cat confdefs.h >>conftest.$ac_ext
 
16168
cat >>conftest.$ac_ext <<_ACEOF
 
16169
/* end confdefs.h.  */
 
16170
 
 
16171
/* Override any gcc2 internal prototype to avoid an error.  */
 
16172
#ifdef __cplusplus
 
16173
extern "C"
 
16174
#endif
 
16175
/* We use char because int might match the return type of a gcc2
 
16176
   builtin and then its argument prototype would still apply.  */
 
16177
char dbopen ();
 
16178
int
 
16179
main ()
 
16180
{
 
16181
dbopen ();
 
16182
  ;
 
16183
  return 0;
 
16184
}
 
16185
_ACEOF
 
16186
rm -f conftest.$ac_objext conftest$ac_exeext
 
16187
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
16188
  (eval $ac_link) 2>conftest.er1
 
16189
  ac_status=$?
 
16190
  grep -v '^ *+' conftest.er1 >conftest.err
 
16191
  rm -f conftest.er1
 
16192
  cat conftest.err >&5
 
16193
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16194
  (exit $ac_status); } &&
 
16195
         { ac_try='test -z "$ac_c_werror_flag"
 
16196
                         || test ! -s conftest.err'
 
16197
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16198
  (eval $ac_try) 2>&5
 
16199
  ac_status=$?
 
16200
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16201
  (exit $ac_status); }; } &&
 
16202
         { ac_try='test -s conftest$ac_exeext'
 
16203
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16204
  (eval $ac_try) 2>&5
 
16205
  ac_status=$?
 
16206
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16207
  (exit $ac_status); }; }; then
 
16208
  eval "$as_ac_Lib=yes"
 
16209
else
 
16210
  echo "$as_me: failed program was:" >&5
 
16211
sed 's/^/| /' conftest.$ac_ext >&5
 
16212
 
 
16213
eval "$as_ac_Lib=no"
 
16214
fi
 
16215
rm -f conftest.err conftest.$ac_objext \
 
16216
      conftest$ac_exeext conftest.$ac_ext
 
16217
LIBS=$ac_check_lib_save_LIBS
 
16218
fi
 
16219
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
16220
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
16221
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
16222
  result=yes
 
16223
else
 
16224
  result=no
 
16225
 
 
16226
fi
 
16227
 
 
16228
          elif test ""4"" = "2"; then
 
16229
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
16230
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
16231
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
16232
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
16233
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16234
else
 
16235
  ac_check_lib_save_LIBS=$LIBS
 
16236
LIBS="-l$bdb_libname  $LIBS"
 
16237
cat >conftest.$ac_ext <<_ACEOF
 
16238
/* confdefs.h.  */
 
16239
_ACEOF
 
16240
cat confdefs.h >>conftest.$ac_ext
 
16241
cat >>conftest.$ac_ext <<_ACEOF
 
16242
/* end confdefs.h.  */
 
16243
 
 
16244
/* Override any gcc2 internal prototype to avoid an error.  */
 
16245
#ifdef __cplusplus
 
16246
extern "C"
 
16247
#endif
 
16248
/* We use char because int might match the return type of a gcc2
 
16249
   builtin and then its argument prototype would still apply.  */
 
16250
char db_open ();
 
16251
int
 
16252
main ()
 
16253
{
 
16254
db_open ();
 
16255
  ;
 
16256
  return 0;
 
16257
}
 
16258
_ACEOF
 
16259
rm -f conftest.$ac_objext conftest$ac_exeext
 
16260
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
16261
  (eval $ac_link) 2>conftest.er1
 
16262
  ac_status=$?
 
16263
  grep -v '^ *+' conftest.er1 >conftest.err
 
16264
  rm -f conftest.er1
 
16265
  cat conftest.err >&5
 
16266
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16267
  (exit $ac_status); } &&
 
16268
         { ac_try='test -z "$ac_c_werror_flag"
 
16269
                         || test ! -s conftest.err'
 
16270
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16271
  (eval $ac_try) 2>&5
 
16272
  ac_status=$?
 
16273
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16274
  (exit $ac_status); }; } &&
 
16275
         { ac_try='test -s conftest$ac_exeext'
 
16276
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16277
  (eval $ac_try) 2>&5
 
16278
  ac_status=$?
 
16279
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16280
  (exit $ac_status); }; }; then
 
16281
  eval "$as_ac_Lib=yes"
 
16282
else
 
16283
  echo "$as_me: failed program was:" >&5
 
16284
sed 's/^/| /' conftest.$ac_ext >&5
 
16285
 
 
16286
eval "$as_ac_Lib=no"
 
16287
fi
 
16288
rm -f conftest.err conftest.$ac_objext \
 
16289
      conftest$ac_exeext conftest.$ac_ext
 
16290
LIBS=$ac_check_lib_save_LIBS
 
16291
fi
 
16292
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
16293
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
16294
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
16295
  result=yes
 
16296
else
 
16297
  result=no
 
16298
 
 
16299
fi
 
16300
 
 
16301
          fi
 
16302
 
 
16303
else
 
16304
  result="no"
 
16305
fi
 
16306
 
 
16307
 
 
16308
 
 
16309
        # If we found it, no need to search any more.
 
16310
        if test "$result" = "yes"; then
 
16311
          found="$bdb_place"
 
16312
          break
 
16313
        fi
 
16314
      done
 
16315
      test "$found" != "not" && break
 
16316
    done
 
16317
    test "$found" != "not" && break
 
16318
  done
 
16319
 
 
16320
  # Restore the original values of the flags we tweak.
 
16321
  LDFLAGS="$apu_check_lib_save_ldflags"
 
16322
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
16323
 
 
16324
  case "$found" in
 
16325
  "not")
 
16326
    apu_have_db=0
 
16327
    ;;
 
16328
  "std")
 
16329
    apu_db_header=$bdb_header
 
16330
    apu_db_lib=$bdb_libname
 
16331
    apu_have_db=1
 
16332
    ;;
 
16333
  *":"*)
 
16334
    header="`echo $found | sed -e 's/:.*$//'`"
 
16335
    lib="`echo $found | sed -e 's/^.*://'`"
 
16336
 
 
16337
 
 
16338
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
16339
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
16340
    APRUTIL_INCLUDES="-I$header"
 
16341
  else
 
16342
    apr_addto_bugger="-I$header"
 
16343
    for i in $apr_addto_bugger; do
 
16344
      apr_addto_duplicate="0"
 
16345
      for j in $APRUTIL_INCLUDES; do
 
16346
        if test "x$i" = "x$j"; then
 
16347
          apr_addto_duplicate="1"
 
16348
          break
 
16349
        fi
 
16350
      done
 
16351
      if test $apr_addto_duplicate = "0"; then
 
16352
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
16353
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
16354
      fi
 
16355
    done
 
16356
  fi
 
16357
 
 
16358
 
 
16359
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
16360
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
16361
    APRUTIL_LDFLAGS="-L$lib"
 
16362
  else
 
16363
    apr_addto_bugger="-L$lib"
 
16364
    for i in $apr_addto_bugger; do
 
16365
      apr_addto_duplicate="0"
 
16366
      for j in $APRUTIL_LDFLAGS; do
 
16367
        if test "x$i" = "x$j"; then
 
16368
          apr_addto_duplicate="1"
 
16369
          break
 
16370
        fi
 
16371
      done
 
16372
      if test $apr_addto_duplicate = "0"; then
 
16373
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
16374
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
16375
      fi
 
16376
    done
 
16377
  fi
 
16378
 
 
16379
    apu_db_header=$bdb_header
 
16380
    apu_db_lib=$bdb_libname
 
16381
    apu_have_db=1
 
16382
    ;;
 
16383
  *)
 
16384
 
 
16385
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
16386
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
16387
    APRUTIL_INCLUDES="-I$found/include"
 
16388
  else
 
16389
    apr_addto_bugger="-I$found/include"
 
16390
    for i in $apr_addto_bugger; do
 
16391
      apr_addto_duplicate="0"
 
16392
      for j in $APRUTIL_INCLUDES; do
 
16393
        if test "x$i" = "x$j"; then
 
16394
          apr_addto_duplicate="1"
 
16395
          break
 
16396
        fi
 
16397
      done
 
16398
      if test $apr_addto_duplicate = "0"; then
 
16399
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
16400
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
16401
      fi
 
16402
    done
 
16403
  fi
 
16404
 
 
16405
 
 
16406
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
16407
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
16408
    APRUTIL_LDFLAGS="-L$found/lib"
 
16409
  else
 
16410
    apr_addto_bugger="-L$found/lib"
 
16411
    for i in $apr_addto_bugger; do
 
16412
      apr_addto_duplicate="0"
 
16413
      for j in $APRUTIL_LDFLAGS; do
 
16414
        if test "x$i" = "x$j"; then
 
16415
          apr_addto_duplicate="1"
 
16416
          break
 
16417
        fi
 
16418
      done
 
16419
      if test $apr_addto_duplicate = "0"; then
 
16420
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
16421
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
16422
      fi
 
16423
    done
 
16424
  fi
 
16425
 
 
16426
    apu_db_header=$bdb_header
 
16427
    apu_db_lib=$bdb_libname
 
16428
    apu_have_db=1
 
16429
    ;;
 
16430
  esac
 
16431
 
 
16432
  if test "$apu_have_db" = "1"; then
 
16433
    apu_db_version=4
 
16434
  fi
 
16435
 
 
16436
      if test "$apu_db_version" != "4"; then
 
16437
 
 
16438
  places="$all_places"
 
16439
  if test -z "$places"; then
 
16440
    places="std /usr/local /usr/local/BerkeleyDB.4.1 /boot/home/config"
 
16441
  fi
 
16442
 
 
16443
  bdb_version="4"
 
16444
  if test ""1"" != "-1"; then
 
16445
    bdb_version="$bdb_version."1""
 
16446
    if test ""-1"" != "-1"; then
 
16447
      bdb_version="$bdb_version."-1""
 
16448
    fi
 
16449
  fi
 
16450
  bdb_places="$places"
 
16451
  bdb_default_search_headers="db41/db.h db4/db.h db.h"
 
16452
  bdb_default_search_lib_names="db-4.1 db41 db4 db"
 
16453
 
 
16454
 
 
16455
  apu_have_db=0
 
16456
 
 
16457
  # Save the original values of the flags we tweak.
 
16458
  apu_check_lib_save_libs="$LIBS"
 
16459
  apu_check_lib_save_ldflags="$LDFLAGS"
 
16460
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
16461
 
 
16462
  # The variable `found' is the prefix under which we've found
 
16463
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
16464
  found=not
 
16465
  for bdb_place in $bdb_places; do
 
16466
 
 
16467
    LDFLAGS="$apu_check_lib_save_ldflags"
 
16468
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
16469
    case "$bdb_place" in
 
16470
      "std" )
 
16471
        description="the standard places"
 
16472
      ;;
 
16473
      *":"* )
 
16474
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
16475
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
16476
        CPPFLAGS="$CPPFLAGS -I$header"
 
16477
        LDFLAGS="$LDFLAGS -L$lib"
 
16478
        description="$header and $lib"
 
16479
      ;;
 
16480
      * )
 
16481
        if test -d $bdb_place; then
 
16482
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
16483
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
16484
        else
 
16485
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
16486
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
16487
          echo "$as_me:$LINENO: result: directory not found" >&5
 
16488
echo "${ECHO_T}directory not found" >&6
 
16489
          continue
 
16490
        fi
 
16491
        description="$bdb_place"
 
16492
      ;;
 
16493
    esac
 
16494
 
 
16495
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
16496
    # trick to display a message instead.
 
16497
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
16498
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
16499
    echo "$as_me:$LINENO: result: " >&5
 
16500
echo "${ECHO_T}" >&6
 
16501
 
 
16502
    for bdb_libname in $bdb_default_search_lib_names; do
 
16503
      for bdb_header in $bdb_default_search_headers; do
 
16504
        # Clear the header cache variable for each location
 
16505
 
 
16506
        cache_id="`echo ac_cv_header_${bdb_header} \
 
16507
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
16508
 
 
16509
        unset $cache_id
 
16510
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
16511
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
16512
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
16513
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
16514
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
16515
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16516
fi
 
16517
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
16518
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
16519
else
 
16520
  # Is the header compilable?
 
16521
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
16522
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
16523
cat >conftest.$ac_ext <<_ACEOF
 
16524
/* confdefs.h.  */
 
16525
_ACEOF
 
16526
cat confdefs.h >>conftest.$ac_ext
 
16527
cat >>conftest.$ac_ext <<_ACEOF
 
16528
/* end confdefs.h.  */
 
16529
$ac_includes_default
 
16530
#include <$bdb_header>
 
16531
_ACEOF
 
16532
rm -f conftest.$ac_objext
 
16533
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
16534
  (eval $ac_compile) 2>conftest.er1
 
16535
  ac_status=$?
 
16536
  grep -v '^ *+' conftest.er1 >conftest.err
 
16537
  rm -f conftest.er1
 
16538
  cat conftest.err >&5
 
16539
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16540
  (exit $ac_status); } &&
 
16541
         { ac_try='test -z "$ac_c_werror_flag"
 
16542
                         || test ! -s conftest.err'
 
16543
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16544
  (eval $ac_try) 2>&5
 
16545
  ac_status=$?
 
16546
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16547
  (exit $ac_status); }; } &&
 
16548
         { ac_try='test -s conftest.$ac_objext'
 
16549
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16550
  (eval $ac_try) 2>&5
 
16551
  ac_status=$?
 
16552
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16553
  (exit $ac_status); }; }; then
 
16554
  ac_header_compiler=yes
 
16555
else
 
16556
  echo "$as_me: failed program was:" >&5
 
16557
sed 's/^/| /' conftest.$ac_ext >&5
 
16558
 
 
16559
ac_header_compiler=no
 
16560
fi
 
16561
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
16562
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
16563
echo "${ECHO_T}$ac_header_compiler" >&6
 
16564
 
 
16565
# Is the header present?
 
16566
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
16567
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
16568
cat >conftest.$ac_ext <<_ACEOF
 
16569
/* confdefs.h.  */
 
16570
_ACEOF
 
16571
cat confdefs.h >>conftest.$ac_ext
 
16572
cat >>conftest.$ac_ext <<_ACEOF
 
16573
/* end confdefs.h.  */
 
16574
#include <$bdb_header>
 
16575
_ACEOF
 
16576
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
16577
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
16578
  ac_status=$?
 
16579
  grep -v '^ *+' conftest.er1 >conftest.err
 
16580
  rm -f conftest.er1
 
16581
  cat conftest.err >&5
 
16582
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16583
  (exit $ac_status); } >/dev/null; then
 
16584
  if test -s conftest.err; then
 
16585
    ac_cpp_err=$ac_c_preproc_warn_flag
 
16586
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
16587
  else
 
16588
    ac_cpp_err=
 
16589
  fi
 
16590
else
 
16591
  ac_cpp_err=yes
 
16592
fi
 
16593
if test -z "$ac_cpp_err"; then
 
16594
  ac_header_preproc=yes
 
16595
else
 
16596
  echo "$as_me: failed program was:" >&5
 
16597
sed 's/^/| /' conftest.$ac_ext >&5
 
16598
 
 
16599
  ac_header_preproc=no
 
16600
fi
 
16601
rm -f conftest.err conftest.$ac_ext
 
16602
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
16603
echo "${ECHO_T}$ac_header_preproc" >&6
 
16604
 
 
16605
# So?  What about this header?
 
16606
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
16607
  yes:no: )
 
16608
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
16609
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
16610
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
16611
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
16612
    ac_header_preproc=yes
 
16613
    ;;
 
16614
  no:yes:* )
 
16615
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
16616
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
16617
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
16618
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
16619
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
16620
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
16621
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
16622
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
16623
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
16624
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
16625
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
16626
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
16627
    (
 
16628
      cat <<\_ASBOX
 
16629
## ------------------------------------------ ##
 
16630
## Report this to the AC_PACKAGE_NAME lists.  ##
 
16631
## ------------------------------------------ ##
 
16632
_ASBOX
 
16633
    ) |
 
16634
      sed "s/^/$as_me: WARNING:     /" >&2
 
16635
    ;;
 
16636
esac
 
16637
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
16638
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
16639
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
16640
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16641
else
 
16642
  eval "$as_ac_Header=\$ac_header_preproc"
 
16643
fi
 
16644
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
16645
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
16646
 
 
16647
fi
 
16648
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
16649
 
 
16650
          if test ""4"" = "3" -o ""4"" = "4"; then
 
16651
            # We generate a separate cache variable for each prefix and libname
 
16652
            # we search under.  That way, we avoid caching information that
 
16653
            # changes if the user runs `configure' with a different set of
 
16654
            # switches.
 
16655
 
 
16656
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"1"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
16657
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
16658
 
 
16659
 
 
16660
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
16661
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
16662
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
16663
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16664
else
 
16665
 
 
16666
 
 
16667
    apu_try_berkeley_db_save_libs="$LIBS"
 
16668
 
 
16669
    apu_check_berkeley_db_major="4"
 
16670
    apu_check_berkeley_db_minor="1"
 
16671
    apu_check_berkeley_db_patch="-1"
 
16672
    apu_try_berkeley_db_header=$bdb_header
 
16673
    apu_try_berkeley_db_libname=$bdb_libname
 
16674
 
 
16675
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
16676
    if test "$cross_compiling" = yes; then
 
16677
  apu_try_berkeley_db=yes
 
16678
 
 
16679
else
 
16680
  cat >conftest.$ac_ext <<_ACEOF
 
16681
/* confdefs.h.  */
 
16682
_ACEOF
 
16683
cat confdefs.h >>conftest.$ac_ext
 
16684
cat >>conftest.$ac_ext <<_ACEOF
 
16685
/* end confdefs.h.  */
 
16686
 
 
16687
#include <stdio.h>
 
16688
#include <$apu_try_berkeley_db_header>
 
16689
main ()
 
16690
{
 
16691
  int major, minor, patch;
 
16692
 
 
16693
  db_version(&major, &minor, &patch);
 
16694
 
 
16695
  /* Sanity check: ensure that db.h constants actually match the db library */
 
16696
  if (major != DB_VERSION_MAJOR
 
16697
      || minor != DB_VERSION_MINOR
 
16698
      || patch != DB_VERSION_PATCH)
 
16699
    exit (1);
 
16700
 
 
16701
  /* Run-time check:  ensure the library claims to be the correct version. */
 
16702
 
 
16703
  if ($apu_check_berkeley_db_major != -1) {
 
16704
    if (major < $apu_check_berkeley_db_major)
 
16705
      exit (1);
 
16706
    if (major > $apu_check_berkeley_db_major)
 
16707
      exit (0);
 
16708
  }
 
16709
 
 
16710
  if ($apu_check_berkeley_db_minor != -1) {
 
16711
    if (minor < $apu_check_berkeley_db_minor)
 
16712
      exit (1);
 
16713
    if (minor > $apu_check_berkeley_db_minor)
 
16714
      exit (0);
 
16715
  }
 
16716
 
 
16717
  if ($apu_check_berkeley_db_patch == -1
 
16718
      || patch >= $apu_check_berkeley_db_patch)
 
16719
    exit (0);
 
16720
  else
 
16721
    exit (1);
 
16722
}
 
16723
 
 
16724
_ACEOF
 
16725
rm -f conftest$ac_exeext
 
16726
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
16727
  (eval $ac_link) 2>&5
 
16728
  ac_status=$?
 
16729
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16730
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
16731
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16732
  (eval $ac_try) 2>&5
 
16733
  ac_status=$?
 
16734
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16735
  (exit $ac_status); }; }; then
 
16736
  apu_try_berkeley_db=yes
 
16737
else
 
16738
  echo "$as_me: program exited with status $ac_status" >&5
 
16739
echo "$as_me: failed program was:" >&5
 
16740
sed 's/^/| /' conftest.$ac_ext >&5
 
16741
 
 
16742
( exit $ac_status )
 
16743
apu_try_berkeley_db=no
 
16744
fi
 
16745
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
16746
fi
 
16747
 
 
16748
    LIBS="$apu_try_berkeley_db_save_libs"
 
16749
 
 
16750
 
 
16751
                eval "$cache_id=$apu_try_berkeley_db"
 
16752
 
 
16753
fi
 
16754
 
 
16755
            result="`eval echo '$'$cache_id`"
 
16756
            echo "$as_me:$LINENO: result: $result" >&5
 
16757
echo "${ECHO_T}$result" >&6
 
16758
          elif test ""4"" = "1"; then
 
16759
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
16760
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
16761
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
16762
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
16763
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16764
else
 
16765
  ac_check_lib_save_LIBS=$LIBS
 
16766
LIBS="-l$bdb_libname  $LIBS"
 
16767
cat >conftest.$ac_ext <<_ACEOF
 
16768
/* confdefs.h.  */
 
16769
_ACEOF
 
16770
cat confdefs.h >>conftest.$ac_ext
 
16771
cat >>conftest.$ac_ext <<_ACEOF
 
16772
/* end confdefs.h.  */
 
16773
 
 
16774
/* Override any gcc2 internal prototype to avoid an error.  */
 
16775
#ifdef __cplusplus
 
16776
extern "C"
 
16777
#endif
 
16778
/* We use char because int might match the return type of a gcc2
 
16779
   builtin and then its argument prototype would still apply.  */
 
16780
char dbopen ();
 
16781
int
 
16782
main ()
 
16783
{
 
16784
dbopen ();
 
16785
  ;
 
16786
  return 0;
 
16787
}
 
16788
_ACEOF
 
16789
rm -f conftest.$ac_objext conftest$ac_exeext
 
16790
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
16791
  (eval $ac_link) 2>conftest.er1
 
16792
  ac_status=$?
 
16793
  grep -v '^ *+' conftest.er1 >conftest.err
 
16794
  rm -f conftest.er1
 
16795
  cat conftest.err >&5
 
16796
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16797
  (exit $ac_status); } &&
 
16798
         { ac_try='test -z "$ac_c_werror_flag"
 
16799
                         || test ! -s conftest.err'
 
16800
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16801
  (eval $ac_try) 2>&5
 
16802
  ac_status=$?
 
16803
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16804
  (exit $ac_status); }; } &&
 
16805
         { ac_try='test -s conftest$ac_exeext'
 
16806
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16807
  (eval $ac_try) 2>&5
 
16808
  ac_status=$?
 
16809
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16810
  (exit $ac_status); }; }; then
 
16811
  eval "$as_ac_Lib=yes"
 
16812
else
 
16813
  echo "$as_me: failed program was:" >&5
 
16814
sed 's/^/| /' conftest.$ac_ext >&5
 
16815
 
 
16816
eval "$as_ac_Lib=no"
 
16817
fi
 
16818
rm -f conftest.err conftest.$ac_objext \
 
16819
      conftest$ac_exeext conftest.$ac_ext
 
16820
LIBS=$ac_check_lib_save_LIBS
 
16821
fi
 
16822
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
16823
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
16824
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
16825
  result=yes
 
16826
else
 
16827
  result=no
 
16828
 
 
16829
fi
 
16830
 
 
16831
          elif test ""4"" = "2"; then
 
16832
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
16833
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
16834
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
16835
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
16836
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
16837
else
 
16838
  ac_check_lib_save_LIBS=$LIBS
 
16839
LIBS="-l$bdb_libname  $LIBS"
 
16840
cat >conftest.$ac_ext <<_ACEOF
 
16841
/* confdefs.h.  */
 
16842
_ACEOF
 
16843
cat confdefs.h >>conftest.$ac_ext
 
16844
cat >>conftest.$ac_ext <<_ACEOF
 
16845
/* end confdefs.h.  */
 
16846
 
 
16847
/* Override any gcc2 internal prototype to avoid an error.  */
 
16848
#ifdef __cplusplus
 
16849
extern "C"
 
16850
#endif
 
16851
/* We use char because int might match the return type of a gcc2
 
16852
   builtin and then its argument prototype would still apply.  */
 
16853
char db_open ();
 
16854
int
 
16855
main ()
 
16856
{
 
16857
db_open ();
 
16858
  ;
 
16859
  return 0;
 
16860
}
 
16861
_ACEOF
 
16862
rm -f conftest.$ac_objext conftest$ac_exeext
 
16863
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
16864
  (eval $ac_link) 2>conftest.er1
 
16865
  ac_status=$?
 
16866
  grep -v '^ *+' conftest.er1 >conftest.err
 
16867
  rm -f conftest.er1
 
16868
  cat conftest.err >&5
 
16869
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16870
  (exit $ac_status); } &&
 
16871
         { ac_try='test -z "$ac_c_werror_flag"
 
16872
                         || test ! -s conftest.err'
 
16873
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16874
  (eval $ac_try) 2>&5
 
16875
  ac_status=$?
 
16876
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16877
  (exit $ac_status); }; } &&
 
16878
         { ac_try='test -s conftest$ac_exeext'
 
16879
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
16880
  (eval $ac_try) 2>&5
 
16881
  ac_status=$?
 
16882
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
16883
  (exit $ac_status); }; }; then
 
16884
  eval "$as_ac_Lib=yes"
 
16885
else
 
16886
  echo "$as_me: failed program was:" >&5
 
16887
sed 's/^/| /' conftest.$ac_ext >&5
 
16888
 
 
16889
eval "$as_ac_Lib=no"
 
16890
fi
 
16891
rm -f conftest.err conftest.$ac_objext \
 
16892
      conftest$ac_exeext conftest.$ac_ext
 
16893
LIBS=$ac_check_lib_save_LIBS
 
16894
fi
 
16895
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
16896
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
16897
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
16898
  result=yes
 
16899
else
 
16900
  result=no
 
16901
 
 
16902
fi
 
16903
 
 
16904
          fi
 
16905
 
 
16906
else
 
16907
  result="no"
 
16908
fi
 
16909
 
 
16910
 
 
16911
 
 
16912
        # If we found it, no need to search any more.
 
16913
        if test "$result" = "yes"; then
 
16914
          found="$bdb_place"
 
16915
          break
 
16916
        fi
 
16917
      done
 
16918
      test "$found" != "not" && break
 
16919
    done
 
16920
    test "$found" != "not" && break
 
16921
  done
 
16922
 
 
16923
  # Restore the original values of the flags we tweak.
 
16924
  LDFLAGS="$apu_check_lib_save_ldflags"
 
16925
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
16926
 
 
16927
  case "$found" in
 
16928
  "not")
 
16929
    apu_have_db=0
 
16930
    ;;
 
16931
  "std")
 
16932
    apu_db_header=$bdb_header
 
16933
    apu_db_lib=$bdb_libname
 
16934
    apu_have_db=1
 
16935
    ;;
 
16936
  *":"*)
 
16937
    header="`echo $found | sed -e 's/:.*$//'`"
 
16938
    lib="`echo $found | sed -e 's/^.*://'`"
 
16939
 
 
16940
 
 
16941
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
16942
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
16943
    APRUTIL_INCLUDES="-I$header"
 
16944
  else
 
16945
    apr_addto_bugger="-I$header"
 
16946
    for i in $apr_addto_bugger; do
 
16947
      apr_addto_duplicate="0"
 
16948
      for j in $APRUTIL_INCLUDES; do
 
16949
        if test "x$i" = "x$j"; then
 
16950
          apr_addto_duplicate="1"
 
16951
          break
 
16952
        fi
 
16953
      done
 
16954
      if test $apr_addto_duplicate = "0"; then
 
16955
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
16956
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
16957
      fi
 
16958
    done
 
16959
  fi
 
16960
 
 
16961
 
 
16962
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
16963
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
16964
    APRUTIL_LDFLAGS="-L$lib"
 
16965
  else
 
16966
    apr_addto_bugger="-L$lib"
 
16967
    for i in $apr_addto_bugger; do
 
16968
      apr_addto_duplicate="0"
 
16969
      for j in $APRUTIL_LDFLAGS; do
 
16970
        if test "x$i" = "x$j"; then
 
16971
          apr_addto_duplicate="1"
 
16972
          break
 
16973
        fi
 
16974
      done
 
16975
      if test $apr_addto_duplicate = "0"; then
 
16976
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
16977
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
16978
      fi
 
16979
    done
 
16980
  fi
 
16981
 
 
16982
    apu_db_header=$bdb_header
 
16983
    apu_db_lib=$bdb_libname
 
16984
    apu_have_db=1
 
16985
    ;;
 
16986
  *)
 
16987
 
 
16988
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
16989
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
16990
    APRUTIL_INCLUDES="-I$found/include"
 
16991
  else
 
16992
    apr_addto_bugger="-I$found/include"
 
16993
    for i in $apr_addto_bugger; do
 
16994
      apr_addto_duplicate="0"
 
16995
      for j in $APRUTIL_INCLUDES; do
 
16996
        if test "x$i" = "x$j"; then
 
16997
          apr_addto_duplicate="1"
 
16998
          break
 
16999
        fi
 
17000
      done
 
17001
      if test $apr_addto_duplicate = "0"; then
 
17002
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
17003
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
17004
      fi
 
17005
    done
 
17006
  fi
 
17007
 
 
17008
 
 
17009
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
17010
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
17011
    APRUTIL_LDFLAGS="-L$found/lib"
 
17012
  else
 
17013
    apr_addto_bugger="-L$found/lib"
 
17014
    for i in $apr_addto_bugger; do
 
17015
      apr_addto_duplicate="0"
 
17016
      for j in $APRUTIL_LDFLAGS; do
 
17017
        if test "x$i" = "x$j"; then
 
17018
          apr_addto_duplicate="1"
 
17019
          break
 
17020
        fi
 
17021
      done
 
17022
      if test $apr_addto_duplicate = "0"; then
 
17023
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
17024
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
17025
      fi
 
17026
    done
 
17027
  fi
 
17028
 
 
17029
    apu_db_header=$bdb_header
 
17030
    apu_db_lib=$bdb_libname
 
17031
    apu_have_db=1
 
17032
    ;;
 
17033
  esac
 
17034
 
 
17035
  if test "$apu_have_db" = "1"; then
 
17036
    apu_db_version=4
 
17037
  fi
 
17038
 
 
17039
        if test "$apu_db_version" != "4"; then
 
17040
 
 
17041
  places="$all_places"
 
17042
  if test -z "$places"; then
 
17043
    places="std /usr/local /usr/local/BerkeleyDB.4.0 /boot/home/config"
 
17044
  fi
 
17045
 
 
17046
  bdb_version="4"
 
17047
  if test ""0"" != "-1"; then
 
17048
    bdb_version="$bdb_version."0""
 
17049
    if test ""-1"" != "-1"; then
 
17050
      bdb_version="$bdb_version."-1""
 
17051
    fi
 
17052
  fi
 
17053
  bdb_places="$places"
 
17054
  bdb_default_search_headers="db4/db.h db.h"
 
17055
  bdb_default_search_lib_names="db-4.0 db4 db"
 
17056
 
 
17057
 
 
17058
  apu_have_db=0
 
17059
 
 
17060
  # Save the original values of the flags we tweak.
 
17061
  apu_check_lib_save_libs="$LIBS"
 
17062
  apu_check_lib_save_ldflags="$LDFLAGS"
 
17063
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
17064
 
 
17065
  # The variable `found' is the prefix under which we've found
 
17066
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
17067
  found=not
 
17068
  for bdb_place in $bdb_places; do
 
17069
 
 
17070
    LDFLAGS="$apu_check_lib_save_ldflags"
 
17071
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
17072
    case "$bdb_place" in
 
17073
      "std" )
 
17074
        description="the standard places"
 
17075
      ;;
 
17076
      *":"* )
 
17077
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
17078
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
17079
        CPPFLAGS="$CPPFLAGS -I$header"
 
17080
        LDFLAGS="$LDFLAGS -L$lib"
 
17081
        description="$header and $lib"
 
17082
      ;;
 
17083
      * )
 
17084
        if test -d $bdb_place; then
 
17085
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
17086
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
17087
        else
 
17088
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
17089
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
17090
          echo "$as_me:$LINENO: result: directory not found" >&5
 
17091
echo "${ECHO_T}directory not found" >&6
 
17092
          continue
 
17093
        fi
 
17094
        description="$bdb_place"
 
17095
      ;;
 
17096
    esac
 
17097
 
 
17098
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
17099
    # trick to display a message instead.
 
17100
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
17101
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
17102
    echo "$as_me:$LINENO: result: " >&5
 
17103
echo "${ECHO_T}" >&6
 
17104
 
 
17105
    for bdb_libname in $bdb_default_search_lib_names; do
 
17106
      for bdb_header in $bdb_default_search_headers; do
 
17107
        # Clear the header cache variable for each location
 
17108
 
 
17109
        cache_id="`echo ac_cv_header_${bdb_header} \
 
17110
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
17111
 
 
17112
        unset $cache_id
 
17113
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
17114
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
17115
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
17116
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
17117
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
17118
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17119
fi
 
17120
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
17121
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
17122
else
 
17123
  # Is the header compilable?
 
17124
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
17125
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
17126
cat >conftest.$ac_ext <<_ACEOF
 
17127
/* confdefs.h.  */
 
17128
_ACEOF
 
17129
cat confdefs.h >>conftest.$ac_ext
 
17130
cat >>conftest.$ac_ext <<_ACEOF
 
17131
/* end confdefs.h.  */
 
17132
$ac_includes_default
 
17133
#include <$bdb_header>
 
17134
_ACEOF
 
17135
rm -f conftest.$ac_objext
 
17136
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
17137
  (eval $ac_compile) 2>conftest.er1
 
17138
  ac_status=$?
 
17139
  grep -v '^ *+' conftest.er1 >conftest.err
 
17140
  rm -f conftest.er1
 
17141
  cat conftest.err >&5
 
17142
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17143
  (exit $ac_status); } &&
 
17144
         { ac_try='test -z "$ac_c_werror_flag"
 
17145
                         || test ! -s conftest.err'
 
17146
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17147
  (eval $ac_try) 2>&5
 
17148
  ac_status=$?
 
17149
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17150
  (exit $ac_status); }; } &&
 
17151
         { ac_try='test -s conftest.$ac_objext'
 
17152
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17153
  (eval $ac_try) 2>&5
 
17154
  ac_status=$?
 
17155
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17156
  (exit $ac_status); }; }; then
 
17157
  ac_header_compiler=yes
 
17158
else
 
17159
  echo "$as_me: failed program was:" >&5
 
17160
sed 's/^/| /' conftest.$ac_ext >&5
 
17161
 
 
17162
ac_header_compiler=no
 
17163
fi
 
17164
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
17165
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
17166
echo "${ECHO_T}$ac_header_compiler" >&6
 
17167
 
 
17168
# Is the header present?
 
17169
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
17170
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
17171
cat >conftest.$ac_ext <<_ACEOF
 
17172
/* confdefs.h.  */
 
17173
_ACEOF
 
17174
cat confdefs.h >>conftest.$ac_ext
 
17175
cat >>conftest.$ac_ext <<_ACEOF
 
17176
/* end confdefs.h.  */
 
17177
#include <$bdb_header>
 
17178
_ACEOF
 
17179
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
17180
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
17181
  ac_status=$?
 
17182
  grep -v '^ *+' conftest.er1 >conftest.err
 
17183
  rm -f conftest.er1
 
17184
  cat conftest.err >&5
 
17185
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17186
  (exit $ac_status); } >/dev/null; then
 
17187
  if test -s conftest.err; then
 
17188
    ac_cpp_err=$ac_c_preproc_warn_flag
 
17189
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
17190
  else
 
17191
    ac_cpp_err=
 
17192
  fi
 
17193
else
 
17194
  ac_cpp_err=yes
 
17195
fi
 
17196
if test -z "$ac_cpp_err"; then
 
17197
  ac_header_preproc=yes
 
17198
else
 
17199
  echo "$as_me: failed program was:" >&5
 
17200
sed 's/^/| /' conftest.$ac_ext >&5
 
17201
 
 
17202
  ac_header_preproc=no
 
17203
fi
 
17204
rm -f conftest.err conftest.$ac_ext
 
17205
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
17206
echo "${ECHO_T}$ac_header_preproc" >&6
 
17207
 
 
17208
# So?  What about this header?
 
17209
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
17210
  yes:no: )
 
17211
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
17212
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
17213
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
17214
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
17215
    ac_header_preproc=yes
 
17216
    ;;
 
17217
  no:yes:* )
 
17218
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
17219
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
17220
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
17221
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
17222
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
17223
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
17224
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
17225
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
17226
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
17227
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
17228
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
17229
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
17230
    (
 
17231
      cat <<\_ASBOX
 
17232
## ------------------------------------------ ##
 
17233
## Report this to the AC_PACKAGE_NAME lists.  ##
 
17234
## ------------------------------------------ ##
 
17235
_ASBOX
 
17236
    ) |
 
17237
      sed "s/^/$as_me: WARNING:     /" >&2
 
17238
    ;;
 
17239
esac
 
17240
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
17241
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
17242
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
17243
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17244
else
 
17245
  eval "$as_ac_Header=\$ac_header_preproc"
 
17246
fi
 
17247
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
17248
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
17249
 
 
17250
fi
 
17251
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
17252
 
 
17253
          if test ""4"" = "3" -o ""4"" = "4"; then
 
17254
            # We generate a separate cache variable for each prefix and libname
 
17255
            # we search under.  That way, we avoid caching information that
 
17256
            # changes if the user runs `configure' with a different set of
 
17257
            # switches.
 
17258
 
 
17259
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"0"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
17260
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
17261
 
 
17262
 
 
17263
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
17264
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
17265
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
17266
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17267
else
 
17268
 
 
17269
 
 
17270
    apu_try_berkeley_db_save_libs="$LIBS"
 
17271
 
 
17272
    apu_check_berkeley_db_major="4"
 
17273
    apu_check_berkeley_db_minor="0"
 
17274
    apu_check_berkeley_db_patch="-1"
 
17275
    apu_try_berkeley_db_header=$bdb_header
 
17276
    apu_try_berkeley_db_libname=$bdb_libname
 
17277
 
 
17278
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
17279
    if test "$cross_compiling" = yes; then
 
17280
  apu_try_berkeley_db=yes
 
17281
 
 
17282
else
 
17283
  cat >conftest.$ac_ext <<_ACEOF
 
17284
/* confdefs.h.  */
 
17285
_ACEOF
 
17286
cat confdefs.h >>conftest.$ac_ext
 
17287
cat >>conftest.$ac_ext <<_ACEOF
 
17288
/* end confdefs.h.  */
 
17289
 
 
17290
#include <stdio.h>
 
17291
#include <$apu_try_berkeley_db_header>
 
17292
main ()
 
17293
{
 
17294
  int major, minor, patch;
 
17295
 
 
17296
  db_version(&major, &minor, &patch);
 
17297
 
 
17298
  /* Sanity check: ensure that db.h constants actually match the db library */
 
17299
  if (major != DB_VERSION_MAJOR
 
17300
      || minor != DB_VERSION_MINOR
 
17301
      || patch != DB_VERSION_PATCH)
 
17302
    exit (1);
 
17303
 
 
17304
  /* Run-time check:  ensure the library claims to be the correct version. */
 
17305
 
 
17306
  if ($apu_check_berkeley_db_major != -1) {
 
17307
    if (major < $apu_check_berkeley_db_major)
 
17308
      exit (1);
 
17309
    if (major > $apu_check_berkeley_db_major)
 
17310
      exit (0);
 
17311
  }
 
17312
 
 
17313
  if ($apu_check_berkeley_db_minor != -1) {
 
17314
    if (minor < $apu_check_berkeley_db_minor)
 
17315
      exit (1);
 
17316
    if (minor > $apu_check_berkeley_db_minor)
 
17317
      exit (0);
 
17318
  }
 
17319
 
 
17320
  if ($apu_check_berkeley_db_patch == -1
 
17321
      || patch >= $apu_check_berkeley_db_patch)
 
17322
    exit (0);
 
17323
  else
 
17324
    exit (1);
 
17325
}
 
17326
 
 
17327
_ACEOF
 
17328
rm -f conftest$ac_exeext
 
17329
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
17330
  (eval $ac_link) 2>&5
 
17331
  ac_status=$?
 
17332
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17333
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
17334
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17335
  (eval $ac_try) 2>&5
 
17336
  ac_status=$?
 
17337
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17338
  (exit $ac_status); }; }; then
 
17339
  apu_try_berkeley_db=yes
 
17340
else
 
17341
  echo "$as_me: program exited with status $ac_status" >&5
 
17342
echo "$as_me: failed program was:" >&5
 
17343
sed 's/^/| /' conftest.$ac_ext >&5
 
17344
 
 
17345
( exit $ac_status )
 
17346
apu_try_berkeley_db=no
 
17347
fi
 
17348
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
17349
fi
 
17350
 
 
17351
    LIBS="$apu_try_berkeley_db_save_libs"
 
17352
 
 
17353
 
 
17354
                eval "$cache_id=$apu_try_berkeley_db"
 
17355
 
 
17356
fi
 
17357
 
 
17358
            result="`eval echo '$'$cache_id`"
 
17359
            echo "$as_me:$LINENO: result: $result" >&5
 
17360
echo "${ECHO_T}$result" >&6
 
17361
          elif test ""4"" = "1"; then
 
17362
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
17363
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
17364
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
17365
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
17366
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17367
else
 
17368
  ac_check_lib_save_LIBS=$LIBS
 
17369
LIBS="-l$bdb_libname  $LIBS"
 
17370
cat >conftest.$ac_ext <<_ACEOF
 
17371
/* confdefs.h.  */
 
17372
_ACEOF
 
17373
cat confdefs.h >>conftest.$ac_ext
 
17374
cat >>conftest.$ac_ext <<_ACEOF
 
17375
/* end confdefs.h.  */
 
17376
 
 
17377
/* Override any gcc2 internal prototype to avoid an error.  */
 
17378
#ifdef __cplusplus
 
17379
extern "C"
 
17380
#endif
 
17381
/* We use char because int might match the return type of a gcc2
 
17382
   builtin and then its argument prototype would still apply.  */
 
17383
char dbopen ();
 
17384
int
 
17385
main ()
 
17386
{
 
17387
dbopen ();
 
17388
  ;
 
17389
  return 0;
 
17390
}
 
17391
_ACEOF
 
17392
rm -f conftest.$ac_objext conftest$ac_exeext
 
17393
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
17394
  (eval $ac_link) 2>conftest.er1
 
17395
  ac_status=$?
 
17396
  grep -v '^ *+' conftest.er1 >conftest.err
 
17397
  rm -f conftest.er1
 
17398
  cat conftest.err >&5
 
17399
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17400
  (exit $ac_status); } &&
 
17401
         { ac_try='test -z "$ac_c_werror_flag"
 
17402
                         || test ! -s conftest.err'
 
17403
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17404
  (eval $ac_try) 2>&5
 
17405
  ac_status=$?
 
17406
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17407
  (exit $ac_status); }; } &&
 
17408
         { ac_try='test -s conftest$ac_exeext'
 
17409
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17410
  (eval $ac_try) 2>&5
 
17411
  ac_status=$?
 
17412
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17413
  (exit $ac_status); }; }; then
 
17414
  eval "$as_ac_Lib=yes"
 
17415
else
 
17416
  echo "$as_me: failed program was:" >&5
 
17417
sed 's/^/| /' conftest.$ac_ext >&5
 
17418
 
 
17419
eval "$as_ac_Lib=no"
 
17420
fi
 
17421
rm -f conftest.err conftest.$ac_objext \
 
17422
      conftest$ac_exeext conftest.$ac_ext
 
17423
LIBS=$ac_check_lib_save_LIBS
 
17424
fi
 
17425
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
17426
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
17427
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
17428
  result=yes
 
17429
else
 
17430
  result=no
 
17431
 
 
17432
fi
 
17433
 
 
17434
          elif test ""4"" = "2"; then
 
17435
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
17436
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
17437
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
17438
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
17439
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17440
else
 
17441
  ac_check_lib_save_LIBS=$LIBS
 
17442
LIBS="-l$bdb_libname  $LIBS"
 
17443
cat >conftest.$ac_ext <<_ACEOF
 
17444
/* confdefs.h.  */
 
17445
_ACEOF
 
17446
cat confdefs.h >>conftest.$ac_ext
 
17447
cat >>conftest.$ac_ext <<_ACEOF
 
17448
/* end confdefs.h.  */
 
17449
 
 
17450
/* Override any gcc2 internal prototype to avoid an error.  */
 
17451
#ifdef __cplusplus
 
17452
extern "C"
 
17453
#endif
 
17454
/* We use char because int might match the return type of a gcc2
 
17455
   builtin and then its argument prototype would still apply.  */
 
17456
char db_open ();
 
17457
int
 
17458
main ()
 
17459
{
 
17460
db_open ();
 
17461
  ;
 
17462
  return 0;
 
17463
}
 
17464
_ACEOF
 
17465
rm -f conftest.$ac_objext conftest$ac_exeext
 
17466
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
17467
  (eval $ac_link) 2>conftest.er1
 
17468
  ac_status=$?
 
17469
  grep -v '^ *+' conftest.er1 >conftest.err
 
17470
  rm -f conftest.er1
 
17471
  cat conftest.err >&5
 
17472
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17473
  (exit $ac_status); } &&
 
17474
         { ac_try='test -z "$ac_c_werror_flag"
 
17475
                         || test ! -s conftest.err'
 
17476
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17477
  (eval $ac_try) 2>&5
 
17478
  ac_status=$?
 
17479
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17480
  (exit $ac_status); }; } &&
 
17481
         { ac_try='test -s conftest$ac_exeext'
 
17482
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17483
  (eval $ac_try) 2>&5
 
17484
  ac_status=$?
 
17485
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17486
  (exit $ac_status); }; }; then
 
17487
  eval "$as_ac_Lib=yes"
 
17488
else
 
17489
  echo "$as_me: failed program was:" >&5
 
17490
sed 's/^/| /' conftest.$ac_ext >&5
 
17491
 
 
17492
eval "$as_ac_Lib=no"
 
17493
fi
 
17494
rm -f conftest.err conftest.$ac_objext \
 
17495
      conftest$ac_exeext conftest.$ac_ext
 
17496
LIBS=$ac_check_lib_save_LIBS
 
17497
fi
 
17498
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
17499
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
17500
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
17501
  result=yes
 
17502
else
 
17503
  result=no
 
17504
 
 
17505
fi
 
17506
 
 
17507
          fi
 
17508
 
 
17509
else
 
17510
  result="no"
 
17511
fi
 
17512
 
 
17513
 
 
17514
 
 
17515
        # If we found it, no need to search any more.
 
17516
        if test "$result" = "yes"; then
 
17517
          found="$bdb_place"
 
17518
          break
 
17519
        fi
 
17520
      done
 
17521
      test "$found" != "not" && break
 
17522
    done
 
17523
    test "$found" != "not" && break
 
17524
  done
 
17525
 
 
17526
  # Restore the original values of the flags we tweak.
 
17527
  LDFLAGS="$apu_check_lib_save_ldflags"
 
17528
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
17529
 
 
17530
  case "$found" in
 
17531
  "not")
 
17532
    apu_have_db=0
 
17533
    ;;
 
17534
  "std")
 
17535
    apu_db_header=$bdb_header
 
17536
    apu_db_lib=$bdb_libname
 
17537
    apu_have_db=1
 
17538
    ;;
 
17539
  *":"*)
 
17540
    header="`echo $found | sed -e 's/:.*$//'`"
 
17541
    lib="`echo $found | sed -e 's/^.*://'`"
 
17542
 
 
17543
 
 
17544
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
17545
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
17546
    APRUTIL_INCLUDES="-I$header"
 
17547
  else
 
17548
    apr_addto_bugger="-I$header"
 
17549
    for i in $apr_addto_bugger; do
 
17550
      apr_addto_duplicate="0"
 
17551
      for j in $APRUTIL_INCLUDES; do
 
17552
        if test "x$i" = "x$j"; then
 
17553
          apr_addto_duplicate="1"
 
17554
          break
 
17555
        fi
 
17556
      done
 
17557
      if test $apr_addto_duplicate = "0"; then
 
17558
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
17559
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
17560
      fi
 
17561
    done
 
17562
  fi
 
17563
 
 
17564
 
 
17565
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
17566
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
17567
    APRUTIL_LDFLAGS="-L$lib"
 
17568
  else
 
17569
    apr_addto_bugger="-L$lib"
 
17570
    for i in $apr_addto_bugger; do
 
17571
      apr_addto_duplicate="0"
 
17572
      for j in $APRUTIL_LDFLAGS; do
 
17573
        if test "x$i" = "x$j"; then
 
17574
          apr_addto_duplicate="1"
 
17575
          break
 
17576
        fi
 
17577
      done
 
17578
      if test $apr_addto_duplicate = "0"; then
 
17579
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
17580
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
17581
      fi
 
17582
    done
 
17583
  fi
 
17584
 
 
17585
    apu_db_header=$bdb_header
 
17586
    apu_db_lib=$bdb_libname
 
17587
    apu_have_db=1
 
17588
    ;;
 
17589
  *)
 
17590
 
 
17591
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
17592
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
17593
    APRUTIL_INCLUDES="-I$found/include"
 
17594
  else
 
17595
    apr_addto_bugger="-I$found/include"
 
17596
    for i in $apr_addto_bugger; do
 
17597
      apr_addto_duplicate="0"
 
17598
      for j in $APRUTIL_INCLUDES; do
 
17599
        if test "x$i" = "x$j"; then
 
17600
          apr_addto_duplicate="1"
 
17601
          break
 
17602
        fi
 
17603
      done
 
17604
      if test $apr_addto_duplicate = "0"; then
 
17605
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
17606
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
17607
      fi
 
17608
    done
 
17609
  fi
 
17610
 
 
17611
 
 
17612
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
17613
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
17614
    APRUTIL_LDFLAGS="-L$found/lib"
 
17615
  else
 
17616
    apr_addto_bugger="-L$found/lib"
 
17617
    for i in $apr_addto_bugger; do
 
17618
      apr_addto_duplicate="0"
 
17619
      for j in $APRUTIL_LDFLAGS; do
 
17620
        if test "x$i" = "x$j"; then
 
17621
          apr_addto_duplicate="1"
 
17622
          break
 
17623
        fi
 
17624
      done
 
17625
      if test $apr_addto_duplicate = "0"; then
 
17626
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
17627
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
17628
      fi
 
17629
    done
 
17630
  fi
 
17631
 
 
17632
    apu_db_header=$bdb_header
 
17633
    apu_db_lib=$bdb_libname
 
17634
    apu_have_db=1
 
17635
    ;;
 
17636
  esac
 
17637
 
 
17638
  if test "$apu_have_db" = "1"; then
 
17639
    apu_db_version=4
 
17640
  fi
 
17641
 
 
17642
          if test "$apu_db_version" != "4"; then
 
17643
 
 
17644
  places="$all_places"
 
17645
  if test -z "$places"; then
 
17646
    places="std"
 
17647
  fi
 
17648
 
 
17649
  bdb_version=3
 
17650
  if test "-1" != "-1"; then
 
17651
    bdb_version="$bdb_version.-1"
 
17652
    if test "-1" != "-1"; then
 
17653
      bdb_version="$bdb_version.-1"
 
17654
    fi
 
17655
  fi
 
17656
  bdb_places="$places"
 
17657
  bdb_default_search_headers="db3/db.h db.h"
 
17658
  bdb_default_search_lib_names="db3 db"
 
17659
 
 
17660
 
 
17661
  apu_have_db=0
 
17662
 
 
17663
  # Save the original values of the flags we tweak.
 
17664
  apu_check_lib_save_libs="$LIBS"
 
17665
  apu_check_lib_save_ldflags="$LDFLAGS"
 
17666
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
17667
 
 
17668
  # The variable `found' is the prefix under which we've found
 
17669
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
17670
  found=not
 
17671
  for bdb_place in $bdb_places; do
 
17672
 
 
17673
    LDFLAGS="$apu_check_lib_save_ldflags"
 
17674
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
17675
    case "$bdb_place" in
 
17676
      "std" )
 
17677
        description="the standard places"
 
17678
      ;;
 
17679
      *":"* )
 
17680
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
17681
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
17682
        CPPFLAGS="$CPPFLAGS -I$header"
 
17683
        LDFLAGS="$LDFLAGS -L$lib"
 
17684
        description="$header and $lib"
 
17685
      ;;
 
17686
      * )
 
17687
        if test -d $bdb_place; then
 
17688
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
17689
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
17690
        else
 
17691
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
17692
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
17693
          echo "$as_me:$LINENO: result: directory not found" >&5
 
17694
echo "${ECHO_T}directory not found" >&6
 
17695
          continue
 
17696
        fi
 
17697
        description="$bdb_place"
 
17698
      ;;
 
17699
    esac
 
17700
 
 
17701
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
17702
    # trick to display a message instead.
 
17703
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
17704
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
17705
    echo "$as_me:$LINENO: result: " >&5
 
17706
echo "${ECHO_T}" >&6
 
17707
 
 
17708
    for bdb_libname in $bdb_default_search_lib_names; do
 
17709
      for bdb_header in $bdb_default_search_headers; do
 
17710
        # Clear the header cache variable for each location
 
17711
 
 
17712
        cache_id="`echo ac_cv_header_${bdb_header} \
 
17713
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
17714
 
 
17715
        unset $cache_id
 
17716
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
17717
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
17718
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
17719
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
17720
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
17721
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17722
fi
 
17723
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
17724
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
17725
else
 
17726
  # Is the header compilable?
 
17727
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
17728
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
17729
cat >conftest.$ac_ext <<_ACEOF
 
17730
/* confdefs.h.  */
 
17731
_ACEOF
 
17732
cat confdefs.h >>conftest.$ac_ext
 
17733
cat >>conftest.$ac_ext <<_ACEOF
 
17734
/* end confdefs.h.  */
 
17735
$ac_includes_default
 
17736
#include <$bdb_header>
 
17737
_ACEOF
 
17738
rm -f conftest.$ac_objext
 
17739
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
17740
  (eval $ac_compile) 2>conftest.er1
 
17741
  ac_status=$?
 
17742
  grep -v '^ *+' conftest.er1 >conftest.err
 
17743
  rm -f conftest.er1
 
17744
  cat conftest.err >&5
 
17745
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17746
  (exit $ac_status); } &&
 
17747
         { ac_try='test -z "$ac_c_werror_flag"
 
17748
                         || test ! -s conftest.err'
 
17749
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17750
  (eval $ac_try) 2>&5
 
17751
  ac_status=$?
 
17752
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17753
  (exit $ac_status); }; } &&
 
17754
         { ac_try='test -s conftest.$ac_objext'
 
17755
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17756
  (eval $ac_try) 2>&5
 
17757
  ac_status=$?
 
17758
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17759
  (exit $ac_status); }; }; then
 
17760
  ac_header_compiler=yes
 
17761
else
 
17762
  echo "$as_me: failed program was:" >&5
 
17763
sed 's/^/| /' conftest.$ac_ext >&5
 
17764
 
 
17765
ac_header_compiler=no
 
17766
fi
 
17767
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
17768
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
17769
echo "${ECHO_T}$ac_header_compiler" >&6
 
17770
 
 
17771
# Is the header present?
 
17772
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
17773
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
17774
cat >conftest.$ac_ext <<_ACEOF
 
17775
/* confdefs.h.  */
 
17776
_ACEOF
 
17777
cat confdefs.h >>conftest.$ac_ext
 
17778
cat >>conftest.$ac_ext <<_ACEOF
 
17779
/* end confdefs.h.  */
 
17780
#include <$bdb_header>
 
17781
_ACEOF
 
17782
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
17783
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
17784
  ac_status=$?
 
17785
  grep -v '^ *+' conftest.er1 >conftest.err
 
17786
  rm -f conftest.er1
 
17787
  cat conftest.err >&5
 
17788
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17789
  (exit $ac_status); } >/dev/null; then
 
17790
  if test -s conftest.err; then
 
17791
    ac_cpp_err=$ac_c_preproc_warn_flag
 
17792
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
17793
  else
 
17794
    ac_cpp_err=
 
17795
  fi
 
17796
else
 
17797
  ac_cpp_err=yes
 
17798
fi
 
17799
if test -z "$ac_cpp_err"; then
 
17800
  ac_header_preproc=yes
 
17801
else
 
17802
  echo "$as_me: failed program was:" >&5
 
17803
sed 's/^/| /' conftest.$ac_ext >&5
 
17804
 
 
17805
  ac_header_preproc=no
 
17806
fi
 
17807
rm -f conftest.err conftest.$ac_ext
 
17808
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
17809
echo "${ECHO_T}$ac_header_preproc" >&6
 
17810
 
 
17811
# So?  What about this header?
 
17812
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
17813
  yes:no: )
 
17814
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
17815
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
17816
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
17817
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
17818
    ac_header_preproc=yes
 
17819
    ;;
 
17820
  no:yes:* )
 
17821
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
17822
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
17823
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
17824
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
17825
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
17826
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
17827
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
17828
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
17829
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
17830
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
17831
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
17832
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
17833
    (
 
17834
      cat <<\_ASBOX
 
17835
## ------------------------------------------ ##
 
17836
## Report this to the AC_PACKAGE_NAME lists.  ##
 
17837
## ------------------------------------------ ##
 
17838
_ASBOX
 
17839
    ) |
 
17840
      sed "s/^/$as_me: WARNING:     /" >&2
 
17841
    ;;
 
17842
esac
 
17843
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
17844
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
17845
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
17846
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17847
else
 
17848
  eval "$as_ac_Header=\$ac_header_preproc"
 
17849
fi
 
17850
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
17851
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
17852
 
 
17853
fi
 
17854
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
17855
 
 
17856
          if test "3" = "3" -o "3" = "4"; then
 
17857
            # We generate a separate cache variable for each prefix and libname
 
17858
            # we search under.  That way, we avoid caching information that
 
17859
            # changes if the user runs `configure' with a different set of
 
17860
            # switches.
 
17861
 
 
17862
            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
17863
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
17864
 
 
17865
 
 
17866
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
17867
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
17868
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
17869
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17870
else
 
17871
 
 
17872
 
 
17873
    apu_try_berkeley_db_save_libs="$LIBS"
 
17874
 
 
17875
    apu_check_berkeley_db_major=3
 
17876
    apu_check_berkeley_db_minor=-1
 
17877
    apu_check_berkeley_db_patch=-1
 
17878
    apu_try_berkeley_db_header=$bdb_header
 
17879
    apu_try_berkeley_db_libname=$bdb_libname
 
17880
 
 
17881
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
17882
    if test "$cross_compiling" = yes; then
 
17883
  apu_try_berkeley_db=yes
 
17884
 
 
17885
else
 
17886
  cat >conftest.$ac_ext <<_ACEOF
 
17887
/* confdefs.h.  */
 
17888
_ACEOF
 
17889
cat confdefs.h >>conftest.$ac_ext
 
17890
cat >>conftest.$ac_ext <<_ACEOF
 
17891
/* end confdefs.h.  */
 
17892
 
 
17893
#include <stdio.h>
 
17894
#include <$apu_try_berkeley_db_header>
 
17895
main ()
 
17896
{
 
17897
  int major, minor, patch;
 
17898
 
 
17899
  db_version(&major, &minor, &patch);
 
17900
 
 
17901
  /* Sanity check: ensure that db.h constants actually match the db library */
 
17902
  if (major != DB_VERSION_MAJOR
 
17903
      || minor != DB_VERSION_MINOR
 
17904
      || patch != DB_VERSION_PATCH)
 
17905
    exit (1);
 
17906
 
 
17907
  /* Run-time check:  ensure the library claims to be the correct version. */
 
17908
 
 
17909
  if ($apu_check_berkeley_db_major != -1) {
 
17910
    if (major < $apu_check_berkeley_db_major)
 
17911
      exit (1);
 
17912
    if (major > $apu_check_berkeley_db_major)
 
17913
      exit (0);
 
17914
  }
 
17915
 
 
17916
  if ($apu_check_berkeley_db_minor != -1) {
 
17917
    if (minor < $apu_check_berkeley_db_minor)
 
17918
      exit (1);
 
17919
    if (minor > $apu_check_berkeley_db_minor)
 
17920
      exit (0);
 
17921
  }
 
17922
 
 
17923
  if ($apu_check_berkeley_db_patch == -1
 
17924
      || patch >= $apu_check_berkeley_db_patch)
 
17925
    exit (0);
 
17926
  else
 
17927
    exit (1);
 
17928
}
 
17929
 
 
17930
_ACEOF
 
17931
rm -f conftest$ac_exeext
 
17932
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
17933
  (eval $ac_link) 2>&5
 
17934
  ac_status=$?
 
17935
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17936
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
17937
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
17938
  (eval $ac_try) 2>&5
 
17939
  ac_status=$?
 
17940
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
17941
  (exit $ac_status); }; }; then
 
17942
  apu_try_berkeley_db=yes
 
17943
else
 
17944
  echo "$as_me: program exited with status $ac_status" >&5
 
17945
echo "$as_me: failed program was:" >&5
 
17946
sed 's/^/| /' conftest.$ac_ext >&5
 
17947
 
 
17948
( exit $ac_status )
 
17949
apu_try_berkeley_db=no
 
17950
fi
 
17951
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
17952
fi
 
17953
 
 
17954
    LIBS="$apu_try_berkeley_db_save_libs"
 
17955
 
 
17956
 
 
17957
                eval "$cache_id=$apu_try_berkeley_db"
 
17958
 
 
17959
fi
 
17960
 
 
17961
            result="`eval echo '$'$cache_id`"
 
17962
            echo "$as_me:$LINENO: result: $result" >&5
 
17963
echo "${ECHO_T}$result" >&6
 
17964
          elif test "3" = "1"; then
 
17965
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
17966
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
17967
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
17968
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
17969
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
17970
else
 
17971
  ac_check_lib_save_LIBS=$LIBS
 
17972
LIBS="-l$bdb_libname  $LIBS"
 
17973
cat >conftest.$ac_ext <<_ACEOF
 
17974
/* confdefs.h.  */
 
17975
_ACEOF
 
17976
cat confdefs.h >>conftest.$ac_ext
 
17977
cat >>conftest.$ac_ext <<_ACEOF
 
17978
/* end confdefs.h.  */
 
17979
 
 
17980
/* Override any gcc2 internal prototype to avoid an error.  */
 
17981
#ifdef __cplusplus
 
17982
extern "C"
 
17983
#endif
 
17984
/* We use char because int might match the return type of a gcc2
 
17985
   builtin and then its argument prototype would still apply.  */
 
17986
char dbopen ();
 
17987
int
 
17988
main ()
 
17989
{
 
17990
dbopen ();
 
17991
  ;
 
17992
  return 0;
 
17993
}
 
17994
_ACEOF
 
17995
rm -f conftest.$ac_objext conftest$ac_exeext
 
17996
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
17997
  (eval $ac_link) 2>conftest.er1
 
17998
  ac_status=$?
 
17999
  grep -v '^ *+' conftest.er1 >conftest.err
 
18000
  rm -f conftest.er1
 
18001
  cat conftest.err >&5
 
18002
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18003
  (exit $ac_status); } &&
 
18004
         { ac_try='test -z "$ac_c_werror_flag"
 
18005
                         || test ! -s conftest.err'
 
18006
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18007
  (eval $ac_try) 2>&5
 
18008
  ac_status=$?
 
18009
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18010
  (exit $ac_status); }; } &&
 
18011
         { ac_try='test -s conftest$ac_exeext'
 
18012
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18013
  (eval $ac_try) 2>&5
 
18014
  ac_status=$?
 
18015
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18016
  (exit $ac_status); }; }; then
 
18017
  eval "$as_ac_Lib=yes"
 
18018
else
 
18019
  echo "$as_me: failed program was:" >&5
 
18020
sed 's/^/| /' conftest.$ac_ext >&5
 
18021
 
 
18022
eval "$as_ac_Lib=no"
 
18023
fi
 
18024
rm -f conftest.err conftest.$ac_objext \
 
18025
      conftest$ac_exeext conftest.$ac_ext
 
18026
LIBS=$ac_check_lib_save_LIBS
 
18027
fi
 
18028
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
18029
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
18030
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
18031
  result=yes
 
18032
else
 
18033
  result=no
 
18034
 
 
18035
fi
 
18036
 
 
18037
          elif test "3" = "2"; then
 
18038
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
18039
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
18040
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
18041
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
18042
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18043
else
 
18044
  ac_check_lib_save_LIBS=$LIBS
 
18045
LIBS="-l$bdb_libname  $LIBS"
 
18046
cat >conftest.$ac_ext <<_ACEOF
 
18047
/* confdefs.h.  */
 
18048
_ACEOF
 
18049
cat confdefs.h >>conftest.$ac_ext
 
18050
cat >>conftest.$ac_ext <<_ACEOF
 
18051
/* end confdefs.h.  */
 
18052
 
 
18053
/* Override any gcc2 internal prototype to avoid an error.  */
 
18054
#ifdef __cplusplus
 
18055
extern "C"
 
18056
#endif
 
18057
/* We use char because int might match the return type of a gcc2
 
18058
   builtin and then its argument prototype would still apply.  */
 
18059
char db_open ();
 
18060
int
 
18061
main ()
 
18062
{
 
18063
db_open ();
 
18064
  ;
 
18065
  return 0;
 
18066
}
 
18067
_ACEOF
 
18068
rm -f conftest.$ac_objext conftest$ac_exeext
 
18069
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
18070
  (eval $ac_link) 2>conftest.er1
 
18071
  ac_status=$?
 
18072
  grep -v '^ *+' conftest.er1 >conftest.err
 
18073
  rm -f conftest.er1
 
18074
  cat conftest.err >&5
 
18075
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18076
  (exit $ac_status); } &&
 
18077
         { ac_try='test -z "$ac_c_werror_flag"
 
18078
                         || test ! -s conftest.err'
 
18079
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18080
  (eval $ac_try) 2>&5
 
18081
  ac_status=$?
 
18082
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18083
  (exit $ac_status); }; } &&
 
18084
         { ac_try='test -s conftest$ac_exeext'
 
18085
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18086
  (eval $ac_try) 2>&5
 
18087
  ac_status=$?
 
18088
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18089
  (exit $ac_status); }; }; then
 
18090
  eval "$as_ac_Lib=yes"
 
18091
else
 
18092
  echo "$as_me: failed program was:" >&5
 
18093
sed 's/^/| /' conftest.$ac_ext >&5
 
18094
 
 
18095
eval "$as_ac_Lib=no"
 
18096
fi
 
18097
rm -f conftest.err conftest.$ac_objext \
 
18098
      conftest$ac_exeext conftest.$ac_ext
 
18099
LIBS=$ac_check_lib_save_LIBS
 
18100
fi
 
18101
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
18102
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
18103
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
18104
  result=yes
 
18105
else
 
18106
  result=no
 
18107
 
 
18108
fi
 
18109
 
 
18110
          fi
 
18111
 
 
18112
else
 
18113
  result="no"
 
18114
fi
 
18115
 
 
18116
 
 
18117
 
 
18118
        # If we found it, no need to search any more.
 
18119
        if test "$result" = "yes"; then
 
18120
          found="$bdb_place"
 
18121
          break
 
18122
        fi
 
18123
      done
 
18124
      test "$found" != "not" && break
 
18125
    done
 
18126
    test "$found" != "not" && break
 
18127
  done
 
18128
 
 
18129
  # Restore the original values of the flags we tweak.
 
18130
  LDFLAGS="$apu_check_lib_save_ldflags"
 
18131
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
18132
 
 
18133
  case "$found" in
 
18134
  "not")
 
18135
    apu_have_db=0
 
18136
    ;;
 
18137
  "std")
 
18138
    apu_db_header=$bdb_header
 
18139
    apu_db_lib=$bdb_libname
 
18140
    apu_have_db=1
 
18141
    ;;
 
18142
  *":"*)
 
18143
    header="`echo $found | sed -e 's/:.*$//'`"
 
18144
    lib="`echo $found | sed -e 's/^.*://'`"
 
18145
 
 
18146
 
 
18147
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
18148
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
18149
    APRUTIL_INCLUDES="-I$header"
 
18150
  else
 
18151
    apr_addto_bugger="-I$header"
 
18152
    for i in $apr_addto_bugger; do
 
18153
      apr_addto_duplicate="0"
 
18154
      for j in $APRUTIL_INCLUDES; do
 
18155
        if test "x$i" = "x$j"; then
 
18156
          apr_addto_duplicate="1"
 
18157
          break
 
18158
        fi
 
18159
      done
 
18160
      if test $apr_addto_duplicate = "0"; then
 
18161
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
18162
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
18163
      fi
 
18164
    done
 
18165
  fi
 
18166
 
 
18167
 
 
18168
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
18169
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
18170
    APRUTIL_LDFLAGS="-L$lib"
 
18171
  else
 
18172
    apr_addto_bugger="-L$lib"
 
18173
    for i in $apr_addto_bugger; do
 
18174
      apr_addto_duplicate="0"
 
18175
      for j in $APRUTIL_LDFLAGS; do
 
18176
        if test "x$i" = "x$j"; then
 
18177
          apr_addto_duplicate="1"
 
18178
          break
 
18179
        fi
 
18180
      done
 
18181
      if test $apr_addto_duplicate = "0"; then
 
18182
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
18183
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
18184
      fi
 
18185
    done
 
18186
  fi
 
18187
 
 
18188
    apu_db_header=$bdb_header
 
18189
    apu_db_lib=$bdb_libname
 
18190
    apu_have_db=1
 
18191
    ;;
 
18192
  *)
 
18193
 
 
18194
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
18195
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
18196
    APRUTIL_INCLUDES="-I$found/include"
 
18197
  else
 
18198
    apr_addto_bugger="-I$found/include"
 
18199
    for i in $apr_addto_bugger; do
 
18200
      apr_addto_duplicate="0"
 
18201
      for j in $APRUTIL_INCLUDES; do
 
18202
        if test "x$i" = "x$j"; then
 
18203
          apr_addto_duplicate="1"
 
18204
          break
 
18205
        fi
 
18206
      done
 
18207
      if test $apr_addto_duplicate = "0"; then
 
18208
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
18209
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
18210
      fi
 
18211
    done
 
18212
  fi
 
18213
 
 
18214
 
 
18215
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
18216
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
18217
    APRUTIL_LDFLAGS="-L$found/lib"
 
18218
  else
 
18219
    apr_addto_bugger="-L$found/lib"
 
18220
    for i in $apr_addto_bugger; do
 
18221
      apr_addto_duplicate="0"
 
18222
      for j in $APRUTIL_LDFLAGS; do
 
18223
        if test "x$i" = "x$j"; then
 
18224
          apr_addto_duplicate="1"
 
18225
          break
 
18226
        fi
 
18227
      done
 
18228
      if test $apr_addto_duplicate = "0"; then
 
18229
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
18230
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
18231
      fi
 
18232
    done
 
18233
  fi
 
18234
 
 
18235
    apu_db_header=$bdb_header
 
18236
    apu_db_lib=$bdb_libname
 
18237
    apu_have_db=1
 
18238
    ;;
 
18239
  esac
 
18240
 
 
18241
  if test "$apu_have_db" = "1"; then
 
18242
    apu_db_version=3
 
18243
  fi
 
18244
 
 
18245
            if test "$apu_db_version" != "3"; then
 
18246
 
 
18247
  places="$all_places"
 
18248
  if test -z "$places"; then
 
18249
    places="std"
 
18250
  fi
 
18251
 
 
18252
  bdb_version=2
 
18253
  if test "-1" != "-1"; then
 
18254
    bdb_version="$bdb_version.-1"
 
18255
    if test "-1" != "-1"; then
 
18256
      bdb_version="$bdb_version.-1"
 
18257
    fi
 
18258
  fi
 
18259
  bdb_places="$places"
 
18260
  bdb_default_search_headers="db2/db.h db.h"
 
18261
  bdb_default_search_lib_names="db2 db"
 
18262
 
 
18263
 
 
18264
  apu_have_db=0
 
18265
 
 
18266
  # Save the original values of the flags we tweak.
 
18267
  apu_check_lib_save_libs="$LIBS"
 
18268
  apu_check_lib_save_ldflags="$LDFLAGS"
 
18269
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
18270
 
 
18271
  # The variable `found' is the prefix under which we've found
 
18272
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
18273
  found=not
 
18274
  for bdb_place in $bdb_places; do
 
18275
 
 
18276
    LDFLAGS="$apu_check_lib_save_ldflags"
 
18277
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
18278
    case "$bdb_place" in
 
18279
      "std" )
 
18280
        description="the standard places"
 
18281
      ;;
 
18282
      *":"* )
 
18283
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
18284
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
18285
        CPPFLAGS="$CPPFLAGS -I$header"
 
18286
        LDFLAGS="$LDFLAGS -L$lib"
 
18287
        description="$header and $lib"
 
18288
      ;;
 
18289
      * )
 
18290
        if test -d $bdb_place; then
 
18291
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
18292
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
18293
        else
 
18294
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
18295
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
18296
          echo "$as_me:$LINENO: result: directory not found" >&5
 
18297
echo "${ECHO_T}directory not found" >&6
 
18298
          continue
 
18299
        fi
 
18300
        description="$bdb_place"
 
18301
      ;;
 
18302
    esac
 
18303
 
 
18304
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
18305
    # trick to display a message instead.
 
18306
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
18307
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
18308
    echo "$as_me:$LINENO: result: " >&5
 
18309
echo "${ECHO_T}" >&6
 
18310
 
 
18311
    for bdb_libname in $bdb_default_search_lib_names; do
 
18312
      for bdb_header in $bdb_default_search_headers; do
 
18313
        # Clear the header cache variable for each location
 
18314
 
 
18315
        cache_id="`echo ac_cv_header_${bdb_header} \
 
18316
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
18317
 
 
18318
        unset $cache_id
 
18319
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
18320
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
18321
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
18322
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
18323
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
18324
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18325
fi
 
18326
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
18327
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
18328
else
 
18329
  # Is the header compilable?
 
18330
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
18331
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
18332
cat >conftest.$ac_ext <<_ACEOF
 
18333
/* confdefs.h.  */
 
18334
_ACEOF
 
18335
cat confdefs.h >>conftest.$ac_ext
 
18336
cat >>conftest.$ac_ext <<_ACEOF
 
18337
/* end confdefs.h.  */
 
18338
$ac_includes_default
 
18339
#include <$bdb_header>
 
18340
_ACEOF
 
18341
rm -f conftest.$ac_objext
 
18342
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
18343
  (eval $ac_compile) 2>conftest.er1
 
18344
  ac_status=$?
 
18345
  grep -v '^ *+' conftest.er1 >conftest.err
 
18346
  rm -f conftest.er1
 
18347
  cat conftest.err >&5
 
18348
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18349
  (exit $ac_status); } &&
 
18350
         { ac_try='test -z "$ac_c_werror_flag"
 
18351
                         || test ! -s conftest.err'
 
18352
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18353
  (eval $ac_try) 2>&5
 
18354
  ac_status=$?
 
18355
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18356
  (exit $ac_status); }; } &&
 
18357
         { ac_try='test -s conftest.$ac_objext'
 
18358
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18359
  (eval $ac_try) 2>&5
 
18360
  ac_status=$?
 
18361
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18362
  (exit $ac_status); }; }; then
 
18363
  ac_header_compiler=yes
 
18364
else
 
18365
  echo "$as_me: failed program was:" >&5
 
18366
sed 's/^/| /' conftest.$ac_ext >&5
 
18367
 
 
18368
ac_header_compiler=no
 
18369
fi
 
18370
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
18371
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
18372
echo "${ECHO_T}$ac_header_compiler" >&6
 
18373
 
 
18374
# Is the header present?
 
18375
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
18376
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
18377
cat >conftest.$ac_ext <<_ACEOF
 
18378
/* confdefs.h.  */
 
18379
_ACEOF
 
18380
cat confdefs.h >>conftest.$ac_ext
 
18381
cat >>conftest.$ac_ext <<_ACEOF
 
18382
/* end confdefs.h.  */
 
18383
#include <$bdb_header>
 
18384
_ACEOF
 
18385
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
18386
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
18387
  ac_status=$?
 
18388
  grep -v '^ *+' conftest.er1 >conftest.err
 
18389
  rm -f conftest.er1
 
18390
  cat conftest.err >&5
 
18391
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18392
  (exit $ac_status); } >/dev/null; then
 
18393
  if test -s conftest.err; then
 
18394
    ac_cpp_err=$ac_c_preproc_warn_flag
 
18395
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
18396
  else
 
18397
    ac_cpp_err=
 
18398
  fi
 
18399
else
 
18400
  ac_cpp_err=yes
 
18401
fi
 
18402
if test -z "$ac_cpp_err"; then
 
18403
  ac_header_preproc=yes
 
18404
else
 
18405
  echo "$as_me: failed program was:" >&5
 
18406
sed 's/^/| /' conftest.$ac_ext >&5
 
18407
 
 
18408
  ac_header_preproc=no
 
18409
fi
 
18410
rm -f conftest.err conftest.$ac_ext
 
18411
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
18412
echo "${ECHO_T}$ac_header_preproc" >&6
 
18413
 
 
18414
# So?  What about this header?
 
18415
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
18416
  yes:no: )
 
18417
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
18418
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
18419
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
18420
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
18421
    ac_header_preproc=yes
 
18422
    ;;
 
18423
  no:yes:* )
 
18424
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
18425
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
18426
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
18427
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
18428
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
18429
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
18430
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
18431
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
18432
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
18433
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
18434
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
18435
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
18436
    (
 
18437
      cat <<\_ASBOX
 
18438
## ------------------------------------------ ##
 
18439
## Report this to the AC_PACKAGE_NAME lists.  ##
 
18440
## ------------------------------------------ ##
 
18441
_ASBOX
 
18442
    ) |
 
18443
      sed "s/^/$as_me: WARNING:     /" >&2
 
18444
    ;;
 
18445
esac
 
18446
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
18447
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
18448
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
18449
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18450
else
 
18451
  eval "$as_ac_Header=\$ac_header_preproc"
 
18452
fi
 
18453
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
18454
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
18455
 
 
18456
fi
 
18457
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
18458
 
 
18459
          if test "2" = "3" -o "2" = "4"; then
 
18460
            # We generate a separate cache variable for each prefix and libname
 
18461
            # we search under.  That way, we avoid caching information that
 
18462
            # changes if the user runs `configure' with a different set of
 
18463
            # switches.
 
18464
 
 
18465
            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
18466
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
18467
 
 
18468
 
 
18469
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
18470
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
18471
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
18472
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18473
else
 
18474
 
 
18475
 
 
18476
    apu_try_berkeley_db_save_libs="$LIBS"
 
18477
 
 
18478
    apu_check_berkeley_db_major=2
 
18479
    apu_check_berkeley_db_minor=-1
 
18480
    apu_check_berkeley_db_patch=-1
 
18481
    apu_try_berkeley_db_header=$bdb_header
 
18482
    apu_try_berkeley_db_libname=$bdb_libname
 
18483
 
 
18484
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
18485
    if test "$cross_compiling" = yes; then
 
18486
  apu_try_berkeley_db=yes
 
18487
 
 
18488
else
 
18489
  cat >conftest.$ac_ext <<_ACEOF
 
18490
/* confdefs.h.  */
 
18491
_ACEOF
 
18492
cat confdefs.h >>conftest.$ac_ext
 
18493
cat >>conftest.$ac_ext <<_ACEOF
 
18494
/* end confdefs.h.  */
 
18495
 
 
18496
#include <stdio.h>
 
18497
#include <$apu_try_berkeley_db_header>
 
18498
main ()
 
18499
{
 
18500
  int major, minor, patch;
 
18501
 
 
18502
  db_version(&major, &minor, &patch);
 
18503
 
 
18504
  /* Sanity check: ensure that db.h constants actually match the db library */
 
18505
  if (major != DB_VERSION_MAJOR
 
18506
      || minor != DB_VERSION_MINOR
 
18507
      || patch != DB_VERSION_PATCH)
 
18508
    exit (1);
 
18509
 
 
18510
  /* Run-time check:  ensure the library claims to be the correct version. */
 
18511
 
 
18512
  if ($apu_check_berkeley_db_major != -1) {
 
18513
    if (major < $apu_check_berkeley_db_major)
 
18514
      exit (1);
 
18515
    if (major > $apu_check_berkeley_db_major)
 
18516
      exit (0);
 
18517
  }
 
18518
 
 
18519
  if ($apu_check_berkeley_db_minor != -1) {
 
18520
    if (minor < $apu_check_berkeley_db_minor)
 
18521
      exit (1);
 
18522
    if (minor > $apu_check_berkeley_db_minor)
 
18523
      exit (0);
 
18524
  }
 
18525
 
 
18526
  if ($apu_check_berkeley_db_patch == -1
 
18527
      || patch >= $apu_check_berkeley_db_patch)
 
18528
    exit (0);
 
18529
  else
 
18530
    exit (1);
 
18531
}
 
18532
 
 
18533
_ACEOF
 
18534
rm -f conftest$ac_exeext
 
18535
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
18536
  (eval $ac_link) 2>&5
 
18537
  ac_status=$?
 
18538
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18539
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
18540
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18541
  (eval $ac_try) 2>&5
 
18542
  ac_status=$?
 
18543
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18544
  (exit $ac_status); }; }; then
 
18545
  apu_try_berkeley_db=yes
 
18546
else
 
18547
  echo "$as_me: program exited with status $ac_status" >&5
 
18548
echo "$as_me: failed program was:" >&5
 
18549
sed 's/^/| /' conftest.$ac_ext >&5
 
18550
 
 
18551
( exit $ac_status )
 
18552
apu_try_berkeley_db=no
 
18553
fi
 
18554
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
18555
fi
 
18556
 
 
18557
    LIBS="$apu_try_berkeley_db_save_libs"
 
18558
 
 
18559
 
 
18560
                eval "$cache_id=$apu_try_berkeley_db"
 
18561
 
 
18562
fi
 
18563
 
 
18564
            result="`eval echo '$'$cache_id`"
 
18565
            echo "$as_me:$LINENO: result: $result" >&5
 
18566
echo "${ECHO_T}$result" >&6
 
18567
          elif test "2" = "1"; then
 
18568
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
18569
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
18570
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
18571
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
18572
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18573
else
 
18574
  ac_check_lib_save_LIBS=$LIBS
 
18575
LIBS="-l$bdb_libname  $LIBS"
 
18576
cat >conftest.$ac_ext <<_ACEOF
 
18577
/* confdefs.h.  */
 
18578
_ACEOF
 
18579
cat confdefs.h >>conftest.$ac_ext
 
18580
cat >>conftest.$ac_ext <<_ACEOF
 
18581
/* end confdefs.h.  */
 
18582
 
 
18583
/* Override any gcc2 internal prototype to avoid an error.  */
 
18584
#ifdef __cplusplus
 
18585
extern "C"
 
18586
#endif
 
18587
/* We use char because int might match the return type of a gcc2
 
18588
   builtin and then its argument prototype would still apply.  */
 
18589
char dbopen ();
 
18590
int
 
18591
main ()
 
18592
{
 
18593
dbopen ();
 
18594
  ;
 
18595
  return 0;
 
18596
}
 
18597
_ACEOF
 
18598
rm -f conftest.$ac_objext conftest$ac_exeext
 
18599
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
18600
  (eval $ac_link) 2>conftest.er1
 
18601
  ac_status=$?
 
18602
  grep -v '^ *+' conftest.er1 >conftest.err
 
18603
  rm -f conftest.er1
 
18604
  cat conftest.err >&5
 
18605
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18606
  (exit $ac_status); } &&
 
18607
         { ac_try='test -z "$ac_c_werror_flag"
 
18608
                         || test ! -s conftest.err'
 
18609
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18610
  (eval $ac_try) 2>&5
 
18611
  ac_status=$?
 
18612
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18613
  (exit $ac_status); }; } &&
 
18614
         { ac_try='test -s conftest$ac_exeext'
 
18615
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18616
  (eval $ac_try) 2>&5
 
18617
  ac_status=$?
 
18618
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18619
  (exit $ac_status); }; }; then
 
18620
  eval "$as_ac_Lib=yes"
 
18621
else
 
18622
  echo "$as_me: failed program was:" >&5
 
18623
sed 's/^/| /' conftest.$ac_ext >&5
 
18624
 
 
18625
eval "$as_ac_Lib=no"
 
18626
fi
 
18627
rm -f conftest.err conftest.$ac_objext \
 
18628
      conftest$ac_exeext conftest.$ac_ext
 
18629
LIBS=$ac_check_lib_save_LIBS
 
18630
fi
 
18631
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
18632
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
18633
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
18634
  result=yes
 
18635
else
 
18636
  result=no
 
18637
 
 
18638
fi
 
18639
 
 
18640
          elif test "2" = "2"; then
 
18641
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
18642
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
18643
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
18644
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
18645
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18646
else
 
18647
  ac_check_lib_save_LIBS=$LIBS
 
18648
LIBS="-l$bdb_libname  $LIBS"
 
18649
cat >conftest.$ac_ext <<_ACEOF
 
18650
/* confdefs.h.  */
 
18651
_ACEOF
 
18652
cat confdefs.h >>conftest.$ac_ext
 
18653
cat >>conftest.$ac_ext <<_ACEOF
 
18654
/* end confdefs.h.  */
 
18655
 
 
18656
/* Override any gcc2 internal prototype to avoid an error.  */
 
18657
#ifdef __cplusplus
 
18658
extern "C"
 
18659
#endif
 
18660
/* We use char because int might match the return type of a gcc2
 
18661
   builtin and then its argument prototype would still apply.  */
 
18662
char db_open ();
 
18663
int
 
18664
main ()
 
18665
{
 
18666
db_open ();
 
18667
  ;
 
18668
  return 0;
 
18669
}
 
18670
_ACEOF
 
18671
rm -f conftest.$ac_objext conftest$ac_exeext
 
18672
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
18673
  (eval $ac_link) 2>conftest.er1
 
18674
  ac_status=$?
 
18675
  grep -v '^ *+' conftest.er1 >conftest.err
 
18676
  rm -f conftest.er1
 
18677
  cat conftest.err >&5
 
18678
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18679
  (exit $ac_status); } &&
 
18680
         { ac_try='test -z "$ac_c_werror_flag"
 
18681
                         || test ! -s conftest.err'
 
18682
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18683
  (eval $ac_try) 2>&5
 
18684
  ac_status=$?
 
18685
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18686
  (exit $ac_status); }; } &&
 
18687
         { ac_try='test -s conftest$ac_exeext'
 
18688
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18689
  (eval $ac_try) 2>&5
 
18690
  ac_status=$?
 
18691
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18692
  (exit $ac_status); }; }; then
 
18693
  eval "$as_ac_Lib=yes"
 
18694
else
 
18695
  echo "$as_me: failed program was:" >&5
 
18696
sed 's/^/| /' conftest.$ac_ext >&5
 
18697
 
 
18698
eval "$as_ac_Lib=no"
 
18699
fi
 
18700
rm -f conftest.err conftest.$ac_objext \
 
18701
      conftest$ac_exeext conftest.$ac_ext
 
18702
LIBS=$ac_check_lib_save_LIBS
 
18703
fi
 
18704
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
18705
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
18706
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
18707
  result=yes
 
18708
else
 
18709
  result=no
 
18710
 
 
18711
fi
 
18712
 
 
18713
          fi
 
18714
 
 
18715
else
 
18716
  result="no"
 
18717
fi
 
18718
 
 
18719
 
 
18720
 
 
18721
        # If we found it, no need to search any more.
 
18722
        if test "$result" = "yes"; then
 
18723
          found="$bdb_place"
 
18724
          break
 
18725
        fi
 
18726
      done
 
18727
      test "$found" != "not" && break
 
18728
    done
 
18729
    test "$found" != "not" && break
 
18730
  done
 
18731
 
 
18732
  # Restore the original values of the flags we tweak.
 
18733
  LDFLAGS="$apu_check_lib_save_ldflags"
 
18734
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
18735
 
 
18736
  case "$found" in
 
18737
  "not")
 
18738
    apu_have_db=0
 
18739
    ;;
 
18740
  "std")
 
18741
    apu_db_header=$bdb_header
 
18742
    apu_db_lib=$bdb_libname
 
18743
    apu_have_db=1
 
18744
    ;;
 
18745
  *":"*)
 
18746
    header="`echo $found | sed -e 's/:.*$//'`"
 
18747
    lib="`echo $found | sed -e 's/^.*://'`"
 
18748
 
 
18749
 
 
18750
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
18751
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
18752
    APRUTIL_INCLUDES="-I$header"
 
18753
  else
 
18754
    apr_addto_bugger="-I$header"
 
18755
    for i in $apr_addto_bugger; do
 
18756
      apr_addto_duplicate="0"
 
18757
      for j in $APRUTIL_INCLUDES; do
 
18758
        if test "x$i" = "x$j"; then
 
18759
          apr_addto_duplicate="1"
 
18760
          break
 
18761
        fi
 
18762
      done
 
18763
      if test $apr_addto_duplicate = "0"; then
 
18764
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
18765
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
18766
      fi
 
18767
    done
 
18768
  fi
 
18769
 
 
18770
 
 
18771
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
18772
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
18773
    APRUTIL_LDFLAGS="-L$lib"
 
18774
  else
 
18775
    apr_addto_bugger="-L$lib"
 
18776
    for i in $apr_addto_bugger; do
 
18777
      apr_addto_duplicate="0"
 
18778
      for j in $APRUTIL_LDFLAGS; do
 
18779
        if test "x$i" = "x$j"; then
 
18780
          apr_addto_duplicate="1"
 
18781
          break
 
18782
        fi
 
18783
      done
 
18784
      if test $apr_addto_duplicate = "0"; then
 
18785
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
18786
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
18787
      fi
 
18788
    done
 
18789
  fi
 
18790
 
 
18791
    apu_db_header=$bdb_header
 
18792
    apu_db_lib=$bdb_libname
 
18793
    apu_have_db=1
 
18794
    ;;
 
18795
  *)
 
18796
 
 
18797
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
18798
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
18799
    APRUTIL_INCLUDES="-I$found/include"
 
18800
  else
 
18801
    apr_addto_bugger="-I$found/include"
 
18802
    for i in $apr_addto_bugger; do
 
18803
      apr_addto_duplicate="0"
 
18804
      for j in $APRUTIL_INCLUDES; do
 
18805
        if test "x$i" = "x$j"; then
 
18806
          apr_addto_duplicate="1"
 
18807
          break
 
18808
        fi
 
18809
      done
 
18810
      if test $apr_addto_duplicate = "0"; then
 
18811
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
18812
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
18813
      fi
 
18814
    done
 
18815
  fi
 
18816
 
 
18817
 
 
18818
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
18819
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
18820
    APRUTIL_LDFLAGS="-L$found/lib"
 
18821
  else
 
18822
    apr_addto_bugger="-L$found/lib"
 
18823
    for i in $apr_addto_bugger; do
 
18824
      apr_addto_duplicate="0"
 
18825
      for j in $APRUTIL_LDFLAGS; do
 
18826
        if test "x$i" = "x$j"; then
 
18827
          apr_addto_duplicate="1"
 
18828
          break
 
18829
        fi
 
18830
      done
 
18831
      if test $apr_addto_duplicate = "0"; then
 
18832
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
18833
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
18834
      fi
 
18835
    done
 
18836
  fi
 
18837
 
 
18838
    apu_db_header=$bdb_header
 
18839
    apu_db_lib=$bdb_libname
 
18840
    apu_have_db=1
 
18841
    ;;
 
18842
  esac
 
18843
 
 
18844
  if test "$apu_have_db" = "1"; then
 
18845
    apu_db_version=2
 
18846
  fi
 
18847
 
 
18848
              if test "$apu_db_version" != "2"; then
 
18849
 
 
18850
  places="$all_places"
 
18851
  if test -z "$places"; then
 
18852
    places="std"
 
18853
  fi
 
18854
 
 
18855
  bdb_version=1
 
18856
  if test "0" != "-1"; then
 
18857
    bdb_version="$bdb_version.0"
 
18858
    if test "0" != "-1"; then
 
18859
      bdb_version="$bdb_version.0"
 
18860
    fi
 
18861
  fi
 
18862
  bdb_places="$places"
 
18863
  bdb_default_search_headers="db1/db.h db.h"
 
18864
  bdb_default_search_lib_names="db1"
 
18865
 
 
18866
 
 
18867
  apu_have_db=0
 
18868
 
 
18869
  # Save the original values of the flags we tweak.
 
18870
  apu_check_lib_save_libs="$LIBS"
 
18871
  apu_check_lib_save_ldflags="$LDFLAGS"
 
18872
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
18873
 
 
18874
  # The variable `found' is the prefix under which we've found
 
18875
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
18876
  found=not
 
18877
  for bdb_place in $bdb_places; do
 
18878
 
 
18879
    LDFLAGS="$apu_check_lib_save_ldflags"
 
18880
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
18881
    case "$bdb_place" in
 
18882
      "std" )
 
18883
        description="the standard places"
 
18884
      ;;
 
18885
      *":"* )
 
18886
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
18887
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
18888
        CPPFLAGS="$CPPFLAGS -I$header"
 
18889
        LDFLAGS="$LDFLAGS -L$lib"
 
18890
        description="$header and $lib"
 
18891
      ;;
 
18892
      * )
 
18893
        if test -d $bdb_place; then
 
18894
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
18895
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
18896
        else
 
18897
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
18898
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
18899
          echo "$as_me:$LINENO: result: directory not found" >&5
 
18900
echo "${ECHO_T}directory not found" >&6
 
18901
          continue
 
18902
        fi
 
18903
        description="$bdb_place"
 
18904
      ;;
 
18905
    esac
 
18906
 
 
18907
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
18908
    # trick to display a message instead.
 
18909
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
18910
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
18911
    echo "$as_me:$LINENO: result: " >&5
 
18912
echo "${ECHO_T}" >&6
 
18913
 
 
18914
    for bdb_libname in $bdb_default_search_lib_names; do
 
18915
      for bdb_header in $bdb_default_search_headers; do
 
18916
        # Clear the header cache variable for each location
 
18917
 
 
18918
        cache_id="`echo ac_cv_header_${bdb_header} \
 
18919
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
18920
 
 
18921
        unset $cache_id
 
18922
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
18923
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
18924
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
18925
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
18926
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
18927
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
18928
fi
 
18929
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
18930
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
18931
else
 
18932
  # Is the header compilable?
 
18933
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
18934
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
18935
cat >conftest.$ac_ext <<_ACEOF
 
18936
/* confdefs.h.  */
 
18937
_ACEOF
 
18938
cat confdefs.h >>conftest.$ac_ext
 
18939
cat >>conftest.$ac_ext <<_ACEOF
 
18940
/* end confdefs.h.  */
 
18941
$ac_includes_default
 
18942
#include <$bdb_header>
 
18943
_ACEOF
 
18944
rm -f conftest.$ac_objext
 
18945
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
18946
  (eval $ac_compile) 2>conftest.er1
 
18947
  ac_status=$?
 
18948
  grep -v '^ *+' conftest.er1 >conftest.err
 
18949
  rm -f conftest.er1
 
18950
  cat conftest.err >&5
 
18951
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18952
  (exit $ac_status); } &&
 
18953
         { ac_try='test -z "$ac_c_werror_flag"
 
18954
                         || test ! -s conftest.err'
 
18955
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18956
  (eval $ac_try) 2>&5
 
18957
  ac_status=$?
 
18958
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18959
  (exit $ac_status); }; } &&
 
18960
         { ac_try='test -s conftest.$ac_objext'
 
18961
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
18962
  (eval $ac_try) 2>&5
 
18963
  ac_status=$?
 
18964
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18965
  (exit $ac_status); }; }; then
 
18966
  ac_header_compiler=yes
 
18967
else
 
18968
  echo "$as_me: failed program was:" >&5
 
18969
sed 's/^/| /' conftest.$ac_ext >&5
 
18970
 
 
18971
ac_header_compiler=no
 
18972
fi
 
18973
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
18974
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
18975
echo "${ECHO_T}$ac_header_compiler" >&6
 
18976
 
 
18977
# Is the header present?
 
18978
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
18979
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
18980
cat >conftest.$ac_ext <<_ACEOF
 
18981
/* confdefs.h.  */
 
18982
_ACEOF
 
18983
cat confdefs.h >>conftest.$ac_ext
 
18984
cat >>conftest.$ac_ext <<_ACEOF
 
18985
/* end confdefs.h.  */
 
18986
#include <$bdb_header>
 
18987
_ACEOF
 
18988
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
18989
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
18990
  ac_status=$?
 
18991
  grep -v '^ *+' conftest.er1 >conftest.err
 
18992
  rm -f conftest.er1
 
18993
  cat conftest.err >&5
 
18994
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
18995
  (exit $ac_status); } >/dev/null; then
 
18996
  if test -s conftest.err; then
 
18997
    ac_cpp_err=$ac_c_preproc_warn_flag
 
18998
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
18999
  else
 
19000
    ac_cpp_err=
 
19001
  fi
 
19002
else
 
19003
  ac_cpp_err=yes
 
19004
fi
 
19005
if test -z "$ac_cpp_err"; then
 
19006
  ac_header_preproc=yes
 
19007
else
 
19008
  echo "$as_me: failed program was:" >&5
 
19009
sed 's/^/| /' conftest.$ac_ext >&5
 
19010
 
 
19011
  ac_header_preproc=no
 
19012
fi
 
19013
rm -f conftest.err conftest.$ac_ext
 
19014
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
19015
echo "${ECHO_T}$ac_header_preproc" >&6
 
19016
 
 
19017
# So?  What about this header?
 
19018
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
19019
  yes:no: )
 
19020
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
19021
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
19022
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
19023
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
19024
    ac_header_preproc=yes
 
19025
    ;;
 
19026
  no:yes:* )
 
19027
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
19028
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
19029
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
19030
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
19031
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
19032
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
19033
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
19034
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
19035
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
19036
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
19037
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
19038
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
19039
    (
 
19040
      cat <<\_ASBOX
 
19041
## ------------------------------------------ ##
 
19042
## Report this to the AC_PACKAGE_NAME lists.  ##
 
19043
## ------------------------------------------ ##
 
19044
_ASBOX
 
19045
    ) |
 
19046
      sed "s/^/$as_me: WARNING:     /" >&2
 
19047
    ;;
 
19048
esac
 
19049
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
19050
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
19051
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
19052
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19053
else
 
19054
  eval "$as_ac_Header=\$ac_header_preproc"
 
19055
fi
 
19056
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
19057
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
19058
 
 
19059
fi
 
19060
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
19061
 
 
19062
          if test "1" = "3" -o "1" = "4"; then
 
19063
            # We generate a separate cache variable for each prefix and libname
 
19064
            # we search under.  That way, we avoid caching information that
 
19065
            # changes if the user runs `configure' with a different set of
 
19066
            # switches.
 
19067
 
 
19068
            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
19069
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
19070
 
 
19071
 
 
19072
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
19073
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
19074
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
19075
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19076
else
 
19077
 
 
19078
 
 
19079
    apu_try_berkeley_db_save_libs="$LIBS"
 
19080
 
 
19081
    apu_check_berkeley_db_major=1
 
19082
    apu_check_berkeley_db_minor=0
 
19083
    apu_check_berkeley_db_patch=0
 
19084
    apu_try_berkeley_db_header=$bdb_header
 
19085
    apu_try_berkeley_db_libname=$bdb_libname
 
19086
 
 
19087
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
19088
    if test "$cross_compiling" = yes; then
 
19089
  apu_try_berkeley_db=yes
 
19090
 
 
19091
else
 
19092
  cat >conftest.$ac_ext <<_ACEOF
 
19093
/* confdefs.h.  */
 
19094
_ACEOF
 
19095
cat confdefs.h >>conftest.$ac_ext
 
19096
cat >>conftest.$ac_ext <<_ACEOF
 
19097
/* end confdefs.h.  */
 
19098
 
 
19099
#include <stdio.h>
 
19100
#include <$apu_try_berkeley_db_header>
 
19101
main ()
 
19102
{
 
19103
  int major, minor, patch;
 
19104
 
 
19105
  db_version(&major, &minor, &patch);
 
19106
 
 
19107
  /* Sanity check: ensure that db.h constants actually match the db library */
 
19108
  if (major != DB_VERSION_MAJOR
 
19109
      || minor != DB_VERSION_MINOR
 
19110
      || patch != DB_VERSION_PATCH)
 
19111
    exit (1);
 
19112
 
 
19113
  /* Run-time check:  ensure the library claims to be the correct version. */
 
19114
 
 
19115
  if ($apu_check_berkeley_db_major != -1) {
 
19116
    if (major < $apu_check_berkeley_db_major)
 
19117
      exit (1);
 
19118
    if (major > $apu_check_berkeley_db_major)
 
19119
      exit (0);
 
19120
  }
 
19121
 
 
19122
  if ($apu_check_berkeley_db_minor != -1) {
 
19123
    if (minor < $apu_check_berkeley_db_minor)
 
19124
      exit (1);
 
19125
    if (minor > $apu_check_berkeley_db_minor)
 
19126
      exit (0);
 
19127
  }
 
19128
 
 
19129
  if ($apu_check_berkeley_db_patch == -1
 
19130
      || patch >= $apu_check_berkeley_db_patch)
 
19131
    exit (0);
 
19132
  else
 
19133
    exit (1);
 
19134
}
 
19135
 
 
19136
_ACEOF
 
19137
rm -f conftest$ac_exeext
 
19138
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
19139
  (eval $ac_link) 2>&5
 
19140
  ac_status=$?
 
19141
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19142
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
19143
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19144
  (eval $ac_try) 2>&5
 
19145
  ac_status=$?
 
19146
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19147
  (exit $ac_status); }; }; then
 
19148
  apu_try_berkeley_db=yes
 
19149
else
 
19150
  echo "$as_me: program exited with status $ac_status" >&5
 
19151
echo "$as_me: failed program was:" >&5
 
19152
sed 's/^/| /' conftest.$ac_ext >&5
 
19153
 
 
19154
( exit $ac_status )
 
19155
apu_try_berkeley_db=no
 
19156
fi
 
19157
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
19158
fi
 
19159
 
 
19160
    LIBS="$apu_try_berkeley_db_save_libs"
 
19161
 
 
19162
 
 
19163
                eval "$cache_id=$apu_try_berkeley_db"
 
19164
 
 
19165
fi
 
19166
 
 
19167
            result="`eval echo '$'$cache_id`"
 
19168
            echo "$as_me:$LINENO: result: $result" >&5
 
19169
echo "${ECHO_T}$result" >&6
 
19170
          elif test "1" = "1"; then
 
19171
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
19172
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
19173
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
19174
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
19175
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19176
else
 
19177
  ac_check_lib_save_LIBS=$LIBS
 
19178
LIBS="-l$bdb_libname  $LIBS"
 
19179
cat >conftest.$ac_ext <<_ACEOF
 
19180
/* confdefs.h.  */
 
19181
_ACEOF
 
19182
cat confdefs.h >>conftest.$ac_ext
 
19183
cat >>conftest.$ac_ext <<_ACEOF
 
19184
/* end confdefs.h.  */
 
19185
 
 
19186
/* Override any gcc2 internal prototype to avoid an error.  */
 
19187
#ifdef __cplusplus
 
19188
extern "C"
 
19189
#endif
 
19190
/* We use char because int might match the return type of a gcc2
 
19191
   builtin and then its argument prototype would still apply.  */
 
19192
char dbopen ();
 
19193
int
 
19194
main ()
 
19195
{
 
19196
dbopen ();
 
19197
  ;
 
19198
  return 0;
 
19199
}
 
19200
_ACEOF
 
19201
rm -f conftest.$ac_objext conftest$ac_exeext
 
19202
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
19203
  (eval $ac_link) 2>conftest.er1
 
19204
  ac_status=$?
 
19205
  grep -v '^ *+' conftest.er1 >conftest.err
 
19206
  rm -f conftest.er1
 
19207
  cat conftest.err >&5
 
19208
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19209
  (exit $ac_status); } &&
 
19210
         { ac_try='test -z "$ac_c_werror_flag"
 
19211
                         || test ! -s conftest.err'
 
19212
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19213
  (eval $ac_try) 2>&5
 
19214
  ac_status=$?
 
19215
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19216
  (exit $ac_status); }; } &&
 
19217
         { ac_try='test -s conftest$ac_exeext'
 
19218
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19219
  (eval $ac_try) 2>&5
 
19220
  ac_status=$?
 
19221
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19222
  (exit $ac_status); }; }; then
 
19223
  eval "$as_ac_Lib=yes"
 
19224
else
 
19225
  echo "$as_me: failed program was:" >&5
 
19226
sed 's/^/| /' conftest.$ac_ext >&5
 
19227
 
 
19228
eval "$as_ac_Lib=no"
 
19229
fi
 
19230
rm -f conftest.err conftest.$ac_objext \
 
19231
      conftest$ac_exeext conftest.$ac_ext
 
19232
LIBS=$ac_check_lib_save_LIBS
 
19233
fi
 
19234
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
19235
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
19236
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
19237
  result=yes
 
19238
else
 
19239
  result=no
 
19240
 
 
19241
fi
 
19242
 
 
19243
          elif test "1" = "2"; then
 
19244
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
19245
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
19246
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
19247
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
19248
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19249
else
 
19250
  ac_check_lib_save_LIBS=$LIBS
 
19251
LIBS="-l$bdb_libname  $LIBS"
 
19252
cat >conftest.$ac_ext <<_ACEOF
 
19253
/* confdefs.h.  */
 
19254
_ACEOF
 
19255
cat confdefs.h >>conftest.$ac_ext
 
19256
cat >>conftest.$ac_ext <<_ACEOF
 
19257
/* end confdefs.h.  */
 
19258
 
 
19259
/* Override any gcc2 internal prototype to avoid an error.  */
 
19260
#ifdef __cplusplus
 
19261
extern "C"
 
19262
#endif
 
19263
/* We use char because int might match the return type of a gcc2
 
19264
   builtin and then its argument prototype would still apply.  */
 
19265
char db_open ();
 
19266
int
 
19267
main ()
 
19268
{
 
19269
db_open ();
 
19270
  ;
 
19271
  return 0;
 
19272
}
 
19273
_ACEOF
 
19274
rm -f conftest.$ac_objext conftest$ac_exeext
 
19275
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
19276
  (eval $ac_link) 2>conftest.er1
 
19277
  ac_status=$?
 
19278
  grep -v '^ *+' conftest.er1 >conftest.err
 
19279
  rm -f conftest.er1
 
19280
  cat conftest.err >&5
 
19281
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19282
  (exit $ac_status); } &&
 
19283
         { ac_try='test -z "$ac_c_werror_flag"
 
19284
                         || test ! -s conftest.err'
 
19285
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19286
  (eval $ac_try) 2>&5
 
19287
  ac_status=$?
 
19288
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19289
  (exit $ac_status); }; } &&
 
19290
         { ac_try='test -s conftest$ac_exeext'
 
19291
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19292
  (eval $ac_try) 2>&5
 
19293
  ac_status=$?
 
19294
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19295
  (exit $ac_status); }; }; then
 
19296
  eval "$as_ac_Lib=yes"
 
19297
else
 
19298
  echo "$as_me: failed program was:" >&5
 
19299
sed 's/^/| /' conftest.$ac_ext >&5
 
19300
 
 
19301
eval "$as_ac_Lib=no"
 
19302
fi
 
19303
rm -f conftest.err conftest.$ac_objext \
 
19304
      conftest$ac_exeext conftest.$ac_ext
 
19305
LIBS=$ac_check_lib_save_LIBS
 
19306
fi
 
19307
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
19308
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
19309
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
19310
  result=yes
 
19311
else
 
19312
  result=no
 
19313
 
 
19314
fi
 
19315
 
 
19316
          fi
 
19317
 
 
19318
else
 
19319
  result="no"
 
19320
fi
 
19321
 
 
19322
 
 
19323
 
 
19324
        # If we found it, no need to search any more.
 
19325
        if test "$result" = "yes"; then
 
19326
          found="$bdb_place"
 
19327
          break
 
19328
        fi
 
19329
      done
 
19330
      test "$found" != "not" && break
 
19331
    done
 
19332
    test "$found" != "not" && break
 
19333
  done
 
19334
 
 
19335
  # Restore the original values of the flags we tweak.
 
19336
  LDFLAGS="$apu_check_lib_save_ldflags"
 
19337
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
19338
 
 
19339
  case "$found" in
 
19340
  "not")
 
19341
    apu_have_db=0
 
19342
    ;;
 
19343
  "std")
 
19344
    apu_db_header=$bdb_header
 
19345
    apu_db_lib=$bdb_libname
 
19346
    apu_have_db=1
 
19347
    ;;
 
19348
  *":"*)
 
19349
    header="`echo $found | sed -e 's/:.*$//'`"
 
19350
    lib="`echo $found | sed -e 's/^.*://'`"
 
19351
 
 
19352
 
 
19353
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
19354
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
19355
    APRUTIL_INCLUDES="-I$header"
 
19356
  else
 
19357
    apr_addto_bugger="-I$header"
 
19358
    for i in $apr_addto_bugger; do
 
19359
      apr_addto_duplicate="0"
 
19360
      for j in $APRUTIL_INCLUDES; do
 
19361
        if test "x$i" = "x$j"; then
 
19362
          apr_addto_duplicate="1"
 
19363
          break
 
19364
        fi
 
19365
      done
 
19366
      if test $apr_addto_duplicate = "0"; then
 
19367
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
19368
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
19369
      fi
 
19370
    done
 
19371
  fi
 
19372
 
 
19373
 
 
19374
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
19375
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
19376
    APRUTIL_LDFLAGS="-L$lib"
 
19377
  else
 
19378
    apr_addto_bugger="-L$lib"
 
19379
    for i in $apr_addto_bugger; do
 
19380
      apr_addto_duplicate="0"
 
19381
      for j in $APRUTIL_LDFLAGS; do
 
19382
        if test "x$i" = "x$j"; then
 
19383
          apr_addto_duplicate="1"
 
19384
          break
 
19385
        fi
 
19386
      done
 
19387
      if test $apr_addto_duplicate = "0"; then
 
19388
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
19389
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
19390
      fi
 
19391
    done
 
19392
  fi
 
19393
 
 
19394
    apu_db_header=$bdb_header
 
19395
    apu_db_lib=$bdb_libname
 
19396
    apu_have_db=1
 
19397
    ;;
 
19398
  *)
 
19399
 
 
19400
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
19401
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
19402
    APRUTIL_INCLUDES="-I$found/include"
 
19403
  else
 
19404
    apr_addto_bugger="-I$found/include"
 
19405
    for i in $apr_addto_bugger; do
 
19406
      apr_addto_duplicate="0"
 
19407
      for j in $APRUTIL_INCLUDES; do
 
19408
        if test "x$i" = "x$j"; then
 
19409
          apr_addto_duplicate="1"
 
19410
          break
 
19411
        fi
 
19412
      done
 
19413
      if test $apr_addto_duplicate = "0"; then
 
19414
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
19415
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
19416
      fi
 
19417
    done
 
19418
  fi
 
19419
 
 
19420
 
 
19421
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
19422
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
19423
    APRUTIL_LDFLAGS="-L$found/lib"
 
19424
  else
 
19425
    apr_addto_bugger="-L$found/lib"
 
19426
    for i in $apr_addto_bugger; do
 
19427
      apr_addto_duplicate="0"
 
19428
      for j in $APRUTIL_LDFLAGS; do
 
19429
        if test "x$i" = "x$j"; then
 
19430
          apr_addto_duplicate="1"
 
19431
          break
 
19432
        fi
 
19433
      done
 
19434
      if test $apr_addto_duplicate = "0"; then
 
19435
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
19436
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
19437
      fi
 
19438
    done
 
19439
  fi
 
19440
 
 
19441
    apu_db_header=$bdb_header
 
19442
    apu_db_lib=$bdb_libname
 
19443
    apu_have_db=1
 
19444
    ;;
 
19445
  esac
 
19446
 
 
19447
  if test "$apu_have_db" = "1"; then
 
19448
    apu_db_version=1
 
19449
  fi
 
19450
 
 
19451
                if test "$apu_db_version" != "1"; then
 
19452
 
 
19453
  places="$all_places"
 
19454
  if test -z "$places"; then
 
19455
    places="std"
 
19456
  fi
 
19457
 
 
19458
  bdb_version=1
 
19459
  if test "-1" != "-1"; then
 
19460
    bdb_version="$bdb_version.-1"
 
19461
    if test "-1" != "-1"; then
 
19462
      bdb_version="$bdb_version.-1"
 
19463
    fi
 
19464
  fi
 
19465
  bdb_places="$places"
 
19466
  bdb_default_search_headers="db_185.h"
 
19467
  bdb_default_search_lib_names="db"
 
19468
 
 
19469
 
 
19470
  apu_have_db=0
 
19471
 
 
19472
  # Save the original values of the flags we tweak.
 
19473
  apu_check_lib_save_libs="$LIBS"
 
19474
  apu_check_lib_save_ldflags="$LDFLAGS"
 
19475
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
19476
 
 
19477
  # The variable `found' is the prefix under which we've found
 
19478
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
19479
  found=not
 
19480
  for bdb_place in $bdb_places; do
 
19481
 
 
19482
    LDFLAGS="$apu_check_lib_save_ldflags"
 
19483
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
19484
    case "$bdb_place" in
 
19485
      "std" )
 
19486
        description="the standard places"
 
19487
      ;;
 
19488
      *":"* )
 
19489
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
19490
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
19491
        CPPFLAGS="$CPPFLAGS -I$header"
 
19492
        LDFLAGS="$LDFLAGS -L$lib"
 
19493
        description="$header and $lib"
 
19494
      ;;
 
19495
      * )
 
19496
        if test -d $bdb_place; then
 
19497
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
19498
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
19499
        else
 
19500
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
19501
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
19502
          echo "$as_me:$LINENO: result: directory not found" >&5
 
19503
echo "${ECHO_T}directory not found" >&6
 
19504
          continue
 
19505
        fi
 
19506
        description="$bdb_place"
 
19507
      ;;
 
19508
    esac
 
19509
 
 
19510
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
19511
    # trick to display a message instead.
 
19512
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
19513
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
19514
    echo "$as_me:$LINENO: result: " >&5
 
19515
echo "${ECHO_T}" >&6
 
19516
 
 
19517
    for bdb_libname in $bdb_default_search_lib_names; do
 
19518
      for bdb_header in $bdb_default_search_headers; do
 
19519
        # Clear the header cache variable for each location
 
19520
 
 
19521
        cache_id="`echo ac_cv_header_${bdb_header} \
 
19522
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
19523
 
 
19524
        unset $cache_id
 
19525
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
19526
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
19527
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
19528
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
19529
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
19530
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19531
fi
 
19532
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
19533
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
19534
else
 
19535
  # Is the header compilable?
 
19536
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
19537
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
19538
cat >conftest.$ac_ext <<_ACEOF
 
19539
/* confdefs.h.  */
 
19540
_ACEOF
 
19541
cat confdefs.h >>conftest.$ac_ext
 
19542
cat >>conftest.$ac_ext <<_ACEOF
 
19543
/* end confdefs.h.  */
 
19544
$ac_includes_default
 
19545
#include <$bdb_header>
 
19546
_ACEOF
 
19547
rm -f conftest.$ac_objext
 
19548
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
19549
  (eval $ac_compile) 2>conftest.er1
 
19550
  ac_status=$?
 
19551
  grep -v '^ *+' conftest.er1 >conftest.err
 
19552
  rm -f conftest.er1
 
19553
  cat conftest.err >&5
 
19554
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19555
  (exit $ac_status); } &&
 
19556
         { ac_try='test -z "$ac_c_werror_flag"
 
19557
                         || test ! -s conftest.err'
 
19558
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19559
  (eval $ac_try) 2>&5
 
19560
  ac_status=$?
 
19561
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19562
  (exit $ac_status); }; } &&
 
19563
         { ac_try='test -s conftest.$ac_objext'
 
19564
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19565
  (eval $ac_try) 2>&5
 
19566
  ac_status=$?
 
19567
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19568
  (exit $ac_status); }; }; then
 
19569
  ac_header_compiler=yes
 
19570
else
 
19571
  echo "$as_me: failed program was:" >&5
 
19572
sed 's/^/| /' conftest.$ac_ext >&5
 
19573
 
 
19574
ac_header_compiler=no
 
19575
fi
 
19576
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
19577
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
19578
echo "${ECHO_T}$ac_header_compiler" >&6
 
19579
 
 
19580
# Is the header present?
 
19581
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
19582
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
19583
cat >conftest.$ac_ext <<_ACEOF
 
19584
/* confdefs.h.  */
 
19585
_ACEOF
 
19586
cat confdefs.h >>conftest.$ac_ext
 
19587
cat >>conftest.$ac_ext <<_ACEOF
 
19588
/* end confdefs.h.  */
 
19589
#include <$bdb_header>
 
19590
_ACEOF
 
19591
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
19592
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
19593
  ac_status=$?
 
19594
  grep -v '^ *+' conftest.er1 >conftest.err
 
19595
  rm -f conftest.er1
 
19596
  cat conftest.err >&5
 
19597
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19598
  (exit $ac_status); } >/dev/null; then
 
19599
  if test -s conftest.err; then
 
19600
    ac_cpp_err=$ac_c_preproc_warn_flag
 
19601
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
19602
  else
 
19603
    ac_cpp_err=
 
19604
  fi
 
19605
else
 
19606
  ac_cpp_err=yes
 
19607
fi
 
19608
if test -z "$ac_cpp_err"; then
 
19609
  ac_header_preproc=yes
 
19610
else
 
19611
  echo "$as_me: failed program was:" >&5
 
19612
sed 's/^/| /' conftest.$ac_ext >&5
 
19613
 
 
19614
  ac_header_preproc=no
 
19615
fi
 
19616
rm -f conftest.err conftest.$ac_ext
 
19617
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
19618
echo "${ECHO_T}$ac_header_preproc" >&6
 
19619
 
 
19620
# So?  What about this header?
 
19621
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
19622
  yes:no: )
 
19623
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
19624
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
19625
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
19626
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
19627
    ac_header_preproc=yes
 
19628
    ;;
 
19629
  no:yes:* )
 
19630
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
19631
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
19632
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
19633
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
19634
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
19635
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
19636
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
19637
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
19638
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
19639
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
19640
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
19641
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
19642
    (
 
19643
      cat <<\_ASBOX
 
19644
## ------------------------------------------ ##
 
19645
## Report this to the AC_PACKAGE_NAME lists.  ##
 
19646
## ------------------------------------------ ##
 
19647
_ASBOX
 
19648
    ) |
 
19649
      sed "s/^/$as_me: WARNING:     /" >&2
 
19650
    ;;
 
19651
esac
 
19652
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
19653
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
19654
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
19655
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19656
else
 
19657
  eval "$as_ac_Header=\$ac_header_preproc"
 
19658
fi
 
19659
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
19660
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
19661
 
 
19662
fi
 
19663
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
19664
 
 
19665
          if test "1" = "3" -o "1" = "4"; then
 
19666
            # We generate a separate cache variable for each prefix and libname
 
19667
            # we search under.  That way, we avoid caching information that
 
19668
            # changes if the user runs `configure' with a different set of
 
19669
            # switches.
 
19670
 
 
19671
            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
19672
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
19673
 
 
19674
 
 
19675
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
19676
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
19677
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
19678
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19679
else
 
19680
 
 
19681
 
 
19682
    apu_try_berkeley_db_save_libs="$LIBS"
 
19683
 
 
19684
    apu_check_berkeley_db_major=1
 
19685
    apu_check_berkeley_db_minor=-1
 
19686
    apu_check_berkeley_db_patch=-1
 
19687
    apu_try_berkeley_db_header=$bdb_header
 
19688
    apu_try_berkeley_db_libname=$bdb_libname
 
19689
 
 
19690
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
19691
    if test "$cross_compiling" = yes; then
 
19692
  apu_try_berkeley_db=yes
 
19693
 
 
19694
else
 
19695
  cat >conftest.$ac_ext <<_ACEOF
 
19696
/* confdefs.h.  */
 
19697
_ACEOF
 
19698
cat confdefs.h >>conftest.$ac_ext
 
19699
cat >>conftest.$ac_ext <<_ACEOF
 
19700
/* end confdefs.h.  */
 
19701
 
 
19702
#include <stdio.h>
 
19703
#include <$apu_try_berkeley_db_header>
 
19704
main ()
 
19705
{
 
19706
  int major, minor, patch;
 
19707
 
 
19708
  db_version(&major, &minor, &patch);
 
19709
 
 
19710
  /* Sanity check: ensure that db.h constants actually match the db library */
 
19711
  if (major != DB_VERSION_MAJOR
 
19712
      || minor != DB_VERSION_MINOR
 
19713
      || patch != DB_VERSION_PATCH)
 
19714
    exit (1);
 
19715
 
 
19716
  /* Run-time check:  ensure the library claims to be the correct version. */
 
19717
 
 
19718
  if ($apu_check_berkeley_db_major != -1) {
 
19719
    if (major < $apu_check_berkeley_db_major)
 
19720
      exit (1);
 
19721
    if (major > $apu_check_berkeley_db_major)
 
19722
      exit (0);
 
19723
  }
 
19724
 
 
19725
  if ($apu_check_berkeley_db_minor != -1) {
 
19726
    if (minor < $apu_check_berkeley_db_minor)
 
19727
      exit (1);
 
19728
    if (minor > $apu_check_berkeley_db_minor)
 
19729
      exit (0);
 
19730
  }
 
19731
 
 
19732
  if ($apu_check_berkeley_db_patch == -1
 
19733
      || patch >= $apu_check_berkeley_db_patch)
 
19734
    exit (0);
 
19735
  else
 
19736
    exit (1);
 
19737
}
 
19738
 
 
19739
_ACEOF
 
19740
rm -f conftest$ac_exeext
 
19741
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
19742
  (eval $ac_link) 2>&5
 
19743
  ac_status=$?
 
19744
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19745
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
19746
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19747
  (eval $ac_try) 2>&5
 
19748
  ac_status=$?
 
19749
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19750
  (exit $ac_status); }; }; then
 
19751
  apu_try_berkeley_db=yes
 
19752
else
 
19753
  echo "$as_me: program exited with status $ac_status" >&5
 
19754
echo "$as_me: failed program was:" >&5
 
19755
sed 's/^/| /' conftest.$ac_ext >&5
 
19756
 
 
19757
( exit $ac_status )
 
19758
apu_try_berkeley_db=no
 
19759
fi
 
19760
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
19761
fi
 
19762
 
 
19763
    LIBS="$apu_try_berkeley_db_save_libs"
 
19764
 
 
19765
 
 
19766
                eval "$cache_id=$apu_try_berkeley_db"
 
19767
 
 
19768
fi
 
19769
 
 
19770
            result="`eval echo '$'$cache_id`"
 
19771
            echo "$as_me:$LINENO: result: $result" >&5
 
19772
echo "${ECHO_T}$result" >&6
 
19773
          elif test "1" = "1"; then
 
19774
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
19775
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
19776
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
19777
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
19778
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19779
else
 
19780
  ac_check_lib_save_LIBS=$LIBS
 
19781
LIBS="-l$bdb_libname  $LIBS"
 
19782
cat >conftest.$ac_ext <<_ACEOF
 
19783
/* confdefs.h.  */
 
19784
_ACEOF
 
19785
cat confdefs.h >>conftest.$ac_ext
 
19786
cat >>conftest.$ac_ext <<_ACEOF
 
19787
/* end confdefs.h.  */
 
19788
 
 
19789
/* Override any gcc2 internal prototype to avoid an error.  */
 
19790
#ifdef __cplusplus
 
19791
extern "C"
 
19792
#endif
 
19793
/* We use char because int might match the return type of a gcc2
 
19794
   builtin and then its argument prototype would still apply.  */
 
19795
char dbopen ();
 
19796
int
 
19797
main ()
 
19798
{
 
19799
dbopen ();
 
19800
  ;
 
19801
  return 0;
 
19802
}
 
19803
_ACEOF
 
19804
rm -f conftest.$ac_objext conftest$ac_exeext
 
19805
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
19806
  (eval $ac_link) 2>conftest.er1
 
19807
  ac_status=$?
 
19808
  grep -v '^ *+' conftest.er1 >conftest.err
 
19809
  rm -f conftest.er1
 
19810
  cat conftest.err >&5
 
19811
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19812
  (exit $ac_status); } &&
 
19813
         { ac_try='test -z "$ac_c_werror_flag"
 
19814
                         || test ! -s conftest.err'
 
19815
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19816
  (eval $ac_try) 2>&5
 
19817
  ac_status=$?
 
19818
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19819
  (exit $ac_status); }; } &&
 
19820
         { ac_try='test -s conftest$ac_exeext'
 
19821
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19822
  (eval $ac_try) 2>&5
 
19823
  ac_status=$?
 
19824
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19825
  (exit $ac_status); }; }; then
 
19826
  eval "$as_ac_Lib=yes"
 
19827
else
 
19828
  echo "$as_me: failed program was:" >&5
 
19829
sed 's/^/| /' conftest.$ac_ext >&5
 
19830
 
 
19831
eval "$as_ac_Lib=no"
 
19832
fi
 
19833
rm -f conftest.err conftest.$ac_objext \
 
19834
      conftest$ac_exeext conftest.$ac_ext
 
19835
LIBS=$ac_check_lib_save_LIBS
 
19836
fi
 
19837
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
19838
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
19839
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
19840
  result=yes
 
19841
else
 
19842
  result=no
 
19843
 
 
19844
fi
 
19845
 
 
19846
          elif test "1" = "2"; then
 
19847
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
19848
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
19849
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
19850
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
19851
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
19852
else
 
19853
  ac_check_lib_save_LIBS=$LIBS
 
19854
LIBS="-l$bdb_libname  $LIBS"
 
19855
cat >conftest.$ac_ext <<_ACEOF
 
19856
/* confdefs.h.  */
 
19857
_ACEOF
 
19858
cat confdefs.h >>conftest.$ac_ext
 
19859
cat >>conftest.$ac_ext <<_ACEOF
 
19860
/* end confdefs.h.  */
 
19861
 
 
19862
/* Override any gcc2 internal prototype to avoid an error.  */
 
19863
#ifdef __cplusplus
 
19864
extern "C"
 
19865
#endif
 
19866
/* We use char because int might match the return type of a gcc2
 
19867
   builtin and then its argument prototype would still apply.  */
 
19868
char db_open ();
 
19869
int
 
19870
main ()
 
19871
{
 
19872
db_open ();
 
19873
  ;
 
19874
  return 0;
 
19875
}
 
19876
_ACEOF
 
19877
rm -f conftest.$ac_objext conftest$ac_exeext
 
19878
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
19879
  (eval $ac_link) 2>conftest.er1
 
19880
  ac_status=$?
 
19881
  grep -v '^ *+' conftest.er1 >conftest.err
 
19882
  rm -f conftest.er1
 
19883
  cat conftest.err >&5
 
19884
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19885
  (exit $ac_status); } &&
 
19886
         { ac_try='test -z "$ac_c_werror_flag"
 
19887
                         || test ! -s conftest.err'
 
19888
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19889
  (eval $ac_try) 2>&5
 
19890
  ac_status=$?
 
19891
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19892
  (exit $ac_status); }; } &&
 
19893
         { ac_try='test -s conftest$ac_exeext'
 
19894
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
19895
  (eval $ac_try) 2>&5
 
19896
  ac_status=$?
 
19897
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
19898
  (exit $ac_status); }; }; then
 
19899
  eval "$as_ac_Lib=yes"
 
19900
else
 
19901
  echo "$as_me: failed program was:" >&5
 
19902
sed 's/^/| /' conftest.$ac_ext >&5
 
19903
 
 
19904
eval "$as_ac_Lib=no"
 
19905
fi
 
19906
rm -f conftest.err conftest.$ac_objext \
 
19907
      conftest$ac_exeext conftest.$ac_ext
 
19908
LIBS=$ac_check_lib_save_LIBS
 
19909
fi
 
19910
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
19911
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
19912
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
19913
  result=yes
 
19914
else
 
19915
  result=no
 
19916
 
 
19917
fi
 
19918
 
 
19919
          fi
 
19920
 
 
19921
else
 
19922
  result="no"
 
19923
fi
 
19924
 
 
19925
 
 
19926
 
 
19927
        # If we found it, no need to search any more.
 
19928
        if test "$result" = "yes"; then
 
19929
          found="$bdb_place"
 
19930
          break
 
19931
        fi
 
19932
      done
 
19933
      test "$found" != "not" && break
 
19934
    done
 
19935
    test "$found" != "not" && break
 
19936
  done
 
19937
 
 
19938
  # Restore the original values of the flags we tweak.
 
19939
  LDFLAGS="$apu_check_lib_save_ldflags"
 
19940
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
19941
 
 
19942
  case "$found" in
 
19943
  "not")
 
19944
    apu_have_db=0
 
19945
    ;;
 
19946
  "std")
 
19947
    apu_db_header=$bdb_header
 
19948
    apu_db_lib=$bdb_libname
 
19949
    apu_have_db=1
 
19950
    ;;
 
19951
  *":"*)
 
19952
    header="`echo $found | sed -e 's/:.*$//'`"
 
19953
    lib="`echo $found | sed -e 's/^.*://'`"
 
19954
 
 
19955
 
 
19956
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
19957
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
19958
    APRUTIL_INCLUDES="-I$header"
 
19959
  else
 
19960
    apr_addto_bugger="-I$header"
 
19961
    for i in $apr_addto_bugger; do
 
19962
      apr_addto_duplicate="0"
 
19963
      for j in $APRUTIL_INCLUDES; do
 
19964
        if test "x$i" = "x$j"; then
 
19965
          apr_addto_duplicate="1"
 
19966
          break
 
19967
        fi
 
19968
      done
 
19969
      if test $apr_addto_duplicate = "0"; then
 
19970
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
19971
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
19972
      fi
 
19973
    done
 
19974
  fi
 
19975
 
 
19976
 
 
19977
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
19978
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
19979
    APRUTIL_LDFLAGS="-L$lib"
 
19980
  else
 
19981
    apr_addto_bugger="-L$lib"
 
19982
    for i in $apr_addto_bugger; do
 
19983
      apr_addto_duplicate="0"
 
19984
      for j in $APRUTIL_LDFLAGS; do
 
19985
        if test "x$i" = "x$j"; then
 
19986
          apr_addto_duplicate="1"
 
19987
          break
 
19988
        fi
 
19989
      done
 
19990
      if test $apr_addto_duplicate = "0"; then
 
19991
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
19992
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
19993
      fi
 
19994
    done
 
19995
  fi
 
19996
 
 
19997
    apu_db_header=$bdb_header
 
19998
    apu_db_lib=$bdb_libname
 
19999
    apu_have_db=1
 
20000
    ;;
 
20001
  *)
 
20002
 
 
20003
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
20004
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
20005
    APRUTIL_INCLUDES="-I$found/include"
 
20006
  else
 
20007
    apr_addto_bugger="-I$found/include"
 
20008
    for i in $apr_addto_bugger; do
 
20009
      apr_addto_duplicate="0"
 
20010
      for j in $APRUTIL_INCLUDES; do
 
20011
        if test "x$i" = "x$j"; then
 
20012
          apr_addto_duplicate="1"
 
20013
          break
 
20014
        fi
 
20015
      done
 
20016
      if test $apr_addto_duplicate = "0"; then
 
20017
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
20018
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
20019
      fi
 
20020
    done
 
20021
  fi
 
20022
 
 
20023
 
 
20024
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
20025
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
20026
    APRUTIL_LDFLAGS="-L$found/lib"
 
20027
  else
 
20028
    apr_addto_bugger="-L$found/lib"
 
20029
    for i in $apr_addto_bugger; do
 
20030
      apr_addto_duplicate="0"
 
20031
      for j in $APRUTIL_LDFLAGS; do
 
20032
        if test "x$i" = "x$j"; then
 
20033
          apr_addto_duplicate="1"
 
20034
          break
 
20035
        fi
 
20036
      done
 
20037
      if test $apr_addto_duplicate = "0"; then
 
20038
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
20039
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
20040
      fi
 
20041
    done
 
20042
  fi
 
20043
 
 
20044
    apu_db_header=$bdb_header
 
20045
    apu_db_lib=$bdb_libname
 
20046
    apu_have_db=1
 
20047
    ;;
 
20048
  esac
 
20049
 
 
20050
  if test "$apu_have_db" = "1"; then
 
20051
    apu_db_version=185
 
20052
  fi
 
20053
 
 
20054
                fi
 
20055
              fi
 
20056
            fi
 
20057
          fi
 
20058
        fi
 
20059
      fi
 
20060
    fi
 
20061
  fi
 
20062
  echo "$as_me:$LINENO: checking for Berkeley DB" >&5
 
20063
echo $ECHO_N "checking for Berkeley DB... $ECHO_C" >&6
 
20064
  if test "$apu_have_db" = "1"; then
 
20065
    echo "$as_me:$LINENO: result: found db$apu_db_version" >&5
 
20066
echo "${ECHO_T}found db$apu_db_version" >&6
 
20067
  else
 
20068
    echo "$as_me:$LINENO: result: not found" >&5
 
20069
echo "${ECHO_T}not found" >&6
 
20070
  fi
 
20071
 
 
20072
    if test "$apu_have_db" = "0"; then
 
20073
      { { echo "$as_me:$LINENO: error: Berkeley db requested" >&5
 
20074
echo "$as_me: error: Berkeley db requested" >&2;}
 
20075
   { (exit but not found); exit but not found; }; }
 
20076
    fi
 
20077
    ;;
 
20078
  db1)
 
20079
 
 
20080
  places="$check_places"
 
20081
  if test -z "$places"; then
 
20082
    places="std"
 
20083
  fi
 
20084
 
 
20085
  bdb_version=1
 
20086
  if test "0" != "-1"; then
 
20087
    bdb_version="$bdb_version.0"
 
20088
    if test "0" != "-1"; then
 
20089
      bdb_version="$bdb_version.0"
 
20090
    fi
 
20091
  fi
 
20092
  bdb_places="$places"
 
20093
  bdb_default_search_headers="db1/db.h db.h"
 
20094
  bdb_default_search_lib_names="db1"
 
20095
 
 
20096
 
 
20097
  apu_have_db=0
 
20098
 
 
20099
  # Save the original values of the flags we tweak.
 
20100
  apu_check_lib_save_libs="$LIBS"
 
20101
  apu_check_lib_save_ldflags="$LDFLAGS"
 
20102
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
20103
 
 
20104
  # The variable `found' is the prefix under which we've found
 
20105
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
20106
  found=not
 
20107
  for bdb_place in $bdb_places; do
 
20108
 
 
20109
    LDFLAGS="$apu_check_lib_save_ldflags"
 
20110
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
20111
    case "$bdb_place" in
 
20112
      "std" )
 
20113
        description="the standard places"
 
20114
      ;;
 
20115
      *":"* )
 
20116
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
20117
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
20118
        CPPFLAGS="$CPPFLAGS -I$header"
 
20119
        LDFLAGS="$LDFLAGS -L$lib"
 
20120
        description="$header and $lib"
 
20121
      ;;
 
20122
      * )
 
20123
        if test -d $bdb_place; then
 
20124
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
20125
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
20126
        else
 
20127
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
20128
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
20129
          echo "$as_me:$LINENO: result: directory not found" >&5
 
20130
echo "${ECHO_T}directory not found" >&6
 
20131
          continue
 
20132
        fi
 
20133
        description="$bdb_place"
 
20134
      ;;
 
20135
    esac
 
20136
 
 
20137
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
20138
    # trick to display a message instead.
 
20139
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
20140
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
20141
    echo "$as_me:$LINENO: result: " >&5
 
20142
echo "${ECHO_T}" >&6
 
20143
 
 
20144
    for bdb_libname in $bdb_default_search_lib_names; do
 
20145
      for bdb_header in $bdb_default_search_headers; do
 
20146
        # Clear the header cache variable for each location
 
20147
 
 
20148
        cache_id="`echo ac_cv_header_${bdb_header} \
 
20149
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
20150
 
 
20151
        unset $cache_id
 
20152
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
20153
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
20154
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
20155
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
20156
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
20157
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20158
fi
 
20159
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
20160
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
20161
else
 
20162
  # Is the header compilable?
 
20163
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
20164
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
20165
cat >conftest.$ac_ext <<_ACEOF
 
20166
/* confdefs.h.  */
 
20167
_ACEOF
 
20168
cat confdefs.h >>conftest.$ac_ext
 
20169
cat >>conftest.$ac_ext <<_ACEOF
 
20170
/* end confdefs.h.  */
 
20171
$ac_includes_default
 
20172
#include <$bdb_header>
 
20173
_ACEOF
 
20174
rm -f conftest.$ac_objext
 
20175
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
20176
  (eval $ac_compile) 2>conftest.er1
 
20177
  ac_status=$?
 
20178
  grep -v '^ *+' conftest.er1 >conftest.err
 
20179
  rm -f conftest.er1
 
20180
  cat conftest.err >&5
 
20181
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20182
  (exit $ac_status); } &&
 
20183
         { ac_try='test -z "$ac_c_werror_flag"
 
20184
                         || test ! -s conftest.err'
 
20185
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20186
  (eval $ac_try) 2>&5
 
20187
  ac_status=$?
 
20188
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20189
  (exit $ac_status); }; } &&
 
20190
         { ac_try='test -s conftest.$ac_objext'
 
20191
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20192
  (eval $ac_try) 2>&5
 
20193
  ac_status=$?
 
20194
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20195
  (exit $ac_status); }; }; then
 
20196
  ac_header_compiler=yes
 
20197
else
 
20198
  echo "$as_me: failed program was:" >&5
 
20199
sed 's/^/| /' conftest.$ac_ext >&5
 
20200
 
 
20201
ac_header_compiler=no
 
20202
fi
 
20203
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
20204
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
20205
echo "${ECHO_T}$ac_header_compiler" >&6
 
20206
 
 
20207
# Is the header present?
 
20208
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
20209
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
20210
cat >conftest.$ac_ext <<_ACEOF
 
20211
/* confdefs.h.  */
 
20212
_ACEOF
 
20213
cat confdefs.h >>conftest.$ac_ext
 
20214
cat >>conftest.$ac_ext <<_ACEOF
 
20215
/* end confdefs.h.  */
 
20216
#include <$bdb_header>
 
20217
_ACEOF
 
20218
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
20219
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
20220
  ac_status=$?
 
20221
  grep -v '^ *+' conftest.er1 >conftest.err
 
20222
  rm -f conftest.er1
 
20223
  cat conftest.err >&5
 
20224
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20225
  (exit $ac_status); } >/dev/null; then
 
20226
  if test -s conftest.err; then
 
20227
    ac_cpp_err=$ac_c_preproc_warn_flag
 
20228
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
20229
  else
 
20230
    ac_cpp_err=
 
20231
  fi
 
20232
else
 
20233
  ac_cpp_err=yes
 
20234
fi
 
20235
if test -z "$ac_cpp_err"; then
 
20236
  ac_header_preproc=yes
 
20237
else
 
20238
  echo "$as_me: failed program was:" >&5
 
20239
sed 's/^/| /' conftest.$ac_ext >&5
 
20240
 
 
20241
  ac_header_preproc=no
 
20242
fi
 
20243
rm -f conftest.err conftest.$ac_ext
 
20244
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
20245
echo "${ECHO_T}$ac_header_preproc" >&6
 
20246
 
 
20247
# So?  What about this header?
 
20248
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
20249
  yes:no: )
 
20250
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
20251
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
20252
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
20253
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
20254
    ac_header_preproc=yes
 
20255
    ;;
 
20256
  no:yes:* )
 
20257
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
20258
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
20259
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
20260
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
20261
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
20262
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
20263
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
20264
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
20265
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
20266
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
20267
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
20268
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
20269
    (
 
20270
      cat <<\_ASBOX
 
20271
## ------------------------------------------ ##
 
20272
## Report this to the AC_PACKAGE_NAME lists.  ##
 
20273
## ------------------------------------------ ##
 
20274
_ASBOX
 
20275
    ) |
 
20276
      sed "s/^/$as_me: WARNING:     /" >&2
 
20277
    ;;
 
20278
esac
 
20279
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
20280
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
20281
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
20282
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20283
else
 
20284
  eval "$as_ac_Header=\$ac_header_preproc"
 
20285
fi
 
20286
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
20287
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
20288
 
 
20289
fi
 
20290
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
20291
 
 
20292
          if test "1" = "3" -o "1" = "4"; then
 
20293
            # We generate a separate cache variable for each prefix and libname
 
20294
            # we search under.  That way, we avoid caching information that
 
20295
            # changes if the user runs `configure' with a different set of
 
20296
            # switches.
 
20297
 
 
20298
            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
20299
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
20300
 
 
20301
 
 
20302
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
20303
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
20304
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
20305
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20306
else
 
20307
 
 
20308
 
 
20309
    apu_try_berkeley_db_save_libs="$LIBS"
 
20310
 
 
20311
    apu_check_berkeley_db_major=1
 
20312
    apu_check_berkeley_db_minor=0
 
20313
    apu_check_berkeley_db_patch=0
 
20314
    apu_try_berkeley_db_header=$bdb_header
 
20315
    apu_try_berkeley_db_libname=$bdb_libname
 
20316
 
 
20317
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
20318
    if test "$cross_compiling" = yes; then
 
20319
  apu_try_berkeley_db=yes
 
20320
 
 
20321
else
 
20322
  cat >conftest.$ac_ext <<_ACEOF
 
20323
/* confdefs.h.  */
 
20324
_ACEOF
 
20325
cat confdefs.h >>conftest.$ac_ext
 
20326
cat >>conftest.$ac_ext <<_ACEOF
 
20327
/* end confdefs.h.  */
 
20328
 
 
20329
#include <stdio.h>
 
20330
#include <$apu_try_berkeley_db_header>
 
20331
main ()
 
20332
{
 
20333
  int major, minor, patch;
 
20334
 
 
20335
  db_version(&major, &minor, &patch);
 
20336
 
 
20337
  /* Sanity check: ensure that db.h constants actually match the db library */
 
20338
  if (major != DB_VERSION_MAJOR
 
20339
      || minor != DB_VERSION_MINOR
 
20340
      || patch != DB_VERSION_PATCH)
 
20341
    exit (1);
 
20342
 
 
20343
  /* Run-time check:  ensure the library claims to be the correct version. */
 
20344
 
 
20345
  if ($apu_check_berkeley_db_major != -1) {
 
20346
    if (major < $apu_check_berkeley_db_major)
 
20347
      exit (1);
 
20348
    if (major > $apu_check_berkeley_db_major)
 
20349
      exit (0);
 
20350
  }
 
20351
 
 
20352
  if ($apu_check_berkeley_db_minor != -1) {
 
20353
    if (minor < $apu_check_berkeley_db_minor)
 
20354
      exit (1);
 
20355
    if (minor > $apu_check_berkeley_db_minor)
 
20356
      exit (0);
 
20357
  }
 
20358
 
 
20359
  if ($apu_check_berkeley_db_patch == -1
 
20360
      || patch >= $apu_check_berkeley_db_patch)
 
20361
    exit (0);
 
20362
  else
 
20363
    exit (1);
 
20364
}
 
20365
 
 
20366
_ACEOF
 
20367
rm -f conftest$ac_exeext
 
20368
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
20369
  (eval $ac_link) 2>&5
 
20370
  ac_status=$?
 
20371
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20372
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
20373
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20374
  (eval $ac_try) 2>&5
 
20375
  ac_status=$?
 
20376
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20377
  (exit $ac_status); }; }; then
 
20378
  apu_try_berkeley_db=yes
 
20379
else
 
20380
  echo "$as_me: program exited with status $ac_status" >&5
 
20381
echo "$as_me: failed program was:" >&5
 
20382
sed 's/^/| /' conftest.$ac_ext >&5
 
20383
 
 
20384
( exit $ac_status )
 
20385
apu_try_berkeley_db=no
 
20386
fi
 
20387
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
20388
fi
 
20389
 
 
20390
    LIBS="$apu_try_berkeley_db_save_libs"
 
20391
 
 
20392
 
 
20393
                eval "$cache_id=$apu_try_berkeley_db"
 
20394
 
 
20395
fi
 
20396
 
 
20397
            result="`eval echo '$'$cache_id`"
 
20398
            echo "$as_me:$LINENO: result: $result" >&5
 
20399
echo "${ECHO_T}$result" >&6
 
20400
          elif test "1" = "1"; then
 
20401
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
20402
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
20403
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
20404
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
20405
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20406
else
 
20407
  ac_check_lib_save_LIBS=$LIBS
 
20408
LIBS="-l$bdb_libname  $LIBS"
 
20409
cat >conftest.$ac_ext <<_ACEOF
 
20410
/* confdefs.h.  */
 
20411
_ACEOF
 
20412
cat confdefs.h >>conftest.$ac_ext
 
20413
cat >>conftest.$ac_ext <<_ACEOF
 
20414
/* end confdefs.h.  */
 
20415
 
 
20416
/* Override any gcc2 internal prototype to avoid an error.  */
 
20417
#ifdef __cplusplus
 
20418
extern "C"
 
20419
#endif
 
20420
/* We use char because int might match the return type of a gcc2
 
20421
   builtin and then its argument prototype would still apply.  */
 
20422
char dbopen ();
 
20423
int
 
20424
main ()
 
20425
{
 
20426
dbopen ();
 
20427
  ;
 
20428
  return 0;
 
20429
}
 
20430
_ACEOF
 
20431
rm -f conftest.$ac_objext conftest$ac_exeext
 
20432
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
20433
  (eval $ac_link) 2>conftest.er1
 
20434
  ac_status=$?
 
20435
  grep -v '^ *+' conftest.er1 >conftest.err
 
20436
  rm -f conftest.er1
 
20437
  cat conftest.err >&5
 
20438
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20439
  (exit $ac_status); } &&
 
20440
         { ac_try='test -z "$ac_c_werror_flag"
 
20441
                         || test ! -s conftest.err'
 
20442
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20443
  (eval $ac_try) 2>&5
 
20444
  ac_status=$?
 
20445
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20446
  (exit $ac_status); }; } &&
 
20447
         { ac_try='test -s conftest$ac_exeext'
 
20448
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20449
  (eval $ac_try) 2>&5
 
20450
  ac_status=$?
 
20451
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20452
  (exit $ac_status); }; }; then
 
20453
  eval "$as_ac_Lib=yes"
 
20454
else
 
20455
  echo "$as_me: failed program was:" >&5
 
20456
sed 's/^/| /' conftest.$ac_ext >&5
 
20457
 
 
20458
eval "$as_ac_Lib=no"
 
20459
fi
 
20460
rm -f conftest.err conftest.$ac_objext \
 
20461
      conftest$ac_exeext conftest.$ac_ext
 
20462
LIBS=$ac_check_lib_save_LIBS
 
20463
fi
 
20464
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
20465
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
20466
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
20467
  result=yes
 
20468
else
 
20469
  result=no
 
20470
 
 
20471
fi
 
20472
 
 
20473
          elif test "1" = "2"; then
 
20474
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
20475
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
20476
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
20477
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
20478
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20479
else
 
20480
  ac_check_lib_save_LIBS=$LIBS
 
20481
LIBS="-l$bdb_libname  $LIBS"
 
20482
cat >conftest.$ac_ext <<_ACEOF
 
20483
/* confdefs.h.  */
 
20484
_ACEOF
 
20485
cat confdefs.h >>conftest.$ac_ext
 
20486
cat >>conftest.$ac_ext <<_ACEOF
 
20487
/* end confdefs.h.  */
 
20488
 
 
20489
/* Override any gcc2 internal prototype to avoid an error.  */
 
20490
#ifdef __cplusplus
 
20491
extern "C"
 
20492
#endif
 
20493
/* We use char because int might match the return type of a gcc2
 
20494
   builtin and then its argument prototype would still apply.  */
 
20495
char db_open ();
 
20496
int
 
20497
main ()
 
20498
{
 
20499
db_open ();
 
20500
  ;
 
20501
  return 0;
 
20502
}
 
20503
_ACEOF
 
20504
rm -f conftest.$ac_objext conftest$ac_exeext
 
20505
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
20506
  (eval $ac_link) 2>conftest.er1
 
20507
  ac_status=$?
 
20508
  grep -v '^ *+' conftest.er1 >conftest.err
 
20509
  rm -f conftest.er1
 
20510
  cat conftest.err >&5
 
20511
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20512
  (exit $ac_status); } &&
 
20513
         { ac_try='test -z "$ac_c_werror_flag"
 
20514
                         || test ! -s conftest.err'
 
20515
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20516
  (eval $ac_try) 2>&5
 
20517
  ac_status=$?
 
20518
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20519
  (exit $ac_status); }; } &&
 
20520
         { ac_try='test -s conftest$ac_exeext'
 
20521
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20522
  (eval $ac_try) 2>&5
 
20523
  ac_status=$?
 
20524
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20525
  (exit $ac_status); }; }; then
 
20526
  eval "$as_ac_Lib=yes"
 
20527
else
 
20528
  echo "$as_me: failed program was:" >&5
 
20529
sed 's/^/| /' conftest.$ac_ext >&5
 
20530
 
 
20531
eval "$as_ac_Lib=no"
 
20532
fi
 
20533
rm -f conftest.err conftest.$ac_objext \
 
20534
      conftest$ac_exeext conftest.$ac_ext
 
20535
LIBS=$ac_check_lib_save_LIBS
 
20536
fi
 
20537
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
20538
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
20539
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
20540
  result=yes
 
20541
else
 
20542
  result=no
 
20543
 
 
20544
fi
 
20545
 
 
20546
          fi
 
20547
 
 
20548
else
 
20549
  result="no"
 
20550
fi
 
20551
 
 
20552
 
 
20553
 
 
20554
        # If we found it, no need to search any more.
 
20555
        if test "$result" = "yes"; then
 
20556
          found="$bdb_place"
 
20557
          break
 
20558
        fi
 
20559
      done
 
20560
      test "$found" != "not" && break
 
20561
    done
 
20562
    test "$found" != "not" && break
 
20563
  done
 
20564
 
 
20565
  # Restore the original values of the flags we tweak.
 
20566
  LDFLAGS="$apu_check_lib_save_ldflags"
 
20567
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
20568
 
 
20569
  case "$found" in
 
20570
  "not")
 
20571
    apu_have_db=0
 
20572
    ;;
 
20573
  "std")
 
20574
    apu_db_header=$bdb_header
 
20575
    apu_db_lib=$bdb_libname
 
20576
    apu_have_db=1
 
20577
    ;;
 
20578
  *":"*)
 
20579
    header="`echo $found | sed -e 's/:.*$//'`"
 
20580
    lib="`echo $found | sed -e 's/^.*://'`"
 
20581
 
 
20582
 
 
20583
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
20584
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
20585
    APRUTIL_INCLUDES="-I$header"
 
20586
  else
 
20587
    apr_addto_bugger="-I$header"
 
20588
    for i in $apr_addto_bugger; do
 
20589
      apr_addto_duplicate="0"
 
20590
      for j in $APRUTIL_INCLUDES; do
 
20591
        if test "x$i" = "x$j"; then
 
20592
          apr_addto_duplicate="1"
 
20593
          break
 
20594
        fi
 
20595
      done
 
20596
      if test $apr_addto_duplicate = "0"; then
 
20597
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
20598
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
20599
      fi
 
20600
    done
 
20601
  fi
 
20602
 
 
20603
 
 
20604
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
20605
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
20606
    APRUTIL_LDFLAGS="-L$lib"
 
20607
  else
 
20608
    apr_addto_bugger="-L$lib"
 
20609
    for i in $apr_addto_bugger; do
 
20610
      apr_addto_duplicate="0"
 
20611
      for j in $APRUTIL_LDFLAGS; do
 
20612
        if test "x$i" = "x$j"; then
 
20613
          apr_addto_duplicate="1"
 
20614
          break
 
20615
        fi
 
20616
      done
 
20617
      if test $apr_addto_duplicate = "0"; then
 
20618
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
20619
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
20620
      fi
 
20621
    done
 
20622
  fi
 
20623
 
 
20624
    apu_db_header=$bdb_header
 
20625
    apu_db_lib=$bdb_libname
 
20626
    apu_have_db=1
 
20627
    ;;
 
20628
  *)
 
20629
 
 
20630
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
20631
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
20632
    APRUTIL_INCLUDES="-I$found/include"
 
20633
  else
 
20634
    apr_addto_bugger="-I$found/include"
 
20635
    for i in $apr_addto_bugger; do
 
20636
      apr_addto_duplicate="0"
 
20637
      for j in $APRUTIL_INCLUDES; do
 
20638
        if test "x$i" = "x$j"; then
 
20639
          apr_addto_duplicate="1"
 
20640
          break
 
20641
        fi
 
20642
      done
 
20643
      if test $apr_addto_duplicate = "0"; then
 
20644
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
20645
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
20646
      fi
 
20647
    done
 
20648
  fi
 
20649
 
 
20650
 
 
20651
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
20652
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
20653
    APRUTIL_LDFLAGS="-L$found/lib"
 
20654
  else
 
20655
    apr_addto_bugger="-L$found/lib"
 
20656
    for i in $apr_addto_bugger; do
 
20657
      apr_addto_duplicate="0"
 
20658
      for j in $APRUTIL_LDFLAGS; do
 
20659
        if test "x$i" = "x$j"; then
 
20660
          apr_addto_duplicate="1"
 
20661
          break
 
20662
        fi
 
20663
      done
 
20664
      if test $apr_addto_duplicate = "0"; then
 
20665
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
20666
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
20667
      fi
 
20668
    done
 
20669
  fi
 
20670
 
 
20671
    apu_db_header=$bdb_header
 
20672
    apu_db_lib=$bdb_libname
 
20673
    apu_have_db=1
 
20674
    ;;
 
20675
  esac
 
20676
 
 
20677
  if test "$apu_have_db" = "1"; then
 
20678
    apu_db_version=1
 
20679
  fi
 
20680
 
 
20681
    if test "$apu_db_version" != "1"; then
 
20682
      { { echo "$as_me:$LINENO: error: Berkeley db1 not found" >&5
 
20683
echo "$as_me: error: Berkeley db1 not found" >&2;}
 
20684
   { (exit 1); exit 1; }; }
 
20685
    fi
 
20686
    ;;
 
20687
  db185)
 
20688
 
 
20689
  places="$check_places"
 
20690
  if test -z "$places"; then
 
20691
    places="std"
 
20692
  fi
 
20693
 
 
20694
  bdb_version=1
 
20695
  if test "-1" != "-1"; then
 
20696
    bdb_version="$bdb_version.-1"
 
20697
    if test "-1" != "-1"; then
 
20698
      bdb_version="$bdb_version.-1"
 
20699
    fi
 
20700
  fi
 
20701
  bdb_places="$places"
 
20702
  bdb_default_search_headers="db_185.h"
 
20703
  bdb_default_search_lib_names="db"
 
20704
 
 
20705
 
 
20706
  apu_have_db=0
 
20707
 
 
20708
  # Save the original values of the flags we tweak.
 
20709
  apu_check_lib_save_libs="$LIBS"
 
20710
  apu_check_lib_save_ldflags="$LDFLAGS"
 
20711
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
20712
 
 
20713
  # The variable `found' is the prefix under which we've found
 
20714
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
20715
  found=not
 
20716
  for bdb_place in $bdb_places; do
 
20717
 
 
20718
    LDFLAGS="$apu_check_lib_save_ldflags"
 
20719
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
20720
    case "$bdb_place" in
 
20721
      "std" )
 
20722
        description="the standard places"
 
20723
      ;;
 
20724
      *":"* )
 
20725
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
20726
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
20727
        CPPFLAGS="$CPPFLAGS -I$header"
 
20728
        LDFLAGS="$LDFLAGS -L$lib"
 
20729
        description="$header and $lib"
 
20730
      ;;
 
20731
      * )
 
20732
        if test -d $bdb_place; then
 
20733
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
20734
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
20735
        else
 
20736
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
20737
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
20738
          echo "$as_me:$LINENO: result: directory not found" >&5
 
20739
echo "${ECHO_T}directory not found" >&6
 
20740
          continue
 
20741
        fi
 
20742
        description="$bdb_place"
 
20743
      ;;
 
20744
    esac
 
20745
 
 
20746
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
20747
    # trick to display a message instead.
 
20748
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
20749
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
20750
    echo "$as_me:$LINENO: result: " >&5
 
20751
echo "${ECHO_T}" >&6
 
20752
 
 
20753
    for bdb_libname in $bdb_default_search_lib_names; do
 
20754
      for bdb_header in $bdb_default_search_headers; do
 
20755
        # Clear the header cache variable for each location
 
20756
 
 
20757
        cache_id="`echo ac_cv_header_${bdb_header} \
 
20758
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
20759
 
 
20760
        unset $cache_id
 
20761
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
20762
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
20763
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
20764
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
20765
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
20766
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20767
fi
 
20768
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
20769
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
20770
else
 
20771
  # Is the header compilable?
 
20772
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
20773
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
20774
cat >conftest.$ac_ext <<_ACEOF
 
20775
/* confdefs.h.  */
 
20776
_ACEOF
 
20777
cat confdefs.h >>conftest.$ac_ext
 
20778
cat >>conftest.$ac_ext <<_ACEOF
 
20779
/* end confdefs.h.  */
 
20780
$ac_includes_default
 
20781
#include <$bdb_header>
 
20782
_ACEOF
 
20783
rm -f conftest.$ac_objext
 
20784
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
20785
  (eval $ac_compile) 2>conftest.er1
 
20786
  ac_status=$?
 
20787
  grep -v '^ *+' conftest.er1 >conftest.err
 
20788
  rm -f conftest.er1
 
20789
  cat conftest.err >&5
 
20790
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20791
  (exit $ac_status); } &&
 
20792
         { ac_try='test -z "$ac_c_werror_flag"
 
20793
                         || test ! -s conftest.err'
 
20794
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20795
  (eval $ac_try) 2>&5
 
20796
  ac_status=$?
 
20797
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20798
  (exit $ac_status); }; } &&
 
20799
         { ac_try='test -s conftest.$ac_objext'
 
20800
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20801
  (eval $ac_try) 2>&5
 
20802
  ac_status=$?
 
20803
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20804
  (exit $ac_status); }; }; then
 
20805
  ac_header_compiler=yes
 
20806
else
 
20807
  echo "$as_me: failed program was:" >&5
 
20808
sed 's/^/| /' conftest.$ac_ext >&5
 
20809
 
 
20810
ac_header_compiler=no
 
20811
fi
 
20812
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
20813
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
20814
echo "${ECHO_T}$ac_header_compiler" >&6
 
20815
 
 
20816
# Is the header present?
 
20817
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
20818
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
20819
cat >conftest.$ac_ext <<_ACEOF
 
20820
/* confdefs.h.  */
 
20821
_ACEOF
 
20822
cat confdefs.h >>conftest.$ac_ext
 
20823
cat >>conftest.$ac_ext <<_ACEOF
 
20824
/* end confdefs.h.  */
 
20825
#include <$bdb_header>
 
20826
_ACEOF
 
20827
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
20828
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
20829
  ac_status=$?
 
20830
  grep -v '^ *+' conftest.er1 >conftest.err
 
20831
  rm -f conftest.er1
 
20832
  cat conftest.err >&5
 
20833
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20834
  (exit $ac_status); } >/dev/null; then
 
20835
  if test -s conftest.err; then
 
20836
    ac_cpp_err=$ac_c_preproc_warn_flag
 
20837
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
20838
  else
 
20839
    ac_cpp_err=
 
20840
  fi
 
20841
else
 
20842
  ac_cpp_err=yes
 
20843
fi
 
20844
if test -z "$ac_cpp_err"; then
 
20845
  ac_header_preproc=yes
 
20846
else
 
20847
  echo "$as_me: failed program was:" >&5
 
20848
sed 's/^/| /' conftest.$ac_ext >&5
 
20849
 
 
20850
  ac_header_preproc=no
 
20851
fi
 
20852
rm -f conftest.err conftest.$ac_ext
 
20853
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
20854
echo "${ECHO_T}$ac_header_preproc" >&6
 
20855
 
 
20856
# So?  What about this header?
 
20857
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
20858
  yes:no: )
 
20859
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
20860
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
20861
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
20862
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
20863
    ac_header_preproc=yes
 
20864
    ;;
 
20865
  no:yes:* )
 
20866
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
20867
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
20868
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
20869
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
20870
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
20871
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
20872
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
20873
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
20874
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
20875
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
20876
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
20877
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
20878
    (
 
20879
      cat <<\_ASBOX
 
20880
## ------------------------------------------ ##
 
20881
## Report this to the AC_PACKAGE_NAME lists.  ##
 
20882
## ------------------------------------------ ##
 
20883
_ASBOX
 
20884
    ) |
 
20885
      sed "s/^/$as_me: WARNING:     /" >&2
 
20886
    ;;
 
20887
esac
 
20888
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
20889
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
20890
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
20891
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20892
else
 
20893
  eval "$as_ac_Header=\$ac_header_preproc"
 
20894
fi
 
20895
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
20896
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
20897
 
 
20898
fi
 
20899
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
20900
 
 
20901
          if test "1" = "3" -o "1" = "4"; then
 
20902
            # We generate a separate cache variable for each prefix and libname
 
20903
            # we search under.  That way, we avoid caching information that
 
20904
            # changes if the user runs `configure' with a different set of
 
20905
            # switches.
 
20906
 
 
20907
            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
20908
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
20909
 
 
20910
 
 
20911
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
20912
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
20913
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
20914
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
20915
else
 
20916
 
 
20917
 
 
20918
    apu_try_berkeley_db_save_libs="$LIBS"
 
20919
 
 
20920
    apu_check_berkeley_db_major=1
 
20921
    apu_check_berkeley_db_minor=-1
 
20922
    apu_check_berkeley_db_patch=-1
 
20923
    apu_try_berkeley_db_header=$bdb_header
 
20924
    apu_try_berkeley_db_libname=$bdb_libname
 
20925
 
 
20926
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
20927
    if test "$cross_compiling" = yes; then
 
20928
  apu_try_berkeley_db=yes
 
20929
 
 
20930
else
 
20931
  cat >conftest.$ac_ext <<_ACEOF
 
20932
/* confdefs.h.  */
 
20933
_ACEOF
 
20934
cat confdefs.h >>conftest.$ac_ext
 
20935
cat >>conftest.$ac_ext <<_ACEOF
 
20936
/* end confdefs.h.  */
 
20937
 
 
20938
#include <stdio.h>
 
20939
#include <$apu_try_berkeley_db_header>
 
20940
main ()
 
20941
{
 
20942
  int major, minor, patch;
 
20943
 
 
20944
  db_version(&major, &minor, &patch);
 
20945
 
 
20946
  /* Sanity check: ensure that db.h constants actually match the db library */
 
20947
  if (major != DB_VERSION_MAJOR
 
20948
      || minor != DB_VERSION_MINOR
 
20949
      || patch != DB_VERSION_PATCH)
 
20950
    exit (1);
 
20951
 
 
20952
  /* Run-time check:  ensure the library claims to be the correct version. */
 
20953
 
 
20954
  if ($apu_check_berkeley_db_major != -1) {
 
20955
    if (major < $apu_check_berkeley_db_major)
 
20956
      exit (1);
 
20957
    if (major > $apu_check_berkeley_db_major)
 
20958
      exit (0);
 
20959
  }
 
20960
 
 
20961
  if ($apu_check_berkeley_db_minor != -1) {
 
20962
    if (minor < $apu_check_berkeley_db_minor)
 
20963
      exit (1);
 
20964
    if (minor > $apu_check_berkeley_db_minor)
 
20965
      exit (0);
 
20966
  }
 
20967
 
 
20968
  if ($apu_check_berkeley_db_patch == -1
 
20969
      || patch >= $apu_check_berkeley_db_patch)
 
20970
    exit (0);
 
20971
  else
 
20972
    exit (1);
 
20973
}
 
20974
 
 
20975
_ACEOF
 
20976
rm -f conftest$ac_exeext
 
20977
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
20978
  (eval $ac_link) 2>&5
 
20979
  ac_status=$?
 
20980
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20981
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
20982
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
20983
  (eval $ac_try) 2>&5
 
20984
  ac_status=$?
 
20985
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
20986
  (exit $ac_status); }; }; then
 
20987
  apu_try_berkeley_db=yes
 
20988
else
 
20989
  echo "$as_me: program exited with status $ac_status" >&5
 
20990
echo "$as_me: failed program was:" >&5
 
20991
sed 's/^/| /' conftest.$ac_ext >&5
 
20992
 
 
20993
( exit $ac_status )
 
20994
apu_try_berkeley_db=no
 
20995
fi
 
20996
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
20997
fi
 
20998
 
 
20999
    LIBS="$apu_try_berkeley_db_save_libs"
 
21000
 
 
21001
 
 
21002
                eval "$cache_id=$apu_try_berkeley_db"
 
21003
 
 
21004
fi
 
21005
 
 
21006
            result="`eval echo '$'$cache_id`"
 
21007
            echo "$as_me:$LINENO: result: $result" >&5
 
21008
echo "${ECHO_T}$result" >&6
 
21009
          elif test "1" = "1"; then
 
21010
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
21011
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
21012
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
21013
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
21014
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21015
else
 
21016
  ac_check_lib_save_LIBS=$LIBS
 
21017
LIBS="-l$bdb_libname  $LIBS"
 
21018
cat >conftest.$ac_ext <<_ACEOF
 
21019
/* confdefs.h.  */
 
21020
_ACEOF
 
21021
cat confdefs.h >>conftest.$ac_ext
 
21022
cat >>conftest.$ac_ext <<_ACEOF
 
21023
/* end confdefs.h.  */
 
21024
 
 
21025
/* Override any gcc2 internal prototype to avoid an error.  */
 
21026
#ifdef __cplusplus
 
21027
extern "C"
 
21028
#endif
 
21029
/* We use char because int might match the return type of a gcc2
 
21030
   builtin and then its argument prototype would still apply.  */
 
21031
char dbopen ();
 
21032
int
 
21033
main ()
 
21034
{
 
21035
dbopen ();
 
21036
  ;
 
21037
  return 0;
 
21038
}
 
21039
_ACEOF
 
21040
rm -f conftest.$ac_objext conftest$ac_exeext
 
21041
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
21042
  (eval $ac_link) 2>conftest.er1
 
21043
  ac_status=$?
 
21044
  grep -v '^ *+' conftest.er1 >conftest.err
 
21045
  rm -f conftest.er1
 
21046
  cat conftest.err >&5
 
21047
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21048
  (exit $ac_status); } &&
 
21049
         { ac_try='test -z "$ac_c_werror_flag"
 
21050
                         || test ! -s conftest.err'
 
21051
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21052
  (eval $ac_try) 2>&5
 
21053
  ac_status=$?
 
21054
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21055
  (exit $ac_status); }; } &&
 
21056
         { ac_try='test -s conftest$ac_exeext'
 
21057
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21058
  (eval $ac_try) 2>&5
 
21059
  ac_status=$?
 
21060
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21061
  (exit $ac_status); }; }; then
 
21062
  eval "$as_ac_Lib=yes"
 
21063
else
 
21064
  echo "$as_me: failed program was:" >&5
 
21065
sed 's/^/| /' conftest.$ac_ext >&5
 
21066
 
 
21067
eval "$as_ac_Lib=no"
 
21068
fi
 
21069
rm -f conftest.err conftest.$ac_objext \
 
21070
      conftest$ac_exeext conftest.$ac_ext
 
21071
LIBS=$ac_check_lib_save_LIBS
 
21072
fi
 
21073
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
21074
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
21075
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
21076
  result=yes
 
21077
else
 
21078
  result=no
 
21079
 
 
21080
fi
 
21081
 
 
21082
          elif test "1" = "2"; then
 
21083
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
21084
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
21085
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
21086
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
21087
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21088
else
 
21089
  ac_check_lib_save_LIBS=$LIBS
 
21090
LIBS="-l$bdb_libname  $LIBS"
 
21091
cat >conftest.$ac_ext <<_ACEOF
 
21092
/* confdefs.h.  */
 
21093
_ACEOF
 
21094
cat confdefs.h >>conftest.$ac_ext
 
21095
cat >>conftest.$ac_ext <<_ACEOF
 
21096
/* end confdefs.h.  */
 
21097
 
 
21098
/* Override any gcc2 internal prototype to avoid an error.  */
 
21099
#ifdef __cplusplus
 
21100
extern "C"
 
21101
#endif
 
21102
/* We use char because int might match the return type of a gcc2
 
21103
   builtin and then its argument prototype would still apply.  */
 
21104
char db_open ();
 
21105
int
 
21106
main ()
 
21107
{
 
21108
db_open ();
 
21109
  ;
 
21110
  return 0;
 
21111
}
 
21112
_ACEOF
 
21113
rm -f conftest.$ac_objext conftest$ac_exeext
 
21114
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
21115
  (eval $ac_link) 2>conftest.er1
 
21116
  ac_status=$?
 
21117
  grep -v '^ *+' conftest.er1 >conftest.err
 
21118
  rm -f conftest.er1
 
21119
  cat conftest.err >&5
 
21120
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21121
  (exit $ac_status); } &&
 
21122
         { ac_try='test -z "$ac_c_werror_flag"
 
21123
                         || test ! -s conftest.err'
 
21124
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21125
  (eval $ac_try) 2>&5
 
21126
  ac_status=$?
 
21127
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21128
  (exit $ac_status); }; } &&
 
21129
         { ac_try='test -s conftest$ac_exeext'
 
21130
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21131
  (eval $ac_try) 2>&5
 
21132
  ac_status=$?
 
21133
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21134
  (exit $ac_status); }; }; then
 
21135
  eval "$as_ac_Lib=yes"
 
21136
else
 
21137
  echo "$as_me: failed program was:" >&5
 
21138
sed 's/^/| /' conftest.$ac_ext >&5
 
21139
 
 
21140
eval "$as_ac_Lib=no"
 
21141
fi
 
21142
rm -f conftest.err conftest.$ac_objext \
 
21143
      conftest$ac_exeext conftest.$ac_ext
 
21144
LIBS=$ac_check_lib_save_LIBS
 
21145
fi
 
21146
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
21147
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
21148
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
21149
  result=yes
 
21150
else
 
21151
  result=no
 
21152
 
 
21153
fi
 
21154
 
 
21155
          fi
 
21156
 
 
21157
else
 
21158
  result="no"
 
21159
fi
 
21160
 
 
21161
 
 
21162
 
 
21163
        # If we found it, no need to search any more.
 
21164
        if test "$result" = "yes"; then
 
21165
          found="$bdb_place"
 
21166
          break
 
21167
        fi
 
21168
      done
 
21169
      test "$found" != "not" && break
 
21170
    done
 
21171
    test "$found" != "not" && break
 
21172
  done
 
21173
 
 
21174
  # Restore the original values of the flags we tweak.
 
21175
  LDFLAGS="$apu_check_lib_save_ldflags"
 
21176
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
21177
 
 
21178
  case "$found" in
 
21179
  "not")
 
21180
    apu_have_db=0
 
21181
    ;;
 
21182
  "std")
 
21183
    apu_db_header=$bdb_header
 
21184
    apu_db_lib=$bdb_libname
 
21185
    apu_have_db=1
 
21186
    ;;
 
21187
  *":"*)
 
21188
    header="`echo $found | sed -e 's/:.*$//'`"
 
21189
    lib="`echo $found | sed -e 's/^.*://'`"
 
21190
 
 
21191
 
 
21192
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
21193
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
21194
    APRUTIL_INCLUDES="-I$header"
 
21195
  else
 
21196
    apr_addto_bugger="-I$header"
 
21197
    for i in $apr_addto_bugger; do
 
21198
      apr_addto_duplicate="0"
 
21199
      for j in $APRUTIL_INCLUDES; do
 
21200
        if test "x$i" = "x$j"; then
 
21201
          apr_addto_duplicate="1"
 
21202
          break
 
21203
        fi
 
21204
      done
 
21205
      if test $apr_addto_duplicate = "0"; then
 
21206
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
21207
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
21208
      fi
 
21209
    done
 
21210
  fi
 
21211
 
 
21212
 
 
21213
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
21214
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
21215
    APRUTIL_LDFLAGS="-L$lib"
 
21216
  else
 
21217
    apr_addto_bugger="-L$lib"
 
21218
    for i in $apr_addto_bugger; do
 
21219
      apr_addto_duplicate="0"
 
21220
      for j in $APRUTIL_LDFLAGS; do
 
21221
        if test "x$i" = "x$j"; then
 
21222
          apr_addto_duplicate="1"
 
21223
          break
 
21224
        fi
 
21225
      done
 
21226
      if test $apr_addto_duplicate = "0"; then
 
21227
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
21228
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
21229
      fi
 
21230
    done
 
21231
  fi
 
21232
 
 
21233
    apu_db_header=$bdb_header
 
21234
    apu_db_lib=$bdb_libname
 
21235
    apu_have_db=1
 
21236
    ;;
 
21237
  *)
 
21238
 
 
21239
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
21240
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
21241
    APRUTIL_INCLUDES="-I$found/include"
 
21242
  else
 
21243
    apr_addto_bugger="-I$found/include"
 
21244
    for i in $apr_addto_bugger; do
 
21245
      apr_addto_duplicate="0"
 
21246
      for j in $APRUTIL_INCLUDES; do
 
21247
        if test "x$i" = "x$j"; then
 
21248
          apr_addto_duplicate="1"
 
21249
          break
 
21250
        fi
 
21251
      done
 
21252
      if test $apr_addto_duplicate = "0"; then
 
21253
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
21254
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
21255
      fi
 
21256
    done
 
21257
  fi
 
21258
 
 
21259
 
 
21260
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
21261
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
21262
    APRUTIL_LDFLAGS="-L$found/lib"
 
21263
  else
 
21264
    apr_addto_bugger="-L$found/lib"
 
21265
    for i in $apr_addto_bugger; do
 
21266
      apr_addto_duplicate="0"
 
21267
      for j in $APRUTIL_LDFLAGS; do
 
21268
        if test "x$i" = "x$j"; then
 
21269
          apr_addto_duplicate="1"
 
21270
          break
 
21271
        fi
 
21272
      done
 
21273
      if test $apr_addto_duplicate = "0"; then
 
21274
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
21275
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
21276
      fi
 
21277
    done
 
21278
  fi
 
21279
 
 
21280
    apu_db_header=$bdb_header
 
21281
    apu_db_lib=$bdb_libname
 
21282
    apu_have_db=1
 
21283
    ;;
 
21284
  esac
 
21285
 
 
21286
  if test "$apu_have_db" = "1"; then
 
21287
    apu_db_version=185
 
21288
  fi
 
21289
 
 
21290
    if test "$apu_db_version" != "185"; then
 
21291
      { { echo "$as_me:$LINENO: error: Berkeley db185 not found" >&5
 
21292
echo "$as_me: error: Berkeley db185 not found" >&2;}
 
21293
   { (exit 1); exit 1; }; }
 
21294
    fi
 
21295
    ;;
 
21296
  db2)
 
21297
 
 
21298
  places="$check_places"
 
21299
  if test -z "$places"; then
 
21300
    places="std"
 
21301
  fi
 
21302
 
 
21303
  bdb_version=2
 
21304
  if test "-1" != "-1"; then
 
21305
    bdb_version="$bdb_version.-1"
 
21306
    if test "-1" != "-1"; then
 
21307
      bdb_version="$bdb_version.-1"
 
21308
    fi
 
21309
  fi
 
21310
  bdb_places="$places"
 
21311
  bdb_default_search_headers="db2/db.h db.h"
 
21312
  bdb_default_search_lib_names="db2 db"
 
21313
 
 
21314
 
 
21315
  apu_have_db=0
 
21316
 
 
21317
  # Save the original values of the flags we tweak.
 
21318
  apu_check_lib_save_libs="$LIBS"
 
21319
  apu_check_lib_save_ldflags="$LDFLAGS"
 
21320
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
21321
 
 
21322
  # The variable `found' is the prefix under which we've found
 
21323
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
21324
  found=not
 
21325
  for bdb_place in $bdb_places; do
 
21326
 
 
21327
    LDFLAGS="$apu_check_lib_save_ldflags"
 
21328
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
21329
    case "$bdb_place" in
 
21330
      "std" )
 
21331
        description="the standard places"
 
21332
      ;;
 
21333
      *":"* )
 
21334
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
21335
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
21336
        CPPFLAGS="$CPPFLAGS -I$header"
 
21337
        LDFLAGS="$LDFLAGS -L$lib"
 
21338
        description="$header and $lib"
 
21339
      ;;
 
21340
      * )
 
21341
        if test -d $bdb_place; then
 
21342
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
21343
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
21344
        else
 
21345
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
21346
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
21347
          echo "$as_me:$LINENO: result: directory not found" >&5
 
21348
echo "${ECHO_T}directory not found" >&6
 
21349
          continue
 
21350
        fi
 
21351
        description="$bdb_place"
 
21352
      ;;
 
21353
    esac
 
21354
 
 
21355
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
21356
    # trick to display a message instead.
 
21357
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
21358
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
21359
    echo "$as_me:$LINENO: result: " >&5
 
21360
echo "${ECHO_T}" >&6
 
21361
 
 
21362
    for bdb_libname in $bdb_default_search_lib_names; do
 
21363
      for bdb_header in $bdb_default_search_headers; do
 
21364
        # Clear the header cache variable for each location
 
21365
 
 
21366
        cache_id="`echo ac_cv_header_${bdb_header} \
 
21367
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
21368
 
 
21369
        unset $cache_id
 
21370
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
21371
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
21372
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
21373
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
21374
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
21375
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21376
fi
 
21377
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
21378
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
21379
else
 
21380
  # Is the header compilable?
 
21381
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
21382
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
21383
cat >conftest.$ac_ext <<_ACEOF
 
21384
/* confdefs.h.  */
 
21385
_ACEOF
 
21386
cat confdefs.h >>conftest.$ac_ext
 
21387
cat >>conftest.$ac_ext <<_ACEOF
 
21388
/* end confdefs.h.  */
 
21389
$ac_includes_default
 
21390
#include <$bdb_header>
 
21391
_ACEOF
 
21392
rm -f conftest.$ac_objext
 
21393
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21394
  (eval $ac_compile) 2>conftest.er1
 
21395
  ac_status=$?
 
21396
  grep -v '^ *+' conftest.er1 >conftest.err
 
21397
  rm -f conftest.er1
 
21398
  cat conftest.err >&5
 
21399
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21400
  (exit $ac_status); } &&
 
21401
         { ac_try='test -z "$ac_c_werror_flag"
 
21402
                         || test ! -s conftest.err'
 
21403
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21404
  (eval $ac_try) 2>&5
 
21405
  ac_status=$?
 
21406
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21407
  (exit $ac_status); }; } &&
 
21408
         { ac_try='test -s conftest.$ac_objext'
 
21409
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21410
  (eval $ac_try) 2>&5
 
21411
  ac_status=$?
 
21412
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21413
  (exit $ac_status); }; }; then
 
21414
  ac_header_compiler=yes
 
21415
else
 
21416
  echo "$as_me: failed program was:" >&5
 
21417
sed 's/^/| /' conftest.$ac_ext >&5
 
21418
 
 
21419
ac_header_compiler=no
 
21420
fi
 
21421
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21422
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
21423
echo "${ECHO_T}$ac_header_compiler" >&6
 
21424
 
 
21425
# Is the header present?
 
21426
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
21427
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
21428
cat >conftest.$ac_ext <<_ACEOF
 
21429
/* confdefs.h.  */
 
21430
_ACEOF
 
21431
cat confdefs.h >>conftest.$ac_ext
 
21432
cat >>conftest.$ac_ext <<_ACEOF
 
21433
/* end confdefs.h.  */
 
21434
#include <$bdb_header>
 
21435
_ACEOF
 
21436
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
21437
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
21438
  ac_status=$?
 
21439
  grep -v '^ *+' conftest.er1 >conftest.err
 
21440
  rm -f conftest.er1
 
21441
  cat conftest.err >&5
 
21442
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21443
  (exit $ac_status); } >/dev/null; then
 
21444
  if test -s conftest.err; then
 
21445
    ac_cpp_err=$ac_c_preproc_warn_flag
 
21446
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
21447
  else
 
21448
    ac_cpp_err=
 
21449
  fi
 
21450
else
 
21451
  ac_cpp_err=yes
 
21452
fi
 
21453
if test -z "$ac_cpp_err"; then
 
21454
  ac_header_preproc=yes
 
21455
else
 
21456
  echo "$as_me: failed program was:" >&5
 
21457
sed 's/^/| /' conftest.$ac_ext >&5
 
21458
 
 
21459
  ac_header_preproc=no
 
21460
fi
 
21461
rm -f conftest.err conftest.$ac_ext
 
21462
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
21463
echo "${ECHO_T}$ac_header_preproc" >&6
 
21464
 
 
21465
# So?  What about this header?
 
21466
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
21467
  yes:no: )
 
21468
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
21469
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
21470
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
21471
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
21472
    ac_header_preproc=yes
 
21473
    ;;
 
21474
  no:yes:* )
 
21475
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
21476
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
21477
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
21478
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
21479
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
21480
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
21481
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
21482
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
21483
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
21484
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
21485
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
21486
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
21487
    (
 
21488
      cat <<\_ASBOX
 
21489
## ------------------------------------------ ##
 
21490
## Report this to the AC_PACKAGE_NAME lists.  ##
 
21491
## ------------------------------------------ ##
 
21492
_ASBOX
 
21493
    ) |
 
21494
      sed "s/^/$as_me: WARNING:     /" >&2
 
21495
    ;;
 
21496
esac
 
21497
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
21498
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
21499
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
21500
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21501
else
 
21502
  eval "$as_ac_Header=\$ac_header_preproc"
 
21503
fi
 
21504
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
21505
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
21506
 
 
21507
fi
 
21508
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
21509
 
 
21510
          if test "2" = "3" -o "2" = "4"; then
 
21511
            # We generate a separate cache variable for each prefix and libname
 
21512
            # we search under.  That way, we avoid caching information that
 
21513
            # changes if the user runs `configure' with a different set of
 
21514
            # switches.
 
21515
 
 
21516
            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
21517
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
21518
 
 
21519
 
 
21520
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
21521
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
21522
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
21523
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21524
else
 
21525
 
 
21526
 
 
21527
    apu_try_berkeley_db_save_libs="$LIBS"
 
21528
 
 
21529
    apu_check_berkeley_db_major=2
 
21530
    apu_check_berkeley_db_minor=-1
 
21531
    apu_check_berkeley_db_patch=-1
 
21532
    apu_try_berkeley_db_header=$bdb_header
 
21533
    apu_try_berkeley_db_libname=$bdb_libname
 
21534
 
 
21535
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
21536
    if test "$cross_compiling" = yes; then
 
21537
  apu_try_berkeley_db=yes
 
21538
 
 
21539
else
 
21540
  cat >conftest.$ac_ext <<_ACEOF
 
21541
/* confdefs.h.  */
 
21542
_ACEOF
 
21543
cat confdefs.h >>conftest.$ac_ext
 
21544
cat >>conftest.$ac_ext <<_ACEOF
 
21545
/* end confdefs.h.  */
 
21546
 
 
21547
#include <stdio.h>
 
21548
#include <$apu_try_berkeley_db_header>
 
21549
main ()
 
21550
{
 
21551
  int major, minor, patch;
 
21552
 
 
21553
  db_version(&major, &minor, &patch);
 
21554
 
 
21555
  /* Sanity check: ensure that db.h constants actually match the db library */
 
21556
  if (major != DB_VERSION_MAJOR
 
21557
      || minor != DB_VERSION_MINOR
 
21558
      || patch != DB_VERSION_PATCH)
 
21559
    exit (1);
 
21560
 
 
21561
  /* Run-time check:  ensure the library claims to be the correct version. */
 
21562
 
 
21563
  if ($apu_check_berkeley_db_major != -1) {
 
21564
    if (major < $apu_check_berkeley_db_major)
 
21565
      exit (1);
 
21566
    if (major > $apu_check_berkeley_db_major)
 
21567
      exit (0);
 
21568
  }
 
21569
 
 
21570
  if ($apu_check_berkeley_db_minor != -1) {
 
21571
    if (minor < $apu_check_berkeley_db_minor)
 
21572
      exit (1);
 
21573
    if (minor > $apu_check_berkeley_db_minor)
 
21574
      exit (0);
 
21575
  }
 
21576
 
 
21577
  if ($apu_check_berkeley_db_patch == -1
 
21578
      || patch >= $apu_check_berkeley_db_patch)
 
21579
    exit (0);
 
21580
  else
 
21581
    exit (1);
 
21582
}
 
21583
 
 
21584
_ACEOF
 
21585
rm -f conftest$ac_exeext
 
21586
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
21587
  (eval $ac_link) 2>&5
 
21588
  ac_status=$?
 
21589
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21590
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
21591
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21592
  (eval $ac_try) 2>&5
 
21593
  ac_status=$?
 
21594
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21595
  (exit $ac_status); }; }; then
 
21596
  apu_try_berkeley_db=yes
 
21597
else
 
21598
  echo "$as_me: program exited with status $ac_status" >&5
 
21599
echo "$as_me: failed program was:" >&5
 
21600
sed 's/^/| /' conftest.$ac_ext >&5
 
21601
 
 
21602
( exit $ac_status )
 
21603
apu_try_berkeley_db=no
 
21604
fi
 
21605
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
21606
fi
 
21607
 
 
21608
    LIBS="$apu_try_berkeley_db_save_libs"
 
21609
 
 
21610
 
 
21611
                eval "$cache_id=$apu_try_berkeley_db"
 
21612
 
 
21613
fi
 
21614
 
 
21615
            result="`eval echo '$'$cache_id`"
 
21616
            echo "$as_me:$LINENO: result: $result" >&5
 
21617
echo "${ECHO_T}$result" >&6
 
21618
          elif test "2" = "1"; then
 
21619
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
21620
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
21621
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
21622
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
21623
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21624
else
 
21625
  ac_check_lib_save_LIBS=$LIBS
 
21626
LIBS="-l$bdb_libname  $LIBS"
 
21627
cat >conftest.$ac_ext <<_ACEOF
 
21628
/* confdefs.h.  */
 
21629
_ACEOF
 
21630
cat confdefs.h >>conftest.$ac_ext
 
21631
cat >>conftest.$ac_ext <<_ACEOF
 
21632
/* end confdefs.h.  */
 
21633
 
 
21634
/* Override any gcc2 internal prototype to avoid an error.  */
 
21635
#ifdef __cplusplus
 
21636
extern "C"
 
21637
#endif
 
21638
/* We use char because int might match the return type of a gcc2
 
21639
   builtin and then its argument prototype would still apply.  */
 
21640
char dbopen ();
 
21641
int
 
21642
main ()
 
21643
{
 
21644
dbopen ();
 
21645
  ;
 
21646
  return 0;
 
21647
}
 
21648
_ACEOF
 
21649
rm -f conftest.$ac_objext conftest$ac_exeext
 
21650
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
21651
  (eval $ac_link) 2>conftest.er1
 
21652
  ac_status=$?
 
21653
  grep -v '^ *+' conftest.er1 >conftest.err
 
21654
  rm -f conftest.er1
 
21655
  cat conftest.err >&5
 
21656
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21657
  (exit $ac_status); } &&
 
21658
         { ac_try='test -z "$ac_c_werror_flag"
 
21659
                         || test ! -s conftest.err'
 
21660
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21661
  (eval $ac_try) 2>&5
 
21662
  ac_status=$?
 
21663
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21664
  (exit $ac_status); }; } &&
 
21665
         { ac_try='test -s conftest$ac_exeext'
 
21666
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21667
  (eval $ac_try) 2>&5
 
21668
  ac_status=$?
 
21669
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21670
  (exit $ac_status); }; }; then
 
21671
  eval "$as_ac_Lib=yes"
 
21672
else
 
21673
  echo "$as_me: failed program was:" >&5
 
21674
sed 's/^/| /' conftest.$ac_ext >&5
 
21675
 
 
21676
eval "$as_ac_Lib=no"
 
21677
fi
 
21678
rm -f conftest.err conftest.$ac_objext \
 
21679
      conftest$ac_exeext conftest.$ac_ext
 
21680
LIBS=$ac_check_lib_save_LIBS
 
21681
fi
 
21682
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
21683
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
21684
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
21685
  result=yes
 
21686
else
 
21687
  result=no
 
21688
 
 
21689
fi
 
21690
 
 
21691
          elif test "2" = "2"; then
 
21692
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
21693
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
21694
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
21695
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
21696
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21697
else
 
21698
  ac_check_lib_save_LIBS=$LIBS
 
21699
LIBS="-l$bdb_libname  $LIBS"
 
21700
cat >conftest.$ac_ext <<_ACEOF
 
21701
/* confdefs.h.  */
 
21702
_ACEOF
 
21703
cat confdefs.h >>conftest.$ac_ext
 
21704
cat >>conftest.$ac_ext <<_ACEOF
 
21705
/* end confdefs.h.  */
 
21706
 
 
21707
/* Override any gcc2 internal prototype to avoid an error.  */
 
21708
#ifdef __cplusplus
 
21709
extern "C"
 
21710
#endif
 
21711
/* We use char because int might match the return type of a gcc2
 
21712
   builtin and then its argument prototype would still apply.  */
 
21713
char db_open ();
 
21714
int
 
21715
main ()
 
21716
{
 
21717
db_open ();
 
21718
  ;
 
21719
  return 0;
 
21720
}
 
21721
_ACEOF
 
21722
rm -f conftest.$ac_objext conftest$ac_exeext
 
21723
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
21724
  (eval $ac_link) 2>conftest.er1
 
21725
  ac_status=$?
 
21726
  grep -v '^ *+' conftest.er1 >conftest.err
 
21727
  rm -f conftest.er1
 
21728
  cat conftest.err >&5
 
21729
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21730
  (exit $ac_status); } &&
 
21731
         { ac_try='test -z "$ac_c_werror_flag"
 
21732
                         || test ! -s conftest.err'
 
21733
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21734
  (eval $ac_try) 2>&5
 
21735
  ac_status=$?
 
21736
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21737
  (exit $ac_status); }; } &&
 
21738
         { ac_try='test -s conftest$ac_exeext'
 
21739
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21740
  (eval $ac_try) 2>&5
 
21741
  ac_status=$?
 
21742
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21743
  (exit $ac_status); }; }; then
 
21744
  eval "$as_ac_Lib=yes"
 
21745
else
 
21746
  echo "$as_me: failed program was:" >&5
 
21747
sed 's/^/| /' conftest.$ac_ext >&5
 
21748
 
 
21749
eval "$as_ac_Lib=no"
 
21750
fi
 
21751
rm -f conftest.err conftest.$ac_objext \
 
21752
      conftest$ac_exeext conftest.$ac_ext
 
21753
LIBS=$ac_check_lib_save_LIBS
 
21754
fi
 
21755
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
21756
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
21757
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
21758
  result=yes
 
21759
else
 
21760
  result=no
 
21761
 
 
21762
fi
 
21763
 
 
21764
          fi
 
21765
 
 
21766
else
 
21767
  result="no"
 
21768
fi
 
21769
 
 
21770
 
 
21771
 
 
21772
        # If we found it, no need to search any more.
 
21773
        if test "$result" = "yes"; then
 
21774
          found="$bdb_place"
 
21775
          break
 
21776
        fi
 
21777
      done
 
21778
      test "$found" != "not" && break
 
21779
    done
 
21780
    test "$found" != "not" && break
 
21781
  done
 
21782
 
 
21783
  # Restore the original values of the flags we tweak.
 
21784
  LDFLAGS="$apu_check_lib_save_ldflags"
 
21785
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
21786
 
 
21787
  case "$found" in
 
21788
  "not")
 
21789
    apu_have_db=0
 
21790
    ;;
 
21791
  "std")
 
21792
    apu_db_header=$bdb_header
 
21793
    apu_db_lib=$bdb_libname
 
21794
    apu_have_db=1
 
21795
    ;;
 
21796
  *":"*)
 
21797
    header="`echo $found | sed -e 's/:.*$//'`"
 
21798
    lib="`echo $found | sed -e 's/^.*://'`"
 
21799
 
 
21800
 
 
21801
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
21802
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
21803
    APRUTIL_INCLUDES="-I$header"
 
21804
  else
 
21805
    apr_addto_bugger="-I$header"
 
21806
    for i in $apr_addto_bugger; do
 
21807
      apr_addto_duplicate="0"
 
21808
      for j in $APRUTIL_INCLUDES; do
 
21809
        if test "x$i" = "x$j"; then
 
21810
          apr_addto_duplicate="1"
 
21811
          break
 
21812
        fi
 
21813
      done
 
21814
      if test $apr_addto_duplicate = "0"; then
 
21815
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
21816
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
21817
      fi
 
21818
    done
 
21819
  fi
 
21820
 
 
21821
 
 
21822
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
21823
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
21824
    APRUTIL_LDFLAGS="-L$lib"
 
21825
  else
 
21826
    apr_addto_bugger="-L$lib"
 
21827
    for i in $apr_addto_bugger; do
 
21828
      apr_addto_duplicate="0"
 
21829
      for j in $APRUTIL_LDFLAGS; do
 
21830
        if test "x$i" = "x$j"; then
 
21831
          apr_addto_duplicate="1"
 
21832
          break
 
21833
        fi
 
21834
      done
 
21835
      if test $apr_addto_duplicate = "0"; then
 
21836
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
21837
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
21838
      fi
 
21839
    done
 
21840
  fi
 
21841
 
 
21842
    apu_db_header=$bdb_header
 
21843
    apu_db_lib=$bdb_libname
 
21844
    apu_have_db=1
 
21845
    ;;
 
21846
  *)
 
21847
 
 
21848
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
21849
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
21850
    APRUTIL_INCLUDES="-I$found/include"
 
21851
  else
 
21852
    apr_addto_bugger="-I$found/include"
 
21853
    for i in $apr_addto_bugger; do
 
21854
      apr_addto_duplicate="0"
 
21855
      for j in $APRUTIL_INCLUDES; do
 
21856
        if test "x$i" = "x$j"; then
 
21857
          apr_addto_duplicate="1"
 
21858
          break
 
21859
        fi
 
21860
      done
 
21861
      if test $apr_addto_duplicate = "0"; then
 
21862
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
21863
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
21864
      fi
 
21865
    done
 
21866
  fi
 
21867
 
 
21868
 
 
21869
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
21870
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
21871
    APRUTIL_LDFLAGS="-L$found/lib"
 
21872
  else
 
21873
    apr_addto_bugger="-L$found/lib"
 
21874
    for i in $apr_addto_bugger; do
 
21875
      apr_addto_duplicate="0"
 
21876
      for j in $APRUTIL_LDFLAGS; do
 
21877
        if test "x$i" = "x$j"; then
 
21878
          apr_addto_duplicate="1"
 
21879
          break
 
21880
        fi
 
21881
      done
 
21882
      if test $apr_addto_duplicate = "0"; then
 
21883
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
21884
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
21885
      fi
 
21886
    done
 
21887
  fi
 
21888
 
 
21889
    apu_db_header=$bdb_header
 
21890
    apu_db_lib=$bdb_libname
 
21891
    apu_have_db=1
 
21892
    ;;
 
21893
  esac
 
21894
 
 
21895
  if test "$apu_have_db" = "1"; then
 
21896
    apu_db_version=2
 
21897
  fi
 
21898
 
 
21899
    if test "$apu_db_version" != "2"; then
 
21900
      { { echo "$as_me:$LINENO: error: Berkeley db2 not found" >&5
 
21901
echo "$as_me: error: Berkeley db2 not found" >&2;}
 
21902
   { (exit 1); exit 1; }; }
 
21903
    fi
 
21904
    ;;
 
21905
  db3)
 
21906
 
 
21907
  places="$check_places"
 
21908
  if test -z "$places"; then
 
21909
    places="std"
 
21910
  fi
 
21911
 
 
21912
  bdb_version=3
 
21913
  if test "-1" != "-1"; then
 
21914
    bdb_version="$bdb_version.-1"
 
21915
    if test "-1" != "-1"; then
 
21916
      bdb_version="$bdb_version.-1"
 
21917
    fi
 
21918
  fi
 
21919
  bdb_places="$places"
 
21920
  bdb_default_search_headers="db3/db.h db.h"
 
21921
  bdb_default_search_lib_names="db3 db"
 
21922
 
 
21923
 
 
21924
  apu_have_db=0
 
21925
 
 
21926
  # Save the original values of the flags we tweak.
 
21927
  apu_check_lib_save_libs="$LIBS"
 
21928
  apu_check_lib_save_ldflags="$LDFLAGS"
 
21929
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
21930
 
 
21931
  # The variable `found' is the prefix under which we've found
 
21932
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
21933
  found=not
 
21934
  for bdb_place in $bdb_places; do
 
21935
 
 
21936
    LDFLAGS="$apu_check_lib_save_ldflags"
 
21937
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
21938
    case "$bdb_place" in
 
21939
      "std" )
 
21940
        description="the standard places"
 
21941
      ;;
 
21942
      *":"* )
 
21943
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
21944
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
21945
        CPPFLAGS="$CPPFLAGS -I$header"
 
21946
        LDFLAGS="$LDFLAGS -L$lib"
 
21947
        description="$header and $lib"
 
21948
      ;;
 
21949
      * )
 
21950
        if test -d $bdb_place; then
 
21951
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
21952
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
21953
        else
 
21954
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
21955
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
21956
          echo "$as_me:$LINENO: result: directory not found" >&5
 
21957
echo "${ECHO_T}directory not found" >&6
 
21958
          continue
 
21959
        fi
 
21960
        description="$bdb_place"
 
21961
      ;;
 
21962
    esac
 
21963
 
 
21964
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
21965
    # trick to display a message instead.
 
21966
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
21967
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
21968
    echo "$as_me:$LINENO: result: " >&5
 
21969
echo "${ECHO_T}" >&6
 
21970
 
 
21971
    for bdb_libname in $bdb_default_search_lib_names; do
 
21972
      for bdb_header in $bdb_default_search_headers; do
 
21973
        # Clear the header cache variable for each location
 
21974
 
 
21975
        cache_id="`echo ac_cv_header_${bdb_header} \
 
21976
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
21977
 
 
21978
        unset $cache_id
 
21979
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
21980
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
21981
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
21982
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
21983
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
21984
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21985
fi
 
21986
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
21987
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
21988
else
 
21989
  # Is the header compilable?
 
21990
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
21991
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
21992
cat >conftest.$ac_ext <<_ACEOF
 
21993
/* confdefs.h.  */
 
21994
_ACEOF
 
21995
cat confdefs.h >>conftest.$ac_ext
 
21996
cat >>conftest.$ac_ext <<_ACEOF
 
21997
/* end confdefs.h.  */
 
21998
$ac_includes_default
 
21999
#include <$bdb_header>
 
22000
_ACEOF
 
22001
rm -f conftest.$ac_objext
 
22002
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22003
  (eval $ac_compile) 2>conftest.er1
 
22004
  ac_status=$?
 
22005
  grep -v '^ *+' conftest.er1 >conftest.err
 
22006
  rm -f conftest.er1
 
22007
  cat conftest.err >&5
 
22008
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22009
  (exit $ac_status); } &&
 
22010
         { ac_try='test -z "$ac_c_werror_flag"
 
22011
                         || test ! -s conftest.err'
 
22012
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22013
  (eval $ac_try) 2>&5
 
22014
  ac_status=$?
 
22015
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22016
  (exit $ac_status); }; } &&
 
22017
         { ac_try='test -s conftest.$ac_objext'
 
22018
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22019
  (eval $ac_try) 2>&5
 
22020
  ac_status=$?
 
22021
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22022
  (exit $ac_status); }; }; then
 
22023
  ac_header_compiler=yes
 
22024
else
 
22025
  echo "$as_me: failed program was:" >&5
 
22026
sed 's/^/| /' conftest.$ac_ext >&5
 
22027
 
 
22028
ac_header_compiler=no
 
22029
fi
 
22030
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22031
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
22032
echo "${ECHO_T}$ac_header_compiler" >&6
 
22033
 
 
22034
# Is the header present?
 
22035
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
22036
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
22037
cat >conftest.$ac_ext <<_ACEOF
 
22038
/* confdefs.h.  */
 
22039
_ACEOF
 
22040
cat confdefs.h >>conftest.$ac_ext
 
22041
cat >>conftest.$ac_ext <<_ACEOF
 
22042
/* end confdefs.h.  */
 
22043
#include <$bdb_header>
 
22044
_ACEOF
 
22045
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
22046
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
22047
  ac_status=$?
 
22048
  grep -v '^ *+' conftest.er1 >conftest.err
 
22049
  rm -f conftest.er1
 
22050
  cat conftest.err >&5
 
22051
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22052
  (exit $ac_status); } >/dev/null; then
 
22053
  if test -s conftest.err; then
 
22054
    ac_cpp_err=$ac_c_preproc_warn_flag
 
22055
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
22056
  else
 
22057
    ac_cpp_err=
 
22058
  fi
 
22059
else
 
22060
  ac_cpp_err=yes
 
22061
fi
 
22062
if test -z "$ac_cpp_err"; then
 
22063
  ac_header_preproc=yes
 
22064
else
 
22065
  echo "$as_me: failed program was:" >&5
 
22066
sed 's/^/| /' conftest.$ac_ext >&5
 
22067
 
 
22068
  ac_header_preproc=no
 
22069
fi
 
22070
rm -f conftest.err conftest.$ac_ext
 
22071
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
22072
echo "${ECHO_T}$ac_header_preproc" >&6
 
22073
 
 
22074
# So?  What about this header?
 
22075
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
22076
  yes:no: )
 
22077
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
22078
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
22079
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
22080
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
22081
    ac_header_preproc=yes
 
22082
    ;;
 
22083
  no:yes:* )
 
22084
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
22085
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
22086
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
22087
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
22088
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
22089
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
22090
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
22091
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
22092
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
22093
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
22094
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
22095
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
22096
    (
 
22097
      cat <<\_ASBOX
 
22098
## ------------------------------------------ ##
 
22099
## Report this to the AC_PACKAGE_NAME lists.  ##
 
22100
## ------------------------------------------ ##
 
22101
_ASBOX
 
22102
    ) |
 
22103
      sed "s/^/$as_me: WARNING:     /" >&2
 
22104
    ;;
 
22105
esac
 
22106
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
22107
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
22108
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22109
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22110
else
 
22111
  eval "$as_ac_Header=\$ac_header_preproc"
 
22112
fi
 
22113
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
22114
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
22115
 
 
22116
fi
 
22117
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
22118
 
 
22119
          if test "3" = "3" -o "3" = "4"; then
 
22120
            # We generate a separate cache variable for each prefix and libname
 
22121
            # we search under.  That way, we avoid caching information that
 
22122
            # changes if the user runs `configure' with a different set of
 
22123
            # switches.
 
22124
 
 
22125
            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
22126
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
22127
 
 
22128
 
 
22129
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
22130
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
22131
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
22132
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22133
else
 
22134
 
 
22135
 
 
22136
    apu_try_berkeley_db_save_libs="$LIBS"
 
22137
 
 
22138
    apu_check_berkeley_db_major=3
 
22139
    apu_check_berkeley_db_minor=-1
 
22140
    apu_check_berkeley_db_patch=-1
 
22141
    apu_try_berkeley_db_header=$bdb_header
 
22142
    apu_try_berkeley_db_libname=$bdb_libname
 
22143
 
 
22144
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
22145
    if test "$cross_compiling" = yes; then
 
22146
  apu_try_berkeley_db=yes
 
22147
 
 
22148
else
 
22149
  cat >conftest.$ac_ext <<_ACEOF
 
22150
/* confdefs.h.  */
 
22151
_ACEOF
 
22152
cat confdefs.h >>conftest.$ac_ext
 
22153
cat >>conftest.$ac_ext <<_ACEOF
 
22154
/* end confdefs.h.  */
 
22155
 
 
22156
#include <stdio.h>
 
22157
#include <$apu_try_berkeley_db_header>
 
22158
main ()
 
22159
{
 
22160
  int major, minor, patch;
 
22161
 
 
22162
  db_version(&major, &minor, &patch);
 
22163
 
 
22164
  /* Sanity check: ensure that db.h constants actually match the db library */
 
22165
  if (major != DB_VERSION_MAJOR
 
22166
      || minor != DB_VERSION_MINOR
 
22167
      || patch != DB_VERSION_PATCH)
 
22168
    exit (1);
 
22169
 
 
22170
  /* Run-time check:  ensure the library claims to be the correct version. */
 
22171
 
 
22172
  if ($apu_check_berkeley_db_major != -1) {
 
22173
    if (major < $apu_check_berkeley_db_major)
 
22174
      exit (1);
 
22175
    if (major > $apu_check_berkeley_db_major)
 
22176
      exit (0);
 
22177
  }
 
22178
 
 
22179
  if ($apu_check_berkeley_db_minor != -1) {
 
22180
    if (minor < $apu_check_berkeley_db_minor)
 
22181
      exit (1);
 
22182
    if (minor > $apu_check_berkeley_db_minor)
 
22183
      exit (0);
 
22184
  }
 
22185
 
 
22186
  if ($apu_check_berkeley_db_patch == -1
 
22187
      || patch >= $apu_check_berkeley_db_patch)
 
22188
    exit (0);
 
22189
  else
 
22190
    exit (1);
 
22191
}
 
22192
 
 
22193
_ACEOF
 
22194
rm -f conftest$ac_exeext
 
22195
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22196
  (eval $ac_link) 2>&5
 
22197
  ac_status=$?
 
22198
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22199
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
22200
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22201
  (eval $ac_try) 2>&5
 
22202
  ac_status=$?
 
22203
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22204
  (exit $ac_status); }; }; then
 
22205
  apu_try_berkeley_db=yes
 
22206
else
 
22207
  echo "$as_me: program exited with status $ac_status" >&5
 
22208
echo "$as_me: failed program was:" >&5
 
22209
sed 's/^/| /' conftest.$ac_ext >&5
 
22210
 
 
22211
( exit $ac_status )
 
22212
apu_try_berkeley_db=no
 
22213
fi
 
22214
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
22215
fi
 
22216
 
 
22217
    LIBS="$apu_try_berkeley_db_save_libs"
 
22218
 
 
22219
 
 
22220
                eval "$cache_id=$apu_try_berkeley_db"
 
22221
 
 
22222
fi
 
22223
 
 
22224
            result="`eval echo '$'$cache_id`"
 
22225
            echo "$as_me:$LINENO: result: $result" >&5
 
22226
echo "${ECHO_T}$result" >&6
 
22227
          elif test "3" = "1"; then
 
22228
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
22229
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
22230
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
22231
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
22232
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22233
else
 
22234
  ac_check_lib_save_LIBS=$LIBS
 
22235
LIBS="-l$bdb_libname  $LIBS"
 
22236
cat >conftest.$ac_ext <<_ACEOF
 
22237
/* confdefs.h.  */
 
22238
_ACEOF
 
22239
cat confdefs.h >>conftest.$ac_ext
 
22240
cat >>conftest.$ac_ext <<_ACEOF
 
22241
/* end confdefs.h.  */
 
22242
 
 
22243
/* Override any gcc2 internal prototype to avoid an error.  */
 
22244
#ifdef __cplusplus
 
22245
extern "C"
 
22246
#endif
 
22247
/* We use char because int might match the return type of a gcc2
 
22248
   builtin and then its argument prototype would still apply.  */
 
22249
char dbopen ();
 
22250
int
 
22251
main ()
 
22252
{
 
22253
dbopen ();
 
22254
  ;
 
22255
  return 0;
 
22256
}
 
22257
_ACEOF
 
22258
rm -f conftest.$ac_objext conftest$ac_exeext
 
22259
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22260
  (eval $ac_link) 2>conftest.er1
 
22261
  ac_status=$?
 
22262
  grep -v '^ *+' conftest.er1 >conftest.err
 
22263
  rm -f conftest.er1
 
22264
  cat conftest.err >&5
 
22265
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22266
  (exit $ac_status); } &&
 
22267
         { ac_try='test -z "$ac_c_werror_flag"
 
22268
                         || test ! -s conftest.err'
 
22269
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22270
  (eval $ac_try) 2>&5
 
22271
  ac_status=$?
 
22272
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22273
  (exit $ac_status); }; } &&
 
22274
         { ac_try='test -s conftest$ac_exeext'
 
22275
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22276
  (eval $ac_try) 2>&5
 
22277
  ac_status=$?
 
22278
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22279
  (exit $ac_status); }; }; then
 
22280
  eval "$as_ac_Lib=yes"
 
22281
else
 
22282
  echo "$as_me: failed program was:" >&5
 
22283
sed 's/^/| /' conftest.$ac_ext >&5
 
22284
 
 
22285
eval "$as_ac_Lib=no"
 
22286
fi
 
22287
rm -f conftest.err conftest.$ac_objext \
 
22288
      conftest$ac_exeext conftest.$ac_ext
 
22289
LIBS=$ac_check_lib_save_LIBS
 
22290
fi
 
22291
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
22292
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
22293
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
22294
  result=yes
 
22295
else
 
22296
  result=no
 
22297
 
 
22298
fi
 
22299
 
 
22300
          elif test "3" = "2"; then
 
22301
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
22302
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
22303
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
22304
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
22305
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22306
else
 
22307
  ac_check_lib_save_LIBS=$LIBS
 
22308
LIBS="-l$bdb_libname  $LIBS"
 
22309
cat >conftest.$ac_ext <<_ACEOF
 
22310
/* confdefs.h.  */
 
22311
_ACEOF
 
22312
cat confdefs.h >>conftest.$ac_ext
 
22313
cat >>conftest.$ac_ext <<_ACEOF
 
22314
/* end confdefs.h.  */
 
22315
 
 
22316
/* Override any gcc2 internal prototype to avoid an error.  */
 
22317
#ifdef __cplusplus
 
22318
extern "C"
 
22319
#endif
 
22320
/* We use char because int might match the return type of a gcc2
 
22321
   builtin and then its argument prototype would still apply.  */
 
22322
char db_open ();
 
22323
int
 
22324
main ()
 
22325
{
 
22326
db_open ();
 
22327
  ;
 
22328
  return 0;
 
22329
}
 
22330
_ACEOF
 
22331
rm -f conftest.$ac_objext conftest$ac_exeext
 
22332
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22333
  (eval $ac_link) 2>conftest.er1
 
22334
  ac_status=$?
 
22335
  grep -v '^ *+' conftest.er1 >conftest.err
 
22336
  rm -f conftest.er1
 
22337
  cat conftest.err >&5
 
22338
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22339
  (exit $ac_status); } &&
 
22340
         { ac_try='test -z "$ac_c_werror_flag"
 
22341
                         || test ! -s conftest.err'
 
22342
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22343
  (eval $ac_try) 2>&5
 
22344
  ac_status=$?
 
22345
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22346
  (exit $ac_status); }; } &&
 
22347
         { ac_try='test -s conftest$ac_exeext'
 
22348
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22349
  (eval $ac_try) 2>&5
 
22350
  ac_status=$?
 
22351
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22352
  (exit $ac_status); }; }; then
 
22353
  eval "$as_ac_Lib=yes"
 
22354
else
 
22355
  echo "$as_me: failed program was:" >&5
 
22356
sed 's/^/| /' conftest.$ac_ext >&5
 
22357
 
 
22358
eval "$as_ac_Lib=no"
 
22359
fi
 
22360
rm -f conftest.err conftest.$ac_objext \
 
22361
      conftest$ac_exeext conftest.$ac_ext
 
22362
LIBS=$ac_check_lib_save_LIBS
 
22363
fi
 
22364
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
22365
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
22366
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
22367
  result=yes
 
22368
else
 
22369
  result=no
 
22370
 
 
22371
fi
 
22372
 
 
22373
          fi
 
22374
 
 
22375
else
 
22376
  result="no"
 
22377
fi
 
22378
 
 
22379
 
 
22380
 
 
22381
        # If we found it, no need to search any more.
 
22382
        if test "$result" = "yes"; then
 
22383
          found="$bdb_place"
 
22384
          break
 
22385
        fi
 
22386
      done
 
22387
      test "$found" != "not" && break
 
22388
    done
 
22389
    test "$found" != "not" && break
 
22390
  done
 
22391
 
 
22392
  # Restore the original values of the flags we tweak.
 
22393
  LDFLAGS="$apu_check_lib_save_ldflags"
 
22394
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
22395
 
 
22396
  case "$found" in
 
22397
  "not")
 
22398
    apu_have_db=0
 
22399
    ;;
 
22400
  "std")
 
22401
    apu_db_header=$bdb_header
 
22402
    apu_db_lib=$bdb_libname
 
22403
    apu_have_db=1
 
22404
    ;;
 
22405
  *":"*)
 
22406
    header="`echo $found | sed -e 's/:.*$//'`"
 
22407
    lib="`echo $found | sed -e 's/^.*://'`"
 
22408
 
 
22409
 
 
22410
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
22411
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
22412
    APRUTIL_INCLUDES="-I$header"
 
22413
  else
 
22414
    apr_addto_bugger="-I$header"
 
22415
    for i in $apr_addto_bugger; do
 
22416
      apr_addto_duplicate="0"
 
22417
      for j in $APRUTIL_INCLUDES; do
 
22418
        if test "x$i" = "x$j"; then
 
22419
          apr_addto_duplicate="1"
 
22420
          break
 
22421
        fi
 
22422
      done
 
22423
      if test $apr_addto_duplicate = "0"; then
 
22424
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
22425
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
22426
      fi
 
22427
    done
 
22428
  fi
 
22429
 
 
22430
 
 
22431
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
22432
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
22433
    APRUTIL_LDFLAGS="-L$lib"
 
22434
  else
 
22435
    apr_addto_bugger="-L$lib"
 
22436
    for i in $apr_addto_bugger; do
 
22437
      apr_addto_duplicate="0"
 
22438
      for j in $APRUTIL_LDFLAGS; do
 
22439
        if test "x$i" = "x$j"; then
 
22440
          apr_addto_duplicate="1"
 
22441
          break
 
22442
        fi
 
22443
      done
 
22444
      if test $apr_addto_duplicate = "0"; then
 
22445
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
22446
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
22447
      fi
 
22448
    done
 
22449
  fi
 
22450
 
 
22451
    apu_db_header=$bdb_header
 
22452
    apu_db_lib=$bdb_libname
 
22453
    apu_have_db=1
 
22454
    ;;
 
22455
  *)
 
22456
 
 
22457
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
22458
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
22459
    APRUTIL_INCLUDES="-I$found/include"
 
22460
  else
 
22461
    apr_addto_bugger="-I$found/include"
 
22462
    for i in $apr_addto_bugger; do
 
22463
      apr_addto_duplicate="0"
 
22464
      for j in $APRUTIL_INCLUDES; do
 
22465
        if test "x$i" = "x$j"; then
 
22466
          apr_addto_duplicate="1"
 
22467
          break
 
22468
        fi
 
22469
      done
 
22470
      if test $apr_addto_duplicate = "0"; then
 
22471
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
22472
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
22473
      fi
 
22474
    done
 
22475
  fi
 
22476
 
 
22477
 
 
22478
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
22479
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
22480
    APRUTIL_LDFLAGS="-L$found/lib"
 
22481
  else
 
22482
    apr_addto_bugger="-L$found/lib"
 
22483
    for i in $apr_addto_bugger; do
 
22484
      apr_addto_duplicate="0"
 
22485
      for j in $APRUTIL_LDFLAGS; do
 
22486
        if test "x$i" = "x$j"; then
 
22487
          apr_addto_duplicate="1"
 
22488
          break
 
22489
        fi
 
22490
      done
 
22491
      if test $apr_addto_duplicate = "0"; then
 
22492
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
22493
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
22494
      fi
 
22495
    done
 
22496
  fi
 
22497
 
 
22498
    apu_db_header=$bdb_header
 
22499
    apu_db_lib=$bdb_libname
 
22500
    apu_have_db=1
 
22501
    ;;
 
22502
  esac
 
22503
 
 
22504
  if test "$apu_have_db" = "1"; then
 
22505
    apu_db_version=3
 
22506
  fi
 
22507
 
 
22508
    if test "$apu_db_version" != "3"; then
 
22509
      { { echo "$as_me:$LINENO: error: Berkeley db3 not found" >&5
 
22510
echo "$as_me: error: Berkeley db3 not found" >&2;}
 
22511
   { (exit 1); exit 1; }; }
 
22512
    fi
 
22513
    ;;
 
22514
  db4)
 
22515
 
 
22516
  places="$check_places"
 
22517
  if test -z "$places"; then
 
22518
    places="std /usr/local /usr/local/BerkeleyDB.4.0 /boot/home/config"
 
22519
  fi
 
22520
 
 
22521
  bdb_version="4"
 
22522
  if test ""0"" != "-1"; then
 
22523
    bdb_version="$bdb_version."0""
 
22524
    if test ""-1"" != "-1"; then
 
22525
      bdb_version="$bdb_version."-1""
 
22526
    fi
 
22527
  fi
 
22528
  bdb_places="$places"
 
22529
  bdb_default_search_headers="db4/db.h db.h"
 
22530
  bdb_default_search_lib_names="db-4.0 db4 db"
 
22531
 
 
22532
 
 
22533
  apu_have_db=0
 
22534
 
 
22535
  # Save the original values of the flags we tweak.
 
22536
  apu_check_lib_save_libs="$LIBS"
 
22537
  apu_check_lib_save_ldflags="$LDFLAGS"
 
22538
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
22539
 
 
22540
  # The variable `found' is the prefix under which we've found
 
22541
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
22542
  found=not
 
22543
  for bdb_place in $bdb_places; do
 
22544
 
 
22545
    LDFLAGS="$apu_check_lib_save_ldflags"
 
22546
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
22547
    case "$bdb_place" in
 
22548
      "std" )
 
22549
        description="the standard places"
 
22550
      ;;
 
22551
      *":"* )
 
22552
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
22553
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
22554
        CPPFLAGS="$CPPFLAGS -I$header"
 
22555
        LDFLAGS="$LDFLAGS -L$lib"
 
22556
        description="$header and $lib"
 
22557
      ;;
 
22558
      * )
 
22559
        if test -d $bdb_place; then
 
22560
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
22561
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
22562
        else
 
22563
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
22564
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
22565
          echo "$as_me:$LINENO: result: directory not found" >&5
 
22566
echo "${ECHO_T}directory not found" >&6
 
22567
          continue
 
22568
        fi
 
22569
        description="$bdb_place"
 
22570
      ;;
 
22571
    esac
 
22572
 
 
22573
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
22574
    # trick to display a message instead.
 
22575
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
22576
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
22577
    echo "$as_me:$LINENO: result: " >&5
 
22578
echo "${ECHO_T}" >&6
 
22579
 
 
22580
    for bdb_libname in $bdb_default_search_lib_names; do
 
22581
      for bdb_header in $bdb_default_search_headers; do
 
22582
        # Clear the header cache variable for each location
 
22583
 
 
22584
        cache_id="`echo ac_cv_header_${bdb_header} \
 
22585
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
22586
 
 
22587
        unset $cache_id
 
22588
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
22589
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22590
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
22591
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
22592
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22593
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22594
fi
 
22595
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
22596
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
22597
else
 
22598
  # Is the header compilable?
 
22599
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
22600
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
22601
cat >conftest.$ac_ext <<_ACEOF
 
22602
/* confdefs.h.  */
 
22603
_ACEOF
 
22604
cat confdefs.h >>conftest.$ac_ext
 
22605
cat >>conftest.$ac_ext <<_ACEOF
 
22606
/* end confdefs.h.  */
 
22607
$ac_includes_default
 
22608
#include <$bdb_header>
 
22609
_ACEOF
 
22610
rm -f conftest.$ac_objext
 
22611
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22612
  (eval $ac_compile) 2>conftest.er1
 
22613
  ac_status=$?
 
22614
  grep -v '^ *+' conftest.er1 >conftest.err
 
22615
  rm -f conftest.er1
 
22616
  cat conftest.err >&5
 
22617
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22618
  (exit $ac_status); } &&
 
22619
         { ac_try='test -z "$ac_c_werror_flag"
 
22620
                         || test ! -s conftest.err'
 
22621
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22622
  (eval $ac_try) 2>&5
 
22623
  ac_status=$?
 
22624
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22625
  (exit $ac_status); }; } &&
 
22626
         { ac_try='test -s conftest.$ac_objext'
 
22627
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22628
  (eval $ac_try) 2>&5
 
22629
  ac_status=$?
 
22630
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22631
  (exit $ac_status); }; }; then
 
22632
  ac_header_compiler=yes
 
22633
else
 
22634
  echo "$as_me: failed program was:" >&5
 
22635
sed 's/^/| /' conftest.$ac_ext >&5
 
22636
 
 
22637
ac_header_compiler=no
 
22638
fi
 
22639
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22640
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
22641
echo "${ECHO_T}$ac_header_compiler" >&6
 
22642
 
 
22643
# Is the header present?
 
22644
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
22645
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
22646
cat >conftest.$ac_ext <<_ACEOF
 
22647
/* confdefs.h.  */
 
22648
_ACEOF
 
22649
cat confdefs.h >>conftest.$ac_ext
 
22650
cat >>conftest.$ac_ext <<_ACEOF
 
22651
/* end confdefs.h.  */
 
22652
#include <$bdb_header>
 
22653
_ACEOF
 
22654
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
22655
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
22656
  ac_status=$?
 
22657
  grep -v '^ *+' conftest.er1 >conftest.err
 
22658
  rm -f conftest.er1
 
22659
  cat conftest.err >&5
 
22660
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22661
  (exit $ac_status); } >/dev/null; then
 
22662
  if test -s conftest.err; then
 
22663
    ac_cpp_err=$ac_c_preproc_warn_flag
 
22664
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
22665
  else
 
22666
    ac_cpp_err=
 
22667
  fi
 
22668
else
 
22669
  ac_cpp_err=yes
 
22670
fi
 
22671
if test -z "$ac_cpp_err"; then
 
22672
  ac_header_preproc=yes
 
22673
else
 
22674
  echo "$as_me: failed program was:" >&5
 
22675
sed 's/^/| /' conftest.$ac_ext >&5
 
22676
 
 
22677
  ac_header_preproc=no
 
22678
fi
 
22679
rm -f conftest.err conftest.$ac_ext
 
22680
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
22681
echo "${ECHO_T}$ac_header_preproc" >&6
 
22682
 
 
22683
# So?  What about this header?
 
22684
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
22685
  yes:no: )
 
22686
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
22687
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
22688
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
22689
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
22690
    ac_header_preproc=yes
 
22691
    ;;
 
22692
  no:yes:* )
 
22693
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
22694
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
22695
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
22696
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
22697
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
22698
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
22699
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
22700
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
22701
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
22702
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
22703
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
22704
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
22705
    (
 
22706
      cat <<\_ASBOX
 
22707
## ------------------------------------------ ##
 
22708
## Report this to the AC_PACKAGE_NAME lists.  ##
 
22709
## ------------------------------------------ ##
 
22710
_ASBOX
 
22711
    ) |
 
22712
      sed "s/^/$as_me: WARNING:     /" >&2
 
22713
    ;;
 
22714
esac
 
22715
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
22716
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
22717
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22718
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22719
else
 
22720
  eval "$as_ac_Header=\$ac_header_preproc"
 
22721
fi
 
22722
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
22723
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
22724
 
 
22725
fi
 
22726
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
22727
 
 
22728
          if test ""4"" = "3" -o ""4"" = "4"; then
 
22729
            # We generate a separate cache variable for each prefix and libname
 
22730
            # we search under.  That way, we avoid caching information that
 
22731
            # changes if the user runs `configure' with a different set of
 
22732
            # switches.
 
22733
 
 
22734
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"0"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
22735
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
22736
 
 
22737
 
 
22738
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
22739
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
22740
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
22741
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22742
else
 
22743
 
 
22744
 
 
22745
    apu_try_berkeley_db_save_libs="$LIBS"
 
22746
 
 
22747
    apu_check_berkeley_db_major="4"
 
22748
    apu_check_berkeley_db_minor="0"
 
22749
    apu_check_berkeley_db_patch="-1"
 
22750
    apu_try_berkeley_db_header=$bdb_header
 
22751
    apu_try_berkeley_db_libname=$bdb_libname
 
22752
 
 
22753
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
22754
    if test "$cross_compiling" = yes; then
 
22755
  apu_try_berkeley_db=yes
 
22756
 
 
22757
else
 
22758
  cat >conftest.$ac_ext <<_ACEOF
 
22759
/* confdefs.h.  */
 
22760
_ACEOF
 
22761
cat confdefs.h >>conftest.$ac_ext
 
22762
cat >>conftest.$ac_ext <<_ACEOF
 
22763
/* end confdefs.h.  */
 
22764
 
 
22765
#include <stdio.h>
 
22766
#include <$apu_try_berkeley_db_header>
 
22767
main ()
 
22768
{
 
22769
  int major, minor, patch;
 
22770
 
 
22771
  db_version(&major, &minor, &patch);
 
22772
 
 
22773
  /* Sanity check: ensure that db.h constants actually match the db library */
 
22774
  if (major != DB_VERSION_MAJOR
 
22775
      || minor != DB_VERSION_MINOR
 
22776
      || patch != DB_VERSION_PATCH)
 
22777
    exit (1);
 
22778
 
 
22779
  /* Run-time check:  ensure the library claims to be the correct version. */
 
22780
 
 
22781
  if ($apu_check_berkeley_db_major != -1) {
 
22782
    if (major < $apu_check_berkeley_db_major)
 
22783
      exit (1);
 
22784
    if (major > $apu_check_berkeley_db_major)
 
22785
      exit (0);
 
22786
  }
 
22787
 
 
22788
  if ($apu_check_berkeley_db_minor != -1) {
 
22789
    if (minor < $apu_check_berkeley_db_minor)
 
22790
      exit (1);
 
22791
    if (minor > $apu_check_berkeley_db_minor)
 
22792
      exit (0);
 
22793
  }
 
22794
 
 
22795
  if ($apu_check_berkeley_db_patch == -1
 
22796
      || patch >= $apu_check_berkeley_db_patch)
 
22797
    exit (0);
 
22798
  else
 
22799
    exit (1);
 
22800
}
 
22801
 
 
22802
_ACEOF
 
22803
rm -f conftest$ac_exeext
 
22804
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22805
  (eval $ac_link) 2>&5
 
22806
  ac_status=$?
 
22807
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22808
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
22809
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22810
  (eval $ac_try) 2>&5
 
22811
  ac_status=$?
 
22812
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22813
  (exit $ac_status); }; }; then
 
22814
  apu_try_berkeley_db=yes
 
22815
else
 
22816
  echo "$as_me: program exited with status $ac_status" >&5
 
22817
echo "$as_me: failed program was:" >&5
 
22818
sed 's/^/| /' conftest.$ac_ext >&5
 
22819
 
 
22820
( exit $ac_status )
 
22821
apu_try_berkeley_db=no
 
22822
fi
 
22823
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
22824
fi
 
22825
 
 
22826
    LIBS="$apu_try_berkeley_db_save_libs"
 
22827
 
 
22828
 
 
22829
                eval "$cache_id=$apu_try_berkeley_db"
 
22830
 
 
22831
fi
 
22832
 
 
22833
            result="`eval echo '$'$cache_id`"
 
22834
            echo "$as_me:$LINENO: result: $result" >&5
 
22835
echo "${ECHO_T}$result" >&6
 
22836
          elif test ""4"" = "1"; then
 
22837
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
22838
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
22839
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
22840
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
22841
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22842
else
 
22843
  ac_check_lib_save_LIBS=$LIBS
 
22844
LIBS="-l$bdb_libname  $LIBS"
 
22845
cat >conftest.$ac_ext <<_ACEOF
 
22846
/* confdefs.h.  */
 
22847
_ACEOF
 
22848
cat confdefs.h >>conftest.$ac_ext
 
22849
cat >>conftest.$ac_ext <<_ACEOF
 
22850
/* end confdefs.h.  */
 
22851
 
 
22852
/* Override any gcc2 internal prototype to avoid an error.  */
 
22853
#ifdef __cplusplus
 
22854
extern "C"
 
22855
#endif
 
22856
/* We use char because int might match the return type of a gcc2
 
22857
   builtin and then its argument prototype would still apply.  */
 
22858
char dbopen ();
 
22859
int
 
22860
main ()
 
22861
{
 
22862
dbopen ();
 
22863
  ;
 
22864
  return 0;
 
22865
}
 
22866
_ACEOF
 
22867
rm -f conftest.$ac_objext conftest$ac_exeext
 
22868
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22869
  (eval $ac_link) 2>conftest.er1
 
22870
  ac_status=$?
 
22871
  grep -v '^ *+' conftest.er1 >conftest.err
 
22872
  rm -f conftest.er1
 
22873
  cat conftest.err >&5
 
22874
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22875
  (exit $ac_status); } &&
 
22876
         { ac_try='test -z "$ac_c_werror_flag"
 
22877
                         || test ! -s conftest.err'
 
22878
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22879
  (eval $ac_try) 2>&5
 
22880
  ac_status=$?
 
22881
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22882
  (exit $ac_status); }; } &&
 
22883
         { ac_try='test -s conftest$ac_exeext'
 
22884
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22885
  (eval $ac_try) 2>&5
 
22886
  ac_status=$?
 
22887
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22888
  (exit $ac_status); }; }; then
 
22889
  eval "$as_ac_Lib=yes"
 
22890
else
 
22891
  echo "$as_me: failed program was:" >&5
 
22892
sed 's/^/| /' conftest.$ac_ext >&5
 
22893
 
 
22894
eval "$as_ac_Lib=no"
 
22895
fi
 
22896
rm -f conftest.err conftest.$ac_objext \
 
22897
      conftest$ac_exeext conftest.$ac_ext
 
22898
LIBS=$ac_check_lib_save_LIBS
 
22899
fi
 
22900
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
22901
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
22902
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
22903
  result=yes
 
22904
else
 
22905
  result=no
 
22906
 
 
22907
fi
 
22908
 
 
22909
          elif test ""4"" = "2"; then
 
22910
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
22911
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
22912
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
22913
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
22914
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22915
else
 
22916
  ac_check_lib_save_LIBS=$LIBS
 
22917
LIBS="-l$bdb_libname  $LIBS"
 
22918
cat >conftest.$ac_ext <<_ACEOF
 
22919
/* confdefs.h.  */
 
22920
_ACEOF
 
22921
cat confdefs.h >>conftest.$ac_ext
 
22922
cat >>conftest.$ac_ext <<_ACEOF
 
22923
/* end confdefs.h.  */
 
22924
 
 
22925
/* Override any gcc2 internal prototype to avoid an error.  */
 
22926
#ifdef __cplusplus
 
22927
extern "C"
 
22928
#endif
 
22929
/* We use char because int might match the return type of a gcc2
 
22930
   builtin and then its argument prototype would still apply.  */
 
22931
char db_open ();
 
22932
int
 
22933
main ()
 
22934
{
 
22935
db_open ();
 
22936
  ;
 
22937
  return 0;
 
22938
}
 
22939
_ACEOF
 
22940
rm -f conftest.$ac_objext conftest$ac_exeext
 
22941
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22942
  (eval $ac_link) 2>conftest.er1
 
22943
  ac_status=$?
 
22944
  grep -v '^ *+' conftest.er1 >conftest.err
 
22945
  rm -f conftest.er1
 
22946
  cat conftest.err >&5
 
22947
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22948
  (exit $ac_status); } &&
 
22949
         { ac_try='test -z "$ac_c_werror_flag"
 
22950
                         || test ! -s conftest.err'
 
22951
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22952
  (eval $ac_try) 2>&5
 
22953
  ac_status=$?
 
22954
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22955
  (exit $ac_status); }; } &&
 
22956
         { ac_try='test -s conftest$ac_exeext'
 
22957
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22958
  (eval $ac_try) 2>&5
 
22959
  ac_status=$?
 
22960
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22961
  (exit $ac_status); }; }; then
 
22962
  eval "$as_ac_Lib=yes"
 
22963
else
 
22964
  echo "$as_me: failed program was:" >&5
 
22965
sed 's/^/| /' conftest.$ac_ext >&5
 
22966
 
 
22967
eval "$as_ac_Lib=no"
 
22968
fi
 
22969
rm -f conftest.err conftest.$ac_objext \
 
22970
      conftest$ac_exeext conftest.$ac_ext
 
22971
LIBS=$ac_check_lib_save_LIBS
 
22972
fi
 
22973
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
22974
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
22975
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
22976
  result=yes
 
22977
else
 
22978
  result=no
 
22979
 
 
22980
fi
 
22981
 
 
22982
          fi
 
22983
 
 
22984
else
 
22985
  result="no"
 
22986
fi
 
22987
 
 
22988
 
 
22989
 
 
22990
        # If we found it, no need to search any more.
 
22991
        if test "$result" = "yes"; then
 
22992
          found="$bdb_place"
 
22993
          break
 
22994
        fi
 
22995
      done
 
22996
      test "$found" != "not" && break
 
22997
    done
 
22998
    test "$found" != "not" && break
 
22999
  done
 
23000
 
 
23001
  # Restore the original values of the flags we tweak.
 
23002
  LDFLAGS="$apu_check_lib_save_ldflags"
 
23003
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
23004
 
 
23005
  case "$found" in
 
23006
  "not")
 
23007
    apu_have_db=0
 
23008
    ;;
 
23009
  "std")
 
23010
    apu_db_header=$bdb_header
 
23011
    apu_db_lib=$bdb_libname
 
23012
    apu_have_db=1
 
23013
    ;;
 
23014
  *":"*)
 
23015
    header="`echo $found | sed -e 's/:.*$//'`"
 
23016
    lib="`echo $found | sed -e 's/^.*://'`"
 
23017
 
 
23018
 
 
23019
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
23020
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
23021
    APRUTIL_INCLUDES="-I$header"
 
23022
  else
 
23023
    apr_addto_bugger="-I$header"
 
23024
    for i in $apr_addto_bugger; do
 
23025
      apr_addto_duplicate="0"
 
23026
      for j in $APRUTIL_INCLUDES; do
 
23027
        if test "x$i" = "x$j"; then
 
23028
          apr_addto_duplicate="1"
 
23029
          break
 
23030
        fi
 
23031
      done
 
23032
      if test $apr_addto_duplicate = "0"; then
 
23033
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
23034
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
23035
      fi
 
23036
    done
 
23037
  fi
 
23038
 
 
23039
 
 
23040
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
23041
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
23042
    APRUTIL_LDFLAGS="-L$lib"
 
23043
  else
 
23044
    apr_addto_bugger="-L$lib"
 
23045
    for i in $apr_addto_bugger; do
 
23046
      apr_addto_duplicate="0"
 
23047
      for j in $APRUTIL_LDFLAGS; do
 
23048
        if test "x$i" = "x$j"; then
 
23049
          apr_addto_duplicate="1"
 
23050
          break
 
23051
        fi
 
23052
      done
 
23053
      if test $apr_addto_duplicate = "0"; then
 
23054
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
23055
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
23056
      fi
 
23057
    done
 
23058
  fi
 
23059
 
 
23060
    apu_db_header=$bdb_header
 
23061
    apu_db_lib=$bdb_libname
 
23062
    apu_have_db=1
 
23063
    ;;
 
23064
  *)
 
23065
 
 
23066
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
23067
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
23068
    APRUTIL_INCLUDES="-I$found/include"
 
23069
  else
 
23070
    apr_addto_bugger="-I$found/include"
 
23071
    for i in $apr_addto_bugger; do
 
23072
      apr_addto_duplicate="0"
 
23073
      for j in $APRUTIL_INCLUDES; do
 
23074
        if test "x$i" = "x$j"; then
 
23075
          apr_addto_duplicate="1"
 
23076
          break
 
23077
        fi
 
23078
      done
 
23079
      if test $apr_addto_duplicate = "0"; then
 
23080
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
23081
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
23082
      fi
 
23083
    done
 
23084
  fi
 
23085
 
 
23086
 
 
23087
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
23088
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
23089
    APRUTIL_LDFLAGS="-L$found/lib"
 
23090
  else
 
23091
    apr_addto_bugger="-L$found/lib"
 
23092
    for i in $apr_addto_bugger; do
 
23093
      apr_addto_duplicate="0"
 
23094
      for j in $APRUTIL_LDFLAGS; do
 
23095
        if test "x$i" = "x$j"; then
 
23096
          apr_addto_duplicate="1"
 
23097
          break
 
23098
        fi
 
23099
      done
 
23100
      if test $apr_addto_duplicate = "0"; then
 
23101
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
23102
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
23103
      fi
 
23104
    done
 
23105
  fi
 
23106
 
 
23107
    apu_db_header=$bdb_header
 
23108
    apu_db_lib=$bdb_libname
 
23109
    apu_have_db=1
 
23110
    ;;
 
23111
  esac
 
23112
 
 
23113
  if test "$apu_have_db" = "1"; then
 
23114
    apu_db_version=4
 
23115
  fi
 
23116
 
 
23117
    if test "$apu_db_version" != "4"; then
 
23118
      { { echo "$as_me:$LINENO: error: Berkeley db4 not found" >&5
 
23119
echo "$as_me: error: Berkeley db4 not found" >&2;}
 
23120
   { (exit 1); exit 1; }; }
 
23121
    fi
 
23122
    ;;
 
23123
  db41)
 
23124
 
 
23125
  places="$check_places"
 
23126
  if test -z "$places"; then
 
23127
    places="std /usr/local /usr/local/BerkeleyDB.4.1 /boot/home/config"
 
23128
  fi
 
23129
 
 
23130
  bdb_version="4"
 
23131
  if test ""1"" != "-1"; then
 
23132
    bdb_version="$bdb_version."1""
 
23133
    if test ""-1"" != "-1"; then
 
23134
      bdb_version="$bdb_version."-1""
 
23135
    fi
 
23136
  fi
 
23137
  bdb_places="$places"
 
23138
  bdb_default_search_headers="db41/db.h db4/db.h db.h"
 
23139
  bdb_default_search_lib_names="db-4.1 db41 db4 db"
 
23140
 
 
23141
 
 
23142
  apu_have_db=0
 
23143
 
 
23144
  # Save the original values of the flags we tweak.
 
23145
  apu_check_lib_save_libs="$LIBS"
 
23146
  apu_check_lib_save_ldflags="$LDFLAGS"
 
23147
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
23148
 
 
23149
  # The variable `found' is the prefix under which we've found
 
23150
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
23151
  found=not
 
23152
  for bdb_place in $bdb_places; do
 
23153
 
 
23154
    LDFLAGS="$apu_check_lib_save_ldflags"
 
23155
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
23156
    case "$bdb_place" in
 
23157
      "std" )
 
23158
        description="the standard places"
 
23159
      ;;
 
23160
      *":"* )
 
23161
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
23162
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
23163
        CPPFLAGS="$CPPFLAGS -I$header"
 
23164
        LDFLAGS="$LDFLAGS -L$lib"
 
23165
        description="$header and $lib"
 
23166
      ;;
 
23167
      * )
 
23168
        if test -d $bdb_place; then
 
23169
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
23170
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
23171
        else
 
23172
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
23173
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
23174
          echo "$as_me:$LINENO: result: directory not found" >&5
 
23175
echo "${ECHO_T}directory not found" >&6
 
23176
          continue
 
23177
        fi
 
23178
        description="$bdb_place"
 
23179
      ;;
 
23180
    esac
 
23181
 
 
23182
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
23183
    # trick to display a message instead.
 
23184
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
23185
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
23186
    echo "$as_me:$LINENO: result: " >&5
 
23187
echo "${ECHO_T}" >&6
 
23188
 
 
23189
    for bdb_libname in $bdb_default_search_lib_names; do
 
23190
      for bdb_header in $bdb_default_search_headers; do
 
23191
        # Clear the header cache variable for each location
 
23192
 
 
23193
        cache_id="`echo ac_cv_header_${bdb_header} \
 
23194
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
23195
 
 
23196
        unset $cache_id
 
23197
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
23198
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23199
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
23200
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
23201
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23202
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23203
fi
 
23204
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
23205
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
23206
else
 
23207
  # Is the header compilable?
 
23208
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
23209
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
23210
cat >conftest.$ac_ext <<_ACEOF
 
23211
/* confdefs.h.  */
 
23212
_ACEOF
 
23213
cat confdefs.h >>conftest.$ac_ext
 
23214
cat >>conftest.$ac_ext <<_ACEOF
 
23215
/* end confdefs.h.  */
 
23216
$ac_includes_default
 
23217
#include <$bdb_header>
 
23218
_ACEOF
 
23219
rm -f conftest.$ac_objext
 
23220
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
23221
  (eval $ac_compile) 2>conftest.er1
 
23222
  ac_status=$?
 
23223
  grep -v '^ *+' conftest.er1 >conftest.err
 
23224
  rm -f conftest.er1
 
23225
  cat conftest.err >&5
 
23226
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23227
  (exit $ac_status); } &&
 
23228
         { ac_try='test -z "$ac_c_werror_flag"
 
23229
                         || test ! -s conftest.err'
 
23230
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23231
  (eval $ac_try) 2>&5
 
23232
  ac_status=$?
 
23233
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23234
  (exit $ac_status); }; } &&
 
23235
         { ac_try='test -s conftest.$ac_objext'
 
23236
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23237
  (eval $ac_try) 2>&5
 
23238
  ac_status=$?
 
23239
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23240
  (exit $ac_status); }; }; then
 
23241
  ac_header_compiler=yes
 
23242
else
 
23243
  echo "$as_me: failed program was:" >&5
 
23244
sed 's/^/| /' conftest.$ac_ext >&5
 
23245
 
 
23246
ac_header_compiler=no
 
23247
fi
 
23248
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
23249
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
23250
echo "${ECHO_T}$ac_header_compiler" >&6
 
23251
 
 
23252
# Is the header present?
 
23253
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
23254
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
23255
cat >conftest.$ac_ext <<_ACEOF
 
23256
/* confdefs.h.  */
 
23257
_ACEOF
 
23258
cat confdefs.h >>conftest.$ac_ext
 
23259
cat >>conftest.$ac_ext <<_ACEOF
 
23260
/* end confdefs.h.  */
 
23261
#include <$bdb_header>
 
23262
_ACEOF
 
23263
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
23264
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
23265
  ac_status=$?
 
23266
  grep -v '^ *+' conftest.er1 >conftest.err
 
23267
  rm -f conftest.er1
 
23268
  cat conftest.err >&5
 
23269
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23270
  (exit $ac_status); } >/dev/null; then
 
23271
  if test -s conftest.err; then
 
23272
    ac_cpp_err=$ac_c_preproc_warn_flag
 
23273
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
23274
  else
 
23275
    ac_cpp_err=
 
23276
  fi
 
23277
else
 
23278
  ac_cpp_err=yes
 
23279
fi
 
23280
if test -z "$ac_cpp_err"; then
 
23281
  ac_header_preproc=yes
 
23282
else
 
23283
  echo "$as_me: failed program was:" >&5
 
23284
sed 's/^/| /' conftest.$ac_ext >&5
 
23285
 
 
23286
  ac_header_preproc=no
 
23287
fi
 
23288
rm -f conftest.err conftest.$ac_ext
 
23289
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
23290
echo "${ECHO_T}$ac_header_preproc" >&6
 
23291
 
 
23292
# So?  What about this header?
 
23293
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
23294
  yes:no: )
 
23295
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
23296
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
23297
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
23298
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
23299
    ac_header_preproc=yes
 
23300
    ;;
 
23301
  no:yes:* )
 
23302
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
23303
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
23304
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
23305
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
23306
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
23307
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
23308
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
23309
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
23310
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
23311
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
23312
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
23313
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
23314
    (
 
23315
      cat <<\_ASBOX
 
23316
## ------------------------------------------ ##
 
23317
## Report this to the AC_PACKAGE_NAME lists.  ##
 
23318
## ------------------------------------------ ##
 
23319
_ASBOX
 
23320
    ) |
 
23321
      sed "s/^/$as_me: WARNING:     /" >&2
 
23322
    ;;
 
23323
esac
 
23324
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
23325
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
23326
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23327
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23328
else
 
23329
  eval "$as_ac_Header=\$ac_header_preproc"
 
23330
fi
 
23331
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
23332
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
23333
 
 
23334
fi
 
23335
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
23336
 
 
23337
          if test ""4"" = "3" -o ""4"" = "4"; then
 
23338
            # We generate a separate cache variable for each prefix and libname
 
23339
            # we search under.  That way, we avoid caching information that
 
23340
            # changes if the user runs `configure' with a different set of
 
23341
            # switches.
 
23342
 
 
23343
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"1"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
23344
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
23345
 
 
23346
 
 
23347
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
23348
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
23349
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
23350
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23351
else
 
23352
 
 
23353
 
 
23354
    apu_try_berkeley_db_save_libs="$LIBS"
 
23355
 
 
23356
    apu_check_berkeley_db_major="4"
 
23357
    apu_check_berkeley_db_minor="1"
 
23358
    apu_check_berkeley_db_patch="-1"
 
23359
    apu_try_berkeley_db_header=$bdb_header
 
23360
    apu_try_berkeley_db_libname=$bdb_libname
 
23361
 
 
23362
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
23363
    if test "$cross_compiling" = yes; then
 
23364
  apu_try_berkeley_db=yes
 
23365
 
 
23366
else
 
23367
  cat >conftest.$ac_ext <<_ACEOF
 
23368
/* confdefs.h.  */
 
23369
_ACEOF
 
23370
cat confdefs.h >>conftest.$ac_ext
 
23371
cat >>conftest.$ac_ext <<_ACEOF
 
23372
/* end confdefs.h.  */
 
23373
 
 
23374
#include <stdio.h>
 
23375
#include <$apu_try_berkeley_db_header>
 
23376
main ()
 
23377
{
 
23378
  int major, minor, patch;
 
23379
 
 
23380
  db_version(&major, &minor, &patch);
 
23381
 
 
23382
  /* Sanity check: ensure that db.h constants actually match the db library */
 
23383
  if (major != DB_VERSION_MAJOR
 
23384
      || minor != DB_VERSION_MINOR
 
23385
      || patch != DB_VERSION_PATCH)
 
23386
    exit (1);
 
23387
 
 
23388
  /* Run-time check:  ensure the library claims to be the correct version. */
 
23389
 
 
23390
  if ($apu_check_berkeley_db_major != -1) {
 
23391
    if (major < $apu_check_berkeley_db_major)
 
23392
      exit (1);
 
23393
    if (major > $apu_check_berkeley_db_major)
 
23394
      exit (0);
 
23395
  }
 
23396
 
 
23397
  if ($apu_check_berkeley_db_minor != -1) {
 
23398
    if (minor < $apu_check_berkeley_db_minor)
 
23399
      exit (1);
 
23400
    if (minor > $apu_check_berkeley_db_minor)
 
23401
      exit (0);
 
23402
  }
 
23403
 
 
23404
  if ($apu_check_berkeley_db_patch == -1
 
23405
      || patch >= $apu_check_berkeley_db_patch)
 
23406
    exit (0);
 
23407
  else
 
23408
    exit (1);
 
23409
}
 
23410
 
 
23411
_ACEOF
 
23412
rm -f conftest$ac_exeext
 
23413
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
23414
  (eval $ac_link) 2>&5
 
23415
  ac_status=$?
 
23416
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23417
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
23418
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23419
  (eval $ac_try) 2>&5
 
23420
  ac_status=$?
 
23421
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23422
  (exit $ac_status); }; }; then
 
23423
  apu_try_berkeley_db=yes
 
23424
else
 
23425
  echo "$as_me: program exited with status $ac_status" >&5
 
23426
echo "$as_me: failed program was:" >&5
 
23427
sed 's/^/| /' conftest.$ac_ext >&5
 
23428
 
 
23429
( exit $ac_status )
 
23430
apu_try_berkeley_db=no
 
23431
fi
 
23432
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
23433
fi
 
23434
 
 
23435
    LIBS="$apu_try_berkeley_db_save_libs"
 
23436
 
 
23437
 
 
23438
                eval "$cache_id=$apu_try_berkeley_db"
 
23439
 
 
23440
fi
 
23441
 
 
23442
            result="`eval echo '$'$cache_id`"
 
23443
            echo "$as_me:$LINENO: result: $result" >&5
 
23444
echo "${ECHO_T}$result" >&6
 
23445
          elif test ""4"" = "1"; then
 
23446
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
23447
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
23448
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
23449
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
23450
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23451
else
 
23452
  ac_check_lib_save_LIBS=$LIBS
 
23453
LIBS="-l$bdb_libname  $LIBS"
 
23454
cat >conftest.$ac_ext <<_ACEOF
 
23455
/* confdefs.h.  */
 
23456
_ACEOF
 
23457
cat confdefs.h >>conftest.$ac_ext
 
23458
cat >>conftest.$ac_ext <<_ACEOF
 
23459
/* end confdefs.h.  */
 
23460
 
 
23461
/* Override any gcc2 internal prototype to avoid an error.  */
 
23462
#ifdef __cplusplus
 
23463
extern "C"
 
23464
#endif
 
23465
/* We use char because int might match the return type of a gcc2
 
23466
   builtin and then its argument prototype would still apply.  */
 
23467
char dbopen ();
 
23468
int
 
23469
main ()
 
23470
{
 
23471
dbopen ();
 
23472
  ;
 
23473
  return 0;
 
23474
}
 
23475
_ACEOF
 
23476
rm -f conftest.$ac_objext conftest$ac_exeext
 
23477
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
23478
  (eval $ac_link) 2>conftest.er1
 
23479
  ac_status=$?
 
23480
  grep -v '^ *+' conftest.er1 >conftest.err
 
23481
  rm -f conftest.er1
 
23482
  cat conftest.err >&5
 
23483
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23484
  (exit $ac_status); } &&
 
23485
         { ac_try='test -z "$ac_c_werror_flag"
 
23486
                         || test ! -s conftest.err'
 
23487
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23488
  (eval $ac_try) 2>&5
 
23489
  ac_status=$?
 
23490
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23491
  (exit $ac_status); }; } &&
 
23492
         { ac_try='test -s conftest$ac_exeext'
 
23493
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23494
  (eval $ac_try) 2>&5
 
23495
  ac_status=$?
 
23496
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23497
  (exit $ac_status); }; }; then
 
23498
  eval "$as_ac_Lib=yes"
 
23499
else
 
23500
  echo "$as_me: failed program was:" >&5
 
23501
sed 's/^/| /' conftest.$ac_ext >&5
 
23502
 
 
23503
eval "$as_ac_Lib=no"
 
23504
fi
 
23505
rm -f conftest.err conftest.$ac_objext \
 
23506
      conftest$ac_exeext conftest.$ac_ext
 
23507
LIBS=$ac_check_lib_save_LIBS
 
23508
fi
 
23509
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
23510
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
23511
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
23512
  result=yes
 
23513
else
 
23514
  result=no
 
23515
 
 
23516
fi
 
23517
 
 
23518
          elif test ""4"" = "2"; then
 
23519
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
23520
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
23521
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
23522
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
23523
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23524
else
 
23525
  ac_check_lib_save_LIBS=$LIBS
 
23526
LIBS="-l$bdb_libname  $LIBS"
 
23527
cat >conftest.$ac_ext <<_ACEOF
 
23528
/* confdefs.h.  */
 
23529
_ACEOF
 
23530
cat confdefs.h >>conftest.$ac_ext
 
23531
cat >>conftest.$ac_ext <<_ACEOF
 
23532
/* end confdefs.h.  */
 
23533
 
 
23534
/* Override any gcc2 internal prototype to avoid an error.  */
 
23535
#ifdef __cplusplus
 
23536
extern "C"
 
23537
#endif
 
23538
/* We use char because int might match the return type of a gcc2
 
23539
   builtin and then its argument prototype would still apply.  */
 
23540
char db_open ();
 
23541
int
 
23542
main ()
 
23543
{
 
23544
db_open ();
 
23545
  ;
 
23546
  return 0;
 
23547
}
 
23548
_ACEOF
 
23549
rm -f conftest.$ac_objext conftest$ac_exeext
 
23550
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
23551
  (eval $ac_link) 2>conftest.er1
 
23552
  ac_status=$?
 
23553
  grep -v '^ *+' conftest.er1 >conftest.err
 
23554
  rm -f conftest.er1
 
23555
  cat conftest.err >&5
 
23556
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23557
  (exit $ac_status); } &&
 
23558
         { ac_try='test -z "$ac_c_werror_flag"
 
23559
                         || test ! -s conftest.err'
 
23560
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23561
  (eval $ac_try) 2>&5
 
23562
  ac_status=$?
 
23563
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23564
  (exit $ac_status); }; } &&
 
23565
         { ac_try='test -s conftest$ac_exeext'
 
23566
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23567
  (eval $ac_try) 2>&5
 
23568
  ac_status=$?
 
23569
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23570
  (exit $ac_status); }; }; then
 
23571
  eval "$as_ac_Lib=yes"
 
23572
else
 
23573
  echo "$as_me: failed program was:" >&5
 
23574
sed 's/^/| /' conftest.$ac_ext >&5
 
23575
 
 
23576
eval "$as_ac_Lib=no"
 
23577
fi
 
23578
rm -f conftest.err conftest.$ac_objext \
 
23579
      conftest$ac_exeext conftest.$ac_ext
 
23580
LIBS=$ac_check_lib_save_LIBS
 
23581
fi
 
23582
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
23583
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
23584
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
23585
  result=yes
 
23586
else
 
23587
  result=no
 
23588
 
 
23589
fi
 
23590
 
 
23591
          fi
 
23592
 
 
23593
else
 
23594
  result="no"
 
23595
fi
 
23596
 
 
23597
 
 
23598
 
 
23599
        # If we found it, no need to search any more.
 
23600
        if test "$result" = "yes"; then
 
23601
          found="$bdb_place"
 
23602
          break
 
23603
        fi
 
23604
      done
 
23605
      test "$found" != "not" && break
 
23606
    done
 
23607
    test "$found" != "not" && break
 
23608
  done
 
23609
 
 
23610
  # Restore the original values of the flags we tweak.
 
23611
  LDFLAGS="$apu_check_lib_save_ldflags"
 
23612
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
23613
 
 
23614
  case "$found" in
 
23615
  "not")
 
23616
    apu_have_db=0
 
23617
    ;;
 
23618
  "std")
 
23619
    apu_db_header=$bdb_header
 
23620
    apu_db_lib=$bdb_libname
 
23621
    apu_have_db=1
 
23622
    ;;
 
23623
  *":"*)
 
23624
    header="`echo $found | sed -e 's/:.*$//'`"
 
23625
    lib="`echo $found | sed -e 's/^.*://'`"
 
23626
 
 
23627
 
 
23628
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
23629
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
23630
    APRUTIL_INCLUDES="-I$header"
 
23631
  else
 
23632
    apr_addto_bugger="-I$header"
 
23633
    for i in $apr_addto_bugger; do
 
23634
      apr_addto_duplicate="0"
 
23635
      for j in $APRUTIL_INCLUDES; do
 
23636
        if test "x$i" = "x$j"; then
 
23637
          apr_addto_duplicate="1"
 
23638
          break
 
23639
        fi
 
23640
      done
 
23641
      if test $apr_addto_duplicate = "0"; then
 
23642
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
23643
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
23644
      fi
 
23645
    done
 
23646
  fi
 
23647
 
 
23648
 
 
23649
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
23650
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
23651
    APRUTIL_LDFLAGS="-L$lib"
 
23652
  else
 
23653
    apr_addto_bugger="-L$lib"
 
23654
    for i in $apr_addto_bugger; do
 
23655
      apr_addto_duplicate="0"
 
23656
      for j in $APRUTIL_LDFLAGS; do
 
23657
        if test "x$i" = "x$j"; then
 
23658
          apr_addto_duplicate="1"
 
23659
          break
 
23660
        fi
 
23661
      done
 
23662
      if test $apr_addto_duplicate = "0"; then
 
23663
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
23664
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
23665
      fi
 
23666
    done
 
23667
  fi
 
23668
 
 
23669
    apu_db_header=$bdb_header
 
23670
    apu_db_lib=$bdb_libname
 
23671
    apu_have_db=1
 
23672
    ;;
 
23673
  *)
 
23674
 
 
23675
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
23676
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
23677
    APRUTIL_INCLUDES="-I$found/include"
 
23678
  else
 
23679
    apr_addto_bugger="-I$found/include"
 
23680
    for i in $apr_addto_bugger; do
 
23681
      apr_addto_duplicate="0"
 
23682
      for j in $APRUTIL_INCLUDES; do
 
23683
        if test "x$i" = "x$j"; then
 
23684
          apr_addto_duplicate="1"
 
23685
          break
 
23686
        fi
 
23687
      done
 
23688
      if test $apr_addto_duplicate = "0"; then
 
23689
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
23690
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
23691
      fi
 
23692
    done
 
23693
  fi
 
23694
 
 
23695
 
 
23696
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
23697
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
23698
    APRUTIL_LDFLAGS="-L$found/lib"
 
23699
  else
 
23700
    apr_addto_bugger="-L$found/lib"
 
23701
    for i in $apr_addto_bugger; do
 
23702
      apr_addto_duplicate="0"
 
23703
      for j in $APRUTIL_LDFLAGS; do
 
23704
        if test "x$i" = "x$j"; then
 
23705
          apr_addto_duplicate="1"
 
23706
          break
 
23707
        fi
 
23708
      done
 
23709
      if test $apr_addto_duplicate = "0"; then
 
23710
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
23711
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
23712
      fi
 
23713
    done
 
23714
  fi
 
23715
 
 
23716
    apu_db_header=$bdb_header
 
23717
    apu_db_lib=$bdb_libname
 
23718
    apu_have_db=1
 
23719
    ;;
 
23720
  esac
 
23721
 
 
23722
  if test "$apu_have_db" = "1"; then
 
23723
    apu_db_version=4
 
23724
  fi
 
23725
 
 
23726
    if test "$apu_db_version" != "4"; then
 
23727
      { { echo "$as_me:$LINENO: error: Berkeley db4 not found" >&5
 
23728
echo "$as_me: error: Berkeley db4 not found" >&2;}
 
23729
   { (exit 1); exit 1; }; }
 
23730
    fi
 
23731
    ;;
 
23732
  db42)
 
23733
 
 
23734
  places="$check_places"
 
23735
  if test -z "$places"; then
 
23736
    places="std /usr/local /usr/local/BerkeleyDB.4.2 /boot/home/config"
 
23737
  fi
 
23738
 
 
23739
  bdb_version="4"
 
23740
  if test ""2"" != "-1"; then
 
23741
    bdb_version="$bdb_version."2""
 
23742
    if test ""-1"" != "-1"; then
 
23743
      bdb_version="$bdb_version."-1""
 
23744
    fi
 
23745
  fi
 
23746
  bdb_places="$places"
 
23747
  bdb_default_search_headers="db42/db.h db4/db.h db.h"
 
23748
  bdb_default_search_lib_names="db-4.2 db42 db4 db"
 
23749
 
 
23750
 
 
23751
  apu_have_db=0
 
23752
 
 
23753
  # Save the original values of the flags we tweak.
 
23754
  apu_check_lib_save_libs="$LIBS"
 
23755
  apu_check_lib_save_ldflags="$LDFLAGS"
 
23756
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
23757
 
 
23758
  # The variable `found' is the prefix under which we've found
 
23759
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
23760
  found=not
 
23761
  for bdb_place in $bdb_places; do
 
23762
 
 
23763
    LDFLAGS="$apu_check_lib_save_ldflags"
 
23764
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
23765
    case "$bdb_place" in
 
23766
      "std" )
 
23767
        description="the standard places"
 
23768
      ;;
 
23769
      *":"* )
 
23770
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
23771
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
23772
        CPPFLAGS="$CPPFLAGS -I$header"
 
23773
        LDFLAGS="$LDFLAGS -L$lib"
 
23774
        description="$header and $lib"
 
23775
      ;;
 
23776
      * )
 
23777
        if test -d $bdb_place; then
 
23778
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
23779
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
23780
        else
 
23781
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
23782
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
23783
          echo "$as_me:$LINENO: result: directory not found" >&5
 
23784
echo "${ECHO_T}directory not found" >&6
 
23785
          continue
 
23786
        fi
 
23787
        description="$bdb_place"
 
23788
      ;;
 
23789
    esac
 
23790
 
 
23791
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
23792
    # trick to display a message instead.
 
23793
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
23794
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
23795
    echo "$as_me:$LINENO: result: " >&5
 
23796
echo "${ECHO_T}" >&6
 
23797
 
 
23798
    for bdb_libname in $bdb_default_search_lib_names; do
 
23799
      for bdb_header in $bdb_default_search_headers; do
 
23800
        # Clear the header cache variable for each location
 
23801
 
 
23802
        cache_id="`echo ac_cv_header_${bdb_header} \
 
23803
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
23804
 
 
23805
        unset $cache_id
 
23806
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
23807
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23808
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
23809
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
23810
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23811
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23812
fi
 
23813
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
23814
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
23815
else
 
23816
  # Is the header compilable?
 
23817
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
23818
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
23819
cat >conftest.$ac_ext <<_ACEOF
 
23820
/* confdefs.h.  */
 
23821
_ACEOF
 
23822
cat confdefs.h >>conftest.$ac_ext
 
23823
cat >>conftest.$ac_ext <<_ACEOF
 
23824
/* end confdefs.h.  */
 
23825
$ac_includes_default
 
23826
#include <$bdb_header>
 
23827
_ACEOF
 
23828
rm -f conftest.$ac_objext
 
23829
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
23830
  (eval $ac_compile) 2>conftest.er1
 
23831
  ac_status=$?
 
23832
  grep -v '^ *+' conftest.er1 >conftest.err
 
23833
  rm -f conftest.er1
 
23834
  cat conftest.err >&5
 
23835
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23836
  (exit $ac_status); } &&
 
23837
         { ac_try='test -z "$ac_c_werror_flag"
 
23838
                         || test ! -s conftest.err'
 
23839
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23840
  (eval $ac_try) 2>&5
 
23841
  ac_status=$?
 
23842
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23843
  (exit $ac_status); }; } &&
 
23844
         { ac_try='test -s conftest.$ac_objext'
 
23845
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23846
  (eval $ac_try) 2>&5
 
23847
  ac_status=$?
 
23848
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23849
  (exit $ac_status); }; }; then
 
23850
  ac_header_compiler=yes
 
23851
else
 
23852
  echo "$as_me: failed program was:" >&5
 
23853
sed 's/^/| /' conftest.$ac_ext >&5
 
23854
 
 
23855
ac_header_compiler=no
 
23856
fi
 
23857
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
23858
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
23859
echo "${ECHO_T}$ac_header_compiler" >&6
 
23860
 
 
23861
# Is the header present?
 
23862
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
23863
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
23864
cat >conftest.$ac_ext <<_ACEOF
 
23865
/* confdefs.h.  */
 
23866
_ACEOF
 
23867
cat confdefs.h >>conftest.$ac_ext
 
23868
cat >>conftest.$ac_ext <<_ACEOF
 
23869
/* end confdefs.h.  */
 
23870
#include <$bdb_header>
 
23871
_ACEOF
 
23872
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
23873
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
23874
  ac_status=$?
 
23875
  grep -v '^ *+' conftest.er1 >conftest.err
 
23876
  rm -f conftest.er1
 
23877
  cat conftest.err >&5
 
23878
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23879
  (exit $ac_status); } >/dev/null; then
 
23880
  if test -s conftest.err; then
 
23881
    ac_cpp_err=$ac_c_preproc_warn_flag
 
23882
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
23883
  else
 
23884
    ac_cpp_err=
 
23885
  fi
 
23886
else
 
23887
  ac_cpp_err=yes
 
23888
fi
 
23889
if test -z "$ac_cpp_err"; then
 
23890
  ac_header_preproc=yes
 
23891
else
 
23892
  echo "$as_me: failed program was:" >&5
 
23893
sed 's/^/| /' conftest.$ac_ext >&5
 
23894
 
 
23895
  ac_header_preproc=no
 
23896
fi
 
23897
rm -f conftest.err conftest.$ac_ext
 
23898
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
23899
echo "${ECHO_T}$ac_header_preproc" >&6
 
23900
 
 
23901
# So?  What about this header?
 
23902
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
23903
  yes:no: )
 
23904
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
23905
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
23906
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
23907
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
23908
    ac_header_preproc=yes
 
23909
    ;;
 
23910
  no:yes:* )
 
23911
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
23912
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
23913
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
23914
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
23915
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
23916
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
23917
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
23918
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
23919
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
23920
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
23921
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
23922
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
23923
    (
 
23924
      cat <<\_ASBOX
 
23925
## ------------------------------------------ ##
 
23926
## Report this to the AC_PACKAGE_NAME lists.  ##
 
23927
## ------------------------------------------ ##
 
23928
_ASBOX
 
23929
    ) |
 
23930
      sed "s/^/$as_me: WARNING:     /" >&2
 
23931
    ;;
 
23932
esac
 
23933
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
23934
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
23935
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23936
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23937
else
 
23938
  eval "$as_ac_Header=\$ac_header_preproc"
 
23939
fi
 
23940
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
23941
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
23942
 
 
23943
fi
 
23944
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
23945
 
 
23946
          if test ""4"" = "3" -o ""4"" = "4"; then
 
23947
            # We generate a separate cache variable for each prefix and libname
 
23948
            # we search under.  That way, we avoid caching information that
 
23949
            # changes if the user runs `configure' with a different set of
 
23950
            # switches.
 
23951
 
 
23952
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"2"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
23953
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
23954
 
 
23955
 
 
23956
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
23957
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
23958
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
23959
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23960
else
 
23961
 
 
23962
 
 
23963
    apu_try_berkeley_db_save_libs="$LIBS"
 
23964
 
 
23965
    apu_check_berkeley_db_major="4"
 
23966
    apu_check_berkeley_db_minor="2"
 
23967
    apu_check_berkeley_db_patch="-1"
 
23968
    apu_try_berkeley_db_header=$bdb_header
 
23969
    apu_try_berkeley_db_libname=$bdb_libname
 
23970
 
 
23971
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
23972
    if test "$cross_compiling" = yes; then
 
23973
  apu_try_berkeley_db=yes
 
23974
 
 
23975
else
 
23976
  cat >conftest.$ac_ext <<_ACEOF
 
23977
/* confdefs.h.  */
 
23978
_ACEOF
 
23979
cat confdefs.h >>conftest.$ac_ext
 
23980
cat >>conftest.$ac_ext <<_ACEOF
 
23981
/* end confdefs.h.  */
 
23982
 
 
23983
#include <stdio.h>
 
23984
#include <$apu_try_berkeley_db_header>
 
23985
main ()
 
23986
{
 
23987
  int major, minor, patch;
 
23988
 
 
23989
  db_version(&major, &minor, &patch);
 
23990
 
 
23991
  /* Sanity check: ensure that db.h constants actually match the db library */
 
23992
  if (major != DB_VERSION_MAJOR
 
23993
      || minor != DB_VERSION_MINOR
 
23994
      || patch != DB_VERSION_PATCH)
 
23995
    exit (1);
 
23996
 
 
23997
  /* Run-time check:  ensure the library claims to be the correct version. */
 
23998
 
 
23999
  if ($apu_check_berkeley_db_major != -1) {
 
24000
    if (major < $apu_check_berkeley_db_major)
 
24001
      exit (1);
 
24002
    if (major > $apu_check_berkeley_db_major)
 
24003
      exit (0);
 
24004
  }
 
24005
 
 
24006
  if ($apu_check_berkeley_db_minor != -1) {
 
24007
    if (minor < $apu_check_berkeley_db_minor)
 
24008
      exit (1);
 
24009
    if (minor > $apu_check_berkeley_db_minor)
 
24010
      exit (0);
 
24011
  }
 
24012
 
 
24013
  if ($apu_check_berkeley_db_patch == -1
 
24014
      || patch >= $apu_check_berkeley_db_patch)
 
24015
    exit (0);
 
24016
  else
 
24017
    exit (1);
 
24018
}
 
24019
 
 
24020
_ACEOF
 
24021
rm -f conftest$ac_exeext
 
24022
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
24023
  (eval $ac_link) 2>&5
 
24024
  ac_status=$?
 
24025
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24026
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
24027
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24028
  (eval $ac_try) 2>&5
 
24029
  ac_status=$?
 
24030
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24031
  (exit $ac_status); }; }; then
 
24032
  apu_try_berkeley_db=yes
 
24033
else
 
24034
  echo "$as_me: program exited with status $ac_status" >&5
 
24035
echo "$as_me: failed program was:" >&5
 
24036
sed 's/^/| /' conftest.$ac_ext >&5
 
24037
 
 
24038
( exit $ac_status )
 
24039
apu_try_berkeley_db=no
 
24040
fi
 
24041
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
24042
fi
 
24043
 
 
24044
    LIBS="$apu_try_berkeley_db_save_libs"
 
24045
 
 
24046
 
 
24047
                eval "$cache_id=$apu_try_berkeley_db"
 
24048
 
 
24049
fi
 
24050
 
 
24051
            result="`eval echo '$'$cache_id`"
 
24052
            echo "$as_me:$LINENO: result: $result" >&5
 
24053
echo "${ECHO_T}$result" >&6
 
24054
          elif test ""4"" = "1"; then
 
24055
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
24056
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
24057
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
24058
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
24059
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24060
else
 
24061
  ac_check_lib_save_LIBS=$LIBS
 
24062
LIBS="-l$bdb_libname  $LIBS"
 
24063
cat >conftest.$ac_ext <<_ACEOF
 
24064
/* confdefs.h.  */
 
24065
_ACEOF
 
24066
cat confdefs.h >>conftest.$ac_ext
 
24067
cat >>conftest.$ac_ext <<_ACEOF
 
24068
/* end confdefs.h.  */
 
24069
 
 
24070
/* Override any gcc2 internal prototype to avoid an error.  */
 
24071
#ifdef __cplusplus
 
24072
extern "C"
 
24073
#endif
 
24074
/* We use char because int might match the return type of a gcc2
 
24075
   builtin and then its argument prototype would still apply.  */
 
24076
char dbopen ();
 
24077
int
 
24078
main ()
 
24079
{
 
24080
dbopen ();
 
24081
  ;
 
24082
  return 0;
 
24083
}
 
24084
_ACEOF
 
24085
rm -f conftest.$ac_objext conftest$ac_exeext
 
24086
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
24087
  (eval $ac_link) 2>conftest.er1
 
24088
  ac_status=$?
 
24089
  grep -v '^ *+' conftest.er1 >conftest.err
 
24090
  rm -f conftest.er1
 
24091
  cat conftest.err >&5
 
24092
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24093
  (exit $ac_status); } &&
 
24094
         { ac_try='test -z "$ac_c_werror_flag"
 
24095
                         || test ! -s conftest.err'
 
24096
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24097
  (eval $ac_try) 2>&5
 
24098
  ac_status=$?
 
24099
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24100
  (exit $ac_status); }; } &&
 
24101
         { ac_try='test -s conftest$ac_exeext'
 
24102
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24103
  (eval $ac_try) 2>&5
 
24104
  ac_status=$?
 
24105
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24106
  (exit $ac_status); }; }; then
 
24107
  eval "$as_ac_Lib=yes"
 
24108
else
 
24109
  echo "$as_me: failed program was:" >&5
 
24110
sed 's/^/| /' conftest.$ac_ext >&5
 
24111
 
 
24112
eval "$as_ac_Lib=no"
 
24113
fi
 
24114
rm -f conftest.err conftest.$ac_objext \
 
24115
      conftest$ac_exeext conftest.$ac_ext
 
24116
LIBS=$ac_check_lib_save_LIBS
 
24117
fi
 
24118
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
24119
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
24120
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
24121
  result=yes
 
24122
else
 
24123
  result=no
 
24124
 
 
24125
fi
 
24126
 
 
24127
          elif test ""4"" = "2"; then
 
24128
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
24129
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
24130
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
24131
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
24132
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24133
else
 
24134
  ac_check_lib_save_LIBS=$LIBS
 
24135
LIBS="-l$bdb_libname  $LIBS"
 
24136
cat >conftest.$ac_ext <<_ACEOF
 
24137
/* confdefs.h.  */
 
24138
_ACEOF
 
24139
cat confdefs.h >>conftest.$ac_ext
 
24140
cat >>conftest.$ac_ext <<_ACEOF
 
24141
/* end confdefs.h.  */
 
24142
 
 
24143
/* Override any gcc2 internal prototype to avoid an error.  */
 
24144
#ifdef __cplusplus
 
24145
extern "C"
 
24146
#endif
 
24147
/* We use char because int might match the return type of a gcc2
 
24148
   builtin and then its argument prototype would still apply.  */
 
24149
char db_open ();
 
24150
int
 
24151
main ()
 
24152
{
 
24153
db_open ();
 
24154
  ;
 
24155
  return 0;
 
24156
}
 
24157
_ACEOF
 
24158
rm -f conftest.$ac_objext conftest$ac_exeext
 
24159
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
24160
  (eval $ac_link) 2>conftest.er1
 
24161
  ac_status=$?
 
24162
  grep -v '^ *+' conftest.er1 >conftest.err
 
24163
  rm -f conftest.er1
 
24164
  cat conftest.err >&5
 
24165
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24166
  (exit $ac_status); } &&
 
24167
         { ac_try='test -z "$ac_c_werror_flag"
 
24168
                         || test ! -s conftest.err'
 
24169
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24170
  (eval $ac_try) 2>&5
 
24171
  ac_status=$?
 
24172
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24173
  (exit $ac_status); }; } &&
 
24174
         { ac_try='test -s conftest$ac_exeext'
 
24175
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24176
  (eval $ac_try) 2>&5
 
24177
  ac_status=$?
 
24178
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24179
  (exit $ac_status); }; }; then
 
24180
  eval "$as_ac_Lib=yes"
 
24181
else
 
24182
  echo "$as_me: failed program was:" >&5
 
24183
sed 's/^/| /' conftest.$ac_ext >&5
 
24184
 
 
24185
eval "$as_ac_Lib=no"
 
24186
fi
 
24187
rm -f conftest.err conftest.$ac_objext \
 
24188
      conftest$ac_exeext conftest.$ac_ext
 
24189
LIBS=$ac_check_lib_save_LIBS
 
24190
fi
 
24191
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
24192
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
24193
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
24194
  result=yes
 
24195
else
 
24196
  result=no
 
24197
 
 
24198
fi
 
24199
 
 
24200
          fi
 
24201
 
 
24202
else
 
24203
  result="no"
 
24204
fi
 
24205
 
 
24206
 
 
24207
 
 
24208
        # If we found it, no need to search any more.
 
24209
        if test "$result" = "yes"; then
 
24210
          found="$bdb_place"
 
24211
          break
 
24212
        fi
 
24213
      done
 
24214
      test "$found" != "not" && break
 
24215
    done
 
24216
    test "$found" != "not" && break
 
24217
  done
 
24218
 
 
24219
  # Restore the original values of the flags we tweak.
 
24220
  LDFLAGS="$apu_check_lib_save_ldflags"
 
24221
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
24222
 
 
24223
  case "$found" in
 
24224
  "not")
 
24225
    apu_have_db=0
 
24226
    ;;
 
24227
  "std")
 
24228
    apu_db_header=$bdb_header
 
24229
    apu_db_lib=$bdb_libname
 
24230
    apu_have_db=1
 
24231
    ;;
 
24232
  *":"*)
 
24233
    header="`echo $found | sed -e 's/:.*$//'`"
 
24234
    lib="`echo $found | sed -e 's/^.*://'`"
 
24235
 
 
24236
 
 
24237
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
24238
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
24239
    APRUTIL_INCLUDES="-I$header"
 
24240
  else
 
24241
    apr_addto_bugger="-I$header"
 
24242
    for i in $apr_addto_bugger; do
 
24243
      apr_addto_duplicate="0"
 
24244
      for j in $APRUTIL_INCLUDES; do
 
24245
        if test "x$i" = "x$j"; then
 
24246
          apr_addto_duplicate="1"
 
24247
          break
 
24248
        fi
 
24249
      done
 
24250
      if test $apr_addto_duplicate = "0"; then
 
24251
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
24252
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
24253
      fi
 
24254
    done
 
24255
  fi
 
24256
 
 
24257
 
 
24258
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
24259
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
24260
    APRUTIL_LDFLAGS="-L$lib"
 
24261
  else
 
24262
    apr_addto_bugger="-L$lib"
 
24263
    for i in $apr_addto_bugger; do
 
24264
      apr_addto_duplicate="0"
 
24265
      for j in $APRUTIL_LDFLAGS; do
 
24266
        if test "x$i" = "x$j"; then
 
24267
          apr_addto_duplicate="1"
 
24268
          break
 
24269
        fi
 
24270
      done
 
24271
      if test $apr_addto_duplicate = "0"; then
 
24272
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
24273
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
24274
      fi
 
24275
    done
 
24276
  fi
 
24277
 
 
24278
    apu_db_header=$bdb_header
 
24279
    apu_db_lib=$bdb_libname
 
24280
    apu_have_db=1
 
24281
    ;;
 
24282
  *)
 
24283
 
 
24284
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
24285
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
24286
    APRUTIL_INCLUDES="-I$found/include"
 
24287
  else
 
24288
    apr_addto_bugger="-I$found/include"
 
24289
    for i in $apr_addto_bugger; do
 
24290
      apr_addto_duplicate="0"
 
24291
      for j in $APRUTIL_INCLUDES; do
 
24292
        if test "x$i" = "x$j"; then
 
24293
          apr_addto_duplicate="1"
 
24294
          break
 
24295
        fi
 
24296
      done
 
24297
      if test $apr_addto_duplicate = "0"; then
 
24298
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
24299
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
24300
      fi
 
24301
    done
 
24302
  fi
 
24303
 
 
24304
 
 
24305
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
24306
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
24307
    APRUTIL_LDFLAGS="-L$found/lib"
 
24308
  else
 
24309
    apr_addto_bugger="-L$found/lib"
 
24310
    for i in $apr_addto_bugger; do
 
24311
      apr_addto_duplicate="0"
 
24312
      for j in $APRUTIL_LDFLAGS; do
 
24313
        if test "x$i" = "x$j"; then
 
24314
          apr_addto_duplicate="1"
 
24315
          break
 
24316
        fi
 
24317
      done
 
24318
      if test $apr_addto_duplicate = "0"; then
 
24319
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
24320
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
24321
      fi
 
24322
    done
 
24323
  fi
 
24324
 
 
24325
    apu_db_header=$bdb_header
 
24326
    apu_db_lib=$bdb_libname
 
24327
    apu_have_db=1
 
24328
    ;;
 
24329
  esac
 
24330
 
 
24331
  if test "$apu_have_db" = "1"; then
 
24332
    apu_db_version=4
 
24333
  fi
 
24334
 
 
24335
    if test "$apu_db_version" != "4"; then
 
24336
      { { echo "$as_me:$LINENO: error: Berkeley db4 not found" >&5
 
24337
echo "$as_me: error: Berkeley db4 not found" >&2;}
 
24338
   { (exit 1); exit 1; }; }
 
24339
    fi
 
24340
    ;;
 
24341
  db43)
 
24342
 
 
24343
  places="$check_places"
 
24344
  if test -z "$places"; then
 
24345
    places="std /usr/local/BerkeleyDB.4.3 /boot/home/config"
 
24346
  fi
 
24347
 
 
24348
  bdb_version="4"
 
24349
  if test ""3"" != "-1"; then
 
24350
    bdb_version="$bdb_version."3""
 
24351
    if test ""-1"" != "-1"; then
 
24352
      bdb_version="$bdb_version."-1""
 
24353
    fi
 
24354
  fi
 
24355
  bdb_places="$places"
 
24356
  bdb_default_search_headers="db43/db.h db4/db.h db.h"
 
24357
  bdb_default_search_lib_names="db-4.3 db4-4.3 db43 db4 db"
 
24358
 
 
24359
 
 
24360
  apu_have_db=0
 
24361
 
 
24362
  # Save the original values of the flags we tweak.
 
24363
  apu_check_lib_save_libs="$LIBS"
 
24364
  apu_check_lib_save_ldflags="$LDFLAGS"
 
24365
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
24366
 
 
24367
  # The variable `found' is the prefix under which we've found
 
24368
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
24369
  found=not
 
24370
  for bdb_place in $bdb_places; do
 
24371
 
 
24372
    LDFLAGS="$apu_check_lib_save_ldflags"
 
24373
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
24374
    case "$bdb_place" in
 
24375
      "std" )
 
24376
        description="the standard places"
 
24377
      ;;
 
24378
      *":"* )
 
24379
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
24380
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
24381
        CPPFLAGS="$CPPFLAGS -I$header"
 
24382
        LDFLAGS="$LDFLAGS -L$lib"
 
24383
        description="$header and $lib"
 
24384
      ;;
 
24385
      * )
 
24386
        if test -d $bdb_place; then
 
24387
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
24388
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
24389
        else
 
24390
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
24391
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
24392
          echo "$as_me:$LINENO: result: directory not found" >&5
 
24393
echo "${ECHO_T}directory not found" >&6
 
24394
          continue
 
24395
        fi
 
24396
        description="$bdb_place"
 
24397
      ;;
 
24398
    esac
 
24399
 
 
24400
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
24401
    # trick to display a message instead.
 
24402
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
24403
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
24404
    echo "$as_me:$LINENO: result: " >&5
 
24405
echo "${ECHO_T}" >&6
 
24406
 
 
24407
    for bdb_libname in $bdb_default_search_lib_names; do
 
24408
      for bdb_header in $bdb_default_search_headers; do
 
24409
        # Clear the header cache variable for each location
 
24410
 
 
24411
        cache_id="`echo ac_cv_header_${bdb_header} \
 
24412
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
24413
 
 
24414
        unset $cache_id
 
24415
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
24416
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
24417
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
24418
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
24419
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
24420
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24421
fi
 
24422
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
24423
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
24424
else
 
24425
  # Is the header compilable?
 
24426
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
24427
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
24428
cat >conftest.$ac_ext <<_ACEOF
 
24429
/* confdefs.h.  */
 
24430
_ACEOF
 
24431
cat confdefs.h >>conftest.$ac_ext
 
24432
cat >>conftest.$ac_ext <<_ACEOF
 
24433
/* end confdefs.h.  */
 
24434
$ac_includes_default
 
24435
#include <$bdb_header>
 
24436
_ACEOF
 
24437
rm -f conftest.$ac_objext
 
24438
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
24439
  (eval $ac_compile) 2>conftest.er1
 
24440
  ac_status=$?
 
24441
  grep -v '^ *+' conftest.er1 >conftest.err
 
24442
  rm -f conftest.er1
 
24443
  cat conftest.err >&5
 
24444
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24445
  (exit $ac_status); } &&
 
24446
         { ac_try='test -z "$ac_c_werror_flag"
 
24447
                         || test ! -s conftest.err'
 
24448
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24449
  (eval $ac_try) 2>&5
 
24450
  ac_status=$?
 
24451
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24452
  (exit $ac_status); }; } &&
 
24453
         { ac_try='test -s conftest.$ac_objext'
 
24454
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24455
  (eval $ac_try) 2>&5
 
24456
  ac_status=$?
 
24457
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24458
  (exit $ac_status); }; }; then
 
24459
  ac_header_compiler=yes
 
24460
else
 
24461
  echo "$as_me: failed program was:" >&5
 
24462
sed 's/^/| /' conftest.$ac_ext >&5
 
24463
 
 
24464
ac_header_compiler=no
 
24465
fi
 
24466
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
24467
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
24468
echo "${ECHO_T}$ac_header_compiler" >&6
 
24469
 
 
24470
# Is the header present?
 
24471
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
24472
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
24473
cat >conftest.$ac_ext <<_ACEOF
 
24474
/* confdefs.h.  */
 
24475
_ACEOF
 
24476
cat confdefs.h >>conftest.$ac_ext
 
24477
cat >>conftest.$ac_ext <<_ACEOF
 
24478
/* end confdefs.h.  */
 
24479
#include <$bdb_header>
 
24480
_ACEOF
 
24481
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
24482
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
24483
  ac_status=$?
 
24484
  grep -v '^ *+' conftest.er1 >conftest.err
 
24485
  rm -f conftest.er1
 
24486
  cat conftest.err >&5
 
24487
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24488
  (exit $ac_status); } >/dev/null; then
 
24489
  if test -s conftest.err; then
 
24490
    ac_cpp_err=$ac_c_preproc_warn_flag
 
24491
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
24492
  else
 
24493
    ac_cpp_err=
 
24494
  fi
 
24495
else
 
24496
  ac_cpp_err=yes
 
24497
fi
 
24498
if test -z "$ac_cpp_err"; then
 
24499
  ac_header_preproc=yes
 
24500
else
 
24501
  echo "$as_me: failed program was:" >&5
 
24502
sed 's/^/| /' conftest.$ac_ext >&5
 
24503
 
 
24504
  ac_header_preproc=no
 
24505
fi
 
24506
rm -f conftest.err conftest.$ac_ext
 
24507
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
24508
echo "${ECHO_T}$ac_header_preproc" >&6
 
24509
 
 
24510
# So?  What about this header?
 
24511
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
24512
  yes:no: )
 
24513
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
24514
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
24515
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
24516
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
24517
    ac_header_preproc=yes
 
24518
    ;;
 
24519
  no:yes:* )
 
24520
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
24521
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
24522
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
24523
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
24524
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
24525
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
24526
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
24527
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
24528
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
24529
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
24530
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
24531
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
24532
    (
 
24533
      cat <<\_ASBOX
 
24534
## ------------------------------------------ ##
 
24535
## Report this to the AC_PACKAGE_NAME lists.  ##
 
24536
## ------------------------------------------ ##
 
24537
_ASBOX
 
24538
    ) |
 
24539
      sed "s/^/$as_me: WARNING:     /" >&2
 
24540
    ;;
 
24541
esac
 
24542
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
24543
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
24544
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
24545
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24546
else
 
24547
  eval "$as_ac_Header=\$ac_header_preproc"
 
24548
fi
 
24549
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
24550
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
24551
 
 
24552
fi
 
24553
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
24554
 
 
24555
          if test ""4"" = "3" -o ""4"" = "4"; then
 
24556
            # We generate a separate cache variable for each prefix and libname
 
24557
            # we search under.  That way, we avoid caching information that
 
24558
            # changes if the user runs `configure' with a different set of
 
24559
            # switches.
 
24560
 
 
24561
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"3"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
24562
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
24563
 
 
24564
 
 
24565
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
24566
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
24567
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
24568
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24569
else
 
24570
 
 
24571
 
 
24572
    apu_try_berkeley_db_save_libs="$LIBS"
 
24573
 
 
24574
    apu_check_berkeley_db_major="4"
 
24575
    apu_check_berkeley_db_minor="3"
 
24576
    apu_check_berkeley_db_patch="-1"
 
24577
    apu_try_berkeley_db_header=$bdb_header
 
24578
    apu_try_berkeley_db_libname=$bdb_libname
 
24579
 
 
24580
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
24581
    if test "$cross_compiling" = yes; then
 
24582
  apu_try_berkeley_db=yes
 
24583
 
 
24584
else
 
24585
  cat >conftest.$ac_ext <<_ACEOF
 
24586
/* confdefs.h.  */
 
24587
_ACEOF
 
24588
cat confdefs.h >>conftest.$ac_ext
 
24589
cat >>conftest.$ac_ext <<_ACEOF
 
24590
/* end confdefs.h.  */
 
24591
 
 
24592
#include <stdio.h>
 
24593
#include <$apu_try_berkeley_db_header>
 
24594
main ()
 
24595
{
 
24596
  int major, minor, patch;
 
24597
 
 
24598
  db_version(&major, &minor, &patch);
 
24599
 
 
24600
  /* Sanity check: ensure that db.h constants actually match the db library */
 
24601
  if (major != DB_VERSION_MAJOR
 
24602
      || minor != DB_VERSION_MINOR
 
24603
      || patch != DB_VERSION_PATCH)
 
24604
    exit (1);
 
24605
 
 
24606
  /* Run-time check:  ensure the library claims to be the correct version. */
 
24607
 
 
24608
  if ($apu_check_berkeley_db_major != -1) {
 
24609
    if (major < $apu_check_berkeley_db_major)
 
24610
      exit (1);
 
24611
    if (major > $apu_check_berkeley_db_major)
 
24612
      exit (0);
 
24613
  }
 
24614
 
 
24615
  if ($apu_check_berkeley_db_minor != -1) {
 
24616
    if (minor < $apu_check_berkeley_db_minor)
 
24617
      exit (1);
 
24618
    if (minor > $apu_check_berkeley_db_minor)
 
24619
      exit (0);
 
24620
  }
 
24621
 
 
24622
  if ($apu_check_berkeley_db_patch == -1
 
24623
      || patch >= $apu_check_berkeley_db_patch)
 
24624
    exit (0);
 
24625
  else
 
24626
    exit (1);
 
24627
}
 
24628
 
 
24629
_ACEOF
 
24630
rm -f conftest$ac_exeext
 
24631
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
24632
  (eval $ac_link) 2>&5
 
24633
  ac_status=$?
 
24634
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24635
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
24636
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24637
  (eval $ac_try) 2>&5
 
24638
  ac_status=$?
 
24639
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24640
  (exit $ac_status); }; }; then
 
24641
  apu_try_berkeley_db=yes
 
24642
else
 
24643
  echo "$as_me: program exited with status $ac_status" >&5
 
24644
echo "$as_me: failed program was:" >&5
 
24645
sed 's/^/| /' conftest.$ac_ext >&5
 
24646
 
 
24647
( exit $ac_status )
 
24648
apu_try_berkeley_db=no
 
24649
fi
 
24650
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
24651
fi
 
24652
 
 
24653
    LIBS="$apu_try_berkeley_db_save_libs"
 
24654
 
 
24655
 
 
24656
                eval "$cache_id=$apu_try_berkeley_db"
 
24657
 
 
24658
fi
 
24659
 
 
24660
            result="`eval echo '$'$cache_id`"
 
24661
            echo "$as_me:$LINENO: result: $result" >&5
 
24662
echo "${ECHO_T}$result" >&6
 
24663
          elif test ""4"" = "1"; then
 
24664
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
24665
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
24666
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
24667
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
24668
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24669
else
 
24670
  ac_check_lib_save_LIBS=$LIBS
 
24671
LIBS="-l$bdb_libname  $LIBS"
 
24672
cat >conftest.$ac_ext <<_ACEOF
 
24673
/* confdefs.h.  */
 
24674
_ACEOF
 
24675
cat confdefs.h >>conftest.$ac_ext
 
24676
cat >>conftest.$ac_ext <<_ACEOF
 
24677
/* end confdefs.h.  */
 
24678
 
 
24679
/* Override any gcc2 internal prototype to avoid an error.  */
 
24680
#ifdef __cplusplus
 
24681
extern "C"
 
24682
#endif
 
24683
/* We use char because int might match the return type of a gcc2
 
24684
   builtin and then its argument prototype would still apply.  */
 
24685
char dbopen ();
 
24686
int
 
24687
main ()
 
24688
{
 
24689
dbopen ();
 
24690
  ;
 
24691
  return 0;
 
24692
}
 
24693
_ACEOF
 
24694
rm -f conftest.$ac_objext conftest$ac_exeext
 
24695
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
24696
  (eval $ac_link) 2>conftest.er1
 
24697
  ac_status=$?
 
24698
  grep -v '^ *+' conftest.er1 >conftest.err
 
24699
  rm -f conftest.er1
 
24700
  cat conftest.err >&5
 
24701
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24702
  (exit $ac_status); } &&
 
24703
         { ac_try='test -z "$ac_c_werror_flag"
 
24704
                         || test ! -s conftest.err'
 
24705
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24706
  (eval $ac_try) 2>&5
 
24707
  ac_status=$?
 
24708
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24709
  (exit $ac_status); }; } &&
 
24710
         { ac_try='test -s conftest$ac_exeext'
 
24711
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24712
  (eval $ac_try) 2>&5
 
24713
  ac_status=$?
 
24714
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24715
  (exit $ac_status); }; }; then
 
24716
  eval "$as_ac_Lib=yes"
 
24717
else
 
24718
  echo "$as_me: failed program was:" >&5
 
24719
sed 's/^/| /' conftest.$ac_ext >&5
 
24720
 
 
24721
eval "$as_ac_Lib=no"
 
24722
fi
 
24723
rm -f conftest.err conftest.$ac_objext \
 
24724
      conftest$ac_exeext conftest.$ac_ext
 
24725
LIBS=$ac_check_lib_save_LIBS
 
24726
fi
 
24727
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
24728
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
24729
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
24730
  result=yes
 
24731
else
 
24732
  result=no
 
24733
 
 
24734
fi
 
24735
 
 
24736
          elif test ""4"" = "2"; then
 
24737
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
24738
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
24739
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
24740
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
24741
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24742
else
 
24743
  ac_check_lib_save_LIBS=$LIBS
 
24744
LIBS="-l$bdb_libname  $LIBS"
 
24745
cat >conftest.$ac_ext <<_ACEOF
 
24746
/* confdefs.h.  */
 
24747
_ACEOF
 
24748
cat confdefs.h >>conftest.$ac_ext
 
24749
cat >>conftest.$ac_ext <<_ACEOF
 
24750
/* end confdefs.h.  */
 
24751
 
 
24752
/* Override any gcc2 internal prototype to avoid an error.  */
 
24753
#ifdef __cplusplus
 
24754
extern "C"
 
24755
#endif
 
24756
/* We use char because int might match the return type of a gcc2
 
24757
   builtin and then its argument prototype would still apply.  */
 
24758
char db_open ();
 
24759
int
 
24760
main ()
 
24761
{
 
24762
db_open ();
 
24763
  ;
 
24764
  return 0;
 
24765
}
 
24766
_ACEOF
 
24767
rm -f conftest.$ac_objext conftest$ac_exeext
 
24768
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
24769
  (eval $ac_link) 2>conftest.er1
 
24770
  ac_status=$?
 
24771
  grep -v '^ *+' conftest.er1 >conftest.err
 
24772
  rm -f conftest.er1
 
24773
  cat conftest.err >&5
 
24774
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24775
  (exit $ac_status); } &&
 
24776
         { ac_try='test -z "$ac_c_werror_flag"
 
24777
                         || test ! -s conftest.err'
 
24778
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24779
  (eval $ac_try) 2>&5
 
24780
  ac_status=$?
 
24781
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24782
  (exit $ac_status); }; } &&
 
24783
         { ac_try='test -s conftest$ac_exeext'
 
24784
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
24785
  (eval $ac_try) 2>&5
 
24786
  ac_status=$?
 
24787
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
24788
  (exit $ac_status); }; }; then
 
24789
  eval "$as_ac_Lib=yes"
 
24790
else
 
24791
  echo "$as_me: failed program was:" >&5
 
24792
sed 's/^/| /' conftest.$ac_ext >&5
 
24793
 
 
24794
eval "$as_ac_Lib=no"
 
24795
fi
 
24796
rm -f conftest.err conftest.$ac_objext \
 
24797
      conftest$ac_exeext conftest.$ac_ext
 
24798
LIBS=$ac_check_lib_save_LIBS
 
24799
fi
 
24800
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
24801
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
24802
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
24803
  result=yes
 
24804
else
 
24805
  result=no
 
24806
 
 
24807
fi
 
24808
 
 
24809
          fi
 
24810
 
 
24811
else
 
24812
  result="no"
 
24813
fi
 
24814
 
 
24815
 
 
24816
 
 
24817
        # If we found it, no need to search any more.
 
24818
        if test "$result" = "yes"; then
 
24819
          found="$bdb_place"
 
24820
          break
 
24821
        fi
 
24822
      done
 
24823
      test "$found" != "not" && break
 
24824
    done
 
24825
    test "$found" != "not" && break
 
24826
  done
 
24827
 
 
24828
  # Restore the original values of the flags we tweak.
 
24829
  LDFLAGS="$apu_check_lib_save_ldflags"
 
24830
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
24831
 
 
24832
  case "$found" in
 
24833
  "not")
 
24834
    apu_have_db=0
 
24835
    ;;
 
24836
  "std")
 
24837
    apu_db_header=$bdb_header
 
24838
    apu_db_lib=$bdb_libname
 
24839
    apu_have_db=1
 
24840
    ;;
 
24841
  *":"*)
 
24842
    header="`echo $found | sed -e 's/:.*$//'`"
 
24843
    lib="`echo $found | sed -e 's/^.*://'`"
 
24844
 
 
24845
 
 
24846
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
24847
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
24848
    APRUTIL_INCLUDES="-I$header"
 
24849
  else
 
24850
    apr_addto_bugger="-I$header"
 
24851
    for i in $apr_addto_bugger; do
 
24852
      apr_addto_duplicate="0"
 
24853
      for j in $APRUTIL_INCLUDES; do
 
24854
        if test "x$i" = "x$j"; then
 
24855
          apr_addto_duplicate="1"
 
24856
          break
 
24857
        fi
 
24858
      done
 
24859
      if test $apr_addto_duplicate = "0"; then
 
24860
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
24861
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
24862
      fi
 
24863
    done
 
24864
  fi
 
24865
 
 
24866
 
 
24867
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
24868
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
24869
    APRUTIL_LDFLAGS="-L$lib"
 
24870
  else
 
24871
    apr_addto_bugger="-L$lib"
 
24872
    for i in $apr_addto_bugger; do
 
24873
      apr_addto_duplicate="0"
 
24874
      for j in $APRUTIL_LDFLAGS; do
 
24875
        if test "x$i" = "x$j"; then
 
24876
          apr_addto_duplicate="1"
 
24877
          break
 
24878
        fi
 
24879
      done
 
24880
      if test $apr_addto_duplicate = "0"; then
 
24881
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
24882
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
24883
      fi
 
24884
    done
 
24885
  fi
 
24886
 
 
24887
    apu_db_header=$bdb_header
 
24888
    apu_db_lib=$bdb_libname
 
24889
    apu_have_db=1
 
24890
    ;;
 
24891
  *)
 
24892
 
 
24893
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
24894
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
24895
    APRUTIL_INCLUDES="-I$found/include"
 
24896
  else
 
24897
    apr_addto_bugger="-I$found/include"
 
24898
    for i in $apr_addto_bugger; do
 
24899
      apr_addto_duplicate="0"
 
24900
      for j in $APRUTIL_INCLUDES; do
 
24901
        if test "x$i" = "x$j"; then
 
24902
          apr_addto_duplicate="1"
 
24903
          break
 
24904
        fi
 
24905
      done
 
24906
      if test $apr_addto_duplicate = "0"; then
 
24907
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
24908
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
24909
      fi
 
24910
    done
 
24911
  fi
 
24912
 
 
24913
 
 
24914
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
24915
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
24916
    APRUTIL_LDFLAGS="-L$found/lib"
 
24917
  else
 
24918
    apr_addto_bugger="-L$found/lib"
 
24919
    for i in $apr_addto_bugger; do
 
24920
      apr_addto_duplicate="0"
 
24921
      for j in $APRUTIL_LDFLAGS; do
 
24922
        if test "x$i" = "x$j"; then
 
24923
          apr_addto_duplicate="1"
 
24924
          break
 
24925
        fi
 
24926
      done
 
24927
      if test $apr_addto_duplicate = "0"; then
 
24928
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
24929
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
24930
      fi
 
24931
    done
 
24932
  fi
 
24933
 
 
24934
    apu_db_header=$bdb_header
 
24935
    apu_db_lib=$bdb_libname
 
24936
    apu_have_db=1
 
24937
    ;;
 
24938
  esac
 
24939
 
 
24940
  if test "$apu_have_db" = "1"; then
 
24941
    apu_db_version=4
 
24942
  fi
 
24943
 
 
24944
    if test "$apu_db_version" != "4"; then
 
24945
      { { echo "$as_me:$LINENO: error: Berkeley db4 not found" >&5
 
24946
echo "$as_me: error: Berkeley db4 not found" >&2;}
 
24947
   { (exit 1); exit 1; }; }
 
24948
    fi
 
24949
    ;;
 
24950
  db44)
 
24951
 
 
24952
  places="$check_places"
 
24953
  if test -z "$places"; then
 
24954
    places="std /usr/local/BerkeleyDB.4.4 /boot/home/config"
 
24955
  fi
 
24956
 
 
24957
  bdb_version="4"
 
24958
  if test ""4"" != "-1"; then
 
24959
    bdb_version="$bdb_version."4""
 
24960
    if test ""-1"" != "-1"; then
 
24961
      bdb_version="$bdb_version."-1""
 
24962
    fi
 
24963
  fi
 
24964
  bdb_places="$places"
 
24965
  bdb_default_search_headers="db44/db.h db4/db.h db.h"
 
24966
  bdb_default_search_lib_names="db-4.4 db4-4.4 db44 db4 db"
 
24967
 
 
24968
 
 
24969
  apu_have_db=0
 
24970
 
 
24971
  # Save the original values of the flags we tweak.
 
24972
  apu_check_lib_save_libs="$LIBS"
 
24973
  apu_check_lib_save_ldflags="$LDFLAGS"
 
24974
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
24975
 
 
24976
  # The variable `found' is the prefix under which we've found
 
24977
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
24978
  found=not
 
24979
  for bdb_place in $bdb_places; do
 
24980
 
 
24981
    LDFLAGS="$apu_check_lib_save_ldflags"
 
24982
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
24983
    case "$bdb_place" in
 
24984
      "std" )
 
24985
        description="the standard places"
 
24986
      ;;
 
24987
      *":"* )
 
24988
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
24989
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
24990
        CPPFLAGS="$CPPFLAGS -I$header"
 
24991
        LDFLAGS="$LDFLAGS -L$lib"
 
24992
        description="$header and $lib"
 
24993
      ;;
 
24994
      * )
 
24995
        if test -d $bdb_place; then
 
24996
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
24997
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
24998
        else
 
24999
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
25000
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
25001
          echo "$as_me:$LINENO: result: directory not found" >&5
 
25002
echo "${ECHO_T}directory not found" >&6
 
25003
          continue
 
25004
        fi
 
25005
        description="$bdb_place"
 
25006
      ;;
 
25007
    esac
 
25008
 
 
25009
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
25010
    # trick to display a message instead.
 
25011
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
25012
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
25013
    echo "$as_me:$LINENO: result: " >&5
 
25014
echo "${ECHO_T}" >&6
 
25015
 
 
25016
    for bdb_libname in $bdb_default_search_lib_names; do
 
25017
      for bdb_header in $bdb_default_search_headers; do
 
25018
        # Clear the header cache variable for each location
 
25019
 
 
25020
        cache_id="`echo ac_cv_header_${bdb_header} \
 
25021
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
25022
 
 
25023
        unset $cache_id
 
25024
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
25025
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25026
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
25027
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
25028
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25029
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25030
fi
 
25031
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
25032
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
25033
else
 
25034
  # Is the header compilable?
 
25035
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
25036
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
25037
cat >conftest.$ac_ext <<_ACEOF
 
25038
/* confdefs.h.  */
 
25039
_ACEOF
 
25040
cat confdefs.h >>conftest.$ac_ext
 
25041
cat >>conftest.$ac_ext <<_ACEOF
 
25042
/* end confdefs.h.  */
 
25043
$ac_includes_default
 
25044
#include <$bdb_header>
 
25045
_ACEOF
 
25046
rm -f conftest.$ac_objext
 
25047
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
25048
  (eval $ac_compile) 2>conftest.er1
 
25049
  ac_status=$?
 
25050
  grep -v '^ *+' conftest.er1 >conftest.err
 
25051
  rm -f conftest.er1
 
25052
  cat conftest.err >&5
 
25053
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25054
  (exit $ac_status); } &&
 
25055
         { ac_try='test -z "$ac_c_werror_flag"
 
25056
                         || test ! -s conftest.err'
 
25057
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25058
  (eval $ac_try) 2>&5
 
25059
  ac_status=$?
 
25060
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25061
  (exit $ac_status); }; } &&
 
25062
         { ac_try='test -s conftest.$ac_objext'
 
25063
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25064
  (eval $ac_try) 2>&5
 
25065
  ac_status=$?
 
25066
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25067
  (exit $ac_status); }; }; then
 
25068
  ac_header_compiler=yes
 
25069
else
 
25070
  echo "$as_me: failed program was:" >&5
 
25071
sed 's/^/| /' conftest.$ac_ext >&5
 
25072
 
 
25073
ac_header_compiler=no
 
25074
fi
 
25075
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
25076
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
25077
echo "${ECHO_T}$ac_header_compiler" >&6
 
25078
 
 
25079
# Is the header present?
 
25080
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
25081
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
25082
cat >conftest.$ac_ext <<_ACEOF
 
25083
/* confdefs.h.  */
 
25084
_ACEOF
 
25085
cat confdefs.h >>conftest.$ac_ext
 
25086
cat >>conftest.$ac_ext <<_ACEOF
 
25087
/* end confdefs.h.  */
 
25088
#include <$bdb_header>
 
25089
_ACEOF
 
25090
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
25091
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
25092
  ac_status=$?
 
25093
  grep -v '^ *+' conftest.er1 >conftest.err
 
25094
  rm -f conftest.er1
 
25095
  cat conftest.err >&5
 
25096
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25097
  (exit $ac_status); } >/dev/null; then
 
25098
  if test -s conftest.err; then
 
25099
    ac_cpp_err=$ac_c_preproc_warn_flag
 
25100
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
25101
  else
 
25102
    ac_cpp_err=
 
25103
  fi
 
25104
else
 
25105
  ac_cpp_err=yes
 
25106
fi
 
25107
if test -z "$ac_cpp_err"; then
 
25108
  ac_header_preproc=yes
 
25109
else
 
25110
  echo "$as_me: failed program was:" >&5
 
25111
sed 's/^/| /' conftest.$ac_ext >&5
 
25112
 
 
25113
  ac_header_preproc=no
 
25114
fi
 
25115
rm -f conftest.err conftest.$ac_ext
 
25116
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
25117
echo "${ECHO_T}$ac_header_preproc" >&6
 
25118
 
 
25119
# So?  What about this header?
 
25120
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
25121
  yes:no: )
 
25122
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
25123
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
25124
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
25125
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
25126
    ac_header_preproc=yes
 
25127
    ;;
 
25128
  no:yes:* )
 
25129
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
25130
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
25131
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
25132
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
25133
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
25134
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
25135
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
25136
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
25137
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
25138
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
25139
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
25140
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
25141
    (
 
25142
      cat <<\_ASBOX
 
25143
## ------------------------------------------ ##
 
25144
## Report this to the AC_PACKAGE_NAME lists.  ##
 
25145
## ------------------------------------------ ##
 
25146
_ASBOX
 
25147
    ) |
 
25148
      sed "s/^/$as_me: WARNING:     /" >&2
 
25149
    ;;
 
25150
esac
 
25151
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
25152
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
25153
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25154
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25155
else
 
25156
  eval "$as_ac_Header=\$ac_header_preproc"
 
25157
fi
 
25158
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
25159
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
25160
 
 
25161
fi
 
25162
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
25163
 
 
25164
          if test ""4"" = "3" -o ""4"" = "4"; then
 
25165
            # We generate a separate cache variable for each prefix and libname
 
25166
            # we search under.  That way, we avoid caching information that
 
25167
            # changes if the user runs `configure' with a different set of
 
25168
            # switches.
 
25169
 
 
25170
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"4"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
25171
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
25172
 
 
25173
 
 
25174
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
25175
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
25176
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
25177
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25178
else
 
25179
 
 
25180
 
 
25181
    apu_try_berkeley_db_save_libs="$LIBS"
 
25182
 
 
25183
    apu_check_berkeley_db_major="4"
 
25184
    apu_check_berkeley_db_minor="4"
 
25185
    apu_check_berkeley_db_patch="-1"
 
25186
    apu_try_berkeley_db_header=$bdb_header
 
25187
    apu_try_berkeley_db_libname=$bdb_libname
 
25188
 
 
25189
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
25190
    if test "$cross_compiling" = yes; then
 
25191
  apu_try_berkeley_db=yes
 
25192
 
 
25193
else
 
25194
  cat >conftest.$ac_ext <<_ACEOF
 
25195
/* confdefs.h.  */
 
25196
_ACEOF
 
25197
cat confdefs.h >>conftest.$ac_ext
 
25198
cat >>conftest.$ac_ext <<_ACEOF
 
25199
/* end confdefs.h.  */
 
25200
 
 
25201
#include <stdio.h>
 
25202
#include <$apu_try_berkeley_db_header>
 
25203
main ()
 
25204
{
 
25205
  int major, minor, patch;
 
25206
 
 
25207
  db_version(&major, &minor, &patch);
 
25208
 
 
25209
  /* Sanity check: ensure that db.h constants actually match the db library */
 
25210
  if (major != DB_VERSION_MAJOR
 
25211
      || minor != DB_VERSION_MINOR
 
25212
      || patch != DB_VERSION_PATCH)
 
25213
    exit (1);
 
25214
 
 
25215
  /* Run-time check:  ensure the library claims to be the correct version. */
 
25216
 
 
25217
  if ($apu_check_berkeley_db_major != -1) {
 
25218
    if (major < $apu_check_berkeley_db_major)
 
25219
      exit (1);
 
25220
    if (major > $apu_check_berkeley_db_major)
 
25221
      exit (0);
 
25222
  }
 
25223
 
 
25224
  if ($apu_check_berkeley_db_minor != -1) {
 
25225
    if (minor < $apu_check_berkeley_db_minor)
 
25226
      exit (1);
 
25227
    if (minor > $apu_check_berkeley_db_minor)
 
25228
      exit (0);
 
25229
  }
 
25230
 
 
25231
  if ($apu_check_berkeley_db_patch == -1
 
25232
      || patch >= $apu_check_berkeley_db_patch)
 
25233
    exit (0);
 
25234
  else
 
25235
    exit (1);
 
25236
}
 
25237
 
 
25238
_ACEOF
 
25239
rm -f conftest$ac_exeext
 
25240
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25241
  (eval $ac_link) 2>&5
 
25242
  ac_status=$?
 
25243
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25244
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
25245
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25246
  (eval $ac_try) 2>&5
 
25247
  ac_status=$?
 
25248
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25249
  (exit $ac_status); }; }; then
 
25250
  apu_try_berkeley_db=yes
 
25251
else
 
25252
  echo "$as_me: program exited with status $ac_status" >&5
 
25253
echo "$as_me: failed program was:" >&5
 
25254
sed 's/^/| /' conftest.$ac_ext >&5
 
25255
 
 
25256
( exit $ac_status )
 
25257
apu_try_berkeley_db=no
 
25258
fi
 
25259
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
25260
fi
 
25261
 
 
25262
    LIBS="$apu_try_berkeley_db_save_libs"
 
25263
 
 
25264
 
 
25265
                eval "$cache_id=$apu_try_berkeley_db"
 
25266
 
 
25267
fi
 
25268
 
 
25269
            result="`eval echo '$'$cache_id`"
 
25270
            echo "$as_me:$LINENO: result: $result" >&5
 
25271
echo "${ECHO_T}$result" >&6
 
25272
          elif test ""4"" = "1"; then
 
25273
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
25274
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
25275
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
25276
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
25277
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25278
else
 
25279
  ac_check_lib_save_LIBS=$LIBS
 
25280
LIBS="-l$bdb_libname  $LIBS"
 
25281
cat >conftest.$ac_ext <<_ACEOF
 
25282
/* confdefs.h.  */
 
25283
_ACEOF
 
25284
cat confdefs.h >>conftest.$ac_ext
 
25285
cat >>conftest.$ac_ext <<_ACEOF
 
25286
/* end confdefs.h.  */
 
25287
 
 
25288
/* Override any gcc2 internal prototype to avoid an error.  */
 
25289
#ifdef __cplusplus
 
25290
extern "C"
 
25291
#endif
 
25292
/* We use char because int might match the return type of a gcc2
 
25293
   builtin and then its argument prototype would still apply.  */
 
25294
char dbopen ();
 
25295
int
 
25296
main ()
 
25297
{
 
25298
dbopen ();
 
25299
  ;
 
25300
  return 0;
 
25301
}
 
25302
_ACEOF
 
25303
rm -f conftest.$ac_objext conftest$ac_exeext
 
25304
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25305
  (eval $ac_link) 2>conftest.er1
 
25306
  ac_status=$?
 
25307
  grep -v '^ *+' conftest.er1 >conftest.err
 
25308
  rm -f conftest.er1
 
25309
  cat conftest.err >&5
 
25310
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25311
  (exit $ac_status); } &&
 
25312
         { ac_try='test -z "$ac_c_werror_flag"
 
25313
                         || test ! -s conftest.err'
 
25314
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25315
  (eval $ac_try) 2>&5
 
25316
  ac_status=$?
 
25317
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25318
  (exit $ac_status); }; } &&
 
25319
         { ac_try='test -s conftest$ac_exeext'
 
25320
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25321
  (eval $ac_try) 2>&5
 
25322
  ac_status=$?
 
25323
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25324
  (exit $ac_status); }; }; then
 
25325
  eval "$as_ac_Lib=yes"
 
25326
else
 
25327
  echo "$as_me: failed program was:" >&5
 
25328
sed 's/^/| /' conftest.$ac_ext >&5
 
25329
 
 
25330
eval "$as_ac_Lib=no"
 
25331
fi
 
25332
rm -f conftest.err conftest.$ac_objext \
 
25333
      conftest$ac_exeext conftest.$ac_ext
 
25334
LIBS=$ac_check_lib_save_LIBS
 
25335
fi
 
25336
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
25337
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
25338
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
25339
  result=yes
 
25340
else
 
25341
  result=no
 
25342
 
 
25343
fi
 
25344
 
 
25345
          elif test ""4"" = "2"; then
 
25346
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
25347
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
25348
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
25349
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
25350
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25351
else
 
25352
  ac_check_lib_save_LIBS=$LIBS
 
25353
LIBS="-l$bdb_libname  $LIBS"
 
25354
cat >conftest.$ac_ext <<_ACEOF
 
25355
/* confdefs.h.  */
 
25356
_ACEOF
 
25357
cat confdefs.h >>conftest.$ac_ext
 
25358
cat >>conftest.$ac_ext <<_ACEOF
 
25359
/* end confdefs.h.  */
 
25360
 
 
25361
/* Override any gcc2 internal prototype to avoid an error.  */
 
25362
#ifdef __cplusplus
 
25363
extern "C"
 
25364
#endif
 
25365
/* We use char because int might match the return type of a gcc2
 
25366
   builtin and then its argument prototype would still apply.  */
 
25367
char db_open ();
 
25368
int
 
25369
main ()
 
25370
{
 
25371
db_open ();
 
25372
  ;
 
25373
  return 0;
 
25374
}
 
25375
_ACEOF
 
25376
rm -f conftest.$ac_objext conftest$ac_exeext
 
25377
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25378
  (eval $ac_link) 2>conftest.er1
 
25379
  ac_status=$?
 
25380
  grep -v '^ *+' conftest.er1 >conftest.err
 
25381
  rm -f conftest.er1
 
25382
  cat conftest.err >&5
 
25383
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25384
  (exit $ac_status); } &&
 
25385
         { ac_try='test -z "$ac_c_werror_flag"
 
25386
                         || test ! -s conftest.err'
 
25387
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25388
  (eval $ac_try) 2>&5
 
25389
  ac_status=$?
 
25390
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25391
  (exit $ac_status); }; } &&
 
25392
         { ac_try='test -s conftest$ac_exeext'
 
25393
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25394
  (eval $ac_try) 2>&5
 
25395
  ac_status=$?
 
25396
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25397
  (exit $ac_status); }; }; then
 
25398
  eval "$as_ac_Lib=yes"
 
25399
else
 
25400
  echo "$as_me: failed program was:" >&5
 
25401
sed 's/^/| /' conftest.$ac_ext >&5
 
25402
 
 
25403
eval "$as_ac_Lib=no"
 
25404
fi
 
25405
rm -f conftest.err conftest.$ac_objext \
 
25406
      conftest$ac_exeext conftest.$ac_ext
 
25407
LIBS=$ac_check_lib_save_LIBS
 
25408
fi
 
25409
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
25410
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
25411
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
25412
  result=yes
 
25413
else
 
25414
  result=no
 
25415
 
 
25416
fi
 
25417
 
 
25418
          fi
 
25419
 
 
25420
else
 
25421
  result="no"
 
25422
fi
 
25423
 
 
25424
 
 
25425
 
 
25426
        # If we found it, no need to search any more.
 
25427
        if test "$result" = "yes"; then
 
25428
          found="$bdb_place"
 
25429
          break
 
25430
        fi
 
25431
      done
 
25432
      test "$found" != "not" && break
 
25433
    done
 
25434
    test "$found" != "not" && break
 
25435
  done
 
25436
 
 
25437
  # Restore the original values of the flags we tweak.
 
25438
  LDFLAGS="$apu_check_lib_save_ldflags"
 
25439
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
25440
 
 
25441
  case "$found" in
 
25442
  "not")
 
25443
    apu_have_db=0
 
25444
    ;;
 
25445
  "std")
 
25446
    apu_db_header=$bdb_header
 
25447
    apu_db_lib=$bdb_libname
 
25448
    apu_have_db=1
 
25449
    ;;
 
25450
  *":"*)
 
25451
    header="`echo $found | sed -e 's/:.*$//'`"
 
25452
    lib="`echo $found | sed -e 's/^.*://'`"
 
25453
 
 
25454
 
 
25455
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
25456
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
25457
    APRUTIL_INCLUDES="-I$header"
 
25458
  else
 
25459
    apr_addto_bugger="-I$header"
 
25460
    for i in $apr_addto_bugger; do
 
25461
      apr_addto_duplicate="0"
 
25462
      for j in $APRUTIL_INCLUDES; do
 
25463
        if test "x$i" = "x$j"; then
 
25464
          apr_addto_duplicate="1"
 
25465
          break
 
25466
        fi
 
25467
      done
 
25468
      if test $apr_addto_duplicate = "0"; then
 
25469
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
25470
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
25471
      fi
 
25472
    done
 
25473
  fi
 
25474
 
 
25475
 
 
25476
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
25477
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
25478
    APRUTIL_LDFLAGS="-L$lib"
 
25479
  else
 
25480
    apr_addto_bugger="-L$lib"
 
25481
    for i in $apr_addto_bugger; do
 
25482
      apr_addto_duplicate="0"
 
25483
      for j in $APRUTIL_LDFLAGS; do
 
25484
        if test "x$i" = "x$j"; then
 
25485
          apr_addto_duplicate="1"
 
25486
          break
 
25487
        fi
 
25488
      done
 
25489
      if test $apr_addto_duplicate = "0"; then
 
25490
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
25491
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
25492
      fi
 
25493
    done
 
25494
  fi
 
25495
 
 
25496
    apu_db_header=$bdb_header
 
25497
    apu_db_lib=$bdb_libname
 
25498
    apu_have_db=1
 
25499
    ;;
 
25500
  *)
 
25501
 
 
25502
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
25503
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
25504
    APRUTIL_INCLUDES="-I$found/include"
 
25505
  else
 
25506
    apr_addto_bugger="-I$found/include"
 
25507
    for i in $apr_addto_bugger; do
 
25508
      apr_addto_duplicate="0"
 
25509
      for j in $APRUTIL_INCLUDES; do
 
25510
        if test "x$i" = "x$j"; then
 
25511
          apr_addto_duplicate="1"
 
25512
          break
 
25513
        fi
 
25514
      done
 
25515
      if test $apr_addto_duplicate = "0"; then
 
25516
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
25517
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
25518
      fi
 
25519
    done
 
25520
  fi
 
25521
 
 
25522
 
 
25523
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
25524
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
25525
    APRUTIL_LDFLAGS="-L$found/lib"
 
25526
  else
 
25527
    apr_addto_bugger="-L$found/lib"
 
25528
    for i in $apr_addto_bugger; do
 
25529
      apr_addto_duplicate="0"
 
25530
      for j in $APRUTIL_LDFLAGS; do
 
25531
        if test "x$i" = "x$j"; then
 
25532
          apr_addto_duplicate="1"
 
25533
          break
 
25534
        fi
 
25535
      done
 
25536
      if test $apr_addto_duplicate = "0"; then
 
25537
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
25538
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
25539
      fi
 
25540
    done
 
25541
  fi
 
25542
 
 
25543
    apu_db_header=$bdb_header
 
25544
    apu_db_lib=$bdb_libname
 
25545
    apu_have_db=1
 
25546
    ;;
 
25547
  esac
 
25548
 
 
25549
  if test "$apu_have_db" = "1"; then
 
25550
    apu_db_version=4
 
25551
  fi
 
25552
 
 
25553
    if test "$apu_db_version" != "4"; then
 
25554
      { { echo "$as_me:$LINENO: error: Berkeley db4 not found" >&5
 
25555
echo "$as_me: error: Berkeley db4 not found" >&2;}
 
25556
   { (exit 1); exit 1; }; }
 
25557
    fi
 
25558
    ;;
 
25559
  default)
 
25560
 
 
25561
  all_places="$check_places"
 
25562
 
 
25563
 
 
25564
  places="$all_places"
 
25565
  if test -z "$places"; then
 
25566
    places="std /usr/local/BerkeleyDB.4.4 /boot/home/config"
 
25567
  fi
 
25568
 
 
25569
  bdb_version="4"
 
25570
  if test ""4"" != "-1"; then
 
25571
    bdb_version="$bdb_version."4""
 
25572
    if test ""-1"" != "-1"; then
 
25573
      bdb_version="$bdb_version."-1""
 
25574
    fi
 
25575
  fi
 
25576
  bdb_places="$places"
 
25577
  bdb_default_search_headers="db44/db.h db4/db.h db.h"
 
25578
  bdb_default_search_lib_names="db-4.4 db4-4.4 db44 db4 db"
 
25579
 
 
25580
 
 
25581
  apu_have_db=0
 
25582
 
 
25583
  # Save the original values of the flags we tweak.
 
25584
  apu_check_lib_save_libs="$LIBS"
 
25585
  apu_check_lib_save_ldflags="$LDFLAGS"
 
25586
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
25587
 
 
25588
  # The variable `found' is the prefix under which we've found
 
25589
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
25590
  found=not
 
25591
  for bdb_place in $bdb_places; do
 
25592
 
 
25593
    LDFLAGS="$apu_check_lib_save_ldflags"
 
25594
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
25595
    case "$bdb_place" in
 
25596
      "std" )
 
25597
        description="the standard places"
 
25598
      ;;
 
25599
      *":"* )
 
25600
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
25601
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
25602
        CPPFLAGS="$CPPFLAGS -I$header"
 
25603
        LDFLAGS="$LDFLAGS -L$lib"
 
25604
        description="$header and $lib"
 
25605
      ;;
 
25606
      * )
 
25607
        if test -d $bdb_place; then
 
25608
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
25609
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
25610
        else
 
25611
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
25612
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
25613
          echo "$as_me:$LINENO: result: directory not found" >&5
 
25614
echo "${ECHO_T}directory not found" >&6
 
25615
          continue
 
25616
        fi
 
25617
        description="$bdb_place"
 
25618
      ;;
 
25619
    esac
 
25620
 
 
25621
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
25622
    # trick to display a message instead.
 
25623
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
25624
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
25625
    echo "$as_me:$LINENO: result: " >&5
 
25626
echo "${ECHO_T}" >&6
 
25627
 
 
25628
    for bdb_libname in $bdb_default_search_lib_names; do
 
25629
      for bdb_header in $bdb_default_search_headers; do
 
25630
        # Clear the header cache variable for each location
 
25631
 
 
25632
        cache_id="`echo ac_cv_header_${bdb_header} \
 
25633
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
25634
 
 
25635
        unset $cache_id
 
25636
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
25637
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25638
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
25639
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
25640
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25641
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25642
fi
 
25643
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
25644
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
25645
else
 
25646
  # Is the header compilable?
 
25647
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
25648
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
25649
cat >conftest.$ac_ext <<_ACEOF
 
25650
/* confdefs.h.  */
 
25651
_ACEOF
 
25652
cat confdefs.h >>conftest.$ac_ext
 
25653
cat >>conftest.$ac_ext <<_ACEOF
 
25654
/* end confdefs.h.  */
 
25655
$ac_includes_default
 
25656
#include <$bdb_header>
 
25657
_ACEOF
 
25658
rm -f conftest.$ac_objext
 
25659
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
25660
  (eval $ac_compile) 2>conftest.er1
 
25661
  ac_status=$?
 
25662
  grep -v '^ *+' conftest.er1 >conftest.err
 
25663
  rm -f conftest.er1
 
25664
  cat conftest.err >&5
 
25665
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25666
  (exit $ac_status); } &&
 
25667
         { ac_try='test -z "$ac_c_werror_flag"
 
25668
                         || test ! -s conftest.err'
 
25669
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25670
  (eval $ac_try) 2>&5
 
25671
  ac_status=$?
 
25672
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25673
  (exit $ac_status); }; } &&
 
25674
         { ac_try='test -s conftest.$ac_objext'
 
25675
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25676
  (eval $ac_try) 2>&5
 
25677
  ac_status=$?
 
25678
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25679
  (exit $ac_status); }; }; then
 
25680
  ac_header_compiler=yes
 
25681
else
 
25682
  echo "$as_me: failed program was:" >&5
 
25683
sed 's/^/| /' conftest.$ac_ext >&5
 
25684
 
 
25685
ac_header_compiler=no
 
25686
fi
 
25687
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
25688
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
25689
echo "${ECHO_T}$ac_header_compiler" >&6
 
25690
 
 
25691
# Is the header present?
 
25692
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
25693
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
25694
cat >conftest.$ac_ext <<_ACEOF
 
25695
/* confdefs.h.  */
 
25696
_ACEOF
 
25697
cat confdefs.h >>conftest.$ac_ext
 
25698
cat >>conftest.$ac_ext <<_ACEOF
 
25699
/* end confdefs.h.  */
 
25700
#include <$bdb_header>
 
25701
_ACEOF
 
25702
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
25703
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
25704
  ac_status=$?
 
25705
  grep -v '^ *+' conftest.er1 >conftest.err
 
25706
  rm -f conftest.er1
 
25707
  cat conftest.err >&5
 
25708
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25709
  (exit $ac_status); } >/dev/null; then
 
25710
  if test -s conftest.err; then
 
25711
    ac_cpp_err=$ac_c_preproc_warn_flag
 
25712
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
25713
  else
 
25714
    ac_cpp_err=
 
25715
  fi
 
25716
else
 
25717
  ac_cpp_err=yes
 
25718
fi
 
25719
if test -z "$ac_cpp_err"; then
 
25720
  ac_header_preproc=yes
 
25721
else
 
25722
  echo "$as_me: failed program was:" >&5
 
25723
sed 's/^/| /' conftest.$ac_ext >&5
 
25724
 
 
25725
  ac_header_preproc=no
 
25726
fi
 
25727
rm -f conftest.err conftest.$ac_ext
 
25728
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
25729
echo "${ECHO_T}$ac_header_preproc" >&6
 
25730
 
 
25731
# So?  What about this header?
 
25732
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
25733
  yes:no: )
 
25734
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
25735
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
25736
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
25737
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
25738
    ac_header_preproc=yes
 
25739
    ;;
 
25740
  no:yes:* )
 
25741
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
25742
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
25743
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
25744
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
25745
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
25746
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
25747
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
25748
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
25749
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
25750
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
25751
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
25752
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
25753
    (
 
25754
      cat <<\_ASBOX
 
25755
## ------------------------------------------ ##
 
25756
## Report this to the AC_PACKAGE_NAME lists.  ##
 
25757
## ------------------------------------------ ##
 
25758
_ASBOX
 
25759
    ) |
 
25760
      sed "s/^/$as_me: WARNING:     /" >&2
 
25761
    ;;
 
25762
esac
 
25763
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
25764
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
25765
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25766
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25767
else
 
25768
  eval "$as_ac_Header=\$ac_header_preproc"
 
25769
fi
 
25770
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
25771
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
25772
 
 
25773
fi
 
25774
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
25775
 
 
25776
          if test ""4"" = "3" -o ""4"" = "4"; then
 
25777
            # We generate a separate cache variable for each prefix and libname
 
25778
            # we search under.  That way, we avoid caching information that
 
25779
            # changes if the user runs `configure' with a different set of
 
25780
            # switches.
 
25781
 
 
25782
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"4"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
25783
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
25784
 
 
25785
 
 
25786
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
25787
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
25788
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
25789
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25790
else
 
25791
 
 
25792
 
 
25793
    apu_try_berkeley_db_save_libs="$LIBS"
 
25794
 
 
25795
    apu_check_berkeley_db_major="4"
 
25796
    apu_check_berkeley_db_minor="4"
 
25797
    apu_check_berkeley_db_patch="-1"
 
25798
    apu_try_berkeley_db_header=$bdb_header
 
25799
    apu_try_berkeley_db_libname=$bdb_libname
 
25800
 
 
25801
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
25802
    if test "$cross_compiling" = yes; then
 
25803
  apu_try_berkeley_db=yes
 
25804
 
 
25805
else
 
25806
  cat >conftest.$ac_ext <<_ACEOF
 
25807
/* confdefs.h.  */
 
25808
_ACEOF
 
25809
cat confdefs.h >>conftest.$ac_ext
 
25810
cat >>conftest.$ac_ext <<_ACEOF
 
25811
/* end confdefs.h.  */
 
25812
 
 
25813
#include <stdio.h>
 
25814
#include <$apu_try_berkeley_db_header>
 
25815
main ()
 
25816
{
 
25817
  int major, minor, patch;
 
25818
 
 
25819
  db_version(&major, &minor, &patch);
 
25820
 
 
25821
  /* Sanity check: ensure that db.h constants actually match the db library */
 
25822
  if (major != DB_VERSION_MAJOR
 
25823
      || minor != DB_VERSION_MINOR
 
25824
      || patch != DB_VERSION_PATCH)
 
25825
    exit (1);
 
25826
 
 
25827
  /* Run-time check:  ensure the library claims to be the correct version. */
 
25828
 
 
25829
  if ($apu_check_berkeley_db_major != -1) {
 
25830
    if (major < $apu_check_berkeley_db_major)
 
25831
      exit (1);
 
25832
    if (major > $apu_check_berkeley_db_major)
 
25833
      exit (0);
 
25834
  }
 
25835
 
 
25836
  if ($apu_check_berkeley_db_minor != -1) {
 
25837
    if (minor < $apu_check_berkeley_db_minor)
 
25838
      exit (1);
 
25839
    if (minor > $apu_check_berkeley_db_minor)
 
25840
      exit (0);
 
25841
  }
 
25842
 
 
25843
  if ($apu_check_berkeley_db_patch == -1
 
25844
      || patch >= $apu_check_berkeley_db_patch)
 
25845
    exit (0);
 
25846
  else
 
25847
    exit (1);
 
25848
}
 
25849
 
 
25850
_ACEOF
 
25851
rm -f conftest$ac_exeext
 
25852
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25853
  (eval $ac_link) 2>&5
 
25854
  ac_status=$?
 
25855
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25856
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
25857
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25858
  (eval $ac_try) 2>&5
 
25859
  ac_status=$?
 
25860
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25861
  (exit $ac_status); }; }; then
 
25862
  apu_try_berkeley_db=yes
 
25863
else
 
25864
  echo "$as_me: program exited with status $ac_status" >&5
 
25865
echo "$as_me: failed program was:" >&5
 
25866
sed 's/^/| /' conftest.$ac_ext >&5
 
25867
 
 
25868
( exit $ac_status )
 
25869
apu_try_berkeley_db=no
 
25870
fi
 
25871
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
25872
fi
 
25873
 
 
25874
    LIBS="$apu_try_berkeley_db_save_libs"
 
25875
 
 
25876
 
 
25877
                eval "$cache_id=$apu_try_berkeley_db"
 
25878
 
 
25879
fi
 
25880
 
 
25881
            result="`eval echo '$'$cache_id`"
 
25882
            echo "$as_me:$LINENO: result: $result" >&5
 
25883
echo "${ECHO_T}$result" >&6
 
25884
          elif test ""4"" = "1"; then
 
25885
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
25886
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
25887
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
25888
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
25889
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25890
else
 
25891
  ac_check_lib_save_LIBS=$LIBS
 
25892
LIBS="-l$bdb_libname  $LIBS"
 
25893
cat >conftest.$ac_ext <<_ACEOF
 
25894
/* confdefs.h.  */
 
25895
_ACEOF
 
25896
cat confdefs.h >>conftest.$ac_ext
 
25897
cat >>conftest.$ac_ext <<_ACEOF
 
25898
/* end confdefs.h.  */
 
25899
 
 
25900
/* Override any gcc2 internal prototype to avoid an error.  */
 
25901
#ifdef __cplusplus
 
25902
extern "C"
 
25903
#endif
 
25904
/* We use char because int might match the return type of a gcc2
 
25905
   builtin and then its argument prototype would still apply.  */
 
25906
char dbopen ();
 
25907
int
 
25908
main ()
 
25909
{
 
25910
dbopen ();
 
25911
  ;
 
25912
  return 0;
 
25913
}
 
25914
_ACEOF
 
25915
rm -f conftest.$ac_objext conftest$ac_exeext
 
25916
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25917
  (eval $ac_link) 2>conftest.er1
 
25918
  ac_status=$?
 
25919
  grep -v '^ *+' conftest.er1 >conftest.err
 
25920
  rm -f conftest.er1
 
25921
  cat conftest.err >&5
 
25922
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25923
  (exit $ac_status); } &&
 
25924
         { ac_try='test -z "$ac_c_werror_flag"
 
25925
                         || test ! -s conftest.err'
 
25926
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25927
  (eval $ac_try) 2>&5
 
25928
  ac_status=$?
 
25929
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25930
  (exit $ac_status); }; } &&
 
25931
         { ac_try='test -s conftest$ac_exeext'
 
25932
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25933
  (eval $ac_try) 2>&5
 
25934
  ac_status=$?
 
25935
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25936
  (exit $ac_status); }; }; then
 
25937
  eval "$as_ac_Lib=yes"
 
25938
else
 
25939
  echo "$as_me: failed program was:" >&5
 
25940
sed 's/^/| /' conftest.$ac_ext >&5
 
25941
 
 
25942
eval "$as_ac_Lib=no"
 
25943
fi
 
25944
rm -f conftest.err conftest.$ac_objext \
 
25945
      conftest$ac_exeext conftest.$ac_ext
 
25946
LIBS=$ac_check_lib_save_LIBS
 
25947
fi
 
25948
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
25949
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
25950
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
25951
  result=yes
 
25952
else
 
25953
  result=no
 
25954
 
 
25955
fi
 
25956
 
 
25957
          elif test ""4"" = "2"; then
 
25958
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
25959
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
25960
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
25961
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
25962
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25963
else
 
25964
  ac_check_lib_save_LIBS=$LIBS
 
25965
LIBS="-l$bdb_libname  $LIBS"
 
25966
cat >conftest.$ac_ext <<_ACEOF
 
25967
/* confdefs.h.  */
 
25968
_ACEOF
 
25969
cat confdefs.h >>conftest.$ac_ext
 
25970
cat >>conftest.$ac_ext <<_ACEOF
 
25971
/* end confdefs.h.  */
 
25972
 
 
25973
/* Override any gcc2 internal prototype to avoid an error.  */
 
25974
#ifdef __cplusplus
 
25975
extern "C"
 
25976
#endif
 
25977
/* We use char because int might match the return type of a gcc2
 
25978
   builtin and then its argument prototype would still apply.  */
 
25979
char db_open ();
 
25980
int
 
25981
main ()
 
25982
{
 
25983
db_open ();
 
25984
  ;
 
25985
  return 0;
 
25986
}
 
25987
_ACEOF
 
25988
rm -f conftest.$ac_objext conftest$ac_exeext
 
25989
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25990
  (eval $ac_link) 2>conftest.er1
 
25991
  ac_status=$?
 
25992
  grep -v '^ *+' conftest.er1 >conftest.err
 
25993
  rm -f conftest.er1
 
25994
  cat conftest.err >&5
 
25995
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25996
  (exit $ac_status); } &&
 
25997
         { ac_try='test -z "$ac_c_werror_flag"
 
25998
                         || test ! -s conftest.err'
 
25999
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26000
  (eval $ac_try) 2>&5
 
26001
  ac_status=$?
 
26002
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26003
  (exit $ac_status); }; } &&
 
26004
         { ac_try='test -s conftest$ac_exeext'
 
26005
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26006
  (eval $ac_try) 2>&5
 
26007
  ac_status=$?
 
26008
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26009
  (exit $ac_status); }; }; then
 
26010
  eval "$as_ac_Lib=yes"
 
26011
else
 
26012
  echo "$as_me: failed program was:" >&5
 
26013
sed 's/^/| /' conftest.$ac_ext >&5
 
26014
 
 
26015
eval "$as_ac_Lib=no"
 
26016
fi
 
26017
rm -f conftest.err conftest.$ac_objext \
 
26018
      conftest$ac_exeext conftest.$ac_ext
 
26019
LIBS=$ac_check_lib_save_LIBS
 
26020
fi
 
26021
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
26022
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
26023
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
26024
  result=yes
 
26025
else
 
26026
  result=no
 
26027
 
 
26028
fi
 
26029
 
 
26030
          fi
 
26031
 
 
26032
else
 
26033
  result="no"
 
26034
fi
 
26035
 
 
26036
 
 
26037
 
 
26038
        # If we found it, no need to search any more.
 
26039
        if test "$result" = "yes"; then
 
26040
          found="$bdb_place"
 
26041
          break
 
26042
        fi
 
26043
      done
 
26044
      test "$found" != "not" && break
 
26045
    done
 
26046
    test "$found" != "not" && break
 
26047
  done
 
26048
 
 
26049
  # Restore the original values of the flags we tweak.
 
26050
  LDFLAGS="$apu_check_lib_save_ldflags"
 
26051
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
26052
 
 
26053
  case "$found" in
 
26054
  "not")
 
26055
    apu_have_db=0
 
26056
    ;;
 
26057
  "std")
 
26058
    apu_db_header=$bdb_header
 
26059
    apu_db_lib=$bdb_libname
 
26060
    apu_have_db=1
 
26061
    ;;
 
26062
  *":"*)
 
26063
    header="`echo $found | sed -e 's/:.*$//'`"
 
26064
    lib="`echo $found | sed -e 's/^.*://'`"
 
26065
 
 
26066
 
 
26067
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
26068
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
26069
    APRUTIL_INCLUDES="-I$header"
 
26070
  else
 
26071
    apr_addto_bugger="-I$header"
 
26072
    for i in $apr_addto_bugger; do
 
26073
      apr_addto_duplicate="0"
 
26074
      for j in $APRUTIL_INCLUDES; do
 
26075
        if test "x$i" = "x$j"; then
 
26076
          apr_addto_duplicate="1"
 
26077
          break
 
26078
        fi
 
26079
      done
 
26080
      if test $apr_addto_duplicate = "0"; then
 
26081
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
26082
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
26083
      fi
 
26084
    done
 
26085
  fi
 
26086
 
 
26087
 
 
26088
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
26089
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
26090
    APRUTIL_LDFLAGS="-L$lib"
 
26091
  else
 
26092
    apr_addto_bugger="-L$lib"
 
26093
    for i in $apr_addto_bugger; do
 
26094
      apr_addto_duplicate="0"
 
26095
      for j in $APRUTIL_LDFLAGS; do
 
26096
        if test "x$i" = "x$j"; then
 
26097
          apr_addto_duplicate="1"
 
26098
          break
 
26099
        fi
 
26100
      done
 
26101
      if test $apr_addto_duplicate = "0"; then
 
26102
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
26103
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
26104
      fi
 
26105
    done
 
26106
  fi
 
26107
 
 
26108
    apu_db_header=$bdb_header
 
26109
    apu_db_lib=$bdb_libname
 
26110
    apu_have_db=1
 
26111
    ;;
 
26112
  *)
 
26113
 
 
26114
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
26115
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
26116
    APRUTIL_INCLUDES="-I$found/include"
 
26117
  else
 
26118
    apr_addto_bugger="-I$found/include"
 
26119
    for i in $apr_addto_bugger; do
 
26120
      apr_addto_duplicate="0"
 
26121
      for j in $APRUTIL_INCLUDES; do
 
26122
        if test "x$i" = "x$j"; then
 
26123
          apr_addto_duplicate="1"
 
26124
          break
 
26125
        fi
 
26126
      done
 
26127
      if test $apr_addto_duplicate = "0"; then
 
26128
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
26129
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
26130
      fi
 
26131
    done
 
26132
  fi
 
26133
 
 
26134
 
 
26135
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
26136
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
26137
    APRUTIL_LDFLAGS="-L$found/lib"
 
26138
  else
 
26139
    apr_addto_bugger="-L$found/lib"
 
26140
    for i in $apr_addto_bugger; do
 
26141
      apr_addto_duplicate="0"
 
26142
      for j in $APRUTIL_LDFLAGS; do
 
26143
        if test "x$i" = "x$j"; then
 
26144
          apr_addto_duplicate="1"
 
26145
          break
 
26146
        fi
 
26147
      done
 
26148
      if test $apr_addto_duplicate = "0"; then
 
26149
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
26150
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
26151
      fi
 
26152
    done
 
26153
  fi
 
26154
 
 
26155
    apu_db_header=$bdb_header
 
26156
    apu_db_lib=$bdb_libname
 
26157
    apu_have_db=1
 
26158
    ;;
 
26159
  esac
 
26160
 
 
26161
  if test "$apu_have_db" = "1"; then
 
26162
    apu_db_version=4
 
26163
  fi
 
26164
 
 
26165
  if test "$apu_db_version" != "4"; then
 
26166
 
 
26167
  places="$all_places"
 
26168
  if test -z "$places"; then
 
26169
    places="std /usr/local/BerkeleyDB.4.3 /boot/home/config"
 
26170
  fi
 
26171
 
 
26172
  bdb_version="4"
 
26173
  if test ""3"" != "-1"; then
 
26174
    bdb_version="$bdb_version."3""
 
26175
    if test ""-1"" != "-1"; then
 
26176
      bdb_version="$bdb_version."-1""
 
26177
    fi
 
26178
  fi
 
26179
  bdb_places="$places"
 
26180
  bdb_default_search_headers="db43/db.h db4/db.h db.h"
 
26181
  bdb_default_search_lib_names="db-4.3 db4-4.3 db43 db4 db"
 
26182
 
 
26183
 
 
26184
  apu_have_db=0
 
26185
 
 
26186
  # Save the original values of the flags we tweak.
 
26187
  apu_check_lib_save_libs="$LIBS"
 
26188
  apu_check_lib_save_ldflags="$LDFLAGS"
 
26189
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
26190
 
 
26191
  # The variable `found' is the prefix under which we've found
 
26192
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
26193
  found=not
 
26194
  for bdb_place in $bdb_places; do
 
26195
 
 
26196
    LDFLAGS="$apu_check_lib_save_ldflags"
 
26197
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
26198
    case "$bdb_place" in
 
26199
      "std" )
 
26200
        description="the standard places"
 
26201
      ;;
 
26202
      *":"* )
 
26203
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
26204
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
26205
        CPPFLAGS="$CPPFLAGS -I$header"
 
26206
        LDFLAGS="$LDFLAGS -L$lib"
 
26207
        description="$header and $lib"
 
26208
      ;;
 
26209
      * )
 
26210
        if test -d $bdb_place; then
 
26211
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
26212
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
26213
        else
 
26214
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
26215
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
26216
          echo "$as_me:$LINENO: result: directory not found" >&5
 
26217
echo "${ECHO_T}directory not found" >&6
 
26218
          continue
 
26219
        fi
 
26220
        description="$bdb_place"
 
26221
      ;;
 
26222
    esac
 
26223
 
 
26224
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
26225
    # trick to display a message instead.
 
26226
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
26227
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
26228
    echo "$as_me:$LINENO: result: " >&5
 
26229
echo "${ECHO_T}" >&6
 
26230
 
 
26231
    for bdb_libname in $bdb_default_search_lib_names; do
 
26232
      for bdb_header in $bdb_default_search_headers; do
 
26233
        # Clear the header cache variable for each location
 
26234
 
 
26235
        cache_id="`echo ac_cv_header_${bdb_header} \
 
26236
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
26237
 
 
26238
        unset $cache_id
 
26239
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
26240
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
26241
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
26242
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
26243
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
26244
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26245
fi
 
26246
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
26247
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
26248
else
 
26249
  # Is the header compilable?
 
26250
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
26251
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
26252
cat >conftest.$ac_ext <<_ACEOF
 
26253
/* confdefs.h.  */
 
26254
_ACEOF
 
26255
cat confdefs.h >>conftest.$ac_ext
 
26256
cat >>conftest.$ac_ext <<_ACEOF
 
26257
/* end confdefs.h.  */
 
26258
$ac_includes_default
 
26259
#include <$bdb_header>
 
26260
_ACEOF
 
26261
rm -f conftest.$ac_objext
 
26262
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
26263
  (eval $ac_compile) 2>conftest.er1
 
26264
  ac_status=$?
 
26265
  grep -v '^ *+' conftest.er1 >conftest.err
 
26266
  rm -f conftest.er1
 
26267
  cat conftest.err >&5
 
26268
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26269
  (exit $ac_status); } &&
 
26270
         { ac_try='test -z "$ac_c_werror_flag"
 
26271
                         || test ! -s conftest.err'
 
26272
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26273
  (eval $ac_try) 2>&5
 
26274
  ac_status=$?
 
26275
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26276
  (exit $ac_status); }; } &&
 
26277
         { ac_try='test -s conftest.$ac_objext'
 
26278
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26279
  (eval $ac_try) 2>&5
 
26280
  ac_status=$?
 
26281
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26282
  (exit $ac_status); }; }; then
 
26283
  ac_header_compiler=yes
 
26284
else
 
26285
  echo "$as_me: failed program was:" >&5
 
26286
sed 's/^/| /' conftest.$ac_ext >&5
 
26287
 
 
26288
ac_header_compiler=no
 
26289
fi
 
26290
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
26291
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
26292
echo "${ECHO_T}$ac_header_compiler" >&6
 
26293
 
 
26294
# Is the header present?
 
26295
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
26296
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
26297
cat >conftest.$ac_ext <<_ACEOF
 
26298
/* confdefs.h.  */
 
26299
_ACEOF
 
26300
cat confdefs.h >>conftest.$ac_ext
 
26301
cat >>conftest.$ac_ext <<_ACEOF
 
26302
/* end confdefs.h.  */
 
26303
#include <$bdb_header>
 
26304
_ACEOF
 
26305
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
26306
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
26307
  ac_status=$?
 
26308
  grep -v '^ *+' conftest.er1 >conftest.err
 
26309
  rm -f conftest.er1
 
26310
  cat conftest.err >&5
 
26311
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26312
  (exit $ac_status); } >/dev/null; then
 
26313
  if test -s conftest.err; then
 
26314
    ac_cpp_err=$ac_c_preproc_warn_flag
 
26315
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
26316
  else
 
26317
    ac_cpp_err=
 
26318
  fi
 
26319
else
 
26320
  ac_cpp_err=yes
 
26321
fi
 
26322
if test -z "$ac_cpp_err"; then
 
26323
  ac_header_preproc=yes
 
26324
else
 
26325
  echo "$as_me: failed program was:" >&5
 
26326
sed 's/^/| /' conftest.$ac_ext >&5
 
26327
 
 
26328
  ac_header_preproc=no
 
26329
fi
 
26330
rm -f conftest.err conftest.$ac_ext
 
26331
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
26332
echo "${ECHO_T}$ac_header_preproc" >&6
 
26333
 
 
26334
# So?  What about this header?
 
26335
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
26336
  yes:no: )
 
26337
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
26338
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
26339
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
26340
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
26341
    ac_header_preproc=yes
 
26342
    ;;
 
26343
  no:yes:* )
 
26344
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
26345
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
26346
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
26347
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
26348
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
26349
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
26350
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
26351
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
26352
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
26353
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
26354
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
26355
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
26356
    (
 
26357
      cat <<\_ASBOX
 
26358
## ------------------------------------------ ##
 
26359
## Report this to the AC_PACKAGE_NAME lists.  ##
 
26360
## ------------------------------------------ ##
 
26361
_ASBOX
 
26362
    ) |
 
26363
      sed "s/^/$as_me: WARNING:     /" >&2
 
26364
    ;;
 
26365
esac
 
26366
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
26367
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
26368
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
26369
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26370
else
 
26371
  eval "$as_ac_Header=\$ac_header_preproc"
 
26372
fi
 
26373
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
26374
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
26375
 
 
26376
fi
 
26377
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
26378
 
 
26379
          if test ""4"" = "3" -o ""4"" = "4"; then
 
26380
            # We generate a separate cache variable for each prefix and libname
 
26381
            # we search under.  That way, we avoid caching information that
 
26382
            # changes if the user runs `configure' with a different set of
 
26383
            # switches.
 
26384
 
 
26385
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"3"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
26386
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
26387
 
 
26388
 
 
26389
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
26390
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
26391
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
26392
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26393
else
 
26394
 
 
26395
 
 
26396
    apu_try_berkeley_db_save_libs="$LIBS"
 
26397
 
 
26398
    apu_check_berkeley_db_major="4"
 
26399
    apu_check_berkeley_db_minor="3"
 
26400
    apu_check_berkeley_db_patch="-1"
 
26401
    apu_try_berkeley_db_header=$bdb_header
 
26402
    apu_try_berkeley_db_libname=$bdb_libname
 
26403
 
 
26404
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
26405
    if test "$cross_compiling" = yes; then
 
26406
  apu_try_berkeley_db=yes
 
26407
 
 
26408
else
 
26409
  cat >conftest.$ac_ext <<_ACEOF
 
26410
/* confdefs.h.  */
 
26411
_ACEOF
 
26412
cat confdefs.h >>conftest.$ac_ext
 
26413
cat >>conftest.$ac_ext <<_ACEOF
 
26414
/* end confdefs.h.  */
 
26415
 
 
26416
#include <stdio.h>
 
26417
#include <$apu_try_berkeley_db_header>
 
26418
main ()
 
26419
{
 
26420
  int major, minor, patch;
 
26421
 
 
26422
  db_version(&major, &minor, &patch);
 
26423
 
 
26424
  /* Sanity check: ensure that db.h constants actually match the db library */
 
26425
  if (major != DB_VERSION_MAJOR
 
26426
      || minor != DB_VERSION_MINOR
 
26427
      || patch != DB_VERSION_PATCH)
 
26428
    exit (1);
 
26429
 
 
26430
  /* Run-time check:  ensure the library claims to be the correct version. */
 
26431
 
 
26432
  if ($apu_check_berkeley_db_major != -1) {
 
26433
    if (major < $apu_check_berkeley_db_major)
 
26434
      exit (1);
 
26435
    if (major > $apu_check_berkeley_db_major)
 
26436
      exit (0);
 
26437
  }
 
26438
 
 
26439
  if ($apu_check_berkeley_db_minor != -1) {
 
26440
    if (minor < $apu_check_berkeley_db_minor)
 
26441
      exit (1);
 
26442
    if (minor > $apu_check_berkeley_db_minor)
 
26443
      exit (0);
 
26444
  }
 
26445
 
 
26446
  if ($apu_check_berkeley_db_patch == -1
 
26447
      || patch >= $apu_check_berkeley_db_patch)
 
26448
    exit (0);
 
26449
  else
 
26450
    exit (1);
 
26451
}
 
26452
 
 
26453
_ACEOF
 
26454
rm -f conftest$ac_exeext
 
26455
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
26456
  (eval $ac_link) 2>&5
 
26457
  ac_status=$?
 
26458
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26459
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
26460
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26461
  (eval $ac_try) 2>&5
 
26462
  ac_status=$?
 
26463
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26464
  (exit $ac_status); }; }; then
 
26465
  apu_try_berkeley_db=yes
 
26466
else
 
26467
  echo "$as_me: program exited with status $ac_status" >&5
 
26468
echo "$as_me: failed program was:" >&5
 
26469
sed 's/^/| /' conftest.$ac_ext >&5
 
26470
 
 
26471
( exit $ac_status )
 
26472
apu_try_berkeley_db=no
 
26473
fi
 
26474
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
26475
fi
 
26476
 
 
26477
    LIBS="$apu_try_berkeley_db_save_libs"
 
26478
 
 
26479
 
 
26480
                eval "$cache_id=$apu_try_berkeley_db"
 
26481
 
 
26482
fi
 
26483
 
 
26484
            result="`eval echo '$'$cache_id`"
 
26485
            echo "$as_me:$LINENO: result: $result" >&5
 
26486
echo "${ECHO_T}$result" >&6
 
26487
          elif test ""4"" = "1"; then
 
26488
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
26489
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
26490
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
26491
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
26492
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26493
else
 
26494
  ac_check_lib_save_LIBS=$LIBS
 
26495
LIBS="-l$bdb_libname  $LIBS"
 
26496
cat >conftest.$ac_ext <<_ACEOF
 
26497
/* confdefs.h.  */
 
26498
_ACEOF
 
26499
cat confdefs.h >>conftest.$ac_ext
 
26500
cat >>conftest.$ac_ext <<_ACEOF
 
26501
/* end confdefs.h.  */
 
26502
 
 
26503
/* Override any gcc2 internal prototype to avoid an error.  */
 
26504
#ifdef __cplusplus
 
26505
extern "C"
 
26506
#endif
 
26507
/* We use char because int might match the return type of a gcc2
 
26508
   builtin and then its argument prototype would still apply.  */
 
26509
char dbopen ();
 
26510
int
 
26511
main ()
 
26512
{
 
26513
dbopen ();
 
26514
  ;
 
26515
  return 0;
 
26516
}
 
26517
_ACEOF
 
26518
rm -f conftest.$ac_objext conftest$ac_exeext
 
26519
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
26520
  (eval $ac_link) 2>conftest.er1
 
26521
  ac_status=$?
 
26522
  grep -v '^ *+' conftest.er1 >conftest.err
 
26523
  rm -f conftest.er1
 
26524
  cat conftest.err >&5
 
26525
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26526
  (exit $ac_status); } &&
 
26527
         { ac_try='test -z "$ac_c_werror_flag"
 
26528
                         || test ! -s conftest.err'
 
26529
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26530
  (eval $ac_try) 2>&5
 
26531
  ac_status=$?
 
26532
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26533
  (exit $ac_status); }; } &&
 
26534
         { ac_try='test -s conftest$ac_exeext'
 
26535
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26536
  (eval $ac_try) 2>&5
 
26537
  ac_status=$?
 
26538
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26539
  (exit $ac_status); }; }; then
 
26540
  eval "$as_ac_Lib=yes"
 
26541
else
 
26542
  echo "$as_me: failed program was:" >&5
 
26543
sed 's/^/| /' conftest.$ac_ext >&5
 
26544
 
 
26545
eval "$as_ac_Lib=no"
 
26546
fi
 
26547
rm -f conftest.err conftest.$ac_objext \
 
26548
      conftest$ac_exeext conftest.$ac_ext
 
26549
LIBS=$ac_check_lib_save_LIBS
 
26550
fi
 
26551
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
26552
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
26553
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
26554
  result=yes
 
26555
else
 
26556
  result=no
 
26557
 
 
26558
fi
 
26559
 
 
26560
          elif test ""4"" = "2"; then
 
26561
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
26562
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
26563
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
26564
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
26565
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26566
else
 
26567
  ac_check_lib_save_LIBS=$LIBS
 
26568
LIBS="-l$bdb_libname  $LIBS"
 
26569
cat >conftest.$ac_ext <<_ACEOF
 
26570
/* confdefs.h.  */
 
26571
_ACEOF
 
26572
cat confdefs.h >>conftest.$ac_ext
 
26573
cat >>conftest.$ac_ext <<_ACEOF
 
26574
/* end confdefs.h.  */
 
26575
 
 
26576
/* Override any gcc2 internal prototype to avoid an error.  */
 
26577
#ifdef __cplusplus
 
26578
extern "C"
 
26579
#endif
 
26580
/* We use char because int might match the return type of a gcc2
 
26581
   builtin and then its argument prototype would still apply.  */
 
26582
char db_open ();
 
26583
int
 
26584
main ()
 
26585
{
 
26586
db_open ();
 
26587
  ;
 
26588
  return 0;
 
26589
}
 
26590
_ACEOF
 
26591
rm -f conftest.$ac_objext conftest$ac_exeext
 
26592
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
26593
  (eval $ac_link) 2>conftest.er1
 
26594
  ac_status=$?
 
26595
  grep -v '^ *+' conftest.er1 >conftest.err
 
26596
  rm -f conftest.er1
 
26597
  cat conftest.err >&5
 
26598
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26599
  (exit $ac_status); } &&
 
26600
         { ac_try='test -z "$ac_c_werror_flag"
 
26601
                         || test ! -s conftest.err'
 
26602
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26603
  (eval $ac_try) 2>&5
 
26604
  ac_status=$?
 
26605
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26606
  (exit $ac_status); }; } &&
 
26607
         { ac_try='test -s conftest$ac_exeext'
 
26608
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26609
  (eval $ac_try) 2>&5
 
26610
  ac_status=$?
 
26611
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26612
  (exit $ac_status); }; }; then
 
26613
  eval "$as_ac_Lib=yes"
 
26614
else
 
26615
  echo "$as_me: failed program was:" >&5
 
26616
sed 's/^/| /' conftest.$ac_ext >&5
 
26617
 
 
26618
eval "$as_ac_Lib=no"
 
26619
fi
 
26620
rm -f conftest.err conftest.$ac_objext \
 
26621
      conftest$ac_exeext conftest.$ac_ext
 
26622
LIBS=$ac_check_lib_save_LIBS
 
26623
fi
 
26624
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
26625
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
26626
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
26627
  result=yes
 
26628
else
 
26629
  result=no
 
26630
 
 
26631
fi
 
26632
 
 
26633
          fi
 
26634
 
 
26635
else
 
26636
  result="no"
 
26637
fi
 
26638
 
 
26639
 
 
26640
 
 
26641
        # If we found it, no need to search any more.
 
26642
        if test "$result" = "yes"; then
 
26643
          found="$bdb_place"
 
26644
          break
 
26645
        fi
 
26646
      done
 
26647
      test "$found" != "not" && break
 
26648
    done
 
26649
    test "$found" != "not" && break
 
26650
  done
 
26651
 
 
26652
  # Restore the original values of the flags we tweak.
 
26653
  LDFLAGS="$apu_check_lib_save_ldflags"
 
26654
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
26655
 
 
26656
  case "$found" in
 
26657
  "not")
 
26658
    apu_have_db=0
 
26659
    ;;
 
26660
  "std")
 
26661
    apu_db_header=$bdb_header
 
26662
    apu_db_lib=$bdb_libname
 
26663
    apu_have_db=1
 
26664
    ;;
 
26665
  *":"*)
 
26666
    header="`echo $found | sed -e 's/:.*$//'`"
 
26667
    lib="`echo $found | sed -e 's/^.*://'`"
 
26668
 
 
26669
 
 
26670
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
26671
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
26672
    APRUTIL_INCLUDES="-I$header"
 
26673
  else
 
26674
    apr_addto_bugger="-I$header"
 
26675
    for i in $apr_addto_bugger; do
 
26676
      apr_addto_duplicate="0"
 
26677
      for j in $APRUTIL_INCLUDES; do
 
26678
        if test "x$i" = "x$j"; then
 
26679
          apr_addto_duplicate="1"
 
26680
          break
 
26681
        fi
 
26682
      done
 
26683
      if test $apr_addto_duplicate = "0"; then
 
26684
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
26685
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
26686
      fi
 
26687
    done
 
26688
  fi
 
26689
 
 
26690
 
 
26691
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
26692
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
26693
    APRUTIL_LDFLAGS="-L$lib"
 
26694
  else
 
26695
    apr_addto_bugger="-L$lib"
 
26696
    for i in $apr_addto_bugger; do
 
26697
      apr_addto_duplicate="0"
 
26698
      for j in $APRUTIL_LDFLAGS; do
 
26699
        if test "x$i" = "x$j"; then
 
26700
          apr_addto_duplicate="1"
 
26701
          break
 
26702
        fi
 
26703
      done
 
26704
      if test $apr_addto_duplicate = "0"; then
 
26705
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
26706
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
26707
      fi
 
26708
    done
 
26709
  fi
 
26710
 
 
26711
    apu_db_header=$bdb_header
 
26712
    apu_db_lib=$bdb_libname
 
26713
    apu_have_db=1
 
26714
    ;;
 
26715
  *)
 
26716
 
 
26717
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
26718
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
26719
    APRUTIL_INCLUDES="-I$found/include"
 
26720
  else
 
26721
    apr_addto_bugger="-I$found/include"
 
26722
    for i in $apr_addto_bugger; do
 
26723
      apr_addto_duplicate="0"
 
26724
      for j in $APRUTIL_INCLUDES; do
 
26725
        if test "x$i" = "x$j"; then
 
26726
          apr_addto_duplicate="1"
 
26727
          break
 
26728
        fi
 
26729
      done
 
26730
      if test $apr_addto_duplicate = "0"; then
 
26731
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
26732
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
26733
      fi
 
26734
    done
 
26735
  fi
 
26736
 
 
26737
 
 
26738
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
26739
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
26740
    APRUTIL_LDFLAGS="-L$found/lib"
 
26741
  else
 
26742
    apr_addto_bugger="-L$found/lib"
 
26743
    for i in $apr_addto_bugger; do
 
26744
      apr_addto_duplicate="0"
 
26745
      for j in $APRUTIL_LDFLAGS; do
 
26746
        if test "x$i" = "x$j"; then
 
26747
          apr_addto_duplicate="1"
 
26748
          break
 
26749
        fi
 
26750
      done
 
26751
      if test $apr_addto_duplicate = "0"; then
 
26752
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
26753
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
26754
      fi
 
26755
    done
 
26756
  fi
 
26757
 
 
26758
    apu_db_header=$bdb_header
 
26759
    apu_db_lib=$bdb_libname
 
26760
    apu_have_db=1
 
26761
    ;;
 
26762
  esac
 
26763
 
 
26764
  if test "$apu_have_db" = "1"; then
 
26765
    apu_db_version=4
 
26766
  fi
 
26767
 
 
26768
    if test "$apu_db_version" != "4"; then
 
26769
 
 
26770
  places="$all_places"
 
26771
  if test -z "$places"; then
 
26772
    places="std /usr/local /usr/local/BerkeleyDB.4.2 /boot/home/config"
 
26773
  fi
 
26774
 
 
26775
  bdb_version="4"
 
26776
  if test ""2"" != "-1"; then
 
26777
    bdb_version="$bdb_version."2""
 
26778
    if test ""-1"" != "-1"; then
 
26779
      bdb_version="$bdb_version."-1""
 
26780
    fi
 
26781
  fi
 
26782
  bdb_places="$places"
 
26783
  bdb_default_search_headers="db42/db.h db4/db.h db.h"
 
26784
  bdb_default_search_lib_names="db-4.2 db42 db4 db"
 
26785
 
 
26786
 
 
26787
  apu_have_db=0
 
26788
 
 
26789
  # Save the original values of the flags we tweak.
 
26790
  apu_check_lib_save_libs="$LIBS"
 
26791
  apu_check_lib_save_ldflags="$LDFLAGS"
 
26792
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
26793
 
 
26794
  # The variable `found' is the prefix under which we've found
 
26795
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
26796
  found=not
 
26797
  for bdb_place in $bdb_places; do
 
26798
 
 
26799
    LDFLAGS="$apu_check_lib_save_ldflags"
 
26800
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
26801
    case "$bdb_place" in
 
26802
      "std" )
 
26803
        description="the standard places"
 
26804
      ;;
 
26805
      *":"* )
 
26806
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
26807
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
26808
        CPPFLAGS="$CPPFLAGS -I$header"
 
26809
        LDFLAGS="$LDFLAGS -L$lib"
 
26810
        description="$header and $lib"
 
26811
      ;;
 
26812
      * )
 
26813
        if test -d $bdb_place; then
 
26814
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
26815
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
26816
        else
 
26817
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
26818
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
26819
          echo "$as_me:$LINENO: result: directory not found" >&5
 
26820
echo "${ECHO_T}directory not found" >&6
 
26821
          continue
 
26822
        fi
 
26823
        description="$bdb_place"
 
26824
      ;;
 
26825
    esac
 
26826
 
 
26827
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
26828
    # trick to display a message instead.
 
26829
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
26830
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
26831
    echo "$as_me:$LINENO: result: " >&5
 
26832
echo "${ECHO_T}" >&6
 
26833
 
 
26834
    for bdb_libname in $bdb_default_search_lib_names; do
 
26835
      for bdb_header in $bdb_default_search_headers; do
 
26836
        # Clear the header cache variable for each location
 
26837
 
 
26838
        cache_id="`echo ac_cv_header_${bdb_header} \
 
26839
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
26840
 
 
26841
        unset $cache_id
 
26842
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
26843
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
26844
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
26845
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
26846
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
26847
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26848
fi
 
26849
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
26850
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
26851
else
 
26852
  # Is the header compilable?
 
26853
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
26854
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
26855
cat >conftest.$ac_ext <<_ACEOF
 
26856
/* confdefs.h.  */
 
26857
_ACEOF
 
26858
cat confdefs.h >>conftest.$ac_ext
 
26859
cat >>conftest.$ac_ext <<_ACEOF
 
26860
/* end confdefs.h.  */
 
26861
$ac_includes_default
 
26862
#include <$bdb_header>
 
26863
_ACEOF
 
26864
rm -f conftest.$ac_objext
 
26865
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
26866
  (eval $ac_compile) 2>conftest.er1
 
26867
  ac_status=$?
 
26868
  grep -v '^ *+' conftest.er1 >conftest.err
 
26869
  rm -f conftest.er1
 
26870
  cat conftest.err >&5
 
26871
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26872
  (exit $ac_status); } &&
 
26873
         { ac_try='test -z "$ac_c_werror_flag"
 
26874
                         || test ! -s conftest.err'
 
26875
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26876
  (eval $ac_try) 2>&5
 
26877
  ac_status=$?
 
26878
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26879
  (exit $ac_status); }; } &&
 
26880
         { ac_try='test -s conftest.$ac_objext'
 
26881
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
26882
  (eval $ac_try) 2>&5
 
26883
  ac_status=$?
 
26884
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26885
  (exit $ac_status); }; }; then
 
26886
  ac_header_compiler=yes
 
26887
else
 
26888
  echo "$as_me: failed program was:" >&5
 
26889
sed 's/^/| /' conftest.$ac_ext >&5
 
26890
 
 
26891
ac_header_compiler=no
 
26892
fi
 
26893
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
26894
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
26895
echo "${ECHO_T}$ac_header_compiler" >&6
 
26896
 
 
26897
# Is the header present?
 
26898
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
26899
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
26900
cat >conftest.$ac_ext <<_ACEOF
 
26901
/* confdefs.h.  */
 
26902
_ACEOF
 
26903
cat confdefs.h >>conftest.$ac_ext
 
26904
cat >>conftest.$ac_ext <<_ACEOF
 
26905
/* end confdefs.h.  */
 
26906
#include <$bdb_header>
 
26907
_ACEOF
 
26908
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
26909
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
26910
  ac_status=$?
 
26911
  grep -v '^ *+' conftest.er1 >conftest.err
 
26912
  rm -f conftest.er1
 
26913
  cat conftest.err >&5
 
26914
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
26915
  (exit $ac_status); } >/dev/null; then
 
26916
  if test -s conftest.err; then
 
26917
    ac_cpp_err=$ac_c_preproc_warn_flag
 
26918
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
26919
  else
 
26920
    ac_cpp_err=
 
26921
  fi
 
26922
else
 
26923
  ac_cpp_err=yes
 
26924
fi
 
26925
if test -z "$ac_cpp_err"; then
 
26926
  ac_header_preproc=yes
 
26927
else
 
26928
  echo "$as_me: failed program was:" >&5
 
26929
sed 's/^/| /' conftest.$ac_ext >&5
 
26930
 
 
26931
  ac_header_preproc=no
 
26932
fi
 
26933
rm -f conftest.err conftest.$ac_ext
 
26934
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
26935
echo "${ECHO_T}$ac_header_preproc" >&6
 
26936
 
 
26937
# So?  What about this header?
 
26938
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
26939
  yes:no: )
 
26940
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
26941
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
26942
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
26943
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
26944
    ac_header_preproc=yes
 
26945
    ;;
 
26946
  no:yes:* )
 
26947
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
26948
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
26949
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
26950
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
26951
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
26952
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
26953
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
26954
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
26955
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
26956
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
26957
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
26958
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
26959
    (
 
26960
      cat <<\_ASBOX
 
26961
## ------------------------------------------ ##
 
26962
## Report this to the AC_PACKAGE_NAME lists.  ##
 
26963
## ------------------------------------------ ##
 
26964
_ASBOX
 
26965
    ) |
 
26966
      sed "s/^/$as_me: WARNING:     /" >&2
 
26967
    ;;
 
26968
esac
 
26969
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
26970
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
26971
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
26972
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26973
else
 
26974
  eval "$as_ac_Header=\$ac_header_preproc"
 
26975
fi
 
26976
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
26977
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
26978
 
 
26979
fi
 
26980
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
26981
 
 
26982
          if test ""4"" = "3" -o ""4"" = "4"; then
 
26983
            # We generate a separate cache variable for each prefix and libname
 
26984
            # we search under.  That way, we avoid caching information that
 
26985
            # changes if the user runs `configure' with a different set of
 
26986
            # switches.
 
26987
 
 
26988
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"2"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
26989
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
26990
 
 
26991
 
 
26992
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
26993
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
26994
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
26995
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
26996
else
 
26997
 
 
26998
 
 
26999
    apu_try_berkeley_db_save_libs="$LIBS"
 
27000
 
 
27001
    apu_check_berkeley_db_major="4"
 
27002
    apu_check_berkeley_db_minor="2"
 
27003
    apu_check_berkeley_db_patch="-1"
 
27004
    apu_try_berkeley_db_header=$bdb_header
 
27005
    apu_try_berkeley_db_libname=$bdb_libname
 
27006
 
 
27007
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
27008
    if test "$cross_compiling" = yes; then
 
27009
  apu_try_berkeley_db=yes
 
27010
 
 
27011
else
 
27012
  cat >conftest.$ac_ext <<_ACEOF
 
27013
/* confdefs.h.  */
 
27014
_ACEOF
 
27015
cat confdefs.h >>conftest.$ac_ext
 
27016
cat >>conftest.$ac_ext <<_ACEOF
 
27017
/* end confdefs.h.  */
 
27018
 
 
27019
#include <stdio.h>
 
27020
#include <$apu_try_berkeley_db_header>
 
27021
main ()
 
27022
{
 
27023
  int major, minor, patch;
 
27024
 
 
27025
  db_version(&major, &minor, &patch);
 
27026
 
 
27027
  /* Sanity check: ensure that db.h constants actually match the db library */
 
27028
  if (major != DB_VERSION_MAJOR
 
27029
      || minor != DB_VERSION_MINOR
 
27030
      || patch != DB_VERSION_PATCH)
 
27031
    exit (1);
 
27032
 
 
27033
  /* Run-time check:  ensure the library claims to be the correct version. */
 
27034
 
 
27035
  if ($apu_check_berkeley_db_major != -1) {
 
27036
    if (major < $apu_check_berkeley_db_major)
 
27037
      exit (1);
 
27038
    if (major > $apu_check_berkeley_db_major)
 
27039
      exit (0);
 
27040
  }
 
27041
 
 
27042
  if ($apu_check_berkeley_db_minor != -1) {
 
27043
    if (minor < $apu_check_berkeley_db_minor)
 
27044
      exit (1);
 
27045
    if (minor > $apu_check_berkeley_db_minor)
 
27046
      exit (0);
 
27047
  }
 
27048
 
 
27049
  if ($apu_check_berkeley_db_patch == -1
 
27050
      || patch >= $apu_check_berkeley_db_patch)
 
27051
    exit (0);
 
27052
  else
 
27053
    exit (1);
 
27054
}
 
27055
 
 
27056
_ACEOF
 
27057
rm -f conftest$ac_exeext
 
27058
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
27059
  (eval $ac_link) 2>&5
 
27060
  ac_status=$?
 
27061
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27062
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
27063
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27064
  (eval $ac_try) 2>&5
 
27065
  ac_status=$?
 
27066
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27067
  (exit $ac_status); }; }; then
 
27068
  apu_try_berkeley_db=yes
 
27069
else
 
27070
  echo "$as_me: program exited with status $ac_status" >&5
 
27071
echo "$as_me: failed program was:" >&5
 
27072
sed 's/^/| /' conftest.$ac_ext >&5
 
27073
 
 
27074
( exit $ac_status )
 
27075
apu_try_berkeley_db=no
 
27076
fi
 
27077
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
27078
fi
 
27079
 
 
27080
    LIBS="$apu_try_berkeley_db_save_libs"
 
27081
 
 
27082
 
 
27083
                eval "$cache_id=$apu_try_berkeley_db"
 
27084
 
 
27085
fi
 
27086
 
 
27087
            result="`eval echo '$'$cache_id`"
 
27088
            echo "$as_me:$LINENO: result: $result" >&5
 
27089
echo "${ECHO_T}$result" >&6
 
27090
          elif test ""4"" = "1"; then
 
27091
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
27092
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
27093
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
27094
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
27095
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27096
else
 
27097
  ac_check_lib_save_LIBS=$LIBS
 
27098
LIBS="-l$bdb_libname  $LIBS"
 
27099
cat >conftest.$ac_ext <<_ACEOF
 
27100
/* confdefs.h.  */
 
27101
_ACEOF
 
27102
cat confdefs.h >>conftest.$ac_ext
 
27103
cat >>conftest.$ac_ext <<_ACEOF
 
27104
/* end confdefs.h.  */
 
27105
 
 
27106
/* Override any gcc2 internal prototype to avoid an error.  */
 
27107
#ifdef __cplusplus
 
27108
extern "C"
 
27109
#endif
 
27110
/* We use char because int might match the return type of a gcc2
 
27111
   builtin and then its argument prototype would still apply.  */
 
27112
char dbopen ();
 
27113
int
 
27114
main ()
 
27115
{
 
27116
dbopen ();
 
27117
  ;
 
27118
  return 0;
 
27119
}
 
27120
_ACEOF
 
27121
rm -f conftest.$ac_objext conftest$ac_exeext
 
27122
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
27123
  (eval $ac_link) 2>conftest.er1
 
27124
  ac_status=$?
 
27125
  grep -v '^ *+' conftest.er1 >conftest.err
 
27126
  rm -f conftest.er1
 
27127
  cat conftest.err >&5
 
27128
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27129
  (exit $ac_status); } &&
 
27130
         { ac_try='test -z "$ac_c_werror_flag"
 
27131
                         || test ! -s conftest.err'
 
27132
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27133
  (eval $ac_try) 2>&5
 
27134
  ac_status=$?
 
27135
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27136
  (exit $ac_status); }; } &&
 
27137
         { ac_try='test -s conftest$ac_exeext'
 
27138
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27139
  (eval $ac_try) 2>&5
 
27140
  ac_status=$?
 
27141
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27142
  (exit $ac_status); }; }; then
 
27143
  eval "$as_ac_Lib=yes"
 
27144
else
 
27145
  echo "$as_me: failed program was:" >&5
 
27146
sed 's/^/| /' conftest.$ac_ext >&5
 
27147
 
 
27148
eval "$as_ac_Lib=no"
 
27149
fi
 
27150
rm -f conftest.err conftest.$ac_objext \
 
27151
      conftest$ac_exeext conftest.$ac_ext
 
27152
LIBS=$ac_check_lib_save_LIBS
 
27153
fi
 
27154
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
27155
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
27156
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
27157
  result=yes
 
27158
else
 
27159
  result=no
 
27160
 
 
27161
fi
 
27162
 
 
27163
          elif test ""4"" = "2"; then
 
27164
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
27165
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
27166
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
27167
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
27168
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27169
else
 
27170
  ac_check_lib_save_LIBS=$LIBS
 
27171
LIBS="-l$bdb_libname  $LIBS"
 
27172
cat >conftest.$ac_ext <<_ACEOF
 
27173
/* confdefs.h.  */
 
27174
_ACEOF
 
27175
cat confdefs.h >>conftest.$ac_ext
 
27176
cat >>conftest.$ac_ext <<_ACEOF
 
27177
/* end confdefs.h.  */
 
27178
 
 
27179
/* Override any gcc2 internal prototype to avoid an error.  */
 
27180
#ifdef __cplusplus
 
27181
extern "C"
 
27182
#endif
 
27183
/* We use char because int might match the return type of a gcc2
 
27184
   builtin and then its argument prototype would still apply.  */
 
27185
char db_open ();
 
27186
int
 
27187
main ()
 
27188
{
 
27189
db_open ();
 
27190
  ;
 
27191
  return 0;
 
27192
}
 
27193
_ACEOF
 
27194
rm -f conftest.$ac_objext conftest$ac_exeext
 
27195
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
27196
  (eval $ac_link) 2>conftest.er1
 
27197
  ac_status=$?
 
27198
  grep -v '^ *+' conftest.er1 >conftest.err
 
27199
  rm -f conftest.er1
 
27200
  cat conftest.err >&5
 
27201
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27202
  (exit $ac_status); } &&
 
27203
         { ac_try='test -z "$ac_c_werror_flag"
 
27204
                         || test ! -s conftest.err'
 
27205
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27206
  (eval $ac_try) 2>&5
 
27207
  ac_status=$?
 
27208
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27209
  (exit $ac_status); }; } &&
 
27210
         { ac_try='test -s conftest$ac_exeext'
 
27211
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27212
  (eval $ac_try) 2>&5
 
27213
  ac_status=$?
 
27214
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27215
  (exit $ac_status); }; }; then
 
27216
  eval "$as_ac_Lib=yes"
 
27217
else
 
27218
  echo "$as_me: failed program was:" >&5
 
27219
sed 's/^/| /' conftest.$ac_ext >&5
 
27220
 
 
27221
eval "$as_ac_Lib=no"
 
27222
fi
 
27223
rm -f conftest.err conftest.$ac_objext \
 
27224
      conftest$ac_exeext conftest.$ac_ext
 
27225
LIBS=$ac_check_lib_save_LIBS
 
27226
fi
 
27227
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
27228
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
27229
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
27230
  result=yes
 
27231
else
 
27232
  result=no
 
27233
 
 
27234
fi
 
27235
 
 
27236
          fi
 
27237
 
 
27238
else
 
27239
  result="no"
 
27240
fi
 
27241
 
 
27242
 
 
27243
 
 
27244
        # If we found it, no need to search any more.
 
27245
        if test "$result" = "yes"; then
 
27246
          found="$bdb_place"
 
27247
          break
 
27248
        fi
 
27249
      done
 
27250
      test "$found" != "not" && break
 
27251
    done
 
27252
    test "$found" != "not" && break
 
27253
  done
 
27254
 
 
27255
  # Restore the original values of the flags we tweak.
 
27256
  LDFLAGS="$apu_check_lib_save_ldflags"
 
27257
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
27258
 
 
27259
  case "$found" in
 
27260
  "not")
 
27261
    apu_have_db=0
 
27262
    ;;
 
27263
  "std")
 
27264
    apu_db_header=$bdb_header
 
27265
    apu_db_lib=$bdb_libname
 
27266
    apu_have_db=1
 
27267
    ;;
 
27268
  *":"*)
 
27269
    header="`echo $found | sed -e 's/:.*$//'`"
 
27270
    lib="`echo $found | sed -e 's/^.*://'`"
 
27271
 
 
27272
 
 
27273
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
27274
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
27275
    APRUTIL_INCLUDES="-I$header"
 
27276
  else
 
27277
    apr_addto_bugger="-I$header"
 
27278
    for i in $apr_addto_bugger; do
 
27279
      apr_addto_duplicate="0"
 
27280
      for j in $APRUTIL_INCLUDES; do
 
27281
        if test "x$i" = "x$j"; then
 
27282
          apr_addto_duplicate="1"
 
27283
          break
 
27284
        fi
 
27285
      done
 
27286
      if test $apr_addto_duplicate = "0"; then
 
27287
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
27288
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
27289
      fi
 
27290
    done
 
27291
  fi
 
27292
 
 
27293
 
 
27294
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
27295
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
27296
    APRUTIL_LDFLAGS="-L$lib"
 
27297
  else
 
27298
    apr_addto_bugger="-L$lib"
 
27299
    for i in $apr_addto_bugger; do
 
27300
      apr_addto_duplicate="0"
 
27301
      for j in $APRUTIL_LDFLAGS; do
 
27302
        if test "x$i" = "x$j"; then
 
27303
          apr_addto_duplicate="1"
 
27304
          break
 
27305
        fi
 
27306
      done
 
27307
      if test $apr_addto_duplicate = "0"; then
 
27308
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
27309
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
27310
      fi
 
27311
    done
 
27312
  fi
 
27313
 
 
27314
    apu_db_header=$bdb_header
 
27315
    apu_db_lib=$bdb_libname
 
27316
    apu_have_db=1
 
27317
    ;;
 
27318
  *)
 
27319
 
 
27320
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
27321
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
27322
    APRUTIL_INCLUDES="-I$found/include"
 
27323
  else
 
27324
    apr_addto_bugger="-I$found/include"
 
27325
    for i in $apr_addto_bugger; do
 
27326
      apr_addto_duplicate="0"
 
27327
      for j in $APRUTIL_INCLUDES; do
 
27328
        if test "x$i" = "x$j"; then
 
27329
          apr_addto_duplicate="1"
 
27330
          break
 
27331
        fi
 
27332
      done
 
27333
      if test $apr_addto_duplicate = "0"; then
 
27334
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
27335
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
27336
      fi
 
27337
    done
 
27338
  fi
 
27339
 
 
27340
 
 
27341
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
27342
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
27343
    APRUTIL_LDFLAGS="-L$found/lib"
 
27344
  else
 
27345
    apr_addto_bugger="-L$found/lib"
 
27346
    for i in $apr_addto_bugger; do
 
27347
      apr_addto_duplicate="0"
 
27348
      for j in $APRUTIL_LDFLAGS; do
 
27349
        if test "x$i" = "x$j"; then
 
27350
          apr_addto_duplicate="1"
 
27351
          break
 
27352
        fi
 
27353
      done
 
27354
      if test $apr_addto_duplicate = "0"; then
 
27355
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
27356
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
27357
      fi
 
27358
    done
 
27359
  fi
 
27360
 
 
27361
    apu_db_header=$bdb_header
 
27362
    apu_db_lib=$bdb_libname
 
27363
    apu_have_db=1
 
27364
    ;;
 
27365
  esac
 
27366
 
 
27367
  if test "$apu_have_db" = "1"; then
 
27368
    apu_db_version=4
 
27369
  fi
 
27370
 
 
27371
      if test "$apu_db_version" != "4"; then
 
27372
 
 
27373
  places="$all_places"
 
27374
  if test -z "$places"; then
 
27375
    places="std /usr/local /usr/local/BerkeleyDB.4.1 /boot/home/config"
 
27376
  fi
 
27377
 
 
27378
  bdb_version="4"
 
27379
  if test ""1"" != "-1"; then
 
27380
    bdb_version="$bdb_version."1""
 
27381
    if test ""-1"" != "-1"; then
 
27382
      bdb_version="$bdb_version."-1""
 
27383
    fi
 
27384
  fi
 
27385
  bdb_places="$places"
 
27386
  bdb_default_search_headers="db41/db.h db4/db.h db.h"
 
27387
  bdb_default_search_lib_names="db-4.1 db41 db4 db"
 
27388
 
 
27389
 
 
27390
  apu_have_db=0
 
27391
 
 
27392
  # Save the original values of the flags we tweak.
 
27393
  apu_check_lib_save_libs="$LIBS"
 
27394
  apu_check_lib_save_ldflags="$LDFLAGS"
 
27395
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
27396
 
 
27397
  # The variable `found' is the prefix under which we've found
 
27398
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
27399
  found=not
 
27400
  for bdb_place in $bdb_places; do
 
27401
 
 
27402
    LDFLAGS="$apu_check_lib_save_ldflags"
 
27403
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
27404
    case "$bdb_place" in
 
27405
      "std" )
 
27406
        description="the standard places"
 
27407
      ;;
 
27408
      *":"* )
 
27409
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
27410
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
27411
        CPPFLAGS="$CPPFLAGS -I$header"
 
27412
        LDFLAGS="$LDFLAGS -L$lib"
 
27413
        description="$header and $lib"
 
27414
      ;;
 
27415
      * )
 
27416
        if test -d $bdb_place; then
 
27417
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
27418
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
27419
        else
 
27420
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
27421
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
27422
          echo "$as_me:$LINENO: result: directory not found" >&5
 
27423
echo "${ECHO_T}directory not found" >&6
 
27424
          continue
 
27425
        fi
 
27426
        description="$bdb_place"
 
27427
      ;;
 
27428
    esac
 
27429
 
 
27430
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
27431
    # trick to display a message instead.
 
27432
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
27433
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
27434
    echo "$as_me:$LINENO: result: " >&5
 
27435
echo "${ECHO_T}" >&6
 
27436
 
 
27437
    for bdb_libname in $bdb_default_search_lib_names; do
 
27438
      for bdb_header in $bdb_default_search_headers; do
 
27439
        # Clear the header cache variable for each location
 
27440
 
 
27441
        cache_id="`echo ac_cv_header_${bdb_header} \
 
27442
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
27443
 
 
27444
        unset $cache_id
 
27445
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
27446
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
27447
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
27448
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
27449
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
27450
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27451
fi
 
27452
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
27453
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
27454
else
 
27455
  # Is the header compilable?
 
27456
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
27457
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
27458
cat >conftest.$ac_ext <<_ACEOF
 
27459
/* confdefs.h.  */
 
27460
_ACEOF
 
27461
cat confdefs.h >>conftest.$ac_ext
 
27462
cat >>conftest.$ac_ext <<_ACEOF
 
27463
/* end confdefs.h.  */
 
27464
$ac_includes_default
 
27465
#include <$bdb_header>
 
27466
_ACEOF
 
27467
rm -f conftest.$ac_objext
 
27468
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
27469
  (eval $ac_compile) 2>conftest.er1
 
27470
  ac_status=$?
 
27471
  grep -v '^ *+' conftest.er1 >conftest.err
 
27472
  rm -f conftest.er1
 
27473
  cat conftest.err >&5
 
27474
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27475
  (exit $ac_status); } &&
 
27476
         { ac_try='test -z "$ac_c_werror_flag"
 
27477
                         || test ! -s conftest.err'
 
27478
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27479
  (eval $ac_try) 2>&5
 
27480
  ac_status=$?
 
27481
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27482
  (exit $ac_status); }; } &&
 
27483
         { ac_try='test -s conftest.$ac_objext'
 
27484
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27485
  (eval $ac_try) 2>&5
 
27486
  ac_status=$?
 
27487
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27488
  (exit $ac_status); }; }; then
 
27489
  ac_header_compiler=yes
 
27490
else
 
27491
  echo "$as_me: failed program was:" >&5
 
27492
sed 's/^/| /' conftest.$ac_ext >&5
 
27493
 
 
27494
ac_header_compiler=no
 
27495
fi
 
27496
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
27497
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
27498
echo "${ECHO_T}$ac_header_compiler" >&6
 
27499
 
 
27500
# Is the header present?
 
27501
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
27502
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
27503
cat >conftest.$ac_ext <<_ACEOF
 
27504
/* confdefs.h.  */
 
27505
_ACEOF
 
27506
cat confdefs.h >>conftest.$ac_ext
 
27507
cat >>conftest.$ac_ext <<_ACEOF
 
27508
/* end confdefs.h.  */
 
27509
#include <$bdb_header>
 
27510
_ACEOF
 
27511
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
27512
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
27513
  ac_status=$?
 
27514
  grep -v '^ *+' conftest.er1 >conftest.err
 
27515
  rm -f conftest.er1
 
27516
  cat conftest.err >&5
 
27517
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27518
  (exit $ac_status); } >/dev/null; then
 
27519
  if test -s conftest.err; then
 
27520
    ac_cpp_err=$ac_c_preproc_warn_flag
 
27521
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
27522
  else
 
27523
    ac_cpp_err=
 
27524
  fi
 
27525
else
 
27526
  ac_cpp_err=yes
 
27527
fi
 
27528
if test -z "$ac_cpp_err"; then
 
27529
  ac_header_preproc=yes
 
27530
else
 
27531
  echo "$as_me: failed program was:" >&5
 
27532
sed 's/^/| /' conftest.$ac_ext >&5
 
27533
 
 
27534
  ac_header_preproc=no
 
27535
fi
 
27536
rm -f conftest.err conftest.$ac_ext
 
27537
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
27538
echo "${ECHO_T}$ac_header_preproc" >&6
 
27539
 
 
27540
# So?  What about this header?
 
27541
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
27542
  yes:no: )
 
27543
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
27544
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
27545
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
27546
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
27547
    ac_header_preproc=yes
 
27548
    ;;
 
27549
  no:yes:* )
 
27550
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
27551
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
27552
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
27553
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
27554
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
27555
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
27556
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
27557
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
27558
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
27559
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
27560
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
27561
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
27562
    (
 
27563
      cat <<\_ASBOX
 
27564
## ------------------------------------------ ##
 
27565
## Report this to the AC_PACKAGE_NAME lists.  ##
 
27566
## ------------------------------------------ ##
 
27567
_ASBOX
 
27568
    ) |
 
27569
      sed "s/^/$as_me: WARNING:     /" >&2
 
27570
    ;;
 
27571
esac
 
27572
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
27573
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
27574
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
27575
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27576
else
 
27577
  eval "$as_ac_Header=\$ac_header_preproc"
 
27578
fi
 
27579
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
27580
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
27581
 
 
27582
fi
 
27583
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
27584
 
 
27585
          if test ""4"" = "3" -o ""4"" = "4"; then
 
27586
            # We generate a separate cache variable for each prefix and libname
 
27587
            # we search under.  That way, we avoid caching information that
 
27588
            # changes if the user runs `configure' with a different set of
 
27589
            # switches.
 
27590
 
 
27591
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"1"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
27592
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
27593
 
 
27594
 
 
27595
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
27596
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
27597
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
27598
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27599
else
 
27600
 
 
27601
 
 
27602
    apu_try_berkeley_db_save_libs="$LIBS"
 
27603
 
 
27604
    apu_check_berkeley_db_major="4"
 
27605
    apu_check_berkeley_db_minor="1"
 
27606
    apu_check_berkeley_db_patch="-1"
 
27607
    apu_try_berkeley_db_header=$bdb_header
 
27608
    apu_try_berkeley_db_libname=$bdb_libname
 
27609
 
 
27610
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
27611
    if test "$cross_compiling" = yes; then
 
27612
  apu_try_berkeley_db=yes
 
27613
 
 
27614
else
 
27615
  cat >conftest.$ac_ext <<_ACEOF
 
27616
/* confdefs.h.  */
 
27617
_ACEOF
 
27618
cat confdefs.h >>conftest.$ac_ext
 
27619
cat >>conftest.$ac_ext <<_ACEOF
 
27620
/* end confdefs.h.  */
 
27621
 
 
27622
#include <stdio.h>
 
27623
#include <$apu_try_berkeley_db_header>
 
27624
main ()
 
27625
{
 
27626
  int major, minor, patch;
 
27627
 
 
27628
  db_version(&major, &minor, &patch);
 
27629
 
 
27630
  /* Sanity check: ensure that db.h constants actually match the db library */
 
27631
  if (major != DB_VERSION_MAJOR
 
27632
      || minor != DB_VERSION_MINOR
 
27633
      || patch != DB_VERSION_PATCH)
 
27634
    exit (1);
 
27635
 
 
27636
  /* Run-time check:  ensure the library claims to be the correct version. */
 
27637
 
 
27638
  if ($apu_check_berkeley_db_major != -1) {
 
27639
    if (major < $apu_check_berkeley_db_major)
 
27640
      exit (1);
 
27641
    if (major > $apu_check_berkeley_db_major)
 
27642
      exit (0);
 
27643
  }
 
27644
 
 
27645
  if ($apu_check_berkeley_db_minor != -1) {
 
27646
    if (minor < $apu_check_berkeley_db_minor)
 
27647
      exit (1);
 
27648
    if (minor > $apu_check_berkeley_db_minor)
 
27649
      exit (0);
 
27650
  }
 
27651
 
 
27652
  if ($apu_check_berkeley_db_patch == -1
 
27653
      || patch >= $apu_check_berkeley_db_patch)
 
27654
    exit (0);
 
27655
  else
 
27656
    exit (1);
 
27657
}
 
27658
 
 
27659
_ACEOF
 
27660
rm -f conftest$ac_exeext
 
27661
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
27662
  (eval $ac_link) 2>&5
 
27663
  ac_status=$?
 
27664
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27665
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
27666
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27667
  (eval $ac_try) 2>&5
 
27668
  ac_status=$?
 
27669
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27670
  (exit $ac_status); }; }; then
 
27671
  apu_try_berkeley_db=yes
 
27672
else
 
27673
  echo "$as_me: program exited with status $ac_status" >&5
 
27674
echo "$as_me: failed program was:" >&5
 
27675
sed 's/^/| /' conftest.$ac_ext >&5
 
27676
 
 
27677
( exit $ac_status )
 
27678
apu_try_berkeley_db=no
 
27679
fi
 
27680
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
27681
fi
 
27682
 
 
27683
    LIBS="$apu_try_berkeley_db_save_libs"
 
27684
 
 
27685
 
 
27686
                eval "$cache_id=$apu_try_berkeley_db"
 
27687
 
 
27688
fi
 
27689
 
 
27690
            result="`eval echo '$'$cache_id`"
 
27691
            echo "$as_me:$LINENO: result: $result" >&5
 
27692
echo "${ECHO_T}$result" >&6
 
27693
          elif test ""4"" = "1"; then
 
27694
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
27695
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
27696
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
27697
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
27698
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27699
else
 
27700
  ac_check_lib_save_LIBS=$LIBS
 
27701
LIBS="-l$bdb_libname  $LIBS"
 
27702
cat >conftest.$ac_ext <<_ACEOF
 
27703
/* confdefs.h.  */
 
27704
_ACEOF
 
27705
cat confdefs.h >>conftest.$ac_ext
 
27706
cat >>conftest.$ac_ext <<_ACEOF
 
27707
/* end confdefs.h.  */
 
27708
 
 
27709
/* Override any gcc2 internal prototype to avoid an error.  */
 
27710
#ifdef __cplusplus
 
27711
extern "C"
 
27712
#endif
 
27713
/* We use char because int might match the return type of a gcc2
 
27714
   builtin and then its argument prototype would still apply.  */
 
27715
char dbopen ();
 
27716
int
 
27717
main ()
 
27718
{
 
27719
dbopen ();
 
27720
  ;
 
27721
  return 0;
 
27722
}
 
27723
_ACEOF
 
27724
rm -f conftest.$ac_objext conftest$ac_exeext
 
27725
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
27726
  (eval $ac_link) 2>conftest.er1
 
27727
  ac_status=$?
 
27728
  grep -v '^ *+' conftest.er1 >conftest.err
 
27729
  rm -f conftest.er1
 
27730
  cat conftest.err >&5
 
27731
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27732
  (exit $ac_status); } &&
 
27733
         { ac_try='test -z "$ac_c_werror_flag"
 
27734
                         || test ! -s conftest.err'
 
27735
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27736
  (eval $ac_try) 2>&5
 
27737
  ac_status=$?
 
27738
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27739
  (exit $ac_status); }; } &&
 
27740
         { ac_try='test -s conftest$ac_exeext'
 
27741
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27742
  (eval $ac_try) 2>&5
 
27743
  ac_status=$?
 
27744
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27745
  (exit $ac_status); }; }; then
 
27746
  eval "$as_ac_Lib=yes"
 
27747
else
 
27748
  echo "$as_me: failed program was:" >&5
 
27749
sed 's/^/| /' conftest.$ac_ext >&5
 
27750
 
 
27751
eval "$as_ac_Lib=no"
 
27752
fi
 
27753
rm -f conftest.err conftest.$ac_objext \
 
27754
      conftest$ac_exeext conftest.$ac_ext
 
27755
LIBS=$ac_check_lib_save_LIBS
 
27756
fi
 
27757
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
27758
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
27759
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
27760
  result=yes
 
27761
else
 
27762
  result=no
 
27763
 
 
27764
fi
 
27765
 
 
27766
          elif test ""4"" = "2"; then
 
27767
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
27768
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
27769
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
27770
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
27771
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
27772
else
 
27773
  ac_check_lib_save_LIBS=$LIBS
 
27774
LIBS="-l$bdb_libname  $LIBS"
 
27775
cat >conftest.$ac_ext <<_ACEOF
 
27776
/* confdefs.h.  */
 
27777
_ACEOF
 
27778
cat confdefs.h >>conftest.$ac_ext
 
27779
cat >>conftest.$ac_ext <<_ACEOF
 
27780
/* end confdefs.h.  */
 
27781
 
 
27782
/* Override any gcc2 internal prototype to avoid an error.  */
 
27783
#ifdef __cplusplus
 
27784
extern "C"
 
27785
#endif
 
27786
/* We use char because int might match the return type of a gcc2
 
27787
   builtin and then its argument prototype would still apply.  */
 
27788
char db_open ();
 
27789
int
 
27790
main ()
 
27791
{
 
27792
db_open ();
 
27793
  ;
 
27794
  return 0;
 
27795
}
 
27796
_ACEOF
 
27797
rm -f conftest.$ac_objext conftest$ac_exeext
 
27798
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
27799
  (eval $ac_link) 2>conftest.er1
 
27800
  ac_status=$?
 
27801
  grep -v '^ *+' conftest.er1 >conftest.err
 
27802
  rm -f conftest.er1
 
27803
  cat conftest.err >&5
 
27804
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27805
  (exit $ac_status); } &&
 
27806
         { ac_try='test -z "$ac_c_werror_flag"
 
27807
                         || test ! -s conftest.err'
 
27808
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27809
  (eval $ac_try) 2>&5
 
27810
  ac_status=$?
 
27811
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27812
  (exit $ac_status); }; } &&
 
27813
         { ac_try='test -s conftest$ac_exeext'
 
27814
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27815
  (eval $ac_try) 2>&5
 
27816
  ac_status=$?
 
27817
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27818
  (exit $ac_status); }; }; then
 
27819
  eval "$as_ac_Lib=yes"
 
27820
else
 
27821
  echo "$as_me: failed program was:" >&5
 
27822
sed 's/^/| /' conftest.$ac_ext >&5
 
27823
 
 
27824
eval "$as_ac_Lib=no"
 
27825
fi
 
27826
rm -f conftest.err conftest.$ac_objext \
 
27827
      conftest$ac_exeext conftest.$ac_ext
 
27828
LIBS=$ac_check_lib_save_LIBS
 
27829
fi
 
27830
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
27831
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
27832
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
27833
  result=yes
 
27834
else
 
27835
  result=no
 
27836
 
 
27837
fi
 
27838
 
 
27839
          fi
 
27840
 
 
27841
else
 
27842
  result="no"
 
27843
fi
 
27844
 
 
27845
 
 
27846
 
 
27847
        # If we found it, no need to search any more.
 
27848
        if test "$result" = "yes"; then
 
27849
          found="$bdb_place"
 
27850
          break
 
27851
        fi
 
27852
      done
 
27853
      test "$found" != "not" && break
 
27854
    done
 
27855
    test "$found" != "not" && break
 
27856
  done
 
27857
 
 
27858
  # Restore the original values of the flags we tweak.
 
27859
  LDFLAGS="$apu_check_lib_save_ldflags"
 
27860
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
27861
 
 
27862
  case "$found" in
 
27863
  "not")
 
27864
    apu_have_db=0
 
27865
    ;;
 
27866
  "std")
 
27867
    apu_db_header=$bdb_header
 
27868
    apu_db_lib=$bdb_libname
 
27869
    apu_have_db=1
 
27870
    ;;
 
27871
  *":"*)
 
27872
    header="`echo $found | sed -e 's/:.*$//'`"
 
27873
    lib="`echo $found | sed -e 's/^.*://'`"
 
27874
 
 
27875
 
 
27876
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
27877
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
27878
    APRUTIL_INCLUDES="-I$header"
 
27879
  else
 
27880
    apr_addto_bugger="-I$header"
 
27881
    for i in $apr_addto_bugger; do
 
27882
      apr_addto_duplicate="0"
 
27883
      for j in $APRUTIL_INCLUDES; do
 
27884
        if test "x$i" = "x$j"; then
 
27885
          apr_addto_duplicate="1"
 
27886
          break
 
27887
        fi
 
27888
      done
 
27889
      if test $apr_addto_duplicate = "0"; then
 
27890
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
27891
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
27892
      fi
 
27893
    done
 
27894
  fi
 
27895
 
 
27896
 
 
27897
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
27898
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
27899
    APRUTIL_LDFLAGS="-L$lib"
 
27900
  else
 
27901
    apr_addto_bugger="-L$lib"
 
27902
    for i in $apr_addto_bugger; do
 
27903
      apr_addto_duplicate="0"
 
27904
      for j in $APRUTIL_LDFLAGS; do
 
27905
        if test "x$i" = "x$j"; then
 
27906
          apr_addto_duplicate="1"
 
27907
          break
 
27908
        fi
 
27909
      done
 
27910
      if test $apr_addto_duplicate = "0"; then
 
27911
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
27912
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
27913
      fi
 
27914
    done
 
27915
  fi
 
27916
 
 
27917
    apu_db_header=$bdb_header
 
27918
    apu_db_lib=$bdb_libname
 
27919
    apu_have_db=1
 
27920
    ;;
 
27921
  *)
 
27922
 
 
27923
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
27924
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
27925
    APRUTIL_INCLUDES="-I$found/include"
 
27926
  else
 
27927
    apr_addto_bugger="-I$found/include"
 
27928
    for i in $apr_addto_bugger; do
 
27929
      apr_addto_duplicate="0"
 
27930
      for j in $APRUTIL_INCLUDES; do
 
27931
        if test "x$i" = "x$j"; then
 
27932
          apr_addto_duplicate="1"
 
27933
          break
 
27934
        fi
 
27935
      done
 
27936
      if test $apr_addto_duplicate = "0"; then
 
27937
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
27938
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
27939
      fi
 
27940
    done
 
27941
  fi
 
27942
 
 
27943
 
 
27944
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
27945
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
27946
    APRUTIL_LDFLAGS="-L$found/lib"
 
27947
  else
 
27948
    apr_addto_bugger="-L$found/lib"
 
27949
    for i in $apr_addto_bugger; do
 
27950
      apr_addto_duplicate="0"
 
27951
      for j in $APRUTIL_LDFLAGS; do
 
27952
        if test "x$i" = "x$j"; then
 
27953
          apr_addto_duplicate="1"
 
27954
          break
 
27955
        fi
 
27956
      done
 
27957
      if test $apr_addto_duplicate = "0"; then
 
27958
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
27959
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
27960
      fi
 
27961
    done
 
27962
  fi
 
27963
 
 
27964
    apu_db_header=$bdb_header
 
27965
    apu_db_lib=$bdb_libname
 
27966
    apu_have_db=1
 
27967
    ;;
 
27968
  esac
 
27969
 
 
27970
  if test "$apu_have_db" = "1"; then
 
27971
    apu_db_version=4
 
27972
  fi
 
27973
 
 
27974
        if test "$apu_db_version" != "4"; then
 
27975
 
 
27976
  places="$all_places"
 
27977
  if test -z "$places"; then
 
27978
    places="std /usr/local /usr/local/BerkeleyDB.4.0 /boot/home/config"
 
27979
  fi
 
27980
 
 
27981
  bdb_version="4"
 
27982
  if test ""0"" != "-1"; then
 
27983
    bdb_version="$bdb_version."0""
 
27984
    if test ""-1"" != "-1"; then
 
27985
      bdb_version="$bdb_version."-1""
 
27986
    fi
 
27987
  fi
 
27988
  bdb_places="$places"
 
27989
  bdb_default_search_headers="db4/db.h db.h"
 
27990
  bdb_default_search_lib_names="db-4.0 db4 db"
 
27991
 
 
27992
 
 
27993
  apu_have_db=0
 
27994
 
 
27995
  # Save the original values of the flags we tweak.
 
27996
  apu_check_lib_save_libs="$LIBS"
 
27997
  apu_check_lib_save_ldflags="$LDFLAGS"
 
27998
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
27999
 
 
28000
  # The variable `found' is the prefix under which we've found
 
28001
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
28002
  found=not
 
28003
  for bdb_place in $bdb_places; do
 
28004
 
 
28005
    LDFLAGS="$apu_check_lib_save_ldflags"
 
28006
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
28007
    case "$bdb_place" in
 
28008
      "std" )
 
28009
        description="the standard places"
 
28010
      ;;
 
28011
      *":"* )
 
28012
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
28013
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
28014
        CPPFLAGS="$CPPFLAGS -I$header"
 
28015
        LDFLAGS="$LDFLAGS -L$lib"
 
28016
        description="$header and $lib"
 
28017
      ;;
 
28018
      * )
 
28019
        if test -d $bdb_place; then
 
28020
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
28021
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
28022
        else
 
28023
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
28024
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
28025
          echo "$as_me:$LINENO: result: directory not found" >&5
 
28026
echo "${ECHO_T}directory not found" >&6
 
28027
          continue
 
28028
        fi
 
28029
        description="$bdb_place"
 
28030
      ;;
 
28031
    esac
 
28032
 
 
28033
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
28034
    # trick to display a message instead.
 
28035
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
28036
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
28037
    echo "$as_me:$LINENO: result: " >&5
 
28038
echo "${ECHO_T}" >&6
 
28039
 
 
28040
    for bdb_libname in $bdb_default_search_lib_names; do
 
28041
      for bdb_header in $bdb_default_search_headers; do
 
28042
        # Clear the header cache variable for each location
 
28043
 
 
28044
        cache_id="`echo ac_cv_header_${bdb_header} \
 
28045
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
28046
 
 
28047
        unset $cache_id
 
28048
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
28049
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
28050
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
28051
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
28052
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
28053
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28054
fi
 
28055
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
28056
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
28057
else
 
28058
  # Is the header compilable?
 
28059
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
28060
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
28061
cat >conftest.$ac_ext <<_ACEOF
 
28062
/* confdefs.h.  */
 
28063
_ACEOF
 
28064
cat confdefs.h >>conftest.$ac_ext
 
28065
cat >>conftest.$ac_ext <<_ACEOF
 
28066
/* end confdefs.h.  */
 
28067
$ac_includes_default
 
28068
#include <$bdb_header>
 
28069
_ACEOF
 
28070
rm -f conftest.$ac_objext
 
28071
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
28072
  (eval $ac_compile) 2>conftest.er1
 
28073
  ac_status=$?
 
28074
  grep -v '^ *+' conftest.er1 >conftest.err
 
28075
  rm -f conftest.er1
 
28076
  cat conftest.err >&5
 
28077
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28078
  (exit $ac_status); } &&
 
28079
         { ac_try='test -z "$ac_c_werror_flag"
 
28080
                         || test ! -s conftest.err'
 
28081
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28082
  (eval $ac_try) 2>&5
 
28083
  ac_status=$?
 
28084
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28085
  (exit $ac_status); }; } &&
 
28086
         { ac_try='test -s conftest.$ac_objext'
 
28087
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28088
  (eval $ac_try) 2>&5
 
28089
  ac_status=$?
 
28090
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28091
  (exit $ac_status); }; }; then
 
28092
  ac_header_compiler=yes
 
28093
else
 
28094
  echo "$as_me: failed program was:" >&5
 
28095
sed 's/^/| /' conftest.$ac_ext >&5
 
28096
 
 
28097
ac_header_compiler=no
 
28098
fi
 
28099
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
28100
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
28101
echo "${ECHO_T}$ac_header_compiler" >&6
 
28102
 
 
28103
# Is the header present?
 
28104
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
28105
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
28106
cat >conftest.$ac_ext <<_ACEOF
 
28107
/* confdefs.h.  */
 
28108
_ACEOF
 
28109
cat confdefs.h >>conftest.$ac_ext
 
28110
cat >>conftest.$ac_ext <<_ACEOF
 
28111
/* end confdefs.h.  */
 
28112
#include <$bdb_header>
 
28113
_ACEOF
 
28114
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
28115
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
28116
  ac_status=$?
 
28117
  grep -v '^ *+' conftest.er1 >conftest.err
 
28118
  rm -f conftest.er1
 
28119
  cat conftest.err >&5
 
28120
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28121
  (exit $ac_status); } >/dev/null; then
 
28122
  if test -s conftest.err; then
 
28123
    ac_cpp_err=$ac_c_preproc_warn_flag
 
28124
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
28125
  else
 
28126
    ac_cpp_err=
 
28127
  fi
 
28128
else
 
28129
  ac_cpp_err=yes
 
28130
fi
 
28131
if test -z "$ac_cpp_err"; then
 
28132
  ac_header_preproc=yes
 
28133
else
 
28134
  echo "$as_me: failed program was:" >&5
 
28135
sed 's/^/| /' conftest.$ac_ext >&5
 
28136
 
 
28137
  ac_header_preproc=no
 
28138
fi
 
28139
rm -f conftest.err conftest.$ac_ext
 
28140
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
28141
echo "${ECHO_T}$ac_header_preproc" >&6
 
28142
 
 
28143
# So?  What about this header?
 
28144
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
28145
  yes:no: )
 
28146
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
28147
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
28148
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
28149
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
28150
    ac_header_preproc=yes
 
28151
    ;;
 
28152
  no:yes:* )
 
28153
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
28154
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
28155
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
28156
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
28157
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
28158
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
28159
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
28160
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
28161
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
28162
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
28163
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
28164
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
28165
    (
 
28166
      cat <<\_ASBOX
 
28167
## ------------------------------------------ ##
 
28168
## Report this to the AC_PACKAGE_NAME lists.  ##
 
28169
## ------------------------------------------ ##
 
28170
_ASBOX
 
28171
    ) |
 
28172
      sed "s/^/$as_me: WARNING:     /" >&2
 
28173
    ;;
 
28174
esac
 
28175
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
28176
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
28177
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
28178
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28179
else
 
28180
  eval "$as_ac_Header=\$ac_header_preproc"
 
28181
fi
 
28182
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
28183
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
28184
 
 
28185
fi
 
28186
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
28187
 
 
28188
          if test ""4"" = "3" -o ""4"" = "4"; then
 
28189
            # We generate a separate cache variable for each prefix and libname
 
28190
            # we search under.  That way, we avoid caching information that
 
28191
            # changes if the user runs `configure' with a different set of
 
28192
            # switches.
 
28193
 
 
28194
            cache_id="`echo apu_cv_check_berkeley_db_"4"_"0"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
28195
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
28196
 
 
28197
 
 
28198
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
28199
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
28200
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
28201
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28202
else
 
28203
 
 
28204
 
 
28205
    apu_try_berkeley_db_save_libs="$LIBS"
 
28206
 
 
28207
    apu_check_berkeley_db_major="4"
 
28208
    apu_check_berkeley_db_minor="0"
 
28209
    apu_check_berkeley_db_patch="-1"
 
28210
    apu_try_berkeley_db_header=$bdb_header
 
28211
    apu_try_berkeley_db_libname=$bdb_libname
 
28212
 
 
28213
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
28214
    if test "$cross_compiling" = yes; then
 
28215
  apu_try_berkeley_db=yes
 
28216
 
 
28217
else
 
28218
  cat >conftest.$ac_ext <<_ACEOF
 
28219
/* confdefs.h.  */
 
28220
_ACEOF
 
28221
cat confdefs.h >>conftest.$ac_ext
 
28222
cat >>conftest.$ac_ext <<_ACEOF
 
28223
/* end confdefs.h.  */
 
28224
 
 
28225
#include <stdio.h>
 
28226
#include <$apu_try_berkeley_db_header>
 
28227
main ()
 
28228
{
 
28229
  int major, minor, patch;
 
28230
 
 
28231
  db_version(&major, &minor, &patch);
 
28232
 
 
28233
  /* Sanity check: ensure that db.h constants actually match the db library */
 
28234
  if (major != DB_VERSION_MAJOR
 
28235
      || minor != DB_VERSION_MINOR
 
28236
      || patch != DB_VERSION_PATCH)
 
28237
    exit (1);
 
28238
 
 
28239
  /* Run-time check:  ensure the library claims to be the correct version. */
 
28240
 
 
28241
  if ($apu_check_berkeley_db_major != -1) {
 
28242
    if (major < $apu_check_berkeley_db_major)
 
28243
      exit (1);
 
28244
    if (major > $apu_check_berkeley_db_major)
 
28245
      exit (0);
 
28246
  }
 
28247
 
 
28248
  if ($apu_check_berkeley_db_minor != -1) {
 
28249
    if (minor < $apu_check_berkeley_db_minor)
 
28250
      exit (1);
 
28251
    if (minor > $apu_check_berkeley_db_minor)
 
28252
      exit (0);
 
28253
  }
 
28254
 
 
28255
  if ($apu_check_berkeley_db_patch == -1
 
28256
      || patch >= $apu_check_berkeley_db_patch)
 
28257
    exit (0);
 
28258
  else
 
28259
    exit (1);
 
28260
}
 
28261
 
 
28262
_ACEOF
 
28263
rm -f conftest$ac_exeext
 
28264
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
28265
  (eval $ac_link) 2>&5
 
28266
  ac_status=$?
 
28267
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28268
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
28269
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28270
  (eval $ac_try) 2>&5
 
28271
  ac_status=$?
 
28272
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28273
  (exit $ac_status); }; }; then
 
28274
  apu_try_berkeley_db=yes
 
28275
else
 
28276
  echo "$as_me: program exited with status $ac_status" >&5
 
28277
echo "$as_me: failed program was:" >&5
 
28278
sed 's/^/| /' conftest.$ac_ext >&5
 
28279
 
 
28280
( exit $ac_status )
 
28281
apu_try_berkeley_db=no
 
28282
fi
 
28283
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
28284
fi
 
28285
 
 
28286
    LIBS="$apu_try_berkeley_db_save_libs"
 
28287
 
 
28288
 
 
28289
                eval "$cache_id=$apu_try_berkeley_db"
 
28290
 
 
28291
fi
 
28292
 
 
28293
            result="`eval echo '$'$cache_id`"
 
28294
            echo "$as_me:$LINENO: result: $result" >&5
 
28295
echo "${ECHO_T}$result" >&6
 
28296
          elif test ""4"" = "1"; then
 
28297
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
28298
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
28299
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
28300
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
28301
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28302
else
 
28303
  ac_check_lib_save_LIBS=$LIBS
 
28304
LIBS="-l$bdb_libname  $LIBS"
 
28305
cat >conftest.$ac_ext <<_ACEOF
 
28306
/* confdefs.h.  */
 
28307
_ACEOF
 
28308
cat confdefs.h >>conftest.$ac_ext
 
28309
cat >>conftest.$ac_ext <<_ACEOF
 
28310
/* end confdefs.h.  */
 
28311
 
 
28312
/* Override any gcc2 internal prototype to avoid an error.  */
 
28313
#ifdef __cplusplus
 
28314
extern "C"
 
28315
#endif
 
28316
/* We use char because int might match the return type of a gcc2
 
28317
   builtin and then its argument prototype would still apply.  */
 
28318
char dbopen ();
 
28319
int
 
28320
main ()
 
28321
{
 
28322
dbopen ();
 
28323
  ;
 
28324
  return 0;
 
28325
}
 
28326
_ACEOF
 
28327
rm -f conftest.$ac_objext conftest$ac_exeext
 
28328
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
28329
  (eval $ac_link) 2>conftest.er1
 
28330
  ac_status=$?
 
28331
  grep -v '^ *+' conftest.er1 >conftest.err
 
28332
  rm -f conftest.er1
 
28333
  cat conftest.err >&5
 
28334
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28335
  (exit $ac_status); } &&
 
28336
         { ac_try='test -z "$ac_c_werror_flag"
 
28337
                         || test ! -s conftest.err'
 
28338
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28339
  (eval $ac_try) 2>&5
 
28340
  ac_status=$?
 
28341
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28342
  (exit $ac_status); }; } &&
 
28343
         { ac_try='test -s conftest$ac_exeext'
 
28344
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28345
  (eval $ac_try) 2>&5
 
28346
  ac_status=$?
 
28347
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28348
  (exit $ac_status); }; }; then
 
28349
  eval "$as_ac_Lib=yes"
 
28350
else
 
28351
  echo "$as_me: failed program was:" >&5
 
28352
sed 's/^/| /' conftest.$ac_ext >&5
 
28353
 
 
28354
eval "$as_ac_Lib=no"
 
28355
fi
 
28356
rm -f conftest.err conftest.$ac_objext \
 
28357
      conftest$ac_exeext conftest.$ac_ext
 
28358
LIBS=$ac_check_lib_save_LIBS
 
28359
fi
 
28360
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
28361
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
28362
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
28363
  result=yes
 
28364
else
 
28365
  result=no
 
28366
 
 
28367
fi
 
28368
 
 
28369
          elif test ""4"" = "2"; then
 
28370
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
28371
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
28372
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
28373
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
28374
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28375
else
 
28376
  ac_check_lib_save_LIBS=$LIBS
 
28377
LIBS="-l$bdb_libname  $LIBS"
 
28378
cat >conftest.$ac_ext <<_ACEOF
 
28379
/* confdefs.h.  */
 
28380
_ACEOF
 
28381
cat confdefs.h >>conftest.$ac_ext
 
28382
cat >>conftest.$ac_ext <<_ACEOF
 
28383
/* end confdefs.h.  */
 
28384
 
 
28385
/* Override any gcc2 internal prototype to avoid an error.  */
 
28386
#ifdef __cplusplus
 
28387
extern "C"
 
28388
#endif
 
28389
/* We use char because int might match the return type of a gcc2
 
28390
   builtin and then its argument prototype would still apply.  */
 
28391
char db_open ();
 
28392
int
 
28393
main ()
 
28394
{
 
28395
db_open ();
 
28396
  ;
 
28397
  return 0;
 
28398
}
 
28399
_ACEOF
 
28400
rm -f conftest.$ac_objext conftest$ac_exeext
 
28401
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
28402
  (eval $ac_link) 2>conftest.er1
 
28403
  ac_status=$?
 
28404
  grep -v '^ *+' conftest.er1 >conftest.err
 
28405
  rm -f conftest.er1
 
28406
  cat conftest.err >&5
 
28407
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28408
  (exit $ac_status); } &&
 
28409
         { ac_try='test -z "$ac_c_werror_flag"
 
28410
                         || test ! -s conftest.err'
 
28411
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28412
  (eval $ac_try) 2>&5
 
28413
  ac_status=$?
 
28414
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28415
  (exit $ac_status); }; } &&
 
28416
         { ac_try='test -s conftest$ac_exeext'
 
28417
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28418
  (eval $ac_try) 2>&5
 
28419
  ac_status=$?
 
28420
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28421
  (exit $ac_status); }; }; then
 
28422
  eval "$as_ac_Lib=yes"
 
28423
else
 
28424
  echo "$as_me: failed program was:" >&5
 
28425
sed 's/^/| /' conftest.$ac_ext >&5
 
28426
 
 
28427
eval "$as_ac_Lib=no"
 
28428
fi
 
28429
rm -f conftest.err conftest.$ac_objext \
 
28430
      conftest$ac_exeext conftest.$ac_ext
 
28431
LIBS=$ac_check_lib_save_LIBS
 
28432
fi
 
28433
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
28434
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
28435
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
28436
  result=yes
 
28437
else
 
28438
  result=no
 
28439
 
 
28440
fi
 
28441
 
 
28442
          fi
 
28443
 
 
28444
else
 
28445
  result="no"
 
28446
fi
 
28447
 
 
28448
 
 
28449
 
 
28450
        # If we found it, no need to search any more.
 
28451
        if test "$result" = "yes"; then
 
28452
          found="$bdb_place"
 
28453
          break
 
28454
        fi
 
28455
      done
 
28456
      test "$found" != "not" && break
 
28457
    done
 
28458
    test "$found" != "not" && break
 
28459
  done
 
28460
 
 
28461
  # Restore the original values of the flags we tweak.
 
28462
  LDFLAGS="$apu_check_lib_save_ldflags"
 
28463
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
28464
 
 
28465
  case "$found" in
 
28466
  "not")
 
28467
    apu_have_db=0
 
28468
    ;;
 
28469
  "std")
 
28470
    apu_db_header=$bdb_header
 
28471
    apu_db_lib=$bdb_libname
 
28472
    apu_have_db=1
 
28473
    ;;
 
28474
  *":"*)
 
28475
    header="`echo $found | sed -e 's/:.*$//'`"
 
28476
    lib="`echo $found | sed -e 's/^.*://'`"
 
28477
 
 
28478
 
 
28479
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
28480
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
28481
    APRUTIL_INCLUDES="-I$header"
 
28482
  else
 
28483
    apr_addto_bugger="-I$header"
 
28484
    for i in $apr_addto_bugger; do
 
28485
      apr_addto_duplicate="0"
 
28486
      for j in $APRUTIL_INCLUDES; do
 
28487
        if test "x$i" = "x$j"; then
 
28488
          apr_addto_duplicate="1"
 
28489
          break
 
28490
        fi
 
28491
      done
 
28492
      if test $apr_addto_duplicate = "0"; then
 
28493
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
28494
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
28495
      fi
 
28496
    done
 
28497
  fi
 
28498
 
 
28499
 
 
28500
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
28501
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
28502
    APRUTIL_LDFLAGS="-L$lib"
 
28503
  else
 
28504
    apr_addto_bugger="-L$lib"
 
28505
    for i in $apr_addto_bugger; do
 
28506
      apr_addto_duplicate="0"
 
28507
      for j in $APRUTIL_LDFLAGS; do
 
28508
        if test "x$i" = "x$j"; then
 
28509
          apr_addto_duplicate="1"
 
28510
          break
 
28511
        fi
 
28512
      done
 
28513
      if test $apr_addto_duplicate = "0"; then
 
28514
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
28515
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
28516
      fi
 
28517
    done
 
28518
  fi
 
28519
 
 
28520
    apu_db_header=$bdb_header
 
28521
    apu_db_lib=$bdb_libname
 
28522
    apu_have_db=1
 
28523
    ;;
 
28524
  *)
 
28525
 
 
28526
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
28527
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
28528
    APRUTIL_INCLUDES="-I$found/include"
 
28529
  else
 
28530
    apr_addto_bugger="-I$found/include"
 
28531
    for i in $apr_addto_bugger; do
 
28532
      apr_addto_duplicate="0"
 
28533
      for j in $APRUTIL_INCLUDES; do
 
28534
        if test "x$i" = "x$j"; then
 
28535
          apr_addto_duplicate="1"
 
28536
          break
 
28537
        fi
 
28538
      done
 
28539
      if test $apr_addto_duplicate = "0"; then
 
28540
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
28541
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
28542
      fi
 
28543
    done
 
28544
  fi
 
28545
 
 
28546
 
 
28547
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
28548
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
28549
    APRUTIL_LDFLAGS="-L$found/lib"
 
28550
  else
 
28551
    apr_addto_bugger="-L$found/lib"
 
28552
    for i in $apr_addto_bugger; do
 
28553
      apr_addto_duplicate="0"
 
28554
      for j in $APRUTIL_LDFLAGS; do
 
28555
        if test "x$i" = "x$j"; then
 
28556
          apr_addto_duplicate="1"
 
28557
          break
 
28558
        fi
 
28559
      done
 
28560
      if test $apr_addto_duplicate = "0"; then
 
28561
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
28562
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
28563
      fi
 
28564
    done
 
28565
  fi
 
28566
 
 
28567
    apu_db_header=$bdb_header
 
28568
    apu_db_lib=$bdb_libname
 
28569
    apu_have_db=1
 
28570
    ;;
 
28571
  esac
 
28572
 
 
28573
  if test "$apu_have_db" = "1"; then
 
28574
    apu_db_version=4
 
28575
  fi
 
28576
 
 
28577
          if test "$apu_db_version" != "4"; then
 
28578
 
 
28579
  places="$all_places"
 
28580
  if test -z "$places"; then
 
28581
    places="std"
 
28582
  fi
 
28583
 
 
28584
  bdb_version=3
 
28585
  if test "-1" != "-1"; then
 
28586
    bdb_version="$bdb_version.-1"
 
28587
    if test "-1" != "-1"; then
 
28588
      bdb_version="$bdb_version.-1"
 
28589
    fi
 
28590
  fi
 
28591
  bdb_places="$places"
 
28592
  bdb_default_search_headers="db3/db.h db.h"
 
28593
  bdb_default_search_lib_names="db3 db"
 
28594
 
 
28595
 
 
28596
  apu_have_db=0
 
28597
 
 
28598
  # Save the original values of the flags we tweak.
 
28599
  apu_check_lib_save_libs="$LIBS"
 
28600
  apu_check_lib_save_ldflags="$LDFLAGS"
 
28601
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
28602
 
 
28603
  # The variable `found' is the prefix under which we've found
 
28604
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
28605
  found=not
 
28606
  for bdb_place in $bdb_places; do
 
28607
 
 
28608
    LDFLAGS="$apu_check_lib_save_ldflags"
 
28609
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
28610
    case "$bdb_place" in
 
28611
      "std" )
 
28612
        description="the standard places"
 
28613
      ;;
 
28614
      *":"* )
 
28615
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
28616
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
28617
        CPPFLAGS="$CPPFLAGS -I$header"
 
28618
        LDFLAGS="$LDFLAGS -L$lib"
 
28619
        description="$header and $lib"
 
28620
      ;;
 
28621
      * )
 
28622
        if test -d $bdb_place; then
 
28623
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
28624
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
28625
        else
 
28626
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
28627
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
28628
          echo "$as_me:$LINENO: result: directory not found" >&5
 
28629
echo "${ECHO_T}directory not found" >&6
 
28630
          continue
 
28631
        fi
 
28632
        description="$bdb_place"
 
28633
      ;;
 
28634
    esac
 
28635
 
 
28636
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
28637
    # trick to display a message instead.
 
28638
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
28639
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
28640
    echo "$as_me:$LINENO: result: " >&5
 
28641
echo "${ECHO_T}" >&6
 
28642
 
 
28643
    for bdb_libname in $bdb_default_search_lib_names; do
 
28644
      for bdb_header in $bdb_default_search_headers; do
 
28645
        # Clear the header cache variable for each location
 
28646
 
 
28647
        cache_id="`echo ac_cv_header_${bdb_header} \
 
28648
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
28649
 
 
28650
        unset $cache_id
 
28651
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
28652
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
28653
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
28654
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
28655
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
28656
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28657
fi
 
28658
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
28659
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
28660
else
 
28661
  # Is the header compilable?
 
28662
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
28663
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
28664
cat >conftest.$ac_ext <<_ACEOF
 
28665
/* confdefs.h.  */
 
28666
_ACEOF
 
28667
cat confdefs.h >>conftest.$ac_ext
 
28668
cat >>conftest.$ac_ext <<_ACEOF
 
28669
/* end confdefs.h.  */
 
28670
$ac_includes_default
 
28671
#include <$bdb_header>
 
28672
_ACEOF
 
28673
rm -f conftest.$ac_objext
 
28674
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
28675
  (eval $ac_compile) 2>conftest.er1
 
28676
  ac_status=$?
 
28677
  grep -v '^ *+' conftest.er1 >conftest.err
 
28678
  rm -f conftest.er1
 
28679
  cat conftest.err >&5
 
28680
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28681
  (exit $ac_status); } &&
 
28682
         { ac_try='test -z "$ac_c_werror_flag"
 
28683
                         || test ! -s conftest.err'
 
28684
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28685
  (eval $ac_try) 2>&5
 
28686
  ac_status=$?
 
28687
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28688
  (exit $ac_status); }; } &&
 
28689
         { ac_try='test -s conftest.$ac_objext'
 
28690
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28691
  (eval $ac_try) 2>&5
 
28692
  ac_status=$?
 
28693
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28694
  (exit $ac_status); }; }; then
 
28695
  ac_header_compiler=yes
 
28696
else
 
28697
  echo "$as_me: failed program was:" >&5
 
28698
sed 's/^/| /' conftest.$ac_ext >&5
 
28699
 
 
28700
ac_header_compiler=no
 
28701
fi
 
28702
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
28703
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
28704
echo "${ECHO_T}$ac_header_compiler" >&6
 
28705
 
 
28706
# Is the header present?
 
28707
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
28708
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
28709
cat >conftest.$ac_ext <<_ACEOF
 
28710
/* confdefs.h.  */
 
28711
_ACEOF
 
28712
cat confdefs.h >>conftest.$ac_ext
 
28713
cat >>conftest.$ac_ext <<_ACEOF
 
28714
/* end confdefs.h.  */
 
28715
#include <$bdb_header>
 
28716
_ACEOF
 
28717
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
28718
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
28719
  ac_status=$?
 
28720
  grep -v '^ *+' conftest.er1 >conftest.err
 
28721
  rm -f conftest.er1
 
28722
  cat conftest.err >&5
 
28723
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28724
  (exit $ac_status); } >/dev/null; then
 
28725
  if test -s conftest.err; then
 
28726
    ac_cpp_err=$ac_c_preproc_warn_flag
 
28727
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
28728
  else
 
28729
    ac_cpp_err=
 
28730
  fi
 
28731
else
 
28732
  ac_cpp_err=yes
 
28733
fi
 
28734
if test -z "$ac_cpp_err"; then
 
28735
  ac_header_preproc=yes
 
28736
else
 
28737
  echo "$as_me: failed program was:" >&5
 
28738
sed 's/^/| /' conftest.$ac_ext >&5
 
28739
 
 
28740
  ac_header_preproc=no
 
28741
fi
 
28742
rm -f conftest.err conftest.$ac_ext
 
28743
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
28744
echo "${ECHO_T}$ac_header_preproc" >&6
 
28745
 
 
28746
# So?  What about this header?
 
28747
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
28748
  yes:no: )
 
28749
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
28750
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
28751
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
28752
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
28753
    ac_header_preproc=yes
 
28754
    ;;
 
28755
  no:yes:* )
 
28756
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
28757
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
28758
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
28759
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
28760
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
28761
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
28762
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
28763
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
28764
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
28765
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
28766
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
28767
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
28768
    (
 
28769
      cat <<\_ASBOX
 
28770
## ------------------------------------------ ##
 
28771
## Report this to the AC_PACKAGE_NAME lists.  ##
 
28772
## ------------------------------------------ ##
 
28773
_ASBOX
 
28774
    ) |
 
28775
      sed "s/^/$as_me: WARNING:     /" >&2
 
28776
    ;;
 
28777
esac
 
28778
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
28779
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
28780
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
28781
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28782
else
 
28783
  eval "$as_ac_Header=\$ac_header_preproc"
 
28784
fi
 
28785
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
28786
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
28787
 
 
28788
fi
 
28789
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
28790
 
 
28791
          if test "3" = "3" -o "3" = "4"; then
 
28792
            # We generate a separate cache variable for each prefix and libname
 
28793
            # we search under.  That way, we avoid caching information that
 
28794
            # changes if the user runs `configure' with a different set of
 
28795
            # switches.
 
28796
 
 
28797
            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
28798
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
28799
 
 
28800
 
 
28801
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
28802
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
28803
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
28804
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28805
else
 
28806
 
 
28807
 
 
28808
    apu_try_berkeley_db_save_libs="$LIBS"
 
28809
 
 
28810
    apu_check_berkeley_db_major=3
 
28811
    apu_check_berkeley_db_minor=-1
 
28812
    apu_check_berkeley_db_patch=-1
 
28813
    apu_try_berkeley_db_header=$bdb_header
 
28814
    apu_try_berkeley_db_libname=$bdb_libname
 
28815
 
 
28816
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
28817
    if test "$cross_compiling" = yes; then
 
28818
  apu_try_berkeley_db=yes
 
28819
 
 
28820
else
 
28821
  cat >conftest.$ac_ext <<_ACEOF
 
28822
/* confdefs.h.  */
 
28823
_ACEOF
 
28824
cat confdefs.h >>conftest.$ac_ext
 
28825
cat >>conftest.$ac_ext <<_ACEOF
 
28826
/* end confdefs.h.  */
 
28827
 
 
28828
#include <stdio.h>
 
28829
#include <$apu_try_berkeley_db_header>
 
28830
main ()
 
28831
{
 
28832
  int major, minor, patch;
 
28833
 
 
28834
  db_version(&major, &minor, &patch);
 
28835
 
 
28836
  /* Sanity check: ensure that db.h constants actually match the db library */
 
28837
  if (major != DB_VERSION_MAJOR
 
28838
      || minor != DB_VERSION_MINOR
 
28839
      || patch != DB_VERSION_PATCH)
 
28840
    exit (1);
 
28841
 
 
28842
  /* Run-time check:  ensure the library claims to be the correct version. */
 
28843
 
 
28844
  if ($apu_check_berkeley_db_major != -1) {
 
28845
    if (major < $apu_check_berkeley_db_major)
 
28846
      exit (1);
 
28847
    if (major > $apu_check_berkeley_db_major)
 
28848
      exit (0);
 
28849
  }
 
28850
 
 
28851
  if ($apu_check_berkeley_db_minor != -1) {
 
28852
    if (minor < $apu_check_berkeley_db_minor)
 
28853
      exit (1);
 
28854
    if (minor > $apu_check_berkeley_db_minor)
 
28855
      exit (0);
 
28856
  }
 
28857
 
 
28858
  if ($apu_check_berkeley_db_patch == -1
 
28859
      || patch >= $apu_check_berkeley_db_patch)
 
28860
    exit (0);
 
28861
  else
 
28862
    exit (1);
 
28863
}
 
28864
 
 
28865
_ACEOF
 
28866
rm -f conftest$ac_exeext
 
28867
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
28868
  (eval $ac_link) 2>&5
 
28869
  ac_status=$?
 
28870
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28871
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
28872
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28873
  (eval $ac_try) 2>&5
 
28874
  ac_status=$?
 
28875
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28876
  (exit $ac_status); }; }; then
 
28877
  apu_try_berkeley_db=yes
 
28878
else
 
28879
  echo "$as_me: program exited with status $ac_status" >&5
 
28880
echo "$as_me: failed program was:" >&5
 
28881
sed 's/^/| /' conftest.$ac_ext >&5
 
28882
 
 
28883
( exit $ac_status )
 
28884
apu_try_berkeley_db=no
 
28885
fi
 
28886
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
28887
fi
 
28888
 
 
28889
    LIBS="$apu_try_berkeley_db_save_libs"
 
28890
 
 
28891
 
 
28892
                eval "$cache_id=$apu_try_berkeley_db"
 
28893
 
 
28894
fi
 
28895
 
 
28896
            result="`eval echo '$'$cache_id`"
 
28897
            echo "$as_me:$LINENO: result: $result" >&5
 
28898
echo "${ECHO_T}$result" >&6
 
28899
          elif test "3" = "1"; then
 
28900
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
28901
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
28902
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
28903
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
28904
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28905
else
 
28906
  ac_check_lib_save_LIBS=$LIBS
 
28907
LIBS="-l$bdb_libname  $LIBS"
 
28908
cat >conftest.$ac_ext <<_ACEOF
 
28909
/* confdefs.h.  */
 
28910
_ACEOF
 
28911
cat confdefs.h >>conftest.$ac_ext
 
28912
cat >>conftest.$ac_ext <<_ACEOF
 
28913
/* end confdefs.h.  */
 
28914
 
 
28915
/* Override any gcc2 internal prototype to avoid an error.  */
 
28916
#ifdef __cplusplus
 
28917
extern "C"
 
28918
#endif
 
28919
/* We use char because int might match the return type of a gcc2
 
28920
   builtin and then its argument prototype would still apply.  */
 
28921
char dbopen ();
 
28922
int
 
28923
main ()
 
28924
{
 
28925
dbopen ();
 
28926
  ;
 
28927
  return 0;
 
28928
}
 
28929
_ACEOF
 
28930
rm -f conftest.$ac_objext conftest$ac_exeext
 
28931
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
28932
  (eval $ac_link) 2>conftest.er1
 
28933
  ac_status=$?
 
28934
  grep -v '^ *+' conftest.er1 >conftest.err
 
28935
  rm -f conftest.er1
 
28936
  cat conftest.err >&5
 
28937
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28938
  (exit $ac_status); } &&
 
28939
         { ac_try='test -z "$ac_c_werror_flag"
 
28940
                         || test ! -s conftest.err'
 
28941
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28942
  (eval $ac_try) 2>&5
 
28943
  ac_status=$?
 
28944
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28945
  (exit $ac_status); }; } &&
 
28946
         { ac_try='test -s conftest$ac_exeext'
 
28947
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
28948
  (eval $ac_try) 2>&5
 
28949
  ac_status=$?
 
28950
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
28951
  (exit $ac_status); }; }; then
 
28952
  eval "$as_ac_Lib=yes"
 
28953
else
 
28954
  echo "$as_me: failed program was:" >&5
 
28955
sed 's/^/| /' conftest.$ac_ext >&5
 
28956
 
 
28957
eval "$as_ac_Lib=no"
 
28958
fi
 
28959
rm -f conftest.err conftest.$ac_objext \
 
28960
      conftest$ac_exeext conftest.$ac_ext
 
28961
LIBS=$ac_check_lib_save_LIBS
 
28962
fi
 
28963
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
28964
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
28965
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
28966
  result=yes
 
28967
else
 
28968
  result=no
 
28969
 
 
28970
fi
 
28971
 
 
28972
          elif test "3" = "2"; then
 
28973
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
28974
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
28975
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
28976
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
28977
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28978
else
 
28979
  ac_check_lib_save_LIBS=$LIBS
 
28980
LIBS="-l$bdb_libname  $LIBS"
 
28981
cat >conftest.$ac_ext <<_ACEOF
 
28982
/* confdefs.h.  */
 
28983
_ACEOF
 
28984
cat confdefs.h >>conftest.$ac_ext
 
28985
cat >>conftest.$ac_ext <<_ACEOF
 
28986
/* end confdefs.h.  */
 
28987
 
 
28988
/* Override any gcc2 internal prototype to avoid an error.  */
 
28989
#ifdef __cplusplus
 
28990
extern "C"
 
28991
#endif
 
28992
/* We use char because int might match the return type of a gcc2
 
28993
   builtin and then its argument prototype would still apply.  */
 
28994
char db_open ();
 
28995
int
 
28996
main ()
 
28997
{
 
28998
db_open ();
 
28999
  ;
 
29000
  return 0;
 
29001
}
 
29002
_ACEOF
 
29003
rm -f conftest.$ac_objext conftest$ac_exeext
 
29004
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
29005
  (eval $ac_link) 2>conftest.er1
 
29006
  ac_status=$?
 
29007
  grep -v '^ *+' conftest.er1 >conftest.err
 
29008
  rm -f conftest.er1
 
29009
  cat conftest.err >&5
 
29010
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29011
  (exit $ac_status); } &&
 
29012
         { ac_try='test -z "$ac_c_werror_flag"
 
29013
                         || test ! -s conftest.err'
 
29014
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29015
  (eval $ac_try) 2>&5
 
29016
  ac_status=$?
 
29017
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29018
  (exit $ac_status); }; } &&
 
29019
         { ac_try='test -s conftest$ac_exeext'
 
29020
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29021
  (eval $ac_try) 2>&5
 
29022
  ac_status=$?
 
29023
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29024
  (exit $ac_status); }; }; then
 
29025
  eval "$as_ac_Lib=yes"
 
29026
else
 
29027
  echo "$as_me: failed program was:" >&5
 
29028
sed 's/^/| /' conftest.$ac_ext >&5
 
29029
 
 
29030
eval "$as_ac_Lib=no"
 
29031
fi
 
29032
rm -f conftest.err conftest.$ac_objext \
 
29033
      conftest$ac_exeext conftest.$ac_ext
 
29034
LIBS=$ac_check_lib_save_LIBS
 
29035
fi
 
29036
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
29037
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
29038
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
29039
  result=yes
 
29040
else
 
29041
  result=no
 
29042
 
 
29043
fi
 
29044
 
 
29045
          fi
 
29046
 
 
29047
else
 
29048
  result="no"
 
29049
fi
 
29050
 
 
29051
 
 
29052
 
 
29053
        # If we found it, no need to search any more.
 
29054
        if test "$result" = "yes"; then
 
29055
          found="$bdb_place"
 
29056
          break
 
29057
        fi
 
29058
      done
 
29059
      test "$found" != "not" && break
 
29060
    done
 
29061
    test "$found" != "not" && break
 
29062
  done
 
29063
 
 
29064
  # Restore the original values of the flags we tweak.
 
29065
  LDFLAGS="$apu_check_lib_save_ldflags"
 
29066
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
29067
 
 
29068
  case "$found" in
 
29069
  "not")
 
29070
    apu_have_db=0
 
29071
    ;;
 
29072
  "std")
 
29073
    apu_db_header=$bdb_header
 
29074
    apu_db_lib=$bdb_libname
 
29075
    apu_have_db=1
 
29076
    ;;
 
29077
  *":"*)
 
29078
    header="`echo $found | sed -e 's/:.*$//'`"
 
29079
    lib="`echo $found | sed -e 's/^.*://'`"
 
29080
 
 
29081
 
 
29082
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
29083
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
29084
    APRUTIL_INCLUDES="-I$header"
 
29085
  else
 
29086
    apr_addto_bugger="-I$header"
 
29087
    for i in $apr_addto_bugger; do
 
29088
      apr_addto_duplicate="0"
 
29089
      for j in $APRUTIL_INCLUDES; do
 
29090
        if test "x$i" = "x$j"; then
 
29091
          apr_addto_duplicate="1"
 
29092
          break
 
29093
        fi
 
29094
      done
 
29095
      if test $apr_addto_duplicate = "0"; then
 
29096
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
29097
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
29098
      fi
 
29099
    done
 
29100
  fi
 
29101
 
 
29102
 
 
29103
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
29104
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
29105
    APRUTIL_LDFLAGS="-L$lib"
 
29106
  else
 
29107
    apr_addto_bugger="-L$lib"
 
29108
    for i in $apr_addto_bugger; do
 
29109
      apr_addto_duplicate="0"
 
29110
      for j in $APRUTIL_LDFLAGS; do
 
29111
        if test "x$i" = "x$j"; then
 
29112
          apr_addto_duplicate="1"
 
29113
          break
 
29114
        fi
 
29115
      done
 
29116
      if test $apr_addto_duplicate = "0"; then
 
29117
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
29118
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
29119
      fi
 
29120
    done
 
29121
  fi
 
29122
 
 
29123
    apu_db_header=$bdb_header
 
29124
    apu_db_lib=$bdb_libname
 
29125
    apu_have_db=1
 
29126
    ;;
 
29127
  *)
 
29128
 
 
29129
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
29130
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
29131
    APRUTIL_INCLUDES="-I$found/include"
 
29132
  else
 
29133
    apr_addto_bugger="-I$found/include"
 
29134
    for i in $apr_addto_bugger; do
 
29135
      apr_addto_duplicate="0"
 
29136
      for j in $APRUTIL_INCLUDES; do
 
29137
        if test "x$i" = "x$j"; then
 
29138
          apr_addto_duplicate="1"
 
29139
          break
 
29140
        fi
 
29141
      done
 
29142
      if test $apr_addto_duplicate = "0"; then
 
29143
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
29144
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
29145
      fi
 
29146
    done
 
29147
  fi
 
29148
 
 
29149
 
 
29150
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
29151
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
29152
    APRUTIL_LDFLAGS="-L$found/lib"
 
29153
  else
 
29154
    apr_addto_bugger="-L$found/lib"
 
29155
    for i in $apr_addto_bugger; do
 
29156
      apr_addto_duplicate="0"
 
29157
      for j in $APRUTIL_LDFLAGS; do
 
29158
        if test "x$i" = "x$j"; then
 
29159
          apr_addto_duplicate="1"
 
29160
          break
 
29161
        fi
 
29162
      done
 
29163
      if test $apr_addto_duplicate = "0"; then
 
29164
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
29165
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
29166
      fi
 
29167
    done
 
29168
  fi
 
29169
 
 
29170
    apu_db_header=$bdb_header
 
29171
    apu_db_lib=$bdb_libname
 
29172
    apu_have_db=1
 
29173
    ;;
 
29174
  esac
 
29175
 
 
29176
  if test "$apu_have_db" = "1"; then
 
29177
    apu_db_version=3
 
29178
  fi
 
29179
 
 
29180
            if test "$apu_db_version" != "3"; then
 
29181
 
 
29182
  places="$all_places"
 
29183
  if test -z "$places"; then
 
29184
    places="std"
 
29185
  fi
 
29186
 
 
29187
  bdb_version=2
 
29188
  if test "-1" != "-1"; then
 
29189
    bdb_version="$bdb_version.-1"
 
29190
    if test "-1" != "-1"; then
 
29191
      bdb_version="$bdb_version.-1"
 
29192
    fi
 
29193
  fi
 
29194
  bdb_places="$places"
 
29195
  bdb_default_search_headers="db2/db.h db.h"
 
29196
  bdb_default_search_lib_names="db2 db"
 
29197
 
 
29198
 
 
29199
  apu_have_db=0
 
29200
 
 
29201
  # Save the original values of the flags we tweak.
 
29202
  apu_check_lib_save_libs="$LIBS"
 
29203
  apu_check_lib_save_ldflags="$LDFLAGS"
 
29204
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
29205
 
 
29206
  # The variable `found' is the prefix under which we've found
 
29207
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
29208
  found=not
 
29209
  for bdb_place in $bdb_places; do
 
29210
 
 
29211
    LDFLAGS="$apu_check_lib_save_ldflags"
 
29212
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
29213
    case "$bdb_place" in
 
29214
      "std" )
 
29215
        description="the standard places"
 
29216
      ;;
 
29217
      *":"* )
 
29218
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
29219
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
29220
        CPPFLAGS="$CPPFLAGS -I$header"
 
29221
        LDFLAGS="$LDFLAGS -L$lib"
 
29222
        description="$header and $lib"
 
29223
      ;;
 
29224
      * )
 
29225
        if test -d $bdb_place; then
 
29226
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
29227
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
29228
        else
 
29229
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
29230
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
29231
          echo "$as_me:$LINENO: result: directory not found" >&5
 
29232
echo "${ECHO_T}directory not found" >&6
 
29233
          continue
 
29234
        fi
 
29235
        description="$bdb_place"
 
29236
      ;;
 
29237
    esac
 
29238
 
 
29239
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
29240
    # trick to display a message instead.
 
29241
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
29242
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
29243
    echo "$as_me:$LINENO: result: " >&5
 
29244
echo "${ECHO_T}" >&6
 
29245
 
 
29246
    for bdb_libname in $bdb_default_search_lib_names; do
 
29247
      for bdb_header in $bdb_default_search_headers; do
 
29248
        # Clear the header cache variable for each location
 
29249
 
 
29250
        cache_id="`echo ac_cv_header_${bdb_header} \
 
29251
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
29252
 
 
29253
        unset $cache_id
 
29254
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
29255
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
29256
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
29257
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
29258
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
29259
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29260
fi
 
29261
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
29262
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
29263
else
 
29264
  # Is the header compilable?
 
29265
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
29266
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
29267
cat >conftest.$ac_ext <<_ACEOF
 
29268
/* confdefs.h.  */
 
29269
_ACEOF
 
29270
cat confdefs.h >>conftest.$ac_ext
 
29271
cat >>conftest.$ac_ext <<_ACEOF
 
29272
/* end confdefs.h.  */
 
29273
$ac_includes_default
 
29274
#include <$bdb_header>
 
29275
_ACEOF
 
29276
rm -f conftest.$ac_objext
 
29277
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
29278
  (eval $ac_compile) 2>conftest.er1
 
29279
  ac_status=$?
 
29280
  grep -v '^ *+' conftest.er1 >conftest.err
 
29281
  rm -f conftest.er1
 
29282
  cat conftest.err >&5
 
29283
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29284
  (exit $ac_status); } &&
 
29285
         { ac_try='test -z "$ac_c_werror_flag"
 
29286
                         || test ! -s conftest.err'
 
29287
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29288
  (eval $ac_try) 2>&5
 
29289
  ac_status=$?
 
29290
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29291
  (exit $ac_status); }; } &&
 
29292
         { ac_try='test -s conftest.$ac_objext'
 
29293
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29294
  (eval $ac_try) 2>&5
 
29295
  ac_status=$?
 
29296
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29297
  (exit $ac_status); }; }; then
 
29298
  ac_header_compiler=yes
 
29299
else
 
29300
  echo "$as_me: failed program was:" >&5
 
29301
sed 's/^/| /' conftest.$ac_ext >&5
 
29302
 
 
29303
ac_header_compiler=no
 
29304
fi
 
29305
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
29306
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
29307
echo "${ECHO_T}$ac_header_compiler" >&6
 
29308
 
 
29309
# Is the header present?
 
29310
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
29311
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
29312
cat >conftest.$ac_ext <<_ACEOF
 
29313
/* confdefs.h.  */
 
29314
_ACEOF
 
29315
cat confdefs.h >>conftest.$ac_ext
 
29316
cat >>conftest.$ac_ext <<_ACEOF
 
29317
/* end confdefs.h.  */
 
29318
#include <$bdb_header>
 
29319
_ACEOF
 
29320
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
29321
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
29322
  ac_status=$?
 
29323
  grep -v '^ *+' conftest.er1 >conftest.err
 
29324
  rm -f conftest.er1
 
29325
  cat conftest.err >&5
 
29326
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29327
  (exit $ac_status); } >/dev/null; then
 
29328
  if test -s conftest.err; then
 
29329
    ac_cpp_err=$ac_c_preproc_warn_flag
 
29330
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
29331
  else
 
29332
    ac_cpp_err=
 
29333
  fi
 
29334
else
 
29335
  ac_cpp_err=yes
 
29336
fi
 
29337
if test -z "$ac_cpp_err"; then
 
29338
  ac_header_preproc=yes
 
29339
else
 
29340
  echo "$as_me: failed program was:" >&5
 
29341
sed 's/^/| /' conftest.$ac_ext >&5
 
29342
 
 
29343
  ac_header_preproc=no
 
29344
fi
 
29345
rm -f conftest.err conftest.$ac_ext
 
29346
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
29347
echo "${ECHO_T}$ac_header_preproc" >&6
 
29348
 
 
29349
# So?  What about this header?
 
29350
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
29351
  yes:no: )
 
29352
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
29353
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
29354
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
29355
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
29356
    ac_header_preproc=yes
 
29357
    ;;
 
29358
  no:yes:* )
 
29359
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
29360
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
29361
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
29362
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
29363
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
29364
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
29365
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
29366
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
29367
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
29368
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
29369
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
29370
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
29371
    (
 
29372
      cat <<\_ASBOX
 
29373
## ------------------------------------------ ##
 
29374
## Report this to the AC_PACKAGE_NAME lists.  ##
 
29375
## ------------------------------------------ ##
 
29376
_ASBOX
 
29377
    ) |
 
29378
      sed "s/^/$as_me: WARNING:     /" >&2
 
29379
    ;;
 
29380
esac
 
29381
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
29382
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
29383
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
29384
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29385
else
 
29386
  eval "$as_ac_Header=\$ac_header_preproc"
 
29387
fi
 
29388
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
29389
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
29390
 
 
29391
fi
 
29392
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
29393
 
 
29394
          if test "2" = "3" -o "2" = "4"; then
 
29395
            # We generate a separate cache variable for each prefix and libname
 
29396
            # we search under.  That way, we avoid caching information that
 
29397
            # changes if the user runs `configure' with a different set of
 
29398
            # switches.
 
29399
 
 
29400
            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
29401
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
29402
 
 
29403
 
 
29404
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
29405
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
29406
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
29407
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29408
else
 
29409
 
 
29410
 
 
29411
    apu_try_berkeley_db_save_libs="$LIBS"
 
29412
 
 
29413
    apu_check_berkeley_db_major=2
 
29414
    apu_check_berkeley_db_minor=-1
 
29415
    apu_check_berkeley_db_patch=-1
 
29416
    apu_try_berkeley_db_header=$bdb_header
 
29417
    apu_try_berkeley_db_libname=$bdb_libname
 
29418
 
 
29419
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
29420
    if test "$cross_compiling" = yes; then
 
29421
  apu_try_berkeley_db=yes
 
29422
 
 
29423
else
 
29424
  cat >conftest.$ac_ext <<_ACEOF
 
29425
/* confdefs.h.  */
 
29426
_ACEOF
 
29427
cat confdefs.h >>conftest.$ac_ext
 
29428
cat >>conftest.$ac_ext <<_ACEOF
 
29429
/* end confdefs.h.  */
 
29430
 
 
29431
#include <stdio.h>
 
29432
#include <$apu_try_berkeley_db_header>
 
29433
main ()
 
29434
{
 
29435
  int major, minor, patch;
 
29436
 
 
29437
  db_version(&major, &minor, &patch);
 
29438
 
 
29439
  /* Sanity check: ensure that db.h constants actually match the db library */
 
29440
  if (major != DB_VERSION_MAJOR
 
29441
      || minor != DB_VERSION_MINOR
 
29442
      || patch != DB_VERSION_PATCH)
 
29443
    exit (1);
 
29444
 
 
29445
  /* Run-time check:  ensure the library claims to be the correct version. */
 
29446
 
 
29447
  if ($apu_check_berkeley_db_major != -1) {
 
29448
    if (major < $apu_check_berkeley_db_major)
 
29449
      exit (1);
 
29450
    if (major > $apu_check_berkeley_db_major)
 
29451
      exit (0);
 
29452
  }
 
29453
 
 
29454
  if ($apu_check_berkeley_db_minor != -1) {
 
29455
    if (minor < $apu_check_berkeley_db_minor)
 
29456
      exit (1);
 
29457
    if (minor > $apu_check_berkeley_db_minor)
 
29458
      exit (0);
 
29459
  }
 
29460
 
 
29461
  if ($apu_check_berkeley_db_patch == -1
 
29462
      || patch >= $apu_check_berkeley_db_patch)
 
29463
    exit (0);
 
29464
  else
 
29465
    exit (1);
 
29466
}
 
29467
 
 
29468
_ACEOF
 
29469
rm -f conftest$ac_exeext
 
29470
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
29471
  (eval $ac_link) 2>&5
 
29472
  ac_status=$?
 
29473
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29474
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
29475
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29476
  (eval $ac_try) 2>&5
 
29477
  ac_status=$?
 
29478
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29479
  (exit $ac_status); }; }; then
 
29480
  apu_try_berkeley_db=yes
 
29481
else
 
29482
  echo "$as_me: program exited with status $ac_status" >&5
 
29483
echo "$as_me: failed program was:" >&5
 
29484
sed 's/^/| /' conftest.$ac_ext >&5
 
29485
 
 
29486
( exit $ac_status )
 
29487
apu_try_berkeley_db=no
 
29488
fi
 
29489
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
29490
fi
 
29491
 
 
29492
    LIBS="$apu_try_berkeley_db_save_libs"
 
29493
 
 
29494
 
 
29495
                eval "$cache_id=$apu_try_berkeley_db"
 
29496
 
 
29497
fi
 
29498
 
 
29499
            result="`eval echo '$'$cache_id`"
 
29500
            echo "$as_me:$LINENO: result: $result" >&5
 
29501
echo "${ECHO_T}$result" >&6
 
29502
          elif test "2" = "1"; then
 
29503
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
29504
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
29505
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
29506
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
29507
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29508
else
 
29509
  ac_check_lib_save_LIBS=$LIBS
 
29510
LIBS="-l$bdb_libname  $LIBS"
 
29511
cat >conftest.$ac_ext <<_ACEOF
 
29512
/* confdefs.h.  */
 
29513
_ACEOF
 
29514
cat confdefs.h >>conftest.$ac_ext
 
29515
cat >>conftest.$ac_ext <<_ACEOF
 
29516
/* end confdefs.h.  */
 
29517
 
 
29518
/* Override any gcc2 internal prototype to avoid an error.  */
 
29519
#ifdef __cplusplus
 
29520
extern "C"
 
29521
#endif
 
29522
/* We use char because int might match the return type of a gcc2
 
29523
   builtin and then its argument prototype would still apply.  */
 
29524
char dbopen ();
 
29525
int
 
29526
main ()
 
29527
{
 
29528
dbopen ();
 
29529
  ;
 
29530
  return 0;
 
29531
}
 
29532
_ACEOF
 
29533
rm -f conftest.$ac_objext conftest$ac_exeext
 
29534
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
29535
  (eval $ac_link) 2>conftest.er1
 
29536
  ac_status=$?
 
29537
  grep -v '^ *+' conftest.er1 >conftest.err
 
29538
  rm -f conftest.er1
 
29539
  cat conftest.err >&5
 
29540
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29541
  (exit $ac_status); } &&
 
29542
         { ac_try='test -z "$ac_c_werror_flag"
 
29543
                         || test ! -s conftest.err'
 
29544
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29545
  (eval $ac_try) 2>&5
 
29546
  ac_status=$?
 
29547
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29548
  (exit $ac_status); }; } &&
 
29549
         { ac_try='test -s conftest$ac_exeext'
 
29550
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29551
  (eval $ac_try) 2>&5
 
29552
  ac_status=$?
 
29553
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29554
  (exit $ac_status); }; }; then
 
29555
  eval "$as_ac_Lib=yes"
 
29556
else
 
29557
  echo "$as_me: failed program was:" >&5
 
29558
sed 's/^/| /' conftest.$ac_ext >&5
 
29559
 
 
29560
eval "$as_ac_Lib=no"
 
29561
fi
 
29562
rm -f conftest.err conftest.$ac_objext \
 
29563
      conftest$ac_exeext conftest.$ac_ext
 
29564
LIBS=$ac_check_lib_save_LIBS
 
29565
fi
 
29566
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
29567
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
29568
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
29569
  result=yes
 
29570
else
 
29571
  result=no
 
29572
 
 
29573
fi
 
29574
 
 
29575
          elif test "2" = "2"; then
 
29576
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
29577
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
29578
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
29579
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
29580
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29581
else
 
29582
  ac_check_lib_save_LIBS=$LIBS
 
29583
LIBS="-l$bdb_libname  $LIBS"
 
29584
cat >conftest.$ac_ext <<_ACEOF
 
29585
/* confdefs.h.  */
 
29586
_ACEOF
 
29587
cat confdefs.h >>conftest.$ac_ext
 
29588
cat >>conftest.$ac_ext <<_ACEOF
 
29589
/* end confdefs.h.  */
 
29590
 
 
29591
/* Override any gcc2 internal prototype to avoid an error.  */
 
29592
#ifdef __cplusplus
 
29593
extern "C"
 
29594
#endif
 
29595
/* We use char because int might match the return type of a gcc2
 
29596
   builtin and then its argument prototype would still apply.  */
 
29597
char db_open ();
 
29598
int
 
29599
main ()
 
29600
{
 
29601
db_open ();
 
29602
  ;
 
29603
  return 0;
 
29604
}
 
29605
_ACEOF
 
29606
rm -f conftest.$ac_objext conftest$ac_exeext
 
29607
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
29608
  (eval $ac_link) 2>conftest.er1
 
29609
  ac_status=$?
 
29610
  grep -v '^ *+' conftest.er1 >conftest.err
 
29611
  rm -f conftest.er1
 
29612
  cat conftest.err >&5
 
29613
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29614
  (exit $ac_status); } &&
 
29615
         { ac_try='test -z "$ac_c_werror_flag"
 
29616
                         || test ! -s conftest.err'
 
29617
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29618
  (eval $ac_try) 2>&5
 
29619
  ac_status=$?
 
29620
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29621
  (exit $ac_status); }; } &&
 
29622
         { ac_try='test -s conftest$ac_exeext'
 
29623
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29624
  (eval $ac_try) 2>&5
 
29625
  ac_status=$?
 
29626
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29627
  (exit $ac_status); }; }; then
 
29628
  eval "$as_ac_Lib=yes"
 
29629
else
 
29630
  echo "$as_me: failed program was:" >&5
 
29631
sed 's/^/| /' conftest.$ac_ext >&5
 
29632
 
 
29633
eval "$as_ac_Lib=no"
 
29634
fi
 
29635
rm -f conftest.err conftest.$ac_objext \
 
29636
      conftest$ac_exeext conftest.$ac_ext
 
29637
LIBS=$ac_check_lib_save_LIBS
 
29638
fi
 
29639
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
29640
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
29641
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
29642
  result=yes
 
29643
else
 
29644
  result=no
 
29645
 
 
29646
fi
 
29647
 
 
29648
          fi
 
29649
 
 
29650
else
 
29651
  result="no"
 
29652
fi
 
29653
 
 
29654
 
 
29655
 
 
29656
        # If we found it, no need to search any more.
 
29657
        if test "$result" = "yes"; then
 
29658
          found="$bdb_place"
 
29659
          break
 
29660
        fi
 
29661
      done
 
29662
      test "$found" != "not" && break
 
29663
    done
 
29664
    test "$found" != "not" && break
 
29665
  done
 
29666
 
 
29667
  # Restore the original values of the flags we tweak.
 
29668
  LDFLAGS="$apu_check_lib_save_ldflags"
 
29669
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
29670
 
 
29671
  case "$found" in
 
29672
  "not")
 
29673
    apu_have_db=0
 
29674
    ;;
 
29675
  "std")
 
29676
    apu_db_header=$bdb_header
 
29677
    apu_db_lib=$bdb_libname
 
29678
    apu_have_db=1
 
29679
    ;;
 
29680
  *":"*)
 
29681
    header="`echo $found | sed -e 's/:.*$//'`"
 
29682
    lib="`echo $found | sed -e 's/^.*://'`"
 
29683
 
 
29684
 
 
29685
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
29686
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
29687
    APRUTIL_INCLUDES="-I$header"
 
29688
  else
 
29689
    apr_addto_bugger="-I$header"
 
29690
    for i in $apr_addto_bugger; do
 
29691
      apr_addto_duplicate="0"
 
29692
      for j in $APRUTIL_INCLUDES; do
 
29693
        if test "x$i" = "x$j"; then
 
29694
          apr_addto_duplicate="1"
 
29695
          break
 
29696
        fi
 
29697
      done
 
29698
      if test $apr_addto_duplicate = "0"; then
 
29699
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
29700
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
29701
      fi
 
29702
    done
 
29703
  fi
 
29704
 
 
29705
 
 
29706
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
29707
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
29708
    APRUTIL_LDFLAGS="-L$lib"
 
29709
  else
 
29710
    apr_addto_bugger="-L$lib"
 
29711
    for i in $apr_addto_bugger; do
 
29712
      apr_addto_duplicate="0"
 
29713
      for j in $APRUTIL_LDFLAGS; do
 
29714
        if test "x$i" = "x$j"; then
 
29715
          apr_addto_duplicate="1"
 
29716
          break
 
29717
        fi
 
29718
      done
 
29719
      if test $apr_addto_duplicate = "0"; then
 
29720
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
29721
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
29722
      fi
 
29723
    done
 
29724
  fi
 
29725
 
 
29726
    apu_db_header=$bdb_header
 
29727
    apu_db_lib=$bdb_libname
 
29728
    apu_have_db=1
 
29729
    ;;
 
29730
  *)
 
29731
 
 
29732
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
29733
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
29734
    APRUTIL_INCLUDES="-I$found/include"
 
29735
  else
 
29736
    apr_addto_bugger="-I$found/include"
 
29737
    for i in $apr_addto_bugger; do
 
29738
      apr_addto_duplicate="0"
 
29739
      for j in $APRUTIL_INCLUDES; do
 
29740
        if test "x$i" = "x$j"; then
 
29741
          apr_addto_duplicate="1"
 
29742
          break
 
29743
        fi
 
29744
      done
 
29745
      if test $apr_addto_duplicate = "0"; then
 
29746
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
29747
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
29748
      fi
 
29749
    done
 
29750
  fi
 
29751
 
 
29752
 
 
29753
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
29754
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
29755
    APRUTIL_LDFLAGS="-L$found/lib"
 
29756
  else
 
29757
    apr_addto_bugger="-L$found/lib"
 
29758
    for i in $apr_addto_bugger; do
 
29759
      apr_addto_duplicate="0"
 
29760
      for j in $APRUTIL_LDFLAGS; do
 
29761
        if test "x$i" = "x$j"; then
 
29762
          apr_addto_duplicate="1"
 
29763
          break
 
29764
        fi
 
29765
      done
 
29766
      if test $apr_addto_duplicate = "0"; then
 
29767
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
29768
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
29769
      fi
 
29770
    done
 
29771
  fi
 
29772
 
 
29773
    apu_db_header=$bdb_header
 
29774
    apu_db_lib=$bdb_libname
 
29775
    apu_have_db=1
 
29776
    ;;
 
29777
  esac
 
29778
 
 
29779
  if test "$apu_have_db" = "1"; then
 
29780
    apu_db_version=2
 
29781
  fi
 
29782
 
 
29783
              if test "$apu_db_version" != "2"; then
 
29784
 
 
29785
  places="$all_places"
 
29786
  if test -z "$places"; then
 
29787
    places="std"
 
29788
  fi
 
29789
 
 
29790
  bdb_version=1
 
29791
  if test "0" != "-1"; then
 
29792
    bdb_version="$bdb_version.0"
 
29793
    if test "0" != "-1"; then
 
29794
      bdb_version="$bdb_version.0"
 
29795
    fi
 
29796
  fi
 
29797
  bdb_places="$places"
 
29798
  bdb_default_search_headers="db1/db.h db.h"
 
29799
  bdb_default_search_lib_names="db1"
 
29800
 
 
29801
 
 
29802
  apu_have_db=0
 
29803
 
 
29804
  # Save the original values of the flags we tweak.
 
29805
  apu_check_lib_save_libs="$LIBS"
 
29806
  apu_check_lib_save_ldflags="$LDFLAGS"
 
29807
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
29808
 
 
29809
  # The variable `found' is the prefix under which we've found
 
29810
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
29811
  found=not
 
29812
  for bdb_place in $bdb_places; do
 
29813
 
 
29814
    LDFLAGS="$apu_check_lib_save_ldflags"
 
29815
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
29816
    case "$bdb_place" in
 
29817
      "std" )
 
29818
        description="the standard places"
 
29819
      ;;
 
29820
      *":"* )
 
29821
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
29822
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
29823
        CPPFLAGS="$CPPFLAGS -I$header"
 
29824
        LDFLAGS="$LDFLAGS -L$lib"
 
29825
        description="$header and $lib"
 
29826
      ;;
 
29827
      * )
 
29828
        if test -d $bdb_place; then
 
29829
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
29830
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
29831
        else
 
29832
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
29833
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
29834
          echo "$as_me:$LINENO: result: directory not found" >&5
 
29835
echo "${ECHO_T}directory not found" >&6
 
29836
          continue
 
29837
        fi
 
29838
        description="$bdb_place"
 
29839
      ;;
 
29840
    esac
 
29841
 
 
29842
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
29843
    # trick to display a message instead.
 
29844
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
29845
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
29846
    echo "$as_me:$LINENO: result: " >&5
 
29847
echo "${ECHO_T}" >&6
 
29848
 
 
29849
    for bdb_libname in $bdb_default_search_lib_names; do
 
29850
      for bdb_header in $bdb_default_search_headers; do
 
29851
        # Clear the header cache variable for each location
 
29852
 
 
29853
        cache_id="`echo ac_cv_header_${bdb_header} \
 
29854
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
29855
 
 
29856
        unset $cache_id
 
29857
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
29858
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
29859
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
29860
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
29861
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
29862
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29863
fi
 
29864
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
29865
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
29866
else
 
29867
  # Is the header compilable?
 
29868
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
29869
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
29870
cat >conftest.$ac_ext <<_ACEOF
 
29871
/* confdefs.h.  */
 
29872
_ACEOF
 
29873
cat confdefs.h >>conftest.$ac_ext
 
29874
cat >>conftest.$ac_ext <<_ACEOF
 
29875
/* end confdefs.h.  */
 
29876
$ac_includes_default
 
29877
#include <$bdb_header>
 
29878
_ACEOF
 
29879
rm -f conftest.$ac_objext
 
29880
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
29881
  (eval $ac_compile) 2>conftest.er1
 
29882
  ac_status=$?
 
29883
  grep -v '^ *+' conftest.er1 >conftest.err
 
29884
  rm -f conftest.er1
 
29885
  cat conftest.err >&5
 
29886
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29887
  (exit $ac_status); } &&
 
29888
         { ac_try='test -z "$ac_c_werror_flag"
 
29889
                         || test ! -s conftest.err'
 
29890
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29891
  (eval $ac_try) 2>&5
 
29892
  ac_status=$?
 
29893
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29894
  (exit $ac_status); }; } &&
 
29895
         { ac_try='test -s conftest.$ac_objext'
 
29896
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29897
  (eval $ac_try) 2>&5
 
29898
  ac_status=$?
 
29899
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29900
  (exit $ac_status); }; }; then
 
29901
  ac_header_compiler=yes
 
29902
else
 
29903
  echo "$as_me: failed program was:" >&5
 
29904
sed 's/^/| /' conftest.$ac_ext >&5
 
29905
 
 
29906
ac_header_compiler=no
 
29907
fi
 
29908
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
29909
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
29910
echo "${ECHO_T}$ac_header_compiler" >&6
 
29911
 
 
29912
# Is the header present?
 
29913
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
29914
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
29915
cat >conftest.$ac_ext <<_ACEOF
 
29916
/* confdefs.h.  */
 
29917
_ACEOF
 
29918
cat confdefs.h >>conftest.$ac_ext
 
29919
cat >>conftest.$ac_ext <<_ACEOF
 
29920
/* end confdefs.h.  */
 
29921
#include <$bdb_header>
 
29922
_ACEOF
 
29923
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
29924
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
29925
  ac_status=$?
 
29926
  grep -v '^ *+' conftest.er1 >conftest.err
 
29927
  rm -f conftest.er1
 
29928
  cat conftest.err >&5
 
29929
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29930
  (exit $ac_status); } >/dev/null; then
 
29931
  if test -s conftest.err; then
 
29932
    ac_cpp_err=$ac_c_preproc_warn_flag
 
29933
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
29934
  else
 
29935
    ac_cpp_err=
 
29936
  fi
 
29937
else
 
29938
  ac_cpp_err=yes
 
29939
fi
 
29940
if test -z "$ac_cpp_err"; then
 
29941
  ac_header_preproc=yes
 
29942
else
 
29943
  echo "$as_me: failed program was:" >&5
 
29944
sed 's/^/| /' conftest.$ac_ext >&5
 
29945
 
 
29946
  ac_header_preproc=no
 
29947
fi
 
29948
rm -f conftest.err conftest.$ac_ext
 
29949
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
29950
echo "${ECHO_T}$ac_header_preproc" >&6
 
29951
 
 
29952
# So?  What about this header?
 
29953
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
29954
  yes:no: )
 
29955
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
29956
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
29957
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
29958
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
29959
    ac_header_preproc=yes
 
29960
    ;;
 
29961
  no:yes:* )
 
29962
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
29963
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
29964
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
29965
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
29966
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
29967
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
29968
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
29969
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
29970
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
29971
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
29972
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
29973
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
29974
    (
 
29975
      cat <<\_ASBOX
 
29976
## ------------------------------------------ ##
 
29977
## Report this to the AC_PACKAGE_NAME lists.  ##
 
29978
## ------------------------------------------ ##
 
29979
_ASBOX
 
29980
    ) |
 
29981
      sed "s/^/$as_me: WARNING:     /" >&2
 
29982
    ;;
 
29983
esac
 
29984
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
29985
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
29986
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
29987
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29988
else
 
29989
  eval "$as_ac_Header=\$ac_header_preproc"
 
29990
fi
 
29991
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
29992
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
29993
 
 
29994
fi
 
29995
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
29996
 
 
29997
          if test "1" = "3" -o "1" = "4"; then
 
29998
            # We generate a separate cache variable for each prefix and libname
 
29999
            # we search under.  That way, we avoid caching information that
 
30000
            # changes if the user runs `configure' with a different set of
 
30001
            # switches.
 
30002
 
 
30003
            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
30004
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
30005
 
 
30006
 
 
30007
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
30008
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
30009
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
30010
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30011
else
 
30012
 
 
30013
 
 
30014
    apu_try_berkeley_db_save_libs="$LIBS"
 
30015
 
 
30016
    apu_check_berkeley_db_major=1
 
30017
    apu_check_berkeley_db_minor=0
 
30018
    apu_check_berkeley_db_patch=0
 
30019
    apu_try_berkeley_db_header=$bdb_header
 
30020
    apu_try_berkeley_db_libname=$bdb_libname
 
30021
 
 
30022
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
30023
    if test "$cross_compiling" = yes; then
 
30024
  apu_try_berkeley_db=yes
 
30025
 
 
30026
else
 
30027
  cat >conftest.$ac_ext <<_ACEOF
 
30028
/* confdefs.h.  */
 
30029
_ACEOF
 
30030
cat confdefs.h >>conftest.$ac_ext
 
30031
cat >>conftest.$ac_ext <<_ACEOF
 
30032
/* end confdefs.h.  */
 
30033
 
 
30034
#include <stdio.h>
 
30035
#include <$apu_try_berkeley_db_header>
 
30036
main ()
 
30037
{
 
30038
  int major, minor, patch;
 
30039
 
 
30040
  db_version(&major, &minor, &patch);
 
30041
 
 
30042
  /* Sanity check: ensure that db.h constants actually match the db library */
 
30043
  if (major != DB_VERSION_MAJOR
 
30044
      || minor != DB_VERSION_MINOR
 
30045
      || patch != DB_VERSION_PATCH)
 
30046
    exit (1);
 
30047
 
 
30048
  /* Run-time check:  ensure the library claims to be the correct version. */
 
30049
 
 
30050
  if ($apu_check_berkeley_db_major != -1) {
 
30051
    if (major < $apu_check_berkeley_db_major)
 
30052
      exit (1);
 
30053
    if (major > $apu_check_berkeley_db_major)
 
30054
      exit (0);
 
30055
  }
 
30056
 
 
30057
  if ($apu_check_berkeley_db_minor != -1) {
 
30058
    if (minor < $apu_check_berkeley_db_minor)
 
30059
      exit (1);
 
30060
    if (minor > $apu_check_berkeley_db_minor)
 
30061
      exit (0);
 
30062
  }
 
30063
 
 
30064
  if ($apu_check_berkeley_db_patch == -1
 
30065
      || patch >= $apu_check_berkeley_db_patch)
 
30066
    exit (0);
 
30067
  else
 
30068
    exit (1);
 
30069
}
 
30070
 
 
30071
_ACEOF
 
30072
rm -f conftest$ac_exeext
 
30073
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
30074
  (eval $ac_link) 2>&5
 
30075
  ac_status=$?
 
30076
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30077
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
30078
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30079
  (eval $ac_try) 2>&5
 
30080
  ac_status=$?
 
30081
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30082
  (exit $ac_status); }; }; then
 
30083
  apu_try_berkeley_db=yes
 
30084
else
 
30085
  echo "$as_me: program exited with status $ac_status" >&5
 
30086
echo "$as_me: failed program was:" >&5
 
30087
sed 's/^/| /' conftest.$ac_ext >&5
 
30088
 
 
30089
( exit $ac_status )
 
30090
apu_try_berkeley_db=no
 
30091
fi
 
30092
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
30093
fi
 
30094
 
 
30095
    LIBS="$apu_try_berkeley_db_save_libs"
 
30096
 
 
30097
 
 
30098
                eval "$cache_id=$apu_try_berkeley_db"
 
30099
 
 
30100
fi
 
30101
 
 
30102
            result="`eval echo '$'$cache_id`"
 
30103
            echo "$as_me:$LINENO: result: $result" >&5
 
30104
echo "${ECHO_T}$result" >&6
 
30105
          elif test "1" = "1"; then
 
30106
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
30107
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
30108
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
30109
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
30110
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30111
else
 
30112
  ac_check_lib_save_LIBS=$LIBS
 
30113
LIBS="-l$bdb_libname  $LIBS"
 
30114
cat >conftest.$ac_ext <<_ACEOF
 
30115
/* confdefs.h.  */
 
30116
_ACEOF
 
30117
cat confdefs.h >>conftest.$ac_ext
 
30118
cat >>conftest.$ac_ext <<_ACEOF
 
30119
/* end confdefs.h.  */
 
30120
 
 
30121
/* Override any gcc2 internal prototype to avoid an error.  */
 
30122
#ifdef __cplusplus
 
30123
extern "C"
 
30124
#endif
 
30125
/* We use char because int might match the return type of a gcc2
 
30126
   builtin and then its argument prototype would still apply.  */
 
30127
char dbopen ();
 
30128
int
 
30129
main ()
 
30130
{
 
30131
dbopen ();
 
30132
  ;
 
30133
  return 0;
 
30134
}
 
30135
_ACEOF
 
30136
rm -f conftest.$ac_objext conftest$ac_exeext
 
30137
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
30138
  (eval $ac_link) 2>conftest.er1
 
30139
  ac_status=$?
 
30140
  grep -v '^ *+' conftest.er1 >conftest.err
 
30141
  rm -f conftest.er1
 
30142
  cat conftest.err >&5
 
30143
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30144
  (exit $ac_status); } &&
 
30145
         { ac_try='test -z "$ac_c_werror_flag"
 
30146
                         || test ! -s conftest.err'
 
30147
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30148
  (eval $ac_try) 2>&5
 
30149
  ac_status=$?
 
30150
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30151
  (exit $ac_status); }; } &&
 
30152
         { ac_try='test -s conftest$ac_exeext'
 
30153
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30154
  (eval $ac_try) 2>&5
 
30155
  ac_status=$?
 
30156
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30157
  (exit $ac_status); }; }; then
 
30158
  eval "$as_ac_Lib=yes"
 
30159
else
 
30160
  echo "$as_me: failed program was:" >&5
 
30161
sed 's/^/| /' conftest.$ac_ext >&5
 
30162
 
 
30163
eval "$as_ac_Lib=no"
 
30164
fi
 
30165
rm -f conftest.err conftest.$ac_objext \
 
30166
      conftest$ac_exeext conftest.$ac_ext
 
30167
LIBS=$ac_check_lib_save_LIBS
 
30168
fi
 
30169
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
30170
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
30171
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
30172
  result=yes
 
30173
else
 
30174
  result=no
 
30175
 
 
30176
fi
 
30177
 
 
30178
          elif test "1" = "2"; then
 
30179
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
30180
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
30181
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
30182
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
30183
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30184
else
 
30185
  ac_check_lib_save_LIBS=$LIBS
 
30186
LIBS="-l$bdb_libname  $LIBS"
 
30187
cat >conftest.$ac_ext <<_ACEOF
 
30188
/* confdefs.h.  */
 
30189
_ACEOF
 
30190
cat confdefs.h >>conftest.$ac_ext
 
30191
cat >>conftest.$ac_ext <<_ACEOF
 
30192
/* end confdefs.h.  */
 
30193
 
 
30194
/* Override any gcc2 internal prototype to avoid an error.  */
 
30195
#ifdef __cplusplus
 
30196
extern "C"
 
30197
#endif
 
30198
/* We use char because int might match the return type of a gcc2
 
30199
   builtin and then its argument prototype would still apply.  */
 
30200
char db_open ();
 
30201
int
 
30202
main ()
 
30203
{
 
30204
db_open ();
 
30205
  ;
 
30206
  return 0;
 
30207
}
 
30208
_ACEOF
 
30209
rm -f conftest.$ac_objext conftest$ac_exeext
 
30210
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
30211
  (eval $ac_link) 2>conftest.er1
 
30212
  ac_status=$?
 
30213
  grep -v '^ *+' conftest.er1 >conftest.err
 
30214
  rm -f conftest.er1
 
30215
  cat conftest.err >&5
 
30216
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30217
  (exit $ac_status); } &&
 
30218
         { ac_try='test -z "$ac_c_werror_flag"
 
30219
                         || test ! -s conftest.err'
 
30220
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30221
  (eval $ac_try) 2>&5
 
30222
  ac_status=$?
 
30223
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30224
  (exit $ac_status); }; } &&
 
30225
         { ac_try='test -s conftest$ac_exeext'
 
30226
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30227
  (eval $ac_try) 2>&5
 
30228
  ac_status=$?
 
30229
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30230
  (exit $ac_status); }; }; then
 
30231
  eval "$as_ac_Lib=yes"
 
30232
else
 
30233
  echo "$as_me: failed program was:" >&5
 
30234
sed 's/^/| /' conftest.$ac_ext >&5
 
30235
 
 
30236
eval "$as_ac_Lib=no"
 
30237
fi
 
30238
rm -f conftest.err conftest.$ac_objext \
 
30239
      conftest$ac_exeext conftest.$ac_ext
 
30240
LIBS=$ac_check_lib_save_LIBS
 
30241
fi
 
30242
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
30243
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
30244
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
30245
  result=yes
 
30246
else
 
30247
  result=no
 
30248
 
 
30249
fi
 
30250
 
 
30251
          fi
 
30252
 
 
30253
else
 
30254
  result="no"
 
30255
fi
 
30256
 
 
30257
 
 
30258
 
 
30259
        # If we found it, no need to search any more.
 
30260
        if test "$result" = "yes"; then
 
30261
          found="$bdb_place"
 
30262
          break
 
30263
        fi
 
30264
      done
 
30265
      test "$found" != "not" && break
 
30266
    done
 
30267
    test "$found" != "not" && break
 
30268
  done
 
30269
 
 
30270
  # Restore the original values of the flags we tweak.
 
30271
  LDFLAGS="$apu_check_lib_save_ldflags"
 
30272
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
30273
 
 
30274
  case "$found" in
 
30275
  "not")
 
30276
    apu_have_db=0
 
30277
    ;;
 
30278
  "std")
 
30279
    apu_db_header=$bdb_header
 
30280
    apu_db_lib=$bdb_libname
 
30281
    apu_have_db=1
 
30282
    ;;
 
30283
  *":"*)
 
30284
    header="`echo $found | sed -e 's/:.*$//'`"
 
30285
    lib="`echo $found | sed -e 's/^.*://'`"
 
30286
 
 
30287
 
 
30288
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
30289
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
30290
    APRUTIL_INCLUDES="-I$header"
 
30291
  else
 
30292
    apr_addto_bugger="-I$header"
 
30293
    for i in $apr_addto_bugger; do
 
30294
      apr_addto_duplicate="0"
 
30295
      for j in $APRUTIL_INCLUDES; do
 
30296
        if test "x$i" = "x$j"; then
 
30297
          apr_addto_duplicate="1"
 
30298
          break
 
30299
        fi
 
30300
      done
 
30301
      if test $apr_addto_duplicate = "0"; then
 
30302
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
30303
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
30304
      fi
 
30305
    done
 
30306
  fi
 
30307
 
 
30308
 
 
30309
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
30310
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
30311
    APRUTIL_LDFLAGS="-L$lib"
 
30312
  else
 
30313
    apr_addto_bugger="-L$lib"
 
30314
    for i in $apr_addto_bugger; do
 
30315
      apr_addto_duplicate="0"
 
30316
      for j in $APRUTIL_LDFLAGS; do
 
30317
        if test "x$i" = "x$j"; then
 
30318
          apr_addto_duplicate="1"
 
30319
          break
 
30320
        fi
 
30321
      done
 
30322
      if test $apr_addto_duplicate = "0"; then
 
30323
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
30324
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
30325
      fi
 
30326
    done
 
30327
  fi
 
30328
 
 
30329
    apu_db_header=$bdb_header
 
30330
    apu_db_lib=$bdb_libname
 
30331
    apu_have_db=1
 
30332
    ;;
 
30333
  *)
 
30334
 
 
30335
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
30336
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
30337
    APRUTIL_INCLUDES="-I$found/include"
 
30338
  else
 
30339
    apr_addto_bugger="-I$found/include"
 
30340
    for i in $apr_addto_bugger; do
 
30341
      apr_addto_duplicate="0"
 
30342
      for j in $APRUTIL_INCLUDES; do
 
30343
        if test "x$i" = "x$j"; then
 
30344
          apr_addto_duplicate="1"
 
30345
          break
 
30346
        fi
 
30347
      done
 
30348
      if test $apr_addto_duplicate = "0"; then
 
30349
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
30350
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
30351
      fi
 
30352
    done
 
30353
  fi
 
30354
 
 
30355
 
 
30356
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
30357
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
30358
    APRUTIL_LDFLAGS="-L$found/lib"
 
30359
  else
 
30360
    apr_addto_bugger="-L$found/lib"
 
30361
    for i in $apr_addto_bugger; do
 
30362
      apr_addto_duplicate="0"
 
30363
      for j in $APRUTIL_LDFLAGS; do
 
30364
        if test "x$i" = "x$j"; then
 
30365
          apr_addto_duplicate="1"
 
30366
          break
 
30367
        fi
 
30368
      done
 
30369
      if test $apr_addto_duplicate = "0"; then
 
30370
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
30371
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
30372
      fi
 
30373
    done
 
30374
  fi
 
30375
 
 
30376
    apu_db_header=$bdb_header
 
30377
    apu_db_lib=$bdb_libname
 
30378
    apu_have_db=1
 
30379
    ;;
 
30380
  esac
 
30381
 
 
30382
  if test "$apu_have_db" = "1"; then
 
30383
    apu_db_version=1
 
30384
  fi
 
30385
 
 
30386
                if test "$apu_db_version" != "1"; then
 
30387
 
 
30388
  places="$all_places"
 
30389
  if test -z "$places"; then
 
30390
    places="std"
 
30391
  fi
 
30392
 
 
30393
  bdb_version=1
 
30394
  if test "-1" != "-1"; then
 
30395
    bdb_version="$bdb_version.-1"
 
30396
    if test "-1" != "-1"; then
 
30397
      bdb_version="$bdb_version.-1"
 
30398
    fi
 
30399
  fi
 
30400
  bdb_places="$places"
 
30401
  bdb_default_search_headers="db_185.h"
 
30402
  bdb_default_search_lib_names="db"
 
30403
 
 
30404
 
 
30405
  apu_have_db=0
 
30406
 
 
30407
  # Save the original values of the flags we tweak.
 
30408
  apu_check_lib_save_libs="$LIBS"
 
30409
  apu_check_lib_save_ldflags="$LDFLAGS"
 
30410
  apu_check_lib_save_cppflags="$CPPFLAGS"
 
30411
 
 
30412
  # The variable `found' is the prefix under which we've found
 
30413
  # Berkeley DB, or `not' if we haven't found it anywhere yet.
 
30414
  found=not
 
30415
  for bdb_place in $bdb_places; do
 
30416
 
 
30417
    LDFLAGS="$apu_check_lib_save_ldflags"
 
30418
    CPPFLAGS="$apu_check_lib_save_cppflags"
 
30419
    case "$bdb_place" in
 
30420
      "std" )
 
30421
        description="the standard places"
 
30422
      ;;
 
30423
      *":"* )
 
30424
        header="`echo $bdb_place | sed -e 's/:.*$//'`"
 
30425
        lib="`echo $bdb_place | sed -e 's/^.*://'`"
 
30426
        CPPFLAGS="$CPPFLAGS -I$header"
 
30427
        LDFLAGS="$LDFLAGS -L$lib"
 
30428
        description="$header and $lib"
 
30429
      ;;
 
30430
      * )
 
30431
        if test -d $bdb_place; then
 
30432
          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
 
30433
          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
 
30434
        else
 
30435
          echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $bdb_place" >&5
 
30436
echo $ECHO_N "checking for Berkeley DB $bdb_version in $bdb_place... $ECHO_C" >&6
 
30437
          echo "$as_me:$LINENO: result: directory not found" >&5
 
30438
echo "${ECHO_T}directory not found" >&6
 
30439
          continue
 
30440
        fi
 
30441
        description="$bdb_place"
 
30442
      ;;
 
30443
    esac
 
30444
 
 
30445
    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
 
30446
    # trick to display a message instead.
 
30447
    echo "$as_me:$LINENO: checking for Berkeley DB $bdb_version in $description" >&5
 
30448
echo $ECHO_N "checking for Berkeley DB $bdb_version in $description... $ECHO_C" >&6
 
30449
    echo "$as_me:$LINENO: result: " >&5
 
30450
echo "${ECHO_T}" >&6
 
30451
 
 
30452
    for bdb_libname in $bdb_default_search_lib_names; do
 
30453
      for bdb_header in $bdb_default_search_headers; do
 
30454
        # Clear the header cache variable for each location
 
30455
 
 
30456
        cache_id="`echo ac_cv_header_${bdb_header} \
 
30457
                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
30458
 
 
30459
        unset $cache_id
 
30460
        as_ac_Header=`echo "ac_cv_header_$bdb_header" | $as_tr_sh`
 
30461
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
30462
  echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
30463
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
30464
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
30465
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30466
fi
 
30467
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
30468
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
30469
else
 
30470
  # Is the header compilable?
 
30471
echo "$as_me:$LINENO: checking $bdb_header usability" >&5
 
30472
echo $ECHO_N "checking $bdb_header usability... $ECHO_C" >&6
 
30473
cat >conftest.$ac_ext <<_ACEOF
 
30474
/* confdefs.h.  */
 
30475
_ACEOF
 
30476
cat confdefs.h >>conftest.$ac_ext
 
30477
cat >>conftest.$ac_ext <<_ACEOF
 
30478
/* end confdefs.h.  */
 
30479
$ac_includes_default
 
30480
#include <$bdb_header>
 
30481
_ACEOF
 
30482
rm -f conftest.$ac_objext
 
30483
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
30484
  (eval $ac_compile) 2>conftest.er1
 
30485
  ac_status=$?
 
30486
  grep -v '^ *+' conftest.er1 >conftest.err
 
30487
  rm -f conftest.er1
 
30488
  cat conftest.err >&5
 
30489
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30490
  (exit $ac_status); } &&
 
30491
         { ac_try='test -z "$ac_c_werror_flag"
 
30492
                         || test ! -s conftest.err'
 
30493
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30494
  (eval $ac_try) 2>&5
 
30495
  ac_status=$?
 
30496
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30497
  (exit $ac_status); }; } &&
 
30498
         { ac_try='test -s conftest.$ac_objext'
 
30499
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30500
  (eval $ac_try) 2>&5
 
30501
  ac_status=$?
 
30502
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30503
  (exit $ac_status); }; }; then
 
30504
  ac_header_compiler=yes
 
30505
else
 
30506
  echo "$as_me: failed program was:" >&5
 
30507
sed 's/^/| /' conftest.$ac_ext >&5
 
30508
 
 
30509
ac_header_compiler=no
 
30510
fi
 
30511
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
30512
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
30513
echo "${ECHO_T}$ac_header_compiler" >&6
 
30514
 
 
30515
# Is the header present?
 
30516
echo "$as_me:$LINENO: checking $bdb_header presence" >&5
 
30517
echo $ECHO_N "checking $bdb_header presence... $ECHO_C" >&6
 
30518
cat >conftest.$ac_ext <<_ACEOF
 
30519
/* confdefs.h.  */
 
30520
_ACEOF
 
30521
cat confdefs.h >>conftest.$ac_ext
 
30522
cat >>conftest.$ac_ext <<_ACEOF
 
30523
/* end confdefs.h.  */
 
30524
#include <$bdb_header>
 
30525
_ACEOF
 
30526
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
30527
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
30528
  ac_status=$?
 
30529
  grep -v '^ *+' conftest.er1 >conftest.err
 
30530
  rm -f conftest.er1
 
30531
  cat conftest.err >&5
 
30532
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30533
  (exit $ac_status); } >/dev/null; then
 
30534
  if test -s conftest.err; then
 
30535
    ac_cpp_err=$ac_c_preproc_warn_flag
 
30536
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
30537
  else
 
30538
    ac_cpp_err=
 
30539
  fi
 
30540
else
 
30541
  ac_cpp_err=yes
 
30542
fi
 
30543
if test -z "$ac_cpp_err"; then
 
30544
  ac_header_preproc=yes
 
30545
else
 
30546
  echo "$as_me: failed program was:" >&5
 
30547
sed 's/^/| /' conftest.$ac_ext >&5
 
30548
 
 
30549
  ac_header_preproc=no
 
30550
fi
 
30551
rm -f conftest.err conftest.$ac_ext
 
30552
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
30553
echo "${ECHO_T}$ac_header_preproc" >&6
 
30554
 
 
30555
# So?  What about this header?
 
30556
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
30557
  yes:no: )
 
30558
    { echo "$as_me:$LINENO: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
30559
echo "$as_me: WARNING: $bdb_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
30560
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the compiler's result" >&5
 
30561
echo "$as_me: WARNING: $bdb_header: proceeding with the compiler's result" >&2;}
 
30562
    ac_header_preproc=yes
 
30563
    ;;
 
30564
  no:yes:* )
 
30565
    { echo "$as_me:$LINENO: WARNING: $bdb_header: present but cannot be compiled" >&5
 
30566
echo "$as_me: WARNING: $bdb_header: present but cannot be compiled" >&2;}
 
30567
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     check for missing prerequisite headers?" >&5
 
30568
echo "$as_me: WARNING: $bdb_header:     check for missing prerequisite headers?" >&2;}
 
30569
    { echo "$as_me:$LINENO: WARNING: $bdb_header: see the Autoconf documentation" >&5
 
30570
echo "$as_me: WARNING: $bdb_header: see the Autoconf documentation" >&2;}
 
30571
    { echo "$as_me:$LINENO: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&5
 
30572
echo "$as_me: WARNING: $bdb_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
30573
    { echo "$as_me:$LINENO: WARNING: $bdb_header: proceeding with the preprocessor's result" >&5
 
30574
echo "$as_me: WARNING: $bdb_header: proceeding with the preprocessor's result" >&2;}
 
30575
    { echo "$as_me:$LINENO: WARNING: $bdb_header: in the future, the compiler will take precedence" >&5
 
30576
echo "$as_me: WARNING: $bdb_header: in the future, the compiler will take precedence" >&2;}
 
30577
    (
 
30578
      cat <<\_ASBOX
 
30579
## ------------------------------------------ ##
 
30580
## Report this to the AC_PACKAGE_NAME lists.  ##
 
30581
## ------------------------------------------ ##
 
30582
_ASBOX
 
30583
    ) |
 
30584
      sed "s/^/$as_me: WARNING:     /" >&2
 
30585
    ;;
 
30586
esac
 
30587
echo "$as_me:$LINENO: checking for $bdb_header" >&5
 
30588
echo $ECHO_N "checking for $bdb_header... $ECHO_C" >&6
 
30589
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
30590
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30591
else
 
30592
  eval "$as_ac_Header=\$ac_header_preproc"
 
30593
fi
 
30594
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
30595
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
30596
 
 
30597
fi
 
30598
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
30599
 
 
30600
          if test "1" = "3" -o "1" = "4"; then
 
30601
            # We generate a separate cache variable for each prefix and libname
 
30602
            # we search under.  That way, we avoid caching information that
 
30603
            # changes if the user runs `configure' with a different set of
 
30604
            # switches.
 
30605
 
 
30606
            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
 
30607
                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
 
30608
 
 
30609
 
 
30610
            echo "$as_me:$LINENO: checking for -l$bdb_libname" >&5
 
30611
echo $ECHO_N "checking for -l$bdb_libname... $ECHO_C" >&6
 
30612
                                    if eval "test \"\${$cache_id+set}\" = set"; then
 
30613
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30614
else
 
30615
 
 
30616
 
 
30617
    apu_try_berkeley_db_save_libs="$LIBS"
 
30618
 
 
30619
    apu_check_berkeley_db_major=1
 
30620
    apu_check_berkeley_db_minor=-1
 
30621
    apu_check_berkeley_db_patch=-1
 
30622
    apu_try_berkeley_db_header=$bdb_header
 
30623
    apu_try_berkeley_db_libname=$bdb_libname
 
30624
 
 
30625
    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
 
30626
    if test "$cross_compiling" = yes; then
 
30627
  apu_try_berkeley_db=yes
 
30628
 
 
30629
else
 
30630
  cat >conftest.$ac_ext <<_ACEOF
 
30631
/* confdefs.h.  */
 
30632
_ACEOF
 
30633
cat confdefs.h >>conftest.$ac_ext
 
30634
cat >>conftest.$ac_ext <<_ACEOF
 
30635
/* end confdefs.h.  */
 
30636
 
 
30637
#include <stdio.h>
 
30638
#include <$apu_try_berkeley_db_header>
 
30639
main ()
 
30640
{
 
30641
  int major, minor, patch;
 
30642
 
 
30643
  db_version(&major, &minor, &patch);
 
30644
 
 
30645
  /* Sanity check: ensure that db.h constants actually match the db library */
 
30646
  if (major != DB_VERSION_MAJOR
 
30647
      || minor != DB_VERSION_MINOR
 
30648
      || patch != DB_VERSION_PATCH)
 
30649
    exit (1);
 
30650
 
 
30651
  /* Run-time check:  ensure the library claims to be the correct version. */
 
30652
 
 
30653
  if ($apu_check_berkeley_db_major != -1) {
 
30654
    if (major < $apu_check_berkeley_db_major)
 
30655
      exit (1);
 
30656
    if (major > $apu_check_berkeley_db_major)
 
30657
      exit (0);
 
30658
  }
 
30659
 
 
30660
  if ($apu_check_berkeley_db_minor != -1) {
 
30661
    if (minor < $apu_check_berkeley_db_minor)
 
30662
      exit (1);
 
30663
    if (minor > $apu_check_berkeley_db_minor)
 
30664
      exit (0);
 
30665
  }
 
30666
 
 
30667
  if ($apu_check_berkeley_db_patch == -1
 
30668
      || patch >= $apu_check_berkeley_db_patch)
 
30669
    exit (0);
 
30670
  else
 
30671
    exit (1);
 
30672
}
 
30673
 
 
30674
_ACEOF
 
30675
rm -f conftest$ac_exeext
 
30676
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
30677
  (eval $ac_link) 2>&5
 
30678
  ac_status=$?
 
30679
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30680
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
30681
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30682
  (eval $ac_try) 2>&5
 
30683
  ac_status=$?
 
30684
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30685
  (exit $ac_status); }; }; then
 
30686
  apu_try_berkeley_db=yes
 
30687
else
 
30688
  echo "$as_me: program exited with status $ac_status" >&5
 
30689
echo "$as_me: failed program was:" >&5
 
30690
sed 's/^/| /' conftest.$ac_ext >&5
 
30691
 
 
30692
( exit $ac_status )
 
30693
apu_try_berkeley_db=no
 
30694
fi
 
30695
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
30696
fi
 
30697
 
 
30698
    LIBS="$apu_try_berkeley_db_save_libs"
 
30699
 
 
30700
 
 
30701
                eval "$cache_id=$apu_try_berkeley_db"
 
30702
 
 
30703
fi
 
30704
 
 
30705
            result="`eval echo '$'$cache_id`"
 
30706
            echo "$as_me:$LINENO: result: $result" >&5
 
30707
echo "${ECHO_T}$result" >&6
 
30708
          elif test "1" = "1"; then
 
30709
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
 
30710
echo "$as_me:$LINENO: checking for dbopen in -l$bdb_libname" >&5
 
30711
echo $ECHO_N "checking for dbopen in -l$bdb_libname... $ECHO_C" >&6
 
30712
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
30713
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30714
else
 
30715
  ac_check_lib_save_LIBS=$LIBS
 
30716
LIBS="-l$bdb_libname  $LIBS"
 
30717
cat >conftest.$ac_ext <<_ACEOF
 
30718
/* confdefs.h.  */
 
30719
_ACEOF
 
30720
cat confdefs.h >>conftest.$ac_ext
 
30721
cat >>conftest.$ac_ext <<_ACEOF
 
30722
/* end confdefs.h.  */
 
30723
 
 
30724
/* Override any gcc2 internal prototype to avoid an error.  */
 
30725
#ifdef __cplusplus
 
30726
extern "C"
 
30727
#endif
 
30728
/* We use char because int might match the return type of a gcc2
 
30729
   builtin and then its argument prototype would still apply.  */
 
30730
char dbopen ();
 
30731
int
 
30732
main ()
 
30733
{
 
30734
dbopen ();
 
30735
  ;
 
30736
  return 0;
 
30737
}
 
30738
_ACEOF
 
30739
rm -f conftest.$ac_objext conftest$ac_exeext
 
30740
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
30741
  (eval $ac_link) 2>conftest.er1
 
30742
  ac_status=$?
 
30743
  grep -v '^ *+' conftest.er1 >conftest.err
 
30744
  rm -f conftest.er1
 
30745
  cat conftest.err >&5
 
30746
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30747
  (exit $ac_status); } &&
 
30748
         { ac_try='test -z "$ac_c_werror_flag"
 
30749
                         || test ! -s conftest.err'
 
30750
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30751
  (eval $ac_try) 2>&5
 
30752
  ac_status=$?
 
30753
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30754
  (exit $ac_status); }; } &&
 
30755
         { ac_try='test -s conftest$ac_exeext'
 
30756
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30757
  (eval $ac_try) 2>&5
 
30758
  ac_status=$?
 
30759
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30760
  (exit $ac_status); }; }; then
 
30761
  eval "$as_ac_Lib=yes"
 
30762
else
 
30763
  echo "$as_me: failed program was:" >&5
 
30764
sed 's/^/| /' conftest.$ac_ext >&5
 
30765
 
 
30766
eval "$as_ac_Lib=no"
 
30767
fi
 
30768
rm -f conftest.err conftest.$ac_objext \
 
30769
      conftest$ac_exeext conftest.$ac_ext
 
30770
LIBS=$ac_check_lib_save_LIBS
 
30771
fi
 
30772
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
30773
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
30774
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
30775
  result=yes
 
30776
else
 
30777
  result=no
 
30778
 
 
30779
fi
 
30780
 
 
30781
          elif test "1" = "2"; then
 
30782
            as_ac_Lib=`echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
 
30783
echo "$as_me:$LINENO: checking for db_open in -l$bdb_libname" >&5
 
30784
echo $ECHO_N "checking for db_open in -l$bdb_libname... $ECHO_C" >&6
 
30785
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
 
30786
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
30787
else
 
30788
  ac_check_lib_save_LIBS=$LIBS
 
30789
LIBS="-l$bdb_libname  $LIBS"
 
30790
cat >conftest.$ac_ext <<_ACEOF
 
30791
/* confdefs.h.  */
 
30792
_ACEOF
 
30793
cat confdefs.h >>conftest.$ac_ext
 
30794
cat >>conftest.$ac_ext <<_ACEOF
 
30795
/* end confdefs.h.  */
 
30796
 
 
30797
/* Override any gcc2 internal prototype to avoid an error.  */
 
30798
#ifdef __cplusplus
 
30799
extern "C"
 
30800
#endif
 
30801
/* We use char because int might match the return type of a gcc2
 
30802
   builtin and then its argument prototype would still apply.  */
 
30803
char db_open ();
 
30804
int
 
30805
main ()
 
30806
{
 
30807
db_open ();
 
30808
  ;
 
30809
  return 0;
 
30810
}
 
30811
_ACEOF
 
30812
rm -f conftest.$ac_objext conftest$ac_exeext
 
30813
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
30814
  (eval $ac_link) 2>conftest.er1
 
30815
  ac_status=$?
 
30816
  grep -v '^ *+' conftest.er1 >conftest.err
 
30817
  rm -f conftest.er1
 
30818
  cat conftest.err >&5
 
30819
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30820
  (exit $ac_status); } &&
 
30821
         { ac_try='test -z "$ac_c_werror_flag"
 
30822
                         || test ! -s conftest.err'
 
30823
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30824
  (eval $ac_try) 2>&5
 
30825
  ac_status=$?
 
30826
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30827
  (exit $ac_status); }; } &&
 
30828
         { ac_try='test -s conftest$ac_exeext'
 
30829
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
30830
  (eval $ac_try) 2>&5
 
30831
  ac_status=$?
 
30832
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
30833
  (exit $ac_status); }; }; then
 
30834
  eval "$as_ac_Lib=yes"
 
30835
else
 
30836
  echo "$as_me: failed program was:" >&5
 
30837
sed 's/^/| /' conftest.$ac_ext >&5
 
30838
 
 
30839
eval "$as_ac_Lib=no"
 
30840
fi
 
30841
rm -f conftest.err conftest.$ac_objext \
 
30842
      conftest$ac_exeext conftest.$ac_ext
 
30843
LIBS=$ac_check_lib_save_LIBS
 
30844
fi
 
30845
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 
30846
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 
30847
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
 
30848
  result=yes
 
30849
else
 
30850
  result=no
 
30851
 
 
30852
fi
 
30853
 
 
30854
          fi
 
30855
 
 
30856
else
 
30857
  result="no"
 
30858
fi
 
30859
 
 
30860
 
 
30861
 
 
30862
        # If we found it, no need to search any more.
 
30863
        if test "$result" = "yes"; then
 
30864
          found="$bdb_place"
 
30865
          break
 
30866
        fi
 
30867
      done
 
30868
      test "$found" != "not" && break
 
30869
    done
 
30870
    test "$found" != "not" && break
 
30871
  done
 
30872
 
 
30873
  # Restore the original values of the flags we tweak.
 
30874
  LDFLAGS="$apu_check_lib_save_ldflags"
 
30875
  CPPFLAGS="$apu_check_lib_save_cppflags"
 
30876
 
 
30877
  case "$found" in
 
30878
  "not")
 
30879
    apu_have_db=0
 
30880
    ;;
 
30881
  "std")
 
30882
    apu_db_header=$bdb_header
 
30883
    apu_db_lib=$bdb_libname
 
30884
    apu_have_db=1
 
30885
    ;;
 
30886
  *":"*)
 
30887
    header="`echo $found | sed -e 's/:.*$//'`"
 
30888
    lib="`echo $found | sed -e 's/^.*://'`"
 
30889
 
 
30890
 
 
30891
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
30892
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
 
30893
    APRUTIL_INCLUDES="-I$header"
 
30894
  else
 
30895
    apr_addto_bugger="-I$header"
 
30896
    for i in $apr_addto_bugger; do
 
30897
      apr_addto_duplicate="0"
 
30898
      for j in $APRUTIL_INCLUDES; do
 
30899
        if test "x$i" = "x$j"; then
 
30900
          apr_addto_duplicate="1"
 
30901
          break
 
30902
        fi
 
30903
      done
 
30904
      if test $apr_addto_duplicate = "0"; then
 
30905
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
30906
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
30907
      fi
 
30908
    done
 
30909
  fi
 
30910
 
 
30911
 
 
30912
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
30913
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
 
30914
    APRUTIL_LDFLAGS="-L$lib"
 
30915
  else
 
30916
    apr_addto_bugger="-L$lib"
 
30917
    for i in $apr_addto_bugger; do
 
30918
      apr_addto_duplicate="0"
 
30919
      for j in $APRUTIL_LDFLAGS; do
 
30920
        if test "x$i" = "x$j"; then
 
30921
          apr_addto_duplicate="1"
 
30922
          break
 
30923
        fi
 
30924
      done
 
30925
      if test $apr_addto_duplicate = "0"; then
 
30926
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
30927
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
30928
      fi
 
30929
    done
 
30930
  fi
 
30931
 
 
30932
    apu_db_header=$bdb_header
 
30933
    apu_db_lib=$bdb_libname
 
30934
    apu_have_db=1
 
30935
    ;;
 
30936
  *)
 
30937
 
 
30938
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
30939
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
 
30940
    APRUTIL_INCLUDES="-I$found/include"
 
30941
  else
 
30942
    apr_addto_bugger="-I$found/include"
 
30943
    for i in $apr_addto_bugger; do
 
30944
      apr_addto_duplicate="0"
 
30945
      for j in $APRUTIL_INCLUDES; do
 
30946
        if test "x$i" = "x$j"; then
 
30947
          apr_addto_duplicate="1"
 
30948
          break
 
30949
        fi
 
30950
      done
 
30951
      if test $apr_addto_duplicate = "0"; then
 
30952
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
30953
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
30954
      fi
 
30955
    done
 
30956
  fi
 
30957
 
 
30958
 
 
30959
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
30960
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
 
30961
    APRUTIL_LDFLAGS="-L$found/lib"
 
30962
  else
 
30963
    apr_addto_bugger="-L$found/lib"
 
30964
    for i in $apr_addto_bugger; do
 
30965
      apr_addto_duplicate="0"
 
30966
      for j in $APRUTIL_LDFLAGS; do
 
30967
        if test "x$i" = "x$j"; then
 
30968
          apr_addto_duplicate="1"
 
30969
          break
 
30970
        fi
 
30971
      done
 
30972
      if test $apr_addto_duplicate = "0"; then
 
30973
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
30974
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
30975
      fi
 
30976
    done
 
30977
  fi
 
30978
 
 
30979
    apu_db_header=$bdb_header
 
30980
    apu_db_lib=$bdb_libname
 
30981
    apu_have_db=1
 
30982
    ;;
 
30983
  esac
 
30984
 
 
30985
  if test "$apu_have_db" = "1"; then
 
30986
    apu_db_version=185
 
30987
  fi
 
30988
 
 
30989
                fi
 
30990
              fi
 
30991
            fi
 
30992
          fi
 
30993
        fi
 
30994
      fi
 
30995
    fi
 
30996
  fi
 
30997
  echo "$as_me:$LINENO: checking for Berkeley DB" >&5
 
30998
echo $ECHO_N "checking for Berkeley DB... $ECHO_C" >&6
 
30999
  if test "$apu_have_db" = "1"; then
 
31000
    echo "$as_me:$LINENO: result: found db$apu_db_version" >&5
 
31001
echo "${ECHO_T}found db$apu_db_version" >&6
 
31002
  else
 
31003
    echo "$as_me:$LINENO: result: not found" >&5
 
31004
echo "${ECHO_T}not found" >&6
 
31005
  fi
 
31006
 
 
31007
    ;;
 
31008
  esac
 
31009
 
 
31010
      if test "$apu_have_db" = "0"; then
 
31011
        { { echo "$as_me:$LINENO: error: Berkeley DB not found." >&5
 
31012
echo "$as_me: error: Berkeley DB not found." >&2;}
 
31013
   { (exit 1); exit 1; }; }
 
31014
      fi
 
31015
    fi
 
31016
 
 
31017
fi;
 
31018
 
 
31019
  if test -n "$apu_db_xtra_libs"; then
 
31020
    LIBS="$saveddbxtralibs"
 
31021
  fi
 
31022
 
 
31023
  case "$requested" in
 
31024
    sdbm)
 
31025
      apu_use_sdbm=1
 
31026
      apu_default_dbm=sdbm
 
31027
      ;;
 
31028
    gdbm)
 
31029
      apu_use_gdbm=1
 
31030
      apu_default_dbm=gdbm
 
31031
      ;;
 
31032
    ndbm)
 
31033
      apu_use_ndbm=1
 
31034
      apu_default_dbm=ndbm
 
31035
      ;;
 
31036
    db)
 
31037
      apu_use_db=1
 
31038
      apu_default_dbm=db
 
31039
      ;;
 
31040
    db1)
 
31041
      apu_use_db=1
 
31042
      apu_default_dbm=db1
 
31043
      ;;
 
31044
    db185)
 
31045
      apu_use_db=1
 
31046
      apu_default_dbm=db185
 
31047
      ;;
 
31048
    db2)
 
31049
      apu_use_db=1
 
31050
      apu_default_dbm=db2
 
31051
      ;;
 
31052
    db3)
 
31053
      apu_use_db=1
 
31054
      apu_default_dbm=db3
 
31055
      ;;
 
31056
    db4)
 
31057
      apu_use_db=1
 
31058
      apu_default_dbm=db4
 
31059
      ;;
 
31060
    db41)
 
31061
      apu_use_db=1
 
31062
      apu_default_dbm=db4
 
31063
      ;;
 
31064
    db42)
 
31065
      apu_use_db=1
 
31066
      apu_default_dbm=db4
 
31067
      ;;
 
31068
    db43)
 
31069
      apu_use_db=1
 
31070
      apu_default_dbm=db4
 
31071
      ;;
 
31072
    db44)
 
31073
      apu_use_db=1
 
31074
      apu_default_dbm=db4
 
31075
      ;;
 
31076
    default)
 
31077
            apu_default_dbm="sdbm (default)"
 
31078
      apu_use_sdbm=1
 
31079
      ;;
 
31080
    *)
 
31081
      { { echo "$as_me:$LINENO: error: --with-dbm=$look_for is an unknown DBM type.
 
31082
        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44" >&5
 
31083
echo "$as_me: error: --with-dbm=$look_for is an unknown DBM type.
 
31084
        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44" >&2;}
 
31085
   { (exit 1); exit 1; }; }
 
31086
      ;;
 
31087
  esac
 
31088
 
 
31089
        echo "$as_me:$LINENO: checking for default DBM" >&5
 
31090
echo $ECHO_N "checking for default DBM... $ECHO_C" >&6
 
31091
  echo "$as_me:$LINENO: result: $apu_default_dbm" >&5
 
31092
echo "${ECHO_T}$apu_default_dbm" >&6
 
31093
 
 
31094
 
 
31095
 
 
31096
 
 
31097
 
 
31098
 
 
31099
 
 
31100
 
 
31101
 
 
31102
 
 
31103
 
 
31104
 
 
31105
 
 
31106
      if test "$apu_have_gdbm" = "1"; then
 
31107
 
 
31108
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
31109
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-lgdbm\""
 
31110
    APRUTIL_EXPORT_LIBS="-lgdbm"
 
31111
  else
 
31112
    apr_addto_bugger="-lgdbm"
 
31113
    for i in $apr_addto_bugger; do
 
31114
      apr_addto_duplicate="0"
 
31115
      for j in $APRUTIL_EXPORT_LIBS; do
 
31116
        if test "x$i" = "x$j"; then
 
31117
          apr_addto_duplicate="1"
 
31118
          break
 
31119
        fi
 
31120
      done
 
31121
      if test $apr_addto_duplicate = "0"; then
 
31122
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
31123
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
31124
      fi
 
31125
    done
 
31126
  fi
 
31127
 
 
31128
 
 
31129
  if test "x$APRUTIL_LIBS" = "x"; then
 
31130
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-lgdbm\""
 
31131
    APRUTIL_LIBS="-lgdbm"
 
31132
  else
 
31133
    apr_addto_bugger="-lgdbm"
 
31134
    for i in $apr_addto_bugger; do
 
31135
      apr_addto_duplicate="0"
 
31136
      for j in $APRUTIL_LIBS; do
 
31137
        if test "x$i" = "x$j"; then
 
31138
          apr_addto_duplicate="1"
 
31139
          break
 
31140
        fi
 
31141
      done
 
31142
      if test $apr_addto_duplicate = "0"; then
 
31143
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
31144
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
31145
      fi
 
31146
    done
 
31147
  fi
 
31148
 
 
31149
  fi
 
31150
 
 
31151
  if test "$apu_have_ndbm" = "1"; then
 
31152
 
 
31153
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
31154
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l$apu_ndbm_lib\""
 
31155
    APRUTIL_EXPORT_LIBS="-l$apu_ndbm_lib"
 
31156
  else
 
31157
    apr_addto_bugger="-l$apu_ndbm_lib"
 
31158
    for i in $apr_addto_bugger; do
 
31159
      apr_addto_duplicate="0"
 
31160
      for j in $APRUTIL_EXPORT_LIBS; do
 
31161
        if test "x$i" = "x$j"; then
 
31162
          apr_addto_duplicate="1"
 
31163
          break
 
31164
        fi
 
31165
      done
 
31166
      if test $apr_addto_duplicate = "0"; then
 
31167
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
31168
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
31169
      fi
 
31170
    done
 
31171
  fi
 
31172
 
 
31173
 
 
31174
  if test "x$APRUTIL_LIBS" = "x"; then
 
31175
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l$apu_ndbm_lib\""
 
31176
    APRUTIL_LIBS="-l$apu_ndbm_lib"
 
31177
  else
 
31178
    apr_addto_bugger="-l$apu_ndbm_lib"
 
31179
    for i in $apr_addto_bugger; do
 
31180
      apr_addto_duplicate="0"
 
31181
      for j in $APRUTIL_LIBS; do
 
31182
        if test "x$i" = "x$j"; then
 
31183
          apr_addto_duplicate="1"
 
31184
          break
 
31185
        fi
 
31186
      done
 
31187
      if test $apr_addto_duplicate = "0"; then
 
31188
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
31189
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
31190
      fi
 
31191
    done
 
31192
  fi
 
31193
 
 
31194
  fi
 
31195
 
 
31196
  if test "$apu_have_db" = "1"; then
 
31197
 
 
31198
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
31199
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-l$apu_db_lib\""
 
31200
    APRUTIL_EXPORT_LIBS="-l$apu_db_lib"
 
31201
  else
 
31202
    apr_addto_bugger="-l$apu_db_lib"
 
31203
    for i in $apr_addto_bugger; do
 
31204
      apr_addto_duplicate="0"
 
31205
      for j in $APRUTIL_EXPORT_LIBS; do
 
31206
        if test "x$i" = "x$j"; then
 
31207
          apr_addto_duplicate="1"
 
31208
          break
 
31209
        fi
 
31210
      done
 
31211
      if test $apr_addto_duplicate = "0"; then
 
31212
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
31213
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
31214
      fi
 
31215
    done
 
31216
  fi
 
31217
 
 
31218
 
 
31219
  if test "x$APRUTIL_LIBS" = "x"; then
 
31220
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-l$apu_db_lib\""
 
31221
    APRUTIL_LIBS="-l$apu_db_lib"
 
31222
  else
 
31223
    apr_addto_bugger="-l$apu_db_lib"
 
31224
    for i in $apr_addto_bugger; do
 
31225
      apr_addto_duplicate="0"
 
31226
      for j in $APRUTIL_LIBS; do
 
31227
        if test "x$i" = "x$j"; then
 
31228
          apr_addto_duplicate="1"
 
31229
          break
 
31230
        fi
 
31231
      done
 
31232
      if test $apr_addto_duplicate = "0"; then
 
31233
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
31234
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
31235
      fi
 
31236
    done
 
31237
  fi
 
31238
 
 
31239
    if test -n "apu_db_xtra_libs"; then
 
31240
 
 
31241
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
31242
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$apu_db_xtra_libs\""
 
31243
    APRUTIL_EXPORT_LIBS="$apu_db_xtra_libs"
 
31244
  else
 
31245
    apr_addto_bugger="$apu_db_xtra_libs"
 
31246
    for i in $apr_addto_bugger; do
 
31247
      apr_addto_duplicate="0"
 
31248
      for j in $APRUTIL_EXPORT_LIBS; do
 
31249
        if test "x$i" = "x$j"; then
 
31250
          apr_addto_duplicate="1"
 
31251
          break
 
31252
        fi
 
31253
      done
 
31254
      if test $apr_addto_duplicate = "0"; then
 
31255
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
31256
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
31257
      fi
 
31258
    done
 
31259
  fi
 
31260
 
 
31261
 
 
31262
  if test "x$APRUTIL_LIBS" = "x"; then
 
31263
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_db_xtra_libs\""
 
31264
    APRUTIL_LIBS="$apu_db_xtra_libs"
 
31265
  else
 
31266
    apr_addto_bugger="$apu_db_xtra_libs"
 
31267
    for i in $apr_addto_bugger; do
 
31268
      apr_addto_duplicate="0"
 
31269
      for j in $APRUTIL_LIBS; do
 
31270
        if test "x$i" = "x$j"; then
 
31271
          apr_addto_duplicate="1"
 
31272
          break
 
31273
        fi
 
31274
      done
 
31275
      if test $apr_addto_duplicate = "0"; then
 
31276
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
31277
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
31278
      fi
 
31279
    done
 
31280
  fi
 
31281
 
 
31282
    fi
 
31283
  fi
 
31284
 
 
31285
 
 
31286
  apu_have_pgsql=0
 
31287
 
 
31288
 
 
31289
# Check whether --with-pgsql or --without-pgsql was given.
 
31290
if test "${with_pgsql+set}" = set; then
 
31291
  withval="$with_pgsql"
 
31292
 
 
31293
    apu_have_pgsql=0
 
31294
    if test "$withval" = "yes"; then
 
31295
      if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
31296
  echo "$as_me:$LINENO: checking for libpq-fe.h" >&5
 
31297
echo $ECHO_N "checking for libpq-fe.h... $ECHO_C" >&6
 
31298
if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
31299
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31300
fi
 
31301
echo "$as_me:$LINENO: result: $ac_cv_header_libpq_fe_h" >&5
 
31302
echo "${ECHO_T}$ac_cv_header_libpq_fe_h" >&6
 
31303
else
 
31304
  # Is the header compilable?
 
31305
echo "$as_me:$LINENO: checking libpq-fe.h usability" >&5
 
31306
echo $ECHO_N "checking libpq-fe.h usability... $ECHO_C" >&6
 
31307
cat >conftest.$ac_ext <<_ACEOF
 
31308
/* confdefs.h.  */
 
31309
_ACEOF
 
31310
cat confdefs.h >>conftest.$ac_ext
 
31311
cat >>conftest.$ac_ext <<_ACEOF
 
31312
/* end confdefs.h.  */
 
31313
$ac_includes_default
 
31314
#include <libpq-fe.h>
 
31315
_ACEOF
 
31316
rm -f conftest.$ac_objext
 
31317
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
31318
  (eval $ac_compile) 2>conftest.er1
 
31319
  ac_status=$?
 
31320
  grep -v '^ *+' conftest.er1 >conftest.err
 
31321
  rm -f conftest.er1
 
31322
  cat conftest.err >&5
 
31323
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31324
  (exit $ac_status); } &&
 
31325
         { ac_try='test -z "$ac_c_werror_flag"
 
31326
                         || test ! -s conftest.err'
 
31327
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31328
  (eval $ac_try) 2>&5
 
31329
  ac_status=$?
 
31330
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31331
  (exit $ac_status); }; } &&
 
31332
         { ac_try='test -s conftest.$ac_objext'
 
31333
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31334
  (eval $ac_try) 2>&5
 
31335
  ac_status=$?
 
31336
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31337
  (exit $ac_status); }; }; then
 
31338
  ac_header_compiler=yes
 
31339
else
 
31340
  echo "$as_me: failed program was:" >&5
 
31341
sed 's/^/| /' conftest.$ac_ext >&5
 
31342
 
 
31343
ac_header_compiler=no
 
31344
fi
 
31345
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
31346
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
31347
echo "${ECHO_T}$ac_header_compiler" >&6
 
31348
 
 
31349
# Is the header present?
 
31350
echo "$as_me:$LINENO: checking libpq-fe.h presence" >&5
 
31351
echo $ECHO_N "checking libpq-fe.h presence... $ECHO_C" >&6
 
31352
cat >conftest.$ac_ext <<_ACEOF
 
31353
/* confdefs.h.  */
 
31354
_ACEOF
 
31355
cat confdefs.h >>conftest.$ac_ext
 
31356
cat >>conftest.$ac_ext <<_ACEOF
 
31357
/* end confdefs.h.  */
 
31358
#include <libpq-fe.h>
 
31359
_ACEOF
 
31360
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
31361
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
31362
  ac_status=$?
 
31363
  grep -v '^ *+' conftest.er1 >conftest.err
 
31364
  rm -f conftest.er1
 
31365
  cat conftest.err >&5
 
31366
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31367
  (exit $ac_status); } >/dev/null; then
 
31368
  if test -s conftest.err; then
 
31369
    ac_cpp_err=$ac_c_preproc_warn_flag
 
31370
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
31371
  else
 
31372
    ac_cpp_err=
 
31373
  fi
 
31374
else
 
31375
  ac_cpp_err=yes
 
31376
fi
 
31377
if test -z "$ac_cpp_err"; then
 
31378
  ac_header_preproc=yes
 
31379
else
 
31380
  echo "$as_me: failed program was:" >&5
 
31381
sed 's/^/| /' conftest.$ac_ext >&5
 
31382
 
 
31383
  ac_header_preproc=no
 
31384
fi
 
31385
rm -f conftest.err conftest.$ac_ext
 
31386
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
31387
echo "${ECHO_T}$ac_header_preproc" >&6
 
31388
 
 
31389
# So?  What about this header?
 
31390
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
31391
  yes:no: )
 
31392
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
31393
echo "$as_me: WARNING: libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
31394
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: proceeding with the compiler's result" >&5
 
31395
echo "$as_me: WARNING: libpq-fe.h: proceeding with the compiler's result" >&2;}
 
31396
    ac_header_preproc=yes
 
31397
    ;;
 
31398
  no:yes:* )
 
31399
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: present but cannot be compiled" >&5
 
31400
echo "$as_me: WARNING: libpq-fe.h: present but cannot be compiled" >&2;}
 
31401
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h:     check for missing prerequisite headers?" >&5
 
31402
echo "$as_me: WARNING: libpq-fe.h:     check for missing prerequisite headers?" >&2;}
 
31403
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: see the Autoconf documentation" >&5
 
31404
echo "$as_me: WARNING: libpq-fe.h: see the Autoconf documentation" >&2;}
 
31405
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&5
 
31406
echo "$as_me: WARNING: libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
31407
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: proceeding with the preprocessor's result" >&5
 
31408
echo "$as_me: WARNING: libpq-fe.h: proceeding with the preprocessor's result" >&2;}
 
31409
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: in the future, the compiler will take precedence" >&5
 
31410
echo "$as_me: WARNING: libpq-fe.h: in the future, the compiler will take precedence" >&2;}
 
31411
    (
 
31412
      cat <<\_ASBOX
 
31413
## ------------------------------------------ ##
 
31414
## Report this to the AC_PACKAGE_NAME lists.  ##
 
31415
## ------------------------------------------ ##
 
31416
_ASBOX
 
31417
    ) |
 
31418
      sed "s/^/$as_me: WARNING:     /" >&2
 
31419
    ;;
 
31420
esac
 
31421
echo "$as_me:$LINENO: checking for libpq-fe.h" >&5
 
31422
echo $ECHO_N "checking for libpq-fe.h... $ECHO_C" >&6
 
31423
if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
31424
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31425
else
 
31426
  ac_cv_header_libpq_fe_h=$ac_header_preproc
 
31427
fi
 
31428
echo "$as_me:$LINENO: result: $ac_cv_header_libpq_fe_h" >&5
 
31429
echo "${ECHO_T}$ac_cv_header_libpq_fe_h" >&6
 
31430
 
 
31431
fi
 
31432
if test $ac_cv_header_libpq_fe_h = yes; then
 
31433
  echo "$as_me:$LINENO: checking for PQsendQueryPrepared in -lpq" >&5
 
31434
echo $ECHO_N "checking for PQsendQueryPrepared in -lpq... $ECHO_C" >&6
 
31435
if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then
 
31436
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31437
else
 
31438
  ac_check_lib_save_LIBS=$LIBS
 
31439
LIBS="-lpq  $LIBS"
 
31440
cat >conftest.$ac_ext <<_ACEOF
 
31441
/* confdefs.h.  */
 
31442
_ACEOF
 
31443
cat confdefs.h >>conftest.$ac_ext
 
31444
cat >>conftest.$ac_ext <<_ACEOF
 
31445
/* end confdefs.h.  */
 
31446
 
 
31447
/* Override any gcc2 internal prototype to avoid an error.  */
 
31448
#ifdef __cplusplus
 
31449
extern "C"
 
31450
#endif
 
31451
/* We use char because int might match the return type of a gcc2
 
31452
   builtin and then its argument prototype would still apply.  */
 
31453
char PQsendQueryPrepared ();
 
31454
int
 
31455
main ()
 
31456
{
 
31457
PQsendQueryPrepared ();
 
31458
  ;
 
31459
  return 0;
 
31460
}
 
31461
_ACEOF
 
31462
rm -f conftest.$ac_objext conftest$ac_exeext
 
31463
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
31464
  (eval $ac_link) 2>conftest.er1
 
31465
  ac_status=$?
 
31466
  grep -v '^ *+' conftest.er1 >conftest.err
 
31467
  rm -f conftest.er1
 
31468
  cat conftest.err >&5
 
31469
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31470
  (exit $ac_status); } &&
 
31471
         { ac_try='test -z "$ac_c_werror_flag"
 
31472
                         || test ! -s conftest.err'
 
31473
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31474
  (eval $ac_try) 2>&5
 
31475
  ac_status=$?
 
31476
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31477
  (exit $ac_status); }; } &&
 
31478
         { ac_try='test -s conftest$ac_exeext'
 
31479
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31480
  (eval $ac_try) 2>&5
 
31481
  ac_status=$?
 
31482
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31483
  (exit $ac_status); }; }; then
 
31484
  ac_cv_lib_pq_PQsendQueryPrepared=yes
 
31485
else
 
31486
  echo "$as_me: failed program was:" >&5
 
31487
sed 's/^/| /' conftest.$ac_ext >&5
 
31488
 
 
31489
ac_cv_lib_pq_PQsendQueryPrepared=no
 
31490
fi
 
31491
rm -f conftest.err conftest.$ac_objext \
 
31492
      conftest$ac_exeext conftest.$ac_ext
 
31493
LIBS=$ac_check_lib_save_LIBS
 
31494
fi
 
31495
echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
 
31496
echo "${ECHO_T}$ac_cv_lib_pq_PQsendQueryPrepared" >&6
 
31497
if test $ac_cv_lib_pq_PQsendQueryPrepared = yes; then
 
31498
  apu_have_pgsql=1
 
31499
fi
 
31500
 
 
31501
fi
 
31502
 
 
31503
 
 
31504
      if test "$apu_have_pgsql" == "0"; then
 
31505
        if test "${ac_cv_header_postgresql_libpq_fe_h+set}" = set; then
 
31506
  echo "$as_me:$LINENO: checking for postgresql/libpq-fe.h" >&5
 
31507
echo $ECHO_N "checking for postgresql/libpq-fe.h... $ECHO_C" >&6
 
31508
if test "${ac_cv_header_postgresql_libpq_fe_h+set}" = set; then
 
31509
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31510
fi
 
31511
echo "$as_me:$LINENO: result: $ac_cv_header_postgresql_libpq_fe_h" >&5
 
31512
echo "${ECHO_T}$ac_cv_header_postgresql_libpq_fe_h" >&6
 
31513
else
 
31514
  # Is the header compilable?
 
31515
echo "$as_me:$LINENO: checking postgresql/libpq-fe.h usability" >&5
 
31516
echo $ECHO_N "checking postgresql/libpq-fe.h usability... $ECHO_C" >&6
 
31517
cat >conftest.$ac_ext <<_ACEOF
 
31518
/* confdefs.h.  */
 
31519
_ACEOF
 
31520
cat confdefs.h >>conftest.$ac_ext
 
31521
cat >>conftest.$ac_ext <<_ACEOF
 
31522
/* end confdefs.h.  */
 
31523
$ac_includes_default
 
31524
#include <postgresql/libpq-fe.h>
 
31525
_ACEOF
 
31526
rm -f conftest.$ac_objext
 
31527
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
31528
  (eval $ac_compile) 2>conftest.er1
 
31529
  ac_status=$?
 
31530
  grep -v '^ *+' conftest.er1 >conftest.err
 
31531
  rm -f conftest.er1
 
31532
  cat conftest.err >&5
 
31533
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31534
  (exit $ac_status); } &&
 
31535
         { ac_try='test -z "$ac_c_werror_flag"
 
31536
                         || test ! -s conftest.err'
 
31537
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31538
  (eval $ac_try) 2>&5
 
31539
  ac_status=$?
 
31540
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31541
  (exit $ac_status); }; } &&
 
31542
         { ac_try='test -s conftest.$ac_objext'
 
31543
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31544
  (eval $ac_try) 2>&5
 
31545
  ac_status=$?
 
31546
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31547
  (exit $ac_status); }; }; then
 
31548
  ac_header_compiler=yes
 
31549
else
 
31550
  echo "$as_me: failed program was:" >&5
 
31551
sed 's/^/| /' conftest.$ac_ext >&5
 
31552
 
 
31553
ac_header_compiler=no
 
31554
fi
 
31555
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
31556
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
31557
echo "${ECHO_T}$ac_header_compiler" >&6
 
31558
 
 
31559
# Is the header present?
 
31560
echo "$as_me:$LINENO: checking postgresql/libpq-fe.h presence" >&5
 
31561
echo $ECHO_N "checking postgresql/libpq-fe.h presence... $ECHO_C" >&6
 
31562
cat >conftest.$ac_ext <<_ACEOF
 
31563
/* confdefs.h.  */
 
31564
_ACEOF
 
31565
cat confdefs.h >>conftest.$ac_ext
 
31566
cat >>conftest.$ac_ext <<_ACEOF
 
31567
/* end confdefs.h.  */
 
31568
#include <postgresql/libpq-fe.h>
 
31569
_ACEOF
 
31570
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
31571
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
31572
  ac_status=$?
 
31573
  grep -v '^ *+' conftest.er1 >conftest.err
 
31574
  rm -f conftest.er1
 
31575
  cat conftest.err >&5
 
31576
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31577
  (exit $ac_status); } >/dev/null; then
 
31578
  if test -s conftest.err; then
 
31579
    ac_cpp_err=$ac_c_preproc_warn_flag
 
31580
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
31581
  else
 
31582
    ac_cpp_err=
 
31583
  fi
 
31584
else
 
31585
  ac_cpp_err=yes
 
31586
fi
 
31587
if test -z "$ac_cpp_err"; then
 
31588
  ac_header_preproc=yes
 
31589
else
 
31590
  echo "$as_me: failed program was:" >&5
 
31591
sed 's/^/| /' conftest.$ac_ext >&5
 
31592
 
 
31593
  ac_header_preproc=no
 
31594
fi
 
31595
rm -f conftest.err conftest.$ac_ext
 
31596
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
31597
echo "${ECHO_T}$ac_header_preproc" >&6
 
31598
 
 
31599
# So?  What about this header?
 
31600
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
31601
  yes:no: )
 
31602
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
31603
echo "$as_me: WARNING: postgresql/libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
31604
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: proceeding with the compiler's result" >&5
 
31605
echo "$as_me: WARNING: postgresql/libpq-fe.h: proceeding with the compiler's result" >&2;}
 
31606
    ac_header_preproc=yes
 
31607
    ;;
 
31608
  no:yes:* )
 
31609
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: present but cannot be compiled" >&5
 
31610
echo "$as_me: WARNING: postgresql/libpq-fe.h: present but cannot be compiled" >&2;}
 
31611
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h:     check for missing prerequisite headers?" >&5
 
31612
echo "$as_me: WARNING: postgresql/libpq-fe.h:     check for missing prerequisite headers?" >&2;}
 
31613
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: see the Autoconf documentation" >&5
 
31614
echo "$as_me: WARNING: postgresql/libpq-fe.h: see the Autoconf documentation" >&2;}
 
31615
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&5
 
31616
echo "$as_me: WARNING: postgresql/libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
31617
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: proceeding with the preprocessor's result" >&5
 
31618
echo "$as_me: WARNING: postgresql/libpq-fe.h: proceeding with the preprocessor's result" >&2;}
 
31619
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: in the future, the compiler will take precedence" >&5
 
31620
echo "$as_me: WARNING: postgresql/libpq-fe.h: in the future, the compiler will take precedence" >&2;}
 
31621
    (
 
31622
      cat <<\_ASBOX
 
31623
## ------------------------------------------ ##
 
31624
## Report this to the AC_PACKAGE_NAME lists.  ##
 
31625
## ------------------------------------------ ##
 
31626
_ASBOX
 
31627
    ) |
 
31628
      sed "s/^/$as_me: WARNING:     /" >&2
 
31629
    ;;
 
31630
esac
 
31631
echo "$as_me:$LINENO: checking for postgresql/libpq-fe.h" >&5
 
31632
echo $ECHO_N "checking for postgresql/libpq-fe.h... $ECHO_C" >&6
 
31633
if test "${ac_cv_header_postgresql_libpq_fe_h+set}" = set; then
 
31634
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31635
else
 
31636
  ac_cv_header_postgresql_libpq_fe_h=$ac_header_preproc
 
31637
fi
 
31638
echo "$as_me:$LINENO: result: $ac_cv_header_postgresql_libpq_fe_h" >&5
 
31639
echo "${ECHO_T}$ac_cv_header_postgresql_libpq_fe_h" >&6
 
31640
 
 
31641
fi
 
31642
if test $ac_cv_header_postgresql_libpq_fe_h = yes; then
 
31643
  echo "$as_me:$LINENO: checking for PQsendQueryPrepared in -lpq" >&5
 
31644
echo $ECHO_N "checking for PQsendQueryPrepared in -lpq... $ECHO_C" >&6
 
31645
if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then
 
31646
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31647
else
 
31648
  ac_check_lib_save_LIBS=$LIBS
 
31649
LIBS="-lpq  $LIBS"
 
31650
cat >conftest.$ac_ext <<_ACEOF
 
31651
/* confdefs.h.  */
 
31652
_ACEOF
 
31653
cat confdefs.h >>conftest.$ac_ext
 
31654
cat >>conftest.$ac_ext <<_ACEOF
 
31655
/* end confdefs.h.  */
 
31656
 
 
31657
/* Override any gcc2 internal prototype to avoid an error.  */
 
31658
#ifdef __cplusplus
 
31659
extern "C"
 
31660
#endif
 
31661
/* We use char because int might match the return type of a gcc2
 
31662
   builtin and then its argument prototype would still apply.  */
 
31663
char PQsendQueryPrepared ();
 
31664
int
 
31665
main ()
 
31666
{
 
31667
PQsendQueryPrepared ();
 
31668
  ;
 
31669
  return 0;
 
31670
}
 
31671
_ACEOF
 
31672
rm -f conftest.$ac_objext conftest$ac_exeext
 
31673
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
31674
  (eval $ac_link) 2>conftest.er1
 
31675
  ac_status=$?
 
31676
  grep -v '^ *+' conftest.er1 >conftest.err
 
31677
  rm -f conftest.er1
 
31678
  cat conftest.err >&5
 
31679
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31680
  (exit $ac_status); } &&
 
31681
         { ac_try='test -z "$ac_c_werror_flag"
 
31682
                         || test ! -s conftest.err'
 
31683
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31684
  (eval $ac_try) 2>&5
 
31685
  ac_status=$?
 
31686
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31687
  (exit $ac_status); }; } &&
 
31688
         { ac_try='test -s conftest$ac_exeext'
 
31689
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31690
  (eval $ac_try) 2>&5
 
31691
  ac_status=$?
 
31692
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31693
  (exit $ac_status); }; }; then
 
31694
  ac_cv_lib_pq_PQsendQueryPrepared=yes
 
31695
else
 
31696
  echo "$as_me: failed program was:" >&5
 
31697
sed 's/^/| /' conftest.$ac_ext >&5
 
31698
 
 
31699
ac_cv_lib_pq_PQsendQueryPrepared=no
 
31700
fi
 
31701
rm -f conftest.err conftest.$ac_objext \
 
31702
      conftest$ac_exeext conftest.$ac_ext
 
31703
LIBS=$ac_check_lib_save_LIBS
 
31704
fi
 
31705
echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
 
31706
echo "${ECHO_T}$ac_cv_lib_pq_PQsendQueryPrepared" >&6
 
31707
if test $ac_cv_lib_pq_PQsendQueryPrepared = yes; then
 
31708
  apu_have_pgsql=1
 
31709
fi
 
31710
 
 
31711
fi
 
31712
 
 
31713
 
 
31714
        if test "$apu_have_pgsql" != "0"; then
 
31715
 
 
31716
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
31717
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include/postgresql\""
 
31718
    APRUTIL_INCLUDES="-I$withval/include/postgresql"
 
31719
  else
 
31720
    apr_addto_bugger="-I$withval/include/postgresql"
 
31721
    for i in $apr_addto_bugger; do
 
31722
      apr_addto_duplicate="0"
 
31723
      for j in $APRUTIL_INCLUDES; do
 
31724
        if test "x$i" = "x$j"; then
 
31725
          apr_addto_duplicate="1"
 
31726
          break
 
31727
        fi
 
31728
      done
 
31729
      if test $apr_addto_duplicate = "0"; then
 
31730
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
31731
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
31732
      fi
 
31733
    done
 
31734
  fi
 
31735
 
 
31736
        fi
 
31737
      fi
 
31738
    elif test "$withval" = "no"; then
 
31739
      apu_have_pgsql=0
 
31740
    else
 
31741
      CPPFLAGS="-I$withval/include"
 
31742
      LIBS="-L$withval/lib "
 
31743
 
 
31744
      { echo "$as_me:$LINENO: checking for pgsql in $withval" >&5
 
31745
echo "$as_me: checking for pgsql in $withval" >&6;}
 
31746
      if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
31747
  echo "$as_me:$LINENO: checking for libpq-fe.h" >&5
 
31748
echo $ECHO_N "checking for libpq-fe.h... $ECHO_C" >&6
 
31749
if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
31750
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31751
fi
 
31752
echo "$as_me:$LINENO: result: $ac_cv_header_libpq_fe_h" >&5
 
31753
echo "${ECHO_T}$ac_cv_header_libpq_fe_h" >&6
 
31754
else
 
31755
  # Is the header compilable?
 
31756
echo "$as_me:$LINENO: checking libpq-fe.h usability" >&5
 
31757
echo $ECHO_N "checking libpq-fe.h usability... $ECHO_C" >&6
 
31758
cat >conftest.$ac_ext <<_ACEOF
 
31759
/* confdefs.h.  */
 
31760
_ACEOF
 
31761
cat confdefs.h >>conftest.$ac_ext
 
31762
cat >>conftest.$ac_ext <<_ACEOF
 
31763
/* end confdefs.h.  */
 
31764
$ac_includes_default
 
31765
#include <libpq-fe.h>
 
31766
_ACEOF
 
31767
rm -f conftest.$ac_objext
 
31768
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
31769
  (eval $ac_compile) 2>conftest.er1
 
31770
  ac_status=$?
 
31771
  grep -v '^ *+' conftest.er1 >conftest.err
 
31772
  rm -f conftest.er1
 
31773
  cat conftest.err >&5
 
31774
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31775
  (exit $ac_status); } &&
 
31776
         { ac_try='test -z "$ac_c_werror_flag"
 
31777
                         || test ! -s conftest.err'
 
31778
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31779
  (eval $ac_try) 2>&5
 
31780
  ac_status=$?
 
31781
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31782
  (exit $ac_status); }; } &&
 
31783
         { ac_try='test -s conftest.$ac_objext'
 
31784
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31785
  (eval $ac_try) 2>&5
 
31786
  ac_status=$?
 
31787
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31788
  (exit $ac_status); }; }; then
 
31789
  ac_header_compiler=yes
 
31790
else
 
31791
  echo "$as_me: failed program was:" >&5
 
31792
sed 's/^/| /' conftest.$ac_ext >&5
 
31793
 
 
31794
ac_header_compiler=no
 
31795
fi
 
31796
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
31797
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
31798
echo "${ECHO_T}$ac_header_compiler" >&6
 
31799
 
 
31800
# Is the header present?
 
31801
echo "$as_me:$LINENO: checking libpq-fe.h presence" >&5
 
31802
echo $ECHO_N "checking libpq-fe.h presence... $ECHO_C" >&6
 
31803
cat >conftest.$ac_ext <<_ACEOF
 
31804
/* confdefs.h.  */
 
31805
_ACEOF
 
31806
cat confdefs.h >>conftest.$ac_ext
 
31807
cat >>conftest.$ac_ext <<_ACEOF
 
31808
/* end confdefs.h.  */
 
31809
#include <libpq-fe.h>
 
31810
_ACEOF
 
31811
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
31812
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
31813
  ac_status=$?
 
31814
  grep -v '^ *+' conftest.er1 >conftest.err
 
31815
  rm -f conftest.er1
 
31816
  cat conftest.err >&5
 
31817
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31818
  (exit $ac_status); } >/dev/null; then
 
31819
  if test -s conftest.err; then
 
31820
    ac_cpp_err=$ac_c_preproc_warn_flag
 
31821
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
31822
  else
 
31823
    ac_cpp_err=
 
31824
  fi
 
31825
else
 
31826
  ac_cpp_err=yes
 
31827
fi
 
31828
if test -z "$ac_cpp_err"; then
 
31829
  ac_header_preproc=yes
 
31830
else
 
31831
  echo "$as_me: failed program was:" >&5
 
31832
sed 's/^/| /' conftest.$ac_ext >&5
 
31833
 
 
31834
  ac_header_preproc=no
 
31835
fi
 
31836
rm -f conftest.err conftest.$ac_ext
 
31837
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
31838
echo "${ECHO_T}$ac_header_preproc" >&6
 
31839
 
 
31840
# So?  What about this header?
 
31841
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
31842
  yes:no: )
 
31843
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
31844
echo "$as_me: WARNING: libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
31845
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: proceeding with the compiler's result" >&5
 
31846
echo "$as_me: WARNING: libpq-fe.h: proceeding with the compiler's result" >&2;}
 
31847
    ac_header_preproc=yes
 
31848
    ;;
 
31849
  no:yes:* )
 
31850
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: present but cannot be compiled" >&5
 
31851
echo "$as_me: WARNING: libpq-fe.h: present but cannot be compiled" >&2;}
 
31852
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h:     check for missing prerequisite headers?" >&5
 
31853
echo "$as_me: WARNING: libpq-fe.h:     check for missing prerequisite headers?" >&2;}
 
31854
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: see the Autoconf documentation" >&5
 
31855
echo "$as_me: WARNING: libpq-fe.h: see the Autoconf documentation" >&2;}
 
31856
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&5
 
31857
echo "$as_me: WARNING: libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
31858
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: proceeding with the preprocessor's result" >&5
 
31859
echo "$as_me: WARNING: libpq-fe.h: proceeding with the preprocessor's result" >&2;}
 
31860
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: in the future, the compiler will take precedence" >&5
 
31861
echo "$as_me: WARNING: libpq-fe.h: in the future, the compiler will take precedence" >&2;}
 
31862
    (
 
31863
      cat <<\_ASBOX
 
31864
## ------------------------------------------ ##
 
31865
## Report this to the AC_PACKAGE_NAME lists.  ##
 
31866
## ------------------------------------------ ##
 
31867
_ASBOX
 
31868
    ) |
 
31869
      sed "s/^/$as_me: WARNING:     /" >&2
 
31870
    ;;
 
31871
esac
 
31872
echo "$as_me:$LINENO: checking for libpq-fe.h" >&5
 
31873
echo $ECHO_N "checking for libpq-fe.h... $ECHO_C" >&6
 
31874
if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
31875
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31876
else
 
31877
  ac_cv_header_libpq_fe_h=$ac_header_preproc
 
31878
fi
 
31879
echo "$as_me:$LINENO: result: $ac_cv_header_libpq_fe_h" >&5
 
31880
echo "${ECHO_T}$ac_cv_header_libpq_fe_h" >&6
 
31881
 
 
31882
fi
 
31883
if test $ac_cv_header_libpq_fe_h = yes; then
 
31884
  echo "$as_me:$LINENO: checking for PQsendQueryPrepared in -lpq" >&5
 
31885
echo $ECHO_N "checking for PQsendQueryPrepared in -lpq... $ECHO_C" >&6
 
31886
if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then
 
31887
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
31888
else
 
31889
  ac_check_lib_save_LIBS=$LIBS
 
31890
LIBS="-lpq  $LIBS"
 
31891
cat >conftest.$ac_ext <<_ACEOF
 
31892
/* confdefs.h.  */
 
31893
_ACEOF
 
31894
cat confdefs.h >>conftest.$ac_ext
 
31895
cat >>conftest.$ac_ext <<_ACEOF
 
31896
/* end confdefs.h.  */
 
31897
 
 
31898
/* Override any gcc2 internal prototype to avoid an error.  */
 
31899
#ifdef __cplusplus
 
31900
extern "C"
 
31901
#endif
 
31902
/* We use char because int might match the return type of a gcc2
 
31903
   builtin and then its argument prototype would still apply.  */
 
31904
char PQsendQueryPrepared ();
 
31905
int
 
31906
main ()
 
31907
{
 
31908
PQsendQueryPrepared ();
 
31909
  ;
 
31910
  return 0;
 
31911
}
 
31912
_ACEOF
 
31913
rm -f conftest.$ac_objext conftest$ac_exeext
 
31914
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
31915
  (eval $ac_link) 2>conftest.er1
 
31916
  ac_status=$?
 
31917
  grep -v '^ *+' conftest.er1 >conftest.err
 
31918
  rm -f conftest.er1
 
31919
  cat conftest.err >&5
 
31920
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31921
  (exit $ac_status); } &&
 
31922
         { ac_try='test -z "$ac_c_werror_flag"
 
31923
                         || test ! -s conftest.err'
 
31924
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31925
  (eval $ac_try) 2>&5
 
31926
  ac_status=$?
 
31927
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31928
  (exit $ac_status); }; } &&
 
31929
         { ac_try='test -s conftest$ac_exeext'
 
31930
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
31931
  (eval $ac_try) 2>&5
 
31932
  ac_status=$?
 
31933
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
31934
  (exit $ac_status); }; }; then
 
31935
  ac_cv_lib_pq_PQsendQueryPrepared=yes
 
31936
else
 
31937
  echo "$as_me: failed program was:" >&5
 
31938
sed 's/^/| /' conftest.$ac_ext >&5
 
31939
 
 
31940
ac_cv_lib_pq_PQsendQueryPrepared=no
 
31941
fi
 
31942
rm -f conftest.err conftest.$ac_objext \
 
31943
      conftest$ac_exeext conftest.$ac_ext
 
31944
LIBS=$ac_check_lib_save_LIBS
 
31945
fi
 
31946
echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
 
31947
echo "${ECHO_T}$ac_cv_lib_pq_PQsendQueryPrepared" >&6
 
31948
if test $ac_cv_lib_pq_PQsendQueryPrepared = yes; then
 
31949
  apu_have_pgsql=1
 
31950
fi
 
31951
 
 
31952
fi
 
31953
 
 
31954
 
 
31955
      if test "$apu_have_pgsql" != "0"; then
 
31956
 
 
31957
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
31958
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
31959
    APRUTIL_LDFLAGS="-L$withval/lib"
 
31960
  else
 
31961
    apr_addto_bugger="-L$withval/lib"
 
31962
    for i in $apr_addto_bugger; do
 
31963
      apr_addto_duplicate="0"
 
31964
      for j in $APRUTIL_LDFLAGS; do
 
31965
        if test "x$i" = "x$j"; then
 
31966
          apr_addto_duplicate="1"
 
31967
          break
 
31968
        fi
 
31969
      done
 
31970
      if test $apr_addto_duplicate = "0"; then
 
31971
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
31972
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
31973
      fi
 
31974
    done
 
31975
  fi
 
31976
 
 
31977
 
 
31978
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
31979
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
31980
    APRUTIL_INCLUDES="-I$withval/include"
 
31981
  else
 
31982
    apr_addto_bugger="-I$withval/include"
 
31983
    for i in $apr_addto_bugger; do
 
31984
      apr_addto_duplicate="0"
 
31985
      for j in $APRUTIL_INCLUDES; do
 
31986
        if test "x$i" = "x$j"; then
 
31987
          apr_addto_duplicate="1"
 
31988
          break
 
31989
        fi
 
31990
      done
 
31991
      if test $apr_addto_duplicate = "0"; then
 
31992
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
31993
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
31994
      fi
 
31995
    done
 
31996
  fi
 
31997
 
 
31998
      fi
 
31999
      if test "$apu_have_pgsql" != "1"; then
 
32000
        if test "${ac_cv_header_postgresql_libpq_fe_h+set}" = set; then
 
32001
  echo "$as_me:$LINENO: checking for postgresql/libpq-fe.h" >&5
 
32002
echo $ECHO_N "checking for postgresql/libpq-fe.h... $ECHO_C" >&6
 
32003
if test "${ac_cv_header_postgresql_libpq_fe_h+set}" = set; then
 
32004
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32005
fi
 
32006
echo "$as_me:$LINENO: result: $ac_cv_header_postgresql_libpq_fe_h" >&5
 
32007
echo "${ECHO_T}$ac_cv_header_postgresql_libpq_fe_h" >&6
 
32008
else
 
32009
  # Is the header compilable?
 
32010
echo "$as_me:$LINENO: checking postgresql/libpq-fe.h usability" >&5
 
32011
echo $ECHO_N "checking postgresql/libpq-fe.h usability... $ECHO_C" >&6
 
32012
cat >conftest.$ac_ext <<_ACEOF
 
32013
/* confdefs.h.  */
 
32014
_ACEOF
 
32015
cat confdefs.h >>conftest.$ac_ext
 
32016
cat >>conftest.$ac_ext <<_ACEOF
 
32017
/* end confdefs.h.  */
 
32018
$ac_includes_default
 
32019
#include <postgresql/libpq-fe.h>
 
32020
_ACEOF
 
32021
rm -f conftest.$ac_objext
 
32022
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
32023
  (eval $ac_compile) 2>conftest.er1
 
32024
  ac_status=$?
 
32025
  grep -v '^ *+' conftest.er1 >conftest.err
 
32026
  rm -f conftest.er1
 
32027
  cat conftest.err >&5
 
32028
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32029
  (exit $ac_status); } &&
 
32030
         { ac_try='test -z "$ac_c_werror_flag"
 
32031
                         || test ! -s conftest.err'
 
32032
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32033
  (eval $ac_try) 2>&5
 
32034
  ac_status=$?
 
32035
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32036
  (exit $ac_status); }; } &&
 
32037
         { ac_try='test -s conftest.$ac_objext'
 
32038
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32039
  (eval $ac_try) 2>&5
 
32040
  ac_status=$?
 
32041
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32042
  (exit $ac_status); }; }; then
 
32043
  ac_header_compiler=yes
 
32044
else
 
32045
  echo "$as_me: failed program was:" >&5
 
32046
sed 's/^/| /' conftest.$ac_ext >&5
 
32047
 
 
32048
ac_header_compiler=no
 
32049
fi
 
32050
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
32051
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
32052
echo "${ECHO_T}$ac_header_compiler" >&6
 
32053
 
 
32054
# Is the header present?
 
32055
echo "$as_me:$LINENO: checking postgresql/libpq-fe.h presence" >&5
 
32056
echo $ECHO_N "checking postgresql/libpq-fe.h presence... $ECHO_C" >&6
 
32057
cat >conftest.$ac_ext <<_ACEOF
 
32058
/* confdefs.h.  */
 
32059
_ACEOF
 
32060
cat confdefs.h >>conftest.$ac_ext
 
32061
cat >>conftest.$ac_ext <<_ACEOF
 
32062
/* end confdefs.h.  */
 
32063
#include <postgresql/libpq-fe.h>
 
32064
_ACEOF
 
32065
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
32066
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
32067
  ac_status=$?
 
32068
  grep -v '^ *+' conftest.er1 >conftest.err
 
32069
  rm -f conftest.er1
 
32070
  cat conftest.err >&5
 
32071
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32072
  (exit $ac_status); } >/dev/null; then
 
32073
  if test -s conftest.err; then
 
32074
    ac_cpp_err=$ac_c_preproc_warn_flag
 
32075
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
32076
  else
 
32077
    ac_cpp_err=
 
32078
  fi
 
32079
else
 
32080
  ac_cpp_err=yes
 
32081
fi
 
32082
if test -z "$ac_cpp_err"; then
 
32083
  ac_header_preproc=yes
 
32084
else
 
32085
  echo "$as_me: failed program was:" >&5
 
32086
sed 's/^/| /' conftest.$ac_ext >&5
 
32087
 
 
32088
  ac_header_preproc=no
 
32089
fi
 
32090
rm -f conftest.err conftest.$ac_ext
 
32091
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
32092
echo "${ECHO_T}$ac_header_preproc" >&6
 
32093
 
 
32094
# So?  What about this header?
 
32095
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
32096
  yes:no: )
 
32097
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
32098
echo "$as_me: WARNING: postgresql/libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
32099
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: proceeding with the compiler's result" >&5
 
32100
echo "$as_me: WARNING: postgresql/libpq-fe.h: proceeding with the compiler's result" >&2;}
 
32101
    ac_header_preproc=yes
 
32102
    ;;
 
32103
  no:yes:* )
 
32104
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: present but cannot be compiled" >&5
 
32105
echo "$as_me: WARNING: postgresql/libpq-fe.h: present but cannot be compiled" >&2;}
 
32106
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h:     check for missing prerequisite headers?" >&5
 
32107
echo "$as_me: WARNING: postgresql/libpq-fe.h:     check for missing prerequisite headers?" >&2;}
 
32108
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: see the Autoconf documentation" >&5
 
32109
echo "$as_me: WARNING: postgresql/libpq-fe.h: see the Autoconf documentation" >&2;}
 
32110
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&5
 
32111
echo "$as_me: WARNING: postgresql/libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
32112
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: proceeding with the preprocessor's result" >&5
 
32113
echo "$as_me: WARNING: postgresql/libpq-fe.h: proceeding with the preprocessor's result" >&2;}
 
32114
    { echo "$as_me:$LINENO: WARNING: postgresql/libpq-fe.h: in the future, the compiler will take precedence" >&5
 
32115
echo "$as_me: WARNING: postgresql/libpq-fe.h: in the future, the compiler will take precedence" >&2;}
 
32116
    (
 
32117
      cat <<\_ASBOX
 
32118
## ------------------------------------------ ##
 
32119
## Report this to the AC_PACKAGE_NAME lists.  ##
 
32120
## ------------------------------------------ ##
 
32121
_ASBOX
 
32122
    ) |
 
32123
      sed "s/^/$as_me: WARNING:     /" >&2
 
32124
    ;;
 
32125
esac
 
32126
echo "$as_me:$LINENO: checking for postgresql/libpq-fe.h" >&5
 
32127
echo $ECHO_N "checking for postgresql/libpq-fe.h... $ECHO_C" >&6
 
32128
if test "${ac_cv_header_postgresql_libpq_fe_h+set}" = set; then
 
32129
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32130
else
 
32131
  ac_cv_header_postgresql_libpq_fe_h=$ac_header_preproc
 
32132
fi
 
32133
echo "$as_me:$LINENO: result: $ac_cv_header_postgresql_libpq_fe_h" >&5
 
32134
echo "${ECHO_T}$ac_cv_header_postgresql_libpq_fe_h" >&6
 
32135
 
 
32136
fi
 
32137
if test $ac_cv_header_postgresql_libpq_fe_h = yes; then
 
32138
  echo "$as_me:$LINENO: checking for PQsendQueryPrepared in -lpq" >&5
 
32139
echo $ECHO_N "checking for PQsendQueryPrepared in -lpq... $ECHO_C" >&6
 
32140
if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then
 
32141
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32142
else
 
32143
  ac_check_lib_save_LIBS=$LIBS
 
32144
LIBS="-lpq  $LIBS"
 
32145
cat >conftest.$ac_ext <<_ACEOF
 
32146
/* confdefs.h.  */
 
32147
_ACEOF
 
32148
cat confdefs.h >>conftest.$ac_ext
 
32149
cat >>conftest.$ac_ext <<_ACEOF
 
32150
/* end confdefs.h.  */
 
32151
 
 
32152
/* Override any gcc2 internal prototype to avoid an error.  */
 
32153
#ifdef __cplusplus
 
32154
extern "C"
 
32155
#endif
 
32156
/* We use char because int might match the return type of a gcc2
 
32157
   builtin and then its argument prototype would still apply.  */
 
32158
char PQsendQueryPrepared ();
 
32159
int
 
32160
main ()
 
32161
{
 
32162
PQsendQueryPrepared ();
 
32163
  ;
 
32164
  return 0;
 
32165
}
 
32166
_ACEOF
 
32167
rm -f conftest.$ac_objext conftest$ac_exeext
 
32168
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
32169
  (eval $ac_link) 2>conftest.er1
 
32170
  ac_status=$?
 
32171
  grep -v '^ *+' conftest.er1 >conftest.err
 
32172
  rm -f conftest.er1
 
32173
  cat conftest.err >&5
 
32174
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32175
  (exit $ac_status); } &&
 
32176
         { ac_try='test -z "$ac_c_werror_flag"
 
32177
                         || test ! -s conftest.err'
 
32178
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32179
  (eval $ac_try) 2>&5
 
32180
  ac_status=$?
 
32181
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32182
  (exit $ac_status); }; } &&
 
32183
         { ac_try='test -s conftest$ac_exeext'
 
32184
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32185
  (eval $ac_try) 2>&5
 
32186
  ac_status=$?
 
32187
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32188
  (exit $ac_status); }; }; then
 
32189
  ac_cv_lib_pq_PQsendQueryPrepared=yes
 
32190
else
 
32191
  echo "$as_me: failed program was:" >&5
 
32192
sed 's/^/| /' conftest.$ac_ext >&5
 
32193
 
 
32194
ac_cv_lib_pq_PQsendQueryPrepared=no
 
32195
fi
 
32196
rm -f conftest.err conftest.$ac_objext \
 
32197
      conftest$ac_exeext conftest.$ac_ext
 
32198
LIBS=$ac_check_lib_save_LIBS
 
32199
fi
 
32200
echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
 
32201
echo "${ECHO_T}$ac_cv_lib_pq_PQsendQueryPrepared" >&6
 
32202
if test $ac_cv_lib_pq_PQsendQueryPrepared = yes; then
 
32203
  apu_have_pgsql=1
 
32204
fi
 
32205
 
 
32206
fi
 
32207
 
 
32208
 
 
32209
        if test "$apu_have_pgsql" != "0"; then
 
32210
 
 
32211
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
32212
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include/postgresql\""
 
32213
    APRUTIL_INCLUDES="-I$withval/include/postgresql"
 
32214
  else
 
32215
    apr_addto_bugger="-I$withval/include/postgresql"
 
32216
    for i in $apr_addto_bugger; do
 
32217
      apr_addto_duplicate="0"
 
32218
      for j in $APRUTIL_INCLUDES; do
 
32219
        if test "x$i" = "x$j"; then
 
32220
          apr_addto_duplicate="1"
 
32221
          break
 
32222
        fi
 
32223
      done
 
32224
      if test $apr_addto_duplicate = "0"; then
 
32225
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
32226
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
32227
      fi
 
32228
    done
 
32229
  fi
 
32230
 
 
32231
 
 
32232
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
32233
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
32234
    APRUTIL_LDFLAGS="-L$withval/lib"
 
32235
  else
 
32236
    apr_addto_bugger="-L$withval/lib"
 
32237
    for i in $apr_addto_bugger; do
 
32238
      apr_addto_duplicate="0"
 
32239
      for j in $APRUTIL_LDFLAGS; do
 
32240
        if test "x$i" = "x$j"; then
 
32241
          apr_addto_duplicate="1"
 
32242
          break
 
32243
        fi
 
32244
      done
 
32245
      if test $apr_addto_duplicate = "0"; then
 
32246
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
32247
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
32248
      fi
 
32249
    done
 
32250
  fi
 
32251
 
 
32252
        fi
 
32253
      fi
 
32254
    fi
 
32255
 
 
32256
else
 
32257
 
 
32258
    apu_have_pgsql=0
 
32259
    if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
32260
  echo "$as_me:$LINENO: checking for libpq-fe.h" >&5
 
32261
echo $ECHO_N "checking for libpq-fe.h... $ECHO_C" >&6
 
32262
if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
32263
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32264
fi
 
32265
echo "$as_me:$LINENO: result: $ac_cv_header_libpq_fe_h" >&5
 
32266
echo "${ECHO_T}$ac_cv_header_libpq_fe_h" >&6
 
32267
else
 
32268
  # Is the header compilable?
 
32269
echo "$as_me:$LINENO: checking libpq-fe.h usability" >&5
 
32270
echo $ECHO_N "checking libpq-fe.h usability... $ECHO_C" >&6
 
32271
cat >conftest.$ac_ext <<_ACEOF
 
32272
/* confdefs.h.  */
 
32273
_ACEOF
 
32274
cat confdefs.h >>conftest.$ac_ext
 
32275
cat >>conftest.$ac_ext <<_ACEOF
 
32276
/* end confdefs.h.  */
 
32277
$ac_includes_default
 
32278
#include <libpq-fe.h>
 
32279
_ACEOF
 
32280
rm -f conftest.$ac_objext
 
32281
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
32282
  (eval $ac_compile) 2>conftest.er1
 
32283
  ac_status=$?
 
32284
  grep -v '^ *+' conftest.er1 >conftest.err
 
32285
  rm -f conftest.er1
 
32286
  cat conftest.err >&5
 
32287
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32288
  (exit $ac_status); } &&
 
32289
         { ac_try='test -z "$ac_c_werror_flag"
 
32290
                         || test ! -s conftest.err'
 
32291
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32292
  (eval $ac_try) 2>&5
 
32293
  ac_status=$?
 
32294
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32295
  (exit $ac_status); }; } &&
 
32296
         { ac_try='test -s conftest.$ac_objext'
 
32297
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32298
  (eval $ac_try) 2>&5
 
32299
  ac_status=$?
 
32300
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32301
  (exit $ac_status); }; }; then
 
32302
  ac_header_compiler=yes
 
32303
else
 
32304
  echo "$as_me: failed program was:" >&5
 
32305
sed 's/^/| /' conftest.$ac_ext >&5
 
32306
 
 
32307
ac_header_compiler=no
 
32308
fi
 
32309
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
32310
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
32311
echo "${ECHO_T}$ac_header_compiler" >&6
 
32312
 
 
32313
# Is the header present?
 
32314
echo "$as_me:$LINENO: checking libpq-fe.h presence" >&5
 
32315
echo $ECHO_N "checking libpq-fe.h presence... $ECHO_C" >&6
 
32316
cat >conftest.$ac_ext <<_ACEOF
 
32317
/* confdefs.h.  */
 
32318
_ACEOF
 
32319
cat confdefs.h >>conftest.$ac_ext
 
32320
cat >>conftest.$ac_ext <<_ACEOF
 
32321
/* end confdefs.h.  */
 
32322
#include <libpq-fe.h>
 
32323
_ACEOF
 
32324
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
32325
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
32326
  ac_status=$?
 
32327
  grep -v '^ *+' conftest.er1 >conftest.err
 
32328
  rm -f conftest.er1
 
32329
  cat conftest.err >&5
 
32330
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32331
  (exit $ac_status); } >/dev/null; then
 
32332
  if test -s conftest.err; then
 
32333
    ac_cpp_err=$ac_c_preproc_warn_flag
 
32334
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
32335
  else
 
32336
    ac_cpp_err=
 
32337
  fi
 
32338
else
 
32339
  ac_cpp_err=yes
 
32340
fi
 
32341
if test -z "$ac_cpp_err"; then
 
32342
  ac_header_preproc=yes
 
32343
else
 
32344
  echo "$as_me: failed program was:" >&5
 
32345
sed 's/^/| /' conftest.$ac_ext >&5
 
32346
 
 
32347
  ac_header_preproc=no
 
32348
fi
 
32349
rm -f conftest.err conftest.$ac_ext
 
32350
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
32351
echo "${ECHO_T}$ac_header_preproc" >&6
 
32352
 
 
32353
# So?  What about this header?
 
32354
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
32355
  yes:no: )
 
32356
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
32357
echo "$as_me: WARNING: libpq-fe.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
32358
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: proceeding with the compiler's result" >&5
 
32359
echo "$as_me: WARNING: libpq-fe.h: proceeding with the compiler's result" >&2;}
 
32360
    ac_header_preproc=yes
 
32361
    ;;
 
32362
  no:yes:* )
 
32363
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: present but cannot be compiled" >&5
 
32364
echo "$as_me: WARNING: libpq-fe.h: present but cannot be compiled" >&2;}
 
32365
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h:     check for missing prerequisite headers?" >&5
 
32366
echo "$as_me: WARNING: libpq-fe.h:     check for missing prerequisite headers?" >&2;}
 
32367
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: see the Autoconf documentation" >&5
 
32368
echo "$as_me: WARNING: libpq-fe.h: see the Autoconf documentation" >&2;}
 
32369
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&5
 
32370
echo "$as_me: WARNING: libpq-fe.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
32371
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: proceeding with the preprocessor's result" >&5
 
32372
echo "$as_me: WARNING: libpq-fe.h: proceeding with the preprocessor's result" >&2;}
 
32373
    { echo "$as_me:$LINENO: WARNING: libpq-fe.h: in the future, the compiler will take precedence" >&5
 
32374
echo "$as_me: WARNING: libpq-fe.h: in the future, the compiler will take precedence" >&2;}
 
32375
    (
 
32376
      cat <<\_ASBOX
 
32377
## ------------------------------------------ ##
 
32378
## Report this to the AC_PACKAGE_NAME lists.  ##
 
32379
## ------------------------------------------ ##
 
32380
_ASBOX
 
32381
    ) |
 
32382
      sed "s/^/$as_me: WARNING:     /" >&2
 
32383
    ;;
 
32384
esac
 
32385
echo "$as_me:$LINENO: checking for libpq-fe.h" >&5
 
32386
echo $ECHO_N "checking for libpq-fe.h... $ECHO_C" >&6
 
32387
if test "${ac_cv_header_libpq_fe_h+set}" = set; then
 
32388
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32389
else
 
32390
  ac_cv_header_libpq_fe_h=$ac_header_preproc
 
32391
fi
 
32392
echo "$as_me:$LINENO: result: $ac_cv_header_libpq_fe_h" >&5
 
32393
echo "${ECHO_T}$ac_cv_header_libpq_fe_h" >&6
 
32394
 
 
32395
fi
 
32396
if test $ac_cv_header_libpq_fe_h = yes; then
 
32397
  echo "$as_me:$LINENO: checking for PQsendQueryPrepared in -lpq" >&5
 
32398
echo $ECHO_N "checking for PQsendQueryPrepared in -lpq... $ECHO_C" >&6
 
32399
if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then
 
32400
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32401
else
 
32402
  ac_check_lib_save_LIBS=$LIBS
 
32403
LIBS="-lpq  $LIBS"
 
32404
cat >conftest.$ac_ext <<_ACEOF
 
32405
/* confdefs.h.  */
 
32406
_ACEOF
 
32407
cat confdefs.h >>conftest.$ac_ext
 
32408
cat >>conftest.$ac_ext <<_ACEOF
 
32409
/* end confdefs.h.  */
 
32410
 
 
32411
/* Override any gcc2 internal prototype to avoid an error.  */
 
32412
#ifdef __cplusplus
 
32413
extern "C"
 
32414
#endif
 
32415
/* We use char because int might match the return type of a gcc2
 
32416
   builtin and then its argument prototype would still apply.  */
 
32417
char PQsendQueryPrepared ();
 
32418
int
 
32419
main ()
 
32420
{
 
32421
PQsendQueryPrepared ();
 
32422
  ;
 
32423
  return 0;
 
32424
}
 
32425
_ACEOF
 
32426
rm -f conftest.$ac_objext conftest$ac_exeext
 
32427
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
32428
  (eval $ac_link) 2>conftest.er1
 
32429
  ac_status=$?
 
32430
  grep -v '^ *+' conftest.er1 >conftest.err
 
32431
  rm -f conftest.er1
 
32432
  cat conftest.err >&5
 
32433
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32434
  (exit $ac_status); } &&
 
32435
         { ac_try='test -z "$ac_c_werror_flag"
 
32436
                         || test ! -s conftest.err'
 
32437
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32438
  (eval $ac_try) 2>&5
 
32439
  ac_status=$?
 
32440
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32441
  (exit $ac_status); }; } &&
 
32442
         { ac_try='test -s conftest$ac_exeext'
 
32443
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32444
  (eval $ac_try) 2>&5
 
32445
  ac_status=$?
 
32446
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32447
  (exit $ac_status); }; }; then
 
32448
  ac_cv_lib_pq_PQsendQueryPrepared=yes
 
32449
else
 
32450
  echo "$as_me: failed program was:" >&5
 
32451
sed 's/^/| /' conftest.$ac_ext >&5
 
32452
 
 
32453
ac_cv_lib_pq_PQsendQueryPrepared=no
 
32454
fi
 
32455
rm -f conftest.err conftest.$ac_objext \
 
32456
      conftest$ac_exeext conftest.$ac_ext
 
32457
LIBS=$ac_check_lib_save_LIBS
 
32458
fi
 
32459
echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
 
32460
echo "${ECHO_T}$ac_cv_lib_pq_PQsendQueryPrepared" >&6
 
32461
if test $ac_cv_lib_pq_PQsendQueryPrepared = yes; then
 
32462
  apu_have_pgsql=1
 
32463
fi
 
32464
 
 
32465
fi
 
32466
 
 
32467
 
 
32468
 
 
32469
fi;
 
32470
 
 
32471
      if test "$apu_have_pgsql" = "1"; then
 
32472
 
 
32473
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
32474
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-lpq\""
 
32475
    APRUTIL_EXPORT_LIBS="-lpq"
 
32476
  else
 
32477
    apr_addto_bugger="-lpq"
 
32478
    for i in $apr_addto_bugger; do
 
32479
      apr_addto_duplicate="0"
 
32480
      for j in $APRUTIL_EXPORT_LIBS; do
 
32481
        if test "x$i" = "x$j"; then
 
32482
          apr_addto_duplicate="1"
 
32483
          break
 
32484
        fi
 
32485
      done
 
32486
      if test $apr_addto_duplicate = "0"; then
 
32487
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
32488
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
32489
      fi
 
32490
    done
 
32491
  fi
 
32492
 
 
32493
 
 
32494
  if test "x$APRUTIL_LIBS" = "x"; then
 
32495
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-lpq\""
 
32496
    APRUTIL_LIBS="-lpq"
 
32497
  else
 
32498
    apr_addto_bugger="-lpq"
 
32499
    for i in $apr_addto_bugger; do
 
32500
      apr_addto_duplicate="0"
 
32501
      for j in $APRUTIL_LIBS; do
 
32502
        if test "x$i" = "x$j"; then
 
32503
          apr_addto_duplicate="1"
 
32504
          break
 
32505
        fi
 
32506
      done
 
32507
      if test $apr_addto_duplicate = "0"; then
 
32508
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
32509
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
32510
      fi
 
32511
    done
 
32512
  fi
 
32513
 
 
32514
  fi
 
32515
 
 
32516
 
 
32517
  apu_have_mysql=0
 
32518
 
 
32519
 
 
32520
# Check whether --with-mysql or --without-mysql was given.
 
32521
if test "${with_mysql+set}" = set; then
 
32522
  withval="$with_mysql"
 
32523
 
 
32524
    apu_have_mysql=0
 
32525
    if test "$withval" = "yes"; then
 
32526
      if test "${ac_cv_header_mysql_h+set}" = set; then
 
32527
  echo "$as_me:$LINENO: checking for mysql.h" >&5
 
32528
echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6
 
32529
if test "${ac_cv_header_mysql_h+set}" = set; then
 
32530
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32531
fi
 
32532
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_h" >&5
 
32533
echo "${ECHO_T}$ac_cv_header_mysql_h" >&6
 
32534
else
 
32535
  # Is the header compilable?
 
32536
echo "$as_me:$LINENO: checking mysql.h usability" >&5
 
32537
echo $ECHO_N "checking mysql.h usability... $ECHO_C" >&6
 
32538
cat >conftest.$ac_ext <<_ACEOF
 
32539
/* confdefs.h.  */
 
32540
_ACEOF
 
32541
cat confdefs.h >>conftest.$ac_ext
 
32542
cat >>conftest.$ac_ext <<_ACEOF
 
32543
/* end confdefs.h.  */
 
32544
$ac_includes_default
 
32545
#include <mysql.h>
 
32546
_ACEOF
 
32547
rm -f conftest.$ac_objext
 
32548
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
32549
  (eval $ac_compile) 2>conftest.er1
 
32550
  ac_status=$?
 
32551
  grep -v '^ *+' conftest.er1 >conftest.err
 
32552
  rm -f conftest.er1
 
32553
  cat conftest.err >&5
 
32554
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32555
  (exit $ac_status); } &&
 
32556
         { ac_try='test -z "$ac_c_werror_flag"
 
32557
                         || test ! -s conftest.err'
 
32558
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32559
  (eval $ac_try) 2>&5
 
32560
  ac_status=$?
 
32561
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32562
  (exit $ac_status); }; } &&
 
32563
         { ac_try='test -s conftest.$ac_objext'
 
32564
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32565
  (eval $ac_try) 2>&5
 
32566
  ac_status=$?
 
32567
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32568
  (exit $ac_status); }; }; then
 
32569
  ac_header_compiler=yes
 
32570
else
 
32571
  echo "$as_me: failed program was:" >&5
 
32572
sed 's/^/| /' conftest.$ac_ext >&5
 
32573
 
 
32574
ac_header_compiler=no
 
32575
fi
 
32576
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
32577
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
32578
echo "${ECHO_T}$ac_header_compiler" >&6
 
32579
 
 
32580
# Is the header present?
 
32581
echo "$as_me:$LINENO: checking mysql.h presence" >&5
 
32582
echo $ECHO_N "checking mysql.h presence... $ECHO_C" >&6
 
32583
cat >conftest.$ac_ext <<_ACEOF
 
32584
/* confdefs.h.  */
 
32585
_ACEOF
 
32586
cat confdefs.h >>conftest.$ac_ext
 
32587
cat >>conftest.$ac_ext <<_ACEOF
 
32588
/* end confdefs.h.  */
 
32589
#include <mysql.h>
 
32590
_ACEOF
 
32591
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
32592
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
32593
  ac_status=$?
 
32594
  grep -v '^ *+' conftest.er1 >conftest.err
 
32595
  rm -f conftest.er1
 
32596
  cat conftest.err >&5
 
32597
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32598
  (exit $ac_status); } >/dev/null; then
 
32599
  if test -s conftest.err; then
 
32600
    ac_cpp_err=$ac_c_preproc_warn_flag
 
32601
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
32602
  else
 
32603
    ac_cpp_err=
 
32604
  fi
 
32605
else
 
32606
  ac_cpp_err=yes
 
32607
fi
 
32608
if test -z "$ac_cpp_err"; then
 
32609
  ac_header_preproc=yes
 
32610
else
 
32611
  echo "$as_me: failed program was:" >&5
 
32612
sed 's/^/| /' conftest.$ac_ext >&5
 
32613
 
 
32614
  ac_header_preproc=no
 
32615
fi
 
32616
rm -f conftest.err conftest.$ac_ext
 
32617
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
32618
echo "${ECHO_T}$ac_header_preproc" >&6
 
32619
 
 
32620
# So?  What about this header?
 
32621
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
32622
  yes:no: )
 
32623
    { echo "$as_me:$LINENO: WARNING: mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
32624
echo "$as_me: WARNING: mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
32625
    { echo "$as_me:$LINENO: WARNING: mysql.h: proceeding with the compiler's result" >&5
 
32626
echo "$as_me: WARNING: mysql.h: proceeding with the compiler's result" >&2;}
 
32627
    ac_header_preproc=yes
 
32628
    ;;
 
32629
  no:yes:* )
 
32630
    { echo "$as_me:$LINENO: WARNING: mysql.h: present but cannot be compiled" >&5
 
32631
echo "$as_me: WARNING: mysql.h: present but cannot be compiled" >&2;}
 
32632
    { echo "$as_me:$LINENO: WARNING: mysql.h:     check for missing prerequisite headers?" >&5
 
32633
echo "$as_me: WARNING: mysql.h:     check for missing prerequisite headers?" >&2;}
 
32634
    { echo "$as_me:$LINENO: WARNING: mysql.h: see the Autoconf documentation" >&5
 
32635
echo "$as_me: WARNING: mysql.h: see the Autoconf documentation" >&2;}
 
32636
    { echo "$as_me:$LINENO: WARNING: mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
 
32637
echo "$as_me: WARNING: mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
32638
    { echo "$as_me:$LINENO: WARNING: mysql.h: proceeding with the preprocessor's result" >&5
 
32639
echo "$as_me: WARNING: mysql.h: proceeding with the preprocessor's result" >&2;}
 
32640
    { echo "$as_me:$LINENO: WARNING: mysql.h: in the future, the compiler will take precedence" >&5
 
32641
echo "$as_me: WARNING: mysql.h: in the future, the compiler will take precedence" >&2;}
 
32642
    (
 
32643
      cat <<\_ASBOX
 
32644
## ------------------------------------------ ##
 
32645
## Report this to the AC_PACKAGE_NAME lists.  ##
 
32646
## ------------------------------------------ ##
 
32647
_ASBOX
 
32648
    ) |
 
32649
      sed "s/^/$as_me: WARNING:     /" >&2
 
32650
    ;;
 
32651
esac
 
32652
echo "$as_me:$LINENO: checking for mysql.h" >&5
 
32653
echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6
 
32654
if test "${ac_cv_header_mysql_h+set}" = set; then
 
32655
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32656
else
 
32657
  ac_cv_header_mysql_h=$ac_header_preproc
 
32658
fi
 
32659
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_h" >&5
 
32660
echo "${ECHO_T}$ac_cv_header_mysql_h" >&6
 
32661
 
 
32662
fi
 
32663
if test $ac_cv_header_mysql_h = yes; then
 
32664
  echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient_r" >&5
 
32665
echo $ECHO_N "checking for mysql_init in -lmysqlclient_r... $ECHO_C" >&6
 
32666
if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then
 
32667
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32668
else
 
32669
  ac_check_lib_save_LIBS=$LIBS
 
32670
LIBS="-lmysqlclient_r  $LIBS"
 
32671
cat >conftest.$ac_ext <<_ACEOF
 
32672
/* confdefs.h.  */
 
32673
_ACEOF
 
32674
cat confdefs.h >>conftest.$ac_ext
 
32675
cat >>conftest.$ac_ext <<_ACEOF
 
32676
/* end confdefs.h.  */
 
32677
 
 
32678
/* Override any gcc2 internal prototype to avoid an error.  */
 
32679
#ifdef __cplusplus
 
32680
extern "C"
 
32681
#endif
 
32682
/* We use char because int might match the return type of a gcc2
 
32683
   builtin and then its argument prototype would still apply.  */
 
32684
char mysql_init ();
 
32685
int
 
32686
main ()
 
32687
{
 
32688
mysql_init ();
 
32689
  ;
 
32690
  return 0;
 
32691
}
 
32692
_ACEOF
 
32693
rm -f conftest.$ac_objext conftest$ac_exeext
 
32694
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
32695
  (eval $ac_link) 2>conftest.er1
 
32696
  ac_status=$?
 
32697
  grep -v '^ *+' conftest.er1 >conftest.err
 
32698
  rm -f conftest.er1
 
32699
  cat conftest.err >&5
 
32700
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32701
  (exit $ac_status); } &&
 
32702
         { ac_try='test -z "$ac_c_werror_flag"
 
32703
                         || test ! -s conftest.err'
 
32704
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32705
  (eval $ac_try) 2>&5
 
32706
  ac_status=$?
 
32707
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32708
  (exit $ac_status); }; } &&
 
32709
         { ac_try='test -s conftest$ac_exeext'
 
32710
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32711
  (eval $ac_try) 2>&5
 
32712
  ac_status=$?
 
32713
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32714
  (exit $ac_status); }; }; then
 
32715
  ac_cv_lib_mysqlclient_r_mysql_init=yes
 
32716
else
 
32717
  echo "$as_me: failed program was:" >&5
 
32718
sed 's/^/| /' conftest.$ac_ext >&5
 
32719
 
 
32720
ac_cv_lib_mysqlclient_r_mysql_init=no
 
32721
fi
 
32722
rm -f conftest.err conftest.$ac_objext \
 
32723
      conftest$ac_exeext conftest.$ac_ext
 
32724
LIBS=$ac_check_lib_save_LIBS
 
32725
fi
 
32726
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
 
32727
echo "${ECHO_T}$ac_cv_lib_mysqlclient_r_mysql_init" >&6
 
32728
if test $ac_cv_lib_mysqlclient_r_mysql_init = yes; then
 
32729
  apu_have_mysql=1
 
32730
fi
 
32731
 
 
32732
fi
 
32733
 
 
32734
 
 
32735
      if test "$apu_have_mysql" == "0"; then
 
32736
        if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
 
32737
  echo "$as_me:$LINENO: checking for mysql/mysql.h" >&5
 
32738
echo $ECHO_N "checking for mysql/mysql.h... $ECHO_C" >&6
 
32739
if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
 
32740
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32741
fi
 
32742
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_mysql_h" >&5
 
32743
echo "${ECHO_T}$ac_cv_header_mysql_mysql_h" >&6
 
32744
else
 
32745
  # Is the header compilable?
 
32746
echo "$as_me:$LINENO: checking mysql/mysql.h usability" >&5
 
32747
echo $ECHO_N "checking mysql/mysql.h usability... $ECHO_C" >&6
 
32748
cat >conftest.$ac_ext <<_ACEOF
 
32749
/* confdefs.h.  */
 
32750
_ACEOF
 
32751
cat confdefs.h >>conftest.$ac_ext
 
32752
cat >>conftest.$ac_ext <<_ACEOF
 
32753
/* end confdefs.h.  */
 
32754
$ac_includes_default
 
32755
#include <mysql/mysql.h>
 
32756
_ACEOF
 
32757
rm -f conftest.$ac_objext
 
32758
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
32759
  (eval $ac_compile) 2>conftest.er1
 
32760
  ac_status=$?
 
32761
  grep -v '^ *+' conftest.er1 >conftest.err
 
32762
  rm -f conftest.er1
 
32763
  cat conftest.err >&5
 
32764
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32765
  (exit $ac_status); } &&
 
32766
         { ac_try='test -z "$ac_c_werror_flag"
 
32767
                         || test ! -s conftest.err'
 
32768
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32769
  (eval $ac_try) 2>&5
 
32770
  ac_status=$?
 
32771
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32772
  (exit $ac_status); }; } &&
 
32773
         { ac_try='test -s conftest.$ac_objext'
 
32774
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32775
  (eval $ac_try) 2>&5
 
32776
  ac_status=$?
 
32777
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32778
  (exit $ac_status); }; }; then
 
32779
  ac_header_compiler=yes
 
32780
else
 
32781
  echo "$as_me: failed program was:" >&5
 
32782
sed 's/^/| /' conftest.$ac_ext >&5
 
32783
 
 
32784
ac_header_compiler=no
 
32785
fi
 
32786
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
32787
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
32788
echo "${ECHO_T}$ac_header_compiler" >&6
 
32789
 
 
32790
# Is the header present?
 
32791
echo "$as_me:$LINENO: checking mysql/mysql.h presence" >&5
 
32792
echo $ECHO_N "checking mysql/mysql.h presence... $ECHO_C" >&6
 
32793
cat >conftest.$ac_ext <<_ACEOF
 
32794
/* confdefs.h.  */
 
32795
_ACEOF
 
32796
cat confdefs.h >>conftest.$ac_ext
 
32797
cat >>conftest.$ac_ext <<_ACEOF
 
32798
/* end confdefs.h.  */
 
32799
#include <mysql/mysql.h>
 
32800
_ACEOF
 
32801
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
32802
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
32803
  ac_status=$?
 
32804
  grep -v '^ *+' conftest.er1 >conftest.err
 
32805
  rm -f conftest.er1
 
32806
  cat conftest.err >&5
 
32807
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32808
  (exit $ac_status); } >/dev/null; then
 
32809
  if test -s conftest.err; then
 
32810
    ac_cpp_err=$ac_c_preproc_warn_flag
 
32811
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
32812
  else
 
32813
    ac_cpp_err=
 
32814
  fi
 
32815
else
 
32816
  ac_cpp_err=yes
 
32817
fi
 
32818
if test -z "$ac_cpp_err"; then
 
32819
  ac_header_preproc=yes
 
32820
else
 
32821
  echo "$as_me: failed program was:" >&5
 
32822
sed 's/^/| /' conftest.$ac_ext >&5
 
32823
 
 
32824
  ac_header_preproc=no
 
32825
fi
 
32826
rm -f conftest.err conftest.$ac_ext
 
32827
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
32828
echo "${ECHO_T}$ac_header_preproc" >&6
 
32829
 
 
32830
# So?  What about this header?
 
32831
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
32832
  yes:no: )
 
32833
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
32834
echo "$as_me: WARNING: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
32835
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: proceeding with the compiler's result" >&5
 
32836
echo "$as_me: WARNING: mysql/mysql.h: proceeding with the compiler's result" >&2;}
 
32837
    ac_header_preproc=yes
 
32838
    ;;
 
32839
  no:yes:* )
 
32840
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: present but cannot be compiled" >&5
 
32841
echo "$as_me: WARNING: mysql/mysql.h: present but cannot be compiled" >&2;}
 
32842
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h:     check for missing prerequisite headers?" >&5
 
32843
echo "$as_me: WARNING: mysql/mysql.h:     check for missing prerequisite headers?" >&2;}
 
32844
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: see the Autoconf documentation" >&5
 
32845
echo "$as_me: WARNING: mysql/mysql.h: see the Autoconf documentation" >&2;}
 
32846
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
 
32847
echo "$as_me: WARNING: mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
32848
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: proceeding with the preprocessor's result" >&5
 
32849
echo "$as_me: WARNING: mysql/mysql.h: proceeding with the preprocessor's result" >&2;}
 
32850
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: in the future, the compiler will take precedence" >&5
 
32851
echo "$as_me: WARNING: mysql/mysql.h: in the future, the compiler will take precedence" >&2;}
 
32852
    (
 
32853
      cat <<\_ASBOX
 
32854
## ------------------------------------------ ##
 
32855
## Report this to the AC_PACKAGE_NAME lists.  ##
 
32856
## ------------------------------------------ ##
 
32857
_ASBOX
 
32858
    ) |
 
32859
      sed "s/^/$as_me: WARNING:     /" >&2
 
32860
    ;;
 
32861
esac
 
32862
echo "$as_me:$LINENO: checking for mysql/mysql.h" >&5
 
32863
echo $ECHO_N "checking for mysql/mysql.h... $ECHO_C" >&6
 
32864
if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
 
32865
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32866
else
 
32867
  ac_cv_header_mysql_mysql_h=$ac_header_preproc
 
32868
fi
 
32869
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_mysql_h" >&5
 
32870
echo "${ECHO_T}$ac_cv_header_mysql_mysql_h" >&6
 
32871
 
 
32872
fi
 
32873
if test $ac_cv_header_mysql_mysql_h = yes; then
 
32874
  echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient_r" >&5
 
32875
echo $ECHO_N "checking for mysql_init in -lmysqlclient_r... $ECHO_C" >&6
 
32876
if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then
 
32877
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32878
else
 
32879
  ac_check_lib_save_LIBS=$LIBS
 
32880
LIBS="-lmysqlclient_r  $LIBS"
 
32881
cat >conftest.$ac_ext <<_ACEOF
 
32882
/* confdefs.h.  */
 
32883
_ACEOF
 
32884
cat confdefs.h >>conftest.$ac_ext
 
32885
cat >>conftest.$ac_ext <<_ACEOF
 
32886
/* end confdefs.h.  */
 
32887
 
 
32888
/* Override any gcc2 internal prototype to avoid an error.  */
 
32889
#ifdef __cplusplus
 
32890
extern "C"
 
32891
#endif
 
32892
/* We use char because int might match the return type of a gcc2
 
32893
   builtin and then its argument prototype would still apply.  */
 
32894
char mysql_init ();
 
32895
int
 
32896
main ()
 
32897
{
 
32898
mysql_init ();
 
32899
  ;
 
32900
  return 0;
 
32901
}
 
32902
_ACEOF
 
32903
rm -f conftest.$ac_objext conftest$ac_exeext
 
32904
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
32905
  (eval $ac_link) 2>conftest.er1
 
32906
  ac_status=$?
 
32907
  grep -v '^ *+' conftest.er1 >conftest.err
 
32908
  rm -f conftest.er1
 
32909
  cat conftest.err >&5
 
32910
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32911
  (exit $ac_status); } &&
 
32912
         { ac_try='test -z "$ac_c_werror_flag"
 
32913
                         || test ! -s conftest.err'
 
32914
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32915
  (eval $ac_try) 2>&5
 
32916
  ac_status=$?
 
32917
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32918
  (exit $ac_status); }; } &&
 
32919
         { ac_try='test -s conftest$ac_exeext'
 
32920
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
32921
  (eval $ac_try) 2>&5
 
32922
  ac_status=$?
 
32923
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
32924
  (exit $ac_status); }; }; then
 
32925
  ac_cv_lib_mysqlclient_r_mysql_init=yes
 
32926
else
 
32927
  echo "$as_me: failed program was:" >&5
 
32928
sed 's/^/| /' conftest.$ac_ext >&5
 
32929
 
 
32930
ac_cv_lib_mysqlclient_r_mysql_init=no
 
32931
fi
 
32932
rm -f conftest.err conftest.$ac_objext \
 
32933
      conftest$ac_exeext conftest.$ac_ext
 
32934
LIBS=$ac_check_lib_save_LIBS
 
32935
fi
 
32936
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
 
32937
echo "${ECHO_T}$ac_cv_lib_mysqlclient_r_mysql_init" >&6
 
32938
if test $ac_cv_lib_mysqlclient_r_mysql_init = yes; then
 
32939
  apu_have_mysql=1
 
32940
fi
 
32941
 
 
32942
fi
 
32943
 
 
32944
 
 
32945
        if test "$apu_have_mysql" != "0"; then
 
32946
 
 
32947
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
32948
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include/myql\""
 
32949
    APRUTIL_INCLUDES="-I$withval/include/myql"
 
32950
  else
 
32951
    apr_addto_bugger="-I$withval/include/myql"
 
32952
    for i in $apr_addto_bugger; do
 
32953
      apr_addto_duplicate="0"
 
32954
      for j in $APRUTIL_INCLUDES; do
 
32955
        if test "x$i" = "x$j"; then
 
32956
          apr_addto_duplicate="1"
 
32957
          break
 
32958
        fi
 
32959
      done
 
32960
      if test $apr_addto_duplicate = "0"; then
 
32961
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
32962
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
32963
      fi
 
32964
    done
 
32965
  fi
 
32966
 
 
32967
        fi
 
32968
      fi
 
32969
    elif test "$withval" = "no"; then
 
32970
      apu_have_mysql=0
 
32971
    else
 
32972
      CPPFLAGS="-I$withval/include"
 
32973
      LIBS="-L$withval/lib "
 
32974
 
 
32975
      { echo "$as_me:$LINENO: checking for mysql in $withval" >&5
 
32976
echo "$as_me: checking for mysql in $withval" >&6;}
 
32977
      if test "${ac_cv_header_mysql_h+set}" = set; then
 
32978
  echo "$as_me:$LINENO: checking for mysql.h" >&5
 
32979
echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6
 
32980
if test "${ac_cv_header_mysql_h+set}" = set; then
 
32981
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
32982
fi
 
32983
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_h" >&5
 
32984
echo "${ECHO_T}$ac_cv_header_mysql_h" >&6
 
32985
else
 
32986
  # Is the header compilable?
 
32987
echo "$as_me:$LINENO: checking mysql.h usability" >&5
 
32988
echo $ECHO_N "checking mysql.h usability... $ECHO_C" >&6
 
32989
cat >conftest.$ac_ext <<_ACEOF
 
32990
/* confdefs.h.  */
 
32991
_ACEOF
 
32992
cat confdefs.h >>conftest.$ac_ext
 
32993
cat >>conftest.$ac_ext <<_ACEOF
 
32994
/* end confdefs.h.  */
 
32995
$ac_includes_default
 
32996
#include <mysql.h>
 
32997
_ACEOF
 
32998
rm -f conftest.$ac_objext
 
32999
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
33000
  (eval $ac_compile) 2>conftest.er1
 
33001
  ac_status=$?
 
33002
  grep -v '^ *+' conftest.er1 >conftest.err
 
33003
  rm -f conftest.er1
 
33004
  cat conftest.err >&5
 
33005
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33006
  (exit $ac_status); } &&
 
33007
         { ac_try='test -z "$ac_c_werror_flag"
 
33008
                         || test ! -s conftest.err'
 
33009
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33010
  (eval $ac_try) 2>&5
 
33011
  ac_status=$?
 
33012
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33013
  (exit $ac_status); }; } &&
 
33014
         { ac_try='test -s conftest.$ac_objext'
 
33015
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33016
  (eval $ac_try) 2>&5
 
33017
  ac_status=$?
 
33018
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33019
  (exit $ac_status); }; }; then
 
33020
  ac_header_compiler=yes
 
33021
else
 
33022
  echo "$as_me: failed program was:" >&5
 
33023
sed 's/^/| /' conftest.$ac_ext >&5
 
33024
 
 
33025
ac_header_compiler=no
 
33026
fi
 
33027
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
33028
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
33029
echo "${ECHO_T}$ac_header_compiler" >&6
 
33030
 
 
33031
# Is the header present?
 
33032
echo "$as_me:$LINENO: checking mysql.h presence" >&5
 
33033
echo $ECHO_N "checking mysql.h presence... $ECHO_C" >&6
 
33034
cat >conftest.$ac_ext <<_ACEOF
 
33035
/* confdefs.h.  */
 
33036
_ACEOF
 
33037
cat confdefs.h >>conftest.$ac_ext
 
33038
cat >>conftest.$ac_ext <<_ACEOF
 
33039
/* end confdefs.h.  */
 
33040
#include <mysql.h>
 
33041
_ACEOF
 
33042
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
33043
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
33044
  ac_status=$?
 
33045
  grep -v '^ *+' conftest.er1 >conftest.err
 
33046
  rm -f conftest.er1
 
33047
  cat conftest.err >&5
 
33048
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33049
  (exit $ac_status); } >/dev/null; then
 
33050
  if test -s conftest.err; then
 
33051
    ac_cpp_err=$ac_c_preproc_warn_flag
 
33052
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
33053
  else
 
33054
    ac_cpp_err=
 
33055
  fi
 
33056
else
 
33057
  ac_cpp_err=yes
 
33058
fi
 
33059
if test -z "$ac_cpp_err"; then
 
33060
  ac_header_preproc=yes
 
33061
else
 
33062
  echo "$as_me: failed program was:" >&5
 
33063
sed 's/^/| /' conftest.$ac_ext >&5
 
33064
 
 
33065
  ac_header_preproc=no
 
33066
fi
 
33067
rm -f conftest.err conftest.$ac_ext
 
33068
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
33069
echo "${ECHO_T}$ac_header_preproc" >&6
 
33070
 
 
33071
# So?  What about this header?
 
33072
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
33073
  yes:no: )
 
33074
    { echo "$as_me:$LINENO: WARNING: mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
33075
echo "$as_me: WARNING: mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
33076
    { echo "$as_me:$LINENO: WARNING: mysql.h: proceeding with the compiler's result" >&5
 
33077
echo "$as_me: WARNING: mysql.h: proceeding with the compiler's result" >&2;}
 
33078
    ac_header_preproc=yes
 
33079
    ;;
 
33080
  no:yes:* )
 
33081
    { echo "$as_me:$LINENO: WARNING: mysql.h: present but cannot be compiled" >&5
 
33082
echo "$as_me: WARNING: mysql.h: present but cannot be compiled" >&2;}
 
33083
    { echo "$as_me:$LINENO: WARNING: mysql.h:     check for missing prerequisite headers?" >&5
 
33084
echo "$as_me: WARNING: mysql.h:     check for missing prerequisite headers?" >&2;}
 
33085
    { echo "$as_me:$LINENO: WARNING: mysql.h: see the Autoconf documentation" >&5
 
33086
echo "$as_me: WARNING: mysql.h: see the Autoconf documentation" >&2;}
 
33087
    { echo "$as_me:$LINENO: WARNING: mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
 
33088
echo "$as_me: WARNING: mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
33089
    { echo "$as_me:$LINENO: WARNING: mysql.h: proceeding with the preprocessor's result" >&5
 
33090
echo "$as_me: WARNING: mysql.h: proceeding with the preprocessor's result" >&2;}
 
33091
    { echo "$as_me:$LINENO: WARNING: mysql.h: in the future, the compiler will take precedence" >&5
 
33092
echo "$as_me: WARNING: mysql.h: in the future, the compiler will take precedence" >&2;}
 
33093
    (
 
33094
      cat <<\_ASBOX
 
33095
## ------------------------------------------ ##
 
33096
## Report this to the AC_PACKAGE_NAME lists.  ##
 
33097
## ------------------------------------------ ##
 
33098
_ASBOX
 
33099
    ) |
 
33100
      sed "s/^/$as_me: WARNING:     /" >&2
 
33101
    ;;
 
33102
esac
 
33103
echo "$as_me:$LINENO: checking for mysql.h" >&5
 
33104
echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6
 
33105
if test "${ac_cv_header_mysql_h+set}" = set; then
 
33106
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33107
else
 
33108
  ac_cv_header_mysql_h=$ac_header_preproc
 
33109
fi
 
33110
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_h" >&5
 
33111
echo "${ECHO_T}$ac_cv_header_mysql_h" >&6
 
33112
 
 
33113
fi
 
33114
if test $ac_cv_header_mysql_h = yes; then
 
33115
  echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient_r" >&5
 
33116
echo $ECHO_N "checking for mysql_init in -lmysqlclient_r... $ECHO_C" >&6
 
33117
if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then
 
33118
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33119
else
 
33120
  ac_check_lib_save_LIBS=$LIBS
 
33121
LIBS="-lmysqlclient_r  $LIBS"
 
33122
cat >conftest.$ac_ext <<_ACEOF
 
33123
/* confdefs.h.  */
 
33124
_ACEOF
 
33125
cat confdefs.h >>conftest.$ac_ext
 
33126
cat >>conftest.$ac_ext <<_ACEOF
 
33127
/* end confdefs.h.  */
 
33128
 
 
33129
/* Override any gcc2 internal prototype to avoid an error.  */
 
33130
#ifdef __cplusplus
 
33131
extern "C"
 
33132
#endif
 
33133
/* We use char because int might match the return type of a gcc2
 
33134
   builtin and then its argument prototype would still apply.  */
 
33135
char mysql_init ();
 
33136
int
 
33137
main ()
 
33138
{
 
33139
mysql_init ();
 
33140
  ;
 
33141
  return 0;
 
33142
}
 
33143
_ACEOF
 
33144
rm -f conftest.$ac_objext conftest$ac_exeext
 
33145
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
33146
  (eval $ac_link) 2>conftest.er1
 
33147
  ac_status=$?
 
33148
  grep -v '^ *+' conftest.er1 >conftest.err
 
33149
  rm -f conftest.er1
 
33150
  cat conftest.err >&5
 
33151
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33152
  (exit $ac_status); } &&
 
33153
         { ac_try='test -z "$ac_c_werror_flag"
 
33154
                         || test ! -s conftest.err'
 
33155
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33156
  (eval $ac_try) 2>&5
 
33157
  ac_status=$?
 
33158
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33159
  (exit $ac_status); }; } &&
 
33160
         { ac_try='test -s conftest$ac_exeext'
 
33161
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33162
  (eval $ac_try) 2>&5
 
33163
  ac_status=$?
 
33164
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33165
  (exit $ac_status); }; }; then
 
33166
  ac_cv_lib_mysqlclient_r_mysql_init=yes
 
33167
else
 
33168
  echo "$as_me: failed program was:" >&5
 
33169
sed 's/^/| /' conftest.$ac_ext >&5
 
33170
 
 
33171
ac_cv_lib_mysqlclient_r_mysql_init=no
 
33172
fi
 
33173
rm -f conftest.err conftest.$ac_objext \
 
33174
      conftest$ac_exeext conftest.$ac_ext
 
33175
LIBS=$ac_check_lib_save_LIBS
 
33176
fi
 
33177
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
 
33178
echo "${ECHO_T}$ac_cv_lib_mysqlclient_r_mysql_init" >&6
 
33179
if test $ac_cv_lib_mysqlclient_r_mysql_init = yes; then
 
33180
  apu_have_mysql=1
 
33181
fi
 
33182
 
 
33183
fi
 
33184
 
 
33185
 
 
33186
      if test "$apu_have_mysql" != "0"; then
 
33187
 
 
33188
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
33189
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
33190
    APRUTIL_LDFLAGS="-L$withval/lib"
 
33191
  else
 
33192
    apr_addto_bugger="-L$withval/lib"
 
33193
    for i in $apr_addto_bugger; do
 
33194
      apr_addto_duplicate="0"
 
33195
      for j in $APRUTIL_LDFLAGS; do
 
33196
        if test "x$i" = "x$j"; then
 
33197
          apr_addto_duplicate="1"
 
33198
          break
 
33199
        fi
 
33200
      done
 
33201
      if test $apr_addto_duplicate = "0"; then
 
33202
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
33203
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
33204
      fi
 
33205
    done
 
33206
  fi
 
33207
 
 
33208
 
 
33209
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
33210
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
33211
    APRUTIL_INCLUDES="-I$withval/include"
 
33212
  else
 
33213
    apr_addto_bugger="-I$withval/include"
 
33214
    for i in $apr_addto_bugger; do
 
33215
      apr_addto_duplicate="0"
 
33216
      for j in $APRUTIL_INCLUDES; do
 
33217
        if test "x$i" = "x$j"; then
 
33218
          apr_addto_duplicate="1"
 
33219
          break
 
33220
        fi
 
33221
      done
 
33222
      if test $apr_addto_duplicate = "0"; then
 
33223
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
33224
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
33225
      fi
 
33226
    done
 
33227
  fi
 
33228
 
 
33229
      fi
 
33230
 
 
33231
      if test "$apu_have_mysql" != "1"; then
 
33232
        if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
 
33233
  echo "$as_me:$LINENO: checking for mysql/mysql.h" >&5
 
33234
echo $ECHO_N "checking for mysql/mysql.h... $ECHO_C" >&6
 
33235
if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
 
33236
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33237
fi
 
33238
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_mysql_h" >&5
 
33239
echo "${ECHO_T}$ac_cv_header_mysql_mysql_h" >&6
 
33240
else
 
33241
  # Is the header compilable?
 
33242
echo "$as_me:$LINENO: checking mysql/mysql.h usability" >&5
 
33243
echo $ECHO_N "checking mysql/mysql.h usability... $ECHO_C" >&6
 
33244
cat >conftest.$ac_ext <<_ACEOF
 
33245
/* confdefs.h.  */
 
33246
_ACEOF
 
33247
cat confdefs.h >>conftest.$ac_ext
 
33248
cat >>conftest.$ac_ext <<_ACEOF
 
33249
/* end confdefs.h.  */
 
33250
$ac_includes_default
 
33251
#include <mysql/mysql.h>
 
33252
_ACEOF
 
33253
rm -f conftest.$ac_objext
 
33254
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
33255
  (eval $ac_compile) 2>conftest.er1
 
33256
  ac_status=$?
 
33257
  grep -v '^ *+' conftest.er1 >conftest.err
 
33258
  rm -f conftest.er1
 
33259
  cat conftest.err >&5
 
33260
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33261
  (exit $ac_status); } &&
 
33262
         { ac_try='test -z "$ac_c_werror_flag"
 
33263
                         || test ! -s conftest.err'
 
33264
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33265
  (eval $ac_try) 2>&5
 
33266
  ac_status=$?
 
33267
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33268
  (exit $ac_status); }; } &&
 
33269
         { ac_try='test -s conftest.$ac_objext'
 
33270
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33271
  (eval $ac_try) 2>&5
 
33272
  ac_status=$?
 
33273
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33274
  (exit $ac_status); }; }; then
 
33275
  ac_header_compiler=yes
 
33276
else
 
33277
  echo "$as_me: failed program was:" >&5
 
33278
sed 's/^/| /' conftest.$ac_ext >&5
 
33279
 
 
33280
ac_header_compiler=no
 
33281
fi
 
33282
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
33283
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
33284
echo "${ECHO_T}$ac_header_compiler" >&6
 
33285
 
 
33286
# Is the header present?
 
33287
echo "$as_me:$LINENO: checking mysql/mysql.h presence" >&5
 
33288
echo $ECHO_N "checking mysql/mysql.h presence... $ECHO_C" >&6
 
33289
cat >conftest.$ac_ext <<_ACEOF
 
33290
/* confdefs.h.  */
 
33291
_ACEOF
 
33292
cat confdefs.h >>conftest.$ac_ext
 
33293
cat >>conftest.$ac_ext <<_ACEOF
 
33294
/* end confdefs.h.  */
 
33295
#include <mysql/mysql.h>
 
33296
_ACEOF
 
33297
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
33298
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
33299
  ac_status=$?
 
33300
  grep -v '^ *+' conftest.er1 >conftest.err
 
33301
  rm -f conftest.er1
 
33302
  cat conftest.err >&5
 
33303
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33304
  (exit $ac_status); } >/dev/null; then
 
33305
  if test -s conftest.err; then
 
33306
    ac_cpp_err=$ac_c_preproc_warn_flag
 
33307
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
33308
  else
 
33309
    ac_cpp_err=
 
33310
  fi
 
33311
else
 
33312
  ac_cpp_err=yes
 
33313
fi
 
33314
if test -z "$ac_cpp_err"; then
 
33315
  ac_header_preproc=yes
 
33316
else
 
33317
  echo "$as_me: failed program was:" >&5
 
33318
sed 's/^/| /' conftest.$ac_ext >&5
 
33319
 
 
33320
  ac_header_preproc=no
 
33321
fi
 
33322
rm -f conftest.err conftest.$ac_ext
 
33323
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
33324
echo "${ECHO_T}$ac_header_preproc" >&6
 
33325
 
 
33326
# So?  What about this header?
 
33327
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
33328
  yes:no: )
 
33329
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
33330
echo "$as_me: WARNING: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
33331
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: proceeding with the compiler's result" >&5
 
33332
echo "$as_me: WARNING: mysql/mysql.h: proceeding with the compiler's result" >&2;}
 
33333
    ac_header_preproc=yes
 
33334
    ;;
 
33335
  no:yes:* )
 
33336
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: present but cannot be compiled" >&5
 
33337
echo "$as_me: WARNING: mysql/mysql.h: present but cannot be compiled" >&2;}
 
33338
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h:     check for missing prerequisite headers?" >&5
 
33339
echo "$as_me: WARNING: mysql/mysql.h:     check for missing prerequisite headers?" >&2;}
 
33340
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: see the Autoconf documentation" >&5
 
33341
echo "$as_me: WARNING: mysql/mysql.h: see the Autoconf documentation" >&2;}
 
33342
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
 
33343
echo "$as_me: WARNING: mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
33344
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: proceeding with the preprocessor's result" >&5
 
33345
echo "$as_me: WARNING: mysql/mysql.h: proceeding with the preprocessor's result" >&2;}
 
33346
    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: in the future, the compiler will take precedence" >&5
 
33347
echo "$as_me: WARNING: mysql/mysql.h: in the future, the compiler will take precedence" >&2;}
 
33348
    (
 
33349
      cat <<\_ASBOX
 
33350
## ------------------------------------------ ##
 
33351
## Report this to the AC_PACKAGE_NAME lists.  ##
 
33352
## ------------------------------------------ ##
 
33353
_ASBOX
 
33354
    ) |
 
33355
      sed "s/^/$as_me: WARNING:     /" >&2
 
33356
    ;;
 
33357
esac
 
33358
echo "$as_me:$LINENO: checking for mysql/mysql.h" >&5
 
33359
echo $ECHO_N "checking for mysql/mysql.h... $ECHO_C" >&6
 
33360
if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
 
33361
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33362
else
 
33363
  ac_cv_header_mysql_mysql_h=$ac_header_preproc
 
33364
fi
 
33365
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_mysql_h" >&5
 
33366
echo "${ECHO_T}$ac_cv_header_mysql_mysql_h" >&6
 
33367
 
 
33368
fi
 
33369
if test $ac_cv_header_mysql_mysql_h = yes; then
 
33370
  echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient_r" >&5
 
33371
echo $ECHO_N "checking for mysql_init in -lmysqlclient_r... $ECHO_C" >&6
 
33372
if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then
 
33373
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33374
else
 
33375
  ac_check_lib_save_LIBS=$LIBS
 
33376
LIBS="-lmysqlclient_r  $LIBS"
 
33377
cat >conftest.$ac_ext <<_ACEOF
 
33378
/* confdefs.h.  */
 
33379
_ACEOF
 
33380
cat confdefs.h >>conftest.$ac_ext
 
33381
cat >>conftest.$ac_ext <<_ACEOF
 
33382
/* end confdefs.h.  */
 
33383
 
 
33384
/* Override any gcc2 internal prototype to avoid an error.  */
 
33385
#ifdef __cplusplus
 
33386
extern "C"
 
33387
#endif
 
33388
/* We use char because int might match the return type of a gcc2
 
33389
   builtin and then its argument prototype would still apply.  */
 
33390
char mysql_init ();
 
33391
int
 
33392
main ()
 
33393
{
 
33394
mysql_init ();
 
33395
  ;
 
33396
  return 0;
 
33397
}
 
33398
_ACEOF
 
33399
rm -f conftest.$ac_objext conftest$ac_exeext
 
33400
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
33401
  (eval $ac_link) 2>conftest.er1
 
33402
  ac_status=$?
 
33403
  grep -v '^ *+' conftest.er1 >conftest.err
 
33404
  rm -f conftest.er1
 
33405
  cat conftest.err >&5
 
33406
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33407
  (exit $ac_status); } &&
 
33408
         { ac_try='test -z "$ac_c_werror_flag"
 
33409
                         || test ! -s conftest.err'
 
33410
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33411
  (eval $ac_try) 2>&5
 
33412
  ac_status=$?
 
33413
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33414
  (exit $ac_status); }; } &&
 
33415
         { ac_try='test -s conftest$ac_exeext'
 
33416
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33417
  (eval $ac_try) 2>&5
 
33418
  ac_status=$?
 
33419
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33420
  (exit $ac_status); }; }; then
 
33421
  ac_cv_lib_mysqlclient_r_mysql_init=yes
 
33422
else
 
33423
  echo "$as_me: failed program was:" >&5
 
33424
sed 's/^/| /' conftest.$ac_ext >&5
 
33425
 
 
33426
ac_cv_lib_mysqlclient_r_mysql_init=no
 
33427
fi
 
33428
rm -f conftest.err conftest.$ac_objext \
 
33429
      conftest$ac_exeext conftest.$ac_ext
 
33430
LIBS=$ac_check_lib_save_LIBS
 
33431
fi
 
33432
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
 
33433
echo "${ECHO_T}$ac_cv_lib_mysqlclient_r_mysql_init" >&6
 
33434
if test $ac_cv_lib_mysqlclient_r_mysql_init = yes; then
 
33435
  apu_have_mysql=1
 
33436
fi
 
33437
 
 
33438
fi
 
33439
 
 
33440
 
 
33441
        if test "$apu_have_mysql" != "0"; then
 
33442
 
 
33443
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
33444
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include/mysql\""
 
33445
    APRUTIL_INCLUDES="-I$withval/include/mysql"
 
33446
  else
 
33447
    apr_addto_bugger="-I$withval/include/mysql"
 
33448
    for i in $apr_addto_bugger; do
 
33449
      apr_addto_duplicate="0"
 
33450
      for j in $APRUTIL_INCLUDES; do
 
33451
        if test "x$i" = "x$j"; then
 
33452
          apr_addto_duplicate="1"
 
33453
          break
 
33454
        fi
 
33455
      done
 
33456
      if test $apr_addto_duplicate = "0"; then
 
33457
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
33458
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
33459
      fi
 
33460
    done
 
33461
  fi
 
33462
 
 
33463
 
 
33464
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
33465
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
33466
    APRUTIL_LDFLAGS="-L$withval/lib"
 
33467
  else
 
33468
    apr_addto_bugger="-L$withval/lib"
 
33469
    for i in $apr_addto_bugger; do
 
33470
      apr_addto_duplicate="0"
 
33471
      for j in $APRUTIL_LDFLAGS; do
 
33472
        if test "x$i" = "x$j"; then
 
33473
          apr_addto_duplicate="1"
 
33474
          break
 
33475
        fi
 
33476
      done
 
33477
      if test $apr_addto_duplicate = "0"; then
 
33478
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
33479
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
33480
      fi
 
33481
    done
 
33482
  fi
 
33483
 
 
33484
        fi
 
33485
      fi
 
33486
    fi
 
33487
 
 
33488
else
 
33489
 
 
33490
    apu_have_mysql=0
 
33491
    if test "${ac_cv_header_mysql_h+set}" = set; then
 
33492
  echo "$as_me:$LINENO: checking for mysql.h" >&5
 
33493
echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6
 
33494
if test "${ac_cv_header_mysql_h+set}" = set; then
 
33495
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33496
fi
 
33497
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_h" >&5
 
33498
echo "${ECHO_T}$ac_cv_header_mysql_h" >&6
 
33499
else
 
33500
  # Is the header compilable?
 
33501
echo "$as_me:$LINENO: checking mysql.h usability" >&5
 
33502
echo $ECHO_N "checking mysql.h usability... $ECHO_C" >&6
 
33503
cat >conftest.$ac_ext <<_ACEOF
 
33504
/* confdefs.h.  */
 
33505
_ACEOF
 
33506
cat confdefs.h >>conftest.$ac_ext
 
33507
cat >>conftest.$ac_ext <<_ACEOF
 
33508
/* end confdefs.h.  */
 
33509
$ac_includes_default
 
33510
#include <mysql.h>
 
33511
_ACEOF
 
33512
rm -f conftest.$ac_objext
 
33513
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
33514
  (eval $ac_compile) 2>conftest.er1
 
33515
  ac_status=$?
 
33516
  grep -v '^ *+' conftest.er1 >conftest.err
 
33517
  rm -f conftest.er1
 
33518
  cat conftest.err >&5
 
33519
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33520
  (exit $ac_status); } &&
 
33521
         { ac_try='test -z "$ac_c_werror_flag"
 
33522
                         || test ! -s conftest.err'
 
33523
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33524
  (eval $ac_try) 2>&5
 
33525
  ac_status=$?
 
33526
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33527
  (exit $ac_status); }; } &&
 
33528
         { ac_try='test -s conftest.$ac_objext'
 
33529
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33530
  (eval $ac_try) 2>&5
 
33531
  ac_status=$?
 
33532
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33533
  (exit $ac_status); }; }; then
 
33534
  ac_header_compiler=yes
 
33535
else
 
33536
  echo "$as_me: failed program was:" >&5
 
33537
sed 's/^/| /' conftest.$ac_ext >&5
 
33538
 
 
33539
ac_header_compiler=no
 
33540
fi
 
33541
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
33542
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
33543
echo "${ECHO_T}$ac_header_compiler" >&6
 
33544
 
 
33545
# Is the header present?
 
33546
echo "$as_me:$LINENO: checking mysql.h presence" >&5
 
33547
echo $ECHO_N "checking mysql.h presence... $ECHO_C" >&6
 
33548
cat >conftest.$ac_ext <<_ACEOF
 
33549
/* confdefs.h.  */
 
33550
_ACEOF
 
33551
cat confdefs.h >>conftest.$ac_ext
 
33552
cat >>conftest.$ac_ext <<_ACEOF
 
33553
/* end confdefs.h.  */
 
33554
#include <mysql.h>
 
33555
_ACEOF
 
33556
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
33557
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
33558
  ac_status=$?
 
33559
  grep -v '^ *+' conftest.er1 >conftest.err
 
33560
  rm -f conftest.er1
 
33561
  cat conftest.err >&5
 
33562
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33563
  (exit $ac_status); } >/dev/null; then
 
33564
  if test -s conftest.err; then
 
33565
    ac_cpp_err=$ac_c_preproc_warn_flag
 
33566
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
33567
  else
 
33568
    ac_cpp_err=
 
33569
  fi
 
33570
else
 
33571
  ac_cpp_err=yes
 
33572
fi
 
33573
if test -z "$ac_cpp_err"; then
 
33574
  ac_header_preproc=yes
 
33575
else
 
33576
  echo "$as_me: failed program was:" >&5
 
33577
sed 's/^/| /' conftest.$ac_ext >&5
 
33578
 
 
33579
  ac_header_preproc=no
 
33580
fi
 
33581
rm -f conftest.err conftest.$ac_ext
 
33582
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
33583
echo "${ECHO_T}$ac_header_preproc" >&6
 
33584
 
 
33585
# So?  What about this header?
 
33586
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
33587
  yes:no: )
 
33588
    { echo "$as_me:$LINENO: WARNING: mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
33589
echo "$as_me: WARNING: mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
33590
    { echo "$as_me:$LINENO: WARNING: mysql.h: proceeding with the compiler's result" >&5
 
33591
echo "$as_me: WARNING: mysql.h: proceeding with the compiler's result" >&2;}
 
33592
    ac_header_preproc=yes
 
33593
    ;;
 
33594
  no:yes:* )
 
33595
    { echo "$as_me:$LINENO: WARNING: mysql.h: present but cannot be compiled" >&5
 
33596
echo "$as_me: WARNING: mysql.h: present but cannot be compiled" >&2;}
 
33597
    { echo "$as_me:$LINENO: WARNING: mysql.h:     check for missing prerequisite headers?" >&5
 
33598
echo "$as_me: WARNING: mysql.h:     check for missing prerequisite headers?" >&2;}
 
33599
    { echo "$as_me:$LINENO: WARNING: mysql.h: see the Autoconf documentation" >&5
 
33600
echo "$as_me: WARNING: mysql.h: see the Autoconf documentation" >&2;}
 
33601
    { echo "$as_me:$LINENO: WARNING: mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
 
33602
echo "$as_me: WARNING: mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
33603
    { echo "$as_me:$LINENO: WARNING: mysql.h: proceeding with the preprocessor's result" >&5
 
33604
echo "$as_me: WARNING: mysql.h: proceeding with the preprocessor's result" >&2;}
 
33605
    { echo "$as_me:$LINENO: WARNING: mysql.h: in the future, the compiler will take precedence" >&5
 
33606
echo "$as_me: WARNING: mysql.h: in the future, the compiler will take precedence" >&2;}
 
33607
    (
 
33608
      cat <<\_ASBOX
 
33609
## ------------------------------------------ ##
 
33610
## Report this to the AC_PACKAGE_NAME lists.  ##
 
33611
## ------------------------------------------ ##
 
33612
_ASBOX
 
33613
    ) |
 
33614
      sed "s/^/$as_me: WARNING:     /" >&2
 
33615
    ;;
 
33616
esac
 
33617
echo "$as_me:$LINENO: checking for mysql.h" >&5
 
33618
echo $ECHO_N "checking for mysql.h... $ECHO_C" >&6
 
33619
if test "${ac_cv_header_mysql_h+set}" = set; then
 
33620
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33621
else
 
33622
  ac_cv_header_mysql_h=$ac_header_preproc
 
33623
fi
 
33624
echo "$as_me:$LINENO: result: $ac_cv_header_mysql_h" >&5
 
33625
echo "${ECHO_T}$ac_cv_header_mysql_h" >&6
 
33626
 
 
33627
fi
 
33628
if test $ac_cv_header_mysql_h = yes; then
 
33629
  echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient_r" >&5
 
33630
echo $ECHO_N "checking for mysql_init in -lmysqlclient_r... $ECHO_C" >&6
 
33631
if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then
 
33632
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33633
else
 
33634
  ac_check_lib_save_LIBS=$LIBS
 
33635
LIBS="-lmysqlclient_r  $LIBS"
 
33636
cat >conftest.$ac_ext <<_ACEOF
 
33637
/* confdefs.h.  */
 
33638
_ACEOF
 
33639
cat confdefs.h >>conftest.$ac_ext
 
33640
cat >>conftest.$ac_ext <<_ACEOF
 
33641
/* end confdefs.h.  */
 
33642
 
 
33643
/* Override any gcc2 internal prototype to avoid an error.  */
 
33644
#ifdef __cplusplus
 
33645
extern "C"
 
33646
#endif
 
33647
/* We use char because int might match the return type of a gcc2
 
33648
   builtin and then its argument prototype would still apply.  */
 
33649
char mysql_init ();
 
33650
int
 
33651
main ()
 
33652
{
 
33653
mysql_init ();
 
33654
  ;
 
33655
  return 0;
 
33656
}
 
33657
_ACEOF
 
33658
rm -f conftest.$ac_objext conftest$ac_exeext
 
33659
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
33660
  (eval $ac_link) 2>conftest.er1
 
33661
  ac_status=$?
 
33662
  grep -v '^ *+' conftest.er1 >conftest.err
 
33663
  rm -f conftest.er1
 
33664
  cat conftest.err >&5
 
33665
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33666
  (exit $ac_status); } &&
 
33667
         { ac_try='test -z "$ac_c_werror_flag"
 
33668
                         || test ! -s conftest.err'
 
33669
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33670
  (eval $ac_try) 2>&5
 
33671
  ac_status=$?
 
33672
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33673
  (exit $ac_status); }; } &&
 
33674
         { ac_try='test -s conftest$ac_exeext'
 
33675
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33676
  (eval $ac_try) 2>&5
 
33677
  ac_status=$?
 
33678
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33679
  (exit $ac_status); }; }; then
 
33680
  ac_cv_lib_mysqlclient_r_mysql_init=yes
 
33681
else
 
33682
  echo "$as_me: failed program was:" >&5
 
33683
sed 's/^/| /' conftest.$ac_ext >&5
 
33684
 
 
33685
ac_cv_lib_mysqlclient_r_mysql_init=no
 
33686
fi
 
33687
rm -f conftest.err conftest.$ac_objext \
 
33688
      conftest$ac_exeext conftest.$ac_ext
 
33689
LIBS=$ac_check_lib_save_LIBS
 
33690
fi
 
33691
echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
 
33692
echo "${ECHO_T}$ac_cv_lib_mysqlclient_r_mysql_init" >&6
 
33693
if test $ac_cv_lib_mysqlclient_r_mysql_init = yes; then
 
33694
  apu_have_mysql=1
 
33695
fi
 
33696
 
 
33697
fi
 
33698
 
 
33699
 
 
33700
 
 
33701
fi;
 
33702
 
 
33703
 
 
33704
 
 
33705
      if test "$apu_have_mysql" = "1"; then
 
33706
 
 
33707
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
33708
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-lmysqlclient_r\""
 
33709
    APRUTIL_EXPORT_LIBS="-lmysqlclient_r"
 
33710
  else
 
33711
    apr_addto_bugger="-lmysqlclient_r"
 
33712
    for i in $apr_addto_bugger; do
 
33713
      apr_addto_duplicate="0"
 
33714
      for j in $APRUTIL_EXPORT_LIBS; do
 
33715
        if test "x$i" = "x$j"; then
 
33716
          apr_addto_duplicate="1"
 
33717
          break
 
33718
        fi
 
33719
      done
 
33720
      if test $apr_addto_duplicate = "0"; then
 
33721
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
33722
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
33723
      fi
 
33724
    done
 
33725
  fi
 
33726
 
 
33727
 
 
33728
  if test "x$APRUTIL_LIBS" = "x"; then
 
33729
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-lmysqlclient_r\""
 
33730
    APRUTIL_LIBS="-lmysqlclient_r"
 
33731
  else
 
33732
    apr_addto_bugger="-lmysqlclient_r"
 
33733
    for i in $apr_addto_bugger; do
 
33734
      apr_addto_duplicate="0"
 
33735
      for j in $APRUTIL_LIBS; do
 
33736
        if test "x$i" = "x$j"; then
 
33737
          apr_addto_duplicate="1"
 
33738
          break
 
33739
        fi
 
33740
      done
 
33741
      if test $apr_addto_duplicate = "0"; then
 
33742
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
33743
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
33744
      fi
 
33745
    done
 
33746
  fi
 
33747
 
 
33748
  fi
 
33749
 
 
33750
 
 
33751
  apu_have_sqlite3=0
 
33752
 
 
33753
 
 
33754
# Check whether --with-sqlite3 or --without-sqlite3 was given.
 
33755
if test "${with_sqlite3+set}" = set; then
 
33756
  withval="$with_sqlite3"
 
33757
 
 
33758
    apu_have_sqlite3=0
 
33759
    if test "$withval" = "yes"; then
 
33760
      if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
33761
  echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 
33762
echo $ECHO_N "checking for sqlite3.h... $ECHO_C" >&6
 
33763
if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
33764
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33765
fi
 
33766
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 
33767
echo "${ECHO_T}$ac_cv_header_sqlite3_h" >&6
 
33768
else
 
33769
  # Is the header compilable?
 
33770
echo "$as_me:$LINENO: checking sqlite3.h usability" >&5
 
33771
echo $ECHO_N "checking sqlite3.h usability... $ECHO_C" >&6
 
33772
cat >conftest.$ac_ext <<_ACEOF
 
33773
/* confdefs.h.  */
 
33774
_ACEOF
 
33775
cat confdefs.h >>conftest.$ac_ext
 
33776
cat >>conftest.$ac_ext <<_ACEOF
 
33777
/* end confdefs.h.  */
 
33778
$ac_includes_default
 
33779
#include <sqlite3.h>
 
33780
_ACEOF
 
33781
rm -f conftest.$ac_objext
 
33782
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
33783
  (eval $ac_compile) 2>conftest.er1
 
33784
  ac_status=$?
 
33785
  grep -v '^ *+' conftest.er1 >conftest.err
 
33786
  rm -f conftest.er1
 
33787
  cat conftest.err >&5
 
33788
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33789
  (exit $ac_status); } &&
 
33790
         { ac_try='test -z "$ac_c_werror_flag"
 
33791
                         || test ! -s conftest.err'
 
33792
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33793
  (eval $ac_try) 2>&5
 
33794
  ac_status=$?
 
33795
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33796
  (exit $ac_status); }; } &&
 
33797
         { ac_try='test -s conftest.$ac_objext'
 
33798
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33799
  (eval $ac_try) 2>&5
 
33800
  ac_status=$?
 
33801
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33802
  (exit $ac_status); }; }; then
 
33803
  ac_header_compiler=yes
 
33804
else
 
33805
  echo "$as_me: failed program was:" >&5
 
33806
sed 's/^/| /' conftest.$ac_ext >&5
 
33807
 
 
33808
ac_header_compiler=no
 
33809
fi
 
33810
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
33811
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
33812
echo "${ECHO_T}$ac_header_compiler" >&6
 
33813
 
 
33814
# Is the header present?
 
33815
echo "$as_me:$LINENO: checking sqlite3.h presence" >&5
 
33816
echo $ECHO_N "checking sqlite3.h presence... $ECHO_C" >&6
 
33817
cat >conftest.$ac_ext <<_ACEOF
 
33818
/* confdefs.h.  */
 
33819
_ACEOF
 
33820
cat confdefs.h >>conftest.$ac_ext
 
33821
cat >>conftest.$ac_ext <<_ACEOF
 
33822
/* end confdefs.h.  */
 
33823
#include <sqlite3.h>
 
33824
_ACEOF
 
33825
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
33826
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
33827
  ac_status=$?
 
33828
  grep -v '^ *+' conftest.er1 >conftest.err
 
33829
  rm -f conftest.er1
 
33830
  cat conftest.err >&5
 
33831
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33832
  (exit $ac_status); } >/dev/null; then
 
33833
  if test -s conftest.err; then
 
33834
    ac_cpp_err=$ac_c_preproc_warn_flag
 
33835
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
33836
  else
 
33837
    ac_cpp_err=
 
33838
  fi
 
33839
else
 
33840
  ac_cpp_err=yes
 
33841
fi
 
33842
if test -z "$ac_cpp_err"; then
 
33843
  ac_header_preproc=yes
 
33844
else
 
33845
  echo "$as_me: failed program was:" >&5
 
33846
sed 's/^/| /' conftest.$ac_ext >&5
 
33847
 
 
33848
  ac_header_preproc=no
 
33849
fi
 
33850
rm -f conftest.err conftest.$ac_ext
 
33851
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
33852
echo "${ECHO_T}$ac_header_preproc" >&6
 
33853
 
 
33854
# So?  What about this header?
 
33855
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
33856
  yes:no: )
 
33857
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
33858
echo "$as_me: WARNING: sqlite3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
33859
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: proceeding with the compiler's result" >&5
 
33860
echo "$as_me: WARNING: sqlite3.h: proceeding with the compiler's result" >&2;}
 
33861
    ac_header_preproc=yes
 
33862
    ;;
 
33863
  no:yes:* )
 
33864
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: present but cannot be compiled" >&5
 
33865
echo "$as_me: WARNING: sqlite3.h: present but cannot be compiled" >&2;}
 
33866
    { echo "$as_me:$LINENO: WARNING: sqlite3.h:     check for missing prerequisite headers?" >&5
 
33867
echo "$as_me: WARNING: sqlite3.h:     check for missing prerequisite headers?" >&2;}
 
33868
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: see the Autoconf documentation" >&5
 
33869
echo "$as_me: WARNING: sqlite3.h: see the Autoconf documentation" >&2;}
 
33870
    { echo "$as_me:$LINENO: WARNING: sqlite3.h:     section \"Present But Cannot Be Compiled\"" >&5
 
33871
echo "$as_me: WARNING: sqlite3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
33872
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&5
 
33873
echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2;}
 
33874
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
 
33875
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
 
33876
    (
 
33877
      cat <<\_ASBOX
 
33878
## ------------------------------------------ ##
 
33879
## Report this to the AC_PACKAGE_NAME lists.  ##
 
33880
## ------------------------------------------ ##
 
33881
_ASBOX
 
33882
    ) |
 
33883
      sed "s/^/$as_me: WARNING:     /" >&2
 
33884
    ;;
 
33885
esac
 
33886
echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 
33887
echo $ECHO_N "checking for sqlite3.h... $ECHO_C" >&6
 
33888
if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
33889
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33890
else
 
33891
  ac_cv_header_sqlite3_h=$ac_header_preproc
 
33892
fi
 
33893
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 
33894
echo "${ECHO_T}$ac_cv_header_sqlite3_h" >&6
 
33895
 
 
33896
fi
 
33897
if test $ac_cv_header_sqlite3_h = yes; then
 
33898
  echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
 
33899
echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6
 
33900
if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
 
33901
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33902
else
 
33903
  ac_check_lib_save_LIBS=$LIBS
 
33904
LIBS="-lsqlite3  $LIBS"
 
33905
cat >conftest.$ac_ext <<_ACEOF
 
33906
/* confdefs.h.  */
 
33907
_ACEOF
 
33908
cat confdefs.h >>conftest.$ac_ext
 
33909
cat >>conftest.$ac_ext <<_ACEOF
 
33910
/* end confdefs.h.  */
 
33911
 
 
33912
/* Override any gcc2 internal prototype to avoid an error.  */
 
33913
#ifdef __cplusplus
 
33914
extern "C"
 
33915
#endif
 
33916
/* We use char because int might match the return type of a gcc2
 
33917
   builtin and then its argument prototype would still apply.  */
 
33918
char sqlite3_open ();
 
33919
int
 
33920
main ()
 
33921
{
 
33922
sqlite3_open ();
 
33923
  ;
 
33924
  return 0;
 
33925
}
 
33926
_ACEOF
 
33927
rm -f conftest.$ac_objext conftest$ac_exeext
 
33928
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
33929
  (eval $ac_link) 2>conftest.er1
 
33930
  ac_status=$?
 
33931
  grep -v '^ *+' conftest.er1 >conftest.err
 
33932
  rm -f conftest.er1
 
33933
  cat conftest.err >&5
 
33934
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33935
  (exit $ac_status); } &&
 
33936
         { ac_try='test -z "$ac_c_werror_flag"
 
33937
                         || test ! -s conftest.err'
 
33938
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33939
  (eval $ac_try) 2>&5
 
33940
  ac_status=$?
 
33941
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33942
  (exit $ac_status); }; } &&
 
33943
         { ac_try='test -s conftest$ac_exeext'
 
33944
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
33945
  (eval $ac_try) 2>&5
 
33946
  ac_status=$?
 
33947
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
33948
  (exit $ac_status); }; }; then
 
33949
  ac_cv_lib_sqlite3_sqlite3_open=yes
 
33950
else
 
33951
  echo "$as_me: failed program was:" >&5
 
33952
sed 's/^/| /' conftest.$ac_ext >&5
 
33953
 
 
33954
ac_cv_lib_sqlite3_sqlite3_open=no
 
33955
fi
 
33956
rm -f conftest.err conftest.$ac_objext \
 
33957
      conftest$ac_exeext conftest.$ac_ext
 
33958
LIBS=$ac_check_lib_save_LIBS
 
33959
fi
 
33960
echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
 
33961
echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_open" >&6
 
33962
if test $ac_cv_lib_sqlite3_sqlite3_open = yes; then
 
33963
  apu_have_sqlite3=1
 
33964
fi
 
33965
 
 
33966
fi
 
33967
 
 
33968
 
 
33969
    elif test "$withval" = "no"; then
 
33970
      apu_have_sqlite3=0
 
33971
    else
 
33972
      CPPFLAGS="-I$withval/include"
 
33973
      LIBS="-L$withval/lib "
 
33974
 
 
33975
      { echo "$as_me:$LINENO: checking for sqlite3 in $withval" >&5
 
33976
echo "$as_me: checking for sqlite3 in $withval" >&6;}
 
33977
      if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
33978
  echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 
33979
echo $ECHO_N "checking for sqlite3.h... $ECHO_C" >&6
 
33980
if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
33981
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
33982
fi
 
33983
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 
33984
echo "${ECHO_T}$ac_cv_header_sqlite3_h" >&6
 
33985
else
 
33986
  # Is the header compilable?
 
33987
echo "$as_me:$LINENO: checking sqlite3.h usability" >&5
 
33988
echo $ECHO_N "checking sqlite3.h usability... $ECHO_C" >&6
 
33989
cat >conftest.$ac_ext <<_ACEOF
 
33990
/* confdefs.h.  */
 
33991
_ACEOF
 
33992
cat confdefs.h >>conftest.$ac_ext
 
33993
cat >>conftest.$ac_ext <<_ACEOF
 
33994
/* end confdefs.h.  */
 
33995
$ac_includes_default
 
33996
#include <sqlite3.h>
 
33997
_ACEOF
 
33998
rm -f conftest.$ac_objext
 
33999
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
34000
  (eval $ac_compile) 2>conftest.er1
 
34001
  ac_status=$?
 
34002
  grep -v '^ *+' conftest.er1 >conftest.err
 
34003
  rm -f conftest.er1
 
34004
  cat conftest.err >&5
 
34005
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34006
  (exit $ac_status); } &&
 
34007
         { ac_try='test -z "$ac_c_werror_flag"
 
34008
                         || test ! -s conftest.err'
 
34009
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34010
  (eval $ac_try) 2>&5
 
34011
  ac_status=$?
 
34012
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34013
  (exit $ac_status); }; } &&
 
34014
         { ac_try='test -s conftest.$ac_objext'
 
34015
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34016
  (eval $ac_try) 2>&5
 
34017
  ac_status=$?
 
34018
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34019
  (exit $ac_status); }; }; then
 
34020
  ac_header_compiler=yes
 
34021
else
 
34022
  echo "$as_me: failed program was:" >&5
 
34023
sed 's/^/| /' conftest.$ac_ext >&5
 
34024
 
 
34025
ac_header_compiler=no
 
34026
fi
 
34027
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
34028
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
34029
echo "${ECHO_T}$ac_header_compiler" >&6
 
34030
 
 
34031
# Is the header present?
 
34032
echo "$as_me:$LINENO: checking sqlite3.h presence" >&5
 
34033
echo $ECHO_N "checking sqlite3.h presence... $ECHO_C" >&6
 
34034
cat >conftest.$ac_ext <<_ACEOF
 
34035
/* confdefs.h.  */
 
34036
_ACEOF
 
34037
cat confdefs.h >>conftest.$ac_ext
 
34038
cat >>conftest.$ac_ext <<_ACEOF
 
34039
/* end confdefs.h.  */
 
34040
#include <sqlite3.h>
 
34041
_ACEOF
 
34042
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
34043
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
34044
  ac_status=$?
 
34045
  grep -v '^ *+' conftest.er1 >conftest.err
 
34046
  rm -f conftest.er1
 
34047
  cat conftest.err >&5
 
34048
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34049
  (exit $ac_status); } >/dev/null; then
 
34050
  if test -s conftest.err; then
 
34051
    ac_cpp_err=$ac_c_preproc_warn_flag
 
34052
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
34053
  else
 
34054
    ac_cpp_err=
 
34055
  fi
 
34056
else
 
34057
  ac_cpp_err=yes
 
34058
fi
 
34059
if test -z "$ac_cpp_err"; then
 
34060
  ac_header_preproc=yes
 
34061
else
 
34062
  echo "$as_me: failed program was:" >&5
 
34063
sed 's/^/| /' conftest.$ac_ext >&5
 
34064
 
 
34065
  ac_header_preproc=no
 
34066
fi
 
34067
rm -f conftest.err conftest.$ac_ext
 
34068
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
34069
echo "${ECHO_T}$ac_header_preproc" >&6
 
34070
 
 
34071
# So?  What about this header?
 
34072
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
34073
  yes:no: )
 
34074
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
34075
echo "$as_me: WARNING: sqlite3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
34076
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: proceeding with the compiler's result" >&5
 
34077
echo "$as_me: WARNING: sqlite3.h: proceeding with the compiler's result" >&2;}
 
34078
    ac_header_preproc=yes
 
34079
    ;;
 
34080
  no:yes:* )
 
34081
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: present but cannot be compiled" >&5
 
34082
echo "$as_me: WARNING: sqlite3.h: present but cannot be compiled" >&2;}
 
34083
    { echo "$as_me:$LINENO: WARNING: sqlite3.h:     check for missing prerequisite headers?" >&5
 
34084
echo "$as_me: WARNING: sqlite3.h:     check for missing prerequisite headers?" >&2;}
 
34085
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: see the Autoconf documentation" >&5
 
34086
echo "$as_me: WARNING: sqlite3.h: see the Autoconf documentation" >&2;}
 
34087
    { echo "$as_me:$LINENO: WARNING: sqlite3.h:     section \"Present But Cannot Be Compiled\"" >&5
 
34088
echo "$as_me: WARNING: sqlite3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
34089
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&5
 
34090
echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2;}
 
34091
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
 
34092
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
 
34093
    (
 
34094
      cat <<\_ASBOX
 
34095
## ------------------------------------------ ##
 
34096
## Report this to the AC_PACKAGE_NAME lists.  ##
 
34097
## ------------------------------------------ ##
 
34098
_ASBOX
 
34099
    ) |
 
34100
      sed "s/^/$as_me: WARNING:     /" >&2
 
34101
    ;;
 
34102
esac
 
34103
echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 
34104
echo $ECHO_N "checking for sqlite3.h... $ECHO_C" >&6
 
34105
if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
34106
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34107
else
 
34108
  ac_cv_header_sqlite3_h=$ac_header_preproc
 
34109
fi
 
34110
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 
34111
echo "${ECHO_T}$ac_cv_header_sqlite3_h" >&6
 
34112
 
 
34113
fi
 
34114
if test $ac_cv_header_sqlite3_h = yes; then
 
34115
  echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
 
34116
echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6
 
34117
if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
 
34118
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34119
else
 
34120
  ac_check_lib_save_LIBS=$LIBS
 
34121
LIBS="-lsqlite3  $LIBS"
 
34122
cat >conftest.$ac_ext <<_ACEOF
 
34123
/* confdefs.h.  */
 
34124
_ACEOF
 
34125
cat confdefs.h >>conftest.$ac_ext
 
34126
cat >>conftest.$ac_ext <<_ACEOF
 
34127
/* end confdefs.h.  */
 
34128
 
 
34129
/* Override any gcc2 internal prototype to avoid an error.  */
 
34130
#ifdef __cplusplus
 
34131
extern "C"
 
34132
#endif
 
34133
/* We use char because int might match the return type of a gcc2
 
34134
   builtin and then its argument prototype would still apply.  */
 
34135
char sqlite3_open ();
 
34136
int
 
34137
main ()
 
34138
{
 
34139
sqlite3_open ();
 
34140
  ;
 
34141
  return 0;
 
34142
}
 
34143
_ACEOF
 
34144
rm -f conftest.$ac_objext conftest$ac_exeext
 
34145
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
34146
  (eval $ac_link) 2>conftest.er1
 
34147
  ac_status=$?
 
34148
  grep -v '^ *+' conftest.er1 >conftest.err
 
34149
  rm -f conftest.er1
 
34150
  cat conftest.err >&5
 
34151
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34152
  (exit $ac_status); } &&
 
34153
         { ac_try='test -z "$ac_c_werror_flag"
 
34154
                         || test ! -s conftest.err'
 
34155
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34156
  (eval $ac_try) 2>&5
 
34157
  ac_status=$?
 
34158
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34159
  (exit $ac_status); }; } &&
 
34160
         { ac_try='test -s conftest$ac_exeext'
 
34161
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34162
  (eval $ac_try) 2>&5
 
34163
  ac_status=$?
 
34164
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34165
  (exit $ac_status); }; }; then
 
34166
  ac_cv_lib_sqlite3_sqlite3_open=yes
 
34167
else
 
34168
  echo "$as_me: failed program was:" >&5
 
34169
sed 's/^/| /' conftest.$ac_ext >&5
 
34170
 
 
34171
ac_cv_lib_sqlite3_sqlite3_open=no
 
34172
fi
 
34173
rm -f conftest.err conftest.$ac_objext \
 
34174
      conftest$ac_exeext conftest.$ac_ext
 
34175
LIBS=$ac_check_lib_save_LIBS
 
34176
fi
 
34177
echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
 
34178
echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_open" >&6
 
34179
if test $ac_cv_lib_sqlite3_sqlite3_open = yes; then
 
34180
  apu_have_sqlite3=1
 
34181
fi
 
34182
 
 
34183
fi
 
34184
 
 
34185
 
 
34186
      if test "$apu_have_sqlite3" != "0"; then
 
34187
 
 
34188
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
34189
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
34190
    APRUTIL_LDFLAGS="-L$withval/lib"
 
34191
  else
 
34192
    apr_addto_bugger="-L$withval/lib"
 
34193
    for i in $apr_addto_bugger; do
 
34194
      apr_addto_duplicate="0"
 
34195
      for j in $APRUTIL_LDFLAGS; do
 
34196
        if test "x$i" = "x$j"; then
 
34197
          apr_addto_duplicate="1"
 
34198
          break
 
34199
        fi
 
34200
      done
 
34201
      if test $apr_addto_duplicate = "0"; then
 
34202
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
34203
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
34204
      fi
 
34205
    done
 
34206
  fi
 
34207
 
 
34208
 
 
34209
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
34210
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
34211
    APRUTIL_INCLUDES="-I$withval/include"
 
34212
  else
 
34213
    apr_addto_bugger="-I$withval/include"
 
34214
    for i in $apr_addto_bugger; do
 
34215
      apr_addto_duplicate="0"
 
34216
      for j in $APRUTIL_INCLUDES; do
 
34217
        if test "x$i" = "x$j"; then
 
34218
          apr_addto_duplicate="1"
 
34219
          break
 
34220
        fi
 
34221
      done
 
34222
      if test $apr_addto_duplicate = "0"; then
 
34223
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
34224
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
34225
      fi
 
34226
    done
 
34227
  fi
 
34228
 
 
34229
      fi
 
34230
    fi
 
34231
 
 
34232
else
 
34233
 
 
34234
    apu_have_sqlite3=0
 
34235
    if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
34236
  echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 
34237
echo $ECHO_N "checking for sqlite3.h... $ECHO_C" >&6
 
34238
if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
34239
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34240
fi
 
34241
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 
34242
echo "${ECHO_T}$ac_cv_header_sqlite3_h" >&6
 
34243
else
 
34244
  # Is the header compilable?
 
34245
echo "$as_me:$LINENO: checking sqlite3.h usability" >&5
 
34246
echo $ECHO_N "checking sqlite3.h usability... $ECHO_C" >&6
 
34247
cat >conftest.$ac_ext <<_ACEOF
 
34248
/* confdefs.h.  */
 
34249
_ACEOF
 
34250
cat confdefs.h >>conftest.$ac_ext
 
34251
cat >>conftest.$ac_ext <<_ACEOF
 
34252
/* end confdefs.h.  */
 
34253
$ac_includes_default
 
34254
#include <sqlite3.h>
 
34255
_ACEOF
 
34256
rm -f conftest.$ac_objext
 
34257
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
34258
  (eval $ac_compile) 2>conftest.er1
 
34259
  ac_status=$?
 
34260
  grep -v '^ *+' conftest.er1 >conftest.err
 
34261
  rm -f conftest.er1
 
34262
  cat conftest.err >&5
 
34263
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34264
  (exit $ac_status); } &&
 
34265
         { ac_try='test -z "$ac_c_werror_flag"
 
34266
                         || test ! -s conftest.err'
 
34267
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34268
  (eval $ac_try) 2>&5
 
34269
  ac_status=$?
 
34270
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34271
  (exit $ac_status); }; } &&
 
34272
         { ac_try='test -s conftest.$ac_objext'
 
34273
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34274
  (eval $ac_try) 2>&5
 
34275
  ac_status=$?
 
34276
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34277
  (exit $ac_status); }; }; then
 
34278
  ac_header_compiler=yes
 
34279
else
 
34280
  echo "$as_me: failed program was:" >&5
 
34281
sed 's/^/| /' conftest.$ac_ext >&5
 
34282
 
 
34283
ac_header_compiler=no
 
34284
fi
 
34285
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
34286
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
34287
echo "${ECHO_T}$ac_header_compiler" >&6
 
34288
 
 
34289
# Is the header present?
 
34290
echo "$as_me:$LINENO: checking sqlite3.h presence" >&5
 
34291
echo $ECHO_N "checking sqlite3.h presence... $ECHO_C" >&6
 
34292
cat >conftest.$ac_ext <<_ACEOF
 
34293
/* confdefs.h.  */
 
34294
_ACEOF
 
34295
cat confdefs.h >>conftest.$ac_ext
 
34296
cat >>conftest.$ac_ext <<_ACEOF
 
34297
/* end confdefs.h.  */
 
34298
#include <sqlite3.h>
 
34299
_ACEOF
 
34300
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
34301
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
34302
  ac_status=$?
 
34303
  grep -v '^ *+' conftest.er1 >conftest.err
 
34304
  rm -f conftest.er1
 
34305
  cat conftest.err >&5
 
34306
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34307
  (exit $ac_status); } >/dev/null; then
 
34308
  if test -s conftest.err; then
 
34309
    ac_cpp_err=$ac_c_preproc_warn_flag
 
34310
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
34311
  else
 
34312
    ac_cpp_err=
 
34313
  fi
 
34314
else
 
34315
  ac_cpp_err=yes
 
34316
fi
 
34317
if test -z "$ac_cpp_err"; then
 
34318
  ac_header_preproc=yes
 
34319
else
 
34320
  echo "$as_me: failed program was:" >&5
 
34321
sed 's/^/| /' conftest.$ac_ext >&5
 
34322
 
 
34323
  ac_header_preproc=no
 
34324
fi
 
34325
rm -f conftest.err conftest.$ac_ext
 
34326
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
34327
echo "${ECHO_T}$ac_header_preproc" >&6
 
34328
 
 
34329
# So?  What about this header?
 
34330
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
34331
  yes:no: )
 
34332
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
34333
echo "$as_me: WARNING: sqlite3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
34334
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: proceeding with the compiler's result" >&5
 
34335
echo "$as_me: WARNING: sqlite3.h: proceeding with the compiler's result" >&2;}
 
34336
    ac_header_preproc=yes
 
34337
    ;;
 
34338
  no:yes:* )
 
34339
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: present but cannot be compiled" >&5
 
34340
echo "$as_me: WARNING: sqlite3.h: present but cannot be compiled" >&2;}
 
34341
    { echo "$as_me:$LINENO: WARNING: sqlite3.h:     check for missing prerequisite headers?" >&5
 
34342
echo "$as_me: WARNING: sqlite3.h:     check for missing prerequisite headers?" >&2;}
 
34343
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: see the Autoconf documentation" >&5
 
34344
echo "$as_me: WARNING: sqlite3.h: see the Autoconf documentation" >&2;}
 
34345
    { echo "$as_me:$LINENO: WARNING: sqlite3.h:     section \"Present But Cannot Be Compiled\"" >&5
 
34346
echo "$as_me: WARNING: sqlite3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
34347
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&5
 
34348
echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2;}
 
34349
    { echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
 
34350
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
 
34351
    (
 
34352
      cat <<\_ASBOX
 
34353
## ------------------------------------------ ##
 
34354
## Report this to the AC_PACKAGE_NAME lists.  ##
 
34355
## ------------------------------------------ ##
 
34356
_ASBOX
 
34357
    ) |
 
34358
      sed "s/^/$as_me: WARNING:     /" >&2
 
34359
    ;;
 
34360
esac
 
34361
echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 
34362
echo $ECHO_N "checking for sqlite3.h... $ECHO_C" >&6
 
34363
if test "${ac_cv_header_sqlite3_h+set}" = set; then
 
34364
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34365
else
 
34366
  ac_cv_header_sqlite3_h=$ac_header_preproc
 
34367
fi
 
34368
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 
34369
echo "${ECHO_T}$ac_cv_header_sqlite3_h" >&6
 
34370
 
 
34371
fi
 
34372
if test $ac_cv_header_sqlite3_h = yes; then
 
34373
  echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
 
34374
echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6
 
34375
if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
 
34376
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34377
else
 
34378
  ac_check_lib_save_LIBS=$LIBS
 
34379
LIBS="-lsqlite3  $LIBS"
 
34380
cat >conftest.$ac_ext <<_ACEOF
 
34381
/* confdefs.h.  */
 
34382
_ACEOF
 
34383
cat confdefs.h >>conftest.$ac_ext
 
34384
cat >>conftest.$ac_ext <<_ACEOF
 
34385
/* end confdefs.h.  */
 
34386
 
 
34387
/* Override any gcc2 internal prototype to avoid an error.  */
 
34388
#ifdef __cplusplus
 
34389
extern "C"
 
34390
#endif
 
34391
/* We use char because int might match the return type of a gcc2
 
34392
   builtin and then its argument prototype would still apply.  */
 
34393
char sqlite3_open ();
 
34394
int
 
34395
main ()
 
34396
{
 
34397
sqlite3_open ();
 
34398
  ;
 
34399
  return 0;
 
34400
}
 
34401
_ACEOF
 
34402
rm -f conftest.$ac_objext conftest$ac_exeext
 
34403
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
34404
  (eval $ac_link) 2>conftest.er1
 
34405
  ac_status=$?
 
34406
  grep -v '^ *+' conftest.er1 >conftest.err
 
34407
  rm -f conftest.er1
 
34408
  cat conftest.err >&5
 
34409
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34410
  (exit $ac_status); } &&
 
34411
         { ac_try='test -z "$ac_c_werror_flag"
 
34412
                         || test ! -s conftest.err'
 
34413
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34414
  (eval $ac_try) 2>&5
 
34415
  ac_status=$?
 
34416
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34417
  (exit $ac_status); }; } &&
 
34418
         { ac_try='test -s conftest$ac_exeext'
 
34419
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34420
  (eval $ac_try) 2>&5
 
34421
  ac_status=$?
 
34422
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34423
  (exit $ac_status); }; }; then
 
34424
  ac_cv_lib_sqlite3_sqlite3_open=yes
 
34425
else
 
34426
  echo "$as_me: failed program was:" >&5
 
34427
sed 's/^/| /' conftest.$ac_ext >&5
 
34428
 
 
34429
ac_cv_lib_sqlite3_sqlite3_open=no
 
34430
fi
 
34431
rm -f conftest.err conftest.$ac_objext \
 
34432
      conftest$ac_exeext conftest.$ac_ext
 
34433
LIBS=$ac_check_lib_save_LIBS
 
34434
fi
 
34435
echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
 
34436
echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_open" >&6
 
34437
if test $ac_cv_lib_sqlite3_sqlite3_open = yes; then
 
34438
  apu_have_sqlite3=1
 
34439
fi
 
34440
 
 
34441
fi
 
34442
 
 
34443
 
 
34444
 
 
34445
fi;
 
34446
 
 
34447
 
 
34448
 
 
34449
      if test "$apu_have_sqlite3" = "1"; then
 
34450
 
 
34451
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
34452
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-lsqlite3\""
 
34453
    APRUTIL_EXPORT_LIBS="-lsqlite3"
 
34454
  else
 
34455
    apr_addto_bugger="-lsqlite3"
 
34456
    for i in $apr_addto_bugger; do
 
34457
      apr_addto_duplicate="0"
 
34458
      for j in $APRUTIL_EXPORT_LIBS; do
 
34459
        if test "x$i" = "x$j"; then
 
34460
          apr_addto_duplicate="1"
 
34461
          break
 
34462
        fi
 
34463
      done
 
34464
      if test $apr_addto_duplicate = "0"; then
 
34465
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
34466
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
34467
      fi
 
34468
    done
 
34469
  fi
 
34470
 
 
34471
 
 
34472
  if test "x$APRUTIL_LIBS" = "x"; then
 
34473
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-lsqlite3\""
 
34474
    APRUTIL_LIBS="-lsqlite3"
 
34475
  else
 
34476
    apr_addto_bugger="-lsqlite3"
 
34477
    for i in $apr_addto_bugger; do
 
34478
      apr_addto_duplicate="0"
 
34479
      for j in $APRUTIL_LIBS; do
 
34480
        if test "x$i" = "x$j"; then
 
34481
          apr_addto_duplicate="1"
 
34482
          break
 
34483
        fi
 
34484
      done
 
34485
      if test $apr_addto_duplicate = "0"; then
 
34486
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
34487
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
34488
      fi
 
34489
    done
 
34490
  fi
 
34491
 
 
34492
  fi
 
34493
 
 
34494
 
 
34495
  apu_have_sqlite2=0
 
34496
 
 
34497
 
 
34498
# Check whether --with-sqlite2 or --without-sqlite2 was given.
 
34499
if test "${with_sqlite2+set}" = set; then
 
34500
  withval="$with_sqlite2"
 
34501
 
 
34502
    apu_have_sqlite2=0
 
34503
    if test "$withval" = "yes"; then
 
34504
      if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34505
  echo "$as_me:$LINENO: checking for sqlite.h" >&5
 
34506
echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6
 
34507
if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34508
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34509
fi
 
34510
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5
 
34511
echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6
 
34512
else
 
34513
  # Is the header compilable?
 
34514
echo "$as_me:$LINENO: checking sqlite.h usability" >&5
 
34515
echo $ECHO_N "checking sqlite.h usability... $ECHO_C" >&6
 
34516
cat >conftest.$ac_ext <<_ACEOF
 
34517
/* confdefs.h.  */
 
34518
_ACEOF
 
34519
cat confdefs.h >>conftest.$ac_ext
 
34520
cat >>conftest.$ac_ext <<_ACEOF
 
34521
/* end confdefs.h.  */
 
34522
$ac_includes_default
 
34523
#include <sqlite.h>
 
34524
_ACEOF
 
34525
rm -f conftest.$ac_objext
 
34526
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
34527
  (eval $ac_compile) 2>conftest.er1
 
34528
  ac_status=$?
 
34529
  grep -v '^ *+' conftest.er1 >conftest.err
 
34530
  rm -f conftest.er1
 
34531
  cat conftest.err >&5
 
34532
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34533
  (exit $ac_status); } &&
 
34534
         { ac_try='test -z "$ac_c_werror_flag"
 
34535
                         || test ! -s conftest.err'
 
34536
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34537
  (eval $ac_try) 2>&5
 
34538
  ac_status=$?
 
34539
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34540
  (exit $ac_status); }; } &&
 
34541
         { ac_try='test -s conftest.$ac_objext'
 
34542
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34543
  (eval $ac_try) 2>&5
 
34544
  ac_status=$?
 
34545
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34546
  (exit $ac_status); }; }; then
 
34547
  ac_header_compiler=yes
 
34548
else
 
34549
  echo "$as_me: failed program was:" >&5
 
34550
sed 's/^/| /' conftest.$ac_ext >&5
 
34551
 
 
34552
ac_header_compiler=no
 
34553
fi
 
34554
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
34555
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
34556
echo "${ECHO_T}$ac_header_compiler" >&6
 
34557
 
 
34558
# Is the header present?
 
34559
echo "$as_me:$LINENO: checking sqlite.h presence" >&5
 
34560
echo $ECHO_N "checking sqlite.h presence... $ECHO_C" >&6
 
34561
cat >conftest.$ac_ext <<_ACEOF
 
34562
/* confdefs.h.  */
 
34563
_ACEOF
 
34564
cat confdefs.h >>conftest.$ac_ext
 
34565
cat >>conftest.$ac_ext <<_ACEOF
 
34566
/* end confdefs.h.  */
 
34567
#include <sqlite.h>
 
34568
_ACEOF
 
34569
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
34570
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
34571
  ac_status=$?
 
34572
  grep -v '^ *+' conftest.er1 >conftest.err
 
34573
  rm -f conftest.er1
 
34574
  cat conftest.err >&5
 
34575
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34576
  (exit $ac_status); } >/dev/null; then
 
34577
  if test -s conftest.err; then
 
34578
    ac_cpp_err=$ac_c_preproc_warn_flag
 
34579
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
34580
  else
 
34581
    ac_cpp_err=
 
34582
  fi
 
34583
else
 
34584
  ac_cpp_err=yes
 
34585
fi
 
34586
if test -z "$ac_cpp_err"; then
 
34587
  ac_header_preproc=yes
 
34588
else
 
34589
  echo "$as_me: failed program was:" >&5
 
34590
sed 's/^/| /' conftest.$ac_ext >&5
 
34591
 
 
34592
  ac_header_preproc=no
 
34593
fi
 
34594
rm -f conftest.err conftest.$ac_ext
 
34595
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
34596
echo "${ECHO_T}$ac_header_preproc" >&6
 
34597
 
 
34598
# So?  What about this header?
 
34599
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
34600
  yes:no: )
 
34601
    { echo "$as_me:$LINENO: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
34602
echo "$as_me: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
34603
    { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the compiler's result" >&5
 
34604
echo "$as_me: WARNING: sqlite.h: proceeding with the compiler's result" >&2;}
 
34605
    ac_header_preproc=yes
 
34606
    ;;
 
34607
  no:yes:* )
 
34608
    { echo "$as_me:$LINENO: WARNING: sqlite.h: present but cannot be compiled" >&5
 
34609
echo "$as_me: WARNING: sqlite.h: present but cannot be compiled" >&2;}
 
34610
    { echo "$as_me:$LINENO: WARNING: sqlite.h:     check for missing prerequisite headers?" >&5
 
34611
echo "$as_me: WARNING: sqlite.h:     check for missing prerequisite headers?" >&2;}
 
34612
    { echo "$as_me:$LINENO: WARNING: sqlite.h: see the Autoconf documentation" >&5
 
34613
echo "$as_me: WARNING: sqlite.h: see the Autoconf documentation" >&2;}
 
34614
    { echo "$as_me:$LINENO: WARNING: sqlite.h:     section \"Present But Cannot Be Compiled\"" >&5
 
34615
echo "$as_me: WARNING: sqlite.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
34616
    { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the preprocessor's result" >&5
 
34617
echo "$as_me: WARNING: sqlite.h: proceeding with the preprocessor's result" >&2;}
 
34618
    { echo "$as_me:$LINENO: WARNING: sqlite.h: in the future, the compiler will take precedence" >&5
 
34619
echo "$as_me: WARNING: sqlite.h: in the future, the compiler will take precedence" >&2;}
 
34620
    (
 
34621
      cat <<\_ASBOX
 
34622
## ------------------------------------------ ##
 
34623
## Report this to the AC_PACKAGE_NAME lists.  ##
 
34624
## ------------------------------------------ ##
 
34625
_ASBOX
 
34626
    ) |
 
34627
      sed "s/^/$as_me: WARNING:     /" >&2
 
34628
    ;;
 
34629
esac
 
34630
echo "$as_me:$LINENO: checking for sqlite.h" >&5
 
34631
echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6
 
34632
if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34633
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34634
else
 
34635
  ac_cv_header_sqlite_h=$ac_header_preproc
 
34636
fi
 
34637
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5
 
34638
echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6
 
34639
 
 
34640
fi
 
34641
if test $ac_cv_header_sqlite_h = yes; then
 
34642
  echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5
 
34643
echo $ECHO_N "checking for sqlite_open in -lsqlite... $ECHO_C" >&6
 
34644
if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then
 
34645
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34646
else
 
34647
  ac_check_lib_save_LIBS=$LIBS
 
34648
LIBS="-lsqlite  $LIBS"
 
34649
cat >conftest.$ac_ext <<_ACEOF
 
34650
/* confdefs.h.  */
 
34651
_ACEOF
 
34652
cat confdefs.h >>conftest.$ac_ext
 
34653
cat >>conftest.$ac_ext <<_ACEOF
 
34654
/* end confdefs.h.  */
 
34655
 
 
34656
/* Override any gcc2 internal prototype to avoid an error.  */
 
34657
#ifdef __cplusplus
 
34658
extern "C"
 
34659
#endif
 
34660
/* We use char because int might match the return type of a gcc2
 
34661
   builtin and then its argument prototype would still apply.  */
 
34662
char sqlite_open ();
 
34663
int
 
34664
main ()
 
34665
{
 
34666
sqlite_open ();
 
34667
  ;
 
34668
  return 0;
 
34669
}
 
34670
_ACEOF
 
34671
rm -f conftest.$ac_objext conftest$ac_exeext
 
34672
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
34673
  (eval $ac_link) 2>conftest.er1
 
34674
  ac_status=$?
 
34675
  grep -v '^ *+' conftest.er1 >conftest.err
 
34676
  rm -f conftest.er1
 
34677
  cat conftest.err >&5
 
34678
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34679
  (exit $ac_status); } &&
 
34680
         { ac_try='test -z "$ac_c_werror_flag"
 
34681
                         || test ! -s conftest.err'
 
34682
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34683
  (eval $ac_try) 2>&5
 
34684
  ac_status=$?
 
34685
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34686
  (exit $ac_status); }; } &&
 
34687
         { ac_try='test -s conftest$ac_exeext'
 
34688
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34689
  (eval $ac_try) 2>&5
 
34690
  ac_status=$?
 
34691
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34692
  (exit $ac_status); }; }; then
 
34693
  ac_cv_lib_sqlite_sqlite_open=yes
 
34694
else
 
34695
  echo "$as_me: failed program was:" >&5
 
34696
sed 's/^/| /' conftest.$ac_ext >&5
 
34697
 
 
34698
ac_cv_lib_sqlite_sqlite_open=no
 
34699
fi
 
34700
rm -f conftest.err conftest.$ac_objext \
 
34701
      conftest$ac_exeext conftest.$ac_ext
 
34702
LIBS=$ac_check_lib_save_LIBS
 
34703
fi
 
34704
echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_open" >&5
 
34705
echo "${ECHO_T}$ac_cv_lib_sqlite_sqlite_open" >&6
 
34706
if test $ac_cv_lib_sqlite_sqlite_open = yes; then
 
34707
  apu_have_sqlite2=1
 
34708
fi
 
34709
 
 
34710
fi
 
34711
 
 
34712
 
 
34713
    elif test "$withval" = "no"; then
 
34714
      apu_have_sqlite2=0
 
34715
    else
 
34716
      CPPFLAGS="-I$withval/include"
 
34717
      LIBS="-L$withval/lib "
 
34718
 
 
34719
      { echo "$as_me:$LINENO: checking for sqlite2 in $withval" >&5
 
34720
echo "$as_me: checking for sqlite2 in $withval" >&6;}
 
34721
      if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34722
  echo "$as_me:$LINENO: checking for sqlite.h" >&5
 
34723
echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6
 
34724
if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34725
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34726
fi
 
34727
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5
 
34728
echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6
 
34729
else
 
34730
  # Is the header compilable?
 
34731
echo "$as_me:$LINENO: checking sqlite.h usability" >&5
 
34732
echo $ECHO_N "checking sqlite.h usability... $ECHO_C" >&6
 
34733
cat >conftest.$ac_ext <<_ACEOF
 
34734
/* confdefs.h.  */
 
34735
_ACEOF
 
34736
cat confdefs.h >>conftest.$ac_ext
 
34737
cat >>conftest.$ac_ext <<_ACEOF
 
34738
/* end confdefs.h.  */
 
34739
$ac_includes_default
 
34740
#include <sqlite.h>
 
34741
_ACEOF
 
34742
rm -f conftest.$ac_objext
 
34743
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
34744
  (eval $ac_compile) 2>conftest.er1
 
34745
  ac_status=$?
 
34746
  grep -v '^ *+' conftest.er1 >conftest.err
 
34747
  rm -f conftest.er1
 
34748
  cat conftest.err >&5
 
34749
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34750
  (exit $ac_status); } &&
 
34751
         { ac_try='test -z "$ac_c_werror_flag"
 
34752
                         || test ! -s conftest.err'
 
34753
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34754
  (eval $ac_try) 2>&5
 
34755
  ac_status=$?
 
34756
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34757
  (exit $ac_status); }; } &&
 
34758
         { ac_try='test -s conftest.$ac_objext'
 
34759
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34760
  (eval $ac_try) 2>&5
 
34761
  ac_status=$?
 
34762
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34763
  (exit $ac_status); }; }; then
 
34764
  ac_header_compiler=yes
 
34765
else
 
34766
  echo "$as_me: failed program was:" >&5
 
34767
sed 's/^/| /' conftest.$ac_ext >&5
 
34768
 
 
34769
ac_header_compiler=no
 
34770
fi
 
34771
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
34772
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
34773
echo "${ECHO_T}$ac_header_compiler" >&6
 
34774
 
 
34775
# Is the header present?
 
34776
echo "$as_me:$LINENO: checking sqlite.h presence" >&5
 
34777
echo $ECHO_N "checking sqlite.h presence... $ECHO_C" >&6
 
34778
cat >conftest.$ac_ext <<_ACEOF
 
34779
/* confdefs.h.  */
 
34780
_ACEOF
 
34781
cat confdefs.h >>conftest.$ac_ext
 
34782
cat >>conftest.$ac_ext <<_ACEOF
 
34783
/* end confdefs.h.  */
 
34784
#include <sqlite.h>
 
34785
_ACEOF
 
34786
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
34787
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
34788
  ac_status=$?
 
34789
  grep -v '^ *+' conftest.er1 >conftest.err
 
34790
  rm -f conftest.er1
 
34791
  cat conftest.err >&5
 
34792
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34793
  (exit $ac_status); } >/dev/null; then
 
34794
  if test -s conftest.err; then
 
34795
    ac_cpp_err=$ac_c_preproc_warn_flag
 
34796
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
34797
  else
 
34798
    ac_cpp_err=
 
34799
  fi
 
34800
else
 
34801
  ac_cpp_err=yes
 
34802
fi
 
34803
if test -z "$ac_cpp_err"; then
 
34804
  ac_header_preproc=yes
 
34805
else
 
34806
  echo "$as_me: failed program was:" >&5
 
34807
sed 's/^/| /' conftest.$ac_ext >&5
 
34808
 
 
34809
  ac_header_preproc=no
 
34810
fi
 
34811
rm -f conftest.err conftest.$ac_ext
 
34812
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
34813
echo "${ECHO_T}$ac_header_preproc" >&6
 
34814
 
 
34815
# So?  What about this header?
 
34816
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
34817
  yes:no: )
 
34818
    { echo "$as_me:$LINENO: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
34819
echo "$as_me: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
34820
    { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the compiler's result" >&5
 
34821
echo "$as_me: WARNING: sqlite.h: proceeding with the compiler's result" >&2;}
 
34822
    ac_header_preproc=yes
 
34823
    ;;
 
34824
  no:yes:* )
 
34825
    { echo "$as_me:$LINENO: WARNING: sqlite.h: present but cannot be compiled" >&5
 
34826
echo "$as_me: WARNING: sqlite.h: present but cannot be compiled" >&2;}
 
34827
    { echo "$as_me:$LINENO: WARNING: sqlite.h:     check for missing prerequisite headers?" >&5
 
34828
echo "$as_me: WARNING: sqlite.h:     check for missing prerequisite headers?" >&2;}
 
34829
    { echo "$as_me:$LINENO: WARNING: sqlite.h: see the Autoconf documentation" >&5
 
34830
echo "$as_me: WARNING: sqlite.h: see the Autoconf documentation" >&2;}
 
34831
    { echo "$as_me:$LINENO: WARNING: sqlite.h:     section \"Present But Cannot Be Compiled\"" >&5
 
34832
echo "$as_me: WARNING: sqlite.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
34833
    { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the preprocessor's result" >&5
 
34834
echo "$as_me: WARNING: sqlite.h: proceeding with the preprocessor's result" >&2;}
 
34835
    { echo "$as_me:$LINENO: WARNING: sqlite.h: in the future, the compiler will take precedence" >&5
 
34836
echo "$as_me: WARNING: sqlite.h: in the future, the compiler will take precedence" >&2;}
 
34837
    (
 
34838
      cat <<\_ASBOX
 
34839
## ------------------------------------------ ##
 
34840
## Report this to the AC_PACKAGE_NAME lists.  ##
 
34841
## ------------------------------------------ ##
 
34842
_ASBOX
 
34843
    ) |
 
34844
      sed "s/^/$as_me: WARNING:     /" >&2
 
34845
    ;;
 
34846
esac
 
34847
echo "$as_me:$LINENO: checking for sqlite.h" >&5
 
34848
echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6
 
34849
if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34850
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34851
else
 
34852
  ac_cv_header_sqlite_h=$ac_header_preproc
 
34853
fi
 
34854
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5
 
34855
echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6
 
34856
 
 
34857
fi
 
34858
if test $ac_cv_header_sqlite_h = yes; then
 
34859
  echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5
 
34860
echo $ECHO_N "checking for sqlite_open in -lsqlite... $ECHO_C" >&6
 
34861
if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then
 
34862
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34863
else
 
34864
  ac_check_lib_save_LIBS=$LIBS
 
34865
LIBS="-lsqlite  $LIBS"
 
34866
cat >conftest.$ac_ext <<_ACEOF
 
34867
/* confdefs.h.  */
 
34868
_ACEOF
 
34869
cat confdefs.h >>conftest.$ac_ext
 
34870
cat >>conftest.$ac_ext <<_ACEOF
 
34871
/* end confdefs.h.  */
 
34872
 
 
34873
/* Override any gcc2 internal prototype to avoid an error.  */
 
34874
#ifdef __cplusplus
 
34875
extern "C"
 
34876
#endif
 
34877
/* We use char because int might match the return type of a gcc2
 
34878
   builtin and then its argument prototype would still apply.  */
 
34879
char sqlite_open ();
 
34880
int
 
34881
main ()
 
34882
{
 
34883
sqlite_open ();
 
34884
  ;
 
34885
  return 0;
 
34886
}
 
34887
_ACEOF
 
34888
rm -f conftest.$ac_objext conftest$ac_exeext
 
34889
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
34890
  (eval $ac_link) 2>conftest.er1
 
34891
  ac_status=$?
 
34892
  grep -v '^ *+' conftest.er1 >conftest.err
 
34893
  rm -f conftest.er1
 
34894
  cat conftest.err >&5
 
34895
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34896
  (exit $ac_status); } &&
 
34897
         { ac_try='test -z "$ac_c_werror_flag"
 
34898
                         || test ! -s conftest.err'
 
34899
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34900
  (eval $ac_try) 2>&5
 
34901
  ac_status=$?
 
34902
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34903
  (exit $ac_status); }; } &&
 
34904
         { ac_try='test -s conftest$ac_exeext'
 
34905
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
34906
  (eval $ac_try) 2>&5
 
34907
  ac_status=$?
 
34908
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
34909
  (exit $ac_status); }; }; then
 
34910
  ac_cv_lib_sqlite_sqlite_open=yes
 
34911
else
 
34912
  echo "$as_me: failed program was:" >&5
 
34913
sed 's/^/| /' conftest.$ac_ext >&5
 
34914
 
 
34915
ac_cv_lib_sqlite_sqlite_open=no
 
34916
fi
 
34917
rm -f conftest.err conftest.$ac_objext \
 
34918
      conftest$ac_exeext conftest.$ac_ext
 
34919
LIBS=$ac_check_lib_save_LIBS
 
34920
fi
 
34921
echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_open" >&5
 
34922
echo "${ECHO_T}$ac_cv_lib_sqlite_sqlite_open" >&6
 
34923
if test $ac_cv_lib_sqlite_sqlite_open = yes; then
 
34924
  apu_have_sqlite2=1
 
34925
fi
 
34926
 
 
34927
fi
 
34928
 
 
34929
 
 
34930
      if test "$apu_have_sqlite2" != "0"; then
 
34931
 
 
34932
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
34933
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
34934
    APRUTIL_LDFLAGS="-L$withval/lib"
 
34935
  else
 
34936
    apr_addto_bugger="-L$withval/lib"
 
34937
    for i in $apr_addto_bugger; do
 
34938
      apr_addto_duplicate="0"
 
34939
      for j in $APRUTIL_LDFLAGS; do
 
34940
        if test "x$i" = "x$j"; then
 
34941
          apr_addto_duplicate="1"
 
34942
          break
 
34943
        fi
 
34944
      done
 
34945
      if test $apr_addto_duplicate = "0"; then
 
34946
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
34947
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
34948
      fi
 
34949
    done
 
34950
  fi
 
34951
 
 
34952
 
 
34953
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
34954
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
34955
    APRUTIL_INCLUDES="-I$withval/include"
 
34956
  else
 
34957
    apr_addto_bugger="-I$withval/include"
 
34958
    for i in $apr_addto_bugger; do
 
34959
      apr_addto_duplicate="0"
 
34960
      for j in $APRUTIL_INCLUDES; do
 
34961
        if test "x$i" = "x$j"; then
 
34962
          apr_addto_duplicate="1"
 
34963
          break
 
34964
        fi
 
34965
      done
 
34966
      if test $apr_addto_duplicate = "0"; then
 
34967
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
34968
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
34969
      fi
 
34970
    done
 
34971
  fi
 
34972
 
 
34973
      fi
 
34974
    fi
 
34975
 
 
34976
else
 
34977
 
 
34978
    apu_have_sqlite2=0
 
34979
    if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34980
  echo "$as_me:$LINENO: checking for sqlite.h" >&5
 
34981
echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6
 
34982
if test "${ac_cv_header_sqlite_h+set}" = set; then
 
34983
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
34984
fi
 
34985
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5
 
34986
echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6
 
34987
else
 
34988
  # Is the header compilable?
 
34989
echo "$as_me:$LINENO: checking sqlite.h usability" >&5
 
34990
echo $ECHO_N "checking sqlite.h usability... $ECHO_C" >&6
 
34991
cat >conftest.$ac_ext <<_ACEOF
 
34992
/* confdefs.h.  */
 
34993
_ACEOF
 
34994
cat confdefs.h >>conftest.$ac_ext
 
34995
cat >>conftest.$ac_ext <<_ACEOF
 
34996
/* end confdefs.h.  */
 
34997
$ac_includes_default
 
34998
#include <sqlite.h>
 
34999
_ACEOF
 
35000
rm -f conftest.$ac_objext
 
35001
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
35002
  (eval $ac_compile) 2>conftest.er1
 
35003
  ac_status=$?
 
35004
  grep -v '^ *+' conftest.er1 >conftest.err
 
35005
  rm -f conftest.er1
 
35006
  cat conftest.err >&5
 
35007
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35008
  (exit $ac_status); } &&
 
35009
         { ac_try='test -z "$ac_c_werror_flag"
 
35010
                         || test ! -s conftest.err'
 
35011
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
35012
  (eval $ac_try) 2>&5
 
35013
  ac_status=$?
 
35014
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35015
  (exit $ac_status); }; } &&
 
35016
         { ac_try='test -s conftest.$ac_objext'
 
35017
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
35018
  (eval $ac_try) 2>&5
 
35019
  ac_status=$?
 
35020
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35021
  (exit $ac_status); }; }; then
 
35022
  ac_header_compiler=yes
 
35023
else
 
35024
  echo "$as_me: failed program was:" >&5
 
35025
sed 's/^/| /' conftest.$ac_ext >&5
 
35026
 
 
35027
ac_header_compiler=no
 
35028
fi
 
35029
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
35030
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
35031
echo "${ECHO_T}$ac_header_compiler" >&6
 
35032
 
 
35033
# Is the header present?
 
35034
echo "$as_me:$LINENO: checking sqlite.h presence" >&5
 
35035
echo $ECHO_N "checking sqlite.h presence... $ECHO_C" >&6
 
35036
cat >conftest.$ac_ext <<_ACEOF
 
35037
/* confdefs.h.  */
 
35038
_ACEOF
 
35039
cat confdefs.h >>conftest.$ac_ext
 
35040
cat >>conftest.$ac_ext <<_ACEOF
 
35041
/* end confdefs.h.  */
 
35042
#include <sqlite.h>
 
35043
_ACEOF
 
35044
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
35045
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
35046
  ac_status=$?
 
35047
  grep -v '^ *+' conftest.er1 >conftest.err
 
35048
  rm -f conftest.er1
 
35049
  cat conftest.err >&5
 
35050
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35051
  (exit $ac_status); } >/dev/null; then
 
35052
  if test -s conftest.err; then
 
35053
    ac_cpp_err=$ac_c_preproc_warn_flag
 
35054
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
35055
  else
 
35056
    ac_cpp_err=
 
35057
  fi
 
35058
else
 
35059
  ac_cpp_err=yes
 
35060
fi
 
35061
if test -z "$ac_cpp_err"; then
 
35062
  ac_header_preproc=yes
 
35063
else
 
35064
  echo "$as_me: failed program was:" >&5
 
35065
sed 's/^/| /' conftest.$ac_ext >&5
 
35066
 
 
35067
  ac_header_preproc=no
 
35068
fi
 
35069
rm -f conftest.err conftest.$ac_ext
 
35070
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
35071
echo "${ECHO_T}$ac_header_preproc" >&6
 
35072
 
 
35073
# So?  What about this header?
 
35074
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
35075
  yes:no: )
 
35076
    { echo "$as_me:$LINENO: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
35077
echo "$as_me: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
35078
    { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the compiler's result" >&5
 
35079
echo "$as_me: WARNING: sqlite.h: proceeding with the compiler's result" >&2;}
 
35080
    ac_header_preproc=yes
 
35081
    ;;
 
35082
  no:yes:* )
 
35083
    { echo "$as_me:$LINENO: WARNING: sqlite.h: present but cannot be compiled" >&5
 
35084
echo "$as_me: WARNING: sqlite.h: present but cannot be compiled" >&2;}
 
35085
    { echo "$as_me:$LINENO: WARNING: sqlite.h:     check for missing prerequisite headers?" >&5
 
35086
echo "$as_me: WARNING: sqlite.h:     check for missing prerequisite headers?" >&2;}
 
35087
    { echo "$as_me:$LINENO: WARNING: sqlite.h: see the Autoconf documentation" >&5
 
35088
echo "$as_me: WARNING: sqlite.h: see the Autoconf documentation" >&2;}
 
35089
    { echo "$as_me:$LINENO: WARNING: sqlite.h:     section \"Present But Cannot Be Compiled\"" >&5
 
35090
echo "$as_me: WARNING: sqlite.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
35091
    { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the preprocessor's result" >&5
 
35092
echo "$as_me: WARNING: sqlite.h: proceeding with the preprocessor's result" >&2;}
 
35093
    { echo "$as_me:$LINENO: WARNING: sqlite.h: in the future, the compiler will take precedence" >&5
 
35094
echo "$as_me: WARNING: sqlite.h: in the future, the compiler will take precedence" >&2;}
 
35095
    (
 
35096
      cat <<\_ASBOX
 
35097
## ------------------------------------------ ##
 
35098
## Report this to the AC_PACKAGE_NAME lists.  ##
 
35099
## ------------------------------------------ ##
 
35100
_ASBOX
 
35101
    ) |
 
35102
      sed "s/^/$as_me: WARNING:     /" >&2
 
35103
    ;;
 
35104
esac
 
35105
echo "$as_me:$LINENO: checking for sqlite.h" >&5
 
35106
echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6
 
35107
if test "${ac_cv_header_sqlite_h+set}" = set; then
 
35108
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
35109
else
 
35110
  ac_cv_header_sqlite_h=$ac_header_preproc
 
35111
fi
 
35112
echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5
 
35113
echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6
 
35114
 
 
35115
fi
 
35116
if test $ac_cv_header_sqlite_h = yes; then
 
35117
  echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5
 
35118
echo $ECHO_N "checking for sqlite_open in -lsqlite... $ECHO_C" >&6
 
35119
if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then
 
35120
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
35121
else
 
35122
  ac_check_lib_save_LIBS=$LIBS
 
35123
LIBS="-lsqlite  $LIBS"
 
35124
cat >conftest.$ac_ext <<_ACEOF
 
35125
/* confdefs.h.  */
 
35126
_ACEOF
 
35127
cat confdefs.h >>conftest.$ac_ext
 
35128
cat >>conftest.$ac_ext <<_ACEOF
 
35129
/* end confdefs.h.  */
 
35130
 
 
35131
/* Override any gcc2 internal prototype to avoid an error.  */
 
35132
#ifdef __cplusplus
 
35133
extern "C"
 
35134
#endif
 
35135
/* We use char because int might match the return type of a gcc2
 
35136
   builtin and then its argument prototype would still apply.  */
 
35137
char sqlite_open ();
 
35138
int
 
35139
main ()
 
35140
{
 
35141
sqlite_open ();
 
35142
  ;
 
35143
  return 0;
 
35144
}
 
35145
_ACEOF
 
35146
rm -f conftest.$ac_objext conftest$ac_exeext
 
35147
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
35148
  (eval $ac_link) 2>conftest.er1
 
35149
  ac_status=$?
 
35150
  grep -v '^ *+' conftest.er1 >conftest.err
 
35151
  rm -f conftest.er1
 
35152
  cat conftest.err >&5
 
35153
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35154
  (exit $ac_status); } &&
 
35155
         { ac_try='test -z "$ac_c_werror_flag"
 
35156
                         || test ! -s conftest.err'
 
35157
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
35158
  (eval $ac_try) 2>&5
 
35159
  ac_status=$?
 
35160
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35161
  (exit $ac_status); }; } &&
 
35162
         { ac_try='test -s conftest$ac_exeext'
 
35163
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
35164
  (eval $ac_try) 2>&5
 
35165
  ac_status=$?
 
35166
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
35167
  (exit $ac_status); }; }; then
 
35168
  ac_cv_lib_sqlite_sqlite_open=yes
 
35169
else
 
35170
  echo "$as_me: failed program was:" >&5
 
35171
sed 's/^/| /' conftest.$ac_ext >&5
 
35172
 
 
35173
ac_cv_lib_sqlite_sqlite_open=no
 
35174
fi
 
35175
rm -f conftest.err conftest.$ac_objext \
 
35176
      conftest$ac_exeext conftest.$ac_ext
 
35177
LIBS=$ac_check_lib_save_LIBS
 
35178
fi
 
35179
echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_open" >&5
 
35180
echo "${ECHO_T}$ac_cv_lib_sqlite_sqlite_open" >&6
 
35181
if test $ac_cv_lib_sqlite_sqlite_open = yes; then
 
35182
  apu_have_sqlite2=1
 
35183
fi
 
35184
 
 
35185
fi
 
35186
 
 
35187
 
 
35188
 
 
35189
fi;
 
35190
 
 
35191
 
 
35192
 
 
35193
      if test "$apu_have_sqlite2" = "1"; then
 
35194
 
 
35195
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
35196
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-lsqlite\""
 
35197
    APRUTIL_EXPORT_LIBS="-lsqlite"
 
35198
  else
 
35199
    apr_addto_bugger="-lsqlite"
 
35200
    for i in $apr_addto_bugger; do
 
35201
      apr_addto_duplicate="0"
 
35202
      for j in $APRUTIL_EXPORT_LIBS; do
 
35203
        if test "x$i" = "x$j"; then
 
35204
          apr_addto_duplicate="1"
 
35205
          break
 
35206
        fi
 
35207
      done
 
35208
      if test $apr_addto_duplicate = "0"; then
 
35209
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
35210
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
35211
      fi
 
35212
    done
 
35213
  fi
 
35214
 
 
35215
 
 
35216
  if test "x$APRUTIL_LIBS" = "x"; then
 
35217
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-lsqlite\""
 
35218
    APRUTIL_LIBS="-lsqlite"
 
35219
  else
 
35220
    apr_addto_bugger="-lsqlite"
 
35221
    for i in $apr_addto_bugger; do
 
35222
      apr_addto_duplicate="0"
 
35223
      for j in $APRUTIL_LIBS; do
 
35224
        if test "x$i" = "x$j"; then
 
35225
          apr_addto_duplicate="1"
 
35226
          break
 
35227
        fi
 
35228
      done
 
35229
      if test $apr_addto_duplicate = "0"; then
 
35230
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
35231
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
35232
      fi
 
35233
    done
 
35234
  fi
 
35235
 
 
35236
  fi
 
35237
 
 
35238
 
 
35239
 
 
35240
 
 
35241
# Check whether --with-expat or --without-expat was given.
 
35242
if test "${with_expat+set}" = set; then
 
35243
  withval="$with_expat"
 
35244
 
 
35245
  if test "$withval" = "yes"; then
 
35246
    { { echo "$as_me:$LINENO: error: a directory must be specified for --with-expat" >&5
 
35247
echo "$as_me: error: a directory must be specified for --with-expat" >&2;}
 
35248
   { (exit 1); exit 1; }; }
 
35249
  elif test "$withval" = "no"; then
 
35250
    { { echo "$as_me:$LINENO: error: Expat cannot be disabled (at this time)" >&5
 
35251
echo "$as_me: error: Expat cannot be disabled (at this time)" >&2;}
 
35252
   { (exit 1); exit 1; }; }
 
35253
  elif test "$withval" = "builtin"; then
 
35254
    abs_expatdir="`cd $srcdir/xml/expat && pwd`"
 
35255
    if test -d $abs_expatdir/. -a ! -d xml/expat/.; then
 
35256
      $mkdir_p xml/expat
 
35257
    fi
 
35258
 
 
35259
  echo "$as_me:$LINENO: checking for Expat in xml/expat" >&5
 
35260
echo $ECHO_N "checking for Expat in xml/expat... $ECHO_C" >&6
 
35261
 
 
35262
  expat_libtool=""
 
35263
 
 
35264
  if test -r "$abs_expatdir/lib/expat.h.in"; then
 
35265
        expat_include_dir="$abs_expatdir/lib"
 
35266
    expat_ldflags="-L$abs_expatdir/lib"
 
35267
    expat_libs="-lexpat"
 
35268
    expat_libtool="$abs_expatdir/lib/libexpat.la"
 
35269
  elif test -r "$abs_expatdir/include/expat.h" -a \
 
35270
    -r "$abs_expatdir/lib/libexpat.la"; then
 
35271
        expat_include_dir="$abs_expatdir/include"
 
35272
    expat_ldflags="-L$abs_expatdir/lib"
 
35273
    expat_libs="-lexpat"
 
35274
    expat_libtool="$abs_expatdir/lib/libexpat.la"
 
35275
  elif test -r "$abs_expatdir/include/expat.h" -a \
 
35276
    -r "$abs_expatdir/lib64/libexpat.la"; then
 
35277
        expat_include_dir="$abs_expatdir/include"
 
35278
    expat_ldflags="-L$abs_expatdir/lib64"
 
35279
    expat_libs="-lexpat"
 
35280
    expat_libtool="$abs_expatdir/lib64/libexpat.la"
 
35281
  elif test -r "$abs_expatdir/include/expat.h" -a \
 
35282
    -r "$abs_expatdir/lib/libexpat.a"; then
 
35283
            expat_include_dir="$abs_expatdir/include"
 
35284
    expat_ldflags="-L$abs_expatdir/lib"
 
35285
    expat_libs="-lexpat"
 
35286
  elif test -r "$abs_expatdir/xmlparse.h"; then
 
35287
        expat_include_dir="$abs_expatdir"
 
35288
    expat_ldflags="-L$abs_expatdir"
 
35289
    expat_libs="-lexpat"
 
35290
    expat_libtool="$abs_expatdir/libexpat.la"
 
35291
    expat_old=yes
 
35292
  elif test -r "$abs_expatdir/include/xmlparse.h" -a \
 
35293
       -r "$abs_expatdir/lib/libexpat.a"; then
 
35294
        expat_include_dir="$abs_expatdir/include"
 
35295
    expat_ldflags="-L$abs_expatdir/lib"
 
35296
    expat_libs="-lexpat"
 
35297
    expat_old=yes
 
35298
  elif test -r "$abs_expatdir/include/xml/xmlparse.h" -a \
 
35299
       -r "$abs_expatdir/lib/xml/libexpat.a"; then
 
35300
        expat_include_dir="$abs_expatdir/include/xml"
 
35301
    expat_ldflags="-L$abs_expatdir/lib"
 
35302
    expat_libs="-lexpat"
 
35303
    expat_old=yes
 
35304
  elif test -r "$abs_expatdir/include/xmltok/xmlparse.h"; then
 
35305
        expat_include_dir="$abs_expatdir/include/xmltok"
 
35306
    expat_ldflags="-L$abs_expatdir/lib"
 
35307
    expat_libs="-lxmlparse -lxmltok"
 
35308
    expat_old=yes
 
35309
  elif test -r "$abs_expatdir/include/xml/xmlparse.h" -a \
 
35310
       -r "$abs_expatdir/lib/libexpat.a"; then
 
35311
        expat_include_dir="$abs_expatdir/include/xml"
 
35312
    expat_ldflags="-L$abs_expatdir/lib"
 
35313
    expat_libs="-lexpat"
 
35314
    expat_old=yes
 
35315
  elif test -r "$abs_expatdir/xmlparse/xmlparse.h"; then
 
35316
        expat_include_dir="$abs_expatdir/xmlparse"
 
35317
    expat_ldflags="-L$abs_expatdir"
 
35318
    expat_libs="-lexpat"
 
35319
    expat_old=yes
 
35320
  fi
 
35321
 
 
35322
  if test -n "$expat_include_dir"; then
 
35323
        echo "$as_me:$LINENO: result: yes" >&5
 
35324
echo "${ECHO_T}yes" >&6
 
35325
  else
 
35326
    echo "$as_me:$LINENO: result: no" >&5
 
35327
echo "${ECHO_T}no" >&6
 
35328
  fi
 
35329
 
 
35330
  else
 
35331
    abs_expatdir="`cd $withval && pwd`"
 
35332
 
 
35333
  echo "$as_me:$LINENO: checking for Expat in $withval" >&5
 
35334
echo $ECHO_N "checking for Expat in $withval... $ECHO_C" >&6
 
35335
 
 
35336
  expat_libtool=""
 
35337
 
 
35338
  if test -r "$abs_expatdir/lib/expat.h.in"; then
 
35339
        expat_include_dir="$abs_expatdir/lib"
 
35340
    expat_ldflags="-L$abs_expatdir/lib"
 
35341
    expat_libs="-lexpat"
 
35342
    expat_libtool="$abs_expatdir/lib/libexpat.la"
 
35343
  elif test -r "$abs_expatdir/include/expat.h" -a \
 
35344
    -r "$abs_expatdir/lib/libexpat.la"; then
 
35345
        expat_include_dir="$abs_expatdir/include"
 
35346
    expat_ldflags="-L$abs_expatdir/lib"
 
35347
    expat_libs="-lexpat"
 
35348
    expat_libtool="$abs_expatdir/lib/libexpat.la"
 
35349
  elif test -r "$abs_expatdir/include/expat.h" -a \
 
35350
    -r "$abs_expatdir/lib64/libexpat.la"; then
 
35351
        expat_include_dir="$abs_expatdir/include"
 
35352
    expat_ldflags="-L$abs_expatdir/lib64"
 
35353
    expat_libs="-lexpat"
 
35354
    expat_libtool="$abs_expatdir/lib64/libexpat.la"
 
35355
  elif test -r "$abs_expatdir/include/expat.h" -a \
 
35356
    -r "$abs_expatdir/lib/libexpat.a"; then
 
35357
            expat_include_dir="$abs_expatdir/include"
 
35358
    expat_ldflags="-L$abs_expatdir/lib"
 
35359
    expat_libs="-lexpat"
 
35360
  elif test -r "$abs_expatdir/xmlparse.h"; then
 
35361
        expat_include_dir="$abs_expatdir"
 
35362
    expat_ldflags="-L$abs_expatdir"
 
35363
    expat_libs="-lexpat"
 
35364
    expat_libtool="$abs_expatdir/libexpat.la"
 
35365
    expat_old=yes
 
35366
  elif test -r "$abs_expatdir/include/xmlparse.h" -a \
 
35367
       -r "$abs_expatdir/lib/libexpat.a"; then
 
35368
        expat_include_dir="$abs_expatdir/include"
 
35369
    expat_ldflags="-L$abs_expatdir/lib"
 
35370
    expat_libs="-lexpat"
 
35371
    expat_old=yes
 
35372
  elif test -r "$abs_expatdir/include/xml/xmlparse.h" -a \
 
35373
       -r "$abs_expatdir/lib/xml/libexpat.a"; then
 
35374
        expat_include_dir="$abs_expatdir/include/xml"
 
35375
    expat_ldflags="-L$abs_expatdir/lib"
 
35376
    expat_libs="-lexpat"
 
35377
    expat_old=yes
 
35378
  elif test -r "$abs_expatdir/include/xmltok/xmlparse.h"; then
 
35379
        expat_include_dir="$abs_expatdir/include/xmltok"
 
35380
    expat_ldflags="-L$abs_expatdir/lib"
 
35381
    expat_libs="-lxmlparse -lxmltok"
 
35382
    expat_old=yes
 
35383
  elif test -r "$abs_expatdir/include/xml/xmlparse.h" -a \
 
35384
       -r "$abs_expatdir/lib/libexpat.a"; then
 
35385
        expat_include_dir="$abs_expatdir/include/xml"
 
35386
    expat_ldflags="-L$abs_expatdir/lib"
 
35387
    expat_libs="-lexpat"
 
35388
    expat_old=yes
 
35389
  elif test -r "$abs_expatdir/xmlparse/xmlparse.h"; then
 
35390
        expat_include_dir="$abs_expatdir/xmlparse"
 
35391
    expat_ldflags="-L$abs_expatdir"
 
35392
    expat_libs="-lexpat"
 
35393
    expat_old=yes
 
35394
  fi
 
35395
 
 
35396
  if test -n "$expat_include_dir"; then
 
35397
        echo "$as_me:$LINENO: result: yes" >&5
 
35398
echo "${ECHO_T}yes" >&6
 
35399
  else
 
35400
    echo "$as_me:$LINENO: result: no" >&5
 
35401
echo "${ECHO_T}no" >&6
 
35402
  fi
 
35403
 
 
35404
    if test -z "$expat_include_dir"; then
 
35405
      { { echo "$as_me:$LINENO: error: Expat was not found (or recognized) in \"$withval\"" >&5
 
35406
echo "$as_me: error: Expat was not found (or recognized) in \"$withval\"" >&2;}
 
35407
   { (exit 1); exit 1; }; }
 
35408
    fi
 
35409
  fi
 
35410
 
 
35411
fi;
 
35412
 
 
35413
if test -z "$expat_include_dir"; then
 
35414
  for d in /usr /usr/local xml/expat-cvs xml/expat $srcdir/xml/expat ; do
 
35415
 
 
35416
  echo "$as_me:$LINENO: checking for Expat in $d" >&5
 
35417
echo $ECHO_N "checking for Expat in $d... $ECHO_C" >&6
 
35418
 
 
35419
  expat_libtool=""
 
35420
 
 
35421
  if test -r "$d/lib/expat.h.in"; then
 
35422
        expat_include_dir="$d/lib"
 
35423
    expat_ldflags="-L$d/lib"
 
35424
    expat_libs="-lexpat"
 
35425
    expat_libtool="$d/lib/libexpat.la"
 
35426
  elif test -r "$d/include/expat.h" -a \
 
35427
    -r "$d/lib/libexpat.la"; then
 
35428
        expat_include_dir="$d/include"
 
35429
    expat_ldflags="-L$d/lib"
 
35430
    expat_libs="-lexpat"
 
35431
    expat_libtool="$d/lib/libexpat.la"
 
35432
  elif test -r "$d/include/expat.h" -a \
 
35433
    -r "$d/lib64/libexpat.la"; then
 
35434
        expat_include_dir="$d/include"
 
35435
    expat_ldflags="-L$d/lib64"
 
35436
    expat_libs="-lexpat"
 
35437
    expat_libtool="$d/lib64/libexpat.la"
 
35438
  elif test -r "$d/include/expat.h" -a \
 
35439
    -r "$d/lib/libexpat.a"; then
 
35440
            expat_include_dir="$d/include"
 
35441
    expat_ldflags="-L$d/lib"
 
35442
    expat_libs="-lexpat"
 
35443
  elif test -r "$d/xmlparse.h"; then
 
35444
        expat_include_dir="$d"
 
35445
    expat_ldflags="-L$d"
 
35446
    expat_libs="-lexpat"
 
35447
    expat_libtool="$d/libexpat.la"
 
35448
    expat_old=yes
 
35449
  elif test -r "$d/include/xmlparse.h" -a \
 
35450
       -r "$d/lib/libexpat.a"; then
 
35451
        expat_include_dir="$d/include"
 
35452
    expat_ldflags="-L$d/lib"
 
35453
    expat_libs="-lexpat"
 
35454
    expat_old=yes
 
35455
  elif test -r "$d/include/xml/xmlparse.h" -a \
 
35456
       -r "$d/lib/xml/libexpat.a"; then
 
35457
        expat_include_dir="$d/include/xml"
 
35458
    expat_ldflags="-L$d/lib"
 
35459
    expat_libs="-lexpat"
 
35460
    expat_old=yes
 
35461
  elif test -r "$d/include/xmltok/xmlparse.h"; then
 
35462
        expat_include_dir="$d/include/xmltok"
 
35463
    expat_ldflags="-L$d/lib"
 
35464
    expat_libs="-lxmlparse -lxmltok"
 
35465
    expat_old=yes
 
35466
  elif test -r "$d/include/xml/xmlparse.h" -a \
 
35467
       -r "$d/lib/libexpat.a"; then
 
35468
        expat_include_dir="$d/include/xml"
 
35469
    expat_ldflags="-L$d/lib"
 
35470
    expat_libs="-lexpat"
 
35471
    expat_old=yes
 
35472
  elif test -r "$d/xmlparse/xmlparse.h"; then
 
35473
        expat_include_dir="$d/xmlparse"
 
35474
    expat_ldflags="-L$d"
 
35475
    expat_libs="-lexpat"
 
35476
    expat_old=yes
 
35477
  fi
 
35478
 
 
35479
  if test -n "$expat_include_dir"; then
 
35480
        echo "$as_me:$LINENO: result: yes" >&5
 
35481
echo "${ECHO_T}yes" >&6
 
35482
  else
 
35483
    echo "$as_me:$LINENO: result: no" >&5
 
35484
echo "${ECHO_T}no" >&6
 
35485
  fi
 
35486
 
 
35487
    if test -n "$expat_include_dir"; then
 
35488
            if test "$d" = "/usr"; then
 
35489
        expat_ldflags=""
 
35490
      fi
 
35491
      break
 
35492
    fi
 
35493
  done
 
35494
fi
 
35495
if test -z "$expat_include_dir"; then
 
35496
  { { echo "$as_me:$LINENO: error: could not locate Expat. use --with-expat" >&5
 
35497
echo "$as_me: error: could not locate Expat. use --with-expat" >&2;}
 
35498
   { (exit 1); exit 1; }; }
 
35499
fi
 
35500
 
 
35501
if test -z "$expat_libtool"; then
 
35502
  expat_libtool="$expat_ldflags $expat_libs"
 
35503
fi
 
35504
 
 
35505
if test -n "$expat_old"; then
 
35506
 
 
35507
cat >>confdefs.h <<\_ACEOF
 
35508
#define APR_HAVE_OLD_EXPAT 1
 
35509
_ACEOF
 
35510
 
 
35511
fi
 
35512
 
 
35513
if test "$expat_include_dir" = "xml/expat/lib" -o "$expat_include_dir" = "xml/expat-cvs/lib"; then
 
35514
  bundled_subdir="`echo $expat_include_dir | sed -e 's%/lib%%'`"
 
35515
 
 
35516
  # save our work to this point; this allows the sub-package to use it
 
35517
  cat >confcache <<\_ACEOF
 
35518
# This file is a shell script that caches the results of configure
 
35519
# tests run on this system so they can be shared between configure
 
35520
# scripts and configure runs, see configure's option --config-cache.
 
35521
# It is not useful on other systems.  If it contains results you don't
 
35522
# want to keep, you may remove or edit it.
 
35523
#
 
35524
# config.status only pays attention to the cache file if you give it
 
35525
# the --recheck option to rerun configure.
 
35526
#
 
35527
# `ac_cv_env_foo' variables (set or unset) will be overridden when
 
35528
# loading this file, other *unset* `ac_cv_foo' will be assigned the
 
35529
# following values.
 
35530
 
 
35531
_ACEOF
 
35532
 
 
35533
# The following way of writing the cache mishandles newlines in values,
 
35534
# but we know of no workaround that is simple, portable, and efficient.
 
35535
# So, don't put newlines in cache variables' values.
 
35536
# Ultrix sh set writes to stderr and can't be redirected directly,
 
35537
# and sets the high bit in the cache file unless we assign to the vars.
 
35538
{
 
35539
  (set) 2>&1 |
 
35540
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
 
35541
    *ac_space=\ *)
 
35542
      # `set' does not quote correctly, so add quotes (double-quote
 
35543
      # substitution turns \\\\ into \\, and sed turns \\ into \).
 
35544
      sed -n \
 
35545
        "s/'/'\\\\''/g;
 
35546
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
 
35547
      ;;
 
35548
    *)
 
35549
      # `set' quotes correctly as required by POSIX, so do not add quotes.
 
35550
      sed -n \
 
35551
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
 
35552
      ;;
 
35553
    esac;
 
35554
} |
 
35555
  sed '
 
35556
     t clear
 
35557
     : clear
 
35558
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
 
35559
     t end
 
35560
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
 
35561
     : end' >>confcache
 
35562
if diff $cache_file confcache >/dev/null 2>&1; then :; else
 
35563
  if test -w $cache_file; then
 
35564
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
 
35565
    cat confcache >$cache_file
 
35566
  else
 
35567
    echo "not updating unwritable cache $cache_file"
 
35568
  fi
 
35569
fi
 
35570
rm -f confcache
 
35571
 
 
35572
  echo "configuring package in $bundled_subdir now"
 
35573
  ac_popdir=`pwd`
 
35574
  apr_config_subdirs="$bundled_subdir"
 
35575
  test -d $bundled_subdir || $mkdir_p $bundled_subdir
 
35576
  ac_abs_srcdir=`(cd $srcdir/$bundled_subdir && pwd)`
 
35577
  cd $bundled_subdir
 
35578
 
 
35579
      # A "../" for each directory in /$config_subdirs.
 
35580
      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
 
35581
 
 
35582
  # Make the cache file pathname absolute for the subdirs
 
35583
  # required to correctly handle subdirs that might actually
 
35584
  # be symlinks
 
35585
  case "$cache_file" in
 
35586
  /*) # already absolute
 
35587
    ac_sub_cache_file=$cache_file ;;
 
35588
  *)  # Was relative path.
 
35589
    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
 
35590
  esac
 
35591
 
 
35592
  apr_configure_args=$ac_configure_args
 
35593
 
 
35594
  # autoconf doesn't add --silent to ac_configure_args; explicitly pass it
 
35595
  test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
 
35596
 
 
35597
              if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir
 
35598
  then :
 
35599
    echo "$bundled_subdir configured properly"
 
35600
  else
 
35601
    echo "configure failed for $bundled_subdir"
 
35602
    exit 1
 
35603
  fi
 
35604
 
 
35605
  cd $ac_popdir
 
35606
 
 
35607
  # grab any updates from the sub-package
 
35608
  if test -r "$cache_file"; then
 
35609
  # Some versions of bash will fail to source /dev/null (special
 
35610
  # files actually), so we avoid doing that.
 
35611
  if test -f "$cache_file"; then
 
35612
    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 
35613
echo "$as_me: loading cache $cache_file" >&6;}
 
35614
    case $cache_file in
 
35615
      [\\/]* | ?:[\\/]* ) . $cache_file;;
 
35616
      *)                      . ./$cache_file;;
 
35617
    esac
 
35618
  fi
 
35619
else
 
35620
  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
 
35621
echo "$as_me: creating cache $cache_file" >&6;}
 
35622
  >$cache_file
 
35623
fi
 
35624
 
 
35625
 
 
35626
  expat_include_dir=$top_builddir/$bundled_subdir/lib
 
35627
  expat_ldflags="-L$top_builddir/$bundled_subdir/lib"
 
35628
  expat_libs="-lexpat"
 
35629
  expat_libtool=$top_builddir/$bundled_subdir/lib/libexpat.la
 
35630
  APR_XML_SUBDIRS="`echo $bundled_subdir | sed -e 's%xml/%%'`"
 
35631
 
 
35632
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
35633
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$expat_libtool\""
 
35634
    APRUTIL_EXPORT_LIBS="$expat_libtool"
 
35635
  else
 
35636
    apr_addto_bugger="$expat_libtool"
 
35637
    for i in $apr_addto_bugger; do
 
35638
      apr_addto_duplicate="0"
 
35639
      for j in $APRUTIL_EXPORT_LIBS; do
 
35640
        if test "x$i" = "x$j"; then
 
35641
          apr_addto_duplicate="1"
 
35642
          break
 
35643
        fi
 
35644
      done
 
35645
      if test $apr_addto_duplicate = "0"; then
 
35646
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
35647
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
35648
      fi
 
35649
    done
 
35650
  fi
 
35651
 
 
35652
else
 
35653
if test "$expat_include_dir" = "$abs_srcdir/xml/expat/include" -o "$expat_include_dir" = "$abs_srcdir/xml/expat/lib"; then
 
35654
      bundled_subdir="xml/expat"
 
35655
 
 
35656
  # save our work to this point; this allows the sub-package to use it
 
35657
  cat >confcache <<\_ACEOF
 
35658
# This file is a shell script that caches the results of configure
 
35659
# tests run on this system so they can be shared between configure
 
35660
# scripts and configure runs, see configure's option --config-cache.
 
35661
# It is not useful on other systems.  If it contains results you don't
 
35662
# want to keep, you may remove or edit it.
 
35663
#
 
35664
# config.status only pays attention to the cache file if you give it
 
35665
# the --recheck option to rerun configure.
 
35666
#
 
35667
# `ac_cv_env_foo' variables (set or unset) will be overridden when
 
35668
# loading this file, other *unset* `ac_cv_foo' will be assigned the
 
35669
# following values.
 
35670
 
 
35671
_ACEOF
 
35672
 
 
35673
# The following way of writing the cache mishandles newlines in values,
 
35674
# but we know of no workaround that is simple, portable, and efficient.
 
35675
# So, don't put newlines in cache variables' values.
 
35676
# Ultrix sh set writes to stderr and can't be redirected directly,
 
35677
# and sets the high bit in the cache file unless we assign to the vars.
 
35678
{
 
35679
  (set) 2>&1 |
 
35680
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
 
35681
    *ac_space=\ *)
 
35682
      # `set' does not quote correctly, so add quotes (double-quote
 
35683
      # substitution turns \\\\ into \\, and sed turns \\ into \).
 
35684
      sed -n \
 
35685
        "s/'/'\\\\''/g;
 
35686
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
 
35687
      ;;
 
35688
    *)
 
35689
      # `set' quotes correctly as required by POSIX, so do not add quotes.
 
35690
      sed -n \
 
35691
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
 
35692
      ;;
 
35693
    esac;
 
35694
} |
 
35695
  sed '
 
35696
     t clear
 
35697
     : clear
 
35698
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
 
35699
     t end
 
35700
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
 
35701
     : end' >>confcache
 
35702
if diff $cache_file confcache >/dev/null 2>&1; then :; else
 
35703
  if test -w $cache_file; then
 
35704
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
 
35705
    cat confcache >$cache_file
 
35706
  else
 
35707
    echo "not updating unwritable cache $cache_file"
 
35708
  fi
 
35709
fi
 
35710
rm -f confcache
 
35711
 
 
35712
  echo "configuring package in $bundled_subdir now"
 
35713
  ac_popdir=`pwd`
 
35714
  apr_config_subdirs="$bundled_subdir"
 
35715
  test -d $bundled_subdir || $mkdir_p $bundled_subdir
 
35716
  ac_abs_srcdir=`(cd $srcdir/$bundled_subdir && pwd)`
 
35717
  cd $bundled_subdir
 
35718
 
 
35719
      # A "../" for each directory in /$config_subdirs.
 
35720
      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
 
35721
 
 
35722
  # Make the cache file pathname absolute for the subdirs
 
35723
  # required to correctly handle subdirs that might actually
 
35724
  # be symlinks
 
35725
  case "$cache_file" in
 
35726
  /*) # already absolute
 
35727
    ac_sub_cache_file=$cache_file ;;
 
35728
  *)  # Was relative path.
 
35729
    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
 
35730
  esac
 
35731
 
 
35732
  apr_configure_args=$ac_configure_args
 
35733
 
 
35734
  # autoconf doesn't add --silent to ac_configure_args; explicitly pass it
 
35735
  test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
 
35736
 
 
35737
              if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir
 
35738
  then :
 
35739
    echo "$bundled_subdir configured properly"
 
35740
  else
 
35741
    echo "configure failed for $bundled_subdir"
 
35742
    exit 1
 
35743
  fi
 
35744
 
 
35745
  cd $ac_popdir
 
35746
 
 
35747
  # grab any updates from the sub-package
 
35748
  if test -r "$cache_file"; then
 
35749
  # Some versions of bash will fail to source /dev/null (special
 
35750
  # files actually), so we avoid doing that.
 
35751
  if test -f "$cache_file"; then
 
35752
    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 
35753
echo "$as_me: loading cache $cache_file" >&6;}
 
35754
    case $cache_file in
 
35755
      [\\/]* | ?:[\\/]* ) . $cache_file;;
 
35756
      *)                      . ./$cache_file;;
 
35757
    esac
 
35758
  fi
 
35759
else
 
35760
  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
 
35761
echo "$as_me: creating cache $cache_file" >&6;}
 
35762
  >$cache_file
 
35763
fi
 
35764
 
 
35765
 
 
35766
  expat_include_dir=$top_builddir/$bundled_subdir/lib
 
35767
  expat_ldflags="-L$top_builddir/$bundled_subdir/lib"
 
35768
  expat_libs="-lexpat"
 
35769
  expat_libtool=$top_builddir/$bundled_subdir/lib/libexpat.la
 
35770
  APR_XML_SUBDIRS="`echo $bundled_subdir | sed -e 's%xml/%%'`"
 
35771
 
 
35772
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
35773
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$expat_libtool\""
 
35774
    APRUTIL_EXPORT_LIBS="$expat_libtool"
 
35775
  else
 
35776
    apr_addto_bugger="$expat_libtool"
 
35777
    for i in $apr_addto_bugger; do
 
35778
      apr_addto_duplicate="0"
 
35779
      for j in $APRUTIL_EXPORT_LIBS; do
 
35780
        if test "x$i" = "x$j"; then
 
35781
          apr_addto_duplicate="1"
 
35782
          break
 
35783
        fi
 
35784
      done
 
35785
      if test $apr_addto_duplicate = "0"; then
 
35786
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
35787
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
35788
      fi
 
35789
    done
 
35790
  fi
 
35791
 
 
35792
else
 
35793
 
 
35794
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
35795
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$expat_libs\""
 
35796
    APRUTIL_EXPORT_LIBS="$expat_libs"
 
35797
  else
 
35798
    apr_addto_bugger="$expat_libs"
 
35799
    for i in $apr_addto_bugger; do
 
35800
      apr_addto_duplicate="0"
 
35801
      for j in $APRUTIL_EXPORT_LIBS; do
 
35802
        if test "x$i" = "x$j"; then
 
35803
          apr_addto_duplicate="1"
 
35804
          break
 
35805
        fi
 
35806
      done
 
35807
      if test $apr_addto_duplicate = "0"; then
 
35808
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
35809
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
35810
      fi
 
35811
    done
 
35812
  fi
 
35813
 
 
35814
fi
 
35815
fi
 
35816
APR_XML_DIR=$bundled_subdir
 
35817
APR_XML_EXPAT_OLD=$expat_old
 
35818
 
 
35819
 
 
35820
 
 
35821
 
 
35822
if test "$expat_include_dir" != "/usr/include"; then
 
35823
 
 
35824
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
35825
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$expat_include_dir\""
 
35826
    APRUTIL_INCLUDES="-I$expat_include_dir"
 
35827
  else
 
35828
    apr_addto_bugger="-I$expat_include_dir"
 
35829
    for i in $apr_addto_bugger; do
 
35830
      apr_addto_duplicate="0"
 
35831
      for j in $APRUTIL_INCLUDES; do
 
35832
        if test "x$i" = "x$j"; then
 
35833
          apr_addto_duplicate="1"
 
35834
          break
 
35835
        fi
 
35836
      done
 
35837
      if test $apr_addto_duplicate = "0"; then
 
35838
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
35839
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
35840
      fi
 
35841
    done
 
35842
  fi
 
35843
 
 
35844
fi
 
35845
 
 
35846
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
35847
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"$expat_ldflags\""
 
35848
    APRUTIL_LDFLAGS="$expat_ldflags"
 
35849
  else
 
35850
    apr_addto_bugger="$expat_ldflags"
 
35851
    for i in $apr_addto_bugger; do
 
35852
      apr_addto_duplicate="0"
 
35853
      for j in $APRUTIL_LDFLAGS; do
 
35854
        if test "x$i" = "x$j"; then
 
35855
          apr_addto_duplicate="1"
 
35856
          break
 
35857
        fi
 
35858
      done
 
35859
      if test $apr_addto_duplicate = "0"; then
 
35860
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
35861
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
35862
      fi
 
35863
    done
 
35864
  fi
 
35865
 
 
35866
 
 
35867
  if test "x$APRUTIL_LIBS" = "x"; then
 
35868
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$expat_libtool\""
 
35869
    APRUTIL_LIBS="$expat_libtool"
 
35870
  else
 
35871
    apr_addto_bugger="$expat_libtool"
 
35872
    for i in $apr_addto_bugger; do
 
35873
      apr_addto_duplicate="0"
 
35874
      for j in $APRUTIL_LIBS; do
 
35875
        if test "x$i" = "x$j"; then
 
35876
          apr_addto_duplicate="1"
 
35877
          break
 
35878
        fi
 
35879
      done
 
35880
      if test $apr_addto_duplicate = "0"; then
 
35881
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
35882
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
35883
      fi
 
35884
    done
 
35885
  fi
 
35886
 
 
35887
 
 
35888
 
 
35889
 
 
35890
apu_iconv_dir="unknown"
 
35891
have_apr_iconv="0"
 
35892
 
 
35893
# Check whether --with-iconv or --without-iconv was given.
 
35894
if test "${with_iconv+set}" = set; then
 
35895
  withval="$with_iconv"
 
35896
   apu_iconv_dir="$withval"
 
35897
    if test "$apu_iconv_dir" != "yes"; then
 
35898
 
 
35899
  if test "x$CPPFLAGS" = "x"; then
 
35900
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$apu_iconv_dir/include\""
 
35901
    CPPFLAGS="-I$apu_iconv_dir/include"
 
35902
  else
 
35903
    apr_addto_bugger="-I$apu_iconv_dir/include"
 
35904
    for i in $apr_addto_bugger; do
 
35905
      apr_addto_duplicate="0"
 
35906
      for j in $CPPFLAGS; do
 
35907
        if test "x$i" = "x$j"; then
 
35908
          apr_addto_duplicate="1"
 
35909
          break
 
35910
        fi
 
35911
      done
 
35912
      if test $apr_addto_duplicate = "0"; then
 
35913
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
35914
        CPPFLAGS="$CPPFLAGS $i"
 
35915
      fi
 
35916
    done
 
35917
  fi
 
35918
 
 
35919
 
 
35920
  if test "x$LDFLAGS" = "x"; then
 
35921
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$apu_iconv_dir/lib\""
 
35922
    LDFLAGS="-L$apu_iconv_dir/lib"
 
35923
  else
 
35924
    apr_addto_bugger="-L$apu_iconv_dir/lib"
 
35925
    for i in $apr_addto_bugger; do
 
35926
      apr_addto_duplicate="0"
 
35927
      for j in $LDFLAGS; do
 
35928
        if test "x$i" = "x$j"; then
 
35929
          apr_addto_duplicate="1"
 
35930
          break
 
35931
        fi
 
35932
      done
 
35933
      if test $apr_addto_duplicate = "0"; then
 
35934
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
35935
        LDFLAGS="$LDFLAGS $i"
 
35936
      fi
 
35937
    done
 
35938
  fi
 
35939
 
 
35940
    fi
 
35941
    if test -f "$apu_iconv_dir/include/api_version.h"; then
 
35942
      have_apr_iconv="1"
 
35943
      have_iconv="0"
 
35944
 
 
35945
  if test "x$LIBS" = "x-lapriconv"; then
 
35946
    test "x$silent" != "xyes" && echo "  nulling LIBS"
 
35947
    LIBS=""
 
35948
  else
 
35949
    apr_new_bugger=""
 
35950
    apr_removed=0
 
35951
    for i in $LIBS; do
 
35952
      if test "x$i" != "x-lapriconv"; then
 
35953
        apr_new_bugger="$apr_new_bugger $i"
 
35954
      else
 
35955
        apr_removed=1
 
35956
      fi
 
35957
    done
 
35958
    if test $apr_removed = "1"; then
 
35959
      test "x$silent" != "xyes" && echo "  removed \"-lapriconv\" from LIBS"
 
35960
      LIBS=$apr_new_bugger
 
35961
    fi
 
35962
  fi
 
35963
 
 
35964
      echo "$as_me:$LINENO: result: \"Using apr-iconv\"" >&5
 
35965
echo "${ECHO_T}\"Using apr-iconv\"" >&6
 
35966
    fi
 
35967
 
 
35968
fi;
 
35969
 
 
35970
if test "$have_apr_iconv" != "1"; then
 
35971
  if test "${ac_cv_header_iconv_h+set}" = set; then
 
35972
  echo "$as_me:$LINENO: checking for iconv.h" >&5
 
35973
echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
 
35974
if test "${ac_cv_header_iconv_h+set}" = set; then
 
35975
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
35976
fi
 
35977
echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
 
35978
echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
 
35979
else
 
35980
  # Is the header compilable?
 
35981
echo "$as_me:$LINENO: checking iconv.h usability" >&5
 
35982
echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
 
35983
cat >conftest.$ac_ext <<_ACEOF
 
35984
/* confdefs.h.  */
 
35985
_ACEOF
 
35986
cat confdefs.h >>conftest.$ac_ext
 
35987
cat >>conftest.$ac_ext <<_ACEOF
 
35988
/* end confdefs.h.  */
 
35989
$ac_includes_default
 
35990
#include <iconv.h>
 
35991
_ACEOF
 
35992
rm -f conftest.$ac_objext
 
35993
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
35994
  (eval $ac_compile) 2>conftest.er1
 
35995
  ac_status=$?
 
35996
  grep -v '^ *+' conftest.er1 >conftest.err
 
35997
  rm -f conftest.er1
 
35998
  cat conftest.err >&5
 
35999
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36000
  (exit $ac_status); } &&
 
36001
         { ac_try='test -z "$ac_c_werror_flag"
 
36002
                         || test ! -s conftest.err'
 
36003
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36004
  (eval $ac_try) 2>&5
 
36005
  ac_status=$?
 
36006
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36007
  (exit $ac_status); }; } &&
 
36008
         { ac_try='test -s conftest.$ac_objext'
 
36009
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36010
  (eval $ac_try) 2>&5
 
36011
  ac_status=$?
 
36012
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36013
  (exit $ac_status); }; }; then
 
36014
  ac_header_compiler=yes
 
36015
else
 
36016
  echo "$as_me: failed program was:" >&5
 
36017
sed 's/^/| /' conftest.$ac_ext >&5
 
36018
 
 
36019
ac_header_compiler=no
 
36020
fi
 
36021
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
36022
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
36023
echo "${ECHO_T}$ac_header_compiler" >&6
 
36024
 
 
36025
# Is the header present?
 
36026
echo "$as_me:$LINENO: checking iconv.h presence" >&5
 
36027
echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
 
36028
cat >conftest.$ac_ext <<_ACEOF
 
36029
/* confdefs.h.  */
 
36030
_ACEOF
 
36031
cat confdefs.h >>conftest.$ac_ext
 
36032
cat >>conftest.$ac_ext <<_ACEOF
 
36033
/* end confdefs.h.  */
 
36034
#include <iconv.h>
 
36035
_ACEOF
 
36036
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
36037
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
36038
  ac_status=$?
 
36039
  grep -v '^ *+' conftest.er1 >conftest.err
 
36040
  rm -f conftest.er1
 
36041
  cat conftest.err >&5
 
36042
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36043
  (exit $ac_status); } >/dev/null; then
 
36044
  if test -s conftest.err; then
 
36045
    ac_cpp_err=$ac_c_preproc_warn_flag
 
36046
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
36047
  else
 
36048
    ac_cpp_err=
 
36049
  fi
 
36050
else
 
36051
  ac_cpp_err=yes
 
36052
fi
 
36053
if test -z "$ac_cpp_err"; then
 
36054
  ac_header_preproc=yes
 
36055
else
 
36056
  echo "$as_me: failed program was:" >&5
 
36057
sed 's/^/| /' conftest.$ac_ext >&5
 
36058
 
 
36059
  ac_header_preproc=no
 
36060
fi
 
36061
rm -f conftest.err conftest.$ac_ext
 
36062
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
36063
echo "${ECHO_T}$ac_header_preproc" >&6
 
36064
 
 
36065
# So?  What about this header?
 
36066
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
36067
  yes:no: )
 
36068
    { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
36069
echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
36070
    { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5
 
36071
echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;}
 
36072
    ac_header_preproc=yes
 
36073
    ;;
 
36074
  no:yes:* )
 
36075
    { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
 
36076
echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
 
36077
    { echo "$as_me:$LINENO: WARNING: iconv.h:     check for missing prerequisite headers?" >&5
 
36078
echo "$as_me: WARNING: iconv.h:     check for missing prerequisite headers?" >&2;}
 
36079
    { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5
 
36080
echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;}
 
36081
    { echo "$as_me:$LINENO: WARNING: iconv.h:     section \"Present But Cannot Be Compiled\"" >&5
 
36082
echo "$as_me: WARNING: iconv.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
36083
    { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
 
36084
echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
 
36085
    { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5
 
36086
echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;}
 
36087
    (
 
36088
      cat <<\_ASBOX
 
36089
## ------------------------------------------ ##
 
36090
## Report this to the AC_PACKAGE_NAME lists.  ##
 
36091
## ------------------------------------------ ##
 
36092
_ASBOX
 
36093
    ) |
 
36094
      sed "s/^/$as_me: WARNING:     /" >&2
 
36095
    ;;
 
36096
esac
 
36097
echo "$as_me:$LINENO: checking for iconv.h" >&5
 
36098
echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
 
36099
if test "${ac_cv_header_iconv_h+set}" = set; then
 
36100
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36101
else
 
36102
  ac_cv_header_iconv_h=$ac_header_preproc
 
36103
fi
 
36104
echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
 
36105
echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
 
36106
 
 
36107
fi
 
36108
if test $ac_cv_header_iconv_h = yes; then
 
36109
 
 
36110
 
 
36111
  cat >conftest.$ac_ext <<_ACEOF
 
36112
/* confdefs.h.  */
 
36113
_ACEOF
 
36114
cat confdefs.h >>conftest.$ac_ext
 
36115
cat >>conftest.$ac_ext <<_ACEOF
 
36116
/* end confdefs.h.  */
 
36117
 
 
36118
#include <stdlib.h>
 
36119
#include <iconv.h>
 
36120
 
 
36121
int
 
36122
main ()
 
36123
{
 
36124
 
 
36125
  iconv_t cd = iconv_open("", "");
 
36126
  iconv(cd, NULL, NULL, NULL, NULL);
 
36127
 
 
36128
  ;
 
36129
  return 0;
 
36130
}
 
36131
_ACEOF
 
36132
rm -f conftest.$ac_objext conftest$ac_exeext
 
36133
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
36134
  (eval $ac_link) 2>conftest.er1
 
36135
  ac_status=$?
 
36136
  grep -v '^ *+' conftest.er1 >conftest.err
 
36137
  rm -f conftest.er1
 
36138
  cat conftest.err >&5
 
36139
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36140
  (exit $ac_status); } &&
 
36141
         { ac_try='test -z "$ac_c_werror_flag"
 
36142
                         || test ! -s conftest.err'
 
36143
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36144
  (eval $ac_try) 2>&5
 
36145
  ac_status=$?
 
36146
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36147
  (exit $ac_status); }; } &&
 
36148
         { ac_try='test -s conftest$ac_exeext'
 
36149
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36150
  (eval $ac_try) 2>&5
 
36151
  ac_status=$?
 
36152
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36153
  (exit $ac_status); }; }; then
 
36154
   have_iconv="1"
 
36155
else
 
36156
  echo "$as_me: failed program was:" >&5
 
36157
sed 's/^/| /' conftest.$ac_ext >&5
 
36158
 
 
36159
 
 
36160
 
 
36161
 
 
36162
  if test "x$LIBS" = "x"; then
 
36163
    test "x$silent" != "xyes" && echo "  setting LIBS to \"-liconv\""
 
36164
    LIBS="-liconv"
 
36165
  else
 
36166
    apr_addto_bugger="-liconv"
 
36167
    for i in $apr_addto_bugger; do
 
36168
      apr_addto_duplicate="0"
 
36169
      for j in $LIBS; do
 
36170
        if test "x$i" = "x$j"; then
 
36171
          apr_addto_duplicate="1"
 
36172
          break
 
36173
        fi
 
36174
      done
 
36175
      if test $apr_addto_duplicate = "0"; then
 
36176
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
 
36177
        LIBS="$LIBS $i"
 
36178
      fi
 
36179
    done
 
36180
  fi
 
36181
 
 
36182
 
 
36183
 
 
36184
  cat >conftest.$ac_ext <<_ACEOF
 
36185
/* confdefs.h.  */
 
36186
_ACEOF
 
36187
cat confdefs.h >>conftest.$ac_ext
 
36188
cat >>conftest.$ac_ext <<_ACEOF
 
36189
/* end confdefs.h.  */
 
36190
 
 
36191
#include <stdlib.h>
 
36192
#include <iconv.h>
 
36193
 
 
36194
int
 
36195
main ()
 
36196
{
 
36197
 
 
36198
  iconv_t cd = iconv_open("", "");
 
36199
  iconv(cd, NULL, NULL, NULL, NULL);
 
36200
 
 
36201
  ;
 
36202
  return 0;
 
36203
}
 
36204
_ACEOF
 
36205
rm -f conftest.$ac_objext conftest$ac_exeext
 
36206
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
36207
  (eval $ac_link) 2>conftest.er1
 
36208
  ac_status=$?
 
36209
  grep -v '^ *+' conftest.er1 >conftest.err
 
36210
  rm -f conftest.er1
 
36211
  cat conftest.err >&5
 
36212
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36213
  (exit $ac_status); } &&
 
36214
         { ac_try='test -z "$ac_c_werror_flag"
 
36215
                         || test ! -s conftest.err'
 
36216
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36217
  (eval $ac_try) 2>&5
 
36218
  ac_status=$?
 
36219
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36220
  (exit $ac_status); }; } &&
 
36221
         { ac_try='test -s conftest$ac_exeext'
 
36222
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36223
  (eval $ac_try) 2>&5
 
36224
  ac_status=$?
 
36225
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36226
  (exit $ac_status); }; }; then
 
36227
 
 
36228
 
 
36229
  if test "x$APRUTIL_LIBS" = "x"; then
 
36230
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-liconv\""
 
36231
    APRUTIL_LIBS="-liconv"
 
36232
  else
 
36233
    apr_addto_bugger="-liconv"
 
36234
    for i in $apr_addto_bugger; do
 
36235
      apr_addto_duplicate="0"
 
36236
      for j in $APRUTIL_LIBS; do
 
36237
        if test "x$i" = "x$j"; then
 
36238
          apr_addto_duplicate="1"
 
36239
          break
 
36240
        fi
 
36241
      done
 
36242
      if test $apr_addto_duplicate = "0"; then
 
36243
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
36244
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
36245
      fi
 
36246
    done
 
36247
  fi
 
36248
 
 
36249
 
 
36250
  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
 
36251
    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-liconv\""
 
36252
    APRUTIL_EXPORT_LIBS="-liconv"
 
36253
  else
 
36254
    apr_addto_bugger="-liconv"
 
36255
    for i in $apr_addto_bugger; do
 
36256
      apr_addto_duplicate="0"
 
36257
      for j in $APRUTIL_EXPORT_LIBS; do
 
36258
        if test "x$i" = "x$j"; then
 
36259
          apr_addto_duplicate="1"
 
36260
          break
 
36261
        fi
 
36262
      done
 
36263
      if test $apr_addto_duplicate = "0"; then
 
36264
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
 
36265
        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
 
36266
      fi
 
36267
    done
 
36268
  fi
 
36269
 
 
36270
      have_iconv="1"
 
36271
else
 
36272
  echo "$as_me: failed program was:" >&5
 
36273
sed 's/^/| /' conftest.$ac_ext >&5
 
36274
 
 
36275
 have_iconv="0"
 
36276
fi
 
36277
rm -f conftest.err conftest.$ac_objext \
 
36278
      conftest$ac_exeext conftest.$ac_ext
 
36279
 
 
36280
 
 
36281
 
 
36282
  if test "x$LIBS" = "x-liconv"; then
 
36283
    test "x$silent" != "xyes" && echo "  nulling LIBS"
 
36284
    LIBS=""
 
36285
  else
 
36286
    apr_new_bugger=""
 
36287
    apr_removed=0
 
36288
    for i in $LIBS; do
 
36289
      if test "x$i" != "x-liconv"; then
 
36290
        apr_new_bugger="$apr_new_bugger $i"
 
36291
      else
 
36292
        apr_removed=1
 
36293
      fi
 
36294
    done
 
36295
    if test $apr_removed = "1"; then
 
36296
      test "x$silent" != "xyes" && echo "  removed \"-liconv\" from LIBS"
 
36297
      LIBS=$apr_new_bugger
 
36298
    fi
 
36299
  fi
 
36300
 
 
36301
 
 
36302
 
 
36303
fi
 
36304
rm -f conftest.err conftest.$ac_objext \
 
36305
      conftest$ac_exeext conftest.$ac_ext
 
36306
 
 
36307
 
 
36308
else
 
36309
   have_iconv="0"
 
36310
fi
 
36311
 
 
36312
 
 
36313
fi
 
36314
 
 
36315
if test "$apu_iconv_dir" != "unknown"; then
 
36316
  if test "$have_iconv" != "1"; then
 
36317
    if test "$have_apr_iconv" != "1"; then
 
36318
      { { echo "$as_me:$LINENO: error: iconv support requested, but not found" >&5
 
36319
echo "$as_me: error: iconv support requested, but not found" >&2;}
 
36320
   { (exit 1); exit 1; }; }
 
36321
    fi
 
36322
  fi
 
36323
 
 
36324
  if test "x$CPPFLAGS" = "x-I$apu_iconv_dir/include"; then
 
36325
    test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
 
36326
    CPPFLAGS=""
 
36327
  else
 
36328
    apr_new_bugger=""
 
36329
    apr_removed=0
 
36330
    for i in $CPPFLAGS; do
 
36331
      if test "x$i" != "x-I$apu_iconv_dir/include"; then
 
36332
        apr_new_bugger="$apr_new_bugger $i"
 
36333
      else
 
36334
        apr_removed=1
 
36335
      fi
 
36336
    done
 
36337
    if test $apr_removed = "1"; then
 
36338
      test "x$silent" != "xyes" && echo "  removed \"-I$apu_iconv_dir/include\" from CPPFLAGS"
 
36339
      CPPFLAGS=$apr_new_bugger
 
36340
    fi
 
36341
  fi
 
36342
 
 
36343
 
 
36344
  if test "x$LDFLAGS" = "x-L$apu_iconv_dir/lib"; then
 
36345
    test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
 
36346
    LDFLAGS=""
 
36347
  else
 
36348
    apr_new_bugger=""
 
36349
    apr_removed=0
 
36350
    for i in $LDFLAGS; do
 
36351
      if test "x$i" != "x-L$apu_iconv_dir/lib"; then
 
36352
        apr_new_bugger="$apr_new_bugger $i"
 
36353
      else
 
36354
        apr_removed=1
 
36355
      fi
 
36356
    done
 
36357
    if test $apr_removed = "1"; then
 
36358
      test "x$silent" != "xyes" && echo "  removed \"-L$apu_iconv_dir/lib\" from LDFLAGS"
 
36359
      LDFLAGS=$apr_new_bugger
 
36360
    fi
 
36361
  fi
 
36362
 
 
36363
 
 
36364
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
36365
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include\""
 
36366
    APRUTIL_INCLUDES="-I$apu_iconv_dir/include"
 
36367
  else
 
36368
    apr_addto_bugger="-I$apu_iconv_dir/include"
 
36369
    for i in $apr_addto_bugger; do
 
36370
      apr_addto_duplicate="0"
 
36371
      for j in $APRUTIL_INCLUDES; do
 
36372
        if test "x$i" = "x$j"; then
 
36373
          apr_addto_duplicate="1"
 
36374
          break
 
36375
        fi
 
36376
      done
 
36377
      if test $apr_addto_duplicate = "0"; then
 
36378
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
36379
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
36380
      fi
 
36381
    done
 
36382
  fi
 
36383
 
 
36384
 
 
36385
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
36386
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$apu_iconv_dir/lib\""
 
36387
    APRUTIL_LDFLAGS="-L$apu_iconv_dir/lib"
 
36388
  else
 
36389
    apr_addto_bugger="-L$apu_iconv_dir/lib"
 
36390
    for i in $apr_addto_bugger; do
 
36391
      apr_addto_duplicate="0"
 
36392
      for j in $APRUTIL_LDFLAGS; do
 
36393
        if test "x$i" = "x$j"; then
 
36394
          apr_addto_duplicate="1"
 
36395
          break
 
36396
        fi
 
36397
      done
 
36398
      if test $apr_addto_duplicate = "0"; then
 
36399
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
36400
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
36401
      fi
 
36402
    done
 
36403
  fi
 
36404
 
 
36405
fi
 
36406
 
 
36407
if test "$have_iconv" = "1"; then
 
36408
 
 
36409
echo "$as_me:$LINENO: checking for type of inbuf parameter to iconv" >&5
 
36410
echo $ECHO_N "checking for type of inbuf parameter to iconv... $ECHO_C" >&6
 
36411
if test "x$apu_iconv_inbuf_const" = "x"; then
 
36412
    apr_save_CFLAGS=$CFLAGS
 
36413
 CFLAGS="$CFLAGS $CFLAGS_WARN"
 
36414
 if test "$ac_cv_c_compiler_gnu" = "yes"; then
 
36415
   CFLAGS="$CFLAGS -Werror"
 
36416
 fi
 
36417
 cat >conftest.$ac_ext <<_ACEOF
 
36418
#include "confdefs.h"
 
36419
 
 
36420
 
 
36421
    #include <stddef.h>
 
36422
    #include <iconv.h>
 
36423
 
 
36424
  int main(int argc, const char *const *argv) {
 
36425
 
 
36426
    iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
 
36427
 
 
36428
     return 0; }
 
36429
_ACEOF
 
36430
rm -f conftest.$ac_objext
 
36431
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
36432
  (eval $ac_compile) 2>conftest.er1
 
36433
  ac_status=$?
 
36434
  grep -v '^ *+' conftest.er1 >conftest.err
 
36435
  rm -f conftest.er1
 
36436
  cat conftest.err >&5
 
36437
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36438
  (exit $ac_status); } &&
 
36439
         { ac_try='test -z "$ac_c_werror_flag"
 
36440
                         || test ! -s conftest.err'
 
36441
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36442
  (eval $ac_try) 2>&5
 
36443
  ac_status=$?
 
36444
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36445
  (exit $ac_status); }; } &&
 
36446
         { ac_try='test -s conftest.$ac_objext'
 
36447
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36448
  (eval $ac_try) 2>&5
 
36449
  ac_status=$?
 
36450
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36451
  (exit $ac_status); }; }; then
 
36452
  apu_iconv_inbuf_const="0"
 
36453
else
 
36454
  echo "$as_me: failed program was:" >&5
 
36455
sed 's/^/| /' conftest.$ac_ext >&5
 
36456
 
 
36457
apu_iconv_inbuf_const="1"
 
36458
fi
 
36459
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
36460
 CFLAGS=$apr_save_CFLAGS
 
36461
 
 
36462
fi
 
36463
if test "$apu_iconv_inbuf_const" = "1"; then
 
36464
 
 
36465
cat >>confdefs.h <<\_ACEOF
 
36466
#define APU_ICONV_INBUF_CONST 1
 
36467
_ACEOF
 
36468
 
 
36469
    msg="const char **"
 
36470
else
 
36471
    msg="char **"
 
36472
fi
 
36473
echo "$as_me:$LINENO: result: $msg" >&5
 
36474
echo "${ECHO_T}$msg" >&6
 
36475
 
 
36476
fi
 
36477
 
 
36478
 
 
36479
 
 
36480
 
 
36481
for ac_header in iconv.h langinfo.h
 
36482
do
 
36483
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
36484
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
36485
  echo "$as_me:$LINENO: checking for $ac_header" >&5
 
36486
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
36487
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
36488
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36489
fi
 
36490
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
36491
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
36492
else
 
36493
  # Is the header compilable?
 
36494
echo "$as_me:$LINENO: checking $ac_header usability" >&5
 
36495
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 
36496
cat >conftest.$ac_ext <<_ACEOF
 
36497
/* confdefs.h.  */
 
36498
_ACEOF
 
36499
cat confdefs.h >>conftest.$ac_ext
 
36500
cat >>conftest.$ac_ext <<_ACEOF
 
36501
/* end confdefs.h.  */
 
36502
$ac_includes_default
 
36503
#include <$ac_header>
 
36504
_ACEOF
 
36505
rm -f conftest.$ac_objext
 
36506
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
36507
  (eval $ac_compile) 2>conftest.er1
 
36508
  ac_status=$?
 
36509
  grep -v '^ *+' conftest.er1 >conftest.err
 
36510
  rm -f conftest.er1
 
36511
  cat conftest.err >&5
 
36512
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36513
  (exit $ac_status); } &&
 
36514
         { ac_try='test -z "$ac_c_werror_flag"
 
36515
                         || test ! -s conftest.err'
 
36516
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36517
  (eval $ac_try) 2>&5
 
36518
  ac_status=$?
 
36519
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36520
  (exit $ac_status); }; } &&
 
36521
         { ac_try='test -s conftest.$ac_objext'
 
36522
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36523
  (eval $ac_try) 2>&5
 
36524
  ac_status=$?
 
36525
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36526
  (exit $ac_status); }; }; then
 
36527
  ac_header_compiler=yes
 
36528
else
 
36529
  echo "$as_me: failed program was:" >&5
 
36530
sed 's/^/| /' conftest.$ac_ext >&5
 
36531
 
 
36532
ac_header_compiler=no
 
36533
fi
 
36534
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
36535
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
36536
echo "${ECHO_T}$ac_header_compiler" >&6
 
36537
 
 
36538
# Is the header present?
 
36539
echo "$as_me:$LINENO: checking $ac_header presence" >&5
 
36540
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 
36541
cat >conftest.$ac_ext <<_ACEOF
 
36542
/* confdefs.h.  */
 
36543
_ACEOF
 
36544
cat confdefs.h >>conftest.$ac_ext
 
36545
cat >>conftest.$ac_ext <<_ACEOF
 
36546
/* end confdefs.h.  */
 
36547
#include <$ac_header>
 
36548
_ACEOF
 
36549
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
36550
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
36551
  ac_status=$?
 
36552
  grep -v '^ *+' conftest.er1 >conftest.err
 
36553
  rm -f conftest.er1
 
36554
  cat conftest.err >&5
 
36555
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36556
  (exit $ac_status); } >/dev/null; then
 
36557
  if test -s conftest.err; then
 
36558
    ac_cpp_err=$ac_c_preproc_warn_flag
 
36559
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
36560
  else
 
36561
    ac_cpp_err=
 
36562
  fi
 
36563
else
 
36564
  ac_cpp_err=yes
 
36565
fi
 
36566
if test -z "$ac_cpp_err"; then
 
36567
  ac_header_preproc=yes
 
36568
else
 
36569
  echo "$as_me: failed program was:" >&5
 
36570
sed 's/^/| /' conftest.$ac_ext >&5
 
36571
 
 
36572
  ac_header_preproc=no
 
36573
fi
 
36574
rm -f conftest.err conftest.$ac_ext
 
36575
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
36576
echo "${ECHO_T}$ac_header_preproc" >&6
 
36577
 
 
36578
# So?  What about this header?
 
36579
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
36580
  yes:no: )
 
36581
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
36582
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
36583
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 
36584
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 
36585
    ac_header_preproc=yes
 
36586
    ;;
 
36587
  no:yes:* )
 
36588
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 
36589
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 
36590
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
 
36591
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
 
36592
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 
36593
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 
36594
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
 
36595
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
36596
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 
36597
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 
36598
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 
36599
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
36600
    (
 
36601
      cat <<\_ASBOX
 
36602
## ------------------------------------------ ##
 
36603
## Report this to the AC_PACKAGE_NAME lists.  ##
 
36604
## ------------------------------------------ ##
 
36605
_ASBOX
 
36606
    ) |
 
36607
      sed "s/^/$as_me: WARNING:     /" >&2
 
36608
    ;;
 
36609
esac
 
36610
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
36611
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
36612
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
36613
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36614
else
 
36615
  eval "$as_ac_Header=\$ac_header_preproc"
 
36616
fi
 
36617
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
36618
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
36619
 
 
36620
fi
 
36621
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
36622
  cat >>confdefs.h <<_ACEOF
 
36623
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
36624
_ACEOF
 
36625
 
 
36626
fi
 
36627
 
 
36628
done
 
36629
 
 
36630
for aprt_i in iconv.h langinfo.h
 
36631
do
 
36632
    ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
 
36633
    aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
 
36634
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
36635
       eval "$aprt_2=1"
 
36636
    else
 
36637
       eval "$aprt_2=0"
 
36638
    fi
 
36639
done
 
36640
 
 
36641
 
 
36642
 
 
36643
for ac_func in nl_langinfo
 
36644
do
 
36645
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 
36646
echo "$as_me:$LINENO: checking for $ac_func" >&5
 
36647
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 
36648
if eval "test \"\${$as_ac_var+set}\" = set"; then
 
36649
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36650
else
 
36651
  cat >conftest.$ac_ext <<_ACEOF
 
36652
/* confdefs.h.  */
 
36653
_ACEOF
 
36654
cat confdefs.h >>conftest.$ac_ext
 
36655
cat >>conftest.$ac_ext <<_ACEOF
 
36656
/* end confdefs.h.  */
 
36657
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 
36658
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
36659
#define $ac_func innocuous_$ac_func
 
36660
 
 
36661
/* System header to define __stub macros and hopefully few prototypes,
 
36662
    which can conflict with char $ac_func (); below.
 
36663
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
36664
    <limits.h> exists even on freestanding compilers.  */
 
36665
 
 
36666
#ifdef __STDC__
 
36667
# include <limits.h>
 
36668
#else
 
36669
# include <assert.h>
 
36670
#endif
 
36671
 
 
36672
#undef $ac_func
 
36673
 
 
36674
/* Override any gcc2 internal prototype to avoid an error.  */
 
36675
#ifdef __cplusplus
 
36676
extern "C"
 
36677
{
 
36678
#endif
 
36679
/* We use char because int might match the return type of a gcc2
 
36680
   builtin and then its argument prototype would still apply.  */
 
36681
char $ac_func ();
 
36682
/* The GNU C library defines this for functions which it implements
 
36683
    to always fail with ENOSYS.  Some functions are actually named
 
36684
    something starting with __ and the normal name is an alias.  */
 
36685
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
36686
choke me
 
36687
#else
 
36688
char (*f) () = $ac_func;
 
36689
#endif
 
36690
#ifdef __cplusplus
 
36691
}
 
36692
#endif
 
36693
 
 
36694
int
 
36695
main ()
 
36696
{
 
36697
return f != $ac_func;
 
36698
  ;
 
36699
  return 0;
 
36700
}
 
36701
_ACEOF
 
36702
rm -f conftest.$ac_objext conftest$ac_exeext
 
36703
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
36704
  (eval $ac_link) 2>conftest.er1
 
36705
  ac_status=$?
 
36706
  grep -v '^ *+' conftest.er1 >conftest.err
 
36707
  rm -f conftest.er1
 
36708
  cat conftest.err >&5
 
36709
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36710
  (exit $ac_status); } &&
 
36711
         { ac_try='test -z "$ac_c_werror_flag"
 
36712
                         || test ! -s conftest.err'
 
36713
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36714
  (eval $ac_try) 2>&5
 
36715
  ac_status=$?
 
36716
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36717
  (exit $ac_status); }; } &&
 
36718
         { ac_try='test -s conftest$ac_exeext'
 
36719
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36720
  (eval $ac_try) 2>&5
 
36721
  ac_status=$?
 
36722
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36723
  (exit $ac_status); }; }; then
 
36724
  eval "$as_ac_var=yes"
 
36725
else
 
36726
  echo "$as_me: failed program was:" >&5
 
36727
sed 's/^/| /' conftest.$ac_ext >&5
 
36728
 
 
36729
eval "$as_ac_var=no"
 
36730
fi
 
36731
rm -f conftest.err conftest.$ac_objext \
 
36732
      conftest$ac_exeext conftest.$ac_ext
 
36733
fi
 
36734
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
 
36735
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 
36736
if test `eval echo '${'$as_ac_var'}'` = yes; then
 
36737
  cat >>confdefs.h <<_ACEOF
 
36738
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 
36739
_ACEOF
 
36740
 
 
36741
fi
 
36742
done
 
36743
 
 
36744
for aprt_j in nl_langinfo
 
36745
do
 
36746
    aprt_3="have_$aprt_j"
 
36747
    if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
 
36748
       eval "$aprt_3=1"
 
36749
    else
 
36750
       eval "$aprt_3=0"
 
36751
    fi
 
36752
done
 
36753
 
 
36754
 
 
36755
  echo "$as_me:$LINENO: checking for CODESET in langinfo.h" >&5
 
36756
echo $ECHO_N "checking for CODESET in langinfo.h... $ECHO_C" >&6
 
36757
if test "${ac_cv_define_CODESET+set}" = set; then
 
36758
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36759
else
 
36760
 
 
36761
    cat >conftest.$ac_ext <<_ACEOF
 
36762
/* confdefs.h.  */
 
36763
_ACEOF
 
36764
cat confdefs.h >>conftest.$ac_ext
 
36765
cat >>conftest.$ac_ext <<_ACEOF
 
36766
/* end confdefs.h.  */
 
36767
 
 
36768
#include <langinfo.h>
 
36769
#ifdef CODESET
 
36770
YES_IS_DEFINED
 
36771
#endif
 
36772
 
 
36773
_ACEOF
 
36774
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
36775
  $EGREP "YES_IS_DEFINED" >/dev/null 2>&1; then
 
36776
  ac_cv_define_CODESET=yes
 
36777
else
 
36778
  ac_cv_define_CODESET=no
 
36779
fi
 
36780
rm -f conftest*
 
36781
 
 
36782
 
 
36783
fi
 
36784
echo "$as_me:$LINENO: result: $ac_cv_define_CODESET" >&5
 
36785
echo "${ECHO_T}$ac_cv_define_CODESET" >&6
 
36786
  if test "$ac_cv_define_CODESET" = "yes"; then
 
36787
 
 
36788
cat >>confdefs.h <<\_ACEOF
 
36789
#define HAVE_CODESET 1
 
36790
_ACEOF
 
36791
 
 
36792
  fi
 
36793
 
 
36794
 
 
36795
 
 
36796
 
 
36797
 
 
36798
 
 
36799
echo "$as_me:$LINENO: checking for library containing crypt" >&5
 
36800
echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
 
36801
if test "${ac_cv_search_crypt+set}" = set; then
 
36802
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36803
else
 
36804
  ac_func_search_save_LIBS=$LIBS
 
36805
ac_cv_search_crypt=no
 
36806
cat >conftest.$ac_ext <<_ACEOF
 
36807
/* confdefs.h.  */
 
36808
_ACEOF
 
36809
cat confdefs.h >>conftest.$ac_ext
 
36810
cat >>conftest.$ac_ext <<_ACEOF
 
36811
/* end confdefs.h.  */
 
36812
 
 
36813
/* Override any gcc2 internal prototype to avoid an error.  */
 
36814
#ifdef __cplusplus
 
36815
extern "C"
 
36816
#endif
 
36817
/* We use char because int might match the return type of a gcc2
 
36818
   builtin and then its argument prototype would still apply.  */
 
36819
char crypt ();
 
36820
int
 
36821
main ()
 
36822
{
 
36823
crypt ();
 
36824
  ;
 
36825
  return 0;
 
36826
}
 
36827
_ACEOF
 
36828
rm -f conftest.$ac_objext conftest$ac_exeext
 
36829
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
36830
  (eval $ac_link) 2>conftest.er1
 
36831
  ac_status=$?
 
36832
  grep -v '^ *+' conftest.er1 >conftest.err
 
36833
  rm -f conftest.er1
 
36834
  cat conftest.err >&5
 
36835
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36836
  (exit $ac_status); } &&
 
36837
         { ac_try='test -z "$ac_c_werror_flag"
 
36838
                         || test ! -s conftest.err'
 
36839
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36840
  (eval $ac_try) 2>&5
 
36841
  ac_status=$?
 
36842
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36843
  (exit $ac_status); }; } &&
 
36844
         { ac_try='test -s conftest$ac_exeext'
 
36845
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36846
  (eval $ac_try) 2>&5
 
36847
  ac_status=$?
 
36848
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36849
  (exit $ac_status); }; }; then
 
36850
  ac_cv_search_crypt="none required"
 
36851
else
 
36852
  echo "$as_me: failed program was:" >&5
 
36853
sed 's/^/| /' conftest.$ac_ext >&5
 
36854
 
 
36855
fi
 
36856
rm -f conftest.err conftest.$ac_objext \
 
36857
      conftest$ac_exeext conftest.$ac_ext
 
36858
if test "$ac_cv_search_crypt" = no; then
 
36859
  for ac_lib in crypt ufc; do
 
36860
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 
36861
    cat >conftest.$ac_ext <<_ACEOF
 
36862
/* confdefs.h.  */
 
36863
_ACEOF
 
36864
cat confdefs.h >>conftest.$ac_ext
 
36865
cat >>conftest.$ac_ext <<_ACEOF
 
36866
/* end confdefs.h.  */
 
36867
 
 
36868
/* Override any gcc2 internal prototype to avoid an error.  */
 
36869
#ifdef __cplusplus
 
36870
extern "C"
 
36871
#endif
 
36872
/* We use char because int might match the return type of a gcc2
 
36873
   builtin and then its argument prototype would still apply.  */
 
36874
char crypt ();
 
36875
int
 
36876
main ()
 
36877
{
 
36878
crypt ();
 
36879
  ;
 
36880
  return 0;
 
36881
}
 
36882
_ACEOF
 
36883
rm -f conftest.$ac_objext conftest$ac_exeext
 
36884
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
36885
  (eval $ac_link) 2>conftest.er1
 
36886
  ac_status=$?
 
36887
  grep -v '^ *+' conftest.er1 >conftest.err
 
36888
  rm -f conftest.er1
 
36889
  cat conftest.err >&5
 
36890
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36891
  (exit $ac_status); } &&
 
36892
         { ac_try='test -z "$ac_c_werror_flag"
 
36893
                         || test ! -s conftest.err'
 
36894
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36895
  (eval $ac_try) 2>&5
 
36896
  ac_status=$?
 
36897
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36898
  (exit $ac_status); }; } &&
 
36899
         { ac_try='test -s conftest$ac_exeext'
 
36900
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
36901
  (eval $ac_try) 2>&5
 
36902
  ac_status=$?
 
36903
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
36904
  (exit $ac_status); }; }; then
 
36905
  ac_cv_search_crypt="-l$ac_lib"
 
36906
break
 
36907
else
 
36908
  echo "$as_me: failed program was:" >&5
 
36909
sed 's/^/| /' conftest.$ac_ext >&5
 
36910
 
 
36911
fi
 
36912
rm -f conftest.err conftest.$ac_objext \
 
36913
      conftest$ac_exeext conftest.$ac_ext
 
36914
  done
 
36915
fi
 
36916
LIBS=$ac_func_search_save_LIBS
 
36917
fi
 
36918
echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
 
36919
echo "${ECHO_T}$ac_cv_search_crypt" >&6
 
36920
if test "$ac_cv_search_crypt" != no; then
 
36921
  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
 
36922
 
 
36923
fi
 
36924
 
 
36925
echo "$as_me:$LINENO: checking if system crypt() function is threadsafe" >&5
 
36926
echo $ECHO_N "checking if system crypt() function is threadsafe... $ECHO_C" >&6
 
36927
if test "x$apu_crypt_threadsafe" = "x1"; then
 
36928
 
 
36929
cat >>confdefs.h <<\_ACEOF
 
36930
#define APU_CRYPT_THREADSAFE 1
 
36931
_ACEOF
 
36932
 
 
36933
  msg="yes"
 
36934
else
 
36935
  msg="no"
 
36936
fi
 
36937
echo "$as_me:$LINENO: result: $msg" >&5
 
36938
echo "${ECHO_T}$msg" >&6
 
36939
 
 
36940
 
 
36941
for ac_func in crypt_r
 
36942
do
 
36943
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 
36944
echo "$as_me:$LINENO: checking for $ac_func" >&5
 
36945
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 
36946
if eval "test \"\${$as_ac_var+set}\" = set"; then
 
36947
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
36948
else
 
36949
  cat >conftest.$ac_ext <<_ACEOF
 
36950
/* confdefs.h.  */
 
36951
_ACEOF
 
36952
cat confdefs.h >>conftest.$ac_ext
 
36953
cat >>conftest.$ac_ext <<_ACEOF
 
36954
/* end confdefs.h.  */
 
36955
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 
36956
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
36957
#define $ac_func innocuous_$ac_func
 
36958
 
 
36959
/* System header to define __stub macros and hopefully few prototypes,
 
36960
    which can conflict with char $ac_func (); below.
 
36961
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
36962
    <limits.h> exists even on freestanding compilers.  */
 
36963
 
 
36964
#ifdef __STDC__
 
36965
# include <limits.h>
 
36966
#else
 
36967
# include <assert.h>
 
36968
#endif
 
36969
 
 
36970
#undef $ac_func
 
36971
 
 
36972
/* Override any gcc2 internal prototype to avoid an error.  */
 
36973
#ifdef __cplusplus
 
36974
extern "C"
 
36975
{
 
36976
#endif
 
36977
/* We use char because int might match the return type of a gcc2
 
36978
   builtin and then its argument prototype would still apply.  */
 
36979
char $ac_func ();
 
36980
/* The GNU C library defines this for functions which it implements
 
36981
    to always fail with ENOSYS.  Some functions are actually named
 
36982
    something starting with __ and the normal name is an alias.  */
 
36983
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
36984
choke me
 
36985
#else
 
36986
char (*f) () = $ac_func;
 
36987
#endif
 
36988
#ifdef __cplusplus
 
36989
}
 
36990
#endif
 
36991
 
 
36992
int
 
36993
main ()
 
36994
{
 
36995
return f != $ac_func;
 
36996
  ;
 
36997
  return 0;
 
36998
}
 
36999
_ACEOF
 
37000
rm -f conftest.$ac_objext conftest$ac_exeext
 
37001
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
37002
  (eval $ac_link) 2>conftest.er1
 
37003
  ac_status=$?
 
37004
  grep -v '^ *+' conftest.er1 >conftest.err
 
37005
  rm -f conftest.er1
 
37006
  cat conftest.err >&5
 
37007
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37008
  (exit $ac_status); } &&
 
37009
         { ac_try='test -z "$ac_c_werror_flag"
 
37010
                         || test ! -s conftest.err'
 
37011
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
37012
  (eval $ac_try) 2>&5
 
37013
  ac_status=$?
 
37014
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37015
  (exit $ac_status); }; } &&
 
37016
         { ac_try='test -s conftest$ac_exeext'
 
37017
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
37018
  (eval $ac_try) 2>&5
 
37019
  ac_status=$?
 
37020
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37021
  (exit $ac_status); }; }; then
 
37022
  eval "$as_ac_var=yes"
 
37023
else
 
37024
  echo "$as_me: failed program was:" >&5
 
37025
sed 's/^/| /' conftest.$ac_ext >&5
 
37026
 
 
37027
eval "$as_ac_var=no"
 
37028
fi
 
37029
rm -f conftest.err conftest.$ac_objext \
 
37030
      conftest$ac_exeext conftest.$ac_ext
 
37031
fi
 
37032
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
 
37033
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 
37034
if test `eval echo '${'$as_ac_var'}'` = yes; then
 
37035
  cat >>confdefs.h <<_ACEOF
 
37036
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 
37037
_ACEOF
 
37038
  crypt_r="1"
 
37039
else
 
37040
   crypt_r="0"
 
37041
fi
 
37042
done
 
37043
 
 
37044
if test "$crypt_r" = "1"; then
 
37045
 
 
37046
 
 
37047
echo "$as_me:$LINENO: checking style of crypt_r" >&5
 
37048
echo $ECHO_N "checking style of crypt_r... $ECHO_C" >&6
 
37049
if test "${apr_cv_crypt_r_style+set}" = set; then
 
37050
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
37051
else
 
37052
  cat >conftest.$ac_ext <<_ACEOF
 
37053
/* confdefs.h.  */
 
37054
_ACEOF
 
37055
cat confdefs.h >>conftest.$ac_ext
 
37056
cat >>conftest.$ac_ext <<_ACEOF
 
37057
/* end confdefs.h.  */
 
37058
#include <crypt.h>
 
37059
int
 
37060
main ()
 
37061
{
 
37062
CRYPTD buffer;
 
37063
  crypt_r("passwd", "hash", &buffer);
 
37064
  ;
 
37065
  return 0;
 
37066
}
 
37067
_ACEOF
 
37068
rm -f conftest.$ac_objext
 
37069
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
37070
  (eval $ac_compile) 2>conftest.er1
 
37071
  ac_status=$?
 
37072
  grep -v '^ *+' conftest.er1 >conftest.err
 
37073
  rm -f conftest.er1
 
37074
  cat conftest.err >&5
 
37075
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37076
  (exit $ac_status); } &&
 
37077
         { ac_try='test -z "$ac_c_werror_flag"
 
37078
                         || test ! -s conftest.err'
 
37079
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
37080
  (eval $ac_try) 2>&5
 
37081
  ac_status=$?
 
37082
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37083
  (exit $ac_status); }; } &&
 
37084
         { ac_try='test -s conftest.$ac_objext'
 
37085
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
37086
  (eval $ac_try) 2>&5
 
37087
  ac_status=$?
 
37088
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37089
  (exit $ac_status); }; }; then
 
37090
  apr_cv_crypt_r_style=cryptd
 
37091
else
 
37092
  echo "$as_me: failed program was:" >&5
 
37093
sed 's/^/| /' conftest.$ac_ext >&5
 
37094
 
 
37095
cat >conftest.$ac_ext <<_ACEOF
 
37096
/* confdefs.h.  */
 
37097
_ACEOF
 
37098
cat confdefs.h >>conftest.$ac_ext
 
37099
cat >>conftest.$ac_ext <<_ACEOF
 
37100
/* end confdefs.h.  */
 
37101
#include <crypt.h>
 
37102
int
 
37103
main ()
 
37104
{
 
37105
struct crypt_data buffer;
 
37106
   crypt_r("passwd", "hash", &buffer);
 
37107
  ;
 
37108
  return 0;
 
37109
}
 
37110
_ACEOF
 
37111
rm -f conftest.$ac_objext
 
37112
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
37113
  (eval $ac_compile) 2>conftest.er1
 
37114
  ac_status=$?
 
37115
  grep -v '^ *+' conftest.er1 >conftest.err
 
37116
  rm -f conftest.er1
 
37117
  cat conftest.err >&5
 
37118
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37119
  (exit $ac_status); } &&
 
37120
         { ac_try='test -z "$ac_c_werror_flag"
 
37121
                         || test ! -s conftest.err'
 
37122
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
37123
  (eval $ac_try) 2>&5
 
37124
  ac_status=$?
 
37125
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37126
  (exit $ac_status); }; } &&
 
37127
         { ac_try='test -s conftest.$ac_objext'
 
37128
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
37129
  (eval $ac_try) 2>&5
 
37130
  ac_status=$?
 
37131
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
37132
  (exit $ac_status); }; }; then
 
37133
  apr_cv_crypt_r_style=struct_crypt_data
 
37134
else
 
37135
  echo "$as_me: failed program was:" >&5
 
37136
sed 's/^/| /' conftest.$ac_ext >&5
 
37137
 
 
37138
apr_cv_crypt_r_style=none
 
37139
fi
 
37140
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
37141
fi
 
37142
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
37143
fi
 
37144
echo "$as_me:$LINENO: result: $apr_cv_crypt_r_style" >&5
 
37145
echo "${ECHO_T}$apr_cv_crypt_r_style" >&6
 
37146
 
 
37147
if test "$apr_cv_crypt_r_style" = "cryptd"; then
 
37148
 
 
37149
cat >>confdefs.h <<\_ACEOF
 
37150
#define CRYPT_R_CRYPTD 1
 
37151
_ACEOF
 
37152
 
 
37153
elif test "$apr_cv_crypt_r_style" = "struct_crypt_data"; then
 
37154
 
 
37155
cat >>confdefs.h <<\_ACEOF
 
37156
#define CRYPT_R_STRUCT_CRYPT_DATA 1
 
37157
_ACEOF
 
37158
 
 
37159
fi
 
37160
 
 
37161
fi
 
37162
 
 
37163
so_ext=$APR_SO_EXT
 
37164
lib_target=$APR_LIB_TARGET
 
37165
 
 
37166
 
 
37167
 
 
37168
APRUTIL_LIBNAME="aprutil${libsuffix}"
 
37169
 
 
37170
 
 
37171
 
 
37172
  if test "x$APRUTIL_LIBS" = "x"; then
 
37173
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$APR_LIBS\""
 
37174
    APRUTIL_LIBS="$APR_LIBS"
 
37175
  else
 
37176
    apr_addto_bugger="$APR_LIBS"
 
37177
    for i in $apr_addto_bugger; do
 
37178
      apr_addto_duplicate="0"
 
37179
      for j in $APRUTIL_LIBS; do
 
37180
        if test "x$i" = "x$j"; then
 
37181
          apr_addto_duplicate="1"
 
37182
          break
 
37183
        fi
 
37184
      done
 
37185
      if test $apr_addto_duplicate = "0"; then
 
37186
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
 
37187
        APRUTIL_LIBS="$APRUTIL_LIBS $i"
 
37188
      fi
 
37189
    done
 
37190
  fi
 
37191
 
 
37192
 
 
37193
 
 
37194
 
 
37195
 
 
37196
 
 
37197
 
 
37198
 
 
37199
 
 
37200
if test ! -d ./build; then
 
37201
   $mkdir_p build
 
37202
fi
 
37203
cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
 
37204
 
 
37205
case "$host_alias" in
 
37206
*bsdi* | BSD/OS)
 
37207
    # Check whether they've installed GNU make
 
37208
    if make --version > /dev/null 2>&1; then
 
37209
        INCLUDE_RULES="include $abs_builddir/build/rules.mk"
 
37210
        INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
 
37211
    else
 
37212
        INCLUDE_RULES=".include \"$abs_builddir/build/rules.mk\""
 
37213
        INCLUDE_OUTPUTS=".include \"$abs_srcdir/build-outputs.mk\""
 
37214
    fi
 
37215
    ;;
 
37216
*)
 
37217
    INCLUDE_RULES="include $abs_builddir/build/rules.mk"
 
37218
    INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
 
37219
    ;;
 
37220
esac
 
37221
 
 
37222
 
 
37223
 
 
37224
for d in include include/private; do
 
37225
    test -d $top_builddir/$d || mkdir $top_builddir/$d
 
37226
done
 
37227
 
 
37228
                                                                                          ac_config_files="$ac_config_files Makefile export_vars.sh build/pkg/pkginfo apr-util.pc apu-$APRUTIL_MAJOR_VERSION-config:apu-config.in include/private/apu_select_dbm.h include/apr_ldap.h include/apu.h include/apu_want.h"
 
37229
 
 
37230
 
 
37231
          ac_config_commands="$ac_config_commands default"
 
37232
 
 
37233
 
 
37234
if test -d $srcdir/test; then
 
37235
              ac_config_files="$ac_config_files test/Makefile"
 
37236
 
 
37237
fi
 
37238
 
 
37239
cat >confcache <<\_ACEOF
 
37240
# This file is a shell script that caches the results of configure
 
37241
# tests run on this system so they can be shared between configure
 
37242
# scripts and configure runs, see configure's option --config-cache.
 
37243
# It is not useful on other systems.  If it contains results you don't
 
37244
# want to keep, you may remove or edit it.
 
37245
#
 
37246
# config.status only pays attention to the cache file if you give it
 
37247
# the --recheck option to rerun configure.
 
37248
#
 
37249
# `ac_cv_env_foo' variables (set or unset) will be overridden when
 
37250
# loading this file, other *unset* `ac_cv_foo' will be assigned the
 
37251
# following values.
 
37252
 
 
37253
_ACEOF
 
37254
 
 
37255
# The following way of writing the cache mishandles newlines in values,
 
37256
# but we know of no workaround that is simple, portable, and efficient.
 
37257
# So, don't put newlines in cache variables' values.
 
37258
# Ultrix sh set writes to stderr and can't be redirected directly,
 
37259
# and sets the high bit in the cache file unless we assign to the vars.
 
37260
{
 
37261
  (set) 2>&1 |
 
37262
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
 
37263
    *ac_space=\ *)
 
37264
      # `set' does not quote correctly, so add quotes (double-quote
 
37265
      # substitution turns \\\\ into \\, and sed turns \\ into \).
 
37266
      sed -n \
 
37267
        "s/'/'\\\\''/g;
 
37268
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
 
37269
      ;;
 
37270
    *)
 
37271
      # `set' quotes correctly as required by POSIX, so do not add quotes.
 
37272
      sed -n \
 
37273
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
 
37274
      ;;
 
37275
    esac;
 
37276
} |
 
37277
  sed '
 
37278
     t clear
 
37279
     : clear
 
37280
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
 
37281
     t end
 
37282
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
 
37283
     : end' >>confcache
 
37284
if diff $cache_file confcache >/dev/null 2>&1; then :; else
 
37285
  if test -w $cache_file; then
 
37286
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
 
37287
    cat confcache >$cache_file
 
37288
  else
 
37289
    echo "not updating unwritable cache $cache_file"
 
37290
  fi
 
37291
fi
 
37292
rm -f confcache
 
37293
 
 
37294
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
37295
# Let make expand exec_prefix.
 
37296
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
37297
 
 
37298
# VPATH may cause trouble with some makes, so we remove $(srcdir),
 
37299
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
 
37300
# trailing colons and then remove the whole line if VPATH becomes empty
 
37301
# (actually we leave an empty line to preserve line numbers).
 
37302
if test "x$srcdir" = x.; then
 
37303
  ac_vpsub='/^[  ]*VPATH[        ]*=/{
 
37304
s/:*\$(srcdir):*/:/;
 
37305
s/:*\${srcdir}:*/:/;
 
37306
s/:*@srcdir@:*/:/;
 
37307
s/^\([^=]*=[     ]*\):*/\1/;
 
37308
s/:*$//;
 
37309
s/^[^=]*=[       ]*$//;
 
37310
}'
 
37311
fi
 
37312
 
 
37313
DEFS=-DHAVE_CONFIG_H
 
37314
 
 
37315
ac_libobjs=
 
37316
ac_ltlibobjs=
 
37317
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
 
37318
  # 1. Remove the extension, and $U if already installed.
 
37319
  ac_i=`echo "$ac_i" |
 
37320
         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
 
37321
  # 2. Add them.
 
37322
  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
 
37323
  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
 
37324
done
 
37325
LIBOBJS=$ac_libobjs
 
37326
 
 
37327
LTLIBOBJS=$ac_ltlibobjs
 
37328
 
 
37329
 
 
37330
 
 
37331
: ${CONFIG_STATUS=./config.status}
 
37332
ac_clean_files_save=$ac_clean_files
 
37333
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
 
37334
{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
 
37335
echo "$as_me: creating $CONFIG_STATUS" >&6;}
 
37336
cat >$CONFIG_STATUS <<_ACEOF
 
37337
#! $SHELL
 
37338
# Generated by $as_me.
 
37339
# Run this file to recreate the current configuration.
 
37340
# Compiler output produced by configure, useful for debugging
 
37341
# configure, is in config.log if it exists.
 
37342
 
 
37343
debug=false
 
37344
ac_cs_recheck=false
 
37345
ac_cs_silent=false
 
37346
SHELL=\${CONFIG_SHELL-$SHELL}
 
37347
_ACEOF
 
37348
 
 
37349
cat >>$CONFIG_STATUS <<\_ACEOF
 
37350
## --------------------- ##
 
37351
## M4sh Initialization.  ##
 
37352
## --------------------- ##
 
37353
 
 
37354
# Be Bourne compatible
 
37355
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 
37356
  emulate sh
 
37357
  NULLCMD=:
 
37358
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
 
37359
  # is contrary to our usage.  Disable this feature.
 
37360
  alias -g '${1+"$@"}'='"$@"'
 
37361
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
 
37362
  set -o posix
 
37363
fi
 
37364
DUALCASE=1; export DUALCASE # for MKS sh
 
37365
 
 
37366
# Support unset when possible.
 
37367
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 
37368
  as_unset=unset
 
37369
else
 
37370
  as_unset=false
 
37371
fi
 
37372
 
 
37373
 
 
37374
# Work around bugs in pre-3.0 UWIN ksh.
 
37375
$as_unset ENV MAIL MAILPATH
 
37376
PS1='$ '
 
37377
PS2='> '
 
37378
PS4='+ '
 
37379
 
 
37380
# NLS nuisances.
 
37381
for as_var in \
 
37382
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
 
37383
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
 
37384
  LC_TELEPHONE LC_TIME
 
37385
do
 
37386
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
 
37387
    eval $as_var=C; export $as_var
 
37388
  else
 
37389
    $as_unset $as_var
 
37390
  fi
 
37391
done
 
37392
 
 
37393
# Required to use basename.
 
37394
if expr a : '\(a\)' >/dev/null 2>&1; then
 
37395
  as_expr=expr
 
37396
else
 
37397
  as_expr=false
 
37398
fi
 
37399
 
 
37400
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
 
37401
  as_basename=basename
 
37402
else
 
37403
  as_basename=false
 
37404
fi
 
37405
 
 
37406
 
 
37407
# Name of the executable.
 
37408
as_me=`$as_basename "$0" ||
 
37409
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 
37410
         X"$0" : 'X\(//\)$' \| \
 
37411
         X"$0" : 'X\(/\)$' \| \
 
37412
         .     : '\(.\)' 2>/dev/null ||
 
37413
echo X/"$0" |
 
37414
    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
 
37415
          /^X\/\(\/\/\)$/{ s//\1/; q; }
 
37416
          /^X\/\(\/\).*/{ s//\1/; q; }
 
37417
          s/.*/./; q'`
 
37418
 
 
37419
 
 
37420
# PATH needs CR, and LINENO needs CR and PATH.
 
37421
# Avoid depending upon Character Ranges.
 
37422
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 
37423
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
37424
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 
37425
as_cr_digits='0123456789'
 
37426
as_cr_alnum=$as_cr_Letters$as_cr_digits
 
37427
 
 
37428
# The user is always right.
 
37429
if test "${PATH_SEPARATOR+set}" != set; then
 
37430
  echo "#! /bin/sh" >conf$$.sh
 
37431
  echo  "exit 0"   >>conf$$.sh
 
37432
  chmod +x conf$$.sh
 
37433
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
37434
    PATH_SEPARATOR=';'
 
37435
  else
 
37436
    PATH_SEPARATOR=:
 
37437
  fi
 
37438
  rm -f conf$$.sh
 
37439
fi
 
37440
 
 
37441
 
 
37442
  as_lineno_1=$LINENO
 
37443
  as_lineno_2=$LINENO
 
37444
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
 
37445
  test "x$as_lineno_1" != "x$as_lineno_2" &&
 
37446
  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
 
37447
  # Find who we are.  Look in the path if we contain no path at all
 
37448
  # relative or not.
 
37449
  case $0 in
 
37450
    *[\\/]* ) as_myself=$0 ;;
 
37451
    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
37452
for as_dir in $PATH
 
37453
do
 
37454
  IFS=$as_save_IFS
 
37455
  test -z "$as_dir" && as_dir=.
 
37456
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 
37457
done
 
37458
 
 
37459
       ;;
 
37460
  esac
 
37461
  # We did not find ourselves, most probably we were run as `sh COMMAND'
 
37462
  # in which case we are not to be found in the path.
 
37463
  if test "x$as_myself" = x; then
 
37464
    as_myself=$0
 
37465
  fi
 
37466
  if test ! -f "$as_myself"; then
 
37467
    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
 
37468
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
 
37469
   { (exit 1); exit 1; }; }
 
37470
  fi
 
37471
  case $CONFIG_SHELL in
 
37472
  '')
 
37473
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
37474
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 
37475
do
 
37476
  IFS=$as_save_IFS
 
37477
  test -z "$as_dir" && as_dir=.
 
37478
  for as_base in sh bash ksh sh5; do
 
37479
         case $as_dir in
 
37480
         /*)
 
37481
           if ("$as_dir/$as_base" -c '
 
37482
  as_lineno_1=$LINENO
 
37483
  as_lineno_2=$LINENO
 
37484
  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
 
37485
  test "x$as_lineno_1" != "x$as_lineno_2" &&
 
37486
  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
 
37487
             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
 
37488
             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
 
37489
             CONFIG_SHELL=$as_dir/$as_base
 
37490
             export CONFIG_SHELL
 
37491
             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
 
37492
           fi;;
 
37493
         esac
 
37494
       done
 
37495
done
 
37496
;;
 
37497
  esac
 
37498
 
 
37499
  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
 
37500
  # uniformly replaced by the line number.  The first 'sed' inserts a
 
37501
  # line-number line before each line; the second 'sed' does the real
 
37502
  # work.  The second script uses 'N' to pair each line-number line
 
37503
  # with the numbered line, and appends trailing '-' during
 
37504
  # substitution so that $LINENO is not a special case at line end.
 
37505
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
 
37506
  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
 
37507
  sed '=' <$as_myself |
 
37508
    sed '
 
37509
      N
 
37510
      s,$,-,
 
37511
      : loop
 
37512
      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
 
37513
      t loop
 
37514
      s,-$,,
 
37515
      s,^['$as_cr_digits']*\n,,
 
37516
    ' >$as_me.lineno &&
 
37517
  chmod +x $as_me.lineno ||
 
37518
    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
 
37519
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
 
37520
   { (exit 1); exit 1; }; }
 
37521
 
 
37522
  # Don't try to exec as it changes $[0], causing all sort of problems
 
37523
  # (the dirname of $[0] is not the place where we might find the
 
37524
  # original and so on.  Autoconf is especially sensible to this).
 
37525
  . ./$as_me.lineno
 
37526
  # Exit status is that of the last command.
 
37527
  exit
 
37528
}
 
37529
 
 
37530
 
 
37531
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
 
37532
  *c*,-n*) ECHO_N= ECHO_C='
 
37533
' ECHO_T='      ' ;;
 
37534
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
 
37535
  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
 
37536
esac
 
37537
 
 
37538
if expr a : '\(a\)' >/dev/null 2>&1; then
 
37539
  as_expr=expr
 
37540
else
 
37541
  as_expr=false
 
37542
fi
 
37543
 
 
37544
rm -f conf$$ conf$$.exe conf$$.file
 
37545
echo >conf$$.file
 
37546
if ln -s conf$$.file conf$$ 2>/dev/null; then
 
37547
  # We could just check for DJGPP; but this test a) works b) is more generic
 
37548
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
 
37549
  if test -f conf$$.exe; then
 
37550
    # Don't use ln at all; we don't have any links
 
37551
    as_ln_s='cp -p'
 
37552
  else
 
37553
    as_ln_s='ln -s'
 
37554
  fi
 
37555
elif ln conf$$.file conf$$ 2>/dev/null; then
 
37556
  as_ln_s=ln
 
37557
else
 
37558
  as_ln_s='cp -p'
 
37559
fi
 
37560
rm -f conf$$ conf$$.exe conf$$.file
 
37561
 
 
37562
if mkdir -p . 2>/dev/null; then
 
37563
  as_mkdir_p=:
 
37564
else
 
37565
  test -d ./-p && rmdir ./-p
 
37566
  as_mkdir_p=false
 
37567
fi
 
37568
 
 
37569
as_executable_p="test -f"
 
37570
 
 
37571
# Sed expression to map a string onto a valid CPP name.
 
37572
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
37573
 
 
37574
# Sed expression to map a string onto a valid variable name.
 
37575
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
37576
 
 
37577
 
 
37578
# IFS
 
37579
# We need space, tab and new line, in precisely that order.
 
37580
as_nl='
 
37581
'
 
37582
IFS="   $as_nl"
 
37583
 
 
37584
# CDPATH.
 
37585
$as_unset CDPATH
 
37586
 
 
37587
exec 6>&1
 
37588
 
 
37589
# Open the log real soon, to keep \$[0] and so on meaningful, and to
 
37590
# report actual input values of CONFIG_FILES etc. instead of their
 
37591
# values after options handling.  Logging --version etc. is OK.
 
37592
exec 5>>config.log
 
37593
{
 
37594
  echo
 
37595
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 
37596
## Running $as_me. ##
 
37597
_ASBOX
 
37598
} >&5
 
37599
cat >&5 <<_CSEOF
 
37600
 
 
37601
This file was extended by $as_me, which was
 
37602
generated by GNU Autoconf 2.59.  Invocation command line was
 
37603
 
 
37604
  CONFIG_FILES    = $CONFIG_FILES
 
37605
  CONFIG_HEADERS  = $CONFIG_HEADERS
 
37606
  CONFIG_LINKS    = $CONFIG_LINKS
 
37607
  CONFIG_COMMANDS = $CONFIG_COMMANDS
 
37608
  $ $0 $@
 
37609
 
 
37610
_CSEOF
 
37611
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
 
37612
echo >&5
 
37613
_ACEOF
 
37614
 
 
37615
# Files that config.status was made for.
 
37616
if test -n "$ac_config_files"; then
 
37617
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
 
37618
fi
 
37619
 
 
37620
if test -n "$ac_config_headers"; then
 
37621
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
 
37622
fi
 
37623
 
 
37624
if test -n "$ac_config_links"; then
 
37625
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
 
37626
fi
 
37627
 
 
37628
if test -n "$ac_config_commands"; then
 
37629
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
 
37630
fi
 
37631
 
 
37632
cat >>$CONFIG_STATUS <<\_ACEOF
 
37633
 
 
37634
ac_cs_usage="\
 
37635
\`$as_me' instantiates files from templates according to the
 
37636
current configuration.
 
37637
 
 
37638
Usage: $0 [OPTIONS] [FILE]...
 
37639
 
 
37640
  -h, --help       print this help, then exit
 
37641
  -V, --version    print version number, then exit
 
37642
  -q, --quiet      do not print progress messages
 
37643
  -d, --debug      don't remove temporary files
 
37644
      --recheck    update $as_me by reconfiguring in the same conditions
 
37645
  --file=FILE[:TEMPLATE]
 
37646
                   instantiate the configuration file FILE
 
37647
  --header=FILE[:TEMPLATE]
 
37648
                   instantiate the configuration header FILE
 
37649
 
 
37650
Configuration files:
 
37651
$config_files
 
37652
 
 
37653
Configuration headers:
 
37654
$config_headers
 
37655
 
 
37656
Configuration commands:
 
37657
$config_commands
 
37658
 
 
37659
Report bugs to <bug-autoconf@gnu.org>."
 
37660
_ACEOF
 
37661
 
 
37662
cat >>$CONFIG_STATUS <<_ACEOF
 
37663
ac_cs_version="\\
 
37664
config.status
 
37665
configured by $0, generated by GNU Autoconf 2.59,
 
37666
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
37667
 
 
37668
Copyright (C) 2003 Free Software Foundation, Inc.
 
37669
This config.status script is free software; the Free Software Foundation
 
37670
gives unlimited permission to copy, distribute and modify it."
 
37671
srcdir=$srcdir
 
37672
INSTALL="$INSTALL"
 
37673
_ACEOF
 
37674
 
 
37675
cat >>$CONFIG_STATUS <<\_ACEOF
 
37676
# If no file are specified by the user, then we need to provide default
 
37677
# value.  By we need to know if files were specified by the user.
 
37678
ac_need_defaults=:
 
37679
while test $# != 0
 
37680
do
 
37681
  case $1 in
 
37682
  --*=*)
 
37683
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
 
37684
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
 
37685
    ac_shift=:
 
37686
    ;;
 
37687
  -*)
 
37688
    ac_option=$1
 
37689
    ac_optarg=$2
 
37690
    ac_shift=shift
 
37691
    ;;
 
37692
  *) # This is not an option, so the user has probably given explicit
 
37693
     # arguments.
 
37694
     ac_option=$1
 
37695
     ac_need_defaults=false;;
 
37696
  esac
 
37697
 
 
37698
  case $ac_option in
 
37699
  # Handling of the options.
 
37700
_ACEOF
 
37701
cat >>$CONFIG_STATUS <<\_ACEOF
 
37702
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
 
37703
    ac_cs_recheck=: ;;
 
37704
  --version | --vers* | -V )
 
37705
    echo "$ac_cs_version"; exit 0 ;;
 
37706
  --he | --h)
 
37707
    # Conflict between --help and --header
 
37708
    { { echo "$as_me:$LINENO: error: ambiguous option: $1
 
37709
Try \`$0 --help' for more information." >&5
 
37710
echo "$as_me: error: ambiguous option: $1
 
37711
Try \`$0 --help' for more information." >&2;}
 
37712
   { (exit 1); exit 1; }; };;
 
37713
  --help | --hel | -h )
 
37714
    echo "$ac_cs_usage"; exit 0 ;;
 
37715
  --debug | --d* | -d )
 
37716
    debug=: ;;
 
37717
  --file | --fil | --fi | --f )
 
37718
    $ac_shift
 
37719
    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
 
37720
    ac_need_defaults=false;;
 
37721
  --header | --heade | --head | --hea )
 
37722
    $ac_shift
 
37723
    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
 
37724
    ac_need_defaults=false;;
 
37725
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 
37726
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
 
37727
    ac_cs_silent=: ;;
 
37728
 
 
37729
  # This is an error.
 
37730
  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
 
37731
Try \`$0 --help' for more information." >&5
 
37732
echo "$as_me: error: unrecognized option: $1
 
37733
Try \`$0 --help' for more information." >&2;}
 
37734
   { (exit 1); exit 1; }; } ;;
 
37735
 
 
37736
  *) ac_config_targets="$ac_config_targets $1" ;;
 
37737
 
 
37738
  esac
 
37739
  shift
 
37740
done
 
37741
 
 
37742
ac_configure_extra_args=
 
37743
 
 
37744
if $ac_cs_silent; then
 
37745
  exec 6>/dev/null
 
37746
  ac_configure_extra_args="$ac_configure_extra_args --silent"
 
37747
fi
 
37748
 
 
37749
_ACEOF
 
37750
cat >>$CONFIG_STATUS <<_ACEOF
 
37751
if \$ac_cs_recheck; then
 
37752
  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
 
37753
  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 
37754
fi
 
37755
 
 
37756
_ACEOF
 
37757
 
 
37758
cat >>$CONFIG_STATUS <<_ACEOF
 
37759
#
 
37760
# INIT-COMMANDS section.
 
37761
#
 
37762
 
 
37763
 
 
37764
APRUTIL_MAJOR_VERSION=$APRUTIL_MAJOR_VERSION
 
37765
 
 
37766
 
 
37767
_ACEOF
 
37768
 
 
37769
 
 
37770
 
 
37771
cat >>$CONFIG_STATUS <<\_ACEOF
 
37772
for ac_config_target in $ac_config_targets
 
37773
do
 
37774
  case "$ac_config_target" in
 
37775
  # Handling of arguments.
 
37776
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
37777
  "export_vars.sh" ) CONFIG_FILES="$CONFIG_FILES export_vars.sh" ;;
 
37778
  "build/pkg/pkginfo" ) CONFIG_FILES="$CONFIG_FILES build/pkg/pkginfo" ;;
 
37779
  "apr-util.pc" ) CONFIG_FILES="$CONFIG_FILES apr-util.pc" ;;
 
37780
  "apu-$APRUTIL_MAJOR_VERSION-config" ) CONFIG_FILES="$CONFIG_FILES apu-$APRUTIL_MAJOR_VERSION-config:apu-config.in" ;;
 
37781
  "include/private/apu_select_dbm.h" ) CONFIG_FILES="$CONFIG_FILES include/private/apu_select_dbm.h" ;;
 
37782
  "include/apr_ldap.h" ) CONFIG_FILES="$CONFIG_FILES include/apr_ldap.h" ;;
 
37783
  "include/apu.h" ) CONFIG_FILES="$CONFIG_FILES include/apu.h" ;;
 
37784
  "include/apu_want.h" ) CONFIG_FILES="$CONFIG_FILES include/apu_want.h" ;;
 
37785
  "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
 
37786
  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
37787
  "include/private/apu_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/private/apu_config.h" ;;
 
37788
  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 
37789
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
 
37790
   { (exit 1); exit 1; }; };;
 
37791
  esac
 
37792
done
 
37793
 
 
37794
# If the user did not use the arguments to specify the items to instantiate,
 
37795
# then the envvar interface is used.  Set only those that are not.
 
37796
# We use the long form for the default assignment because of an extremely
 
37797
# bizarre bug on SunOS 4.1.3.
 
37798
if $ac_need_defaults; then
 
37799
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
 
37800
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
 
37801
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 
37802
fi
 
37803
 
 
37804
# Have a temporary directory for convenience.  Make it in the build tree
 
37805
# simply because there is no reason to put it here, and in addition,
 
37806
# creating and moving files from /tmp can sometimes cause problems.
 
37807
# Create a temporary directory, and hook for its removal unless debugging.
 
37808
$debug ||
 
37809
{
 
37810
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
 
37811
  trap '{ (exit 1); exit 1; }' 1 2 13 15
 
37812
}
 
37813
 
 
37814
# Create a (secure) tmp directory for tmp files.
 
37815
 
 
37816
{
 
37817
  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
 
37818
  test -n "$tmp" && test -d "$tmp"
 
37819
}  ||
 
37820
{
 
37821
  tmp=./confstat$$-$RANDOM
 
37822
  (umask 077 && mkdir $tmp)
 
37823
} ||
 
37824
{
 
37825
   echo "$me: cannot create a temporary directory in ." >&2
 
37826
   { (exit 1); exit 1; }
 
37827
}
 
37828
 
 
37829
_ACEOF
 
37830
 
 
37831
cat >>$CONFIG_STATUS <<_ACEOF
 
37832
 
 
37833
#
 
37834
# CONFIG_FILES section.
 
37835
#
 
37836
 
 
37837
# No need to generate the scripts if there are no CONFIG_FILES.
 
37838
# This happens for instance when ./config.status config.h
 
37839
if test -n "\$CONFIG_FILES"; then
 
37840
  # Protect against being on the right side of a sed subst in config.status.
 
37841
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
 
37842
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
 
37843
s,@SHELL@,$SHELL,;t t
 
37844
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
 
37845
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
 
37846
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
 
37847
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
 
37848
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
 
37849
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
 
37850
s,@exec_prefix@,$exec_prefix,;t t
 
37851
s,@prefix@,$prefix,;t t
 
37852
s,@program_transform_name@,$program_transform_name,;t t
 
37853
s,@bindir@,$bindir,;t t
 
37854
s,@sbindir@,$sbindir,;t t
 
37855
s,@libexecdir@,$libexecdir,;t t
 
37856
s,@datadir@,$datadir,;t t
 
37857
s,@sysconfdir@,$sysconfdir,;t t
 
37858
s,@sharedstatedir@,$sharedstatedir,;t t
 
37859
s,@localstatedir@,$localstatedir,;t t
 
37860
s,@libdir@,$libdir,;t t
 
37861
s,@includedir@,$includedir,;t t
 
37862
s,@oldincludedir@,$oldincludedir,;t t
 
37863
s,@infodir@,$infodir,;t t
 
37864
s,@mandir@,$mandir,;t t
 
37865
s,@build_alias@,$build_alias,;t t
 
37866
s,@host_alias@,$host_alias,;t t
 
37867
s,@target_alias@,$target_alias,;t t
 
37868
s,@DEFS@,$DEFS,;t t
 
37869
s,@ECHO_C@,$ECHO_C,;t t
 
37870
s,@ECHO_N@,$ECHO_N,;t t
 
37871
s,@ECHO_T@,$ECHO_T,;t t
 
37872
s,@LIBS@,$LIBS,;t t
 
37873
s,@APU_CONFIG_LOCATION@,$APU_CONFIG_LOCATION,;t t
 
37874
s,@build@,$build,;t t
 
37875
s,@build_cpu@,$build_cpu,;t t
 
37876
s,@build_vendor@,$build_vendor,;t t
 
37877
s,@build_os@,$build_os,;t t
 
37878
s,@host@,$host,;t t
 
37879
s,@host_cpu@,$host_cpu,;t t
 
37880
s,@host_vendor@,$host_vendor,;t t
 
37881
s,@host_os@,$host_os,;t t
 
37882
s,@target@,$target,;t t
 
37883
s,@target_cpu@,$target_cpu,;t t
 
37884
s,@target_vendor@,$target_vendor,;t t
 
37885
s,@target_os@,$target_os,;t t
 
37886
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 
37887
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 
37888
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
 
37889
s,@top_builddir@,$top_builddir,;t t
 
37890
s,@abs_srcdir@,$abs_srcdir,;t t
 
37891
s,@abs_builddir@,$abs_builddir,;t t
 
37892
s,@APRUTIL_DOTTED_VERSION@,$APRUTIL_DOTTED_VERSION,;t t
 
37893
s,@APRUTIL_MAJOR_VERSION@,$APRUTIL_MAJOR_VERSION,;t t
 
37894
s,@APR_INCLUDES@,$APR_INCLUDES,;t t
 
37895
s,@APR_LIBS@,$APR_LIBS,;t t
 
37896
s,@APR_BUILD_DIR@,$APR_BUILD_DIR,;t t
 
37897
s,@APR_ICONV_DIR@,$APR_ICONV_DIR,;t t
 
37898
s,@CC@,$CC,;t t
 
37899
s,@CFLAGS@,$CFLAGS,;t t
 
37900
s,@LDFLAGS@,$LDFLAGS,;t t
 
37901
s,@CPPFLAGS@,$CPPFLAGS,;t t
 
37902
s,@ac_ct_CC@,$ac_ct_CC,;t t
 
37903
s,@EXEEXT@,$EXEEXT,;t t
 
37904
s,@OBJEXT@,$OBJEXT,;t t
 
37905
s,@CPP@,$CPP,;t t
 
37906
s,@EGREP@,$EGREP,;t t
 
37907
s,@ldap_h@,$ldap_h,;t t
 
37908
s,@lber_h@,$lber_h,;t t
 
37909
s,@ldap_ssl_h@,$ldap_ssl_h,;t t
 
37910
s,@apu_has_ldapssl_client_init@,$apu_has_ldapssl_client_init,;t t
 
37911
s,@apu_has_ldapssl_client_deinit@,$apu_has_ldapssl_client_deinit,;t t
 
37912
s,@apu_has_ldapssl_add_trusted_cert@,$apu_has_ldapssl_add_trusted_cert,;t t
 
37913
s,@apu_has_ldap_start_tls_s@,$apu_has_ldap_start_tls_s,;t t
 
37914
s,@apu_has_ldapssl_init@,$apu_has_ldapssl_init,;t t
 
37915
s,@apu_has_ldap_sslinit@,$apu_has_ldap_sslinit,;t t
 
37916
s,@apu_has_ldapssl_install_routines@,$apu_has_ldapssl_install_routines,;t t
 
37917
s,@apu_has_ldap@,$apu_has_ldap,;t t
 
37918
s,@apu_has_ldap_openldap@,$apu_has_ldap_openldap,;t t
 
37919
s,@apu_has_ldap_solaris@,$apu_has_ldap_solaris,;t t
 
37920
s,@apu_has_ldap_novell@,$apu_has_ldap_novell,;t t
 
37921
s,@apu_has_ldap_microsoft@,$apu_has_ldap_microsoft,;t t
 
37922
s,@apu_has_ldap_netscape@,$apu_has_ldap_netscape,;t t
 
37923
s,@apu_has_ldap_mozilla@,$apu_has_ldap_mozilla,;t t
 
37924
s,@apu_has_ldap_other@,$apu_has_ldap_other,;t t
 
37925
s,@apu_use_sdbm@,$apu_use_sdbm,;t t
 
37926
s,@apu_use_gdbm@,$apu_use_gdbm,;t t
 
37927
s,@apu_use_ndbm@,$apu_use_ndbm,;t t
 
37928
s,@apu_use_db@,$apu_use_db,;t t
 
37929
s,@apu_have_sdbm@,$apu_have_sdbm,;t t
 
37930
s,@apu_have_gdbm@,$apu_have_gdbm,;t t
 
37931
s,@apu_have_ndbm@,$apu_have_ndbm,;t t
 
37932
s,@apu_have_db@,$apu_have_db,;t t
 
37933
s,@apu_db_header@,$apu_db_header,;t t
 
37934
s,@apu_db_version@,$apu_db_version,;t t
 
37935
s,@apu_have_pgsql@,$apu_have_pgsql,;t t
 
37936
s,@apu_have_mysql@,$apu_have_mysql,;t t
 
37937
s,@apu_have_sqlite3@,$apu_have_sqlite3,;t t
 
37938
s,@apu_have_sqlite2@,$apu_have_sqlite2,;t t
 
37939
s,@APR_XML_SUBDIRS@,$APR_XML_SUBDIRS,;t t
 
37940
s,@APR_XML_DIR@,$APR_XML_DIR,;t t
 
37941
s,@APR_XML_EXPAT_OLD@,$APR_XML_EXPAT_OLD,;t t
 
37942
s,@have_iconv@,$have_iconv,;t t
 
37943
s,@have_apr_iconv@,$have_apr_iconv,;t t
 
37944
s,@so_ext@,$so_ext,;t t
 
37945
s,@lib_target@,$lib_target,;t t
 
37946
s,@APRUTIL_LIBNAME@,$APRUTIL_LIBNAME,;t t
 
37947
s,@APRUTIL_EXPORT_LIBS@,$APRUTIL_EXPORT_LIBS,;t t
 
37948
s,@APRUTIL_PRIV_INCLUDES@,$APRUTIL_PRIV_INCLUDES,;t t
 
37949
s,@APRUTIL_INCLUDES@,$APRUTIL_INCLUDES,;t t
 
37950
s,@APRUTIL_LDFLAGS@,$APRUTIL_LDFLAGS,;t t
 
37951
s,@APRUTIL_LIBS@,$APRUTIL_LIBS,;t t
 
37952
s,@INCLUDE_RULES@,$INCLUDE_RULES,;t t
 
37953
s,@INCLUDE_OUTPUTS@,$INCLUDE_OUTPUTS,;t t
 
37954
s,@LIBOBJS@,$LIBOBJS,;t t
 
37955
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 
37956
CEOF
 
37957
 
 
37958
_ACEOF
 
37959
 
 
37960
  cat >>$CONFIG_STATUS <<\_ACEOF
 
37961
  # Split the substitutions into bite-sized pieces for seds with
 
37962
  # small command number limits, like on Digital OSF/1 and HP-UX.
 
37963
  ac_max_sed_lines=48
 
37964
  ac_sed_frag=1 # Number of current file.
 
37965
  ac_beg=1 # First line for current file.
 
37966
  ac_end=$ac_max_sed_lines # Line after last line for current file.
 
37967
  ac_more_lines=:
 
37968
  ac_sed_cmds=
 
37969
  while $ac_more_lines; do
 
37970
    if test $ac_beg -gt 1; then
 
37971
      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
 
37972
    else
 
37973
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
 
37974
    fi
 
37975
    if test ! -s $tmp/subs.frag; then
 
37976
      ac_more_lines=false
 
37977
    else
 
37978
      # The purpose of the label and of the branching condition is to
 
37979
      # speed up the sed processing (if there are no `@' at all, there
 
37980
      # is no need to browse any of the substitutions).
 
37981
      # These are the two extra sed commands mentioned above.
 
37982
      (echo ':t
 
37983
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
 
37984
      if test -z "$ac_sed_cmds"; then
 
37985
        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
 
37986
      else
 
37987
        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
 
37988
      fi
 
37989
      ac_sed_frag=`expr $ac_sed_frag + 1`
 
37990
      ac_beg=$ac_end
 
37991
      ac_end=`expr $ac_end + $ac_max_sed_lines`
 
37992
    fi
 
37993
  done
 
37994
  if test -z "$ac_sed_cmds"; then
 
37995
    ac_sed_cmds=cat
 
37996
  fi
 
37997
fi # test -n "$CONFIG_FILES"
 
37998
 
 
37999
_ACEOF
 
38000
cat >>$CONFIG_STATUS <<\_ACEOF
 
38001
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
 
38002
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
 
38003
  case $ac_file in
 
38004
  - | *:- | *:-:* ) # input from stdin
 
38005
        cat >$tmp/stdin
 
38006
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
38007
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
 
38008
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
38009
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
 
38010
  * )   ac_file_in=$ac_file.in ;;
 
38011
  esac
 
38012
 
 
38013
  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
 
38014
  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 
38015
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
38016
         X"$ac_file" : 'X\(//\)[^/]' \| \
 
38017
         X"$ac_file" : 'X\(//\)$' \| \
 
38018
         X"$ac_file" : 'X\(/\)' \| \
 
38019
         .     : '\(.\)' 2>/dev/null ||
 
38020
echo X"$ac_file" |
 
38021
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
38022
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
38023
          /^X\(\/\/\)$/{ s//\1/; q; }
 
38024
          /^X\(\/\).*/{ s//\1/; q; }
 
38025
          s/.*/./; q'`
 
38026
  { if $as_mkdir_p; then
 
38027
    mkdir -p "$ac_dir"
 
38028
  else
 
38029
    as_dir="$ac_dir"
 
38030
    as_dirs=
 
38031
    while test ! -d "$as_dir"; do
 
38032
      as_dirs="$as_dir $as_dirs"
 
38033
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
 
38034
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
38035
         X"$as_dir" : 'X\(//\)[^/]' \| \
 
38036
         X"$as_dir" : 'X\(//\)$' \| \
 
38037
         X"$as_dir" : 'X\(/\)' \| \
 
38038
         .     : '\(.\)' 2>/dev/null ||
 
38039
echo X"$as_dir" |
 
38040
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
38041
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
38042
          /^X\(\/\/\)$/{ s//\1/; q; }
 
38043
          /^X\(\/\).*/{ s//\1/; q; }
 
38044
          s/.*/./; q'`
 
38045
    done
 
38046
    test ! -n "$as_dirs" || mkdir $as_dirs
 
38047
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
 
38048
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
 
38049
   { (exit 1); exit 1; }; }; }
 
38050
 
 
38051
  ac_builddir=.
 
38052
 
 
38053
if test "$ac_dir" != .; then
 
38054
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
 
38055
  # A "../" for each directory in $ac_dir_suffix.
 
38056
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
 
38057
else
 
38058
  ac_dir_suffix= ac_top_builddir=
 
38059
fi
 
38060
 
 
38061
case $srcdir in
 
38062
  .)  # No --srcdir option.  We are building in place.
 
38063
    ac_srcdir=.
 
38064
    if test -z "$ac_top_builddir"; then
 
38065
       ac_top_srcdir=.
 
38066
    else
 
38067
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
 
38068
    fi ;;
 
38069
  [\\/]* | ?:[\\/]* )  # Absolute path.
 
38070
    ac_srcdir=$srcdir$ac_dir_suffix;
 
38071
    ac_top_srcdir=$srcdir ;;
 
38072
  *) # Relative path.
 
38073
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
 
38074
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
 
38075
esac
 
38076
 
 
38077
# Do not use `cd foo && pwd` to compute absolute paths, because
 
38078
# the directories may not exist.
 
38079
case `pwd` in
 
38080
.) ac_abs_builddir="$ac_dir";;
 
38081
*)
 
38082
  case "$ac_dir" in
 
38083
  .) ac_abs_builddir=`pwd`;;
 
38084
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
 
38085
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
 
38086
  esac;;
 
38087
esac
 
38088
case $ac_abs_builddir in
 
38089
.) ac_abs_top_builddir=${ac_top_builddir}.;;
 
38090
*)
 
38091
  case ${ac_top_builddir}. in
 
38092
  .) ac_abs_top_builddir=$ac_abs_builddir;;
 
38093
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
 
38094
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
 
38095
  esac;;
 
38096
esac
 
38097
case $ac_abs_builddir in
 
38098
.) ac_abs_srcdir=$ac_srcdir;;
 
38099
*)
 
38100
  case $ac_srcdir in
 
38101
  .) ac_abs_srcdir=$ac_abs_builddir;;
 
38102
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
 
38103
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
 
38104
  esac;;
 
38105
esac
 
38106
case $ac_abs_builddir in
 
38107
.) ac_abs_top_srcdir=$ac_top_srcdir;;
 
38108
*)
 
38109
  case $ac_top_srcdir in
 
38110
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
 
38111
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
 
38112
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
 
38113
  esac;;
 
38114
esac
 
38115
 
 
38116
 
 
38117
  case $INSTALL in
 
38118
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
 
38119
  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
 
38120
  esac
 
38121
 
 
38122
  if test x"$ac_file" != x-; then
 
38123
    { echo "$as_me:$LINENO: creating $ac_file" >&5
 
38124
echo "$as_me: creating $ac_file" >&6;}
 
38125
    rm -f "$ac_file"
 
38126
  fi
 
38127
  # Let's still pretend it is `configure' which instantiates (i.e., don't
 
38128
  # use $as_me), people would be surprised to read:
 
38129
  #    /* config.h.  Generated by config.status.  */
 
38130
  if test x"$ac_file" = x-; then
 
38131
    configure_input=
 
38132
  else
 
38133
    configure_input="$ac_file.  "
 
38134
  fi
 
38135
  configure_input=$configure_input"Generated from `echo $ac_file_in |
 
38136
                                     sed 's,.*/,,'` by configure."
 
38137
 
 
38138
  # First look for the input files in the build tree, otherwise in the
 
38139
  # src tree.
 
38140
  ac_file_inputs=`IFS=:
 
38141
    for f in $ac_file_in; do
 
38142
      case $f in
 
38143
      -) echo $tmp/stdin ;;
 
38144
      [\\/$]*)
 
38145
         # Absolute (can't be DOS-style, as IFS=:)
 
38146
         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 
38147
echo "$as_me: error: cannot find input file: $f" >&2;}
 
38148
   { (exit 1); exit 1; }; }
 
38149
         echo "$f";;
 
38150
      *) # Relative
 
38151
         if test -f "$f"; then
 
38152
           # Build tree
 
38153
           echo "$f"
 
38154
         elif test -f "$srcdir/$f"; then
 
38155
           # Source tree
 
38156
           echo "$srcdir/$f"
 
38157
         else
 
38158
           # /dev/null tree
 
38159
           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 
38160
echo "$as_me: error: cannot find input file: $f" >&2;}
 
38161
   { (exit 1); exit 1; }; }
 
38162
         fi;;
 
38163
      esac
 
38164
    done` || { (exit 1); exit 1; }
 
38165
_ACEOF
 
38166
cat >>$CONFIG_STATUS <<_ACEOF
 
38167
  sed "$ac_vpsub
 
38168
$extrasub
 
38169
_ACEOF
 
38170
cat >>$CONFIG_STATUS <<\_ACEOF
 
38171
:t
 
38172
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
 
38173
s,@configure_input@,$configure_input,;t t
 
38174
s,@srcdir@,$ac_srcdir,;t t
 
38175
s,@abs_srcdir@,$ac_abs_srcdir,;t t
 
38176
s,@top_srcdir@,$ac_top_srcdir,;t t
 
38177
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
 
38178
s,@builddir@,$ac_builddir,;t t
 
38179
s,@abs_builddir@,$ac_abs_builddir,;t t
 
38180
s,@top_builddir@,$ac_top_builddir,;t t
 
38181
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
 
38182
s,@INSTALL@,$ac_INSTALL,;t t
 
38183
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
 
38184
  rm -f $tmp/stdin
 
38185
  if test x"$ac_file" != x-; then
 
38186
    mv $tmp/out $ac_file
 
38187
  else
 
38188
    cat $tmp/out
 
38189
    rm -f $tmp/out
 
38190
  fi
 
38191
 
 
38192
done
 
38193
_ACEOF
 
38194
cat >>$CONFIG_STATUS <<\_ACEOF
 
38195
 
 
38196
#
 
38197
# CONFIG_HEADER section.
 
38198
#
 
38199
 
 
38200
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
 
38201
# NAME is the cpp macro being defined and VALUE is the value it is being given.
 
38202
#
 
38203
# ac_d sets the value in "#define NAME VALUE" lines.
 
38204
ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
 
38205
ac_dB='[         ].*$,\1#\2'
 
38206
ac_dC=' '
 
38207
ac_dD=',;t'
 
38208
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
 
38209
ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
 
38210
ac_uB='$,\1#\2define\3'
 
38211
ac_uC=' '
 
38212
ac_uD=',;t'
 
38213
 
 
38214
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
 
38215
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
 
38216
  case $ac_file in
 
38217
  - | *:- | *:-:* ) # input from stdin
 
38218
        cat >$tmp/stdin
 
38219
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
38220
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
 
38221
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
38222
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
 
38223
  * )   ac_file_in=$ac_file.in ;;
 
38224
  esac
 
38225
 
 
38226
  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
 
38227
echo "$as_me: creating $ac_file" >&6;}
 
38228
 
 
38229
  # First look for the input files in the build tree, otherwise in the
 
38230
  # src tree.
 
38231
  ac_file_inputs=`IFS=:
 
38232
    for f in $ac_file_in; do
 
38233
      case $f in
 
38234
      -) echo $tmp/stdin ;;
 
38235
      [\\/$]*)
 
38236
         # Absolute (can't be DOS-style, as IFS=:)
 
38237
         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 
38238
echo "$as_me: error: cannot find input file: $f" >&2;}
 
38239
   { (exit 1); exit 1; }; }
 
38240
         # Do quote $f, to prevent DOS paths from being IFS'd.
 
38241
         echo "$f";;
 
38242
      *) # Relative
 
38243
         if test -f "$f"; then
 
38244
           # Build tree
 
38245
           echo "$f"
 
38246
         elif test -f "$srcdir/$f"; then
 
38247
           # Source tree
 
38248
           echo "$srcdir/$f"
 
38249
         else
 
38250
           # /dev/null tree
 
38251
           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 
38252
echo "$as_me: error: cannot find input file: $f" >&2;}
 
38253
   { (exit 1); exit 1; }; }
 
38254
         fi;;
 
38255
      esac
 
38256
    done` || { (exit 1); exit 1; }
 
38257
  # Remove the trailing spaces.
 
38258
  sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
 
38259
 
 
38260
_ACEOF
 
38261
 
 
38262
# Transform confdefs.h into two sed scripts, `conftest.defines' and
 
38263
# `conftest.undefs', that substitutes the proper values into
 
38264
# config.h.in to produce config.h.  The first handles `#define'
 
38265
# templates, and the second `#undef' templates.
 
38266
# And first: Protect against being on the right side of a sed subst in
 
38267
# config.status.  Protect against being in an unquoted here document
 
38268
# in config.status.
 
38269
rm -f conftest.defines conftest.undefs
 
38270
# Using a here document instead of a string reduces the quoting nightmare.
 
38271
# Putting comments in sed scripts is not portable.
 
38272
#
 
38273
# `end' is used to avoid that the second main sed command (meant for
 
38274
# 0-ary CPP macros) applies to n-ary macro definitions.
 
38275
# See the Autoconf documentation for `clear'.
 
38276
cat >confdef2sed.sed <<\_ACEOF
 
38277
s/[\\&,]/\\&/g
 
38278
s,[\\$`],\\&,g
 
38279
t clear
 
38280
: clear
 
38281
s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
 
38282
t end
 
38283
s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
 
38284
: end
 
38285
_ACEOF
 
38286
# If some macros were called several times there might be several times
 
38287
# the same #defines, which is useless.  Nevertheless, we may not want to
 
38288
# sort them, since we want the *last* AC-DEFINE to be honored.
 
38289
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
 
38290
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
 
38291
rm -f confdef2sed.sed
 
38292
 
 
38293
# This sed command replaces #undef with comments.  This is necessary, for
 
38294
# example, in the case of _POSIX_SOURCE, which is predefined and required
 
38295
# on some systems where configure will not decide to define it.
 
38296
cat >>conftest.undefs <<\_ACEOF
 
38297
s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
 
38298
_ACEOF
 
38299
 
 
38300
# Break up conftest.defines because some shells have a limit on the size
 
38301
# of here documents, and old seds have small limits too (100 cmds).
 
38302
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
 
38303
echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
 
38304
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
 
38305
echo '  :' >>$CONFIG_STATUS
 
38306
rm -f conftest.tail
 
38307
while grep . conftest.defines >/dev/null
 
38308
do
 
38309
  # Write a limited-size here document to $tmp/defines.sed.
 
38310
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
 
38311
  # Speed up: don't consider the non `#define' lines.
 
38312
  echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
 
38313
  # Work around the forget-to-reset-the-flag bug.
 
38314
  echo 't clr' >>$CONFIG_STATUS
 
38315
  echo ': clr' >>$CONFIG_STATUS
 
38316
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
 
38317
  echo 'CEOF
 
38318
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
 
38319
  rm -f $tmp/in
 
38320
  mv $tmp/out $tmp/in
 
38321
' >>$CONFIG_STATUS
 
38322
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
 
38323
  rm -f conftest.defines
 
38324
  mv conftest.tail conftest.defines
 
38325
done
 
38326
rm -f conftest.defines
 
38327
echo '  fi # grep' >>$CONFIG_STATUS
 
38328
echo >>$CONFIG_STATUS
 
38329
 
 
38330
# Break up conftest.undefs because some shells have a limit on the size
 
38331
# of here documents, and old seds have small limits too (100 cmds).
 
38332
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
 
38333
rm -f conftest.tail
 
38334
while grep . conftest.undefs >/dev/null
 
38335
do
 
38336
  # Write a limited-size here document to $tmp/undefs.sed.
 
38337
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
 
38338
  # Speed up: don't consider the non `#undef'
 
38339
  echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
 
38340
  # Work around the forget-to-reset-the-flag bug.
 
38341
  echo 't clr' >>$CONFIG_STATUS
 
38342
  echo ': clr' >>$CONFIG_STATUS
 
38343
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
 
38344
  echo 'CEOF
 
38345
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
 
38346
  rm -f $tmp/in
 
38347
  mv $tmp/out $tmp/in
 
38348
' >>$CONFIG_STATUS
 
38349
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
 
38350
  rm -f conftest.undefs
 
38351
  mv conftest.tail conftest.undefs
 
38352
done
 
38353
rm -f conftest.undefs
 
38354
 
 
38355
cat >>$CONFIG_STATUS <<\_ACEOF
 
38356
  # Let's still pretend it is `configure' which instantiates (i.e., don't
 
38357
  # use $as_me), people would be surprised to read:
 
38358
  #    /* config.h.  Generated by config.status.  */
 
38359
  if test x"$ac_file" = x-; then
 
38360
    echo "/* Generated by configure.  */" >$tmp/config.h
 
38361
  else
 
38362
    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
 
38363
  fi
 
38364
  cat $tmp/in >>$tmp/config.h
 
38365
  rm -f $tmp/in
 
38366
  if test x"$ac_file" != x-; then
 
38367
    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
 
38368
      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
 
38369
echo "$as_me: $ac_file is unchanged" >&6;}
 
38370
    else
 
38371
      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 
38372
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
38373
         X"$ac_file" : 'X\(//\)[^/]' \| \
 
38374
         X"$ac_file" : 'X\(//\)$' \| \
 
38375
         X"$ac_file" : 'X\(/\)' \| \
 
38376
         .     : '\(.\)' 2>/dev/null ||
 
38377
echo X"$ac_file" |
 
38378
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
38379
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
38380
          /^X\(\/\/\)$/{ s//\1/; q; }
 
38381
          /^X\(\/\).*/{ s//\1/; q; }
 
38382
          s/.*/./; q'`
 
38383
      { if $as_mkdir_p; then
 
38384
    mkdir -p "$ac_dir"
 
38385
  else
 
38386
    as_dir="$ac_dir"
 
38387
    as_dirs=
 
38388
    while test ! -d "$as_dir"; do
 
38389
      as_dirs="$as_dir $as_dirs"
 
38390
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
 
38391
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
38392
         X"$as_dir" : 'X\(//\)[^/]' \| \
 
38393
         X"$as_dir" : 'X\(//\)$' \| \
 
38394
         X"$as_dir" : 'X\(/\)' \| \
 
38395
         .     : '\(.\)' 2>/dev/null ||
 
38396
echo X"$as_dir" |
 
38397
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
38398
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
38399
          /^X\(\/\/\)$/{ s//\1/; q; }
 
38400
          /^X\(\/\).*/{ s//\1/; q; }
 
38401
          s/.*/./; q'`
 
38402
    done
 
38403
    test ! -n "$as_dirs" || mkdir $as_dirs
 
38404
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
 
38405
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
 
38406
   { (exit 1); exit 1; }; }; }
 
38407
 
 
38408
      rm -f $ac_file
 
38409
      mv $tmp/config.h $ac_file
 
38410
    fi
 
38411
  else
 
38412
    cat $tmp/config.h
 
38413
    rm -f $tmp/config.h
 
38414
  fi
 
38415
done
 
38416
_ACEOF
 
38417
cat >>$CONFIG_STATUS <<\_ACEOF
 
38418
 
 
38419
#
 
38420
# CONFIG_COMMANDS section.
 
38421
#
 
38422
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
 
38423
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
 
38424
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
38425
  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
 
38426
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
38427
         X"$ac_dest" : 'X\(//\)[^/]' \| \
 
38428
         X"$ac_dest" : 'X\(//\)$' \| \
 
38429
         X"$ac_dest" : 'X\(/\)' \| \
 
38430
         .     : '\(.\)' 2>/dev/null ||
 
38431
echo X"$ac_dest" |
 
38432
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
38433
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
38434
          /^X\(\/\/\)$/{ s//\1/; q; }
 
38435
          /^X\(\/\).*/{ s//\1/; q; }
 
38436
          s/.*/./; q'`
 
38437
  { if $as_mkdir_p; then
 
38438
    mkdir -p "$ac_dir"
 
38439
  else
 
38440
    as_dir="$ac_dir"
 
38441
    as_dirs=
 
38442
    while test ! -d "$as_dir"; do
 
38443
      as_dirs="$as_dir $as_dirs"
 
38444
      as_dir=`(dirname "$as_dir") 2>/dev/null ||
 
38445
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 
38446
         X"$as_dir" : 'X\(//\)[^/]' \| \
 
38447
         X"$as_dir" : 'X\(//\)$' \| \
 
38448
         X"$as_dir" : 'X\(/\)' \| \
 
38449
         .     : '\(.\)' 2>/dev/null ||
 
38450
echo X"$as_dir" |
 
38451
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
 
38452
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
 
38453
          /^X\(\/\/\)$/{ s//\1/; q; }
 
38454
          /^X\(\/\).*/{ s//\1/; q; }
 
38455
          s/.*/./; q'`
 
38456
    done
 
38457
    test ! -n "$as_dirs" || mkdir $as_dirs
 
38458
  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
 
38459
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
 
38460
   { (exit 1); exit 1; }; }; }
 
38461
 
 
38462
  ac_builddir=.
 
38463
 
 
38464
if test "$ac_dir" != .; then
 
38465
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
 
38466
  # A "../" for each directory in $ac_dir_suffix.
 
38467
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
 
38468
else
 
38469
  ac_dir_suffix= ac_top_builddir=
 
38470
fi
 
38471
 
 
38472
case $srcdir in
 
38473
  .)  # No --srcdir option.  We are building in place.
 
38474
    ac_srcdir=.
 
38475
    if test -z "$ac_top_builddir"; then
 
38476
       ac_top_srcdir=.
 
38477
    else
 
38478
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
 
38479
    fi ;;
 
38480
  [\\/]* | ?:[\\/]* )  # Absolute path.
 
38481
    ac_srcdir=$srcdir$ac_dir_suffix;
 
38482
    ac_top_srcdir=$srcdir ;;
 
38483
  *) # Relative path.
 
38484
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
 
38485
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
 
38486
esac
 
38487
 
 
38488
# Do not use `cd foo && pwd` to compute absolute paths, because
 
38489
# the directories may not exist.
 
38490
case `pwd` in
 
38491
.) ac_abs_builddir="$ac_dir";;
 
38492
*)
 
38493
  case "$ac_dir" in
 
38494
  .) ac_abs_builddir=`pwd`;;
 
38495
  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
 
38496
  *) ac_abs_builddir=`pwd`/"$ac_dir";;
 
38497
  esac;;
 
38498
esac
 
38499
case $ac_abs_builddir in
 
38500
.) ac_abs_top_builddir=${ac_top_builddir}.;;
 
38501
*)
 
38502
  case ${ac_top_builddir}. in
 
38503
  .) ac_abs_top_builddir=$ac_abs_builddir;;
 
38504
  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
 
38505
  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
 
38506
  esac;;
 
38507
esac
 
38508
case $ac_abs_builddir in
 
38509
.) ac_abs_srcdir=$ac_srcdir;;
 
38510
*)
 
38511
  case $ac_srcdir in
 
38512
  .) ac_abs_srcdir=$ac_abs_builddir;;
 
38513
  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
 
38514
  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
 
38515
  esac;;
 
38516
esac
 
38517
case $ac_abs_builddir in
 
38518
.) ac_abs_top_srcdir=$ac_top_srcdir;;
 
38519
*)
 
38520
  case $ac_top_srcdir in
 
38521
  .) ac_abs_top_srcdir=$ac_abs_builddir;;
 
38522
  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
 
38523
  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
 
38524
  esac;;
 
38525
esac
 
38526
 
 
38527
 
 
38528
  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
 
38529
echo "$as_me: executing $ac_dest commands" >&6;}
 
38530
  case $ac_dest in
 
38531
    default )
 
38532
chmod +x apu-$APRUTIL_MAJOR_VERSION-config
 
38533
 ;;
 
38534
  esac
 
38535
done
 
38536
_ACEOF
 
38537
 
 
38538
cat >>$CONFIG_STATUS <<\_ACEOF
 
38539
 
 
38540
{ (exit 0); exit 0; }
 
38541
_ACEOF
 
38542
chmod +x $CONFIG_STATUS
 
38543
ac_clean_files=$ac_clean_files_save
 
38544
 
 
38545
 
 
38546
# configure is writing to config.log, and then calls config.status.
 
38547
# config.status does its own redirection, appending to config.log.
 
38548
# Unfortunately, on DOS this fails, as config.log is still kept open
 
38549
# by configure, so config.status won't be able to write to it; its
 
38550
# output is simply discarded.  So we exec the FD to /dev/null,
 
38551
# effectively closing config.log, so it can be properly (re)opened and
 
38552
# appended to by config.status.  When coming back to configure, we
 
38553
# need to make the FD available again.
 
38554
if test "$no_create" != yes; then
 
38555
  ac_cs_success=:
 
38556
  ac_config_status_args=
 
38557
  test "$silent" = yes &&
 
38558
    ac_config_status_args="$ac_config_status_args --quiet"
 
38559
  exec 5>/dev/null
 
38560
  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
 
38561
  exec 5>>config.log
 
38562
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
 
38563
  # would make configure fail if this is the last instruction.
 
38564
  $ac_cs_success || { (exit 1); exit 1; }
 
38565
fi
 
38566