]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/apr-util/configure
Move SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order reversal.
[FreeBSD/FreeBSD.git] / contrib / apr-util / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18   emulate sh
19   NULLCMD=:
20   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23   setopt NO_GLOB_SUBST
24 else
25   case `(set -o) 2>/dev/null` in #(
26   *posix*) :
27     set -o posix ;; #(
28   *) :
29      ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='print -r --'
46   as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in #(
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order.  Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" ""        $as_nl"
88
89 # Find who we are.  Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92   *[\\/]* ) as_myself=$0 ;;
93   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96   IFS=$as_save_IFS
97   test -z "$as_dir" && as_dir=.
98     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99   done
100 IFS=$as_save_IFS
101
102      ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107   as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111   exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there.  '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136   # into an infinite loop, continuously re-executing ourselves.
137   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138     _as_can_reexec=no; export _as_can_reexec;
139     # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147   *v*x* | *x*v* ) as_opts=-vx ;;
148   *v* ) as_opts=-v ;;
149   *x* ) as_opts=-x ;;
150   * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157   fi
158   # We don't want this to propagate to other subprocesses.
159           { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162   emulate sh
163   NULLCMD=:
164   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165   # is contrary to our usage.  Disable this feature.
166   alias -g '\${1+\"\$@\"}'='\"\$@\"'
167   setopt NO_GLOB_SUBST
168 else
169   case \`(set -o) 2>/dev/null\` in #(
170   *posix*) :
171     set -o posix ;; #(
172   *) :
173      ;;
174 esac
175 fi
176 "
177   as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191   exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200   if (eval "$as_required") 2>/dev/null; then :
201   as_have_required=yes
202 else
203   as_have_required=no
204 fi
205   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212   IFS=$as_save_IFS
213   test -z "$as_dir" && as_dir=.
214   as_found=:
215   case $as_dir in #(
216          /*)
217            for as_base in sh bash ksh sh5; do
218              # Try only shells that exist, to save several forks.
219              as_shell=$as_dir/$as_base
220              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222   CONFIG_SHELL=$as_shell as_have_required=yes
223                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   break 2
225 fi
226 fi
227            done;;
228        esac
229   as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233   CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238       if test "x$CONFIG_SHELL" != x; then :
239   export CONFIG_SHELL
240              # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248   *v*x* | *x*v* ) as_opts=-vx ;;
249   *v* ) as_opts=-v ;;
250   *x* ) as_opts=-x ;;
251   * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260     if test x$as_have_required = xno; then :
261   $as_echo "$0: This script requires a shell more modern than all"
262   $as_echo "$0: the shells that I found on your system."
263   if test x${ZSH_VERSION+set} = xset ; then
264     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266   else
267     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271   fi
272   exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290   { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299   return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307   set +e
308   as_fn_set_status $1
309   exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318   case $as_dir in #(
319   -*) as_dir=./$as_dir;;
320   esac
321   test -d "$as_dir" || eval $as_mkdir_p || {
322     as_dirs=
323     while :; do
324       case $as_dir in #(
325       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326       *) as_qdir=$as_dir;;
327       esac
328       as_dirs="'$as_qdir' $as_dirs"
329       as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331          X"$as_dir" : 'X\(//\)[^/]' \| \
332          X"$as_dir" : 'X\(//\)$' \| \
333          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336             s//\1/
337             q
338           }
339           /^X\(\/\/\)[^/].*/{
340             s//\1/
341             q
342           }
343           /^X\(\/\/\)$/{
344             s//\1/
345             q
346           }
347           /^X\(\/\).*/{
348             s//\1/
349             q
350           }
351           s/.*/./; q'`
352       test -d "$as_dir" && break
353     done
354     test -z "$as_dirs" || eval "mkdir $as_dirs"
355   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365   test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374   eval 'as_fn_append ()
375   {
376     eval $1+=\$2
377   }'
378 else
379   as_fn_append ()
380   {
381     eval $1=\$$1\$2
382   }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391   eval 'as_fn_arith ()
392   {
393     as_val=$(( $* ))
394   }'
395 else
396   as_fn_arith ()
397   {
398     as_val=`expr "$@" || test $? -eq 1`
399   }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410   as_status=$1; test $as_status -eq 0 && as_status=1
411   if test "$4"; then
412     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414   fi
415   $as_echo "$as_me: error: $2" >&2
416   as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420    test "X`expr 00001 : '.*\(...\)'`" = X001; then
421   as_expr=expr
422 else
423   as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427   as_basename=basename
428 else
429   as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433   as_dirname=dirname
434 else
435   as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440          X"$0" : 'X\(//\)$' \| \
441          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443     sed '/^.*\/\([^/][^/]*\)\/*$/{
444             s//\1/
445             q
446           }
447           /^X\/\(\/\/\)$/{
448             s//\1/
449             q
450           }
451           /^X\/\(\/\).*/{
452             s//\1/
453             q
454           }
455           s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465   as_lineno_1=$LINENO as_lineno_1a=$LINENO
466   as_lineno_2=$LINENO as_lineno_2a=$LINENO
467   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470   sed -n '
471     p
472     /[$]LINENO/=
473   ' <$as_myself |
474     sed '
475       s/[$]LINENO.*/&-/
476       t lineno
477       b
478       :lineno
479       N
480       :loop
481       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482       t loop
483       s/-\n.*//
484     ' >$as_me.lineno &&
485   chmod +x "$as_me.lineno" ||
486     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489   # already done that, so ensure we don't try to do so again and fall
490   # in an infinite loop.  This has already happened in practice.
491   _as_can_reexec=no; export _as_can_reexec
492   # Don't try to exec as it changes $[0], causing all sort of problems
493   # (the dirname of $[0] is not the place where we might find the
494   # original and so on.  Autoconf is especially sensitive to this).
495   . "./$as_me.lineno"
496   # Exit status is that of the last command.
497   exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503   case `echo 'xy\c'` in
504   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
505   xy)  ECHO_C='\c';;
506   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507        ECHO_T=' ';;
508   esac;;
509 *)
510   ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -pR'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -pR'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -pR'
533   fi
534 else
535   as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p='mkdir -p "$as_dir"'
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="export_vars.sh.in"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 #  include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 #  include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 ac_subst_vars='LTLIBOBJS
623 LIBOBJS
624 INCLUDE_OUTPUTS
625 INCLUDE_RULES
626 APRUTIL_LIBS
627 APRUTIL_LDFLAGS
628 APRUTIL_INCLUDES
629 APRUTIL_PRIV_INCLUDES
630 APRUTIL_EXPORT_LIBS
631 EXTRA_OBJECTS
632 APU_MODULES
633 APU_DSO_LIBDIR
634 APU_HAVE_MODULES
635 APRUTIL_LIBNAME
636 lib_target
637 so_ext
638 have_apr_iconv
639 have_iconv
640 apu_dbd_tests
641 LDADD_dbd_odbc
642 apu_have_odbc
643 ODBC_CONFIG
644 LDADD_dbd_oracle
645 apu_have_oracle
646 LDADD_dbd_sqlite2
647 apu_have_sqlite2
648 LDADD_dbd_sqlite3
649 apu_have_sqlite3
650 LDADD_dbd_mysql
651 apu_have_mysql
652 MYSQL_CONFIG
653 LDADD_dbd_pgsql
654 apu_have_pgsql
655 PGSQL_CONFIG
656 LDADD_dbm_ndbm
657 LDADD_dbm_gdbm
658 LDADD_dbm_db
659 apu_db_version
660 apu_db_header
661 apu_have_db
662 apu_have_ndbm
663 apu_have_gdbm
664 apu_have_sdbm
665 apu_use_db
666 apu_use_ndbm
667 apu_use_gdbm
668 apu_use_sdbm
669 LDADD_ldap
670 apu_has_ldap_other
671 apu_has_ldap_zos
672 apu_has_ldap_tivoli
673 apu_has_ldap_mozilla
674 apu_has_ldap_netscape
675 apu_has_ldap_microsoft
676 apu_has_ldap_novell
677 apu_has_ldap_solaris
678 apu_has_ldap_openldap
679 apu_has_ldap
680 apu_has_ldapssl_install_routines
681 apu_has_ldap_sslinit
682 apu_has_ldapssl_init
683 apu_has_ldap_start_tls_s
684 apu_has_ldapssl_add_trusted_cert
685 apu_has_ldapssl_client_deinit
686 apu_has_ldapssl_client_init
687 ldap_ssl_h
688 lber_h
689 ldap_h
690 LDADD_crypto_commoncrypto
691 apu_have_commoncrypto
692 LDADD_crypto_nss
693 apu_have_nss
694 PKG_CONFIG
695 apu_have_crypto
696 LDADD_crypto_openssl
697 apu_have_openssl
698 EGREP
699 GREP
700 CPP
701 APR_ICONV_DIR
702 apr_shlibpath_var
703 APR_BUILD_DIR
704 APR_LIBS
705 APR_INCLUDES
706 OBJEXT
707 EXEEXT
708 ac_ct_CC
709 CPPFLAGS
710 LDFLAGS
711 CFLAGS
712 CC
713 APU_LTVERSION
714 APRUTIL_MAJOR_VERSION
715 APRUTIL_DOTTED_VERSION
716 abs_builddir
717 abs_srcdir
718 top_builddir
719 LT_NO_INSTALL
720 INSTALL_DATA
721 INSTALL_SCRIPT
722 INSTALL_PROGRAM
723 target_os
724 target_vendor
725 target_cpu
726 target
727 host_os
728 host_vendor
729 host_cpu
730 host
731 build_os
732 build_vendor
733 build_cpu
734 build
735 APU_CONFIG_LOCATION
736 target_alias
737 host_alias
738 build_alias
739 LIBS
740 ECHO_T
741 ECHO_N
742 ECHO_C
743 DEFS
744 mandir
745 localedir
746 libdir
747 psdir
748 pdfdir
749 dvidir
750 htmldir
751 infodir
752 docdir
753 oldincludedir
754 includedir
755 localstatedir
756 sharedstatedir
757 sysconfdir
758 datadir
759 datarootdir
760 libexecdir
761 sbindir
762 bindir
763 program_transform_name
764 prefix
765 exec_prefix
766 PACKAGE_URL
767 PACKAGE_BUGREPORT
768 PACKAGE_STRING
769 PACKAGE_VERSION
770 PACKAGE_TARNAME
771 PACKAGE_NAME
772 PATH_SEPARATOR
773 SHELL'
774 ac_subst_files=''
775 ac_user_opts='
776 enable_option_checking
777 enable_layout
778 with_apr
779 with_apr_iconv
780 with_crypto
781 with_openssl
782 with_nss
783 with_commoncrypto
784 with_lber
785 with_ldap_include
786 with_ldap_lib
787 with_ldap
788 with_dbm
789 with_gdbm
790 with_ndbm
791 with_berkeley_db
792 with_pgsql
793 with_mysql
794 with_sqlite3
795 with_sqlite2
796 with_oracle_include
797 with_oracle
798 with_odbc
799 with_expat
800 with_iconv
801 enable_util_dso
802 '
803       ac_precious_vars='build_alias
804 host_alias
805 target_alias
806 CC
807 CFLAGS
808 LDFLAGS
809 LIBS
810 CPPFLAGS
811 CPP'
812
813
814 # Initialize some variables set by options.
815 ac_init_help=
816 ac_init_version=false
817 ac_unrecognized_opts=
818 ac_unrecognized_sep=
819 # The variables have the same names as the options, with
820 # dashes changed to underlines.
821 cache_file=/dev/null
822 exec_prefix=NONE
823 no_create=
824 no_recursion=
825 prefix=NONE
826 program_prefix=NONE
827 program_suffix=NONE
828 program_transform_name=s,x,x,
829 silent=
830 site=
831 srcdir=
832 verbose=
833 x_includes=NONE
834 x_libraries=NONE
835
836 # Installation directory options.
837 # These are left unexpanded so users can "make install exec_prefix=/foo"
838 # and all the variables that are supposed to be based on exec_prefix
839 # by default will actually change.
840 # Use braces instead of parens because sh, perl, etc. also accept them.
841 # (The list follows the same order as the GNU Coding Standards.)
842 bindir='${exec_prefix}/bin'
843 sbindir='${exec_prefix}/sbin'
844 libexecdir='${exec_prefix}/libexec'
845 datarootdir='${prefix}/share'
846 datadir='${datarootdir}'
847 sysconfdir='${prefix}/etc'
848 sharedstatedir='${prefix}/com'
849 localstatedir='${prefix}/var'
850 includedir='${prefix}/include'
851 oldincludedir='/usr/include'
852 docdir='${datarootdir}/doc/${PACKAGE}'
853 infodir='${datarootdir}/info'
854 htmldir='${docdir}'
855 dvidir='${docdir}'
856 pdfdir='${docdir}'
857 psdir='${docdir}'
858 libdir='${exec_prefix}/lib'
859 localedir='${datarootdir}/locale'
860 mandir='${datarootdir}/man'
861
862 ac_prev=
863 ac_dashdash=
864 for ac_option
865 do
866   # If the previous option needs an argument, assign it.
867   if test -n "$ac_prev"; then
868     eval $ac_prev=\$ac_option
869     ac_prev=
870     continue
871   fi
872
873   case $ac_option in
874   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
875   *=)   ac_optarg= ;;
876   *)    ac_optarg=yes ;;
877   esac
878
879   # Accept the important Cygnus configure options, so we can diagnose typos.
880
881   case $ac_dashdash$ac_option in
882   --)
883     ac_dashdash=yes ;;
884
885   -bindir | --bindir | --bindi | --bind | --bin | --bi)
886     ac_prev=bindir ;;
887   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
888     bindir=$ac_optarg ;;
889
890   -build | --build | --buil | --bui | --bu)
891     ac_prev=build_alias ;;
892   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
893     build_alias=$ac_optarg ;;
894
895   -cache-file | --cache-file | --cache-fil | --cache-fi \
896   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
897     ac_prev=cache_file ;;
898   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
899   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
900     cache_file=$ac_optarg ;;
901
902   --config-cache | -C)
903     cache_file=config.cache ;;
904
905   -datadir | --datadir | --datadi | --datad)
906     ac_prev=datadir ;;
907   -datadir=* | --datadir=* | --datadi=* | --datad=*)
908     datadir=$ac_optarg ;;
909
910   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
911   | --dataroo | --dataro | --datar)
912     ac_prev=datarootdir ;;
913   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
914   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
915     datarootdir=$ac_optarg ;;
916
917   -disable-* | --disable-*)
918     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
919     # Reject names that are not valid shell variable names.
920     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
921       as_fn_error $? "invalid feature name: $ac_useropt"
922     ac_useropt_orig=$ac_useropt
923     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
924     case $ac_user_opts in
925       *"
926 "enable_$ac_useropt"
927 "*) ;;
928       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
929          ac_unrecognized_sep=', ';;
930     esac
931     eval enable_$ac_useropt=no ;;
932
933   -docdir | --docdir | --docdi | --doc | --do)
934     ac_prev=docdir ;;
935   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
936     docdir=$ac_optarg ;;
937
938   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
939     ac_prev=dvidir ;;
940   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
941     dvidir=$ac_optarg ;;
942
943   -enable-* | --enable-*)
944     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
945     # Reject names that are not valid shell variable names.
946     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
947       as_fn_error $? "invalid feature name: $ac_useropt"
948     ac_useropt_orig=$ac_useropt
949     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
950     case $ac_user_opts in
951       *"
952 "enable_$ac_useropt"
953 "*) ;;
954       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
955          ac_unrecognized_sep=', ';;
956     esac
957     eval enable_$ac_useropt=\$ac_optarg ;;
958
959   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
960   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
961   | --exec | --exe | --ex)
962     ac_prev=exec_prefix ;;
963   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
964   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
965   | --exec=* | --exe=* | --ex=*)
966     exec_prefix=$ac_optarg ;;
967
968   -gas | --gas | --ga | --g)
969     # Obsolete; use --with-gas.
970     with_gas=yes ;;
971
972   -help | --help | --hel | --he | -h)
973     ac_init_help=long ;;
974   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
975     ac_init_help=recursive ;;
976   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
977     ac_init_help=short ;;
978
979   -host | --host | --hos | --ho)
980     ac_prev=host_alias ;;
981   -host=* | --host=* | --hos=* | --ho=*)
982     host_alias=$ac_optarg ;;
983
984   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
985     ac_prev=htmldir ;;
986   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
987   | --ht=*)
988     htmldir=$ac_optarg ;;
989
990   -includedir | --includedir | --includedi | --included | --include \
991   | --includ | --inclu | --incl | --inc)
992     ac_prev=includedir ;;
993   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
994   | --includ=* | --inclu=* | --incl=* | --inc=*)
995     includedir=$ac_optarg ;;
996
997   -infodir | --infodir | --infodi | --infod | --info | --inf)
998     ac_prev=infodir ;;
999   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1000     infodir=$ac_optarg ;;
1001
1002   -libdir | --libdir | --libdi | --libd)
1003     ac_prev=libdir ;;
1004   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1005     libdir=$ac_optarg ;;
1006
1007   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1008   | --libexe | --libex | --libe)
1009     ac_prev=libexecdir ;;
1010   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1011   | --libexe=* | --libex=* | --libe=*)
1012     libexecdir=$ac_optarg ;;
1013
1014   -localedir | --localedir | --localedi | --localed | --locale)
1015     ac_prev=localedir ;;
1016   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1017     localedir=$ac_optarg ;;
1018
1019   -localstatedir | --localstatedir | --localstatedi | --localstated \
1020   | --localstate | --localstat | --localsta | --localst | --locals)
1021     ac_prev=localstatedir ;;
1022   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1023   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1024     localstatedir=$ac_optarg ;;
1025
1026   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1027     ac_prev=mandir ;;
1028   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1029     mandir=$ac_optarg ;;
1030
1031   -nfp | --nfp | --nf)
1032     # Obsolete; use --without-fp.
1033     with_fp=no ;;
1034
1035   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1036   | --no-cr | --no-c | -n)
1037     no_create=yes ;;
1038
1039   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1040   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1041     no_recursion=yes ;;
1042
1043   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1044   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1045   | --oldin | --oldi | --old | --ol | --o)
1046     ac_prev=oldincludedir ;;
1047   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1048   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1049   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1050     oldincludedir=$ac_optarg ;;
1051
1052   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1053     ac_prev=prefix ;;
1054   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1055     prefix=$ac_optarg ;;
1056
1057   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1058   | --program-pre | --program-pr | --program-p)
1059     ac_prev=program_prefix ;;
1060   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1061   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1062     program_prefix=$ac_optarg ;;
1063
1064   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1065   | --program-suf | --program-su | --program-s)
1066     ac_prev=program_suffix ;;
1067   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1068   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1069     program_suffix=$ac_optarg ;;
1070
1071   -program-transform-name | --program-transform-name \
1072   | --program-transform-nam | --program-transform-na \
1073   | --program-transform-n | --program-transform- \
1074   | --program-transform | --program-transfor \
1075   | --program-transfo | --program-transf \
1076   | --program-trans | --program-tran \
1077   | --progr-tra | --program-tr | --program-t)
1078     ac_prev=program_transform_name ;;
1079   -program-transform-name=* | --program-transform-name=* \
1080   | --program-transform-nam=* | --program-transform-na=* \
1081   | --program-transform-n=* | --program-transform-=* \
1082   | --program-transform=* | --program-transfor=* \
1083   | --program-transfo=* | --program-transf=* \
1084   | --program-trans=* | --program-tran=* \
1085   | --progr-tra=* | --program-tr=* | --program-t=*)
1086     program_transform_name=$ac_optarg ;;
1087
1088   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1089     ac_prev=pdfdir ;;
1090   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1091     pdfdir=$ac_optarg ;;
1092
1093   -psdir | --psdir | --psdi | --psd | --ps)
1094     ac_prev=psdir ;;
1095   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1096     psdir=$ac_optarg ;;
1097
1098   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1099   | -silent | --silent | --silen | --sile | --sil)
1100     silent=yes ;;
1101
1102   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1103     ac_prev=sbindir ;;
1104   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1105   | --sbi=* | --sb=*)
1106     sbindir=$ac_optarg ;;
1107
1108   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1109   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1110   | --sharedst | --shareds | --shared | --share | --shar \
1111   | --sha | --sh)
1112     ac_prev=sharedstatedir ;;
1113   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1114   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1115   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1116   | --sha=* | --sh=*)
1117     sharedstatedir=$ac_optarg ;;
1118
1119   -site | --site | --sit)
1120     ac_prev=site ;;
1121   -site=* | --site=* | --sit=*)
1122     site=$ac_optarg ;;
1123
1124   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1125     ac_prev=srcdir ;;
1126   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1127     srcdir=$ac_optarg ;;
1128
1129   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1130   | --syscon | --sysco | --sysc | --sys | --sy)
1131     ac_prev=sysconfdir ;;
1132   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1133   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1134     sysconfdir=$ac_optarg ;;
1135
1136   -target | --target | --targe | --targ | --tar | --ta | --t)
1137     ac_prev=target_alias ;;
1138   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1139     target_alias=$ac_optarg ;;
1140
1141   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1142     verbose=yes ;;
1143
1144   -version | --version | --versio | --versi | --vers | -V)
1145     ac_init_version=: ;;
1146
1147   -with-* | --with-*)
1148     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1149     # Reject names that are not valid shell variable names.
1150     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1151       as_fn_error $? "invalid package name: $ac_useropt"
1152     ac_useropt_orig=$ac_useropt
1153     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1154     case $ac_user_opts in
1155       *"
1156 "with_$ac_useropt"
1157 "*) ;;
1158       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1159          ac_unrecognized_sep=', ';;
1160     esac
1161     eval with_$ac_useropt=\$ac_optarg ;;
1162
1163   -without-* | --without-*)
1164     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1165     # Reject names that are not valid shell variable names.
1166     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1167       as_fn_error $? "invalid package name: $ac_useropt"
1168     ac_useropt_orig=$ac_useropt
1169     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170     case $ac_user_opts in
1171       *"
1172 "with_$ac_useropt"
1173 "*) ;;
1174       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1175          ac_unrecognized_sep=', ';;
1176     esac
1177     eval with_$ac_useropt=no ;;
1178
1179   --x)
1180     # Obsolete; use --with-x.
1181     with_x=yes ;;
1182
1183   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1184   | --x-incl | --x-inc | --x-in | --x-i)
1185     ac_prev=x_includes ;;
1186   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1187   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1188     x_includes=$ac_optarg ;;
1189
1190   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1191   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1192     ac_prev=x_libraries ;;
1193   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1194   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1195     x_libraries=$ac_optarg ;;
1196
1197   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1198 Try \`$0 --help' for more information"
1199     ;;
1200
1201   *=*)
1202     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1203     # Reject names that are not valid shell variable names.
1204     case $ac_envvar in #(
1205       '' | [0-9]* | *[!_$as_cr_alnum]* )
1206       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1207     esac
1208     eval $ac_envvar=\$ac_optarg
1209     export $ac_envvar ;;
1210
1211   *)
1212     # FIXME: should be removed in autoconf 3.0.
1213     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1214     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1215       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1216     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1217     ;;
1218
1219   esac
1220 done
1221
1222 if test -n "$ac_prev"; then
1223   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1224   as_fn_error $? "missing argument to $ac_option"
1225 fi
1226
1227 if test -n "$ac_unrecognized_opts"; then
1228   case $enable_option_checking in
1229     no) ;;
1230     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1231     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1232   esac
1233 fi
1234
1235 # Check all directory arguments for consistency.
1236 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1237                 datadir sysconfdir sharedstatedir localstatedir includedir \
1238                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1239                 libdir localedir mandir
1240 do
1241   eval ac_val=\$$ac_var
1242   # Remove trailing slashes.
1243   case $ac_val in
1244     */ )
1245       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1246       eval $ac_var=\$ac_val;;
1247   esac
1248   # Be sure to have absolute directory names.
1249   case $ac_val in
1250     [\\/$]* | ?:[\\/]* )  continue;;
1251     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1252   esac
1253   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1254 done
1255
1256 # There might be people who depend on the old broken behavior: `$host'
1257 # used to hold the argument of --host etc.
1258 # FIXME: To remove some day.
1259 build=$build_alias
1260 host=$host_alias
1261 target=$target_alias
1262
1263 # FIXME: To remove some day.
1264 if test "x$host_alias" != x; then
1265   if test "x$build_alias" = x; then
1266     cross_compiling=maybe
1267   elif test "x$build_alias" != "x$host_alias"; then
1268     cross_compiling=yes
1269   fi
1270 fi
1271
1272 ac_tool_prefix=
1273 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1274
1275 test "$silent" = yes && exec 6>/dev/null
1276
1277
1278 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1279 ac_ls_di=`ls -di .` &&
1280 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1281   as_fn_error $? "working directory cannot be determined"
1282 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1283   as_fn_error $? "pwd does not report name of working directory"
1284
1285
1286 # Find the source files, if location was not specified.
1287 if test -z "$srcdir"; then
1288   ac_srcdir_defaulted=yes
1289   # Try the directory containing this script, then the parent directory.
1290   ac_confdir=`$as_dirname -- "$as_myself" ||
1291 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1292          X"$as_myself" : 'X\(//\)[^/]' \| \
1293          X"$as_myself" : 'X\(//\)$' \| \
1294          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1295 $as_echo X"$as_myself" |
1296     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1297             s//\1/
1298             q
1299           }
1300           /^X\(\/\/\)[^/].*/{
1301             s//\1/
1302             q
1303           }
1304           /^X\(\/\/\)$/{
1305             s//\1/
1306             q
1307           }
1308           /^X\(\/\).*/{
1309             s//\1/
1310             q
1311           }
1312           s/.*/./; q'`
1313   srcdir=$ac_confdir
1314   if test ! -r "$srcdir/$ac_unique_file"; then
1315     srcdir=..
1316   fi
1317 else
1318   ac_srcdir_defaulted=no
1319 fi
1320 if test ! -r "$srcdir/$ac_unique_file"; then
1321   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1322   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1323 fi
1324 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1325 ac_abs_confdir=`(
1326         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1327         pwd)`
1328 # When building in place, set srcdir=.
1329 if test "$ac_abs_confdir" = "$ac_pwd"; then
1330   srcdir=.
1331 fi
1332 # Remove unnecessary trailing slashes from srcdir.
1333 # Double slashes in file names in object file debugging info
1334 # mess up M-x gdb in Emacs.
1335 case $srcdir in
1336 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1337 esac
1338 for ac_var in $ac_precious_vars; do
1339   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1340   eval ac_env_${ac_var}_value=\$${ac_var}
1341   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1342   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1343 done
1344
1345 #
1346 # Report the --help message.
1347 #
1348 if test "$ac_init_help" = "long"; then
1349   # Omit some internal or obsolete options to make the list less imposing.
1350   # This message is too long to be a string in the A/UX 3.1 sh.
1351   cat <<_ACEOF
1352 \`configure' configures this package to adapt to many kinds of systems.
1353
1354 Usage: $0 [OPTION]... [VAR=VALUE]...
1355
1356 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1357 VAR=VALUE.  See below for descriptions of some of the useful variables.
1358
1359 Defaults for the options are specified in brackets.
1360
1361 Configuration:
1362   -h, --help              display this help and exit
1363       --help=short        display options specific to this package
1364       --help=recursive    display the short help of all the included packages
1365   -V, --version           display version information and exit
1366   -q, --quiet, --silent   do not print \`checking ...' messages
1367       --cache-file=FILE   cache test results in FILE [disabled]
1368   -C, --config-cache      alias for \`--cache-file=config.cache'
1369   -n, --no-create         do not create output files
1370       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1371
1372 Installation directories:
1373   --prefix=PREFIX         install architecture-independent files in PREFIX
1374                           [$ac_default_prefix]
1375   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1376                           [PREFIX]
1377
1378 By default, \`make install' will install all the files in
1379 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1380 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1381 for instance \`--prefix=\$HOME'.
1382
1383 For better control, use the options below.
1384
1385 Fine tuning of the installation directories:
1386   --bindir=DIR            user executables [EPREFIX/bin]
1387   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1388   --libexecdir=DIR        program executables [EPREFIX/libexec]
1389   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1390   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1391   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1392   --libdir=DIR            object code libraries [EPREFIX/lib]
1393   --includedir=DIR        C header files [PREFIX/include]
1394   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1395   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1396   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1397   --infodir=DIR           info documentation [DATAROOTDIR/info]
1398   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1399   --mandir=DIR            man documentation [DATAROOTDIR/man]
1400   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1401   --htmldir=DIR           html documentation [DOCDIR]
1402   --dvidir=DIR            dvi documentation [DOCDIR]
1403   --pdfdir=DIR            pdf documentation [DOCDIR]
1404   --psdir=DIR             ps documentation [DOCDIR]
1405 _ACEOF
1406
1407   cat <<\_ACEOF
1408
1409 System types:
1410   --build=BUILD     configure for building on BUILD [guessed]
1411   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1412   --target=TARGET   configure for building compilers for TARGET [HOST]
1413 _ACEOF
1414 fi
1415
1416 if test -n "$ac_init_help"; then
1417
1418   cat <<\_ACEOF
1419
1420 Optional Features:
1421   --disable-option-checking  ignore unrecognized --enable/--with options
1422   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1423   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1424   --enable-layout=LAYOUT
1425   --disable-util-dso      disable DSO build of modular components (crypto,
1426                           dbd, dbm, ldap)
1427
1428 Optional Packages:
1429   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1430   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1431   --with-apr=PATH         prefix for installed APR or the full path to
1432                              apr-config
1433   --with-apr-iconv=DIR    relative path to apr-iconv source
1434   --with-crypto           enable crypto support
1435   --with-openssl=DIR      specify location of OpenSSL
1436   --with-nss=DIR          specify location of NSS
1437   --with-commoncrypto=DIR specify location of CommonCrypto
1438   --with-lber=library     lber library to use
1439   --with-ldap-include=path  path to ldap include files with trailing slash
1440   --with-ldap-lib=path    path to ldap lib file
1441   --with-ldap=library     ldap library to use
1442   --with-dbm=DBM          choose the DBM type to use.
1443                           DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X,db6X}
1444                           for some X=0,...,9
1445   --with-gdbm=DIR         enable GDBM support
1446   --with-ndbm=PATH        Find the NDBM header and library in `PATH/include'
1447                           and `PATH/lib'. If PATH is of the form `HEADER:LIB',
1448                           then search for header files in HEADER, and the
1449                           library in LIB. If you omit the `=PATH' part
1450                           completely, the configure script will search for
1451                           NDBM in a number of standard places.
1452   --with-berkeley-db=PATH Find the Berkeley DB header and library in
1453                           `PATH/include' and `PATH/lib'. If PATH is of the
1454                           form `HEADER:LIB', then search for header files in
1455                           HEADER, and the library in LIB. If you omit the
1456                           `=PATH' part completely, the configure script will
1457                           search for Berkeley DB in a number of standard
1458                           places.
1459   --with-pgsql=DIR        specify PostgreSQL location
1460   --with-mysql=DIR        enable MySQL DBD driver
1461   --with-sqlite3=DIR      enable sqlite3 DBD driver
1462   --with-sqlite2=DIR      enable sqlite2 DBD driver
1463   --with-oracle-include=DIR
1464                           path to Oracle include files
1465   --with-oracle=DIR       enable Oracle DBD driver; giving ORACLE_HOME as DIR
1466   --with-odbc=DIR         specify ODBC location
1467   --with-expat=DIR        specify Expat location
1468   --with-iconv=DIR        path to iconv installation
1469
1470 Some influential environment variables:
1471   CC          C compiler command
1472   CFLAGS      C compiler flags
1473   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1474               nonstandard directory <lib dir>
1475   LIBS        libraries to pass to the linker, e.g. -l<library>
1476   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1477               you have headers in a nonstandard directory <include dir>
1478   CPP         C preprocessor
1479
1480 Use these variables to override the choices made by `configure' or to help
1481 it to find libraries and programs with nonstandard names/locations.
1482
1483 Report bugs to the package provider.
1484 _ACEOF
1485 ac_status=$?
1486 fi
1487
1488 if test "$ac_init_help" = "recursive"; then
1489   # If there are subdirs, report their specific --help.
1490   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1491     test -d "$ac_dir" ||
1492       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1493       continue
1494     ac_builddir=.
1495
1496 case "$ac_dir" in
1497 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1498 *)
1499   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1500   # A ".." for each directory in $ac_dir_suffix.
1501   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1502   case $ac_top_builddir_sub in
1503   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1504   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1505   esac ;;
1506 esac
1507 ac_abs_top_builddir=$ac_pwd
1508 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1509 # for backward compatibility:
1510 ac_top_builddir=$ac_top_build_prefix
1511
1512 case $srcdir in
1513   .)  # We are building in place.
1514     ac_srcdir=.
1515     ac_top_srcdir=$ac_top_builddir_sub
1516     ac_abs_top_srcdir=$ac_pwd ;;
1517   [\\/]* | ?:[\\/]* )  # Absolute name.
1518     ac_srcdir=$srcdir$ac_dir_suffix;
1519     ac_top_srcdir=$srcdir
1520     ac_abs_top_srcdir=$srcdir ;;
1521   *) # Relative name.
1522     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1523     ac_top_srcdir=$ac_top_build_prefix$srcdir
1524     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1525 esac
1526 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1527
1528     cd "$ac_dir" || { ac_status=$?; continue; }
1529     # Check for guested configure.
1530     if test -f "$ac_srcdir/configure.gnu"; then
1531       echo &&
1532       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1533     elif test -f "$ac_srcdir/configure"; then
1534       echo &&
1535       $SHELL "$ac_srcdir/configure" --help=recursive
1536     else
1537       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1538     fi || ac_status=$?
1539     cd "$ac_pwd" || { ac_status=$?; break; }
1540   done
1541 fi
1542
1543 test -n "$ac_init_help" && exit $ac_status
1544 if $ac_init_version; then
1545   cat <<\_ACEOF
1546 configure
1547 generated by GNU Autoconf 2.69
1548
1549 Copyright (C) 2012 Free Software Foundation, Inc.
1550 This configure script is free software; the Free Software Foundation
1551 gives unlimited permission to copy, distribute and modify it.
1552 _ACEOF
1553   exit
1554 fi
1555
1556 ## ------------------------ ##
1557 ## Autoconf initialization. ##
1558 ## ------------------------ ##
1559
1560 # ac_fn_c_try_compile LINENO
1561 # --------------------------
1562 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1563 ac_fn_c_try_compile ()
1564 {
1565   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1566   rm -f conftest.$ac_objext
1567   if { { ac_try="$ac_compile"
1568 case "(($ac_try" in
1569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1570   *) ac_try_echo=$ac_try;;
1571 esac
1572 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1573 $as_echo "$ac_try_echo"; } >&5
1574   (eval "$ac_compile") 2>conftest.err
1575   ac_status=$?
1576   if test -s conftest.err; then
1577     grep -v '^ *+' conftest.err >conftest.er1
1578     cat conftest.er1 >&5
1579     mv -f conftest.er1 conftest.err
1580   fi
1581   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1582   test $ac_status = 0; } && {
1583          test -z "$ac_c_werror_flag" ||
1584          test ! -s conftest.err
1585        } && test -s conftest.$ac_objext; then :
1586   ac_retval=0
1587 else
1588   $as_echo "$as_me: failed program was:" >&5
1589 sed 's/^/| /' conftest.$ac_ext >&5
1590
1591         ac_retval=1
1592 fi
1593   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1594   as_fn_set_status $ac_retval
1595
1596 } # ac_fn_c_try_compile
1597
1598 # ac_fn_c_try_link LINENO
1599 # -----------------------
1600 # Try to link conftest.$ac_ext, and return whether this succeeded.
1601 ac_fn_c_try_link ()
1602 {
1603   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604   rm -f conftest.$ac_objext conftest$ac_exeext
1605   if { { ac_try="$ac_link"
1606 case "(($ac_try" in
1607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608   *) ac_try_echo=$ac_try;;
1609 esac
1610 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611 $as_echo "$ac_try_echo"; } >&5
1612   (eval "$ac_link") 2>conftest.err
1613   ac_status=$?
1614   if test -s conftest.err; then
1615     grep -v '^ *+' conftest.err >conftest.er1
1616     cat conftest.er1 >&5
1617     mv -f conftest.er1 conftest.err
1618   fi
1619   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620   test $ac_status = 0; } && {
1621          test -z "$ac_c_werror_flag" ||
1622          test ! -s conftest.err
1623        } && test -s conftest$ac_exeext && {
1624          test "$cross_compiling" = yes ||
1625          test -x conftest$ac_exeext
1626        }; then :
1627   ac_retval=0
1628 else
1629   $as_echo "$as_me: failed program was:" >&5
1630 sed 's/^/| /' conftest.$ac_ext >&5
1631
1632         ac_retval=1
1633 fi
1634   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1635   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1636   # interfere with the next link command; also delete a directory that is
1637   # left behind by Apple's compiler.  We do this before executing the actions.
1638   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1639   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1640   as_fn_set_status $ac_retval
1641
1642 } # ac_fn_c_try_link
1643
1644 # ac_fn_c_try_cpp LINENO
1645 # ----------------------
1646 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1647 ac_fn_c_try_cpp ()
1648 {
1649   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650   if { { ac_try="$ac_cpp conftest.$ac_ext"
1651 case "(($ac_try" in
1652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653   *) ac_try_echo=$ac_try;;
1654 esac
1655 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656 $as_echo "$ac_try_echo"; } >&5
1657   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1658   ac_status=$?
1659   if test -s conftest.err; then
1660     grep -v '^ *+' conftest.err >conftest.er1
1661     cat conftest.er1 >&5
1662     mv -f conftest.er1 conftest.err
1663   fi
1664   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665   test $ac_status = 0; } > conftest.i && {
1666          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1667          test ! -s conftest.err
1668        }; then :
1669   ac_retval=0
1670 else
1671   $as_echo "$as_me: failed program was:" >&5
1672 sed 's/^/| /' conftest.$ac_ext >&5
1673
1674     ac_retval=1
1675 fi
1676   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1677   as_fn_set_status $ac_retval
1678
1679 } # ac_fn_c_try_cpp
1680
1681 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1682 # -------------------------------------------------------
1683 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1684 # the include files in INCLUDES and setting the cache variable VAR
1685 # accordingly.
1686 ac_fn_c_check_header_mongrel ()
1687 {
1688   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689   if eval \${$3+:} false; then :
1690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1691 $as_echo_n "checking for $2... " >&6; }
1692 if eval \${$3+:} false; then :
1693   $as_echo_n "(cached) " >&6
1694 fi
1695 eval ac_res=\$$3
1696                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697 $as_echo "$ac_res" >&6; }
1698 else
1699   # Is the header compilable?
1700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1701 $as_echo_n "checking $2 usability... " >&6; }
1702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1703 /* end confdefs.h.  */
1704 $4
1705 #include <$2>
1706 _ACEOF
1707 if ac_fn_c_try_compile "$LINENO"; then :
1708   ac_header_compiler=yes
1709 else
1710   ac_header_compiler=no
1711 fi
1712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1714 $as_echo "$ac_header_compiler" >&6; }
1715
1716 # Is the header present?
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1718 $as_echo_n "checking $2 presence... " >&6; }
1719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720 /* end confdefs.h.  */
1721 #include <$2>
1722 _ACEOF
1723 if ac_fn_c_try_cpp "$LINENO"; then :
1724   ac_header_preproc=yes
1725 else
1726   ac_header_preproc=no
1727 fi
1728 rm -f conftest.err conftest.i conftest.$ac_ext
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1730 $as_echo "$ac_header_preproc" >&6; }
1731
1732 # So?  What about this header?
1733 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1734   yes:no: )
1735     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1736 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1737     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1738 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1739     ;;
1740   no:yes:* )
1741     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1742 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1743     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1744 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1745     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1746 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1747     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1748 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1749     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1750 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1751     ;;
1752 esac
1753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1754 $as_echo_n "checking for $2... " >&6; }
1755 if eval \${$3+:} false; then :
1756   $as_echo_n "(cached) " >&6
1757 else
1758   eval "$3=\$ac_header_compiler"
1759 fi
1760 eval ac_res=\$$3
1761                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1762 $as_echo "$ac_res" >&6; }
1763 fi
1764   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1765
1766 } # ac_fn_c_check_header_mongrel
1767
1768 # ac_fn_c_try_run LINENO
1769 # ----------------------
1770 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1771 # that executables *can* be run.
1772 ac_fn_c_try_run ()
1773 {
1774   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775   if { { ac_try="$ac_link"
1776 case "(($ac_try" in
1777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778   *) ac_try_echo=$ac_try;;
1779 esac
1780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781 $as_echo "$ac_try_echo"; } >&5
1782   (eval "$ac_link") 2>&5
1783   ac_status=$?
1784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1786   { { case "(($ac_try" in
1787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1788   *) ac_try_echo=$ac_try;;
1789 esac
1790 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1791 $as_echo "$ac_try_echo"; } >&5
1792   (eval "$ac_try") 2>&5
1793   ac_status=$?
1794   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1795   test $ac_status = 0; }; }; then :
1796   ac_retval=0
1797 else
1798   $as_echo "$as_me: program exited with status $ac_status" >&5
1799        $as_echo "$as_me: failed program was:" >&5
1800 sed 's/^/| /' conftest.$ac_ext >&5
1801
1802        ac_retval=$ac_status
1803 fi
1804   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806   as_fn_set_status $ac_retval
1807
1808 } # ac_fn_c_try_run
1809
1810 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists and can be compiled using the include files in
1813 # INCLUDES, setting the cache variable VAR accordingly.
1814 ac_fn_c_check_header_compile ()
1815 {
1816   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818 $as_echo_n "checking for $2... " >&6; }
1819 if eval \${$3+:} false; then :
1820   $as_echo_n "(cached) " >&6
1821 else
1822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823 /* end confdefs.h.  */
1824 $4
1825 #include <$2>
1826 _ACEOF
1827 if ac_fn_c_try_compile "$LINENO"; then :
1828   eval "$3=yes"
1829 else
1830   eval "$3=no"
1831 fi
1832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1833 fi
1834 eval ac_res=\$$3
1835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836 $as_echo "$ac_res" >&6; }
1837   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1838
1839 } # ac_fn_c_check_header_compile
1840
1841 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1842 # ---------------------------------------------
1843 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1844 # accordingly.
1845 ac_fn_c_check_decl ()
1846 {
1847   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848   as_decl_name=`echo $2|sed 's/ *(.*//'`
1849   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1851 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1852 if eval \${$3+:} false; then :
1853   $as_echo_n "(cached) " >&6
1854 else
1855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856 /* end confdefs.h.  */
1857 $4
1858 int
1859 main ()
1860 {
1861 #ifndef $as_decl_name
1862 #ifdef __cplusplus
1863   (void) $as_decl_use;
1864 #else
1865   (void) $as_decl_name;
1866 #endif
1867 #endif
1868
1869   ;
1870   return 0;
1871 }
1872 _ACEOF
1873 if ac_fn_c_try_compile "$LINENO"; then :
1874   eval "$3=yes"
1875 else
1876   eval "$3=no"
1877 fi
1878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879 fi
1880 eval ac_res=\$$3
1881                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1884
1885 } # ac_fn_c_check_decl
1886
1887 # ac_fn_c_check_func LINENO FUNC VAR
1888 # ----------------------------------
1889 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1890 ac_fn_c_check_func ()
1891 {
1892   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894 $as_echo_n "checking for $2... " >&6; }
1895 if eval \${$3+:} false; then :
1896   $as_echo_n "(cached) " >&6
1897 else
1898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899 /* end confdefs.h.  */
1900 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1901    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1902 #define $2 innocuous_$2
1903
1904 /* System header to define __stub macros and hopefully few prototypes,
1905     which can conflict with char $2 (); below.
1906     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1907     <limits.h> exists even on freestanding compilers.  */
1908
1909 #ifdef __STDC__
1910 # include <limits.h>
1911 #else
1912 # include <assert.h>
1913 #endif
1914
1915 #undef $2
1916
1917 /* Override any GCC internal prototype to avoid an error.
1918    Use char because int might match the return type of a GCC
1919    builtin and then its argument prototype would still apply.  */
1920 #ifdef __cplusplus
1921 extern "C"
1922 #endif
1923 char $2 ();
1924 /* The GNU C library defines this for functions which it implements
1925     to always fail with ENOSYS.  Some functions are actually named
1926     something starting with __ and the normal name is an alias.  */
1927 #if defined __stub_$2 || defined __stub___$2
1928 choke me
1929 #endif
1930
1931 int
1932 main ()
1933 {
1934 return $2 ();
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 if ac_fn_c_try_link "$LINENO"; then :
1940   eval "$3=yes"
1941 else
1942   eval "$3=no"
1943 fi
1944 rm -f core conftest.err conftest.$ac_objext \
1945     conftest$ac_exeext conftest.$ac_ext
1946 fi
1947 eval ac_res=\$$3
1948                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1949 $as_echo "$ac_res" >&6; }
1950   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1951
1952 } # ac_fn_c_check_func
1953 cat >config.log <<_ACEOF
1954 This file contains any messages produced by compilers while
1955 running configure, to aid debugging if configure makes a mistake.
1956
1957 It was created by $as_me, which was
1958 generated by GNU Autoconf 2.69.  Invocation command line was
1959
1960   $ $0 $@
1961
1962 _ACEOF
1963 exec 5>>config.log
1964 {
1965 cat <<_ASUNAME
1966 ## --------- ##
1967 ## Platform. ##
1968 ## --------- ##
1969
1970 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1971 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1972 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1973 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1974 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1975
1976 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1977 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1978
1979 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1980 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1981 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1982 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1983 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1984 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1985 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1986
1987 _ASUNAME
1988
1989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1990 for as_dir in $PATH
1991 do
1992   IFS=$as_save_IFS
1993   test -z "$as_dir" && as_dir=.
1994     $as_echo "PATH: $as_dir"
1995   done
1996 IFS=$as_save_IFS
1997
1998 } >&5
1999
2000 cat >&5 <<_ACEOF
2001
2002
2003 ## ----------- ##
2004 ## Core tests. ##
2005 ## ----------- ##
2006
2007 _ACEOF
2008
2009
2010 # Keep a trace of the command line.
2011 # Strip out --no-create and --no-recursion so they do not pile up.
2012 # Strip out --silent because we don't want to record it for future runs.
2013 # Also quote any args containing shell meta-characters.
2014 # Make two passes to allow for proper duplicate-argument suppression.
2015 ac_configure_args=
2016 ac_configure_args0=
2017 ac_configure_args1=
2018 ac_must_keep_next=false
2019 for ac_pass in 1 2
2020 do
2021   for ac_arg
2022   do
2023     case $ac_arg in
2024     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2025     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2026     | -silent | --silent | --silen | --sile | --sil)
2027       continue ;;
2028     *\'*)
2029       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2030     esac
2031     case $ac_pass in
2032     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2033     2)
2034       as_fn_append ac_configure_args1 " '$ac_arg'"
2035       if test $ac_must_keep_next = true; then
2036         ac_must_keep_next=false # Got value, back to normal.
2037       else
2038         case $ac_arg in
2039           *=* | --config-cache | -C | -disable-* | --disable-* \
2040           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2041           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2042           | -with-* | --with-* | -without-* | --without-* | --x)
2043             case "$ac_configure_args0 " in
2044               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2045             esac
2046             ;;
2047           -* ) ac_must_keep_next=true ;;
2048         esac
2049       fi
2050       as_fn_append ac_configure_args " '$ac_arg'"
2051       ;;
2052     esac
2053   done
2054 done
2055 { ac_configure_args0=; unset ac_configure_args0;}
2056 { ac_configure_args1=; unset ac_configure_args1;}
2057
2058 # When interrupted or exit'd, cleanup temporary files, and complete
2059 # config.log.  We remove comments because anyway the quotes in there
2060 # would cause problems or look ugly.
2061 # WARNING: Use '\'' to represent an apostrophe within the trap.
2062 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2063 trap 'exit_status=$?
2064   # Save into config.log some information that might help in debugging.
2065   {
2066     echo
2067
2068     $as_echo "## ---------------- ##
2069 ## Cache variables. ##
2070 ## ---------------- ##"
2071     echo
2072     # The following way of writing the cache mishandles newlines in values,
2073 (
2074   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2075     eval ac_val=\$$ac_var
2076     case $ac_val in #(
2077     *${as_nl}*)
2078       case $ac_var in #(
2079       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2080 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2081       esac
2082       case $ac_var in #(
2083       _ | IFS | as_nl) ;; #(
2084       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2085       *) { eval $ac_var=; unset $ac_var;} ;;
2086       esac ;;
2087     esac
2088   done
2089   (set) 2>&1 |
2090     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2091     *${as_nl}ac_space=\ *)
2092       sed -n \
2093         "s/'\''/'\''\\\\'\'''\''/g;
2094           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2095       ;; #(
2096     *)
2097       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2098       ;;
2099     esac |
2100     sort
2101 )
2102     echo
2103
2104     $as_echo "## ----------------- ##
2105 ## Output variables. ##
2106 ## ----------------- ##"
2107     echo
2108     for ac_var in $ac_subst_vars
2109     do
2110       eval ac_val=\$$ac_var
2111       case $ac_val in
2112       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2113       esac
2114       $as_echo "$ac_var='\''$ac_val'\''"
2115     done | sort
2116     echo
2117
2118     if test -n "$ac_subst_files"; then
2119       $as_echo "## ------------------- ##
2120 ## File substitutions. ##
2121 ## ------------------- ##"
2122       echo
2123       for ac_var in $ac_subst_files
2124       do
2125         eval ac_val=\$$ac_var
2126         case $ac_val in
2127         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2128         esac
2129         $as_echo "$ac_var='\''$ac_val'\''"
2130       done | sort
2131       echo
2132     fi
2133
2134     if test -s confdefs.h; then
2135       $as_echo "## ----------- ##
2136 ## confdefs.h. ##
2137 ## ----------- ##"
2138       echo
2139       cat confdefs.h
2140       echo
2141     fi
2142     test "$ac_signal" != 0 &&
2143       $as_echo "$as_me: caught signal $ac_signal"
2144     $as_echo "$as_me: exit $exit_status"
2145   } >&5
2146   rm -f core *.core core.conftest.* &&
2147     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2148     exit $exit_status
2149 ' 0
2150 for ac_signal in 1 2 13 15; do
2151   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2152 done
2153 ac_signal=0
2154
2155 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2156 rm -f -r conftest* confdefs.h
2157
2158 $as_echo "/* confdefs.h */" > confdefs.h
2159
2160 # Predefined preprocessor variables.
2161
2162 cat >>confdefs.h <<_ACEOF
2163 #define PACKAGE_NAME "$PACKAGE_NAME"
2164 _ACEOF
2165
2166 cat >>confdefs.h <<_ACEOF
2167 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2168 _ACEOF
2169
2170 cat >>confdefs.h <<_ACEOF
2171 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2172 _ACEOF
2173
2174 cat >>confdefs.h <<_ACEOF
2175 #define PACKAGE_STRING "$PACKAGE_STRING"
2176 _ACEOF
2177
2178 cat >>confdefs.h <<_ACEOF
2179 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2180 _ACEOF
2181
2182 cat >>confdefs.h <<_ACEOF
2183 #define PACKAGE_URL "$PACKAGE_URL"
2184 _ACEOF
2185
2186
2187 # Let the site file select an alternate cache file if it wants to.
2188 # Prefer an explicitly selected file to automatically selected ones.
2189 ac_site_file1=NONE
2190 ac_site_file2=NONE
2191 if test -n "$CONFIG_SITE"; then
2192   # We do not want a PATH search for config.site.
2193   case $CONFIG_SITE in #((
2194     -*)  ac_site_file1=./$CONFIG_SITE;;
2195     */*) ac_site_file1=$CONFIG_SITE;;
2196     *)   ac_site_file1=./$CONFIG_SITE;;
2197   esac
2198 elif test "x$prefix" != xNONE; then
2199   ac_site_file1=$prefix/share/config.site
2200   ac_site_file2=$prefix/etc/config.site
2201 else
2202   ac_site_file1=$ac_default_prefix/share/config.site
2203   ac_site_file2=$ac_default_prefix/etc/config.site
2204 fi
2205 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2206 do
2207   test "x$ac_site_file" = xNONE && continue
2208   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2209     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2210 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2211     sed 's/^/| /' "$ac_site_file" >&5
2212     . "$ac_site_file" \
2213       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2215 as_fn_error $? "failed to load site script $ac_site_file
2216 See \`config.log' for more details" "$LINENO" 5; }
2217   fi
2218 done
2219
2220 if test -r "$cache_file"; then
2221   # Some versions of bash will fail to source /dev/null (special files
2222   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2223   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2224     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2225 $as_echo "$as_me: loading cache $cache_file" >&6;}
2226     case $cache_file in
2227       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2228       *)                      . "./$cache_file";;
2229     esac
2230   fi
2231 else
2232   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2233 $as_echo "$as_me: creating cache $cache_file" >&6;}
2234   >$cache_file
2235 fi
2236
2237 # Check that the precious variables saved in the cache have kept the same
2238 # value.
2239 ac_cache_corrupted=false
2240 for ac_var in $ac_precious_vars; do
2241   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2242   eval ac_new_set=\$ac_env_${ac_var}_set
2243   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2244   eval ac_new_val=\$ac_env_${ac_var}_value
2245   case $ac_old_set,$ac_new_set in
2246     set,)
2247       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2248 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2249       ac_cache_corrupted=: ;;
2250     ,set)
2251       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2252 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2253       ac_cache_corrupted=: ;;
2254     ,);;
2255     *)
2256       if test "x$ac_old_val" != "x$ac_new_val"; then
2257         # differences in whitespace do not lead to failure.
2258         ac_old_val_w=`echo x $ac_old_val`
2259         ac_new_val_w=`echo x $ac_new_val`
2260         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2261           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2262 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2263           ac_cache_corrupted=:
2264         else
2265           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2266 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2267           eval $ac_var=\$ac_old_val
2268         fi
2269         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2270 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2271         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2272 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2273       fi;;
2274   esac
2275   # Pass precious variables to config.status.
2276   if test "$ac_new_set" = set; then
2277     case $ac_new_val in
2278     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2279     *) ac_arg=$ac_var=$ac_new_val ;;
2280     esac
2281     case " $ac_configure_args " in
2282       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2283       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2284     esac
2285   fi
2286 done
2287 if $ac_cache_corrupted; then
2288   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2289 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2290   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2291 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2292   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2293 fi
2294 ## -------------------- ##
2295 ## Main body of script. ##
2296 ## -------------------- ##
2297
2298 ac_ext=c
2299 ac_cpp='$CPP $CPPFLAGS'
2300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2303
2304
2305
2306 ac_config_headers="$ac_config_headers include/private/apu_config.h"
2307
2308 ac_aux_dir=
2309 for ac_dir in build "$srcdir"/build; do
2310   if test -f "$ac_dir/install-sh"; then
2311     ac_aux_dir=$ac_dir
2312     ac_install_sh="$ac_aux_dir/install-sh -c"
2313     break
2314   elif test -f "$ac_dir/install.sh"; then
2315     ac_aux_dir=$ac_dir
2316     ac_install_sh="$ac_aux_dir/install.sh -c"
2317     break
2318   elif test -f "$ac_dir/shtool"; then
2319     ac_aux_dir=$ac_dir
2320     ac_install_sh="$ac_aux_dir/shtool install -c"
2321     break
2322   fi
2323 done
2324 if test -z "$ac_aux_dir"; then
2325   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2326 fi
2327
2328 # These three variables are undocumented and unsupported,
2329 # and are intended to be withdrawn in a future Autoconf release.
2330 # They can cause serious problems if a builder's source tree is in a directory
2331 # whose full name contains unusual characters.
2332 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2333 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2334 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514   rm -f config.nice
2515   cat >config.nice<<EOF
2516 #! /bin/sh
2517 #
2518 # Created by configure
2519
2520 EOF
2521   if test -n "$CC"; then
2522     echo "CC=\"$CC\"; export CC" >> config.nice
2523   fi
2524   if test -n "$CFLAGS"; then
2525     echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> config.nice
2526   fi
2527   if test -n "$CPPFLAGS"; then
2528     echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> config.nice
2529   fi
2530   if test -n "$LDFLAGS"; then
2531     echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> config.nice
2532   fi
2533   if test -n "$LTFLAGS"; then
2534     echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> config.nice
2535   fi
2536   if test -n "$LIBS"; then
2537     echo "LIBS=\"$LIBS\"; export LIBS" >> config.nice
2538   fi
2539   if test -n "$INCLUDES"; then
2540     echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> config.nice
2541   fi
2542   if test -n "$NOTEST_CFLAGS"; then
2543     echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> config.nice
2544   fi
2545   if test -n "$NOTEST_CPPFLAGS"; then
2546     echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> config.nice
2547   fi
2548   if test -n "$NOTEST_LDFLAGS"; then
2549     echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> config.nice
2550   fi
2551   if test -n "$NOTEST_LIBS"; then
2552     echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> config.nice
2553   fi
2554
2555   # Retrieve command-line arguments.
2556   eval "set x $0 $ac_configure_args"
2557   shift
2558
2559   for arg
2560   do
2561
2562 ap_last=
2563 ap_cur="$arg"
2564 while test "x${ap_cur}" != "x${ap_last}";
2565 do
2566   ap_last="${ap_cur}"
2567   ap_cur=`eval "echo ${ap_cur}"`
2568 done
2569 arg="${ap_cur}"
2570
2571     echo "\"$arg\" \\" >> config.nice
2572   done
2573   echo '"$@"' >> config.nice
2574   chmod +x config.nice
2575
2576
2577
2578 abs_srcdir=`(cd $srcdir && pwd)`
2579 abs_builddir=`pwd`
2580
2581 if test "$abs_builddir" != "$abs_srcdir"; then
2582   USE_VPATH=1
2583   APU_CONFIG_LOCATION=build
2584 else
2585   APU_CONFIG_LOCATION=source
2586 fi
2587
2588
2589
2590 # Make sure we can run config.sub.
2591 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2592   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2593
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2595 $as_echo_n "checking build system type... " >&6; }
2596 if ${ac_cv_build+:} false; then :
2597   $as_echo_n "(cached) " >&6
2598 else
2599   ac_build_alias=$build_alias
2600 test "x$ac_build_alias" = x &&
2601   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2602 test "x$ac_build_alias" = x &&
2603   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2604 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2605   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2606
2607 fi
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2609 $as_echo "$ac_cv_build" >&6; }
2610 case $ac_cv_build in
2611 *-*-*) ;;
2612 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2613 esac
2614 build=$ac_cv_build
2615 ac_save_IFS=$IFS; IFS='-'
2616 set x $ac_cv_build
2617 shift
2618 build_cpu=$1
2619 build_vendor=$2
2620 shift; shift
2621 # Remember, the first character of IFS is used to create $*,
2622 # except with old shells:
2623 build_os=$*
2624 IFS=$ac_save_IFS
2625 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2626
2627
2628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2629 $as_echo_n "checking host system type... " >&6; }
2630 if ${ac_cv_host+:} false; then :
2631   $as_echo_n "(cached) " >&6
2632 else
2633   if test "x$host_alias" = x; then
2634   ac_cv_host=$ac_cv_build
2635 else
2636   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2637     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2638 fi
2639
2640 fi
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2642 $as_echo "$ac_cv_host" >&6; }
2643 case $ac_cv_host in
2644 *-*-*) ;;
2645 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2646 esac
2647 host=$ac_cv_host
2648 ac_save_IFS=$IFS; IFS='-'
2649 set x $ac_cv_host
2650 shift
2651 host_cpu=$1
2652 host_vendor=$2
2653 shift; shift
2654 # Remember, the first character of IFS is used to create $*,
2655 # except with old shells:
2656 host_os=$*
2657 IFS=$ac_save_IFS
2658 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2659
2660
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2662 $as_echo_n "checking target system type... " >&6; }
2663 if ${ac_cv_target+:} false; then :
2664   $as_echo_n "(cached) " >&6
2665 else
2666   if test "x$target_alias" = x; then
2667   ac_cv_target=$ac_cv_host
2668 else
2669   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2670     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2671 fi
2672
2673 fi
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2675 $as_echo "$ac_cv_target" >&6; }
2676 case $ac_cv_target in
2677 *-*-*) ;;
2678 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2679 esac
2680 target=$ac_cv_target
2681 ac_save_IFS=$IFS; IFS='-'
2682 set x $ac_cv_target
2683 shift
2684 target_cpu=$1
2685 target_vendor=$2
2686 shift; shift
2687 # Remember, the first character of IFS is used to create $*,
2688 # except with old shells:
2689 target_os=$*
2690 IFS=$ac_save_IFS
2691 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2692
2693
2694 # The aliases save the names the user supplied, while $host etc.
2695 # will get canonicalized.
2696 test -n "$target_alias" &&
2697   test "$program_prefix$program_suffix$program_transform_name" = \
2698     NONENONEs,x,x, &&
2699   program_prefix=${target_alias}-
2700
2701
2702 # Find a good install program.  We prefer a C program (faster),
2703 # so one script is as good as another.  But avoid the broken or
2704 # incompatible versions:
2705 # SysV /etc/install, /usr/sbin/install
2706 # SunOS /usr/etc/install
2707 # IRIX /sbin/install
2708 # AIX /bin/install
2709 # AmigaOS /C/install, which installs bootblocks on floppy discs
2710 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2711 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2712 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2713 # OS/2's system install, which has a completely different semantic
2714 # ./install, which can be erroneously created by make from ./install.sh.
2715 # Reject install programs that cannot install multiple files.
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2717 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2718 if test -z "$INSTALL"; then
2719 if ${ac_cv_path_install+:} false; then :
2720   $as_echo_n "(cached) " >&6
2721 else
2722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723 for as_dir in $PATH
2724 do
2725   IFS=$as_save_IFS
2726   test -z "$as_dir" && as_dir=.
2727     # Account for people who put trailing slashes in PATH elements.
2728 case $as_dir/ in #((
2729   ./ | .// | /[cC]/* | \
2730   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2731   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2732   /usr/ucb/* ) ;;
2733   *)
2734     # OSF1 and SCO ODT 3.0 have their own names for install.
2735     # Don't use installbsd from OSF since it installs stuff as root
2736     # by default.
2737     for ac_prog in ginstall scoinst install; do
2738       for ac_exec_ext in '' $ac_executable_extensions; do
2739         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2740           if test $ac_prog = install &&
2741             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2742             # AIX install.  It has an incompatible calling convention.
2743             :
2744           elif test $ac_prog = install &&
2745             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2746             # program-specific install script used by HP pwplus--don't use.
2747             :
2748           else
2749             rm -rf conftest.one conftest.two conftest.dir
2750             echo one > conftest.one
2751             echo two > conftest.two
2752             mkdir conftest.dir
2753             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2754               test -s conftest.one && test -s conftest.two &&
2755               test -s conftest.dir/conftest.one &&
2756               test -s conftest.dir/conftest.two
2757             then
2758               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2759               break 3
2760             fi
2761           fi
2762         fi
2763       done
2764     done
2765     ;;
2766 esac
2767
2768   done
2769 IFS=$as_save_IFS
2770
2771 rm -rf conftest.one conftest.two conftest.dir
2772
2773 fi
2774   if test "${ac_cv_path_install+set}" = set; then
2775     INSTALL=$ac_cv_path_install
2776   else
2777     # As a last resort, use the slow shell script.  Don't cache a
2778     # value for INSTALL within a source directory, because that will
2779     # break other packages using the cache if that directory is
2780     # removed, or if the value is a relative name.
2781     INSTALL=$ac_install_sh
2782   fi
2783 fi
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2785 $as_echo "$INSTALL" >&6; }
2786
2787 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2788 # It thinks the first close brace ends the variable substitution.
2789 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2790
2791 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2792
2793 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2794
2795
2796 # Use -no-install or -no-fast-install to link the test
2797 # programs on all platforms but Darwin, where it would cause
2798 # the programs to be linked against installed versions of
2799 # libapr instead of those just built.
2800 case $host in
2801     *-apple-darwin*)
2802         LT_NO_INSTALL=""
2803         ;;
2804     *-mingw*)
2805         LT_NO_INSTALL="-no-fast-install"
2806         ;;
2807     *)
2808         LT_NO_INSTALL="-no-install"
2809         ;;
2810 esac
2811
2812
2813 top_builddir="$abs_builddir"
2814
2815
2816
2817
2818
2819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkdir -p" >&5
2820 $as_echo_n "checking for working mkdir -p... " >&6; }
2821 if ${ac_cv_mkdir_p+:} false; then :
2822   $as_echo_n "(cached) " >&6
2823 else
2824
2825     test -d conftestdir && rm -rf conftestdir
2826     mkdir -p conftestdir/somedir >/dev/null 2>&1
2827     if test -d conftestdir/somedir; then
2828       ac_cv_mkdir_p=yes
2829     else
2830       ac_cv_mkdir_p=no
2831     fi
2832     rm -rf conftestdir
2833
2834 fi
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p" >&5
2836 $as_echo "$ac_cv_mkdir_p" >&6; }
2837   if test "$ac_cv_mkdir_p" = "yes"; then
2838       mkdir_p="mkdir -p"
2839   else
2840       mkdir_p="$abs_srcdir/build/mkdir.sh"
2841   fi
2842
2843
2844 get_version="$abs_srcdir/build/get-version.sh"
2845 version_hdr="$abs_srcdir/include/apu_version.h"
2846 APRUTIL_MAJOR_VERSION="`$get_version major $version_hdr APU`"
2847 APRUTIL_DOTTED_VERSION="`$get_version all $version_hdr APU`"
2848
2849 APU_LTVERSION="-version-info `$get_version libtool $version_hdr APU`"
2850
2851
2852
2853
2854
2855 echo "APR-util Version: ${APRUTIL_DOTTED_VERSION}"
2856
2857
2858 # Check whether --enable-layout was given.
2859 if test "${enable_layout+set}" = set; then :
2860   enableval=$enable_layout;
2861   LAYOUT=$enableval
2862
2863 fi
2864
2865
2866 if test -z "$LAYOUT"; then
2867   LAYOUT="apr-util"
2868 fi
2869
2870   if test ! -f $srcdir/config.layout; then
2871     echo "** Error: Layout file $srcdir/config.layout not found"
2872     echo "** Error: Cannot use undefined layout '$LAYOUT'"
2873     exit 1
2874   fi
2875   # Catch layout names including a slash which will otherwise
2876   # confuse the heck out of the sed script.
2877   case $LAYOUT in
2878   */*)
2879     echo "** Error: $LAYOUT is not a valid layout name"
2880     exit 1 ;;
2881   esac
2882   pldconf=./config.pld
2883
2884   sed -e "1s/[  ]*<[lL]ayout[   ]*$LAYOUT[      ]*>[    ]*//;1t" \
2885       -e "1,/[  ]*<[lL]ayout[   ]*$LAYOUT[      ]*>[    ]*/d" \
2886       -e '/[    ]*<\/Layout>[   ]*/,$d' \
2887       -e "s/^[  ]*//g" \
2888       -e "s/:[  ]*/=\'/g" \
2889       -e "s/[   ]*$/'/g" \
2890       $srcdir/config.layout > $pldconf
2891   layout_name=$LAYOUT
2892   if test ! -s $pldconf; then
2893     echo "** Error: unable to find layout $layout_name"
2894     exit 1
2895   fi
2896   . $pldconf
2897   rm $pldconf
2898   for var in prefix exec_prefix bindir sbindir libexecdir mandir \
2899              sysconfdir datadir includedir localstatedir runtimedir \
2900              logfiledir libdir installbuilddir libsuffix ; do
2901     eval "val=\"\$$var\""
2902     case $val in
2903       *+)
2904         val=`echo $val | sed -e 's;\+$;;'`
2905         eval "$var=\"\$val\""
2906         autosuffix=yes
2907         ;;
2908       *)
2909         autosuffix=no
2910         ;;
2911     esac
2912     val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
2913     val=`echo $val | sed -e 's:[\$]\([a-z_]*\):$\1:g'`
2914     if test "$autosuffix" = "yes"; then
2915       if echo $val | grep apache >/dev/null; then
2916         addtarget=no
2917       else
2918         addtarget=yes
2919       fi
2920       if test "$addtarget" = "yes"; then
2921         val="$val/apache2"
2922       fi
2923     fi
2924     eval "$var='$val'"
2925   done
2926
2927
2928
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chosen layout" >&5
2930 $as_echo_n "checking for chosen layout... " >&6; }
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $layout_name" >&5
2932 $as_echo "$layout_name" >&6; }
2933
2934
2935 ac_prev=
2936 # Retrieve the command-line arguments.  The eval is needed because
2937 # the arguments are quoted to preserve accuracy.
2938 eval "set x $ac_configure_args"
2939 shift
2940 for ac_option
2941 do
2942   # If the previous option needs an argument, assign it.
2943   if test -n "$ac_prev"; then
2944     eval "$ac_prev=\$ac_option"
2945     ac_prev=
2946     continue
2947   fi
2948
2949   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
2950
2951   case $ac_option in
2952
2953   -bindir | --bindir | --bindi | --bind | --bin | --bi)
2954     ac_prev=bindir ;;
2955   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2956     bindir="$ac_optarg" ;;
2957
2958   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
2959     ac_prev=datadir ;;
2960   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
2961   | --da=*)
2962     datadir="$ac_optarg" ;;
2963
2964   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2965   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2966   | --exec | --exe | --ex)
2967     ac_prev=exec_prefix ;;
2968   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2969   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2970   | --exec=* | --exe=* | --ex=*)
2971     exec_prefix="$ac_optarg" ;;
2972
2973   -includedir | --includedir | --includedi | --included | --include \
2974   | --includ | --inclu | --incl | --inc)
2975     ac_prev=includedir ;;
2976   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2977   | --includ=* | --inclu=* | --incl=* | --inc=*)
2978     includedir="$ac_optarg" ;;
2979
2980   -infodir | --infodir | --infodi | --infod | --info | --inf)
2981     ac_prev=infodir ;;
2982   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2983     infodir="$ac_optarg" ;;
2984
2985   -libdir | --libdir | --libdi | --libd)
2986     ac_prev=libdir ;;
2987   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2988     libdir="$ac_optarg" ;;
2989
2990   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2991   | --libexe | --libex | --libe)
2992     ac_prev=libexecdir ;;
2993   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2994   | --libexe=* | --libex=* | --libe=*)
2995     libexecdir="$ac_optarg" ;;
2996
2997   -localstatedir | --localstatedir | --localstatedi | --localstated \
2998   | --localstate | --localstat | --localsta | --localst \
2999   | --locals | --local | --loca | --loc | --lo)
3000     ac_prev=localstatedir ;;
3001   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
3002   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
3003   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
3004     localstatedir="$ac_optarg" ;;
3005
3006   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
3007     ac_prev=mandir ;;
3008   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
3009     mandir="$ac_optarg" ;;
3010
3011   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
3012     ac_prev=prefix ;;
3013   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
3014     prefix="$ac_optarg" ;;
3015
3016   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
3017     ac_prev=sbindir ;;
3018   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
3019   | --sbi=* | --sb=*)
3020     sbindir="$ac_optarg" ;;
3021
3022   -sharedstatedir | --sharedstatedir | --sharedstatedi \
3023   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
3024   | --sharedst | --shareds | --shared | --share | --shar \
3025   | --sha | --sh)
3026     ac_prev=sharedstatedir ;;
3027   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
3028   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
3029   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
3030   | --sha=* | --sh=*)
3031     sharedstatedir="$ac_optarg" ;;
3032
3033   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
3034   | --syscon | --sysco | --sysc | --sys | --sy)
3035     ac_prev=sysconfdir ;;
3036   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
3037   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
3038     sysconfdir="$ac_optarg" ;;
3039
3040   esac
3041 done
3042
3043 # Be sure to have absolute paths.
3044 for ac_var in exec_prefix prefix
3045 do
3046   eval ac_val=$`echo $ac_var`
3047   case $ac_val in
3048     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
3049     *)  as_fn_error $? "expected an absolute path for --$ac_var: $ac_val" "$LINENO" 5;;
3050   esac
3051 done
3052
3053
3054
3055 ac_ext=c
3056 ac_cpp='$CPP $CPPFLAGS'
3057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3060 if test -n "$ac_tool_prefix"; then
3061   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3062 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3064 $as_echo_n "checking for $ac_word... " >&6; }
3065 if ${ac_cv_prog_CC+:} false; then :
3066   $as_echo_n "(cached) " >&6
3067 else
3068   if test -n "$CC"; then
3069   ac_cv_prog_CC="$CC" # Let the user override the test.
3070 else
3071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3072 for as_dir in $PATH
3073 do
3074   IFS=$as_save_IFS
3075   test -z "$as_dir" && as_dir=.
3076     for ac_exec_ext in '' $ac_executable_extensions; do
3077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3078     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3080     break 2
3081   fi
3082 done
3083   done
3084 IFS=$as_save_IFS
3085
3086 fi
3087 fi
3088 CC=$ac_cv_prog_CC
3089 if test -n "$CC"; then
3090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3091 $as_echo "$CC" >&6; }
3092 else
3093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094 $as_echo "no" >&6; }
3095 fi
3096
3097
3098 fi
3099 if test -z "$ac_cv_prog_CC"; then
3100   ac_ct_CC=$CC
3101   # Extract the first word of "gcc", so it can be a program name with args.
3102 set dummy gcc; ac_word=$2
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3104 $as_echo_n "checking for $ac_word... " >&6; }
3105 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3106   $as_echo_n "(cached) " >&6
3107 else
3108   if test -n "$ac_ct_CC"; then
3109   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3110 else
3111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3112 for as_dir in $PATH
3113 do
3114   IFS=$as_save_IFS
3115   test -z "$as_dir" && as_dir=.
3116     for ac_exec_ext in '' $ac_executable_extensions; do
3117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3118     ac_cv_prog_ac_ct_CC="gcc"
3119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3120     break 2
3121   fi
3122 done
3123   done
3124 IFS=$as_save_IFS
3125
3126 fi
3127 fi
3128 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3129 if test -n "$ac_ct_CC"; then
3130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3131 $as_echo "$ac_ct_CC" >&6; }
3132 else
3133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3134 $as_echo "no" >&6; }
3135 fi
3136
3137   if test "x$ac_ct_CC" = x; then
3138     CC=""
3139   else
3140     case $cross_compiling:$ac_tool_warned in
3141 yes:)
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3143 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3144 ac_tool_warned=yes ;;
3145 esac
3146     CC=$ac_ct_CC
3147   fi
3148 else
3149   CC="$ac_cv_prog_CC"
3150 fi
3151
3152 if test -z "$CC"; then
3153           if test -n "$ac_tool_prefix"; then
3154     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3155 set dummy ${ac_tool_prefix}cc; ac_word=$2
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3157 $as_echo_n "checking for $ac_word... " >&6; }
3158 if ${ac_cv_prog_CC+:} false; then :
3159   $as_echo_n "(cached) " >&6
3160 else
3161   if test -n "$CC"; then
3162   ac_cv_prog_CC="$CC" # Let the user override the test.
3163 else
3164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165 for as_dir in $PATH
3166 do
3167   IFS=$as_save_IFS
3168   test -z "$as_dir" && as_dir=.
3169     for ac_exec_ext in '' $ac_executable_extensions; do
3170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171     ac_cv_prog_CC="${ac_tool_prefix}cc"
3172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3173     break 2
3174   fi
3175 done
3176   done
3177 IFS=$as_save_IFS
3178
3179 fi
3180 fi
3181 CC=$ac_cv_prog_CC
3182 if test -n "$CC"; then
3183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3184 $as_echo "$CC" >&6; }
3185 else
3186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3187 $as_echo "no" >&6; }
3188 fi
3189
3190
3191   fi
3192 fi
3193 if test -z "$CC"; then
3194   # Extract the first word of "cc", so it can be a program name with args.
3195 set dummy cc; ac_word=$2
3196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197 $as_echo_n "checking for $ac_word... " >&6; }
3198 if ${ac_cv_prog_CC+:} false; then :
3199   $as_echo_n "(cached) " >&6
3200 else
3201   if test -n "$CC"; then
3202   ac_cv_prog_CC="$CC" # Let the user override the test.
3203 else
3204   ac_prog_rejected=no
3205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3206 for as_dir in $PATH
3207 do
3208   IFS=$as_save_IFS
3209   test -z "$as_dir" && as_dir=.
3210     for ac_exec_ext in '' $ac_executable_extensions; do
3211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3212     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3213        ac_prog_rejected=yes
3214        continue
3215      fi
3216     ac_cv_prog_CC="cc"
3217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3218     break 2
3219   fi
3220 done
3221   done
3222 IFS=$as_save_IFS
3223
3224 if test $ac_prog_rejected = yes; then
3225   # We found a bogon in the path, so make sure we never use it.
3226   set dummy $ac_cv_prog_CC
3227   shift
3228   if test $# != 0; then
3229     # We chose a different compiler from the bogus one.
3230     # However, it has the same basename, so the bogon will be chosen
3231     # first if we set CC to just the basename; use the full file name.
3232     shift
3233     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3234   fi
3235 fi
3236 fi
3237 fi
3238 CC=$ac_cv_prog_CC
3239 if test -n "$CC"; then
3240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3241 $as_echo "$CC" >&6; }
3242 else
3243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3244 $as_echo "no" >&6; }
3245 fi
3246
3247
3248 fi
3249 if test -z "$CC"; then
3250   if test -n "$ac_tool_prefix"; then
3251   for ac_prog in cl.exe
3252   do
3253     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3254 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3256 $as_echo_n "checking for $ac_word... " >&6; }
3257 if ${ac_cv_prog_CC+:} false; then :
3258   $as_echo_n "(cached) " >&6
3259 else
3260   if test -n "$CC"; then
3261   ac_cv_prog_CC="$CC" # Let the user override the test.
3262 else
3263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3264 for as_dir in $PATH
3265 do
3266   IFS=$as_save_IFS
3267   test -z "$as_dir" && as_dir=.
3268     for ac_exec_ext in '' $ac_executable_extensions; do
3269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3270     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3272     break 2
3273   fi
3274 done
3275   done
3276 IFS=$as_save_IFS
3277
3278 fi
3279 fi
3280 CC=$ac_cv_prog_CC
3281 if test -n "$CC"; then
3282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3283 $as_echo "$CC" >&6; }
3284 else
3285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3286 $as_echo "no" >&6; }
3287 fi
3288
3289
3290     test -n "$CC" && break
3291   done
3292 fi
3293 if test -z "$CC"; then
3294   ac_ct_CC=$CC
3295   for ac_prog in cl.exe
3296 do
3297   # Extract the first word of "$ac_prog", so it can be a program name with args.
3298 set dummy $ac_prog; ac_word=$2
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300 $as_echo_n "checking for $ac_word... " >&6; }
3301 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3302   $as_echo_n "(cached) " >&6
3303 else
3304   if test -n "$ac_ct_CC"; then
3305   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3306 else
3307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308 for as_dir in $PATH
3309 do
3310   IFS=$as_save_IFS
3311   test -z "$as_dir" && as_dir=.
3312     for ac_exec_ext in '' $ac_executable_extensions; do
3313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3314     ac_cv_prog_ac_ct_CC="$ac_prog"
3315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3316     break 2
3317   fi
3318 done
3319   done
3320 IFS=$as_save_IFS
3321
3322 fi
3323 fi
3324 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3325 if test -n "$ac_ct_CC"; then
3326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3327 $as_echo "$ac_ct_CC" >&6; }
3328 else
3329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330 $as_echo "no" >&6; }
3331 fi
3332
3333
3334   test -n "$ac_ct_CC" && break
3335 done
3336
3337   if test "x$ac_ct_CC" = x; then
3338     CC=""
3339   else
3340     case $cross_compiling:$ac_tool_warned in
3341 yes:)
3342 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3343 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3344 ac_tool_warned=yes ;;
3345 esac
3346     CC=$ac_ct_CC
3347   fi
3348 fi
3349
3350 fi
3351
3352
3353 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3354 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3355 as_fn_error $? "no acceptable C compiler found in \$PATH
3356 See \`config.log' for more details" "$LINENO" 5; }
3357
3358 # Provide some information about the compiler.
3359 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3360 set X $ac_compile
3361 ac_compiler=$2
3362 for ac_option in --version -v -V -qversion; do
3363   { { ac_try="$ac_compiler $ac_option >&5"
3364 case "(($ac_try" in
3365   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3366   *) ac_try_echo=$ac_try;;
3367 esac
3368 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3369 $as_echo "$ac_try_echo"; } >&5
3370   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3371   ac_status=$?
3372   if test -s conftest.err; then
3373     sed '10a\
3374 ... rest of stderr output deleted ...
3375          10q' conftest.err >conftest.er1
3376     cat conftest.er1 >&5
3377   fi
3378   rm -f conftest.er1 conftest.err
3379   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3380   test $ac_status = 0; }
3381 done
3382
3383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3384 /* end confdefs.h.  */
3385
3386 int
3387 main ()
3388 {
3389
3390   ;
3391   return 0;
3392 }
3393 _ACEOF
3394 ac_clean_files_save=$ac_clean_files
3395 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3396 # Try to create an executable without -o first, disregard a.out.
3397 # It will help us diagnose broken compilers, and finding out an intuition
3398 # of exeext.
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3400 $as_echo_n "checking whether the C compiler works... " >&6; }
3401 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3402
3403 # The possible output files:
3404 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3405
3406 ac_rmfiles=
3407 for ac_file in $ac_files
3408 do
3409   case $ac_file in
3410     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3411     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3412   esac
3413 done
3414 rm -f $ac_rmfiles
3415
3416 if { { ac_try="$ac_link_default"
3417 case "(($ac_try" in
3418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419   *) ac_try_echo=$ac_try;;
3420 esac
3421 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3422 $as_echo "$ac_try_echo"; } >&5
3423   (eval "$ac_link_default") 2>&5
3424   ac_status=$?
3425   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3426   test $ac_status = 0; }; then :
3427   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3428 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3429 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3430 # so that the user can short-circuit this test for compilers unknown to
3431 # Autoconf.
3432 for ac_file in $ac_files ''
3433 do
3434   test -f "$ac_file" || continue
3435   case $ac_file in
3436     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3437         ;;
3438     [ab].out )
3439         # We found the default executable, but exeext='' is most
3440         # certainly right.
3441         break;;
3442     *.* )
3443         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3444         then :; else
3445            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3446         fi
3447         # We set ac_cv_exeext here because the later test for it is not
3448         # safe: cross compilers may not add the suffix if given an `-o'
3449         # argument, so we may need to know it at that point already.
3450         # Even if this section looks crufty: it has the advantage of
3451         # actually working.
3452         break;;
3453     * )
3454         break;;
3455   esac
3456 done
3457 test "$ac_cv_exeext" = no && ac_cv_exeext=
3458
3459 else
3460   ac_file=''
3461 fi
3462 if test -z "$ac_file"; then :
3463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464 $as_echo "no" >&6; }
3465 $as_echo "$as_me: failed program was:" >&5
3466 sed 's/^/| /' conftest.$ac_ext >&5
3467
3468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3469 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3470 as_fn_error 77 "C compiler cannot create executables
3471 See \`config.log' for more details" "$LINENO" 5; }
3472 else
3473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3474 $as_echo "yes" >&6; }
3475 fi
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3477 $as_echo_n "checking for C compiler default output file name... " >&6; }
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3479 $as_echo "$ac_file" >&6; }
3480 ac_exeext=$ac_cv_exeext
3481
3482 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3483 ac_clean_files=$ac_clean_files_save
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3485 $as_echo_n "checking for suffix of executables... " >&6; }
3486 if { { ac_try="$ac_link"
3487 case "(($ac_try" in
3488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3489   *) ac_try_echo=$ac_try;;
3490 esac
3491 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3492 $as_echo "$ac_try_echo"; } >&5
3493   (eval "$ac_link") 2>&5
3494   ac_status=$?
3495   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3496   test $ac_status = 0; }; then :
3497   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3498 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3499 # work properly (i.e., refer to `conftest.exe'), while it won't with
3500 # `rm'.
3501 for ac_file in conftest.exe conftest conftest.*; do
3502   test -f "$ac_file" || continue
3503   case $ac_file in
3504     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3505     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3506           break;;
3507     * ) break;;
3508   esac
3509 done
3510 else
3511   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3512 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3513 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3514 See \`config.log' for more details" "$LINENO" 5; }
3515 fi
3516 rm -f conftest conftest$ac_cv_exeext
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3518 $as_echo "$ac_cv_exeext" >&6; }
3519
3520 rm -f conftest.$ac_ext
3521 EXEEXT=$ac_cv_exeext
3522 ac_exeext=$EXEEXT
3523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3524 /* end confdefs.h.  */
3525 #include <stdio.h>
3526 int
3527 main ()
3528 {
3529 FILE *f = fopen ("conftest.out", "w");
3530  return ferror (f) || fclose (f) != 0;
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 ac_clean_files="$ac_clean_files conftest.out"
3537 # Check that the compiler produces executables we can run.  If not, either
3538 # the compiler is broken, or we cross compile.
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3540 $as_echo_n "checking whether we are cross compiling... " >&6; }
3541 if test "$cross_compiling" != yes; then
3542   { { ac_try="$ac_link"
3543 case "(($ac_try" in
3544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545   *) ac_try_echo=$ac_try;;
3546 esac
3547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3548 $as_echo "$ac_try_echo"; } >&5
3549   (eval "$ac_link") 2>&5
3550   ac_status=$?
3551   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3552   test $ac_status = 0; }
3553   if { ac_try='./conftest$ac_cv_exeext'
3554   { { case "(($ac_try" in
3555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556   *) ac_try_echo=$ac_try;;
3557 esac
3558 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3559 $as_echo "$ac_try_echo"; } >&5
3560   (eval "$ac_try") 2>&5
3561   ac_status=$?
3562   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3563   test $ac_status = 0; }; }; then
3564     cross_compiling=no
3565   else
3566     if test "$cross_compiling" = maybe; then
3567         cross_compiling=yes
3568     else
3569         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3570 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3571 as_fn_error $? "cannot run C compiled programs.
3572 If you meant to cross compile, use \`--host'.
3573 See \`config.log' for more details" "$LINENO" 5; }
3574     fi
3575   fi
3576 fi
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3578 $as_echo "$cross_compiling" >&6; }
3579
3580 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3581 ac_clean_files=$ac_clean_files_save
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3583 $as_echo_n "checking for suffix of object files... " >&6; }
3584 if ${ac_cv_objext+:} false; then :
3585   $as_echo_n "(cached) " >&6
3586 else
3587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3588 /* end confdefs.h.  */
3589
3590 int
3591 main ()
3592 {
3593
3594   ;
3595   return 0;
3596 }
3597 _ACEOF
3598 rm -f conftest.o conftest.obj
3599 if { { ac_try="$ac_compile"
3600 case "(($ac_try" in
3601   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602   *) ac_try_echo=$ac_try;;
3603 esac
3604 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3605 $as_echo "$ac_try_echo"; } >&5
3606   (eval "$ac_compile") 2>&5
3607   ac_status=$?
3608   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3609   test $ac_status = 0; }; then :
3610   for ac_file in conftest.o conftest.obj conftest.*; do
3611   test -f "$ac_file" || continue;
3612   case $ac_file in
3613     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3614     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3615        break;;
3616   esac
3617 done
3618 else
3619   $as_echo "$as_me: failed program was:" >&5
3620 sed 's/^/| /' conftest.$ac_ext >&5
3621
3622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3624 as_fn_error $? "cannot compute suffix of object files: cannot compile
3625 See \`config.log' for more details" "$LINENO" 5; }
3626 fi
3627 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3628 fi
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3630 $as_echo "$ac_cv_objext" >&6; }
3631 OBJEXT=$ac_cv_objext
3632 ac_objext=$OBJEXT
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3634 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3635 if ${ac_cv_c_compiler_gnu+:} false; then :
3636   $as_echo_n "(cached) " >&6
3637 else
3638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639 /* end confdefs.h.  */
3640
3641 int
3642 main ()
3643 {
3644 #ifndef __GNUC__
3645        choke me
3646 #endif
3647
3648   ;
3649   return 0;
3650 }
3651 _ACEOF
3652 if ac_fn_c_try_compile "$LINENO"; then :
3653   ac_compiler_gnu=yes
3654 else
3655   ac_compiler_gnu=no
3656 fi
3657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3658 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3659
3660 fi
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3662 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3663 if test $ac_compiler_gnu = yes; then
3664   GCC=yes
3665 else
3666   GCC=
3667 fi
3668 ac_test_CFLAGS=${CFLAGS+set}
3669 ac_save_CFLAGS=$CFLAGS
3670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3671 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3672 if ${ac_cv_prog_cc_g+:} false; then :
3673   $as_echo_n "(cached) " >&6
3674 else
3675   ac_save_c_werror_flag=$ac_c_werror_flag
3676    ac_c_werror_flag=yes
3677    ac_cv_prog_cc_g=no
3678    CFLAGS="-g"
3679    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3680 /* end confdefs.h.  */
3681
3682 int
3683 main ()
3684 {
3685
3686   ;
3687   return 0;
3688 }
3689 _ACEOF
3690 if ac_fn_c_try_compile "$LINENO"; then :
3691   ac_cv_prog_cc_g=yes
3692 else
3693   CFLAGS=""
3694       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3695 /* end confdefs.h.  */
3696
3697 int
3698 main ()
3699 {
3700
3701   ;
3702   return 0;
3703 }
3704 _ACEOF
3705 if ac_fn_c_try_compile "$LINENO"; then :
3706
3707 else
3708   ac_c_werror_flag=$ac_save_c_werror_flag
3709          CFLAGS="-g"
3710          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3711 /* end confdefs.h.  */
3712
3713 int
3714 main ()
3715 {
3716
3717   ;
3718   return 0;
3719 }
3720 _ACEOF
3721 if ac_fn_c_try_compile "$LINENO"; then :
3722   ac_cv_prog_cc_g=yes
3723 fi
3724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3725 fi
3726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3727 fi
3728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3729    ac_c_werror_flag=$ac_save_c_werror_flag
3730 fi
3731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3732 $as_echo "$ac_cv_prog_cc_g" >&6; }
3733 if test "$ac_test_CFLAGS" = set; then
3734   CFLAGS=$ac_save_CFLAGS
3735 elif test $ac_cv_prog_cc_g = yes; then
3736   if test "$GCC" = yes; then
3737     CFLAGS="-g -O2"
3738   else
3739     CFLAGS="-g"
3740   fi
3741 else
3742   if test "$GCC" = yes; then
3743     CFLAGS="-O2"
3744   else
3745     CFLAGS=
3746   fi
3747 fi
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3749 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3750 if ${ac_cv_prog_cc_c89+:} false; then :
3751   $as_echo_n "(cached) " >&6
3752 else
3753   ac_cv_prog_cc_c89=no
3754 ac_save_CC=$CC
3755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3756 /* end confdefs.h.  */
3757 #include <stdarg.h>
3758 #include <stdio.h>
3759 struct stat;
3760 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3761 struct buf { int x; };
3762 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3763 static char *e (p, i)
3764      char **p;
3765      int i;
3766 {
3767   return p[i];
3768 }
3769 static char *f (char * (*g) (char **, int), char **p, ...)
3770 {
3771   char *s;
3772   va_list v;
3773   va_start (v,p);
3774   s = g (p, va_arg (v,int));
3775   va_end (v);
3776   return s;
3777 }
3778
3779 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3780    function prototypes and stuff, but not '\xHH' hex character constants.
3781    These don't provoke an error unfortunately, instead are silently treated
3782    as 'x'.  The following induces an error, until -std is added to get
3783    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3784    array size at least.  It's necessary to write '\x00'==0 to get something
3785    that's true only with -std.  */
3786 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3787
3788 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3789    inside strings and character constants.  */
3790 #define FOO(x) 'x'
3791 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3792
3793 int test (int i, double x);
3794 struct s1 {int (*f) (int a);};
3795 struct s2 {int (*f) (double a);};
3796 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3797 int argc;
3798 char **argv;
3799 int
3800 main ()
3801 {
3802 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3803   ;
3804   return 0;
3805 }
3806 _ACEOF
3807 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3808         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3809 do
3810   CC="$ac_save_CC $ac_arg"
3811   if ac_fn_c_try_compile "$LINENO"; then :
3812   ac_cv_prog_cc_c89=$ac_arg
3813 fi
3814 rm -f core conftest.err conftest.$ac_objext
3815   test "x$ac_cv_prog_cc_c89" != "xno" && break
3816 done
3817 rm -f conftest.$ac_ext
3818 CC=$ac_save_CC
3819
3820 fi
3821 # AC_CACHE_VAL
3822 case "x$ac_cv_prog_cc_c89" in
3823   x)
3824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3825 $as_echo "none needed" >&6; } ;;
3826   xno)
3827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3828 $as_echo "unsupported" >&6; } ;;
3829   *)
3830     CC="$CC $ac_cv_prog_cc_c89"
3831     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3832 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3833 esac
3834 if test "x$ac_cv_prog_cc_c89" != xno; then :
3835
3836 fi
3837
3838 ac_ext=c
3839 ac_cpp='$CPP $CPPFLAGS'
3840 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3841 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3842 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3843
3844
3845
3846 if test "x$apu_preload_done" != "xyes" ; then
3847     apu_preload_done="yes"
3848
3849     echo "Applying apr-util hints file rules for $host"
3850
3851     case "$host" in
3852     *-dec-osf*)
3853
3854   if test -z "$apu_crypt_threadsafe"; then
3855     test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3856     apu_crypt_threadsafe="1"
3857   fi
3858
3859         ;;
3860     *-hp-hpux11.*)
3861
3862   if test -z "$apu_crypt_threadsafe"; then
3863     test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3864     apu_crypt_threadsafe="1"
3865   fi
3866
3867         ;;
3868     *-ibm-aix4*|*-ibm-aix5.1*)
3869
3870   if test -z "$apu_iconv_inbuf_const"; then
3871     test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
3872     apu_iconv_inbuf_const="1"
3873   fi
3874
3875         ;;
3876     *-ibm-os390)
3877
3878   if test -z "$apu_crypt_threadsafe"; then
3879     test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3880     apu_crypt_threadsafe="1"
3881   fi
3882
3883         ;;
3884     *-solaris2*)
3885
3886   if test -z "$apu_iconv_inbuf_const"; then
3887     test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
3888     apu_iconv_inbuf_const="1"
3889   fi
3890
3891
3892   if test -z "$apu_crypt_threadsafe"; then
3893     test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3894     apu_crypt_threadsafe="1"
3895   fi
3896
3897         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
3898 $as_echo_n "checking for library containing fdatasync... " >&6; }
3899 if ${ac_cv_search_fdatasync+:} false; then :
3900   $as_echo_n "(cached) " >&6
3901 else
3902   ac_func_search_save_LIBS=$LIBS
3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3904 /* end confdefs.h.  */
3905
3906 /* Override any GCC internal prototype to avoid an error.
3907    Use char because int might match the return type of a GCC
3908    builtin and then its argument prototype would still apply.  */
3909 #ifdef __cplusplus
3910 extern "C"
3911 #endif
3912 char fdatasync ();
3913 int
3914 main ()
3915 {
3916 return fdatasync ();
3917   ;
3918   return 0;
3919 }
3920 _ACEOF
3921 for ac_lib in '' rt posix4; do
3922   if test -z "$ac_lib"; then
3923     ac_res="none required"
3924   else
3925     ac_res=-l$ac_lib
3926     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3927   fi
3928   if ac_fn_c_try_link "$LINENO"; then :
3929   ac_cv_search_fdatasync=$ac_res
3930 fi
3931 rm -f core conftest.err conftest.$ac_objext \
3932     conftest$ac_exeext
3933   if ${ac_cv_search_fdatasync+:} false; then :
3934   break
3935 fi
3936 done
3937 if ${ac_cv_search_fdatasync+:} false; then :
3938
3939 else
3940   ac_cv_search_fdatasync=no
3941 fi
3942 rm conftest.$ac_ext
3943 LIBS=$ac_func_search_save_LIBS
3944 fi
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
3946 $as_echo "$ac_cv_search_fdatasync" >&6; }
3947 ac_res=$ac_cv_search_fdatasync
3948 if test "$ac_res" != no; then :
3949   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3950
3951 fi
3952
3953         ;;
3954     *-sco3.2v5*)
3955
3956   if test -z "$apu_db_xtra_libs"; then
3957     test "x$silent" != "xyes" && echo "  setting apu_db_xtra_libs to \"-lsocket\""
3958     apu_db_xtra_libs="-lsocket"
3959   fi
3960
3961         ;;
3962     esac
3963
3964 fi
3965
3966
3967
3968 APRUTIL_INCLUDES=""
3969 APRUTIL_PRIV_INCLUDES="-I$top_builddir/include -I$top_builddir/include/private"
3970 if test -n "$USE_VPATH"; then
3971     APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES -I$abs_srcdir/include/private -I$abs_srcdir/include"
3972 fi
3973
3974
3975
3976
3977   apr_found="no"
3978
3979   if test "$target_os" = "os2-emx"; then
3980     # Scripts don't pass test -x on OS/2
3981     TEST_X="test -f"
3982   else
3983     TEST_X="test -x"
3984   fi
3985
3986   acceptable_majors="1"
3987
3988   apr_temp_acceptable_apr_config=""
3989   for apr_temp_major in $acceptable_majors
3990   do
3991     case $apr_temp_major in
3992       0)
3993       apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
3994       ;;
3995       *)
3996       apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
3997       ;;
3998     esac
3999   done
4000
4001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR" >&5
4002 $as_echo_n "checking for APR... " >&6; }
4003
4004 # Check whether --with-apr was given.
4005 if test "${with_apr+set}" = set; then :
4006   withval=$with_apr;
4007     if test "$withval" = "no" || test "$withval" = "yes"; then
4008       as_fn_error $? "--with-apr requires a directory or file to be provided" "$LINENO" 5
4009     fi
4010
4011     for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
4012     do
4013       for lookdir in "$withval/bin" "$withval"
4014       do
4015         if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
4016           apr_config="$lookdir/$apr_temp_apr_config_file"
4017
4018           apr_found="yes"
4019           break 2
4020         fi
4021       done
4022     done
4023
4024     if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
4025       apr_config="$withval"
4026       apr_found="yes"
4027     fi
4028
4029             if test "$apr_found" != "yes"; then
4030       as_fn_error $? "the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file." "$LINENO" 5
4031     fi
4032
4033 else
4034
4035         if test -n "" && test "" = "1"; then
4036       for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
4037       do
4038         if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
4039           apr_config="$apr_temp_apr_config_file"
4040
4041           apr_found="yes"
4042           break
4043         else
4044                     for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
4045             if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
4046               apr_config="$lookdir/bin/$apr_temp_apr_config_file"
4047
4048               apr_found="yes"
4049               break 2
4050             fi
4051           done
4052         fi
4053       done
4054     fi
4055         if test "$apr_found" = "no" && test -d ""; then
4056       apr_temp_abs_srcdir="`cd \"\" && pwd`"
4057       apr_found="reconfig"
4058       apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
4059       case $apr_bundled_major in
4060         "")
4061           as_fn_error $? "failed to find major version of bundled APR" "$LINENO" 5
4062         ;;
4063         0)
4064           apr_temp_apr_config_file="apr-config"
4065         ;;
4066         *)
4067           apr_temp_apr_config_file="apr-$apr_bundled_major-config"
4068         ;;
4069       esac
4070       if test -n ""; then
4071         apr_config="/$apr_temp_apr_config_file"
4072       else
4073         apr_config="/$apr_temp_apr_config_file"
4074       fi
4075     fi
4076
4077 fi
4078
4079
4080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5
4081 $as_echo "$apr_found" >&6; }
4082
4083   if test "$apr_found" = "no"; then
4084     as_fn_error $? "APR could not be located. Please use the --with-apr option." "$LINENO" 5
4085   fi
4086
4087   APR_BUILD_DIR="`$apr_config --installbuilddir`"
4088
4089       APR_BUILD_DIR="`cd $APR_BUILD_DIR && pwd`"
4090
4091   APR_INCLUDES="`$apr_config --includes`"
4092   APR_LIBS="`$apr_config --link-libtool --libs`"
4093   APR_SO_EXT="`$apr_config --apr-so-ext`"
4094   APR_LIB_TARGET="`$apr_config --apr-lib-target`"
4095
4096
4097
4098
4099
4100
4101
4102   if test -z "$CC"; then
4103     test "x$silent" != "xyes" && echo "  setting CC to \"`$apr_config --cc`\""
4104     CC="`$apr_config --cc`"
4105   fi
4106
4107
4108   if test -z "$CPP"; then
4109     test "x$silent" != "xyes" && echo "  setting CPP to \"`$apr_config --cpp`\""
4110     CPP="`$apr_config --cpp`"
4111   fi
4112
4113
4114   if test "x$CFLAGS" = "x"; then
4115     test "x$silent" != "xyes" && echo "  setting CFLAGS to \"`$apr_config --cflags`\""
4116     CFLAGS="`$apr_config --cflags`"
4117   else
4118     apr_addto_bugger="`$apr_config --cflags`"
4119     for i in $apr_addto_bugger; do
4120       apr_addto_duplicate="0"
4121       for j in $CFLAGS; do
4122         if test "x$i" = "x$j"; then
4123           apr_addto_duplicate="1"
4124           break
4125         fi
4126       done
4127       if test $apr_addto_duplicate = "0"; then
4128         test "x$silent" != "xyes" && echo "  adding \"$i\" to CFLAGS"
4129         CFLAGS="$CFLAGS $i"
4130       fi
4131     done
4132   fi
4133
4134
4135   if test "x$CPPFLAGS" = "x"; then
4136     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"`$apr_config --cppflags`\""
4137     CPPFLAGS="`$apr_config --cppflags`"
4138   else
4139     apr_addto_bugger="`$apr_config --cppflags`"
4140     for i in $apr_addto_bugger; do
4141       apr_addto_duplicate="0"
4142       for j in $CPPFLAGS; do
4143         if test "x$i" = "x$j"; then
4144           apr_addto_duplicate="1"
4145           break
4146         fi
4147       done
4148       if test $apr_addto_duplicate = "0"; then
4149         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
4150         CPPFLAGS="$CPPFLAGS $i"
4151       fi
4152     done
4153   fi
4154
4155 apr_shlibpath_var=`$apr_config --shlib-path-var`
4156
4157
4158
4159 # Check whether --with-apr-iconv was given.
4160 if test "${with_apr_iconv+set}" = set; then :
4161   withval=$with_apr_iconv;  apu_apriconv_dir="$withval"
4162     if test "$apu_apriconv_dir" != "no"; then
4163       if test -d "$apu_apriconv_dir"; then
4164
4165   # save our work to this point; this allows the sub-package to use it
4166   cat >confcache <<\_ACEOF
4167 # This file is a shell script that caches the results of configure
4168 # tests run on this system so they can be shared between configure
4169 # scripts and configure runs, see configure's option --config-cache.
4170 # It is not useful on other systems.  If it contains results you don't
4171 # want to keep, you may remove or edit it.
4172 #
4173 # config.status only pays attention to the cache file if you give it
4174 # the --recheck option to rerun configure.
4175 #
4176 # `ac_cv_env_foo' variables (set or unset) will be overridden when
4177 # loading this file, other *unset* `ac_cv_foo' will be assigned the
4178 # following values.
4179
4180 _ACEOF
4181
4182 # The following way of writing the cache mishandles newlines in values,
4183 # but we know of no workaround that is simple, portable, and efficient.
4184 # So, we kill variables containing newlines.
4185 # Ultrix sh set writes to stderr and can't be redirected directly,
4186 # and sets the high bit in the cache file unless we assign to the vars.
4187 (
4188   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4189     eval ac_val=\$$ac_var
4190     case $ac_val in #(
4191     *${as_nl}*)
4192       case $ac_var in #(
4193       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
4194 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4195       esac
4196       case $ac_var in #(
4197       _ | IFS | as_nl) ;; #(
4198       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4199       *) { eval $ac_var=; unset $ac_var;} ;;
4200       esac ;;
4201     esac
4202   done
4203
4204   (set) 2>&1 |
4205     case $as_nl`(ac_space=' '; set) 2>&1` in #(
4206     *${as_nl}ac_space=\ *)
4207       # `set' does not quote correctly, so add quotes: double-quote
4208       # substitution turns \\\\ into \\, and sed turns \\ into \.
4209       sed -n \
4210         "s/'/'\\\\''/g;
4211           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4212       ;; #(
4213     *)
4214       # `set' quotes correctly as required by POSIX, so do not add quotes.
4215       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4216       ;;
4217     esac |
4218     sort
4219 ) |
4220   sed '
4221      /^ac_cv_env_/b end
4222      t clear
4223      :clear
4224      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4225      t end
4226      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4227      :end' >>confcache
4228 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
4229   if test -w "$cache_file"; then
4230     if test "x$cache_file" != "x/dev/null"; then
4231       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
4232 $as_echo "$as_me: updating cache $cache_file" >&6;}
4233       if test ! -f "$cache_file" || test -h "$cache_file"; then
4234         cat confcache >"$cache_file"
4235       else
4236         case $cache_file in #(
4237         */* | ?:*)
4238           mv -f confcache "$cache_file"$$ &&
4239           mv -f "$cache_file"$$ "$cache_file" ;; #(
4240         *)
4241           mv -f confcache "$cache_file" ;;
4242         esac
4243       fi
4244     fi
4245   else
4246     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
4247 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
4248   fi
4249 fi
4250 rm -f confcache
4251
4252   echo "configuring package in "$apu_apriconv_dir" now"
4253   ac_popdir=`pwd`
4254   apr_config_subdirs=""$apu_apriconv_dir""
4255   test -d "$apu_apriconv_dir" || $mkdir_p "$apu_apriconv_dir"
4256   ac_abs_srcdir=`(cd $srcdir/"$apu_apriconv_dir" && pwd)`
4257   cd "$apu_apriconv_dir"
4258
4259       # A "../" for each directory in /$config_subdirs.
4260       ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4261
4262   # Make the cache file pathname absolute for the subdirs
4263   # required to correctly handle subdirs that might actually
4264   # be symlinks
4265   case "$cache_file" in
4266   /*) # already absolute
4267     ac_sub_cache_file=$cache_file ;;
4268   *)  # Was relative path.
4269     ac_sub_cache_file="$ac_popdir/$cache_file" ;;
4270   esac
4271
4272
4273   apr_configure_args=
4274   apr_sep=
4275   for apr_configure_arg in $ac_configure_args
4276   do
4277     case "$apr_configure_arg" in
4278       --enable-layout=*|\'--enable-layout=*)
4279         continue ;;
4280     esac
4281     apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
4282     apr_sep=" "
4283   done
4284
4285
4286     test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
4287
4288     apr_configure_args="--disable-option-checking $apr_configure_args"
4289
4290               if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $apache_apr_flags \
4291                              --prefix=$prefix \
4292                              --exec-prefix=$exec_prefix \
4293                              --libdir=$libdir \
4294                              --includedir=$includedir \
4295                              --bindir=$bindir \
4296                              --datadir=$datadir \
4297                              --with-installbuilddir=$installbuilddir
4298   then :
4299     echo ""$apu_apriconv_dir" configured properly"
4300   else
4301     echo "configure failed for "$apu_apriconv_dir""
4302     exit 1
4303   fi
4304
4305   cd $ac_popdir
4306
4307   # grab any updates from the sub-package
4308   if test -r "$cache_file"; then
4309   # Some versions of bash will fail to source /dev/null (special files
4310   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
4311   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
4312     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
4313 $as_echo "$as_me: loading cache $cache_file" >&6;}
4314     case $cache_file in
4315       [\\/]* | ?:[\\/]* ) . "$cache_file";;
4316       *)                      . "./$cache_file";;
4317     esac
4318   fi
4319 else
4320   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
4321 $as_echo "$as_me: creating cache $cache_file" >&6;}
4322   >$cache_file
4323 fi
4324
4325
4326         APRUTIL_EXPORT_LIBS="$abs_srcdir/$apu_apriconv_dir/lib/libapriconv.la \
4327                              $APRUTIL_EXPORT_LIBS"
4328         APRUTIL_INCLUDES="-I$abs_srcdir/$apu_apriconv_dir/include \
4329                           $APRUTIL_INCLUDES"
4330         APR_ICONV_DIR="$apu_apriconv_dir"
4331       else
4332        APR_ICONV_DIR=""
4333       fi
4334     else
4335       APR_ICONV_DIR=""
4336     fi
4337
4338 fi
4339
4340
4341
4342 ac_ext=c
4343 ac_cpp='$CPP $CPPFLAGS'
4344 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4345 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4348 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4349 # On Suns, sometimes $CPP names a directory.
4350 if test -n "$CPP" && test -d "$CPP"; then
4351   CPP=
4352 fi
4353 if test -z "$CPP"; then
4354   if ${ac_cv_prog_CPP+:} false; then :
4355   $as_echo_n "(cached) " >&6
4356 else
4357       # Double quotes because CPP needs to be expanded
4358     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4359     do
4360       ac_preproc_ok=false
4361 for ac_c_preproc_warn_flag in '' yes
4362 do
4363   # Use a header file that comes with gcc, so configuring glibc
4364   # with a fresh cross-compiler works.
4365   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4366   # <limits.h> exists even on freestanding compilers.
4367   # On the NeXT, cc -E runs the code through the compiler's parser,
4368   # not just through cpp. "Syntax error" is here to catch this case.
4369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370 /* end confdefs.h.  */
4371 #ifdef __STDC__
4372 # include <limits.h>
4373 #else
4374 # include <assert.h>
4375 #endif
4376                      Syntax error
4377 _ACEOF
4378 if ac_fn_c_try_cpp "$LINENO"; then :
4379
4380 else
4381   # Broken: fails on valid input.
4382 continue
4383 fi
4384 rm -f conftest.err conftest.i conftest.$ac_ext
4385
4386   # OK, works on sane cases.  Now check whether nonexistent headers
4387   # can be detected and how.
4388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4389 /* end confdefs.h.  */
4390 #include <ac_nonexistent.h>
4391 _ACEOF
4392 if ac_fn_c_try_cpp "$LINENO"; then :
4393   # Broken: success on invalid input.
4394 continue
4395 else
4396   # Passes both tests.
4397 ac_preproc_ok=:
4398 break
4399 fi
4400 rm -f conftest.err conftest.i conftest.$ac_ext
4401
4402 done
4403 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4404 rm -f conftest.i conftest.err conftest.$ac_ext
4405 if $ac_preproc_ok; then :
4406   break
4407 fi
4408
4409     done
4410     ac_cv_prog_CPP=$CPP
4411
4412 fi
4413   CPP=$ac_cv_prog_CPP
4414 else
4415   ac_cv_prog_CPP=$CPP
4416 fi
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4418 $as_echo "$CPP" >&6; }
4419 ac_preproc_ok=false
4420 for ac_c_preproc_warn_flag in '' yes
4421 do
4422   # Use a header file that comes with gcc, so configuring glibc
4423   # with a fresh cross-compiler works.
4424   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4425   # <limits.h> exists even on freestanding compilers.
4426   # On the NeXT, cc -E runs the code through the compiler's parser,
4427   # not just through cpp. "Syntax error" is here to catch this case.
4428   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429 /* end confdefs.h.  */
4430 #ifdef __STDC__
4431 # include <limits.h>
4432 #else
4433 # include <assert.h>
4434 #endif
4435                      Syntax error
4436 _ACEOF
4437 if ac_fn_c_try_cpp "$LINENO"; then :
4438
4439 else
4440   # Broken: fails on valid input.
4441 continue
4442 fi
4443 rm -f conftest.err conftest.i conftest.$ac_ext
4444
4445   # OK, works on sane cases.  Now check whether nonexistent headers
4446   # can be detected and how.
4447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448 /* end confdefs.h.  */
4449 #include <ac_nonexistent.h>
4450 _ACEOF
4451 if ac_fn_c_try_cpp "$LINENO"; then :
4452   # Broken: success on invalid input.
4453 continue
4454 else
4455   # Passes both tests.
4456 ac_preproc_ok=:
4457 break
4458 fi
4459 rm -f conftest.err conftest.i conftest.$ac_ext
4460
4461 done
4462 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4463 rm -f conftest.i conftest.err conftest.$ac_ext
4464 if $ac_preproc_ok; then :
4465
4466 else
4467   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4468 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4469 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4470 See \`config.log' for more details" "$LINENO" 5; }
4471 fi
4472
4473 ac_ext=c
4474 ac_cpp='$CPP $CPPFLAGS'
4475 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4476 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4477 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4478
4479
4480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4481 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4482 if ${ac_cv_path_GREP+:} false; then :
4483   $as_echo_n "(cached) " >&6
4484 else
4485   if test -z "$GREP"; then
4486   ac_path_GREP_found=false
4487   # Loop through the user's path and test for each of PROGNAME-LIST
4488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4490 do
4491   IFS=$as_save_IFS
4492   test -z "$as_dir" && as_dir=.
4493     for ac_prog in grep ggrep; do
4494     for ac_exec_ext in '' $ac_executable_extensions; do
4495       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4496       as_fn_executable_p "$ac_path_GREP" || continue
4497 # Check for GNU ac_path_GREP and select it if it is found.
4498   # Check for GNU $ac_path_GREP
4499 case `"$ac_path_GREP" --version 2>&1` in
4500 *GNU*)
4501   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4502 *)
4503   ac_count=0
4504   $as_echo_n 0123456789 >"conftest.in"
4505   while :
4506   do
4507     cat "conftest.in" "conftest.in" >"conftest.tmp"
4508     mv "conftest.tmp" "conftest.in"
4509     cp "conftest.in" "conftest.nl"
4510     $as_echo 'GREP' >> "conftest.nl"
4511     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4512     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4513     as_fn_arith $ac_count + 1 && ac_count=$as_val
4514     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4515       # Best one so far, save it but keep looking for a better one
4516       ac_cv_path_GREP="$ac_path_GREP"
4517       ac_path_GREP_max=$ac_count
4518     fi
4519     # 10*(2^10) chars as input seems more than enough
4520     test $ac_count -gt 10 && break
4521   done
4522   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4523 esac
4524
4525       $ac_path_GREP_found && break 3
4526     done
4527   done
4528   done
4529 IFS=$as_save_IFS
4530   if test -z "$ac_cv_path_GREP"; then
4531     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4532   fi
4533 else
4534   ac_cv_path_GREP=$GREP
4535 fi
4536
4537 fi
4538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4539 $as_echo "$ac_cv_path_GREP" >&6; }
4540  GREP="$ac_cv_path_GREP"
4541
4542
4543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4544 $as_echo_n "checking for egrep... " >&6; }
4545 if ${ac_cv_path_EGREP+:} false; then :
4546   $as_echo_n "(cached) " >&6
4547 else
4548   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4549    then ac_cv_path_EGREP="$GREP -E"
4550    else
4551      if test -z "$EGREP"; then
4552   ac_path_EGREP_found=false
4553   # Loop through the user's path and test for each of PROGNAME-LIST
4554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4556 do
4557   IFS=$as_save_IFS
4558   test -z "$as_dir" && as_dir=.
4559     for ac_prog in egrep; do
4560     for ac_exec_ext in '' $ac_executable_extensions; do
4561       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4562       as_fn_executable_p "$ac_path_EGREP" || continue
4563 # Check for GNU ac_path_EGREP and select it if it is found.
4564   # Check for GNU $ac_path_EGREP
4565 case `"$ac_path_EGREP" --version 2>&1` in
4566 *GNU*)
4567   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4568 *)
4569   ac_count=0
4570   $as_echo_n 0123456789 >"conftest.in"
4571   while :
4572   do
4573     cat "conftest.in" "conftest.in" >"conftest.tmp"
4574     mv "conftest.tmp" "conftest.in"
4575     cp "conftest.in" "conftest.nl"
4576     $as_echo 'EGREP' >> "conftest.nl"
4577     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4578     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4579     as_fn_arith $ac_count + 1 && ac_count=$as_val
4580     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4581       # Best one so far, save it but keep looking for a better one
4582       ac_cv_path_EGREP="$ac_path_EGREP"
4583       ac_path_EGREP_max=$ac_count
4584     fi
4585     # 10*(2^10) chars as input seems more than enough
4586     test $ac_count -gt 10 && break
4587   done
4588   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4589 esac
4590
4591       $ac_path_EGREP_found && break 3
4592     done
4593   done
4594   done
4595 IFS=$as_save_IFS
4596   if test -z "$ac_cv_path_EGREP"; then
4597     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4598   fi
4599 else
4600   ac_cv_path_EGREP=$EGREP
4601 fi
4602
4603    fi
4604 fi
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4606 $as_echo "$ac_cv_path_EGREP" >&6; }
4607  EGREP="$ac_cv_path_EGREP"
4608
4609
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4611 $as_echo_n "checking for ANSI C header files... " >&6; }
4612 if ${ac_cv_header_stdc+:} false; then :
4613   $as_echo_n "(cached) " >&6
4614 else
4615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616 /* end confdefs.h.  */
4617 #include <stdlib.h>
4618 #include <stdarg.h>
4619 #include <string.h>
4620 #include <float.h>
4621
4622 int
4623 main ()
4624 {
4625
4626   ;
4627   return 0;
4628 }
4629 _ACEOF
4630 if ac_fn_c_try_compile "$LINENO"; then :
4631   ac_cv_header_stdc=yes
4632 else
4633   ac_cv_header_stdc=no
4634 fi
4635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4636
4637 if test $ac_cv_header_stdc = yes; then
4638   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4640 /* end confdefs.h.  */
4641 #include <string.h>
4642
4643 _ACEOF
4644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4645   $EGREP "memchr" >/dev/null 2>&1; then :
4646
4647 else
4648   ac_cv_header_stdc=no
4649 fi
4650 rm -f conftest*
4651
4652 fi
4653
4654 if test $ac_cv_header_stdc = yes; then
4655   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4657 /* end confdefs.h.  */
4658 #include <stdlib.h>
4659
4660 _ACEOF
4661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4662   $EGREP "free" >/dev/null 2>&1; then :
4663
4664 else
4665   ac_cv_header_stdc=no
4666 fi
4667 rm -f conftest*
4668
4669 fi
4670
4671 if test $ac_cv_header_stdc = yes; then
4672   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4673   if test "$cross_compiling" = yes; then :
4674   :
4675 else
4676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4677 /* end confdefs.h.  */
4678 #include <ctype.h>
4679 #include <stdlib.h>
4680 #if ((' ' & 0x0FF) == 0x020)
4681 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4682 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4683 #else
4684 # define ISLOWER(c) \
4685                    (('a' <= (c) && (c) <= 'i') \
4686                      || ('j' <= (c) && (c) <= 'r') \
4687                      || ('s' <= (c) && (c) <= 'z'))
4688 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4689 #endif
4690
4691 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4692 int
4693 main ()
4694 {
4695   int i;
4696   for (i = 0; i < 256; i++)
4697     if (XOR (islower (i), ISLOWER (i))
4698         || toupper (i) != TOUPPER (i))
4699       return 2;
4700   return 0;
4701 }
4702 _ACEOF
4703 if ac_fn_c_try_run "$LINENO"; then :
4704
4705 else
4706   ac_cv_header_stdc=no
4707 fi
4708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4709   conftest.$ac_objext conftest.beam conftest.$ac_ext
4710 fi
4711
4712 fi
4713 fi
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4715 $as_echo "$ac_cv_header_stdc" >&6; }
4716 if test $ac_cv_header_stdc = yes; then
4717
4718 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4719
4720 fi
4721
4722 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4723 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4724                   inttypes.h stdint.h unistd.h
4725 do :
4726   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4727 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4728 "
4729 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4730   cat >>confdefs.h <<_ACEOF
4731 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4732 _ACEOF
4733
4734 fi
4735
4736 done
4737
4738
4739
4740   apu_have_crypto=0
4741   apu_have_openssl=0
4742   apu_have_nss=0
4743   apu_have_commoncrypto=0
4744
4745   old_libs="$LIBS"
4746   old_cppflags="$CPPFLAGS"
4747   old_ldflags="$LDFLAGS"
4748
4749
4750 # Check whether --with-crypto was given.
4751 if test "${with_crypto+set}" = set; then :
4752   withval=$with_crypto;
4753     cryptolibs="openssl nss commoncrypto"
4754
4755     if test "$withval" = "yes"; then
4756
4757       crypto_library_enabled=0
4758       for cryptolib in $cryptolibs; do
4759         eval v=\$with_$cryptolib
4760         if test "$v" != "" -a "$v" != "no"; then
4761           crypto_library_enabled=1
4762         fi
4763       done
4764
4765       if test "$crypto_library_enabled" = "0"; then
4766         for cryptolib in $cryptolibs; do
4767           eval v=\$with_$cryptolib
4768           if test "$v" != "no"; then
4769             eval with_$cryptolib=yes
4770             crypto_library_enabled=1
4771           fi
4772         done
4773         if test "$crypto_library_enabled" = "1"; then
4774           { $as_echo "$as_me:${as_lineno-$LINENO}: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&5
4775 $as_echo "$as_me: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&6;}
4776         else
4777           as_fn_error $? "Crypto was requested but all possible crypto libraries were disabled." "$LINENO" 5
4778         fi
4779       fi
4780
4781
4782   openssl_have_headers=0
4783   openssl_have_libs=0
4784
4785   old_libs="$LIBS"
4786   old_cppflags="$CPPFLAGS"
4787   old_ldflags="$LDFLAGS"
4788
4789
4790 # Check whether --with-openssl was given.
4791 if test "${with_openssl+set}" = set; then :
4792   withval=$with_openssl;
4793     if test "$withval" = "yes"; then
4794       for ac_header in openssl/x509.h
4795 do :
4796   ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
4797 if test "x$ac_cv_header_openssl_x509_h" = xyes; then :
4798   cat >>confdefs.h <<_ACEOF
4799 #define HAVE_OPENSSL_X509_H 1
4800 _ACEOF
4801  openssl_have_headers=1
4802 fi
4803
4804 done
4805
4806       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto" >&5
4807 $as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto... " >&6; }
4808 if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_new+:} false; then :
4809   $as_echo_n "(cached) " >&6
4810 else
4811   ac_check_lib_save_LIBS=$LIBS
4812 LIBS="-lcrypto  $LIBS"
4813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814 /* end confdefs.h.  */
4815
4816 /* Override any GCC internal prototype to avoid an error.
4817    Use char because int might match the return type of a GCC
4818    builtin and then its argument prototype would still apply.  */
4819 #ifdef __cplusplus
4820 extern "C"
4821 #endif
4822 char EVP_CIPHER_CTX_new ();
4823 int
4824 main ()
4825 {
4826 return EVP_CIPHER_CTX_new ();
4827   ;
4828   return 0;
4829 }
4830 _ACEOF
4831 if ac_fn_c_try_link "$LINENO"; then :
4832   ac_cv_lib_crypto_EVP_CIPHER_CTX_new=yes
4833 else
4834   ac_cv_lib_crypto_EVP_CIPHER_CTX_new=no
4835 fi
4836 rm -f core conftest.err conftest.$ac_objext \
4837     conftest$ac_exeext conftest.$ac_ext
4838 LIBS=$ac_check_lib_save_LIBS
4839 fi
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&5
4841 $as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&6; }
4842 if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" = xyes; then :
4843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
4844 $as_echo_n "checking for SSL_accept in -lssl... " >&6; }
4845 if ${ac_cv_lib_ssl_SSL_accept+:} false; then :
4846   $as_echo_n "(cached) " >&6
4847 else
4848   ac_check_lib_save_LIBS=$LIBS
4849 LIBS="-lssl -lcrypto $LIBS"
4850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4851 /* end confdefs.h.  */
4852
4853 /* Override any GCC internal prototype to avoid an error.
4854    Use char because int might match the return type of a GCC
4855    builtin and then its argument prototype would still apply.  */
4856 #ifdef __cplusplus
4857 extern "C"
4858 #endif
4859 char SSL_accept ();
4860 int
4861 main ()
4862 {
4863 return SSL_accept ();
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 if ac_fn_c_try_link "$LINENO"; then :
4869   ac_cv_lib_ssl_SSL_accept=yes
4870 else
4871   ac_cv_lib_ssl_SSL_accept=no
4872 fi
4873 rm -f core conftest.err conftest.$ac_objext \
4874     conftest$ac_exeext conftest.$ac_ext
4875 LIBS=$ac_check_lib_save_LIBS
4876 fi
4877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
4878 $as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
4879 if test "x$ac_cv_lib_ssl_SSL_accept" = xyes; then :
4880   openssl_have_libs=1
4881 fi
4882
4883 fi
4884
4885       if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
4886         apu_have_openssl=1
4887       fi
4888     elif test "$withval" = "no"; then
4889       apu_have_openssl=0
4890     else
4891
4892       openssl_CPPFLAGS="-I$withval/include"
4893       openssl_LDFLAGS="-L$withval/lib "
4894
4895
4896   if test "x$CPPFLAGS" = "x"; then
4897     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$openssl_CPPFLAGS\""
4898     CPPFLAGS="$openssl_CPPFLAGS"
4899   else
4900     apr_addto_bugger="$openssl_CPPFLAGS"
4901     for i in $apr_addto_bugger; do
4902       apr_addto_duplicate="0"
4903       for j in $CPPFLAGS; do
4904         if test "x$i" = "x$j"; then
4905           apr_addto_duplicate="1"
4906           break
4907         fi
4908       done
4909       if test $apr_addto_duplicate = "0"; then
4910         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
4911         CPPFLAGS="$CPPFLAGS $i"
4912       fi
4913     done
4914   fi
4915
4916
4917   if test "x$LDFLAGS" = "x"; then
4918     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$openssl_LDFLAGS\""
4919     LDFLAGS="$openssl_LDFLAGS"
4920   else
4921     apr_addto_bugger="$openssl_LDFLAGS"
4922     for i in $apr_addto_bugger; do
4923       apr_addto_duplicate="0"
4924       for j in $LDFLAGS; do
4925         if test "x$i" = "x$j"; then
4926           apr_addto_duplicate="1"
4927           break
4928         fi
4929       done
4930       if test $apr_addto_duplicate = "0"; then
4931         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
4932         LDFLAGS="$LDFLAGS $i"
4933       fi
4934     done
4935   fi
4936
4937
4938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in $withval" >&5
4939 $as_echo "$as_me: checking for openssl in $withval" >&6;}
4940       for ac_header in openssl/x509.h
4941 do :
4942   ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
4943 if test "x$ac_cv_header_openssl_x509_h" = xyes; then :
4944   cat >>confdefs.h <<_ACEOF
4945 #define HAVE_OPENSSL_X509_H 1
4946 _ACEOF
4947  openssl_have_headers=1
4948 fi
4949
4950 done
4951
4952       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto" >&5
4953 $as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto... " >&6; }
4954 if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_new+:} false; then :
4955   $as_echo_n "(cached) " >&6
4956 else
4957   ac_check_lib_save_LIBS=$LIBS
4958 LIBS="-lcrypto  $LIBS"
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960 /* end confdefs.h.  */
4961
4962 /* Override any GCC internal prototype to avoid an error.
4963    Use char because int might match the return type of a GCC
4964    builtin and then its argument prototype would still apply.  */
4965 #ifdef __cplusplus
4966 extern "C"
4967 #endif
4968 char EVP_CIPHER_CTX_new ();
4969 int
4970 main ()
4971 {
4972 return EVP_CIPHER_CTX_new ();
4973   ;
4974   return 0;
4975 }
4976 _ACEOF
4977 if ac_fn_c_try_link "$LINENO"; then :
4978   ac_cv_lib_crypto_EVP_CIPHER_CTX_new=yes
4979 else
4980   ac_cv_lib_crypto_EVP_CIPHER_CTX_new=no
4981 fi
4982 rm -f core conftest.err conftest.$ac_objext \
4983     conftest$ac_exeext conftest.$ac_ext
4984 LIBS=$ac_check_lib_save_LIBS
4985 fi
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&5
4987 $as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" >&6; }
4988 if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" = xyes; then :
4989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
4990 $as_echo_n "checking for SSL_accept in -lssl... " >&6; }
4991 if ${ac_cv_lib_ssl_SSL_accept+:} false; then :
4992   $as_echo_n "(cached) " >&6
4993 else
4994   ac_check_lib_save_LIBS=$LIBS
4995 LIBS="-lssl -lcrypto $LIBS"
4996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4997 /* end confdefs.h.  */
4998
4999 /* Override any GCC internal prototype to avoid an error.
5000    Use char because int might match the return type of a GCC
5001    builtin and then its argument prototype would still apply.  */
5002 #ifdef __cplusplus
5003 extern "C"
5004 #endif
5005 char SSL_accept ();
5006 int
5007 main ()
5008 {
5009 return SSL_accept ();
5010   ;
5011   return 0;
5012 }
5013 _ACEOF
5014 if ac_fn_c_try_link "$LINENO"; then :
5015   ac_cv_lib_ssl_SSL_accept=yes
5016 else
5017   ac_cv_lib_ssl_SSL_accept=no
5018 fi
5019 rm -f core conftest.err conftest.$ac_objext \
5020     conftest$ac_exeext conftest.$ac_ext
5021 LIBS=$ac_check_lib_save_LIBS
5022 fi
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
5024 $as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
5025 if test "x$ac_cv_lib_ssl_SSL_accept" = xyes; then :
5026   openssl_have_libs=1
5027 fi
5028
5029 fi
5030
5031       if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
5032         apu_have_openssl=1
5033
5034   if test "x$APRUTIL_LDFLAGS" = "x"; then
5035     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
5036     APRUTIL_LDFLAGS="-L$withval/lib"
5037   else
5038     apr_addto_bugger="-L$withval/lib"
5039     for i in $apr_addto_bugger; do
5040       apr_addto_duplicate="0"
5041       for j in $APRUTIL_LDFLAGS; do
5042         if test "x$i" = "x$j"; then
5043           apr_addto_duplicate="1"
5044           break
5045         fi
5046       done
5047       if test $apr_addto_duplicate = "0"; then
5048         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5049         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5050       fi
5051     done
5052   fi
5053
5054
5055   if test "x$APRUTIL_INCLUDES" = "x"; then
5056     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
5057     APRUTIL_INCLUDES="-I$withval/include"
5058   else
5059     apr_addto_bugger="-I$withval/include"
5060     for i in $apr_addto_bugger; do
5061       apr_addto_duplicate="0"
5062       for j in $APRUTIL_INCLUDES; do
5063         if test "x$i" = "x$j"; then
5064           apr_addto_duplicate="1"
5065           break
5066         fi
5067       done
5068       if test $apr_addto_duplicate = "0"; then
5069         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5070         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5071       fi
5072     done
5073   fi
5074
5075       fi
5076
5077       ac_fn_c_check_decl "$LINENO" "EVP_PKEY_CTX_new" "ac_cv_have_decl_EVP_PKEY_CTX_new" "#include <openssl/evp.h>
5078 "
5079 if test "x$ac_cv_have_decl_EVP_PKEY_CTX_new" = xyes; then :
5080   ac_have_decl=1
5081 else
5082   ac_have_decl=0
5083 fi
5084
5085 cat >>confdefs.h <<_ACEOF
5086 #define HAVE_DECL_EVP_PKEY_CTX_NEW $ac_have_decl
5087 _ACEOF
5088
5089
5090     fi
5091
5092 else
5093
5094     apu_have_openssl=0
5095
5096 fi
5097
5098
5099
5100
5101       if test "$apu_have_openssl" = "1"; then
5102
5103   if test "x$LDADD_crypto_openssl" = "x"; then
5104     test "x$silent" != "xyes" && echo "  setting LDADD_crypto_openssl to \"$openssl_LDFLAGS -lssl -lcrypto\""
5105     LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto"
5106   else
5107     apr_addto_bugger="$openssl_LDFLAGS -lssl -lcrypto"
5108     for i in $apr_addto_bugger; do
5109       apr_addto_duplicate="0"
5110       for j in $LDADD_crypto_openssl; do
5111         if test "x$i" = "x$j"; then
5112           apr_addto_duplicate="1"
5113           break
5114         fi
5115       done
5116       if test $apr_addto_duplicate = "0"; then
5117         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_crypto_openssl"
5118         LDADD_crypto_openssl="$LDADD_crypto_openssl $i"
5119       fi
5120     done
5121   fi
5122
5123     apu_have_crypto=1
5124
5125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5
5126 $as_echo_n "checking for const input buffers in OpenSSL... " >&6; }
5127     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5128 /* end confdefs.h.  */
5129 #include <openssl/rsa.h>
5130 int
5131 main ()
5132 {
5133  const unsigned char * buf;
5134           unsigned char * outbuf;
5135           RSA rsa;
5136
5137                 RSA_private_decrypt(1,
5138                                                         buf,
5139                                                         outbuf,
5140                                                         &rsa,
5141                                                         RSA_PKCS1_PADDING);
5142
5143
5144   ;
5145   return 0;
5146 }
5147 _ACEOF
5148 if ac_fn_c_try_compile "$LINENO"; then :
5149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5150 $as_echo "yes" >&6; }
5151
5152 $as_echo "#define CRYPTO_OPENSSL_CONST_BUFFERS 1" >>confdefs.h
5153
5154 else
5155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156 $as_echo "no" >&6; }
5157 fi
5158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5159
5160   fi
5161
5162
5163
5164   LIBS="$old_libs"
5165   CPPFLAGS="$old_cppflags"
5166   LDFLAGS="$old_ldflags"
5167
5168
5169   nss_have_libs=0
5170
5171   old_libs="$LIBS"
5172   old_cppflags="$CPPFLAGS"
5173   old_ldflags="$LDFLAGS"
5174
5175
5176 # Check whether --with-nss was given.
5177 if test "${with_nss+set}" = set; then :
5178   withval=$with_nss;
5179     if test "$withval" = "yes"; then
5180       if test -n "$ac_tool_prefix"; then
5181   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5182 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184 $as_echo_n "checking for $ac_word... " >&6; }
5185 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5186   $as_echo_n "(cached) " >&6
5187 else
5188   case $PKG_CONFIG in
5189   [\\/]* | ?:[\\/]*)
5190   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5191   ;;
5192   *)
5193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5194 for as_dir in $PATH
5195 do
5196   IFS=$as_save_IFS
5197   test -z "$as_dir" && as_dir=.
5198     for ac_exec_ext in '' $ac_executable_extensions; do
5199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5200     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5202     break 2
5203   fi
5204 done
5205   done
5206 IFS=$as_save_IFS
5207
5208   ;;
5209 esac
5210 fi
5211 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5212 if test -n "$PKG_CONFIG"; then
5213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5214 $as_echo "$PKG_CONFIG" >&6; }
5215 else
5216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217 $as_echo "no" >&6; }
5218 fi
5219
5220
5221 fi
5222 if test -z "$ac_cv_path_PKG_CONFIG"; then
5223   ac_pt_PKG_CONFIG=$PKG_CONFIG
5224   # Extract the first word of "pkg-config", so it can be a program name with args.
5225 set dummy pkg-config; ac_word=$2
5226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227 $as_echo_n "checking for $ac_word... " >&6; }
5228 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5229   $as_echo_n "(cached) " >&6
5230 else
5231   case $ac_pt_PKG_CONFIG in
5232   [\\/]* | ?:[\\/]*)
5233   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5234   ;;
5235   *)
5236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237 for as_dir in $PATH
5238 do
5239   IFS=$as_save_IFS
5240   test -z "$as_dir" && as_dir=.
5241     for ac_exec_ext in '' $ac_executable_extensions; do
5242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245     break 2
5246   fi
5247 done
5248   done
5249 IFS=$as_save_IFS
5250
5251   ;;
5252 esac
5253 fi
5254 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5255 if test -n "$ac_pt_PKG_CONFIG"; then
5256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5257 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5258 else
5259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260 $as_echo "no" >&6; }
5261 fi
5262
5263   if test "x$ac_pt_PKG_CONFIG" = x; then
5264     PKG_CONFIG=""
5265   else
5266     case $cross_compiling:$ac_tool_warned in
5267 yes:)
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5269 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5270 ac_tool_warned=yes ;;
5271 esac
5272     PKG_CONFIG=$ac_pt_PKG_CONFIG
5273   fi
5274 else
5275   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5276 fi
5277
5278       if test -n "$PKG_CONFIG"; then
5279         nss_CPPFLAGS=`$PKG_CONFIG --cflags-only-I nss`
5280         nss_LDFLAGS=`$PKG_CONFIG --libs nss`
5281
5282   if test "x$CPPFLAGS" = "x"; then
5283     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
5284     CPPFLAGS="$nss_CPPFLAGS"
5285   else
5286     apr_addto_bugger="$nss_CPPFLAGS"
5287     for i in $apr_addto_bugger; do
5288       apr_addto_duplicate="0"
5289       for j in $CPPFLAGS; do
5290         if test "x$i" = "x$j"; then
5291           apr_addto_duplicate="1"
5292           break
5293         fi
5294       done
5295       if test $apr_addto_duplicate = "0"; then
5296         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5297         CPPFLAGS="$CPPFLAGS $i"
5298       fi
5299     done
5300   fi
5301
5302
5303   if test "x$LDFLAGS" = "x"; then
5304     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
5305     LDFLAGS="$nss_LDFLAGS"
5306   else
5307     apr_addto_bugger="$nss_LDFLAGS"
5308     for i in $apr_addto_bugger; do
5309       apr_addto_duplicate="0"
5310       for j in $LDFLAGS; do
5311         if test "x$i" = "x$j"; then
5312           apr_addto_duplicate="1"
5313           break
5314         fi
5315       done
5316       if test $apr_addto_duplicate = "0"; then
5317         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5318         LDFLAGS="$LDFLAGS $i"
5319       fi
5320     done
5321   fi
5322
5323       fi
5324       nss_have_prerrorh=0
5325       nss_have_nssh=0
5326       nss_have_pk11pubh=0
5327       for ac_header in prerror.h
5328 do :
5329   ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default"
5330 if test "x$ac_cv_header_prerror_h" = xyes; then :
5331   cat >>confdefs.h <<_ACEOF
5332 #define HAVE_PRERROR_H 1
5333 _ACEOF
5334  nss_have_prerrorh=1
5335 fi
5336
5337 done
5338
5339       for ac_header in nss/nss.h nss.h
5340 do :
5341   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5342 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5343 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5344   cat >>confdefs.h <<_ACEOF
5345 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5346 _ACEOF
5347  nss_have_nssh=1
5348 fi
5349
5350 done
5351
5352       for ac_header in nss/pk11pub.h pk11pub.h
5353 do :
5354   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5355 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5356 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5357   cat >>confdefs.h <<_ACEOF
5358 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5359 _ACEOF
5360  nss_have_pk11pubh=1
5361 fi
5362
5363 done
5364
5365       nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
5366       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
5367 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
5368 if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then :
5369   $as_echo_n "(cached) " >&6
5370 else
5371   ac_check_lib_save_LIBS=$LIBS
5372 LIBS="-lnspr4  $LIBS"
5373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374 /* end confdefs.h.  */
5375
5376 /* Override any GCC internal prototype to avoid an error.
5377    Use char because int might match the return type of a GCC
5378    builtin and then its argument prototype would still apply.  */
5379 #ifdef __cplusplus
5380 extern "C"
5381 #endif
5382 char PR_Initialize ();
5383 int
5384 main ()
5385 {
5386 return PR_Initialize ();
5387   ;
5388   return 0;
5389 }
5390 _ACEOF
5391 if ac_fn_c_try_link "$LINENO"; then :
5392   ac_cv_lib_nspr4_PR_Initialize=yes
5393 else
5394   ac_cv_lib_nspr4_PR_Initialize=no
5395 fi
5396 rm -f core conftest.err conftest.$ac_objext \
5397     conftest$ac_exeext conftest.$ac_ext
5398 LIBS=$ac_check_lib_save_LIBS
5399 fi
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
5401 $as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
5402 if test "x$ac_cv_lib_nspr4_PR_Initialize" = xyes; then :
5403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
5404 $as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
5405 if ${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+:} false; then :
5406   $as_echo_n "(cached) " >&6
5407 else
5408   ac_check_lib_save_LIBS=$LIBS
5409 LIBS="-lnss3 -lnspr4 $LIBS"
5410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5411 /* end confdefs.h.  */
5412
5413 /* Override any GCC internal prototype to avoid an error.
5414    Use char because int might match the return type of a GCC
5415    builtin and then its argument prototype would still apply.  */
5416 #ifdef __cplusplus
5417 extern "C"
5418 #endif
5419 char PK11_CreatePBEV2AlgorithmID ();
5420 int
5421 main ()
5422 {
5423 return PK11_CreatePBEV2AlgorithmID ();
5424   ;
5425   return 0;
5426 }
5427 _ACEOF
5428 if ac_fn_c_try_link "$LINENO"; then :
5429   ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
5430 else
5431   ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
5432 fi
5433 rm -f core conftest.err conftest.$ac_objext \
5434     conftest$ac_exeext conftest.$ac_ext
5435 LIBS=$ac_check_lib_save_LIBS
5436 fi
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
5438 $as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
5439 if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = xyes; then :
5440   nss_have_libs=1
5441 fi
5442
5443 fi
5444
5445       if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
5446         apu_have_nss=1
5447       fi
5448     elif test "$withval" = "no"; then
5449       apu_have_nss=0
5450     elif test "x$withval" != "x"; then
5451
5452       nss_CPPFLAGS="-I$withval/include/nss -I$withval/include/nss3 -I$withval/include/nspr -I$withval/include/nspr4 -I$withval/include -I$withval/../public"
5453       nss_LDFLAGS="-L$withval/lib "
5454
5455
5456   if test "x$CPPFLAGS" = "x"; then
5457     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
5458     CPPFLAGS="$nss_CPPFLAGS"
5459   else
5460     apr_addto_bugger="$nss_CPPFLAGS"
5461     for i in $apr_addto_bugger; do
5462       apr_addto_duplicate="0"
5463       for j in $CPPFLAGS; do
5464         if test "x$i" = "x$j"; then
5465           apr_addto_duplicate="1"
5466           break
5467         fi
5468       done
5469       if test $apr_addto_duplicate = "0"; then
5470         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5471         CPPFLAGS="$CPPFLAGS $i"
5472       fi
5473     done
5474   fi
5475
5476
5477   if test "x$LDFLAGS" = "x"; then
5478     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
5479     LDFLAGS="$nss_LDFLAGS"
5480   else
5481     apr_addto_bugger="$nss_LDFLAGS"
5482     for i in $apr_addto_bugger; do
5483       apr_addto_duplicate="0"
5484       for j in $LDFLAGS; do
5485         if test "x$i" = "x$j"; then
5486           apr_addto_duplicate="1"
5487           break
5488         fi
5489       done
5490       if test $apr_addto_duplicate = "0"; then
5491         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5492         LDFLAGS="$LDFLAGS $i"
5493       fi
5494     done
5495   fi
5496
5497
5498       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5
5499 $as_echo "$as_me: checking for nss in $withval" >&6;}
5500       nss_have_prerrorh=0
5501       nss_have_nssh=0
5502       nss_have_pk11pubh=0
5503       for ac_header in prerror.h
5504 do :
5505   ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default"
5506 if test "x$ac_cv_header_prerror_h" = xyes; then :
5507   cat >>confdefs.h <<_ACEOF
5508 #define HAVE_PRERROR_H 1
5509 _ACEOF
5510  nss_have_prerrorh=1
5511 fi
5512
5513 done
5514
5515       for ac_header in nss/nss.h nss.h
5516 do :
5517   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5518 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5519 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5520   cat >>confdefs.h <<_ACEOF
5521 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5522 _ACEOF
5523  nss_have_nssh=1
5524 fi
5525
5526 done
5527
5528       for ac_header in nss/pk11pub.h pk11pub.h
5529 do :
5530   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5531 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5532 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5533   cat >>confdefs.h <<_ACEOF
5534 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5535 _ACEOF
5536  nss_have_pk11pubh=1
5537 fi
5538
5539 done
5540
5541       nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
5542       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
5543 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
5544 if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then :
5545   $as_echo_n "(cached) " >&6
5546 else
5547   ac_check_lib_save_LIBS=$LIBS
5548 LIBS="-lnspr4  $LIBS"
5549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5550 /* end confdefs.h.  */
5551
5552 /* Override any GCC internal prototype to avoid an error.
5553    Use char because int might match the return type of a GCC
5554    builtin and then its argument prototype would still apply.  */
5555 #ifdef __cplusplus
5556 extern "C"
5557 #endif
5558 char PR_Initialize ();
5559 int
5560 main ()
5561 {
5562 return PR_Initialize ();
5563   ;
5564   return 0;
5565 }
5566 _ACEOF
5567 if ac_fn_c_try_link "$LINENO"; then :
5568   ac_cv_lib_nspr4_PR_Initialize=yes
5569 else
5570   ac_cv_lib_nspr4_PR_Initialize=no
5571 fi
5572 rm -f core conftest.err conftest.$ac_objext \
5573     conftest$ac_exeext conftest.$ac_ext
5574 LIBS=$ac_check_lib_save_LIBS
5575 fi
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
5577 $as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
5578 if test "x$ac_cv_lib_nspr4_PR_Initialize" = xyes; then :
5579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
5580 $as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
5581 if ${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+:} false; then :
5582   $as_echo_n "(cached) " >&6
5583 else
5584   ac_check_lib_save_LIBS=$LIBS
5585 LIBS="-lnss3 -lnspr4 $LIBS"
5586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5587 /* end confdefs.h.  */
5588
5589 /* Override any GCC internal prototype to avoid an error.
5590    Use char because int might match the return type of a GCC
5591    builtin and then its argument prototype would still apply.  */
5592 #ifdef __cplusplus
5593 extern "C"
5594 #endif
5595 char PK11_CreatePBEV2AlgorithmID ();
5596 int
5597 main ()
5598 {
5599 return PK11_CreatePBEV2AlgorithmID ();
5600   ;
5601   return 0;
5602 }
5603 _ACEOF
5604 if ac_fn_c_try_link "$LINENO"; then :
5605   ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
5606 else
5607   ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
5608 fi
5609 rm -f core conftest.err conftest.$ac_objext \
5610     conftest$ac_exeext conftest.$ac_ext
5611 LIBS=$ac_check_lib_save_LIBS
5612 fi
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
5614 $as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
5615 if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = xyes; then :
5616   nss_have_libs=1
5617 fi
5618
5619 fi
5620
5621       if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
5622         apu_have_nss=1
5623       fi
5624
5625     fi
5626     if test "$apu_have_nss" != "0"; then
5627
5628   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
5629     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$nss_CPPFLAGS\""
5630     APRUTIL_PRIV_INCLUDES="$nss_CPPFLAGS"
5631   else
5632     apr_addto_bugger="$nss_CPPFLAGS"
5633     for i in $apr_addto_bugger; do
5634       apr_addto_duplicate="0"
5635       for j in $APRUTIL_PRIV_INCLUDES; do
5636         if test "x$i" = "x$j"; then
5637           apr_addto_duplicate="1"
5638           break
5639         fi
5640       done
5641       if test $apr_addto_duplicate = "0"; then
5642         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
5643         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
5644       fi
5645     done
5646   fi
5647
5648     fi
5649
5650 else
5651
5652     apu_have_nss=0
5653
5654 fi
5655
5656
5657
5658
5659       if test "$apu_have_nss" = "1"; then
5660
5661   if test "x$LDADD_crypto_nss" = "x"; then
5662     test "x$silent" != "xyes" && echo "  setting LDADD_crypto_nss to \"$nss_LDFLAGS -lnspr4 -lnss3\""
5663     LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3"
5664   else
5665     apr_addto_bugger="$nss_LDFLAGS -lnspr4 -lnss3"
5666     for i in $apr_addto_bugger; do
5667       apr_addto_duplicate="0"
5668       for j in $LDADD_crypto_nss; do
5669         if test "x$i" = "x$j"; then
5670           apr_addto_duplicate="1"
5671           break
5672         fi
5673       done
5674       if test $apr_addto_duplicate = "0"; then
5675         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_crypto_nss"
5676         LDADD_crypto_nss="$LDADD_crypto_nss $i"
5677       fi
5678     done
5679   fi
5680
5681     apu_have_crypto=1
5682   fi
5683
5684
5685
5686   LIBS="$old_libs"
5687   CPPFLAGS="$old_cppflags"
5688   LDFLAGS="$old_ldflags"
5689
5690
5691   apu_have_commoncrypto=0
5692   commoncrypto_have_headers=0
5693   commoncrypto_have_libs=0
5694
5695   old_libs="$LIBS"
5696   old_cppflags="$CPPFLAGS"
5697   old_ldflags="$LDFLAGS"
5698
5699
5700 # Check whether --with-commoncrypto was given.
5701 if test "${with_commoncrypto+set}" = set; then :
5702   withval=$with_commoncrypto;
5703     if test "$withval" = "yes"; then
5704       for ac_header in CommonCrypto/CommonKeyDerivation.h
5705 do :
5706   ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonKeyDerivation.h" "ac_cv_header_CommonCrypto_CommonKeyDerivation_h" "$ac_includes_default"
5707 if test "x$ac_cv_header_CommonCrypto_CommonKeyDerivation_h" = xyes; then :
5708   cat >>confdefs.h <<_ACEOF
5709 #define HAVE_COMMONCRYPTO_COMMONKEYDERIVATION_H 1
5710 _ACEOF
5711  commoncrypto_have_headers=1
5712 fi
5713
5714 done
5715
5716       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCKeyDerivationPBKDF in -lSystem" >&5
5717 $as_echo_n "checking for CCKeyDerivationPBKDF in -lSystem... " >&6; }
5718 if ${ac_cv_lib_System_CCKeyDerivationPBKDF+:} false; then :
5719   $as_echo_n "(cached) " >&6
5720 else
5721   ac_check_lib_save_LIBS=$LIBS
5722 LIBS="-lSystem  $LIBS"
5723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724 /* end confdefs.h.  */
5725
5726 /* Override any GCC internal prototype to avoid an error.
5727    Use char because int might match the return type of a GCC
5728    builtin and then its argument prototype would still apply.  */
5729 #ifdef __cplusplus
5730 extern "C"
5731 #endif
5732 char CCKeyDerivationPBKDF ();
5733 int
5734 main ()
5735 {
5736 return CCKeyDerivationPBKDF ();
5737   ;
5738   return 0;
5739 }
5740 _ACEOF
5741 if ac_fn_c_try_link "$LINENO"; then :
5742   ac_cv_lib_System_CCKeyDerivationPBKDF=yes
5743 else
5744   ac_cv_lib_System_CCKeyDerivationPBKDF=no
5745 fi
5746 rm -f core conftest.err conftest.$ac_objext \
5747     conftest$ac_exeext conftest.$ac_ext
5748 LIBS=$ac_check_lib_save_LIBS
5749 fi
5750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCKeyDerivationPBKDF" >&5
5751 $as_echo "$ac_cv_lib_System_CCKeyDerivationPBKDF" >&6; }
5752 if test "x$ac_cv_lib_System_CCKeyDerivationPBKDF" = xyes; then :
5753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCCryptorCreate in -lSystem" >&5
5754 $as_echo_n "checking for CCCryptorCreate in -lSystem... " >&6; }
5755 if ${ac_cv_lib_System_CCCryptorCreate+:} false; then :
5756   $as_echo_n "(cached) " >&6
5757 else
5758   ac_check_lib_save_LIBS=$LIBS
5759 LIBS="-lSystem -lcrypto $LIBS"
5760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5761 /* end confdefs.h.  */
5762
5763 /* Override any GCC internal prototype to avoid an error.
5764    Use char because int might match the return type of a GCC
5765    builtin and then its argument prototype would still apply.  */
5766 #ifdef __cplusplus
5767 extern "C"
5768 #endif
5769 char CCCryptorCreate ();
5770 int
5771 main ()
5772 {
5773 return CCCryptorCreate ();
5774   ;
5775   return 0;
5776 }
5777 _ACEOF
5778 if ac_fn_c_try_link "$LINENO"; then :
5779   ac_cv_lib_System_CCCryptorCreate=yes
5780 else
5781   ac_cv_lib_System_CCCryptorCreate=no
5782 fi
5783 rm -f core conftest.err conftest.$ac_objext \
5784     conftest$ac_exeext conftest.$ac_ext
5785 LIBS=$ac_check_lib_save_LIBS
5786 fi
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCCryptorCreate" >&5
5788 $as_echo "$ac_cv_lib_System_CCCryptorCreate" >&6; }
5789 if test "x$ac_cv_lib_System_CCCryptorCreate" = xyes; then :
5790   commoncrypto_have_libs=1
5791 fi
5792
5793 fi
5794
5795       if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" != "0"; then
5796         apu_have_commoncrypto=1
5797       fi
5798     elif test "$withval" = "no"; then
5799       apu_have_commoncrypto=0
5800     else
5801
5802       commoncrypto_CPPFLAGS="-I$withval/include"
5803       commoncrypto_LDFLAGS="-L$withval/lib "
5804
5805
5806   if test "x$CPPFLAGS" = "x"; then
5807     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$commoncrypto_CPPFLAGS\""
5808     CPPFLAGS="$commoncrypto_CPPFLAGS"
5809   else
5810     apr_addto_bugger="$commoncrypto_CPPFLAGS"
5811     for i in $apr_addto_bugger; do
5812       apr_addto_duplicate="0"
5813       for j in $CPPFLAGS; do
5814         if test "x$i" = "x$j"; then
5815           apr_addto_duplicate="1"
5816           break
5817         fi
5818       done
5819       if test $apr_addto_duplicate = "0"; then
5820         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5821         CPPFLAGS="$CPPFLAGS $i"
5822       fi
5823     done
5824   fi
5825
5826
5827   if test "x$LDFLAGS" = "x"; then
5828     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$commoncrypto_LDFLAGS\""
5829     LDFLAGS="$commoncrypto_LDFLAGS"
5830   else
5831     apr_addto_bugger="$commoncrypto_LDFLAGS"
5832     for i in $apr_addto_bugger; do
5833       apr_addto_duplicate="0"
5834       for j in $LDFLAGS; do
5835         if test "x$i" = "x$j"; then
5836           apr_addto_duplicate="1"
5837           break
5838         fi
5839       done
5840       if test $apr_addto_duplicate = "0"; then
5841         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5842         LDFLAGS="$LDFLAGS $i"
5843       fi
5844     done
5845   fi
5846
5847
5848       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for commoncrypto in $withval" >&5
5849 $as_echo "$as_me: checking for commoncrypto in $withval" >&6;}
5850       for ac_header in CommonCrypto/CommonKeyDerivation.h
5851 do :
5852   ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonKeyDerivation.h" "ac_cv_header_CommonCrypto_CommonKeyDerivation_h" "$ac_includes_default"
5853 if test "x$ac_cv_header_CommonCrypto_CommonKeyDerivation_h" = xyes; then :
5854   cat >>confdefs.h <<_ACEOF
5855 #define HAVE_COMMONCRYPTO_COMMONKEYDERIVATION_H 1
5856 _ACEOF
5857  commoncrypto_have_headers=1
5858 fi
5859
5860 done
5861
5862       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCKeyDerivationPBKDF in -lSystem" >&5
5863 $as_echo_n "checking for CCKeyDerivationPBKDF in -lSystem... " >&6; }
5864 if ${ac_cv_lib_System_CCKeyDerivationPBKDF+:} false; then :
5865   $as_echo_n "(cached) " >&6
5866 else
5867   ac_check_lib_save_LIBS=$LIBS
5868 LIBS="-lSystem  $LIBS"
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870 /* end confdefs.h.  */
5871
5872 /* Override any GCC internal prototype to avoid an error.
5873    Use char because int might match the return type of a GCC
5874    builtin and then its argument prototype would still apply.  */
5875 #ifdef __cplusplus
5876 extern "C"
5877 #endif
5878 char CCKeyDerivationPBKDF ();
5879 int
5880 main ()
5881 {
5882 return CCKeyDerivationPBKDF ();
5883   ;
5884   return 0;
5885 }
5886 _ACEOF
5887 if ac_fn_c_try_link "$LINENO"; then :
5888   ac_cv_lib_System_CCKeyDerivationPBKDF=yes
5889 else
5890   ac_cv_lib_System_CCKeyDerivationPBKDF=no
5891 fi
5892 rm -f core conftest.err conftest.$ac_objext \
5893     conftest$ac_exeext conftest.$ac_ext
5894 LIBS=$ac_check_lib_save_LIBS
5895 fi
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCKeyDerivationPBKDF" >&5
5897 $as_echo "$ac_cv_lib_System_CCKeyDerivationPBKDF" >&6; }
5898 if test "x$ac_cv_lib_System_CCKeyDerivationPBKDF" = xyes; then :
5899   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCCryptorCreate in -lSystem" >&5
5900 $as_echo_n "checking for CCCryptorCreate in -lSystem... " >&6; }
5901 if ${ac_cv_lib_System_CCCryptorCreate+:} false; then :
5902   $as_echo_n "(cached) " >&6
5903 else
5904   ac_check_lib_save_LIBS=$LIBS
5905 LIBS="-lSystem -lcrypto $LIBS"
5906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5907 /* end confdefs.h.  */
5908
5909 /* Override any GCC internal prototype to avoid an error.
5910    Use char because int might match the return type of a GCC
5911    builtin and then its argument prototype would still apply.  */
5912 #ifdef __cplusplus
5913 extern "C"
5914 #endif
5915 char CCCryptorCreate ();
5916 int
5917 main ()
5918 {
5919 return CCCryptorCreate ();
5920   ;
5921   return 0;
5922 }
5923 _ACEOF
5924 if ac_fn_c_try_link "$LINENO"; then :
5925   ac_cv_lib_System_CCCryptorCreate=yes
5926 else
5927   ac_cv_lib_System_CCCryptorCreate=no
5928 fi
5929 rm -f core conftest.err conftest.$ac_objext \
5930     conftest$ac_exeext conftest.$ac_ext
5931 LIBS=$ac_check_lib_save_LIBS
5932 fi
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_System_CCCryptorCreate" >&5
5934 $as_echo "$ac_cv_lib_System_CCCryptorCreate" >&6; }
5935 if test "x$ac_cv_lib_System_CCCryptorCreate" = xyes; then :
5936   commoncrypto_have_libs=1
5937 fi
5938
5939 fi
5940
5941       if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" != "0"; then
5942         apu_have_commoncrypto=1
5943
5944   if test "x$LDFLAGS" = "x"; then
5945     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$withval/lib\""
5946     LDFLAGS="-L$withval/lib"
5947   else
5948     apr_addto_bugger="-L$withval/lib"
5949     for i in $apr_addto_bugger; do
5950       apr_addto_duplicate="0"
5951       for j in $LDFLAGS; do
5952         if test "x$i" = "x$j"; then
5953           apr_addto_duplicate="1"
5954           break
5955         fi
5956       done
5957       if test $apr_addto_duplicate = "0"; then
5958         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5959         LDFLAGS="$LDFLAGS $i"
5960       fi
5961     done
5962   fi
5963
5964
5965   if test "x$INCLUDES" = "x"; then
5966     test "x$silent" != "xyes" && echo "  setting INCLUDES to \"-I$withval/include\""
5967     INCLUDES="-I$withval/include"
5968   else
5969     apr_addto_bugger="-I$withval/include"
5970     for i in $apr_addto_bugger; do
5971       apr_addto_duplicate="0"
5972       for j in $INCLUDES; do
5973         if test "x$i" = "x$j"; then
5974           apr_addto_duplicate="1"
5975           break
5976         fi
5977       done
5978       if test $apr_addto_duplicate = "0"; then
5979         test "x$silent" != "xyes" && echo "  adding \"$i\" to INCLUDES"
5980         INCLUDES="$INCLUDES $i"
5981       fi
5982     done
5983   fi
5984
5985       fi
5986
5987     fi
5988
5989 else
5990
5991     apu_have_commoncrypto=0
5992
5993 fi
5994
5995
5996       if test "$apu_have_commoncrypto" = "1"; then
5997     apu_have_crypto=1
5998   fi
5999
6000
6001
6002
6003   LIBS="$old_libs"
6004   CPPFLAGS="$old_cppflags"
6005   LDFLAGS="$old_ldflags"
6006
6007             if test "$apu_have_crypto" = "0"; then
6008         as_fn_error $? "Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, and/or --with-commoncrypto." "$LINENO" 5
6009       fi
6010     fi
6011
6012 else
6013
6014       apu_have_crypto=0
6015
6016 fi
6017
6018
6019
6020
6021
6022
6023
6024 echo $ac_n "${nl}checking for ldap support..."
6025
6026 apu_has_ldap="0";
6027 apu_has_ldapssl_client_init="0"
6028 apu_has_ldapssl_client_deinit="0"
6029 apu_has_ldapssl_add_trusted_cert="0"
6030 apu_has_ldap_start_tls_s="0"
6031 apu_has_ldapssl_init="0"
6032 apu_has_ldap_sslinit="0"
6033 apu_has_ldapssl_install_routines="0"
6034 apu_has_ldap_openldap="0"
6035 apu_has_ldap_solaris="0"
6036 apu_has_ldap_novell="0"
6037 apu_has_ldap_microsoft="0"
6038 apu_has_ldap_netscape="0"
6039 apu_has_ldap_mozilla="0"
6040 apu_has_ldap_tivoli="0"
6041 apu_has_ldap_zos="0"
6042 apu_has_ldap_other="0"
6043 LDADD_ldap_found=""
6044
6045
6046 # Check whether --with-lber was given.
6047 if test "${with_lber+set}" = set; then :
6048   withval=$with_lber;
6049     if test "$withval" = "yes"; then
6050       apu_liblber_name="lber"
6051     else
6052       apu_liblber_name="$withval"
6053     fi
6054
6055 else
6056
6057     apu_liblber_name="lber"
6058
6059 fi
6060
6061
6062
6063 # Check whether --with-ldap-include was given.
6064 if test "${with_ldap_include+set}" = set; then :
6065   withval=$with_ldap_include;
6066 fi
6067
6068
6069 # Check whether --with-ldap-lib was given.
6070 if test "${with_ldap_lib+set}" = set; then :
6071   withval=$with_ldap_lib;
6072 fi
6073
6074
6075 # Check whether --with-ldap was given.
6076 if test "${with_ldap+set}" = set; then :
6077   withval=$with_ldap;
6078     if test "$with_ldap" != "no"; then
6079       save_cppflags="$CPPFLAGS"
6080       save_ldflags="$LDFLAGS"
6081       save_libs="$LIBS"
6082       if test -n "$with_ldap_include"; then
6083         CPPFLAGS="$CPPFLAGS -I$with_ldap_include"
6084
6085   if test "x$APRUTIL_INCLUDES" = "x"; then
6086     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$with_ldap_include\""
6087     APRUTIL_INCLUDES="-I$with_ldap_include"
6088   else
6089     apr_addto_bugger="-I$with_ldap_include"
6090     for i in $apr_addto_bugger; do
6091       apr_addto_duplicate="0"
6092       for j in $APRUTIL_INCLUDES; do
6093         if test "x$i" = "x$j"; then
6094           apr_addto_duplicate="1"
6095           break
6096         fi
6097       done
6098       if test $apr_addto_duplicate = "0"; then
6099         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
6100         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
6101       fi
6102     done
6103   fi
6104
6105       fi
6106       if test -n "$with_ldap_lib"; then
6107         LDFLAGS="$LDFLAGS -L$with_ldap_lib"
6108
6109   if test "x$APRUTIL_LDFLAGS" = "x"; then
6110     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$with_ldap_lib\""
6111     APRUTIL_LDFLAGS="-L$with_ldap_lib"
6112   else
6113     apr_addto_bugger="-L$with_ldap_lib"
6114     for i in $apr_addto_bugger; do
6115       apr_addto_duplicate="0"
6116       for j in $APRUTIL_LDFLAGS; do
6117         if test "x$i" = "x$j"; then
6118           apr_addto_duplicate="1"
6119           break
6120         fi
6121       done
6122       if test $apr_addto_duplicate = "0"; then
6123         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
6124         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
6125       fi
6126     done
6127   fi
6128
6129       fi
6130
6131       LIBLDAP="$withval"
6132       if test "$LIBLDAP" = "yes"; then
6133
6134   if test ${apu_has_ldap} != "1"; then
6135     ldaplib="ldap50"
6136     extralib="-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50"
6137     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6138
6139     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6140
6141     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6142     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6143     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6145 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6146 if eval \${$as_ac_Lib+:} false; then :
6147   $as_echo_n "(cached) " >&6
6148 else
6149   ac_check_lib_save_LIBS=$LIBS
6150 LIBS="-l${ldaplib} ${extralib} $LIBS"
6151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6152 /* end confdefs.h.  */
6153
6154 /* Override any GCC internal prototype to avoid an error.
6155    Use char because int might match the return type of a GCC
6156    builtin and then its argument prototype would still apply.  */
6157 #ifdef __cplusplus
6158 extern "C"
6159 #endif
6160 char ldap_init ();
6161 int
6162 main ()
6163 {
6164 return ldap_init ();
6165   ;
6166   return 0;
6167 }
6168 _ACEOF
6169 if ac_fn_c_try_link "$LINENO"; then :
6170   eval "$as_ac_Lib=yes"
6171 else
6172   eval "$as_ac_Lib=no"
6173 fi
6174 rm -f core conftest.err conftest.$ac_objext \
6175     conftest$ac_exeext conftest.$ac_ext
6176 LIBS=$ac_check_lib_save_LIBS
6177 fi
6178 eval ac_res=\$$as_ac_Lib
6179                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6180 $as_echo "$ac_res" >&6; }
6181 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6182
6183         LDADD_ldap_found="-l${ldaplib} ${extralib}"
6184         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6186 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6187 if eval \${$as_ac_Lib+:} false; then :
6188   $as_echo_n "(cached) " >&6
6189 else
6190   ac_check_lib_save_LIBS=$LIBS
6191 LIBS="-l${ldaplib} ${extralib} $LIBS"
6192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6193 /* end confdefs.h.  */
6194
6195 /* Override any GCC internal prototype to avoid an error.
6196    Use char because int might match the return type of a GCC
6197    builtin and then its argument prototype would still apply.  */
6198 #ifdef __cplusplus
6199 extern "C"
6200 #endif
6201 char ldapssl_client_init ();
6202 int
6203 main ()
6204 {
6205 return ldapssl_client_init ();
6206   ;
6207   return 0;
6208 }
6209 _ACEOF
6210 if ac_fn_c_try_link "$LINENO"; then :
6211   eval "$as_ac_Lib=yes"
6212 else
6213   eval "$as_ac_Lib=no"
6214 fi
6215 rm -f core conftest.err conftest.$ac_objext \
6216     conftest$ac_exeext conftest.$ac_ext
6217 LIBS=$ac_check_lib_save_LIBS
6218 fi
6219 eval ac_res=\$$as_ac_Lib
6220                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6221 $as_echo "$ac_res" >&6; }
6222 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6223   apu_has_ldapssl_client_init="1"
6224 fi
6225
6226         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6228 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6229 if eval \${$as_ac_Lib+:} false; then :
6230   $as_echo_n "(cached) " >&6
6231 else
6232   ac_check_lib_save_LIBS=$LIBS
6233 LIBS="-l${ldaplib} ${extralib} $LIBS"
6234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6235 /* end confdefs.h.  */
6236
6237 /* Override any GCC internal prototype to avoid an error.
6238    Use char because int might match the return type of a GCC
6239    builtin and then its argument prototype would still apply.  */
6240 #ifdef __cplusplus
6241 extern "C"
6242 #endif
6243 char ldapssl_client_deinit ();
6244 int
6245 main ()
6246 {
6247 return ldapssl_client_deinit ();
6248   ;
6249   return 0;
6250 }
6251 _ACEOF
6252 if ac_fn_c_try_link "$LINENO"; then :
6253   eval "$as_ac_Lib=yes"
6254 else
6255   eval "$as_ac_Lib=no"
6256 fi
6257 rm -f core conftest.err conftest.$ac_objext \
6258     conftest$ac_exeext conftest.$ac_ext
6259 LIBS=$ac_check_lib_save_LIBS
6260 fi
6261 eval ac_res=\$$as_ac_Lib
6262                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6263 $as_echo "$ac_res" >&6; }
6264 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6265   apu_has_ldapssl_client_deinit="1"
6266 fi
6267
6268         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6270 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6271 if eval \${$as_ac_Lib+:} false; then :
6272   $as_echo_n "(cached) " >&6
6273 else
6274   ac_check_lib_save_LIBS=$LIBS
6275 LIBS="-l${ldaplib} ${extralib} $LIBS"
6276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6277 /* end confdefs.h.  */
6278
6279 /* Override any GCC internal prototype to avoid an error.
6280    Use char because int might match the return type of a GCC
6281    builtin and then its argument prototype would still apply.  */
6282 #ifdef __cplusplus
6283 extern "C"
6284 #endif
6285 char ldapssl_add_trusted_cert ();
6286 int
6287 main ()
6288 {
6289 return ldapssl_add_trusted_cert ();
6290   ;
6291   return 0;
6292 }
6293 _ACEOF
6294 if ac_fn_c_try_link "$LINENO"; then :
6295   eval "$as_ac_Lib=yes"
6296 else
6297   eval "$as_ac_Lib=no"
6298 fi
6299 rm -f core conftest.err conftest.$ac_objext \
6300     conftest$ac_exeext conftest.$ac_ext
6301 LIBS=$ac_check_lib_save_LIBS
6302 fi
6303 eval ac_res=\$$as_ac_Lib
6304                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6305 $as_echo "$ac_res" >&6; }
6306 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6307   apu_has_ldapssl_add_trusted_cert="1"
6308 fi
6309
6310         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6312 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6313 if eval \${$as_ac_Lib+:} false; then :
6314   $as_echo_n "(cached) " >&6
6315 else
6316   ac_check_lib_save_LIBS=$LIBS
6317 LIBS="-l${ldaplib} ${extralib} $LIBS"
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319 /* end confdefs.h.  */
6320
6321 /* Override any GCC internal prototype to avoid an error.
6322    Use char because int might match the return type of a GCC
6323    builtin and then its argument prototype would still apply.  */
6324 #ifdef __cplusplus
6325 extern "C"
6326 #endif
6327 char ldap_start_tls_s ();
6328 int
6329 main ()
6330 {
6331 return ldap_start_tls_s ();
6332   ;
6333   return 0;
6334 }
6335 _ACEOF
6336 if ac_fn_c_try_link "$LINENO"; then :
6337   eval "$as_ac_Lib=yes"
6338 else
6339   eval "$as_ac_Lib=no"
6340 fi
6341 rm -f core conftest.err conftest.$ac_objext \
6342     conftest$ac_exeext conftest.$ac_ext
6343 LIBS=$ac_check_lib_save_LIBS
6344 fi
6345 eval ac_res=\$$as_ac_Lib
6346                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6347 $as_echo "$ac_res" >&6; }
6348 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6349   apu_has_ldap_start_tls_s="1"
6350 fi
6351
6352         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6354 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6355 if eval \${$as_ac_Lib+:} false; then :
6356   $as_echo_n "(cached) " >&6
6357 else
6358   ac_check_lib_save_LIBS=$LIBS
6359 LIBS="-l${ldaplib} ${extralib} $LIBS"
6360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6361 /* end confdefs.h.  */
6362
6363 /* Override any GCC internal prototype to avoid an error.
6364    Use char because int might match the return type of a GCC
6365    builtin and then its argument prototype would still apply.  */
6366 #ifdef __cplusplus
6367 extern "C"
6368 #endif
6369 char ldap_sslinit ();
6370 int
6371 main ()
6372 {
6373 return ldap_sslinit ();
6374   ;
6375   return 0;
6376 }
6377 _ACEOF
6378 if ac_fn_c_try_link "$LINENO"; then :
6379   eval "$as_ac_Lib=yes"
6380 else
6381   eval "$as_ac_Lib=no"
6382 fi
6383 rm -f core conftest.err conftest.$ac_objext \
6384     conftest$ac_exeext conftest.$ac_ext
6385 LIBS=$ac_check_lib_save_LIBS
6386 fi
6387 eval ac_res=\$$as_ac_Lib
6388                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6389 $as_echo "$ac_res" >&6; }
6390 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6391   apu_has_ldap_sslinit="1"
6392 fi
6393
6394         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6396 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6397 if eval \${$as_ac_Lib+:} false; then :
6398   $as_echo_n "(cached) " >&6
6399 else
6400   ac_check_lib_save_LIBS=$LIBS
6401 LIBS="-l${ldaplib} ${extralib} $LIBS"
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h.  */
6404
6405 /* Override any GCC internal prototype to avoid an error.
6406    Use char because int might match the return type of a GCC
6407    builtin and then its argument prototype would still apply.  */
6408 #ifdef __cplusplus
6409 extern "C"
6410 #endif
6411 char ldapssl_init ();
6412 int
6413 main ()
6414 {
6415 return ldapssl_init ();
6416   ;
6417   return 0;
6418 }
6419 _ACEOF
6420 if ac_fn_c_try_link "$LINENO"; then :
6421   eval "$as_ac_Lib=yes"
6422 else
6423   eval "$as_ac_Lib=no"
6424 fi
6425 rm -f core conftest.err conftest.$ac_objext \
6426     conftest$ac_exeext conftest.$ac_ext
6427 LIBS=$ac_check_lib_save_LIBS
6428 fi
6429 eval ac_res=\$$as_ac_Lib
6430                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6431 $as_echo "$ac_res" >&6; }
6432 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6433   apu_has_ldapssl_init="1"
6434 fi
6435
6436         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6438 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6439 if eval \${$as_ac_Lib+:} false; then :
6440   $as_echo_n "(cached) " >&6
6441 else
6442   ac_check_lib_save_LIBS=$LIBS
6443 LIBS="-l${ldaplib} ${extralib} $LIBS"
6444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6445 /* end confdefs.h.  */
6446
6447 /* Override any GCC internal prototype to avoid an error.
6448    Use char because int might match the return type of a GCC
6449    builtin and then its argument prototype would still apply.  */
6450 #ifdef __cplusplus
6451 extern "C"
6452 #endif
6453 char ldapssl_install_routines ();
6454 int
6455 main ()
6456 {
6457 return ldapssl_install_routines ();
6458   ;
6459   return 0;
6460 }
6461 _ACEOF
6462 if ac_fn_c_try_link "$LINENO"; then :
6463   eval "$as_ac_Lib=yes"
6464 else
6465   eval "$as_ac_Lib=no"
6466 fi
6467 rm -f core conftest.err conftest.$ac_objext \
6468     conftest$ac_exeext conftest.$ac_ext
6469 LIBS=$ac_check_lib_save_LIBS
6470 fi
6471 eval ac_res=\$$as_ac_Lib
6472                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6473 $as_echo "$ac_res" >&6; }
6474 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6475   apu_has_ldapssl_install_routines="1"
6476 fi
6477
6478         apu_has_ldap="1";
6479
6480 fi
6481
6482   fi
6483
6484
6485   if test ${apu_has_ldap} != "1"; then
6486     ldaplib="ldapssl41"
6487     extralib="-lnspr3 -lplc3 -lplds3"
6488     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6489
6490     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6491
6492     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6493     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6494     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6496 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6497 if eval \${$as_ac_Lib+:} false; then :
6498   $as_echo_n "(cached) " >&6
6499 else
6500   ac_check_lib_save_LIBS=$LIBS
6501 LIBS="-l${ldaplib} ${extralib} $LIBS"
6502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6503 /* end confdefs.h.  */
6504
6505 /* Override any GCC internal prototype to avoid an error.
6506    Use char because int might match the return type of a GCC
6507    builtin and then its argument prototype would still apply.  */
6508 #ifdef __cplusplus
6509 extern "C"
6510 #endif
6511 char ldap_init ();
6512 int
6513 main ()
6514 {
6515 return ldap_init ();
6516   ;
6517   return 0;
6518 }
6519 _ACEOF
6520 if ac_fn_c_try_link "$LINENO"; then :
6521   eval "$as_ac_Lib=yes"
6522 else
6523   eval "$as_ac_Lib=no"
6524 fi
6525 rm -f core conftest.err conftest.$ac_objext \
6526     conftest$ac_exeext conftest.$ac_ext
6527 LIBS=$ac_check_lib_save_LIBS
6528 fi
6529 eval ac_res=\$$as_ac_Lib
6530                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6531 $as_echo "$ac_res" >&6; }
6532 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6533
6534         LDADD_ldap_found="-l${ldaplib} ${extralib}"
6535         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6537 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6538 if eval \${$as_ac_Lib+:} false; then :
6539   $as_echo_n "(cached) " >&6
6540 else
6541   ac_check_lib_save_LIBS=$LIBS
6542 LIBS="-l${ldaplib} ${extralib} $LIBS"
6543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6544 /* end confdefs.h.  */
6545
6546 /* Override any GCC internal prototype to avoid an error.
6547    Use char because int might match the return type of a GCC
6548    builtin and then its argument prototype would still apply.  */
6549 #ifdef __cplusplus
6550 extern "C"
6551 #endif
6552 char ldapssl_client_init ();
6553 int
6554 main ()
6555 {
6556 return ldapssl_client_init ();
6557   ;
6558   return 0;
6559 }
6560 _ACEOF
6561 if ac_fn_c_try_link "$LINENO"; then :
6562   eval "$as_ac_Lib=yes"
6563 else
6564   eval "$as_ac_Lib=no"
6565 fi
6566 rm -f core conftest.err conftest.$ac_objext \
6567     conftest$ac_exeext conftest.$ac_ext
6568 LIBS=$ac_check_lib_save_LIBS
6569 fi
6570 eval ac_res=\$$as_ac_Lib
6571                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6572 $as_echo "$ac_res" >&6; }
6573 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6574   apu_has_ldapssl_client_init="1"
6575 fi
6576
6577         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6579 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6580 if eval \${$as_ac_Lib+:} false; then :
6581   $as_echo_n "(cached) " >&6
6582 else
6583   ac_check_lib_save_LIBS=$LIBS
6584 LIBS="-l${ldaplib} ${extralib} $LIBS"
6585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6586 /* end confdefs.h.  */
6587
6588 /* Override any GCC internal prototype to avoid an error.
6589    Use char because int might match the return type of a GCC
6590    builtin and then its argument prototype would still apply.  */
6591 #ifdef __cplusplus
6592 extern "C"
6593 #endif
6594 char ldapssl_client_deinit ();
6595 int
6596 main ()
6597 {
6598 return ldapssl_client_deinit ();
6599   ;
6600   return 0;
6601 }
6602 _ACEOF
6603 if ac_fn_c_try_link "$LINENO"; then :
6604   eval "$as_ac_Lib=yes"
6605 else
6606   eval "$as_ac_Lib=no"
6607 fi
6608 rm -f core conftest.err conftest.$ac_objext \
6609     conftest$ac_exeext conftest.$ac_ext
6610 LIBS=$ac_check_lib_save_LIBS
6611 fi
6612 eval ac_res=\$$as_ac_Lib
6613                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6614 $as_echo "$ac_res" >&6; }
6615 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6616   apu_has_ldapssl_client_deinit="1"
6617 fi
6618
6619         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6621 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6622 if eval \${$as_ac_Lib+:} false; then :
6623   $as_echo_n "(cached) " >&6
6624 else
6625   ac_check_lib_save_LIBS=$LIBS
6626 LIBS="-l${ldaplib} ${extralib} $LIBS"
6627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6628 /* end confdefs.h.  */
6629
6630 /* Override any GCC internal prototype to avoid an error.
6631    Use char because int might match the return type of a GCC
6632    builtin and then its argument prototype would still apply.  */
6633 #ifdef __cplusplus
6634 extern "C"
6635 #endif
6636 char ldapssl_add_trusted_cert ();
6637 int
6638 main ()
6639 {
6640 return ldapssl_add_trusted_cert ();
6641   ;
6642   return 0;
6643 }
6644 _ACEOF
6645 if ac_fn_c_try_link "$LINENO"; then :
6646   eval "$as_ac_Lib=yes"
6647 else
6648   eval "$as_ac_Lib=no"
6649 fi
6650 rm -f core conftest.err conftest.$ac_objext \
6651     conftest$ac_exeext conftest.$ac_ext
6652 LIBS=$ac_check_lib_save_LIBS
6653 fi
6654 eval ac_res=\$$as_ac_Lib
6655                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6656 $as_echo "$ac_res" >&6; }
6657 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6658   apu_has_ldapssl_add_trusted_cert="1"
6659 fi
6660
6661         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6663 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6664 if eval \${$as_ac_Lib+:} false; then :
6665   $as_echo_n "(cached) " >&6
6666 else
6667   ac_check_lib_save_LIBS=$LIBS
6668 LIBS="-l${ldaplib} ${extralib} $LIBS"
6669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6670 /* end confdefs.h.  */
6671
6672 /* Override any GCC internal prototype to avoid an error.
6673    Use char because int might match the return type of a GCC
6674    builtin and then its argument prototype would still apply.  */
6675 #ifdef __cplusplus
6676 extern "C"
6677 #endif
6678 char ldap_start_tls_s ();
6679 int
6680 main ()
6681 {
6682 return ldap_start_tls_s ();
6683   ;
6684   return 0;
6685 }
6686 _ACEOF
6687 if ac_fn_c_try_link "$LINENO"; then :
6688   eval "$as_ac_Lib=yes"
6689 else
6690   eval "$as_ac_Lib=no"
6691 fi
6692 rm -f core conftest.err conftest.$ac_objext \
6693     conftest$ac_exeext conftest.$ac_ext
6694 LIBS=$ac_check_lib_save_LIBS
6695 fi
6696 eval ac_res=\$$as_ac_Lib
6697                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6698 $as_echo "$ac_res" >&6; }
6699 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6700   apu_has_ldap_start_tls_s="1"
6701 fi
6702
6703         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6705 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6706 if eval \${$as_ac_Lib+:} false; then :
6707   $as_echo_n "(cached) " >&6
6708 else
6709   ac_check_lib_save_LIBS=$LIBS
6710 LIBS="-l${ldaplib} ${extralib} $LIBS"
6711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6712 /* end confdefs.h.  */
6713
6714 /* Override any GCC internal prototype to avoid an error.
6715    Use char because int might match the return type of a GCC
6716    builtin and then its argument prototype would still apply.  */
6717 #ifdef __cplusplus
6718 extern "C"
6719 #endif
6720 char ldap_sslinit ();
6721 int
6722 main ()
6723 {
6724 return ldap_sslinit ();
6725   ;
6726   return 0;
6727 }
6728 _ACEOF
6729 if ac_fn_c_try_link "$LINENO"; then :
6730   eval "$as_ac_Lib=yes"
6731 else
6732   eval "$as_ac_Lib=no"
6733 fi
6734 rm -f core conftest.err conftest.$ac_objext \
6735     conftest$ac_exeext conftest.$ac_ext
6736 LIBS=$ac_check_lib_save_LIBS
6737 fi
6738 eval ac_res=\$$as_ac_Lib
6739                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6740 $as_echo "$ac_res" >&6; }
6741 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6742   apu_has_ldap_sslinit="1"
6743 fi
6744
6745         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6747 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6748 if eval \${$as_ac_Lib+:} false; then :
6749   $as_echo_n "(cached) " >&6
6750 else
6751   ac_check_lib_save_LIBS=$LIBS
6752 LIBS="-l${ldaplib} ${extralib} $LIBS"
6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6754 /* end confdefs.h.  */
6755
6756 /* Override any GCC internal prototype to avoid an error.
6757    Use char because int might match the return type of a GCC
6758    builtin and then its argument prototype would still apply.  */
6759 #ifdef __cplusplus
6760 extern "C"
6761 #endif
6762 char ldapssl_init ();
6763 int
6764 main ()
6765 {
6766 return ldapssl_init ();
6767   ;
6768   return 0;
6769 }
6770 _ACEOF
6771 if ac_fn_c_try_link "$LINENO"; then :
6772   eval "$as_ac_Lib=yes"
6773 else
6774   eval "$as_ac_Lib=no"
6775 fi
6776 rm -f core conftest.err conftest.$ac_objext \
6777     conftest$ac_exeext conftest.$ac_ext
6778 LIBS=$ac_check_lib_save_LIBS
6779 fi
6780 eval ac_res=\$$as_ac_Lib
6781                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6782 $as_echo "$ac_res" >&6; }
6783 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6784   apu_has_ldapssl_init="1"
6785 fi
6786
6787         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6789 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6790 if eval \${$as_ac_Lib+:} false; then :
6791   $as_echo_n "(cached) " >&6
6792 else
6793   ac_check_lib_save_LIBS=$LIBS
6794 LIBS="-l${ldaplib} ${extralib} $LIBS"
6795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6796 /* end confdefs.h.  */
6797
6798 /* Override any GCC internal prototype to avoid an error.
6799    Use char because int might match the return type of a GCC
6800    builtin and then its argument prototype would still apply.  */
6801 #ifdef __cplusplus
6802 extern "C"
6803 #endif
6804 char ldapssl_install_routines ();
6805 int
6806 main ()
6807 {
6808 return ldapssl_install_routines ();
6809   ;
6810   return 0;
6811 }
6812 _ACEOF
6813 if ac_fn_c_try_link "$LINENO"; then :
6814   eval "$as_ac_Lib=yes"
6815 else
6816   eval "$as_ac_Lib=no"
6817 fi
6818 rm -f core conftest.err conftest.$ac_objext \
6819     conftest$ac_exeext conftest.$ac_ext
6820 LIBS=$ac_check_lib_save_LIBS
6821 fi
6822 eval ac_res=\$$as_ac_Lib
6823                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6824 $as_echo "$ac_res" >&6; }
6825 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6826   apu_has_ldapssl_install_routines="1"
6827 fi
6828
6829         apu_has_ldap="1";
6830
6831 fi
6832
6833   fi
6834
6835
6836   if test ${apu_has_ldap} != "1"; then
6837     ldaplib="ldapssl40"
6838     extralib=
6839     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6840
6841     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6842
6843     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6844     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6845     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6847 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6848 if eval \${$as_ac_Lib+:} false; then :
6849   $as_echo_n "(cached) " >&6
6850 else
6851   ac_check_lib_save_LIBS=$LIBS
6852 LIBS="-l${ldaplib} ${extralib} $LIBS"
6853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6854 /* end confdefs.h.  */
6855
6856 /* Override any GCC internal prototype to avoid an error.
6857    Use char because int might match the return type of a GCC
6858    builtin and then its argument prototype would still apply.  */
6859 #ifdef __cplusplus
6860 extern "C"
6861 #endif
6862 char ldap_init ();
6863 int
6864 main ()
6865 {
6866 return ldap_init ();
6867   ;
6868   return 0;
6869 }
6870 _ACEOF
6871 if ac_fn_c_try_link "$LINENO"; then :
6872   eval "$as_ac_Lib=yes"
6873 else
6874   eval "$as_ac_Lib=no"
6875 fi
6876 rm -f core conftest.err conftest.$ac_objext \
6877     conftest$ac_exeext conftest.$ac_ext
6878 LIBS=$ac_check_lib_save_LIBS
6879 fi
6880 eval ac_res=\$$as_ac_Lib
6881                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6882 $as_echo "$ac_res" >&6; }
6883 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6884
6885         LDADD_ldap_found="-l${ldaplib} ${extralib}"
6886         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6888 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6889 if eval \${$as_ac_Lib+:} false; then :
6890   $as_echo_n "(cached) " >&6
6891 else
6892   ac_check_lib_save_LIBS=$LIBS
6893 LIBS="-l${ldaplib} ${extralib} $LIBS"
6894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6895 /* end confdefs.h.  */
6896
6897 /* Override any GCC internal prototype to avoid an error.
6898    Use char because int might match the return type of a GCC
6899    builtin and then its argument prototype would still apply.  */
6900 #ifdef __cplusplus
6901 extern "C"
6902 #endif
6903 char ldapssl_client_init ();
6904 int
6905 main ()
6906 {
6907 return ldapssl_client_init ();
6908   ;
6909   return 0;
6910 }
6911 _ACEOF
6912 if ac_fn_c_try_link "$LINENO"; then :
6913   eval "$as_ac_Lib=yes"
6914 else
6915   eval "$as_ac_Lib=no"
6916 fi
6917 rm -f core conftest.err conftest.$ac_objext \
6918     conftest$ac_exeext conftest.$ac_ext
6919 LIBS=$ac_check_lib_save_LIBS
6920 fi
6921 eval ac_res=\$$as_ac_Lib
6922                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6923 $as_echo "$ac_res" >&6; }
6924 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6925   apu_has_ldapssl_client_init="1"
6926 fi
6927
6928         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6930 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6931 if eval \${$as_ac_Lib+:} false; then :
6932   $as_echo_n "(cached) " >&6
6933 else
6934   ac_check_lib_save_LIBS=$LIBS
6935 LIBS="-l${ldaplib} ${extralib} $LIBS"
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937 /* end confdefs.h.  */
6938
6939 /* Override any GCC internal prototype to avoid an error.
6940    Use char because int might match the return type of a GCC
6941    builtin and then its argument prototype would still apply.  */
6942 #ifdef __cplusplus
6943 extern "C"
6944 #endif
6945 char ldapssl_client_deinit ();
6946 int
6947 main ()
6948 {
6949 return ldapssl_client_deinit ();
6950   ;
6951   return 0;
6952 }
6953 _ACEOF
6954 if ac_fn_c_try_link "$LINENO"; then :
6955   eval "$as_ac_Lib=yes"
6956 else
6957   eval "$as_ac_Lib=no"
6958 fi
6959 rm -f core conftest.err conftest.$ac_objext \
6960     conftest$ac_exeext conftest.$ac_ext
6961 LIBS=$ac_check_lib_save_LIBS
6962 fi
6963 eval ac_res=\$$as_ac_Lib
6964                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6965 $as_echo "$ac_res" >&6; }
6966 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6967   apu_has_ldapssl_client_deinit="1"
6968 fi
6969
6970         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6972 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6973 if eval \${$as_ac_Lib+:} false; then :
6974   $as_echo_n "(cached) " >&6
6975 else
6976   ac_check_lib_save_LIBS=$LIBS
6977 LIBS="-l${ldaplib} ${extralib} $LIBS"
6978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6979 /* end confdefs.h.  */
6980
6981 /* Override any GCC internal prototype to avoid an error.
6982    Use char because int might match the return type of a GCC
6983    builtin and then its argument prototype would still apply.  */
6984 #ifdef __cplusplus
6985 extern "C"
6986 #endif
6987 char ldapssl_add_trusted_cert ();
6988 int
6989 main ()
6990 {
6991 return ldapssl_add_trusted_cert ();
6992   ;
6993   return 0;
6994 }
6995 _ACEOF
6996 if ac_fn_c_try_link "$LINENO"; then :
6997   eval "$as_ac_Lib=yes"
6998 else
6999   eval "$as_ac_Lib=no"
7000 fi
7001 rm -f core conftest.err conftest.$ac_objext \
7002     conftest$ac_exeext conftest.$ac_ext
7003 LIBS=$ac_check_lib_save_LIBS
7004 fi
7005 eval ac_res=\$$as_ac_Lib
7006                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7007 $as_echo "$ac_res" >&6; }
7008 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7009   apu_has_ldapssl_add_trusted_cert="1"
7010 fi
7011
7012         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7014 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7015 if eval \${$as_ac_Lib+:} false; then :
7016   $as_echo_n "(cached) " >&6
7017 else
7018   ac_check_lib_save_LIBS=$LIBS
7019 LIBS="-l${ldaplib} ${extralib} $LIBS"
7020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7021 /* end confdefs.h.  */
7022
7023 /* Override any GCC internal prototype to avoid an error.
7024    Use char because int might match the return type of a GCC
7025    builtin and then its argument prototype would still apply.  */
7026 #ifdef __cplusplus
7027 extern "C"
7028 #endif
7029 char ldap_start_tls_s ();
7030 int
7031 main ()
7032 {
7033 return ldap_start_tls_s ();
7034   ;
7035   return 0;
7036 }
7037 _ACEOF
7038 if ac_fn_c_try_link "$LINENO"; then :
7039   eval "$as_ac_Lib=yes"
7040 else
7041   eval "$as_ac_Lib=no"
7042 fi
7043 rm -f core conftest.err conftest.$ac_objext \
7044     conftest$ac_exeext conftest.$ac_ext
7045 LIBS=$ac_check_lib_save_LIBS
7046 fi
7047 eval ac_res=\$$as_ac_Lib
7048                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7049 $as_echo "$ac_res" >&6; }
7050 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7051   apu_has_ldap_start_tls_s="1"
7052 fi
7053
7054         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7056 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7057 if eval \${$as_ac_Lib+:} false; then :
7058   $as_echo_n "(cached) " >&6
7059 else
7060   ac_check_lib_save_LIBS=$LIBS
7061 LIBS="-l${ldaplib} ${extralib} $LIBS"
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063 /* end confdefs.h.  */
7064
7065 /* Override any GCC internal prototype to avoid an error.
7066    Use char because int might match the return type of a GCC
7067    builtin and then its argument prototype would still apply.  */
7068 #ifdef __cplusplus
7069 extern "C"
7070 #endif
7071 char ldap_sslinit ();
7072 int
7073 main ()
7074 {
7075 return ldap_sslinit ();
7076   ;
7077   return 0;
7078 }
7079 _ACEOF
7080 if ac_fn_c_try_link "$LINENO"; then :
7081   eval "$as_ac_Lib=yes"
7082 else
7083   eval "$as_ac_Lib=no"
7084 fi
7085 rm -f core conftest.err conftest.$ac_objext \
7086     conftest$ac_exeext conftest.$ac_ext
7087 LIBS=$ac_check_lib_save_LIBS
7088 fi
7089 eval ac_res=\$$as_ac_Lib
7090                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7091 $as_echo "$ac_res" >&6; }
7092 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7093   apu_has_ldap_sslinit="1"
7094 fi
7095
7096         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7098 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7099 if eval \${$as_ac_Lib+:} false; then :
7100   $as_echo_n "(cached) " >&6
7101 else
7102   ac_check_lib_save_LIBS=$LIBS
7103 LIBS="-l${ldaplib} ${extralib} $LIBS"
7104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105 /* end confdefs.h.  */
7106
7107 /* Override any GCC internal prototype to avoid an error.
7108    Use char because int might match the return type of a GCC
7109    builtin and then its argument prototype would still apply.  */
7110 #ifdef __cplusplus
7111 extern "C"
7112 #endif
7113 char ldapssl_init ();
7114 int
7115 main ()
7116 {
7117 return ldapssl_init ();
7118   ;
7119   return 0;
7120 }
7121 _ACEOF
7122 if ac_fn_c_try_link "$LINENO"; then :
7123   eval "$as_ac_Lib=yes"
7124 else
7125   eval "$as_ac_Lib=no"
7126 fi
7127 rm -f core conftest.err conftest.$ac_objext \
7128     conftest$ac_exeext conftest.$ac_ext
7129 LIBS=$ac_check_lib_save_LIBS
7130 fi
7131 eval ac_res=\$$as_ac_Lib
7132                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7133 $as_echo "$ac_res" >&6; }
7134 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7135   apu_has_ldapssl_init="1"
7136 fi
7137
7138         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7140 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7141 if eval \${$as_ac_Lib+:} false; then :
7142   $as_echo_n "(cached) " >&6
7143 else
7144   ac_check_lib_save_LIBS=$LIBS
7145 LIBS="-l${ldaplib} ${extralib} $LIBS"
7146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7147 /* end confdefs.h.  */
7148
7149 /* Override any GCC internal prototype to avoid an error.
7150    Use char because int might match the return type of a GCC
7151    builtin and then its argument prototype would still apply.  */
7152 #ifdef __cplusplus
7153 extern "C"
7154 #endif
7155 char ldapssl_install_routines ();
7156 int
7157 main ()
7158 {
7159 return ldapssl_install_routines ();
7160   ;
7161   return 0;
7162 }
7163 _ACEOF
7164 if ac_fn_c_try_link "$LINENO"; then :
7165   eval "$as_ac_Lib=yes"
7166 else
7167   eval "$as_ac_Lib=no"
7168 fi
7169 rm -f core conftest.err conftest.$ac_objext \
7170     conftest$ac_exeext conftest.$ac_ext
7171 LIBS=$ac_check_lib_save_LIBS
7172 fi
7173 eval ac_res=\$$as_ac_Lib
7174                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7175 $as_echo "$ac_res" >&6; }
7176 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7177   apu_has_ldapssl_install_routines="1"
7178 fi
7179
7180         apu_has_ldap="1";
7181
7182 fi
7183
7184   fi
7185
7186
7187   if test ${apu_has_ldap} != "1"; then
7188     ldaplib="ldapssl30"
7189     extralib=
7190     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7191
7192     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7193
7194     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7195     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7196     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7198 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7199 if eval \${$as_ac_Lib+:} false; then :
7200   $as_echo_n "(cached) " >&6
7201 else
7202   ac_check_lib_save_LIBS=$LIBS
7203 LIBS="-l${ldaplib} ${extralib} $LIBS"
7204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7205 /* end confdefs.h.  */
7206
7207 /* Override any GCC internal prototype to avoid an error.
7208    Use char because int might match the return type of a GCC
7209    builtin and then its argument prototype would still apply.  */
7210 #ifdef __cplusplus
7211 extern "C"
7212 #endif
7213 char ldap_init ();
7214 int
7215 main ()
7216 {
7217 return ldap_init ();
7218   ;
7219   return 0;
7220 }
7221 _ACEOF
7222 if ac_fn_c_try_link "$LINENO"; then :
7223   eval "$as_ac_Lib=yes"
7224 else
7225   eval "$as_ac_Lib=no"
7226 fi
7227 rm -f core conftest.err conftest.$ac_objext \
7228     conftest$ac_exeext conftest.$ac_ext
7229 LIBS=$ac_check_lib_save_LIBS
7230 fi
7231 eval ac_res=\$$as_ac_Lib
7232                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7233 $as_echo "$ac_res" >&6; }
7234 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7235
7236         LDADD_ldap_found="-l${ldaplib} ${extralib}"
7237         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7239 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7240 if eval \${$as_ac_Lib+:} false; then :
7241   $as_echo_n "(cached) " >&6
7242 else
7243   ac_check_lib_save_LIBS=$LIBS
7244 LIBS="-l${ldaplib} ${extralib} $LIBS"
7245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7246 /* end confdefs.h.  */
7247
7248 /* Override any GCC internal prototype to avoid an error.
7249    Use char because int might match the return type of a GCC
7250    builtin and then its argument prototype would still apply.  */
7251 #ifdef __cplusplus
7252 extern "C"
7253 #endif
7254 char ldapssl_client_init ();
7255 int
7256 main ()
7257 {
7258 return ldapssl_client_init ();
7259   ;
7260   return 0;
7261 }
7262 _ACEOF
7263 if ac_fn_c_try_link "$LINENO"; then :
7264   eval "$as_ac_Lib=yes"
7265 else
7266   eval "$as_ac_Lib=no"
7267 fi
7268 rm -f core conftest.err conftest.$ac_objext \
7269     conftest$ac_exeext conftest.$ac_ext
7270 LIBS=$ac_check_lib_save_LIBS
7271 fi
7272 eval ac_res=\$$as_ac_Lib
7273                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7274 $as_echo "$ac_res" >&6; }
7275 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7276   apu_has_ldapssl_client_init="1"
7277 fi
7278
7279         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7281 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7282 if eval \${$as_ac_Lib+:} false; then :
7283   $as_echo_n "(cached) " >&6
7284 else
7285   ac_check_lib_save_LIBS=$LIBS
7286 LIBS="-l${ldaplib} ${extralib} $LIBS"
7287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7288 /* end confdefs.h.  */
7289
7290 /* Override any GCC internal prototype to avoid an error.
7291    Use char because int might match the return type of a GCC
7292    builtin and then its argument prototype would still apply.  */
7293 #ifdef __cplusplus
7294 extern "C"
7295 #endif
7296 char ldapssl_client_deinit ();
7297 int
7298 main ()
7299 {
7300 return ldapssl_client_deinit ();
7301   ;
7302   return 0;
7303 }
7304 _ACEOF
7305 if ac_fn_c_try_link "$LINENO"; then :
7306   eval "$as_ac_Lib=yes"
7307 else
7308   eval "$as_ac_Lib=no"
7309 fi
7310 rm -f core conftest.err conftest.$ac_objext \
7311     conftest$ac_exeext conftest.$ac_ext
7312 LIBS=$ac_check_lib_save_LIBS
7313 fi
7314 eval ac_res=\$$as_ac_Lib
7315                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7316 $as_echo "$ac_res" >&6; }
7317 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7318   apu_has_ldapssl_client_deinit="1"
7319 fi
7320
7321         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7323 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7324 if eval \${$as_ac_Lib+:} false; then :
7325   $as_echo_n "(cached) " >&6
7326 else
7327   ac_check_lib_save_LIBS=$LIBS
7328 LIBS="-l${ldaplib} ${extralib} $LIBS"
7329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7330 /* end confdefs.h.  */
7331
7332 /* Override any GCC internal prototype to avoid an error.
7333    Use char because int might match the return type of a GCC
7334    builtin and then its argument prototype would still apply.  */
7335 #ifdef __cplusplus
7336 extern "C"
7337 #endif
7338 char ldapssl_add_trusted_cert ();
7339 int
7340 main ()
7341 {
7342 return ldapssl_add_trusted_cert ();
7343   ;
7344   return 0;
7345 }
7346 _ACEOF
7347 if ac_fn_c_try_link "$LINENO"; then :
7348   eval "$as_ac_Lib=yes"
7349 else
7350   eval "$as_ac_Lib=no"
7351 fi
7352 rm -f core conftest.err conftest.$ac_objext \
7353     conftest$ac_exeext conftest.$ac_ext
7354 LIBS=$ac_check_lib_save_LIBS
7355 fi
7356 eval ac_res=\$$as_ac_Lib
7357                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7358 $as_echo "$ac_res" >&6; }
7359 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7360   apu_has_ldapssl_add_trusted_cert="1"
7361 fi
7362
7363         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7365 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7366 if eval \${$as_ac_Lib+:} false; then :
7367   $as_echo_n "(cached) " >&6
7368 else
7369   ac_check_lib_save_LIBS=$LIBS
7370 LIBS="-l${ldaplib} ${extralib} $LIBS"
7371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7372 /* end confdefs.h.  */
7373
7374 /* Override any GCC internal prototype to avoid an error.
7375    Use char because int might match the return type of a GCC
7376    builtin and then its argument prototype would still apply.  */
7377 #ifdef __cplusplus
7378 extern "C"
7379 #endif
7380 char ldap_start_tls_s ();
7381 int
7382 main ()
7383 {
7384 return ldap_start_tls_s ();
7385   ;
7386   return 0;
7387 }
7388 _ACEOF
7389 if ac_fn_c_try_link "$LINENO"; then :
7390   eval "$as_ac_Lib=yes"
7391 else
7392   eval "$as_ac_Lib=no"
7393 fi
7394 rm -f core conftest.err conftest.$ac_objext \
7395     conftest$ac_exeext conftest.$ac_ext
7396 LIBS=$ac_check_lib_save_LIBS
7397 fi
7398 eval ac_res=\$$as_ac_Lib
7399                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7400 $as_echo "$ac_res" >&6; }
7401 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7402   apu_has_ldap_start_tls_s="1"
7403 fi
7404
7405         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7407 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7408 if eval \${$as_ac_Lib+:} false; then :
7409   $as_echo_n "(cached) " >&6
7410 else
7411   ac_check_lib_save_LIBS=$LIBS
7412 LIBS="-l${ldaplib} ${extralib} $LIBS"
7413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7414 /* end confdefs.h.  */
7415
7416 /* Override any GCC internal prototype to avoid an error.
7417    Use char because int might match the return type of a GCC
7418    builtin and then its argument prototype would still apply.  */
7419 #ifdef __cplusplus
7420 extern "C"
7421 #endif
7422 char ldap_sslinit ();
7423 int
7424 main ()
7425 {
7426 return ldap_sslinit ();
7427   ;
7428   return 0;
7429 }
7430 _ACEOF
7431 if ac_fn_c_try_link "$LINENO"; then :
7432   eval "$as_ac_Lib=yes"
7433 else
7434   eval "$as_ac_Lib=no"
7435 fi
7436 rm -f core conftest.err conftest.$ac_objext \
7437     conftest$ac_exeext conftest.$ac_ext
7438 LIBS=$ac_check_lib_save_LIBS
7439 fi
7440 eval ac_res=\$$as_ac_Lib
7441                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7442 $as_echo "$ac_res" >&6; }
7443 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7444   apu_has_ldap_sslinit="1"
7445 fi
7446
7447         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7449 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7450 if eval \${$as_ac_Lib+:} false; then :
7451   $as_echo_n "(cached) " >&6
7452 else
7453   ac_check_lib_save_LIBS=$LIBS
7454 LIBS="-l${ldaplib} ${extralib} $LIBS"
7455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7456 /* end confdefs.h.  */
7457
7458 /* Override any GCC internal prototype to avoid an error.
7459    Use char because int might match the return type of a GCC
7460    builtin and then its argument prototype would still apply.  */
7461 #ifdef __cplusplus
7462 extern "C"
7463 #endif
7464 char ldapssl_init ();
7465 int
7466 main ()
7467 {
7468 return ldapssl_init ();
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 if ac_fn_c_try_link "$LINENO"; then :
7474   eval "$as_ac_Lib=yes"
7475 else
7476   eval "$as_ac_Lib=no"
7477 fi
7478 rm -f core conftest.err conftest.$ac_objext \
7479     conftest$ac_exeext conftest.$ac_ext
7480 LIBS=$ac_check_lib_save_LIBS
7481 fi
7482 eval ac_res=\$$as_ac_Lib
7483                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7484 $as_echo "$ac_res" >&6; }
7485 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7486   apu_has_ldapssl_init="1"
7487 fi
7488
7489         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7491 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7492 if eval \${$as_ac_Lib+:} false; then :
7493   $as_echo_n "(cached) " >&6
7494 else
7495   ac_check_lib_save_LIBS=$LIBS
7496 LIBS="-l${ldaplib} ${extralib} $LIBS"
7497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7498 /* end confdefs.h.  */
7499
7500 /* Override any GCC internal prototype to avoid an error.
7501    Use char because int might match the return type of a GCC
7502    builtin and then its argument prototype would still apply.  */
7503 #ifdef __cplusplus
7504 extern "C"
7505 #endif
7506 char ldapssl_install_routines ();
7507 int
7508 main ()
7509 {
7510 return ldapssl_install_routines ();
7511   ;
7512   return 0;
7513 }
7514 _ACEOF
7515 if ac_fn_c_try_link "$LINENO"; then :
7516   eval "$as_ac_Lib=yes"
7517 else
7518   eval "$as_ac_Lib=no"
7519 fi
7520 rm -f core conftest.err conftest.$ac_objext \
7521     conftest$ac_exeext conftest.$ac_ext
7522 LIBS=$ac_check_lib_save_LIBS
7523 fi
7524 eval ac_res=\$$as_ac_Lib
7525                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7526 $as_echo "$ac_res" >&6; }
7527 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7528   apu_has_ldapssl_install_routines="1"
7529 fi
7530
7531         apu_has_ldap="1";
7532
7533 fi
7534
7535   fi
7536
7537
7538   if test ${apu_has_ldap} != "1"; then
7539     ldaplib="ldapssl20"
7540     extralib=
7541     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7542
7543     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7544
7545     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7546     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7547     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7549 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7550 if eval \${$as_ac_Lib+:} false; then :
7551   $as_echo_n "(cached) " >&6
7552 else
7553   ac_check_lib_save_LIBS=$LIBS
7554 LIBS="-l${ldaplib} ${extralib} $LIBS"
7555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7556 /* end confdefs.h.  */
7557
7558 /* Override any GCC internal prototype to avoid an error.
7559    Use char because int might match the return type of a GCC
7560    builtin and then its argument prototype would still apply.  */
7561 #ifdef __cplusplus
7562 extern "C"
7563 #endif
7564 char ldap_init ();
7565 int
7566 main ()
7567 {
7568 return ldap_init ();
7569   ;
7570   return 0;
7571 }
7572 _ACEOF
7573 if ac_fn_c_try_link "$LINENO"; then :
7574   eval "$as_ac_Lib=yes"
7575 else
7576   eval "$as_ac_Lib=no"
7577 fi
7578 rm -f core conftest.err conftest.$ac_objext \
7579     conftest$ac_exeext conftest.$ac_ext
7580 LIBS=$ac_check_lib_save_LIBS
7581 fi
7582 eval ac_res=\$$as_ac_Lib
7583                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7584 $as_echo "$ac_res" >&6; }
7585 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7586
7587         LDADD_ldap_found="-l${ldaplib} ${extralib}"
7588         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7590 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7591 if eval \${$as_ac_Lib+:} false; then :
7592   $as_echo_n "(cached) " >&6
7593 else
7594   ac_check_lib_save_LIBS=$LIBS
7595 LIBS="-l${ldaplib} ${extralib} $LIBS"
7596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7597 /* end confdefs.h.  */
7598
7599 /* Override any GCC internal prototype to avoid an error.
7600    Use char because int might match the return type of a GCC
7601    builtin and then its argument prototype would still apply.  */
7602 #ifdef __cplusplus
7603 extern "C"
7604 #endif
7605 char ldapssl_client_init ();
7606 int
7607 main ()
7608 {
7609 return ldapssl_client_init ();
7610   ;
7611   return 0;
7612 }
7613 _ACEOF
7614 if ac_fn_c_try_link "$LINENO"; then :
7615   eval "$as_ac_Lib=yes"
7616 else
7617   eval "$as_ac_Lib=no"
7618 fi
7619 rm -f core conftest.err conftest.$ac_objext \
7620     conftest$ac_exeext conftest.$ac_ext
7621 LIBS=$ac_check_lib_save_LIBS
7622 fi
7623 eval ac_res=\$$as_ac_Lib
7624                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7625 $as_echo "$ac_res" >&6; }
7626 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7627   apu_has_ldapssl_client_init="1"
7628 fi
7629
7630         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7632 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7633 if eval \${$as_ac_Lib+:} false; then :
7634   $as_echo_n "(cached) " >&6
7635 else
7636   ac_check_lib_save_LIBS=$LIBS
7637 LIBS="-l${ldaplib} ${extralib} $LIBS"
7638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7639 /* end confdefs.h.  */
7640
7641 /* Override any GCC internal prototype to avoid an error.
7642    Use char because int might match the return type of a GCC
7643    builtin and then its argument prototype would still apply.  */
7644 #ifdef __cplusplus
7645 extern "C"
7646 #endif
7647 char ldapssl_client_deinit ();
7648 int
7649 main ()
7650 {
7651 return ldapssl_client_deinit ();
7652   ;
7653   return 0;
7654 }
7655 _ACEOF
7656 if ac_fn_c_try_link "$LINENO"; then :
7657   eval "$as_ac_Lib=yes"
7658 else
7659   eval "$as_ac_Lib=no"
7660 fi
7661 rm -f core conftest.err conftest.$ac_objext \
7662     conftest$ac_exeext conftest.$ac_ext
7663 LIBS=$ac_check_lib_save_LIBS
7664 fi
7665 eval ac_res=\$$as_ac_Lib
7666                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7667 $as_echo "$ac_res" >&6; }
7668 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7669   apu_has_ldapssl_client_deinit="1"
7670 fi
7671
7672         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7674 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7675 if eval \${$as_ac_Lib+:} false; then :
7676   $as_echo_n "(cached) " >&6
7677 else
7678   ac_check_lib_save_LIBS=$LIBS
7679 LIBS="-l${ldaplib} ${extralib} $LIBS"
7680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7681 /* end confdefs.h.  */
7682
7683 /* Override any GCC internal prototype to avoid an error.
7684    Use char because int might match the return type of a GCC
7685    builtin and then its argument prototype would still apply.  */
7686 #ifdef __cplusplus
7687 extern "C"
7688 #endif
7689 char ldapssl_add_trusted_cert ();
7690 int
7691 main ()
7692 {
7693 return ldapssl_add_trusted_cert ();
7694   ;
7695   return 0;
7696 }
7697 _ACEOF
7698 if ac_fn_c_try_link "$LINENO"; then :
7699   eval "$as_ac_Lib=yes"
7700 else
7701   eval "$as_ac_Lib=no"
7702 fi
7703 rm -f core conftest.err conftest.$ac_objext \
7704     conftest$ac_exeext conftest.$ac_ext
7705 LIBS=$ac_check_lib_save_LIBS
7706 fi
7707 eval ac_res=\$$as_ac_Lib
7708                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7709 $as_echo "$ac_res" >&6; }
7710 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7711   apu_has_ldapssl_add_trusted_cert="1"
7712 fi
7713
7714         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7716 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7717 if eval \${$as_ac_Lib+:} false; then :
7718   $as_echo_n "(cached) " >&6
7719 else
7720   ac_check_lib_save_LIBS=$LIBS
7721 LIBS="-l${ldaplib} ${extralib} $LIBS"
7722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7723 /* end confdefs.h.  */
7724
7725 /* Override any GCC internal prototype to avoid an error.
7726    Use char because int might match the return type of a GCC
7727    builtin and then its argument prototype would still apply.  */
7728 #ifdef __cplusplus
7729 extern "C"
7730 #endif
7731 char ldap_start_tls_s ();
7732 int
7733 main ()
7734 {
7735 return ldap_start_tls_s ();
7736   ;
7737   return 0;
7738 }
7739 _ACEOF
7740 if ac_fn_c_try_link "$LINENO"; then :
7741   eval "$as_ac_Lib=yes"
7742 else
7743   eval "$as_ac_Lib=no"
7744 fi
7745 rm -f core conftest.err conftest.$ac_objext \
7746     conftest$ac_exeext conftest.$ac_ext
7747 LIBS=$ac_check_lib_save_LIBS
7748 fi
7749 eval ac_res=\$$as_ac_Lib
7750                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7751 $as_echo "$ac_res" >&6; }
7752 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7753   apu_has_ldap_start_tls_s="1"
7754 fi
7755
7756         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7758 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7759 if eval \${$as_ac_Lib+:} false; then :
7760   $as_echo_n "(cached) " >&6
7761 else
7762   ac_check_lib_save_LIBS=$LIBS
7763 LIBS="-l${ldaplib} ${extralib} $LIBS"
7764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7765 /* end confdefs.h.  */
7766
7767 /* Override any GCC internal prototype to avoid an error.
7768    Use char because int might match the return type of a GCC
7769    builtin and then its argument prototype would still apply.  */
7770 #ifdef __cplusplus
7771 extern "C"
7772 #endif
7773 char ldap_sslinit ();
7774 int
7775 main ()
7776 {
7777 return ldap_sslinit ();
7778   ;
7779   return 0;
7780 }
7781 _ACEOF
7782 if ac_fn_c_try_link "$LINENO"; then :
7783   eval "$as_ac_Lib=yes"
7784 else
7785   eval "$as_ac_Lib=no"
7786 fi
7787 rm -f core conftest.err conftest.$ac_objext \
7788     conftest$ac_exeext conftest.$ac_ext
7789 LIBS=$ac_check_lib_save_LIBS
7790 fi
7791 eval ac_res=\$$as_ac_Lib
7792                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7793 $as_echo "$ac_res" >&6; }
7794 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7795   apu_has_ldap_sslinit="1"
7796 fi
7797
7798         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7800 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7801 if eval \${$as_ac_Lib+:} false; then :
7802   $as_echo_n "(cached) " >&6
7803 else
7804   ac_check_lib_save_LIBS=$LIBS
7805 LIBS="-l${ldaplib} ${extralib} $LIBS"
7806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7807 /* end confdefs.h.  */
7808
7809 /* Override any GCC internal prototype to avoid an error.
7810    Use char because int might match the return type of a GCC
7811    builtin and then its argument prototype would still apply.  */
7812 #ifdef __cplusplus
7813 extern "C"
7814 #endif
7815 char ldapssl_init ();
7816 int
7817 main ()
7818 {
7819 return ldapssl_init ();
7820   ;
7821   return 0;
7822 }
7823 _ACEOF
7824 if ac_fn_c_try_link "$LINENO"; then :
7825   eval "$as_ac_Lib=yes"
7826 else
7827   eval "$as_ac_Lib=no"
7828 fi
7829 rm -f core conftest.err conftest.$ac_objext \
7830     conftest$ac_exeext conftest.$ac_ext
7831 LIBS=$ac_check_lib_save_LIBS
7832 fi
7833 eval ac_res=\$$as_ac_Lib
7834                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7835 $as_echo "$ac_res" >&6; }
7836 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7837   apu_has_ldapssl_init="1"
7838 fi
7839
7840         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7842 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7843 if eval \${$as_ac_Lib+:} false; then :
7844   $as_echo_n "(cached) " >&6
7845 else
7846   ac_check_lib_save_LIBS=$LIBS
7847 LIBS="-l${ldaplib} ${extralib} $LIBS"
7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h.  */
7850
7851 /* Override any GCC internal prototype to avoid an error.
7852    Use char because int might match the return type of a GCC
7853    builtin and then its argument prototype would still apply.  */
7854 #ifdef __cplusplus
7855 extern "C"
7856 #endif
7857 char ldapssl_install_routines ();
7858 int
7859 main ()
7860 {
7861 return ldapssl_install_routines ();
7862   ;
7863   return 0;
7864 }
7865 _ACEOF
7866 if ac_fn_c_try_link "$LINENO"; then :
7867   eval "$as_ac_Lib=yes"
7868 else
7869   eval "$as_ac_Lib=no"
7870 fi
7871 rm -f core conftest.err conftest.$ac_objext \
7872     conftest$ac_exeext conftest.$ac_ext
7873 LIBS=$ac_check_lib_save_LIBS
7874 fi
7875 eval ac_res=\$$as_ac_Lib
7876                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7877 $as_echo "$ac_res" >&6; }
7878 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7879   apu_has_ldapssl_install_routines="1"
7880 fi
7881
7882         apu_has_ldap="1";
7883
7884 fi
7885
7886   fi
7887
7888
7889   if test ${apu_has_ldap} != "1"; then
7890     ldaplib="ldapsdk"
7891     extralib="-lldapx -lldapssl -lldapgss -lgssapi_krb5"
7892     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7893
7894     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7895
7896     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7897     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7898     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7900 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7901 if eval \${$as_ac_Lib+:} false; then :
7902   $as_echo_n "(cached) " >&6
7903 else
7904   ac_check_lib_save_LIBS=$LIBS
7905 LIBS="-l${ldaplib} ${extralib} $LIBS"
7906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7907 /* end confdefs.h.  */
7908
7909 /* Override any GCC internal prototype to avoid an error.
7910    Use char because int might match the return type of a GCC
7911    builtin and then its argument prototype would still apply.  */
7912 #ifdef __cplusplus
7913 extern "C"
7914 #endif
7915 char ldap_init ();
7916 int
7917 main ()
7918 {
7919 return ldap_init ();
7920   ;
7921   return 0;
7922 }
7923 _ACEOF
7924 if ac_fn_c_try_link "$LINENO"; then :
7925   eval "$as_ac_Lib=yes"
7926 else
7927   eval "$as_ac_Lib=no"
7928 fi
7929 rm -f core conftest.err conftest.$ac_objext \
7930     conftest$ac_exeext conftest.$ac_ext
7931 LIBS=$ac_check_lib_save_LIBS
7932 fi
7933 eval ac_res=\$$as_ac_Lib
7934                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7935 $as_echo "$ac_res" >&6; }
7936 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7937
7938         LDADD_ldap_found="-l${ldaplib} ${extralib}"
7939         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7941 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7942 if eval \${$as_ac_Lib+:} false; then :
7943   $as_echo_n "(cached) " >&6
7944 else
7945   ac_check_lib_save_LIBS=$LIBS
7946 LIBS="-l${ldaplib} ${extralib} $LIBS"
7947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7948 /* end confdefs.h.  */
7949
7950 /* Override any GCC internal prototype to avoid an error.
7951    Use char because int might match the return type of a GCC
7952    builtin and then its argument prototype would still apply.  */
7953 #ifdef __cplusplus
7954 extern "C"
7955 #endif
7956 char ldapssl_client_init ();
7957 int
7958 main ()
7959 {
7960 return ldapssl_client_init ();
7961   ;
7962   return 0;
7963 }
7964 _ACEOF
7965 if ac_fn_c_try_link "$LINENO"; then :
7966   eval "$as_ac_Lib=yes"
7967 else
7968   eval "$as_ac_Lib=no"
7969 fi
7970 rm -f core conftest.err conftest.$ac_objext \
7971     conftest$ac_exeext conftest.$ac_ext
7972 LIBS=$ac_check_lib_save_LIBS
7973 fi
7974 eval ac_res=\$$as_ac_Lib
7975                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7976 $as_echo "$ac_res" >&6; }
7977 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7978   apu_has_ldapssl_client_init="1"
7979 fi
7980
7981         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7983 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7984 if eval \${$as_ac_Lib+:} false; then :
7985   $as_echo_n "(cached) " >&6
7986 else
7987   ac_check_lib_save_LIBS=$LIBS
7988 LIBS="-l${ldaplib} ${extralib} $LIBS"
7989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7990 /* end confdefs.h.  */
7991
7992 /* Override any GCC internal prototype to avoid an error.
7993    Use char because int might match the return type of a GCC
7994    builtin and then its argument prototype would still apply.  */
7995 #ifdef __cplusplus
7996 extern "C"
7997 #endif
7998 char ldapssl_client_deinit ();
7999 int
8000 main ()
8001 {
8002 return ldapssl_client_deinit ();
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 if ac_fn_c_try_link "$LINENO"; then :
8008   eval "$as_ac_Lib=yes"
8009 else
8010   eval "$as_ac_Lib=no"
8011 fi
8012 rm -f core conftest.err conftest.$ac_objext \
8013     conftest$ac_exeext conftest.$ac_ext
8014 LIBS=$ac_check_lib_save_LIBS
8015 fi
8016 eval ac_res=\$$as_ac_Lib
8017                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8018 $as_echo "$ac_res" >&6; }
8019 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8020   apu_has_ldapssl_client_deinit="1"
8021 fi
8022
8023         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8025 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8026 if eval \${$as_ac_Lib+:} false; then :
8027   $as_echo_n "(cached) " >&6
8028 else
8029   ac_check_lib_save_LIBS=$LIBS
8030 LIBS="-l${ldaplib} ${extralib} $LIBS"
8031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8032 /* end confdefs.h.  */
8033
8034 /* Override any GCC internal prototype to avoid an error.
8035    Use char because int might match the return type of a GCC
8036    builtin and then its argument prototype would still apply.  */
8037 #ifdef __cplusplus
8038 extern "C"
8039 #endif
8040 char ldapssl_add_trusted_cert ();
8041 int
8042 main ()
8043 {
8044 return ldapssl_add_trusted_cert ();
8045   ;
8046   return 0;
8047 }
8048 _ACEOF
8049 if ac_fn_c_try_link "$LINENO"; then :
8050   eval "$as_ac_Lib=yes"
8051 else
8052   eval "$as_ac_Lib=no"
8053 fi
8054 rm -f core conftest.err conftest.$ac_objext \
8055     conftest$ac_exeext conftest.$ac_ext
8056 LIBS=$ac_check_lib_save_LIBS
8057 fi
8058 eval ac_res=\$$as_ac_Lib
8059                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8060 $as_echo "$ac_res" >&6; }
8061 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8062   apu_has_ldapssl_add_trusted_cert="1"
8063 fi
8064
8065         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8067 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8068 if eval \${$as_ac_Lib+:} false; then :
8069   $as_echo_n "(cached) " >&6
8070 else
8071   ac_check_lib_save_LIBS=$LIBS
8072 LIBS="-l${ldaplib} ${extralib} $LIBS"
8073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8074 /* end confdefs.h.  */
8075
8076 /* Override any GCC internal prototype to avoid an error.
8077    Use char because int might match the return type of a GCC
8078    builtin and then its argument prototype would still apply.  */
8079 #ifdef __cplusplus
8080 extern "C"
8081 #endif
8082 char ldap_start_tls_s ();
8083 int
8084 main ()
8085 {
8086 return ldap_start_tls_s ();
8087   ;
8088   return 0;
8089 }
8090 _ACEOF
8091 if ac_fn_c_try_link "$LINENO"; then :
8092   eval "$as_ac_Lib=yes"
8093 else
8094   eval "$as_ac_Lib=no"
8095 fi
8096 rm -f core conftest.err conftest.$ac_objext \
8097     conftest$ac_exeext conftest.$ac_ext
8098 LIBS=$ac_check_lib_save_LIBS
8099 fi
8100 eval ac_res=\$$as_ac_Lib
8101                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8102 $as_echo "$ac_res" >&6; }
8103 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8104   apu_has_ldap_start_tls_s="1"
8105 fi
8106
8107         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8109 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8110 if eval \${$as_ac_Lib+:} false; then :
8111   $as_echo_n "(cached) " >&6
8112 else
8113   ac_check_lib_save_LIBS=$LIBS
8114 LIBS="-l${ldaplib} ${extralib} $LIBS"
8115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8116 /* end confdefs.h.  */
8117
8118 /* Override any GCC internal prototype to avoid an error.
8119    Use char because int might match the return type of a GCC
8120    builtin and then its argument prototype would still apply.  */
8121 #ifdef __cplusplus
8122 extern "C"
8123 #endif
8124 char ldap_sslinit ();
8125 int
8126 main ()
8127 {
8128 return ldap_sslinit ();
8129   ;
8130   return 0;
8131 }
8132 _ACEOF
8133 if ac_fn_c_try_link "$LINENO"; then :
8134   eval "$as_ac_Lib=yes"
8135 else
8136   eval "$as_ac_Lib=no"
8137 fi
8138 rm -f core conftest.err conftest.$ac_objext \
8139     conftest$ac_exeext conftest.$ac_ext
8140 LIBS=$ac_check_lib_save_LIBS
8141 fi
8142 eval ac_res=\$$as_ac_Lib
8143                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8144 $as_echo "$ac_res" >&6; }
8145 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8146   apu_has_ldap_sslinit="1"
8147 fi
8148
8149         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8151 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8152 if eval \${$as_ac_Lib+:} false; then :
8153   $as_echo_n "(cached) " >&6
8154 else
8155   ac_check_lib_save_LIBS=$LIBS
8156 LIBS="-l${ldaplib} ${extralib} $LIBS"
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h.  */
8159
8160 /* Override any GCC internal prototype to avoid an error.
8161    Use char because int might match the return type of a GCC
8162    builtin and then its argument prototype would still apply.  */
8163 #ifdef __cplusplus
8164 extern "C"
8165 #endif
8166 char ldapssl_init ();
8167 int
8168 main ()
8169 {
8170 return ldapssl_init ();
8171   ;
8172   return 0;
8173 }
8174 _ACEOF
8175 if ac_fn_c_try_link "$LINENO"; then :
8176   eval "$as_ac_Lib=yes"
8177 else
8178   eval "$as_ac_Lib=no"
8179 fi
8180 rm -f core conftest.err conftest.$ac_objext \
8181     conftest$ac_exeext conftest.$ac_ext
8182 LIBS=$ac_check_lib_save_LIBS
8183 fi
8184 eval ac_res=\$$as_ac_Lib
8185                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8186 $as_echo "$ac_res" >&6; }
8187 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8188   apu_has_ldapssl_init="1"
8189 fi
8190
8191         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8193 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8194 if eval \${$as_ac_Lib+:} false; then :
8195   $as_echo_n "(cached) " >&6
8196 else
8197   ac_check_lib_save_LIBS=$LIBS
8198 LIBS="-l${ldaplib} ${extralib} $LIBS"
8199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8200 /* end confdefs.h.  */
8201
8202 /* Override any GCC internal prototype to avoid an error.
8203    Use char because int might match the return type of a GCC
8204    builtin and then its argument prototype would still apply.  */
8205 #ifdef __cplusplus
8206 extern "C"
8207 #endif
8208 char ldapssl_install_routines ();
8209 int
8210 main ()
8211 {
8212 return ldapssl_install_routines ();
8213   ;
8214   return 0;
8215 }
8216 _ACEOF
8217 if ac_fn_c_try_link "$LINENO"; then :
8218   eval "$as_ac_Lib=yes"
8219 else
8220   eval "$as_ac_Lib=no"
8221 fi
8222 rm -f core conftest.err conftest.$ac_objext \
8223     conftest$ac_exeext conftest.$ac_ext
8224 LIBS=$ac_check_lib_save_LIBS
8225 fi
8226 eval ac_res=\$$as_ac_Lib
8227                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8228 $as_echo "$ac_res" >&6; }
8229 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8230   apu_has_ldapssl_install_routines="1"
8231 fi
8232
8233         apu_has_ldap="1";
8234
8235 fi
8236
8237   fi
8238
8239
8240   if test ${apu_has_ldap} != "1"; then
8241     ldaplib="ldapsdk"
8242     extralib="-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket"
8243     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8244
8245     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8246
8247     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8248     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8249     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8251 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8252 if eval \${$as_ac_Lib+:} false; then :
8253   $as_echo_n "(cached) " >&6
8254 else
8255   ac_check_lib_save_LIBS=$LIBS
8256 LIBS="-l${ldaplib} ${extralib} $LIBS"
8257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8258 /* end confdefs.h.  */
8259
8260 /* Override any GCC internal prototype to avoid an error.
8261    Use char because int might match the return type of a GCC
8262    builtin and then its argument prototype would still apply.  */
8263 #ifdef __cplusplus
8264 extern "C"
8265 #endif
8266 char ldap_init ();
8267 int
8268 main ()
8269 {
8270 return ldap_init ();
8271   ;
8272   return 0;
8273 }
8274 _ACEOF
8275 if ac_fn_c_try_link "$LINENO"; then :
8276   eval "$as_ac_Lib=yes"
8277 else
8278   eval "$as_ac_Lib=no"
8279 fi
8280 rm -f core conftest.err conftest.$ac_objext \
8281     conftest$ac_exeext conftest.$ac_ext
8282 LIBS=$ac_check_lib_save_LIBS
8283 fi
8284 eval ac_res=\$$as_ac_Lib
8285                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8286 $as_echo "$ac_res" >&6; }
8287 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8288
8289         LDADD_ldap_found="-l${ldaplib} ${extralib}"
8290         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8292 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8293 if eval \${$as_ac_Lib+:} false; then :
8294   $as_echo_n "(cached) " >&6
8295 else
8296   ac_check_lib_save_LIBS=$LIBS
8297 LIBS="-l${ldaplib} ${extralib} $LIBS"
8298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8299 /* end confdefs.h.  */
8300
8301 /* Override any GCC internal prototype to avoid an error.
8302    Use char because int might match the return type of a GCC
8303    builtin and then its argument prototype would still apply.  */
8304 #ifdef __cplusplus
8305 extern "C"
8306 #endif
8307 char ldapssl_client_init ();
8308 int
8309 main ()
8310 {
8311 return ldapssl_client_init ();
8312   ;
8313   return 0;
8314 }
8315 _ACEOF
8316 if ac_fn_c_try_link "$LINENO"; then :
8317   eval "$as_ac_Lib=yes"
8318 else
8319   eval "$as_ac_Lib=no"
8320 fi
8321 rm -f core conftest.err conftest.$ac_objext \
8322     conftest$ac_exeext conftest.$ac_ext
8323 LIBS=$ac_check_lib_save_LIBS
8324 fi
8325 eval ac_res=\$$as_ac_Lib
8326                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8327 $as_echo "$ac_res" >&6; }
8328 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8329   apu_has_ldapssl_client_init="1"
8330 fi
8331
8332         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8334 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8335 if eval \${$as_ac_Lib+:} false; then :
8336   $as_echo_n "(cached) " >&6
8337 else
8338   ac_check_lib_save_LIBS=$LIBS
8339 LIBS="-l${ldaplib} ${extralib} $LIBS"
8340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8341 /* end confdefs.h.  */
8342
8343 /* Override any GCC internal prototype to avoid an error.
8344    Use char because int might match the return type of a GCC
8345    builtin and then its argument prototype would still apply.  */
8346 #ifdef __cplusplus
8347 extern "C"
8348 #endif
8349 char ldapssl_client_deinit ();
8350 int
8351 main ()
8352 {
8353 return ldapssl_client_deinit ();
8354   ;
8355   return 0;
8356 }
8357 _ACEOF
8358 if ac_fn_c_try_link "$LINENO"; then :
8359   eval "$as_ac_Lib=yes"
8360 else
8361   eval "$as_ac_Lib=no"
8362 fi
8363 rm -f core conftest.err conftest.$ac_objext \
8364     conftest$ac_exeext conftest.$ac_ext
8365 LIBS=$ac_check_lib_save_LIBS
8366 fi
8367 eval ac_res=\$$as_ac_Lib
8368                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8369 $as_echo "$ac_res" >&6; }
8370 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8371   apu_has_ldapssl_client_deinit="1"
8372 fi
8373
8374         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8376 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8377 if eval \${$as_ac_Lib+:} false; then :
8378   $as_echo_n "(cached) " >&6
8379 else
8380   ac_check_lib_save_LIBS=$LIBS
8381 LIBS="-l${ldaplib} ${extralib} $LIBS"
8382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8383 /* end confdefs.h.  */
8384
8385 /* Override any GCC internal prototype to avoid an error.
8386    Use char because int might match the return type of a GCC
8387    builtin and then its argument prototype would still apply.  */
8388 #ifdef __cplusplus
8389 extern "C"
8390 #endif
8391 char ldapssl_add_trusted_cert ();
8392 int
8393 main ()
8394 {
8395 return ldapssl_add_trusted_cert ();
8396   ;
8397   return 0;
8398 }
8399 _ACEOF
8400 if ac_fn_c_try_link "$LINENO"; then :
8401   eval "$as_ac_Lib=yes"
8402 else
8403   eval "$as_ac_Lib=no"
8404 fi
8405 rm -f core conftest.err conftest.$ac_objext \
8406     conftest$ac_exeext conftest.$ac_ext
8407 LIBS=$ac_check_lib_save_LIBS
8408 fi
8409 eval ac_res=\$$as_ac_Lib
8410                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8411 $as_echo "$ac_res" >&6; }
8412 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8413   apu_has_ldapssl_add_trusted_cert="1"
8414 fi
8415
8416         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8418 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8419 if eval \${$as_ac_Lib+:} false; then :
8420   $as_echo_n "(cached) " >&6
8421 else
8422   ac_check_lib_save_LIBS=$LIBS
8423 LIBS="-l${ldaplib} ${extralib} $LIBS"
8424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8425 /* end confdefs.h.  */
8426
8427 /* Override any GCC internal prototype to avoid an error.
8428    Use char because int might match the return type of a GCC
8429    builtin and then its argument prototype would still apply.  */
8430 #ifdef __cplusplus
8431 extern "C"
8432 #endif
8433 char ldap_start_tls_s ();
8434 int
8435 main ()
8436 {
8437 return ldap_start_tls_s ();
8438   ;
8439   return 0;
8440 }
8441 _ACEOF
8442 if ac_fn_c_try_link "$LINENO"; then :
8443   eval "$as_ac_Lib=yes"
8444 else
8445   eval "$as_ac_Lib=no"
8446 fi
8447 rm -f core conftest.err conftest.$ac_objext \
8448     conftest$ac_exeext conftest.$ac_ext
8449 LIBS=$ac_check_lib_save_LIBS
8450 fi
8451 eval ac_res=\$$as_ac_Lib
8452                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8453 $as_echo "$ac_res" >&6; }
8454 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8455   apu_has_ldap_start_tls_s="1"
8456 fi
8457
8458         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8460 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8461 if eval \${$as_ac_Lib+:} false; then :
8462   $as_echo_n "(cached) " >&6
8463 else
8464   ac_check_lib_save_LIBS=$LIBS
8465 LIBS="-l${ldaplib} ${extralib} $LIBS"
8466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8467 /* end confdefs.h.  */
8468
8469 /* Override any GCC internal prototype to avoid an error.
8470    Use char because int might match the return type of a GCC
8471    builtin and then its argument prototype would still apply.  */
8472 #ifdef __cplusplus
8473 extern "C"
8474 #endif
8475 char ldap_sslinit ();
8476 int
8477 main ()
8478 {
8479 return ldap_sslinit ();
8480   ;
8481   return 0;
8482 }
8483 _ACEOF
8484 if ac_fn_c_try_link "$LINENO"; then :
8485   eval "$as_ac_Lib=yes"
8486 else
8487   eval "$as_ac_Lib=no"
8488 fi
8489 rm -f core conftest.err conftest.$ac_objext \
8490     conftest$ac_exeext conftest.$ac_ext
8491 LIBS=$ac_check_lib_save_LIBS
8492 fi
8493 eval ac_res=\$$as_ac_Lib
8494                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8495 $as_echo "$ac_res" >&6; }
8496 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8497   apu_has_ldap_sslinit="1"
8498 fi
8499
8500         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8502 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8503 if eval \${$as_ac_Lib+:} false; then :
8504   $as_echo_n "(cached) " >&6
8505 else
8506   ac_check_lib_save_LIBS=$LIBS
8507 LIBS="-l${ldaplib} ${extralib} $LIBS"
8508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8509 /* end confdefs.h.  */
8510
8511 /* Override any GCC internal prototype to avoid an error.
8512    Use char because int might match the return type of a GCC
8513    builtin and then its argument prototype would still apply.  */
8514 #ifdef __cplusplus
8515 extern "C"
8516 #endif
8517 char ldapssl_init ();
8518 int
8519 main ()
8520 {
8521 return ldapssl_init ();
8522   ;
8523   return 0;
8524 }
8525 _ACEOF
8526 if ac_fn_c_try_link "$LINENO"; then :
8527   eval "$as_ac_Lib=yes"
8528 else
8529   eval "$as_ac_Lib=no"
8530 fi
8531 rm -f core conftest.err conftest.$ac_objext \
8532     conftest$ac_exeext conftest.$ac_ext
8533 LIBS=$ac_check_lib_save_LIBS
8534 fi
8535 eval ac_res=\$$as_ac_Lib
8536                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8537 $as_echo "$ac_res" >&6; }
8538 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8539   apu_has_ldapssl_init="1"
8540 fi
8541
8542         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8544 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8545 if eval \${$as_ac_Lib+:} false; then :
8546   $as_echo_n "(cached) " >&6
8547 else
8548   ac_check_lib_save_LIBS=$LIBS
8549 LIBS="-l${ldaplib} ${extralib} $LIBS"
8550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8551 /* end confdefs.h.  */
8552
8553 /* Override any GCC internal prototype to avoid an error.
8554    Use char because int might match the return type of a GCC
8555    builtin and then its argument prototype would still apply.  */
8556 #ifdef __cplusplus
8557 extern "C"
8558 #endif
8559 char ldapssl_install_routines ();
8560 int
8561 main ()
8562 {
8563 return ldapssl_install_routines ();
8564   ;
8565   return 0;
8566 }
8567 _ACEOF
8568 if ac_fn_c_try_link "$LINENO"; then :
8569   eval "$as_ac_Lib=yes"
8570 else
8571   eval "$as_ac_Lib=no"
8572 fi
8573 rm -f core conftest.err conftest.$ac_objext \
8574     conftest$ac_exeext conftest.$ac_ext
8575 LIBS=$ac_check_lib_save_LIBS
8576 fi
8577 eval ac_res=\$$as_ac_Lib
8578                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8579 $as_echo "$ac_res" >&6; }
8580 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8581   apu_has_ldapssl_install_routines="1"
8582 fi
8583
8584         apu_has_ldap="1";
8585
8586 fi
8587
8588   fi
8589
8590
8591   if test ${apu_has_ldap} != "1"; then
8592     ldaplib="ldap"
8593     extralib="-llber"
8594     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8595
8596     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8597
8598     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8599     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8600     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8602 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8603 if eval \${$as_ac_Lib+:} false; then :
8604   $as_echo_n "(cached) " >&6
8605 else
8606   ac_check_lib_save_LIBS=$LIBS
8607 LIBS="-l${ldaplib} ${extralib} $LIBS"
8608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8609 /* end confdefs.h.  */
8610
8611 /* Override any GCC internal prototype to avoid an error.
8612    Use char because int might match the return type of a GCC
8613    builtin and then its argument prototype would still apply.  */
8614 #ifdef __cplusplus
8615 extern "C"
8616 #endif
8617 char ldap_init ();
8618 int
8619 main ()
8620 {
8621 return ldap_init ();
8622   ;
8623   return 0;
8624 }
8625 _ACEOF
8626 if ac_fn_c_try_link "$LINENO"; then :
8627   eval "$as_ac_Lib=yes"
8628 else
8629   eval "$as_ac_Lib=no"
8630 fi
8631 rm -f core conftest.err conftest.$ac_objext \
8632     conftest$ac_exeext conftest.$ac_ext
8633 LIBS=$ac_check_lib_save_LIBS
8634 fi
8635 eval ac_res=\$$as_ac_Lib
8636                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8637 $as_echo "$ac_res" >&6; }
8638 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8639
8640         LDADD_ldap_found="-l${ldaplib} ${extralib}"
8641         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8643 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8644 if eval \${$as_ac_Lib+:} false; then :
8645   $as_echo_n "(cached) " >&6
8646 else
8647   ac_check_lib_save_LIBS=$LIBS
8648 LIBS="-l${ldaplib} ${extralib} $LIBS"
8649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8650 /* end confdefs.h.  */
8651
8652 /* Override any GCC internal prototype to avoid an error.
8653    Use char because int might match the return type of a GCC
8654    builtin and then its argument prototype would still apply.  */
8655 #ifdef __cplusplus
8656 extern "C"
8657 #endif
8658 char ldapssl_client_init ();
8659 int
8660 main ()
8661 {
8662 return ldapssl_client_init ();
8663   ;
8664   return 0;
8665 }
8666 _ACEOF
8667 if ac_fn_c_try_link "$LINENO"; then :
8668   eval "$as_ac_Lib=yes"
8669 else
8670   eval "$as_ac_Lib=no"
8671 fi
8672 rm -f core conftest.err conftest.$ac_objext \
8673     conftest$ac_exeext conftest.$ac_ext
8674 LIBS=$ac_check_lib_save_LIBS
8675 fi
8676 eval ac_res=\$$as_ac_Lib
8677                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8678 $as_echo "$ac_res" >&6; }
8679 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8680   apu_has_ldapssl_client_init="1"
8681 fi
8682
8683         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8685 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8686 if eval \${$as_ac_Lib+:} false; then :
8687   $as_echo_n "(cached) " >&6
8688 else
8689   ac_check_lib_save_LIBS=$LIBS
8690 LIBS="-l${ldaplib} ${extralib} $LIBS"
8691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8692 /* end confdefs.h.  */
8693
8694 /* Override any GCC internal prototype to avoid an error.
8695    Use char because int might match the return type of a GCC
8696    builtin and then its argument prototype would still apply.  */
8697 #ifdef __cplusplus
8698 extern "C"
8699 #endif
8700 char ldapssl_client_deinit ();
8701 int
8702 main ()
8703 {
8704 return ldapssl_client_deinit ();
8705   ;
8706   return 0;
8707 }
8708 _ACEOF
8709 if ac_fn_c_try_link "$LINENO"; then :
8710   eval "$as_ac_Lib=yes"
8711 else
8712   eval "$as_ac_Lib=no"
8713 fi
8714 rm -f core conftest.err conftest.$ac_objext \
8715     conftest$ac_exeext conftest.$ac_ext
8716 LIBS=$ac_check_lib_save_LIBS
8717 fi
8718 eval ac_res=\$$as_ac_Lib
8719                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8720 $as_echo "$ac_res" >&6; }
8721 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8722   apu_has_ldapssl_client_deinit="1"
8723 fi
8724
8725         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8727 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8728 if eval \${$as_ac_Lib+:} false; then :
8729   $as_echo_n "(cached) " >&6
8730 else
8731   ac_check_lib_save_LIBS=$LIBS
8732 LIBS="-l${ldaplib} ${extralib} $LIBS"
8733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8734 /* end confdefs.h.  */
8735
8736 /* Override any GCC internal prototype to avoid an error.
8737    Use char because int might match the return type of a GCC
8738    builtin and then its argument prototype would still apply.  */
8739 #ifdef __cplusplus
8740 extern "C"
8741 #endif
8742 char ldapssl_add_trusted_cert ();
8743 int
8744 main ()
8745 {
8746 return ldapssl_add_trusted_cert ();
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 if ac_fn_c_try_link "$LINENO"; then :
8752   eval "$as_ac_Lib=yes"
8753 else
8754   eval "$as_ac_Lib=no"
8755 fi
8756 rm -f core conftest.err conftest.$ac_objext \
8757     conftest$ac_exeext conftest.$ac_ext
8758 LIBS=$ac_check_lib_save_LIBS
8759 fi
8760 eval ac_res=\$$as_ac_Lib
8761                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8762 $as_echo "$ac_res" >&6; }
8763 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8764   apu_has_ldapssl_add_trusted_cert="1"
8765 fi
8766
8767         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8769 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8770 if eval \${$as_ac_Lib+:} false; then :
8771   $as_echo_n "(cached) " >&6
8772 else
8773   ac_check_lib_save_LIBS=$LIBS
8774 LIBS="-l${ldaplib} ${extralib} $LIBS"
8775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8776 /* end confdefs.h.  */
8777
8778 /* Override any GCC internal prototype to avoid an error.
8779    Use char because int might match the return type of a GCC
8780    builtin and then its argument prototype would still apply.  */
8781 #ifdef __cplusplus
8782 extern "C"
8783 #endif
8784 char ldap_start_tls_s ();
8785 int
8786 main ()
8787 {
8788 return ldap_start_tls_s ();
8789   ;
8790   return 0;
8791 }
8792 _ACEOF
8793 if ac_fn_c_try_link "$LINENO"; then :
8794   eval "$as_ac_Lib=yes"
8795 else
8796   eval "$as_ac_Lib=no"
8797 fi
8798 rm -f core conftest.err conftest.$ac_objext \
8799     conftest$ac_exeext conftest.$ac_ext
8800 LIBS=$ac_check_lib_save_LIBS
8801 fi
8802 eval ac_res=\$$as_ac_Lib
8803                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8804 $as_echo "$ac_res" >&6; }
8805 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8806   apu_has_ldap_start_tls_s="1"
8807 fi
8808
8809         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8811 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8812 if eval \${$as_ac_Lib+:} false; then :
8813   $as_echo_n "(cached) " >&6
8814 else
8815   ac_check_lib_save_LIBS=$LIBS
8816 LIBS="-l${ldaplib} ${extralib} $LIBS"
8817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8818 /* end confdefs.h.  */
8819
8820 /* Override any GCC internal prototype to avoid an error.
8821    Use char because int might match the return type of a GCC
8822    builtin and then its argument prototype would still apply.  */
8823 #ifdef __cplusplus
8824 extern "C"
8825 #endif
8826 char ldap_sslinit ();
8827 int
8828 main ()
8829 {
8830 return ldap_sslinit ();
8831   ;
8832   return 0;
8833 }
8834 _ACEOF
8835 if ac_fn_c_try_link "$LINENO"; then :
8836   eval "$as_ac_Lib=yes"
8837 else
8838   eval "$as_ac_Lib=no"
8839 fi
8840 rm -f core conftest.err conftest.$ac_objext \
8841     conftest$ac_exeext conftest.$ac_ext
8842 LIBS=$ac_check_lib_save_LIBS
8843 fi
8844 eval ac_res=\$$as_ac_Lib
8845                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8846 $as_echo "$ac_res" >&6; }
8847 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8848   apu_has_ldap_sslinit="1"
8849 fi
8850
8851         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8853 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8854 if eval \${$as_ac_Lib+:} false; then :
8855   $as_echo_n "(cached) " >&6
8856 else
8857   ac_check_lib_save_LIBS=$LIBS
8858 LIBS="-l${ldaplib} ${extralib} $LIBS"
8859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8860 /* end confdefs.h.  */
8861
8862 /* Override any GCC internal prototype to avoid an error.
8863    Use char because int might match the return type of a GCC
8864    builtin and then its argument prototype would still apply.  */
8865 #ifdef __cplusplus
8866 extern "C"
8867 #endif
8868 char ldapssl_init ();
8869 int
8870 main ()
8871 {
8872 return ldapssl_init ();
8873   ;
8874   return 0;
8875 }
8876 _ACEOF
8877 if ac_fn_c_try_link "$LINENO"; then :
8878   eval "$as_ac_Lib=yes"
8879 else
8880   eval "$as_ac_Lib=no"
8881 fi
8882 rm -f core conftest.err conftest.$ac_objext \
8883     conftest$ac_exeext conftest.$ac_ext
8884 LIBS=$ac_check_lib_save_LIBS
8885 fi
8886 eval ac_res=\$$as_ac_Lib
8887                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8888 $as_echo "$ac_res" >&6; }
8889 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8890   apu_has_ldapssl_init="1"
8891 fi
8892
8893         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8895 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8896 if eval \${$as_ac_Lib+:} false; then :
8897   $as_echo_n "(cached) " >&6
8898 else
8899   ac_check_lib_save_LIBS=$LIBS
8900 LIBS="-l${ldaplib} ${extralib} $LIBS"
8901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8902 /* end confdefs.h.  */
8903
8904 /* Override any GCC internal prototype to avoid an error.
8905    Use char because int might match the return type of a GCC
8906    builtin and then its argument prototype would still apply.  */
8907 #ifdef __cplusplus
8908 extern "C"
8909 #endif
8910 char ldapssl_install_routines ();
8911 int
8912 main ()
8913 {
8914 return ldapssl_install_routines ();
8915   ;
8916   return 0;
8917 }
8918 _ACEOF
8919 if ac_fn_c_try_link "$LINENO"; then :
8920   eval "$as_ac_Lib=yes"
8921 else
8922   eval "$as_ac_Lib=no"
8923 fi
8924 rm -f core conftest.err conftest.$ac_objext \
8925     conftest$ac_exeext conftest.$ac_ext
8926 LIBS=$ac_check_lib_save_LIBS
8927 fi
8928 eval ac_res=\$$as_ac_Lib
8929                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8930 $as_echo "$ac_res" >&6; }
8931 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8932   apu_has_ldapssl_install_routines="1"
8933 fi
8934
8935         apu_has_ldap="1";
8936
8937 fi
8938
8939   fi
8940
8941
8942   if test ${apu_has_ldap} != "1"; then
8943     ldaplib="ldap"
8944     extralib="-llber -lresolv"
8945     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8946
8947     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8948
8949     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8950     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8951     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8953 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8954 if eval \${$as_ac_Lib+:} false; then :
8955   $as_echo_n "(cached) " >&6
8956 else
8957   ac_check_lib_save_LIBS=$LIBS
8958 LIBS="-l${ldaplib} ${extralib} $LIBS"
8959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8960 /* end confdefs.h.  */
8961
8962 /* Override any GCC internal prototype to avoid an error.
8963    Use char because int might match the return type of a GCC
8964    builtin and then its argument prototype would still apply.  */
8965 #ifdef __cplusplus
8966 extern "C"
8967 #endif
8968 char ldap_init ();
8969 int
8970 main ()
8971 {
8972 return ldap_init ();
8973   ;
8974   return 0;
8975 }
8976 _ACEOF
8977 if ac_fn_c_try_link "$LINENO"; then :
8978   eval "$as_ac_Lib=yes"
8979 else
8980   eval "$as_ac_Lib=no"
8981 fi
8982 rm -f core conftest.err conftest.$ac_objext \
8983     conftest$ac_exeext conftest.$ac_ext
8984 LIBS=$ac_check_lib_save_LIBS
8985 fi
8986 eval ac_res=\$$as_ac_Lib
8987                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8988 $as_echo "$ac_res" >&6; }
8989 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8990
8991         LDADD_ldap_found="-l${ldaplib} ${extralib}"
8992         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8994 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8995 if eval \${$as_ac_Lib+:} false; then :
8996   $as_echo_n "(cached) " >&6
8997 else
8998   ac_check_lib_save_LIBS=$LIBS
8999 LIBS="-l${ldaplib} ${extralib} $LIBS"
9000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9001 /* end confdefs.h.  */
9002
9003 /* Override any GCC internal prototype to avoid an error.
9004    Use char because int might match the return type of a GCC
9005    builtin and then its argument prototype would still apply.  */
9006 #ifdef __cplusplus
9007 extern "C"
9008 #endif
9009 char ldapssl_client_init ();
9010 int
9011 main ()
9012 {
9013 return ldapssl_client_init ();
9014   ;
9015   return 0;
9016 }
9017 _ACEOF
9018 if ac_fn_c_try_link "$LINENO"; then :
9019   eval "$as_ac_Lib=yes"
9020 else
9021   eval "$as_ac_Lib=no"
9022 fi
9023 rm -f core conftest.err conftest.$ac_objext \
9024     conftest$ac_exeext conftest.$ac_ext
9025 LIBS=$ac_check_lib_save_LIBS
9026 fi
9027 eval ac_res=\$$as_ac_Lib
9028                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9029 $as_echo "$ac_res" >&6; }
9030 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9031   apu_has_ldapssl_client_init="1"
9032 fi
9033
9034         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9036 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9037 if eval \${$as_ac_Lib+:} false; then :
9038   $as_echo_n "(cached) " >&6
9039 else
9040   ac_check_lib_save_LIBS=$LIBS
9041 LIBS="-l${ldaplib} ${extralib} $LIBS"
9042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9043 /* end confdefs.h.  */
9044
9045 /* Override any GCC internal prototype to avoid an error.
9046    Use char because int might match the return type of a GCC
9047    builtin and then its argument prototype would still apply.  */
9048 #ifdef __cplusplus
9049 extern "C"
9050 #endif
9051 char ldapssl_client_deinit ();
9052 int
9053 main ()
9054 {
9055 return ldapssl_client_deinit ();
9056   ;
9057   return 0;
9058 }
9059 _ACEOF
9060 if ac_fn_c_try_link "$LINENO"; then :
9061   eval "$as_ac_Lib=yes"
9062 else
9063   eval "$as_ac_Lib=no"
9064 fi
9065 rm -f core conftest.err conftest.$ac_objext \
9066     conftest$ac_exeext conftest.$ac_ext
9067 LIBS=$ac_check_lib_save_LIBS
9068 fi
9069 eval ac_res=\$$as_ac_Lib
9070                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9071 $as_echo "$ac_res" >&6; }
9072 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9073   apu_has_ldapssl_client_deinit="1"
9074 fi
9075
9076         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9078 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9079 if eval \${$as_ac_Lib+:} false; then :
9080   $as_echo_n "(cached) " >&6
9081 else
9082   ac_check_lib_save_LIBS=$LIBS
9083 LIBS="-l${ldaplib} ${extralib} $LIBS"
9084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h.  */
9086
9087 /* Override any GCC internal prototype to avoid an error.
9088    Use char because int might match the return type of a GCC
9089    builtin and then its argument prototype would still apply.  */
9090 #ifdef __cplusplus
9091 extern "C"
9092 #endif
9093 char ldapssl_add_trusted_cert ();
9094 int
9095 main ()
9096 {
9097 return ldapssl_add_trusted_cert ();
9098   ;
9099   return 0;
9100 }
9101 _ACEOF
9102 if ac_fn_c_try_link "$LINENO"; then :
9103   eval "$as_ac_Lib=yes"
9104 else
9105   eval "$as_ac_Lib=no"
9106 fi
9107 rm -f core conftest.err conftest.$ac_objext \
9108     conftest$ac_exeext conftest.$ac_ext
9109 LIBS=$ac_check_lib_save_LIBS
9110 fi
9111 eval ac_res=\$$as_ac_Lib
9112                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9113 $as_echo "$ac_res" >&6; }
9114 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9115   apu_has_ldapssl_add_trusted_cert="1"
9116 fi
9117
9118         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9120 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9121 if eval \${$as_ac_Lib+:} false; then :
9122   $as_echo_n "(cached) " >&6
9123 else
9124   ac_check_lib_save_LIBS=$LIBS
9125 LIBS="-l${ldaplib} ${extralib} $LIBS"
9126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9127 /* end confdefs.h.  */
9128
9129 /* Override any GCC internal prototype to avoid an error.
9130    Use char because int might match the return type of a GCC
9131    builtin and then its argument prototype would still apply.  */
9132 #ifdef __cplusplus
9133 extern "C"
9134 #endif
9135 char ldap_start_tls_s ();
9136 int
9137 main ()
9138 {
9139 return ldap_start_tls_s ();
9140   ;
9141   return 0;
9142 }
9143 _ACEOF
9144 if ac_fn_c_try_link "$LINENO"; then :
9145   eval "$as_ac_Lib=yes"
9146 else
9147   eval "$as_ac_Lib=no"
9148 fi
9149 rm -f core conftest.err conftest.$ac_objext \
9150     conftest$ac_exeext conftest.$ac_ext
9151 LIBS=$ac_check_lib_save_LIBS
9152 fi
9153 eval ac_res=\$$as_ac_Lib
9154                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9155 $as_echo "$ac_res" >&6; }
9156 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9157   apu_has_ldap_start_tls_s="1"
9158 fi
9159
9160         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9162 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9163 if eval \${$as_ac_Lib+:} false; then :
9164   $as_echo_n "(cached) " >&6
9165 else
9166   ac_check_lib_save_LIBS=$LIBS
9167 LIBS="-l${ldaplib} ${extralib} $LIBS"
9168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9169 /* end confdefs.h.  */
9170
9171 /* Override any GCC internal prototype to avoid an error.
9172    Use char because int might match the return type of a GCC
9173    builtin and then its argument prototype would still apply.  */
9174 #ifdef __cplusplus
9175 extern "C"
9176 #endif
9177 char ldap_sslinit ();
9178 int
9179 main ()
9180 {
9181 return ldap_sslinit ();
9182   ;
9183   return 0;
9184 }
9185 _ACEOF
9186 if ac_fn_c_try_link "$LINENO"; then :
9187   eval "$as_ac_Lib=yes"
9188 else
9189   eval "$as_ac_Lib=no"
9190 fi
9191 rm -f core conftest.err conftest.$ac_objext \
9192     conftest$ac_exeext conftest.$ac_ext
9193 LIBS=$ac_check_lib_save_LIBS
9194 fi
9195 eval ac_res=\$$as_ac_Lib
9196                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9197 $as_echo "$ac_res" >&6; }
9198 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9199   apu_has_ldap_sslinit="1"
9200 fi
9201
9202         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9204 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9205 if eval \${$as_ac_Lib+:} false; then :
9206   $as_echo_n "(cached) " >&6
9207 else
9208   ac_check_lib_save_LIBS=$LIBS
9209 LIBS="-l${ldaplib} ${extralib} $LIBS"
9210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9211 /* end confdefs.h.  */
9212
9213 /* Override any GCC internal prototype to avoid an error.
9214    Use char because int might match the return type of a GCC
9215    builtin and then its argument prototype would still apply.  */
9216 #ifdef __cplusplus
9217 extern "C"
9218 #endif
9219 char ldapssl_init ();
9220 int
9221 main ()
9222 {
9223 return ldapssl_init ();
9224   ;
9225   return 0;
9226 }
9227 _ACEOF
9228 if ac_fn_c_try_link "$LINENO"; then :
9229   eval "$as_ac_Lib=yes"
9230 else
9231   eval "$as_ac_Lib=no"
9232 fi
9233 rm -f core conftest.err conftest.$ac_objext \
9234     conftest$ac_exeext conftest.$ac_ext
9235 LIBS=$ac_check_lib_save_LIBS
9236 fi
9237 eval ac_res=\$$as_ac_Lib
9238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9239 $as_echo "$ac_res" >&6; }
9240 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9241   apu_has_ldapssl_init="1"
9242 fi
9243
9244         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9246 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9247 if eval \${$as_ac_Lib+:} false; then :
9248   $as_echo_n "(cached) " >&6
9249 else
9250   ac_check_lib_save_LIBS=$LIBS
9251 LIBS="-l${ldaplib} ${extralib} $LIBS"
9252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9253 /* end confdefs.h.  */
9254
9255 /* Override any GCC internal prototype to avoid an error.
9256    Use char because int might match the return type of a GCC
9257    builtin and then its argument prototype would still apply.  */
9258 #ifdef __cplusplus
9259 extern "C"
9260 #endif
9261 char ldapssl_install_routines ();
9262 int
9263 main ()
9264 {
9265 return ldapssl_install_routines ();
9266   ;
9267   return 0;
9268 }
9269 _ACEOF
9270 if ac_fn_c_try_link "$LINENO"; then :
9271   eval "$as_ac_Lib=yes"
9272 else
9273   eval "$as_ac_Lib=no"
9274 fi
9275 rm -f core conftest.err conftest.$ac_objext \
9276     conftest$ac_exeext conftest.$ac_ext
9277 LIBS=$ac_check_lib_save_LIBS
9278 fi
9279 eval ac_res=\$$as_ac_Lib
9280                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9281 $as_echo "$ac_res" >&6; }
9282 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9283   apu_has_ldapssl_install_routines="1"
9284 fi
9285
9286         apu_has_ldap="1";
9287
9288 fi
9289
9290   fi
9291
9292
9293   if test ${apu_has_ldap} != "1"; then
9294     ldaplib="ldap"
9295     extralib="-llber -lresolv -lsocket -lnsl"
9296     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9297
9298     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9299
9300     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9301     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9302     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9304 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9305 if eval \${$as_ac_Lib+:} false; then :
9306   $as_echo_n "(cached) " >&6
9307 else
9308   ac_check_lib_save_LIBS=$LIBS
9309 LIBS="-l${ldaplib} ${extralib} $LIBS"
9310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9311 /* end confdefs.h.  */
9312
9313 /* Override any GCC internal prototype to avoid an error.
9314    Use char because int might match the return type of a GCC
9315    builtin and then its argument prototype would still apply.  */
9316 #ifdef __cplusplus
9317 extern "C"
9318 #endif
9319 char ldap_init ();
9320 int
9321 main ()
9322 {
9323 return ldap_init ();
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 if ac_fn_c_try_link "$LINENO"; then :
9329   eval "$as_ac_Lib=yes"
9330 else
9331   eval "$as_ac_Lib=no"
9332 fi
9333 rm -f core conftest.err conftest.$ac_objext \
9334     conftest$ac_exeext conftest.$ac_ext
9335 LIBS=$ac_check_lib_save_LIBS
9336 fi
9337 eval ac_res=\$$as_ac_Lib
9338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9339 $as_echo "$ac_res" >&6; }
9340 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9341
9342         LDADD_ldap_found="-l${ldaplib} ${extralib}"
9343         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9345 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9346 if eval \${$as_ac_Lib+:} false; then :
9347   $as_echo_n "(cached) " >&6
9348 else
9349   ac_check_lib_save_LIBS=$LIBS
9350 LIBS="-l${ldaplib} ${extralib} $LIBS"
9351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9352 /* end confdefs.h.  */
9353
9354 /* Override any GCC internal prototype to avoid an error.
9355    Use char because int might match the return type of a GCC
9356    builtin and then its argument prototype would still apply.  */
9357 #ifdef __cplusplus
9358 extern "C"
9359 #endif
9360 char ldapssl_client_init ();
9361 int
9362 main ()
9363 {
9364 return ldapssl_client_init ();
9365   ;
9366   return 0;
9367 }
9368 _ACEOF
9369 if ac_fn_c_try_link "$LINENO"; then :
9370   eval "$as_ac_Lib=yes"
9371 else
9372   eval "$as_ac_Lib=no"
9373 fi
9374 rm -f core conftest.err conftest.$ac_objext \
9375     conftest$ac_exeext conftest.$ac_ext
9376 LIBS=$ac_check_lib_save_LIBS
9377 fi
9378 eval ac_res=\$$as_ac_Lib
9379                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9380 $as_echo "$ac_res" >&6; }
9381 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9382   apu_has_ldapssl_client_init="1"
9383 fi
9384
9385         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9387 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9388 if eval \${$as_ac_Lib+:} false; then :
9389   $as_echo_n "(cached) " >&6
9390 else
9391   ac_check_lib_save_LIBS=$LIBS
9392 LIBS="-l${ldaplib} ${extralib} $LIBS"
9393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9394 /* end confdefs.h.  */
9395
9396 /* Override any GCC internal prototype to avoid an error.
9397    Use char because int might match the return type of a GCC
9398    builtin and then its argument prototype would still apply.  */
9399 #ifdef __cplusplus
9400 extern "C"
9401 #endif
9402 char ldapssl_client_deinit ();
9403 int
9404 main ()
9405 {
9406 return ldapssl_client_deinit ();
9407   ;
9408   return 0;
9409 }
9410 _ACEOF
9411 if ac_fn_c_try_link "$LINENO"; then :
9412   eval "$as_ac_Lib=yes"
9413 else
9414   eval "$as_ac_Lib=no"
9415 fi
9416 rm -f core conftest.err conftest.$ac_objext \
9417     conftest$ac_exeext conftest.$ac_ext
9418 LIBS=$ac_check_lib_save_LIBS
9419 fi
9420 eval ac_res=\$$as_ac_Lib
9421                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9422 $as_echo "$ac_res" >&6; }
9423 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9424   apu_has_ldapssl_client_deinit="1"
9425 fi
9426
9427         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9429 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9430 if eval \${$as_ac_Lib+:} false; then :
9431   $as_echo_n "(cached) " >&6
9432 else
9433   ac_check_lib_save_LIBS=$LIBS
9434 LIBS="-l${ldaplib} ${extralib} $LIBS"
9435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9436 /* end confdefs.h.  */
9437
9438 /* Override any GCC internal prototype to avoid an error.
9439    Use char because int might match the return type of a GCC
9440    builtin and then its argument prototype would still apply.  */
9441 #ifdef __cplusplus
9442 extern "C"
9443 #endif
9444 char ldapssl_add_trusted_cert ();
9445 int
9446 main ()
9447 {
9448 return ldapssl_add_trusted_cert ();
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 if ac_fn_c_try_link "$LINENO"; then :
9454   eval "$as_ac_Lib=yes"
9455 else
9456   eval "$as_ac_Lib=no"
9457 fi
9458 rm -f core conftest.err conftest.$ac_objext \
9459     conftest$ac_exeext conftest.$ac_ext
9460 LIBS=$ac_check_lib_save_LIBS
9461 fi
9462 eval ac_res=\$$as_ac_Lib
9463                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9464 $as_echo "$ac_res" >&6; }
9465 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9466   apu_has_ldapssl_add_trusted_cert="1"
9467 fi
9468
9469         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9471 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9472 if eval \${$as_ac_Lib+:} false; then :
9473   $as_echo_n "(cached) " >&6
9474 else
9475   ac_check_lib_save_LIBS=$LIBS
9476 LIBS="-l${ldaplib} ${extralib} $LIBS"
9477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9478 /* end confdefs.h.  */
9479
9480 /* Override any GCC internal prototype to avoid an error.
9481    Use char because int might match the return type of a GCC
9482    builtin and then its argument prototype would still apply.  */
9483 #ifdef __cplusplus
9484 extern "C"
9485 #endif
9486 char ldap_start_tls_s ();
9487 int
9488 main ()
9489 {
9490 return ldap_start_tls_s ();
9491   ;
9492   return 0;
9493 }
9494 _ACEOF
9495 if ac_fn_c_try_link "$LINENO"; then :
9496   eval "$as_ac_Lib=yes"
9497 else
9498   eval "$as_ac_Lib=no"
9499 fi
9500 rm -f core conftest.err conftest.$ac_objext \
9501     conftest$ac_exeext conftest.$ac_ext
9502 LIBS=$ac_check_lib_save_LIBS
9503 fi
9504 eval ac_res=\$$as_ac_Lib
9505                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9506 $as_echo "$ac_res" >&6; }
9507 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9508   apu_has_ldap_start_tls_s="1"
9509 fi
9510
9511         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9513 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9514 if eval \${$as_ac_Lib+:} false; then :
9515   $as_echo_n "(cached) " >&6
9516 else
9517   ac_check_lib_save_LIBS=$LIBS
9518 LIBS="-l${ldaplib} ${extralib} $LIBS"
9519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9520 /* end confdefs.h.  */
9521
9522 /* Override any GCC internal prototype to avoid an error.
9523    Use char because int might match the return type of a GCC
9524    builtin and then its argument prototype would still apply.  */
9525 #ifdef __cplusplus
9526 extern "C"
9527 #endif
9528 char ldap_sslinit ();
9529 int
9530 main ()
9531 {
9532 return ldap_sslinit ();
9533   ;
9534   return 0;
9535 }
9536 _ACEOF
9537 if ac_fn_c_try_link "$LINENO"; then :
9538   eval "$as_ac_Lib=yes"
9539 else
9540   eval "$as_ac_Lib=no"
9541 fi
9542 rm -f core conftest.err conftest.$ac_objext \
9543     conftest$ac_exeext conftest.$ac_ext
9544 LIBS=$ac_check_lib_save_LIBS
9545 fi
9546 eval ac_res=\$$as_ac_Lib
9547                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9548 $as_echo "$ac_res" >&6; }
9549 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9550   apu_has_ldap_sslinit="1"
9551 fi
9552
9553         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9555 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9556 if eval \${$as_ac_Lib+:} false; then :
9557   $as_echo_n "(cached) " >&6
9558 else
9559   ac_check_lib_save_LIBS=$LIBS
9560 LIBS="-l${ldaplib} ${extralib} $LIBS"
9561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9562 /* end confdefs.h.  */
9563
9564 /* Override any GCC internal prototype to avoid an error.
9565    Use char because int might match the return type of a GCC
9566    builtin and then its argument prototype would still apply.  */
9567 #ifdef __cplusplus
9568 extern "C"
9569 #endif
9570 char ldapssl_init ();
9571 int
9572 main ()
9573 {
9574 return ldapssl_init ();
9575   ;
9576   return 0;
9577 }
9578 _ACEOF
9579 if ac_fn_c_try_link "$LINENO"; then :
9580   eval "$as_ac_Lib=yes"
9581 else
9582   eval "$as_ac_Lib=no"
9583 fi
9584 rm -f core conftest.err conftest.$ac_objext \
9585     conftest$ac_exeext conftest.$ac_ext
9586 LIBS=$ac_check_lib_save_LIBS
9587 fi
9588 eval ac_res=\$$as_ac_Lib
9589                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9590 $as_echo "$ac_res" >&6; }
9591 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9592   apu_has_ldapssl_init="1"
9593 fi
9594
9595         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9597 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9598 if eval \${$as_ac_Lib+:} false; then :
9599   $as_echo_n "(cached) " >&6
9600 else
9601   ac_check_lib_save_LIBS=$LIBS
9602 LIBS="-l${ldaplib} ${extralib} $LIBS"
9603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9604 /* end confdefs.h.  */
9605
9606 /* Override any GCC internal prototype to avoid an error.
9607    Use char because int might match the return type of a GCC
9608    builtin and then its argument prototype would still apply.  */
9609 #ifdef __cplusplus
9610 extern "C"
9611 #endif
9612 char ldapssl_install_routines ();
9613 int
9614 main ()
9615 {
9616 return ldapssl_install_routines ();
9617   ;
9618   return 0;
9619 }
9620 _ACEOF
9621 if ac_fn_c_try_link "$LINENO"; then :
9622   eval "$as_ac_Lib=yes"
9623 else
9624   eval "$as_ac_Lib=no"
9625 fi
9626 rm -f core conftest.err conftest.$ac_objext \
9627     conftest$ac_exeext conftest.$ac_ext
9628 LIBS=$ac_check_lib_save_LIBS
9629 fi
9630 eval ac_res=\$$as_ac_Lib
9631                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9632 $as_echo "$ac_res" >&6; }
9633 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9634   apu_has_ldapssl_install_routines="1"
9635 fi
9636
9637         apu_has_ldap="1";
9638
9639 fi
9640
9641   fi
9642
9643
9644   if test ${apu_has_ldap} != "1"; then
9645     ldaplib="ldap"
9646     extralib="-ldl -lpthread"
9647     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9648
9649     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9650
9651     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9652     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9653     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9655 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9656 if eval \${$as_ac_Lib+:} false; then :
9657   $as_echo_n "(cached) " >&6
9658 else
9659   ac_check_lib_save_LIBS=$LIBS
9660 LIBS="-l${ldaplib} ${extralib} $LIBS"
9661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9662 /* end confdefs.h.  */
9663
9664 /* Override any GCC internal prototype to avoid an error.
9665    Use char because int might match the return type of a GCC
9666    builtin and then its argument prototype would still apply.  */
9667 #ifdef __cplusplus
9668 extern "C"
9669 #endif
9670 char ldap_init ();
9671 int
9672 main ()
9673 {
9674 return ldap_init ();
9675   ;
9676   return 0;
9677 }
9678 _ACEOF
9679 if ac_fn_c_try_link "$LINENO"; then :
9680   eval "$as_ac_Lib=yes"
9681 else
9682   eval "$as_ac_Lib=no"
9683 fi
9684 rm -f core conftest.err conftest.$ac_objext \
9685     conftest$ac_exeext conftest.$ac_ext
9686 LIBS=$ac_check_lib_save_LIBS
9687 fi
9688 eval ac_res=\$$as_ac_Lib
9689                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9690 $as_echo "$ac_res" >&6; }
9691 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9692
9693         LDADD_ldap_found="-l${ldaplib} ${extralib}"
9694         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9696 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9697 if eval \${$as_ac_Lib+:} false; then :
9698   $as_echo_n "(cached) " >&6
9699 else
9700   ac_check_lib_save_LIBS=$LIBS
9701 LIBS="-l${ldaplib} ${extralib} $LIBS"
9702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9703 /* end confdefs.h.  */
9704
9705 /* Override any GCC internal prototype to avoid an error.
9706    Use char because int might match the return type of a GCC
9707    builtin and then its argument prototype would still apply.  */
9708 #ifdef __cplusplus
9709 extern "C"
9710 #endif
9711 char ldapssl_client_init ();
9712 int
9713 main ()
9714 {
9715 return ldapssl_client_init ();
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 if ac_fn_c_try_link "$LINENO"; then :
9721   eval "$as_ac_Lib=yes"
9722 else
9723   eval "$as_ac_Lib=no"
9724 fi
9725 rm -f core conftest.err conftest.$ac_objext \
9726     conftest$ac_exeext conftest.$ac_ext
9727 LIBS=$ac_check_lib_save_LIBS
9728 fi
9729 eval ac_res=\$$as_ac_Lib
9730                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9731 $as_echo "$ac_res" >&6; }
9732 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9733   apu_has_ldapssl_client_init="1"
9734 fi
9735
9736         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9738 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9739 if eval \${$as_ac_Lib+:} false; then :
9740   $as_echo_n "(cached) " >&6
9741 else
9742   ac_check_lib_save_LIBS=$LIBS
9743 LIBS="-l${ldaplib} ${extralib} $LIBS"
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745 /* end confdefs.h.  */
9746
9747 /* Override any GCC internal prototype to avoid an error.
9748    Use char because int might match the return type of a GCC
9749    builtin and then its argument prototype would still apply.  */
9750 #ifdef __cplusplus
9751 extern "C"
9752 #endif
9753 char ldapssl_client_deinit ();
9754 int
9755 main ()
9756 {
9757 return ldapssl_client_deinit ();
9758   ;
9759   return 0;
9760 }
9761 _ACEOF
9762 if ac_fn_c_try_link "$LINENO"; then :
9763   eval "$as_ac_Lib=yes"
9764 else
9765   eval "$as_ac_Lib=no"
9766 fi
9767 rm -f core conftest.err conftest.$ac_objext \
9768     conftest$ac_exeext conftest.$ac_ext
9769 LIBS=$ac_check_lib_save_LIBS
9770 fi
9771 eval ac_res=\$$as_ac_Lib
9772                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9773 $as_echo "$ac_res" >&6; }
9774 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9775   apu_has_ldapssl_client_deinit="1"
9776 fi
9777
9778         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9780 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9781 if eval \${$as_ac_Lib+:} false; then :
9782   $as_echo_n "(cached) " >&6
9783 else
9784   ac_check_lib_save_LIBS=$LIBS
9785 LIBS="-l${ldaplib} ${extralib} $LIBS"
9786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9787 /* end confdefs.h.  */
9788
9789 /* Override any GCC internal prototype to avoid an error.
9790    Use char because int might match the return type of a GCC
9791    builtin and then its argument prototype would still apply.  */
9792 #ifdef __cplusplus
9793 extern "C"
9794 #endif
9795 char ldapssl_add_trusted_cert ();
9796 int
9797 main ()
9798 {
9799 return ldapssl_add_trusted_cert ();
9800   ;
9801   return 0;
9802 }
9803 _ACEOF
9804 if ac_fn_c_try_link "$LINENO"; then :
9805   eval "$as_ac_Lib=yes"
9806 else
9807   eval "$as_ac_Lib=no"
9808 fi
9809 rm -f core conftest.err conftest.$ac_objext \
9810     conftest$ac_exeext conftest.$ac_ext
9811 LIBS=$ac_check_lib_save_LIBS
9812 fi
9813 eval ac_res=\$$as_ac_Lib
9814                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9815 $as_echo "$ac_res" >&6; }
9816 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9817   apu_has_ldapssl_add_trusted_cert="1"
9818 fi
9819
9820         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9822 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9823 if eval \${$as_ac_Lib+:} false; then :
9824   $as_echo_n "(cached) " >&6
9825 else
9826   ac_check_lib_save_LIBS=$LIBS
9827 LIBS="-l${ldaplib} ${extralib} $LIBS"
9828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9829 /* end confdefs.h.  */
9830
9831 /* Override any GCC internal prototype to avoid an error.
9832    Use char because int might match the return type of a GCC
9833    builtin and then its argument prototype would still apply.  */
9834 #ifdef __cplusplus
9835 extern "C"
9836 #endif
9837 char ldap_start_tls_s ();
9838 int
9839 main ()
9840 {
9841 return ldap_start_tls_s ();
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 if ac_fn_c_try_link "$LINENO"; then :
9847   eval "$as_ac_Lib=yes"
9848 else
9849   eval "$as_ac_Lib=no"
9850 fi
9851 rm -f core conftest.err conftest.$ac_objext \
9852     conftest$ac_exeext conftest.$ac_ext
9853 LIBS=$ac_check_lib_save_LIBS
9854 fi
9855 eval ac_res=\$$as_ac_Lib
9856                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9857 $as_echo "$ac_res" >&6; }
9858 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9859   apu_has_ldap_start_tls_s="1"
9860 fi
9861
9862         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9864 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9865 if eval \${$as_ac_Lib+:} false; then :
9866   $as_echo_n "(cached) " >&6
9867 else
9868   ac_check_lib_save_LIBS=$LIBS
9869 LIBS="-l${ldaplib} ${extralib} $LIBS"
9870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9871 /* end confdefs.h.  */
9872
9873 /* Override any GCC internal prototype to avoid an error.
9874    Use char because int might match the return type of a GCC
9875    builtin and then its argument prototype would still apply.  */
9876 #ifdef __cplusplus
9877 extern "C"
9878 #endif
9879 char ldap_sslinit ();
9880 int
9881 main ()
9882 {
9883 return ldap_sslinit ();
9884   ;
9885   return 0;
9886 }
9887 _ACEOF
9888 if ac_fn_c_try_link "$LINENO"; then :
9889   eval "$as_ac_Lib=yes"
9890 else
9891   eval "$as_ac_Lib=no"
9892 fi
9893 rm -f core conftest.err conftest.$ac_objext \
9894     conftest$ac_exeext conftest.$ac_ext
9895 LIBS=$ac_check_lib_save_LIBS
9896 fi
9897 eval ac_res=\$$as_ac_Lib
9898                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9899 $as_echo "$ac_res" >&6; }
9900 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9901   apu_has_ldap_sslinit="1"
9902 fi
9903
9904         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9906 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9907 if eval \${$as_ac_Lib+:} false; then :
9908   $as_echo_n "(cached) " >&6
9909 else
9910   ac_check_lib_save_LIBS=$LIBS
9911 LIBS="-l${ldaplib} ${extralib} $LIBS"
9912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9913 /* end confdefs.h.  */
9914
9915 /* Override any GCC internal prototype to avoid an error.
9916    Use char because int might match the return type of a GCC
9917    builtin and then its argument prototype would still apply.  */
9918 #ifdef __cplusplus
9919 extern "C"
9920 #endif
9921 char ldapssl_init ();
9922 int
9923 main ()
9924 {
9925 return ldapssl_init ();
9926   ;
9927   return 0;
9928 }
9929 _ACEOF
9930 if ac_fn_c_try_link "$LINENO"; then :
9931   eval "$as_ac_Lib=yes"
9932 else
9933   eval "$as_ac_Lib=no"
9934 fi
9935 rm -f core conftest.err conftest.$ac_objext \
9936     conftest$ac_exeext conftest.$ac_ext
9937 LIBS=$ac_check_lib_save_LIBS
9938 fi
9939 eval ac_res=\$$as_ac_Lib
9940                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9941 $as_echo "$ac_res" >&6; }
9942 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9943   apu_has_ldapssl_init="1"
9944 fi
9945
9946         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9948 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9949 if eval \${$as_ac_Lib+:} false; then :
9950   $as_echo_n "(cached) " >&6
9951 else
9952   ac_check_lib_save_LIBS=$LIBS
9953 LIBS="-l${ldaplib} ${extralib} $LIBS"
9954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9955 /* end confdefs.h.  */
9956
9957 /* Override any GCC internal prototype to avoid an error.
9958    Use char because int might match the return type of a GCC
9959    builtin and then its argument prototype would still apply.  */
9960 #ifdef __cplusplus
9961 extern "C"
9962 #endif
9963 char ldapssl_install_routines ();
9964 int
9965 main ()
9966 {
9967 return ldapssl_install_routines ();
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 if ac_fn_c_try_link "$LINENO"; then :
9973   eval "$as_ac_Lib=yes"
9974 else
9975   eval "$as_ac_Lib=no"
9976 fi
9977 rm -f core conftest.err conftest.$ac_objext \
9978     conftest$ac_exeext conftest.$ac_ext
9979 LIBS=$ac_check_lib_save_LIBS
9980 fi
9981 eval ac_res=\$$as_ac_Lib
9982                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9983 $as_echo "$ac_res" >&6; }
9984 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9985   apu_has_ldapssl_install_routines="1"
9986 fi
9987
9988         apu_has_ldap="1";
9989
9990 fi
9991
9992   fi
9993
9994       else
9995
9996   if test ${apu_has_ldap} != "1"; then
9997     ldaplib=$LIBLDAP
9998     extralib=
9999     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10000
10001     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10002
10003     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10004     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10005     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10007 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10008 if eval \${$as_ac_Lib+:} false; then :
10009   $as_echo_n "(cached) " >&6
10010 else
10011   ac_check_lib_save_LIBS=$LIBS
10012 LIBS="-l${ldaplib} ${extralib} $LIBS"
10013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10014 /* end confdefs.h.  */
10015
10016 /* Override any GCC internal prototype to avoid an error.
10017    Use char because int might match the return type of a GCC
10018    builtin and then its argument prototype would still apply.  */
10019 #ifdef __cplusplus
10020 extern "C"
10021 #endif
10022 char ldap_init ();
10023 int
10024 main ()
10025 {
10026 return ldap_init ();
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 if ac_fn_c_try_link "$LINENO"; then :
10032   eval "$as_ac_Lib=yes"
10033 else
10034   eval "$as_ac_Lib=no"
10035 fi
10036 rm -f core conftest.err conftest.$ac_objext \
10037     conftest$ac_exeext conftest.$ac_ext
10038 LIBS=$ac_check_lib_save_LIBS
10039 fi
10040 eval ac_res=\$$as_ac_Lib
10041                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10042 $as_echo "$ac_res" >&6; }
10043 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10044
10045         LDADD_ldap_found="-l${ldaplib} ${extralib}"
10046         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10048 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10049 if eval \${$as_ac_Lib+:} false; then :
10050   $as_echo_n "(cached) " >&6
10051 else
10052   ac_check_lib_save_LIBS=$LIBS
10053 LIBS="-l${ldaplib} ${extralib} $LIBS"
10054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10055 /* end confdefs.h.  */
10056
10057 /* Override any GCC internal prototype to avoid an error.
10058    Use char because int might match the return type of a GCC
10059    builtin and then its argument prototype would still apply.  */
10060 #ifdef __cplusplus
10061 extern "C"
10062 #endif
10063 char ldapssl_client_init ();
10064 int
10065 main ()
10066 {
10067 return ldapssl_client_init ();
10068   ;
10069   return 0;
10070 }
10071 _ACEOF
10072 if ac_fn_c_try_link "$LINENO"; then :
10073   eval "$as_ac_Lib=yes"
10074 else
10075   eval "$as_ac_Lib=no"
10076 fi
10077 rm -f core conftest.err conftest.$ac_objext \
10078     conftest$ac_exeext conftest.$ac_ext
10079 LIBS=$ac_check_lib_save_LIBS
10080 fi
10081 eval ac_res=\$$as_ac_Lib
10082                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10083 $as_echo "$ac_res" >&6; }
10084 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10085   apu_has_ldapssl_client_init="1"
10086 fi
10087
10088         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10090 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10091 if eval \${$as_ac_Lib+:} false; then :
10092   $as_echo_n "(cached) " >&6
10093 else
10094   ac_check_lib_save_LIBS=$LIBS
10095 LIBS="-l${ldaplib} ${extralib} $LIBS"
10096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10097 /* end confdefs.h.  */
10098
10099 /* Override any GCC internal prototype to avoid an error.
10100    Use char because int might match the return type of a GCC
10101    builtin and then its argument prototype would still apply.  */
10102 #ifdef __cplusplus
10103 extern "C"
10104 #endif
10105 char ldapssl_client_deinit ();
10106 int
10107 main ()
10108 {
10109 return ldapssl_client_deinit ();
10110   ;
10111   return 0;
10112 }
10113 _ACEOF
10114 if ac_fn_c_try_link "$LINENO"; then :
10115   eval "$as_ac_Lib=yes"
10116 else
10117   eval "$as_ac_Lib=no"
10118 fi
10119 rm -f core conftest.err conftest.$ac_objext \
10120     conftest$ac_exeext conftest.$ac_ext
10121 LIBS=$ac_check_lib_save_LIBS
10122 fi
10123 eval ac_res=\$$as_ac_Lib
10124                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10125 $as_echo "$ac_res" >&6; }
10126 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10127   apu_has_ldapssl_client_deinit="1"
10128 fi
10129
10130         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10132 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10133 if eval \${$as_ac_Lib+:} false; then :
10134   $as_echo_n "(cached) " >&6
10135 else
10136   ac_check_lib_save_LIBS=$LIBS
10137 LIBS="-l${ldaplib} ${extralib} $LIBS"
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139 /* end confdefs.h.  */
10140
10141 /* Override any GCC internal prototype to avoid an error.
10142    Use char because int might match the return type of a GCC
10143    builtin and then its argument prototype would still apply.  */
10144 #ifdef __cplusplus
10145 extern "C"
10146 #endif
10147 char ldapssl_add_trusted_cert ();
10148 int
10149 main ()
10150 {
10151 return ldapssl_add_trusted_cert ();
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 if ac_fn_c_try_link "$LINENO"; then :
10157   eval "$as_ac_Lib=yes"
10158 else
10159   eval "$as_ac_Lib=no"
10160 fi
10161 rm -f core conftest.err conftest.$ac_objext \
10162     conftest$ac_exeext conftest.$ac_ext
10163 LIBS=$ac_check_lib_save_LIBS
10164 fi
10165 eval ac_res=\$$as_ac_Lib
10166                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10167 $as_echo "$ac_res" >&6; }
10168 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10169   apu_has_ldapssl_add_trusted_cert="1"
10170 fi
10171
10172         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10174 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10175 if eval \${$as_ac_Lib+:} false; then :
10176   $as_echo_n "(cached) " >&6
10177 else
10178   ac_check_lib_save_LIBS=$LIBS
10179 LIBS="-l${ldaplib} ${extralib} $LIBS"
10180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181 /* end confdefs.h.  */
10182
10183 /* Override any GCC internal prototype to avoid an error.
10184    Use char because int might match the return type of a GCC
10185    builtin and then its argument prototype would still apply.  */
10186 #ifdef __cplusplus
10187 extern "C"
10188 #endif
10189 char ldap_start_tls_s ();
10190 int
10191 main ()
10192 {
10193 return ldap_start_tls_s ();
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 if ac_fn_c_try_link "$LINENO"; then :
10199   eval "$as_ac_Lib=yes"
10200 else
10201   eval "$as_ac_Lib=no"
10202 fi
10203 rm -f core conftest.err conftest.$ac_objext \
10204     conftest$ac_exeext conftest.$ac_ext
10205 LIBS=$ac_check_lib_save_LIBS
10206 fi
10207 eval ac_res=\$$as_ac_Lib
10208                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10209 $as_echo "$ac_res" >&6; }
10210 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10211   apu_has_ldap_start_tls_s="1"
10212 fi
10213
10214         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10216 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10217 if eval \${$as_ac_Lib+:} false; then :
10218   $as_echo_n "(cached) " >&6
10219 else
10220   ac_check_lib_save_LIBS=$LIBS
10221 LIBS="-l${ldaplib} ${extralib} $LIBS"
10222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10223 /* end confdefs.h.  */
10224
10225 /* Override any GCC internal prototype to avoid an error.
10226    Use char because int might match the return type of a GCC
10227    builtin and then its argument prototype would still apply.  */
10228 #ifdef __cplusplus
10229 extern "C"
10230 #endif
10231 char ldap_sslinit ();
10232 int
10233 main ()
10234 {
10235 return ldap_sslinit ();
10236   ;
10237   return 0;
10238 }
10239 _ACEOF
10240 if ac_fn_c_try_link "$LINENO"; then :
10241   eval "$as_ac_Lib=yes"
10242 else
10243   eval "$as_ac_Lib=no"
10244 fi
10245 rm -f core conftest.err conftest.$ac_objext \
10246     conftest$ac_exeext conftest.$ac_ext
10247 LIBS=$ac_check_lib_save_LIBS
10248 fi
10249 eval ac_res=\$$as_ac_Lib
10250                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10251 $as_echo "$ac_res" >&6; }
10252 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10253   apu_has_ldap_sslinit="1"
10254 fi
10255
10256         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10258 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10259 if eval \${$as_ac_Lib+:} false; then :
10260   $as_echo_n "(cached) " >&6
10261 else
10262   ac_check_lib_save_LIBS=$LIBS
10263 LIBS="-l${ldaplib} ${extralib} $LIBS"
10264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10265 /* end confdefs.h.  */
10266
10267 /* Override any GCC internal prototype to avoid an error.
10268    Use char because int might match the return type of a GCC
10269    builtin and then its argument prototype would still apply.  */
10270 #ifdef __cplusplus
10271 extern "C"
10272 #endif
10273 char ldapssl_init ();
10274 int
10275 main ()
10276 {
10277 return ldapssl_init ();
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 if ac_fn_c_try_link "$LINENO"; then :
10283   eval "$as_ac_Lib=yes"
10284 else
10285   eval "$as_ac_Lib=no"
10286 fi
10287 rm -f core conftest.err conftest.$ac_objext \
10288     conftest$ac_exeext conftest.$ac_ext
10289 LIBS=$ac_check_lib_save_LIBS
10290 fi
10291 eval ac_res=\$$as_ac_Lib
10292                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10293 $as_echo "$ac_res" >&6; }
10294 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10295   apu_has_ldapssl_init="1"
10296 fi
10297
10298         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10300 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10301 if eval \${$as_ac_Lib+:} false; then :
10302   $as_echo_n "(cached) " >&6
10303 else
10304   ac_check_lib_save_LIBS=$LIBS
10305 LIBS="-l${ldaplib} ${extralib} $LIBS"
10306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10307 /* end confdefs.h.  */
10308
10309 /* Override any GCC internal prototype to avoid an error.
10310    Use char because int might match the return type of a GCC
10311    builtin and then its argument prototype would still apply.  */
10312 #ifdef __cplusplus
10313 extern "C"
10314 #endif
10315 char ldapssl_install_routines ();
10316 int
10317 main ()
10318 {
10319 return ldapssl_install_routines ();
10320   ;
10321   return 0;
10322 }
10323 _ACEOF
10324 if ac_fn_c_try_link "$LINENO"; then :
10325   eval "$as_ac_Lib=yes"
10326 else
10327   eval "$as_ac_Lib=no"
10328 fi
10329 rm -f core conftest.err conftest.$ac_objext \
10330     conftest$ac_exeext conftest.$ac_ext
10331 LIBS=$ac_check_lib_save_LIBS
10332 fi
10333 eval ac_res=\$$as_ac_Lib
10334                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10335 $as_echo "$ac_res" >&6; }
10336 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10337   apu_has_ldapssl_install_routines="1"
10338 fi
10339
10340         apu_has_ldap="1";
10341
10342 fi
10343
10344   fi
10345
10346
10347   if test ${apu_has_ldap} != "1"; then
10348     ldaplib=$LIBLDAP
10349     extralib="-lresolv"
10350     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10351
10352     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10353
10354     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10355     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10356     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10358 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10359 if eval \${$as_ac_Lib+:} false; then :
10360   $as_echo_n "(cached) " >&6
10361 else
10362   ac_check_lib_save_LIBS=$LIBS
10363 LIBS="-l${ldaplib} ${extralib} $LIBS"
10364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10365 /* end confdefs.h.  */
10366
10367 /* Override any GCC internal prototype to avoid an error.
10368    Use char because int might match the return type of a GCC
10369    builtin and then its argument prototype would still apply.  */
10370 #ifdef __cplusplus
10371 extern "C"
10372 #endif
10373 char ldap_init ();
10374 int
10375 main ()
10376 {
10377 return ldap_init ();
10378   ;
10379   return 0;
10380 }
10381 _ACEOF
10382 if ac_fn_c_try_link "$LINENO"; then :
10383   eval "$as_ac_Lib=yes"
10384 else
10385   eval "$as_ac_Lib=no"
10386 fi
10387 rm -f core conftest.err conftest.$ac_objext \
10388     conftest$ac_exeext conftest.$ac_ext
10389 LIBS=$ac_check_lib_save_LIBS
10390 fi
10391 eval ac_res=\$$as_ac_Lib
10392                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10393 $as_echo "$ac_res" >&6; }
10394 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10395
10396         LDADD_ldap_found="-l${ldaplib} ${extralib}"
10397         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10399 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10400 if eval \${$as_ac_Lib+:} false; then :
10401   $as_echo_n "(cached) " >&6
10402 else
10403   ac_check_lib_save_LIBS=$LIBS
10404 LIBS="-l${ldaplib} ${extralib} $LIBS"
10405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10406 /* end confdefs.h.  */
10407
10408 /* Override any GCC internal prototype to avoid an error.
10409    Use char because int might match the return type of a GCC
10410    builtin and then its argument prototype would still apply.  */
10411 #ifdef __cplusplus
10412 extern "C"
10413 #endif
10414 char ldapssl_client_init ();
10415 int
10416 main ()
10417 {
10418 return ldapssl_client_init ();
10419   ;
10420   return 0;
10421 }
10422 _ACEOF
10423 if ac_fn_c_try_link "$LINENO"; then :
10424   eval "$as_ac_Lib=yes"
10425 else
10426   eval "$as_ac_Lib=no"
10427 fi
10428 rm -f core conftest.err conftest.$ac_objext \
10429     conftest$ac_exeext conftest.$ac_ext
10430 LIBS=$ac_check_lib_save_LIBS
10431 fi
10432 eval ac_res=\$$as_ac_Lib
10433                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10434 $as_echo "$ac_res" >&6; }
10435 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10436   apu_has_ldapssl_client_init="1"
10437 fi
10438
10439         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10441 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10442 if eval \${$as_ac_Lib+:} false; then :
10443   $as_echo_n "(cached) " >&6
10444 else
10445   ac_check_lib_save_LIBS=$LIBS
10446 LIBS="-l${ldaplib} ${extralib} $LIBS"
10447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h.  */
10449
10450 /* Override any GCC internal prototype to avoid an error.
10451    Use char because int might match the return type of a GCC
10452    builtin and then its argument prototype would still apply.  */
10453 #ifdef __cplusplus
10454 extern "C"
10455 #endif
10456 char ldapssl_client_deinit ();
10457 int
10458 main ()
10459 {
10460 return ldapssl_client_deinit ();
10461   ;
10462   return 0;
10463 }
10464 _ACEOF
10465 if ac_fn_c_try_link "$LINENO"; then :
10466   eval "$as_ac_Lib=yes"
10467 else
10468   eval "$as_ac_Lib=no"
10469 fi
10470 rm -f core conftest.err conftest.$ac_objext \
10471     conftest$ac_exeext conftest.$ac_ext
10472 LIBS=$ac_check_lib_save_LIBS
10473 fi
10474 eval ac_res=\$$as_ac_Lib
10475                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10476 $as_echo "$ac_res" >&6; }
10477 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10478   apu_has_ldapssl_client_deinit="1"
10479 fi
10480
10481         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10483 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10484 if eval \${$as_ac_Lib+:} false; then :
10485   $as_echo_n "(cached) " >&6
10486 else
10487   ac_check_lib_save_LIBS=$LIBS
10488 LIBS="-l${ldaplib} ${extralib} $LIBS"
10489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10490 /* end confdefs.h.  */
10491
10492 /* Override any GCC internal prototype to avoid an error.
10493    Use char because int might match the return type of a GCC
10494    builtin and then its argument prototype would still apply.  */
10495 #ifdef __cplusplus
10496 extern "C"
10497 #endif
10498 char ldapssl_add_trusted_cert ();
10499 int
10500 main ()
10501 {
10502 return ldapssl_add_trusted_cert ();
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 if ac_fn_c_try_link "$LINENO"; then :
10508   eval "$as_ac_Lib=yes"
10509 else
10510   eval "$as_ac_Lib=no"
10511 fi
10512 rm -f core conftest.err conftest.$ac_objext \
10513     conftest$ac_exeext conftest.$ac_ext
10514 LIBS=$ac_check_lib_save_LIBS
10515 fi
10516 eval ac_res=\$$as_ac_Lib
10517                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10518 $as_echo "$ac_res" >&6; }
10519 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10520   apu_has_ldapssl_add_trusted_cert="1"
10521 fi
10522
10523         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10525 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10526 if eval \${$as_ac_Lib+:} false; then :
10527   $as_echo_n "(cached) " >&6
10528 else
10529   ac_check_lib_save_LIBS=$LIBS
10530 LIBS="-l${ldaplib} ${extralib} $LIBS"
10531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10532 /* end confdefs.h.  */
10533
10534 /* Override any GCC internal prototype to avoid an error.
10535    Use char because int might match the return type of a GCC
10536    builtin and then its argument prototype would still apply.  */
10537 #ifdef __cplusplus
10538 extern "C"
10539 #endif
10540 char ldap_start_tls_s ();
10541 int
10542 main ()
10543 {
10544 return ldap_start_tls_s ();
10545   ;
10546   return 0;
10547 }
10548 _ACEOF
10549 if ac_fn_c_try_link "$LINENO"; then :
10550   eval "$as_ac_Lib=yes"
10551 else
10552   eval "$as_ac_Lib=no"
10553 fi
10554 rm -f core conftest.err conftest.$ac_objext \
10555     conftest$ac_exeext conftest.$ac_ext
10556 LIBS=$ac_check_lib_save_LIBS
10557 fi
10558 eval ac_res=\$$as_ac_Lib
10559                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10560 $as_echo "$ac_res" >&6; }
10561 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10562   apu_has_ldap_start_tls_s="1"
10563 fi
10564
10565         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10567 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10568 if eval \${$as_ac_Lib+:} false; then :
10569   $as_echo_n "(cached) " >&6
10570 else
10571   ac_check_lib_save_LIBS=$LIBS
10572 LIBS="-l${ldaplib} ${extralib} $LIBS"
10573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10574 /* end confdefs.h.  */
10575
10576 /* Override any GCC internal prototype to avoid an error.
10577    Use char because int might match the return type of a GCC
10578    builtin and then its argument prototype would still apply.  */
10579 #ifdef __cplusplus
10580 extern "C"
10581 #endif
10582 char ldap_sslinit ();
10583 int
10584 main ()
10585 {
10586 return ldap_sslinit ();
10587   ;
10588   return 0;
10589 }
10590 _ACEOF
10591 if ac_fn_c_try_link "$LINENO"; then :
10592   eval "$as_ac_Lib=yes"
10593 else
10594   eval "$as_ac_Lib=no"
10595 fi
10596 rm -f core conftest.err conftest.$ac_objext \
10597     conftest$ac_exeext conftest.$ac_ext
10598 LIBS=$ac_check_lib_save_LIBS
10599 fi
10600 eval ac_res=\$$as_ac_Lib
10601                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10602 $as_echo "$ac_res" >&6; }
10603 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10604   apu_has_ldap_sslinit="1"
10605 fi
10606
10607         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10609 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10610 if eval \${$as_ac_Lib+:} false; then :
10611   $as_echo_n "(cached) " >&6
10612 else
10613   ac_check_lib_save_LIBS=$LIBS
10614 LIBS="-l${ldaplib} ${extralib} $LIBS"
10615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10616 /* end confdefs.h.  */
10617
10618 /* Override any GCC internal prototype to avoid an error.
10619    Use char because int might match the return type of a GCC
10620    builtin and then its argument prototype would still apply.  */
10621 #ifdef __cplusplus
10622 extern "C"
10623 #endif
10624 char ldapssl_init ();
10625 int
10626 main ()
10627 {
10628 return ldapssl_init ();
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 if ac_fn_c_try_link "$LINENO"; then :
10634   eval "$as_ac_Lib=yes"
10635 else
10636   eval "$as_ac_Lib=no"
10637 fi
10638 rm -f core conftest.err conftest.$ac_objext \
10639     conftest$ac_exeext conftest.$ac_ext
10640 LIBS=$ac_check_lib_save_LIBS
10641 fi
10642 eval ac_res=\$$as_ac_Lib
10643                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10644 $as_echo "$ac_res" >&6; }
10645 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10646   apu_has_ldapssl_init="1"
10647 fi
10648
10649         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10651 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10652 if eval \${$as_ac_Lib+:} false; then :
10653   $as_echo_n "(cached) " >&6
10654 else
10655   ac_check_lib_save_LIBS=$LIBS
10656 LIBS="-l${ldaplib} ${extralib} $LIBS"
10657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10658 /* end confdefs.h.  */
10659
10660 /* Override any GCC internal prototype to avoid an error.
10661    Use char because int might match the return type of a GCC
10662    builtin and then its argument prototype would still apply.  */
10663 #ifdef __cplusplus
10664 extern "C"
10665 #endif
10666 char ldapssl_install_routines ();
10667 int
10668 main ()
10669 {
10670 return ldapssl_install_routines ();
10671   ;
10672   return 0;
10673 }
10674 _ACEOF
10675 if ac_fn_c_try_link "$LINENO"; then :
10676   eval "$as_ac_Lib=yes"
10677 else
10678   eval "$as_ac_Lib=no"
10679 fi
10680 rm -f core conftest.err conftest.$ac_objext \
10681     conftest$ac_exeext conftest.$ac_ext
10682 LIBS=$ac_check_lib_save_LIBS
10683 fi
10684 eval ac_res=\$$as_ac_Lib
10685                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10686 $as_echo "$ac_res" >&6; }
10687 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10688   apu_has_ldapssl_install_routines="1"
10689 fi
10690
10691         apu_has_ldap="1";
10692
10693 fi
10694
10695   fi
10696
10697
10698   if test ${apu_has_ldap} != "1"; then
10699     ldaplib=$LIBLDAP
10700     extralib="-lresolv -lsocket -lnsl"
10701     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10702
10703     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10704
10705     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10706     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10707     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10709 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10710 if eval \${$as_ac_Lib+:} false; then :
10711   $as_echo_n "(cached) " >&6
10712 else
10713   ac_check_lib_save_LIBS=$LIBS
10714 LIBS="-l${ldaplib} ${extralib} $LIBS"
10715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10716 /* end confdefs.h.  */
10717
10718 /* Override any GCC internal prototype to avoid an error.
10719    Use char because int might match the return type of a GCC
10720    builtin and then its argument prototype would still apply.  */
10721 #ifdef __cplusplus
10722 extern "C"
10723 #endif
10724 char ldap_init ();
10725 int
10726 main ()
10727 {
10728 return ldap_init ();
10729   ;
10730   return 0;
10731 }
10732 _ACEOF
10733 if ac_fn_c_try_link "$LINENO"; then :
10734   eval "$as_ac_Lib=yes"
10735 else
10736   eval "$as_ac_Lib=no"
10737 fi
10738 rm -f core conftest.err conftest.$ac_objext \
10739     conftest$ac_exeext conftest.$ac_ext
10740 LIBS=$ac_check_lib_save_LIBS
10741 fi
10742 eval ac_res=\$$as_ac_Lib
10743                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10744 $as_echo "$ac_res" >&6; }
10745 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10746
10747         LDADD_ldap_found="-l${ldaplib} ${extralib}"
10748         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10750 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10751 if eval \${$as_ac_Lib+:} false; then :
10752   $as_echo_n "(cached) " >&6
10753 else
10754   ac_check_lib_save_LIBS=$LIBS
10755 LIBS="-l${ldaplib} ${extralib} $LIBS"
10756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10757 /* end confdefs.h.  */
10758
10759 /* Override any GCC internal prototype to avoid an error.
10760    Use char because int might match the return type of a GCC
10761    builtin and then its argument prototype would still apply.  */
10762 #ifdef __cplusplus
10763 extern "C"
10764 #endif
10765 char ldapssl_client_init ();
10766 int
10767 main ()
10768 {
10769 return ldapssl_client_init ();
10770   ;
10771   return 0;
10772 }
10773 _ACEOF
10774 if ac_fn_c_try_link "$LINENO"; then :
10775   eval "$as_ac_Lib=yes"
10776 else
10777   eval "$as_ac_Lib=no"
10778 fi
10779 rm -f core conftest.err conftest.$ac_objext \
10780     conftest$ac_exeext conftest.$ac_ext
10781 LIBS=$ac_check_lib_save_LIBS
10782 fi
10783 eval ac_res=\$$as_ac_Lib
10784                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10785 $as_echo "$ac_res" >&6; }
10786 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10787   apu_has_ldapssl_client_init="1"
10788 fi
10789
10790         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10792 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10793 if eval \${$as_ac_Lib+:} false; then :
10794   $as_echo_n "(cached) " >&6
10795 else
10796   ac_check_lib_save_LIBS=$LIBS
10797 LIBS="-l${ldaplib} ${extralib} $LIBS"
10798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10799 /* end confdefs.h.  */
10800
10801 /* Override any GCC internal prototype to avoid an error.
10802    Use char because int might match the return type of a GCC
10803    builtin and then its argument prototype would still apply.  */
10804 #ifdef __cplusplus
10805 extern "C"
10806 #endif
10807 char ldapssl_client_deinit ();
10808 int
10809 main ()
10810 {
10811 return ldapssl_client_deinit ();
10812   ;
10813   return 0;
10814 }
10815 _ACEOF
10816 if ac_fn_c_try_link "$LINENO"; then :
10817   eval "$as_ac_Lib=yes"
10818 else
10819   eval "$as_ac_Lib=no"
10820 fi
10821 rm -f core conftest.err conftest.$ac_objext \
10822     conftest$ac_exeext conftest.$ac_ext
10823 LIBS=$ac_check_lib_save_LIBS
10824 fi
10825 eval ac_res=\$$as_ac_Lib
10826                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10827 $as_echo "$ac_res" >&6; }
10828 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10829   apu_has_ldapssl_client_deinit="1"
10830 fi
10831
10832         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10834 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10835 if eval \${$as_ac_Lib+:} false; then :
10836   $as_echo_n "(cached) " >&6
10837 else
10838   ac_check_lib_save_LIBS=$LIBS
10839 LIBS="-l${ldaplib} ${extralib} $LIBS"
10840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10841 /* end confdefs.h.  */
10842
10843 /* Override any GCC internal prototype to avoid an error.
10844    Use char because int might match the return type of a GCC
10845    builtin and then its argument prototype would still apply.  */
10846 #ifdef __cplusplus
10847 extern "C"
10848 #endif
10849 char ldapssl_add_trusted_cert ();
10850 int
10851 main ()
10852 {
10853 return ldapssl_add_trusted_cert ();
10854   ;
10855   return 0;
10856 }
10857 _ACEOF
10858 if ac_fn_c_try_link "$LINENO"; then :
10859   eval "$as_ac_Lib=yes"
10860 else
10861   eval "$as_ac_Lib=no"
10862 fi
10863 rm -f core conftest.err conftest.$ac_objext \
10864     conftest$ac_exeext conftest.$ac_ext
10865 LIBS=$ac_check_lib_save_LIBS
10866 fi
10867 eval ac_res=\$$as_ac_Lib
10868                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10869 $as_echo "$ac_res" >&6; }
10870 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10871   apu_has_ldapssl_add_trusted_cert="1"
10872 fi
10873
10874         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10876 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10877 if eval \${$as_ac_Lib+:} false; then :
10878   $as_echo_n "(cached) " >&6
10879 else
10880   ac_check_lib_save_LIBS=$LIBS
10881 LIBS="-l${ldaplib} ${extralib} $LIBS"
10882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10883 /* end confdefs.h.  */
10884
10885 /* Override any GCC internal prototype to avoid an error.
10886    Use char because int might match the return type of a GCC
10887    builtin and then its argument prototype would still apply.  */
10888 #ifdef __cplusplus
10889 extern "C"
10890 #endif
10891 char ldap_start_tls_s ();
10892 int
10893 main ()
10894 {
10895 return ldap_start_tls_s ();
10896   ;
10897   return 0;
10898 }
10899 _ACEOF
10900 if ac_fn_c_try_link "$LINENO"; then :
10901   eval "$as_ac_Lib=yes"
10902 else
10903   eval "$as_ac_Lib=no"
10904 fi
10905 rm -f core conftest.err conftest.$ac_objext \
10906     conftest$ac_exeext conftest.$ac_ext
10907 LIBS=$ac_check_lib_save_LIBS
10908 fi
10909 eval ac_res=\$$as_ac_Lib
10910                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10911 $as_echo "$ac_res" >&6; }
10912 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10913   apu_has_ldap_start_tls_s="1"
10914 fi
10915
10916         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10918 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10919 if eval \${$as_ac_Lib+:} false; then :
10920   $as_echo_n "(cached) " >&6
10921 else
10922   ac_check_lib_save_LIBS=$LIBS
10923 LIBS="-l${ldaplib} ${extralib} $LIBS"
10924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10925 /* end confdefs.h.  */
10926
10927 /* Override any GCC internal prototype to avoid an error.
10928    Use char because int might match the return type of a GCC
10929    builtin and then its argument prototype would still apply.  */
10930 #ifdef __cplusplus
10931 extern "C"
10932 #endif
10933 char ldap_sslinit ();
10934 int
10935 main ()
10936 {
10937 return ldap_sslinit ();
10938   ;
10939   return 0;
10940 }
10941 _ACEOF
10942 if ac_fn_c_try_link "$LINENO"; then :
10943   eval "$as_ac_Lib=yes"
10944 else
10945   eval "$as_ac_Lib=no"
10946 fi
10947 rm -f core conftest.err conftest.$ac_objext \
10948     conftest$ac_exeext conftest.$ac_ext
10949 LIBS=$ac_check_lib_save_LIBS
10950 fi
10951 eval ac_res=\$$as_ac_Lib
10952                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10953 $as_echo "$ac_res" >&6; }
10954 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10955   apu_has_ldap_sslinit="1"
10956 fi
10957
10958         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10960 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10961 if eval \${$as_ac_Lib+:} false; then :
10962   $as_echo_n "(cached) " >&6
10963 else
10964   ac_check_lib_save_LIBS=$LIBS
10965 LIBS="-l${ldaplib} ${extralib} $LIBS"
10966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10967 /* end confdefs.h.  */
10968
10969 /* Override any GCC internal prototype to avoid an error.
10970    Use char because int might match the return type of a GCC
10971    builtin and then its argument prototype would still apply.  */
10972 #ifdef __cplusplus
10973 extern "C"
10974 #endif
10975 char ldapssl_init ();
10976 int
10977 main ()
10978 {
10979 return ldapssl_init ();
10980   ;
10981   return 0;
10982 }
10983 _ACEOF
10984 if ac_fn_c_try_link "$LINENO"; then :
10985   eval "$as_ac_Lib=yes"
10986 else
10987   eval "$as_ac_Lib=no"
10988 fi
10989 rm -f core conftest.err conftest.$ac_objext \
10990     conftest$ac_exeext conftest.$ac_ext
10991 LIBS=$ac_check_lib_save_LIBS
10992 fi
10993 eval ac_res=\$$as_ac_Lib
10994                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10995 $as_echo "$ac_res" >&6; }
10996 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10997   apu_has_ldapssl_init="1"
10998 fi
10999
11000         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
11002 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
11003 if eval \${$as_ac_Lib+:} false; then :
11004   $as_echo_n "(cached) " >&6
11005 else
11006   ac_check_lib_save_LIBS=$LIBS
11007 LIBS="-l${ldaplib} ${extralib} $LIBS"
11008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11009 /* end confdefs.h.  */
11010
11011 /* Override any GCC internal prototype to avoid an error.
11012    Use char because int might match the return type of a GCC
11013    builtin and then its argument prototype would still apply.  */
11014 #ifdef __cplusplus
11015 extern "C"
11016 #endif
11017 char ldapssl_install_routines ();
11018 int
11019 main ()
11020 {
11021 return ldapssl_install_routines ();
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 if ac_fn_c_try_link "$LINENO"; then :
11027   eval "$as_ac_Lib=yes"
11028 else
11029   eval "$as_ac_Lib=no"
11030 fi
11031 rm -f core conftest.err conftest.$ac_objext \
11032     conftest$ac_exeext conftest.$ac_ext
11033 LIBS=$ac_check_lib_save_LIBS
11034 fi
11035 eval ac_res=\$$as_ac_Lib
11036                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11037 $as_echo "$ac_res" >&6; }
11038 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11039   apu_has_ldapssl_install_routines="1"
11040 fi
11041
11042         apu_has_ldap="1";
11043
11044 fi
11045
11046   fi
11047
11048
11049   if test ${apu_has_ldap} != "1"; then
11050     ldaplib=$LIBLDAP
11051     extralib="-ldl -lpthread"
11052     # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
11053
11054     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
11055
11056     unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
11057     unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
11058     as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
11060 $as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
11061 if eval \${$as_ac_Lib+:} false; then :
11062   $as_echo_n "(cached) " >&6
11063 else
11064   ac_check_lib_save_LIBS=$LIBS
11065 LIBS="-l${ldaplib} ${extralib} $LIBS"
11066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067 /* end confdefs.h.  */
11068
11069 /* Override any GCC internal prototype to avoid an error.
11070    Use char because int might match the return type of a GCC
11071    builtin and then its argument prototype would still apply.  */
11072 #ifdef __cplusplus
11073 extern "C"
11074 #endif
11075 char ldap_init ();
11076 int
11077 main ()
11078 {
11079 return ldap_init ();
11080   ;
11081   return 0;
11082 }
11083 _ACEOF
11084 if ac_fn_c_try_link "$LINENO"; then :
11085   eval "$as_ac_Lib=yes"
11086 else
11087   eval "$as_ac_Lib=no"
11088 fi
11089 rm -f core conftest.err conftest.$ac_objext \
11090     conftest$ac_exeext conftest.$ac_ext
11091 LIBS=$ac_check_lib_save_LIBS
11092 fi
11093 eval ac_res=\$$as_ac_Lib
11094                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11095 $as_echo "$ac_res" >&6; }
11096 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11097
11098         LDADD_ldap_found="-l${ldaplib} ${extralib}"
11099         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
11101 $as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
11102 if eval \${$as_ac_Lib+:} false; then :
11103   $as_echo_n "(cached) " >&6
11104 else
11105   ac_check_lib_save_LIBS=$LIBS
11106 LIBS="-l${ldaplib} ${extralib} $LIBS"
11107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11108 /* end confdefs.h.  */
11109
11110 /* Override any GCC internal prototype to avoid an error.
11111    Use char because int might match the return type of a GCC
11112    builtin and then its argument prototype would still apply.  */
11113 #ifdef __cplusplus
11114 extern "C"
11115 #endif
11116 char ldapssl_client_init ();
11117 int
11118 main ()
11119 {
11120 return ldapssl_client_init ();
11121   ;
11122   return 0;
11123 }
11124 _ACEOF
11125 if ac_fn_c_try_link "$LINENO"; then :
11126   eval "$as_ac_Lib=yes"
11127 else
11128   eval "$as_ac_Lib=no"
11129 fi
11130 rm -f core conftest.err conftest.$ac_objext \
11131     conftest$ac_exeext conftest.$ac_ext
11132 LIBS=$ac_check_lib_save_LIBS
11133 fi
11134 eval ac_res=\$$as_ac_Lib
11135                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11136 $as_echo "$ac_res" >&6; }
11137 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11138   apu_has_ldapssl_client_init="1"
11139 fi
11140
11141         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
11143 $as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
11144 if eval \${$as_ac_Lib+:} false; then :
11145   $as_echo_n "(cached) " >&6
11146 else
11147   ac_check_lib_save_LIBS=$LIBS
11148 LIBS="-l${ldaplib} ${extralib} $LIBS"
11149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11150 /* end confdefs.h.  */
11151
11152 /* Override any GCC internal prototype to avoid an error.
11153    Use char because int might match the return type of a GCC
11154    builtin and then its argument prototype would still apply.  */
11155 #ifdef __cplusplus
11156 extern "C"
11157 #endif
11158 char ldapssl_client_deinit ();
11159 int
11160 main ()
11161 {
11162 return ldapssl_client_deinit ();
11163   ;
11164   return 0;
11165 }
11166 _ACEOF
11167 if ac_fn_c_try_link "$LINENO"; then :
11168   eval "$as_ac_Lib=yes"
11169 else
11170   eval "$as_ac_Lib=no"
11171 fi
11172 rm -f core conftest.err conftest.$ac_objext \
11173     conftest$ac_exeext conftest.$ac_ext
11174 LIBS=$ac_check_lib_save_LIBS
11175 fi
11176 eval ac_res=\$$as_ac_Lib
11177                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11178 $as_echo "$ac_res" >&6; }
11179 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11180   apu_has_ldapssl_client_deinit="1"
11181 fi
11182
11183         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
11185 $as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
11186 if eval \${$as_ac_Lib+:} false; then :
11187   $as_echo_n "(cached) " >&6
11188 else
11189   ac_check_lib_save_LIBS=$LIBS
11190 LIBS="-l${ldaplib} ${extralib} $LIBS"
11191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11192 /* end confdefs.h.  */
11193
11194 /* Override any GCC internal prototype to avoid an error.
11195    Use char because int might match the return type of a GCC
11196    builtin and then its argument prototype would still apply.  */
11197 #ifdef __cplusplus
11198 extern "C"
11199 #endif
11200 char ldapssl_add_trusted_cert ();
11201 int
11202 main ()
11203 {
11204 return ldapssl_add_trusted_cert ();
11205   ;
11206   return 0;
11207 }
11208 _ACEOF
11209 if ac_fn_c_try_link "$LINENO"; then :
11210   eval "$as_ac_Lib=yes"
11211 else
11212   eval "$as_ac_Lib=no"
11213 fi
11214 rm -f core conftest.err conftest.$ac_objext \
11215     conftest$ac_exeext conftest.$ac_ext
11216 LIBS=$ac_check_lib_save_LIBS
11217 fi
11218 eval ac_res=\$$as_ac_Lib
11219                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11220 $as_echo "$ac_res" >&6; }
11221 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11222   apu_has_ldapssl_add_trusted_cert="1"
11223 fi
11224
11225         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
11227 $as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
11228 if eval \${$as_ac_Lib+:} false; then :
11229   $as_echo_n "(cached) " >&6
11230 else
11231   ac_check_lib_save_LIBS=$LIBS
11232 LIBS="-l${ldaplib} ${extralib} $LIBS"
11233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11234 /* end confdefs.h.  */
11235
11236 /* Override any GCC internal prototype to avoid an error.
11237    Use char because int might match the return type of a GCC
11238    builtin and then its argument prototype would still apply.  */
11239 #ifdef __cplusplus
11240 extern "C"
11241 #endif
11242 char ldap_start_tls_s ();
11243 int
11244 main ()
11245 {
11246 return ldap_start_tls_s ();
11247   ;
11248   return 0;
11249 }
11250 _ACEOF
11251 if ac_fn_c_try_link "$LINENO"; then :
11252   eval "$as_ac_Lib=yes"
11253 else
11254   eval "$as_ac_Lib=no"
11255 fi
11256 rm -f core conftest.err conftest.$ac_objext \
11257     conftest$ac_exeext conftest.$ac_ext
11258 LIBS=$ac_check_lib_save_LIBS
11259 fi
11260 eval ac_res=\$$as_ac_Lib
11261                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11262 $as_echo "$ac_res" >&6; }
11263 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11264   apu_has_ldap_start_tls_s="1"
11265 fi
11266
11267         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
11269 $as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
11270 if eval \${$as_ac_Lib+:} false; then :
11271   $as_echo_n "(cached) " >&6
11272 else
11273   ac_check_lib_save_LIBS=$LIBS
11274 LIBS="-l${ldaplib} ${extralib} $LIBS"
11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11276 /* end confdefs.h.  */
11277
11278 /* Override any GCC internal prototype to avoid an error.
11279    Use char because int might match the return type of a GCC
11280    builtin and then its argument prototype would still apply.  */
11281 #ifdef __cplusplus
11282 extern "C"
11283 #endif
11284 char ldap_sslinit ();
11285 int
11286 main ()
11287 {
11288 return ldap_sslinit ();
11289   ;
11290   return 0;
11291 }
11292 _ACEOF
11293 if ac_fn_c_try_link "$LINENO"; then :
11294   eval "$as_ac_Lib=yes"
11295 else
11296   eval "$as_ac_Lib=no"
11297 fi
11298 rm -f core conftest.err conftest.$ac_objext \
11299     conftest$ac_exeext conftest.$ac_ext
11300 LIBS=$ac_check_lib_save_LIBS
11301 fi
11302 eval ac_res=\$$as_ac_Lib
11303                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11304 $as_echo "$ac_res" >&6; }
11305 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11306   apu_has_ldap_sslinit="1"
11307 fi
11308
11309         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
11311 $as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
11312 if eval \${$as_ac_Lib+:} false; then :
11313   $as_echo_n "(cached) " >&6
11314 else
11315   ac_check_lib_save_LIBS=$LIBS
11316 LIBS="-l${ldaplib} ${extralib} $LIBS"
11317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318 /* end confdefs.h.  */
11319
11320 /* Override any GCC internal prototype to avoid an error.
11321    Use char because int might match the return type of a GCC
11322    builtin and then its argument prototype would still apply.  */
11323 #ifdef __cplusplus
11324 extern "C"
11325 #endif
11326 char ldapssl_init ();
11327 int
11328 main ()
11329 {
11330 return ldapssl_init ();
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 if ac_fn_c_try_link "$LINENO"; then :
11336   eval "$as_ac_Lib=yes"
11337 else
11338   eval "$as_ac_Lib=no"
11339 fi
11340 rm -f core conftest.err conftest.$ac_objext \
11341     conftest$ac_exeext conftest.$ac_ext
11342 LIBS=$ac_check_lib_save_LIBS
11343 fi
11344 eval ac_res=\$$as_ac_Lib
11345                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11346 $as_echo "$ac_res" >&6; }
11347 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11348   apu_has_ldapssl_init="1"
11349 fi
11350
11351         as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
11353 $as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
11354 if eval \${$as_ac_Lib+:} false; then :
11355   $as_echo_n "(cached) " >&6
11356 else
11357   ac_check_lib_save_LIBS=$LIBS
11358 LIBS="-l${ldaplib} ${extralib} $LIBS"
11359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11360 /* end confdefs.h.  */
11361
11362 /* Override any GCC internal prototype to avoid an error.
11363    Use char because int might match the return type of a GCC
11364    builtin and then its argument prototype would still apply.  */
11365 #ifdef __cplusplus
11366 extern "C"
11367 #endif
11368 char ldapssl_install_routines ();
11369 int
11370 main ()
11371 {
11372 return ldapssl_install_routines ();
11373   ;
11374   return 0;
11375 }
11376 _ACEOF
11377 if ac_fn_c_try_link "$LINENO"; then :
11378   eval "$as_ac_Lib=yes"
11379 else
11380   eval "$as_ac_Lib=no"
11381 fi
11382 rm -f core conftest.err conftest.$ac_objext \
11383     conftest$ac_exeext conftest.$ac_ext
11384 LIBS=$ac_check_lib_save_LIBS
11385 fi
11386 eval ac_res=\$$as_ac_Lib
11387                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11388 $as_echo "$ac_res" >&6; }
11389 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11390   apu_has_ldapssl_install_routines="1"
11391 fi
11392
11393         apu_has_ldap="1";
11394
11395 fi
11396
11397   fi
11398
11399       fi
11400
11401       if test ${apu_has_ldap} != "1"; then
11402         as_fn_error $? "could not find an LDAP library" "$LINENO" 5
11403       else
11404
11405   if test "x$LDADD_ldap" = "x"; then
11406     test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"$LDADD_ldap_found\""
11407     LDADD_ldap="$LDADD_ldap_found"
11408   else
11409     apr_addto_bugger="$LDADD_ldap_found"
11410     for i in $apr_addto_bugger; do
11411       apr_addto_duplicate="0"
11412       for j in $LDADD_ldap; do
11413         if test "x$i" = "x$j"; then
11414           apr_addto_duplicate="1"
11415           break
11416         fi
11417       done
11418       if test $apr_addto_duplicate = "0"; then
11419         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_ldap"
11420         LDADD_ldap="$LDADD_ldap $i"
11421       fi
11422     done
11423   fi
11424
11425       fi
11426       as_ac_Lib=`$as_echo "ac_cv_lib_$apu_liblber_name''_ber_init" | $as_tr_sh`
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_init in -l$apu_liblber_name" >&5
11428 $as_echo_n "checking for ber_init in -l$apu_liblber_name... " >&6; }
11429 if eval \${$as_ac_Lib+:} false; then :
11430   $as_echo_n "(cached) " >&6
11431 else
11432   ac_check_lib_save_LIBS=$LIBS
11433 LIBS="-l$apu_liblber_name  $LIBS"
11434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11435 /* end confdefs.h.  */
11436
11437 /* Override any GCC internal prototype to avoid an error.
11438    Use char because int might match the return type of a GCC
11439    builtin and then its argument prototype would still apply.  */
11440 #ifdef __cplusplus
11441 extern "C"
11442 #endif
11443 char ber_init ();
11444 int
11445 main ()
11446 {
11447 return ber_init ();
11448   ;
11449   return 0;
11450 }
11451 _ACEOF
11452 if ac_fn_c_try_link "$LINENO"; then :
11453   eval "$as_ac_Lib=yes"
11454 else
11455   eval "$as_ac_Lib=no"
11456 fi
11457 rm -f core conftest.err conftest.$ac_objext \
11458     conftest$ac_exeext conftest.$ac_ext
11459 LIBS=$ac_check_lib_save_LIBS
11460 fi
11461 eval ac_res=\$$as_ac_Lib
11462                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11463 $as_echo "$ac_res" >&6; }
11464 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11465
11466   if test "x$LDADD_ldap" = "x"; then
11467     test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"-l${apu_liblber_name}\""
11468     LDADD_ldap="-l${apu_liblber_name}"
11469   else
11470     apr_addto_bugger="-l${apu_liblber_name}"
11471     for i in $apr_addto_bugger; do
11472       apr_addto_duplicate="0"
11473       for j in $LDADD_ldap; do
11474         if test "x$i" = "x$j"; then
11475           apr_addto_duplicate="1"
11476           break
11477         fi
11478       done
11479       if test $apr_addto_duplicate = "0"; then
11480         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_ldap"
11481         LDADD_ldap="$LDADD_ldap $i"
11482       fi
11483     done
11484   fi
11485
11486 fi
11487
11488
11489       for ac_header in lber.h
11490 do :
11491   ac_fn_c_check_header_mongrel "$LINENO" "lber.h" "ac_cv_header_lber_h" "$ac_includes_default"
11492 if test "x$ac_cv_header_lber_h" = xyes; then :
11493   cat >>confdefs.h <<_ACEOF
11494 #define HAVE_LBER_H 1
11495 _ACEOF
11496  lber_h="#include <lber.h>"
11497 fi
11498
11499 done
11500
11501
11502       # Solaris has a problem in <ldap.h> which prevents it from
11503       # being included by itself.  Check for <ldap.h> manually,
11504       # including lber.h first.
11505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
11506 $as_echo_n "checking for ldap.h... " >&6; }
11507 if ${apr_cv_hdr_ldap_h+:} false; then :
11508   $as_echo_n "(cached) " >&6
11509 else
11510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511 /* end confdefs.h.  */
11512 #ifdef HAVE_LBER_H
11513       #include <lber.h>
11514       #endif
11515       #include <ldap.h>
11516
11517 _ACEOF
11518 if ac_fn_c_try_cpp "$LINENO"; then :
11519   apr_cv_hdr_ldap_h=yes
11520 else
11521   apr_cv_hdr_ldap_h=no
11522 fi
11523 rm -f conftest.err conftest.i conftest.$ac_ext
11524 fi
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_hdr_ldap_h" >&5
11526 $as_echo "$apr_cv_hdr_ldap_h" >&6; }
11527       if test "$apr_cv_hdr_ldap_h" = "yes"; then
11528         ldap_h="#include <ldap.h>"
11529
11530 $as_echo "#define HAVE_LDAP_H 1" >>confdefs.h
11531
11532       fi
11533
11534       for ac_header in ldap_ssl.h
11535 do :
11536   ac_fn_c_check_header_mongrel "$LINENO" "ldap_ssl.h" "ac_cv_header_ldap_ssl_h" "$ac_includes_default"
11537 if test "x$ac_cv_header_ldap_ssl_h" = xyes; then :
11538   cat >>confdefs.h <<_ACEOF
11539 #define HAVE_LDAP_SSL_H 1
11540 _ACEOF
11541  ldap_ssl_h="#include <ldap_ssl.h>"
11542 fi
11543
11544 done
11545
11546
11547       if test "$apr_cv_hdr_ldap_h" = "yes"; then
11548         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP toolkit" >&5
11549 $as_echo_n "checking for LDAP toolkit... " >&6; }
11550 if ${apr_cv_ldap_toolkit+:} false; then :
11551   $as_echo_n "(cached) " >&6
11552 else
11553
11554           if test "x$apr_cv_ldap_toolkit" = "x"; then
11555             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h.  */
11557 $lber_h
11558                          $ldap_h
11559                          LDAP_VENDOR_NAME
11560 _ACEOF
11561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11562   $EGREP "OpenLDAP" >/dev/null 2>&1; then :
11563   apu_has_ldap_openldap="1"
11564                                              apr_cv_ldap_toolkit="OpenLDAP"
11565 fi
11566 rm -f conftest*
11567
11568           fi
11569           if test "x$apr_cv_ldap_toolkit" = "x"; then
11570             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11571 /* end confdefs.h.  */
11572 $lber_h
11573                          $ldap_h
11574                          LDAP_VENDOR_NAME
11575 _ACEOF
11576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11577   $EGREP "Sun Microsystems Inc." >/dev/null 2>&1; then :
11578   apu_has_ldap_solaris="1"
11579                                              apr_cv_ldap_toolkit="Solaris"
11580 fi
11581 rm -f conftest*
11582
11583           fi
11584           if test "x$apr_cv_ldap_toolkit" = "x"; then
11585             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11586 /* end confdefs.h.  */
11587 $lber_h
11588                          $ldap_h
11589                          LDAP_VENDOR_NAME
11590 _ACEOF
11591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11592   $EGREP "Novell" >/dev/null 2>&1; then :
11593   apu_has_ldap_novell="1"
11594                                              apr_cv_ldap_toolkit="Novell"
11595 fi
11596 rm -f conftest*
11597
11598           fi
11599           if test "x$apr_cv_ldap_toolkit" = "x"; then
11600             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11601 /* end confdefs.h.  */
11602 $lber_h
11603                          $ldap_h
11604                          LDAP_VENDOR_NAME
11605 _ACEOF
11606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11607   $EGREP "Microsoft Corporation." >/dev/null 2>&1; then :
11608   apu_has_ldap_microsoft="1"
11609                                              apr_cv_ldap_toolkit="Microsoft"
11610 fi
11611 rm -f conftest*
11612
11613           fi
11614           if test "x$apr_cv_ldap_toolkit" = "x"; then
11615             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616 /* end confdefs.h.  */
11617 $lber_h
11618                          $ldap_h
11619                          LDAP_VENDOR_NAME
11620 _ACEOF
11621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11622   $EGREP "Netscape Communications Corp." >/dev/null 2>&1; then :
11623   apu_has_ldap_netscape="1"
11624                                              apr_cv_ldap_toolkit="Netscape"
11625 fi
11626 rm -f conftest*
11627
11628           fi
11629           if test "x$apr_cv_ldap_toolkit" = "x"; then
11630             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631 /* end confdefs.h.  */
11632 $lber_h
11633                          $ldap_h
11634                          LDAP_VENDOR_NAME
11635 _ACEOF
11636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11637   $EGREP "mozilla.org" >/dev/null 2>&1; then :
11638   apu_has_ldap_mozilla="1"
11639                                              apr_cv_ldap_toolkit="Mozilla"
11640 fi
11641 rm -f conftest*
11642
11643           fi
11644           if test "x$apr_cv_ldap_toolkit" = "x"; then
11645             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646 /* end confdefs.h.  */
11647 $lber_h
11648                          $ldap_h
11649                          LDAP_VENDOR_NAME
11650 _ACEOF
11651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11652   $EGREP "International Business Machines" >/dev/null 2>&1; then :
11653   apu_has_ldap_tivoli="1"
11654                                              apr_cv_ldap_toolkit="Tivoli"
11655 fi
11656 rm -f conftest*
11657
11658           fi
11659           if test "x$apr_cv_ldap_toolkit" = "x"; then
11660             case "$host" in
11661             *-ibm-os390)
11662               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11663 /* end confdefs.h.  */
11664 $lber_h
11665                                    $ldap_h
11666 _ACEOF
11667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11668   $EGREP "IBM" >/dev/null 2>&1; then :
11669   apu_has_ldap_zos="1"
11670                                               apr_cv_ldap_toolkit="z/OS"
11671 fi
11672 rm -f conftest*
11673
11674               ;;
11675             esac
11676           fi
11677           if test "x$apr_cv_ldap_toolkit" = "x"; then
11678             apu_has_ldap_other="1"
11679             apr_cv_ldap_toolkit="unknown"
11680           fi
11681
11682 fi
11683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_ldap_toolkit" >&5
11684 $as_echo "$apr_cv_ldap_toolkit" >&6; }
11685       fi
11686
11687       CPPFLAGS=$save_cppflags
11688       LDFLAGS=$save_ldflags
11689       LIBS=$save_libs
11690     fi
11691
11692 fi
11693
11694
11695 if test "$apu_has_ldap_openldap" = "1"; then
11696     save_cppflags="$CPPFLAGS"
11697     save_ldflags="$LDFLAGS"
11698     save_libs="$LIBS"
11699
11700     CPPFLAGS="$CPPFLAGS $APRUTIL_INCLUDES"
11701     LDFLAGS="$LDFLAGS $APRUTIL_LDFLAGS"
11702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking style of ldap_set_rebind_proc routine" >&5
11703 $as_echo_n "checking style of ldap_set_rebind_proc routine... " >&6; }
11704 if ${ac_cv_ldap_set_rebind_proc_style+:} false; then :
11705   $as_echo_n "(cached) " >&6
11706 else
11707   apr_save_CFLAGS=$CFLAGS
11708  CFLAGS="$CFLAGS $CFLAGS_WARN"
11709  if test "$ac_cv_c_compiler_gnu" = "yes"; then
11710    CFLAGS="$CFLAGS -Werror"
11711  fi
11712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11713 /* end confdefs.h.  */
11714 #include "confdefs.h"
11715
11716
11717     #ifdef HAVE_LBER_H
11718     #include <lber.h>
11719     #endif
11720     #ifdef HAVE_LDAP_H
11721     #include <ldap.h>
11722     #endif
11723
11724    int main(int argc, const char *const *argv) {
11725
11726     ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
11727
11728       return 0; }
11729
11730 _ACEOF
11731 if ac_fn_c_try_compile "$LINENO"; then :
11732   ac_cv_ldap_set_rebind_proc_style=three
11733 else
11734   ac_cv_ldap_set_rebind_proc_style=two
11735 fi
11736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11737  CFLAGS=$apr_save_CFLAGS
11738
11739 fi
11740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ldap_set_rebind_proc_style" >&5
11741 $as_echo "$ac_cv_ldap_set_rebind_proc_style" >&6; }
11742
11743     if test "$ac_cv_ldap_set_rebind_proc_style" = "three"; then
11744
11745 $as_echo "#define LDAP_SET_REBIND_PROC_THREE 1" >>confdefs.h
11746
11747     fi
11748
11749     CPPFLAGS="$save_cppflags"
11750     LDFLAGS="$save_ldflags"
11751     LIBS="$save_libs"
11752 fi
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778   apu_use_sdbm=0
11779   apu_use_ndbm=0
11780   apu_use_gdbm=0
11781   apu_use_db=0
11782     apu_have_sdbm=1
11783   apu_have_gdbm=0
11784   apu_have_ndbm=0
11785   apu_have_db=0
11786
11787   apu_db_header=db.h                # default so apu_select_dbm.h is syntactically correct
11788   apu_db_version=0
11789
11790   # Maximum supported version announced in help string.
11791   # Although we search for all versions up to 6.9,
11792   # we should only include existing versions in our
11793   # help string.
11794   dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4"
11795   db_max_version=48
11796   db_min_version=41
11797   db_version="$db_min_version"
11798   while [ $db_version -le $db_max_version ]
11799   do
11800     dbm_list="$dbm_list, db$db_version"
11801     db_version=`expr $db_version + 1`
11802   done
11803   db_max_version=53
11804   db_min_version=50
11805   db_version="$db_min_version"
11806   while [ $db_version -le $db_max_version ]
11807   do
11808     dbm_list="$dbm_list, db$db_version"
11809     db_version=`expr $db_version + 1`
11810   done
11811   db_max_version=60
11812   db_min_version=60
11813   db_version="$db_min_version"
11814   while [ $db_version -le $db_max_version ]
11815   do
11816     dbm_list="$dbm_list, db$db_version"
11817     db_version=`expr $db_version + 1`
11818   done
11819
11820
11821 # Check whether --with-dbm was given.
11822 if test "${with_dbm+set}" = set; then :
11823   withval=$with_dbm;
11824     if test "$withval" = "yes"; then
11825       as_fn_error $? "--with-dbm needs to specify a DBM type to use.
11826         One of: $dbm_list" "$LINENO" 5
11827     fi
11828     requested="$withval"
11829
11830 else
11831
11832     requested=default
11833
11834 fi
11835
11836
11837
11838 # Check whether --with-gdbm was given.
11839 if test "${with_gdbm+set}" = set; then :
11840   withval=$with_gdbm;
11841     apu_have_gdbm=0
11842     if test "$withval" = "yes"; then
11843       ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
11844 if test "x$ac_cv_header_gdbm_h" = xyes; then :
11845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
11846 $as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11847 if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
11848   $as_echo_n "(cached) " >&6
11849 else
11850   ac_check_lib_save_LIBS=$LIBS
11851 LIBS="-lgdbm  $LIBS"
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h.  */
11854
11855 /* Override any GCC internal prototype to avoid an error.
11856    Use char because int might match the return type of a GCC
11857    builtin and then its argument prototype would still apply.  */
11858 #ifdef __cplusplus
11859 extern "C"
11860 #endif
11861 char gdbm_open ();
11862 int
11863 main ()
11864 {
11865 return gdbm_open ();
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 if ac_fn_c_try_link "$LINENO"; then :
11871   ac_cv_lib_gdbm_gdbm_open=yes
11872 else
11873   ac_cv_lib_gdbm_gdbm_open=no
11874 fi
11875 rm -f core conftest.err conftest.$ac_objext \
11876     conftest$ac_exeext conftest.$ac_ext
11877 LIBS=$ac_check_lib_save_LIBS
11878 fi
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11880 $as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11881 if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
11882   apu_have_gdbm=1
11883 fi
11884
11885 fi
11886
11887
11888     elif test "$withval" = "no"; then
11889       apu_have_gdbm=0
11890     else
11891       saved_cppflags="$CPPFLAGS"
11892       saved_ldflags="$LDFLAGS"
11893       CPPFLAGS="$CPPFLAGS -I$withval/include"
11894       LDFLAGS="$LDFLAGS -L$withval/lib "
11895
11896       { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for gdbm in $withval" >&5
11897 $as_echo_n "checking checking for gdbm in $withval... " >&6; }
11898       ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
11899 if test "x$ac_cv_header_gdbm_h" = xyes; then :
11900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
11901 $as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11902 if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
11903   $as_echo_n "(cached) " >&6
11904 else
11905   ac_check_lib_save_LIBS=$LIBS
11906 LIBS="-lgdbm  $LIBS"
11907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908 /* end confdefs.h.  */
11909
11910 /* Override any GCC internal prototype to avoid an error.
11911    Use char because int might match the return type of a GCC
11912    builtin and then its argument prototype would still apply.  */
11913 #ifdef __cplusplus
11914 extern "C"
11915 #endif
11916 char gdbm_open ();
11917 int
11918 main ()
11919 {
11920 return gdbm_open ();
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 if ac_fn_c_try_link "$LINENO"; then :
11926   ac_cv_lib_gdbm_gdbm_open=yes
11927 else
11928   ac_cv_lib_gdbm_gdbm_open=no
11929 fi
11930 rm -f core conftest.err conftest.$ac_objext \
11931     conftest$ac_exeext conftest.$ac_ext
11932 LIBS=$ac_check_lib_save_LIBS
11933 fi
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11935 $as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11936 if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
11937   apu_have_gdbm=1
11938 fi
11939
11940 fi
11941
11942
11943       if test "$apu_have_gdbm" != "0"; then
11944
11945   if test "x$APRUTIL_LDFLAGS" = "x"; then
11946     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
11947     APRUTIL_LDFLAGS="-L$withval/lib"
11948   else
11949     apr_addto_bugger="-L$withval/lib"
11950     for i in $apr_addto_bugger; do
11951       apr_addto_duplicate="0"
11952       for j in $APRUTIL_LDFLAGS; do
11953         if test "x$i" = "x$j"; then
11954           apr_addto_duplicate="1"
11955           break
11956         fi
11957       done
11958       if test $apr_addto_duplicate = "0"; then
11959         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
11960         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
11961       fi
11962     done
11963   fi
11964
11965
11966   if test "x$APRUTIL_INCLUDES" = "x"; then
11967     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
11968     APRUTIL_INCLUDES="-I$withval/include"
11969   else
11970     apr_addto_bugger="-I$withval/include"
11971     for i in $apr_addto_bugger; do
11972       apr_addto_duplicate="0"
11973       for j in $APRUTIL_INCLUDES; do
11974         if test "x$i" = "x$j"; then
11975           apr_addto_duplicate="1"
11976           break
11977         fi
11978       done
11979       if test $apr_addto_duplicate = "0"; then
11980         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
11981         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
11982       fi
11983     done
11984   fi
11985
11986       fi
11987       CPPFLAGS="$saved_cppflags"
11988       LDFLAGS="$saved_ldflags"
11989     fi
11990
11991 fi
11992
11993
11994
11995 # Check whether --with-ndbm was given.
11996 if test "${with_ndbm+set}" = set; then :
11997   withval=$with_ndbm;
11998     apu_have_ndbm=0
11999     if test "$withval" = "yes"; then
12000       { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm in the usual places" >&5
12001 $as_echo_n "checking checking for ndbm in the usual places... " >&6; }
12002       apu_want_ndbm=1
12003       NDBM_INC=""
12004       NDBM_LDFLAGS=""
12005     elif test "$withval" = "no"; then
12006       apu_want_ndbm=0
12007     else
12008       apu_want_ndbm=1
12009       case "$withval" in
12010         *":"*)
12011           NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
12012           NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
12013           { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS " >&5
12014 $as_echo_n "checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS ... " >&6; }
12015         ;;
12016         *)
12017           NDBM_INC="-I$withval/include"
12018           NDBM_LDFLAGS="-L$withval/lib"
12019           { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm includes in $withval" >&5
12020 $as_echo_n "checking checking for ndbm includes in $withval... " >&6; }
12021         ;;
12022       esac
12023     fi
12024
12025     save_cppflags="$CPPFLAGS"
12026     save_ldflags="$LDFLAGS"
12027     CPPFLAGS="$CPPFLAGS $NDBM_INC"
12028     LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
12029         if test "$apu_want_ndbm" != "0"; then
12030       ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default"
12031 if test "x$ac_cv_header_ndbm_h" = xyes; then :
12032   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lc" >&5
12033 $as_echo_n "checking for dbm_open in -lc... " >&6; }
12034 if ${ac_cv_lib_c_dbm_open+:} false; then :
12035   $as_echo_n "(cached) " >&6
12036 else
12037   ac_check_lib_save_LIBS=$LIBS
12038 LIBS="-lc  $LIBS"
12039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12040 /* end confdefs.h.  */
12041
12042 /* Override any GCC internal prototype to avoid an error.
12043    Use char because int might match the return type of a GCC
12044    builtin and then its argument prototype would still apply.  */
12045 #ifdef __cplusplus
12046 extern "C"
12047 #endif
12048 char dbm_open ();
12049 int
12050 main ()
12051 {
12052 return dbm_open ();
12053   ;
12054   return 0;
12055 }
12056 _ACEOF
12057 if ac_fn_c_try_link "$LINENO"; then :
12058   ac_cv_lib_c_dbm_open=yes
12059 else
12060   ac_cv_lib_c_dbm_open=no
12061 fi
12062 rm -f core conftest.err conftest.$ac_objext \
12063     conftest$ac_exeext conftest.$ac_ext
12064 LIBS=$ac_check_lib_save_LIBS
12065 fi
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_dbm_open" >&5
12067 $as_echo "$ac_cv_lib_c_dbm_open" >&6; }
12068 if test "x$ac_cv_lib_c_dbm_open" = xyes; then :
12069   apu_have_ndbm=1;apu_ndbm_lib=c
12070 else
12071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldbm" >&5
12072 $as_echo_n "checking for dbm_open in -ldbm... " >&6; }
12073 if ${ac_cv_lib_dbm_dbm_open+:} false; then :
12074   $as_echo_n "(cached) " >&6
12075 else
12076   ac_check_lib_save_LIBS=$LIBS
12077 LIBS="-ldbm  $LIBS"
12078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12079 /* end confdefs.h.  */
12080
12081 /* Override any GCC internal prototype to avoid an error.
12082    Use char because int might match the return type of a GCC
12083    builtin and then its argument prototype would still apply.  */
12084 #ifdef __cplusplus
12085 extern "C"
12086 #endif
12087 char dbm_open ();
12088 int
12089 main ()
12090 {
12091 return dbm_open ();
12092   ;
12093   return 0;
12094 }
12095 _ACEOF
12096 if ac_fn_c_try_link "$LINENO"; then :
12097   ac_cv_lib_dbm_dbm_open=yes
12098 else
12099   ac_cv_lib_dbm_dbm_open=no
12100 fi
12101 rm -f core conftest.err conftest.$ac_objext \
12102     conftest$ac_exeext conftest.$ac_ext
12103 LIBS=$ac_check_lib_save_LIBS
12104 fi
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dbm_dbm_open" >&5
12106 $as_echo "$ac_cv_lib_dbm_dbm_open" >&6; }
12107 if test "x$ac_cv_lib_dbm_dbm_open" = xyes; then :
12108   apu_have_ndbm=1;apu_ndbm_lib=dbm
12109 else
12110   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldb" >&5
12111 $as_echo_n "checking for dbm_open in -ldb... " >&6; }
12112 if ${ac_cv_lib_db_dbm_open+:} false; then :
12113   $as_echo_n "(cached) " >&6
12114 else
12115   ac_check_lib_save_LIBS=$LIBS
12116 LIBS="-ldb  $LIBS"
12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12118 /* end confdefs.h.  */
12119
12120 /* Override any GCC internal prototype to avoid an error.
12121    Use char because int might match the return type of a GCC
12122    builtin and then its argument prototype would still apply.  */
12123 #ifdef __cplusplus
12124 extern "C"
12125 #endif
12126 char dbm_open ();
12127 int
12128 main ()
12129 {
12130 return dbm_open ();
12131   ;
12132   return 0;
12133 }
12134 _ACEOF
12135 if ac_fn_c_try_link "$LINENO"; then :
12136   ac_cv_lib_db_dbm_open=yes
12137 else
12138   ac_cv_lib_db_dbm_open=no
12139 fi
12140 rm -f core conftest.err conftest.$ac_objext \
12141     conftest$ac_exeext conftest.$ac_ext
12142 LIBS=$ac_check_lib_save_LIBS
12143 fi
12144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db_dbm_open" >&5
12145 $as_echo "$ac_cv_lib_db_dbm_open" >&6; }
12146 if test "x$ac_cv_lib_db_dbm_open" = xyes; then :
12147   apu_have_ndbm=1;apu_ndbm_lib=db
12148 else
12149   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __db_ndbm_open in -ldb" >&5
12150 $as_echo_n "checking for __db_ndbm_open in -ldb... " >&6; }
12151 if ${ac_cv_lib_db___db_ndbm_open+:} false; then :
12152   $as_echo_n "(cached) " >&6
12153 else
12154   ac_check_lib_save_LIBS=$LIBS
12155 LIBS="-ldb  $LIBS"
12156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12157 /* end confdefs.h.  */
12158
12159 /* Override any GCC internal prototype to avoid an error.
12160    Use char because int might match the return type of a GCC
12161    builtin and then its argument prototype would still apply.  */
12162 #ifdef __cplusplus
12163 extern "C"
12164 #endif
12165 char __db_ndbm_open ();
12166 int
12167 main ()
12168 {
12169 return __db_ndbm_open ();
12170   ;
12171   return 0;
12172 }
12173 _ACEOF
12174 if ac_fn_c_try_link "$LINENO"; then :
12175   ac_cv_lib_db___db_ndbm_open=yes
12176 else
12177   ac_cv_lib_db___db_ndbm_open=no
12178 fi
12179 rm -f core conftest.err conftest.$ac_objext \
12180     conftest$ac_exeext conftest.$ac_ext
12181 LIBS=$ac_check_lib_save_LIBS
12182 fi
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db___db_ndbm_open" >&5
12184 $as_echo "$ac_cv_lib_db___db_ndbm_open" >&6; }
12185 if test "x$ac_cv_lib_db___db_ndbm_open" = xyes; then :
12186   apu_have_ndbm=1;apu_ndbm_lib=db
12187 fi
12188
12189
12190 fi
12191
12192
12193 fi
12194
12195
12196 fi
12197
12198
12199 fi
12200
12201
12202       if test "$apu_have_ndbm" != "0";  then
12203         if test "$withval" != "yes"; then
12204
12205   if test "x$APRUTIL_INCLUDES" = "x"; then
12206     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"$NDBM_INC\""
12207     APRUTIL_INCLUDES="$NDBM_INC"
12208   else
12209     apr_addto_bugger="$NDBM_INC"
12210     for i in $apr_addto_bugger; do
12211       apr_addto_duplicate="0"
12212       for j in $APRUTIL_INCLUDES; do
12213         if test "x$i" = "x$j"; then
12214           apr_addto_duplicate="1"
12215           break
12216         fi
12217       done
12218       if test $apr_addto_duplicate = "0"; then
12219         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12220         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12221       fi
12222     done
12223   fi
12224
12225
12226   if test "x$APRUTIL_LDFLAGS" = "x"; then
12227     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"$NDBM_LDFLAGS\""
12228     APRUTIL_LDFLAGS="$NDBM_LDFLAGS"
12229   else
12230     apr_addto_bugger="$NDBM_LDFLAGS"
12231     for i in $apr_addto_bugger; do
12232       apr_addto_duplicate="0"
12233       for j in $APRUTIL_LDFLAGS; do
12234         if test "x$i" = "x$j"; then
12235           apr_addto_duplicate="1"
12236           break
12237         fi
12238       done
12239       if test $apr_addto_duplicate = "0"; then
12240         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12241         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12242       fi
12243     done
12244   fi
12245
12246         fi
12247       elif test "$withval" != "yes"; then
12248         as_fn_error $? "NDBM not found in the specified directory" "$LINENO" 5
12249       fi
12250     fi
12251     CPPFLAGS="$save_cppflags"
12252     LDFLAGS="$save_ldflags"
12253
12254 else
12255
12256         apu_have_ndbm=0
12257
12258 fi
12259
12260
12261
12262   if test -n "$apu_db_xtra_libs"; then
12263     saveddbxtralibs="$LIBS"
12264     LIBS="$apu_db_xtra_libs $LIBS"
12265   fi
12266
12267
12268 # Check whether --with-berkeley-db was given.
12269 if test "${with_berkeley_db+set}" = set; then :
12270   withval=$with_berkeley_db;
12271     if test "$withval" = "yes"; then
12272       apu_want_db=1
12273       user_places=""
12274     elif test "$withval" = "no"; then
12275       apu_want_db=0
12276     else
12277       apu_want_db=1
12278       user_places="$withval"
12279     fi
12280
12281     if test "$apu_want_db" != "0"; then
12282
12283   requested=$requested
12284   check_places=$user_places
12285
12286   case "$requested" in
12287   db)
12288
12289   all_places="$check_places"
12290
12291   # Start version search at version 6.9
12292   db_version=69
12293   while [ $db_version -ge 40 ]
12294   do
12295     db_major=`echo $db_version | sed -e 's/.$//'`
12296     db_minor=`echo $db_version | sed -e 's/.//'`
12297
12298   places="$all_places"
12299   db_major="$db_major"
12300   db_minor="$db_minor"
12301   if test -z "$places"; then
12302     places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
12303   fi
12304
12305   bdb_version="${db_major}"
12306   if test ""${db_minor}"" != "-1"; then
12307     bdb_version="$bdb_version."${db_minor}""
12308     if test ""-1"" != "-1"; then
12309       bdb_version="$bdb_version."-1""
12310     fi
12311   fi
12312   bdb_places="$places"
12313   bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
12314   bdb_default_search_lib_names="db-${db_major}.${db_minor} db${db_major}-${db_major}.${db_minor} db${db_major}${db_minor} db-${db_major} db${db_major} db"
12315
12316
12317   apu_have_db=0
12318
12319   # Save the original values of the flags we tweak.
12320   apu_check_lib_save_libs="$LIBS"
12321   apu_check_lib_save_ldflags="$LDFLAGS"
12322   apu_check_lib_save_cppflags="$CPPFLAGS"
12323
12324   # The variable `found' is the prefix under which we've found
12325   # Berkeley DB, or `not' if we haven't found it anywhere yet.
12326   found=not
12327   for bdb_place in $bdb_places; do
12328
12329     LDFLAGS="$apu_check_lib_save_ldflags"
12330     CPPFLAGS="$apu_check_lib_save_cppflags"
12331     case "$bdb_place" in
12332       "std" )
12333         description="the standard places"
12334       ;;
12335       *":"* )
12336         header="`echo $bdb_place | sed -e 's/:.*$//'`"
12337         lib="`echo $bdb_place | sed -e 's/^.*://'`"
12338         CPPFLAGS="$CPPFLAGS -I$header"
12339         LDFLAGS="$LDFLAGS -L$lib"
12340         description="$header and $lib"
12341       ;;
12342       * )
12343         if test -d $bdb_place; then
12344           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12345           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12346         else
12347           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12348 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12349           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12350 $as_echo "directory not found" >&6; }
12351           continue
12352         fi
12353         description="$bdb_place"
12354       ;;
12355     esac
12356
12357     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12358     # trick to display a message instead.
12359     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12360 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12361     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12362 $as_echo "" >&6; }
12363
12364     for bdb_libname in $bdb_default_search_lib_names; do
12365       for bdb_header in $bdb_default_search_headers; do
12366         # Clear the header cache variable for each location
12367
12368         cache_id="`echo ac_cv_header_${bdb_header} \
12369                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12370
12371         unset $cache_id
12372         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12373 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12374 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12375
12376           if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
12377             # We generate a separate cache variable for each prefix and libname
12378             # we search under.  That way, we avoid caching information that
12379             # changes if the user runs `configure' with a different set of
12380             # switches.
12381
12382             cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12383                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12384
12385
12386             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12387 $as_echo_n "checking for -l$bdb_libname... " >&6; }
12388                                     if eval \${$cache_id+:} false; then :
12389   $as_echo_n "(cached) " >&6
12390 else
12391
12392
12393     apu_try_berkeley_db_save_libs="$LIBS"
12394
12395     apu_check_berkeley_db_major="${db_major}"
12396     apu_check_berkeley_db_minor="${db_minor}"
12397     apu_check_berkeley_db_patch="-1"
12398     apu_try_berkeley_db_header=$bdb_header
12399     apu_try_berkeley_db_libname=$bdb_libname
12400
12401     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12402     if test "$cross_compiling" = yes; then :
12403   apu_try_berkeley_db=yes
12404
12405 else
12406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h.  */
12408
12409 #include <stdlib.h>
12410 #include <stdio.h>
12411 #include <$apu_try_berkeley_db_header>
12412 main ()
12413 {
12414   int major, minor, patch;
12415
12416   db_version(&major, &minor, &patch);
12417
12418   /* Sanity check: ensure that db.h constants actually match the db library */
12419   if (major != DB_VERSION_MAJOR
12420       || minor != DB_VERSION_MINOR
12421       || patch != DB_VERSION_PATCH)
12422     exit (1);
12423
12424   /* Run-time check:  ensure the library claims to be the correct version. */
12425
12426   if ($apu_check_berkeley_db_major != -1) {
12427     if (major < $apu_check_berkeley_db_major)
12428       exit (1);
12429     if (major > $apu_check_berkeley_db_major)
12430       exit (0);
12431   }
12432
12433   if ($apu_check_berkeley_db_minor != -1) {
12434     if (minor < $apu_check_berkeley_db_minor)
12435       exit (1);
12436     if (minor > $apu_check_berkeley_db_minor)
12437       exit (0);
12438   }
12439
12440   if ($apu_check_berkeley_db_patch == -1
12441       || patch >= $apu_check_berkeley_db_patch)
12442     exit (0);
12443   else
12444     exit (1);
12445 }
12446
12447 _ACEOF
12448 if ac_fn_c_try_run "$LINENO"; then :
12449   apu_try_berkeley_db=yes
12450 else
12451   apu_try_berkeley_db=no
12452 fi
12453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12454   conftest.$ac_objext conftest.beam conftest.$ac_ext
12455 fi
12456
12457
12458     LIBS="$apu_try_berkeley_db_save_libs"
12459
12460
12461                 eval "$cache_id=$apu_try_berkeley_db"
12462
12463 fi
12464
12465             result="`eval echo '$'$cache_id`"
12466             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
12467 $as_echo "$result" >&6; }
12468           elif test ""${db_major}"" = "1"; then
12469             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
12471 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
12472 if eval \${$as_ac_Lib+:} false; then :
12473   $as_echo_n "(cached) " >&6
12474 else
12475   ac_check_lib_save_LIBS=$LIBS
12476 LIBS="-l$bdb_libname  $LIBS"
12477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478 /* end confdefs.h.  */
12479
12480 /* Override any GCC internal prototype to avoid an error.
12481    Use char because int might match the return type of a GCC
12482    builtin and then its argument prototype would still apply.  */
12483 #ifdef __cplusplus
12484 extern "C"
12485 #endif
12486 char dbopen ();
12487 int
12488 main ()
12489 {
12490 return dbopen ();
12491   ;
12492   return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_link "$LINENO"; then :
12496   eval "$as_ac_Lib=yes"
12497 else
12498   eval "$as_ac_Lib=no"
12499 fi
12500 rm -f core conftest.err conftest.$ac_objext \
12501     conftest$ac_exeext conftest.$ac_ext
12502 LIBS=$ac_check_lib_save_LIBS
12503 fi
12504 eval ac_res=\$$as_ac_Lib
12505                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12506 $as_echo "$ac_res" >&6; }
12507 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12508   result=yes
12509 else
12510   result=no
12511
12512 fi
12513
12514           elif test ""${db_major}"" = "2"; then
12515             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
12516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
12517 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
12518 if eval \${$as_ac_Lib+:} false; then :
12519   $as_echo_n "(cached) " >&6
12520 else
12521   ac_check_lib_save_LIBS=$LIBS
12522 LIBS="-l$bdb_libname  $LIBS"
12523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524 /* end confdefs.h.  */
12525
12526 /* Override any GCC internal prototype to avoid an error.
12527    Use char because int might match the return type of a GCC
12528    builtin and then its argument prototype would still apply.  */
12529 #ifdef __cplusplus
12530 extern "C"
12531 #endif
12532 char db_open ();
12533 int
12534 main ()
12535 {
12536 return db_open ();
12537   ;
12538   return 0;
12539 }
12540 _ACEOF
12541 if ac_fn_c_try_link "$LINENO"; then :
12542   eval "$as_ac_Lib=yes"
12543 else
12544   eval "$as_ac_Lib=no"
12545 fi
12546 rm -f core conftest.err conftest.$ac_objext \
12547     conftest$ac_exeext conftest.$ac_ext
12548 LIBS=$ac_check_lib_save_LIBS
12549 fi
12550 eval ac_res=\$$as_ac_Lib
12551                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12552 $as_echo "$ac_res" >&6; }
12553 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12554   result=yes
12555 else
12556   result=no
12557
12558 fi
12559
12560           fi
12561
12562 else
12563   result="no"
12564 fi
12565
12566
12567
12568         # If we found it, no need to search any more.
12569         if test "$result" = "yes"; then
12570           found="$bdb_place"
12571           break
12572         fi
12573       done
12574       test "$found" != "not" && break
12575     done
12576     test "$found" != "not" && break
12577   done
12578
12579   # Restore the original values of the flags we tweak.
12580   LDFLAGS="$apu_check_lib_save_ldflags"
12581   CPPFLAGS="$apu_check_lib_save_cppflags"
12582
12583   case "$found" in
12584   "not")
12585     apu_have_db=0
12586     ;;
12587   "std")
12588     apu_db_header=$bdb_header
12589     apu_db_lib=$bdb_libname
12590     apu_have_db=1
12591     ;;
12592   *":"*)
12593     header="`echo $found | sed -e 's/:.*$//'`"
12594     lib="`echo $found | sed -e 's/^.*://'`"
12595
12596
12597   if test "x$APRUTIL_INCLUDES" = "x"; then
12598     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
12599     APRUTIL_INCLUDES="-I$header"
12600   else
12601     apr_addto_bugger="-I$header"
12602     for i in $apr_addto_bugger; do
12603       apr_addto_duplicate="0"
12604       for j in $APRUTIL_INCLUDES; do
12605         if test "x$i" = "x$j"; then
12606           apr_addto_duplicate="1"
12607           break
12608         fi
12609       done
12610       if test $apr_addto_duplicate = "0"; then
12611         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12612         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12613       fi
12614     done
12615   fi
12616
12617
12618   if test "x$APRUTIL_LDFLAGS" = "x"; then
12619     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
12620     APRUTIL_LDFLAGS="-L$lib"
12621   else
12622     apr_addto_bugger="-L$lib"
12623     for i in $apr_addto_bugger; do
12624       apr_addto_duplicate="0"
12625       for j in $APRUTIL_LDFLAGS; do
12626         if test "x$i" = "x$j"; then
12627           apr_addto_duplicate="1"
12628           break
12629         fi
12630       done
12631       if test $apr_addto_duplicate = "0"; then
12632         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12633         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12634       fi
12635     done
12636   fi
12637
12638     apu_db_header=$bdb_header
12639     apu_db_lib=$bdb_libname
12640     apu_have_db=1
12641     ;;
12642   *)
12643
12644   if test "x$APRUTIL_INCLUDES" = "x"; then
12645     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
12646     APRUTIL_INCLUDES="-I$found/include"
12647   else
12648     apr_addto_bugger="-I$found/include"
12649     for i in $apr_addto_bugger; do
12650       apr_addto_duplicate="0"
12651       for j in $APRUTIL_INCLUDES; do
12652         if test "x$i" = "x$j"; then
12653           apr_addto_duplicate="1"
12654           break
12655         fi
12656       done
12657       if test $apr_addto_duplicate = "0"; then
12658         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12659         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12660       fi
12661     done
12662   fi
12663
12664
12665   if test "x$APRUTIL_LDFLAGS" = "x"; then
12666     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
12667     APRUTIL_LDFLAGS="-L$found/lib"
12668   else
12669     apr_addto_bugger="-L$found/lib"
12670     for i in $apr_addto_bugger; do
12671       apr_addto_duplicate="0"
12672       for j in $APRUTIL_LDFLAGS; do
12673         if test "x$i" = "x$j"; then
12674           apr_addto_duplicate="1"
12675           break
12676         fi
12677       done
12678       if test $apr_addto_duplicate = "0"; then
12679         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12680         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12681       fi
12682     done
12683   fi
12684
12685     apu_db_header=$bdb_header
12686     apu_db_lib=$bdb_libname
12687     apu_have_db=1
12688     ;;
12689   esac
12690
12691   if test "$apu_have_db" = "1"; then
12692     apu_db_version=${db_major}
12693   fi
12694
12695     if test "$apu_have_db" = "1"; then
12696       break
12697     fi
12698     db_version=`expr $db_version - 1`
12699   done
12700   if test "$apu_have_db" = "0"; then
12701
12702   places="$all_places"
12703   if test -z "$places"; then
12704     places="std"
12705   fi
12706
12707   bdb_version=3
12708   if test "-1" != "-1"; then
12709     bdb_version="$bdb_version.-1"
12710     if test "-1" != "-1"; then
12711       bdb_version="$bdb_version.-1"
12712     fi
12713   fi
12714   bdb_places="$places"
12715   bdb_default_search_headers="db3/db.h db.h"
12716   bdb_default_search_lib_names="db3 db"
12717
12718
12719   apu_have_db=0
12720
12721   # Save the original values of the flags we tweak.
12722   apu_check_lib_save_libs="$LIBS"
12723   apu_check_lib_save_ldflags="$LDFLAGS"
12724   apu_check_lib_save_cppflags="$CPPFLAGS"
12725
12726   # The variable `found' is the prefix under which we've found
12727   # Berkeley DB, or `not' if we haven't found it anywhere yet.
12728   found=not
12729   for bdb_place in $bdb_places; do
12730
12731     LDFLAGS="$apu_check_lib_save_ldflags"
12732     CPPFLAGS="$apu_check_lib_save_cppflags"
12733     case "$bdb_place" in
12734       "std" )
12735         description="the standard places"
12736       ;;
12737       *":"* )
12738         header="`echo $bdb_place | sed -e 's/:.*$//'`"
12739         lib="`echo $bdb_place | sed -e 's/^.*://'`"
12740         CPPFLAGS="$CPPFLAGS -I$header"
12741         LDFLAGS="$LDFLAGS -L$lib"
12742         description="$header and $lib"
12743       ;;
12744       * )
12745         if test -d $bdb_place; then
12746           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12747           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12748         else
12749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12750 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12752 $as_echo "directory not found" >&6; }
12753           continue
12754         fi
12755         description="$bdb_place"
12756       ;;
12757     esac
12758
12759     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12760     # trick to display a message instead.
12761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12762 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12764 $as_echo "" >&6; }
12765
12766     for bdb_libname in $bdb_default_search_lib_names; do
12767       for bdb_header in $bdb_default_search_headers; do
12768         # Clear the header cache variable for each location
12769
12770         cache_id="`echo ac_cv_header_${bdb_header} \
12771                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12772
12773         unset $cache_id
12774         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12775 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12776 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12777
12778           if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then
12779             # We generate a separate cache variable for each prefix and libname
12780             # we search under.  That way, we avoid caching information that
12781             # changes if the user runs `configure' with a different set of
12782             # switches.
12783
12784             cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12785                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12786
12787
12788             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12789 $as_echo_n "checking for -l$bdb_libname... " >&6; }
12790                                     if eval \${$cache_id+:} false; then :
12791   $as_echo_n "(cached) " >&6
12792 else
12793
12794
12795     apu_try_berkeley_db_save_libs="$LIBS"
12796
12797     apu_check_berkeley_db_major=3
12798     apu_check_berkeley_db_minor=-1
12799     apu_check_berkeley_db_patch=-1
12800     apu_try_berkeley_db_header=$bdb_header
12801     apu_try_berkeley_db_libname=$bdb_libname
12802
12803     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12804     if test "$cross_compiling" = yes; then :
12805   apu_try_berkeley_db=yes
12806
12807 else
12808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12809 /* end confdefs.h.  */
12810
12811 #include <stdlib.h>
12812 #include <stdio.h>
12813 #include <$apu_try_berkeley_db_header>
12814 main ()
12815 {
12816   int major, minor, patch;
12817
12818   db_version(&major, &minor, &patch);
12819
12820   /* Sanity check: ensure that db.h constants actually match the db library */
12821   if (major != DB_VERSION_MAJOR
12822       || minor != DB_VERSION_MINOR
12823       || patch != DB_VERSION_PATCH)
12824     exit (1);
12825
12826   /* Run-time check:  ensure the library claims to be the correct version. */
12827
12828   if ($apu_check_berkeley_db_major != -1) {
12829     if (major < $apu_check_berkeley_db_major)
12830       exit (1);
12831     if (major > $apu_check_berkeley_db_major)
12832       exit (0);
12833   }
12834
12835   if ($apu_check_berkeley_db_minor != -1) {
12836     if (minor < $apu_check_berkeley_db_minor)
12837       exit (1);
12838     if (minor > $apu_check_berkeley_db_minor)
12839       exit (0);
12840   }
12841
12842   if ($apu_check_berkeley_db_patch == -1
12843       || patch >= $apu_check_berkeley_db_patch)
12844     exit (0);
12845   else
12846     exit (1);
12847 }
12848
12849 _ACEOF
12850 if ac_fn_c_try_run "$LINENO"; then :
12851   apu_try_berkeley_db=yes
12852 else
12853   apu_try_berkeley_db=no
12854 fi
12855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12856   conftest.$ac_objext conftest.beam conftest.$ac_ext
12857 fi
12858
12859
12860     LIBS="$apu_try_berkeley_db_save_libs"
12861
12862
12863                 eval "$cache_id=$apu_try_berkeley_db"
12864
12865 fi
12866
12867             result="`eval echo '$'$cache_id`"
12868             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
12869 $as_echo "$result" >&6; }
12870           elif test "3" = "1"; then
12871             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
12873 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
12874 if eval \${$as_ac_Lib+:} false; then :
12875   $as_echo_n "(cached) " >&6
12876 else
12877   ac_check_lib_save_LIBS=$LIBS
12878 LIBS="-l$bdb_libname  $LIBS"
12879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880 /* end confdefs.h.  */
12881
12882 /* Override any GCC internal prototype to avoid an error.
12883    Use char because int might match the return type of a GCC
12884    builtin and then its argument prototype would still apply.  */
12885 #ifdef __cplusplus
12886 extern "C"
12887 #endif
12888 char dbopen ();
12889 int
12890 main ()
12891 {
12892 return dbopen ();
12893   ;
12894   return 0;
12895 }
12896 _ACEOF
12897 if ac_fn_c_try_link "$LINENO"; then :
12898   eval "$as_ac_Lib=yes"
12899 else
12900   eval "$as_ac_Lib=no"
12901 fi
12902 rm -f core conftest.err conftest.$ac_objext \
12903     conftest$ac_exeext conftest.$ac_ext
12904 LIBS=$ac_check_lib_save_LIBS
12905 fi
12906 eval ac_res=\$$as_ac_Lib
12907                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12908 $as_echo "$ac_res" >&6; }
12909 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12910   result=yes
12911 else
12912   result=no
12913
12914 fi
12915
12916           elif test "3" = "2"; then
12917             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
12919 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
12920 if eval \${$as_ac_Lib+:} false; then :
12921   $as_echo_n "(cached) " >&6
12922 else
12923   ac_check_lib_save_LIBS=$LIBS
12924 LIBS="-l$bdb_libname  $LIBS"
12925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12926 /* end confdefs.h.  */
12927
12928 /* Override any GCC internal prototype to avoid an error.
12929    Use char because int might match the return type of a GCC
12930    builtin and then its argument prototype would still apply.  */
12931 #ifdef __cplusplus
12932 extern "C"
12933 #endif
12934 char db_open ();
12935 int
12936 main ()
12937 {
12938 return db_open ();
12939   ;
12940   return 0;
12941 }
12942 _ACEOF
12943 if ac_fn_c_try_link "$LINENO"; then :
12944   eval "$as_ac_Lib=yes"
12945 else
12946   eval "$as_ac_Lib=no"
12947 fi
12948 rm -f core conftest.err conftest.$ac_objext \
12949     conftest$ac_exeext conftest.$ac_ext
12950 LIBS=$ac_check_lib_save_LIBS
12951 fi
12952 eval ac_res=\$$as_ac_Lib
12953                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12954 $as_echo "$ac_res" >&6; }
12955 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12956   result=yes
12957 else
12958   result=no
12959
12960 fi
12961
12962           fi
12963
12964 else
12965   result="no"
12966 fi
12967
12968
12969
12970         # If we found it, no need to search any more.
12971         if test "$result" = "yes"; then
12972           found="$bdb_place"
12973           break
12974         fi
12975       done
12976       test "$found" != "not" && break
12977     done
12978     test "$found" != "not" && break
12979   done
12980
12981   # Restore the original values of the flags we tweak.
12982   LDFLAGS="$apu_check_lib_save_ldflags"
12983   CPPFLAGS="$apu_check_lib_save_cppflags"
12984
12985   case "$found" in
12986   "not")
12987     apu_have_db=0
12988     ;;
12989   "std")
12990     apu_db_header=$bdb_header
12991     apu_db_lib=$bdb_libname
12992     apu_have_db=1
12993     ;;
12994   *":"*)
12995     header="`echo $found | sed -e 's/:.*$//'`"
12996     lib="`echo $found | sed -e 's/^.*://'`"
12997
12998
12999   if test "x$APRUTIL_INCLUDES" = "x"; then
13000     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13001     APRUTIL_INCLUDES="-I$header"
13002   else
13003     apr_addto_bugger="-I$header"
13004     for i in $apr_addto_bugger; do
13005       apr_addto_duplicate="0"
13006       for j in $APRUTIL_INCLUDES; do
13007         if test "x$i" = "x$j"; then
13008           apr_addto_duplicate="1"
13009           break
13010         fi
13011       done
13012       if test $apr_addto_duplicate = "0"; then
13013         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13014         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13015       fi
13016     done
13017   fi
13018
13019
13020   if test "x$APRUTIL_LDFLAGS" = "x"; then
13021     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13022     APRUTIL_LDFLAGS="-L$lib"
13023   else
13024     apr_addto_bugger="-L$lib"
13025     for i in $apr_addto_bugger; do
13026       apr_addto_duplicate="0"
13027       for j in $APRUTIL_LDFLAGS; do
13028         if test "x$i" = "x$j"; then
13029           apr_addto_duplicate="1"
13030           break
13031         fi
13032       done
13033       if test $apr_addto_duplicate = "0"; then
13034         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13035         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13036       fi
13037     done
13038   fi
13039
13040     apu_db_header=$bdb_header
13041     apu_db_lib=$bdb_libname
13042     apu_have_db=1
13043     ;;
13044   *)
13045
13046   if test "x$APRUTIL_INCLUDES" = "x"; then
13047     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13048     APRUTIL_INCLUDES="-I$found/include"
13049   else
13050     apr_addto_bugger="-I$found/include"
13051     for i in $apr_addto_bugger; do
13052       apr_addto_duplicate="0"
13053       for j in $APRUTIL_INCLUDES; do
13054         if test "x$i" = "x$j"; then
13055           apr_addto_duplicate="1"
13056           break
13057         fi
13058       done
13059       if test $apr_addto_duplicate = "0"; then
13060         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13061         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13062       fi
13063     done
13064   fi
13065
13066
13067   if test "x$APRUTIL_LDFLAGS" = "x"; then
13068     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13069     APRUTIL_LDFLAGS="-L$found/lib"
13070   else
13071     apr_addto_bugger="-L$found/lib"
13072     for i in $apr_addto_bugger; do
13073       apr_addto_duplicate="0"
13074       for j in $APRUTIL_LDFLAGS; do
13075         if test "x$i" = "x$j"; then
13076           apr_addto_duplicate="1"
13077           break
13078         fi
13079       done
13080       if test $apr_addto_duplicate = "0"; then
13081         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13082         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13083       fi
13084     done
13085   fi
13086
13087     apu_db_header=$bdb_header
13088     apu_db_lib=$bdb_libname
13089     apu_have_db=1
13090     ;;
13091   esac
13092
13093   if test "$apu_have_db" = "1"; then
13094     apu_db_version=3
13095   fi
13096
13097   fi
13098   if test "$apu_have_db" = "0"; then
13099
13100   places="$all_places"
13101   if test -z "$places"; then
13102     places="std"
13103   fi
13104
13105   bdb_version=2
13106   if test "-1" != "-1"; then
13107     bdb_version="$bdb_version.-1"
13108     if test "-1" != "-1"; then
13109       bdb_version="$bdb_version.-1"
13110     fi
13111   fi
13112   bdb_places="$places"
13113   bdb_default_search_headers="db2/db.h db.h"
13114   bdb_default_search_lib_names="db2 db"
13115
13116
13117   apu_have_db=0
13118
13119   # Save the original values of the flags we tweak.
13120   apu_check_lib_save_libs="$LIBS"
13121   apu_check_lib_save_ldflags="$LDFLAGS"
13122   apu_check_lib_save_cppflags="$CPPFLAGS"
13123
13124   # The variable `found' is the prefix under which we've found
13125   # Berkeley DB, or `not' if we haven't found it anywhere yet.
13126   found=not
13127   for bdb_place in $bdb_places; do
13128
13129     LDFLAGS="$apu_check_lib_save_ldflags"
13130     CPPFLAGS="$apu_check_lib_save_cppflags"
13131     case "$bdb_place" in
13132       "std" )
13133         description="the standard places"
13134       ;;
13135       *":"* )
13136         header="`echo $bdb_place | sed -e 's/:.*$//'`"
13137         lib="`echo $bdb_place | sed -e 's/^.*://'`"
13138         CPPFLAGS="$CPPFLAGS -I$header"
13139         LDFLAGS="$LDFLAGS -L$lib"
13140         description="$header and $lib"
13141       ;;
13142       * )
13143         if test -d $bdb_place; then
13144           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13145           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13146         else
13147           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13148 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13149           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13150 $as_echo "directory not found" >&6; }
13151           continue
13152         fi
13153         description="$bdb_place"
13154       ;;
13155     esac
13156
13157     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13158     # trick to display a message instead.
13159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13160 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13162 $as_echo "" >&6; }
13163
13164     for bdb_libname in $bdb_default_search_lib_names; do
13165       for bdb_header in $bdb_default_search_headers; do
13166         # Clear the header cache variable for each location
13167
13168         cache_id="`echo ac_cv_header_${bdb_header} \
13169                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13170
13171         unset $cache_id
13172         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13173 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13174 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13175
13176           if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then
13177             # We generate a separate cache variable for each prefix and libname
13178             # we search under.  That way, we avoid caching information that
13179             # changes if the user runs `configure' with a different set of
13180             # switches.
13181
13182             cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13183                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13184
13185
13186             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13187 $as_echo_n "checking for -l$bdb_libname... " >&6; }
13188                                     if eval \${$cache_id+:} false; then :
13189   $as_echo_n "(cached) " >&6
13190 else
13191
13192
13193     apu_try_berkeley_db_save_libs="$LIBS"
13194
13195     apu_check_berkeley_db_major=2
13196     apu_check_berkeley_db_minor=-1
13197     apu_check_berkeley_db_patch=-1
13198     apu_try_berkeley_db_header=$bdb_header
13199     apu_try_berkeley_db_libname=$bdb_libname
13200
13201     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13202     if test "$cross_compiling" = yes; then :
13203   apu_try_berkeley_db=yes
13204
13205 else
13206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h.  */
13208
13209 #include <stdlib.h>
13210 #include <stdio.h>
13211 #include <$apu_try_berkeley_db_header>
13212 main ()
13213 {
13214   int major, minor, patch;
13215
13216   db_version(&major, &minor, &patch);
13217
13218   /* Sanity check: ensure that db.h constants actually match the db library */
13219   if (major != DB_VERSION_MAJOR
13220       || minor != DB_VERSION_MINOR
13221       || patch != DB_VERSION_PATCH)
13222     exit (1);
13223
13224   /* Run-time check:  ensure the library claims to be the correct version. */
13225
13226   if ($apu_check_berkeley_db_major != -1) {
13227     if (major < $apu_check_berkeley_db_major)
13228       exit (1);
13229     if (major > $apu_check_berkeley_db_major)
13230       exit (0);
13231   }
13232
13233   if ($apu_check_berkeley_db_minor != -1) {
13234     if (minor < $apu_check_berkeley_db_minor)
13235       exit (1);
13236     if (minor > $apu_check_berkeley_db_minor)
13237       exit (0);
13238   }
13239
13240   if ($apu_check_berkeley_db_patch == -1
13241       || patch >= $apu_check_berkeley_db_patch)
13242     exit (0);
13243   else
13244     exit (1);
13245 }
13246
13247 _ACEOF
13248 if ac_fn_c_try_run "$LINENO"; then :
13249   apu_try_berkeley_db=yes
13250 else
13251   apu_try_berkeley_db=no
13252 fi
13253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13254   conftest.$ac_objext conftest.beam conftest.$ac_ext
13255 fi
13256
13257
13258     LIBS="$apu_try_berkeley_db_save_libs"
13259
13260
13261                 eval "$cache_id=$apu_try_berkeley_db"
13262
13263 fi
13264
13265             result="`eval echo '$'$cache_id`"
13266             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13267 $as_echo "$result" >&6; }
13268           elif test "2" = "1"; then
13269             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13271 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13272 if eval \${$as_ac_Lib+:} false; then :
13273   $as_echo_n "(cached) " >&6
13274 else
13275   ac_check_lib_save_LIBS=$LIBS
13276 LIBS="-l$bdb_libname  $LIBS"
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h.  */
13279
13280 /* Override any GCC internal prototype to avoid an error.
13281    Use char because int might match the return type of a GCC
13282    builtin and then its argument prototype would still apply.  */
13283 #ifdef __cplusplus
13284 extern "C"
13285 #endif
13286 char dbopen ();
13287 int
13288 main ()
13289 {
13290 return dbopen ();
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 if ac_fn_c_try_link "$LINENO"; then :
13296   eval "$as_ac_Lib=yes"
13297 else
13298   eval "$as_ac_Lib=no"
13299 fi
13300 rm -f core conftest.err conftest.$ac_objext \
13301     conftest$ac_exeext conftest.$ac_ext
13302 LIBS=$ac_check_lib_save_LIBS
13303 fi
13304 eval ac_res=\$$as_ac_Lib
13305                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13306 $as_echo "$ac_res" >&6; }
13307 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13308   result=yes
13309 else
13310   result=no
13311
13312 fi
13313
13314           elif test "2" = "2"; then
13315             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13317 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13318 if eval \${$as_ac_Lib+:} false; then :
13319   $as_echo_n "(cached) " >&6
13320 else
13321   ac_check_lib_save_LIBS=$LIBS
13322 LIBS="-l$bdb_libname  $LIBS"
13323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324 /* end confdefs.h.  */
13325
13326 /* Override any GCC internal prototype to avoid an error.
13327    Use char because int might match the return type of a GCC
13328    builtin and then its argument prototype would still apply.  */
13329 #ifdef __cplusplus
13330 extern "C"
13331 #endif
13332 char db_open ();
13333 int
13334 main ()
13335 {
13336 return db_open ();
13337   ;
13338   return 0;
13339 }
13340 _ACEOF
13341 if ac_fn_c_try_link "$LINENO"; then :
13342   eval "$as_ac_Lib=yes"
13343 else
13344   eval "$as_ac_Lib=no"
13345 fi
13346 rm -f core conftest.err conftest.$ac_objext \
13347     conftest$ac_exeext conftest.$ac_ext
13348 LIBS=$ac_check_lib_save_LIBS
13349 fi
13350 eval ac_res=\$$as_ac_Lib
13351                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13352 $as_echo "$ac_res" >&6; }
13353 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13354   result=yes
13355 else
13356   result=no
13357
13358 fi
13359
13360           fi
13361
13362 else
13363   result="no"
13364 fi
13365
13366
13367
13368         # If we found it, no need to search any more.
13369         if test "$result" = "yes"; then
13370           found="$bdb_place"
13371           break
13372         fi
13373       done
13374       test "$found" != "not" && break
13375     done
13376     test "$found" != "not" && break
13377   done
13378
13379   # Restore the original values of the flags we tweak.
13380   LDFLAGS="$apu_check_lib_save_ldflags"
13381   CPPFLAGS="$apu_check_lib_save_cppflags"
13382
13383   case "$found" in
13384   "not")
13385     apu_have_db=0
13386     ;;
13387   "std")
13388     apu_db_header=$bdb_header
13389     apu_db_lib=$bdb_libname
13390     apu_have_db=1
13391     ;;
13392   *":"*)
13393     header="`echo $found | sed -e 's/:.*$//'`"
13394     lib="`echo $found | sed -e 's/^.*://'`"
13395
13396
13397   if test "x$APRUTIL_INCLUDES" = "x"; then
13398     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13399     APRUTIL_INCLUDES="-I$header"
13400   else
13401     apr_addto_bugger="-I$header"
13402     for i in $apr_addto_bugger; do
13403       apr_addto_duplicate="0"
13404       for j in $APRUTIL_INCLUDES; do
13405         if test "x$i" = "x$j"; then
13406           apr_addto_duplicate="1"
13407           break
13408         fi
13409       done
13410       if test $apr_addto_duplicate = "0"; then
13411         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13412         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13413       fi
13414     done
13415   fi
13416
13417
13418   if test "x$APRUTIL_LDFLAGS" = "x"; then
13419     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13420     APRUTIL_LDFLAGS="-L$lib"
13421   else
13422     apr_addto_bugger="-L$lib"
13423     for i in $apr_addto_bugger; do
13424       apr_addto_duplicate="0"
13425       for j in $APRUTIL_LDFLAGS; do
13426         if test "x$i" = "x$j"; then
13427           apr_addto_duplicate="1"
13428           break
13429         fi
13430       done
13431       if test $apr_addto_duplicate = "0"; then
13432         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13433         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13434       fi
13435     done
13436   fi
13437
13438     apu_db_header=$bdb_header
13439     apu_db_lib=$bdb_libname
13440     apu_have_db=1
13441     ;;
13442   *)
13443
13444   if test "x$APRUTIL_INCLUDES" = "x"; then
13445     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13446     APRUTIL_INCLUDES="-I$found/include"
13447   else
13448     apr_addto_bugger="-I$found/include"
13449     for i in $apr_addto_bugger; do
13450       apr_addto_duplicate="0"
13451       for j in $APRUTIL_INCLUDES; do
13452         if test "x$i" = "x$j"; then
13453           apr_addto_duplicate="1"
13454           break
13455         fi
13456       done
13457       if test $apr_addto_duplicate = "0"; then
13458         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13459         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13460       fi
13461     done
13462   fi
13463
13464
13465   if test "x$APRUTIL_LDFLAGS" = "x"; then
13466     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13467     APRUTIL_LDFLAGS="-L$found/lib"
13468   else
13469     apr_addto_bugger="-L$found/lib"
13470     for i in $apr_addto_bugger; do
13471       apr_addto_duplicate="0"
13472       for j in $APRUTIL_LDFLAGS; do
13473         if test "x$i" = "x$j"; then
13474           apr_addto_duplicate="1"
13475           break
13476         fi
13477       done
13478       if test $apr_addto_duplicate = "0"; then
13479         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13480         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13481       fi
13482     done
13483   fi
13484
13485     apu_db_header=$bdb_header
13486     apu_db_lib=$bdb_libname
13487     apu_have_db=1
13488     ;;
13489   esac
13490
13491   if test "$apu_have_db" = "1"; then
13492     apu_db_version=2
13493   fi
13494
13495   fi
13496   if test "$apu_have_db" = "0"; then
13497
13498   places="$all_places"
13499   if test -z "$places"; then
13500     places="std"
13501   fi
13502
13503   bdb_version=1
13504   if test "0" != "-1"; then
13505     bdb_version="$bdb_version.0"
13506     if test "0" != "-1"; then
13507       bdb_version="$bdb_version.0"
13508     fi
13509   fi
13510   bdb_places="$places"
13511   bdb_default_search_headers="db1/db.h db.h"
13512   bdb_default_search_lib_names="db1"
13513
13514
13515   apu_have_db=0
13516
13517   # Save the original values of the flags we tweak.
13518   apu_check_lib_save_libs="$LIBS"
13519   apu_check_lib_save_ldflags="$LDFLAGS"
13520   apu_check_lib_save_cppflags="$CPPFLAGS"
13521
13522   # The variable `found' is the prefix under which we've found
13523   # Berkeley DB, or `not' if we haven't found it anywhere yet.
13524   found=not
13525   for bdb_place in $bdb_places; do
13526
13527     LDFLAGS="$apu_check_lib_save_ldflags"
13528     CPPFLAGS="$apu_check_lib_save_cppflags"
13529     case "$bdb_place" in
13530       "std" )
13531         description="the standard places"
13532       ;;
13533       *":"* )
13534         header="`echo $bdb_place | sed -e 's/:.*$//'`"
13535         lib="`echo $bdb_place | sed -e 's/^.*://'`"
13536         CPPFLAGS="$CPPFLAGS -I$header"
13537         LDFLAGS="$LDFLAGS -L$lib"
13538         description="$header and $lib"
13539       ;;
13540       * )
13541         if test -d $bdb_place; then
13542           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13543           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13544         else
13545           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13546 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13548 $as_echo "directory not found" >&6; }
13549           continue
13550         fi
13551         description="$bdb_place"
13552       ;;
13553     esac
13554
13555     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13556     # trick to display a message instead.
13557     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13558 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13560 $as_echo "" >&6; }
13561
13562     for bdb_libname in $bdb_default_search_lib_names; do
13563       for bdb_header in $bdb_default_search_headers; do
13564         # Clear the header cache variable for each location
13565
13566         cache_id="`echo ac_cv_header_${bdb_header} \
13567                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13568
13569         unset $cache_id
13570         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13571 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13572 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13573
13574           if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
13575             # We generate a separate cache variable for each prefix and libname
13576             # we search under.  That way, we avoid caching information that
13577             # changes if the user runs `configure' with a different set of
13578             # switches.
13579
13580             cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13581                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13582
13583
13584             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13585 $as_echo_n "checking for -l$bdb_libname... " >&6; }
13586                                     if eval \${$cache_id+:} false; then :
13587   $as_echo_n "(cached) " >&6
13588 else
13589
13590
13591     apu_try_berkeley_db_save_libs="$LIBS"
13592
13593     apu_check_berkeley_db_major=1
13594     apu_check_berkeley_db_minor=0
13595     apu_check_berkeley_db_patch=0
13596     apu_try_berkeley_db_header=$bdb_header
13597     apu_try_berkeley_db_libname=$bdb_libname
13598
13599     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13600     if test "$cross_compiling" = yes; then :
13601   apu_try_berkeley_db=yes
13602
13603 else
13604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13605 /* end confdefs.h.  */
13606
13607 #include <stdlib.h>
13608 #include <stdio.h>
13609 #include <$apu_try_berkeley_db_header>
13610 main ()
13611 {
13612   int major, minor, patch;
13613
13614   db_version(&major, &minor, &patch);
13615
13616   /* Sanity check: ensure that db.h constants actually match the db library */
13617   if (major != DB_VERSION_MAJOR
13618       || minor != DB_VERSION_MINOR
13619       || patch != DB_VERSION_PATCH)
13620     exit (1);
13621
13622   /* Run-time check:  ensure the library claims to be the correct version. */
13623
13624   if ($apu_check_berkeley_db_major != -1) {
13625     if (major < $apu_check_berkeley_db_major)
13626       exit (1);
13627     if (major > $apu_check_berkeley_db_major)
13628       exit (0);
13629   }
13630
13631   if ($apu_check_berkeley_db_minor != -1) {
13632     if (minor < $apu_check_berkeley_db_minor)
13633       exit (1);
13634     if (minor > $apu_check_berkeley_db_minor)
13635       exit (0);
13636   }
13637
13638   if ($apu_check_berkeley_db_patch == -1
13639       || patch >= $apu_check_berkeley_db_patch)
13640     exit (0);
13641   else
13642     exit (1);
13643 }
13644
13645 _ACEOF
13646 if ac_fn_c_try_run "$LINENO"; then :
13647   apu_try_berkeley_db=yes
13648 else
13649   apu_try_berkeley_db=no
13650 fi
13651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13652   conftest.$ac_objext conftest.beam conftest.$ac_ext
13653 fi
13654
13655
13656     LIBS="$apu_try_berkeley_db_save_libs"
13657
13658
13659                 eval "$cache_id=$apu_try_berkeley_db"
13660
13661 fi
13662
13663             result="`eval echo '$'$cache_id`"
13664             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13665 $as_echo "$result" >&6; }
13666           elif test "1" = "1"; then
13667             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13669 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13670 if eval \${$as_ac_Lib+:} false; then :
13671   $as_echo_n "(cached) " >&6
13672 else
13673   ac_check_lib_save_LIBS=$LIBS
13674 LIBS="-l$bdb_libname  $LIBS"
13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676 /* end confdefs.h.  */
13677
13678 /* Override any GCC internal prototype to avoid an error.
13679    Use char because int might match the return type of a GCC
13680    builtin and then its argument prototype would still apply.  */
13681 #ifdef __cplusplus
13682 extern "C"
13683 #endif
13684 char dbopen ();
13685 int
13686 main ()
13687 {
13688 return dbopen ();
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 if ac_fn_c_try_link "$LINENO"; then :
13694   eval "$as_ac_Lib=yes"
13695 else
13696   eval "$as_ac_Lib=no"
13697 fi
13698 rm -f core conftest.err conftest.$ac_objext \
13699     conftest$ac_exeext conftest.$ac_ext
13700 LIBS=$ac_check_lib_save_LIBS
13701 fi
13702 eval ac_res=\$$as_ac_Lib
13703                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13704 $as_echo "$ac_res" >&6; }
13705 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13706   result=yes
13707 else
13708   result=no
13709
13710 fi
13711
13712           elif test "1" = "2"; then
13713             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13715 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13716 if eval \${$as_ac_Lib+:} false; then :
13717   $as_echo_n "(cached) " >&6
13718 else
13719   ac_check_lib_save_LIBS=$LIBS
13720 LIBS="-l$bdb_libname  $LIBS"
13721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13722 /* end confdefs.h.  */
13723
13724 /* Override any GCC internal prototype to avoid an error.
13725    Use char because int might match the return type of a GCC
13726    builtin and then its argument prototype would still apply.  */
13727 #ifdef __cplusplus
13728 extern "C"
13729 #endif
13730 char db_open ();
13731 int
13732 main ()
13733 {
13734 return db_open ();
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 if ac_fn_c_try_link "$LINENO"; then :
13740   eval "$as_ac_Lib=yes"
13741 else
13742   eval "$as_ac_Lib=no"
13743 fi
13744 rm -f core conftest.err conftest.$ac_objext \
13745     conftest$ac_exeext conftest.$ac_ext
13746 LIBS=$ac_check_lib_save_LIBS
13747 fi
13748 eval ac_res=\$$as_ac_Lib
13749                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13750 $as_echo "$ac_res" >&6; }
13751 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13752   result=yes
13753 else
13754   result=no
13755
13756 fi
13757
13758           fi
13759
13760 else
13761   result="no"
13762 fi
13763
13764
13765
13766         # If we found it, no need to search any more.
13767         if test "$result" = "yes"; then
13768           found="$bdb_place"
13769           break
13770         fi
13771       done
13772       test "$found" != "not" && break
13773     done
13774     test "$found" != "not" && break
13775   done
13776
13777   # Restore the original values of the flags we tweak.
13778   LDFLAGS="$apu_check_lib_save_ldflags"
13779   CPPFLAGS="$apu_check_lib_save_cppflags"
13780
13781   case "$found" in
13782   "not")
13783     apu_have_db=0
13784     ;;
13785   "std")
13786     apu_db_header=$bdb_header
13787     apu_db_lib=$bdb_libname
13788     apu_have_db=1
13789     ;;
13790   *":"*)
13791     header="`echo $found | sed -e 's/:.*$//'`"
13792     lib="`echo $found | sed -e 's/^.*://'`"
13793
13794
13795   if test "x$APRUTIL_INCLUDES" = "x"; then
13796     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13797     APRUTIL_INCLUDES="-I$header"
13798   else
13799     apr_addto_bugger="-I$header"
13800     for i in $apr_addto_bugger; do
13801       apr_addto_duplicate="0"
13802       for j in $APRUTIL_INCLUDES; do
13803         if test "x$i" = "x$j"; then
13804           apr_addto_duplicate="1"
13805           break
13806         fi
13807       done
13808       if test $apr_addto_duplicate = "0"; then
13809         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13810         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13811       fi
13812     done
13813   fi
13814
13815
13816   if test "x$APRUTIL_LDFLAGS" = "x"; then
13817     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13818     APRUTIL_LDFLAGS="-L$lib"
13819   else
13820     apr_addto_bugger="-L$lib"
13821     for i in $apr_addto_bugger; do
13822       apr_addto_duplicate="0"
13823       for j in $APRUTIL_LDFLAGS; do
13824         if test "x$i" = "x$j"; then
13825           apr_addto_duplicate="1"
13826           break
13827         fi
13828       done
13829       if test $apr_addto_duplicate = "0"; then
13830         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13831         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13832       fi
13833     done
13834   fi
13835
13836     apu_db_header=$bdb_header
13837     apu_db_lib=$bdb_libname
13838     apu_have_db=1
13839     ;;
13840   *)
13841
13842   if test "x$APRUTIL_INCLUDES" = "x"; then
13843     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13844     APRUTIL_INCLUDES="-I$found/include"
13845   else
13846     apr_addto_bugger="-I$found/include"
13847     for i in $apr_addto_bugger; do
13848       apr_addto_duplicate="0"
13849       for j in $APRUTIL_INCLUDES; do
13850         if test "x$i" = "x$j"; then
13851           apr_addto_duplicate="1"
13852           break
13853         fi
13854       done
13855       if test $apr_addto_duplicate = "0"; then
13856         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13857         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13858       fi
13859     done
13860   fi
13861
13862
13863   if test "x$APRUTIL_LDFLAGS" = "x"; then
13864     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13865     APRUTIL_LDFLAGS="-L$found/lib"
13866   else
13867     apr_addto_bugger="-L$found/lib"
13868     for i in $apr_addto_bugger; do
13869       apr_addto_duplicate="0"
13870       for j in $APRUTIL_LDFLAGS; do
13871         if test "x$i" = "x$j"; then
13872           apr_addto_duplicate="1"
13873           break
13874         fi
13875       done
13876       if test $apr_addto_duplicate = "0"; then
13877         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13878         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13879       fi
13880     done
13881   fi
13882
13883     apu_db_header=$bdb_header
13884     apu_db_lib=$bdb_libname
13885     apu_have_db=1
13886     ;;
13887   esac
13888
13889   if test "$apu_have_db" = "1"; then
13890     apu_db_version=1
13891   fi
13892
13893   fi
13894   if test "$apu_have_db" = "0"; then
13895
13896   places="$all_places"
13897   if test -z "$places"; then
13898     places="std"
13899   fi
13900
13901   bdb_version=1
13902   if test "-1" != "-1"; then
13903     bdb_version="$bdb_version.-1"
13904     if test "-1" != "-1"; then
13905       bdb_version="$bdb_version.-1"
13906     fi
13907   fi
13908   bdb_places="$places"
13909   bdb_default_search_headers="db_185.h"
13910   bdb_default_search_lib_names="db"
13911
13912
13913   apu_have_db=0
13914
13915   # Save the original values of the flags we tweak.
13916   apu_check_lib_save_libs="$LIBS"
13917   apu_check_lib_save_ldflags="$LDFLAGS"
13918   apu_check_lib_save_cppflags="$CPPFLAGS"
13919
13920   # The variable `found' is the prefix under which we've found
13921   # Berkeley DB, or `not' if we haven't found it anywhere yet.
13922   found=not
13923   for bdb_place in $bdb_places; do
13924
13925     LDFLAGS="$apu_check_lib_save_ldflags"
13926     CPPFLAGS="$apu_check_lib_save_cppflags"
13927     case "$bdb_place" in
13928       "std" )
13929         description="the standard places"
13930       ;;
13931       *":"* )
13932         header="`echo $bdb_place | sed -e 's/:.*$//'`"
13933         lib="`echo $bdb_place | sed -e 's/^.*://'`"
13934         CPPFLAGS="$CPPFLAGS -I$header"
13935         LDFLAGS="$LDFLAGS -L$lib"
13936         description="$header and $lib"
13937       ;;
13938       * )
13939         if test -d $bdb_place; then
13940           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13941           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13942         else
13943           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13944 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13945           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13946 $as_echo "directory not found" >&6; }
13947           continue
13948         fi
13949         description="$bdb_place"
13950       ;;
13951     esac
13952
13953     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13954     # trick to display a message instead.
13955     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13956 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13957     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13958 $as_echo "" >&6; }
13959
13960     for bdb_libname in $bdb_default_search_lib_names; do
13961       for bdb_header in $bdb_default_search_headers; do
13962         # Clear the header cache variable for each location
13963
13964         cache_id="`echo ac_cv_header_${bdb_header} \
13965                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13966
13967         unset $cache_id
13968         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13969 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13970 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13971
13972           if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
13973             # We generate a separate cache variable for each prefix and libname
13974             # we search under.  That way, we avoid caching information that
13975             # changes if the user runs `configure' with a different set of
13976             # switches.
13977
13978             cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13979                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13980
13981
13982             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13983 $as_echo_n "checking for -l$bdb_libname... " >&6; }
13984                                     if eval \${$cache_id+:} false; then :
13985   $as_echo_n "(cached) " >&6
13986 else
13987
13988
13989     apu_try_berkeley_db_save_libs="$LIBS"
13990
13991     apu_check_berkeley_db_major=1
13992     apu_check_berkeley_db_minor=-1
13993     apu_check_berkeley_db_patch=-1
13994     apu_try_berkeley_db_header=$bdb_header
13995     apu_try_berkeley_db_libname=$bdb_libname
13996
13997     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13998     if test "$cross_compiling" = yes; then :
13999   apu_try_berkeley_db=yes
14000
14001 else
14002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14003 /* end confdefs.h.  */
14004
14005 #include <stdlib.h>
14006 #include <stdio.h>
14007 #include <$apu_try_berkeley_db_header>
14008 main ()
14009 {
14010   int major, minor, patch;
14011
14012   db_version(&major, &minor, &patch);
14013
14014   /* Sanity check: ensure that db.h constants actually match the db library */
14015   if (major != DB_VERSION_MAJOR
14016       || minor != DB_VERSION_MINOR
14017       || patch != DB_VERSION_PATCH)
14018     exit (1);
14019
14020   /* Run-time check:  ensure the library claims to be the correct version. */
14021
14022   if ($apu_check_berkeley_db_major != -1) {
14023     if (major < $apu_check_berkeley_db_major)
14024       exit (1);
14025     if (major > $apu_check_berkeley_db_major)
14026       exit (0);
14027   }
14028
14029   if ($apu_check_berkeley_db_minor != -1) {
14030     if (minor < $apu_check_berkeley_db_minor)
14031       exit (1);
14032     if (minor > $apu_check_berkeley_db_minor)
14033       exit (0);
14034   }
14035
14036   if ($apu_check_berkeley_db_patch == -1
14037       || patch >= $apu_check_berkeley_db_patch)
14038     exit (0);
14039   else
14040     exit (1);
14041 }
14042
14043 _ACEOF
14044 if ac_fn_c_try_run "$LINENO"; then :
14045   apu_try_berkeley_db=yes
14046 else
14047   apu_try_berkeley_db=no
14048 fi
14049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14050   conftest.$ac_objext conftest.beam conftest.$ac_ext
14051 fi
14052
14053
14054     LIBS="$apu_try_berkeley_db_save_libs"
14055
14056
14057                 eval "$cache_id=$apu_try_berkeley_db"
14058
14059 fi
14060
14061             result="`eval echo '$'$cache_id`"
14062             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14063 $as_echo "$result" >&6; }
14064           elif test "1" = "1"; then
14065             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14067 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14068 if eval \${$as_ac_Lib+:} false; then :
14069   $as_echo_n "(cached) " >&6
14070 else
14071   ac_check_lib_save_LIBS=$LIBS
14072 LIBS="-l$bdb_libname  $LIBS"
14073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14074 /* end confdefs.h.  */
14075
14076 /* Override any GCC internal prototype to avoid an error.
14077    Use char because int might match the return type of a GCC
14078    builtin and then its argument prototype would still apply.  */
14079 #ifdef __cplusplus
14080 extern "C"
14081 #endif
14082 char dbopen ();
14083 int
14084 main ()
14085 {
14086 return dbopen ();
14087   ;
14088   return 0;
14089 }
14090 _ACEOF
14091 if ac_fn_c_try_link "$LINENO"; then :
14092   eval "$as_ac_Lib=yes"
14093 else
14094   eval "$as_ac_Lib=no"
14095 fi
14096 rm -f core conftest.err conftest.$ac_objext \
14097     conftest$ac_exeext conftest.$ac_ext
14098 LIBS=$ac_check_lib_save_LIBS
14099 fi
14100 eval ac_res=\$$as_ac_Lib
14101                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14102 $as_echo "$ac_res" >&6; }
14103 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14104   result=yes
14105 else
14106   result=no
14107
14108 fi
14109
14110           elif test "1" = "2"; then
14111             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14113 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14114 if eval \${$as_ac_Lib+:} false; then :
14115   $as_echo_n "(cached) " >&6
14116 else
14117   ac_check_lib_save_LIBS=$LIBS
14118 LIBS="-l$bdb_libname  $LIBS"
14119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120 /* end confdefs.h.  */
14121
14122 /* Override any GCC internal prototype to avoid an error.
14123    Use char because int might match the return type of a GCC
14124    builtin and then its argument prototype would still apply.  */
14125 #ifdef __cplusplus
14126 extern "C"
14127 #endif
14128 char db_open ();
14129 int
14130 main ()
14131 {
14132 return db_open ();
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 if ac_fn_c_try_link "$LINENO"; then :
14138   eval "$as_ac_Lib=yes"
14139 else
14140   eval "$as_ac_Lib=no"
14141 fi
14142 rm -f core conftest.err conftest.$ac_objext \
14143     conftest$ac_exeext conftest.$ac_ext
14144 LIBS=$ac_check_lib_save_LIBS
14145 fi
14146 eval ac_res=\$$as_ac_Lib
14147                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14148 $as_echo "$ac_res" >&6; }
14149 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14150   result=yes
14151 else
14152   result=no
14153
14154 fi
14155
14156           fi
14157
14158 else
14159   result="no"
14160 fi
14161
14162
14163
14164         # If we found it, no need to search any more.
14165         if test "$result" = "yes"; then
14166           found="$bdb_place"
14167           break
14168         fi
14169       done
14170       test "$found" != "not" && break
14171     done
14172     test "$found" != "not" && break
14173   done
14174
14175   # Restore the original values of the flags we tweak.
14176   LDFLAGS="$apu_check_lib_save_ldflags"
14177   CPPFLAGS="$apu_check_lib_save_cppflags"
14178
14179   case "$found" in
14180   "not")
14181     apu_have_db=0
14182     ;;
14183   "std")
14184     apu_db_header=$bdb_header
14185     apu_db_lib=$bdb_libname
14186     apu_have_db=1
14187     ;;
14188   *":"*)
14189     header="`echo $found | sed -e 's/:.*$//'`"
14190     lib="`echo $found | sed -e 's/^.*://'`"
14191
14192
14193   if test "x$APRUTIL_INCLUDES" = "x"; then
14194     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
14195     APRUTIL_INCLUDES="-I$header"
14196   else
14197     apr_addto_bugger="-I$header"
14198     for i in $apr_addto_bugger; do
14199       apr_addto_duplicate="0"
14200       for j in $APRUTIL_INCLUDES; do
14201         if test "x$i" = "x$j"; then
14202           apr_addto_duplicate="1"
14203           break
14204         fi
14205       done
14206       if test $apr_addto_duplicate = "0"; then
14207         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14208         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14209       fi
14210     done
14211   fi
14212
14213
14214   if test "x$APRUTIL_LDFLAGS" = "x"; then
14215     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14216     APRUTIL_LDFLAGS="-L$lib"
14217   else
14218     apr_addto_bugger="-L$lib"
14219     for i in $apr_addto_bugger; do
14220       apr_addto_duplicate="0"
14221       for j in $APRUTIL_LDFLAGS; do
14222         if test "x$i" = "x$j"; then
14223           apr_addto_duplicate="1"
14224           break
14225         fi
14226       done
14227       if test $apr_addto_duplicate = "0"; then
14228         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14229         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14230       fi
14231     done
14232   fi
14233
14234     apu_db_header=$bdb_header
14235     apu_db_lib=$bdb_libname
14236     apu_have_db=1
14237     ;;
14238   *)
14239
14240   if test "x$APRUTIL_INCLUDES" = "x"; then
14241     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14242     APRUTIL_INCLUDES="-I$found/include"
14243   else
14244     apr_addto_bugger="-I$found/include"
14245     for i in $apr_addto_bugger; do
14246       apr_addto_duplicate="0"
14247       for j in $APRUTIL_INCLUDES; do
14248         if test "x$i" = "x$j"; then
14249           apr_addto_duplicate="1"
14250           break
14251         fi
14252       done
14253       if test $apr_addto_duplicate = "0"; then
14254         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14255         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14256       fi
14257     done
14258   fi
14259
14260
14261   if test "x$APRUTIL_LDFLAGS" = "x"; then
14262     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14263     APRUTIL_LDFLAGS="-L$found/lib"
14264   else
14265     apr_addto_bugger="-L$found/lib"
14266     for i in $apr_addto_bugger; do
14267       apr_addto_duplicate="0"
14268       for j in $APRUTIL_LDFLAGS; do
14269         if test "x$i" = "x$j"; then
14270           apr_addto_duplicate="1"
14271           break
14272         fi
14273       done
14274       if test $apr_addto_duplicate = "0"; then
14275         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14276         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14277       fi
14278     done
14279   fi
14280
14281     apu_db_header=$bdb_header
14282     apu_db_lib=$bdb_libname
14283     apu_have_db=1
14284     ;;
14285   esac
14286
14287   if test "$apu_have_db" = "1"; then
14288     apu_db_version=185
14289   fi
14290
14291   fi
14292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB" >&5
14293 $as_echo_n "checking for Berkeley DB... " >&6; }
14294   if test "$apu_have_db" = "1"; then
14295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found db$apu_db_version" >&5
14296 $as_echo "found db$apu_db_version" >&6; }
14297   else
14298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14299 $as_echo "not found" >&6; }
14300   fi
14301
14302     if test "$apu_have_db" = "0"; then
14303       as_fn_error but not found "Berkeley db requested" "$LINENO" 5
14304     fi
14305     ;;
14306   db1)
14307
14308   places="$check_places"
14309   if test -z "$places"; then
14310     places="std"
14311   fi
14312
14313   bdb_version=1
14314   if test "0" != "-1"; then
14315     bdb_version="$bdb_version.0"
14316     if test "0" != "-1"; then
14317       bdb_version="$bdb_version.0"
14318     fi
14319   fi
14320   bdb_places="$places"
14321   bdb_default_search_headers="db1/db.h db.h"
14322   bdb_default_search_lib_names="db1"
14323
14324
14325   apu_have_db=0
14326
14327   # Save the original values of the flags we tweak.
14328   apu_check_lib_save_libs="$LIBS"
14329   apu_check_lib_save_ldflags="$LDFLAGS"
14330   apu_check_lib_save_cppflags="$CPPFLAGS"
14331
14332   # The variable `found' is the prefix under which we've found
14333   # Berkeley DB, or `not' if we haven't found it anywhere yet.
14334   found=not
14335   for bdb_place in $bdb_places; do
14336
14337     LDFLAGS="$apu_check_lib_save_ldflags"
14338     CPPFLAGS="$apu_check_lib_save_cppflags"
14339     case "$bdb_place" in
14340       "std" )
14341         description="the standard places"
14342       ;;
14343       *":"* )
14344         header="`echo $bdb_place | sed -e 's/:.*$//'`"
14345         lib="`echo $bdb_place | sed -e 's/^.*://'`"
14346         CPPFLAGS="$CPPFLAGS -I$header"
14347         LDFLAGS="$LDFLAGS -L$lib"
14348         description="$header and $lib"
14349       ;;
14350       * )
14351         if test -d $bdb_place; then
14352           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14353           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14354         else
14355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14356 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14358 $as_echo "directory not found" >&6; }
14359           continue
14360         fi
14361         description="$bdb_place"
14362       ;;
14363     esac
14364
14365     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14366     # trick to display a message instead.
14367     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14368 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14370 $as_echo "" >&6; }
14371
14372     for bdb_libname in $bdb_default_search_lib_names; do
14373       for bdb_header in $bdb_default_search_headers; do
14374         # Clear the header cache variable for each location
14375
14376         cache_id="`echo ac_cv_header_${bdb_header} \
14377                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14378
14379         unset $cache_id
14380         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14381 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14382 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14383
14384           if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
14385             # We generate a separate cache variable for each prefix and libname
14386             # we search under.  That way, we avoid caching information that
14387             # changes if the user runs `configure' with a different set of
14388             # switches.
14389
14390             cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14391                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14392
14393
14394             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14395 $as_echo_n "checking for -l$bdb_libname... " >&6; }
14396                                     if eval \${$cache_id+:} false; then :
14397   $as_echo_n "(cached) " >&6
14398 else
14399
14400
14401     apu_try_berkeley_db_save_libs="$LIBS"
14402
14403     apu_check_berkeley_db_major=1
14404     apu_check_berkeley_db_minor=0
14405     apu_check_berkeley_db_patch=0
14406     apu_try_berkeley_db_header=$bdb_header
14407     apu_try_berkeley_db_libname=$bdb_libname
14408
14409     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14410     if test "$cross_compiling" = yes; then :
14411   apu_try_berkeley_db=yes
14412
14413 else
14414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h.  */
14416
14417 #include <stdlib.h>
14418 #include <stdio.h>
14419 #include <$apu_try_berkeley_db_header>
14420 main ()
14421 {
14422   int major, minor, patch;
14423
14424   db_version(&major, &minor, &patch);
14425
14426   /* Sanity check: ensure that db.h constants actually match the db library */
14427   if (major != DB_VERSION_MAJOR
14428       || minor != DB_VERSION_MINOR
14429       || patch != DB_VERSION_PATCH)
14430     exit (1);
14431
14432   /* Run-time check:  ensure the library claims to be the correct version. */
14433
14434   if ($apu_check_berkeley_db_major != -1) {
14435     if (major < $apu_check_berkeley_db_major)
14436       exit (1);
14437     if (major > $apu_check_berkeley_db_major)
14438       exit (0);
14439   }
14440
14441   if ($apu_check_berkeley_db_minor != -1) {
14442     if (minor < $apu_check_berkeley_db_minor)
14443       exit (1);
14444     if (minor > $apu_check_berkeley_db_minor)
14445       exit (0);
14446   }
14447
14448   if ($apu_check_berkeley_db_patch == -1
14449       || patch >= $apu_check_berkeley_db_patch)
14450     exit (0);
14451   else
14452     exit (1);
14453 }
14454
14455 _ACEOF
14456 if ac_fn_c_try_run "$LINENO"; then :
14457   apu_try_berkeley_db=yes
14458 else
14459   apu_try_berkeley_db=no
14460 fi
14461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14462   conftest.$ac_objext conftest.beam conftest.$ac_ext
14463 fi
14464
14465
14466     LIBS="$apu_try_berkeley_db_save_libs"
14467
14468
14469                 eval "$cache_id=$apu_try_berkeley_db"
14470
14471 fi
14472
14473             result="`eval echo '$'$cache_id`"
14474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14475 $as_echo "$result" >&6; }
14476           elif test "1" = "1"; then
14477             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14479 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14480 if eval \${$as_ac_Lib+:} false; then :
14481   $as_echo_n "(cached) " >&6
14482 else
14483   ac_check_lib_save_LIBS=$LIBS
14484 LIBS="-l$bdb_libname  $LIBS"
14485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14486 /* end confdefs.h.  */
14487
14488 /* Override any GCC internal prototype to avoid an error.
14489    Use char because int might match the return type of a GCC
14490    builtin and then its argument prototype would still apply.  */
14491 #ifdef __cplusplus
14492 extern "C"
14493 #endif
14494 char dbopen ();
14495 int
14496 main ()
14497 {
14498 return dbopen ();
14499   ;
14500   return 0;
14501 }
14502 _ACEOF
14503 if ac_fn_c_try_link "$LINENO"; then :
14504   eval "$as_ac_Lib=yes"
14505 else
14506   eval "$as_ac_Lib=no"
14507 fi
14508 rm -f core conftest.err conftest.$ac_objext \
14509     conftest$ac_exeext conftest.$ac_ext
14510 LIBS=$ac_check_lib_save_LIBS
14511 fi
14512 eval ac_res=\$$as_ac_Lib
14513                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14514 $as_echo "$ac_res" >&6; }
14515 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14516   result=yes
14517 else
14518   result=no
14519
14520 fi
14521
14522           elif test "1" = "2"; then
14523             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14525 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14526 if eval \${$as_ac_Lib+:} false; then :
14527   $as_echo_n "(cached) " >&6
14528 else
14529   ac_check_lib_save_LIBS=$LIBS
14530 LIBS="-l$bdb_libname  $LIBS"
14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14532 /* end confdefs.h.  */
14533
14534 /* Override any GCC internal prototype to avoid an error.
14535    Use char because int might match the return type of a GCC
14536    builtin and then its argument prototype would still apply.  */
14537 #ifdef __cplusplus
14538 extern "C"
14539 #endif
14540 char db_open ();
14541 int
14542 main ()
14543 {
14544 return db_open ();
14545   ;
14546   return 0;
14547 }
14548 _ACEOF
14549 if ac_fn_c_try_link "$LINENO"; then :
14550   eval "$as_ac_Lib=yes"
14551 else
14552   eval "$as_ac_Lib=no"
14553 fi
14554 rm -f core conftest.err conftest.$ac_objext \
14555     conftest$ac_exeext conftest.$ac_ext
14556 LIBS=$ac_check_lib_save_LIBS
14557 fi
14558 eval ac_res=\$$as_ac_Lib
14559                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14560 $as_echo "$ac_res" >&6; }
14561 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14562   result=yes
14563 else
14564   result=no
14565
14566 fi
14567
14568           fi
14569
14570 else
14571   result="no"
14572 fi
14573
14574
14575
14576         # If we found it, no need to search any more.
14577         if test "$result" = "yes"; then
14578           found="$bdb_place"
14579           break
14580         fi
14581       done
14582       test "$found" != "not" && break
14583     done
14584     test "$found" != "not" && break
14585   done
14586
14587   # Restore the original values of the flags we tweak.
14588   LDFLAGS="$apu_check_lib_save_ldflags"
14589   CPPFLAGS="$apu_check_lib_save_cppflags"
14590
14591   case "$found" in
14592   "not")
14593     apu_have_db=0
14594     ;;
14595   "std")
14596     apu_db_header=$bdb_header
14597     apu_db_lib=$bdb_libname
14598     apu_have_db=1
14599     ;;
14600   *":"*)
14601     header="`echo $found | sed -e 's/:.*$//'`"
14602     lib="`echo $found | sed -e 's/^.*://'`"
14603
14604
14605   if test "x$APRUTIL_INCLUDES" = "x"; then
14606     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
14607     APRUTIL_INCLUDES="-I$header"
14608   else
14609     apr_addto_bugger="-I$header"
14610     for i in $apr_addto_bugger; do
14611       apr_addto_duplicate="0"
14612       for j in $APRUTIL_INCLUDES; do
14613         if test "x$i" = "x$j"; then
14614           apr_addto_duplicate="1"
14615           break
14616         fi
14617       done
14618       if test $apr_addto_duplicate = "0"; then
14619         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14620         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14621       fi
14622     done
14623   fi
14624
14625
14626   if test "x$APRUTIL_LDFLAGS" = "x"; then
14627     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14628     APRUTIL_LDFLAGS="-L$lib"
14629   else
14630     apr_addto_bugger="-L$lib"
14631     for i in $apr_addto_bugger; do
14632       apr_addto_duplicate="0"
14633       for j in $APRUTIL_LDFLAGS; do
14634         if test "x$i" = "x$j"; then
14635           apr_addto_duplicate="1"
14636           break
14637         fi
14638       done
14639       if test $apr_addto_duplicate = "0"; then
14640         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14641         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14642       fi
14643     done
14644   fi
14645
14646     apu_db_header=$bdb_header
14647     apu_db_lib=$bdb_libname
14648     apu_have_db=1
14649     ;;
14650   *)
14651
14652   if test "x$APRUTIL_INCLUDES" = "x"; then
14653     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14654     APRUTIL_INCLUDES="-I$found/include"
14655   else
14656     apr_addto_bugger="-I$found/include"
14657     for i in $apr_addto_bugger; do
14658       apr_addto_duplicate="0"
14659       for j in $APRUTIL_INCLUDES; do
14660         if test "x$i" = "x$j"; then
14661           apr_addto_duplicate="1"
14662           break
14663         fi
14664       done
14665       if test $apr_addto_duplicate = "0"; then
14666         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14667         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14668       fi
14669     done
14670   fi
14671
14672
14673   if test "x$APRUTIL_LDFLAGS" = "x"; then
14674     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14675     APRUTIL_LDFLAGS="-L$found/lib"
14676   else
14677     apr_addto_bugger="-L$found/lib"
14678     for i in $apr_addto_bugger; do
14679       apr_addto_duplicate="0"
14680       for j in $APRUTIL_LDFLAGS; do
14681         if test "x$i" = "x$j"; then
14682           apr_addto_duplicate="1"
14683           break
14684         fi
14685       done
14686       if test $apr_addto_duplicate = "0"; then
14687         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14688         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14689       fi
14690     done
14691   fi
14692
14693     apu_db_header=$bdb_header
14694     apu_db_lib=$bdb_libname
14695     apu_have_db=1
14696     ;;
14697   esac
14698
14699   if test "$apu_have_db" = "1"; then
14700     apu_db_version=1
14701   fi
14702
14703     if test "$apu_db_version" != "1"; then
14704       as_fn_error $? "Berkeley db1 not found" "$LINENO" 5
14705     fi
14706     ;;
14707   db185)
14708
14709   places="$check_places"
14710   if test -z "$places"; then
14711     places="std"
14712   fi
14713
14714   bdb_version=1
14715   if test "-1" != "-1"; then
14716     bdb_version="$bdb_version.-1"
14717     if test "-1" != "-1"; then
14718       bdb_version="$bdb_version.-1"
14719     fi
14720   fi
14721   bdb_places="$places"
14722   bdb_default_search_headers="db_185.h"
14723   bdb_default_search_lib_names="db"
14724
14725
14726   apu_have_db=0
14727
14728   # Save the original values of the flags we tweak.
14729   apu_check_lib_save_libs="$LIBS"
14730   apu_check_lib_save_ldflags="$LDFLAGS"
14731   apu_check_lib_save_cppflags="$CPPFLAGS"
14732
14733   # The variable `found' is the prefix under which we've found
14734   # Berkeley DB, or `not' if we haven't found it anywhere yet.
14735   found=not
14736   for bdb_place in $bdb_places; do
14737
14738     LDFLAGS="$apu_check_lib_save_ldflags"
14739     CPPFLAGS="$apu_check_lib_save_cppflags"
14740     case "$bdb_place" in
14741       "std" )
14742         description="the standard places"
14743       ;;
14744       *":"* )
14745         header="`echo $bdb_place | sed -e 's/:.*$//'`"
14746         lib="`echo $bdb_place | sed -e 's/^.*://'`"
14747         CPPFLAGS="$CPPFLAGS -I$header"
14748         LDFLAGS="$LDFLAGS -L$lib"
14749         description="$header and $lib"
14750       ;;
14751       * )
14752         if test -d $bdb_place; then
14753           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14754           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14755         else
14756           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14757 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14758           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14759 $as_echo "directory not found" >&6; }
14760           continue
14761         fi
14762         description="$bdb_place"
14763       ;;
14764     esac
14765
14766     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14767     # trick to display a message instead.
14768     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14769 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14770     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14771 $as_echo "" >&6; }
14772
14773     for bdb_libname in $bdb_default_search_lib_names; do
14774       for bdb_header in $bdb_default_search_headers; do
14775         # Clear the header cache variable for each location
14776
14777         cache_id="`echo ac_cv_header_${bdb_header} \
14778                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14779
14780         unset $cache_id
14781         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14782 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14783 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14784
14785           if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
14786             # We generate a separate cache variable for each prefix and libname
14787             # we search under.  That way, we avoid caching information that
14788             # changes if the user runs `configure' with a different set of
14789             # switches.
14790
14791             cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14792                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14793
14794
14795             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14796 $as_echo_n "checking for -l$bdb_libname... " >&6; }
14797                                     if eval \${$cache_id+:} false; then :
14798   $as_echo_n "(cached) " >&6
14799 else
14800
14801
14802     apu_try_berkeley_db_save_libs="$LIBS"
14803
14804     apu_check_berkeley_db_major=1
14805     apu_check_berkeley_db_minor=-1
14806     apu_check_berkeley_db_patch=-1
14807     apu_try_berkeley_db_header=$bdb_header
14808     apu_try_berkeley_db_libname=$bdb_libname
14809
14810     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14811     if test "$cross_compiling" = yes; then :
14812   apu_try_berkeley_db=yes
14813
14814 else
14815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14816 /* end confdefs.h.  */
14817
14818 #include <stdlib.h>
14819 #include <stdio.h>
14820 #include <$apu_try_berkeley_db_header>
14821 main ()
14822 {
14823   int major, minor, patch;
14824
14825   db_version(&major, &minor, &patch);
14826
14827   /* Sanity check: ensure that db.h constants actually match the db library */
14828   if (major != DB_VERSION_MAJOR
14829       || minor != DB_VERSION_MINOR
14830       || patch != DB_VERSION_PATCH)
14831     exit (1);
14832
14833   /* Run-time check:  ensure the library claims to be the correct version. */
14834
14835   if ($apu_check_berkeley_db_major != -1) {
14836     if (major < $apu_check_berkeley_db_major)
14837       exit (1);
14838     if (major > $apu_check_berkeley_db_major)
14839       exit (0);
14840   }
14841
14842   if ($apu_check_berkeley_db_minor != -1) {
14843     if (minor < $apu_check_berkeley_db_minor)
14844       exit (1);
14845     if (minor > $apu_check_berkeley_db_minor)
14846       exit (0);
14847   }
14848
14849   if ($apu_check_berkeley_db_patch == -1
14850       || patch >= $apu_check_berkeley_db_patch)
14851     exit (0);
14852   else
14853     exit (1);
14854 }
14855
14856 _ACEOF
14857 if ac_fn_c_try_run "$LINENO"; then :
14858   apu_try_berkeley_db=yes
14859 else
14860   apu_try_berkeley_db=no
14861 fi
14862 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14863   conftest.$ac_objext conftest.beam conftest.$ac_ext
14864 fi
14865
14866
14867     LIBS="$apu_try_berkeley_db_save_libs"
14868
14869
14870                 eval "$cache_id=$apu_try_berkeley_db"
14871
14872 fi
14873
14874             result="`eval echo '$'$cache_id`"
14875             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14876 $as_echo "$result" >&6; }
14877           elif test "1" = "1"; then
14878             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14880 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14881 if eval \${$as_ac_Lib+:} false; then :
14882   $as_echo_n "(cached) " >&6
14883 else
14884   ac_check_lib_save_LIBS=$LIBS
14885 LIBS="-l$bdb_libname  $LIBS"
14886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14887 /* end confdefs.h.  */
14888
14889 /* Override any GCC internal prototype to avoid an error.
14890    Use char because int might match the return type of a GCC
14891    builtin and then its argument prototype would still apply.  */
14892 #ifdef __cplusplus
14893 extern "C"
14894 #endif
14895 char dbopen ();
14896 int
14897 main ()
14898 {
14899 return dbopen ();
14900   ;
14901   return 0;
14902 }
14903 _ACEOF
14904 if ac_fn_c_try_link "$LINENO"; then :
14905   eval "$as_ac_Lib=yes"
14906 else
14907   eval "$as_ac_Lib=no"
14908 fi
14909 rm -f core conftest.err conftest.$ac_objext \
14910     conftest$ac_exeext conftest.$ac_ext
14911 LIBS=$ac_check_lib_save_LIBS
14912 fi
14913 eval ac_res=\$$as_ac_Lib
14914                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14915 $as_echo "$ac_res" >&6; }
14916 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14917   result=yes
14918 else
14919   result=no
14920
14921 fi
14922
14923           elif test "1" = "2"; then
14924             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14926 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14927 if eval \${$as_ac_Lib+:} false; then :
14928   $as_echo_n "(cached) " >&6
14929 else
14930   ac_check_lib_save_LIBS=$LIBS
14931 LIBS="-l$bdb_libname  $LIBS"
14932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14933 /* end confdefs.h.  */
14934
14935 /* Override any GCC internal prototype to avoid an error.
14936    Use char because int might match the return type of a GCC
14937    builtin and then its argument prototype would still apply.  */
14938 #ifdef __cplusplus
14939 extern "C"
14940 #endif
14941 char db_open ();
14942 int
14943 main ()
14944 {
14945 return db_open ();
14946   ;
14947   return 0;
14948 }
14949 _ACEOF
14950 if ac_fn_c_try_link "$LINENO"; then :
14951   eval "$as_ac_Lib=yes"
14952 else
14953   eval "$as_ac_Lib=no"
14954 fi
14955 rm -f core conftest.err conftest.$ac_objext \
14956     conftest$ac_exeext conftest.$ac_ext
14957 LIBS=$ac_check_lib_save_LIBS
14958 fi
14959 eval ac_res=\$$as_ac_Lib
14960                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14961 $as_echo "$ac_res" >&6; }
14962 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14963   result=yes
14964 else
14965   result=no
14966
14967 fi
14968
14969           fi
14970
14971 else
14972   result="no"
14973 fi
14974
14975
14976
14977         # If we found it, no need to search any more.
14978         if test "$result" = "yes"; then
14979           found="$bdb_place"
14980           break
14981         fi
14982       done
14983       test "$found" != "not" && break
14984     done
14985     test "$found" != "not" && break
14986   done
14987
14988   # Restore the original values of the flags we tweak.
14989   LDFLAGS="$apu_check_lib_save_ldflags"
14990   CPPFLAGS="$apu_check_lib_save_cppflags"
14991
14992   case "$found" in
14993   "not")
14994     apu_have_db=0
14995     ;;
14996   "std")
14997     apu_db_header=$bdb_header
14998     apu_db_lib=$bdb_libname
14999     apu_have_db=1
15000     ;;
15001   *":"*)
15002     header="`echo $found | sed -e 's/:.*$//'`"
15003     lib="`echo $found | sed -e 's/^.*://'`"
15004
15005
15006   if test "x$APRUTIL_INCLUDES" = "x"; then
15007     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15008     APRUTIL_INCLUDES="-I$header"
15009   else
15010     apr_addto_bugger="-I$header"
15011     for i in $apr_addto_bugger; do
15012       apr_addto_duplicate="0"
15013       for j in $APRUTIL_INCLUDES; do
15014         if test "x$i" = "x$j"; then
15015           apr_addto_duplicate="1"
15016           break
15017         fi
15018       done
15019       if test $apr_addto_duplicate = "0"; then
15020         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15021         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15022       fi
15023     done
15024   fi
15025
15026
15027   if test "x$APRUTIL_LDFLAGS" = "x"; then
15028     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15029     APRUTIL_LDFLAGS="-L$lib"
15030   else
15031     apr_addto_bugger="-L$lib"
15032     for i in $apr_addto_bugger; do
15033       apr_addto_duplicate="0"
15034       for j in $APRUTIL_LDFLAGS; do
15035         if test "x$i" = "x$j"; then
15036           apr_addto_duplicate="1"
15037           break
15038         fi
15039       done
15040       if test $apr_addto_duplicate = "0"; then
15041         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15042         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15043       fi
15044     done
15045   fi
15046
15047     apu_db_header=$bdb_header
15048     apu_db_lib=$bdb_libname
15049     apu_have_db=1
15050     ;;
15051   *)
15052
15053   if test "x$APRUTIL_INCLUDES" = "x"; then
15054     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15055     APRUTIL_INCLUDES="-I$found/include"
15056   else
15057     apr_addto_bugger="-I$found/include"
15058     for i in $apr_addto_bugger; do
15059       apr_addto_duplicate="0"
15060       for j in $APRUTIL_INCLUDES; do
15061         if test "x$i" = "x$j"; then
15062           apr_addto_duplicate="1"
15063           break
15064         fi
15065       done
15066       if test $apr_addto_duplicate = "0"; then
15067         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15068         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15069       fi
15070     done
15071   fi
15072
15073
15074   if test "x$APRUTIL_LDFLAGS" = "x"; then
15075     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15076     APRUTIL_LDFLAGS="-L$found/lib"
15077   else
15078     apr_addto_bugger="-L$found/lib"
15079     for i in $apr_addto_bugger; do
15080       apr_addto_duplicate="0"
15081       for j in $APRUTIL_LDFLAGS; do
15082         if test "x$i" = "x$j"; then
15083           apr_addto_duplicate="1"
15084           break
15085         fi
15086       done
15087       if test $apr_addto_duplicate = "0"; then
15088         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15089         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15090       fi
15091     done
15092   fi
15093
15094     apu_db_header=$bdb_header
15095     apu_db_lib=$bdb_libname
15096     apu_have_db=1
15097     ;;
15098   esac
15099
15100   if test "$apu_have_db" = "1"; then
15101     apu_db_version=185
15102   fi
15103
15104     if test "$apu_db_version" != "185"; then
15105       as_fn_error $? "Berkeley db185 not found" "$LINENO" 5
15106     fi
15107     ;;
15108   db2)
15109
15110   places="$check_places"
15111   if test -z "$places"; then
15112     places="std"
15113   fi
15114
15115   bdb_version=2
15116   if test "-1" != "-1"; then
15117     bdb_version="$bdb_version.-1"
15118     if test "-1" != "-1"; then
15119       bdb_version="$bdb_version.-1"
15120     fi
15121   fi
15122   bdb_places="$places"
15123   bdb_default_search_headers="db2/db.h db.h"
15124   bdb_default_search_lib_names="db2 db"
15125
15126
15127   apu_have_db=0
15128
15129   # Save the original values of the flags we tweak.
15130   apu_check_lib_save_libs="$LIBS"
15131   apu_check_lib_save_ldflags="$LDFLAGS"
15132   apu_check_lib_save_cppflags="$CPPFLAGS"
15133
15134   # The variable `found' is the prefix under which we've found
15135   # Berkeley DB, or `not' if we haven't found it anywhere yet.
15136   found=not
15137   for bdb_place in $bdb_places; do
15138
15139     LDFLAGS="$apu_check_lib_save_ldflags"
15140     CPPFLAGS="$apu_check_lib_save_cppflags"
15141     case "$bdb_place" in
15142       "std" )
15143         description="the standard places"
15144       ;;
15145       *":"* )
15146         header="`echo $bdb_place | sed -e 's/:.*$//'`"
15147         lib="`echo $bdb_place | sed -e 's/^.*://'`"
15148         CPPFLAGS="$CPPFLAGS -I$header"
15149         LDFLAGS="$LDFLAGS -L$lib"
15150         description="$header and $lib"
15151       ;;
15152       * )
15153         if test -d $bdb_place; then
15154           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15155           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15156         else
15157           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15158 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15159           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15160 $as_echo "directory not found" >&6; }
15161           continue
15162         fi
15163         description="$bdb_place"
15164       ;;
15165     esac
15166
15167     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15168     # trick to display a message instead.
15169     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15170 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15171     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15172 $as_echo "" >&6; }
15173
15174     for bdb_libname in $bdb_default_search_lib_names; do
15175       for bdb_header in $bdb_default_search_headers; do
15176         # Clear the header cache variable for each location
15177
15178         cache_id="`echo ac_cv_header_${bdb_header} \
15179                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15180
15181         unset $cache_id
15182         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15183 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15184 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15185
15186           if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then
15187             # We generate a separate cache variable for each prefix and libname
15188             # we search under.  That way, we avoid caching information that
15189             # changes if the user runs `configure' with a different set of
15190             # switches.
15191
15192             cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15193                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15194
15195
15196             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
15197 $as_echo_n "checking for -l$bdb_libname... " >&6; }
15198                                     if eval \${$cache_id+:} false; then :
15199   $as_echo_n "(cached) " >&6
15200 else
15201
15202
15203     apu_try_berkeley_db_save_libs="$LIBS"
15204
15205     apu_check_berkeley_db_major=2
15206     apu_check_berkeley_db_minor=-1
15207     apu_check_berkeley_db_patch=-1
15208     apu_try_berkeley_db_header=$bdb_header
15209     apu_try_berkeley_db_libname=$bdb_libname
15210
15211     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15212     if test "$cross_compiling" = yes; then :
15213   apu_try_berkeley_db=yes
15214
15215 else
15216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15217 /* end confdefs.h.  */
15218
15219 #include <stdlib.h>
15220 #include <stdio.h>
15221 #include <$apu_try_berkeley_db_header>
15222 main ()
15223 {
15224   int major, minor, patch;
15225
15226   db_version(&major, &minor, &patch);
15227
15228   /* Sanity check: ensure that db.h constants actually match the db library */
15229   if (major != DB_VERSION_MAJOR
15230       || minor != DB_VERSION_MINOR
15231       || patch != DB_VERSION_PATCH)
15232     exit (1);
15233
15234   /* Run-time check:  ensure the library claims to be the correct version. */
15235
15236   if ($apu_check_berkeley_db_major != -1) {
15237     if (major < $apu_check_berkeley_db_major)
15238       exit (1);
15239     if (major > $apu_check_berkeley_db_major)
15240       exit (0);
15241   }
15242
15243   if ($apu_check_berkeley_db_minor != -1) {
15244     if (minor < $apu_check_berkeley_db_minor)
15245       exit (1);
15246     if (minor > $apu_check_berkeley_db_minor)
15247       exit (0);
15248   }
15249
15250   if ($apu_check_berkeley_db_patch == -1
15251       || patch >= $apu_check_berkeley_db_patch)
15252     exit (0);
15253   else
15254     exit (1);
15255 }
15256
15257 _ACEOF
15258 if ac_fn_c_try_run "$LINENO"; then :
15259   apu_try_berkeley_db=yes
15260 else
15261   apu_try_berkeley_db=no
15262 fi
15263 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15264   conftest.$ac_objext conftest.beam conftest.$ac_ext
15265 fi
15266
15267
15268     LIBS="$apu_try_berkeley_db_save_libs"
15269
15270
15271                 eval "$cache_id=$apu_try_berkeley_db"
15272
15273 fi
15274
15275             result="`eval echo '$'$cache_id`"
15276             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15277 $as_echo "$result" >&6; }
15278           elif test "2" = "1"; then
15279             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15281 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15282 if eval \${$as_ac_Lib+:} false; then :
15283   $as_echo_n "(cached) " >&6
15284 else
15285   ac_check_lib_save_LIBS=$LIBS
15286 LIBS="-l$bdb_libname  $LIBS"
15287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15288 /* end confdefs.h.  */
15289
15290 /* Override any GCC internal prototype to avoid an error.
15291    Use char because int might match the return type of a GCC
15292    builtin and then its argument prototype would still apply.  */
15293 #ifdef __cplusplus
15294 extern "C"
15295 #endif
15296 char dbopen ();
15297 int
15298 main ()
15299 {
15300 return dbopen ();
15301   ;
15302   return 0;
15303 }
15304 _ACEOF
15305 if ac_fn_c_try_link "$LINENO"; then :
15306   eval "$as_ac_Lib=yes"
15307 else
15308   eval "$as_ac_Lib=no"
15309 fi
15310 rm -f core conftest.err conftest.$ac_objext \
15311     conftest$ac_exeext conftest.$ac_ext
15312 LIBS=$ac_check_lib_save_LIBS
15313 fi
15314 eval ac_res=\$$as_ac_Lib
15315                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15316 $as_echo "$ac_res" >&6; }
15317 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15318   result=yes
15319 else
15320   result=no
15321
15322 fi
15323
15324           elif test "2" = "2"; then
15325             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15327 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15328 if eval \${$as_ac_Lib+:} false; then :
15329   $as_echo_n "(cached) " >&6
15330 else
15331   ac_check_lib_save_LIBS=$LIBS
15332 LIBS="-l$bdb_libname  $LIBS"
15333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15334 /* end confdefs.h.  */
15335
15336 /* Override any GCC internal prototype to avoid an error.
15337    Use char because int might match the return type of a GCC
15338    builtin and then its argument prototype would still apply.  */
15339 #ifdef __cplusplus
15340 extern "C"
15341 #endif
15342 char db_open ();
15343 int
15344 main ()
15345 {
15346 return db_open ();
15347   ;
15348   return 0;
15349 }
15350 _ACEOF
15351 if ac_fn_c_try_link "$LINENO"; then :
15352   eval "$as_ac_Lib=yes"
15353 else
15354   eval "$as_ac_Lib=no"
15355 fi
15356 rm -f core conftest.err conftest.$ac_objext \
15357     conftest$ac_exeext conftest.$ac_ext
15358 LIBS=$ac_check_lib_save_LIBS
15359 fi
15360 eval ac_res=\$$as_ac_Lib
15361                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15362 $as_echo "$ac_res" >&6; }
15363 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15364   result=yes
15365 else
15366   result=no
15367
15368 fi
15369
15370           fi
15371
15372 else
15373   result="no"
15374 fi
15375
15376
15377
15378         # If we found it, no need to search any more.
15379         if test "$result" = "yes"; then
15380           found="$bdb_place"
15381           break
15382         fi
15383       done
15384       test "$found" != "not" && break
15385     done
15386     test "$found" != "not" && break
15387   done
15388
15389   # Restore the original values of the flags we tweak.
15390   LDFLAGS="$apu_check_lib_save_ldflags"
15391   CPPFLAGS="$apu_check_lib_save_cppflags"
15392
15393   case "$found" in
15394   "not")
15395     apu_have_db=0
15396     ;;
15397   "std")
15398     apu_db_header=$bdb_header
15399     apu_db_lib=$bdb_libname
15400     apu_have_db=1
15401     ;;
15402   *":"*)
15403     header="`echo $found | sed -e 's/:.*$//'`"
15404     lib="`echo $found | sed -e 's/^.*://'`"
15405
15406
15407   if test "x$APRUTIL_INCLUDES" = "x"; then
15408     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15409     APRUTIL_INCLUDES="-I$header"
15410   else
15411     apr_addto_bugger="-I$header"
15412     for i in $apr_addto_bugger; do
15413       apr_addto_duplicate="0"
15414       for j in $APRUTIL_INCLUDES; do
15415         if test "x$i" = "x$j"; then
15416           apr_addto_duplicate="1"
15417           break
15418         fi
15419       done
15420       if test $apr_addto_duplicate = "0"; then
15421         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15422         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15423       fi
15424     done
15425   fi
15426
15427
15428   if test "x$APRUTIL_LDFLAGS" = "x"; then
15429     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15430     APRUTIL_LDFLAGS="-L$lib"
15431   else
15432     apr_addto_bugger="-L$lib"
15433     for i in $apr_addto_bugger; do
15434       apr_addto_duplicate="0"
15435       for j in $APRUTIL_LDFLAGS; do
15436         if test "x$i" = "x$j"; then
15437           apr_addto_duplicate="1"
15438           break
15439         fi
15440       done
15441       if test $apr_addto_duplicate = "0"; then
15442         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15443         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15444       fi
15445     done
15446   fi
15447
15448     apu_db_header=$bdb_header
15449     apu_db_lib=$bdb_libname
15450     apu_have_db=1
15451     ;;
15452   *)
15453
15454   if test "x$APRUTIL_INCLUDES" = "x"; then
15455     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15456     APRUTIL_INCLUDES="-I$found/include"
15457   else
15458     apr_addto_bugger="-I$found/include"
15459     for i in $apr_addto_bugger; do
15460       apr_addto_duplicate="0"
15461       for j in $APRUTIL_INCLUDES; do
15462         if test "x$i" = "x$j"; then
15463           apr_addto_duplicate="1"
15464           break
15465         fi
15466       done
15467       if test $apr_addto_duplicate = "0"; then
15468         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15469         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15470       fi
15471     done
15472   fi
15473
15474
15475   if test "x$APRUTIL_LDFLAGS" = "x"; then
15476     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15477     APRUTIL_LDFLAGS="-L$found/lib"
15478   else
15479     apr_addto_bugger="-L$found/lib"
15480     for i in $apr_addto_bugger; do
15481       apr_addto_duplicate="0"
15482       for j in $APRUTIL_LDFLAGS; do
15483         if test "x$i" = "x$j"; then
15484           apr_addto_duplicate="1"
15485           break
15486         fi
15487       done
15488       if test $apr_addto_duplicate = "0"; then
15489         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15490         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15491       fi
15492     done
15493   fi
15494
15495     apu_db_header=$bdb_header
15496     apu_db_lib=$bdb_libname
15497     apu_have_db=1
15498     ;;
15499   esac
15500
15501   if test "$apu_have_db" = "1"; then
15502     apu_db_version=2
15503   fi
15504
15505     if test "$apu_db_version" != "2"; then
15506       as_fn_error $? "Berkeley db2 not found" "$LINENO" 5
15507     fi
15508     ;;
15509   db3)
15510
15511   places="$check_places"
15512   if test -z "$places"; then
15513     places="std"
15514   fi
15515
15516   bdb_version=3
15517   if test "-1" != "-1"; then
15518     bdb_version="$bdb_version.-1"
15519     if test "-1" != "-1"; then
15520       bdb_version="$bdb_version.-1"
15521     fi
15522   fi
15523   bdb_places="$places"
15524   bdb_default_search_headers="db3/db.h db.h"
15525   bdb_default_search_lib_names="db3 db"
15526
15527
15528   apu_have_db=0
15529
15530   # Save the original values of the flags we tweak.
15531   apu_check_lib_save_libs="$LIBS"
15532   apu_check_lib_save_ldflags="$LDFLAGS"
15533   apu_check_lib_save_cppflags="$CPPFLAGS"
15534
15535   # The variable `found' is the prefix under which we've found
15536   # Berkeley DB, or `not' if we haven't found it anywhere yet.
15537   found=not
15538   for bdb_place in $bdb_places; do
15539
15540     LDFLAGS="$apu_check_lib_save_ldflags"
15541     CPPFLAGS="$apu_check_lib_save_cppflags"
15542     case "$bdb_place" in
15543       "std" )
15544         description="the standard places"
15545       ;;
15546       *":"* )
15547         header="`echo $bdb_place | sed -e 's/:.*$//'`"
15548         lib="`echo $bdb_place | sed -e 's/^.*://'`"
15549         CPPFLAGS="$CPPFLAGS -I$header"
15550         LDFLAGS="$LDFLAGS -L$lib"
15551         description="$header and $lib"
15552       ;;
15553       * )
15554         if test -d $bdb_place; then
15555           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15556           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15557         else
15558           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15559 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15560           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15561 $as_echo "directory not found" >&6; }
15562           continue
15563         fi
15564         description="$bdb_place"
15565       ;;
15566     esac
15567
15568     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15569     # trick to display a message instead.
15570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15571 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15573 $as_echo "" >&6; }
15574
15575     for bdb_libname in $bdb_default_search_lib_names; do
15576       for bdb_header in $bdb_default_search_headers; do
15577         # Clear the header cache variable for each location
15578
15579         cache_id="`echo ac_cv_header_${bdb_header} \
15580                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15581
15582         unset $cache_id
15583         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15584 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15585 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15586
15587           if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then
15588             # We generate a separate cache variable for each prefix and libname
15589             # we search under.  That way, we avoid caching information that
15590             # changes if the user runs `configure' with a different set of
15591             # switches.
15592
15593             cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15594                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15595
15596
15597             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
15598 $as_echo_n "checking for -l$bdb_libname... " >&6; }
15599                                     if eval \${$cache_id+:} false; then :
15600   $as_echo_n "(cached) " >&6
15601 else
15602
15603
15604     apu_try_berkeley_db_save_libs="$LIBS"
15605
15606     apu_check_berkeley_db_major=3
15607     apu_check_berkeley_db_minor=-1
15608     apu_check_berkeley_db_patch=-1
15609     apu_try_berkeley_db_header=$bdb_header
15610     apu_try_berkeley_db_libname=$bdb_libname
15611
15612     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15613     if test "$cross_compiling" = yes; then :
15614   apu_try_berkeley_db=yes
15615
15616 else
15617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15618 /* end confdefs.h.  */
15619
15620 #include <stdlib.h>
15621 #include <stdio.h>
15622 #include <$apu_try_berkeley_db_header>
15623 main ()
15624 {
15625   int major, minor, patch;
15626
15627   db_version(&major, &minor, &patch);
15628
15629   /* Sanity check: ensure that db.h constants actually match the db library */
15630   if (major != DB_VERSION_MAJOR
15631       || minor != DB_VERSION_MINOR
15632       || patch != DB_VERSION_PATCH)
15633     exit (1);
15634
15635   /* Run-time check:  ensure the library claims to be the correct version. */
15636
15637   if ($apu_check_berkeley_db_major != -1) {
15638     if (major < $apu_check_berkeley_db_major)
15639       exit (1);
15640     if (major > $apu_check_berkeley_db_major)
15641       exit (0);
15642   }
15643
15644   if ($apu_check_berkeley_db_minor != -1) {
15645     if (minor < $apu_check_berkeley_db_minor)
15646       exit (1);
15647     if (minor > $apu_check_berkeley_db_minor)
15648       exit (0);
15649   }
15650
15651   if ($apu_check_berkeley_db_patch == -1
15652       || patch >= $apu_check_berkeley_db_patch)
15653     exit (0);
15654   else
15655     exit (1);
15656 }
15657
15658 _ACEOF
15659 if ac_fn_c_try_run "$LINENO"; then :
15660   apu_try_berkeley_db=yes
15661 else
15662   apu_try_berkeley_db=no
15663 fi
15664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15665   conftest.$ac_objext conftest.beam conftest.$ac_ext
15666 fi
15667
15668
15669     LIBS="$apu_try_berkeley_db_save_libs"
15670
15671
15672                 eval "$cache_id=$apu_try_berkeley_db"
15673
15674 fi
15675
15676             result="`eval echo '$'$cache_id`"
15677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15678 $as_echo "$result" >&6; }
15679           elif test "3" = "1"; then
15680             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15682 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15683 if eval \${$as_ac_Lib+:} false; then :
15684   $as_echo_n "(cached) " >&6
15685 else
15686   ac_check_lib_save_LIBS=$LIBS
15687 LIBS="-l$bdb_libname  $LIBS"
15688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15689 /* end confdefs.h.  */
15690
15691 /* Override any GCC internal prototype to avoid an error.
15692    Use char because int might match the return type of a GCC
15693    builtin and then its argument prototype would still apply.  */
15694 #ifdef __cplusplus
15695 extern "C"
15696 #endif
15697 char dbopen ();
15698 int
15699 main ()
15700 {
15701 return dbopen ();
15702   ;
15703   return 0;
15704 }
15705 _ACEOF
15706 if ac_fn_c_try_link "$LINENO"; then :
15707   eval "$as_ac_Lib=yes"
15708 else
15709   eval "$as_ac_Lib=no"
15710 fi
15711 rm -f core conftest.err conftest.$ac_objext \
15712     conftest$ac_exeext conftest.$ac_ext
15713 LIBS=$ac_check_lib_save_LIBS
15714 fi
15715 eval ac_res=\$$as_ac_Lib
15716                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15717 $as_echo "$ac_res" >&6; }
15718 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15719   result=yes
15720 else
15721   result=no
15722
15723 fi
15724
15725           elif test "3" = "2"; then
15726             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15728 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15729 if eval \${$as_ac_Lib+:} false; then :
15730   $as_echo_n "(cached) " >&6
15731 else
15732   ac_check_lib_save_LIBS=$LIBS
15733 LIBS="-l$bdb_libname  $LIBS"
15734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15735 /* end confdefs.h.  */
15736
15737 /* Override any GCC internal prototype to avoid an error.
15738    Use char because int might match the return type of a GCC
15739    builtin and then its argument prototype would still apply.  */
15740 #ifdef __cplusplus
15741 extern "C"
15742 #endif
15743 char db_open ();
15744 int
15745 main ()
15746 {
15747 return db_open ();
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 if ac_fn_c_try_link "$LINENO"; then :
15753   eval "$as_ac_Lib=yes"
15754 else
15755   eval "$as_ac_Lib=no"
15756 fi
15757 rm -f core conftest.err conftest.$ac_objext \
15758     conftest$ac_exeext conftest.$ac_ext
15759 LIBS=$ac_check_lib_save_LIBS
15760 fi
15761 eval ac_res=\$$as_ac_Lib
15762                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15763 $as_echo "$ac_res" >&6; }
15764 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15765   result=yes
15766 else
15767   result=no
15768
15769 fi
15770
15771           fi
15772
15773 else
15774   result="no"
15775 fi
15776
15777
15778
15779         # If we found it, no need to search any more.
15780         if test "$result" = "yes"; then
15781           found="$bdb_place"
15782           break
15783         fi
15784       done
15785       test "$found" != "not" && break
15786     done
15787     test "$found" != "not" && break
15788   done
15789
15790   # Restore the original values of the flags we tweak.
15791   LDFLAGS="$apu_check_lib_save_ldflags"
15792   CPPFLAGS="$apu_check_lib_save_cppflags"
15793
15794   case "$found" in
15795   "not")
15796     apu_have_db=0
15797     ;;
15798   "std")
15799     apu_db_header=$bdb_header
15800     apu_db_lib=$bdb_libname
15801     apu_have_db=1
15802     ;;
15803   *":"*)
15804     header="`echo $found | sed -e 's/:.*$//'`"
15805     lib="`echo $found | sed -e 's/^.*://'`"
15806
15807
15808   if test "x$APRUTIL_INCLUDES" = "x"; then
15809     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15810     APRUTIL_INCLUDES="-I$header"
15811   else
15812     apr_addto_bugger="-I$header"
15813     for i in $apr_addto_bugger; do
15814       apr_addto_duplicate="0"
15815       for j in $APRUTIL_INCLUDES; do
15816         if test "x$i" = "x$j"; then
15817           apr_addto_duplicate="1"
15818           break
15819         fi
15820       done
15821       if test $apr_addto_duplicate = "0"; then
15822         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15823         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15824       fi
15825     done
15826   fi
15827
15828
15829   if test "x$APRUTIL_LDFLAGS" = "x"; then
15830     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15831     APRUTIL_LDFLAGS="-L$lib"
15832   else
15833     apr_addto_bugger="-L$lib"
15834     for i in $apr_addto_bugger; do
15835       apr_addto_duplicate="0"
15836       for j in $APRUTIL_LDFLAGS; do
15837         if test "x$i" = "x$j"; then
15838           apr_addto_duplicate="1"
15839           break
15840         fi
15841       done
15842       if test $apr_addto_duplicate = "0"; then
15843         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15844         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15845       fi
15846     done
15847   fi
15848
15849     apu_db_header=$bdb_header
15850     apu_db_lib=$bdb_libname
15851     apu_have_db=1
15852     ;;
15853   *)
15854
15855   if test "x$APRUTIL_INCLUDES" = "x"; then
15856     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15857     APRUTIL_INCLUDES="-I$found/include"
15858   else
15859     apr_addto_bugger="-I$found/include"
15860     for i in $apr_addto_bugger; do
15861       apr_addto_duplicate="0"
15862       for j in $APRUTIL_INCLUDES; do
15863         if test "x$i" = "x$j"; then
15864           apr_addto_duplicate="1"
15865           break
15866         fi
15867       done
15868       if test $apr_addto_duplicate = "0"; then
15869         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15870         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15871       fi
15872     done
15873   fi
15874
15875
15876   if test "x$APRUTIL_LDFLAGS" = "x"; then
15877     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15878     APRUTIL_LDFLAGS="-L$found/lib"
15879   else
15880     apr_addto_bugger="-L$found/lib"
15881     for i in $apr_addto_bugger; do
15882       apr_addto_duplicate="0"
15883       for j in $APRUTIL_LDFLAGS; do
15884         if test "x$i" = "x$j"; then
15885           apr_addto_duplicate="1"
15886           break
15887         fi
15888       done
15889       if test $apr_addto_duplicate = "0"; then
15890         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15891         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15892       fi
15893     done
15894   fi
15895
15896     apu_db_header=$bdb_header
15897     apu_db_lib=$bdb_libname
15898     apu_have_db=1
15899     ;;
15900   esac
15901
15902   if test "$apu_have_db" = "1"; then
15903     apu_db_version=3
15904   fi
15905
15906     if test "$apu_db_version" != "3"; then
15907       as_fn_error $? "Berkeley db3 not found" "$LINENO" 5
15908     fi
15909     ;;
15910   db[456][0-9])
15911     db_major=`echo "$requested" | sed -e 's/db//' -e 's/.$//'`
15912     db_minor=`echo "$requested" | sed -e 's/db//' -e 's/.//'`
15913
15914   places="$check_places"
15915   db_major="$db_major"
15916   db_minor="$db_minor"
15917   if test -z "$places"; then
15918     places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
15919   fi
15920
15921   bdb_version="${db_major}"
15922   if test ""${db_minor}"" != "-1"; then
15923     bdb_version="$bdb_version."${db_minor}""
15924     if test ""-1"" != "-1"; then
15925       bdb_version="$bdb_version."-1""
15926     fi
15927   fi
15928   bdb_places="$places"
15929   bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
15930   bdb_default_search_lib_names="db-${db_major}.${db_minor} db${db_major}-${db_major}.${db_minor} db${db_major}${db_minor} db-${db_major} db${db_major} db"
15931
15932
15933   apu_have_db=0
15934
15935   # Save the original values of the flags we tweak.
15936   apu_check_lib_save_libs="$LIBS"
15937   apu_check_lib_save_ldflags="$LDFLAGS"
15938   apu_check_lib_save_cppflags="$CPPFLAGS"
15939
15940   # The variable `found' is the prefix under which we've found
15941   # Berkeley DB, or `not' if we haven't found it anywhere yet.
15942   found=not
15943   for bdb_place in $bdb_places; do
15944
15945     LDFLAGS="$apu_check_lib_save_ldflags"
15946     CPPFLAGS="$apu_check_lib_save_cppflags"
15947     case "$bdb_place" in
15948       "std" )
15949         description="the standard places"
15950       ;;
15951       *":"* )
15952         header="`echo $bdb_place | sed -e 's/:.*$//'`"
15953         lib="`echo $bdb_place | sed -e 's/^.*://'`"
15954         CPPFLAGS="$CPPFLAGS -I$header"
15955         LDFLAGS="$LDFLAGS -L$lib"
15956         description="$header and $lib"
15957       ;;
15958       * )
15959         if test -d $bdb_place; then
15960           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15961           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15962         else
15963           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15964 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15965           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15966 $as_echo "directory not found" >&6; }
15967           continue
15968         fi
15969         description="$bdb_place"
15970       ;;
15971     esac
15972
15973     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15974     # trick to display a message instead.
15975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15976 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15978 $as_echo "" >&6; }
15979
15980     for bdb_libname in $bdb_default_search_lib_names; do
15981       for bdb_header in $bdb_default_search_headers; do
15982         # Clear the header cache variable for each location
15983
15984         cache_id="`echo ac_cv_header_${bdb_header} \
15985                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15986
15987         unset $cache_id
15988         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15989 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15990 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15991
15992           if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
15993             # We generate a separate cache variable for each prefix and libname
15994             # we search under.  That way, we avoid caching information that
15995             # changes if the user runs `configure' with a different set of
15996             # switches.
15997
15998             cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15999                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16000
16001
16002             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16003 $as_echo_n "checking for -l$bdb_libname... " >&6; }
16004                                     if eval \${$cache_id+:} false; then :
16005   $as_echo_n "(cached) " >&6
16006 else
16007
16008
16009     apu_try_berkeley_db_save_libs="$LIBS"
16010
16011     apu_check_berkeley_db_major="${db_major}"
16012     apu_check_berkeley_db_minor="${db_minor}"
16013     apu_check_berkeley_db_patch="-1"
16014     apu_try_berkeley_db_header=$bdb_header
16015     apu_try_berkeley_db_libname=$bdb_libname
16016
16017     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16018     if test "$cross_compiling" = yes; then :
16019   apu_try_berkeley_db=yes
16020
16021 else
16022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023 /* end confdefs.h.  */
16024
16025 #include <stdlib.h>
16026 #include <stdio.h>
16027 #include <$apu_try_berkeley_db_header>
16028 main ()
16029 {
16030   int major, minor, patch;
16031
16032   db_version(&major, &minor, &patch);
16033
16034   /* Sanity check: ensure that db.h constants actually match the db library */
16035   if (major != DB_VERSION_MAJOR
16036       || minor != DB_VERSION_MINOR
16037       || patch != DB_VERSION_PATCH)
16038     exit (1);
16039
16040   /* Run-time check:  ensure the library claims to be the correct version. */
16041
16042   if ($apu_check_berkeley_db_major != -1) {
16043     if (major < $apu_check_berkeley_db_major)
16044       exit (1);
16045     if (major > $apu_check_berkeley_db_major)
16046       exit (0);
16047   }
16048
16049   if ($apu_check_berkeley_db_minor != -1) {
16050     if (minor < $apu_check_berkeley_db_minor)
16051       exit (1);
16052     if (minor > $apu_check_berkeley_db_minor)
16053       exit (0);
16054   }
16055
16056   if ($apu_check_berkeley_db_patch == -1
16057       || patch >= $apu_check_berkeley_db_patch)
16058     exit (0);
16059   else
16060     exit (1);
16061 }
16062
16063 _ACEOF
16064 if ac_fn_c_try_run "$LINENO"; then :
16065   apu_try_berkeley_db=yes
16066 else
16067   apu_try_berkeley_db=no
16068 fi
16069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16070   conftest.$ac_objext conftest.beam conftest.$ac_ext
16071 fi
16072
16073
16074     LIBS="$apu_try_berkeley_db_save_libs"
16075
16076
16077                 eval "$cache_id=$apu_try_berkeley_db"
16078
16079 fi
16080
16081             result="`eval echo '$'$cache_id`"
16082             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16083 $as_echo "$result" >&6; }
16084           elif test ""${db_major}"" = "1"; then
16085             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16087 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16088 if eval \${$as_ac_Lib+:} false; then :
16089   $as_echo_n "(cached) " >&6
16090 else
16091   ac_check_lib_save_LIBS=$LIBS
16092 LIBS="-l$bdb_libname  $LIBS"
16093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16094 /* end confdefs.h.  */
16095
16096 /* Override any GCC internal prototype to avoid an error.
16097    Use char because int might match the return type of a GCC
16098    builtin and then its argument prototype would still apply.  */
16099 #ifdef __cplusplus
16100 extern "C"
16101 #endif
16102 char dbopen ();
16103 int
16104 main ()
16105 {
16106 return dbopen ();
16107   ;
16108   return 0;
16109 }
16110 _ACEOF
16111 if ac_fn_c_try_link "$LINENO"; then :
16112   eval "$as_ac_Lib=yes"
16113 else
16114   eval "$as_ac_Lib=no"
16115 fi
16116 rm -f core conftest.err conftest.$ac_objext \
16117     conftest$ac_exeext conftest.$ac_ext
16118 LIBS=$ac_check_lib_save_LIBS
16119 fi
16120 eval ac_res=\$$as_ac_Lib
16121                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16122 $as_echo "$ac_res" >&6; }
16123 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16124   result=yes
16125 else
16126   result=no
16127
16128 fi
16129
16130           elif test ""${db_major}"" = "2"; then
16131             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16133 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16134 if eval \${$as_ac_Lib+:} false; then :
16135   $as_echo_n "(cached) " >&6
16136 else
16137   ac_check_lib_save_LIBS=$LIBS
16138 LIBS="-l$bdb_libname  $LIBS"
16139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16140 /* end confdefs.h.  */
16141
16142 /* Override any GCC internal prototype to avoid an error.
16143    Use char because int might match the return type of a GCC
16144    builtin and then its argument prototype would still apply.  */
16145 #ifdef __cplusplus
16146 extern "C"
16147 #endif
16148 char db_open ();
16149 int
16150 main ()
16151 {
16152 return db_open ();
16153   ;
16154   return 0;
16155 }
16156 _ACEOF
16157 if ac_fn_c_try_link "$LINENO"; then :
16158   eval "$as_ac_Lib=yes"
16159 else
16160   eval "$as_ac_Lib=no"
16161 fi
16162 rm -f core conftest.err conftest.$ac_objext \
16163     conftest$ac_exeext conftest.$ac_ext
16164 LIBS=$ac_check_lib_save_LIBS
16165 fi
16166 eval ac_res=\$$as_ac_Lib
16167                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16168 $as_echo "$ac_res" >&6; }
16169 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16170   result=yes
16171 else
16172   result=no
16173
16174 fi
16175
16176           fi
16177
16178 else
16179   result="no"
16180 fi
16181
16182
16183
16184         # If we found it, no need to search any more.
16185         if test "$result" = "yes"; then
16186           found="$bdb_place"
16187           break
16188         fi
16189       done
16190       test "$found" != "not" && break
16191     done
16192     test "$found" != "not" && break
16193   done
16194
16195   # Restore the original values of the flags we tweak.
16196   LDFLAGS="$apu_check_lib_save_ldflags"
16197   CPPFLAGS="$apu_check_lib_save_cppflags"
16198
16199   case "$found" in
16200   "not")
16201     apu_have_db=0
16202     ;;
16203   "std")
16204     apu_db_header=$bdb_header
16205     apu_db_lib=$bdb_libname
16206     apu_have_db=1
16207     ;;
16208   *":"*)
16209     header="`echo $found | sed -e 's/:.*$//'`"
16210     lib="`echo $found | sed -e 's/^.*://'`"
16211
16212
16213   if test "x$APRUTIL_INCLUDES" = "x"; then
16214     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16215     APRUTIL_INCLUDES="-I$header"
16216   else
16217     apr_addto_bugger="-I$header"
16218     for i in $apr_addto_bugger; do
16219       apr_addto_duplicate="0"
16220       for j in $APRUTIL_INCLUDES; do
16221         if test "x$i" = "x$j"; then
16222           apr_addto_duplicate="1"
16223           break
16224         fi
16225       done
16226       if test $apr_addto_duplicate = "0"; then
16227         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16228         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16229       fi
16230     done
16231   fi
16232
16233
16234   if test "x$APRUTIL_LDFLAGS" = "x"; then
16235     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16236     APRUTIL_LDFLAGS="-L$lib"
16237   else
16238     apr_addto_bugger="-L$lib"
16239     for i in $apr_addto_bugger; do
16240       apr_addto_duplicate="0"
16241       for j in $APRUTIL_LDFLAGS; do
16242         if test "x$i" = "x$j"; then
16243           apr_addto_duplicate="1"
16244           break
16245         fi
16246       done
16247       if test $apr_addto_duplicate = "0"; then
16248         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16249         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16250       fi
16251     done
16252   fi
16253
16254     apu_db_header=$bdb_header
16255     apu_db_lib=$bdb_libname
16256     apu_have_db=1
16257     ;;
16258   *)
16259
16260   if test "x$APRUTIL_INCLUDES" = "x"; then
16261     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16262     APRUTIL_INCLUDES="-I$found/include"
16263   else
16264     apr_addto_bugger="-I$found/include"
16265     for i in $apr_addto_bugger; do
16266       apr_addto_duplicate="0"
16267       for j in $APRUTIL_INCLUDES; do
16268         if test "x$i" = "x$j"; then
16269           apr_addto_duplicate="1"
16270           break
16271         fi
16272       done
16273       if test $apr_addto_duplicate = "0"; then
16274         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16275         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16276       fi
16277     done
16278   fi
16279
16280
16281   if test "x$APRUTIL_LDFLAGS" = "x"; then
16282     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16283     APRUTIL_LDFLAGS="-L$found/lib"
16284   else
16285     apr_addto_bugger="-L$found/lib"
16286     for i in $apr_addto_bugger; do
16287       apr_addto_duplicate="0"
16288       for j in $APRUTIL_LDFLAGS; do
16289         if test "x$i" = "x$j"; then
16290           apr_addto_duplicate="1"
16291           break
16292         fi
16293       done
16294       if test $apr_addto_duplicate = "0"; then
16295         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16296         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16297       fi
16298     done
16299   fi
16300
16301     apu_db_header=$bdb_header
16302     apu_db_lib=$bdb_libname
16303     apu_have_db=1
16304     ;;
16305   esac
16306
16307   if test "$apu_have_db" = "1"; then
16308     apu_db_version=${db_major}
16309   fi
16310
16311     if test "$apu_db_version" != "$db_major"; then
16312       as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5
16313     fi
16314     ;;
16315   db[456])
16316     db_major=`echo "$requested" | sed -e 's/db//'`
16317     # Start version search at version x.9
16318     db_minor=9
16319     while [ $db_minor -ge 0 ]
16320     do
16321
16322   places="$check_places"
16323   db_major="$db_major"
16324   db_minor="$db_minor"
16325   if test -z "$places"; then
16326     places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
16327   fi
16328
16329   bdb_version="${db_major}"
16330   if test ""${db_minor}"" != "-1"; then
16331     bdb_version="$bdb_version."${db_minor}""
16332     if test ""-1"" != "-1"; then
16333       bdb_version="$bdb_version."-1""
16334     fi
16335   fi
16336   bdb_places="$places"
16337   bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
16338   bdb_default_search_lib_names="db-${db_major}.${db_minor} db${db_major}-${db_major}.${db_minor} db${db_major}${db_minor} db-${db_major} db${db_major} db"
16339
16340
16341   apu_have_db=0
16342
16343   # Save the original values of the flags we tweak.
16344   apu_check_lib_save_libs="$LIBS"
16345   apu_check_lib_save_ldflags="$LDFLAGS"
16346   apu_check_lib_save_cppflags="$CPPFLAGS"
16347
16348   # The variable `found' is the prefix under which we've found
16349   # Berkeley DB, or `not' if we haven't found it anywhere yet.
16350   found=not
16351   for bdb_place in $bdb_places; do
16352
16353     LDFLAGS="$apu_check_lib_save_ldflags"
16354     CPPFLAGS="$apu_check_lib_save_cppflags"
16355     case "$bdb_place" in
16356       "std" )
16357         description="the standard places"
16358       ;;
16359       *":"* )
16360         header="`echo $bdb_place | sed -e 's/:.*$//'`"
16361         lib="`echo $bdb_place | sed -e 's/^.*://'`"
16362         CPPFLAGS="$CPPFLAGS -I$header"
16363         LDFLAGS="$LDFLAGS -L$lib"
16364         description="$header and $lib"
16365       ;;
16366       * )
16367         if test -d $bdb_place; then
16368           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16369           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16370         else
16371           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16372 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16373           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16374 $as_echo "directory not found" >&6; }
16375           continue
16376         fi
16377         description="$bdb_place"
16378       ;;
16379     esac
16380
16381     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16382     # trick to display a message instead.
16383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16384 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16386 $as_echo "" >&6; }
16387
16388     for bdb_libname in $bdb_default_search_lib_names; do
16389       for bdb_header in $bdb_default_search_headers; do
16390         # Clear the header cache variable for each location
16391
16392         cache_id="`echo ac_cv_header_${bdb_header} \
16393                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16394
16395         unset $cache_id
16396         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16397 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16398 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16399
16400           if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
16401             # We generate a separate cache variable for each prefix and libname
16402             # we search under.  That way, we avoid caching information that
16403             # changes if the user runs `configure' with a different set of
16404             # switches.
16405
16406             cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16407                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16408
16409
16410             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16411 $as_echo_n "checking for -l$bdb_libname... " >&6; }
16412                                     if eval \${$cache_id+:} false; then :
16413   $as_echo_n "(cached) " >&6
16414 else
16415
16416
16417     apu_try_berkeley_db_save_libs="$LIBS"
16418
16419     apu_check_berkeley_db_major="${db_major}"
16420     apu_check_berkeley_db_minor="${db_minor}"
16421     apu_check_berkeley_db_patch="-1"
16422     apu_try_berkeley_db_header=$bdb_header
16423     apu_try_berkeley_db_libname=$bdb_libname
16424
16425     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16426     if test "$cross_compiling" = yes; then :
16427   apu_try_berkeley_db=yes
16428
16429 else
16430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431 /* end confdefs.h.  */
16432
16433 #include <stdlib.h>
16434 #include <stdio.h>
16435 #include <$apu_try_berkeley_db_header>
16436 main ()
16437 {
16438   int major, minor, patch;
16439
16440   db_version(&major, &minor, &patch);
16441
16442   /* Sanity check: ensure that db.h constants actually match the db library */
16443   if (major != DB_VERSION_MAJOR
16444       || minor != DB_VERSION_MINOR
16445       || patch != DB_VERSION_PATCH)
16446     exit (1);
16447
16448   /* Run-time check:  ensure the library claims to be the correct version. */
16449
16450   if ($apu_check_berkeley_db_major != -1) {
16451     if (major < $apu_check_berkeley_db_major)
16452       exit (1);
16453     if (major > $apu_check_berkeley_db_major)
16454       exit (0);
16455   }
16456
16457   if ($apu_check_berkeley_db_minor != -1) {
16458     if (minor < $apu_check_berkeley_db_minor)
16459       exit (1);
16460     if (minor > $apu_check_berkeley_db_minor)
16461       exit (0);
16462   }
16463
16464   if ($apu_check_berkeley_db_patch == -1
16465       || patch >= $apu_check_berkeley_db_patch)
16466     exit (0);
16467   else
16468     exit (1);
16469 }
16470
16471 _ACEOF
16472 if ac_fn_c_try_run "$LINENO"; then :
16473   apu_try_berkeley_db=yes
16474 else
16475   apu_try_berkeley_db=no
16476 fi
16477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16478   conftest.$ac_objext conftest.beam conftest.$ac_ext
16479 fi
16480
16481
16482     LIBS="$apu_try_berkeley_db_save_libs"
16483
16484
16485                 eval "$cache_id=$apu_try_berkeley_db"
16486
16487 fi
16488
16489             result="`eval echo '$'$cache_id`"
16490             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16491 $as_echo "$result" >&6; }
16492           elif test ""${db_major}"" = "1"; then
16493             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16495 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16496 if eval \${$as_ac_Lib+:} false; then :
16497   $as_echo_n "(cached) " >&6
16498 else
16499   ac_check_lib_save_LIBS=$LIBS
16500 LIBS="-l$bdb_libname  $LIBS"
16501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502 /* end confdefs.h.  */
16503
16504 /* Override any GCC internal prototype to avoid an error.
16505    Use char because int might match the return type of a GCC
16506    builtin and then its argument prototype would still apply.  */
16507 #ifdef __cplusplus
16508 extern "C"
16509 #endif
16510 char dbopen ();
16511 int
16512 main ()
16513 {
16514 return dbopen ();
16515   ;
16516   return 0;
16517 }
16518 _ACEOF
16519 if ac_fn_c_try_link "$LINENO"; then :
16520   eval "$as_ac_Lib=yes"
16521 else
16522   eval "$as_ac_Lib=no"
16523 fi
16524 rm -f core conftest.err conftest.$ac_objext \
16525     conftest$ac_exeext conftest.$ac_ext
16526 LIBS=$ac_check_lib_save_LIBS
16527 fi
16528 eval ac_res=\$$as_ac_Lib
16529                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16530 $as_echo "$ac_res" >&6; }
16531 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16532   result=yes
16533 else
16534   result=no
16535
16536 fi
16537
16538           elif test ""${db_major}"" = "2"; then
16539             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16541 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16542 if eval \${$as_ac_Lib+:} false; then :
16543   $as_echo_n "(cached) " >&6
16544 else
16545   ac_check_lib_save_LIBS=$LIBS
16546 LIBS="-l$bdb_libname  $LIBS"
16547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16548 /* end confdefs.h.  */
16549
16550 /* Override any GCC internal prototype to avoid an error.
16551    Use char because int might match the return type of a GCC
16552    builtin and then its argument prototype would still apply.  */
16553 #ifdef __cplusplus
16554 extern "C"
16555 #endif
16556 char db_open ();
16557 int
16558 main ()
16559 {
16560 return db_open ();
16561   ;
16562   return 0;
16563 }
16564 _ACEOF
16565 if ac_fn_c_try_link "$LINENO"; then :
16566   eval "$as_ac_Lib=yes"
16567 else
16568   eval "$as_ac_Lib=no"
16569 fi
16570 rm -f core conftest.err conftest.$ac_objext \
16571     conftest$ac_exeext conftest.$ac_ext
16572 LIBS=$ac_check_lib_save_LIBS
16573 fi
16574 eval ac_res=\$$as_ac_Lib
16575                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16576 $as_echo "$ac_res" >&6; }
16577 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16578   result=yes
16579 else
16580   result=no
16581
16582 fi
16583
16584           fi
16585
16586 else
16587   result="no"
16588 fi
16589
16590
16591
16592         # If we found it, no need to search any more.
16593         if test "$result" = "yes"; then
16594           found="$bdb_place"
16595           break
16596         fi
16597       done
16598       test "$found" != "not" && break
16599     done
16600     test "$found" != "not" && break
16601   done
16602
16603   # Restore the original values of the flags we tweak.
16604   LDFLAGS="$apu_check_lib_save_ldflags"
16605   CPPFLAGS="$apu_check_lib_save_cppflags"
16606
16607   case "$found" in
16608   "not")
16609     apu_have_db=0
16610     ;;
16611   "std")
16612     apu_db_header=$bdb_header
16613     apu_db_lib=$bdb_libname
16614     apu_have_db=1
16615     ;;
16616   *":"*)
16617     header="`echo $found | sed -e 's/:.*$//'`"
16618     lib="`echo $found | sed -e 's/^.*://'`"
16619
16620
16621   if test "x$APRUTIL_INCLUDES" = "x"; then
16622     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16623     APRUTIL_INCLUDES="-I$header"
16624   else
16625     apr_addto_bugger="-I$header"
16626     for i in $apr_addto_bugger; do
16627       apr_addto_duplicate="0"
16628       for j in $APRUTIL_INCLUDES; do
16629         if test "x$i" = "x$j"; then
16630           apr_addto_duplicate="1"
16631           break
16632         fi
16633       done
16634       if test $apr_addto_duplicate = "0"; then
16635         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16636         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16637       fi
16638     done
16639   fi
16640
16641
16642   if test "x$APRUTIL_LDFLAGS" = "x"; then
16643     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16644     APRUTIL_LDFLAGS="-L$lib"
16645   else
16646     apr_addto_bugger="-L$lib"
16647     for i in $apr_addto_bugger; do
16648       apr_addto_duplicate="0"
16649       for j in $APRUTIL_LDFLAGS; do
16650         if test "x$i" = "x$j"; then
16651           apr_addto_duplicate="1"
16652           break
16653         fi
16654       done
16655       if test $apr_addto_duplicate = "0"; then
16656         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16657         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16658       fi
16659     done
16660   fi
16661
16662     apu_db_header=$bdb_header
16663     apu_db_lib=$bdb_libname
16664     apu_have_db=1
16665     ;;
16666   *)
16667
16668   if test "x$APRUTIL_INCLUDES" = "x"; then
16669     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16670     APRUTIL_INCLUDES="-I$found/include"
16671   else
16672     apr_addto_bugger="-I$found/include"
16673     for i in $apr_addto_bugger; do
16674       apr_addto_duplicate="0"
16675       for j in $APRUTIL_INCLUDES; do
16676         if test "x$i" = "x$j"; then
16677           apr_addto_duplicate="1"
16678           break
16679         fi
16680       done
16681       if test $apr_addto_duplicate = "0"; then
16682         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16683         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16684       fi
16685     done
16686   fi
16687
16688
16689   if test "x$APRUTIL_LDFLAGS" = "x"; then
16690     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16691     APRUTIL_LDFLAGS="-L$found/lib"
16692   else
16693     apr_addto_bugger="-L$found/lib"
16694     for i in $apr_addto_bugger; do
16695       apr_addto_duplicate="0"
16696       for j in $APRUTIL_LDFLAGS; do
16697         if test "x$i" = "x$j"; then
16698           apr_addto_duplicate="1"
16699           break
16700         fi
16701       done
16702       if test $apr_addto_duplicate = "0"; then
16703         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16704         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16705       fi
16706     done
16707   fi
16708
16709     apu_db_header=$bdb_header
16710     apu_db_lib=$bdb_libname
16711     apu_have_db=1
16712     ;;
16713   esac
16714
16715   if test "$apu_have_db" = "1"; then
16716     apu_db_version=${db_major}
16717   fi
16718
16719       if test "$apu_have_db" = "1"; then
16720         break
16721       fi
16722       db_minor=`expr $db_minor - 1`
16723     done
16724     if test "$apu_db_version" != "$db_major"; then
16725       as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5
16726     fi
16727     ;;
16728   default)
16729
16730   all_places="$check_places"
16731
16732   # Start version search at version 6.9
16733   db_version=69
16734   while [ $db_version -ge 40 ]
16735   do
16736     db_major=`echo $db_version | sed -e 's/.$//'`
16737     db_minor=`echo $db_version | sed -e 's/.//'`
16738
16739   places="$all_places"
16740   db_major="$db_major"
16741   db_minor="$db_minor"
16742   if test -z "$places"; then
16743     places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
16744   fi
16745
16746   bdb_version="${db_major}"
16747   if test ""${db_minor}"" != "-1"; then
16748     bdb_version="$bdb_version."${db_minor}""
16749     if test ""-1"" != "-1"; then
16750       bdb_version="$bdb_version."-1""
16751     fi
16752   fi
16753   bdb_places="$places"
16754   bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
16755   bdb_default_search_lib_names="db-${db_major}.${db_minor} db${db_major}-${db_major}.${db_minor} db${db_major}${db_minor} db-${db_major} db${db_major} db"
16756
16757
16758   apu_have_db=0
16759
16760   # Save the original values of the flags we tweak.
16761   apu_check_lib_save_libs="$LIBS"
16762   apu_check_lib_save_ldflags="$LDFLAGS"
16763   apu_check_lib_save_cppflags="$CPPFLAGS"
16764
16765   # The variable `found' is the prefix under which we've found
16766   # Berkeley DB, or `not' if we haven't found it anywhere yet.
16767   found=not
16768   for bdb_place in $bdb_places; do
16769
16770     LDFLAGS="$apu_check_lib_save_ldflags"
16771     CPPFLAGS="$apu_check_lib_save_cppflags"
16772     case "$bdb_place" in
16773       "std" )
16774         description="the standard places"
16775       ;;
16776       *":"* )
16777         header="`echo $bdb_place | sed -e 's/:.*$//'`"
16778         lib="`echo $bdb_place | sed -e 's/^.*://'`"
16779         CPPFLAGS="$CPPFLAGS -I$header"
16780         LDFLAGS="$LDFLAGS -L$lib"
16781         description="$header and $lib"
16782       ;;
16783       * )
16784         if test -d $bdb_place; then
16785           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16786           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16787         else
16788           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16789 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16790           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16791 $as_echo "directory not found" >&6; }
16792           continue
16793         fi
16794         description="$bdb_place"
16795       ;;
16796     esac
16797
16798     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16799     # trick to display a message instead.
16800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16801 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16802     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16803 $as_echo "" >&6; }
16804
16805     for bdb_libname in $bdb_default_search_lib_names; do
16806       for bdb_header in $bdb_default_search_headers; do
16807         # Clear the header cache variable for each location
16808
16809         cache_id="`echo ac_cv_header_${bdb_header} \
16810                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16811
16812         unset $cache_id
16813         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16814 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16815 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16816
16817           if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5" -o ""${db_major}"" = "6"; then
16818             # We generate a separate cache variable for each prefix and libname
16819             # we search under.  That way, we avoid caching information that
16820             # changes if the user runs `configure' with a different set of
16821             # switches.
16822
16823             cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16824                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16825
16826
16827             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16828 $as_echo_n "checking for -l$bdb_libname... " >&6; }
16829                                     if eval \${$cache_id+:} false; then :
16830   $as_echo_n "(cached) " >&6
16831 else
16832
16833
16834     apu_try_berkeley_db_save_libs="$LIBS"
16835
16836     apu_check_berkeley_db_major="${db_major}"
16837     apu_check_berkeley_db_minor="${db_minor}"
16838     apu_check_berkeley_db_patch="-1"
16839     apu_try_berkeley_db_header=$bdb_header
16840     apu_try_berkeley_db_libname=$bdb_libname
16841
16842     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16843     if test "$cross_compiling" = yes; then :
16844   apu_try_berkeley_db=yes
16845
16846 else
16847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16848 /* end confdefs.h.  */
16849
16850 #include <stdlib.h>
16851 #include <stdio.h>
16852 #include <$apu_try_berkeley_db_header>
16853 main ()
16854 {
16855   int major, minor, patch;
16856
16857   db_version(&major, &minor, &patch);
16858
16859   /* Sanity check: ensure that db.h constants actually match the db library */
16860   if (major != DB_VERSION_MAJOR
16861       || minor != DB_VERSION_MINOR
16862       || patch != DB_VERSION_PATCH)
16863     exit (1);
16864
16865   /* Run-time check:  ensure the library claims to be the correct version. */
16866
16867   if ($apu_check_berkeley_db_major != -1) {
16868     if (major < $apu_check_berkeley_db_major)
16869       exit (1);
16870     if (major > $apu_check_berkeley_db_major)
16871       exit (0);
16872   }
16873
16874   if ($apu_check_berkeley_db_minor != -1) {
16875     if (minor < $apu_check_berkeley_db_minor)
16876       exit (1);
16877     if (minor > $apu_check_berkeley_db_minor)
16878       exit (0);
16879   }
16880
16881   if ($apu_check_berkeley_db_patch == -1
16882       || patch >= $apu_check_berkeley_db_patch)
16883     exit (0);
16884   else
16885     exit (1);
16886 }
16887
16888 _ACEOF
16889 if ac_fn_c_try_run "$LINENO"; then :
16890   apu_try_berkeley_db=yes
16891 else
16892   apu_try_berkeley_db=no
16893 fi
16894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16895   conftest.$ac_objext conftest.beam conftest.$ac_ext
16896 fi
16897
16898
16899     LIBS="$apu_try_berkeley_db_save_libs"
16900
16901
16902                 eval "$cache_id=$apu_try_berkeley_db"
16903
16904 fi
16905
16906             result="`eval echo '$'$cache_id`"
16907             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16908 $as_echo "$result" >&6; }
16909           elif test ""${db_major}"" = "1"; then
16910             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16912 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16913 if eval \${$as_ac_Lib+:} false; then :
16914   $as_echo_n "(cached) " >&6
16915 else
16916   ac_check_lib_save_LIBS=$LIBS
16917 LIBS="-l$bdb_libname  $LIBS"
16918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16919 /* end confdefs.h.  */
16920
16921 /* Override any GCC internal prototype to avoid an error.
16922    Use char because int might match the return type of a GCC
16923    builtin and then its argument prototype would still apply.  */
16924 #ifdef __cplusplus
16925 extern "C"
16926 #endif
16927 char dbopen ();
16928 int
16929 main ()
16930 {
16931 return dbopen ();
16932   ;
16933   return 0;
16934 }
16935 _ACEOF
16936 if ac_fn_c_try_link "$LINENO"; then :
16937   eval "$as_ac_Lib=yes"
16938 else
16939   eval "$as_ac_Lib=no"
16940 fi
16941 rm -f core conftest.err conftest.$ac_objext \
16942     conftest$ac_exeext conftest.$ac_ext
16943 LIBS=$ac_check_lib_save_LIBS
16944 fi
16945 eval ac_res=\$$as_ac_Lib
16946                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16947 $as_echo "$ac_res" >&6; }
16948 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16949   result=yes
16950 else
16951   result=no
16952
16953 fi
16954
16955           elif test ""${db_major}"" = "2"; then
16956             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16958 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16959 if eval \${$as_ac_Lib+:} false; then :
16960   $as_echo_n "(cached) " >&6
16961 else
16962   ac_check_lib_save_LIBS=$LIBS
16963 LIBS="-l$bdb_libname  $LIBS"
16964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16965 /* end confdefs.h.  */
16966
16967 /* Override any GCC internal prototype to avoid an error.
16968    Use char because int might match the return type of a GCC
16969    builtin and then its argument prototype would still apply.  */
16970 #ifdef __cplusplus
16971 extern "C"
16972 #endif
16973 char db_open ();
16974 int
16975 main ()
16976 {
16977 return db_open ();
16978   ;
16979   return 0;
16980 }
16981 _ACEOF
16982 if ac_fn_c_try_link "$LINENO"; then :
16983   eval "$as_ac_Lib=yes"
16984 else
16985   eval "$as_ac_Lib=no"
16986 fi
16987 rm -f core conftest.err conftest.$ac_objext \
16988     conftest$ac_exeext conftest.$ac_ext
16989 LIBS=$ac_check_lib_save_LIBS
16990 fi
16991 eval ac_res=\$$as_ac_Lib
16992                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16993 $as_echo "$ac_res" >&6; }
16994 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16995   result=yes
16996 else
16997   result=no
16998
16999 fi
17000
17001           fi
17002
17003 else
17004   result="no"
17005 fi
17006
17007
17008
17009         # If we found it, no need to search any more.
17010         if test "$result" = "yes"; then
17011           found="$bdb_place"
17012           break
17013         fi
17014       done
17015       test "$found" != "not" && break
17016     done
17017     test "$found" != "not" && break
17018   done
17019
17020   # Restore the original values of the flags we tweak.
17021   LDFLAGS="$apu_check_lib_save_ldflags"
17022   CPPFLAGS="$apu_check_lib_save_cppflags"
17023
17024   case "$found" in
17025   "not")
17026     apu_have_db=0
17027     ;;
17028   "std")
17029     apu_db_header=$bdb_header
17030     apu_db_lib=$bdb_libname
17031     apu_have_db=1
17032     ;;
17033   *":"*)
17034     header="`echo $found | sed -e 's/:.*$//'`"
17035     lib="`echo $found | sed -e 's/^.*://'`"
17036
17037
17038   if test "x$APRUTIL_INCLUDES" = "x"; then
17039     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17040     APRUTIL_INCLUDES="-I$header"
17041   else
17042     apr_addto_bugger="-I$header"
17043     for i in $apr_addto_bugger; do
17044       apr_addto_duplicate="0"
17045       for j in $APRUTIL_INCLUDES; do
17046         if test "x$i" = "x$j"; then
17047           apr_addto_duplicate="1"
17048           break
17049         fi
17050       done
17051       if test $apr_addto_duplicate = "0"; then
17052         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17053         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17054       fi
17055     done
17056   fi
17057
17058
17059   if test "x$APRUTIL_LDFLAGS" = "x"; then
17060     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17061     APRUTIL_LDFLAGS="-L$lib"
17062   else
17063     apr_addto_bugger="-L$lib"
17064     for i in $apr_addto_bugger; do
17065       apr_addto_duplicate="0"
17066       for j in $APRUTIL_LDFLAGS; do
17067         if test "x$i" = "x$j"; then
17068           apr_addto_duplicate="1"
17069           break
17070         fi
17071       done
17072       if test $apr_addto_duplicate = "0"; then
17073         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17074         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17075       fi
17076     done
17077   fi
17078
17079     apu_db_header=$bdb_header
17080     apu_db_lib=$bdb_libname
17081     apu_have_db=1
17082     ;;
17083   *)
17084
17085   if test "x$APRUTIL_INCLUDES" = "x"; then
17086     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17087     APRUTIL_INCLUDES="-I$found/include"
17088   else
17089     apr_addto_bugger="-I$found/include"
17090     for i in $apr_addto_bugger; do
17091       apr_addto_duplicate="0"
17092       for j in $APRUTIL_INCLUDES; do
17093         if test "x$i" = "x$j"; then
17094           apr_addto_duplicate="1"
17095           break
17096         fi
17097       done
17098       if test $apr_addto_duplicate = "0"; then
17099         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17100         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17101       fi
17102     done
17103   fi
17104
17105
17106   if test "x$APRUTIL_LDFLAGS" = "x"; then
17107     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17108     APRUTIL_LDFLAGS="-L$found/lib"
17109   else
17110     apr_addto_bugger="-L$found/lib"
17111     for i in $apr_addto_bugger; do
17112       apr_addto_duplicate="0"
17113       for j in $APRUTIL_LDFLAGS; do
17114         if test "x$i" = "x$j"; then
17115           apr_addto_duplicate="1"
17116           break
17117         fi
17118       done
17119       if test $apr_addto_duplicate = "0"; then
17120         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17121         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17122       fi
17123     done
17124   fi
17125
17126     apu_db_header=$bdb_header
17127     apu_db_lib=$bdb_libname
17128     apu_have_db=1
17129     ;;
17130   esac
17131
17132   if test "$apu_have_db" = "1"; then
17133     apu_db_version=${db_major}
17134   fi
17135
17136     if test "$apu_have_db" = "1"; then
17137       break
17138     fi
17139     db_version=`expr $db_version - 1`
17140   done
17141   if test "$apu_have_db" = "0"; then
17142
17143   places="$all_places"
17144   if test -z "$places"; then
17145     places="std"
17146   fi
17147
17148   bdb_version=3
17149   if test "-1" != "-1"; then
17150     bdb_version="$bdb_version.-1"
17151     if test "-1" != "-1"; then
17152       bdb_version="$bdb_version.-1"
17153     fi
17154   fi
17155   bdb_places="$places"
17156   bdb_default_search_headers="db3/db.h db.h"
17157   bdb_default_search_lib_names="db3 db"
17158
17159
17160   apu_have_db=0
17161
17162   # Save the original values of the flags we tweak.
17163   apu_check_lib_save_libs="$LIBS"
17164   apu_check_lib_save_ldflags="$LDFLAGS"
17165   apu_check_lib_save_cppflags="$CPPFLAGS"
17166
17167   # The variable `found' is the prefix under which we've found
17168   # Berkeley DB, or `not' if we haven't found it anywhere yet.
17169   found=not
17170   for bdb_place in $bdb_places; do
17171
17172     LDFLAGS="$apu_check_lib_save_ldflags"
17173     CPPFLAGS="$apu_check_lib_save_cppflags"
17174     case "$bdb_place" in
17175       "std" )
17176         description="the standard places"
17177       ;;
17178       *":"* )
17179         header="`echo $bdb_place | sed -e 's/:.*$//'`"
17180         lib="`echo $bdb_place | sed -e 's/^.*://'`"
17181         CPPFLAGS="$CPPFLAGS -I$header"
17182         LDFLAGS="$LDFLAGS -L$lib"
17183         description="$header and $lib"
17184       ;;
17185       * )
17186         if test -d $bdb_place; then
17187           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17188           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17189         else
17190           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17191 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17192           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17193 $as_echo "directory not found" >&6; }
17194           continue
17195         fi
17196         description="$bdb_place"
17197       ;;
17198     esac
17199
17200     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17201     # trick to display a message instead.
17202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17203 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17205 $as_echo "" >&6; }
17206
17207     for bdb_libname in $bdb_default_search_lib_names; do
17208       for bdb_header in $bdb_default_search_headers; do
17209         # Clear the header cache variable for each location
17210
17211         cache_id="`echo ac_cv_header_${bdb_header} \
17212                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17213
17214         unset $cache_id
17215         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17216 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17217 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17218
17219           if test "3" = "3" -o "3" = "4" -o "3" = "5" -o "3" = "6"; then
17220             # We generate a separate cache variable for each prefix and libname
17221             # we search under.  That way, we avoid caching information that
17222             # changes if the user runs `configure' with a different set of
17223             # switches.
17224
17225             cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17226                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17227
17228
17229             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17230 $as_echo_n "checking for -l$bdb_libname... " >&6; }
17231                                     if eval \${$cache_id+:} false; then :
17232   $as_echo_n "(cached) " >&6
17233 else
17234
17235
17236     apu_try_berkeley_db_save_libs="$LIBS"
17237
17238     apu_check_berkeley_db_major=3
17239     apu_check_berkeley_db_minor=-1
17240     apu_check_berkeley_db_patch=-1
17241     apu_try_berkeley_db_header=$bdb_header
17242     apu_try_berkeley_db_libname=$bdb_libname
17243
17244     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17245     if test "$cross_compiling" = yes; then :
17246   apu_try_berkeley_db=yes
17247
17248 else
17249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17250 /* end confdefs.h.  */
17251
17252 #include <stdlib.h>
17253 #include <stdio.h>
17254 #include <$apu_try_berkeley_db_header>
17255 main ()
17256 {
17257   int major, minor, patch;
17258
17259   db_version(&major, &minor, &patch);
17260
17261   /* Sanity check: ensure that db.h constants actually match the db library */
17262   if (major != DB_VERSION_MAJOR
17263       || minor != DB_VERSION_MINOR
17264       || patch != DB_VERSION_PATCH)
17265     exit (1);
17266
17267   /* Run-time check:  ensure the library claims to be the correct version. */
17268
17269   if ($apu_check_berkeley_db_major != -1) {
17270     if (major < $apu_check_berkeley_db_major)
17271       exit (1);
17272     if (major > $apu_check_berkeley_db_major)
17273       exit (0);
17274   }
17275
17276   if ($apu_check_berkeley_db_minor != -1) {
17277     if (minor < $apu_check_berkeley_db_minor)
17278       exit (1);
17279     if (minor > $apu_check_berkeley_db_minor)
17280       exit (0);
17281   }
17282
17283   if ($apu_check_berkeley_db_patch == -1
17284       || patch >= $apu_check_berkeley_db_patch)
17285     exit (0);
17286   else
17287     exit (1);
17288 }
17289
17290 _ACEOF
17291 if ac_fn_c_try_run "$LINENO"; then :
17292   apu_try_berkeley_db=yes
17293 else
17294   apu_try_berkeley_db=no
17295 fi
17296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17297   conftest.$ac_objext conftest.beam conftest.$ac_ext
17298 fi
17299
17300
17301     LIBS="$apu_try_berkeley_db_save_libs"
17302
17303
17304                 eval "$cache_id=$apu_try_berkeley_db"
17305
17306 fi
17307
17308             result="`eval echo '$'$cache_id`"
17309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17310 $as_echo "$result" >&6; }
17311           elif test "3" = "1"; then
17312             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17314 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17315 if eval \${$as_ac_Lib+:} false; then :
17316   $as_echo_n "(cached) " >&6
17317 else
17318   ac_check_lib_save_LIBS=$LIBS
17319 LIBS="-l$bdb_libname  $LIBS"
17320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17321 /* end confdefs.h.  */
17322
17323 /* Override any GCC internal prototype to avoid an error.
17324    Use char because int might match the return type of a GCC
17325    builtin and then its argument prototype would still apply.  */
17326 #ifdef __cplusplus
17327 extern "C"
17328 #endif
17329 char dbopen ();
17330 int
17331 main ()
17332 {
17333 return dbopen ();
17334   ;
17335   return 0;
17336 }
17337 _ACEOF
17338 if ac_fn_c_try_link "$LINENO"; then :
17339   eval "$as_ac_Lib=yes"
17340 else
17341   eval "$as_ac_Lib=no"
17342 fi
17343 rm -f core conftest.err conftest.$ac_objext \
17344     conftest$ac_exeext conftest.$ac_ext
17345 LIBS=$ac_check_lib_save_LIBS
17346 fi
17347 eval ac_res=\$$as_ac_Lib
17348                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17349 $as_echo "$ac_res" >&6; }
17350 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17351   result=yes
17352 else
17353   result=no
17354
17355 fi
17356
17357           elif test "3" = "2"; then
17358             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17360 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17361 if eval \${$as_ac_Lib+:} false; then :
17362   $as_echo_n "(cached) " >&6
17363 else
17364   ac_check_lib_save_LIBS=$LIBS
17365 LIBS="-l$bdb_libname  $LIBS"
17366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17367 /* end confdefs.h.  */
17368
17369 /* Override any GCC internal prototype to avoid an error.
17370    Use char because int might match the return type of a GCC
17371    builtin and then its argument prototype would still apply.  */
17372 #ifdef __cplusplus
17373 extern "C"
17374 #endif
17375 char db_open ();
17376 int
17377 main ()
17378 {
17379 return db_open ();
17380   ;
17381   return 0;
17382 }
17383 _ACEOF
17384 if ac_fn_c_try_link "$LINENO"; then :
17385   eval "$as_ac_Lib=yes"
17386 else
17387   eval "$as_ac_Lib=no"
17388 fi
17389 rm -f core conftest.err conftest.$ac_objext \
17390     conftest$ac_exeext conftest.$ac_ext
17391 LIBS=$ac_check_lib_save_LIBS
17392 fi
17393 eval ac_res=\$$as_ac_Lib
17394                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17395 $as_echo "$ac_res" >&6; }
17396 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17397   result=yes
17398 else
17399   result=no
17400
17401 fi
17402
17403           fi
17404
17405 else
17406   result="no"
17407 fi
17408
17409
17410
17411         # If we found it, no need to search any more.
17412         if test "$result" = "yes"; then
17413           found="$bdb_place"
17414           break
17415         fi
17416       done
17417       test "$found" != "not" && break
17418     done
17419     test "$found" != "not" && break
17420   done
17421
17422   # Restore the original values of the flags we tweak.
17423   LDFLAGS="$apu_check_lib_save_ldflags"
17424   CPPFLAGS="$apu_check_lib_save_cppflags"
17425
17426   case "$found" in
17427   "not")
17428     apu_have_db=0
17429     ;;
17430   "std")
17431     apu_db_header=$bdb_header
17432     apu_db_lib=$bdb_libname
17433     apu_have_db=1
17434     ;;
17435   *":"*)
17436     header="`echo $found | sed -e 's/:.*$//'`"
17437     lib="`echo $found | sed -e 's/^.*://'`"
17438
17439
17440   if test "x$APRUTIL_INCLUDES" = "x"; then
17441     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17442     APRUTIL_INCLUDES="-I$header"
17443   else
17444     apr_addto_bugger="-I$header"
17445     for i in $apr_addto_bugger; do
17446       apr_addto_duplicate="0"
17447       for j in $APRUTIL_INCLUDES; do
17448         if test "x$i" = "x$j"; then
17449           apr_addto_duplicate="1"
17450           break
17451         fi
17452       done
17453       if test $apr_addto_duplicate = "0"; then
17454         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17455         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17456       fi
17457     done
17458   fi
17459
17460
17461   if test "x$APRUTIL_LDFLAGS" = "x"; then
17462     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17463     APRUTIL_LDFLAGS="-L$lib"
17464   else
17465     apr_addto_bugger="-L$lib"
17466     for i in $apr_addto_bugger; do
17467       apr_addto_duplicate="0"
17468       for j in $APRUTIL_LDFLAGS; do
17469         if test "x$i" = "x$j"; then
17470           apr_addto_duplicate="1"
17471           break
17472         fi
17473       done
17474       if test $apr_addto_duplicate = "0"; then
17475         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17476         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17477       fi
17478     done
17479   fi
17480
17481     apu_db_header=$bdb_header
17482     apu_db_lib=$bdb_libname
17483     apu_have_db=1
17484     ;;
17485   *)
17486
17487   if test "x$APRUTIL_INCLUDES" = "x"; then
17488     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17489     APRUTIL_INCLUDES="-I$found/include"
17490   else
17491     apr_addto_bugger="-I$found/include"
17492     for i in $apr_addto_bugger; do
17493       apr_addto_duplicate="0"
17494       for j in $APRUTIL_INCLUDES; do
17495         if test "x$i" = "x$j"; then
17496           apr_addto_duplicate="1"
17497           break
17498         fi
17499       done
17500       if test $apr_addto_duplicate = "0"; then
17501         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17502         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17503       fi
17504     done
17505   fi
17506
17507
17508   if test "x$APRUTIL_LDFLAGS" = "x"; then
17509     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17510     APRUTIL_LDFLAGS="-L$found/lib"
17511   else
17512     apr_addto_bugger="-L$found/lib"
17513     for i in $apr_addto_bugger; do
17514       apr_addto_duplicate="0"
17515       for j in $APRUTIL_LDFLAGS; do
17516         if test "x$i" = "x$j"; then
17517           apr_addto_duplicate="1"
17518           break
17519         fi
17520       done
17521       if test $apr_addto_duplicate = "0"; then
17522         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17523         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17524       fi
17525     done
17526   fi
17527
17528     apu_db_header=$bdb_header
17529     apu_db_lib=$bdb_libname
17530     apu_have_db=1
17531     ;;
17532   esac
17533
17534   if test "$apu_have_db" = "1"; then
17535     apu_db_version=3
17536   fi
17537
17538   fi
17539   if test "$apu_have_db" = "0"; then
17540
17541   places="$all_places"
17542   if test -z "$places"; then
17543     places="std"
17544   fi
17545
17546   bdb_version=2
17547   if test "-1" != "-1"; then
17548     bdb_version="$bdb_version.-1"
17549     if test "-1" != "-1"; then
17550       bdb_version="$bdb_version.-1"
17551     fi
17552   fi
17553   bdb_places="$places"
17554   bdb_default_search_headers="db2/db.h db.h"
17555   bdb_default_search_lib_names="db2 db"
17556
17557
17558   apu_have_db=0
17559
17560   # Save the original values of the flags we tweak.
17561   apu_check_lib_save_libs="$LIBS"
17562   apu_check_lib_save_ldflags="$LDFLAGS"
17563   apu_check_lib_save_cppflags="$CPPFLAGS"
17564
17565   # The variable `found' is the prefix under which we've found
17566   # Berkeley DB, or `not' if we haven't found it anywhere yet.
17567   found=not
17568   for bdb_place in $bdb_places; do
17569
17570     LDFLAGS="$apu_check_lib_save_ldflags"
17571     CPPFLAGS="$apu_check_lib_save_cppflags"
17572     case "$bdb_place" in
17573       "std" )
17574         description="the standard places"
17575       ;;
17576       *":"* )
17577         header="`echo $bdb_place | sed -e 's/:.*$//'`"
17578         lib="`echo $bdb_place | sed -e 's/^.*://'`"
17579         CPPFLAGS="$CPPFLAGS -I$header"
17580         LDFLAGS="$LDFLAGS -L$lib"
17581         description="$header and $lib"
17582       ;;
17583       * )
17584         if test -d $bdb_place; then
17585           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17586           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17587         else
17588           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17589 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17590           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17591 $as_echo "directory not found" >&6; }
17592           continue
17593         fi
17594         description="$bdb_place"
17595       ;;
17596     esac
17597
17598     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17599     # trick to display a message instead.
17600     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17601 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17603 $as_echo "" >&6; }
17604
17605     for bdb_libname in $bdb_default_search_lib_names; do
17606       for bdb_header in $bdb_default_search_headers; do
17607         # Clear the header cache variable for each location
17608
17609         cache_id="`echo ac_cv_header_${bdb_header} \
17610                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17611
17612         unset $cache_id
17613         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17614 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17615 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17616
17617           if test "2" = "3" -o "2" = "4" -o "2" = "5" -o "2" = "6"; then
17618             # We generate a separate cache variable for each prefix and libname
17619             # we search under.  That way, we avoid caching information that
17620             # changes if the user runs `configure' with a different set of
17621             # switches.
17622
17623             cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17624                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17625
17626
17627             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17628 $as_echo_n "checking for -l$bdb_libname... " >&6; }
17629                                     if eval \${$cache_id+:} false; then :
17630   $as_echo_n "(cached) " >&6
17631 else
17632
17633
17634     apu_try_berkeley_db_save_libs="$LIBS"
17635
17636     apu_check_berkeley_db_major=2
17637     apu_check_berkeley_db_minor=-1
17638     apu_check_berkeley_db_patch=-1
17639     apu_try_berkeley_db_header=$bdb_header
17640     apu_try_berkeley_db_libname=$bdb_libname
17641
17642     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17643     if test "$cross_compiling" = yes; then :
17644   apu_try_berkeley_db=yes
17645
17646 else
17647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17648 /* end confdefs.h.  */
17649
17650 #include <stdlib.h>
17651 #include <stdio.h>
17652 #include <$apu_try_berkeley_db_header>
17653 main ()
17654 {
17655   int major, minor, patch;
17656
17657   db_version(&major, &minor, &patch);
17658
17659   /* Sanity check: ensure that db.h constants actually match the db library */
17660   if (major != DB_VERSION_MAJOR
17661       || minor != DB_VERSION_MINOR
17662       || patch != DB_VERSION_PATCH)
17663     exit (1);
17664
17665   /* Run-time check:  ensure the library claims to be the correct version. */
17666
17667   if ($apu_check_berkeley_db_major != -1) {
17668     if (major < $apu_check_berkeley_db_major)
17669       exit (1);
17670     if (major > $apu_check_berkeley_db_major)
17671       exit (0);
17672   }
17673
17674   if ($apu_check_berkeley_db_minor != -1) {
17675     if (minor < $apu_check_berkeley_db_minor)
17676       exit (1);
17677     if (minor > $apu_check_berkeley_db_minor)
17678       exit (0);
17679   }
17680
17681   if ($apu_check_berkeley_db_patch == -1
17682       || patch >= $apu_check_berkeley_db_patch)
17683     exit (0);
17684   else
17685     exit (1);
17686 }
17687
17688 _ACEOF
17689 if ac_fn_c_try_run "$LINENO"; then :
17690   apu_try_berkeley_db=yes
17691 else
17692   apu_try_berkeley_db=no
17693 fi
17694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17695   conftest.$ac_objext conftest.beam conftest.$ac_ext
17696 fi
17697
17698
17699     LIBS="$apu_try_berkeley_db_save_libs"
17700
17701
17702                 eval "$cache_id=$apu_try_berkeley_db"
17703
17704 fi
17705
17706             result="`eval echo '$'$cache_id`"
17707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17708 $as_echo "$result" >&6; }
17709           elif test "2" = "1"; then
17710             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17712 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17713 if eval \${$as_ac_Lib+:} false; then :
17714   $as_echo_n "(cached) " >&6
17715 else
17716   ac_check_lib_save_LIBS=$LIBS
17717 LIBS="-l$bdb_libname  $LIBS"
17718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17719 /* end confdefs.h.  */
17720
17721 /* Override any GCC internal prototype to avoid an error.
17722    Use char because int might match the return type of a GCC
17723    builtin and then its argument prototype would still apply.  */
17724 #ifdef __cplusplus
17725 extern "C"
17726 #endif
17727 char dbopen ();
17728 int
17729 main ()
17730 {
17731 return dbopen ();
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 if ac_fn_c_try_link "$LINENO"; then :
17737   eval "$as_ac_Lib=yes"
17738 else
17739   eval "$as_ac_Lib=no"
17740 fi
17741 rm -f core conftest.err conftest.$ac_objext \
17742     conftest$ac_exeext conftest.$ac_ext
17743 LIBS=$ac_check_lib_save_LIBS
17744 fi
17745 eval ac_res=\$$as_ac_Lib
17746                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17747 $as_echo "$ac_res" >&6; }
17748 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17749   result=yes
17750 else
17751   result=no
17752
17753 fi
17754
17755           elif test "2" = "2"; then
17756             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17758 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17759 if eval \${$as_ac_Lib+:} false; then :
17760   $as_echo_n "(cached) " >&6
17761 else
17762   ac_check_lib_save_LIBS=$LIBS
17763 LIBS="-l$bdb_libname  $LIBS"
17764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17765 /* end confdefs.h.  */
17766
17767 /* Override any GCC internal prototype to avoid an error.
17768    Use char because int might match the return type of a GCC
17769    builtin and then its argument prototype would still apply.  */
17770 #ifdef __cplusplus
17771 extern "C"
17772 #endif
17773 char db_open ();
17774 int
17775 main ()
17776 {
17777 return db_open ();
17778   ;
17779   return 0;
17780 }
17781 _ACEOF
17782 if ac_fn_c_try_link "$LINENO"; then :
17783   eval "$as_ac_Lib=yes"
17784 else
17785   eval "$as_ac_Lib=no"
17786 fi
17787 rm -f core conftest.err conftest.$ac_objext \
17788     conftest$ac_exeext conftest.$ac_ext
17789 LIBS=$ac_check_lib_save_LIBS
17790 fi
17791 eval ac_res=\$$as_ac_Lib
17792                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17793 $as_echo "$ac_res" >&6; }
17794 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17795   result=yes
17796 else
17797   result=no
17798
17799 fi
17800
17801           fi
17802
17803 else
17804   result="no"
17805 fi
17806
17807
17808
17809         # If we found it, no need to search any more.
17810         if test "$result" = "yes"; then
17811           found="$bdb_place"
17812           break
17813         fi
17814       done
17815       test "$found" != "not" && break
17816     done
17817     test "$found" != "not" && break
17818   done
17819
17820   # Restore the original values of the flags we tweak.
17821   LDFLAGS="$apu_check_lib_save_ldflags"
17822   CPPFLAGS="$apu_check_lib_save_cppflags"
17823
17824   case "$found" in
17825   "not")
17826     apu_have_db=0
17827     ;;
17828   "std")
17829     apu_db_header=$bdb_header
17830     apu_db_lib=$bdb_libname
17831     apu_have_db=1
17832     ;;
17833   *":"*)
17834     header="`echo $found | sed -e 's/:.*$//'`"
17835     lib="`echo $found | sed -e 's/^.*://'`"
17836
17837
17838   if test "x$APRUTIL_INCLUDES" = "x"; then
17839     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17840     APRUTIL_INCLUDES="-I$header"
17841   else
17842     apr_addto_bugger="-I$header"
17843     for i in $apr_addto_bugger; do
17844       apr_addto_duplicate="0"
17845       for j in $APRUTIL_INCLUDES; do
17846         if test "x$i" = "x$j"; then
17847           apr_addto_duplicate="1"
17848           break
17849         fi
17850       done
17851       if test $apr_addto_duplicate = "0"; then
17852         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17853         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17854       fi
17855     done
17856   fi
17857
17858
17859   if test "x$APRUTIL_LDFLAGS" = "x"; then
17860     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17861     APRUTIL_LDFLAGS="-L$lib"
17862   else
17863     apr_addto_bugger="-L$lib"
17864     for i in $apr_addto_bugger; do
17865       apr_addto_duplicate="0"
17866       for j in $APRUTIL_LDFLAGS; do
17867         if test "x$i" = "x$j"; then
17868           apr_addto_duplicate="1"
17869           break
17870         fi
17871       done
17872       if test $apr_addto_duplicate = "0"; then
17873         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17874         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17875       fi
17876     done
17877   fi
17878
17879     apu_db_header=$bdb_header
17880     apu_db_lib=$bdb_libname
17881     apu_have_db=1
17882     ;;
17883   *)
17884
17885   if test "x$APRUTIL_INCLUDES" = "x"; then
17886     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17887     APRUTIL_INCLUDES="-I$found/include"
17888   else
17889     apr_addto_bugger="-I$found/include"
17890     for i in $apr_addto_bugger; do
17891       apr_addto_duplicate="0"
17892       for j in $APRUTIL_INCLUDES; do
17893         if test "x$i" = "x$j"; then
17894           apr_addto_duplicate="1"
17895           break
17896         fi
17897       done
17898       if test $apr_addto_duplicate = "0"; then
17899         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17900         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17901       fi
17902     done
17903   fi
17904
17905
17906   if test "x$APRUTIL_LDFLAGS" = "x"; then
17907     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17908     APRUTIL_LDFLAGS="-L$found/lib"
17909   else
17910     apr_addto_bugger="-L$found/lib"
17911     for i in $apr_addto_bugger; do
17912       apr_addto_duplicate="0"
17913       for j in $APRUTIL_LDFLAGS; do
17914         if test "x$i" = "x$j"; then
17915           apr_addto_duplicate="1"
17916           break
17917         fi
17918       done
17919       if test $apr_addto_duplicate = "0"; then
17920         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17921         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17922       fi
17923     done
17924   fi
17925
17926     apu_db_header=$bdb_header
17927     apu_db_lib=$bdb_libname
17928     apu_have_db=1
17929     ;;
17930   esac
17931
17932   if test "$apu_have_db" = "1"; then
17933     apu_db_version=2
17934   fi
17935
17936   fi
17937   if test "$apu_have_db" = "0"; then
17938
17939   places="$all_places"
17940   if test -z "$places"; then
17941     places="std"
17942   fi
17943
17944   bdb_version=1
17945   if test "0" != "-1"; then
17946     bdb_version="$bdb_version.0"
17947     if test "0" != "-1"; then
17948       bdb_version="$bdb_version.0"
17949     fi
17950   fi
17951   bdb_places="$places"
17952   bdb_default_search_headers="db1/db.h db.h"
17953   bdb_default_search_lib_names="db1"
17954
17955
17956   apu_have_db=0
17957
17958   # Save the original values of the flags we tweak.
17959   apu_check_lib_save_libs="$LIBS"
17960   apu_check_lib_save_ldflags="$LDFLAGS"
17961   apu_check_lib_save_cppflags="$CPPFLAGS"
17962
17963   # The variable `found' is the prefix under which we've found
17964   # Berkeley DB, or `not' if we haven't found it anywhere yet.
17965   found=not
17966   for bdb_place in $bdb_places; do
17967
17968     LDFLAGS="$apu_check_lib_save_ldflags"
17969     CPPFLAGS="$apu_check_lib_save_cppflags"
17970     case "$bdb_place" in
17971       "std" )
17972         description="the standard places"
17973       ;;
17974       *":"* )
17975         header="`echo $bdb_place | sed -e 's/:.*$//'`"
17976         lib="`echo $bdb_place | sed -e 's/^.*://'`"
17977         CPPFLAGS="$CPPFLAGS -I$header"
17978         LDFLAGS="$LDFLAGS -L$lib"
17979         description="$header and $lib"
17980       ;;
17981       * )
17982         if test -d $bdb_place; then
17983           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17984           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17985         else
17986           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17987 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17989 $as_echo "directory not found" >&6; }
17990           continue
17991         fi
17992         description="$bdb_place"
17993       ;;
17994     esac
17995
17996     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17997     # trick to display a message instead.
17998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17999 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
18000     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
18001 $as_echo "" >&6; }
18002
18003     for bdb_libname in $bdb_default_search_lib_names; do
18004       for bdb_header in $bdb_default_search_headers; do
18005         # Clear the header cache variable for each location
18006
18007         cache_id="`echo ac_cv_header_${bdb_header} \
18008                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18009
18010         unset $cache_id
18011         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
18012 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
18013 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18014
18015           if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
18016             # We generate a separate cache variable for each prefix and libname
18017             # we search under.  That way, we avoid caching information that
18018             # changes if the user runs `configure' with a different set of
18019             # switches.
18020
18021             cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
18022                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18023
18024
18025             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
18026 $as_echo_n "checking for -l$bdb_libname... " >&6; }
18027                                     if eval \${$cache_id+:} false; then :
18028   $as_echo_n "(cached) " >&6
18029 else
18030
18031
18032     apu_try_berkeley_db_save_libs="$LIBS"
18033
18034     apu_check_berkeley_db_major=1
18035     apu_check_berkeley_db_minor=0
18036     apu_check_berkeley_db_patch=0
18037     apu_try_berkeley_db_header=$bdb_header
18038     apu_try_berkeley_db_libname=$bdb_libname
18039
18040     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
18041     if test "$cross_compiling" = yes; then :
18042   apu_try_berkeley_db=yes
18043
18044 else
18045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18046 /* end confdefs.h.  */
18047
18048 #include <stdlib.h>
18049 #include <stdio.h>
18050 #include <$apu_try_berkeley_db_header>
18051 main ()
18052 {
18053   int major, minor, patch;
18054
18055   db_version(&major, &minor, &patch);
18056
18057   /* Sanity check: ensure that db.h constants actually match the db library */
18058   if (major != DB_VERSION_MAJOR
18059       || minor != DB_VERSION_MINOR
18060       || patch != DB_VERSION_PATCH)
18061     exit (1);
18062
18063   /* Run-time check:  ensure the library claims to be the correct version. */
18064
18065   if ($apu_check_berkeley_db_major != -1) {
18066     if (major < $apu_check_berkeley_db_major)
18067       exit (1);
18068     if (major > $apu_check_berkeley_db_major)
18069       exit (0);
18070   }
18071
18072   if ($apu_check_berkeley_db_minor != -1) {
18073     if (minor < $apu_check_berkeley_db_minor)
18074       exit (1);
18075     if (minor > $apu_check_berkeley_db_minor)
18076       exit (0);
18077   }
18078
18079   if ($apu_check_berkeley_db_patch == -1
18080       || patch >= $apu_check_berkeley_db_patch)
18081     exit (0);
18082   else
18083     exit (1);
18084 }
18085
18086 _ACEOF
18087 if ac_fn_c_try_run "$LINENO"; then :
18088   apu_try_berkeley_db=yes
18089 else
18090   apu_try_berkeley_db=no
18091 fi
18092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18093   conftest.$ac_objext conftest.beam conftest.$ac_ext
18094 fi
18095
18096
18097     LIBS="$apu_try_berkeley_db_save_libs"
18098
18099
18100                 eval "$cache_id=$apu_try_berkeley_db"
18101
18102 fi
18103
18104             result="`eval echo '$'$cache_id`"
18105             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
18106 $as_echo "$result" >&6; }
18107           elif test "1" = "1"; then
18108             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
18109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
18110 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
18111 if eval \${$as_ac_Lib+:} false; then :
18112   $as_echo_n "(cached) " >&6
18113 else
18114   ac_check_lib_save_LIBS=$LIBS
18115 LIBS="-l$bdb_libname  $LIBS"
18116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18117 /* end confdefs.h.  */
18118
18119 /* Override any GCC internal prototype to avoid an error.
18120    Use char because int might match the return type of a GCC
18121    builtin and then its argument prototype would still apply.  */
18122 #ifdef __cplusplus
18123 extern "C"
18124 #endif
18125 char dbopen ();
18126 int
18127 main ()
18128 {
18129 return dbopen ();
18130   ;
18131   return 0;
18132 }
18133 _ACEOF
18134 if ac_fn_c_try_link "$LINENO"; then :
18135   eval "$as_ac_Lib=yes"
18136 else
18137   eval "$as_ac_Lib=no"
18138 fi
18139 rm -f core conftest.err conftest.$ac_objext \
18140     conftest$ac_exeext conftest.$ac_ext
18141 LIBS=$ac_check_lib_save_LIBS
18142 fi
18143 eval ac_res=\$$as_ac_Lib
18144                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18145 $as_echo "$ac_res" >&6; }
18146 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18147   result=yes
18148 else
18149   result=no
18150
18151 fi
18152
18153           elif test "1" = "2"; then
18154             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
18155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
18156 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
18157 if eval \${$as_ac_Lib+:} false; then :
18158   $as_echo_n "(cached) " >&6
18159 else
18160   ac_check_lib_save_LIBS=$LIBS
18161 LIBS="-l$bdb_libname  $LIBS"
18162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18163 /* end confdefs.h.  */
18164
18165 /* Override any GCC internal prototype to avoid an error.
18166    Use char because int might match the return type of a GCC
18167    builtin and then its argument prototype would still apply.  */
18168 #ifdef __cplusplus
18169 extern "C"
18170 #endif
18171 char db_open ();
18172 int
18173 main ()
18174 {
18175 return db_open ();
18176   ;
18177   return 0;
18178 }
18179 _ACEOF
18180 if ac_fn_c_try_link "$LINENO"; then :
18181   eval "$as_ac_Lib=yes"
18182 else
18183   eval "$as_ac_Lib=no"
18184 fi
18185 rm -f core conftest.err conftest.$ac_objext \
18186     conftest$ac_exeext conftest.$ac_ext
18187 LIBS=$ac_check_lib_save_LIBS
18188 fi
18189 eval ac_res=\$$as_ac_Lib
18190                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18191 $as_echo "$ac_res" >&6; }
18192 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18193   result=yes
18194 else
18195   result=no
18196
18197 fi
18198
18199           fi
18200
18201 else
18202   result="no"
18203 fi
18204
18205
18206
18207         # If we found it, no need to search any more.
18208         if test "$result" = "yes"; then
18209           found="$bdb_place"
18210           break
18211         fi
18212       done
18213       test "$found" != "not" && break
18214     done
18215     test "$found" != "not" && break
18216   done
18217
18218   # Restore the original values of the flags we tweak.
18219   LDFLAGS="$apu_check_lib_save_ldflags"
18220   CPPFLAGS="$apu_check_lib_save_cppflags"
18221
18222   case "$found" in
18223   "not")
18224     apu_have_db=0
18225     ;;
18226   "std")
18227     apu_db_header=$bdb_header
18228     apu_db_lib=$bdb_libname
18229     apu_have_db=1
18230     ;;
18231   *":"*)
18232     header="`echo $found | sed -e 's/:.*$//'`"
18233     lib="`echo $found | sed -e 's/^.*://'`"
18234
18235
18236   if test "x$APRUTIL_INCLUDES" = "x"; then
18237     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
18238     APRUTIL_INCLUDES="-I$header"
18239   else
18240     apr_addto_bugger="-I$header"
18241     for i in $apr_addto_bugger; do
18242       apr_addto_duplicate="0"
18243       for j in $APRUTIL_INCLUDES; do
18244         if test "x$i" = "x$j"; then
18245           apr_addto_duplicate="1"
18246           break
18247         fi
18248       done
18249       if test $apr_addto_duplicate = "0"; then
18250         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18251         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18252       fi
18253     done
18254   fi
18255
18256
18257   if test "x$APRUTIL_LDFLAGS" = "x"; then
18258     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
18259     APRUTIL_LDFLAGS="-L$lib"
18260   else
18261     apr_addto_bugger="-L$lib"
18262     for i in $apr_addto_bugger; do
18263       apr_addto_duplicate="0"
18264       for j in $APRUTIL_LDFLAGS; do
18265         if test "x$i" = "x$j"; then
18266           apr_addto_duplicate="1"
18267           break
18268         fi
18269       done
18270       if test $apr_addto_duplicate = "0"; then
18271         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18272         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18273       fi
18274     done
18275   fi
18276
18277     apu_db_header=$bdb_header
18278     apu_db_lib=$bdb_libname
18279     apu_have_db=1
18280     ;;
18281   *)
18282
18283   if test "x$APRUTIL_INCLUDES" = "x"; then
18284     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
18285     APRUTIL_INCLUDES="-I$found/include"
18286   else
18287     apr_addto_bugger="-I$found/include"
18288     for i in $apr_addto_bugger; do
18289       apr_addto_duplicate="0"
18290       for j in $APRUTIL_INCLUDES; do
18291         if test "x$i" = "x$j"; then
18292           apr_addto_duplicate="1"
18293           break
18294         fi
18295       done
18296       if test $apr_addto_duplicate = "0"; then
18297         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18298         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18299       fi
18300     done
18301   fi
18302
18303
18304   if test "x$APRUTIL_LDFLAGS" = "x"; then
18305     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
18306     APRUTIL_LDFLAGS="-L$found/lib"
18307   else
18308     apr_addto_bugger="-L$found/lib"
18309     for i in $apr_addto_bugger; do
18310       apr_addto_duplicate="0"
18311       for j in $APRUTIL_LDFLAGS; do
18312         if test "x$i" = "x$j"; then
18313           apr_addto_duplicate="1"
18314           break
18315         fi
18316       done
18317       if test $apr_addto_duplicate = "0"; then
18318         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18319         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18320       fi
18321     done
18322   fi
18323
18324     apu_db_header=$bdb_header
18325     apu_db_lib=$bdb_libname
18326     apu_have_db=1
18327     ;;
18328   esac
18329
18330   if test "$apu_have_db" = "1"; then
18331     apu_db_version=1
18332   fi
18333
18334   fi
18335   if test "$apu_have_db" = "0"; then
18336
18337   places="$all_places"
18338   if test -z "$places"; then
18339     places="std"
18340   fi
18341
18342   bdb_version=1
18343   if test "-1" != "-1"; then
18344     bdb_version="$bdb_version.-1"
18345     if test "-1" != "-1"; then
18346       bdb_version="$bdb_version.-1"
18347     fi
18348   fi
18349   bdb_places="$places"
18350   bdb_default_search_headers="db_185.h"
18351   bdb_default_search_lib_names="db"
18352
18353
18354   apu_have_db=0
18355
18356   # Save the original values of the flags we tweak.
18357   apu_check_lib_save_libs="$LIBS"
18358   apu_check_lib_save_ldflags="$LDFLAGS"
18359   apu_check_lib_save_cppflags="$CPPFLAGS"
18360
18361   # The variable `found' is the prefix under which we've found
18362   # Berkeley DB, or `not' if we haven't found it anywhere yet.
18363   found=not
18364   for bdb_place in $bdb_places; do
18365
18366     LDFLAGS="$apu_check_lib_save_ldflags"
18367     CPPFLAGS="$apu_check_lib_save_cppflags"
18368     case "$bdb_place" in
18369       "std" )
18370         description="the standard places"
18371       ;;
18372       *":"* )
18373         header="`echo $bdb_place | sed -e 's/:.*$//'`"
18374         lib="`echo $bdb_place | sed -e 's/^.*://'`"
18375         CPPFLAGS="$CPPFLAGS -I$header"
18376         LDFLAGS="$LDFLAGS -L$lib"
18377         description="$header and $lib"
18378       ;;
18379       * )
18380         if test -d $bdb_place; then
18381           LDFLAGS="$LDFLAGS -L$bdb_place/lib"
18382           CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
18383         else
18384           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
18385 $as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
18386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
18387 $as_echo "directory not found" >&6; }
18388           continue
18389         fi
18390         description="$bdb_place"
18391       ;;
18392     esac
18393
18394     # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
18395     # trick to display a message instead.
18396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
18397 $as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
18398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
18399 $as_echo "" >&6; }
18400
18401     for bdb_libname in $bdb_default_search_lib_names; do
18402       for bdb_header in $bdb_default_search_headers; do
18403         # Clear the header cache variable for each location
18404
18405         cache_id="`echo ac_cv_header_${bdb_header} \
18406                  | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18407
18408         unset $cache_id
18409         as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
18410 ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
18411 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18412
18413           if test "1" = "3" -o "1" = "4" -o "1" = "5" -o "1" = "6"; then
18414             # We generate a separate cache variable for each prefix and libname
18415             # we search under.  That way, we avoid caching information that
18416             # changes if the user runs `configure' with a different set of
18417             # switches.
18418
18419             cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
18420                      | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18421
18422
18423             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
18424 $as_echo_n "checking for -l$bdb_libname... " >&6; }
18425                                     if eval \${$cache_id+:} false; then :
18426   $as_echo_n "(cached) " >&6
18427 else
18428
18429
18430     apu_try_berkeley_db_save_libs="$LIBS"
18431
18432     apu_check_berkeley_db_major=1
18433     apu_check_berkeley_db_minor=-1
18434     apu_check_berkeley_db_patch=-1
18435     apu_try_berkeley_db_header=$bdb_header
18436     apu_try_berkeley_db_libname=$bdb_libname
18437
18438     LIBS="$LIBS -l$apu_try_berkeley_db_libname"
18439     if test "$cross_compiling" = yes; then :
18440   apu_try_berkeley_db=yes
18441
18442 else
18443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18444 /* end confdefs.h.  */
18445
18446 #include <stdlib.h>
18447 #include <stdio.h>
18448 #include <$apu_try_berkeley_db_header>
18449 main ()
18450 {
18451   int major, minor, patch;
18452
18453   db_version(&major, &minor, &patch);
18454
18455   /* Sanity check: ensure that db.h constants actually match the db library */
18456   if (major != DB_VERSION_MAJOR
18457       || minor != DB_VERSION_MINOR
18458       || patch != DB_VERSION_PATCH)
18459     exit (1);
18460
18461   /* Run-time check:  ensure the library claims to be the correct version. */
18462
18463   if ($apu_check_berkeley_db_major != -1) {
18464     if (major < $apu_check_berkeley_db_major)
18465       exit (1);
18466     if (major > $apu_check_berkeley_db_major)
18467       exit (0);
18468   }
18469
18470   if ($apu_check_berkeley_db_minor != -1) {
18471     if (minor < $apu_check_berkeley_db_minor)
18472       exit (1);
18473     if (minor > $apu_check_berkeley_db_minor)
18474       exit (0);
18475   }
18476
18477   if ($apu_check_berkeley_db_patch == -1
18478       || patch >= $apu_check_berkeley_db_patch)
18479     exit (0);
18480   else
18481     exit (1);
18482 }
18483
18484 _ACEOF
18485 if ac_fn_c_try_run "$LINENO"; then :
18486   apu_try_berkeley_db=yes
18487 else
18488   apu_try_berkeley_db=no
18489 fi
18490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18491   conftest.$ac_objext conftest.beam conftest.$ac_ext
18492 fi
18493
18494
18495     LIBS="$apu_try_berkeley_db_save_libs"
18496
18497
18498                 eval "$cache_id=$apu_try_berkeley_db"
18499
18500 fi
18501
18502             result="`eval echo '$'$cache_id`"
18503             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
18504 $as_echo "$result" >&6; }
18505           elif test "1" = "1"; then
18506             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
18507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
18508 $as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
18509 if eval \${$as_ac_Lib+:} false; then :
18510   $as_echo_n "(cached) " >&6
18511 else
18512   ac_check_lib_save_LIBS=$LIBS
18513 LIBS="-l$bdb_libname  $LIBS"
18514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18515 /* end confdefs.h.  */
18516
18517 /* Override any GCC internal prototype to avoid an error.
18518    Use char because int might match the return type of a GCC
18519    builtin and then its argument prototype would still apply.  */
18520 #ifdef __cplusplus
18521 extern "C"
18522 #endif
18523 char dbopen ();
18524 int
18525 main ()
18526 {
18527 return dbopen ();
18528   ;
18529   return 0;
18530 }
18531 _ACEOF
18532 if ac_fn_c_try_link "$LINENO"; then :
18533   eval "$as_ac_Lib=yes"
18534 else
18535   eval "$as_ac_Lib=no"
18536 fi
18537 rm -f core conftest.err conftest.$ac_objext \
18538     conftest$ac_exeext conftest.$ac_ext
18539 LIBS=$ac_check_lib_save_LIBS
18540 fi
18541 eval ac_res=\$$as_ac_Lib
18542                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18543 $as_echo "$ac_res" >&6; }
18544 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18545   result=yes
18546 else
18547   result=no
18548
18549 fi
18550
18551           elif test "1" = "2"; then
18552             as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
18554 $as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
18555 if eval \${$as_ac_Lib+:} false; then :
18556   $as_echo_n "(cached) " >&6
18557 else
18558   ac_check_lib_save_LIBS=$LIBS
18559 LIBS="-l$bdb_libname  $LIBS"
18560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18561 /* end confdefs.h.  */
18562
18563 /* Override any GCC internal prototype to avoid an error.
18564    Use char because int might match the return type of a GCC
18565    builtin and then its argument prototype would still apply.  */
18566 #ifdef __cplusplus
18567 extern "C"
18568 #endif
18569 char db_open ();
18570 int
18571 main ()
18572 {
18573 return db_open ();
18574   ;
18575   return 0;
18576 }
18577 _ACEOF
18578 if ac_fn_c_try_link "$LINENO"; then :
18579   eval "$as_ac_Lib=yes"
18580 else
18581   eval "$as_ac_Lib=no"
18582 fi
18583 rm -f core conftest.err conftest.$ac_objext \
18584     conftest$ac_exeext conftest.$ac_ext
18585 LIBS=$ac_check_lib_save_LIBS
18586 fi
18587 eval ac_res=\$$as_ac_Lib
18588                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18589 $as_echo "$ac_res" >&6; }
18590 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18591   result=yes
18592 else
18593   result=no
18594
18595 fi
18596
18597           fi
18598
18599 else
18600   result="no"
18601 fi
18602
18603
18604
18605         # If we found it, no need to search any more.
18606         if test "$result" = "yes"; then
18607           found="$bdb_place"
18608           break
18609         fi
18610       done
18611       test "$found" != "not" && break
18612     done
18613     test "$found" != "not" && break
18614   done
18615
18616   # Restore the original values of the flags we tweak.
18617   LDFLAGS="$apu_check_lib_save_ldflags"
18618   CPPFLAGS="$apu_check_lib_save_cppflags"
18619
18620   case "$found" in
18621   "not")
18622     apu_have_db=0
18623     ;;
18624   "std")
18625     apu_db_header=$bdb_header
18626     apu_db_lib=$bdb_libname
18627     apu_have_db=1
18628     ;;
18629   *":"*)
18630     header="`echo $found | sed -e 's/:.*$//'`"
18631     lib="`echo $found | sed -e 's/^.*://'`"
18632
18633
18634   if test "x$APRUTIL_INCLUDES" = "x"; then
18635     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
18636     APRUTIL_INCLUDES="-I$header"
18637   else
18638     apr_addto_bugger="-I$header"
18639     for i in $apr_addto_bugger; do
18640       apr_addto_duplicate="0"
18641       for j in $APRUTIL_INCLUDES; do
18642         if test "x$i" = "x$j"; then
18643           apr_addto_duplicate="1"
18644           break
18645         fi
18646       done
18647       if test $apr_addto_duplicate = "0"; then
18648         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18649         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18650       fi
18651     done
18652   fi
18653
18654
18655   if test "x$APRUTIL_LDFLAGS" = "x"; then
18656     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
18657     APRUTIL_LDFLAGS="-L$lib"
18658   else
18659     apr_addto_bugger="-L$lib"
18660     for i in $apr_addto_bugger; do
18661       apr_addto_duplicate="0"
18662       for j in $APRUTIL_LDFLAGS; do
18663         if test "x$i" = "x$j"; then
18664           apr_addto_duplicate="1"
18665           break
18666         fi
18667       done
18668       if test $apr_addto_duplicate = "0"; then
18669         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18670         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18671       fi
18672     done
18673   fi
18674
18675     apu_db_header=$bdb_header
18676     apu_db_lib=$bdb_libname
18677     apu_have_db=1
18678     ;;
18679   *)
18680
18681   if test "x$APRUTIL_INCLUDES" = "x"; then
18682     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
18683     APRUTIL_INCLUDES="-I$found/include"
18684   else
18685     apr_addto_bugger="-I$found/include"
18686     for i in $apr_addto_bugger; do
18687       apr_addto_duplicate="0"
18688       for j in $APRUTIL_INCLUDES; do
18689         if test "x$i" = "x$j"; then
18690           apr_addto_duplicate="1"
18691           break
18692         fi
18693       done
18694       if test $apr_addto_duplicate = "0"; then
18695         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18696         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18697       fi
18698     done
18699   fi
18700
18701
18702   if test "x$APRUTIL_LDFLAGS" = "x"; then
18703     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
18704     APRUTIL_LDFLAGS="-L$found/lib"
18705   else
18706     apr_addto_bugger="-L$found/lib"
18707     for i in $apr_addto_bugger; do
18708       apr_addto_duplicate="0"
18709       for j in $APRUTIL_LDFLAGS; do
18710         if test "x$i" = "x$j"; then
18711           apr_addto_duplicate="1"
18712           break
18713         fi
18714       done
18715       if test $apr_addto_duplicate = "0"; then
18716         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18717         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18718       fi
18719     done
18720   fi
18721
18722     apu_db_header=$bdb_header
18723     apu_db_lib=$bdb_libname
18724     apu_have_db=1
18725     ;;
18726   esac
18727
18728   if test "$apu_have_db" = "1"; then
18729     apu_db_version=185
18730   fi
18731
18732   fi
18733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB" >&5
18734 $as_echo_n "checking for Berkeley DB... " >&6; }
18735   if test "$apu_have_db" = "1"; then
18736     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found db$apu_db_version" >&5
18737 $as_echo "found db$apu_db_version" >&6; }
18738   else
18739     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18740 $as_echo "not found" >&6; }
18741   fi
18742
18743     ;;
18744   esac
18745
18746       if test "$apu_have_db" = "0"; then
18747         as_fn_error $? "Berkeley DB not found." "$LINENO" 5
18748       fi
18749     fi
18750
18751 fi
18752
18753
18754   if test -n "$apu_db_xtra_libs"; then
18755     LIBS="$saveddbxtralibs"
18756   fi
18757
18758   case "$requested" in
18759     sdbm | gdbm | ndbm | db)
18760       eval "apu_use_$requested=1"
18761       apu_default_dbm=$requested
18762       ;;
18763     db185 | db[123456])
18764       apu_use_db=1
18765       apu_default_dbm=$requested
18766       ;;
18767     db[456][0-9])
18768       apu_use_db=1
18769       apu_default_dbm=`echo $requested | sed -e 's/.$//'`
18770       ;;
18771     default)
18772             apu_default_dbm="sdbm (default)"
18773       apu_use_sdbm=1
18774       ;;
18775     *)
18776       as_fn_error $? "--with-dbm=$requested is an unknown DBM type.
18777         Use one of: $dbm_list" "$LINENO" 5
18778       ;;
18779   esac
18780
18781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default DBM" >&5
18782 $as_echo_n "checking for default DBM... " >&6; }
18783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_default_dbm" >&5
18784 $as_echo "$apu_default_dbm" >&6; }
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798   if test "$apu_have_db" = "1"; then
18799
18800   if test "x$LDADD_dbm_db" = "x"; then
18801     test "x$silent" != "xyes" && echo "  setting LDADD_dbm_db to \"-l$apu_db_lib\""
18802     LDADD_dbm_db="-l$apu_db_lib"
18803   else
18804     apr_addto_bugger="-l$apu_db_lib"
18805     for i in $apr_addto_bugger; do
18806       apr_addto_duplicate="0"
18807       for j in $LDADD_dbm_db; do
18808         if test "x$i" = "x$j"; then
18809           apr_addto_duplicate="1"
18810           break
18811         fi
18812       done
18813       if test $apr_addto_duplicate = "0"; then
18814         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_db"
18815         LDADD_dbm_db="$LDADD_dbm_db $i"
18816       fi
18817     done
18818   fi
18819
18820     if test -n "apu_db_xtra_libs"; then
18821
18822   if test "x$LDADD_dbm_db" = "x"; then
18823     test "x$silent" != "xyes" && echo "  setting LDADD_dbm_db to \"$apu_db_xtra_libs\""
18824     LDADD_dbm_db="$apu_db_xtra_libs"
18825   else
18826     apr_addto_bugger="$apu_db_xtra_libs"
18827     for i in $apr_addto_bugger; do
18828       apr_addto_duplicate="0"
18829       for j in $LDADD_dbm_db; do
18830         if test "x$i" = "x$j"; then
18831           apr_addto_duplicate="1"
18832           break
18833         fi
18834       done
18835       if test $apr_addto_duplicate = "0"; then
18836         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_db"
18837         LDADD_dbm_db="$LDADD_dbm_db $i"
18838       fi
18839     done
18840   fi
18841
18842     fi
18843   fi
18844
18845       if test "$apu_have_gdbm" = "1"; then
18846
18847   if test "x$LDADD_dbm_gdbm" = "x"; then
18848     test "x$silent" != "xyes" && echo "  setting LDADD_dbm_gdbm to \"-lgdbm\""
18849     LDADD_dbm_gdbm="-lgdbm"
18850   else
18851     apr_addto_bugger="-lgdbm"
18852     for i in $apr_addto_bugger; do
18853       apr_addto_duplicate="0"
18854       for j in $LDADD_dbm_gdbm; do
18855         if test "x$i" = "x$j"; then
18856           apr_addto_duplicate="1"
18857           break
18858         fi
18859       done
18860       if test $apr_addto_duplicate = "0"; then
18861         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_gdbm"
18862         LDADD_dbm_gdbm="$LDADD_dbm_gdbm $i"
18863       fi
18864     done
18865   fi
18866
18867   fi
18868
18869   if test "$apu_have_ndbm" = "1"; then
18870
18871   if test "x$LDADD_dbm_ndbm" = "x"; then
18872     test "x$silent" != "xyes" && echo "  setting LDADD_dbm_ndbm to \"-l$apu_ndbm_lib\""
18873     LDADD_dbm_ndbm="-l$apu_ndbm_lib"
18874   else
18875     apr_addto_bugger="-l$apu_ndbm_lib"
18876     for i in $apr_addto_bugger; do
18877       apr_addto_duplicate="0"
18878       for j in $LDADD_dbm_ndbm; do
18879         if test "x$i" = "x$j"; then
18880           apr_addto_duplicate="1"
18881           break
18882         fi
18883       done
18884       if test $apr_addto_duplicate = "0"; then
18885         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_ndbm"
18886         LDADD_dbm_ndbm="$LDADD_dbm_ndbm $i"
18887       fi
18888     done
18889   fi
18890
18891   fi
18892
18893
18894
18895
18896
18897
18898   apu_have_pgsql=0
18899
18900   old_libs="$LIBS"
18901   old_cppflags="$CPPFLAGS"
18902   old_ldflags="$LDFLAGS"
18903
18904
18905 # Check whether --with-pgsql was given.
18906 if test "${with_pgsql+set}" = set; then :
18907   withval=$with_pgsql;
18908     if test "$withval" = "yes"; then
18909       # Extract the first word of "pg_config", so it can be a program name with args.
18910 set dummy pg_config; ac_word=$2
18911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18912 $as_echo_n "checking for $ac_word... " >&6; }
18913 if ${ac_cv_path_PGSQL_CONFIG+:} false; then :
18914   $as_echo_n "(cached) " >&6
18915 else
18916   case $PGSQL_CONFIG in
18917   [\\/]* | ?:[\\/]*)
18918   ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
18919   ;;
18920   *)
18921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18922 for as_dir in $PATH
18923 do
18924   IFS=$as_save_IFS
18925   test -z "$as_dir" && as_dir=.
18926     for ac_exec_ext in '' $ac_executable_extensions; do
18927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18928     ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18930     break 2
18931   fi
18932 done
18933   done
18934 IFS=$as_save_IFS
18935
18936   ;;
18937 esac
18938 fi
18939 PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
18940 if test -n "$PGSQL_CONFIG"; then
18941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
18942 $as_echo "$PGSQL_CONFIG" >&6; }
18943 else
18944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18945 $as_echo "no" >&6; }
18946 fi
18947
18948
18949       if test "x$PGSQL_CONFIG" != 'x'; then
18950         pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
18951         pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
18952
18953
18954   if test "x$CPPFLAGS" = "x"; then
18955     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
18956     CPPFLAGS="$pgsql_CPPFLAGS"
18957   else
18958     apr_addto_bugger="$pgsql_CPPFLAGS"
18959     for i in $apr_addto_bugger; do
18960       apr_addto_duplicate="0"
18961       for j in $CPPFLAGS; do
18962         if test "x$i" = "x$j"; then
18963           apr_addto_duplicate="1"
18964           break
18965         fi
18966       done
18967       if test $apr_addto_duplicate = "0"; then
18968         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
18969         CPPFLAGS="$CPPFLAGS $i"
18970       fi
18971     done
18972   fi
18973
18974
18975   if test "x$LDFLAGS" = "x"; then
18976     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
18977     LDFLAGS="$pgsql_LDFLAGS"
18978   else
18979     apr_addto_bugger="$pgsql_LDFLAGS"
18980     for i in $apr_addto_bugger; do
18981       apr_addto_duplicate="0"
18982       for j in $LDFLAGS; do
18983         if test "x$i" = "x$j"; then
18984           apr_addto_duplicate="1"
18985           break
18986         fi
18987       done
18988       if test $apr_addto_duplicate = "0"; then
18989         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
18990         LDFLAGS="$LDFLAGS $i"
18991       fi
18992     done
18993   fi
18994
18995       fi
18996
18997       for ac_header in libpq-fe.h
18998 do :
18999   ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19000 if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
19001   cat >>confdefs.h <<_ACEOF
19002 #define HAVE_LIBPQ_FE_H 1
19003 _ACEOF
19004
19005         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19006 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19007 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19008   $as_echo_n "(cached) " >&6
19009 else
19010   ac_check_lib_save_LIBS=$LIBS
19011 LIBS="-lpq  $LIBS"
19012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19013 /* end confdefs.h.  */
19014
19015 /* Override any GCC internal prototype to avoid an error.
19016    Use char because int might match the return type of a GCC
19017    builtin and then its argument prototype would still apply.  */
19018 #ifdef __cplusplus
19019 extern "C"
19020 #endif
19021 char PQsendQueryPrepared ();
19022 int
19023 main ()
19024 {
19025 return PQsendQueryPrepared ();
19026   ;
19027   return 0;
19028 }
19029 _ACEOF
19030 if ac_fn_c_try_link "$LINENO"; then :
19031   ac_cv_lib_pq_PQsendQueryPrepared=yes
19032 else
19033   ac_cv_lib_pq_PQsendQueryPrepared=no
19034 fi
19035 rm -f core conftest.err conftest.$ac_objext \
19036     conftest$ac_exeext conftest.$ac_ext
19037 LIBS=$ac_check_lib_save_LIBS
19038 fi
19039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19040 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19041 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19042   apu_have_pgsql=1
19043 else
19044
19045         if test "x$PGSQL_CONFIG" != 'x'; then
19046           unset ac_cv_lib_pq_PQsendQueryPrepared
19047           pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19048
19049   if test "x$LIBS" = "x"; then
19050     test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19051     LIBS="$pgsql_LIBS"
19052   else
19053     apr_addto_bugger="$pgsql_LIBS"
19054     for i in $apr_addto_bugger; do
19055       apr_addto_duplicate="0"
19056       for j in $LIBS; do
19057         if test "x$i" = "x$j"; then
19058           apr_addto_duplicate="1"
19059           break
19060         fi
19061       done
19062       if test $apr_addto_duplicate = "0"; then
19063         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19064         LIBS="$LIBS $i"
19065       fi
19066     done
19067   fi
19068
19069           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19070 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19071 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19072   $as_echo_n "(cached) " >&6
19073 else
19074   ac_check_lib_save_LIBS=$LIBS
19075 LIBS="-lpq  $LIBS"
19076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19077 /* end confdefs.h.  */
19078
19079 /* Override any GCC internal prototype to avoid an error.
19080    Use char because int might match the return type of a GCC
19081    builtin and then its argument prototype would still apply.  */
19082 #ifdef __cplusplus
19083 extern "C"
19084 #endif
19085 char PQsendQueryPrepared ();
19086 int
19087 main ()
19088 {
19089 return PQsendQueryPrepared ();
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 if ac_fn_c_try_link "$LINENO"; then :
19095   ac_cv_lib_pq_PQsendQueryPrepared=yes
19096 else
19097   ac_cv_lib_pq_PQsendQueryPrepared=no
19098 fi
19099 rm -f core conftest.err conftest.$ac_objext \
19100     conftest$ac_exeext conftest.$ac_ext
19101 LIBS=$ac_check_lib_save_LIBS
19102 fi
19103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19104 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19105 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19106   apu_have_pgsql=1
19107 fi
19108
19109         fi
19110
19111 fi
19112
19113
19114 fi
19115
19116 done
19117
19118       if test "$apu_have_pgsql" = "0"; then
19119         for ac_header in postgresql/libpq-fe.h
19120 do :
19121   ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19122 if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then :
19123   cat >>confdefs.h <<_ACEOF
19124 #define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19125 _ACEOF
19126
19127           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19128 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19129 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19130   $as_echo_n "(cached) " >&6
19131 else
19132   ac_check_lib_save_LIBS=$LIBS
19133 LIBS="-lpq  $LIBS"
19134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19135 /* end confdefs.h.  */
19136
19137 /* Override any GCC internal prototype to avoid an error.
19138    Use char because int might match the return type of a GCC
19139    builtin and then its argument prototype would still apply.  */
19140 #ifdef __cplusplus
19141 extern "C"
19142 #endif
19143 char PQsendQueryPrepared ();
19144 int
19145 main ()
19146 {
19147 return PQsendQueryPrepared ();
19148   ;
19149   return 0;
19150 }
19151 _ACEOF
19152 if ac_fn_c_try_link "$LINENO"; then :
19153   ac_cv_lib_pq_PQsendQueryPrepared=yes
19154 else
19155   ac_cv_lib_pq_PQsendQueryPrepared=no
19156 fi
19157 rm -f core conftest.err conftest.$ac_objext \
19158     conftest$ac_exeext conftest.$ac_ext
19159 LIBS=$ac_check_lib_save_LIBS
19160 fi
19161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19162 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19163 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19164   apu_have_pgsql=1
19165 else
19166
19167           if test "x$PGSQL_CONFIG" != 'x'; then
19168             unset ac_cv_lib_pq_PQsendQueryPrepared
19169             pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19170
19171   if test "x$LIBS" = "x"; then
19172     test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19173     LIBS="$pgsql_LIBS"
19174   else
19175     apr_addto_bugger="$pgsql_LIBS"
19176     for i in $apr_addto_bugger; do
19177       apr_addto_duplicate="0"
19178       for j in $LIBS; do
19179         if test "x$i" = "x$j"; then
19180           apr_addto_duplicate="1"
19181           break
19182         fi
19183       done
19184       if test $apr_addto_duplicate = "0"; then
19185         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19186         LIBS="$LIBS $i"
19187       fi
19188     done
19189   fi
19190
19191             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19192 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19193 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19194   $as_echo_n "(cached) " >&6
19195 else
19196   ac_check_lib_save_LIBS=$LIBS
19197 LIBS="-lpq  $LIBS"
19198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19199 /* end confdefs.h.  */
19200
19201 /* Override any GCC internal prototype to avoid an error.
19202    Use char because int might match the return type of a GCC
19203    builtin and then its argument prototype would still apply.  */
19204 #ifdef __cplusplus
19205 extern "C"
19206 #endif
19207 char PQsendQueryPrepared ();
19208 int
19209 main ()
19210 {
19211 return PQsendQueryPrepared ();
19212   ;
19213   return 0;
19214 }
19215 _ACEOF
19216 if ac_fn_c_try_link "$LINENO"; then :
19217   ac_cv_lib_pq_PQsendQueryPrepared=yes
19218 else
19219   ac_cv_lib_pq_PQsendQueryPrepared=no
19220 fi
19221 rm -f core conftest.err conftest.$ac_objext \
19222     conftest$ac_exeext conftest.$ac_ext
19223 LIBS=$ac_check_lib_save_LIBS
19224 fi
19225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19226 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19227 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19228   apu_have_pgsql=1
19229 fi
19230
19231           fi
19232
19233 fi
19234
19235
19236 fi
19237
19238 done
19239
19240       fi
19241       if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
19242
19243   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19244     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19245     APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19246   else
19247     apr_addto_bugger="$pgsql_CPPFLAGS"
19248     for i in $apr_addto_bugger; do
19249       apr_addto_duplicate="0"
19250       for j in $APRUTIL_PRIV_INCLUDES; do
19251         if test "x$i" = "x$j"; then
19252           apr_addto_duplicate="1"
19253           break
19254         fi
19255       done
19256       if test $apr_addto_duplicate = "0"; then
19257         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19258         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19259       fi
19260     done
19261   fi
19262
19263       fi
19264     elif test "$withval" = "no"; then
19265       :
19266     else
19267       # Extract the first word of "pg_config", so it can be a program name with args.
19268 set dummy pg_config; ac_word=$2
19269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19270 $as_echo_n "checking for $ac_word... " >&6; }
19271 if ${ac_cv_path_PGSQL_CONFIG+:} false; then :
19272   $as_echo_n "(cached) " >&6
19273 else
19274   case $PGSQL_CONFIG in
19275   [\\/]* | ?:[\\/]*)
19276   ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
19277   ;;
19278   *)
19279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19280 for as_dir in $withval/bin
19281 do
19282   IFS=$as_save_IFS
19283   test -z "$as_dir" && as_dir=.
19284     for ac_exec_ext in '' $ac_executable_extensions; do
19285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19286     ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19288     break 2
19289   fi
19290 done
19291   done
19292 IFS=$as_save_IFS
19293
19294   ;;
19295 esac
19296 fi
19297 PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
19298 if test -n "$PGSQL_CONFIG"; then
19299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
19300 $as_echo "$PGSQL_CONFIG" >&6; }
19301 else
19302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19303 $as_echo "no" >&6; }
19304 fi
19305
19306
19307       if test "x$PGSQL_CONFIG" != 'x'; then
19308         pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
19309         pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
19310       else
19311         pgsql_CPPFLAGS="-I$withval/include"
19312         pgsql_LDFLAGS="-L$withval/lib "
19313       fi
19314
19315
19316   if test "x$CPPFLAGS" = "x"; then
19317     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
19318     CPPFLAGS="$pgsql_CPPFLAGS"
19319   else
19320     apr_addto_bugger="$pgsql_CPPFLAGS"
19321     for i in $apr_addto_bugger; do
19322       apr_addto_duplicate="0"
19323       for j in $CPPFLAGS; do
19324         if test "x$i" = "x$j"; then
19325           apr_addto_duplicate="1"
19326           break
19327         fi
19328       done
19329       if test $apr_addto_duplicate = "0"; then
19330         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19331         CPPFLAGS="$CPPFLAGS $i"
19332       fi
19333     done
19334   fi
19335
19336
19337   if test "x$LDFLAGS" = "x"; then
19338     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
19339     LDFLAGS="$pgsql_LDFLAGS"
19340   else
19341     apr_addto_bugger="$pgsql_LDFLAGS"
19342     for i in $apr_addto_bugger; do
19343       apr_addto_duplicate="0"
19344       for j in $LDFLAGS; do
19345         if test "x$i" = "x$j"; then
19346           apr_addto_duplicate="1"
19347           break
19348         fi
19349       done
19350       if test $apr_addto_duplicate = "0"; then
19351         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
19352         LDFLAGS="$LDFLAGS $i"
19353       fi
19354     done
19355   fi
19356
19357
19358       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgsql in $withval" >&5
19359 $as_echo "$as_me: checking for pgsql in $withval" >&6;}
19360       for ac_header in libpq-fe.h
19361 do :
19362   ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19363 if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
19364   cat >>confdefs.h <<_ACEOF
19365 #define HAVE_LIBPQ_FE_H 1
19366 _ACEOF
19367
19368         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19369 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19370 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19371   $as_echo_n "(cached) " >&6
19372 else
19373   ac_check_lib_save_LIBS=$LIBS
19374 LIBS="-lpq  $LIBS"
19375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19376 /* end confdefs.h.  */
19377
19378 /* Override any GCC internal prototype to avoid an error.
19379    Use char because int might match the return type of a GCC
19380    builtin and then its argument prototype would still apply.  */
19381 #ifdef __cplusplus
19382 extern "C"
19383 #endif
19384 char PQsendQueryPrepared ();
19385 int
19386 main ()
19387 {
19388 return PQsendQueryPrepared ();
19389   ;
19390   return 0;
19391 }
19392 _ACEOF
19393 if ac_fn_c_try_link "$LINENO"; then :
19394   ac_cv_lib_pq_PQsendQueryPrepared=yes
19395 else
19396   ac_cv_lib_pq_PQsendQueryPrepared=no
19397 fi
19398 rm -f core conftest.err conftest.$ac_objext \
19399     conftest$ac_exeext conftest.$ac_ext
19400 LIBS=$ac_check_lib_save_LIBS
19401 fi
19402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19403 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19404 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19405   apu_have_pgsql=1
19406 else
19407
19408         if test "x$PGSQL_CONFIG" != 'x'; then
19409           unset ac_cv_lib_pq_PQsendQueryPrepared
19410           pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19411
19412   if test "x$LIBS" = "x"; then
19413     test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19414     LIBS="$pgsql_LIBS"
19415   else
19416     apr_addto_bugger="$pgsql_LIBS"
19417     for i in $apr_addto_bugger; do
19418       apr_addto_duplicate="0"
19419       for j in $LIBS; do
19420         if test "x$i" = "x$j"; then
19421           apr_addto_duplicate="1"
19422           break
19423         fi
19424       done
19425       if test $apr_addto_duplicate = "0"; then
19426         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19427         LIBS="$LIBS $i"
19428       fi
19429     done
19430   fi
19431
19432           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19433 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19434 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19435   $as_echo_n "(cached) " >&6
19436 else
19437   ac_check_lib_save_LIBS=$LIBS
19438 LIBS="-lpq  $LIBS"
19439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19440 /* end confdefs.h.  */
19441
19442 /* Override any GCC internal prototype to avoid an error.
19443    Use char because int might match the return type of a GCC
19444    builtin and then its argument prototype would still apply.  */
19445 #ifdef __cplusplus
19446 extern "C"
19447 #endif
19448 char PQsendQueryPrepared ();
19449 int
19450 main ()
19451 {
19452 return PQsendQueryPrepared ();
19453   ;
19454   return 0;
19455 }
19456 _ACEOF
19457 if ac_fn_c_try_link "$LINENO"; then :
19458   ac_cv_lib_pq_PQsendQueryPrepared=yes
19459 else
19460   ac_cv_lib_pq_PQsendQueryPrepared=no
19461 fi
19462 rm -f core conftest.err conftest.$ac_objext \
19463     conftest$ac_exeext conftest.$ac_ext
19464 LIBS=$ac_check_lib_save_LIBS
19465 fi
19466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19467 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19468 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19469   apu_have_pgsql=1
19470 fi
19471
19472         fi
19473
19474 fi
19475
19476
19477 fi
19478
19479 done
19480
19481       if test "$apu_have_pgsql" != "1"; then
19482         for ac_header in postgresql/libpq-fe.h
19483 do :
19484   ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19485 if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then :
19486   cat >>confdefs.h <<_ACEOF
19487 #define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19488 _ACEOF
19489
19490           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19491 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19492 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19493   $as_echo_n "(cached) " >&6
19494 else
19495   ac_check_lib_save_LIBS=$LIBS
19496 LIBS="-lpq  $LIBS"
19497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19498 /* end confdefs.h.  */
19499
19500 /* Override any GCC internal prototype to avoid an error.
19501    Use char because int might match the return type of a GCC
19502    builtin and then its argument prototype would still apply.  */
19503 #ifdef __cplusplus
19504 extern "C"
19505 #endif
19506 char PQsendQueryPrepared ();
19507 int
19508 main ()
19509 {
19510 return PQsendQueryPrepared ();
19511   ;
19512   return 0;
19513 }
19514 _ACEOF
19515 if ac_fn_c_try_link "$LINENO"; then :
19516   ac_cv_lib_pq_PQsendQueryPrepared=yes
19517 else
19518   ac_cv_lib_pq_PQsendQueryPrepared=no
19519 fi
19520 rm -f core conftest.err conftest.$ac_objext \
19521     conftest$ac_exeext conftest.$ac_ext
19522 LIBS=$ac_check_lib_save_LIBS
19523 fi
19524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19525 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19526 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19527   apu_have_pgsql=1
19528 else
19529
19530           if test "x$PGSQL_CONFIG" != 'x'; then
19531             unset ac_cv_lib_pq_PQsendQueryPrepared
19532             pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19533
19534   if test "x$LIBS" = "x"; then
19535     test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19536     LIBS="$pgsql_LIBS"
19537   else
19538     apr_addto_bugger="$pgsql_LIBS"
19539     for i in $apr_addto_bugger; do
19540       apr_addto_duplicate="0"
19541       for j in $LIBS; do
19542         if test "x$i" = "x$j"; then
19543           apr_addto_duplicate="1"
19544           break
19545         fi
19546       done
19547       if test $apr_addto_duplicate = "0"; then
19548         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19549         LIBS="$LIBS $i"
19550       fi
19551     done
19552   fi
19553
19554             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19555 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19556 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19557   $as_echo_n "(cached) " >&6
19558 else
19559   ac_check_lib_save_LIBS=$LIBS
19560 LIBS="-lpq  $LIBS"
19561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19562 /* end confdefs.h.  */
19563
19564 /* Override any GCC internal prototype to avoid an error.
19565    Use char because int might match the return type of a GCC
19566    builtin and then its argument prototype would still apply.  */
19567 #ifdef __cplusplus
19568 extern "C"
19569 #endif
19570 char PQsendQueryPrepared ();
19571 int
19572 main ()
19573 {
19574 return PQsendQueryPrepared ();
19575   ;
19576   return 0;
19577 }
19578 _ACEOF
19579 if ac_fn_c_try_link "$LINENO"; then :
19580   ac_cv_lib_pq_PQsendQueryPrepared=yes
19581 else
19582   ac_cv_lib_pq_PQsendQueryPrepared=no
19583 fi
19584 rm -f core conftest.err conftest.$ac_objext \
19585     conftest$ac_exeext conftest.$ac_ext
19586 LIBS=$ac_check_lib_save_LIBS
19587 fi
19588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19589 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19590 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19591   apu_have_pgsql=1
19592 fi
19593
19594           fi
19595
19596 fi
19597
19598
19599 fi
19600
19601 done
19602
19603       fi
19604       if test "$apu_have_pgsql" != "0"; then
19605
19606   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19607     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19608     APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19609   else
19610     apr_addto_bugger="$pgsql_CPPFLAGS"
19611     for i in $apr_addto_bugger; do
19612       apr_addto_duplicate="0"
19613       for j in $APRUTIL_PRIV_INCLUDES; do
19614         if test "x$i" = "x$j"; then
19615           apr_addto_duplicate="1"
19616           break
19617         fi
19618       done
19619       if test $apr_addto_duplicate = "0"; then
19620         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19621         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19622       fi
19623     done
19624   fi
19625
19626       fi
19627     fi
19628
19629 else
19630
19631     # Extract the first word of "pg_config", so it can be a program name with args.
19632 set dummy pg_config; ac_word=$2
19633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19634 $as_echo_n "checking for $ac_word... " >&6; }
19635 if ${ac_cv_path_PGSQL_CONFIG+:} false; then :
19636   $as_echo_n "(cached) " >&6
19637 else
19638   case $PGSQL_CONFIG in
19639   [\\/]* | ?:[\\/]*)
19640   ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
19641   ;;
19642   *)
19643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19644 for as_dir in $PATH
19645 do
19646   IFS=$as_save_IFS
19647   test -z "$as_dir" && as_dir=.
19648     for ac_exec_ext in '' $ac_executable_extensions; do
19649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19650     ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19652     break 2
19653   fi
19654 done
19655   done
19656 IFS=$as_save_IFS
19657
19658   ;;
19659 esac
19660 fi
19661 PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
19662 if test -n "$PGSQL_CONFIG"; then
19663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
19664 $as_echo "$PGSQL_CONFIG" >&6; }
19665 else
19666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19667 $as_echo "no" >&6; }
19668 fi
19669
19670
19671     if test "x$PGSQL_CONFIG" != 'x'; then
19672       pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
19673       pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
19674
19675
19676   if test "x$CPPFLAGS" = "x"; then
19677     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
19678     CPPFLAGS="$pgsql_CPPFLAGS"
19679   else
19680     apr_addto_bugger="$pgsql_CPPFLAGS"
19681     for i in $apr_addto_bugger; do
19682       apr_addto_duplicate="0"
19683       for j in $CPPFLAGS; do
19684         if test "x$i" = "x$j"; then
19685           apr_addto_duplicate="1"
19686           break
19687         fi
19688       done
19689       if test $apr_addto_duplicate = "0"; then
19690         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19691         CPPFLAGS="$CPPFLAGS $i"
19692       fi
19693     done
19694   fi
19695
19696
19697   if test "x$LDFLAGS" = "x"; then
19698     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
19699     LDFLAGS="$pgsql_LDFLAGS"
19700   else
19701     apr_addto_bugger="$pgsql_LDFLAGS"
19702     for i in $apr_addto_bugger; do
19703       apr_addto_duplicate="0"
19704       for j in $LDFLAGS; do
19705         if test "x$i" = "x$j"; then
19706           apr_addto_duplicate="1"
19707           break
19708         fi
19709       done
19710       if test $apr_addto_duplicate = "0"; then
19711         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
19712         LDFLAGS="$LDFLAGS $i"
19713       fi
19714     done
19715   fi
19716
19717     fi
19718
19719     for ac_header in libpq-fe.h
19720 do :
19721   ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19722 if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
19723   cat >>confdefs.h <<_ACEOF
19724 #define HAVE_LIBPQ_FE_H 1
19725 _ACEOF
19726
19727       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19728 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19729 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19730   $as_echo_n "(cached) " >&6
19731 else
19732   ac_check_lib_save_LIBS=$LIBS
19733 LIBS="-lpq  $LIBS"
19734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19735 /* end confdefs.h.  */
19736
19737 /* Override any GCC internal prototype to avoid an error.
19738    Use char because int might match the return type of a GCC
19739    builtin and then its argument prototype would still apply.  */
19740 #ifdef __cplusplus
19741 extern "C"
19742 #endif
19743 char PQsendQueryPrepared ();
19744 int
19745 main ()
19746 {
19747 return PQsendQueryPrepared ();
19748   ;
19749   return 0;
19750 }
19751 _ACEOF
19752 if ac_fn_c_try_link "$LINENO"; then :
19753   ac_cv_lib_pq_PQsendQueryPrepared=yes
19754 else
19755   ac_cv_lib_pq_PQsendQueryPrepared=no
19756 fi
19757 rm -f core conftest.err conftest.$ac_objext \
19758     conftest$ac_exeext conftest.$ac_ext
19759 LIBS=$ac_check_lib_save_LIBS
19760 fi
19761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19762 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19763 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19764   apu_have_pgsql=1
19765 else
19766
19767       if test "x$PGSQL_CONFIG" != 'x'; then
19768         unset ac_cv_lib_pq_PQsendQueryPrepared
19769         pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19770
19771   if test "x$LIBS" = "x"; then
19772     test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19773     LIBS="$pgsql_LIBS"
19774   else
19775     apr_addto_bugger="$pgsql_LIBS"
19776     for i in $apr_addto_bugger; do
19777       apr_addto_duplicate="0"
19778       for j in $LIBS; do
19779         if test "x$i" = "x$j"; then
19780           apr_addto_duplicate="1"
19781           break
19782         fi
19783       done
19784       if test $apr_addto_duplicate = "0"; then
19785         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19786         LIBS="$LIBS $i"
19787       fi
19788     done
19789   fi
19790
19791         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19792 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19793 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19794   $as_echo_n "(cached) " >&6
19795 else
19796   ac_check_lib_save_LIBS=$LIBS
19797 LIBS="-lpq  $LIBS"
19798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19799 /* end confdefs.h.  */
19800
19801 /* Override any GCC internal prototype to avoid an error.
19802    Use char because int might match the return type of a GCC
19803    builtin and then its argument prototype would still apply.  */
19804 #ifdef __cplusplus
19805 extern "C"
19806 #endif
19807 char PQsendQueryPrepared ();
19808 int
19809 main ()
19810 {
19811 return PQsendQueryPrepared ();
19812   ;
19813   return 0;
19814 }
19815 _ACEOF
19816 if ac_fn_c_try_link "$LINENO"; then :
19817   ac_cv_lib_pq_PQsendQueryPrepared=yes
19818 else
19819   ac_cv_lib_pq_PQsendQueryPrepared=no
19820 fi
19821 rm -f core conftest.err conftest.$ac_objext \
19822     conftest$ac_exeext conftest.$ac_ext
19823 LIBS=$ac_check_lib_save_LIBS
19824 fi
19825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19826 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19827 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19828   apu_have_pgsql=1
19829 fi
19830
19831       fi
19832
19833 fi
19834
19835
19836 fi
19837
19838 done
19839
19840     if test "$apu_have_pgsql" = "0"; then
19841       for ac_header in postgresql/libpq-fe.h
19842 do :
19843   ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19844 if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then :
19845   cat >>confdefs.h <<_ACEOF
19846 #define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19847 _ACEOF
19848
19849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19850 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19851 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19852   $as_echo_n "(cached) " >&6
19853 else
19854   ac_check_lib_save_LIBS=$LIBS
19855 LIBS="-lpq  $LIBS"
19856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19857 /* end confdefs.h.  */
19858
19859 /* Override any GCC internal prototype to avoid an error.
19860    Use char because int might match the return type of a GCC
19861    builtin and then its argument prototype would still apply.  */
19862 #ifdef __cplusplus
19863 extern "C"
19864 #endif
19865 char PQsendQueryPrepared ();
19866 int
19867 main ()
19868 {
19869 return PQsendQueryPrepared ();
19870   ;
19871   return 0;
19872 }
19873 _ACEOF
19874 if ac_fn_c_try_link "$LINENO"; then :
19875   ac_cv_lib_pq_PQsendQueryPrepared=yes
19876 else
19877   ac_cv_lib_pq_PQsendQueryPrepared=no
19878 fi
19879 rm -f core conftest.err conftest.$ac_objext \
19880     conftest$ac_exeext conftest.$ac_ext
19881 LIBS=$ac_check_lib_save_LIBS
19882 fi
19883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19884 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19885 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19886   apu_have_pgsql=1
19887 else
19888
19889         if test "x$PGSQL_CONFIG" != 'x'; then
19890           unset ac_cv_lib_pq_PQsendQueryPrepared
19891           pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19892
19893   if test "x$LIBS" = "x"; then
19894     test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19895     LIBS="$pgsql_LIBS"
19896   else
19897     apr_addto_bugger="$pgsql_LIBS"
19898     for i in $apr_addto_bugger; do
19899       apr_addto_duplicate="0"
19900       for j in $LIBS; do
19901         if test "x$i" = "x$j"; then
19902           apr_addto_duplicate="1"
19903           break
19904         fi
19905       done
19906       if test $apr_addto_duplicate = "0"; then
19907         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19908         LIBS="$LIBS $i"
19909       fi
19910     done
19911   fi
19912
19913           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19914 $as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19915 if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19916   $as_echo_n "(cached) " >&6
19917 else
19918   ac_check_lib_save_LIBS=$LIBS
19919 LIBS="-lpq  $LIBS"
19920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19921 /* end confdefs.h.  */
19922
19923 /* Override any GCC internal prototype to avoid an error.
19924    Use char because int might match the return type of a GCC
19925    builtin and then its argument prototype would still apply.  */
19926 #ifdef __cplusplus
19927 extern "C"
19928 #endif
19929 char PQsendQueryPrepared ();
19930 int
19931 main ()
19932 {
19933 return PQsendQueryPrepared ();
19934   ;
19935   return 0;
19936 }
19937 _ACEOF
19938 if ac_fn_c_try_link "$LINENO"; then :
19939   ac_cv_lib_pq_PQsendQueryPrepared=yes
19940 else
19941   ac_cv_lib_pq_PQsendQueryPrepared=no
19942 fi
19943 rm -f core conftest.err conftest.$ac_objext \
19944     conftest$ac_exeext conftest.$ac_ext
19945 LIBS=$ac_check_lib_save_LIBS
19946 fi
19947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19948 $as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19949 if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19950   apu_have_pgsql=1
19951 fi
19952
19953         fi
19954
19955 fi
19956
19957
19958 fi
19959
19960 done
19961
19962     fi
19963     if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
19964
19965   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19966     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19967     APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19968   else
19969     apr_addto_bugger="$pgsql_CPPFLAGS"
19970     for i in $apr_addto_bugger; do
19971       apr_addto_duplicate="0"
19972       for j in $APRUTIL_PRIV_INCLUDES; do
19973         if test "x$i" = "x$j"; then
19974           apr_addto_duplicate="1"
19975           break
19976         fi
19977       done
19978       if test $apr_addto_duplicate = "0"; then
19979         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19980         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19981       fi
19982     done
19983   fi
19984
19985     fi
19986
19987 fi
19988
19989
19990       if test "$apu_have_pgsql" = "1"; then
19991
19992   if test "x$LDADD_dbd_pgsql" = "x"; then
19993     test "x$silent" != "xyes" && echo "  setting LDADD_dbd_pgsql to \"$pgsql_LDFLAGS -lpq $pgsql_LIBS\""
19994     LDADD_dbd_pgsql="$pgsql_LDFLAGS -lpq $pgsql_LIBS"
19995   else
19996     apr_addto_bugger="$pgsql_LDFLAGS -lpq $pgsql_LIBS"
19997     for i in $apr_addto_bugger; do
19998       apr_addto_duplicate="0"
19999       for j in $LDADD_dbd_pgsql; do
20000         if test "x$i" = "x$j"; then
20001           apr_addto_duplicate="1"
20002           break
20003         fi
20004       done
20005       if test $apr_addto_duplicate = "0"; then
20006         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_pgsql"
20007         LDADD_dbd_pgsql="$LDADD_dbd_pgsql $i"
20008       fi
20009     done
20010   fi
20011
20012   fi
20013
20014
20015   LIBS="$old_libs"
20016   CPPFLAGS="$old_cppflags"
20017   LDFLAGS="$old_ldflags"
20018
20019
20020   apu_have_mysql=0
20021
20022   old_libs="$LIBS"
20023   old_cppflags="$CPPFLAGS"
20024   old_ldflags="$LDFLAGS"
20025
20026
20027 # Check whether --with-mysql was given.
20028 if test "${with_mysql+set}" = set; then :
20029   withval=$with_mysql;
20030     if test "$withval" = "yes"; then
20031       # Extract the first word of "mysql_config", so it can be a program name with args.
20032 set dummy mysql_config; ac_word=$2
20033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20034 $as_echo_n "checking for $ac_word... " >&6; }
20035 if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
20036   $as_echo_n "(cached) " >&6
20037 else
20038   case $MYSQL_CONFIG in
20039   [\\/]* | ?:[\\/]*)
20040   ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
20041   ;;
20042   *)
20043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20044 for as_dir in $PATH
20045 do
20046   IFS=$as_save_IFS
20047   test -z "$as_dir" && as_dir=.
20048     for ac_exec_ext in '' $ac_executable_extensions; do
20049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20050     ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20052     break 2
20053   fi
20054 done
20055   done
20056 IFS=$as_save_IFS
20057
20058   ;;
20059 esac
20060 fi
20061 MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
20062 if test -n "$MYSQL_CONFIG"; then
20063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
20064 $as_echo "$MYSQL_CONFIG" >&6; }
20065 else
20066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20067 $as_echo "no" >&6; }
20068 fi
20069
20070
20071       if test "x$MYSQL_CONFIG" != 'x'; then
20072         mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
20073         mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`"
20074         mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
20075
20076
20077   if test "x$CPPFLAGS" = "x"; then
20078     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$mysql_CPPFLAGS\""
20079     CPPFLAGS="$mysql_CPPFLAGS"
20080   else
20081     apr_addto_bugger="$mysql_CPPFLAGS"
20082     for i in $apr_addto_bugger; do
20083       apr_addto_duplicate="0"
20084       for j in $CPPFLAGS; do
20085         if test "x$i" = "x$j"; then
20086           apr_addto_duplicate="1"
20087           break
20088         fi
20089       done
20090       if test $apr_addto_duplicate = "0"; then
20091         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20092         CPPFLAGS="$CPPFLAGS $i"
20093       fi
20094     done
20095   fi
20096
20097
20098   if test "x$LIBS" = "x"; then
20099     test "x$silent" != "xyes" && echo "  setting LIBS to \"$mysql_LIBS\""
20100     LIBS="$mysql_LIBS"
20101   else
20102     apr_addto_bugger="$mysql_LIBS"
20103     for i in $apr_addto_bugger; do
20104       apr_addto_duplicate="0"
20105       for j in $LIBS; do
20106         if test "x$i" = "x$j"; then
20107           apr_addto_duplicate="1"
20108           break
20109         fi
20110       done
20111       if test $apr_addto_duplicate = "0"; then
20112         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
20113         LIBS="$LIBS $i"
20114       fi
20115     done
20116   fi
20117
20118       fi
20119
20120       for ac_header in mysql.h my_global.h my_sys.h
20121 do :
20122   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20123 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <my_global.h>
20124 "
20125 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20126   cat >>confdefs.h <<_ACEOF
20127 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20128 _ACEOF
20129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
20130 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
20131 if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then :
20132   $as_echo_n "(cached) " >&6
20133 else
20134   ac_check_lib_save_LIBS=$LIBS
20135 LIBS="-lmysqlclient  $LIBS"
20136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20137 /* end confdefs.h.  */
20138
20139 /* Override any GCC internal prototype to avoid an error.
20140    Use char because int might match the return type of a GCC
20141    builtin and then its argument prototype would still apply.  */
20142 #ifdef __cplusplus
20143 extern "C"
20144 #endif
20145 char mysql_init ();
20146 int
20147 main ()
20148 {
20149 return mysql_init ();
20150   ;
20151   return 0;
20152 }
20153 _ACEOF
20154 if ac_fn_c_try_link "$LINENO"; then :
20155   ac_cv_lib_mysqlclient_mysql_init=yes
20156 else
20157   ac_cv_lib_mysqlclient_mysql_init=no
20158 fi
20159 rm -f core conftest.err conftest.$ac_objext \
20160     conftest$ac_exeext conftest.$ac_ext
20161 LIBS=$ac_check_lib_save_LIBS
20162 fi
20163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
20164 $as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
20165 if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then :
20166   apu_have_mysql=1
20167 fi
20168
20169 else
20170   apu_have_mysql=0; break
20171 fi
20172
20173 done
20174
20175       if test "$apu_have_mysql" = "0"; then
20176         for ac_header in mysql/mysql.h mysql/my_global.h mysql/my_sys.h
20177 do :
20178   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20179 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <mysql/my_global.h>
20180 "
20181 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20182   cat >>confdefs.h <<_ACEOF
20183 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20184 _ACEOF
20185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
20186 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
20187 if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then :
20188   $as_echo_n "(cached) " >&6
20189 else
20190   ac_check_lib_save_LIBS=$LIBS
20191 LIBS="-lmysqlclient  $LIBS"
20192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20193 /* end confdefs.h.  */
20194
20195 /* Override any GCC internal prototype to avoid an error.
20196    Use char because int might match the return type of a GCC
20197    builtin and then its argument prototype would still apply.  */
20198 #ifdef __cplusplus
20199 extern "C"
20200 #endif
20201 char mysql_init ();
20202 int
20203 main ()
20204 {
20205 return mysql_init ();
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 if ac_fn_c_try_link "$LINENO"; then :
20211   ac_cv_lib_mysqlclient_mysql_init=yes
20212 else
20213   ac_cv_lib_mysqlclient_mysql_init=no
20214 fi
20215 rm -f core conftest.err conftest.$ac_objext \
20216     conftest$ac_exeext conftest.$ac_ext
20217 LIBS=$ac_check_lib_save_LIBS
20218 fi
20219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
20220 $as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
20221 if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then :
20222   apu_have_mysql=1
20223 fi
20224
20225 else
20226   apu_have_mysql=0; break
20227 fi
20228
20229 done
20230
20231       fi
20232       if test "$apu_have_mysql" != "0" && test "x$MYSQL_CONFIG" != 'x'; then
20233
20234   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20235     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$mysql_CPPFLAGS\""
20236     APRUTIL_PRIV_INCLUDES="$mysql_CPPFLAGS"
20237   else
20238     apr_addto_bugger="$mysql_CPPFLAGS"
20239     for i in $apr_addto_bugger; do
20240       apr_addto_duplicate="0"
20241       for j in $APRUTIL_PRIV_INCLUDES; do
20242         if test "x$i" = "x$j"; then
20243           apr_addto_duplicate="1"
20244           break
20245         fi
20246       done
20247       if test $apr_addto_duplicate = "0"; then
20248         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20249         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20250       fi
20251     done
20252   fi
20253
20254       fi
20255     elif test "$withval" = "no"; then
20256       :
20257     else
20258       # Extract the first word of "mysql_config", so it can be a program name with args.
20259 set dummy mysql_config; ac_word=$2
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20261 $as_echo_n "checking for $ac_word... " >&6; }
20262 if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
20263   $as_echo_n "(cached) " >&6
20264 else
20265   case $MYSQL_CONFIG in
20266   [\\/]* | ?:[\\/]*)
20267   ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
20268   ;;
20269   *)
20270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20271 for as_dir in $withval/bin
20272 do
20273   IFS=$as_save_IFS
20274   test -z "$as_dir" && as_dir=.
20275     for ac_exec_ext in '' $ac_executable_extensions; do
20276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20277     ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20279     break 2
20280   fi
20281 done
20282   done
20283 IFS=$as_save_IFS
20284
20285   ;;
20286 esac
20287 fi
20288 MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
20289 if test -n "$MYSQL_CONFIG"; then
20290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
20291 $as_echo "$MYSQL_CONFIG" >&6; }
20292 else
20293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20294 $as_echo "no" >&6; }
20295 fi
20296
20297
20298       if test "x$MYSQL_CONFIG" != 'x'; then
20299         mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
20300         mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`"
20301         mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
20302       else
20303         mysql_CPPFLAGS="-I$withval/include"
20304         mysql_LDFLAGS="-L$withval/lib "
20305       fi
20306
20307
20308   if test "x$CPPFLAGS" = "x"; then
20309     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$mysql_CPPFLAGS\""
20310     CPPFLAGS="$mysql_CPPFLAGS"
20311   else
20312     apr_addto_bugger="$mysql_CPPFLAGS"
20313     for i in $apr_addto_bugger; do
20314       apr_addto_duplicate="0"
20315       for j in $CPPFLAGS; do
20316         if test "x$i" = "x$j"; then
20317           apr_addto_duplicate="1"
20318           break
20319         fi
20320       done
20321       if test $apr_addto_duplicate = "0"; then
20322         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20323         CPPFLAGS="$CPPFLAGS $i"
20324       fi
20325     done
20326   fi
20327
20328
20329   if test "x$LDFLAGS" = "x"; then
20330     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$mysql_LDFLAGS\""
20331     LDFLAGS="$mysql_LDFLAGS"
20332   else
20333     apr_addto_bugger="$mysql_LDFLAGS"
20334     for i in $apr_addto_bugger; do
20335       apr_addto_duplicate="0"
20336       for j in $LDFLAGS; do
20337         if test "x$i" = "x$j"; then
20338           apr_addto_duplicate="1"
20339           break
20340         fi
20341       done
20342       if test $apr_addto_duplicate = "0"; then
20343         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20344         LDFLAGS="$LDFLAGS $i"
20345       fi
20346     done
20347   fi
20348
20349
20350   if test "x$LIBS" = "x"; then
20351     test "x$silent" != "xyes" && echo "  setting LIBS to \"$mysql_LIBS\""
20352     LIBS="$mysql_LIBS"
20353   else
20354     apr_addto_bugger="$mysql_LIBS"
20355     for i in $apr_addto_bugger; do
20356       apr_addto_duplicate="0"
20357       for j in $LIBS; do
20358         if test "x$i" = "x$j"; then
20359           apr_addto_duplicate="1"
20360           break
20361         fi
20362       done
20363       if test $apr_addto_duplicate = "0"; then
20364         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
20365         LIBS="$LIBS $i"
20366       fi
20367     done
20368   fi
20369
20370
20371       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql in $withval" >&5
20372 $as_echo "$as_me: checking for mysql in $withval" >&6;}
20373       for ac_header in mysql.h my_global.h my_sys.h
20374 do :
20375   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20376 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <my_global.h>
20377 "
20378 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20379   cat >>confdefs.h <<_ACEOF
20380 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20381 _ACEOF
20382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
20383 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
20384 if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then :
20385   $as_echo_n "(cached) " >&6
20386 else
20387   ac_check_lib_save_LIBS=$LIBS
20388 LIBS="-lmysqlclient  $LIBS"
20389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20390 /* end confdefs.h.  */
20391
20392 /* Override any GCC internal prototype to avoid an error.
20393    Use char because int might match the return type of a GCC
20394    builtin and then its argument prototype would still apply.  */
20395 #ifdef __cplusplus
20396 extern "C"
20397 #endif
20398 char mysql_init ();
20399 int
20400 main ()
20401 {
20402 return mysql_init ();
20403   ;
20404   return 0;
20405 }
20406 _ACEOF
20407 if ac_fn_c_try_link "$LINENO"; then :
20408   ac_cv_lib_mysqlclient_mysql_init=yes
20409 else
20410   ac_cv_lib_mysqlclient_mysql_init=no
20411 fi
20412 rm -f core conftest.err conftest.$ac_objext \
20413     conftest$ac_exeext conftest.$ac_ext
20414 LIBS=$ac_check_lib_save_LIBS
20415 fi
20416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
20417 $as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
20418 if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then :
20419   apu_have_mysql=1
20420 fi
20421
20422 else
20423   apu_have_mysql=0; break
20424 fi
20425
20426 done
20427
20428
20429       if test "$apu_have_mysql" != "1"; then
20430         for ac_header in mysql/mysql.h mysql/my_global.h mysql/my_sys.h
20431 do :
20432   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20433 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <mysql/my_global.h>
20434 "
20435 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20436   cat >>confdefs.h <<_ACEOF
20437 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20438 _ACEOF
20439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient" >&5
20440 $as_echo_n "checking for mysql_init in -lmysqlclient... " >&6; }
20441 if ${ac_cv_lib_mysqlclient_mysql_init+:} false; then :
20442   $as_echo_n "(cached) " >&6
20443 else
20444   ac_check_lib_save_LIBS=$LIBS
20445 LIBS="-lmysqlclient  $LIBS"
20446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20447 /* end confdefs.h.  */
20448
20449 /* Override any GCC internal prototype to avoid an error.
20450    Use char because int might match the return type of a GCC
20451    builtin and then its argument prototype would still apply.  */
20452 #ifdef __cplusplus
20453 extern "C"
20454 #endif
20455 char mysql_init ();
20456 int
20457 main ()
20458 {
20459 return mysql_init ();
20460   ;
20461   return 0;
20462 }
20463 _ACEOF
20464 if ac_fn_c_try_link "$LINENO"; then :
20465   ac_cv_lib_mysqlclient_mysql_init=yes
20466 else
20467   ac_cv_lib_mysqlclient_mysql_init=no
20468 fi
20469 rm -f core conftest.err conftest.$ac_objext \
20470     conftest$ac_exeext conftest.$ac_ext
20471 LIBS=$ac_check_lib_save_LIBS
20472 fi
20473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
20474 $as_echo "$ac_cv_lib_mysqlclient_mysql_init" >&6; }
20475 if test "x$ac_cv_lib_mysqlclient_mysql_init" = xyes; then :
20476   apu_have_mysql=1
20477 fi
20478
20479 else
20480   apu_have_mysql=0; break
20481 fi
20482
20483 done
20484
20485       fi
20486       if test "$apu_have_mysql" != "0"; then
20487
20488   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20489     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$mysql_CPPFLAGS\""
20490     APRUTIL_PRIV_INCLUDES="$mysql_CPPFLAGS"
20491   else
20492     apr_addto_bugger="$mysql_CPPFLAGS"
20493     for i in $apr_addto_bugger; do
20494       apr_addto_duplicate="0"
20495       for j in $APRUTIL_PRIV_INCLUDES; do
20496         if test "x$i" = "x$j"; then
20497           apr_addto_duplicate="1"
20498           break
20499         fi
20500       done
20501       if test $apr_addto_duplicate = "0"; then
20502         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20503         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20504       fi
20505     done
20506   fi
20507
20508       fi
20509     fi
20510
20511 fi
20512
20513
20514
20515
20516       if test "$apu_have_mysql" = "1"; then
20517
20518   if test "x$LDADD_dbd_mysql" = "x"; then
20519     test "x$silent" != "xyes" && echo "  setting LDADD_dbd_mysql to \"$mysql_LDFLAGS -lmysqlclient $mysql_LIBS\""
20520     LDADD_dbd_mysql="$mysql_LDFLAGS -lmysqlclient $mysql_LIBS"
20521   else
20522     apr_addto_bugger="$mysql_LDFLAGS -lmysqlclient $mysql_LIBS"
20523     for i in $apr_addto_bugger; do
20524       apr_addto_duplicate="0"
20525       for j in $LDADD_dbd_mysql; do
20526         if test "x$i" = "x$j"; then
20527           apr_addto_duplicate="1"
20528           break
20529         fi
20530       done
20531       if test $apr_addto_duplicate = "0"; then
20532         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_mysql"
20533         LDADD_dbd_mysql="$LDADD_dbd_mysql $i"
20534       fi
20535     done
20536   fi
20537
20538   fi
20539
20540
20541   LIBS="$old_libs"
20542   CPPFLAGS="$old_cppflags"
20543   LDFLAGS="$old_ldflags"
20544
20545
20546   apu_have_sqlite3=0
20547
20548   old_libs="$LIBS"
20549   old_cppflags="$CPPFLAGS"
20550   old_ldflags="$LDFLAGS"
20551
20552
20553 # Check whether --with-sqlite3 was given.
20554 if test "${with_sqlite3+set}" = set; then :
20555   withval=$with_sqlite3;
20556     if test "$withval" = "yes"; then
20557       for ac_header in sqlite3.h
20558 do :
20559   ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20560 if test "x$ac_cv_header_sqlite3_h" = xyes; then :
20561   cat >>confdefs.h <<_ACEOF
20562 #define HAVE_SQLITE3_H 1
20563 _ACEOF
20564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20565 $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20566 if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
20567   $as_echo_n "(cached) " >&6
20568 else
20569   ac_check_lib_save_LIBS=$LIBS
20570 LIBS="-lsqlite3  $LIBS"
20571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20572 /* end confdefs.h.  */
20573
20574 /* Override any GCC internal prototype to avoid an error.
20575    Use char because int might match the return type of a GCC
20576    builtin and then its argument prototype would still apply.  */
20577 #ifdef __cplusplus
20578 extern "C"
20579 #endif
20580 char sqlite3_open ();
20581 int
20582 main ()
20583 {
20584 return sqlite3_open ();
20585   ;
20586   return 0;
20587 }
20588 _ACEOF
20589 if ac_fn_c_try_link "$LINENO"; then :
20590   ac_cv_lib_sqlite3_sqlite3_open=yes
20591 else
20592   ac_cv_lib_sqlite3_sqlite3_open=no
20593 fi
20594 rm -f core conftest.err conftest.$ac_objext \
20595     conftest$ac_exeext conftest.$ac_ext
20596 LIBS=$ac_check_lib_save_LIBS
20597 fi
20598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20599 $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20600 if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
20601   apu_have_sqlite3=1
20602 fi
20603
20604 fi
20605
20606 done
20607
20608     elif test "$withval" = "no"; then
20609       :
20610     else
20611       sqlite3_CPPFLAGS="-I$withval/include"
20612       sqlite3_LDFLAGS="-L$withval/lib "
20613
20614
20615   if test "x$CPPFLAGS" = "x"; then
20616     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sqlite3_CPPFLAGS\""
20617     CPPFLAGS="$sqlite3_CPPFLAGS"
20618   else
20619     apr_addto_bugger="$sqlite3_CPPFLAGS"
20620     for i in $apr_addto_bugger; do
20621       apr_addto_duplicate="0"
20622       for j in $CPPFLAGS; do
20623         if test "x$i" = "x$j"; then
20624           apr_addto_duplicate="1"
20625           break
20626         fi
20627       done
20628       if test $apr_addto_duplicate = "0"; then
20629         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20630         CPPFLAGS="$CPPFLAGS $i"
20631       fi
20632     done
20633   fi
20634
20635
20636   if test "x$LDFLAGS" = "x"; then
20637     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sqlite3_LDFLAGS\""
20638     LDFLAGS="$sqlite3_LDFLAGS"
20639   else
20640     apr_addto_bugger="$sqlite3_LDFLAGS"
20641     for i in $apr_addto_bugger; do
20642       apr_addto_duplicate="0"
20643       for j in $LDFLAGS; do
20644         if test "x$i" = "x$j"; then
20645           apr_addto_duplicate="1"
20646           break
20647         fi
20648       done
20649       if test $apr_addto_duplicate = "0"; then
20650         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20651         LDFLAGS="$LDFLAGS $i"
20652       fi
20653     done
20654   fi
20655
20656
20657       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3 in $withval" >&5
20658 $as_echo "$as_me: checking for sqlite3 in $withval" >&6;}
20659       for ac_header in sqlite3.h
20660 do :
20661   ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20662 if test "x$ac_cv_header_sqlite3_h" = xyes; then :
20663   cat >>confdefs.h <<_ACEOF
20664 #define HAVE_SQLITE3_H 1
20665 _ACEOF
20666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20667 $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20668 if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
20669   $as_echo_n "(cached) " >&6
20670 else
20671   ac_check_lib_save_LIBS=$LIBS
20672 LIBS="-lsqlite3  $LIBS"
20673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20674 /* end confdefs.h.  */
20675
20676 /* Override any GCC internal prototype to avoid an error.
20677    Use char because int might match the return type of a GCC
20678    builtin and then its argument prototype would still apply.  */
20679 #ifdef __cplusplus
20680 extern "C"
20681 #endif
20682 char sqlite3_open ();
20683 int
20684 main ()
20685 {
20686 return sqlite3_open ();
20687   ;
20688   return 0;
20689 }
20690 _ACEOF
20691 if ac_fn_c_try_link "$LINENO"; then :
20692   ac_cv_lib_sqlite3_sqlite3_open=yes
20693 else
20694   ac_cv_lib_sqlite3_sqlite3_open=no
20695 fi
20696 rm -f core conftest.err conftest.$ac_objext \
20697     conftest$ac_exeext conftest.$ac_ext
20698 LIBS=$ac_check_lib_save_LIBS
20699 fi
20700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20701 $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20702 if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
20703   apu_have_sqlite3=1
20704 fi
20705
20706 fi
20707
20708 done
20709
20710       if test "$apu_have_sqlite3" != "0"; then
20711
20712   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20713     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
20714     APRUTIL_PRIV_INCLUDES="-I$withval/include"
20715   else
20716     apr_addto_bugger="-I$withval/include"
20717     for i in $apr_addto_bugger; do
20718       apr_addto_duplicate="0"
20719       for j in $APRUTIL_PRIV_INCLUDES; do
20720         if test "x$i" = "x$j"; then
20721           apr_addto_duplicate="1"
20722           break
20723         fi
20724       done
20725       if test $apr_addto_duplicate = "0"; then
20726         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20727         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20728       fi
20729     done
20730   fi
20731
20732       fi
20733     fi
20734
20735 else
20736
20737     for ac_header in sqlite3.h
20738 do :
20739   ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20740 if test "x$ac_cv_header_sqlite3_h" = xyes; then :
20741   cat >>confdefs.h <<_ACEOF
20742 #define HAVE_SQLITE3_H 1
20743 _ACEOF
20744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20745 $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20746 if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
20747   $as_echo_n "(cached) " >&6
20748 else
20749   ac_check_lib_save_LIBS=$LIBS
20750 LIBS="-lsqlite3  $LIBS"
20751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20752 /* end confdefs.h.  */
20753
20754 /* Override any GCC internal prototype to avoid an error.
20755    Use char because int might match the return type of a GCC
20756    builtin and then its argument prototype would still apply.  */
20757 #ifdef __cplusplus
20758 extern "C"
20759 #endif
20760 char sqlite3_open ();
20761 int
20762 main ()
20763 {
20764 return sqlite3_open ();
20765   ;
20766   return 0;
20767 }
20768 _ACEOF
20769 if ac_fn_c_try_link "$LINENO"; then :
20770   ac_cv_lib_sqlite3_sqlite3_open=yes
20771 else
20772   ac_cv_lib_sqlite3_sqlite3_open=no
20773 fi
20774 rm -f core conftest.err conftest.$ac_objext \
20775     conftest$ac_exeext conftest.$ac_ext
20776 LIBS=$ac_check_lib_save_LIBS
20777 fi
20778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20779 $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20780 if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
20781   apu_have_sqlite3=1
20782 fi
20783
20784 fi
20785
20786 done
20787
20788
20789 fi
20790
20791
20792
20793
20794       if test "$apu_have_sqlite3" = "1"; then
20795
20796   if test "x$LDADD_dbd_sqlite3" = "x"; then
20797     test "x$silent" != "xyes" && echo "  setting LDADD_dbd_sqlite3 to \"$sqlite3_LDFLAGS -lsqlite3\""
20798     LDADD_dbd_sqlite3="$sqlite3_LDFLAGS -lsqlite3"
20799   else
20800     apr_addto_bugger="$sqlite3_LDFLAGS -lsqlite3"
20801     for i in $apr_addto_bugger; do
20802       apr_addto_duplicate="0"
20803       for j in $LDADD_dbd_sqlite3; do
20804         if test "x$i" = "x$j"; then
20805           apr_addto_duplicate="1"
20806           break
20807         fi
20808       done
20809       if test $apr_addto_duplicate = "0"; then
20810         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_sqlite3"
20811         LDADD_dbd_sqlite3="$LDADD_dbd_sqlite3 $i"
20812       fi
20813     done
20814   fi
20815
20816   fi
20817
20818
20819   LIBS="$old_libs"
20820   CPPFLAGS="$old_cppflags"
20821   LDFLAGS="$old_ldflags"
20822
20823
20824   apu_have_sqlite2=0
20825
20826   old_libs="$LIBS"
20827   old_cppflags="$CPPFLAGS"
20828   old_ldflags="$LDFLAGS"
20829
20830
20831 # Check whether --with-sqlite2 was given.
20832 if test "${with_sqlite2+set}" = set; then :
20833   withval=$with_sqlite2;
20834     if test "$withval" = "yes"; then
20835       for ac_header in sqlite.h
20836 do :
20837   ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20838 if test "x$ac_cv_header_sqlite_h" = xyes; then :
20839   cat >>confdefs.h <<_ACEOF
20840 #define HAVE_SQLITE_H 1
20841 _ACEOF
20842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20843 $as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20844 if ${ac_cv_lib_sqlite_sqlite_open+:} false; then :
20845   $as_echo_n "(cached) " >&6
20846 else
20847   ac_check_lib_save_LIBS=$LIBS
20848 LIBS="-lsqlite  $LIBS"
20849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20850 /* end confdefs.h.  */
20851
20852 /* Override any GCC internal prototype to avoid an error.
20853    Use char because int might match the return type of a GCC
20854    builtin and then its argument prototype would still apply.  */
20855 #ifdef __cplusplus
20856 extern "C"
20857 #endif
20858 char sqlite_open ();
20859 int
20860 main ()
20861 {
20862 return sqlite_open ();
20863   ;
20864   return 0;
20865 }
20866 _ACEOF
20867 if ac_fn_c_try_link "$LINENO"; then :
20868   ac_cv_lib_sqlite_sqlite_open=yes
20869 else
20870   ac_cv_lib_sqlite_sqlite_open=no
20871 fi
20872 rm -f core conftest.err conftest.$ac_objext \
20873     conftest$ac_exeext conftest.$ac_ext
20874 LIBS=$ac_check_lib_save_LIBS
20875 fi
20876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20877 $as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20878 if test "x$ac_cv_lib_sqlite_sqlite_open" = xyes; then :
20879   apu_have_sqlite2=1
20880 fi
20881
20882 fi
20883
20884 done
20885
20886     elif test "$withval" = "no"; then
20887       :
20888     else
20889       sqlite2_CPPFLAGS="-I$withval/include"
20890       sqlite2_LDFLAGS="-L$withval/lib "
20891
20892
20893   if test "x$CPPFLAGS" = "x"; then
20894     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sqlite2_CPPFLAGS\""
20895     CPPFLAGS="$sqlite2_CPPFLAGS"
20896   else
20897     apr_addto_bugger="$sqlite2_CPPFLAGS"
20898     for i in $apr_addto_bugger; do
20899       apr_addto_duplicate="0"
20900       for j in $CPPFLAGS; do
20901         if test "x$i" = "x$j"; then
20902           apr_addto_duplicate="1"
20903           break
20904         fi
20905       done
20906       if test $apr_addto_duplicate = "0"; then
20907         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20908         CPPFLAGS="$CPPFLAGS $i"
20909       fi
20910     done
20911   fi
20912
20913
20914   if test "x$LDFLAGS" = "x"; then
20915     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sqlite2_LDFLAGS\""
20916     LDFLAGS="$sqlite2_LDFLAGS"
20917   else
20918     apr_addto_bugger="$sqlite2_LDFLAGS"
20919     for i in $apr_addto_bugger; do
20920       apr_addto_duplicate="0"
20921       for j in $LDFLAGS; do
20922         if test "x$i" = "x$j"; then
20923           apr_addto_duplicate="1"
20924           break
20925         fi
20926       done
20927       if test $apr_addto_duplicate = "0"; then
20928         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20929         LDFLAGS="$LDFLAGS $i"
20930       fi
20931     done
20932   fi
20933
20934
20935       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite2 in $withval" >&5
20936 $as_echo "$as_me: checking for sqlite2 in $withval" >&6;}
20937       for ac_header in sqlite.h
20938 do :
20939   ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20940 if test "x$ac_cv_header_sqlite_h" = xyes; then :
20941   cat >>confdefs.h <<_ACEOF
20942 #define HAVE_SQLITE_H 1
20943 _ACEOF
20944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20945 $as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20946 if ${ac_cv_lib_sqlite_sqlite_open+:} false; then :
20947   $as_echo_n "(cached) " >&6
20948 else
20949   ac_check_lib_save_LIBS=$LIBS
20950 LIBS="-lsqlite  $LIBS"
20951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20952 /* end confdefs.h.  */
20953
20954 /* Override any GCC internal prototype to avoid an error.
20955    Use char because int might match the return type of a GCC
20956    builtin and then its argument prototype would still apply.  */
20957 #ifdef __cplusplus
20958 extern "C"
20959 #endif
20960 char sqlite_open ();
20961 int
20962 main ()
20963 {
20964 return sqlite_open ();
20965   ;
20966   return 0;
20967 }
20968 _ACEOF
20969 if ac_fn_c_try_link "$LINENO"; then :
20970   ac_cv_lib_sqlite_sqlite_open=yes
20971 else
20972   ac_cv_lib_sqlite_sqlite_open=no
20973 fi
20974 rm -f core conftest.err conftest.$ac_objext \
20975     conftest$ac_exeext conftest.$ac_ext
20976 LIBS=$ac_check_lib_save_LIBS
20977 fi
20978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20979 $as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20980 if test "x$ac_cv_lib_sqlite_sqlite_open" = xyes; then :
20981   apu_have_sqlite2=1
20982 fi
20983
20984 fi
20985
20986 done
20987
20988       if test "$apu_have_sqlite2" != "0"; then
20989
20990   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20991     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
20992     APRUTIL_PRIV_INCLUDES="-I$withval/include"
20993   else
20994     apr_addto_bugger="-I$withval/include"
20995     for i in $apr_addto_bugger; do
20996       apr_addto_duplicate="0"
20997       for j in $APRUTIL_PRIV_INCLUDES; do
20998         if test "x$i" = "x$j"; then
20999           apr_addto_duplicate="1"
21000           break
21001         fi
21002       done
21003       if test $apr_addto_duplicate = "0"; then
21004         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21005         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21006       fi
21007     done
21008   fi
21009
21010       fi
21011     fi
21012
21013 else
21014
21015     for ac_header in sqlite.h
21016 do :
21017   ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
21018 if test "x$ac_cv_header_sqlite_h" = xyes; then :
21019   cat >>confdefs.h <<_ACEOF
21020 #define HAVE_SQLITE_H 1
21021 _ACEOF
21022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
21023 $as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
21024 if ${ac_cv_lib_sqlite_sqlite_open+:} false; then :
21025   $as_echo_n "(cached) " >&6
21026 else
21027   ac_check_lib_save_LIBS=$LIBS
21028 LIBS="-lsqlite  $LIBS"
21029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21030 /* end confdefs.h.  */
21031
21032 /* Override any GCC internal prototype to avoid an error.
21033    Use char because int might match the return type of a GCC
21034    builtin and then its argument prototype would still apply.  */
21035 #ifdef __cplusplus
21036 extern "C"
21037 #endif
21038 char sqlite_open ();
21039 int
21040 main ()
21041 {
21042 return sqlite_open ();
21043   ;
21044   return 0;
21045 }
21046 _ACEOF
21047 if ac_fn_c_try_link "$LINENO"; then :
21048   ac_cv_lib_sqlite_sqlite_open=yes
21049 else
21050   ac_cv_lib_sqlite_sqlite_open=no
21051 fi
21052 rm -f core conftest.err conftest.$ac_objext \
21053     conftest$ac_exeext conftest.$ac_ext
21054 LIBS=$ac_check_lib_save_LIBS
21055 fi
21056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
21057 $as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
21058 if test "x$ac_cv_lib_sqlite_sqlite_open" = xyes; then :
21059   apu_have_sqlite2=1
21060 fi
21061
21062 fi
21063
21064 done
21065
21066
21067 fi
21068
21069
21070
21071
21072       if test "$apu_have_sqlite2" = "1"; then
21073
21074   if test "x$LDADD_dbd_sqlite2" = "x"; then
21075     test "x$silent" != "xyes" && echo "  setting LDADD_dbd_sqlite2 to \"$sqlite2_LDFLAGS -lsqlite\""
21076     LDADD_dbd_sqlite2="$sqlite2_LDFLAGS -lsqlite"
21077   else
21078     apr_addto_bugger="$sqlite2_LDFLAGS -lsqlite"
21079     for i in $apr_addto_bugger; do
21080       apr_addto_duplicate="0"
21081       for j in $LDADD_dbd_sqlite2; do
21082         if test "x$i" = "x$j"; then
21083           apr_addto_duplicate="1"
21084           break
21085         fi
21086       done
21087       if test $apr_addto_duplicate = "0"; then
21088         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_sqlite2"
21089         LDADD_dbd_sqlite2="$LDADD_dbd_sqlite2 $i"
21090       fi
21091     done
21092   fi
21093
21094   fi
21095
21096
21097   LIBS="$old_libs"
21098   CPPFLAGS="$old_cppflags"
21099   LDFLAGS="$old_ldflags"
21100
21101
21102   apu_have_oracle=0
21103
21104   old_libs="$LIBS"
21105   old_cppflags="$CPPFLAGS"
21106   old_ldflags="$LDFLAGS"
21107
21108
21109 # Check whether --with-oracle-include was given.
21110 if test "${with_oracle_include+set}" = set; then :
21111   withval=$with_oracle_include;
21112 fi
21113
21114
21115 # Check whether --with-oracle was given.
21116 if test "${with_oracle+set}" = set; then :
21117   withval=$with_oracle;
21118     if test "$withval" = "yes"; then
21119       if test -n "$with_oracle_include"; then
21120         oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
21121
21122   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21123     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$with_oracle_include\""
21124     APRUTIL_PRIV_INCLUDES="-I$with_oracle_include"
21125   else
21126     apr_addto_bugger="-I$with_oracle_include"
21127     for i in $apr_addto_bugger; do
21128       apr_addto_duplicate="0"
21129       for j in $APRUTIL_PRIV_INCLUDES; do
21130         if test "x$i" = "x$j"; then
21131           apr_addto_duplicate="1"
21132           break
21133         fi
21134       done
21135       if test $apr_addto_duplicate = "0"; then
21136         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21137         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21138       fi
21139     done
21140   fi
21141
21142       fi
21143
21144
21145   if test "x$CPPFLAGS" = "x"; then
21146     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$oracle_CPPFLAGS\""
21147     CPPFLAGS="$oracle_CPPFLAGS"
21148   else
21149     apr_addto_bugger="$oracle_CPPFLAGS"
21150     for i in $apr_addto_bugger; do
21151       apr_addto_duplicate="0"
21152       for j in $CPPFLAGS; do
21153         if test "x$i" = "x$j"; then
21154           apr_addto_duplicate="1"
21155           break
21156         fi
21157       done
21158       if test $apr_addto_duplicate = "0"; then
21159         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21160         CPPFLAGS="$CPPFLAGS $i"
21161       fi
21162     done
21163   fi
21164
21165
21166       for ac_header in oci.h
21167 do :
21168   ac_fn_c_check_header_mongrel "$LINENO" "oci.h" "ac_cv_header_oci_h" "$ac_includes_default"
21169 if test "x$ac_cv_header_oci_h" = xyes; then :
21170   cat >>confdefs.h <<_ACEOF
21171 #define HAVE_OCI_H 1
21172 _ACEOF
21173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21174 $as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21175 if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21176   $as_echo_n "(cached) " >&6
21177 else
21178   ac_check_lib_save_LIBS=$LIBS
21179 LIBS="-lclntsh  $LIBS"
21180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21181 /* end confdefs.h.  */
21182
21183 /* Override any GCC internal prototype to avoid an error.
21184    Use char because int might match the return type of a GCC
21185    builtin and then its argument prototype would still apply.  */
21186 #ifdef __cplusplus
21187 extern "C"
21188 #endif
21189 char OCIEnvCreate ();
21190 int
21191 main ()
21192 {
21193 return OCIEnvCreate ();
21194   ;
21195   return 0;
21196 }
21197 _ACEOF
21198 if ac_fn_c_try_link "$LINENO"; then :
21199   ac_cv_lib_clntsh_OCIEnvCreate=yes
21200 else
21201   ac_cv_lib_clntsh_OCIEnvCreate=no
21202 fi
21203 rm -f core conftest.err conftest.$ac_objext \
21204     conftest$ac_exeext conftest.$ac_ext
21205 LIBS=$ac_check_lib_save_LIBS
21206 fi
21207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21208 $as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21209 if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21210   apu_have_oracle=1
21211 else
21212
21213         unset ac_cv_lib_clntsh_OCIEnvCreate
21214         oracle_LIBS="-lnnz11"
21215
21216   if test "x$LIBS" = "x"; then
21217     test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21218     LIBS="$oracle_LIBS"
21219   else
21220     apr_addto_bugger="$oracle_LIBS"
21221     for i in $apr_addto_bugger; do
21222       apr_addto_duplicate="0"
21223       for j in $LIBS; do
21224         if test "x$i" = "x$j"; then
21225           apr_addto_duplicate="1"
21226           break
21227         fi
21228       done
21229       if test $apr_addto_duplicate = "0"; then
21230         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21231         LIBS="$LIBS $i"
21232       fi
21233     done
21234   fi
21235
21236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21237 $as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21238 if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21239   $as_echo_n "(cached) " >&6
21240 else
21241   ac_check_lib_save_LIBS=$LIBS
21242 LIBS="-lclntsh  $LIBS"
21243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21244 /* end confdefs.h.  */
21245
21246 /* Override any GCC internal prototype to avoid an error.
21247    Use char because int might match the return type of a GCC
21248    builtin and then its argument prototype would still apply.  */
21249 #ifdef __cplusplus
21250 extern "C"
21251 #endif
21252 char OCIEnvCreate ();
21253 int
21254 main ()
21255 {
21256 return OCIEnvCreate ();
21257   ;
21258   return 0;
21259 }
21260 _ACEOF
21261 if ac_fn_c_try_link "$LINENO"; then :
21262   ac_cv_lib_clntsh_OCIEnvCreate=yes
21263 else
21264   ac_cv_lib_clntsh_OCIEnvCreate=no
21265 fi
21266 rm -f core conftest.err conftest.$ac_objext \
21267     conftest$ac_exeext conftest.$ac_ext
21268 LIBS=$ac_check_lib_save_LIBS
21269 fi
21270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21271 $as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21272 if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21273   apu_have_oracle=1
21274 else
21275
21276           unset ac_cv_lib_clntsh_OCIEnvCreate
21277
21278   if test "x$LIBS" = "x$oracle_LIBS"; then
21279     test "x$silent" != "xyes" && echo "  nulling LIBS"
21280     LIBS=""
21281   else
21282     apr_new_bugger=""
21283     apr_removed=0
21284     for i in $LIBS; do
21285       if test "x$i" != "x$oracle_LIBS"; then
21286         apr_new_bugger="$apr_new_bugger $i"
21287       else
21288         apr_removed=1
21289       fi
21290     done
21291     if test $apr_removed = "1"; then
21292       test "x$silent" != "xyes" && echo "  removed \"$oracle_LIBS\" from LIBS"
21293       LIBS=$apr_new_bugger
21294     fi
21295   fi
21296
21297           oracle_LIBS="-lnnz10"
21298
21299   if test "x$LIBS" = "x"; then
21300     test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21301     LIBS="$oracle_LIBS"
21302   else
21303     apr_addto_bugger="$oracle_LIBS"
21304     for i in $apr_addto_bugger; do
21305       apr_addto_duplicate="0"
21306       for j in $LIBS; do
21307         if test "x$i" = "x$j"; then
21308           apr_addto_duplicate="1"
21309           break
21310         fi
21311       done
21312       if test $apr_addto_duplicate = "0"; then
21313         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21314         LIBS="$LIBS $i"
21315       fi
21316     done
21317   fi
21318
21319           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21320 $as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21321 if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21322   $as_echo_n "(cached) " >&6
21323 else
21324   ac_check_lib_save_LIBS=$LIBS
21325 LIBS="-lclntsh  $LIBS"
21326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21327 /* end confdefs.h.  */
21328
21329 /* Override any GCC internal prototype to avoid an error.
21330    Use char because int might match the return type of a GCC
21331    builtin and then its argument prototype would still apply.  */
21332 #ifdef __cplusplus
21333 extern "C"
21334 #endif
21335 char OCIEnvCreate ();
21336 int
21337 main ()
21338 {
21339 return OCIEnvCreate ();
21340   ;
21341   return 0;
21342 }
21343 _ACEOF
21344 if ac_fn_c_try_link "$LINENO"; then :
21345   ac_cv_lib_clntsh_OCIEnvCreate=yes
21346 else
21347   ac_cv_lib_clntsh_OCIEnvCreate=no
21348 fi
21349 rm -f core conftest.err conftest.$ac_objext \
21350     conftest$ac_exeext conftest.$ac_ext
21351 LIBS=$ac_check_lib_save_LIBS
21352 fi
21353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21354 $as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21355 if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21356   apu_have_oracle=1
21357 fi
21358
21359
21360 fi
21361
21362
21363 fi
21364
21365 fi
21366
21367 done
21368
21369     elif test "$withval" = "no"; then
21370       :
21371     else
21372       if test -n "$with_oracle_include"; then
21373         oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
21374
21375   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21376     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$with_oracle_include\""
21377     APRUTIL_PRIV_INCLUDES="-I$with_oracle_include"
21378   else
21379     apr_addto_bugger="-I$with_oracle_include"
21380     for i in $apr_addto_bugger; do
21381       apr_addto_duplicate="0"
21382       for j in $APRUTIL_PRIV_INCLUDES; do
21383         if test "x$i" = "x$j"; then
21384           apr_addto_duplicate="1"
21385           break
21386         fi
21387       done
21388       if test $apr_addto_duplicate = "0"; then
21389         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21390         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21391       fi
21392     done
21393   fi
21394
21395       else
21396         oracle_CPPFLAGS="-I$withval/rdbms/demo -I$withval/rdbms/public"
21397       fi
21398       oracle_LDFLAGS="-L$withval/lib "
21399
21400
21401   if test "x$CPPFLAGS" = "x"; then
21402     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$oracle_CPPFLAGS\""
21403     CPPFLAGS="$oracle_CPPFLAGS"
21404   else
21405     apr_addto_bugger="$oracle_CPPFLAGS"
21406     for i in $apr_addto_bugger; do
21407       apr_addto_duplicate="0"
21408       for j in $CPPFLAGS; do
21409         if test "x$i" = "x$j"; then
21410           apr_addto_duplicate="1"
21411           break
21412         fi
21413       done
21414       if test $apr_addto_duplicate = "0"; then
21415         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21416         CPPFLAGS="$CPPFLAGS $i"
21417       fi
21418     done
21419   fi
21420
21421
21422   if test "x$LDFLAGS" = "x"; then
21423     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$oracle_LDFLAGS\""
21424     LDFLAGS="$oracle_LDFLAGS"
21425   else
21426     apr_addto_bugger="$oracle_LDFLAGS"
21427     for i in $apr_addto_bugger; do
21428       apr_addto_duplicate="0"
21429       for j in $LDFLAGS; do
21430         if test "x$i" = "x$j"; then
21431           apr_addto_duplicate="1"
21432           break
21433         fi
21434       done
21435       if test $apr_addto_duplicate = "0"; then
21436         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
21437         LDFLAGS="$LDFLAGS $i"
21438       fi
21439     done
21440   fi
21441
21442
21443       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for oracle in $withval" >&5
21444 $as_echo "$as_me: checking for oracle in $withval" >&6;}
21445       for ac_header in oci.h
21446 do :
21447   ac_fn_c_check_header_mongrel "$LINENO" "oci.h" "ac_cv_header_oci_h" "$ac_includes_default"
21448 if test "x$ac_cv_header_oci_h" = xyes; then :
21449   cat >>confdefs.h <<_ACEOF
21450 #define HAVE_OCI_H 1
21451 _ACEOF
21452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21453 $as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21454 if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21455   $as_echo_n "(cached) " >&6
21456 else
21457   ac_check_lib_save_LIBS=$LIBS
21458 LIBS="-lclntsh  $LIBS"
21459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21460 /* end confdefs.h.  */
21461
21462 /* Override any GCC internal prototype to avoid an error.
21463    Use char because int might match the return type of a GCC
21464    builtin and then its argument prototype would still apply.  */
21465 #ifdef __cplusplus
21466 extern "C"
21467 #endif
21468 char OCIEnvCreate ();
21469 int
21470 main ()
21471 {
21472 return OCIEnvCreate ();
21473   ;
21474   return 0;
21475 }
21476 _ACEOF
21477 if ac_fn_c_try_link "$LINENO"; then :
21478   ac_cv_lib_clntsh_OCIEnvCreate=yes
21479 else
21480   ac_cv_lib_clntsh_OCIEnvCreate=no
21481 fi
21482 rm -f core conftest.err conftest.$ac_objext \
21483     conftest$ac_exeext conftest.$ac_ext
21484 LIBS=$ac_check_lib_save_LIBS
21485 fi
21486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21487 $as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21488 if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21489   apu_have_oracle=1
21490 else
21491
21492         unset ac_cv_lib_clntsh_OCIEnvCreate
21493         oracle_LIBS="-lnnz11"
21494
21495   if test "x$LIBS" = "x"; then
21496     test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21497     LIBS="$oracle_LIBS"
21498   else
21499     apr_addto_bugger="$oracle_LIBS"
21500     for i in $apr_addto_bugger; do
21501       apr_addto_duplicate="0"
21502       for j in $LIBS; do
21503         if test "x$i" = "x$j"; then
21504           apr_addto_duplicate="1"
21505           break
21506         fi
21507       done
21508       if test $apr_addto_duplicate = "0"; then
21509         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21510         LIBS="$LIBS $i"
21511       fi
21512     done
21513   fi
21514
21515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21516 $as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21517 if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21518   $as_echo_n "(cached) " >&6
21519 else
21520   ac_check_lib_save_LIBS=$LIBS
21521 LIBS="-lclntsh  $LIBS"
21522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21523 /* end confdefs.h.  */
21524
21525 /* Override any GCC internal prototype to avoid an error.
21526    Use char because int might match the return type of a GCC
21527    builtin and then its argument prototype would still apply.  */
21528 #ifdef __cplusplus
21529 extern "C"
21530 #endif
21531 char OCIEnvCreate ();
21532 int
21533 main ()
21534 {
21535 return OCIEnvCreate ();
21536   ;
21537   return 0;
21538 }
21539 _ACEOF
21540 if ac_fn_c_try_link "$LINENO"; then :
21541   ac_cv_lib_clntsh_OCIEnvCreate=yes
21542 else
21543   ac_cv_lib_clntsh_OCIEnvCreate=no
21544 fi
21545 rm -f core conftest.err conftest.$ac_objext \
21546     conftest$ac_exeext conftest.$ac_ext
21547 LIBS=$ac_check_lib_save_LIBS
21548 fi
21549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21550 $as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21551 if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21552   apu_have_oracle=1
21553 else
21554
21555           unset ac_cv_lib_clntsh_OCIEnvCreate
21556
21557   if test "x$LIBS" = "x$oracle_LIBS"; then
21558     test "x$silent" != "xyes" && echo "  nulling LIBS"
21559     LIBS=""
21560   else
21561     apr_new_bugger=""
21562     apr_removed=0
21563     for i in $LIBS; do
21564       if test "x$i" != "x$oracle_LIBS"; then
21565         apr_new_bugger="$apr_new_bugger $i"
21566       else
21567         apr_removed=1
21568       fi
21569     done
21570     if test $apr_removed = "1"; then
21571       test "x$silent" != "xyes" && echo "  removed \"$oracle_LIBS\" from LIBS"
21572       LIBS=$apr_new_bugger
21573     fi
21574   fi
21575
21576           oracle_LIBS="-lnnz10"
21577
21578   if test "x$LIBS" = "x"; then
21579     test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21580     LIBS="$oracle_LIBS"
21581   else
21582     apr_addto_bugger="$oracle_LIBS"
21583     for i in $apr_addto_bugger; do
21584       apr_addto_duplicate="0"
21585       for j in $LIBS; do
21586         if test "x$i" = "x$j"; then
21587           apr_addto_duplicate="1"
21588           break
21589         fi
21590       done
21591       if test $apr_addto_duplicate = "0"; then
21592         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21593         LIBS="$LIBS $i"
21594       fi
21595     done
21596   fi
21597
21598           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21599 $as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21600 if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21601   $as_echo_n "(cached) " >&6
21602 else
21603   ac_check_lib_save_LIBS=$LIBS
21604 LIBS="-lclntsh  $LIBS"
21605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21606 /* end confdefs.h.  */
21607
21608 /* Override any GCC internal prototype to avoid an error.
21609    Use char because int might match the return type of a GCC
21610    builtin and then its argument prototype would still apply.  */
21611 #ifdef __cplusplus
21612 extern "C"
21613 #endif
21614 char OCIEnvCreate ();
21615 int
21616 main ()
21617 {
21618 return OCIEnvCreate ();
21619   ;
21620   return 0;
21621 }
21622 _ACEOF
21623 if ac_fn_c_try_link "$LINENO"; then :
21624   ac_cv_lib_clntsh_OCIEnvCreate=yes
21625 else
21626   ac_cv_lib_clntsh_OCIEnvCreate=no
21627 fi
21628 rm -f core conftest.err conftest.$ac_objext \
21629     conftest$ac_exeext conftest.$ac_ext
21630 LIBS=$ac_check_lib_save_LIBS
21631 fi
21632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21633 $as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21634 if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21635   apu_have_oracle=1
21636 fi
21637
21638
21639 fi
21640
21641
21642 fi
21643
21644 fi
21645
21646 done
21647
21648       if test "$apu_have_oracle" != "0"; then
21649         oracle_LDFLAGS="$oracle_LDFLAGS -R$withval/lib"
21650         if test -z "$with_oracle_include"; then
21651
21652   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21653     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/rdbms/demo\""
21654     APRUTIL_PRIV_INCLUDES="-I$withval/rdbms/demo"
21655   else
21656     apr_addto_bugger="-I$withval/rdbms/demo"
21657     for i in $apr_addto_bugger; do
21658       apr_addto_duplicate="0"
21659       for j in $APRUTIL_PRIV_INCLUDES; do
21660         if test "x$i" = "x$j"; then
21661           apr_addto_duplicate="1"
21662           break
21663         fi
21664       done
21665       if test $apr_addto_duplicate = "0"; then
21666         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21667         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21668       fi
21669     done
21670   fi
21671
21672
21673   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21674     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/rdbms/public\""
21675     APRUTIL_PRIV_INCLUDES="-I$withval/rdbms/public"
21676   else
21677     apr_addto_bugger="-I$withval/rdbms/public"
21678     for i in $apr_addto_bugger; do
21679       apr_addto_duplicate="0"
21680       for j in $APRUTIL_PRIV_INCLUDES; do
21681         if test "x$i" = "x$j"; then
21682           apr_addto_duplicate="1"
21683           break
21684         fi
21685       done
21686       if test $apr_addto_duplicate = "0"; then
21687         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21688         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21689       fi
21690     done
21691   fi
21692
21693         fi
21694       fi
21695     fi
21696
21697 fi
21698
21699
21700
21701
21702       if test "$apu_have_oracle" = "1"; then
21703
21704   if test "x$LDADD_dbd_oracle" = "x"; then
21705     test "x$silent" != "xyes" && echo "  setting LDADD_dbd_oracle to \"$oracle_LDFLAGS -lclntsh $oracle_LIBS\""
21706     LDADD_dbd_oracle="$oracle_LDFLAGS -lclntsh $oracle_LIBS"
21707   else
21708     apr_addto_bugger="$oracle_LDFLAGS -lclntsh $oracle_LIBS"
21709     for i in $apr_addto_bugger; do
21710       apr_addto_duplicate="0"
21711       for j in $LDADD_dbd_oracle; do
21712         if test "x$i" = "x$j"; then
21713           apr_addto_duplicate="1"
21714           break
21715         fi
21716       done
21717       if test $apr_addto_duplicate = "0"; then
21718         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_oracle"
21719         LDADD_dbd_oracle="$LDADD_dbd_oracle $i"
21720       fi
21721     done
21722   fi
21723
21724   fi
21725
21726
21727   LIBS="$old_libs"
21728   CPPFLAGS="$old_cppflags"
21729   LDFLAGS="$old_ldflags"
21730
21731
21732   apu_have_odbc=0
21733
21734   old_libs="$LIBS"
21735   old_cppflags="$CPPFLAGS"
21736   old_ldflags="$LDFLAGS"
21737
21738
21739 # Check whether --with-odbc was given.
21740 if test "${with_odbc+set}" = set; then :
21741   withval=$with_odbc;
21742     if test "$withval" = "yes"; then
21743       # Extract the first word of "odbc_config", so it can be a program name with args.
21744 set dummy odbc_config; ac_word=$2
21745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21746 $as_echo_n "checking for $ac_word... " >&6; }
21747 if ${ac_cv_path_ODBC_CONFIG+:} false; then :
21748   $as_echo_n "(cached) " >&6
21749 else
21750   case $ODBC_CONFIG in
21751   [\\/]* | ?:[\\/]*)
21752   ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
21753   ;;
21754   *)
21755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21756 for as_dir in $PATH
21757 do
21758   IFS=$as_save_IFS
21759   test -z "$as_dir" && as_dir=.
21760     for ac_exec_ext in '' $ac_executable_extensions; do
21761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21762     ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21764     break 2
21765   fi
21766 done
21767   done
21768 IFS=$as_save_IFS
21769
21770   ;;
21771 esac
21772 fi
21773 ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
21774 if test -n "$ODBC_CONFIG"; then
21775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
21776 $as_echo "$ODBC_CONFIG" >&6; }
21777 else
21778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21779 $as_echo "no" >&6; }
21780 fi
21781
21782
21783       if test "x$ODBC_CONFIG" != 'x'; then
21784         odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
21785         odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
21786         odbc_LIBS="`$ODBC_CONFIG --libs`"
21787
21788
21789   if test "x$CPPFLAGS" = "x"; then
21790     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
21791     CPPFLAGS="$odbc_CPPFLAGS"
21792   else
21793     apr_addto_bugger="$odbc_CPPFLAGS"
21794     for i in $apr_addto_bugger; do
21795       apr_addto_duplicate="0"
21796       for j in $CPPFLAGS; do
21797         if test "x$i" = "x$j"; then
21798           apr_addto_duplicate="1"
21799           break
21800         fi
21801       done
21802       if test $apr_addto_duplicate = "0"; then
21803         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21804         CPPFLAGS="$CPPFLAGS $i"
21805       fi
21806     done
21807   fi
21808
21809
21810   if test "x$LDFLAGS" = "x"; then
21811     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
21812     LDFLAGS="$odbc_LDFLAGS"
21813   else
21814     apr_addto_bugger="$odbc_LDFLAGS"
21815     for i in $apr_addto_bugger; do
21816       apr_addto_duplicate="0"
21817       for j in $LDFLAGS; do
21818         if test "x$i" = "x$j"; then
21819           apr_addto_duplicate="1"
21820           break
21821         fi
21822       done
21823       if test $apr_addto_duplicate = "0"; then
21824         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
21825         LDFLAGS="$LDFLAGS $i"
21826       fi
21827     done
21828   fi
21829
21830
21831   if test "x$LIBS" = "x"; then
21832     test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
21833     LIBS="$odbc_LIBS"
21834   else
21835     apr_addto_bugger="$odbc_LIBS"
21836     for i in $apr_addto_bugger; do
21837       apr_addto_duplicate="0"
21838       for j in $LIBS; do
21839         if test "x$i" = "x$j"; then
21840           apr_addto_duplicate="1"
21841           break
21842         fi
21843       done
21844       if test $apr_addto_duplicate = "0"; then
21845         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21846         LIBS="$LIBS $i"
21847       fi
21848     done
21849   fi
21850
21851       fi
21852
21853       for ac_header in sql.h
21854 do :
21855   ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
21856 if test "x$ac_cv_header_sql_h" = xyes; then :
21857   cat >>confdefs.h <<_ACEOF
21858 #define HAVE_SQL_H 1
21859 _ACEOF
21860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
21861 $as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
21862 if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
21863   $as_echo_n "(cached) " >&6
21864 else
21865   ac_check_lib_save_LIBS=$LIBS
21866 LIBS="-lodbc  $LIBS"
21867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21868 /* end confdefs.h.  */
21869
21870 /* Override any GCC internal prototype to avoid an error.
21871    Use char because int might match the return type of a GCC
21872    builtin and then its argument prototype would still apply.  */
21873 #ifdef __cplusplus
21874 extern "C"
21875 #endif
21876 char SQLAllocHandle ();
21877 int
21878 main ()
21879 {
21880 return SQLAllocHandle ();
21881   ;
21882   return 0;
21883 }
21884 _ACEOF
21885 if ac_fn_c_try_link "$LINENO"; then :
21886   ac_cv_lib_odbc_SQLAllocHandle=yes
21887 else
21888   ac_cv_lib_odbc_SQLAllocHandle=no
21889 fi
21890 rm -f core conftest.err conftest.$ac_objext \
21891     conftest$ac_exeext conftest.$ac_ext
21892 LIBS=$ac_check_lib_save_LIBS
21893 fi
21894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
21895 $as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
21896 if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
21897   apu_have_odbc=1
21898 fi
21899
21900 fi
21901
21902 done
21903
21904       if test "$apu_have_odbc" = "0"; then
21905         for ac_header in odbc/sql.h
21906 do :
21907   ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
21908 if test "x$ac_cv_header_odbc_sql_h" = xyes; then :
21909   cat >>confdefs.h <<_ACEOF
21910 #define HAVE_ODBC_SQL_H 1
21911 _ACEOF
21912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
21913 $as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
21914 if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
21915   $as_echo_n "(cached) " >&6
21916 else
21917   ac_check_lib_save_LIBS=$LIBS
21918 LIBS="-lodbc  $LIBS"
21919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21920 /* end confdefs.h.  */
21921
21922 /* Override any GCC internal prototype to avoid an error.
21923    Use char because int might match the return type of a GCC
21924    builtin and then its argument prototype would still apply.  */
21925 #ifdef __cplusplus
21926 extern "C"
21927 #endif
21928 char SQLAllocHandle ();
21929 int
21930 main ()
21931 {
21932 return SQLAllocHandle ();
21933   ;
21934   return 0;
21935 }
21936 _ACEOF
21937 if ac_fn_c_try_link "$LINENO"; then :
21938   ac_cv_lib_odbc_SQLAllocHandle=yes
21939 else
21940   ac_cv_lib_odbc_SQLAllocHandle=no
21941 fi
21942 rm -f core conftest.err conftest.$ac_objext \
21943     conftest$ac_exeext conftest.$ac_ext
21944 LIBS=$ac_check_lib_save_LIBS
21945 fi
21946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
21947 $as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
21948 if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
21949   apu_have_odbc=1
21950 fi
21951
21952 fi
21953
21954 done
21955
21956       fi
21957       if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
21958
21959   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21960     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
21961     APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
21962   else
21963     apr_addto_bugger="$odbc_CPPFLAGS"
21964     for i in $apr_addto_bugger; do
21965       apr_addto_duplicate="0"
21966       for j in $APRUTIL_PRIV_INCLUDES; do
21967         if test "x$i" = "x$j"; then
21968           apr_addto_duplicate="1"
21969           break
21970         fi
21971       done
21972       if test $apr_addto_duplicate = "0"; then
21973         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21974         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21975       fi
21976     done
21977   fi
21978
21979       fi
21980     elif test "$withval" = "no"; then
21981       :
21982     else
21983       # Extract the first word of "odbc_config", so it can be a program name with args.
21984 set dummy odbc_config; ac_word=$2
21985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21986 $as_echo_n "checking for $ac_word... " >&6; }
21987 if ${ac_cv_path_ODBC_CONFIG+:} false; then :
21988   $as_echo_n "(cached) " >&6
21989 else
21990   case $ODBC_CONFIG in
21991   [\\/]* | ?:[\\/]*)
21992   ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
21993   ;;
21994   *)
21995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21996 for as_dir in $withval/bin
21997 do
21998   IFS=$as_save_IFS
21999   test -z "$as_dir" && as_dir=.
22000     for ac_exec_ext in '' $ac_executable_extensions; do
22001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22002     ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22004     break 2
22005   fi
22006 done
22007   done
22008 IFS=$as_save_IFS
22009
22010   ;;
22011 esac
22012 fi
22013 ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22014 if test -n "$ODBC_CONFIG"; then
22015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22016 $as_echo "$ODBC_CONFIG" >&6; }
22017 else
22018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22019 $as_echo "no" >&6; }
22020 fi
22021
22022
22023       if test "x$ODBC_CONFIG" != 'x'; then
22024         odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22025         odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22026         odbc_LIBS="`$ODBC_CONFIG --libs`"
22027       else
22028         if test -f "$withval" && test -x "$withval"; then
22029           odbc_CPPFLAGS="-I`$withval --include-prefix`"
22030           odbc_LDFLAGS="-L`$withval --lib-prefix`"
22031           odbc_LIBS="`$withval --libs`"
22032         else
22033           odbc_CPPFLAGS="-I$withval/include"
22034           odbc_LDFLAGS="-L$withval/lib "
22035         fi
22036       fi
22037
22038
22039   if test "x$CPPFLAGS" = "x"; then
22040     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22041     CPPFLAGS="$odbc_CPPFLAGS"
22042   else
22043     apr_addto_bugger="$odbc_CPPFLAGS"
22044     for i in $apr_addto_bugger; do
22045       apr_addto_duplicate="0"
22046       for j in $CPPFLAGS; do
22047         if test "x$i" = "x$j"; then
22048           apr_addto_duplicate="1"
22049           break
22050         fi
22051       done
22052       if test $apr_addto_duplicate = "0"; then
22053         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22054         CPPFLAGS="$CPPFLAGS $i"
22055       fi
22056     done
22057   fi
22058
22059
22060   if test "x$LDFLAGS" = "x"; then
22061     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22062     LDFLAGS="$odbc_LDFLAGS"
22063   else
22064     apr_addto_bugger="$odbc_LDFLAGS"
22065     for i in $apr_addto_bugger; do
22066       apr_addto_duplicate="0"
22067       for j in $LDFLAGS; do
22068         if test "x$i" = "x$j"; then
22069           apr_addto_duplicate="1"
22070           break
22071         fi
22072       done
22073       if test $apr_addto_duplicate = "0"; then
22074         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22075         LDFLAGS="$LDFLAGS $i"
22076       fi
22077     done
22078   fi
22079
22080
22081   if test "x$LIBS" = "x"; then
22082     test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22083     LIBS="$odbc_LIBS"
22084   else
22085     apr_addto_bugger="$odbc_LIBS"
22086     for i in $apr_addto_bugger; do
22087       apr_addto_duplicate="0"
22088       for j in $LIBS; do
22089         if test "x$i" = "x$j"; then
22090           apr_addto_duplicate="1"
22091           break
22092         fi
22093       done
22094       if test $apr_addto_duplicate = "0"; then
22095         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22096         LIBS="$LIBS $i"
22097       fi
22098     done
22099   fi
22100
22101
22102       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for odbc in $withval" >&5
22103 $as_echo "$as_me: checking for odbc in $withval" >&6;}
22104       for ac_header in sql.h
22105 do :
22106   ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22107 if test "x$ac_cv_header_sql_h" = xyes; then :
22108   cat >>confdefs.h <<_ACEOF
22109 #define HAVE_SQL_H 1
22110 _ACEOF
22111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22112 $as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22113 if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22114   $as_echo_n "(cached) " >&6
22115 else
22116   ac_check_lib_save_LIBS=$LIBS
22117 LIBS="-lodbc  $LIBS"
22118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22119 /* end confdefs.h.  */
22120
22121 /* Override any GCC internal prototype to avoid an error.
22122    Use char because int might match the return type of a GCC
22123    builtin and then its argument prototype would still apply.  */
22124 #ifdef __cplusplus
22125 extern "C"
22126 #endif
22127 char SQLAllocHandle ();
22128 int
22129 main ()
22130 {
22131 return SQLAllocHandle ();
22132   ;
22133   return 0;
22134 }
22135 _ACEOF
22136 if ac_fn_c_try_link "$LINENO"; then :
22137   ac_cv_lib_odbc_SQLAllocHandle=yes
22138 else
22139   ac_cv_lib_odbc_SQLAllocHandle=no
22140 fi
22141 rm -f core conftest.err conftest.$ac_objext \
22142     conftest$ac_exeext conftest.$ac_ext
22143 LIBS=$ac_check_lib_save_LIBS
22144 fi
22145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22146 $as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22147 if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22148   apu_have_odbc=1
22149 fi
22150
22151 fi
22152
22153 done
22154
22155       if test "$apu_have_odbc" = "0"; then
22156         for ac_header in odbc/sql.h
22157 do :
22158   ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22159 if test "x$ac_cv_header_odbc_sql_h" = xyes; then :
22160   cat >>confdefs.h <<_ACEOF
22161 #define HAVE_ODBC_SQL_H 1
22162 _ACEOF
22163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22164 $as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22165 if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22166   $as_echo_n "(cached) " >&6
22167 else
22168   ac_check_lib_save_LIBS=$LIBS
22169 LIBS="-lodbc  $LIBS"
22170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22171 /* end confdefs.h.  */
22172
22173 /* Override any GCC internal prototype to avoid an error.
22174    Use char because int might match the return type of a GCC
22175    builtin and then its argument prototype would still apply.  */
22176 #ifdef __cplusplus
22177 extern "C"
22178 #endif
22179 char SQLAllocHandle ();
22180 int
22181 main ()
22182 {
22183 return SQLAllocHandle ();
22184   ;
22185   return 0;
22186 }
22187 _ACEOF
22188 if ac_fn_c_try_link "$LINENO"; then :
22189   ac_cv_lib_odbc_SQLAllocHandle=yes
22190 else
22191   ac_cv_lib_odbc_SQLAllocHandle=no
22192 fi
22193 rm -f core conftest.err conftest.$ac_objext \
22194     conftest$ac_exeext conftest.$ac_ext
22195 LIBS=$ac_check_lib_save_LIBS
22196 fi
22197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22198 $as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22199 if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22200   apu_have_odbc=1
22201 fi
22202
22203 fi
22204
22205 done
22206
22207       fi
22208       if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22209
22210   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22211     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22212     APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22213   else
22214     apr_addto_bugger="$odbc_CPPFLAGS"
22215     for i in $apr_addto_bugger; do
22216       apr_addto_duplicate="0"
22217       for j in $APRUTIL_PRIV_INCLUDES; do
22218         if test "x$i" = "x$j"; then
22219           apr_addto_duplicate="1"
22220           break
22221         fi
22222       done
22223       if test $apr_addto_duplicate = "0"; then
22224         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22225         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22226       fi
22227     done
22228   fi
22229
22230       fi
22231     fi
22232
22233 else
22234
22235     # Extract the first word of "odbc_config", so it can be a program name with args.
22236 set dummy odbc_config; ac_word=$2
22237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22238 $as_echo_n "checking for $ac_word... " >&6; }
22239 if ${ac_cv_path_ODBC_CONFIG+:} false; then :
22240   $as_echo_n "(cached) " >&6
22241 else
22242   case $ODBC_CONFIG in
22243   [\\/]* | ?:[\\/]*)
22244   ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
22245   ;;
22246   *)
22247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22248 for as_dir in $PATH
22249 do
22250   IFS=$as_save_IFS
22251   test -z "$as_dir" && as_dir=.
22252     for ac_exec_ext in '' $ac_executable_extensions; do
22253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22254     ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22256     break 2
22257   fi
22258 done
22259   done
22260 IFS=$as_save_IFS
22261
22262   ;;
22263 esac
22264 fi
22265 ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22266 if test -n "$ODBC_CONFIG"; then
22267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22268 $as_echo "$ODBC_CONFIG" >&6; }
22269 else
22270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22271 $as_echo "no" >&6; }
22272 fi
22273
22274
22275     if test "x$ODBC_CONFIG" != 'x'; then
22276       odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22277       odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22278       odbc_LIBS="`$ODBC_CONFIG --libs`"
22279
22280
22281   if test "x$CPPFLAGS" = "x"; then
22282     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22283     CPPFLAGS="$odbc_CPPFLAGS"
22284   else
22285     apr_addto_bugger="$odbc_CPPFLAGS"
22286     for i in $apr_addto_bugger; do
22287       apr_addto_duplicate="0"
22288       for j in $CPPFLAGS; do
22289         if test "x$i" = "x$j"; then
22290           apr_addto_duplicate="1"
22291           break
22292         fi
22293       done
22294       if test $apr_addto_duplicate = "0"; then
22295         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22296         CPPFLAGS="$CPPFLAGS $i"
22297       fi
22298     done
22299   fi
22300
22301
22302   if test "x$LDFLAGS" = "x"; then
22303     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22304     LDFLAGS="$odbc_LDFLAGS"
22305   else
22306     apr_addto_bugger="$odbc_LDFLAGS"
22307     for i in $apr_addto_bugger; do
22308       apr_addto_duplicate="0"
22309       for j in $LDFLAGS; do
22310         if test "x$i" = "x$j"; then
22311           apr_addto_duplicate="1"
22312           break
22313         fi
22314       done
22315       if test $apr_addto_duplicate = "0"; then
22316         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22317         LDFLAGS="$LDFLAGS $i"
22318       fi
22319     done
22320   fi
22321
22322
22323   if test "x$LIBS" = "x"; then
22324     test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22325     LIBS="$odbc_LIBS"
22326   else
22327     apr_addto_bugger="$odbc_LIBS"
22328     for i in $apr_addto_bugger; do
22329       apr_addto_duplicate="0"
22330       for j in $LIBS; do
22331         if test "x$i" = "x$j"; then
22332           apr_addto_duplicate="1"
22333           break
22334         fi
22335       done
22336       if test $apr_addto_duplicate = "0"; then
22337         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22338         LIBS="$LIBS $i"
22339       fi
22340     done
22341   fi
22342
22343     fi
22344
22345     for ac_header in sql.h
22346 do :
22347   ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22348 if test "x$ac_cv_header_sql_h" = xyes; then :
22349   cat >>confdefs.h <<_ACEOF
22350 #define HAVE_SQL_H 1
22351 _ACEOF
22352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22353 $as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22354 if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22355   $as_echo_n "(cached) " >&6
22356 else
22357   ac_check_lib_save_LIBS=$LIBS
22358 LIBS="-lodbc  $LIBS"
22359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22360 /* end confdefs.h.  */
22361
22362 /* Override any GCC internal prototype to avoid an error.
22363    Use char because int might match the return type of a GCC
22364    builtin and then its argument prototype would still apply.  */
22365 #ifdef __cplusplus
22366 extern "C"
22367 #endif
22368 char SQLAllocHandle ();
22369 int
22370 main ()
22371 {
22372 return SQLAllocHandle ();
22373   ;
22374   return 0;
22375 }
22376 _ACEOF
22377 if ac_fn_c_try_link "$LINENO"; then :
22378   ac_cv_lib_odbc_SQLAllocHandle=yes
22379 else
22380   ac_cv_lib_odbc_SQLAllocHandle=no
22381 fi
22382 rm -f core conftest.err conftest.$ac_objext \
22383     conftest$ac_exeext conftest.$ac_ext
22384 LIBS=$ac_check_lib_save_LIBS
22385 fi
22386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22387 $as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22388 if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22389   apu_have_odbc=1
22390 fi
22391
22392 fi
22393
22394 done
22395
22396     if test "$apu_have_odbc" = "0"; then
22397       for ac_header in odbc/sql.h
22398 do :
22399   ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22400 if test "x$ac_cv_header_odbc_sql_h" = xyes; then :
22401   cat >>confdefs.h <<_ACEOF
22402 #define HAVE_ODBC_SQL_H 1
22403 _ACEOF
22404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22405 $as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22406 if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22407   $as_echo_n "(cached) " >&6
22408 else
22409   ac_check_lib_save_LIBS=$LIBS
22410 LIBS="-lodbc  $LIBS"
22411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22412 /* end confdefs.h.  */
22413
22414 /* Override any GCC internal prototype to avoid an error.
22415    Use char because int might match the return type of a GCC
22416    builtin and then its argument prototype would still apply.  */
22417 #ifdef __cplusplus
22418 extern "C"
22419 #endif
22420 char SQLAllocHandle ();
22421 int
22422 main ()
22423 {
22424 return SQLAllocHandle ();
22425   ;
22426   return 0;
22427 }
22428 _ACEOF
22429 if ac_fn_c_try_link "$LINENO"; then :
22430   ac_cv_lib_odbc_SQLAllocHandle=yes
22431 else
22432   ac_cv_lib_odbc_SQLAllocHandle=no
22433 fi
22434 rm -f core conftest.err conftest.$ac_objext \
22435     conftest$ac_exeext conftest.$ac_ext
22436 LIBS=$ac_check_lib_save_LIBS
22437 fi
22438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22439 $as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22440 if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22441   apu_have_odbc=1
22442 fi
22443
22444 fi
22445
22446 done
22447
22448     fi
22449     if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22450
22451   if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22452     test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22453     APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22454   else
22455     apr_addto_bugger="$odbc_CPPFLAGS"
22456     for i in $apr_addto_bugger; do
22457       apr_addto_duplicate="0"
22458       for j in $APRUTIL_PRIV_INCLUDES; do
22459         if test "x$i" = "x$j"; then
22460           apr_addto_duplicate="1"
22461           break
22462         fi
22463       done
22464       if test $apr_addto_duplicate = "0"; then
22465         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22466         APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22467       fi
22468     done
22469   fi
22470
22471     fi
22472
22473 fi
22474
22475
22476       if test "$apu_have_odbc" = "1"; then
22477
22478   if test "x$LDADD_dbd_odbc" = "x"; then
22479     test "x$silent" != "xyes" && echo "  setting LDADD_dbd_odbc to \"$odbc_LDFLAGS -lodbc $odbc_LIBS\""
22480     LDADD_dbd_odbc="$odbc_LDFLAGS -lodbc $odbc_LIBS"
22481   else
22482     apr_addto_bugger="$odbc_LDFLAGS -lodbc $odbc_LIBS"
22483     for i in $apr_addto_bugger; do
22484       apr_addto_duplicate="0"
22485       for j in $LDADD_dbd_odbc; 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 LDADD_dbd_odbc"
22493         LDADD_dbd_odbc="$LDADD_dbd_odbc $i"
22494       fi
22495     done
22496   fi
22497
22498   fi
22499
22500
22501   LIBS="$old_libs"
22502   CPPFLAGS="$old_cppflags"
22503   LDFLAGS="$old_ldflags"
22504
22505   apu_dbd_tests=""
22506   test $apu_have_oracle = 1 &&  apu_dbd_tests="$apu_dbd_tests oracle"
22507   test $apu_have_pgsql = 1 &&   apu_dbd_tests="$apu_dbd_tests pgsql"
22508   test $apu_have_mysql = 1 &&   apu_dbd_tests="$apu_dbd_tests mysql"
22509   test $apu_have_sqlite2 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite2"
22510   test $apu_have_sqlite3 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite3"
22511   test $apu_have_odbc = 1 &&    apu_dbd_tests="$apu_dbd_tests odbc"
22512
22513
22514
22515
22516 save_cppflags="$CPPFLAGS"
22517 save_ldflags="$LDFLAGS"
22518
22519 apu_has_expat=0
22520
22521 apu_try_external_expat=1
22522
22523
22524 # Check whether --with-expat was given.
22525 if test "${with_expat+set}" = set; then :
22526   withval=$with_expat;
22527   if test "$withval" = "yes"; then
22528     as_fn_error $? "a directory must be specified for --with-expat" "$LINENO" 5
22529   elif test "$withval" = "no"; then
22530     as_fn_error $? "Expat cannot be disabled (at this time)" "$LINENO" 5
22531   else
22532     # Add given path to standard search paths if appropriate:
22533     if test "$withval" != "/usr"; then
22534
22535   if test "x$LDFLAGS" = "x"; then
22536     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$withval/lib\""
22537     LDFLAGS="-L$withval/lib"
22538   else
22539     apr_addto_bugger="-L$withval/lib"
22540     for i in $apr_addto_bugger; do
22541       apr_addto_duplicate="0"
22542       for j in $LDFLAGS; do
22543         if test "x$i" = "x$j"; then
22544           apr_addto_duplicate="1"
22545           break
22546         fi
22547       done
22548       if test $apr_addto_duplicate = "0"; then
22549         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22550         LDFLAGS="$LDFLAGS $i"
22551       fi
22552     done
22553   fi
22554
22555
22556   if test "x$CPPFLAGS" = "x"; then
22557     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$withval/include\""
22558     CPPFLAGS="-I$withval/include"
22559   else
22560     apr_addto_bugger="-I$withval/include"
22561     for i in $apr_addto_bugger; do
22562       apr_addto_duplicate="0"
22563       for j in $CPPFLAGS; do
22564         if test "x$i" = "x$j"; then
22565           apr_addto_duplicate="1"
22566           break
22567         fi
22568       done
22569       if test $apr_addto_duplicate = "0"; then
22570         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22571         CPPFLAGS="$CPPFLAGS $i"
22572       fi
22573     done
22574   fi
22575
22576
22577   if test "x$APRUTIL_INCLUDES" = "x"; then
22578     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
22579     APRUTIL_INCLUDES="-I$withval/include"
22580   else
22581     apr_addto_bugger="-I$withval/include"
22582     for i in $apr_addto_bugger; do
22583       apr_addto_duplicate="0"
22584       for j in $APRUTIL_INCLUDES; do
22585         if test "x$i" = "x$j"; then
22586           apr_addto_duplicate="1"
22587           break
22588         fi
22589       done
22590       if test $apr_addto_duplicate = "0"; then
22591         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
22592         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
22593       fi
22594     done
22595   fi
22596
22597
22598   if test "x$APRUTIL_LDFLAGS" = "x"; then
22599     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
22600     APRUTIL_LDFLAGS="-L$withval/lib"
22601   else
22602     apr_addto_bugger="-L$withval/lib"
22603     for i in $apr_addto_bugger; do
22604       apr_addto_duplicate="0"
22605       for j in $APRUTIL_LDFLAGS; do
22606         if test "x$i" = "x$j"; then
22607           apr_addto_duplicate="1"
22608           break
22609         fi
22610       done
22611       if test $apr_addto_duplicate = "0"; then
22612         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
22613         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
22614       fi
22615     done
22616   fi
22617
22618     fi
22619   fi
22620
22621 fi
22622
22623
22624 if test $apu_try_external_expat = 1; then
22625
22626
22627
22628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.95.x" >&5
22629 $as_echo_n "checking Expat 1.95.x... " >&6; }
22630 if ${apu_cv_expat_system+:} false; then :
22631   $as_echo_n "(cached) " >&6
22632 else
22633
22634   apu_expat_LIBS=$LIBS
22635   LIBS="$LIBS -lexpat"
22636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22637 /* end confdefs.h.  */
22638 #include <stdlib.h>
22639 #include <expat.h>
22640 int
22641 main ()
22642 {
22643 XML_ParserCreate(NULL);
22644   ;
22645   return 0;
22646 }
22647 _ACEOF
22648 if ac_fn_c_try_link "$LINENO"; then :
22649   apu_cv_expat_system=yes
22650 else
22651   apu_cv_expat_system=no
22652 fi
22653 rm -f core conftest.err conftest.$ac_objext \
22654     conftest$ac_exeext conftest.$ac_ext
22655   LIBS=$apu_expat_LIBS
22656
22657 fi
22658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_system" >&5
22659 $as_echo "$apu_cv_expat_system" >&6; }
22660
22661 if test $apu_cv_expat_system = yes; then
22662
22663 $as_echo "#define HAVE_EXPAT_H 1" >>confdefs.h
22664
22665    apu_expat_libs="-lexpat"
22666    apu_has_expat=1
22667
22668 else
22669    apu_has_expat=0
22670
22671 fi
22672
22673
22674   if test $apu_has_expat = 0; then
22675
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking old Debian-packaged expat" >&5
22677 $as_echo_n "checking old Debian-packaged expat... " >&6; }
22678 if ${apu_cv_expat_debian+:} false; then :
22679   $as_echo_n "(cached) " >&6
22680 else
22681
22682   apu_expat_LIBS=$LIBS
22683   LIBS="$LIBS -lxmlparse -lxmltok"
22684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22685 /* end confdefs.h.  */
22686 #include <stdlib.h>
22687 #include <xmltok/xmlparse.h>
22688 int
22689 main ()
22690 {
22691 XML_ParserCreate(NULL);
22692   ;
22693   return 0;
22694 }
22695 _ACEOF
22696 if ac_fn_c_try_link "$LINENO"; then :
22697   apu_cv_expat_debian=yes
22698 else
22699   apu_cv_expat_debian=no
22700 fi
22701 rm -f core conftest.err conftest.$ac_objext \
22702     conftest$ac_exeext conftest.$ac_ext
22703   LIBS=$apu_expat_LIBS
22704
22705 fi
22706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_debian" >&5
22707 $as_echo "$apu_cv_expat_debian" >&6; }
22708
22709 if test $apu_cv_expat_debian = yes; then
22710
22711 $as_echo "#define HAVE_XMLTOK_XMLPARSE_H 1" >>confdefs.h
22712
22713    apu_expat_libs="-lxmlparse -lxmltok"
22714    apu_has_expat=1
22715
22716 else
22717    apu_has_expat=0
22718
22719 fi
22720
22721   fi
22722
22723   if test $apu_has_expat = 0; then
22724
22725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking old FreeBSD-packaged expat" >&5
22726 $as_echo_n "checking old FreeBSD-packaged expat... " >&6; }
22727 if ${apu_cv_expat_freebsd+:} false; then :
22728   $as_echo_n "(cached) " >&6
22729 else
22730
22731   apu_expat_LIBS=$LIBS
22732   LIBS="$LIBS -lexpat"
22733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22734 /* end confdefs.h.  */
22735 #include <stdlib.h>
22736 #include <xml/xmlparse.h>
22737 int
22738 main ()
22739 {
22740 XML_ParserCreate(NULL);
22741   ;
22742   return 0;
22743 }
22744 _ACEOF
22745 if ac_fn_c_try_link "$LINENO"; then :
22746   apu_cv_expat_freebsd=yes
22747 else
22748   apu_cv_expat_freebsd=no
22749 fi
22750 rm -f core conftest.err conftest.$ac_objext \
22751     conftest$ac_exeext conftest.$ac_ext
22752   LIBS=$apu_expat_LIBS
22753
22754 fi
22755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_freebsd" >&5
22756 $as_echo "$apu_cv_expat_freebsd" >&6; }
22757
22758 if test $apu_cv_expat_freebsd = yes; then
22759
22760 $as_echo "#define HAVE_XML_XMLPARSE_H 1" >>confdefs.h
22761
22762    apu_expat_libs="-lexpat"
22763    apu_has_expat=1
22764
22765 else
22766    apu_has_expat=0
22767
22768 fi
22769
22770   fi
22771
22772   if test $apu_has_expat = 0; then
22773
22774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.0/1.1" >&5
22775 $as_echo_n "checking Expat 1.0/1.1... " >&6; }
22776 if ${apu_cv_expat_1011+:} false; then :
22777   $as_echo_n "(cached) " >&6
22778 else
22779
22780   apu_expat_LIBS=$LIBS
22781   LIBS="$LIBS -lexpat"
22782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22783 /* end confdefs.h.  */
22784 #include <stdlib.h>
22785 #include <xmlparse/xmlparse.h>
22786 int
22787 main ()
22788 {
22789 XML_ParserCreate(NULL);
22790   ;
22791   return 0;
22792 }
22793 _ACEOF
22794 if ac_fn_c_try_link "$LINENO"; then :
22795   apu_cv_expat_1011=yes
22796 else
22797   apu_cv_expat_1011=no
22798 fi
22799 rm -f core conftest.err conftest.$ac_objext \
22800     conftest$ac_exeext conftest.$ac_ext
22801   LIBS=$apu_expat_LIBS
22802
22803 fi
22804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_1011" >&5
22805 $as_echo "$apu_cv_expat_1011" >&6; }
22806
22807 if test $apu_cv_expat_1011 = yes; then
22808
22809 $as_echo "#define HAVE_XMLPARSE_XMLPARSE_H 1" >>confdefs.h
22810
22811    apu_expat_libs="-lexpat"
22812    apu_has_expat=1
22813
22814 else
22815    apu_has_expat=0
22816
22817 fi
22818
22819   fi
22820
22821   if test $apu_has_expat = 0; then
22822
22823   if test "x$LDFLAGS" = "x"; then
22824     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L/usr/local/lib\""
22825     LDFLAGS="-L/usr/local/lib"
22826   else
22827     apr_addto_bugger="-L/usr/local/lib"
22828     for i in $apr_addto_bugger; do
22829       apr_addto_duplicate="0"
22830       for j in $LDFLAGS; do
22831         if test "x$i" = "x$j"; then
22832           apr_addto_duplicate="1"
22833           break
22834         fi
22835       done
22836       if test $apr_addto_duplicate = "0"; then
22837         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22838         LDFLAGS="$LDFLAGS $i"
22839       fi
22840     done
22841   fi
22842
22843
22844   if test "x$CPPFLAGS" = "x"; then
22845     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I/usr/local/include\""
22846     CPPFLAGS="-I/usr/local/include"
22847   else
22848     apr_addto_bugger="-I/usr/local/include"
22849     for i in $apr_addto_bugger; do
22850       apr_addto_duplicate="0"
22851       for j in $CPPFLAGS; do
22852         if test "x$i" = "x$j"; then
22853           apr_addto_duplicate="1"
22854           break
22855         fi
22856       done
22857       if test $apr_addto_duplicate = "0"; then
22858         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22859         CPPFLAGS="$CPPFLAGS $i"
22860       fi
22861     done
22862   fi
22863
22864
22865
22866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.95.x in /usr/local" >&5
22867 $as_echo_n "checking Expat 1.95.x in /usr/local... " >&6; }
22868 if ${apu_cv_expat_usrlocal+:} false; then :
22869   $as_echo_n "(cached) " >&6
22870 else
22871
22872   apu_expat_LIBS=$LIBS
22873   LIBS="$LIBS -lexpat"
22874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22875 /* end confdefs.h.  */
22876 #include <stdlib.h>
22877 #include <expat.h>
22878 int
22879 main ()
22880 {
22881 XML_ParserCreate(NULL);
22882   ;
22883   return 0;
22884 }
22885 _ACEOF
22886 if ac_fn_c_try_link "$LINENO"; then :
22887   apu_cv_expat_usrlocal=yes
22888 else
22889   apu_cv_expat_usrlocal=no
22890 fi
22891 rm -f core conftest.err conftest.$ac_objext \
22892     conftest$ac_exeext conftest.$ac_ext
22893   LIBS=$apu_expat_LIBS
22894
22895 fi
22896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_usrlocal" >&5
22897 $as_echo "$apu_cv_expat_usrlocal" >&6; }
22898
22899 if test $apu_cv_expat_usrlocal = yes; then
22900
22901 $as_echo "#define HAVE_EXPAT_H 1" >>confdefs.h
22902
22903    apu_expat_libs="-lexpat"
22904    apu_has_expat=1
22905
22906   if test "x$APRUTIL_INCLUDES" = "x"; then
22907     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I/usr/local/include\""
22908     APRUTIL_INCLUDES="-I/usr/local/include"
22909   else
22910     apr_addto_bugger="-I/usr/local/include"
22911     for i in $apr_addto_bugger; do
22912       apr_addto_duplicate="0"
22913       for j in $APRUTIL_INCLUDES; do
22914         if test "x$i" = "x$j"; then
22915           apr_addto_duplicate="1"
22916           break
22917         fi
22918       done
22919       if test $apr_addto_duplicate = "0"; then
22920         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
22921         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
22922       fi
22923     done
22924   fi
22925
22926
22927   if test "x$APRUTIL_LDFLAGS" = "x"; then
22928     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L/usr/local/lib\""
22929     APRUTIL_LDFLAGS="-L/usr/local/lib"
22930   else
22931     apr_addto_bugger="-L/usr/local/lib"
22932     for i in $apr_addto_bugger; do
22933       apr_addto_duplicate="0"
22934       for j in $APRUTIL_LDFLAGS; do
22935         if test "x$i" = "x$j"; then
22936           apr_addto_duplicate="1"
22937           break
22938         fi
22939       done
22940       if test $apr_addto_duplicate = "0"; then
22941         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
22942         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
22943       fi
22944     done
22945   fi
22946
22947 else
22948    apu_has_expat=0
22949
22950
22951   if test "x$LDFLAGS" = "x-L/usr/local/lib"; then
22952     test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
22953     LDFLAGS=""
22954   else
22955     apr_new_bugger=""
22956     apr_removed=0
22957     for i in $LDFLAGS; do
22958       if test "x$i" != "x-L/usr/local/lib"; then
22959         apr_new_bugger="$apr_new_bugger $i"
22960       else
22961         apr_removed=1
22962       fi
22963     done
22964     if test $apr_removed = "1"; then
22965       test "x$silent" != "xyes" && echo "  removed \"-L/usr/local/lib\" from LDFLAGS"
22966       LDFLAGS=$apr_new_bugger
22967     fi
22968   fi
22969
22970
22971   if test "x$CPPFLAGS" = "x-I/usr/local/include"; then
22972     test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
22973     CPPFLAGS=""
22974   else
22975     apr_new_bugger=""
22976     apr_removed=0
22977     for i in $CPPFLAGS; do
22978       if test "x$i" != "x-I/usr/local/include"; then
22979         apr_new_bugger="$apr_new_bugger $i"
22980       else
22981         apr_removed=1
22982       fi
22983     done
22984     if test $apr_removed = "1"; then
22985       test "x$silent" != "xyes" && echo "  removed \"-I/usr/local/include\" from CPPFLAGS"
22986       CPPFLAGS=$apr_new_bugger
22987     fi
22988   fi
22989
22990
22991 fi
22992
22993   fi
22994
22995 fi
22996
22997
22998   if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
22999     test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$apu_expat_libs\""
23000     APRUTIL_EXPORT_LIBS="$apu_expat_libs"
23001   else
23002     apr_addto_bugger="$apu_expat_libs"
23003     for i in $apr_addto_bugger; do
23004       apr_addto_duplicate="0"
23005       for j in $APRUTIL_EXPORT_LIBS; do
23006         if test "x$i" = "x$j"; then
23007           apr_addto_duplicate="1"
23008           break
23009         fi
23010       done
23011       if test $apr_addto_duplicate = "0"; then
23012         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
23013         APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
23014       fi
23015     done
23016   fi
23017
23018
23019   if test "x$APRUTIL_LIBS" = "x"; then
23020     test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_expat_libs\""
23021     APRUTIL_LIBS="$apu_expat_libs"
23022   else
23023     apr_addto_bugger="$apu_expat_libs"
23024     for i in $apr_addto_bugger; do
23025       apr_addto_duplicate="0"
23026       for j in $APRUTIL_LIBS; 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_LIBS"
23034         APRUTIL_LIBS="$APRUTIL_LIBS $i"
23035       fi
23036     done
23037   fi
23038
23039
23040 CPPFLAGS=$save_cppflags
23041 LDFLAGS=$save_ldflags
23042
23043
23044
23045 apu_iconv_dir="unknown"
23046 have_apr_iconv="0"
23047 want_iconv="1"
23048
23049 # Check whether --with-iconv was given.
23050 if test "${with_iconv+set}" = set; then :
23051   withval=$with_iconv;  apu_iconv_dir="$withval"
23052     if test "$apu_iconv_dir" = "no"; then
23053       have_apr_iconv="0"
23054       have_iconv="0"
23055       want_iconv="0"
23056     elif test "$apu_iconv_dir" != "yes"; then
23057       if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
23058         have_apr_iconv="1"
23059         have_iconv="0"
23060
23061   if test "x$APRUTIL_INCLUDES" = "x"; then
23062     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include/apr-1\""
23063     APRUTIL_INCLUDES="-I$apu_iconv_dir/include/apr-1"
23064   else
23065     apr_addto_bugger="-I$apu_iconv_dir/include/apr-1"
23066     for i in $apr_addto_bugger; do
23067       apr_addto_duplicate="0"
23068       for j in $APRUTIL_INCLUDES; do
23069         if test "x$i" = "x$j"; then
23070           apr_addto_duplicate="1"
23071           break
23072         fi
23073       done
23074       if test $apr_addto_duplicate = "0"; then
23075         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23076         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23077       fi
23078     done
23079   fi
23080
23081
23082   if test "x$APRUTIL_LIBS" = "x"; then
23083     test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_iconv_dir/lib/libapriconv-1.la\""
23084     APRUTIL_LIBS="$apu_iconv_dir/lib/libapriconv-1.la"
23085   else
23086     apr_addto_bugger="$apu_iconv_dir/lib/libapriconv-1.la"
23087     for i in $apr_addto_bugger; do
23088       apr_addto_duplicate="0"
23089       for j in $APRUTIL_LIBS; do
23090         if test "x$i" = "x$j"; then
23091           apr_addto_duplicate="1"
23092           break
23093         fi
23094       done
23095       if test $apr_addto_duplicate = "0"; then
23096         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23097         APRUTIL_LIBS="$APRUTIL_LIBS $i"
23098       fi
23099     done
23100   fi
23101
23102         { $as_echo "$as_me:${as_lineno-$LINENO}: result: using apr-iconv" >&5
23103 $as_echo "using apr-iconv" >&6; }
23104       elif test -f "$apu_iconv_dir/include/iconv.h"; then
23105         have_apr_iconv="0"
23106         have_iconv="1"
23107
23108   if test "x$CPPFLAGS" = "x"; then
23109     test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$apu_iconv_dir/include\""
23110     CPPFLAGS="-I$apu_iconv_dir/include"
23111   else
23112     apr_addto_bugger="-I$apu_iconv_dir/include"
23113     for i in $apr_addto_bugger; do
23114       apr_addto_duplicate="0"
23115       for j in $CPPFLAGS; do
23116         if test "x$i" = "x$j"; then
23117           apr_addto_duplicate="1"
23118           break
23119         fi
23120       done
23121       if test $apr_addto_duplicate = "0"; then
23122         test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
23123         CPPFLAGS="$CPPFLAGS $i"
23124       fi
23125     done
23126   fi
23127
23128
23129   if test "x$LDFLAGS" = "x"; then
23130     test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$apu_iconv_dir/lib\""
23131     LDFLAGS="-L$apu_iconv_dir/lib"
23132   else
23133     apr_addto_bugger="-L$apu_iconv_dir/lib"
23134     for i in $apr_addto_bugger; do
23135       apr_addto_duplicate="0"
23136       for j in $LDFLAGS; do
23137         if test "x$i" = "x$j"; then
23138           apr_addto_duplicate="1"
23139           break
23140         fi
23141       done
23142       if test $apr_addto_duplicate = "0"; then
23143         test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
23144         LDFLAGS="$LDFLAGS $i"
23145       fi
23146     done
23147   fi
23148
23149       fi
23150     fi
23151
23152 fi
23153
23154
23155 if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
23156   ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
23157 if test "x$ac_cv_header_iconv_h" = xyes; then :
23158
23159
23160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23161 /* end confdefs.h.  */
23162
23163 #include <stdlib.h>
23164 #include <iconv.h>
23165
23166 int
23167 main ()
23168 {
23169
23170   iconv_t cd = iconv_open("", "");
23171   iconv(cd, NULL, NULL, NULL, NULL);
23172
23173   ;
23174   return 0;
23175 }
23176 _ACEOF
23177 if ac_fn_c_try_link "$LINENO"; then :
23178    have_iconv="1"
23179 else
23180
23181
23182
23183   if test "x$LIBS" = "x"; then
23184     test "x$silent" != "xyes" && echo "  setting LIBS to \"-liconv\""
23185     LIBS="-liconv"
23186   else
23187     apr_addto_bugger="-liconv"
23188     for i in $apr_addto_bugger; do
23189       apr_addto_duplicate="0"
23190       for j in $LIBS; do
23191         if test "x$i" = "x$j"; then
23192           apr_addto_duplicate="1"
23193           break
23194         fi
23195       done
23196       if test $apr_addto_duplicate = "0"; then
23197         test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
23198         LIBS="$LIBS $i"
23199       fi
23200     done
23201   fi
23202
23203
23204
23205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23206 /* end confdefs.h.  */
23207
23208 #include <stdlib.h>
23209 #include <iconv.h>
23210
23211 int
23212 main ()
23213 {
23214
23215   iconv_t cd = iconv_open("", "");
23216   iconv(cd, NULL, NULL, NULL, NULL);
23217
23218   ;
23219   return 0;
23220 }
23221 _ACEOF
23222 if ac_fn_c_try_link "$LINENO"; then :
23223
23224
23225   if test "x$APRUTIL_LIBS" = "x"; then
23226     test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-liconv\""
23227     APRUTIL_LIBS="-liconv"
23228   else
23229     apr_addto_bugger="-liconv"
23230     for i in $apr_addto_bugger; do
23231       apr_addto_duplicate="0"
23232       for j in $APRUTIL_LIBS; do
23233         if test "x$i" = "x$j"; then
23234           apr_addto_duplicate="1"
23235           break
23236         fi
23237       done
23238       if test $apr_addto_duplicate = "0"; then
23239         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23240         APRUTIL_LIBS="$APRUTIL_LIBS $i"
23241       fi
23242     done
23243   fi
23244
23245
23246   if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
23247     test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-liconv\""
23248     APRUTIL_EXPORT_LIBS="-liconv"
23249   else
23250     apr_addto_bugger="-liconv"
23251     for i in $apr_addto_bugger; do
23252       apr_addto_duplicate="0"
23253       for j in $APRUTIL_EXPORT_LIBS; do
23254         if test "x$i" = "x$j"; then
23255           apr_addto_duplicate="1"
23256           break
23257         fi
23258       done
23259       if test $apr_addto_duplicate = "0"; then
23260         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
23261         APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
23262       fi
23263     done
23264   fi
23265
23266       have_iconv="1"
23267 else
23268    have_iconv="0"
23269 fi
23270 rm -f core conftest.err conftest.$ac_objext \
23271     conftest$ac_exeext conftest.$ac_ext
23272
23273
23274
23275   if test "x$LIBS" = "x-liconv"; then
23276     test "x$silent" != "xyes" && echo "  nulling LIBS"
23277     LIBS=""
23278   else
23279     apr_new_bugger=""
23280     apr_removed=0
23281     for i in $LIBS; do
23282       if test "x$i" != "x-liconv"; then
23283         apr_new_bugger="$apr_new_bugger $i"
23284       else
23285         apr_removed=1
23286       fi
23287     done
23288     if test $apr_removed = "1"; then
23289       test "x$silent" != "xyes" && echo "  removed \"-liconv\" from LIBS"
23290       LIBS=$apr_new_bugger
23291     fi
23292   fi
23293
23294
23295
23296 fi
23297 rm -f core conftest.err conftest.$ac_objext \
23298     conftest$ac_exeext conftest.$ac_ext
23299
23300
23301 else
23302    have_iconv="0"
23303 fi
23304
23305
23306 fi
23307
23308 if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
23309   if test "$have_iconv" != "1"; then
23310     if test "$have_apr_iconv" != "1"; then
23311       as_fn_error $? "iconv support requested, but not found" "$LINENO" 5
23312     fi
23313   fi
23314
23315   if test "x$CPPFLAGS" = "x-I$apu_iconv_dir/include"; then
23316     test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
23317     CPPFLAGS=""
23318   else
23319     apr_new_bugger=""
23320     apr_removed=0
23321     for i in $CPPFLAGS; do
23322       if test "x$i" != "x-I$apu_iconv_dir/include"; then
23323         apr_new_bugger="$apr_new_bugger $i"
23324       else
23325         apr_removed=1
23326       fi
23327     done
23328     if test $apr_removed = "1"; then
23329       test "x$silent" != "xyes" && echo "  removed \"-I$apu_iconv_dir/include\" from CPPFLAGS"
23330       CPPFLAGS=$apr_new_bugger
23331     fi
23332   fi
23333
23334
23335   if test "x$LDFLAGS" = "x-L$apu_iconv_dir/lib"; then
23336     test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
23337     LDFLAGS=""
23338   else
23339     apr_new_bugger=""
23340     apr_removed=0
23341     for i in $LDFLAGS; do
23342       if test "x$i" != "x-L$apu_iconv_dir/lib"; then
23343         apr_new_bugger="$apr_new_bugger $i"
23344       else
23345         apr_removed=1
23346       fi
23347     done
23348     if test $apr_removed = "1"; then
23349       test "x$silent" != "xyes" && echo "  removed \"-L$apu_iconv_dir/lib\" from LDFLAGS"
23350       LDFLAGS=$apr_new_bugger
23351     fi
23352   fi
23353
23354
23355   if test "x$APRUTIL_INCLUDES" = "x"; then
23356     test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include\""
23357     APRUTIL_INCLUDES="-I$apu_iconv_dir/include"
23358   else
23359     apr_addto_bugger="-I$apu_iconv_dir/include"
23360     for i in $apr_addto_bugger; do
23361       apr_addto_duplicate="0"
23362       for j in $APRUTIL_INCLUDES; do
23363         if test "x$i" = "x$j"; then
23364           apr_addto_duplicate="1"
23365           break
23366         fi
23367       done
23368       if test $apr_addto_duplicate = "0"; then
23369         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23370         APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23371       fi
23372     done
23373   fi
23374
23375
23376   if test "x$APRUTIL_LDFLAGS" = "x"; then
23377     test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$apu_iconv_dir/lib\""
23378     APRUTIL_LDFLAGS="-L$apu_iconv_dir/lib"
23379   else
23380     apr_addto_bugger="-L$apu_iconv_dir/lib"
23381     for i in $apr_addto_bugger; do
23382       apr_addto_duplicate="0"
23383       for j in $APRUTIL_LDFLAGS; do
23384         if test "x$i" = "x$j"; then
23385           apr_addto_duplicate="1"
23386           break
23387         fi
23388       done
23389       if test $apr_addto_duplicate = "0"; then
23390         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
23391         APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23392       fi
23393     done
23394   fi
23395
23396 fi
23397
23398 if test "$have_iconv" = "1"; then
23399
23400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
23401 $as_echo_n "checking for type of inbuf parameter to iconv... " >&6; }
23402 if test "x$apu_iconv_inbuf_const" = "x"; then
23403     apr_save_CFLAGS=$CFLAGS
23404  CFLAGS="$CFLAGS $CFLAGS_WARN"
23405  if test "$ac_cv_c_compiler_gnu" = "yes"; then
23406    CFLAGS="$CFLAGS -Werror"
23407  fi
23408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23409 /* end confdefs.h.  */
23410 #include "confdefs.h"
23411
23412
23413     #include <stddef.h>
23414     #include <iconv.h>
23415
23416    int main(int argc, const char *const *argv) {
23417
23418     iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
23419
23420       return 0; }
23421
23422 _ACEOF
23423 if ac_fn_c_try_compile "$LINENO"; then :
23424   apu_iconv_inbuf_const="0"
23425 else
23426   apu_iconv_inbuf_const="1"
23427 fi
23428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23429  CFLAGS=$apr_save_CFLAGS
23430
23431 fi
23432 if test "$apu_iconv_inbuf_const" = "1"; then
23433
23434 $as_echo "#define APU_ICONV_INBUF_CONST 1" >>confdefs.h
23435
23436     msg="const char **"
23437 else
23438     msg="char **"
23439 fi
23440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
23441 $as_echo "$msg" >&6; }
23442
23443 fi
23444
23445
23446 for ac_header in iconv.h langinfo.h
23447 do :
23448   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23449 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23450 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23451   cat >>confdefs.h <<_ACEOF
23452 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23453 _ACEOF
23454
23455 fi
23456
23457 done
23458
23459 for aprt_i in iconv.h langinfo.h
23460 do
23461     ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
23462     aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
23463     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23464        eval "$aprt_2=1"
23465     else
23466        eval "$aprt_2=0"
23467     fi
23468 done
23469
23470
23471 for ac_func in nl_langinfo
23472 do :
23473   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
23474 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
23475   cat >>confdefs.h <<_ACEOF
23476 #define HAVE_NL_LANGINFO 1
23477 _ACEOF
23478
23479 fi
23480 done
23481
23482 for aprt_j in nl_langinfo
23483 do
23484     aprt_3="have_$aprt_j"
23485     if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
23486        eval "$aprt_3=1"
23487     else
23488        eval "$aprt_3=0"
23489     fi
23490 done
23491
23492
23493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESET in langinfo.h" >&5
23494 $as_echo_n "checking for CODESET in langinfo.h... " >&6; }
23495 if ${ac_cv_define_CODESET+:} false; then :
23496   $as_echo_n "(cached) " >&6
23497 else
23498
23499     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23500 /* end confdefs.h.  */
23501
23502 #include <langinfo.h>
23503 #ifdef CODESET
23504 YES_IS_DEFINED
23505 #endif
23506
23507 _ACEOF
23508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23509   $EGREP "YES_IS_DEFINED" >/dev/null 2>&1; then :
23510   ac_cv_define_CODESET=yes
23511 else
23512   ac_cv_define_CODESET=no
23513 fi
23514 rm -f conftest*
23515
23516
23517 fi
23518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_define_CODESET" >&5
23519 $as_echo "$ac_cv_define_CODESET" >&6; }
23520   if test "$ac_cv_define_CODESET" = "yes"; then
23521
23522 $as_echo "#define HAVE_CODESET 1" >>confdefs.h
23523
23524   fi
23525
23526
23527
23528
23529
23530
23531
23532
23533   # Check whether --enable-util-dso was given.
23534 if test "${enable_util_dso+set}" = set; then :
23535   enableval=$enable_util_dso;
23536 fi
23537
23538
23539   if test "$enable_util_dso" = "no"; then
23540      apu_dso_build="0"
23541   else
23542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether APR has DSO support" >&5
23543 $as_echo_n "checking whether APR has DSO support... " >&6; }
23544 if ${apu_cv_aprdso+:} false; then :
23545   $as_echo_n "(cached) " >&6
23546 else
23547   apu_save_CPPFLAGS=$CPPFLAGS
23548         CPPFLAGS="$CPPFLAGS $APR_INCLUDES"
23549         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23550 /* end confdefs.h.  */
23551 #include "apr.h"
23552 #if APR_HAS_DSO
23553 yes
23554 #endif
23555
23556 _ACEOF
23557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23558   $EGREP "yes" >/dev/null 2>&1; then :
23559   apu_cv_aprdso=yes
23560 else
23561   apu_cv_aprdso=no
23562 fi
23563 rm -f conftest*
23564
23565         CPPFLAGS=$apu_save_CPPFLAGS
23566 fi
23567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_aprdso" >&5
23568 $as_echo "$apu_cv_aprdso" >&6; }
23569
23570      if test $apu_cv_aprdso = yes; then
23571         apu_dso_build=1
23572      else
23573         apu_dso_build=0
23574      fi
23575   fi
23576
23577   if test "$apu_dso_build" = "0"; then
23578
23579      # Statically link the drivers:
23580      objs=
23581      test $apu_have_openssl = 1 && objs="$objs crypto/apr_crypto_openssl.lo"
23582      test $apu_have_nss = 1 && objs="$objs crypto/apr_crypto_nss.lo"
23583      test $apu_have_commoncrypto = 1 && objs="$objs crypto/apr_crypto_commoncrypto.lo"
23584      test $apu_have_oracle = 1 && objs="$objs dbd/apr_dbd_oracle.lo"
23585      test $apu_have_pgsql = 1 && objs="$objs dbd/apr_dbd_pgsql.lo"
23586      test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo"
23587      test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo"
23588      test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
23589      test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
23590      test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
23591      test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
23592      test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
23593      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
23594      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
23595      test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
23596      EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
23597
23598      # Use libtool *.la for mysql if available
23599      if test $apu_have_mysql = 1; then
23600        for flag in $LDADD_dbd_mysql
23601        do
23602          dir=`echo $flag | grep "^-L" | sed s:-L::`
23603          if test "x$dir" != 'x'; then
23604            if test -f "$dir/libmysqlclient_r.la"; then
23605              LDADD_dbd_mysql=$dir/libmysqlclient_r.la
23606              break
23607            fi
23608          fi
23609        done
23610      fi
23611
23612      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto"
23613      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc"
23614      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
23615      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
23616      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto"
23617      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc"
23618      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
23619      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
23620
23621   else
23622
23623      # Build the drivers as loadable modules:
23624      dsos=
23625      test $apu_have_openssl = 1 && dsos="$dsos crypto/apr_crypto_openssl.la"
23626      test $apu_have_nss = 1 && dsos="$dsos crypto/apr_crypto_nss.la"
23627      test $apu_have_commoncrypto = 1 && dsos="$dsos crypto/apr_crypto_commoncrypto.la"
23628      test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
23629      test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
23630      test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
23631      test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
23632      test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
23633      test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
23634      test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
23635      test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
23636      test $apu_have_ndbm = 1 && dsos="$dsos dbm/apr_dbm_ndbm.la"
23637      test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
23638
23639      if test -n "$dsos"; then
23640         APU_MODULES="$APU_MODULES $dsos"
23641      fi
23642
23643   fi
23644
23645
23646 cat >>confdefs.h <<_ACEOF
23647 #define APU_DSO_BUILD $apu_dso_build
23648 _ACEOF
23649
23650
23651
23652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
23653 $as_echo_n "checking for library containing crypt... " >&6; }
23654 if ${ac_cv_search_crypt+:} false; then :
23655   $as_echo_n "(cached) " >&6
23656 else
23657   ac_func_search_save_LIBS=$LIBS
23658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23659 /* end confdefs.h.  */
23660
23661 /* Override any GCC internal prototype to avoid an error.
23662    Use char because int might match the return type of a GCC
23663    builtin and then its argument prototype would still apply.  */
23664 #ifdef __cplusplus
23665 extern "C"
23666 #endif
23667 char crypt ();
23668 int
23669 main ()
23670 {
23671 return crypt ();
23672   ;
23673   return 0;
23674 }
23675 _ACEOF
23676 for ac_lib in '' crypt ufc; do
23677   if test -z "$ac_lib"; then
23678     ac_res="none required"
23679   else
23680     ac_res=-l$ac_lib
23681     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23682   fi
23683   if ac_fn_c_try_link "$LINENO"; then :
23684   ac_cv_search_crypt=$ac_res
23685 fi
23686 rm -f core conftest.err conftest.$ac_objext \
23687     conftest$ac_exeext
23688   if ${ac_cv_search_crypt+:} false; then :
23689   break
23690 fi
23691 done
23692 if ${ac_cv_search_crypt+:} false; then :
23693
23694 else
23695   ac_cv_search_crypt=no
23696 fi
23697 rm conftest.$ac_ext
23698 LIBS=$ac_func_search_save_LIBS
23699 fi
23700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
23701 $as_echo "$ac_cv_search_crypt" >&6; }
23702 ac_res=$ac_cv_search_crypt
23703 if test "$ac_res" != no; then :
23704   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23705
23706 fi
23707
23708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if system crypt() function is threadsafe" >&5
23709 $as_echo_n "checking if system crypt() function is threadsafe... " >&6; }
23710 if test "x$apu_crypt_threadsafe" = "x1"; then
23711
23712 $as_echo "#define APU_CRYPT_THREADSAFE 1" >>confdefs.h
23713
23714   msg="yes"
23715 else
23716   msg="no"
23717 fi
23718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
23719 $as_echo "$msg" >&6; }
23720
23721 for ac_func in crypt_r
23722 do :
23723   ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
23724 if test "x$ac_cv_func_crypt_r" = xyes; then :
23725   cat >>confdefs.h <<_ACEOF
23726 #define HAVE_CRYPT_R 1
23727 _ACEOF
23728   crypt_r="1"
23729 else
23730    crypt_r="0"
23731 fi
23732 done
23733
23734 if test "$crypt_r" = "1"; then
23735
23736
23737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking style of crypt_r" >&5
23738 $as_echo_n "checking style of crypt_r... " >&6; }
23739 if ${apr_cv_crypt_r_style+:} false; then :
23740   $as_echo_n "(cached) " >&6
23741 else
23742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23743 /* end confdefs.h.  */
23744 #include <crypt.h>
23745 int
23746 main ()
23747 {
23748 CRYPTD buffer;
23749   crypt_r("passwd", "hash", &buffer);
23750   ;
23751   return 0;
23752 }
23753 _ACEOF
23754 if ac_fn_c_try_compile "$LINENO"; then :
23755   apr_cv_crypt_r_style=cryptd
23756 else
23757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23758 /* end confdefs.h.  */
23759 #include <crypt.h>
23760 int
23761 main ()
23762 {
23763 struct crypt_data buffer;
23764    crypt_r("passwd", "hash", &buffer);
23765   ;
23766   return 0;
23767 }
23768 _ACEOF
23769 if ac_fn_c_try_compile "$LINENO"; then :
23770   apr_cv_crypt_r_style=struct_crypt_data
23771 else
23772   apr_cv_crypt_r_style=none
23773 fi
23774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23775 fi
23776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23777 fi
23778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_crypt_r_style" >&5
23779 $as_echo "$apr_cv_crypt_r_style" >&6; }
23780
23781 if test "$apr_cv_crypt_r_style" = "cryptd"; then
23782
23783 $as_echo "#define CRYPT_R_CRYPTD 1" >>confdefs.h
23784
23785 elif test "$apr_cv_crypt_r_style" = "struct_crypt_data"; then
23786
23787 $as_echo "#define CRYPT_R_STRUCT_CRYPT_DATA 1" >>confdefs.h
23788
23789 fi
23790
23791 fi
23792
23793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler handles weak symbols" >&5
23794 $as_echo_n "checking whether the compiler handles weak symbols... " >&6; }
23795 if ${apu_cv_weak_symbols+:} false; then :
23796   $as_echo_n "(cached) " >&6
23797 else
23798   if test "$cross_compiling" = yes; then :
23799   apu_cv_weak_symbols=no
23800 else
23801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23802 /* end confdefs.h.  */
23803
23804 __attribute__ ((weak))
23805 int weak_noop(void)
23806 {
23807     return 0;
23808 }
23809 int main()
23810 {
23811     return weak_noop();
23812 }
23813 _ACEOF
23814 if ac_fn_c_try_run "$LINENO"; then :
23815   apu_cv_weak_symbols=yes
23816 else
23817   apu_cv_weak_symbols=no
23818 fi
23819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23820   conftest.$ac_objext conftest.beam conftest.$ac_ext
23821 fi
23822
23823 fi
23824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_weak_symbols" >&5
23825 $as_echo "$apu_cv_weak_symbols" >&6; }
23826
23827 if test "$apu_cv_weak_symbols" = "yes"; then
23828
23829 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
23830
23831 fi
23832
23833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memset_s support" >&5
23834 $as_echo_n "checking for memset_s support... " >&6; }
23835 if ${apu_cv_memset_s+:} false; then :
23836   $as_echo_n "(cached) " >&6
23837 else
23838   if test "$cross_compiling" = yes; then :
23839   apu_cv_memset_s=no
23840 else
23841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23842 /* end confdefs.h.  */
23843
23844 #ifdef HAVE_STRING_H
23845 #define __STDC_WANT_LIB_EXT1__ 1
23846 #include <string.h>
23847 #endif
23848
23849 int main(int argc, const char **argv)
23850 {
23851     char buf[1] = {1};
23852     return memset_s(buf, sizeof buf, 0, sizeof buf) != 0 || *buf != '\0';
23853 }
23854 _ACEOF
23855 if ac_fn_c_try_run "$LINENO"; then :
23856   apu_cv_memset_s=yes
23857 else
23858   apu_cv_memset_s=no
23859 fi
23860 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23861   conftest.$ac_objext conftest.beam conftest.$ac_ext
23862 fi
23863
23864 fi
23865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_memset_s" >&5
23866 $as_echo "$apu_cv_memset_s" >&6; }
23867
23868 if test "$apu_cv_memset_s" = "yes"; then
23869
23870 $as_echo "#define HAVE_MEMSET_S 1" >>confdefs.h
23871
23872 fi
23873
23874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit_bzero support" >&5
23875 $as_echo_n "checking for explicit_bzero support... " >&6; }
23876 if ${apu_cv_explicit_bzero+:} false; then :
23877   $as_echo_n "(cached) " >&6
23878 else
23879   if test "$cross_compiling" = yes; then :
23880   apu_cv_explicit_bzero=no
23881 else
23882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23883 /* end confdefs.h.  */
23884
23885 #ifdef HAVE_STRING_H
23886 #include <string.h>
23887 #endif
23888 #ifdef HAVE_STRINGS_H
23889 #include <strings.h>
23890 #endif
23891
23892 int main(int argc, const char **argv)
23893 {
23894     char buf[1] = {1};
23895     explicit_bzero(buf, sizeof buf);
23896     return *buf != '\0';
23897 }
23898 _ACEOF
23899 if ac_fn_c_try_run "$LINENO"; then :
23900   apu_cv_explicit_bzero=yes
23901 else
23902   apu_cv_explicit_bzero=no
23903 fi
23904 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23905   conftest.$ac_objext conftest.beam conftest.$ac_ext
23906 fi
23907
23908 fi
23909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_explicit_bzero" >&5
23910 $as_echo "$apu_cv_explicit_bzero" >&6; }
23911
23912 if test "$apu_cv_explicit_bzero" = "yes"; then
23913
23914 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
23915
23916 fi
23917
23918 so_ext=$APR_SO_EXT
23919 lib_target=$APR_LIB_TARGET
23920
23921
23922
23923 APRUTIL_LIBNAME="aprutil${libsuffix}"
23924
23925
23926 # Set up destination directory for DSOs.
23927 APU_DSO_LIBDIR="\${libdir}/apr-util-${APRUTIL_MAJOR_VERSION}"
23928 # Set APU_HAVE_MODULES appropriately for the Makefile
23929 if test -n "$APU_MODULES"; then
23930    APU_HAVE_MODULES=yes
23931 else
23932    APU_HAVE_MODULES=no
23933 fi
23934 # Define expanded libdir for apu_config.h
23935
23936 ap_last=
23937 ap_cur="$APU_DSO_LIBDIR"
23938 while test "x${ap_cur}" != "x${ap_last}";
23939 do
23940   ap_last="${ap_cur}"
23941   ap_cur=`eval "echo ${ap_cur}"`
23942 done
23943 abs_dso_libdir="${ap_cur}"
23944
23945
23946 cat >>confdefs.h <<_ACEOF
23947 #define APU_DSO_LIBDIR "$abs_dso_libdir"
23948 _ACEOF
23949
23950
23951
23952
23953
23954
23955
23956   if test "x$APRUTIL_LIBS" = "x"; then
23957     test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$APR_LIBS\""
23958     APRUTIL_LIBS="$APR_LIBS"
23959   else
23960     apr_addto_bugger="$APR_LIBS"
23961     for i in $apr_addto_bugger; do
23962       apr_addto_duplicate="0"
23963       for j in $APRUTIL_LIBS; do
23964         if test "x$i" = "x$j"; then
23965           apr_addto_duplicate="1"
23966           break
23967         fi
23968       done
23969       if test $apr_addto_duplicate = "0"; then
23970         test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23971         APRUTIL_LIBS="$APRUTIL_LIBS $i"
23972       fi
23973     done
23974   fi
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984 if test ! -d ./build; then
23985    $mkdir_p build
23986 fi
23987 case $host in
23988     *-mingw*)
23989         sed -e 's/-DAPR_DECLARE_EXPORT/-DAPU_DECLARE_EXPORT/' \
23990             -e 's/-DAPR_DECLARE_STATIC/-DAPU_DECLARE_STATIC -DAPR_DECLARE_STATIC/' \
23991             < $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
23992         ;;
23993     *)
23994         cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
23995         ;;
23996 esac
23997
23998 case "$host_alias" in
23999 *bsdi* | BSD/OS)
24000     # Check whether they've installed GNU make
24001     if make --version > /dev/null 2>&1; then
24002         INCLUDE_RULES="include $abs_builddir/build/rules.mk"
24003         INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
24004     else
24005         INCLUDE_RULES=".include \"$abs_builddir/build/rules.mk\""
24006         INCLUDE_OUTPUTS=".include \"$abs_srcdir/build-outputs.mk\""
24007     fi
24008     ;;
24009 *)
24010     INCLUDE_RULES="include $abs_builddir/build/rules.mk"
24011     INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
24012     ;;
24013 esac
24014
24015
24016
24017 for d in include include/private; do
24018     test -d $top_builddir/$d || mkdir $top_builddir/$d
24019 done
24020
24021 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"
24022
24023
24024 ac_config_commands="$ac_config_commands default"
24025
24026
24027 if test -d $srcdir/test; then
24028     ac_config_files="$ac_config_files test/Makefile"
24029
24030 fi
24031
24032 cat >confcache <<\_ACEOF
24033 # This file is a shell script that caches the results of configure
24034 # tests run on this system so they can be shared between configure
24035 # scripts and configure runs, see configure's option --config-cache.
24036 # It is not useful on other systems.  If it contains results you don't
24037 # want to keep, you may remove or edit it.
24038 #
24039 # config.status only pays attention to the cache file if you give it
24040 # the --recheck option to rerun configure.
24041 #
24042 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24043 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24044 # following values.
24045
24046 _ACEOF
24047
24048 # The following way of writing the cache mishandles newlines in values,
24049 # but we know of no workaround that is simple, portable, and efficient.
24050 # So, we kill variables containing newlines.
24051 # Ultrix sh set writes to stderr and can't be redirected directly,
24052 # and sets the high bit in the cache file unless we assign to the vars.
24053 (
24054   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24055     eval ac_val=\$$ac_var
24056     case $ac_val in #(
24057     *${as_nl}*)
24058       case $ac_var in #(
24059       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24060 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24061       esac
24062       case $ac_var in #(
24063       _ | IFS | as_nl) ;; #(
24064       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24065       *) { eval $ac_var=; unset $ac_var;} ;;
24066       esac ;;
24067     esac
24068   done
24069
24070   (set) 2>&1 |
24071     case $as_nl`(ac_space=' '; set) 2>&1` in #(
24072     *${as_nl}ac_space=\ *)
24073       # `set' does not quote correctly, so add quotes: double-quote
24074       # substitution turns \\\\ into \\, and sed turns \\ into \.
24075       sed -n \
24076         "s/'/'\\\\''/g;
24077           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24078       ;; #(
24079     *)
24080       # `set' quotes correctly as required by POSIX, so do not add quotes.
24081       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24082       ;;
24083     esac |
24084     sort
24085 ) |
24086   sed '
24087      /^ac_cv_env_/b end
24088      t clear
24089      :clear
24090      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24091      t end
24092      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24093      :end' >>confcache
24094 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24095   if test -w "$cache_file"; then
24096     if test "x$cache_file" != "x/dev/null"; then
24097       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24098 $as_echo "$as_me: updating cache $cache_file" >&6;}
24099       if test ! -f "$cache_file" || test -h "$cache_file"; then
24100         cat confcache >"$cache_file"
24101       else
24102         case $cache_file in #(
24103         */* | ?:*)
24104           mv -f confcache "$cache_file"$$ &&
24105           mv -f "$cache_file"$$ "$cache_file" ;; #(
24106         *)
24107           mv -f confcache "$cache_file" ;;
24108         esac
24109       fi
24110     fi
24111   else
24112     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24113 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24114   fi
24115 fi
24116 rm -f confcache
24117
24118 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24119 # Let make expand exec_prefix.
24120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24121
24122 DEFS=-DHAVE_CONFIG_H
24123
24124 ac_libobjs=
24125 ac_ltlibobjs=
24126 U=
24127 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24128   # 1. Remove the extension, and $U if already installed.
24129   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24130   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24131   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24132   #    will be set to the directory where LIBOBJS objects are built.
24133   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24134   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24135 done
24136 LIBOBJS=$ac_libobjs
24137
24138 LTLIBOBJS=$ac_ltlibobjs
24139
24140
24141
24142 : "${CONFIG_STATUS=./config.status}"
24143 ac_write_fail=0
24144 ac_clean_files_save=$ac_clean_files
24145 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24146 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24147 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24148 as_write_fail=0
24149 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24150 #! $SHELL
24151 # Generated by $as_me.
24152 # Run this file to recreate the current configuration.
24153 # Compiler output produced by configure, useful for debugging
24154 # configure, is in config.log if it exists.
24155
24156 debug=false
24157 ac_cs_recheck=false
24158 ac_cs_silent=false
24159
24160 SHELL=\${CONFIG_SHELL-$SHELL}
24161 export SHELL
24162 _ASEOF
24163 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24164 ## -------------------- ##
24165 ## M4sh Initialization. ##
24166 ## -------------------- ##
24167
24168 # Be more Bourne compatible
24169 DUALCASE=1; export DUALCASE # for MKS sh
24170 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24171   emulate sh
24172   NULLCMD=:
24173   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24174   # is contrary to our usage.  Disable this feature.
24175   alias -g '${1+"$@"}'='"$@"'
24176   setopt NO_GLOB_SUBST
24177 else
24178   case `(set -o) 2>/dev/null` in #(
24179   *posix*) :
24180     set -o posix ;; #(
24181   *) :
24182      ;;
24183 esac
24184 fi
24185
24186
24187 as_nl='
24188 '
24189 export as_nl
24190 # Printing a long string crashes Solaris 7 /usr/bin/printf.
24191 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24192 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24193 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24194 # Prefer a ksh shell builtin over an external printf program on Solaris,
24195 # but without wasting forks for bash or zsh.
24196 if test -z "$BASH_VERSION$ZSH_VERSION" \
24197     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24198   as_echo='print -r --'
24199   as_echo_n='print -rn --'
24200 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24201   as_echo='printf %s\n'
24202   as_echo_n='printf %s'
24203 else
24204   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24205     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24206     as_echo_n='/usr/ucb/echo -n'
24207   else
24208     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24209     as_echo_n_body='eval
24210       arg=$1;
24211       case $arg in #(
24212       *"$as_nl"*)
24213         expr "X$arg" : "X\\(.*\\)$as_nl";
24214         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24215       esac;
24216       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24217     '
24218     export as_echo_n_body
24219     as_echo_n='sh -c $as_echo_n_body as_echo'
24220   fi
24221   export as_echo_body
24222   as_echo='sh -c $as_echo_body as_echo'
24223 fi
24224
24225 # The user is always right.
24226 if test "${PATH_SEPARATOR+set}" != set; then
24227   PATH_SEPARATOR=:
24228   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24229     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24230       PATH_SEPARATOR=';'
24231   }
24232 fi
24233
24234
24235 # IFS
24236 # We need space, tab and new line, in precisely that order.  Quoting is
24237 # there to prevent editors from complaining about space-tab.
24238 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
24239 # splitting by setting IFS to empty value.)
24240 IFS=" ""        $as_nl"
24241
24242 # Find who we are.  Look in the path if we contain no directory separator.
24243 as_myself=
24244 case $0 in #((
24245   *[\\/]* ) as_myself=$0 ;;
24246   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24247 for as_dir in $PATH
24248 do
24249   IFS=$as_save_IFS
24250   test -z "$as_dir" && as_dir=.
24251     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24252   done
24253 IFS=$as_save_IFS
24254
24255      ;;
24256 esac
24257 # We did not find ourselves, most probably we were run as `sh COMMAND'
24258 # in which case we are not to be found in the path.
24259 if test "x$as_myself" = x; then
24260   as_myself=$0
24261 fi
24262 if test ! -f "$as_myself"; then
24263   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24264   exit 1
24265 fi
24266
24267 # Unset variables that we do not need and which cause bugs (e.g. in
24268 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24269 # suppresses any "Segmentation fault" message there.  '((' could
24270 # trigger a bug in pdksh 5.2.14.
24271 for as_var in BASH_ENV ENV MAIL MAILPATH
24272 do eval test x\${$as_var+set} = xset \
24273   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24274 done
24275 PS1='$ '
24276 PS2='> '
24277 PS4='+ '
24278
24279 # NLS nuisances.
24280 LC_ALL=C
24281 export LC_ALL
24282 LANGUAGE=C
24283 export LANGUAGE
24284
24285 # CDPATH.
24286 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24287
24288
24289 # as_fn_error STATUS ERROR [LINENO LOG_FD]
24290 # ----------------------------------------
24291 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24292 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24293 # script with STATUS, using 1 if that was 0.
24294 as_fn_error ()
24295 {
24296   as_status=$1; test $as_status -eq 0 && as_status=1
24297   if test "$4"; then
24298     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24299     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
24300   fi
24301   $as_echo "$as_me: error: $2" >&2
24302   as_fn_exit $as_status
24303 } # as_fn_error
24304
24305
24306 # as_fn_set_status STATUS
24307 # -----------------------
24308 # Set $? to STATUS, without forking.
24309 as_fn_set_status ()
24310 {
24311   return $1
24312 } # as_fn_set_status
24313
24314 # as_fn_exit STATUS
24315 # -----------------
24316 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24317 as_fn_exit ()
24318 {
24319   set +e
24320   as_fn_set_status $1
24321   exit $1
24322 } # as_fn_exit
24323
24324 # as_fn_unset VAR
24325 # ---------------
24326 # Portably unset VAR.
24327 as_fn_unset ()
24328 {
24329   { eval $1=; unset $1;}
24330 }
24331 as_unset=as_fn_unset
24332 # as_fn_append VAR VALUE
24333 # ----------------------
24334 # Append the text in VALUE to the end of the definition contained in VAR. Take
24335 # advantage of any shell optimizations that allow amortized linear growth over
24336 # repeated appends, instead of the typical quadratic growth present in naive
24337 # implementations.
24338 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24339   eval 'as_fn_append ()
24340   {
24341     eval $1+=\$2
24342   }'
24343 else
24344   as_fn_append ()
24345   {
24346     eval $1=\$$1\$2
24347   }
24348 fi # as_fn_append
24349
24350 # as_fn_arith ARG...
24351 # ------------------
24352 # Perform arithmetic evaluation on the ARGs, and store the result in the
24353 # global $as_val. Take advantage of shells that can avoid forks. The arguments
24354 # must be portable across $(()) and expr.
24355 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24356   eval 'as_fn_arith ()
24357   {
24358     as_val=$(( $* ))
24359   }'
24360 else
24361   as_fn_arith ()
24362   {
24363     as_val=`expr "$@" || test $? -eq 1`
24364   }
24365 fi # as_fn_arith
24366
24367
24368 if expr a : '\(a\)' >/dev/null 2>&1 &&
24369    test "X`expr 00001 : '.*\(...\)'`" = X001; then
24370   as_expr=expr
24371 else
24372   as_expr=false
24373 fi
24374
24375 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24376   as_basename=basename
24377 else
24378   as_basename=false
24379 fi
24380
24381 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24382   as_dirname=dirname
24383 else
24384   as_dirname=false
24385 fi
24386
24387 as_me=`$as_basename -- "$0" ||
24388 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24389          X"$0" : 'X\(//\)$' \| \
24390          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24391 $as_echo X/"$0" |
24392     sed '/^.*\/\([^/][^/]*\)\/*$/{
24393             s//\1/
24394             q
24395           }
24396           /^X\/\(\/\/\)$/{
24397             s//\1/
24398             q
24399           }
24400           /^X\/\(\/\).*/{
24401             s//\1/
24402             q
24403           }
24404           s/.*/./; q'`
24405
24406 # Avoid depending upon Character Ranges.
24407 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24408 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24409 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24410 as_cr_digits='0123456789'
24411 as_cr_alnum=$as_cr_Letters$as_cr_digits
24412
24413 ECHO_C= ECHO_N= ECHO_T=
24414 case `echo -n x` in #(((((
24415 -n*)
24416   case `echo 'xy\c'` in
24417   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
24418   xy)  ECHO_C='\c';;
24419   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
24420        ECHO_T=' ';;
24421   esac;;
24422 *)
24423   ECHO_N='-n';;
24424 esac
24425
24426 rm -f conf$$ conf$$.exe conf$$.file
24427 if test -d conf$$.dir; then
24428   rm -f conf$$.dir/conf$$.file
24429 else
24430   rm -f conf$$.dir
24431   mkdir conf$$.dir 2>/dev/null
24432 fi
24433 if (echo >conf$$.file) 2>/dev/null; then
24434   if ln -s conf$$.file conf$$ 2>/dev/null; then
24435     as_ln_s='ln -s'
24436     # ... but there are two gotchas:
24437     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24438     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24439     # In both cases, we have to default to `cp -pR'.
24440     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24441       as_ln_s='cp -pR'
24442   elif ln conf$$.file conf$$ 2>/dev/null; then
24443     as_ln_s=ln
24444   else
24445     as_ln_s='cp -pR'
24446   fi
24447 else
24448   as_ln_s='cp -pR'
24449 fi
24450 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24451 rmdir conf$$.dir 2>/dev/null
24452
24453
24454 # as_fn_mkdir_p
24455 # -------------
24456 # Create "$as_dir" as a directory, including parents if necessary.
24457 as_fn_mkdir_p ()
24458 {
24459
24460   case $as_dir in #(
24461   -*) as_dir=./$as_dir;;
24462   esac
24463   test -d "$as_dir" || eval $as_mkdir_p || {
24464     as_dirs=
24465     while :; do
24466       case $as_dir in #(
24467       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24468       *) as_qdir=$as_dir;;
24469       esac
24470       as_dirs="'$as_qdir' $as_dirs"
24471       as_dir=`$as_dirname -- "$as_dir" ||
24472 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24473          X"$as_dir" : 'X\(//\)[^/]' \| \
24474          X"$as_dir" : 'X\(//\)$' \| \
24475          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24476 $as_echo X"$as_dir" |
24477     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24478             s//\1/
24479             q
24480           }
24481           /^X\(\/\/\)[^/].*/{
24482             s//\1/
24483             q
24484           }
24485           /^X\(\/\/\)$/{
24486             s//\1/
24487             q
24488           }
24489           /^X\(\/\).*/{
24490             s//\1/
24491             q
24492           }
24493           s/.*/./; q'`
24494       test -d "$as_dir" && break
24495     done
24496     test -z "$as_dirs" || eval "mkdir $as_dirs"
24497   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
24498
24499
24500 } # as_fn_mkdir_p
24501 if mkdir -p . 2>/dev/null; then
24502   as_mkdir_p='mkdir -p "$as_dir"'
24503 else
24504   test -d ./-p && rmdir ./-p
24505   as_mkdir_p=false
24506 fi
24507
24508
24509 # as_fn_executable_p FILE
24510 # -----------------------
24511 # Test if FILE is an executable regular file.
24512 as_fn_executable_p ()
24513 {
24514   test -f "$1" && test -x "$1"
24515 } # as_fn_executable_p
24516 as_test_x='test -x'
24517 as_executable_p=as_fn_executable_p
24518
24519 # Sed expression to map a string onto a valid CPP name.
24520 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24521
24522 # Sed expression to map a string onto a valid variable name.
24523 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24524
24525
24526 exec 6>&1
24527 ## ----------------------------------- ##
24528 ## Main body of $CONFIG_STATUS script. ##
24529 ## ----------------------------------- ##
24530 _ASEOF
24531 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24532
24533 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24534 # Save the log message, to keep $0 and so on meaningful, and to
24535 # report actual input values of CONFIG_FILES etc. instead of their
24536 # values after options handling.
24537 ac_log="
24538 This file was extended by $as_me, which was
24539 generated by GNU Autoconf 2.69.  Invocation command line was
24540
24541   CONFIG_FILES    = $CONFIG_FILES
24542   CONFIG_HEADERS  = $CONFIG_HEADERS
24543   CONFIG_LINKS    = $CONFIG_LINKS
24544   CONFIG_COMMANDS = $CONFIG_COMMANDS
24545   $ $0 $@
24546
24547 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24548 "
24549
24550 _ACEOF
24551
24552 case $ac_config_files in *"
24553 "*) set x $ac_config_files; shift; ac_config_files=$*;;
24554 esac
24555
24556 case $ac_config_headers in *"
24557 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24558 esac
24559
24560
24561 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24562 # Files that config.status was made for.
24563 config_files="$ac_config_files"
24564 config_headers="$ac_config_headers"
24565 config_commands="$ac_config_commands"
24566
24567 _ACEOF
24568
24569 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24570 ac_cs_usage="\
24571 \`$as_me' instantiates files and other configuration actions
24572 from templates according to the current configuration.  Unless the files
24573 and actions are specified as TAGs, all are instantiated by default.
24574
24575 Usage: $0 [OPTION]... [TAG]...
24576
24577   -h, --help       print this help, then exit
24578   -V, --version    print version number and configuration settings, then exit
24579       --config     print configuration, then exit
24580   -q, --quiet, --silent
24581                    do not print progress messages
24582   -d, --debug      don't remove temporary files
24583       --recheck    update $as_me by reconfiguring in the same conditions
24584       --file=FILE[:TEMPLATE]
24585                    instantiate the configuration file FILE
24586       --header=FILE[:TEMPLATE]
24587                    instantiate the configuration header FILE
24588
24589 Configuration files:
24590 $config_files
24591
24592 Configuration headers:
24593 $config_headers
24594
24595 Configuration commands:
24596 $config_commands
24597
24598 Report bugs to the package provider."
24599
24600 _ACEOF
24601 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24602 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
24603 ac_cs_version="\\
24604 config.status
24605 configured by $0, generated by GNU Autoconf 2.69,
24606   with options \\"\$ac_cs_config\\"
24607
24608 Copyright (C) 2012 Free Software Foundation, Inc.
24609 This config.status script is free software; the Free Software Foundation
24610 gives unlimited permission to copy, distribute and modify it."
24611
24612 ac_pwd='$ac_pwd'
24613 srcdir='$srcdir'
24614 INSTALL='$INSTALL'
24615 test -n "\$AWK" || AWK=awk
24616 _ACEOF
24617
24618 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24619 # The default lists apply if the user does not specify any file.
24620 ac_need_defaults=:
24621 while test $# != 0
24622 do
24623   case $1 in
24624   --*=?*)
24625     ac_option=`expr "X$1" : 'X\([^=]*\)='`
24626     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24627     ac_shift=:
24628     ;;
24629   --*=)
24630     ac_option=`expr "X$1" : 'X\([^=]*\)='`
24631     ac_optarg=
24632     ac_shift=:
24633     ;;
24634   *)
24635     ac_option=$1
24636     ac_optarg=$2
24637     ac_shift=shift
24638     ;;
24639   esac
24640
24641   case $ac_option in
24642   # Handling of the options.
24643   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24644     ac_cs_recheck=: ;;
24645   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24646     $as_echo "$ac_cs_version"; exit ;;
24647   --config | --confi | --conf | --con | --co | --c )
24648     $as_echo "$ac_cs_config"; exit ;;
24649   --debug | --debu | --deb | --de | --d | -d )
24650     debug=: ;;
24651   --file | --fil | --fi | --f )
24652     $ac_shift
24653     case $ac_optarg in
24654     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24655     '') as_fn_error $? "missing file argument" ;;
24656     esac
24657     as_fn_append CONFIG_FILES " '$ac_optarg'"
24658     ac_need_defaults=false;;
24659   --header | --heade | --head | --hea )
24660     $ac_shift
24661     case $ac_optarg in
24662     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24663     esac
24664     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24665     ac_need_defaults=false;;
24666   --he | --h)
24667     # Conflict between --help and --header
24668     as_fn_error $? "ambiguous option: \`$1'
24669 Try \`$0 --help' for more information.";;
24670   --help | --hel | -h )
24671     $as_echo "$ac_cs_usage"; exit ;;
24672   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24673   | -silent | --silent | --silen | --sile | --sil | --si | --s)
24674     ac_cs_silent=: ;;
24675
24676   # This is an error.
24677   -*) as_fn_error $? "unrecognized option: \`$1'
24678 Try \`$0 --help' for more information." ;;
24679
24680   *) as_fn_append ac_config_targets " $1"
24681      ac_need_defaults=false ;;
24682
24683   esac
24684   shift
24685 done
24686
24687 ac_configure_extra_args=
24688
24689 if $ac_cs_silent; then
24690   exec 6>/dev/null
24691   ac_configure_extra_args="$ac_configure_extra_args --silent"
24692 fi
24693
24694 _ACEOF
24695 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24696 if \$ac_cs_recheck; then
24697   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24698   shift
24699   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24700   CONFIG_SHELL='$SHELL'
24701   export CONFIG_SHELL
24702   exec "\$@"
24703 fi
24704
24705 _ACEOF
24706 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24707 exec 5>>config.log
24708 {
24709   echo
24710   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24711 ## Running $as_me. ##
24712 _ASBOX
24713   $as_echo "$ac_log"
24714 } >&5
24715
24716 _ACEOF
24717 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24718 #
24719 # INIT-COMMANDS
24720 #
24721
24722 APRUTIL_MAJOR_VERSION=$APRUTIL_MAJOR_VERSION
24723
24724
24725 _ACEOF
24726
24727 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24728
24729 # Handling of arguments.
24730 for ac_config_target in $ac_config_targets
24731 do
24732   case $ac_config_target in
24733     "include/private/apu_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/private/apu_config.h" ;;
24734     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24735     "export_vars.sh") CONFIG_FILES="$CONFIG_FILES export_vars.sh" ;;
24736     "build/pkg/pkginfo") CONFIG_FILES="$CONFIG_FILES build/pkg/pkginfo" ;;
24737     "apr-util.pc") CONFIG_FILES="$CONFIG_FILES apr-util.pc" ;;
24738     "apu-$APRUTIL_MAJOR_VERSION-config") CONFIG_FILES="$CONFIG_FILES apu-$APRUTIL_MAJOR_VERSION-config:apu-config.in" ;;
24739     "include/private/apu_select_dbm.h") CONFIG_FILES="$CONFIG_FILES include/private/apu_select_dbm.h" ;;
24740     "include/apr_ldap.h") CONFIG_FILES="$CONFIG_FILES include/apr_ldap.h" ;;
24741     "include/apu.h") CONFIG_FILES="$CONFIG_FILES include/apu.h" ;;
24742     "include/apu_want.h") CONFIG_FILES="$CONFIG_FILES include/apu_want.h" ;;
24743     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24744     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
24745
24746   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
24747   esac
24748 done
24749
24750
24751 # If the user did not use the arguments to specify the items to instantiate,
24752 # then the envvar interface is used.  Set only those that are not.
24753 # We use the long form for the default assignment because of an extremely
24754 # bizarre bug on SunOS 4.1.3.
24755 if $ac_need_defaults; then
24756   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24757   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24758   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24759 fi
24760
24761 # Have a temporary directory for convenience.  Make it in the build tree
24762 # simply because there is no reason against having it here, and in addition,
24763 # creating and moving files from /tmp can sometimes cause problems.
24764 # Hook for its removal unless debugging.
24765 # Note that there is a small window in which the directory will not be cleaned:
24766 # after its creation but before its name has been assigned to `$tmp'.
24767 $debug ||
24768 {
24769   tmp= ac_tmp=
24770   trap 'exit_status=$?
24771   : "${ac_tmp:=$tmp}"
24772   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
24773 ' 0
24774   trap 'as_fn_exit 1' 1 2 13 15
24775 }
24776 # Create a (secure) tmp directory for tmp files.
24777
24778 {
24779   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
24780   test -d "$tmp"
24781 }  ||
24782 {
24783   tmp=./conf$$-$RANDOM
24784   (umask 077 && mkdir "$tmp")
24785 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
24786 ac_tmp=$tmp
24787
24788 # Set up the scripts for CONFIG_FILES section.
24789 # No need to generate them if there are no CONFIG_FILES.
24790 # This happens for instance with `./config.status config.h'.
24791 if test -n "$CONFIG_FILES"; then
24792
24793
24794 ac_cr=`echo X | tr X '\015'`
24795 # On cygwin, bash can eat \r inside `` if the user requested igncr.
24796 # But we know of no other shell where ac_cr would be empty at this
24797 # point, so we can use a bashism as a fallback.
24798 if test "x$ac_cr" = x; then
24799   eval ac_cr=\$\'\\r\'
24800 fi
24801 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
24802 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
24803   ac_cs_awk_cr='\\r'
24804 else
24805   ac_cs_awk_cr=$ac_cr
24806 fi
24807
24808 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
24809 _ACEOF
24810
24811
24812 {
24813   echo "cat >conf$$subs.awk <<_ACEOF" &&
24814   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
24815   echo "_ACEOF"
24816 } >conf$$subs.sh ||
24817   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
24818 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
24819 ac_delim='%!_!# '
24820 for ac_last_try in false false false false false :; do
24821   . ./conf$$subs.sh ||
24822     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
24823
24824   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
24825   if test $ac_delim_n = $ac_delim_num; then
24826     break
24827   elif $ac_last_try; then
24828     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
24829   else
24830     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24831   fi
24832 done
24833 rm -f conf$$subs.sh
24834
24835 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24836 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
24837 _ACEOF
24838 sed -n '
24839 h
24840 s/^/S["/; s/!.*/"]=/
24841 p
24842 g
24843 s/^[^!]*!//
24844 :repl
24845 t repl
24846 s/'"$ac_delim"'$//
24847 t delim
24848 :nl
24849 h
24850 s/\(.\{148\}\)..*/\1/
24851 t more1
24852 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
24853 p
24854 n
24855 b repl
24856 :more1
24857 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24858 p
24859 g
24860 s/.\{148\}//
24861 t nl
24862 :delim
24863 h
24864 s/\(.\{148\}\)..*/\1/
24865 t more2
24866 s/["\\]/\\&/g; s/^/"/; s/$/"/
24867 p
24868 b
24869 :more2
24870 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24871 p
24872 g
24873 s/.\{148\}//
24874 t delim
24875 ' <conf$$subs.awk | sed '
24876 /^[^""]/{
24877   N
24878   s/\n//
24879 }
24880 ' >>$CONFIG_STATUS || ac_write_fail=1
24881 rm -f conf$$subs.awk
24882 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24883 _ACAWK
24884 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
24885   for (key in S) S_is_set[key] = 1
24886   FS = "\a"
24887
24888 }
24889 {
24890   line = $ 0
24891   nfields = split(line, field, "@")
24892   substed = 0
24893   len = length(field[1])
24894   for (i = 2; i < nfields; i++) {
24895     key = field[i]
24896     keylen = length(key)
24897     if (S_is_set[key]) {
24898       value = S[key]
24899       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
24900       len += length(value) + length(field[++i])
24901       substed = 1
24902     } else
24903       len += 1 + keylen
24904   }
24905
24906   print line
24907 }
24908
24909 _ACAWK
24910 _ACEOF
24911 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24912 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
24913   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
24914 else
24915   cat
24916 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
24917   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
24918 _ACEOF
24919
24920 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
24921 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
24922 # trailing colons and then remove the whole line if VPATH becomes empty
24923 # (actually we leave an empty line to preserve line numbers).
24924 if test "x$srcdir" = x.; then
24925   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
24926 h
24927 s///
24928 s/^/:/
24929 s/[      ]*$/:/
24930 s/:\$(srcdir):/:/g
24931 s/:\${srcdir}:/:/g
24932 s/:@srcdir@:/:/g
24933 s/^:*//
24934 s/:*$//
24935 x
24936 s/\(=[   ]*\).*/\1/
24937 G
24938 s/\n//
24939 s/^[^=]*=[       ]*$//
24940 }'
24941 fi
24942
24943 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24944 fi # test -n "$CONFIG_FILES"
24945
24946 # Set up the scripts for CONFIG_HEADERS section.
24947 # No need to generate them if there are no CONFIG_HEADERS.
24948 # This happens for instance with `./config.status Makefile'.
24949 if test -n "$CONFIG_HEADERS"; then
24950 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
24951 BEGIN {
24952 _ACEOF
24953
24954 # Transform confdefs.h into an awk script `defines.awk', embedded as
24955 # here-document in config.status, that substitutes the proper values into
24956 # config.h.in to produce config.h.
24957
24958 # Create a delimiter string that does not exist in confdefs.h, to ease
24959 # handling of long lines.
24960 ac_delim='%!_!# '
24961 for ac_last_try in false false :; do
24962   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
24963   if test -z "$ac_tt"; then
24964     break
24965   elif $ac_last_try; then
24966     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
24967   else
24968     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24969   fi
24970 done
24971
24972 # For the awk script, D is an array of macro values keyed by name,
24973 # likewise P contains macro parameters if any.  Preserve backslash
24974 # newline sequences.
24975
24976 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24977 sed -n '
24978 s/.\{148\}/&'"$ac_delim"'/g
24979 t rset
24980 :rset
24981 s/^[     ]*#[    ]*define[       ][      ]*/ /
24982 t def
24983 d
24984 :def
24985 s/\\$//
24986 t bsnl
24987 s/["\\]/\\&/g
24988 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
24989 D["\1"]=" \3"/p
24990 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
24991 d
24992 :bsnl
24993 s/["\\]/\\&/g
24994 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
24995 D["\1"]=" \3\\\\\\n"\\/p
24996 t cont
24997 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
24998 t cont
24999 d
25000 :cont
25001 n
25002 s/.\{148\}/&'"$ac_delim"'/g
25003 t clear
25004 :clear
25005 s/\\$//
25006 t bsnlc
25007 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25008 d
25009 :bsnlc
25010 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25011 b cont
25012 ' <confdefs.h | sed '
25013 s/'"$ac_delim"'/"\\\
25014 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25015
25016 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25017   for (key in D) D_is_set[key] = 1
25018   FS = "\a"
25019 }
25020 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25021   line = \$ 0
25022   split(line, arg, " ")
25023   if (arg[1] == "#") {
25024     defundef = arg[2]
25025     mac1 = arg[3]
25026   } else {
25027     defundef = substr(arg[1], 2)
25028     mac1 = arg[2]
25029   }
25030   split(mac1, mac2, "(") #)
25031   macro = mac2[1]
25032   prefix = substr(line, 1, index(line, defundef) - 1)
25033   if (D_is_set[macro]) {
25034     # Preserve the white space surrounding the "#".
25035     print prefix "define", macro P[macro] D[macro]
25036     next
25037   } else {
25038     # Replace #undef with comments.  This is necessary, for example,
25039     # in the case of _POSIX_SOURCE, which is predefined and required
25040     # on some systems where configure will not decide to define it.
25041     if (defundef == "undef") {
25042       print "/*", prefix defundef, macro, "*/"
25043       next
25044     }
25045   }
25046 }
25047 { print }
25048 _ACAWK
25049 _ACEOF
25050 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25051   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25052 fi # test -n "$CONFIG_HEADERS"
25053
25054
25055 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25056 shift
25057 for ac_tag
25058 do
25059   case $ac_tag in
25060   :[FHLC]) ac_mode=$ac_tag; continue;;
25061   esac
25062   case $ac_mode$ac_tag in
25063   :[FHL]*:*);;
25064   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25065   :[FH]-) ac_tag=-:-;;
25066   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25067   esac
25068   ac_save_IFS=$IFS
25069   IFS=:
25070   set x $ac_tag
25071   IFS=$ac_save_IFS
25072   shift
25073   ac_file=$1
25074   shift
25075
25076   case $ac_mode in
25077   :L) ac_source=$1;;
25078   :[FH])
25079     ac_file_inputs=
25080     for ac_f
25081     do
25082       case $ac_f in
25083       -) ac_f="$ac_tmp/stdin";;
25084       *) # Look for the file first in the build tree, then in the source tree
25085          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25086          # because $ac_f cannot contain `:'.
25087          test -f "$ac_f" ||
25088            case $ac_f in
25089            [\\/$]*) false;;
25090            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25091            esac ||
25092            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25093       esac
25094       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25095       as_fn_append ac_file_inputs " '$ac_f'"
25096     done
25097
25098     # Let's still pretend it is `configure' which instantiates (i.e., don't
25099     # use $as_me), people would be surprised to read:
25100     #    /* config.h.  Generated by config.status.  */
25101     configure_input='Generated from '`
25102           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25103         `' by configure.'
25104     if test x"$ac_file" != x-; then
25105       configure_input="$ac_file.  $configure_input"
25106       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25107 $as_echo "$as_me: creating $ac_file" >&6;}
25108     fi
25109     # Neutralize special characters interpreted by sed in replacement strings.
25110     case $configure_input in #(
25111     *\&* | *\|* | *\\* )
25112        ac_sed_conf_input=`$as_echo "$configure_input" |
25113        sed 's/[\\\\&|]/\\\\&/g'`;; #(
25114     *) ac_sed_conf_input=$configure_input;;
25115     esac
25116
25117     case $ac_tag in
25118     *:-:* | *:-) cat >"$ac_tmp/stdin" \
25119       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
25120     esac
25121     ;;
25122   esac
25123
25124   ac_dir=`$as_dirname -- "$ac_file" ||
25125 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25126          X"$ac_file" : 'X\(//\)[^/]' \| \
25127          X"$ac_file" : 'X\(//\)$' \| \
25128          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25129 $as_echo X"$ac_file" |
25130     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25131             s//\1/
25132             q
25133           }
25134           /^X\(\/\/\)[^/].*/{
25135             s//\1/
25136             q
25137           }
25138           /^X\(\/\/\)$/{
25139             s//\1/
25140             q
25141           }
25142           /^X\(\/\).*/{
25143             s//\1/
25144             q
25145           }
25146           s/.*/./; q'`
25147   as_dir="$ac_dir"; as_fn_mkdir_p
25148   ac_builddir=.
25149
25150 case "$ac_dir" in
25151 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25152 *)
25153   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25154   # A ".." for each directory in $ac_dir_suffix.
25155   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25156   case $ac_top_builddir_sub in
25157   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25158   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25159   esac ;;
25160 esac
25161 ac_abs_top_builddir=$ac_pwd
25162 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25163 # for backward compatibility:
25164 ac_top_builddir=$ac_top_build_prefix
25165
25166 case $srcdir in
25167   .)  # We are building in place.
25168     ac_srcdir=.
25169     ac_top_srcdir=$ac_top_builddir_sub
25170     ac_abs_top_srcdir=$ac_pwd ;;
25171   [\\/]* | ?:[\\/]* )  # Absolute name.
25172     ac_srcdir=$srcdir$ac_dir_suffix;
25173     ac_top_srcdir=$srcdir
25174     ac_abs_top_srcdir=$srcdir ;;
25175   *) # Relative name.
25176     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25177     ac_top_srcdir=$ac_top_build_prefix$srcdir
25178     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25179 esac
25180 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25181
25182
25183   case $ac_mode in
25184   :F)
25185   #
25186   # CONFIG_FILE
25187   #
25188
25189   case $INSTALL in
25190   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25191   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25192   esac
25193 _ACEOF
25194
25195 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25196 # If the template does not know about datarootdir, expand it.
25197 # FIXME: This hack should be removed a few years after 2.60.
25198 ac_datarootdir_hack=; ac_datarootdir_seen=
25199 ac_sed_dataroot='
25200 /datarootdir/ {
25201   p
25202   q
25203 }
25204 /@datadir@/p
25205 /@docdir@/p
25206 /@infodir@/p
25207 /@localedir@/p
25208 /@mandir@/p'
25209 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25210 *datarootdir*) ac_datarootdir_seen=yes;;
25211 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25212   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25213 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25214 _ACEOF
25215 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25216   ac_datarootdir_hack='
25217   s&@datadir@&$datadir&g
25218   s&@docdir@&$docdir&g
25219   s&@infodir@&$infodir&g
25220   s&@localedir@&$localedir&g
25221   s&@mandir@&$mandir&g
25222   s&\\\${datarootdir}&$datarootdir&g' ;;
25223 esac
25224 _ACEOF
25225
25226 # Neutralize VPATH when `$srcdir' = `.'.
25227 # Shell code in configure.ac might set extrasub.
25228 # FIXME: do we really want to maintain this feature?
25229 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25230 ac_sed_extra="$ac_vpsub
25231 $extrasub
25232 _ACEOF
25233 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25234 :t
25235 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25236 s|@configure_input@|$ac_sed_conf_input|;t t
25237 s&@top_builddir@&$ac_top_builddir_sub&;t t
25238 s&@top_build_prefix@&$ac_top_build_prefix&;t t
25239 s&@srcdir@&$ac_srcdir&;t t
25240 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25241 s&@top_srcdir@&$ac_top_srcdir&;t t
25242 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25243 s&@builddir@&$ac_builddir&;t t
25244 s&@abs_builddir@&$ac_abs_builddir&;t t
25245 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25246 s&@INSTALL@&$ac_INSTALL&;t t
25247 $ac_datarootdir_hack
25248 "
25249 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
25250   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25251
25252 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25253   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
25254   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
25255       "$ac_tmp/out"`; test -z "$ac_out"; } &&
25256   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25257 which seems to be undefined.  Please make sure it is defined" >&5
25258 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25259 which seems to be undefined.  Please make sure it is defined" >&2;}
25260
25261   rm -f "$ac_tmp/stdin"
25262   case $ac_file in
25263   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
25264   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
25265   esac \
25266   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25267  ;;
25268   :H)
25269   #
25270   # CONFIG_HEADER
25271   #
25272   if test x"$ac_file" != x-; then
25273     {
25274       $as_echo "/* $configure_input  */" \
25275       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
25276     } >"$ac_tmp/config.h" \
25277       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25278     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
25279       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25280 $as_echo "$as_me: $ac_file is unchanged" >&6;}
25281     else
25282       rm -f "$ac_file"
25283       mv "$ac_tmp/config.h" "$ac_file" \
25284         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25285     fi
25286   else
25287     $as_echo "/* $configure_input  */" \
25288       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
25289       || as_fn_error $? "could not create -" "$LINENO" 5
25290   fi
25291  ;;
25292
25293   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25294 $as_echo "$as_me: executing $ac_file commands" >&6;}
25295  ;;
25296   esac
25297
25298
25299   case $ac_file$ac_mode in
25300     "default":C)
25301 chmod +x apu-$APRUTIL_MAJOR_VERSION-config
25302  ;;
25303
25304   esac
25305 done # for ac_tag
25306
25307
25308 as_fn_exit 0
25309 _ACEOF
25310 ac_clean_files=$ac_clean_files_save
25311
25312 test $ac_write_fail = 0 ||
25313   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
25314
25315
25316 # configure is writing to config.log, and then calls config.status.
25317 # config.status does its own redirection, appending to config.log.
25318 # Unfortunately, on DOS this fails, as config.log is still kept open
25319 # by configure, so config.status won't be able to write to it; its
25320 # output is simply discarded.  So we exec the FD to /dev/null,
25321 # effectively closing config.log, so it can be properly (re)opened and
25322 # appended to by config.status.  When coming back to configure, we
25323 # need to make the FD available again.
25324 if test "$no_create" != yes; then
25325   ac_cs_success=:
25326   ac_config_status_args=
25327   test "$silent" = yes &&
25328     ac_config_status_args="$ac_config_status_args --quiet"
25329   exec 5>/dev/null
25330   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25331   exec 5>>config.log
25332   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25333   # would make configure fail if this is the last instruction.
25334   $ac_cs_success || as_fn_exit 1
25335 fi
25336 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25337   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25338 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25339 fi
25340