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
16DUALCASE=1; export DUALCASE # for MKS sh
17if 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
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_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.
43if 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 --'
47elif (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'
50else
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'
70fi
71
72# The user is always right.
73if 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  }
79fi
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.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
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
100IFS=$as_save_IFS
101
102     ;;
103esac
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.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
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.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export 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.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $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
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if 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
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -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
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
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
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
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
234fi; }
235IFS=$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.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $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
257exit 255
258fi
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
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_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.
305as_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.
315as_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.
363as_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.
373if (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  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # 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.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # 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.
408as_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
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_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.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_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
500ECHO_C= ECHO_N= ECHO_T=
501case `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';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (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
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_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.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 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.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="export_vars.sh.in"
586# Factoring default headers for most tests.
587ac_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
622ac_subst_vars='LTLIBOBJS
623LIBOBJS
624INCLUDE_OUTPUTS
625INCLUDE_RULES
626APRUTIL_LIBS
627APRUTIL_LDFLAGS
628APRUTIL_INCLUDES
629APRUTIL_PRIV_INCLUDES
630APRUTIL_EXPORT_LIBS
631EXTRA_OBJECTS
632APU_MODULES
633APU_DSO_LIBDIR
634APU_HAVE_MODULES
635APRUTIL_LIBNAME
636lib_target
637so_ext
638have_apr_iconv
639have_iconv
640APR_XML_DIR
641apu_dbd_tests
642LDADD_dbd_odbc
643apu_have_odbc
644ODBC_CONFIG
645LDADD_dbd_freetds
646apu_have_freetds
647LDADD_dbd_oracle
648apu_have_oracle
649LDADD_dbd_sqlite2
650apu_have_sqlite2
651LDADD_dbd_sqlite3
652apu_have_sqlite3
653LDADD_dbd_mysql
654apu_have_mysql
655MYSQL_CONFIG
656LDADD_dbd_pgsql
657apu_have_pgsql
658PGSQL_CONFIG
659LDADD_dbm_ndbm
660LDADD_dbm_gdbm
661LDADD_dbm_db
662apu_db_version
663apu_db_header
664apu_have_db
665apu_have_ndbm
666apu_have_gdbm
667apu_have_sdbm
668apu_use_db
669apu_use_ndbm
670apu_use_gdbm
671apu_use_sdbm
672LDADD_ldap
673apu_has_ldap_other
674apu_has_ldap_zos
675apu_has_ldap_tivoli
676apu_has_ldap_mozilla
677apu_has_ldap_netscape
678apu_has_ldap_microsoft
679apu_has_ldap_novell
680apu_has_ldap_solaris
681apu_has_ldap_openldap
682apu_has_ldap
683apu_has_ldapssl_install_routines
684apu_has_ldap_sslinit
685apu_has_ldapssl_init
686apu_has_ldap_start_tls_s
687apu_has_ldapssl_add_trusted_cert
688apu_has_ldapssl_client_deinit
689apu_has_ldapssl_client_init
690ldap_ssl_h
691lber_h
692ldap_h
693LDADD_crypto_nss
694apu_have_nss
695PKG_CONFIG
696apu_have_crypto
697LDADD_crypto_openssl
698apu_have_openssl
699EGREP
700GREP
701CPP
702APR_ICONV_DIR
703apr_shlibpath_var
704APR_BUILD_DIR
705APR_LIBS
706APR_INCLUDES
707OBJEXT
708EXEEXT
709ac_ct_CC
710CPPFLAGS
711LDFLAGS
712CFLAGS
713CC
714APU_LTVERSION
715APRUTIL_MAJOR_VERSION
716APRUTIL_DOTTED_VERSION
717abs_builddir
718abs_srcdir
719top_builddir
720LT_NO_INSTALL
721INSTALL_DATA
722INSTALL_SCRIPT
723INSTALL_PROGRAM
724target_os
725target_vendor
726target_cpu
727target
728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
736APU_CONFIG_LOCATION
737target_alias
738host_alias
739build_alias
740LIBS
741ECHO_T
742ECHO_N
743ECHO_C
744DEFS
745mandir
746localedir
747libdir
748psdir
749pdfdir
750dvidir
751htmldir
752infodir
753docdir
754oldincludedir
755includedir
756localstatedir
757sharedstatedir
758sysconfdir
759datadir
760datarootdir
761libexecdir
762sbindir
763bindir
764program_transform_name
765prefix
766exec_prefix
767PACKAGE_URL
768PACKAGE_BUGREPORT
769PACKAGE_STRING
770PACKAGE_VERSION
771PACKAGE_TARNAME
772PACKAGE_NAME
773PATH_SEPARATOR
774SHELL'
775ac_subst_files=''
776ac_user_opts='
777enable_option_checking
778enable_layout
779with_apr
780with_apr_iconv
781with_crypto
782with_openssl
783with_nss
784with_lber
785with_ldap_include
786with_ldap_lib
787with_ldap
788with_dbm
789with_gdbm
790with_ndbm
791with_berkeley_db
792with_pgsql
793with_mysql
794with_sqlite3
795with_sqlite2
796with_oracle_include
797with_oracle
798with_freetds
799with_odbc
800with_expat
801with_iconv
802enable_util_dso
803'
804      ac_precious_vars='build_alias
805host_alias
806target_alias
807CC
808CFLAGS
809LDFLAGS
810LIBS
811CPPFLAGS
812CPP'
813
814
815# Initialize some variables set by options.
816ac_init_help=
817ac_init_version=false
818ac_unrecognized_opts=
819ac_unrecognized_sep=
820# The variables have the same names as the options, with
821# dashes changed to underlines.
822cache_file=/dev/null
823exec_prefix=NONE
824no_create=
825no_recursion=
826prefix=NONE
827program_prefix=NONE
828program_suffix=NONE
829program_transform_name=s,x,x,
830silent=
831site=
832srcdir=
833verbose=
834x_includes=NONE
835x_libraries=NONE
836
837# Installation directory options.
838# These are left unexpanded so users can "make install exec_prefix=/foo"
839# and all the variables that are supposed to be based on exec_prefix
840# by default will actually change.
841# Use braces instead of parens because sh, perl, etc. also accept them.
842# (The list follows the same order as the GNU Coding Standards.)
843bindir='${exec_prefix}/bin'
844sbindir='${exec_prefix}/sbin'
845libexecdir='${exec_prefix}/libexec'
846datarootdir='${prefix}/share'
847datadir='${datarootdir}'
848sysconfdir='${prefix}/etc'
849sharedstatedir='${prefix}/com'
850localstatedir='${prefix}/var'
851includedir='${prefix}/include'
852oldincludedir='/usr/include'
853docdir='${datarootdir}/doc/${PACKAGE}'
854infodir='${datarootdir}/info'
855htmldir='${docdir}'
856dvidir='${docdir}'
857pdfdir='${docdir}'
858psdir='${docdir}'
859libdir='${exec_prefix}/lib'
860localedir='${datarootdir}/locale'
861mandir='${datarootdir}/man'
862
863ac_prev=
864ac_dashdash=
865for ac_option
866do
867  # If the previous option needs an argument, assign it.
868  if test -n "$ac_prev"; then
869    eval $ac_prev=\$ac_option
870    ac_prev=
871    continue
872  fi
873
874  case $ac_option in
875  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
876  *=)   ac_optarg= ;;
877  *)    ac_optarg=yes ;;
878  esac
879
880  # Accept the important Cygnus configure options, so we can diagnose typos.
881
882  case $ac_dashdash$ac_option in
883  --)
884    ac_dashdash=yes ;;
885
886  -bindir | --bindir | --bindi | --bind | --bin | --bi)
887    ac_prev=bindir ;;
888  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
889    bindir=$ac_optarg ;;
890
891  -build | --build | --buil | --bui | --bu)
892    ac_prev=build_alias ;;
893  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
894    build_alias=$ac_optarg ;;
895
896  -cache-file | --cache-file | --cache-fil | --cache-fi \
897  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
898    ac_prev=cache_file ;;
899  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
900  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
901    cache_file=$ac_optarg ;;
902
903  --config-cache | -C)
904    cache_file=config.cache ;;
905
906  -datadir | --datadir | --datadi | --datad)
907    ac_prev=datadir ;;
908  -datadir=* | --datadir=* | --datadi=* | --datad=*)
909    datadir=$ac_optarg ;;
910
911  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
912  | --dataroo | --dataro | --datar)
913    ac_prev=datarootdir ;;
914  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
915  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
916    datarootdir=$ac_optarg ;;
917
918  -disable-* | --disable-*)
919    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
920    # Reject names that are not valid shell variable names.
921    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
922      as_fn_error $? "invalid feature name: $ac_useropt"
923    ac_useropt_orig=$ac_useropt
924    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
925    case $ac_user_opts in
926      *"
927"enable_$ac_useropt"
928"*) ;;
929      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
930	 ac_unrecognized_sep=', ';;
931    esac
932    eval enable_$ac_useropt=no ;;
933
934  -docdir | --docdir | --docdi | --doc | --do)
935    ac_prev=docdir ;;
936  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
937    docdir=$ac_optarg ;;
938
939  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
940    ac_prev=dvidir ;;
941  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
942    dvidir=$ac_optarg ;;
943
944  -enable-* | --enable-*)
945    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
946    # Reject names that are not valid shell variable names.
947    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
948      as_fn_error $? "invalid feature name: $ac_useropt"
949    ac_useropt_orig=$ac_useropt
950    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
951    case $ac_user_opts in
952      *"
953"enable_$ac_useropt"
954"*) ;;
955      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
956	 ac_unrecognized_sep=', ';;
957    esac
958    eval enable_$ac_useropt=\$ac_optarg ;;
959
960  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
961  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
962  | --exec | --exe | --ex)
963    ac_prev=exec_prefix ;;
964  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
965  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
966  | --exec=* | --exe=* | --ex=*)
967    exec_prefix=$ac_optarg ;;
968
969  -gas | --gas | --ga | --g)
970    # Obsolete; use --with-gas.
971    with_gas=yes ;;
972
973  -help | --help | --hel | --he | -h)
974    ac_init_help=long ;;
975  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
976    ac_init_help=recursive ;;
977  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
978    ac_init_help=short ;;
979
980  -host | --host | --hos | --ho)
981    ac_prev=host_alias ;;
982  -host=* | --host=* | --hos=* | --ho=*)
983    host_alias=$ac_optarg ;;
984
985  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
986    ac_prev=htmldir ;;
987  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
988  | --ht=*)
989    htmldir=$ac_optarg ;;
990
991  -includedir | --includedir | --includedi | --included | --include \
992  | --includ | --inclu | --incl | --inc)
993    ac_prev=includedir ;;
994  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
995  | --includ=* | --inclu=* | --incl=* | --inc=*)
996    includedir=$ac_optarg ;;
997
998  -infodir | --infodir | --infodi | --infod | --info | --inf)
999    ac_prev=infodir ;;
1000  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1001    infodir=$ac_optarg ;;
1002
1003  -libdir | --libdir | --libdi | --libd)
1004    ac_prev=libdir ;;
1005  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1006    libdir=$ac_optarg ;;
1007
1008  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1009  | --libexe | --libex | --libe)
1010    ac_prev=libexecdir ;;
1011  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1012  | --libexe=* | --libex=* | --libe=*)
1013    libexecdir=$ac_optarg ;;
1014
1015  -localedir | --localedir | --localedi | --localed | --locale)
1016    ac_prev=localedir ;;
1017  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1018    localedir=$ac_optarg ;;
1019
1020  -localstatedir | --localstatedir | --localstatedi | --localstated \
1021  | --localstate | --localstat | --localsta | --localst | --locals)
1022    ac_prev=localstatedir ;;
1023  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1024  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1025    localstatedir=$ac_optarg ;;
1026
1027  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1028    ac_prev=mandir ;;
1029  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1030    mandir=$ac_optarg ;;
1031
1032  -nfp | --nfp | --nf)
1033    # Obsolete; use --without-fp.
1034    with_fp=no ;;
1035
1036  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1037  | --no-cr | --no-c | -n)
1038    no_create=yes ;;
1039
1040  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1041  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1042    no_recursion=yes ;;
1043
1044  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1045  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1046  | --oldin | --oldi | --old | --ol | --o)
1047    ac_prev=oldincludedir ;;
1048  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1049  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1050  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1051    oldincludedir=$ac_optarg ;;
1052
1053  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1054    ac_prev=prefix ;;
1055  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1056    prefix=$ac_optarg ;;
1057
1058  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1059  | --program-pre | --program-pr | --program-p)
1060    ac_prev=program_prefix ;;
1061  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1062  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1063    program_prefix=$ac_optarg ;;
1064
1065  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1066  | --program-suf | --program-su | --program-s)
1067    ac_prev=program_suffix ;;
1068  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1069  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1070    program_suffix=$ac_optarg ;;
1071
1072  -program-transform-name | --program-transform-name \
1073  | --program-transform-nam | --program-transform-na \
1074  | --program-transform-n | --program-transform- \
1075  | --program-transform | --program-transfor \
1076  | --program-transfo | --program-transf \
1077  | --program-trans | --program-tran \
1078  | --progr-tra | --program-tr | --program-t)
1079    ac_prev=program_transform_name ;;
1080  -program-transform-name=* | --program-transform-name=* \
1081  | --program-transform-nam=* | --program-transform-na=* \
1082  | --program-transform-n=* | --program-transform-=* \
1083  | --program-transform=* | --program-transfor=* \
1084  | --program-transfo=* | --program-transf=* \
1085  | --program-trans=* | --program-tran=* \
1086  | --progr-tra=* | --program-tr=* | --program-t=*)
1087    program_transform_name=$ac_optarg ;;
1088
1089  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1090    ac_prev=pdfdir ;;
1091  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1092    pdfdir=$ac_optarg ;;
1093
1094  -psdir | --psdir | --psdi | --psd | --ps)
1095    ac_prev=psdir ;;
1096  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1097    psdir=$ac_optarg ;;
1098
1099  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1100  | -silent | --silent | --silen | --sile | --sil)
1101    silent=yes ;;
1102
1103  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1104    ac_prev=sbindir ;;
1105  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1106  | --sbi=* | --sb=*)
1107    sbindir=$ac_optarg ;;
1108
1109  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1110  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1111  | --sharedst | --shareds | --shared | --share | --shar \
1112  | --sha | --sh)
1113    ac_prev=sharedstatedir ;;
1114  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1115  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1116  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1117  | --sha=* | --sh=*)
1118    sharedstatedir=$ac_optarg ;;
1119
1120  -site | --site | --sit)
1121    ac_prev=site ;;
1122  -site=* | --site=* | --sit=*)
1123    site=$ac_optarg ;;
1124
1125  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1126    ac_prev=srcdir ;;
1127  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1128    srcdir=$ac_optarg ;;
1129
1130  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1131  | --syscon | --sysco | --sysc | --sys | --sy)
1132    ac_prev=sysconfdir ;;
1133  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1134  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1135    sysconfdir=$ac_optarg ;;
1136
1137  -target | --target | --targe | --targ | --tar | --ta | --t)
1138    ac_prev=target_alias ;;
1139  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1140    target_alias=$ac_optarg ;;
1141
1142  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1143    verbose=yes ;;
1144
1145  -version | --version | --versio | --versi | --vers | -V)
1146    ac_init_version=: ;;
1147
1148  -with-* | --with-*)
1149    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1150    # Reject names that are not valid shell variable names.
1151    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1152      as_fn_error $? "invalid package name: $ac_useropt"
1153    ac_useropt_orig=$ac_useropt
1154    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1155    case $ac_user_opts in
1156      *"
1157"with_$ac_useropt"
1158"*) ;;
1159      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1160	 ac_unrecognized_sep=', ';;
1161    esac
1162    eval with_$ac_useropt=\$ac_optarg ;;
1163
1164  -without-* | --without-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid package name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"with_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval with_$ac_useropt=no ;;
1179
1180  --x)
1181    # Obsolete; use --with-x.
1182    with_x=yes ;;
1183
1184  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1185  | --x-incl | --x-inc | --x-in | --x-i)
1186    ac_prev=x_includes ;;
1187  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1188  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1189    x_includes=$ac_optarg ;;
1190
1191  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1192  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1193    ac_prev=x_libraries ;;
1194  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1195  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1196    x_libraries=$ac_optarg ;;
1197
1198  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1199Try \`$0 --help' for more information"
1200    ;;
1201
1202  *=*)
1203    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1204    # Reject names that are not valid shell variable names.
1205    case $ac_envvar in #(
1206      '' | [0-9]* | *[!_$as_cr_alnum]* )
1207      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1208    esac
1209    eval $ac_envvar=\$ac_optarg
1210    export $ac_envvar ;;
1211
1212  *)
1213    # FIXME: should be removed in autoconf 3.0.
1214    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1215    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1216      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1217    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1218    ;;
1219
1220  esac
1221done
1222
1223if test -n "$ac_prev"; then
1224  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1225  as_fn_error $? "missing argument to $ac_option"
1226fi
1227
1228if test -n "$ac_unrecognized_opts"; then
1229  case $enable_option_checking in
1230    no) ;;
1231    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1232    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1233  esac
1234fi
1235
1236# Check all directory arguments for consistency.
1237for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1238		datadir sysconfdir sharedstatedir localstatedir includedir \
1239		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1240		libdir localedir mandir
1241do
1242  eval ac_val=\$$ac_var
1243  # Remove trailing slashes.
1244  case $ac_val in
1245    */ )
1246      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1247      eval $ac_var=\$ac_val;;
1248  esac
1249  # Be sure to have absolute directory names.
1250  case $ac_val in
1251    [\\/$]* | ?:[\\/]* )  continue;;
1252    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1253  esac
1254  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1255done
1256
1257# There might be people who depend on the old broken behavior: `$host'
1258# used to hold the argument of --host etc.
1259# FIXME: To remove some day.
1260build=$build_alias
1261host=$host_alias
1262target=$target_alias
1263
1264# FIXME: To remove some day.
1265if test "x$host_alias" != x; then
1266  if test "x$build_alias" = x; then
1267    cross_compiling=maybe
1268  elif test "x$build_alias" != "x$host_alias"; then
1269    cross_compiling=yes
1270  fi
1271fi
1272
1273ac_tool_prefix=
1274test -n "$host_alias" && ac_tool_prefix=$host_alias-
1275
1276test "$silent" = yes && exec 6>/dev/null
1277
1278
1279ac_pwd=`pwd` && test -n "$ac_pwd" &&
1280ac_ls_di=`ls -di .` &&
1281ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1282  as_fn_error $? "working directory cannot be determined"
1283test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1284  as_fn_error $? "pwd does not report name of working directory"
1285
1286
1287# Find the source files, if location was not specified.
1288if test -z "$srcdir"; then
1289  ac_srcdir_defaulted=yes
1290  # Try the directory containing this script, then the parent directory.
1291  ac_confdir=`$as_dirname -- "$as_myself" ||
1292$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1293	 X"$as_myself" : 'X\(//\)[^/]' \| \
1294	 X"$as_myself" : 'X\(//\)$' \| \
1295	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1296$as_echo X"$as_myself" |
1297    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1298	    s//\1/
1299	    q
1300	  }
1301	  /^X\(\/\/\)[^/].*/{
1302	    s//\1/
1303	    q
1304	  }
1305	  /^X\(\/\/\)$/{
1306	    s//\1/
1307	    q
1308	  }
1309	  /^X\(\/\).*/{
1310	    s//\1/
1311	    q
1312	  }
1313	  s/.*/./; q'`
1314  srcdir=$ac_confdir
1315  if test ! -r "$srcdir/$ac_unique_file"; then
1316    srcdir=..
1317  fi
1318else
1319  ac_srcdir_defaulted=no
1320fi
1321if test ! -r "$srcdir/$ac_unique_file"; then
1322  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1323  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1324fi
1325ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1326ac_abs_confdir=`(
1327	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1328	pwd)`
1329# When building in place, set srcdir=.
1330if test "$ac_abs_confdir" = "$ac_pwd"; then
1331  srcdir=.
1332fi
1333# Remove unnecessary trailing slashes from srcdir.
1334# Double slashes in file names in object file debugging info
1335# mess up M-x gdb in Emacs.
1336case $srcdir in
1337*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1338esac
1339for ac_var in $ac_precious_vars; do
1340  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1341  eval ac_env_${ac_var}_value=\$${ac_var}
1342  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1343  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1344done
1345
1346#
1347# Report the --help message.
1348#
1349if test "$ac_init_help" = "long"; then
1350  # Omit some internal or obsolete options to make the list less imposing.
1351  # This message is too long to be a string in the A/UX 3.1 sh.
1352  cat <<_ACEOF
1353\`configure' configures this package to adapt to many kinds of systems.
1354
1355Usage: $0 [OPTION]... [VAR=VALUE]...
1356
1357To assign environment variables (e.g., CC, CFLAGS...), specify them as
1358VAR=VALUE.  See below for descriptions of some of the useful variables.
1359
1360Defaults for the options are specified in brackets.
1361
1362Configuration:
1363  -h, --help              display this help and exit
1364      --help=short        display options specific to this package
1365      --help=recursive    display the short help of all the included packages
1366  -V, --version           display version information and exit
1367  -q, --quiet, --silent   do not print \`checking ...' messages
1368      --cache-file=FILE   cache test results in FILE [disabled]
1369  -C, --config-cache      alias for \`--cache-file=config.cache'
1370  -n, --no-create         do not create output files
1371      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1372
1373Installation directories:
1374  --prefix=PREFIX         install architecture-independent files in PREFIX
1375                          [$ac_default_prefix]
1376  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1377                          [PREFIX]
1378
1379By default, \`make install' will install all the files in
1380\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1381an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1382for instance \`--prefix=\$HOME'.
1383
1384For better control, use the options below.
1385
1386Fine tuning of the installation directories:
1387  --bindir=DIR            user executables [EPREFIX/bin]
1388  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1389  --libexecdir=DIR        program executables [EPREFIX/libexec]
1390  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1391  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1392  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1393  --libdir=DIR            object code libraries [EPREFIX/lib]
1394  --includedir=DIR        C header files [PREFIX/include]
1395  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1396  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1397  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1398  --infodir=DIR           info documentation [DATAROOTDIR/info]
1399  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1400  --mandir=DIR            man documentation [DATAROOTDIR/man]
1401  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1402  --htmldir=DIR           html documentation [DOCDIR]
1403  --dvidir=DIR            dvi documentation [DOCDIR]
1404  --pdfdir=DIR            pdf documentation [DOCDIR]
1405  --psdir=DIR             ps documentation [DOCDIR]
1406_ACEOF
1407
1408  cat <<\_ACEOF
1409
1410System types:
1411  --build=BUILD     configure for building on BUILD [guessed]
1412  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1413  --target=TARGET   configure for building compilers for TARGET [HOST]
1414_ACEOF
1415fi
1416
1417if test -n "$ac_init_help"; then
1418
1419  cat <<\_ACEOF
1420
1421Optional Features:
1422  --disable-option-checking  ignore unrecognized --enable/--with options
1423  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1424  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1425  --enable-layout=LAYOUT
1426  --disable-util-dso      disable DSO build of modular components (crypto,
1427                          dbd, dbm, ldap)
1428
1429Optional Packages:
1430  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1431  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1432  --with-apr=PATH         prefix for installed APR or the full path to
1433                             apr-config
1434  --with-apr-iconv=DIR    relative path to apr-iconv source
1435  --with-crypto           enable crypto support
1436  --with-openssl=DIR      specify location of OpenSSL
1437  --with-nss=DIR          specify location of NSS
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}
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-freetds=DIR      specify FreeTDS location
1467  --with-odbc=DIR         specify ODBC location
1468  --with-expat=DIR        specify Expat location, or 'builtin'
1469  --with-iconv=DIR        path to iconv installation
1470
1471Some influential environment variables:
1472  CC          C compiler command
1473  CFLAGS      C compiler flags
1474  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1475              nonstandard directory <lib dir>
1476  LIBS        libraries to pass to the linker, e.g. -l<library>
1477  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1478              you have headers in a nonstandard directory <include dir>
1479  CPP         C preprocessor
1480
1481Use these variables to override the choices made by `configure' or to help
1482it to find libraries and programs with nonstandard names/locations.
1483
1484Report bugs to the package provider.
1485_ACEOF
1486ac_status=$?
1487fi
1488
1489if test "$ac_init_help" = "recursive"; then
1490  # If there are subdirs, report their specific --help.
1491  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1492    test -d "$ac_dir" ||
1493      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1494      continue
1495    ac_builddir=.
1496
1497case "$ac_dir" in
1498.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1499*)
1500  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1501  # A ".." for each directory in $ac_dir_suffix.
1502  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1503  case $ac_top_builddir_sub in
1504  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1505  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1506  esac ;;
1507esac
1508ac_abs_top_builddir=$ac_pwd
1509ac_abs_builddir=$ac_pwd$ac_dir_suffix
1510# for backward compatibility:
1511ac_top_builddir=$ac_top_build_prefix
1512
1513case $srcdir in
1514  .)  # We are building in place.
1515    ac_srcdir=.
1516    ac_top_srcdir=$ac_top_builddir_sub
1517    ac_abs_top_srcdir=$ac_pwd ;;
1518  [\\/]* | ?:[\\/]* )  # Absolute name.
1519    ac_srcdir=$srcdir$ac_dir_suffix;
1520    ac_top_srcdir=$srcdir
1521    ac_abs_top_srcdir=$srcdir ;;
1522  *) # Relative name.
1523    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1524    ac_top_srcdir=$ac_top_build_prefix$srcdir
1525    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1526esac
1527ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1528
1529    cd "$ac_dir" || { ac_status=$?; continue; }
1530    # Check for guested configure.
1531    if test -f "$ac_srcdir/configure.gnu"; then
1532      echo &&
1533      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1534    elif test -f "$ac_srcdir/configure"; then
1535      echo &&
1536      $SHELL "$ac_srcdir/configure" --help=recursive
1537    else
1538      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1539    fi || ac_status=$?
1540    cd "$ac_pwd" || { ac_status=$?; break; }
1541  done
1542fi
1543
1544test -n "$ac_init_help" && exit $ac_status
1545if $ac_init_version; then
1546  cat <<\_ACEOF
1547configure
1548generated by GNU Autoconf 2.69
1549
1550Copyright (C) 2012 Free Software Foundation, Inc.
1551This configure script is free software; the Free Software Foundation
1552gives unlimited permission to copy, distribute and modify it.
1553_ACEOF
1554  exit
1555fi
1556
1557## ------------------------ ##
1558## Autoconf initialization. ##
1559## ------------------------ ##
1560
1561# ac_fn_c_try_compile LINENO
1562# --------------------------
1563# Try to compile conftest.$ac_ext, and return whether this succeeded.
1564ac_fn_c_try_compile ()
1565{
1566  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1567  rm -f conftest.$ac_objext
1568  if { { ac_try="$ac_compile"
1569case "(($ac_try" in
1570  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571  *) ac_try_echo=$ac_try;;
1572esac
1573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574$as_echo "$ac_try_echo"; } >&5
1575  (eval "$ac_compile") 2>conftest.err
1576  ac_status=$?
1577  if test -s conftest.err; then
1578    grep -v '^ *+' conftest.err >conftest.er1
1579    cat conftest.er1 >&5
1580    mv -f conftest.er1 conftest.err
1581  fi
1582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1583  test $ac_status = 0; } && {
1584	 test -z "$ac_c_werror_flag" ||
1585	 test ! -s conftest.err
1586       } && test -s conftest.$ac_objext; then :
1587  ac_retval=0
1588else
1589  $as_echo "$as_me: failed program was:" >&5
1590sed 's/^/| /' conftest.$ac_ext >&5
1591
1592	ac_retval=1
1593fi
1594  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1595  as_fn_set_status $ac_retval
1596
1597} # ac_fn_c_try_compile
1598
1599# ac_fn_c_try_link LINENO
1600# -----------------------
1601# Try to link conftest.$ac_ext, and return whether this succeeded.
1602ac_fn_c_try_link ()
1603{
1604  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1605  rm -f conftest.$ac_objext conftest$ac_exeext
1606  if { { ac_try="$ac_link"
1607case "(($ac_try" in
1608  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1609  *) ac_try_echo=$ac_try;;
1610esac
1611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1612$as_echo "$ac_try_echo"; } >&5
1613  (eval "$ac_link") 2>conftest.err
1614  ac_status=$?
1615  if test -s conftest.err; then
1616    grep -v '^ *+' conftest.err >conftest.er1
1617    cat conftest.er1 >&5
1618    mv -f conftest.er1 conftest.err
1619  fi
1620  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1621  test $ac_status = 0; } && {
1622	 test -z "$ac_c_werror_flag" ||
1623	 test ! -s conftest.err
1624       } && test -s conftest$ac_exeext && {
1625	 test "$cross_compiling" = yes ||
1626	 test -x conftest$ac_exeext
1627       }; then :
1628  ac_retval=0
1629else
1630  $as_echo "$as_me: failed program was:" >&5
1631sed 's/^/| /' conftest.$ac_ext >&5
1632
1633	ac_retval=1
1634fi
1635  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1636  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1637  # interfere with the next link command; also delete a directory that is
1638  # left behind by Apple's compiler.  We do this before executing the actions.
1639  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1640  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1641  as_fn_set_status $ac_retval
1642
1643} # ac_fn_c_try_link
1644
1645# ac_fn_c_try_cpp LINENO
1646# ----------------------
1647# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_cpp ()
1649{
1650  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651  if { { ac_try="$ac_cpp conftest.$ac_ext"
1652case "(($ac_try" in
1653  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654  *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1659  ac_status=$?
1660  if test -s conftest.err; then
1661    grep -v '^ *+' conftest.err >conftest.er1
1662    cat conftest.er1 >&5
1663    mv -f conftest.er1 conftest.err
1664  fi
1665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666  test $ac_status = 0; } > conftest.i && {
1667	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1668	 test ! -s conftest.err
1669       }; then :
1670  ac_retval=0
1671else
1672  $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675    ac_retval=1
1676fi
1677  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1678  as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_cpp
1681
1682# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1683# -------------------------------------------------------
1684# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1685# the include files in INCLUDES and setting the cache variable VAR
1686# accordingly.
1687ac_fn_c_check_header_mongrel ()
1688{
1689  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690  if eval \${$3+:} false; then :
1691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1692$as_echo_n "checking for $2... " >&6; }
1693if eval \${$3+:} false; then :
1694  $as_echo_n "(cached) " >&6
1695fi
1696eval ac_res=\$$3
1697	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1698$as_echo "$ac_res" >&6; }
1699else
1700  # Is the header compilable?
1701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1702$as_echo_n "checking $2 usability... " >&6; }
1703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1704/* end confdefs.h.  */
1705$4
1706#include <$2>
1707_ACEOF
1708if ac_fn_c_try_compile "$LINENO"; then :
1709  ac_header_compiler=yes
1710else
1711  ac_header_compiler=no
1712fi
1713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1715$as_echo "$ac_header_compiler" >&6; }
1716
1717# Is the header present?
1718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1719$as_echo_n "checking $2 presence... " >&6; }
1720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1721/* end confdefs.h.  */
1722#include <$2>
1723_ACEOF
1724if ac_fn_c_try_cpp "$LINENO"; then :
1725  ac_header_preproc=yes
1726else
1727  ac_header_preproc=no
1728fi
1729rm -f conftest.err conftest.i conftest.$ac_ext
1730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1731$as_echo "$ac_header_preproc" >&6; }
1732
1733# So?  What about this header?
1734case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1735  yes:no: )
1736    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1737$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1738    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1739$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1740    ;;
1741  no:yes:* )
1742    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1743$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1744    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1745$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1746    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1747$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1748    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1749$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1750    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1751$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1752    ;;
1753esac
1754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1755$as_echo_n "checking for $2... " >&6; }
1756if eval \${$3+:} false; then :
1757  $as_echo_n "(cached) " >&6
1758else
1759  eval "$3=\$ac_header_compiler"
1760fi
1761eval ac_res=\$$3
1762	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764fi
1765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1766
1767} # ac_fn_c_check_header_mongrel
1768
1769# ac_fn_c_try_run LINENO
1770# ----------------------
1771# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1772# that executables *can* be run.
1773ac_fn_c_try_run ()
1774{
1775  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776  if { { ac_try="$ac_link"
1777case "(($ac_try" in
1778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779  *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782$as_echo "$ac_try_echo"; } >&5
1783  (eval "$ac_link") 2>&5
1784  ac_status=$?
1785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1787  { { case "(($ac_try" in
1788  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1789  *) ac_try_echo=$ac_try;;
1790esac
1791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1792$as_echo "$ac_try_echo"; } >&5
1793  (eval "$ac_try") 2>&5
1794  ac_status=$?
1795  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796  test $ac_status = 0; }; }; then :
1797  ac_retval=0
1798else
1799  $as_echo "$as_me: program exited with status $ac_status" >&5
1800       $as_echo "$as_me: failed program was:" >&5
1801sed 's/^/| /' conftest.$ac_ext >&5
1802
1803       ac_retval=$ac_status
1804fi
1805  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1806  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1807  as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_run
1810
1811# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1812# -------------------------------------------------------
1813# Tests whether HEADER exists and can be compiled using the include files in
1814# INCLUDES, setting the cache variable VAR accordingly.
1815ac_fn_c_check_header_compile ()
1816{
1817  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
1820if eval \${$3+:} false; then :
1821  $as_echo_n "(cached) " >&6
1822else
1823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h.  */
1825$4
1826#include <$2>
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829  eval "$3=yes"
1830else
1831  eval "$3=no"
1832fi
1833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1834fi
1835eval ac_res=\$$3
1836	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1837$as_echo "$ac_res" >&6; }
1838  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839
1840} # ac_fn_c_check_header_compile
1841
1842# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1843# ---------------------------------------------
1844# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1845# accordingly.
1846ac_fn_c_check_decl ()
1847{
1848  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849  as_decl_name=`echo $2|sed 's/ *(.*//'`
1850  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1852$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1853if eval \${$3+:} false; then :
1854  $as_echo_n "(cached) " >&6
1855else
1856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1857/* end confdefs.h.  */
1858$4
1859int
1860main ()
1861{
1862#ifndef $as_decl_name
1863#ifdef __cplusplus
1864  (void) $as_decl_use;
1865#else
1866  (void) $as_decl_name;
1867#endif
1868#endif
1869
1870  ;
1871  return 0;
1872}
1873_ACEOF
1874if ac_fn_c_try_compile "$LINENO"; then :
1875  eval "$3=yes"
1876else
1877  eval "$3=no"
1878fi
1879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1880fi
1881eval ac_res=\$$3
1882	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883$as_echo "$ac_res" >&6; }
1884  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1885
1886} # ac_fn_c_check_decl
1887
1888# ac_fn_c_check_func LINENO FUNC VAR
1889# ----------------------------------
1890# Tests whether FUNC exists, setting the cache variable VAR accordingly
1891ac_fn_c_check_func ()
1892{
1893  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895$as_echo_n "checking for $2... " >&6; }
1896if eval \${$3+:} false; then :
1897  $as_echo_n "(cached) " >&6
1898else
1899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h.  */
1901/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1902   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1903#define $2 innocuous_$2
1904
1905/* System header to define __stub macros and hopefully few prototypes,
1906    which can conflict with char $2 (); below.
1907    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1908    <limits.h> exists even on freestanding compilers.  */
1909
1910#ifdef __STDC__
1911# include <limits.h>
1912#else
1913# include <assert.h>
1914#endif
1915
1916#undef $2
1917
1918/* Override any GCC internal prototype to avoid an error.
1919   Use char because int might match the return type of a GCC
1920   builtin and then its argument prototype would still apply.  */
1921#ifdef __cplusplus
1922extern "C"
1923#endif
1924char $2 ();
1925/* The GNU C library defines this for functions which it implements
1926    to always fail with ENOSYS.  Some functions are actually named
1927    something starting with __ and the normal name is an alias.  */
1928#if defined __stub_$2 || defined __stub___$2
1929choke me
1930#endif
1931
1932int
1933main ()
1934{
1935return $2 ();
1936  ;
1937  return 0;
1938}
1939_ACEOF
1940if ac_fn_c_try_link "$LINENO"; then :
1941  eval "$3=yes"
1942else
1943  eval "$3=no"
1944fi
1945rm -f core conftest.err conftest.$ac_objext \
1946    conftest$ac_exeext conftest.$ac_ext
1947fi
1948eval ac_res=\$$3
1949	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950$as_echo "$ac_res" >&6; }
1951  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1952
1953} # ac_fn_c_check_func
1954cat >config.log <<_ACEOF
1955This file contains any messages produced by compilers while
1956running configure, to aid debugging if configure makes a mistake.
1957
1958It was created by $as_me, which was
1959generated by GNU Autoconf 2.69.  Invocation command line was
1960
1961  $ $0 $@
1962
1963_ACEOF
1964exec 5>>config.log
1965{
1966cat <<_ASUNAME
1967## --------- ##
1968## Platform. ##
1969## --------- ##
1970
1971hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1972uname -m = `(uname -m) 2>/dev/null || echo unknown`
1973uname -r = `(uname -r) 2>/dev/null || echo unknown`
1974uname -s = `(uname -s) 2>/dev/null || echo unknown`
1975uname -v = `(uname -v) 2>/dev/null || echo unknown`
1976
1977/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1978/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1979
1980/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1981/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1982/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1983/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1984/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1985/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1986/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1987
1988_ASUNAME
1989
1990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1991for as_dir in $PATH
1992do
1993  IFS=$as_save_IFS
1994  test -z "$as_dir" && as_dir=.
1995    $as_echo "PATH: $as_dir"
1996  done
1997IFS=$as_save_IFS
1998
1999} >&5
2000
2001cat >&5 <<_ACEOF
2002
2003
2004## ----------- ##
2005## Core tests. ##
2006## ----------- ##
2007
2008_ACEOF
2009
2010
2011# Keep a trace of the command line.
2012# Strip out --no-create and --no-recursion so they do not pile up.
2013# Strip out --silent because we don't want to record it for future runs.
2014# Also quote any args containing shell meta-characters.
2015# Make two passes to allow for proper duplicate-argument suppression.
2016ac_configure_args=
2017ac_configure_args0=
2018ac_configure_args1=
2019ac_must_keep_next=false
2020for ac_pass in 1 2
2021do
2022  for ac_arg
2023  do
2024    case $ac_arg in
2025    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2026    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2027    | -silent | --silent | --silen | --sile | --sil)
2028      continue ;;
2029    *\'*)
2030      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2031    esac
2032    case $ac_pass in
2033    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2034    2)
2035      as_fn_append ac_configure_args1 " '$ac_arg'"
2036      if test $ac_must_keep_next = true; then
2037	ac_must_keep_next=false # Got value, back to normal.
2038      else
2039	case $ac_arg in
2040	  *=* | --config-cache | -C | -disable-* | --disable-* \
2041	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2042	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2043	  | -with-* | --with-* | -without-* | --without-* | --x)
2044	    case "$ac_configure_args0 " in
2045	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2046	    esac
2047	    ;;
2048	  -* ) ac_must_keep_next=true ;;
2049	esac
2050      fi
2051      as_fn_append ac_configure_args " '$ac_arg'"
2052      ;;
2053    esac
2054  done
2055done
2056{ ac_configure_args0=; unset ac_configure_args0;}
2057{ ac_configure_args1=; unset ac_configure_args1;}
2058
2059# When interrupted or exit'd, cleanup temporary files, and complete
2060# config.log.  We remove comments because anyway the quotes in there
2061# would cause problems or look ugly.
2062# WARNING: Use '\'' to represent an apostrophe within the trap.
2063# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2064trap 'exit_status=$?
2065  # Save into config.log some information that might help in debugging.
2066  {
2067    echo
2068
2069    $as_echo "## ---------------- ##
2070## Cache variables. ##
2071## ---------------- ##"
2072    echo
2073    # The following way of writing the cache mishandles newlines in values,
2074(
2075  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2076    eval ac_val=\$$ac_var
2077    case $ac_val in #(
2078    *${as_nl}*)
2079      case $ac_var in #(
2080      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2081$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2082      esac
2083      case $ac_var in #(
2084      _ | IFS | as_nl) ;; #(
2085      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2086      *) { eval $ac_var=; unset $ac_var;} ;;
2087      esac ;;
2088    esac
2089  done
2090  (set) 2>&1 |
2091    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2092    *${as_nl}ac_space=\ *)
2093      sed -n \
2094	"s/'\''/'\''\\\\'\'''\''/g;
2095	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2096      ;; #(
2097    *)
2098      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2099      ;;
2100    esac |
2101    sort
2102)
2103    echo
2104
2105    $as_echo "## ----------------- ##
2106## Output variables. ##
2107## ----------------- ##"
2108    echo
2109    for ac_var in $ac_subst_vars
2110    do
2111      eval ac_val=\$$ac_var
2112      case $ac_val in
2113      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2114      esac
2115      $as_echo "$ac_var='\''$ac_val'\''"
2116    done | sort
2117    echo
2118
2119    if test -n "$ac_subst_files"; then
2120      $as_echo "## ------------------- ##
2121## File substitutions. ##
2122## ------------------- ##"
2123      echo
2124      for ac_var in $ac_subst_files
2125      do
2126	eval ac_val=\$$ac_var
2127	case $ac_val in
2128	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2129	esac
2130	$as_echo "$ac_var='\''$ac_val'\''"
2131      done | sort
2132      echo
2133    fi
2134
2135    if test -s confdefs.h; then
2136      $as_echo "## ----------- ##
2137## confdefs.h. ##
2138## ----------- ##"
2139      echo
2140      cat confdefs.h
2141      echo
2142    fi
2143    test "$ac_signal" != 0 &&
2144      $as_echo "$as_me: caught signal $ac_signal"
2145    $as_echo "$as_me: exit $exit_status"
2146  } >&5
2147  rm -f core *.core core.conftest.* &&
2148    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2149    exit $exit_status
2150' 0
2151for ac_signal in 1 2 13 15; do
2152  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2153done
2154ac_signal=0
2155
2156# confdefs.h avoids OS command line length limits that DEFS can exceed.
2157rm -f -r conftest* confdefs.h
2158
2159$as_echo "/* confdefs.h */" > confdefs.h
2160
2161# Predefined preprocessor variables.
2162
2163cat >>confdefs.h <<_ACEOF
2164#define PACKAGE_NAME "$PACKAGE_NAME"
2165_ACEOF
2166
2167cat >>confdefs.h <<_ACEOF
2168#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2169_ACEOF
2170
2171cat >>confdefs.h <<_ACEOF
2172#define PACKAGE_VERSION "$PACKAGE_VERSION"
2173_ACEOF
2174
2175cat >>confdefs.h <<_ACEOF
2176#define PACKAGE_STRING "$PACKAGE_STRING"
2177_ACEOF
2178
2179cat >>confdefs.h <<_ACEOF
2180#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2181_ACEOF
2182
2183cat >>confdefs.h <<_ACEOF
2184#define PACKAGE_URL "$PACKAGE_URL"
2185_ACEOF
2186
2187
2188# Let the site file select an alternate cache file if it wants to.
2189# Prefer an explicitly selected file to automatically selected ones.
2190ac_site_file1=NONE
2191ac_site_file2=NONE
2192if test -n "$CONFIG_SITE"; then
2193  # We do not want a PATH search for config.site.
2194  case $CONFIG_SITE in #((
2195    -*)  ac_site_file1=./$CONFIG_SITE;;
2196    */*) ac_site_file1=$CONFIG_SITE;;
2197    *)   ac_site_file1=./$CONFIG_SITE;;
2198  esac
2199elif test "x$prefix" != xNONE; then
2200  ac_site_file1=$prefix/share/config.site
2201  ac_site_file2=$prefix/etc/config.site
2202else
2203  ac_site_file1=$ac_default_prefix/share/config.site
2204  ac_site_file2=$ac_default_prefix/etc/config.site
2205fi
2206for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2207do
2208  test "x$ac_site_file" = xNONE && continue
2209  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2210    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2211$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2212    sed 's/^/| /' "$ac_site_file" >&5
2213    . "$ac_site_file" \
2214      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2216as_fn_error $? "failed to load site script $ac_site_file
2217See \`config.log' for more details" "$LINENO" 5; }
2218  fi
2219done
2220
2221if test -r "$cache_file"; then
2222  # Some versions of bash will fail to source /dev/null (special files
2223  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2224  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2225    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2226$as_echo "$as_me: loading cache $cache_file" >&6;}
2227    case $cache_file in
2228      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2229      *)                      . "./$cache_file";;
2230    esac
2231  fi
2232else
2233  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2234$as_echo "$as_me: creating cache $cache_file" >&6;}
2235  >$cache_file
2236fi
2237
2238# Check that the precious variables saved in the cache have kept the same
2239# value.
2240ac_cache_corrupted=false
2241for ac_var in $ac_precious_vars; do
2242  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2243  eval ac_new_set=\$ac_env_${ac_var}_set
2244  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2245  eval ac_new_val=\$ac_env_${ac_var}_value
2246  case $ac_old_set,$ac_new_set in
2247    set,)
2248      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2249$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2250      ac_cache_corrupted=: ;;
2251    ,set)
2252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2253$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2254      ac_cache_corrupted=: ;;
2255    ,);;
2256    *)
2257      if test "x$ac_old_val" != "x$ac_new_val"; then
2258	# differences in whitespace do not lead to failure.
2259	ac_old_val_w=`echo x $ac_old_val`
2260	ac_new_val_w=`echo x $ac_new_val`
2261	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2262	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2263$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2264	  ac_cache_corrupted=:
2265	else
2266	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2267$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2268	  eval $ac_var=\$ac_old_val
2269	fi
2270	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2271$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2272	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2273$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2274      fi;;
2275  esac
2276  # Pass precious variables to config.status.
2277  if test "$ac_new_set" = set; then
2278    case $ac_new_val in
2279    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2280    *) ac_arg=$ac_var=$ac_new_val ;;
2281    esac
2282    case " $ac_configure_args " in
2283      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2284      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2285    esac
2286  fi
2287done
2288if $ac_cache_corrupted; then
2289  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2291  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2292$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2293  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2294fi
2295## -------------------- ##
2296## Main body of script. ##
2297## -------------------- ##
2298
2299ac_ext=c
2300ac_cpp='$CPP $CPPFLAGS'
2301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2303ac_compiler_gnu=$ac_cv_c_compiler_gnu
2304
2305
2306
2307ac_config_headers="$ac_config_headers include/private/apu_config.h"
2308
2309ac_aux_dir=
2310for ac_dir in build "$srcdir"/build; do
2311  if test -f "$ac_dir/install-sh"; then
2312    ac_aux_dir=$ac_dir
2313    ac_install_sh="$ac_aux_dir/install-sh -c"
2314    break
2315  elif test -f "$ac_dir/install.sh"; then
2316    ac_aux_dir=$ac_dir
2317    ac_install_sh="$ac_aux_dir/install.sh -c"
2318    break
2319  elif test -f "$ac_dir/shtool"; then
2320    ac_aux_dir=$ac_dir
2321    ac_install_sh="$ac_aux_dir/shtool install -c"
2322    break
2323  fi
2324done
2325if test -z "$ac_aux_dir"; then
2326  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2327fi
2328
2329# These three variables are undocumented and unsupported,
2330# and are intended to be withdrawn in a future Autoconf release.
2331# They can cause serious problems if a builder's source tree is in a directory
2332# whose full name contains unusual characters.
2333ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2334ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2335ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
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  rm -f config.nice
2514  cat >config.nice<<EOF
2515#! /bin/sh
2516#
2517# Created by configure
2518
2519EOF
2520  if test -n "$CC"; then
2521    echo "CC=\"$CC\"; export CC" >> config.nice
2522  fi
2523  if test -n "$CFLAGS"; then
2524    echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> config.nice
2525  fi
2526  if test -n "$CPPFLAGS"; then
2527    echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> config.nice
2528  fi
2529  if test -n "$LDFLAGS"; then
2530    echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> config.nice
2531  fi
2532  if test -n "$LTFLAGS"; then
2533    echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> config.nice
2534  fi
2535  if test -n "$LIBS"; then
2536    echo "LIBS=\"$LIBS\"; export LIBS" >> config.nice
2537  fi
2538  if test -n "$INCLUDES"; then
2539    echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> config.nice
2540  fi
2541  if test -n "$NOTEST_CFLAGS"; then
2542    echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> config.nice
2543  fi
2544  if test -n "$NOTEST_CPPFLAGS"; then
2545    echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> config.nice
2546  fi
2547  if test -n "$NOTEST_LDFLAGS"; then
2548    echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> config.nice
2549  fi
2550  if test -n "$NOTEST_LIBS"; then
2551    echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> config.nice
2552  fi
2553
2554  # Retrieve command-line arguments.
2555  eval "set x $0 $ac_configure_args"
2556  shift
2557
2558  for arg
2559  do
2560
2561ap_last=
2562ap_cur="$arg"
2563while test "x${ap_cur}" != "x${ap_last}";
2564do
2565  ap_last="${ap_cur}"
2566  ap_cur=`eval "echo ${ap_cur}"`
2567done
2568arg="${ap_cur}"
2569
2570    echo "\"$arg\" \\" >> config.nice
2571  done
2572  echo '"$@"' >> config.nice
2573  chmod +x config.nice
2574
2575
2576
2577abs_srcdir=`(cd $srcdir && pwd)`
2578abs_builddir=`pwd`
2579
2580if test "$abs_builddir" != "$abs_srcdir"; then
2581  USE_VPATH=1
2582  APU_CONFIG_LOCATION=build
2583else
2584  APU_CONFIG_LOCATION=source
2585fi
2586
2587
2588
2589# Make sure we can run config.sub.
2590$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2591  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2592
2593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2594$as_echo_n "checking build system type... " >&6; }
2595if ${ac_cv_build+:} false; then :
2596  $as_echo_n "(cached) " >&6
2597else
2598  ac_build_alias=$build_alias
2599test "x$ac_build_alias" = x &&
2600  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2601test "x$ac_build_alias" = x &&
2602  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2603ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2604  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2605
2606fi
2607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2608$as_echo "$ac_cv_build" >&6; }
2609case $ac_cv_build in
2610*-*-*) ;;
2611*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2612esac
2613build=$ac_cv_build
2614ac_save_IFS=$IFS; IFS='-'
2615set x $ac_cv_build
2616shift
2617build_cpu=$1
2618build_vendor=$2
2619shift; shift
2620# Remember, the first character of IFS is used to create $*,
2621# except with old shells:
2622build_os=$*
2623IFS=$ac_save_IFS
2624case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2625
2626
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2628$as_echo_n "checking host system type... " >&6; }
2629if ${ac_cv_host+:} false; then :
2630  $as_echo_n "(cached) " >&6
2631else
2632  if test "x$host_alias" = x; then
2633  ac_cv_host=$ac_cv_build
2634else
2635  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2636    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2637fi
2638
2639fi
2640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2641$as_echo "$ac_cv_host" >&6; }
2642case $ac_cv_host in
2643*-*-*) ;;
2644*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2645esac
2646host=$ac_cv_host
2647ac_save_IFS=$IFS; IFS='-'
2648set x $ac_cv_host
2649shift
2650host_cpu=$1
2651host_vendor=$2
2652shift; shift
2653# Remember, the first character of IFS is used to create $*,
2654# except with old shells:
2655host_os=$*
2656IFS=$ac_save_IFS
2657case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2658
2659
2660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2661$as_echo_n "checking target system type... " >&6; }
2662if ${ac_cv_target+:} false; then :
2663  $as_echo_n "(cached) " >&6
2664else
2665  if test "x$target_alias" = x; then
2666  ac_cv_target=$ac_cv_host
2667else
2668  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2669    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2670fi
2671
2672fi
2673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2674$as_echo "$ac_cv_target" >&6; }
2675case $ac_cv_target in
2676*-*-*) ;;
2677*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2678esac
2679target=$ac_cv_target
2680ac_save_IFS=$IFS; IFS='-'
2681set x $ac_cv_target
2682shift
2683target_cpu=$1
2684target_vendor=$2
2685shift; shift
2686# Remember, the first character of IFS is used to create $*,
2687# except with old shells:
2688target_os=$*
2689IFS=$ac_save_IFS
2690case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2691
2692
2693# The aliases save the names the user supplied, while $host etc.
2694# will get canonicalized.
2695test -n "$target_alias" &&
2696  test "$program_prefix$program_suffix$program_transform_name" = \
2697    NONENONEs,x,x, &&
2698  program_prefix=${target_alias}-
2699
2700
2701# Find a good install program.  We prefer a C program (faster),
2702# so one script is as good as another.  But avoid the broken or
2703# incompatible versions:
2704# SysV /etc/install, /usr/sbin/install
2705# SunOS /usr/etc/install
2706# IRIX /sbin/install
2707# AIX /bin/install
2708# AmigaOS /C/install, which installs bootblocks on floppy discs
2709# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2710# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2711# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2712# OS/2's system install, which has a completely different semantic
2713# ./install, which can be erroneously created by make from ./install.sh.
2714# Reject install programs that cannot install multiple files.
2715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2716$as_echo_n "checking for a BSD-compatible install... " >&6; }
2717if test -z "$INSTALL"; then
2718if ${ac_cv_path_install+:} false; then :
2719  $as_echo_n "(cached) " >&6
2720else
2721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724  IFS=$as_save_IFS
2725  test -z "$as_dir" && as_dir=.
2726    # Account for people who put trailing slashes in PATH elements.
2727case $as_dir/ in #((
2728  ./ | .// | /[cC]/* | \
2729  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2730  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2731  /usr/ucb/* ) ;;
2732  *)
2733    # OSF1 and SCO ODT 3.0 have their own names for install.
2734    # Don't use installbsd from OSF since it installs stuff as root
2735    # by default.
2736    for ac_prog in ginstall scoinst install; do
2737      for ac_exec_ext in '' $ac_executable_extensions; do
2738	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2739	  if test $ac_prog = install &&
2740	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2741	    # AIX install.  It has an incompatible calling convention.
2742	    :
2743	  elif test $ac_prog = install &&
2744	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2745	    # program-specific install script used by HP pwplus--don't use.
2746	    :
2747	  else
2748	    rm -rf conftest.one conftest.two conftest.dir
2749	    echo one > conftest.one
2750	    echo two > conftest.two
2751	    mkdir conftest.dir
2752	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2753	      test -s conftest.one && test -s conftest.two &&
2754	      test -s conftest.dir/conftest.one &&
2755	      test -s conftest.dir/conftest.two
2756	    then
2757	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2758	      break 3
2759	    fi
2760	  fi
2761	fi
2762      done
2763    done
2764    ;;
2765esac
2766
2767  done
2768IFS=$as_save_IFS
2769
2770rm -rf conftest.one conftest.two conftest.dir
2771
2772fi
2773  if test "${ac_cv_path_install+set}" = set; then
2774    INSTALL=$ac_cv_path_install
2775  else
2776    # As a last resort, use the slow shell script.  Don't cache a
2777    # value for INSTALL within a source directory, because that will
2778    # break other packages using the cache if that directory is
2779    # removed, or if the value is a relative name.
2780    INSTALL=$ac_install_sh
2781  fi
2782fi
2783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2784$as_echo "$INSTALL" >&6; }
2785
2786# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2787# It thinks the first close brace ends the variable substitution.
2788test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2789
2790test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2791
2792test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2793
2794
2795# Use -no-install or -no-fast-install to link the test
2796# programs on all platforms but Darwin, where it would cause
2797# the programs to be linked against installed versions of
2798# libapr instead of those just built.
2799case $host in
2800    *-apple-darwin*)
2801        LT_NO_INSTALL=""
2802        ;;
2803    *-mingw*)
2804        LT_NO_INSTALL="-no-fast-install"
2805        ;;
2806    *)
2807        LT_NO_INSTALL="-no-install"
2808        ;;
2809esac
2810
2811
2812top_builddir="$abs_builddir"
2813
2814
2815
2816
2817
2818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkdir -p" >&5
2819$as_echo_n "checking for working mkdir -p... " >&6; }
2820if ${ac_cv_mkdir_p+:} false; then :
2821  $as_echo_n "(cached) " >&6
2822else
2823
2824    test -d conftestdir && rm -rf conftestdir
2825    mkdir -p conftestdir/somedir >/dev/null 2>&1
2826    if test -d conftestdir/somedir; then
2827      ac_cv_mkdir_p=yes
2828    else
2829      ac_cv_mkdir_p=no
2830    fi
2831    rm -rf conftestdir
2832
2833fi
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p" >&5
2835$as_echo "$ac_cv_mkdir_p" >&6; }
2836  if test "$ac_cv_mkdir_p" = "yes"; then
2837      mkdir_p="mkdir -p"
2838  else
2839      mkdir_p="$abs_srcdir/build/mkdir.sh"
2840  fi
2841
2842
2843get_version="$abs_srcdir/build/get-version.sh"
2844version_hdr="$abs_srcdir/include/apu_version.h"
2845APRUTIL_MAJOR_VERSION="`$get_version major $version_hdr APU`"
2846APRUTIL_DOTTED_VERSION="`$get_version all $version_hdr APU`"
2847
2848APU_LTVERSION="-version-info `$get_version libtool $version_hdr APU`"
2849
2850
2851
2852
2853
2854echo "APR-util Version: ${APRUTIL_DOTTED_VERSION}"
2855
2856
2857# Check whether --enable-layout was given.
2858if test "${enable_layout+set}" = set; then :
2859  enableval=$enable_layout;
2860  LAYOUT=$enableval
2861
2862fi
2863
2864
2865if test -z "$LAYOUT"; then
2866  LAYOUT="apr-util"
2867fi
2868
2869  if test ! -f $srcdir/config.layout; then
2870    echo "** Error: Layout file $srcdir/config.layout not found"
2871    echo "** Error: Cannot use undefined layout '$LAYOUT'"
2872    exit 1
2873  fi
2874  # Catch layout names including a slash which will otherwise
2875  # confuse the heck out of the sed script.
2876  case $LAYOUT in
2877  */*)
2878    echo "** Error: $LAYOUT is not a valid layout name"
2879    exit 1 ;;
2880  esac
2881  pldconf=./config.pld
2882
2883  sed -e "1s/[ 	]*<[lL]ayout[ 	]*$LAYOUT[ 	]*>[ 	]*//;1t" \
2884      -e "1,/[ 	]*<[lL]ayout[ 	]*$LAYOUT[ 	]*>[ 	]*/d" \
2885      -e '/[ 	]*<\/Layout>[ 	]*/,$d' \
2886      -e "s/^[ 	]*//g" \
2887      -e "s/:[ 	]*/=\'/g" \
2888      -e "s/[ 	]*$/'/g" \
2889      $srcdir/config.layout > $pldconf
2890  layout_name=$LAYOUT
2891  if test ! -s $pldconf; then
2892    echo "** Error: unable to find layout $layout_name"
2893    exit 1
2894  fi
2895  . $pldconf
2896  rm $pldconf
2897  for var in prefix exec_prefix bindir sbindir libexecdir mandir \
2898             sysconfdir datadir includedir localstatedir runtimedir \
2899             logfiledir libdir installbuilddir libsuffix ; do
2900    eval "val=\"\$$var\""
2901    case $val in
2902      *+)
2903        val=`echo $val | sed -e 's;\+$;;'`
2904        eval "$var=\"\$val\""
2905        autosuffix=yes
2906        ;;
2907      *)
2908        autosuffix=no
2909        ;;
2910    esac
2911    val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
2912    val=`echo $val | sed -e 's:[\$]\([a-z_]*\):$\1:g'`
2913    if test "$autosuffix" = "yes"; then
2914      if echo $val | grep apache >/dev/null; then
2915        addtarget=no
2916      else
2917        addtarget=yes
2918      fi
2919      if test "$addtarget" = "yes"; then
2920        val="$val/apache2"
2921      fi
2922    fi
2923    eval "$var='$val'"
2924  done
2925
2926
2927
2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chosen layout" >&5
2929$as_echo_n "checking for chosen layout... " >&6; }
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $layout_name" >&5
2931$as_echo "$layout_name" >&6; }
2932
2933
2934ac_prev=
2935# Retrieve the command-line arguments.  The eval is needed because
2936# the arguments are quoted to preserve accuracy.
2937eval "set x $ac_configure_args"
2938shift
2939for ac_option
2940do
2941  # If the previous option needs an argument, assign it.
2942  if test -n "$ac_prev"; then
2943    eval "$ac_prev=\$ac_option"
2944    ac_prev=
2945    continue
2946  fi
2947
2948  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
2949
2950  case $ac_option in
2951
2952  -bindir | --bindir | --bindi | --bind | --bin | --bi)
2953    ac_prev=bindir ;;
2954  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2955    bindir="$ac_optarg" ;;
2956
2957  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
2958    ac_prev=datadir ;;
2959  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
2960  | --da=*)
2961    datadir="$ac_optarg" ;;
2962
2963  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2964  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2965  | --exec | --exe | --ex)
2966    ac_prev=exec_prefix ;;
2967  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2968  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2969  | --exec=* | --exe=* | --ex=*)
2970    exec_prefix="$ac_optarg" ;;
2971
2972  -includedir | --includedir | --includedi | --included | --include \
2973  | --includ | --inclu | --incl | --inc)
2974    ac_prev=includedir ;;
2975  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2976  | --includ=* | --inclu=* | --incl=* | --inc=*)
2977    includedir="$ac_optarg" ;;
2978
2979  -infodir | --infodir | --infodi | --infod | --info | --inf)
2980    ac_prev=infodir ;;
2981  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2982    infodir="$ac_optarg" ;;
2983
2984  -libdir | --libdir | --libdi | --libd)
2985    ac_prev=libdir ;;
2986  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2987    libdir="$ac_optarg" ;;
2988
2989  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2990  | --libexe | --libex | --libe)
2991    ac_prev=libexecdir ;;
2992  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2993  | --libexe=* | --libex=* | --libe=*)
2994    libexecdir="$ac_optarg" ;;
2995
2996  -localstatedir | --localstatedir | --localstatedi | --localstated \
2997  | --localstate | --localstat | --localsta | --localst \
2998  | --locals | --local | --loca | --loc | --lo)
2999    ac_prev=localstatedir ;;
3000  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
3001  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
3002  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
3003    localstatedir="$ac_optarg" ;;
3004
3005  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
3006    ac_prev=mandir ;;
3007  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
3008    mandir="$ac_optarg" ;;
3009
3010  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
3011    ac_prev=prefix ;;
3012  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
3013    prefix="$ac_optarg" ;;
3014
3015  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
3016    ac_prev=sbindir ;;
3017  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
3018  | --sbi=* | --sb=*)
3019    sbindir="$ac_optarg" ;;
3020
3021  -sharedstatedir | --sharedstatedir | --sharedstatedi \
3022  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
3023  | --sharedst | --shareds | --shared | --share | --shar \
3024  | --sha | --sh)
3025    ac_prev=sharedstatedir ;;
3026  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
3027  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
3028  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
3029  | --sha=* | --sh=*)
3030    sharedstatedir="$ac_optarg" ;;
3031
3032  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
3033  | --syscon | --sysco | --sysc | --sys | --sy)
3034    ac_prev=sysconfdir ;;
3035  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
3036  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
3037    sysconfdir="$ac_optarg" ;;
3038
3039  esac
3040done
3041
3042# Be sure to have absolute paths.
3043for ac_var in exec_prefix prefix
3044do
3045  eval ac_val=$`echo $ac_var`
3046  case $ac_val in
3047    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
3048    *)  as_fn_error $? "expected an absolute path for --$ac_var: $ac_val" "$LINENO" 5;;
3049  esac
3050done
3051
3052
3053
3054ac_ext=c
3055ac_cpp='$CPP $CPPFLAGS'
3056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3058ac_compiler_gnu=$ac_cv_c_compiler_gnu
3059if test -n "$ac_tool_prefix"; then
3060  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3061set dummy ${ac_tool_prefix}gcc; ac_word=$2
3062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3063$as_echo_n "checking for $ac_word... " >&6; }
3064if ${ac_cv_prog_CC+:} false; then :
3065  $as_echo_n "(cached) " >&6
3066else
3067  if test -n "$CC"; then
3068  ac_cv_prog_CC="$CC" # Let the user override the test.
3069else
3070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071for as_dir in $PATH
3072do
3073  IFS=$as_save_IFS
3074  test -z "$as_dir" && as_dir=.
3075    for ac_exec_ext in '' $ac_executable_extensions; do
3076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3077    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3079    break 2
3080  fi
3081done
3082  done
3083IFS=$as_save_IFS
3084
3085fi
3086fi
3087CC=$ac_cv_prog_CC
3088if test -n "$CC"; then
3089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3090$as_echo "$CC" >&6; }
3091else
3092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
3094fi
3095
3096
3097fi
3098if test -z "$ac_cv_prog_CC"; then
3099  ac_ct_CC=$CC
3100  # Extract the first word of "gcc", so it can be a program name with args.
3101set dummy gcc; ac_word=$2
3102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3103$as_echo_n "checking for $ac_word... " >&6; }
3104if ${ac_cv_prog_ac_ct_CC+:} false; then :
3105  $as_echo_n "(cached) " >&6
3106else
3107  if test -n "$ac_ct_CC"; then
3108  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3109else
3110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3111for as_dir in $PATH
3112do
3113  IFS=$as_save_IFS
3114  test -z "$as_dir" && as_dir=.
3115    for ac_exec_ext in '' $ac_executable_extensions; do
3116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3117    ac_cv_prog_ac_ct_CC="gcc"
3118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3119    break 2
3120  fi
3121done
3122  done
3123IFS=$as_save_IFS
3124
3125fi
3126fi
3127ac_ct_CC=$ac_cv_prog_ac_ct_CC
3128if test -n "$ac_ct_CC"; then
3129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3130$as_echo "$ac_ct_CC" >&6; }
3131else
3132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3133$as_echo "no" >&6; }
3134fi
3135
3136  if test "x$ac_ct_CC" = x; then
3137    CC=""
3138  else
3139    case $cross_compiling:$ac_tool_warned in
3140yes:)
3141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3143ac_tool_warned=yes ;;
3144esac
3145    CC=$ac_ct_CC
3146  fi
3147else
3148  CC="$ac_cv_prog_CC"
3149fi
3150
3151if test -z "$CC"; then
3152          if test -n "$ac_tool_prefix"; then
3153    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3154set dummy ${ac_tool_prefix}cc; ac_word=$2
3155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3156$as_echo_n "checking for $ac_word... " >&6; }
3157if ${ac_cv_prog_CC+:} false; then :
3158  $as_echo_n "(cached) " >&6
3159else
3160  if test -n "$CC"; then
3161  ac_cv_prog_CC="$CC" # Let the user override the test.
3162else
3163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3164for as_dir in $PATH
3165do
3166  IFS=$as_save_IFS
3167  test -z "$as_dir" && as_dir=.
3168    for ac_exec_ext in '' $ac_executable_extensions; do
3169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3170    ac_cv_prog_CC="${ac_tool_prefix}cc"
3171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3172    break 2
3173  fi
3174done
3175  done
3176IFS=$as_save_IFS
3177
3178fi
3179fi
3180CC=$ac_cv_prog_CC
3181if test -n "$CC"; then
3182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3183$as_echo "$CC" >&6; }
3184else
3185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3186$as_echo "no" >&6; }
3187fi
3188
3189
3190  fi
3191fi
3192if test -z "$CC"; then
3193  # Extract the first word of "cc", so it can be a program name with args.
3194set dummy cc; ac_word=$2
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3196$as_echo_n "checking for $ac_word... " >&6; }
3197if ${ac_cv_prog_CC+:} false; then :
3198  $as_echo_n "(cached) " >&6
3199else
3200  if test -n "$CC"; then
3201  ac_cv_prog_CC="$CC" # Let the user override the test.
3202else
3203  ac_prog_rejected=no
3204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205for as_dir in $PATH
3206do
3207  IFS=$as_save_IFS
3208  test -z "$as_dir" && as_dir=.
3209    for ac_exec_ext in '' $ac_executable_extensions; do
3210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3211    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3212       ac_prog_rejected=yes
3213       continue
3214     fi
3215    ac_cv_prog_CC="cc"
3216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3217    break 2
3218  fi
3219done
3220  done
3221IFS=$as_save_IFS
3222
3223if test $ac_prog_rejected = yes; then
3224  # We found a bogon in the path, so make sure we never use it.
3225  set dummy $ac_cv_prog_CC
3226  shift
3227  if test $# != 0; then
3228    # We chose a different compiler from the bogus one.
3229    # However, it has the same basename, so the bogon will be chosen
3230    # first if we set CC to just the basename; use the full file name.
3231    shift
3232    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3233  fi
3234fi
3235fi
3236fi
3237CC=$ac_cv_prog_CC
3238if test -n "$CC"; then
3239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3240$as_echo "$CC" >&6; }
3241else
3242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3243$as_echo "no" >&6; }
3244fi
3245
3246
3247fi
3248if test -z "$CC"; then
3249  if test -n "$ac_tool_prefix"; then
3250  for ac_prog in cl.exe
3251  do
3252    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3253set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3255$as_echo_n "checking for $ac_word... " >&6; }
3256if ${ac_cv_prog_CC+:} false; then :
3257  $as_echo_n "(cached) " >&6
3258else
3259  if test -n "$CC"; then
3260  ac_cv_prog_CC="$CC" # Let the user override the test.
3261else
3262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3263for as_dir in $PATH
3264do
3265  IFS=$as_save_IFS
3266  test -z "$as_dir" && as_dir=.
3267    for ac_exec_ext in '' $ac_executable_extensions; do
3268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3269    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3271    break 2
3272  fi
3273done
3274  done
3275IFS=$as_save_IFS
3276
3277fi
3278fi
3279CC=$ac_cv_prog_CC
3280if test -n "$CC"; then
3281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3282$as_echo "$CC" >&6; }
3283else
3284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3285$as_echo "no" >&6; }
3286fi
3287
3288
3289    test -n "$CC" && break
3290  done
3291fi
3292if test -z "$CC"; then
3293  ac_ct_CC=$CC
3294  for ac_prog in cl.exe
3295do
3296  # Extract the first word of "$ac_prog", so it can be a program name with args.
3297set dummy $ac_prog; ac_word=$2
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3299$as_echo_n "checking for $ac_word... " >&6; }
3300if ${ac_cv_prog_ac_ct_CC+:} false; then :
3301  $as_echo_n "(cached) " >&6
3302else
3303  if test -n "$ac_ct_CC"; then
3304  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3305else
3306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309  IFS=$as_save_IFS
3310  test -z "$as_dir" && as_dir=.
3311    for ac_exec_ext in '' $ac_executable_extensions; do
3312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3313    ac_cv_prog_ac_ct_CC="$ac_prog"
3314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3315    break 2
3316  fi
3317done
3318  done
3319IFS=$as_save_IFS
3320
3321fi
3322fi
3323ac_ct_CC=$ac_cv_prog_ac_ct_CC
3324if test -n "$ac_ct_CC"; then
3325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3326$as_echo "$ac_ct_CC" >&6; }
3327else
3328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329$as_echo "no" >&6; }
3330fi
3331
3332
3333  test -n "$ac_ct_CC" && break
3334done
3335
3336  if test "x$ac_ct_CC" = x; then
3337    CC=""
3338  else
3339    case $cross_compiling:$ac_tool_warned in
3340yes:)
3341{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3342$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3343ac_tool_warned=yes ;;
3344esac
3345    CC=$ac_ct_CC
3346  fi
3347fi
3348
3349fi
3350
3351
3352test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3354as_fn_error $? "no acceptable C compiler found in \$PATH
3355See \`config.log' for more details" "$LINENO" 5; }
3356
3357# Provide some information about the compiler.
3358$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3359set X $ac_compile
3360ac_compiler=$2
3361for ac_option in --version -v -V -qversion; do
3362  { { ac_try="$ac_compiler $ac_option >&5"
3363case "(($ac_try" in
3364  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3365  *) ac_try_echo=$ac_try;;
3366esac
3367eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3368$as_echo "$ac_try_echo"; } >&5
3369  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3370  ac_status=$?
3371  if test -s conftest.err; then
3372    sed '10a\
3373... rest of stderr output deleted ...
3374         10q' conftest.err >conftest.er1
3375    cat conftest.er1 >&5
3376  fi
3377  rm -f conftest.er1 conftest.err
3378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3379  test $ac_status = 0; }
3380done
3381
3382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3383/* end confdefs.h.  */
3384
3385int
3386main ()
3387{
3388
3389  ;
3390  return 0;
3391}
3392_ACEOF
3393ac_clean_files_save=$ac_clean_files
3394ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3395# Try to create an executable without -o first, disregard a.out.
3396# It will help us diagnose broken compilers, and finding out an intuition
3397# of exeext.
3398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3399$as_echo_n "checking whether the C compiler works... " >&6; }
3400ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3401
3402# The possible output files:
3403ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3404
3405ac_rmfiles=
3406for ac_file in $ac_files
3407do
3408  case $ac_file in
3409    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3410    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3411  esac
3412done
3413rm -f $ac_rmfiles
3414
3415if { { ac_try="$ac_link_default"
3416case "(($ac_try" in
3417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3418  *) ac_try_echo=$ac_try;;
3419esac
3420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3421$as_echo "$ac_try_echo"; } >&5
3422  (eval "$ac_link_default") 2>&5
3423  ac_status=$?
3424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3425  test $ac_status = 0; }; then :
3426  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3427# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3428# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3429# so that the user can short-circuit this test for compilers unknown to
3430# Autoconf.
3431for ac_file in $ac_files ''
3432do
3433  test -f "$ac_file" || continue
3434  case $ac_file in
3435    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3436	;;
3437    [ab].out )
3438	# We found the default executable, but exeext='' is most
3439	# certainly right.
3440	break;;
3441    *.* )
3442	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3443	then :; else
3444	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3445	fi
3446	# We set ac_cv_exeext here because the later test for it is not
3447	# safe: cross compilers may not add the suffix if given an `-o'
3448	# argument, so we may need to know it at that point already.
3449	# Even if this section looks crufty: it has the advantage of
3450	# actually working.
3451	break;;
3452    * )
3453	break;;
3454  esac
3455done
3456test "$ac_cv_exeext" = no && ac_cv_exeext=
3457
3458else
3459  ac_file=''
3460fi
3461if test -z "$ac_file"; then :
3462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3463$as_echo "no" >&6; }
3464$as_echo "$as_me: failed program was:" >&5
3465sed 's/^/| /' conftest.$ac_ext >&5
3466
3467{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3469as_fn_error 77 "C compiler cannot create executables
3470See \`config.log' for more details" "$LINENO" 5; }
3471else
3472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3473$as_echo "yes" >&6; }
3474fi
3475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3476$as_echo_n "checking for C compiler default output file name... " >&6; }
3477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3478$as_echo "$ac_file" >&6; }
3479ac_exeext=$ac_cv_exeext
3480
3481rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3482ac_clean_files=$ac_clean_files_save
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3484$as_echo_n "checking for suffix of executables... " >&6; }
3485if { { ac_try="$ac_link"
3486case "(($ac_try" in
3487  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488  *) ac_try_echo=$ac_try;;
3489esac
3490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3491$as_echo "$ac_try_echo"; } >&5
3492  (eval "$ac_link") 2>&5
3493  ac_status=$?
3494  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3495  test $ac_status = 0; }; then :
3496  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3497# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3498# work properly (i.e., refer to `conftest.exe'), while it won't with
3499# `rm'.
3500for ac_file in conftest.exe conftest conftest.*; do
3501  test -f "$ac_file" || continue
3502  case $ac_file in
3503    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3504    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3505	  break;;
3506    * ) break;;
3507  esac
3508done
3509else
3510  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3512as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3513See \`config.log' for more details" "$LINENO" 5; }
3514fi
3515rm -f conftest conftest$ac_cv_exeext
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3517$as_echo "$ac_cv_exeext" >&6; }
3518
3519rm -f conftest.$ac_ext
3520EXEEXT=$ac_cv_exeext
3521ac_exeext=$EXEEXT
3522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3523/* end confdefs.h.  */
3524#include <stdio.h>
3525int
3526main ()
3527{
3528FILE *f = fopen ("conftest.out", "w");
3529 return ferror (f) || fclose (f) != 0;
3530
3531  ;
3532  return 0;
3533}
3534_ACEOF
3535ac_clean_files="$ac_clean_files conftest.out"
3536# Check that the compiler produces executables we can run.  If not, either
3537# the compiler is broken, or we cross compile.
3538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3539$as_echo_n "checking whether we are cross compiling... " >&6; }
3540if test "$cross_compiling" != yes; then
3541  { { ac_try="$ac_link"
3542case "(($ac_try" in
3543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544  *) ac_try_echo=$ac_try;;
3545esac
3546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3547$as_echo "$ac_try_echo"; } >&5
3548  (eval "$ac_link") 2>&5
3549  ac_status=$?
3550  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3551  test $ac_status = 0; }
3552  if { ac_try='./conftest$ac_cv_exeext'
3553  { { case "(($ac_try" in
3554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555  *) ac_try_echo=$ac_try;;
3556esac
3557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3558$as_echo "$ac_try_echo"; } >&5
3559  (eval "$ac_try") 2>&5
3560  ac_status=$?
3561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3562  test $ac_status = 0; }; }; then
3563    cross_compiling=no
3564  else
3565    if test "$cross_compiling" = maybe; then
3566	cross_compiling=yes
3567    else
3568	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3570as_fn_error $? "cannot run C compiled programs.
3571If you meant to cross compile, use \`--host'.
3572See \`config.log' for more details" "$LINENO" 5; }
3573    fi
3574  fi
3575fi
3576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3577$as_echo "$cross_compiling" >&6; }
3578
3579rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3580ac_clean_files=$ac_clean_files_save
3581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3582$as_echo_n "checking for suffix of object files... " >&6; }
3583if ${ac_cv_objext+:} false; then :
3584  $as_echo_n "(cached) " >&6
3585else
3586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3587/* end confdefs.h.  */
3588
3589int
3590main ()
3591{
3592
3593  ;
3594  return 0;
3595}
3596_ACEOF
3597rm -f conftest.o conftest.obj
3598if { { ac_try="$ac_compile"
3599case "(($ac_try" in
3600  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601  *) ac_try_echo=$ac_try;;
3602esac
3603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604$as_echo "$ac_try_echo"; } >&5
3605  (eval "$ac_compile") 2>&5
3606  ac_status=$?
3607  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608  test $ac_status = 0; }; then :
3609  for ac_file in conftest.o conftest.obj conftest.*; do
3610  test -f "$ac_file" || continue;
3611  case $ac_file in
3612    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3613    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3614       break;;
3615  esac
3616done
3617else
3618  $as_echo "$as_me: failed program was:" >&5
3619sed 's/^/| /' conftest.$ac_ext >&5
3620
3621{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3623as_fn_error $? "cannot compute suffix of object files: cannot compile
3624See \`config.log' for more details" "$LINENO" 5; }
3625fi
3626rm -f conftest.$ac_cv_objext conftest.$ac_ext
3627fi
3628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3629$as_echo "$ac_cv_objext" >&6; }
3630OBJEXT=$ac_cv_objext
3631ac_objext=$OBJEXT
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3633$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3634if ${ac_cv_c_compiler_gnu+:} false; then :
3635  $as_echo_n "(cached) " >&6
3636else
3637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3638/* end confdefs.h.  */
3639
3640int
3641main ()
3642{
3643#ifndef __GNUC__
3644       choke me
3645#endif
3646
3647  ;
3648  return 0;
3649}
3650_ACEOF
3651if ac_fn_c_try_compile "$LINENO"; then :
3652  ac_compiler_gnu=yes
3653else
3654  ac_compiler_gnu=no
3655fi
3656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3657ac_cv_c_compiler_gnu=$ac_compiler_gnu
3658
3659fi
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3661$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3662if test $ac_compiler_gnu = yes; then
3663  GCC=yes
3664else
3665  GCC=
3666fi
3667ac_test_CFLAGS=${CFLAGS+set}
3668ac_save_CFLAGS=$CFLAGS
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3670$as_echo_n "checking whether $CC accepts -g... " >&6; }
3671if ${ac_cv_prog_cc_g+:} false; then :
3672  $as_echo_n "(cached) " >&6
3673else
3674  ac_save_c_werror_flag=$ac_c_werror_flag
3675   ac_c_werror_flag=yes
3676   ac_cv_prog_cc_g=no
3677   CFLAGS="-g"
3678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3679/* end confdefs.h.  */
3680
3681int
3682main ()
3683{
3684
3685  ;
3686  return 0;
3687}
3688_ACEOF
3689if ac_fn_c_try_compile "$LINENO"; then :
3690  ac_cv_prog_cc_g=yes
3691else
3692  CFLAGS=""
3693      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694/* end confdefs.h.  */
3695
3696int
3697main ()
3698{
3699
3700  ;
3701  return 0;
3702}
3703_ACEOF
3704if ac_fn_c_try_compile "$LINENO"; then :
3705
3706else
3707  ac_c_werror_flag=$ac_save_c_werror_flag
3708	 CFLAGS="-g"
3709	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3710/* end confdefs.h.  */
3711
3712int
3713main ()
3714{
3715
3716  ;
3717  return 0;
3718}
3719_ACEOF
3720if ac_fn_c_try_compile "$LINENO"; then :
3721  ac_cv_prog_cc_g=yes
3722fi
3723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3724fi
3725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3726fi
3727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3728   ac_c_werror_flag=$ac_save_c_werror_flag
3729fi
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3731$as_echo "$ac_cv_prog_cc_g" >&6; }
3732if test "$ac_test_CFLAGS" = set; then
3733  CFLAGS=$ac_save_CFLAGS
3734elif test $ac_cv_prog_cc_g = yes; then
3735  if test "$GCC" = yes; then
3736    CFLAGS="-g -O2"
3737  else
3738    CFLAGS="-g"
3739  fi
3740else
3741  if test "$GCC" = yes; then
3742    CFLAGS="-O2"
3743  else
3744    CFLAGS=
3745  fi
3746fi
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3748$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3749if ${ac_cv_prog_cc_c89+:} false; then :
3750  $as_echo_n "(cached) " >&6
3751else
3752  ac_cv_prog_cc_c89=no
3753ac_save_CC=$CC
3754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3755/* end confdefs.h.  */
3756#include <stdarg.h>
3757#include <stdio.h>
3758struct stat;
3759/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3760struct buf { int x; };
3761FILE * (*rcsopen) (struct buf *, struct stat *, int);
3762static char *e (p, i)
3763     char **p;
3764     int i;
3765{
3766  return p[i];
3767}
3768static char *f (char * (*g) (char **, int), char **p, ...)
3769{
3770  char *s;
3771  va_list v;
3772  va_start (v,p);
3773  s = g (p, va_arg (v,int));
3774  va_end (v);
3775  return s;
3776}
3777
3778/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3779   function prototypes and stuff, but not '\xHH' hex character constants.
3780   These don't provoke an error unfortunately, instead are silently treated
3781   as 'x'.  The following induces an error, until -std is added to get
3782   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3783   array size at least.  It's necessary to write '\x00'==0 to get something
3784   that's true only with -std.  */
3785int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3786
3787/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3788   inside strings and character constants.  */
3789#define FOO(x) 'x'
3790int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3791
3792int test (int i, double x);
3793struct s1 {int (*f) (int a);};
3794struct s2 {int (*f) (double a);};
3795int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3796int argc;
3797char **argv;
3798int
3799main ()
3800{
3801return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3802  ;
3803  return 0;
3804}
3805_ACEOF
3806for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3807	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3808do
3809  CC="$ac_save_CC $ac_arg"
3810  if ac_fn_c_try_compile "$LINENO"; then :
3811  ac_cv_prog_cc_c89=$ac_arg
3812fi
3813rm -f core conftest.err conftest.$ac_objext
3814  test "x$ac_cv_prog_cc_c89" != "xno" && break
3815done
3816rm -f conftest.$ac_ext
3817CC=$ac_save_CC
3818
3819fi
3820# AC_CACHE_VAL
3821case "x$ac_cv_prog_cc_c89" in
3822  x)
3823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3824$as_echo "none needed" >&6; } ;;
3825  xno)
3826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3827$as_echo "unsupported" >&6; } ;;
3828  *)
3829    CC="$CC $ac_cv_prog_cc_c89"
3830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3831$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3832esac
3833if test "x$ac_cv_prog_cc_c89" != xno; then :
3834
3835fi
3836
3837ac_ext=c
3838ac_cpp='$CPP $CPPFLAGS'
3839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3841ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842
3843
3844
3845if test "x$apu_preload_done" != "xyes" ; then
3846    apu_preload_done="yes"
3847
3848    echo "Applying apr-util hints file rules for $host"
3849
3850    case "$host" in
3851    *-dec-osf*)
3852
3853  if test -z "$apu_crypt_threadsafe"; then
3854    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3855    apu_crypt_threadsafe="1"
3856  fi
3857
3858        ;;
3859    *-hp-hpux11.*)
3860
3861  if test -z "$apu_crypt_threadsafe"; then
3862    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3863    apu_crypt_threadsafe="1"
3864  fi
3865
3866        ;;
3867    *-ibm-aix4*|*-ibm-aix5.1*)
3868
3869  if test -z "$apu_iconv_inbuf_const"; then
3870    test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
3871    apu_iconv_inbuf_const="1"
3872  fi
3873
3874        ;;
3875    *-ibm-os390)
3876
3877  if test -z "$apu_crypt_threadsafe"; then
3878    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3879    apu_crypt_threadsafe="1"
3880  fi
3881
3882        ;;
3883    *-solaris2*)
3884
3885  if test -z "$apu_iconv_inbuf_const"; then
3886    test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
3887    apu_iconv_inbuf_const="1"
3888  fi
3889
3890
3891  if test -z "$apu_crypt_threadsafe"; then
3892    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3893    apu_crypt_threadsafe="1"
3894  fi
3895
3896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
3897$as_echo_n "checking for library containing fdatasync... " >&6; }
3898if ${ac_cv_search_fdatasync+:} false; then :
3899  $as_echo_n "(cached) " >&6
3900else
3901  ac_func_search_save_LIBS=$LIBS
3902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3903/* end confdefs.h.  */
3904
3905/* Override any GCC internal prototype to avoid an error.
3906   Use char because int might match the return type of a GCC
3907   builtin and then its argument prototype would still apply.  */
3908#ifdef __cplusplus
3909extern "C"
3910#endif
3911char fdatasync ();
3912int
3913main ()
3914{
3915return fdatasync ();
3916  ;
3917  return 0;
3918}
3919_ACEOF
3920for ac_lib in '' rt posix4; do
3921  if test -z "$ac_lib"; then
3922    ac_res="none required"
3923  else
3924    ac_res=-l$ac_lib
3925    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3926  fi
3927  if ac_fn_c_try_link "$LINENO"; then :
3928  ac_cv_search_fdatasync=$ac_res
3929fi
3930rm -f core conftest.err conftest.$ac_objext \
3931    conftest$ac_exeext
3932  if ${ac_cv_search_fdatasync+:} false; then :
3933  break
3934fi
3935done
3936if ${ac_cv_search_fdatasync+:} false; then :
3937
3938else
3939  ac_cv_search_fdatasync=no
3940fi
3941rm conftest.$ac_ext
3942LIBS=$ac_func_search_save_LIBS
3943fi
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
3945$as_echo "$ac_cv_search_fdatasync" >&6; }
3946ac_res=$ac_cv_search_fdatasync
3947if test "$ac_res" != no; then :
3948  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3949
3950fi
3951
3952        ;;
3953    *-sco3.2v5*)
3954
3955  if test -z "$apu_db_xtra_libs"; then
3956    test "x$silent" != "xyes" && echo "  setting apu_db_xtra_libs to \"-lsocket\""
3957    apu_db_xtra_libs="-lsocket"
3958  fi
3959
3960	;;
3961    esac
3962
3963fi
3964
3965
3966
3967APRUTIL_INCLUDES=""
3968APRUTIL_PRIV_INCLUDES="-I$top_builddir/include -I$top_builddir/include/private"
3969if test -n "$USE_VPATH"; then
3970    APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES -I$abs_srcdir/include/private -I$abs_srcdir/include"
3971fi
3972
3973
3974
3975
3976  apr_found="no"
3977
3978  if test "$target_os" = "os2-emx"; then
3979    # Scripts don't pass test -x on OS/2
3980    TEST_X="test -f"
3981  else
3982    TEST_X="test -x"
3983  fi
3984
3985  acceptable_majors="1"
3986
3987  apr_temp_acceptable_apr_config=""
3988  for apr_temp_major in $acceptable_majors
3989  do
3990    case $apr_temp_major in
3991      0)
3992      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
3993      ;;
3994      *)
3995      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
3996      ;;
3997    esac
3998  done
3999
4000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR" >&5
4001$as_echo_n "checking for APR... " >&6; }
4002
4003# Check whether --with-apr was given.
4004if test "${with_apr+set}" = set; then :
4005  withval=$with_apr;
4006    if test "$withval" = "no" || test "$withval" = "yes"; then
4007      as_fn_error $? "--with-apr requires a directory or file to be provided" "$LINENO" 5
4008    fi
4009
4010    for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
4011    do
4012      for lookdir in "$withval/bin" "$withval"
4013      do
4014        if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
4015          apr_config="$lookdir/$apr_temp_apr_config_file"
4016
4017          apr_found="yes"
4018          break 2
4019        fi
4020      done
4021    done
4022
4023    if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
4024      apr_config="$withval"
4025      apr_found="yes"
4026    fi
4027
4028            if test "$apr_found" != "yes"; then
4029      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
4030    fi
4031
4032else
4033
4034        if test -n "" && test "" = "1"; then
4035      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
4036      do
4037        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
4038          apr_config="$apr_temp_apr_config_file"
4039
4040          apr_found="yes"
4041          break
4042        else
4043                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
4044            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
4045              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
4046
4047              apr_found="yes"
4048              break 2
4049            fi
4050          done
4051        fi
4052      done
4053    fi
4054        if test "$apr_found" = "no" && test -d ""; then
4055      apr_temp_abs_srcdir="`cd \"\" && pwd`"
4056      apr_found="reconfig"
4057      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
4058      case $apr_bundled_major in
4059        "")
4060          as_fn_error $? "failed to find major version of bundled APR" "$LINENO" 5
4061        ;;
4062        0)
4063          apr_temp_apr_config_file="apr-config"
4064        ;;
4065        *)
4066          apr_temp_apr_config_file="apr-$apr_bundled_major-config"
4067        ;;
4068      esac
4069      if test -n ""; then
4070        apr_config="/$apr_temp_apr_config_file"
4071      else
4072        apr_config="/$apr_temp_apr_config_file"
4073      fi
4074    fi
4075
4076fi
4077
4078
4079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5
4080$as_echo "$apr_found" >&6; }
4081
4082  if test "$apr_found" = "no"; then
4083    as_fn_error $? "APR could not be located. Please use the --with-apr option." "$LINENO" 5
4084  fi
4085
4086  APR_BUILD_DIR="`$apr_config --installbuilddir`"
4087
4088      APR_BUILD_DIR="`cd $APR_BUILD_DIR && pwd`"
4089
4090  APR_INCLUDES="`$apr_config --includes`"
4091  APR_LIBS="`$apr_config --link-libtool --libs`"
4092  APR_SO_EXT="`$apr_config --apr-so-ext`"
4093  APR_LIB_TARGET="`$apr_config --apr-lib-target`"
4094
4095
4096
4097
4098
4099
4100
4101  if test -z "$CC"; then
4102    test "x$silent" != "xyes" && echo "  setting CC to \"`$apr_config --cc`\""
4103    CC="`$apr_config --cc`"
4104  fi
4105
4106
4107  if test -z "$CPP"; then
4108    test "x$silent" != "xyes" && echo "  setting CPP to \"`$apr_config --cpp`\""
4109    CPP="`$apr_config --cpp`"
4110  fi
4111
4112
4113  if test "x$CFLAGS" = "x"; then
4114    test "x$silent" != "xyes" && echo "  setting CFLAGS to \"`$apr_config --cflags`\""
4115    CFLAGS="`$apr_config --cflags`"
4116  else
4117    apr_addto_bugger="`$apr_config --cflags`"
4118    for i in $apr_addto_bugger; do
4119      apr_addto_duplicate="0"
4120      for j in $CFLAGS; do
4121        if test "x$i" = "x$j"; then
4122          apr_addto_duplicate="1"
4123          break
4124        fi
4125      done
4126      if test $apr_addto_duplicate = "0"; then
4127        test "x$silent" != "xyes" && echo "  adding \"$i\" to CFLAGS"
4128        CFLAGS="$CFLAGS $i"
4129      fi
4130    done
4131  fi
4132
4133
4134  if test "x$CPPFLAGS" = "x"; then
4135    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"`$apr_config --cppflags`\""
4136    CPPFLAGS="`$apr_config --cppflags`"
4137  else
4138    apr_addto_bugger="`$apr_config --cppflags`"
4139    for i in $apr_addto_bugger; do
4140      apr_addto_duplicate="0"
4141      for j in $CPPFLAGS; do
4142        if test "x$i" = "x$j"; then
4143          apr_addto_duplicate="1"
4144          break
4145        fi
4146      done
4147      if test $apr_addto_duplicate = "0"; then
4148        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
4149        CPPFLAGS="$CPPFLAGS $i"
4150      fi
4151    done
4152  fi
4153
4154apr_shlibpath_var=`$apr_config --shlib-path-var`
4155
4156
4157
4158# Check whether --with-apr-iconv was given.
4159if test "${with_apr_iconv+set}" = set; then :
4160  withval=$with_apr_iconv;  apu_apriconv_dir="$withval"
4161    if test "$apu_apriconv_dir" != "no"; then
4162      if test -d "$apu_apriconv_dir"; then
4163
4164  # save our work to this point; this allows the sub-package to use it
4165  cat >confcache <<\_ACEOF
4166# This file is a shell script that caches the results of configure
4167# tests run on this system so they can be shared between configure
4168# scripts and configure runs, see configure's option --config-cache.
4169# It is not useful on other systems.  If it contains results you don't
4170# want to keep, you may remove or edit it.
4171#
4172# config.status only pays attention to the cache file if you give it
4173# the --recheck option to rerun configure.
4174#
4175# `ac_cv_env_foo' variables (set or unset) will be overridden when
4176# loading this file, other *unset* `ac_cv_foo' will be assigned the
4177# following values.
4178
4179_ACEOF
4180
4181# The following way of writing the cache mishandles newlines in values,
4182# but we know of no workaround that is simple, portable, and efficient.
4183# So, we kill variables containing newlines.
4184# Ultrix sh set writes to stderr and can't be redirected directly,
4185# and sets the high bit in the cache file unless we assign to the vars.
4186(
4187  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4188    eval ac_val=\$$ac_var
4189    case $ac_val in #(
4190    *${as_nl}*)
4191      case $ac_var in #(
4192      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
4193$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4194      esac
4195      case $ac_var in #(
4196      _ | IFS | as_nl) ;; #(
4197      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4198      *) { eval $ac_var=; unset $ac_var;} ;;
4199      esac ;;
4200    esac
4201  done
4202
4203  (set) 2>&1 |
4204    case $as_nl`(ac_space=' '; set) 2>&1` in #(
4205    *${as_nl}ac_space=\ *)
4206      # `set' does not quote correctly, so add quotes: double-quote
4207      # substitution turns \\\\ into \\, and sed turns \\ into \.
4208      sed -n \
4209	"s/'/'\\\\''/g;
4210	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4211      ;; #(
4212    *)
4213      # `set' quotes correctly as required by POSIX, so do not add quotes.
4214      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4215      ;;
4216    esac |
4217    sort
4218) |
4219  sed '
4220     /^ac_cv_env_/b end
4221     t clear
4222     :clear
4223     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4224     t end
4225     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4226     :end' >>confcache
4227if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
4228  if test -w "$cache_file"; then
4229    if test "x$cache_file" != "x/dev/null"; then
4230      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
4231$as_echo "$as_me: updating cache $cache_file" >&6;}
4232      if test ! -f "$cache_file" || test -h "$cache_file"; then
4233	cat confcache >"$cache_file"
4234      else
4235        case $cache_file in #(
4236        */* | ?:*)
4237	  mv -f confcache "$cache_file"$$ &&
4238	  mv -f "$cache_file"$$ "$cache_file" ;; #(
4239        *)
4240	  mv -f confcache "$cache_file" ;;
4241	esac
4242      fi
4243    fi
4244  else
4245    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
4246$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
4247  fi
4248fi
4249rm -f confcache
4250
4251  echo "configuring package in "$apu_apriconv_dir" now"
4252  ac_popdir=`pwd`
4253  apr_config_subdirs=""$apu_apriconv_dir""
4254  test -d "$apu_apriconv_dir" || $mkdir_p "$apu_apriconv_dir"
4255  ac_abs_srcdir=`(cd $srcdir/"$apu_apriconv_dir" && pwd)`
4256  cd "$apu_apriconv_dir"
4257
4258      # A "../" for each directory in /$config_subdirs.
4259      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4260
4261  # Make the cache file pathname absolute for the subdirs
4262  # required to correctly handle subdirs that might actually
4263  # be symlinks
4264  case "$cache_file" in
4265  /*) # already absolute
4266    ac_sub_cache_file=$cache_file ;;
4267  *)  # Was relative path.
4268    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
4269  esac
4270
4271
4272  apr_configure_args=
4273  apr_sep=
4274  for apr_configure_arg in $ac_configure_args
4275  do
4276    case "$apr_configure_arg" in
4277      --enable-layout=*|\'--enable-layout=*)
4278        continue ;;
4279    esac
4280    apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
4281    apr_sep=" "
4282  done
4283
4284
4285    test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
4286
4287    apr_configure_args="--disable-option-checking $apr_configure_args"
4288
4289              if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $apache_apr_flags \
4290                             --prefix=$prefix \
4291                             --exec-prefix=$exec_prefix \
4292                             --libdir=$libdir \
4293                             --includedir=$includedir \
4294                             --bindir=$bindir \
4295                             --datadir=$datadir \
4296                             --with-installbuilddir=$installbuilddir
4297  then :
4298    echo ""$apu_apriconv_dir" configured properly"
4299  else
4300    echo "configure failed for "$apu_apriconv_dir""
4301    exit 1
4302  fi
4303
4304  cd $ac_popdir
4305
4306  # grab any updates from the sub-package
4307  if test -r "$cache_file"; then
4308  # Some versions of bash will fail to source /dev/null (special files
4309  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
4310  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
4311    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
4312$as_echo "$as_me: loading cache $cache_file" >&6;}
4313    case $cache_file in
4314      [\\/]* | ?:[\\/]* ) . "$cache_file";;
4315      *)                      . "./$cache_file";;
4316    esac
4317  fi
4318else
4319  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
4320$as_echo "$as_me: creating cache $cache_file" >&6;}
4321  >$cache_file
4322fi
4323
4324
4325        APRUTIL_EXPORT_LIBS="$abs_srcdir/$apu_apriconv_dir/lib/libapriconv.la \
4326                             $APRUTIL_EXPORT_LIBS"
4327        APRUTIL_INCLUDES="-I$abs_srcdir/$apu_apriconv_dir/include \
4328                          $APRUTIL_INCLUDES"
4329        APR_ICONV_DIR="$apu_apriconv_dir"
4330      else
4331       APR_ICONV_DIR=""
4332      fi
4333    else
4334      APR_ICONV_DIR=""
4335    fi
4336
4337fi
4338
4339
4340
4341ac_ext=c
4342ac_cpp='$CPP $CPPFLAGS'
4343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4345ac_compiler_gnu=$ac_cv_c_compiler_gnu
4346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4347$as_echo_n "checking how to run the C preprocessor... " >&6; }
4348# On Suns, sometimes $CPP names a directory.
4349if test -n "$CPP" && test -d "$CPP"; then
4350  CPP=
4351fi
4352if test -z "$CPP"; then
4353  if ${ac_cv_prog_CPP+:} false; then :
4354  $as_echo_n "(cached) " >&6
4355else
4356      # Double quotes because CPP needs to be expanded
4357    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4358    do
4359      ac_preproc_ok=false
4360for ac_c_preproc_warn_flag in '' yes
4361do
4362  # Use a header file that comes with gcc, so configuring glibc
4363  # with a fresh cross-compiler works.
4364  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4365  # <limits.h> exists even on freestanding compilers.
4366  # On the NeXT, cc -E runs the code through the compiler's parser,
4367  # not just through cpp. "Syntax error" is here to catch this case.
4368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4369/* end confdefs.h.  */
4370#ifdef __STDC__
4371# include <limits.h>
4372#else
4373# include <assert.h>
4374#endif
4375		     Syntax error
4376_ACEOF
4377if ac_fn_c_try_cpp "$LINENO"; then :
4378
4379else
4380  # Broken: fails on valid input.
4381continue
4382fi
4383rm -f conftest.err conftest.i conftest.$ac_ext
4384
4385  # OK, works on sane cases.  Now check whether nonexistent headers
4386  # can be detected and how.
4387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388/* end confdefs.h.  */
4389#include <ac_nonexistent.h>
4390_ACEOF
4391if ac_fn_c_try_cpp "$LINENO"; then :
4392  # Broken: success on invalid input.
4393continue
4394else
4395  # Passes both tests.
4396ac_preproc_ok=:
4397break
4398fi
4399rm -f conftest.err conftest.i conftest.$ac_ext
4400
4401done
4402# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4403rm -f conftest.i conftest.err conftest.$ac_ext
4404if $ac_preproc_ok; then :
4405  break
4406fi
4407
4408    done
4409    ac_cv_prog_CPP=$CPP
4410
4411fi
4412  CPP=$ac_cv_prog_CPP
4413else
4414  ac_cv_prog_CPP=$CPP
4415fi
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4417$as_echo "$CPP" >&6; }
4418ac_preproc_ok=false
4419for ac_c_preproc_warn_flag in '' yes
4420do
4421  # Use a header file that comes with gcc, so configuring glibc
4422  # with a fresh cross-compiler works.
4423  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4424  # <limits.h> exists even on freestanding compilers.
4425  # On the NeXT, cc -E runs the code through the compiler's parser,
4426  # not just through cpp. "Syntax error" is here to catch this case.
4427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h.  */
4429#ifdef __STDC__
4430# include <limits.h>
4431#else
4432# include <assert.h>
4433#endif
4434		     Syntax error
4435_ACEOF
4436if ac_fn_c_try_cpp "$LINENO"; then :
4437
4438else
4439  # Broken: fails on valid input.
4440continue
4441fi
4442rm -f conftest.err conftest.i conftest.$ac_ext
4443
4444  # OK, works on sane cases.  Now check whether nonexistent headers
4445  # can be detected and how.
4446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h.  */
4448#include <ac_nonexistent.h>
4449_ACEOF
4450if ac_fn_c_try_cpp "$LINENO"; then :
4451  # Broken: success on invalid input.
4452continue
4453else
4454  # Passes both tests.
4455ac_preproc_ok=:
4456break
4457fi
4458rm -f conftest.err conftest.i conftest.$ac_ext
4459
4460done
4461# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4462rm -f conftest.i conftest.err conftest.$ac_ext
4463if $ac_preproc_ok; then :
4464
4465else
4466  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4468as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4469See \`config.log' for more details" "$LINENO" 5; }
4470fi
4471
4472ac_ext=c
4473ac_cpp='$CPP $CPPFLAGS'
4474ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4475ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4476ac_compiler_gnu=$ac_cv_c_compiler_gnu
4477
4478
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4480$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4481if ${ac_cv_path_GREP+:} false; then :
4482  $as_echo_n "(cached) " >&6
4483else
4484  if test -z "$GREP"; then
4485  ac_path_GREP_found=false
4486  # Loop through the user's path and test for each of PROGNAME-LIST
4487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4489do
4490  IFS=$as_save_IFS
4491  test -z "$as_dir" && as_dir=.
4492    for ac_prog in grep ggrep; do
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4495      as_fn_executable_p "$ac_path_GREP" || continue
4496# Check for GNU ac_path_GREP and select it if it is found.
4497  # Check for GNU $ac_path_GREP
4498case `"$ac_path_GREP" --version 2>&1` in
4499*GNU*)
4500  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4501*)
4502  ac_count=0
4503  $as_echo_n 0123456789 >"conftest.in"
4504  while :
4505  do
4506    cat "conftest.in" "conftest.in" >"conftest.tmp"
4507    mv "conftest.tmp" "conftest.in"
4508    cp "conftest.in" "conftest.nl"
4509    $as_echo 'GREP' >> "conftest.nl"
4510    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4511    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4512    as_fn_arith $ac_count + 1 && ac_count=$as_val
4513    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4514      # Best one so far, save it but keep looking for a better one
4515      ac_cv_path_GREP="$ac_path_GREP"
4516      ac_path_GREP_max=$ac_count
4517    fi
4518    # 10*(2^10) chars as input seems more than enough
4519    test $ac_count -gt 10 && break
4520  done
4521  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4522esac
4523
4524      $ac_path_GREP_found && break 3
4525    done
4526  done
4527  done
4528IFS=$as_save_IFS
4529  if test -z "$ac_cv_path_GREP"; then
4530    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4531  fi
4532else
4533  ac_cv_path_GREP=$GREP
4534fi
4535
4536fi
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4538$as_echo "$ac_cv_path_GREP" >&6; }
4539 GREP="$ac_cv_path_GREP"
4540
4541
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4543$as_echo_n "checking for egrep... " >&6; }
4544if ${ac_cv_path_EGREP+:} false; then :
4545  $as_echo_n "(cached) " >&6
4546else
4547  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4548   then ac_cv_path_EGREP="$GREP -E"
4549   else
4550     if test -z "$EGREP"; then
4551  ac_path_EGREP_found=false
4552  # Loop through the user's path and test for each of PROGNAME-LIST
4553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4555do
4556  IFS=$as_save_IFS
4557  test -z "$as_dir" && as_dir=.
4558    for ac_prog in egrep; do
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4561      as_fn_executable_p "$ac_path_EGREP" || continue
4562# Check for GNU ac_path_EGREP and select it if it is found.
4563  # Check for GNU $ac_path_EGREP
4564case `"$ac_path_EGREP" --version 2>&1` in
4565*GNU*)
4566  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4567*)
4568  ac_count=0
4569  $as_echo_n 0123456789 >"conftest.in"
4570  while :
4571  do
4572    cat "conftest.in" "conftest.in" >"conftest.tmp"
4573    mv "conftest.tmp" "conftest.in"
4574    cp "conftest.in" "conftest.nl"
4575    $as_echo 'EGREP' >> "conftest.nl"
4576    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4577    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4578    as_fn_arith $ac_count + 1 && ac_count=$as_val
4579    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4580      # Best one so far, save it but keep looking for a better one
4581      ac_cv_path_EGREP="$ac_path_EGREP"
4582      ac_path_EGREP_max=$ac_count
4583    fi
4584    # 10*(2^10) chars as input seems more than enough
4585    test $ac_count -gt 10 && break
4586  done
4587  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4588esac
4589
4590      $ac_path_EGREP_found && break 3
4591    done
4592  done
4593  done
4594IFS=$as_save_IFS
4595  if test -z "$ac_cv_path_EGREP"; then
4596    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4597  fi
4598else
4599  ac_cv_path_EGREP=$EGREP
4600fi
4601
4602   fi
4603fi
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4605$as_echo "$ac_cv_path_EGREP" >&6; }
4606 EGREP="$ac_cv_path_EGREP"
4607
4608
4609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4610$as_echo_n "checking for ANSI C header files... " >&6; }
4611if ${ac_cv_header_stdc+:} false; then :
4612  $as_echo_n "(cached) " >&6
4613else
4614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h.  */
4616#include <stdlib.h>
4617#include <stdarg.h>
4618#include <string.h>
4619#include <float.h>
4620
4621int
4622main ()
4623{
4624
4625  ;
4626  return 0;
4627}
4628_ACEOF
4629if ac_fn_c_try_compile "$LINENO"; then :
4630  ac_cv_header_stdc=yes
4631else
4632  ac_cv_header_stdc=no
4633fi
4634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4635
4636if test $ac_cv_header_stdc = yes; then
4637  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4639/* end confdefs.h.  */
4640#include <string.h>
4641
4642_ACEOF
4643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4644  $EGREP "memchr" >/dev/null 2>&1; then :
4645
4646else
4647  ac_cv_header_stdc=no
4648fi
4649rm -f conftest*
4650
4651fi
4652
4653if test $ac_cv_header_stdc = yes; then
4654  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4656/* end confdefs.h.  */
4657#include <stdlib.h>
4658
4659_ACEOF
4660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4661  $EGREP "free" >/dev/null 2>&1; then :
4662
4663else
4664  ac_cv_header_stdc=no
4665fi
4666rm -f conftest*
4667
4668fi
4669
4670if test $ac_cv_header_stdc = yes; then
4671  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4672  if test "$cross_compiling" = yes; then :
4673  :
4674else
4675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4676/* end confdefs.h.  */
4677#include <ctype.h>
4678#include <stdlib.h>
4679#if ((' ' & 0x0FF) == 0x020)
4680# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4681# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4682#else
4683# define ISLOWER(c) \
4684		   (('a' <= (c) && (c) <= 'i') \
4685		     || ('j' <= (c) && (c) <= 'r') \
4686		     || ('s' <= (c) && (c) <= 'z'))
4687# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4688#endif
4689
4690#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4691int
4692main ()
4693{
4694  int i;
4695  for (i = 0; i < 256; i++)
4696    if (XOR (islower (i), ISLOWER (i))
4697	|| toupper (i) != TOUPPER (i))
4698      return 2;
4699  return 0;
4700}
4701_ACEOF
4702if ac_fn_c_try_run "$LINENO"; then :
4703
4704else
4705  ac_cv_header_stdc=no
4706fi
4707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4708  conftest.$ac_objext conftest.beam conftest.$ac_ext
4709fi
4710
4711fi
4712fi
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4714$as_echo "$ac_cv_header_stdc" >&6; }
4715if test $ac_cv_header_stdc = yes; then
4716
4717$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4718
4719fi
4720
4721# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4722for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4723		  inttypes.h stdint.h unistd.h
4724do :
4725  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4726ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4727"
4728if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4729  cat >>confdefs.h <<_ACEOF
4730#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4731_ACEOF
4732
4733fi
4734
4735done
4736
4737
4738
4739  apu_have_crypto=0
4740  apu_have_openssl=0
4741  apu_have_nss=0
4742
4743  old_libs="$LIBS"
4744  old_cppflags="$CPPFLAGS"
4745  old_ldflags="$LDFLAGS"
4746
4747
4748# Check whether --with-crypto was given.
4749if test "${with_crypto+set}" = set; then :
4750  withval=$with_crypto;
4751    cryptolibs="openssl nss"
4752
4753    if test "$withval" = "yes"; then
4754
4755      crypto_library_enabled=0
4756      for cryptolib in $cryptolibs; do
4757        eval v=\$with_$cryptolib
4758        if test "$v" != "" -a "$v" != "no"; then
4759          crypto_library_enabled=1
4760        fi
4761      done
4762
4763      if test "$crypto_library_enabled" = "0"; then
4764        for cryptolib in $cryptolibs; do
4765          eval v=\$with_$cryptolib
4766          if test "$v" != "no"; then
4767            eval with_$cryptolib=yes
4768            crypto_library_enabled=1
4769          fi
4770        done
4771	if test "$crypto_library_enabled" = "1"; then
4772          { $as_echo "$as_me:${as_lineno-$LINENO}: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&5
4773$as_echo "$as_me: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&6;}
4774        else
4775          as_fn_error $? "Crypto was requested but all possible crypto libraries were disabled." "$LINENO" 5
4776	fi
4777      fi
4778
4779
4780  openssl_have_headers=0
4781  openssl_have_libs=0
4782
4783  old_libs="$LIBS"
4784  old_cppflags="$CPPFLAGS"
4785  old_ldflags="$LDFLAGS"
4786
4787
4788# Check whether --with-openssl was given.
4789if test "${with_openssl+set}" = set; then :
4790  withval=$with_openssl;
4791    if test "$withval" = "yes"; then
4792      for ac_header in openssl/x509.h
4793do :
4794  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
4795if test "x$ac_cv_header_openssl_x509_h" = xyes; then :
4796  cat >>confdefs.h <<_ACEOF
4797#define HAVE_OPENSSL_X509_H 1
4798_ACEOF
4799 openssl_have_headers=1
4800fi
4801
4802done
4803
4804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
4805$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
4806if ${ac_cv_lib_crypto_BN_init+:} false; then :
4807  $as_echo_n "(cached) " >&6
4808else
4809  ac_check_lib_save_LIBS=$LIBS
4810LIBS="-lcrypto  $LIBS"
4811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812/* end confdefs.h.  */
4813
4814/* Override any GCC internal prototype to avoid an error.
4815   Use char because int might match the return type of a GCC
4816   builtin and then its argument prototype would still apply.  */
4817#ifdef __cplusplus
4818extern "C"
4819#endif
4820char BN_init ();
4821int
4822main ()
4823{
4824return BN_init ();
4825  ;
4826  return 0;
4827}
4828_ACEOF
4829if ac_fn_c_try_link "$LINENO"; then :
4830  ac_cv_lib_crypto_BN_init=yes
4831else
4832  ac_cv_lib_crypto_BN_init=no
4833fi
4834rm -f core conftest.err conftest.$ac_objext \
4835    conftest$ac_exeext conftest.$ac_ext
4836LIBS=$ac_check_lib_save_LIBS
4837fi
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
4839$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
4840if test "x$ac_cv_lib_crypto_BN_init" = xyes; then :
4841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
4842$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
4843if ${ac_cv_lib_ssl_SSL_accept+:} false; then :
4844  $as_echo_n "(cached) " >&6
4845else
4846  ac_check_lib_save_LIBS=$LIBS
4847LIBS="-lssl -lcrypto $LIBS"
4848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h.  */
4850
4851/* Override any GCC internal prototype to avoid an error.
4852   Use char because int might match the return type of a GCC
4853   builtin and then its argument prototype would still apply.  */
4854#ifdef __cplusplus
4855extern "C"
4856#endif
4857char SSL_accept ();
4858int
4859main ()
4860{
4861return SSL_accept ();
4862  ;
4863  return 0;
4864}
4865_ACEOF
4866if ac_fn_c_try_link "$LINENO"; then :
4867  ac_cv_lib_ssl_SSL_accept=yes
4868else
4869  ac_cv_lib_ssl_SSL_accept=no
4870fi
4871rm -f core conftest.err conftest.$ac_objext \
4872    conftest$ac_exeext conftest.$ac_ext
4873LIBS=$ac_check_lib_save_LIBS
4874fi
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
4876$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
4877if test "x$ac_cv_lib_ssl_SSL_accept" = xyes; then :
4878  openssl_have_libs=1
4879fi
4880
4881fi
4882
4883      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
4884        apu_have_openssl=1
4885      fi
4886    elif test "$withval" = "no"; then
4887      apu_have_openssl=0
4888    else
4889
4890      openssl_CPPFLAGS="-I$withval/include"
4891      openssl_LDFLAGS="-L$withval/lib "
4892
4893
4894  if test "x$CPPFLAGS" = "x"; then
4895    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$openssl_CPPFLAGS\""
4896    CPPFLAGS="$openssl_CPPFLAGS"
4897  else
4898    apr_addto_bugger="$openssl_CPPFLAGS"
4899    for i in $apr_addto_bugger; do
4900      apr_addto_duplicate="0"
4901      for j in $CPPFLAGS; do
4902        if test "x$i" = "x$j"; then
4903          apr_addto_duplicate="1"
4904          break
4905        fi
4906      done
4907      if test $apr_addto_duplicate = "0"; then
4908        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
4909        CPPFLAGS="$CPPFLAGS $i"
4910      fi
4911    done
4912  fi
4913
4914
4915  if test "x$LDFLAGS" = "x"; then
4916    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$openssl_LDFLAGS\""
4917    LDFLAGS="$openssl_LDFLAGS"
4918  else
4919    apr_addto_bugger="$openssl_LDFLAGS"
4920    for i in $apr_addto_bugger; do
4921      apr_addto_duplicate="0"
4922      for j in $LDFLAGS; do
4923        if test "x$i" = "x$j"; then
4924          apr_addto_duplicate="1"
4925          break
4926        fi
4927      done
4928      if test $apr_addto_duplicate = "0"; then
4929        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
4930        LDFLAGS="$LDFLAGS $i"
4931      fi
4932    done
4933  fi
4934
4935
4936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in $withval" >&5
4937$as_echo "$as_me: checking for openssl in $withval" >&6;}
4938      for ac_header in openssl/x509.h
4939do :
4940  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
4941if test "x$ac_cv_header_openssl_x509_h" = xyes; then :
4942  cat >>confdefs.h <<_ACEOF
4943#define HAVE_OPENSSL_X509_H 1
4944_ACEOF
4945 openssl_have_headers=1
4946fi
4947
4948done
4949
4950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
4951$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
4952if ${ac_cv_lib_crypto_BN_init+:} false; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  ac_check_lib_save_LIBS=$LIBS
4956LIBS="-lcrypto  $LIBS"
4957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958/* end confdefs.h.  */
4959
4960/* Override any GCC internal prototype to avoid an error.
4961   Use char because int might match the return type of a GCC
4962   builtin and then its argument prototype would still apply.  */
4963#ifdef __cplusplus
4964extern "C"
4965#endif
4966char BN_init ();
4967int
4968main ()
4969{
4970return BN_init ();
4971  ;
4972  return 0;
4973}
4974_ACEOF
4975if ac_fn_c_try_link "$LINENO"; then :
4976  ac_cv_lib_crypto_BN_init=yes
4977else
4978  ac_cv_lib_crypto_BN_init=no
4979fi
4980rm -f core conftest.err conftest.$ac_objext \
4981    conftest$ac_exeext conftest.$ac_ext
4982LIBS=$ac_check_lib_save_LIBS
4983fi
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
4985$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
4986if test "x$ac_cv_lib_crypto_BN_init" = xyes; then :
4987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
4988$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
4989if ${ac_cv_lib_ssl_SSL_accept+:} false; then :
4990  $as_echo_n "(cached) " >&6
4991else
4992  ac_check_lib_save_LIBS=$LIBS
4993LIBS="-lssl -lcrypto $LIBS"
4994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4995/* end confdefs.h.  */
4996
4997/* Override any GCC internal prototype to avoid an error.
4998   Use char because int might match the return type of a GCC
4999   builtin and then its argument prototype would still apply.  */
5000#ifdef __cplusplus
5001extern "C"
5002#endif
5003char SSL_accept ();
5004int
5005main ()
5006{
5007return SSL_accept ();
5008  ;
5009  return 0;
5010}
5011_ACEOF
5012if ac_fn_c_try_link "$LINENO"; then :
5013  ac_cv_lib_ssl_SSL_accept=yes
5014else
5015  ac_cv_lib_ssl_SSL_accept=no
5016fi
5017rm -f core conftest.err conftest.$ac_objext \
5018    conftest$ac_exeext conftest.$ac_ext
5019LIBS=$ac_check_lib_save_LIBS
5020fi
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
5022$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
5023if test "x$ac_cv_lib_ssl_SSL_accept" = xyes; then :
5024  openssl_have_libs=1
5025fi
5026
5027fi
5028
5029      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
5030        apu_have_openssl=1
5031
5032  if test "x$APRUTIL_LDFLAGS" = "x"; then
5033    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
5034    APRUTIL_LDFLAGS="-L$withval/lib"
5035  else
5036    apr_addto_bugger="-L$withval/lib"
5037    for i in $apr_addto_bugger; do
5038      apr_addto_duplicate="0"
5039      for j in $APRUTIL_LDFLAGS; do
5040        if test "x$i" = "x$j"; then
5041          apr_addto_duplicate="1"
5042          break
5043        fi
5044      done
5045      if test $apr_addto_duplicate = "0"; then
5046        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5047        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5048      fi
5049    done
5050  fi
5051
5052
5053  if test "x$APRUTIL_INCLUDES" = "x"; then
5054    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
5055    APRUTIL_INCLUDES="-I$withval/include"
5056  else
5057    apr_addto_bugger="-I$withval/include"
5058    for i in $apr_addto_bugger; do
5059      apr_addto_duplicate="0"
5060      for j in $APRUTIL_INCLUDES; do
5061        if test "x$i" = "x$j"; then
5062          apr_addto_duplicate="1"
5063          break
5064        fi
5065      done
5066      if test $apr_addto_duplicate = "0"; then
5067        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5068        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5069      fi
5070    done
5071  fi
5072
5073      fi
5074
5075      if test "$apu_have_openssl" != "1"; then
5076        for ac_header in openssl/x509.h
5077do :
5078  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
5079if test "x$ac_cv_header_openssl_x509_h" = xyes; then :
5080  cat >>confdefs.h <<_ACEOF
5081#define HAVE_OPENSSL_X509_H 1
5082_ACEOF
5083 openssl_have_headers=1
5084fi
5085
5086done
5087
5088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
5089$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
5090if ${ac_cv_lib_crypto_BN_init+:} false; then :
5091  $as_echo_n "(cached) " >&6
5092else
5093  ac_check_lib_save_LIBS=$LIBS
5094LIBS="-lcrypto  $LIBS"
5095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5096/* end confdefs.h.  */
5097
5098/* Override any GCC internal prototype to avoid an error.
5099   Use char because int might match the return type of a GCC
5100   builtin and then its argument prototype would still apply.  */
5101#ifdef __cplusplus
5102extern "C"
5103#endif
5104char BN_init ();
5105int
5106main ()
5107{
5108return BN_init ();
5109  ;
5110  return 0;
5111}
5112_ACEOF
5113if ac_fn_c_try_link "$LINENO"; then :
5114  ac_cv_lib_crypto_BN_init=yes
5115else
5116  ac_cv_lib_crypto_BN_init=no
5117fi
5118rm -f core conftest.err conftest.$ac_objext \
5119    conftest$ac_exeext conftest.$ac_ext
5120LIBS=$ac_check_lib_save_LIBS
5121fi
5122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
5123$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
5124if test "x$ac_cv_lib_crypto_BN_init" = xyes; then :
5125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
5126$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
5127if ${ac_cv_lib_ssl_SSL_accept+:} false; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  ac_check_lib_save_LIBS=$LIBS
5131LIBS="-lssl -lcrypto $LIBS"
5132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5133/* end confdefs.h.  */
5134
5135/* Override any GCC internal prototype to avoid an error.
5136   Use char because int might match the return type of a GCC
5137   builtin and then its argument prototype would still apply.  */
5138#ifdef __cplusplus
5139extern "C"
5140#endif
5141char SSL_accept ();
5142int
5143main ()
5144{
5145return SSL_accept ();
5146  ;
5147  return 0;
5148}
5149_ACEOF
5150if ac_fn_c_try_link "$LINENO"; then :
5151  ac_cv_lib_ssl_SSL_accept=yes
5152else
5153  ac_cv_lib_ssl_SSL_accept=no
5154fi
5155rm -f core conftest.err conftest.$ac_objext \
5156    conftest$ac_exeext conftest.$ac_ext
5157LIBS=$ac_check_lib_save_LIBS
5158fi
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
5160$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
5161if test "x$ac_cv_lib_ssl_SSL_accept" = xyes; then :
5162  openssl_have_libs=1
5163fi
5164
5165fi
5166
5167        if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
5168          apu_have_openssl=1
5169
5170  if test "x$APRUTIL_LDFLAGS" = "x"; then
5171    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
5172    APRUTIL_LDFLAGS="-L$withval/lib"
5173  else
5174    apr_addto_bugger="-L$withval/lib"
5175    for i in $apr_addto_bugger; do
5176      apr_addto_duplicate="0"
5177      for j in $APRUTIL_LDFLAGS; do
5178        if test "x$i" = "x$j"; then
5179          apr_addto_duplicate="1"
5180          break
5181        fi
5182      done
5183      if test $apr_addto_duplicate = "0"; then
5184        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5185        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5186      fi
5187    done
5188  fi
5189
5190
5191  if test "x$APRUTIL_INCLUDES" = "x"; then
5192    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
5193    APRUTIL_INCLUDES="-I$withval/include"
5194  else
5195    apr_addto_bugger="-I$withval/include"
5196    for i in $apr_addto_bugger; do
5197      apr_addto_duplicate="0"
5198      for j in $APRUTIL_INCLUDES; do
5199        if test "x$i" = "x$j"; then
5200          apr_addto_duplicate="1"
5201          break
5202        fi
5203      done
5204      if test $apr_addto_duplicate = "0"; then
5205        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5206        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5207      fi
5208    done
5209  fi
5210
5211        fi
5212      fi
5213
5214      ac_fn_c_check_decl "$LINENO" "EVP_PKEY_CTX_new" "ac_cv_have_decl_EVP_PKEY_CTX_new" "#include <openssl/evp.h>
5215"
5216if test "x$ac_cv_have_decl_EVP_PKEY_CTX_new" = xyes; then :
5217  ac_have_decl=1
5218else
5219  ac_have_decl=0
5220fi
5221
5222cat >>confdefs.h <<_ACEOF
5223#define HAVE_DECL_EVP_PKEY_CTX_NEW $ac_have_decl
5224_ACEOF
5225
5226
5227    fi
5228
5229else
5230
5231    apu_have_openssl=0
5232
5233fi
5234
5235
5236
5237
5238      if test "$apu_have_openssl" = "1"; then
5239
5240  if test "x$LDADD_crypto_openssl" = "x"; then
5241    test "x$silent" != "xyes" && echo "  setting LDADD_crypto_openssl to \"$openssl_LDFLAGS -lssl -lcrypto\""
5242    LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto"
5243  else
5244    apr_addto_bugger="$openssl_LDFLAGS -lssl -lcrypto"
5245    for i in $apr_addto_bugger; do
5246      apr_addto_duplicate="0"
5247      for j in $LDADD_crypto_openssl; do
5248        if test "x$i" = "x$j"; then
5249          apr_addto_duplicate="1"
5250          break
5251        fi
5252      done
5253      if test $apr_addto_duplicate = "0"; then
5254        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_crypto_openssl"
5255        LDADD_crypto_openssl="$LDADD_crypto_openssl $i"
5256      fi
5257    done
5258  fi
5259
5260    apu_have_crypto=1
5261
5262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5
5263$as_echo_n "checking for const input buffers in OpenSSL... " >&6; }
5264    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5265/* end confdefs.h.  */
5266#include <openssl/rsa.h>
5267int
5268main ()
5269{
5270 const unsigned char * buf;
5271          unsigned char * outbuf;
5272          RSA rsa;
5273
5274                RSA_private_decrypt(1,
5275                                                        buf,
5276                                                        outbuf,
5277                                                        &rsa,
5278                                                        RSA_PKCS1_PADDING);
5279
5280
5281  ;
5282  return 0;
5283}
5284_ACEOF
5285if ac_fn_c_try_compile "$LINENO"; then :
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5287$as_echo "yes" >&6; }
5288
5289$as_echo "#define CRYPTO_OPENSSL_CONST_BUFFERS 1" >>confdefs.h
5290
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5296
5297  fi
5298
5299
5300
5301  LIBS="$old_libs"
5302  CPPFLAGS="$old_cppflags"
5303  LDFLAGS="$old_ldflags"
5304
5305
5306  nss_have_libs=0
5307
5308  old_libs="$LIBS"
5309  old_cppflags="$CPPFLAGS"
5310  old_ldflags="$LDFLAGS"
5311
5312
5313# Check whether --with-nss was given.
5314if test "${with_nss+set}" = set; then :
5315  withval=$with_nss;
5316    if test "$withval" = "yes"; then
5317      if test -n "$ac_tool_prefix"; then
5318  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5319set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321$as_echo_n "checking for $ac_word... " >&6; }
5322if ${ac_cv_path_PKG_CONFIG+:} false; then :
5323  $as_echo_n "(cached) " >&6
5324else
5325  case $PKG_CONFIG in
5326  [\\/]* | ?:[\\/]*)
5327  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5328  ;;
5329  *)
5330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331for as_dir in $PATH
5332do
5333  IFS=$as_save_IFS
5334  test -z "$as_dir" && as_dir=.
5335    for ac_exec_ext in '' $ac_executable_extensions; do
5336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339    break 2
5340  fi
5341done
5342  done
5343IFS=$as_save_IFS
5344
5345  ;;
5346esac
5347fi
5348PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5349if test -n "$PKG_CONFIG"; then
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5351$as_echo "$PKG_CONFIG" >&6; }
5352else
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356
5357
5358fi
5359if test -z "$ac_cv_path_PKG_CONFIG"; then
5360  ac_pt_PKG_CONFIG=$PKG_CONFIG
5361  # Extract the first word of "pkg-config", so it can be a program name with args.
5362set dummy pkg-config; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $ac_pt_PKG_CONFIG in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5380    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5392if test -n "$ac_pt_PKG_CONFIG"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5394$as_echo "$ac_pt_PKG_CONFIG" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400  if test "x$ac_pt_PKG_CONFIG" = x; then
5401    PKG_CONFIG=""
5402  else
5403    case $cross_compiling:$ac_tool_warned in
5404yes:)
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5406$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5407ac_tool_warned=yes ;;
5408esac
5409    PKG_CONFIG=$ac_pt_PKG_CONFIG
5410  fi
5411else
5412  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5413fi
5414
5415      if test -n "$PKG_CONFIG"; then
5416        nss_CPPFLAGS=`$PKG_CONFIG --cflags-only-I nss`
5417        nss_LDFLAGS=`$PKG_CONFIG --libs nss`
5418
5419  if test "x$CPPFLAGS" = "x"; then
5420    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
5421    CPPFLAGS="$nss_CPPFLAGS"
5422  else
5423    apr_addto_bugger="$nss_CPPFLAGS"
5424    for i in $apr_addto_bugger; do
5425      apr_addto_duplicate="0"
5426      for j in $CPPFLAGS; do
5427        if test "x$i" = "x$j"; then
5428          apr_addto_duplicate="1"
5429          break
5430        fi
5431      done
5432      if test $apr_addto_duplicate = "0"; then
5433        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5434        CPPFLAGS="$CPPFLAGS $i"
5435      fi
5436    done
5437  fi
5438
5439
5440  if test "x$LDFLAGS" = "x"; then
5441    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
5442    LDFLAGS="$nss_LDFLAGS"
5443  else
5444    apr_addto_bugger="$nss_LDFLAGS"
5445    for i in $apr_addto_bugger; do
5446      apr_addto_duplicate="0"
5447      for j in $LDFLAGS; do
5448        if test "x$i" = "x$j"; then
5449          apr_addto_duplicate="1"
5450          break
5451        fi
5452      done
5453      if test $apr_addto_duplicate = "0"; then
5454        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5455        LDFLAGS="$LDFLAGS $i"
5456      fi
5457    done
5458  fi
5459
5460      fi
5461      nss_have_prerrorh=0
5462      nss_have_nssh=0
5463      nss_have_pk11pubh=0
5464      for ac_header in prerror.h
5465do :
5466  ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default"
5467if test "x$ac_cv_header_prerror_h" = xyes; then :
5468  cat >>confdefs.h <<_ACEOF
5469#define HAVE_PRERROR_H 1
5470_ACEOF
5471 nss_have_prerrorh=1
5472fi
5473
5474done
5475
5476      for ac_header in nss/nss.h nss.h
5477do :
5478  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5479ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5480if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5481  cat >>confdefs.h <<_ACEOF
5482#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5483_ACEOF
5484 nss_have_nssh=1
5485fi
5486
5487done
5488
5489      for ac_header in nss/pk11pub.h pk11pub.h
5490do :
5491  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5492ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5493if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5494  cat >>confdefs.h <<_ACEOF
5495#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5496_ACEOF
5497 nss_have_pk11pubh=1
5498fi
5499
5500done
5501
5502      nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
5503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
5504$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
5505if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then :
5506  $as_echo_n "(cached) " >&6
5507else
5508  ac_check_lib_save_LIBS=$LIBS
5509LIBS="-lnspr4  $LIBS"
5510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h.  */
5512
5513/* Override any GCC internal prototype to avoid an error.
5514   Use char because int might match the return type of a GCC
5515   builtin and then its argument prototype would still apply.  */
5516#ifdef __cplusplus
5517extern "C"
5518#endif
5519char PR_Initialize ();
5520int
5521main ()
5522{
5523return PR_Initialize ();
5524  ;
5525  return 0;
5526}
5527_ACEOF
5528if ac_fn_c_try_link "$LINENO"; then :
5529  ac_cv_lib_nspr4_PR_Initialize=yes
5530else
5531  ac_cv_lib_nspr4_PR_Initialize=no
5532fi
5533rm -f core conftest.err conftest.$ac_objext \
5534    conftest$ac_exeext conftest.$ac_ext
5535LIBS=$ac_check_lib_save_LIBS
5536fi
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
5538$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
5539if test "x$ac_cv_lib_nspr4_PR_Initialize" = xyes; then :
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
5541$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
5542if ${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+:} false; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  ac_check_lib_save_LIBS=$LIBS
5546LIBS="-lnss3 -lnspr4 $LIBS"
5547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5548/* end confdefs.h.  */
5549
5550/* Override any GCC internal prototype to avoid an error.
5551   Use char because int might match the return type of a GCC
5552   builtin and then its argument prototype would still apply.  */
5553#ifdef __cplusplus
5554extern "C"
5555#endif
5556char PK11_CreatePBEV2AlgorithmID ();
5557int
5558main ()
5559{
5560return PK11_CreatePBEV2AlgorithmID ();
5561  ;
5562  return 0;
5563}
5564_ACEOF
5565if ac_fn_c_try_link "$LINENO"; then :
5566  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
5567else
5568  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
5569fi
5570rm -f core conftest.err conftest.$ac_objext \
5571    conftest$ac_exeext conftest.$ac_ext
5572LIBS=$ac_check_lib_save_LIBS
5573fi
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
5575$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
5576if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = xyes; then :
5577  nss_have_libs=1
5578fi
5579
5580fi
5581
5582      if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
5583        apu_have_nss=1
5584      fi
5585    elif test "$withval" = "no"; then
5586      apu_have_nss=0
5587    elif test "x$withval" != "x"; then
5588
5589      nss_CPPFLAGS="-I$withval/include/nss -I$withval/include/nss3 -I$withval/include/nspr -I$withval/include/nspr4 -I$withval/include -I$withval/../public"
5590      nss_LDFLAGS="-L$withval/lib "
5591
5592
5593  if test "x$CPPFLAGS" = "x"; then
5594    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
5595    CPPFLAGS="$nss_CPPFLAGS"
5596  else
5597    apr_addto_bugger="$nss_CPPFLAGS"
5598    for i in $apr_addto_bugger; do
5599      apr_addto_duplicate="0"
5600      for j in $CPPFLAGS; do
5601        if test "x$i" = "x$j"; then
5602          apr_addto_duplicate="1"
5603          break
5604        fi
5605      done
5606      if test $apr_addto_duplicate = "0"; then
5607        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5608        CPPFLAGS="$CPPFLAGS $i"
5609      fi
5610    done
5611  fi
5612
5613
5614  if test "x$LDFLAGS" = "x"; then
5615    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
5616    LDFLAGS="$nss_LDFLAGS"
5617  else
5618    apr_addto_bugger="$nss_LDFLAGS"
5619    for i in $apr_addto_bugger; do
5620      apr_addto_duplicate="0"
5621      for j in $LDFLAGS; do
5622        if test "x$i" = "x$j"; then
5623          apr_addto_duplicate="1"
5624          break
5625        fi
5626      done
5627      if test $apr_addto_duplicate = "0"; then
5628        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5629        LDFLAGS="$LDFLAGS $i"
5630      fi
5631    done
5632  fi
5633
5634
5635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5
5636$as_echo "$as_me: checking for nss in $withval" >&6;}
5637      nss_have_prerrorh=0
5638      nss_have_nssh=0
5639      nss_have_pk11pubh=0
5640      for ac_header in prerror.h
5641do :
5642  ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default"
5643if test "x$ac_cv_header_prerror_h" = xyes; then :
5644  cat >>confdefs.h <<_ACEOF
5645#define HAVE_PRERROR_H 1
5646_ACEOF
5647 nss_have_prerrorh=1
5648fi
5649
5650done
5651
5652      for ac_header in nss/nss.h nss.h
5653do :
5654  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5655ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5656if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5657  cat >>confdefs.h <<_ACEOF
5658#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5659_ACEOF
5660 nss_have_nssh=1
5661fi
5662
5663done
5664
5665      for ac_header in nss/pk11pub.h pk11pub.h
5666do :
5667  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5668ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5669if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5670  cat >>confdefs.h <<_ACEOF
5671#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5672_ACEOF
5673 nss_have_pk11pubh=1
5674fi
5675
5676done
5677
5678      nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
5679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
5680$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
5681if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then :
5682  $as_echo_n "(cached) " >&6
5683else
5684  ac_check_lib_save_LIBS=$LIBS
5685LIBS="-lnspr4  $LIBS"
5686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5687/* end confdefs.h.  */
5688
5689/* Override any GCC internal prototype to avoid an error.
5690   Use char because int might match the return type of a GCC
5691   builtin and then its argument prototype would still apply.  */
5692#ifdef __cplusplus
5693extern "C"
5694#endif
5695char PR_Initialize ();
5696int
5697main ()
5698{
5699return PR_Initialize ();
5700  ;
5701  return 0;
5702}
5703_ACEOF
5704if ac_fn_c_try_link "$LINENO"; then :
5705  ac_cv_lib_nspr4_PR_Initialize=yes
5706else
5707  ac_cv_lib_nspr4_PR_Initialize=no
5708fi
5709rm -f core conftest.err conftest.$ac_objext \
5710    conftest$ac_exeext conftest.$ac_ext
5711LIBS=$ac_check_lib_save_LIBS
5712fi
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
5714$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
5715if test "x$ac_cv_lib_nspr4_PR_Initialize" = xyes; then :
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
5717$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
5718if ${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+:} false; then :
5719  $as_echo_n "(cached) " >&6
5720else
5721  ac_check_lib_save_LIBS=$LIBS
5722LIBS="-lnss3 -lnspr4 $LIBS"
5723cat 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
5730extern "C"
5731#endif
5732char PK11_CreatePBEV2AlgorithmID ();
5733int
5734main ()
5735{
5736return PK11_CreatePBEV2AlgorithmID ();
5737  ;
5738  return 0;
5739}
5740_ACEOF
5741if ac_fn_c_try_link "$LINENO"; then :
5742  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
5743else
5744  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
5745fi
5746rm -f core conftest.err conftest.$ac_objext \
5747    conftest$ac_exeext conftest.$ac_ext
5748LIBS=$ac_check_lib_save_LIBS
5749fi
5750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
5751$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
5752if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = xyes; then :
5753  nss_have_libs=1
5754fi
5755
5756fi
5757
5758      if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
5759        apu_have_nss=1
5760      fi
5761
5762    fi
5763    if test "$apu_have_nss" != "0"; then
5764
5765  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
5766    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$nss_CPPFLAGS\""
5767    APRUTIL_PRIV_INCLUDES="$nss_CPPFLAGS"
5768  else
5769    apr_addto_bugger="$nss_CPPFLAGS"
5770    for i in $apr_addto_bugger; do
5771      apr_addto_duplicate="0"
5772      for j in $APRUTIL_PRIV_INCLUDES; do
5773        if test "x$i" = "x$j"; then
5774          apr_addto_duplicate="1"
5775          break
5776        fi
5777      done
5778      if test $apr_addto_duplicate = "0"; then
5779        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
5780        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
5781      fi
5782    done
5783  fi
5784
5785    fi
5786
5787else
5788
5789    apu_have_nss=0
5790
5791fi
5792
5793
5794
5795
5796      if test "$apu_have_nss" = "1"; then
5797
5798  if test "x$LDADD_crypto_nss" = "x"; then
5799    test "x$silent" != "xyes" && echo "  setting LDADD_crypto_nss to \"$nss_LDFLAGS -lnspr4 -lnss3\""
5800    LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3"
5801  else
5802    apr_addto_bugger="$nss_LDFLAGS -lnspr4 -lnss3"
5803    for i in $apr_addto_bugger; do
5804      apr_addto_duplicate="0"
5805      for j in $LDADD_crypto_nss; do
5806        if test "x$i" = "x$j"; then
5807          apr_addto_duplicate="1"
5808          break
5809        fi
5810      done
5811      if test $apr_addto_duplicate = "0"; then
5812        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_crypto_nss"
5813        LDADD_crypto_nss="$LDADD_crypto_nss $i"
5814      fi
5815    done
5816  fi
5817
5818    apu_have_crypto=1
5819  fi
5820
5821
5822
5823  LIBS="$old_libs"
5824  CPPFLAGS="$old_cppflags"
5825  LDFLAGS="$old_ldflags"
5826
5827            if test "$apu_have_crypto" = "0"; then
5828        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, etc." "$LINENO" 5
5829      fi
5830    fi
5831
5832else
5833
5834      apu_have_crypto=0
5835
5836fi
5837
5838
5839
5840
5841
5842
5843
5844echo $ac_n "${nl}checking for ldap support..."
5845
5846apu_has_ldap="0";
5847apu_has_ldapssl_client_init="0"
5848apu_has_ldapssl_client_deinit="0"
5849apu_has_ldapssl_add_trusted_cert="0"
5850apu_has_ldap_start_tls_s="0"
5851apu_has_ldapssl_init="0"
5852apu_has_ldap_sslinit="0"
5853apu_has_ldapssl_install_routines="0"
5854apu_has_ldap_openldap="0"
5855apu_has_ldap_solaris="0"
5856apu_has_ldap_novell="0"
5857apu_has_ldap_microsoft="0"
5858apu_has_ldap_netscape="0"
5859apu_has_ldap_mozilla="0"
5860apu_has_ldap_tivoli="0"
5861apu_has_ldap_zos="0"
5862apu_has_ldap_other="0"
5863LDADD_ldap_found=""
5864
5865
5866# Check whether --with-lber was given.
5867if test "${with_lber+set}" = set; then :
5868  withval=$with_lber;
5869    if test "$withval" = "yes"; then
5870      apu_liblber_name="lber"
5871    else
5872      apu_liblber_name="$withval"
5873    fi
5874
5875else
5876
5877    apu_liblber_name="lber"
5878
5879fi
5880
5881
5882
5883# Check whether --with-ldap-include was given.
5884if test "${with_ldap_include+set}" = set; then :
5885  withval=$with_ldap_include;
5886fi
5887
5888
5889# Check whether --with-ldap-lib was given.
5890if test "${with_ldap_lib+set}" = set; then :
5891  withval=$with_ldap_lib;
5892fi
5893
5894
5895# Check whether --with-ldap was given.
5896if test "${with_ldap+set}" = set; then :
5897  withval=$with_ldap;
5898    if test "$with_ldap" != "no"; then
5899      save_cppflags="$CPPFLAGS"
5900      save_ldflags="$LDFLAGS"
5901      save_libs="$LIBS"
5902      if test -n "$with_ldap_include"; then
5903        CPPFLAGS="$CPPFLAGS -I$with_ldap_include"
5904
5905  if test "x$APRUTIL_INCLUDES" = "x"; then
5906    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$with_ldap_include\""
5907    APRUTIL_INCLUDES="-I$with_ldap_include"
5908  else
5909    apr_addto_bugger="-I$with_ldap_include"
5910    for i in $apr_addto_bugger; do
5911      apr_addto_duplicate="0"
5912      for j in $APRUTIL_INCLUDES; do
5913        if test "x$i" = "x$j"; then
5914          apr_addto_duplicate="1"
5915          break
5916        fi
5917      done
5918      if test $apr_addto_duplicate = "0"; then
5919        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5920        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5921      fi
5922    done
5923  fi
5924
5925      fi
5926      if test -n "$with_ldap_lib"; then
5927        LDFLAGS="$LDFLAGS -L$with_ldap_lib"
5928
5929  if test "x$APRUTIL_LDFLAGS" = "x"; then
5930    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$with_ldap_lib\""
5931    APRUTIL_LDFLAGS="-L$with_ldap_lib"
5932  else
5933    apr_addto_bugger="-L$with_ldap_lib"
5934    for i in $apr_addto_bugger; do
5935      apr_addto_duplicate="0"
5936      for j in $APRUTIL_LDFLAGS; do
5937        if test "x$i" = "x$j"; then
5938          apr_addto_duplicate="1"
5939          break
5940        fi
5941      done
5942      if test $apr_addto_duplicate = "0"; then
5943        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5944        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5945      fi
5946    done
5947  fi
5948
5949      fi
5950
5951      LIBLDAP="$withval"
5952      if test "$LIBLDAP" = "yes"; then
5953
5954  if test ${apu_has_ldap} != "1"; then
5955    ldaplib="ldap50"
5956    extralib="-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50"
5957    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
5958
5959    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
5960
5961    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
5962    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
5963    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
5965$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
5966if eval \${$as_ac_Lib+:} false; then :
5967  $as_echo_n "(cached) " >&6
5968else
5969  ac_check_lib_save_LIBS=$LIBS
5970LIBS="-l${ldaplib} ${extralib} $LIBS"
5971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5972/* end confdefs.h.  */
5973
5974/* Override any GCC internal prototype to avoid an error.
5975   Use char because int might match the return type of a GCC
5976   builtin and then its argument prototype would still apply.  */
5977#ifdef __cplusplus
5978extern "C"
5979#endif
5980char ldap_init ();
5981int
5982main ()
5983{
5984return ldap_init ();
5985  ;
5986  return 0;
5987}
5988_ACEOF
5989if ac_fn_c_try_link "$LINENO"; then :
5990  eval "$as_ac_Lib=yes"
5991else
5992  eval "$as_ac_Lib=no"
5993fi
5994rm -f core conftest.err conftest.$ac_objext \
5995    conftest$ac_exeext conftest.$ac_ext
5996LIBS=$ac_check_lib_save_LIBS
5997fi
5998eval ac_res=\$$as_ac_Lib
5999	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6000$as_echo "$ac_res" >&6; }
6001if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6002
6003        LDADD_ldap_found="-l${ldaplib} ${extralib}"
6004        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6006$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6007if eval \${$as_ac_Lib+:} false; then :
6008  $as_echo_n "(cached) " >&6
6009else
6010  ac_check_lib_save_LIBS=$LIBS
6011LIBS="-l${ldaplib} ${extralib} $LIBS"
6012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6013/* end confdefs.h.  */
6014
6015/* Override any GCC internal prototype to avoid an error.
6016   Use char because int might match the return type of a GCC
6017   builtin and then its argument prototype would still apply.  */
6018#ifdef __cplusplus
6019extern "C"
6020#endif
6021char ldapssl_client_init ();
6022int
6023main ()
6024{
6025return ldapssl_client_init ();
6026  ;
6027  return 0;
6028}
6029_ACEOF
6030if ac_fn_c_try_link "$LINENO"; then :
6031  eval "$as_ac_Lib=yes"
6032else
6033  eval "$as_ac_Lib=no"
6034fi
6035rm -f core conftest.err conftest.$ac_objext \
6036    conftest$ac_exeext conftest.$ac_ext
6037LIBS=$ac_check_lib_save_LIBS
6038fi
6039eval ac_res=\$$as_ac_Lib
6040	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6041$as_echo "$ac_res" >&6; }
6042if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6043  apu_has_ldapssl_client_init="1"
6044fi
6045
6046        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6048$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6049if eval \${$as_ac_Lib+:} false; then :
6050  $as_echo_n "(cached) " >&6
6051else
6052  ac_check_lib_save_LIBS=$LIBS
6053LIBS="-l${ldaplib} ${extralib} $LIBS"
6054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6055/* end confdefs.h.  */
6056
6057/* Override any GCC internal prototype to avoid an error.
6058   Use char because int might match the return type of a GCC
6059   builtin and then its argument prototype would still apply.  */
6060#ifdef __cplusplus
6061extern "C"
6062#endif
6063char ldapssl_client_deinit ();
6064int
6065main ()
6066{
6067return ldapssl_client_deinit ();
6068  ;
6069  return 0;
6070}
6071_ACEOF
6072if ac_fn_c_try_link "$LINENO"; then :
6073  eval "$as_ac_Lib=yes"
6074else
6075  eval "$as_ac_Lib=no"
6076fi
6077rm -f core conftest.err conftest.$ac_objext \
6078    conftest$ac_exeext conftest.$ac_ext
6079LIBS=$ac_check_lib_save_LIBS
6080fi
6081eval ac_res=\$$as_ac_Lib
6082	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6083$as_echo "$ac_res" >&6; }
6084if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6085  apu_has_ldapssl_client_deinit="1"
6086fi
6087
6088        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6090$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6091if eval \${$as_ac_Lib+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  ac_check_lib_save_LIBS=$LIBS
6095LIBS="-l${ldaplib} ${extralib} $LIBS"
6096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097/* end confdefs.h.  */
6098
6099/* Override any GCC internal prototype to avoid an error.
6100   Use char because int might match the return type of a GCC
6101   builtin and then its argument prototype would still apply.  */
6102#ifdef __cplusplus
6103extern "C"
6104#endif
6105char ldapssl_add_trusted_cert ();
6106int
6107main ()
6108{
6109return ldapssl_add_trusted_cert ();
6110  ;
6111  return 0;
6112}
6113_ACEOF
6114if ac_fn_c_try_link "$LINENO"; then :
6115  eval "$as_ac_Lib=yes"
6116else
6117  eval "$as_ac_Lib=no"
6118fi
6119rm -f core conftest.err conftest.$ac_objext \
6120    conftest$ac_exeext conftest.$ac_ext
6121LIBS=$ac_check_lib_save_LIBS
6122fi
6123eval ac_res=\$$as_ac_Lib
6124	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6125$as_echo "$ac_res" >&6; }
6126if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6127  apu_has_ldapssl_add_trusted_cert="1"
6128fi
6129
6130        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6132$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6133if eval \${$as_ac_Lib+:} false; then :
6134  $as_echo_n "(cached) " >&6
6135else
6136  ac_check_lib_save_LIBS=$LIBS
6137LIBS="-l${ldaplib} ${extralib} $LIBS"
6138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6139/* end confdefs.h.  */
6140
6141/* Override any GCC internal prototype to avoid an error.
6142   Use char because int might match the return type of a GCC
6143   builtin and then its argument prototype would still apply.  */
6144#ifdef __cplusplus
6145extern "C"
6146#endif
6147char ldap_start_tls_s ();
6148int
6149main ()
6150{
6151return ldap_start_tls_s ();
6152  ;
6153  return 0;
6154}
6155_ACEOF
6156if ac_fn_c_try_link "$LINENO"; then :
6157  eval "$as_ac_Lib=yes"
6158else
6159  eval "$as_ac_Lib=no"
6160fi
6161rm -f core conftest.err conftest.$ac_objext \
6162    conftest$ac_exeext conftest.$ac_ext
6163LIBS=$ac_check_lib_save_LIBS
6164fi
6165eval ac_res=\$$as_ac_Lib
6166	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6167$as_echo "$ac_res" >&6; }
6168if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6169  apu_has_ldap_start_tls_s="1"
6170fi
6171
6172        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6174$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6175if eval \${$as_ac_Lib+:} false; then :
6176  $as_echo_n "(cached) " >&6
6177else
6178  ac_check_lib_save_LIBS=$LIBS
6179LIBS="-l${ldaplib} ${extralib} $LIBS"
6180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6181/* end confdefs.h.  */
6182
6183/* Override any GCC internal prototype to avoid an error.
6184   Use char because int might match the return type of a GCC
6185   builtin and then its argument prototype would still apply.  */
6186#ifdef __cplusplus
6187extern "C"
6188#endif
6189char ldap_sslinit ();
6190int
6191main ()
6192{
6193return ldap_sslinit ();
6194  ;
6195  return 0;
6196}
6197_ACEOF
6198if ac_fn_c_try_link "$LINENO"; then :
6199  eval "$as_ac_Lib=yes"
6200else
6201  eval "$as_ac_Lib=no"
6202fi
6203rm -f core conftest.err conftest.$ac_objext \
6204    conftest$ac_exeext conftest.$ac_ext
6205LIBS=$ac_check_lib_save_LIBS
6206fi
6207eval ac_res=\$$as_ac_Lib
6208	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6209$as_echo "$ac_res" >&6; }
6210if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6211  apu_has_ldap_sslinit="1"
6212fi
6213
6214        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6216$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6217if eval \${$as_ac_Lib+:} false; then :
6218  $as_echo_n "(cached) " >&6
6219else
6220  ac_check_lib_save_LIBS=$LIBS
6221LIBS="-l${ldaplib} ${extralib} $LIBS"
6222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6223/* end confdefs.h.  */
6224
6225/* Override any GCC internal prototype to avoid an error.
6226   Use char because int might match the return type of a GCC
6227   builtin and then its argument prototype would still apply.  */
6228#ifdef __cplusplus
6229extern "C"
6230#endif
6231char ldapssl_init ();
6232int
6233main ()
6234{
6235return ldapssl_init ();
6236  ;
6237  return 0;
6238}
6239_ACEOF
6240if ac_fn_c_try_link "$LINENO"; then :
6241  eval "$as_ac_Lib=yes"
6242else
6243  eval "$as_ac_Lib=no"
6244fi
6245rm -f core conftest.err conftest.$ac_objext \
6246    conftest$ac_exeext conftest.$ac_ext
6247LIBS=$ac_check_lib_save_LIBS
6248fi
6249eval ac_res=\$$as_ac_Lib
6250	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6251$as_echo "$ac_res" >&6; }
6252if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6253  apu_has_ldapssl_init="1"
6254fi
6255
6256        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6258$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6259if eval \${$as_ac_Lib+:} false; then :
6260  $as_echo_n "(cached) " >&6
6261else
6262  ac_check_lib_save_LIBS=$LIBS
6263LIBS="-l${ldaplib} ${extralib} $LIBS"
6264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6265/* end confdefs.h.  */
6266
6267/* Override any GCC internal prototype to avoid an error.
6268   Use char because int might match the return type of a GCC
6269   builtin and then its argument prototype would still apply.  */
6270#ifdef __cplusplus
6271extern "C"
6272#endif
6273char ldapssl_install_routines ();
6274int
6275main ()
6276{
6277return ldapssl_install_routines ();
6278  ;
6279  return 0;
6280}
6281_ACEOF
6282if ac_fn_c_try_link "$LINENO"; then :
6283  eval "$as_ac_Lib=yes"
6284else
6285  eval "$as_ac_Lib=no"
6286fi
6287rm -f core conftest.err conftest.$ac_objext \
6288    conftest$ac_exeext conftest.$ac_ext
6289LIBS=$ac_check_lib_save_LIBS
6290fi
6291eval ac_res=\$$as_ac_Lib
6292	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6293$as_echo "$ac_res" >&6; }
6294if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6295  apu_has_ldapssl_install_routines="1"
6296fi
6297
6298        apu_has_ldap="1";
6299
6300fi
6301
6302  fi
6303
6304
6305  if test ${apu_has_ldap} != "1"; then
6306    ldaplib="ldapssl41"
6307    extralib="-lnspr3 -lplc3 -lplds3"
6308    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6309
6310    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6311
6312    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6313    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6314    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6316$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6317if eval \${$as_ac_Lib+:} false; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  ac_check_lib_save_LIBS=$LIBS
6321LIBS="-l${ldaplib} ${extralib} $LIBS"
6322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6323/* end confdefs.h.  */
6324
6325/* Override any GCC internal prototype to avoid an error.
6326   Use char because int might match the return type of a GCC
6327   builtin and then its argument prototype would still apply.  */
6328#ifdef __cplusplus
6329extern "C"
6330#endif
6331char ldap_init ();
6332int
6333main ()
6334{
6335return ldap_init ();
6336  ;
6337  return 0;
6338}
6339_ACEOF
6340if ac_fn_c_try_link "$LINENO"; then :
6341  eval "$as_ac_Lib=yes"
6342else
6343  eval "$as_ac_Lib=no"
6344fi
6345rm -f core conftest.err conftest.$ac_objext \
6346    conftest$ac_exeext conftest.$ac_ext
6347LIBS=$ac_check_lib_save_LIBS
6348fi
6349eval ac_res=\$$as_ac_Lib
6350	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6351$as_echo "$ac_res" >&6; }
6352if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6353
6354        LDADD_ldap_found="-l${ldaplib} ${extralib}"
6355        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6357$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6358if eval \${$as_ac_Lib+:} false; then :
6359  $as_echo_n "(cached) " >&6
6360else
6361  ac_check_lib_save_LIBS=$LIBS
6362LIBS="-l${ldaplib} ${extralib} $LIBS"
6363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6364/* end confdefs.h.  */
6365
6366/* Override any GCC internal prototype to avoid an error.
6367   Use char because int might match the return type of a GCC
6368   builtin and then its argument prototype would still apply.  */
6369#ifdef __cplusplus
6370extern "C"
6371#endif
6372char ldapssl_client_init ();
6373int
6374main ()
6375{
6376return ldapssl_client_init ();
6377  ;
6378  return 0;
6379}
6380_ACEOF
6381if ac_fn_c_try_link "$LINENO"; then :
6382  eval "$as_ac_Lib=yes"
6383else
6384  eval "$as_ac_Lib=no"
6385fi
6386rm -f core conftest.err conftest.$ac_objext \
6387    conftest$ac_exeext conftest.$ac_ext
6388LIBS=$ac_check_lib_save_LIBS
6389fi
6390eval ac_res=\$$as_ac_Lib
6391	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6392$as_echo "$ac_res" >&6; }
6393if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6394  apu_has_ldapssl_client_init="1"
6395fi
6396
6397        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6399$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6400if eval \${$as_ac_Lib+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  ac_check_lib_save_LIBS=$LIBS
6404LIBS="-l${ldaplib} ${extralib} $LIBS"
6405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6406/* end confdefs.h.  */
6407
6408/* Override any GCC internal prototype to avoid an error.
6409   Use char because int might match the return type of a GCC
6410   builtin and then its argument prototype would still apply.  */
6411#ifdef __cplusplus
6412extern "C"
6413#endif
6414char ldapssl_client_deinit ();
6415int
6416main ()
6417{
6418return ldapssl_client_deinit ();
6419  ;
6420  return 0;
6421}
6422_ACEOF
6423if ac_fn_c_try_link "$LINENO"; then :
6424  eval "$as_ac_Lib=yes"
6425else
6426  eval "$as_ac_Lib=no"
6427fi
6428rm -f core conftest.err conftest.$ac_objext \
6429    conftest$ac_exeext conftest.$ac_ext
6430LIBS=$ac_check_lib_save_LIBS
6431fi
6432eval ac_res=\$$as_ac_Lib
6433	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6434$as_echo "$ac_res" >&6; }
6435if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6436  apu_has_ldapssl_client_deinit="1"
6437fi
6438
6439        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6441$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6442if eval \${$as_ac_Lib+:} false; then :
6443  $as_echo_n "(cached) " >&6
6444else
6445  ac_check_lib_save_LIBS=$LIBS
6446LIBS="-l${ldaplib} ${extralib} $LIBS"
6447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448/* end confdefs.h.  */
6449
6450/* Override any GCC internal prototype to avoid an error.
6451   Use char because int might match the return type of a GCC
6452   builtin and then its argument prototype would still apply.  */
6453#ifdef __cplusplus
6454extern "C"
6455#endif
6456char ldapssl_add_trusted_cert ();
6457int
6458main ()
6459{
6460return ldapssl_add_trusted_cert ();
6461  ;
6462  return 0;
6463}
6464_ACEOF
6465if ac_fn_c_try_link "$LINENO"; then :
6466  eval "$as_ac_Lib=yes"
6467else
6468  eval "$as_ac_Lib=no"
6469fi
6470rm -f core conftest.err conftest.$ac_objext \
6471    conftest$ac_exeext conftest.$ac_ext
6472LIBS=$ac_check_lib_save_LIBS
6473fi
6474eval ac_res=\$$as_ac_Lib
6475	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6476$as_echo "$ac_res" >&6; }
6477if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6478  apu_has_ldapssl_add_trusted_cert="1"
6479fi
6480
6481        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6483$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6484if eval \${$as_ac_Lib+:} false; then :
6485  $as_echo_n "(cached) " >&6
6486else
6487  ac_check_lib_save_LIBS=$LIBS
6488LIBS="-l${ldaplib} ${extralib} $LIBS"
6489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6490/* end confdefs.h.  */
6491
6492/* Override any GCC internal prototype to avoid an error.
6493   Use char because int might match the return type of a GCC
6494   builtin and then its argument prototype would still apply.  */
6495#ifdef __cplusplus
6496extern "C"
6497#endif
6498char ldap_start_tls_s ();
6499int
6500main ()
6501{
6502return ldap_start_tls_s ();
6503  ;
6504  return 0;
6505}
6506_ACEOF
6507if ac_fn_c_try_link "$LINENO"; then :
6508  eval "$as_ac_Lib=yes"
6509else
6510  eval "$as_ac_Lib=no"
6511fi
6512rm -f core conftest.err conftest.$ac_objext \
6513    conftest$ac_exeext conftest.$ac_ext
6514LIBS=$ac_check_lib_save_LIBS
6515fi
6516eval ac_res=\$$as_ac_Lib
6517	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6518$as_echo "$ac_res" >&6; }
6519if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6520  apu_has_ldap_start_tls_s="1"
6521fi
6522
6523        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6525$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6526if eval \${$as_ac_Lib+:} false; then :
6527  $as_echo_n "(cached) " >&6
6528else
6529  ac_check_lib_save_LIBS=$LIBS
6530LIBS="-l${ldaplib} ${extralib} $LIBS"
6531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6532/* end confdefs.h.  */
6533
6534/* Override any GCC internal prototype to avoid an error.
6535   Use char because int might match the return type of a GCC
6536   builtin and then its argument prototype would still apply.  */
6537#ifdef __cplusplus
6538extern "C"
6539#endif
6540char ldap_sslinit ();
6541int
6542main ()
6543{
6544return ldap_sslinit ();
6545  ;
6546  return 0;
6547}
6548_ACEOF
6549if ac_fn_c_try_link "$LINENO"; then :
6550  eval "$as_ac_Lib=yes"
6551else
6552  eval "$as_ac_Lib=no"
6553fi
6554rm -f core conftest.err conftest.$ac_objext \
6555    conftest$ac_exeext conftest.$ac_ext
6556LIBS=$ac_check_lib_save_LIBS
6557fi
6558eval ac_res=\$$as_ac_Lib
6559	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6560$as_echo "$ac_res" >&6; }
6561if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6562  apu_has_ldap_sslinit="1"
6563fi
6564
6565        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6567$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6568if eval \${$as_ac_Lib+:} false; then :
6569  $as_echo_n "(cached) " >&6
6570else
6571  ac_check_lib_save_LIBS=$LIBS
6572LIBS="-l${ldaplib} ${extralib} $LIBS"
6573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6574/* end confdefs.h.  */
6575
6576/* Override any GCC internal prototype to avoid an error.
6577   Use char because int might match the return type of a GCC
6578   builtin and then its argument prototype would still apply.  */
6579#ifdef __cplusplus
6580extern "C"
6581#endif
6582char ldapssl_init ();
6583int
6584main ()
6585{
6586return ldapssl_init ();
6587  ;
6588  return 0;
6589}
6590_ACEOF
6591if ac_fn_c_try_link "$LINENO"; then :
6592  eval "$as_ac_Lib=yes"
6593else
6594  eval "$as_ac_Lib=no"
6595fi
6596rm -f core conftest.err conftest.$ac_objext \
6597    conftest$ac_exeext conftest.$ac_ext
6598LIBS=$ac_check_lib_save_LIBS
6599fi
6600eval ac_res=\$$as_ac_Lib
6601	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6602$as_echo "$ac_res" >&6; }
6603if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6604  apu_has_ldapssl_init="1"
6605fi
6606
6607        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6609$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6610if eval \${$as_ac_Lib+:} false; then :
6611  $as_echo_n "(cached) " >&6
6612else
6613  ac_check_lib_save_LIBS=$LIBS
6614LIBS="-l${ldaplib} ${extralib} $LIBS"
6615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6616/* end confdefs.h.  */
6617
6618/* Override any GCC internal prototype to avoid an error.
6619   Use char because int might match the return type of a GCC
6620   builtin and then its argument prototype would still apply.  */
6621#ifdef __cplusplus
6622extern "C"
6623#endif
6624char ldapssl_install_routines ();
6625int
6626main ()
6627{
6628return ldapssl_install_routines ();
6629  ;
6630  return 0;
6631}
6632_ACEOF
6633if ac_fn_c_try_link "$LINENO"; then :
6634  eval "$as_ac_Lib=yes"
6635else
6636  eval "$as_ac_Lib=no"
6637fi
6638rm -f core conftest.err conftest.$ac_objext \
6639    conftest$ac_exeext conftest.$ac_ext
6640LIBS=$ac_check_lib_save_LIBS
6641fi
6642eval ac_res=\$$as_ac_Lib
6643	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6644$as_echo "$ac_res" >&6; }
6645if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6646  apu_has_ldapssl_install_routines="1"
6647fi
6648
6649        apu_has_ldap="1";
6650
6651fi
6652
6653  fi
6654
6655
6656  if test ${apu_has_ldap} != "1"; then
6657    ldaplib="ldapssl40"
6658    extralib=
6659    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6660
6661    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6662
6663    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6664    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6665    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6667$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6668if eval \${$as_ac_Lib+:} false; then :
6669  $as_echo_n "(cached) " >&6
6670else
6671  ac_check_lib_save_LIBS=$LIBS
6672LIBS="-l${ldaplib} ${extralib} $LIBS"
6673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674/* end confdefs.h.  */
6675
6676/* Override any GCC internal prototype to avoid an error.
6677   Use char because int might match the return type of a GCC
6678   builtin and then its argument prototype would still apply.  */
6679#ifdef __cplusplus
6680extern "C"
6681#endif
6682char ldap_init ();
6683int
6684main ()
6685{
6686return ldap_init ();
6687  ;
6688  return 0;
6689}
6690_ACEOF
6691if ac_fn_c_try_link "$LINENO"; then :
6692  eval "$as_ac_Lib=yes"
6693else
6694  eval "$as_ac_Lib=no"
6695fi
6696rm -f core conftest.err conftest.$ac_objext \
6697    conftest$ac_exeext conftest.$ac_ext
6698LIBS=$ac_check_lib_save_LIBS
6699fi
6700eval ac_res=\$$as_ac_Lib
6701	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6702$as_echo "$ac_res" >&6; }
6703if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6704
6705        LDADD_ldap_found="-l${ldaplib} ${extralib}"
6706        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6708$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6709if eval \${$as_ac_Lib+:} false; then :
6710  $as_echo_n "(cached) " >&6
6711else
6712  ac_check_lib_save_LIBS=$LIBS
6713LIBS="-l${ldaplib} ${extralib} $LIBS"
6714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6715/* end confdefs.h.  */
6716
6717/* Override any GCC internal prototype to avoid an error.
6718   Use char because int might match the return type of a GCC
6719   builtin and then its argument prototype would still apply.  */
6720#ifdef __cplusplus
6721extern "C"
6722#endif
6723char ldapssl_client_init ();
6724int
6725main ()
6726{
6727return ldapssl_client_init ();
6728  ;
6729  return 0;
6730}
6731_ACEOF
6732if ac_fn_c_try_link "$LINENO"; then :
6733  eval "$as_ac_Lib=yes"
6734else
6735  eval "$as_ac_Lib=no"
6736fi
6737rm -f core conftest.err conftest.$ac_objext \
6738    conftest$ac_exeext conftest.$ac_ext
6739LIBS=$ac_check_lib_save_LIBS
6740fi
6741eval ac_res=\$$as_ac_Lib
6742	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6743$as_echo "$ac_res" >&6; }
6744if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6745  apu_has_ldapssl_client_init="1"
6746fi
6747
6748        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6750$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6751if eval \${$as_ac_Lib+:} false; then :
6752  $as_echo_n "(cached) " >&6
6753else
6754  ac_check_lib_save_LIBS=$LIBS
6755LIBS="-l${ldaplib} ${extralib} $LIBS"
6756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6757/* end confdefs.h.  */
6758
6759/* Override any GCC internal prototype to avoid an error.
6760   Use char because int might match the return type of a GCC
6761   builtin and then its argument prototype would still apply.  */
6762#ifdef __cplusplus
6763extern "C"
6764#endif
6765char ldapssl_client_deinit ();
6766int
6767main ()
6768{
6769return ldapssl_client_deinit ();
6770  ;
6771  return 0;
6772}
6773_ACEOF
6774if ac_fn_c_try_link "$LINENO"; then :
6775  eval "$as_ac_Lib=yes"
6776else
6777  eval "$as_ac_Lib=no"
6778fi
6779rm -f core conftest.err conftest.$ac_objext \
6780    conftest$ac_exeext conftest.$ac_ext
6781LIBS=$ac_check_lib_save_LIBS
6782fi
6783eval ac_res=\$$as_ac_Lib
6784	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6785$as_echo "$ac_res" >&6; }
6786if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6787  apu_has_ldapssl_client_deinit="1"
6788fi
6789
6790        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6792$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6793if eval \${$as_ac_Lib+:} false; then :
6794  $as_echo_n "(cached) " >&6
6795else
6796  ac_check_lib_save_LIBS=$LIBS
6797LIBS="-l${ldaplib} ${extralib} $LIBS"
6798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6799/* end confdefs.h.  */
6800
6801/* Override any GCC internal prototype to avoid an error.
6802   Use char because int might match the return type of a GCC
6803   builtin and then its argument prototype would still apply.  */
6804#ifdef __cplusplus
6805extern "C"
6806#endif
6807char ldapssl_add_trusted_cert ();
6808int
6809main ()
6810{
6811return ldapssl_add_trusted_cert ();
6812  ;
6813  return 0;
6814}
6815_ACEOF
6816if ac_fn_c_try_link "$LINENO"; then :
6817  eval "$as_ac_Lib=yes"
6818else
6819  eval "$as_ac_Lib=no"
6820fi
6821rm -f core conftest.err conftest.$ac_objext \
6822    conftest$ac_exeext conftest.$ac_ext
6823LIBS=$ac_check_lib_save_LIBS
6824fi
6825eval ac_res=\$$as_ac_Lib
6826	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6827$as_echo "$ac_res" >&6; }
6828if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6829  apu_has_ldapssl_add_trusted_cert="1"
6830fi
6831
6832        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6834$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6835if eval \${$as_ac_Lib+:} false; then :
6836  $as_echo_n "(cached) " >&6
6837else
6838  ac_check_lib_save_LIBS=$LIBS
6839LIBS="-l${ldaplib} ${extralib} $LIBS"
6840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6841/* end confdefs.h.  */
6842
6843/* Override any GCC internal prototype to avoid an error.
6844   Use char because int might match the return type of a GCC
6845   builtin and then its argument prototype would still apply.  */
6846#ifdef __cplusplus
6847extern "C"
6848#endif
6849char ldap_start_tls_s ();
6850int
6851main ()
6852{
6853return ldap_start_tls_s ();
6854  ;
6855  return 0;
6856}
6857_ACEOF
6858if ac_fn_c_try_link "$LINENO"; then :
6859  eval "$as_ac_Lib=yes"
6860else
6861  eval "$as_ac_Lib=no"
6862fi
6863rm -f core conftest.err conftest.$ac_objext \
6864    conftest$ac_exeext conftest.$ac_ext
6865LIBS=$ac_check_lib_save_LIBS
6866fi
6867eval ac_res=\$$as_ac_Lib
6868	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6869$as_echo "$ac_res" >&6; }
6870if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6871  apu_has_ldap_start_tls_s="1"
6872fi
6873
6874        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6876$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6877if eval \${$as_ac_Lib+:} false; then :
6878  $as_echo_n "(cached) " >&6
6879else
6880  ac_check_lib_save_LIBS=$LIBS
6881LIBS="-l${ldaplib} ${extralib} $LIBS"
6882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6883/* end confdefs.h.  */
6884
6885/* Override any GCC internal prototype to avoid an error.
6886   Use char because int might match the return type of a GCC
6887   builtin and then its argument prototype would still apply.  */
6888#ifdef __cplusplus
6889extern "C"
6890#endif
6891char ldap_sslinit ();
6892int
6893main ()
6894{
6895return ldap_sslinit ();
6896  ;
6897  return 0;
6898}
6899_ACEOF
6900if ac_fn_c_try_link "$LINENO"; then :
6901  eval "$as_ac_Lib=yes"
6902else
6903  eval "$as_ac_Lib=no"
6904fi
6905rm -f core conftest.err conftest.$ac_objext \
6906    conftest$ac_exeext conftest.$ac_ext
6907LIBS=$ac_check_lib_save_LIBS
6908fi
6909eval ac_res=\$$as_ac_Lib
6910	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6911$as_echo "$ac_res" >&6; }
6912if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6913  apu_has_ldap_sslinit="1"
6914fi
6915
6916        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6918$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6919if eval \${$as_ac_Lib+:} false; then :
6920  $as_echo_n "(cached) " >&6
6921else
6922  ac_check_lib_save_LIBS=$LIBS
6923LIBS="-l${ldaplib} ${extralib} $LIBS"
6924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925/* end confdefs.h.  */
6926
6927/* Override any GCC internal prototype to avoid an error.
6928   Use char because int might match the return type of a GCC
6929   builtin and then its argument prototype would still apply.  */
6930#ifdef __cplusplus
6931extern "C"
6932#endif
6933char ldapssl_init ();
6934int
6935main ()
6936{
6937return ldapssl_init ();
6938  ;
6939  return 0;
6940}
6941_ACEOF
6942if ac_fn_c_try_link "$LINENO"; then :
6943  eval "$as_ac_Lib=yes"
6944else
6945  eval "$as_ac_Lib=no"
6946fi
6947rm -f core conftest.err conftest.$ac_objext \
6948    conftest$ac_exeext conftest.$ac_ext
6949LIBS=$ac_check_lib_save_LIBS
6950fi
6951eval ac_res=\$$as_ac_Lib
6952	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6953$as_echo "$ac_res" >&6; }
6954if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6955  apu_has_ldapssl_init="1"
6956fi
6957
6958        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6960$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6961if eval \${$as_ac_Lib+:} false; then :
6962  $as_echo_n "(cached) " >&6
6963else
6964  ac_check_lib_save_LIBS=$LIBS
6965LIBS="-l${ldaplib} ${extralib} $LIBS"
6966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967/* end confdefs.h.  */
6968
6969/* Override any GCC internal prototype to avoid an error.
6970   Use char because int might match the return type of a GCC
6971   builtin and then its argument prototype would still apply.  */
6972#ifdef __cplusplus
6973extern "C"
6974#endif
6975char ldapssl_install_routines ();
6976int
6977main ()
6978{
6979return ldapssl_install_routines ();
6980  ;
6981  return 0;
6982}
6983_ACEOF
6984if ac_fn_c_try_link "$LINENO"; then :
6985  eval "$as_ac_Lib=yes"
6986else
6987  eval "$as_ac_Lib=no"
6988fi
6989rm -f core conftest.err conftest.$ac_objext \
6990    conftest$ac_exeext conftest.$ac_ext
6991LIBS=$ac_check_lib_save_LIBS
6992fi
6993eval ac_res=\$$as_ac_Lib
6994	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6995$as_echo "$ac_res" >&6; }
6996if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6997  apu_has_ldapssl_install_routines="1"
6998fi
6999
7000        apu_has_ldap="1";
7001
7002fi
7003
7004  fi
7005
7006
7007  if test ${apu_has_ldap} != "1"; then
7008    ldaplib="ldapssl30"
7009    extralib=
7010    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7011
7012    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7013
7014    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7015    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7016    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7018$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7019if eval \${$as_ac_Lib+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  ac_check_lib_save_LIBS=$LIBS
7023LIBS="-l${ldaplib} ${extralib} $LIBS"
7024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7025/* end confdefs.h.  */
7026
7027/* Override any GCC internal prototype to avoid an error.
7028   Use char because int might match the return type of a GCC
7029   builtin and then its argument prototype would still apply.  */
7030#ifdef __cplusplus
7031extern "C"
7032#endif
7033char ldap_init ();
7034int
7035main ()
7036{
7037return ldap_init ();
7038  ;
7039  return 0;
7040}
7041_ACEOF
7042if ac_fn_c_try_link "$LINENO"; then :
7043  eval "$as_ac_Lib=yes"
7044else
7045  eval "$as_ac_Lib=no"
7046fi
7047rm -f core conftest.err conftest.$ac_objext \
7048    conftest$ac_exeext conftest.$ac_ext
7049LIBS=$ac_check_lib_save_LIBS
7050fi
7051eval ac_res=\$$as_ac_Lib
7052	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7053$as_echo "$ac_res" >&6; }
7054if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7055
7056        LDADD_ldap_found="-l${ldaplib} ${extralib}"
7057        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7059$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7060if eval \${$as_ac_Lib+:} false; then :
7061  $as_echo_n "(cached) " >&6
7062else
7063  ac_check_lib_save_LIBS=$LIBS
7064LIBS="-l${ldaplib} ${extralib} $LIBS"
7065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7066/* end confdefs.h.  */
7067
7068/* Override any GCC internal prototype to avoid an error.
7069   Use char because int might match the return type of a GCC
7070   builtin and then its argument prototype would still apply.  */
7071#ifdef __cplusplus
7072extern "C"
7073#endif
7074char ldapssl_client_init ();
7075int
7076main ()
7077{
7078return ldapssl_client_init ();
7079  ;
7080  return 0;
7081}
7082_ACEOF
7083if ac_fn_c_try_link "$LINENO"; then :
7084  eval "$as_ac_Lib=yes"
7085else
7086  eval "$as_ac_Lib=no"
7087fi
7088rm -f core conftest.err conftest.$ac_objext \
7089    conftest$ac_exeext conftest.$ac_ext
7090LIBS=$ac_check_lib_save_LIBS
7091fi
7092eval ac_res=\$$as_ac_Lib
7093	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7094$as_echo "$ac_res" >&6; }
7095if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7096  apu_has_ldapssl_client_init="1"
7097fi
7098
7099        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7101$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7102if eval \${$as_ac_Lib+:} false; then :
7103  $as_echo_n "(cached) " >&6
7104else
7105  ac_check_lib_save_LIBS=$LIBS
7106LIBS="-l${ldaplib} ${extralib} $LIBS"
7107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7108/* end confdefs.h.  */
7109
7110/* Override any GCC internal prototype to avoid an error.
7111   Use char because int might match the return type of a GCC
7112   builtin and then its argument prototype would still apply.  */
7113#ifdef __cplusplus
7114extern "C"
7115#endif
7116char ldapssl_client_deinit ();
7117int
7118main ()
7119{
7120return ldapssl_client_deinit ();
7121  ;
7122  return 0;
7123}
7124_ACEOF
7125if ac_fn_c_try_link "$LINENO"; then :
7126  eval "$as_ac_Lib=yes"
7127else
7128  eval "$as_ac_Lib=no"
7129fi
7130rm -f core conftest.err conftest.$ac_objext \
7131    conftest$ac_exeext conftest.$ac_ext
7132LIBS=$ac_check_lib_save_LIBS
7133fi
7134eval ac_res=\$$as_ac_Lib
7135	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7136$as_echo "$ac_res" >&6; }
7137if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7138  apu_has_ldapssl_client_deinit="1"
7139fi
7140
7141        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7143$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7144if eval \${$as_ac_Lib+:} false; then :
7145  $as_echo_n "(cached) " >&6
7146else
7147  ac_check_lib_save_LIBS=$LIBS
7148LIBS="-l${ldaplib} ${extralib} $LIBS"
7149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150/* end confdefs.h.  */
7151
7152/* Override any GCC internal prototype to avoid an error.
7153   Use char because int might match the return type of a GCC
7154   builtin and then its argument prototype would still apply.  */
7155#ifdef __cplusplus
7156extern "C"
7157#endif
7158char ldapssl_add_trusted_cert ();
7159int
7160main ()
7161{
7162return ldapssl_add_trusted_cert ();
7163  ;
7164  return 0;
7165}
7166_ACEOF
7167if ac_fn_c_try_link "$LINENO"; then :
7168  eval "$as_ac_Lib=yes"
7169else
7170  eval "$as_ac_Lib=no"
7171fi
7172rm -f core conftest.err conftest.$ac_objext \
7173    conftest$ac_exeext conftest.$ac_ext
7174LIBS=$ac_check_lib_save_LIBS
7175fi
7176eval ac_res=\$$as_ac_Lib
7177	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7178$as_echo "$ac_res" >&6; }
7179if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7180  apu_has_ldapssl_add_trusted_cert="1"
7181fi
7182
7183        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7185$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7186if eval \${$as_ac_Lib+:} false; then :
7187  $as_echo_n "(cached) " >&6
7188else
7189  ac_check_lib_save_LIBS=$LIBS
7190LIBS="-l${ldaplib} ${extralib} $LIBS"
7191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h.  */
7193
7194/* Override any GCC internal prototype to avoid an error.
7195   Use char because int might match the return type of a GCC
7196   builtin and then its argument prototype would still apply.  */
7197#ifdef __cplusplus
7198extern "C"
7199#endif
7200char ldap_start_tls_s ();
7201int
7202main ()
7203{
7204return ldap_start_tls_s ();
7205  ;
7206  return 0;
7207}
7208_ACEOF
7209if ac_fn_c_try_link "$LINENO"; then :
7210  eval "$as_ac_Lib=yes"
7211else
7212  eval "$as_ac_Lib=no"
7213fi
7214rm -f core conftest.err conftest.$ac_objext \
7215    conftest$ac_exeext conftest.$ac_ext
7216LIBS=$ac_check_lib_save_LIBS
7217fi
7218eval ac_res=\$$as_ac_Lib
7219	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7220$as_echo "$ac_res" >&6; }
7221if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7222  apu_has_ldap_start_tls_s="1"
7223fi
7224
7225        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7227$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7228if eval \${$as_ac_Lib+:} false; then :
7229  $as_echo_n "(cached) " >&6
7230else
7231  ac_check_lib_save_LIBS=$LIBS
7232LIBS="-l${ldaplib} ${extralib} $LIBS"
7233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7234/* end confdefs.h.  */
7235
7236/* Override any GCC internal prototype to avoid an error.
7237   Use char because int might match the return type of a GCC
7238   builtin and then its argument prototype would still apply.  */
7239#ifdef __cplusplus
7240extern "C"
7241#endif
7242char ldap_sslinit ();
7243int
7244main ()
7245{
7246return ldap_sslinit ();
7247  ;
7248  return 0;
7249}
7250_ACEOF
7251if ac_fn_c_try_link "$LINENO"; then :
7252  eval "$as_ac_Lib=yes"
7253else
7254  eval "$as_ac_Lib=no"
7255fi
7256rm -f core conftest.err conftest.$ac_objext \
7257    conftest$ac_exeext conftest.$ac_ext
7258LIBS=$ac_check_lib_save_LIBS
7259fi
7260eval ac_res=\$$as_ac_Lib
7261	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7262$as_echo "$ac_res" >&6; }
7263if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7264  apu_has_ldap_sslinit="1"
7265fi
7266
7267        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7269$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7270if eval \${$as_ac_Lib+:} false; then :
7271  $as_echo_n "(cached) " >&6
7272else
7273  ac_check_lib_save_LIBS=$LIBS
7274LIBS="-l${ldaplib} ${extralib} $LIBS"
7275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7276/* end confdefs.h.  */
7277
7278/* Override any GCC internal prototype to avoid an error.
7279   Use char because int might match the return type of a GCC
7280   builtin and then its argument prototype would still apply.  */
7281#ifdef __cplusplus
7282extern "C"
7283#endif
7284char ldapssl_init ();
7285int
7286main ()
7287{
7288return ldapssl_init ();
7289  ;
7290  return 0;
7291}
7292_ACEOF
7293if ac_fn_c_try_link "$LINENO"; then :
7294  eval "$as_ac_Lib=yes"
7295else
7296  eval "$as_ac_Lib=no"
7297fi
7298rm -f core conftest.err conftest.$ac_objext \
7299    conftest$ac_exeext conftest.$ac_ext
7300LIBS=$ac_check_lib_save_LIBS
7301fi
7302eval ac_res=\$$as_ac_Lib
7303	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7304$as_echo "$ac_res" >&6; }
7305if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7306  apu_has_ldapssl_init="1"
7307fi
7308
7309        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7311$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7312if eval \${$as_ac_Lib+:} false; then :
7313  $as_echo_n "(cached) " >&6
7314else
7315  ac_check_lib_save_LIBS=$LIBS
7316LIBS="-l${ldaplib} ${extralib} $LIBS"
7317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7318/* end confdefs.h.  */
7319
7320/* Override any GCC internal prototype to avoid an error.
7321   Use char because int might match the return type of a GCC
7322   builtin and then its argument prototype would still apply.  */
7323#ifdef __cplusplus
7324extern "C"
7325#endif
7326char ldapssl_install_routines ();
7327int
7328main ()
7329{
7330return ldapssl_install_routines ();
7331  ;
7332  return 0;
7333}
7334_ACEOF
7335if ac_fn_c_try_link "$LINENO"; then :
7336  eval "$as_ac_Lib=yes"
7337else
7338  eval "$as_ac_Lib=no"
7339fi
7340rm -f core conftest.err conftest.$ac_objext \
7341    conftest$ac_exeext conftest.$ac_ext
7342LIBS=$ac_check_lib_save_LIBS
7343fi
7344eval ac_res=\$$as_ac_Lib
7345	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7346$as_echo "$ac_res" >&6; }
7347if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7348  apu_has_ldapssl_install_routines="1"
7349fi
7350
7351        apu_has_ldap="1";
7352
7353fi
7354
7355  fi
7356
7357
7358  if test ${apu_has_ldap} != "1"; then
7359    ldaplib="ldapssl20"
7360    extralib=
7361    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7362
7363    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7364
7365    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7366    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7367    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7369$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7370if eval \${$as_ac_Lib+:} false; then :
7371  $as_echo_n "(cached) " >&6
7372else
7373  ac_check_lib_save_LIBS=$LIBS
7374LIBS="-l${ldaplib} ${extralib} $LIBS"
7375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376/* end confdefs.h.  */
7377
7378/* Override any GCC internal prototype to avoid an error.
7379   Use char because int might match the return type of a GCC
7380   builtin and then its argument prototype would still apply.  */
7381#ifdef __cplusplus
7382extern "C"
7383#endif
7384char ldap_init ();
7385int
7386main ()
7387{
7388return ldap_init ();
7389  ;
7390  return 0;
7391}
7392_ACEOF
7393if ac_fn_c_try_link "$LINENO"; then :
7394  eval "$as_ac_Lib=yes"
7395else
7396  eval "$as_ac_Lib=no"
7397fi
7398rm -f core conftest.err conftest.$ac_objext \
7399    conftest$ac_exeext conftest.$ac_ext
7400LIBS=$ac_check_lib_save_LIBS
7401fi
7402eval ac_res=\$$as_ac_Lib
7403	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7404$as_echo "$ac_res" >&6; }
7405if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7406
7407        LDADD_ldap_found="-l${ldaplib} ${extralib}"
7408        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7410$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7411if eval \${$as_ac_Lib+:} false; then :
7412  $as_echo_n "(cached) " >&6
7413else
7414  ac_check_lib_save_LIBS=$LIBS
7415LIBS="-l${ldaplib} ${extralib} $LIBS"
7416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h.  */
7418
7419/* Override any GCC internal prototype to avoid an error.
7420   Use char because int might match the return type of a GCC
7421   builtin and then its argument prototype would still apply.  */
7422#ifdef __cplusplus
7423extern "C"
7424#endif
7425char ldapssl_client_init ();
7426int
7427main ()
7428{
7429return ldapssl_client_init ();
7430  ;
7431  return 0;
7432}
7433_ACEOF
7434if ac_fn_c_try_link "$LINENO"; then :
7435  eval "$as_ac_Lib=yes"
7436else
7437  eval "$as_ac_Lib=no"
7438fi
7439rm -f core conftest.err conftest.$ac_objext \
7440    conftest$ac_exeext conftest.$ac_ext
7441LIBS=$ac_check_lib_save_LIBS
7442fi
7443eval ac_res=\$$as_ac_Lib
7444	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7445$as_echo "$ac_res" >&6; }
7446if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7447  apu_has_ldapssl_client_init="1"
7448fi
7449
7450        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7452$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7453if eval \${$as_ac_Lib+:} false; then :
7454  $as_echo_n "(cached) " >&6
7455else
7456  ac_check_lib_save_LIBS=$LIBS
7457LIBS="-l${ldaplib} ${extralib} $LIBS"
7458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7459/* end confdefs.h.  */
7460
7461/* Override any GCC internal prototype to avoid an error.
7462   Use char because int might match the return type of a GCC
7463   builtin and then its argument prototype would still apply.  */
7464#ifdef __cplusplus
7465extern "C"
7466#endif
7467char ldapssl_client_deinit ();
7468int
7469main ()
7470{
7471return ldapssl_client_deinit ();
7472  ;
7473  return 0;
7474}
7475_ACEOF
7476if ac_fn_c_try_link "$LINENO"; then :
7477  eval "$as_ac_Lib=yes"
7478else
7479  eval "$as_ac_Lib=no"
7480fi
7481rm -f core conftest.err conftest.$ac_objext \
7482    conftest$ac_exeext conftest.$ac_ext
7483LIBS=$ac_check_lib_save_LIBS
7484fi
7485eval ac_res=\$$as_ac_Lib
7486	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7487$as_echo "$ac_res" >&6; }
7488if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7489  apu_has_ldapssl_client_deinit="1"
7490fi
7491
7492        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7494$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7495if eval \${$as_ac_Lib+:} false; then :
7496  $as_echo_n "(cached) " >&6
7497else
7498  ac_check_lib_save_LIBS=$LIBS
7499LIBS="-l${ldaplib} ${extralib} $LIBS"
7500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7501/* end confdefs.h.  */
7502
7503/* Override any GCC internal prototype to avoid an error.
7504   Use char because int might match the return type of a GCC
7505   builtin and then its argument prototype would still apply.  */
7506#ifdef __cplusplus
7507extern "C"
7508#endif
7509char ldapssl_add_trusted_cert ();
7510int
7511main ()
7512{
7513return ldapssl_add_trusted_cert ();
7514  ;
7515  return 0;
7516}
7517_ACEOF
7518if ac_fn_c_try_link "$LINENO"; then :
7519  eval "$as_ac_Lib=yes"
7520else
7521  eval "$as_ac_Lib=no"
7522fi
7523rm -f core conftest.err conftest.$ac_objext \
7524    conftest$ac_exeext conftest.$ac_ext
7525LIBS=$ac_check_lib_save_LIBS
7526fi
7527eval ac_res=\$$as_ac_Lib
7528	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7529$as_echo "$ac_res" >&6; }
7530if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7531  apu_has_ldapssl_add_trusted_cert="1"
7532fi
7533
7534        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7536$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7537if eval \${$as_ac_Lib+:} false; then :
7538  $as_echo_n "(cached) " >&6
7539else
7540  ac_check_lib_save_LIBS=$LIBS
7541LIBS="-l${ldaplib} ${extralib} $LIBS"
7542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7543/* end confdefs.h.  */
7544
7545/* Override any GCC internal prototype to avoid an error.
7546   Use char because int might match the return type of a GCC
7547   builtin and then its argument prototype would still apply.  */
7548#ifdef __cplusplus
7549extern "C"
7550#endif
7551char ldap_start_tls_s ();
7552int
7553main ()
7554{
7555return ldap_start_tls_s ();
7556  ;
7557  return 0;
7558}
7559_ACEOF
7560if ac_fn_c_try_link "$LINENO"; then :
7561  eval "$as_ac_Lib=yes"
7562else
7563  eval "$as_ac_Lib=no"
7564fi
7565rm -f core conftest.err conftest.$ac_objext \
7566    conftest$ac_exeext conftest.$ac_ext
7567LIBS=$ac_check_lib_save_LIBS
7568fi
7569eval ac_res=\$$as_ac_Lib
7570	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7571$as_echo "$ac_res" >&6; }
7572if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7573  apu_has_ldap_start_tls_s="1"
7574fi
7575
7576        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7578$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7579if eval \${$as_ac_Lib+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  ac_check_lib_save_LIBS=$LIBS
7583LIBS="-l${ldaplib} ${extralib} $LIBS"
7584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7585/* end confdefs.h.  */
7586
7587/* Override any GCC internal prototype to avoid an error.
7588   Use char because int might match the return type of a GCC
7589   builtin and then its argument prototype would still apply.  */
7590#ifdef __cplusplus
7591extern "C"
7592#endif
7593char ldap_sslinit ();
7594int
7595main ()
7596{
7597return ldap_sslinit ();
7598  ;
7599  return 0;
7600}
7601_ACEOF
7602if ac_fn_c_try_link "$LINENO"; then :
7603  eval "$as_ac_Lib=yes"
7604else
7605  eval "$as_ac_Lib=no"
7606fi
7607rm -f core conftest.err conftest.$ac_objext \
7608    conftest$ac_exeext conftest.$ac_ext
7609LIBS=$ac_check_lib_save_LIBS
7610fi
7611eval ac_res=\$$as_ac_Lib
7612	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7613$as_echo "$ac_res" >&6; }
7614if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7615  apu_has_ldap_sslinit="1"
7616fi
7617
7618        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7620$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7621if eval \${$as_ac_Lib+:} false; then :
7622  $as_echo_n "(cached) " >&6
7623else
7624  ac_check_lib_save_LIBS=$LIBS
7625LIBS="-l${ldaplib} ${extralib} $LIBS"
7626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7627/* end confdefs.h.  */
7628
7629/* Override any GCC internal prototype to avoid an error.
7630   Use char because int might match the return type of a GCC
7631   builtin and then its argument prototype would still apply.  */
7632#ifdef __cplusplus
7633extern "C"
7634#endif
7635char ldapssl_init ();
7636int
7637main ()
7638{
7639return ldapssl_init ();
7640  ;
7641  return 0;
7642}
7643_ACEOF
7644if ac_fn_c_try_link "$LINENO"; then :
7645  eval "$as_ac_Lib=yes"
7646else
7647  eval "$as_ac_Lib=no"
7648fi
7649rm -f core conftest.err conftest.$ac_objext \
7650    conftest$ac_exeext conftest.$ac_ext
7651LIBS=$ac_check_lib_save_LIBS
7652fi
7653eval ac_res=\$$as_ac_Lib
7654	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7655$as_echo "$ac_res" >&6; }
7656if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7657  apu_has_ldapssl_init="1"
7658fi
7659
7660        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7662$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7663if eval \${$as_ac_Lib+:} false; then :
7664  $as_echo_n "(cached) " >&6
7665else
7666  ac_check_lib_save_LIBS=$LIBS
7667LIBS="-l${ldaplib} ${extralib} $LIBS"
7668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7669/* end confdefs.h.  */
7670
7671/* Override any GCC internal prototype to avoid an error.
7672   Use char because int might match the return type of a GCC
7673   builtin and then its argument prototype would still apply.  */
7674#ifdef __cplusplus
7675extern "C"
7676#endif
7677char ldapssl_install_routines ();
7678int
7679main ()
7680{
7681return ldapssl_install_routines ();
7682  ;
7683  return 0;
7684}
7685_ACEOF
7686if ac_fn_c_try_link "$LINENO"; then :
7687  eval "$as_ac_Lib=yes"
7688else
7689  eval "$as_ac_Lib=no"
7690fi
7691rm -f core conftest.err conftest.$ac_objext \
7692    conftest$ac_exeext conftest.$ac_ext
7693LIBS=$ac_check_lib_save_LIBS
7694fi
7695eval ac_res=\$$as_ac_Lib
7696	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7697$as_echo "$ac_res" >&6; }
7698if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7699  apu_has_ldapssl_install_routines="1"
7700fi
7701
7702        apu_has_ldap="1";
7703
7704fi
7705
7706  fi
7707
7708
7709  if test ${apu_has_ldap} != "1"; then
7710    ldaplib="ldapsdk"
7711    extralib="-lldapx -lldapssl -lldapgss -lgssapi_krb5"
7712    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7713
7714    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7715
7716    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7717    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7718    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7720$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7721if eval \${$as_ac_Lib+:} false; then :
7722  $as_echo_n "(cached) " >&6
7723else
7724  ac_check_lib_save_LIBS=$LIBS
7725LIBS="-l${ldaplib} ${extralib} $LIBS"
7726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7727/* end confdefs.h.  */
7728
7729/* Override any GCC internal prototype to avoid an error.
7730   Use char because int might match the return type of a GCC
7731   builtin and then its argument prototype would still apply.  */
7732#ifdef __cplusplus
7733extern "C"
7734#endif
7735char ldap_init ();
7736int
7737main ()
7738{
7739return ldap_init ();
7740  ;
7741  return 0;
7742}
7743_ACEOF
7744if ac_fn_c_try_link "$LINENO"; then :
7745  eval "$as_ac_Lib=yes"
7746else
7747  eval "$as_ac_Lib=no"
7748fi
7749rm -f core conftest.err conftest.$ac_objext \
7750    conftest$ac_exeext conftest.$ac_ext
7751LIBS=$ac_check_lib_save_LIBS
7752fi
7753eval ac_res=\$$as_ac_Lib
7754	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7755$as_echo "$ac_res" >&6; }
7756if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7757
7758        LDADD_ldap_found="-l${ldaplib} ${extralib}"
7759        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7761$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7762if eval \${$as_ac_Lib+:} false; then :
7763  $as_echo_n "(cached) " >&6
7764else
7765  ac_check_lib_save_LIBS=$LIBS
7766LIBS="-l${ldaplib} ${extralib} $LIBS"
7767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7768/* end confdefs.h.  */
7769
7770/* Override any GCC internal prototype to avoid an error.
7771   Use char because int might match the return type of a GCC
7772   builtin and then its argument prototype would still apply.  */
7773#ifdef __cplusplus
7774extern "C"
7775#endif
7776char ldapssl_client_init ();
7777int
7778main ()
7779{
7780return ldapssl_client_init ();
7781  ;
7782  return 0;
7783}
7784_ACEOF
7785if ac_fn_c_try_link "$LINENO"; then :
7786  eval "$as_ac_Lib=yes"
7787else
7788  eval "$as_ac_Lib=no"
7789fi
7790rm -f core conftest.err conftest.$ac_objext \
7791    conftest$ac_exeext conftest.$ac_ext
7792LIBS=$ac_check_lib_save_LIBS
7793fi
7794eval ac_res=\$$as_ac_Lib
7795	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7796$as_echo "$ac_res" >&6; }
7797if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7798  apu_has_ldapssl_client_init="1"
7799fi
7800
7801        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7803$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7804if eval \${$as_ac_Lib+:} false; then :
7805  $as_echo_n "(cached) " >&6
7806else
7807  ac_check_lib_save_LIBS=$LIBS
7808LIBS="-l${ldaplib} ${extralib} $LIBS"
7809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7810/* end confdefs.h.  */
7811
7812/* Override any GCC internal prototype to avoid an error.
7813   Use char because int might match the return type of a GCC
7814   builtin and then its argument prototype would still apply.  */
7815#ifdef __cplusplus
7816extern "C"
7817#endif
7818char ldapssl_client_deinit ();
7819int
7820main ()
7821{
7822return ldapssl_client_deinit ();
7823  ;
7824  return 0;
7825}
7826_ACEOF
7827if ac_fn_c_try_link "$LINENO"; then :
7828  eval "$as_ac_Lib=yes"
7829else
7830  eval "$as_ac_Lib=no"
7831fi
7832rm -f core conftest.err conftest.$ac_objext \
7833    conftest$ac_exeext conftest.$ac_ext
7834LIBS=$ac_check_lib_save_LIBS
7835fi
7836eval ac_res=\$$as_ac_Lib
7837	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7838$as_echo "$ac_res" >&6; }
7839if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7840  apu_has_ldapssl_client_deinit="1"
7841fi
7842
7843        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7845$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7846if eval \${$as_ac_Lib+:} false; then :
7847  $as_echo_n "(cached) " >&6
7848else
7849  ac_check_lib_save_LIBS=$LIBS
7850LIBS="-l${ldaplib} ${extralib} $LIBS"
7851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7852/* end confdefs.h.  */
7853
7854/* Override any GCC internal prototype to avoid an error.
7855   Use char because int might match the return type of a GCC
7856   builtin and then its argument prototype would still apply.  */
7857#ifdef __cplusplus
7858extern "C"
7859#endif
7860char ldapssl_add_trusted_cert ();
7861int
7862main ()
7863{
7864return ldapssl_add_trusted_cert ();
7865  ;
7866  return 0;
7867}
7868_ACEOF
7869if ac_fn_c_try_link "$LINENO"; then :
7870  eval "$as_ac_Lib=yes"
7871else
7872  eval "$as_ac_Lib=no"
7873fi
7874rm -f core conftest.err conftest.$ac_objext \
7875    conftest$ac_exeext conftest.$ac_ext
7876LIBS=$ac_check_lib_save_LIBS
7877fi
7878eval ac_res=\$$as_ac_Lib
7879	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7880$as_echo "$ac_res" >&6; }
7881if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7882  apu_has_ldapssl_add_trusted_cert="1"
7883fi
7884
7885        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7887$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7888if eval \${$as_ac_Lib+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  ac_check_lib_save_LIBS=$LIBS
7892LIBS="-l${ldaplib} ${extralib} $LIBS"
7893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894/* end confdefs.h.  */
7895
7896/* Override any GCC internal prototype to avoid an error.
7897   Use char because int might match the return type of a GCC
7898   builtin and then its argument prototype would still apply.  */
7899#ifdef __cplusplus
7900extern "C"
7901#endif
7902char ldap_start_tls_s ();
7903int
7904main ()
7905{
7906return ldap_start_tls_s ();
7907  ;
7908  return 0;
7909}
7910_ACEOF
7911if ac_fn_c_try_link "$LINENO"; then :
7912  eval "$as_ac_Lib=yes"
7913else
7914  eval "$as_ac_Lib=no"
7915fi
7916rm -f core conftest.err conftest.$ac_objext \
7917    conftest$ac_exeext conftest.$ac_ext
7918LIBS=$ac_check_lib_save_LIBS
7919fi
7920eval ac_res=\$$as_ac_Lib
7921	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7922$as_echo "$ac_res" >&6; }
7923if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7924  apu_has_ldap_start_tls_s="1"
7925fi
7926
7927        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7929$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7930if eval \${$as_ac_Lib+:} false; then :
7931  $as_echo_n "(cached) " >&6
7932else
7933  ac_check_lib_save_LIBS=$LIBS
7934LIBS="-l${ldaplib} ${extralib} $LIBS"
7935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7936/* end confdefs.h.  */
7937
7938/* Override any GCC internal prototype to avoid an error.
7939   Use char because int might match the return type of a GCC
7940   builtin and then its argument prototype would still apply.  */
7941#ifdef __cplusplus
7942extern "C"
7943#endif
7944char ldap_sslinit ();
7945int
7946main ()
7947{
7948return ldap_sslinit ();
7949  ;
7950  return 0;
7951}
7952_ACEOF
7953if ac_fn_c_try_link "$LINENO"; then :
7954  eval "$as_ac_Lib=yes"
7955else
7956  eval "$as_ac_Lib=no"
7957fi
7958rm -f core conftest.err conftest.$ac_objext \
7959    conftest$ac_exeext conftest.$ac_ext
7960LIBS=$ac_check_lib_save_LIBS
7961fi
7962eval ac_res=\$$as_ac_Lib
7963	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7964$as_echo "$ac_res" >&6; }
7965if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7966  apu_has_ldap_sslinit="1"
7967fi
7968
7969        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7971$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7972if eval \${$as_ac_Lib+:} false; then :
7973  $as_echo_n "(cached) " >&6
7974else
7975  ac_check_lib_save_LIBS=$LIBS
7976LIBS="-l${ldaplib} ${extralib} $LIBS"
7977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978/* end confdefs.h.  */
7979
7980/* Override any GCC internal prototype to avoid an error.
7981   Use char because int might match the return type of a GCC
7982   builtin and then its argument prototype would still apply.  */
7983#ifdef __cplusplus
7984extern "C"
7985#endif
7986char ldapssl_init ();
7987int
7988main ()
7989{
7990return ldapssl_init ();
7991  ;
7992  return 0;
7993}
7994_ACEOF
7995if ac_fn_c_try_link "$LINENO"; then :
7996  eval "$as_ac_Lib=yes"
7997else
7998  eval "$as_ac_Lib=no"
7999fi
8000rm -f core conftest.err conftest.$ac_objext \
8001    conftest$ac_exeext conftest.$ac_ext
8002LIBS=$ac_check_lib_save_LIBS
8003fi
8004eval ac_res=\$$as_ac_Lib
8005	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8006$as_echo "$ac_res" >&6; }
8007if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8008  apu_has_ldapssl_init="1"
8009fi
8010
8011        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8013$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8014if eval \${$as_ac_Lib+:} false; then :
8015  $as_echo_n "(cached) " >&6
8016else
8017  ac_check_lib_save_LIBS=$LIBS
8018LIBS="-l${ldaplib} ${extralib} $LIBS"
8019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8020/* end confdefs.h.  */
8021
8022/* Override any GCC internal prototype to avoid an error.
8023   Use char because int might match the return type of a GCC
8024   builtin and then its argument prototype would still apply.  */
8025#ifdef __cplusplus
8026extern "C"
8027#endif
8028char ldapssl_install_routines ();
8029int
8030main ()
8031{
8032return ldapssl_install_routines ();
8033  ;
8034  return 0;
8035}
8036_ACEOF
8037if ac_fn_c_try_link "$LINENO"; then :
8038  eval "$as_ac_Lib=yes"
8039else
8040  eval "$as_ac_Lib=no"
8041fi
8042rm -f core conftest.err conftest.$ac_objext \
8043    conftest$ac_exeext conftest.$ac_ext
8044LIBS=$ac_check_lib_save_LIBS
8045fi
8046eval ac_res=\$$as_ac_Lib
8047	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8048$as_echo "$ac_res" >&6; }
8049if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8050  apu_has_ldapssl_install_routines="1"
8051fi
8052
8053        apu_has_ldap="1";
8054
8055fi
8056
8057  fi
8058
8059
8060  if test ${apu_has_ldap} != "1"; then
8061    ldaplib="ldapsdk"
8062    extralib="-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket"
8063    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8064
8065    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8066
8067    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8068    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8069    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8071$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8072if eval \${$as_ac_Lib+:} false; then :
8073  $as_echo_n "(cached) " >&6
8074else
8075  ac_check_lib_save_LIBS=$LIBS
8076LIBS="-l${ldaplib} ${extralib} $LIBS"
8077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078/* end confdefs.h.  */
8079
8080/* Override any GCC internal prototype to avoid an error.
8081   Use char because int might match the return type of a GCC
8082   builtin and then its argument prototype would still apply.  */
8083#ifdef __cplusplus
8084extern "C"
8085#endif
8086char ldap_init ();
8087int
8088main ()
8089{
8090return ldap_init ();
8091  ;
8092  return 0;
8093}
8094_ACEOF
8095if ac_fn_c_try_link "$LINENO"; then :
8096  eval "$as_ac_Lib=yes"
8097else
8098  eval "$as_ac_Lib=no"
8099fi
8100rm -f core conftest.err conftest.$ac_objext \
8101    conftest$ac_exeext conftest.$ac_ext
8102LIBS=$ac_check_lib_save_LIBS
8103fi
8104eval ac_res=\$$as_ac_Lib
8105	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8106$as_echo "$ac_res" >&6; }
8107if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8108
8109        LDADD_ldap_found="-l${ldaplib} ${extralib}"
8110        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8112$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8113if eval \${$as_ac_Lib+:} false; then :
8114  $as_echo_n "(cached) " >&6
8115else
8116  ac_check_lib_save_LIBS=$LIBS
8117LIBS="-l${ldaplib} ${extralib} $LIBS"
8118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8119/* end confdefs.h.  */
8120
8121/* Override any GCC internal prototype to avoid an error.
8122   Use char because int might match the return type of a GCC
8123   builtin and then its argument prototype would still apply.  */
8124#ifdef __cplusplus
8125extern "C"
8126#endif
8127char ldapssl_client_init ();
8128int
8129main ()
8130{
8131return ldapssl_client_init ();
8132  ;
8133  return 0;
8134}
8135_ACEOF
8136if ac_fn_c_try_link "$LINENO"; then :
8137  eval "$as_ac_Lib=yes"
8138else
8139  eval "$as_ac_Lib=no"
8140fi
8141rm -f core conftest.err conftest.$ac_objext \
8142    conftest$ac_exeext conftest.$ac_ext
8143LIBS=$ac_check_lib_save_LIBS
8144fi
8145eval ac_res=\$$as_ac_Lib
8146	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8147$as_echo "$ac_res" >&6; }
8148if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8149  apu_has_ldapssl_client_init="1"
8150fi
8151
8152        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8154$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8155if eval \${$as_ac_Lib+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  ac_check_lib_save_LIBS=$LIBS
8159LIBS="-l${ldaplib} ${extralib} $LIBS"
8160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8161/* end confdefs.h.  */
8162
8163/* Override any GCC internal prototype to avoid an error.
8164   Use char because int might match the return type of a GCC
8165   builtin and then its argument prototype would still apply.  */
8166#ifdef __cplusplus
8167extern "C"
8168#endif
8169char ldapssl_client_deinit ();
8170int
8171main ()
8172{
8173return ldapssl_client_deinit ();
8174  ;
8175  return 0;
8176}
8177_ACEOF
8178if ac_fn_c_try_link "$LINENO"; then :
8179  eval "$as_ac_Lib=yes"
8180else
8181  eval "$as_ac_Lib=no"
8182fi
8183rm -f core conftest.err conftest.$ac_objext \
8184    conftest$ac_exeext conftest.$ac_ext
8185LIBS=$ac_check_lib_save_LIBS
8186fi
8187eval ac_res=\$$as_ac_Lib
8188	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8189$as_echo "$ac_res" >&6; }
8190if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8191  apu_has_ldapssl_client_deinit="1"
8192fi
8193
8194        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8196$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8197if eval \${$as_ac_Lib+:} false; then :
8198  $as_echo_n "(cached) " >&6
8199else
8200  ac_check_lib_save_LIBS=$LIBS
8201LIBS="-l${ldaplib} ${extralib} $LIBS"
8202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8203/* end confdefs.h.  */
8204
8205/* Override any GCC internal prototype to avoid an error.
8206   Use char because int might match the return type of a GCC
8207   builtin and then its argument prototype would still apply.  */
8208#ifdef __cplusplus
8209extern "C"
8210#endif
8211char ldapssl_add_trusted_cert ();
8212int
8213main ()
8214{
8215return ldapssl_add_trusted_cert ();
8216  ;
8217  return 0;
8218}
8219_ACEOF
8220if ac_fn_c_try_link "$LINENO"; then :
8221  eval "$as_ac_Lib=yes"
8222else
8223  eval "$as_ac_Lib=no"
8224fi
8225rm -f core conftest.err conftest.$ac_objext \
8226    conftest$ac_exeext conftest.$ac_ext
8227LIBS=$ac_check_lib_save_LIBS
8228fi
8229eval ac_res=\$$as_ac_Lib
8230	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8231$as_echo "$ac_res" >&6; }
8232if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8233  apu_has_ldapssl_add_trusted_cert="1"
8234fi
8235
8236        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8238$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8239if eval \${$as_ac_Lib+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  ac_check_lib_save_LIBS=$LIBS
8243LIBS="-l${ldaplib} ${extralib} $LIBS"
8244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8245/* end confdefs.h.  */
8246
8247/* Override any GCC internal prototype to avoid an error.
8248   Use char because int might match the return type of a GCC
8249   builtin and then its argument prototype would still apply.  */
8250#ifdef __cplusplus
8251extern "C"
8252#endif
8253char ldap_start_tls_s ();
8254int
8255main ()
8256{
8257return ldap_start_tls_s ();
8258  ;
8259  return 0;
8260}
8261_ACEOF
8262if ac_fn_c_try_link "$LINENO"; then :
8263  eval "$as_ac_Lib=yes"
8264else
8265  eval "$as_ac_Lib=no"
8266fi
8267rm -f core conftest.err conftest.$ac_objext \
8268    conftest$ac_exeext conftest.$ac_ext
8269LIBS=$ac_check_lib_save_LIBS
8270fi
8271eval ac_res=\$$as_ac_Lib
8272	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8273$as_echo "$ac_res" >&6; }
8274if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8275  apu_has_ldap_start_tls_s="1"
8276fi
8277
8278        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8280$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8281if eval \${$as_ac_Lib+:} false; then :
8282  $as_echo_n "(cached) " >&6
8283else
8284  ac_check_lib_save_LIBS=$LIBS
8285LIBS="-l${ldaplib} ${extralib} $LIBS"
8286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8287/* end confdefs.h.  */
8288
8289/* Override any GCC internal prototype to avoid an error.
8290   Use char because int might match the return type of a GCC
8291   builtin and then its argument prototype would still apply.  */
8292#ifdef __cplusplus
8293extern "C"
8294#endif
8295char ldap_sslinit ();
8296int
8297main ()
8298{
8299return ldap_sslinit ();
8300  ;
8301  return 0;
8302}
8303_ACEOF
8304if ac_fn_c_try_link "$LINENO"; then :
8305  eval "$as_ac_Lib=yes"
8306else
8307  eval "$as_ac_Lib=no"
8308fi
8309rm -f core conftest.err conftest.$ac_objext \
8310    conftest$ac_exeext conftest.$ac_ext
8311LIBS=$ac_check_lib_save_LIBS
8312fi
8313eval ac_res=\$$as_ac_Lib
8314	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8315$as_echo "$ac_res" >&6; }
8316if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8317  apu_has_ldap_sslinit="1"
8318fi
8319
8320        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8322$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8323if eval \${$as_ac_Lib+:} false; then :
8324  $as_echo_n "(cached) " >&6
8325else
8326  ac_check_lib_save_LIBS=$LIBS
8327LIBS="-l${ldaplib} ${extralib} $LIBS"
8328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8329/* end confdefs.h.  */
8330
8331/* Override any GCC internal prototype to avoid an error.
8332   Use char because int might match the return type of a GCC
8333   builtin and then its argument prototype would still apply.  */
8334#ifdef __cplusplus
8335extern "C"
8336#endif
8337char ldapssl_init ();
8338int
8339main ()
8340{
8341return ldapssl_init ();
8342  ;
8343  return 0;
8344}
8345_ACEOF
8346if ac_fn_c_try_link "$LINENO"; then :
8347  eval "$as_ac_Lib=yes"
8348else
8349  eval "$as_ac_Lib=no"
8350fi
8351rm -f core conftest.err conftest.$ac_objext \
8352    conftest$ac_exeext conftest.$ac_ext
8353LIBS=$ac_check_lib_save_LIBS
8354fi
8355eval ac_res=\$$as_ac_Lib
8356	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8357$as_echo "$ac_res" >&6; }
8358if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8359  apu_has_ldapssl_init="1"
8360fi
8361
8362        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8364$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8365if eval \${$as_ac_Lib+:} false; then :
8366  $as_echo_n "(cached) " >&6
8367else
8368  ac_check_lib_save_LIBS=$LIBS
8369LIBS="-l${ldaplib} ${extralib} $LIBS"
8370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8371/* end confdefs.h.  */
8372
8373/* Override any GCC internal prototype to avoid an error.
8374   Use char because int might match the return type of a GCC
8375   builtin and then its argument prototype would still apply.  */
8376#ifdef __cplusplus
8377extern "C"
8378#endif
8379char ldapssl_install_routines ();
8380int
8381main ()
8382{
8383return ldapssl_install_routines ();
8384  ;
8385  return 0;
8386}
8387_ACEOF
8388if ac_fn_c_try_link "$LINENO"; then :
8389  eval "$as_ac_Lib=yes"
8390else
8391  eval "$as_ac_Lib=no"
8392fi
8393rm -f core conftest.err conftest.$ac_objext \
8394    conftest$ac_exeext conftest.$ac_ext
8395LIBS=$ac_check_lib_save_LIBS
8396fi
8397eval ac_res=\$$as_ac_Lib
8398	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8399$as_echo "$ac_res" >&6; }
8400if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8401  apu_has_ldapssl_install_routines="1"
8402fi
8403
8404        apu_has_ldap="1";
8405
8406fi
8407
8408  fi
8409
8410
8411  if test ${apu_has_ldap} != "1"; then
8412    ldaplib="ldap"
8413    extralib="-llber"
8414    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8415
8416    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8417
8418    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8419    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8420    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8422$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8423if eval \${$as_ac_Lib+:} false; then :
8424  $as_echo_n "(cached) " >&6
8425else
8426  ac_check_lib_save_LIBS=$LIBS
8427LIBS="-l${ldaplib} ${extralib} $LIBS"
8428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8429/* end confdefs.h.  */
8430
8431/* Override any GCC internal prototype to avoid an error.
8432   Use char because int might match the return type of a GCC
8433   builtin and then its argument prototype would still apply.  */
8434#ifdef __cplusplus
8435extern "C"
8436#endif
8437char ldap_init ();
8438int
8439main ()
8440{
8441return ldap_init ();
8442  ;
8443  return 0;
8444}
8445_ACEOF
8446if ac_fn_c_try_link "$LINENO"; then :
8447  eval "$as_ac_Lib=yes"
8448else
8449  eval "$as_ac_Lib=no"
8450fi
8451rm -f core conftest.err conftest.$ac_objext \
8452    conftest$ac_exeext conftest.$ac_ext
8453LIBS=$ac_check_lib_save_LIBS
8454fi
8455eval ac_res=\$$as_ac_Lib
8456	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8457$as_echo "$ac_res" >&6; }
8458if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8459
8460        LDADD_ldap_found="-l${ldaplib} ${extralib}"
8461        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8463$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8464if eval \${$as_ac_Lib+:} false; then :
8465  $as_echo_n "(cached) " >&6
8466else
8467  ac_check_lib_save_LIBS=$LIBS
8468LIBS="-l${ldaplib} ${extralib} $LIBS"
8469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8470/* end confdefs.h.  */
8471
8472/* Override any GCC internal prototype to avoid an error.
8473   Use char because int might match the return type of a GCC
8474   builtin and then its argument prototype would still apply.  */
8475#ifdef __cplusplus
8476extern "C"
8477#endif
8478char ldapssl_client_init ();
8479int
8480main ()
8481{
8482return ldapssl_client_init ();
8483  ;
8484  return 0;
8485}
8486_ACEOF
8487if ac_fn_c_try_link "$LINENO"; then :
8488  eval "$as_ac_Lib=yes"
8489else
8490  eval "$as_ac_Lib=no"
8491fi
8492rm -f core conftest.err conftest.$ac_objext \
8493    conftest$ac_exeext conftest.$ac_ext
8494LIBS=$ac_check_lib_save_LIBS
8495fi
8496eval ac_res=\$$as_ac_Lib
8497	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8498$as_echo "$ac_res" >&6; }
8499if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8500  apu_has_ldapssl_client_init="1"
8501fi
8502
8503        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8505$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8506if eval \${$as_ac_Lib+:} false; then :
8507  $as_echo_n "(cached) " >&6
8508else
8509  ac_check_lib_save_LIBS=$LIBS
8510LIBS="-l${ldaplib} ${extralib} $LIBS"
8511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8512/* end confdefs.h.  */
8513
8514/* Override any GCC internal prototype to avoid an error.
8515   Use char because int might match the return type of a GCC
8516   builtin and then its argument prototype would still apply.  */
8517#ifdef __cplusplus
8518extern "C"
8519#endif
8520char ldapssl_client_deinit ();
8521int
8522main ()
8523{
8524return ldapssl_client_deinit ();
8525  ;
8526  return 0;
8527}
8528_ACEOF
8529if ac_fn_c_try_link "$LINENO"; then :
8530  eval "$as_ac_Lib=yes"
8531else
8532  eval "$as_ac_Lib=no"
8533fi
8534rm -f core conftest.err conftest.$ac_objext \
8535    conftest$ac_exeext conftest.$ac_ext
8536LIBS=$ac_check_lib_save_LIBS
8537fi
8538eval ac_res=\$$as_ac_Lib
8539	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8540$as_echo "$ac_res" >&6; }
8541if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8542  apu_has_ldapssl_client_deinit="1"
8543fi
8544
8545        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8547$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8548if eval \${$as_ac_Lib+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  ac_check_lib_save_LIBS=$LIBS
8552LIBS="-l${ldaplib} ${extralib} $LIBS"
8553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8554/* end confdefs.h.  */
8555
8556/* Override any GCC internal prototype to avoid an error.
8557   Use char because int might match the return type of a GCC
8558   builtin and then its argument prototype would still apply.  */
8559#ifdef __cplusplus
8560extern "C"
8561#endif
8562char ldapssl_add_trusted_cert ();
8563int
8564main ()
8565{
8566return ldapssl_add_trusted_cert ();
8567  ;
8568  return 0;
8569}
8570_ACEOF
8571if ac_fn_c_try_link "$LINENO"; then :
8572  eval "$as_ac_Lib=yes"
8573else
8574  eval "$as_ac_Lib=no"
8575fi
8576rm -f core conftest.err conftest.$ac_objext \
8577    conftest$ac_exeext conftest.$ac_ext
8578LIBS=$ac_check_lib_save_LIBS
8579fi
8580eval ac_res=\$$as_ac_Lib
8581	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8582$as_echo "$ac_res" >&6; }
8583if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8584  apu_has_ldapssl_add_trusted_cert="1"
8585fi
8586
8587        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8589$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8590if eval \${$as_ac_Lib+:} false; then :
8591  $as_echo_n "(cached) " >&6
8592else
8593  ac_check_lib_save_LIBS=$LIBS
8594LIBS="-l${ldaplib} ${extralib} $LIBS"
8595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8596/* end confdefs.h.  */
8597
8598/* Override any GCC internal prototype to avoid an error.
8599   Use char because int might match the return type of a GCC
8600   builtin and then its argument prototype would still apply.  */
8601#ifdef __cplusplus
8602extern "C"
8603#endif
8604char ldap_start_tls_s ();
8605int
8606main ()
8607{
8608return ldap_start_tls_s ();
8609  ;
8610  return 0;
8611}
8612_ACEOF
8613if ac_fn_c_try_link "$LINENO"; then :
8614  eval "$as_ac_Lib=yes"
8615else
8616  eval "$as_ac_Lib=no"
8617fi
8618rm -f core conftest.err conftest.$ac_objext \
8619    conftest$ac_exeext conftest.$ac_ext
8620LIBS=$ac_check_lib_save_LIBS
8621fi
8622eval ac_res=\$$as_ac_Lib
8623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8624$as_echo "$ac_res" >&6; }
8625if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8626  apu_has_ldap_start_tls_s="1"
8627fi
8628
8629        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8631$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8632if eval \${$as_ac_Lib+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  ac_check_lib_save_LIBS=$LIBS
8636LIBS="-l${ldaplib} ${extralib} $LIBS"
8637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8638/* end confdefs.h.  */
8639
8640/* Override any GCC internal prototype to avoid an error.
8641   Use char because int might match the return type of a GCC
8642   builtin and then its argument prototype would still apply.  */
8643#ifdef __cplusplus
8644extern "C"
8645#endif
8646char ldap_sslinit ();
8647int
8648main ()
8649{
8650return ldap_sslinit ();
8651  ;
8652  return 0;
8653}
8654_ACEOF
8655if ac_fn_c_try_link "$LINENO"; then :
8656  eval "$as_ac_Lib=yes"
8657else
8658  eval "$as_ac_Lib=no"
8659fi
8660rm -f core conftest.err conftest.$ac_objext \
8661    conftest$ac_exeext conftest.$ac_ext
8662LIBS=$ac_check_lib_save_LIBS
8663fi
8664eval ac_res=\$$as_ac_Lib
8665	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8666$as_echo "$ac_res" >&6; }
8667if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8668  apu_has_ldap_sslinit="1"
8669fi
8670
8671        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8673$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8674if eval \${$as_ac_Lib+:} false; then :
8675  $as_echo_n "(cached) " >&6
8676else
8677  ac_check_lib_save_LIBS=$LIBS
8678LIBS="-l${ldaplib} ${extralib} $LIBS"
8679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8680/* end confdefs.h.  */
8681
8682/* Override any GCC internal prototype to avoid an error.
8683   Use char because int might match the return type of a GCC
8684   builtin and then its argument prototype would still apply.  */
8685#ifdef __cplusplus
8686extern "C"
8687#endif
8688char ldapssl_init ();
8689int
8690main ()
8691{
8692return ldapssl_init ();
8693  ;
8694  return 0;
8695}
8696_ACEOF
8697if ac_fn_c_try_link "$LINENO"; then :
8698  eval "$as_ac_Lib=yes"
8699else
8700  eval "$as_ac_Lib=no"
8701fi
8702rm -f core conftest.err conftest.$ac_objext \
8703    conftest$ac_exeext conftest.$ac_ext
8704LIBS=$ac_check_lib_save_LIBS
8705fi
8706eval ac_res=\$$as_ac_Lib
8707	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8708$as_echo "$ac_res" >&6; }
8709if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8710  apu_has_ldapssl_init="1"
8711fi
8712
8713        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8715$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8716if eval \${$as_ac_Lib+:} false; then :
8717  $as_echo_n "(cached) " >&6
8718else
8719  ac_check_lib_save_LIBS=$LIBS
8720LIBS="-l${ldaplib} ${extralib} $LIBS"
8721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8722/* end confdefs.h.  */
8723
8724/* Override any GCC internal prototype to avoid an error.
8725   Use char because int might match the return type of a GCC
8726   builtin and then its argument prototype would still apply.  */
8727#ifdef __cplusplus
8728extern "C"
8729#endif
8730char ldapssl_install_routines ();
8731int
8732main ()
8733{
8734return ldapssl_install_routines ();
8735  ;
8736  return 0;
8737}
8738_ACEOF
8739if ac_fn_c_try_link "$LINENO"; then :
8740  eval "$as_ac_Lib=yes"
8741else
8742  eval "$as_ac_Lib=no"
8743fi
8744rm -f core conftest.err conftest.$ac_objext \
8745    conftest$ac_exeext conftest.$ac_ext
8746LIBS=$ac_check_lib_save_LIBS
8747fi
8748eval ac_res=\$$as_ac_Lib
8749	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8750$as_echo "$ac_res" >&6; }
8751if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8752  apu_has_ldapssl_install_routines="1"
8753fi
8754
8755        apu_has_ldap="1";
8756
8757fi
8758
8759  fi
8760
8761
8762  if test ${apu_has_ldap} != "1"; then
8763    ldaplib="ldap"
8764    extralib="-llber -lresolv"
8765    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8766
8767    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8768
8769    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8770    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8771    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8773$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8774if eval \${$as_ac_Lib+:} false; then :
8775  $as_echo_n "(cached) " >&6
8776else
8777  ac_check_lib_save_LIBS=$LIBS
8778LIBS="-l${ldaplib} ${extralib} $LIBS"
8779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8780/* end confdefs.h.  */
8781
8782/* Override any GCC internal prototype to avoid an error.
8783   Use char because int might match the return type of a GCC
8784   builtin and then its argument prototype would still apply.  */
8785#ifdef __cplusplus
8786extern "C"
8787#endif
8788char ldap_init ();
8789int
8790main ()
8791{
8792return ldap_init ();
8793  ;
8794  return 0;
8795}
8796_ACEOF
8797if ac_fn_c_try_link "$LINENO"; then :
8798  eval "$as_ac_Lib=yes"
8799else
8800  eval "$as_ac_Lib=no"
8801fi
8802rm -f core conftest.err conftest.$ac_objext \
8803    conftest$ac_exeext conftest.$ac_ext
8804LIBS=$ac_check_lib_save_LIBS
8805fi
8806eval ac_res=\$$as_ac_Lib
8807	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8808$as_echo "$ac_res" >&6; }
8809if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8810
8811        LDADD_ldap_found="-l${ldaplib} ${extralib}"
8812        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8814$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8815if eval \${$as_ac_Lib+:} false; then :
8816  $as_echo_n "(cached) " >&6
8817else
8818  ac_check_lib_save_LIBS=$LIBS
8819LIBS="-l${ldaplib} ${extralib} $LIBS"
8820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8821/* end confdefs.h.  */
8822
8823/* Override any GCC internal prototype to avoid an error.
8824   Use char because int might match the return type of a GCC
8825   builtin and then its argument prototype would still apply.  */
8826#ifdef __cplusplus
8827extern "C"
8828#endif
8829char ldapssl_client_init ();
8830int
8831main ()
8832{
8833return ldapssl_client_init ();
8834  ;
8835  return 0;
8836}
8837_ACEOF
8838if ac_fn_c_try_link "$LINENO"; then :
8839  eval "$as_ac_Lib=yes"
8840else
8841  eval "$as_ac_Lib=no"
8842fi
8843rm -f core conftest.err conftest.$ac_objext \
8844    conftest$ac_exeext conftest.$ac_ext
8845LIBS=$ac_check_lib_save_LIBS
8846fi
8847eval ac_res=\$$as_ac_Lib
8848	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8849$as_echo "$ac_res" >&6; }
8850if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8851  apu_has_ldapssl_client_init="1"
8852fi
8853
8854        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8856$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8857if eval \${$as_ac_Lib+:} false; then :
8858  $as_echo_n "(cached) " >&6
8859else
8860  ac_check_lib_save_LIBS=$LIBS
8861LIBS="-l${ldaplib} ${extralib} $LIBS"
8862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8863/* end confdefs.h.  */
8864
8865/* Override any GCC internal prototype to avoid an error.
8866   Use char because int might match the return type of a GCC
8867   builtin and then its argument prototype would still apply.  */
8868#ifdef __cplusplus
8869extern "C"
8870#endif
8871char ldapssl_client_deinit ();
8872int
8873main ()
8874{
8875return ldapssl_client_deinit ();
8876  ;
8877  return 0;
8878}
8879_ACEOF
8880if ac_fn_c_try_link "$LINENO"; then :
8881  eval "$as_ac_Lib=yes"
8882else
8883  eval "$as_ac_Lib=no"
8884fi
8885rm -f core conftest.err conftest.$ac_objext \
8886    conftest$ac_exeext conftest.$ac_ext
8887LIBS=$ac_check_lib_save_LIBS
8888fi
8889eval ac_res=\$$as_ac_Lib
8890	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8891$as_echo "$ac_res" >&6; }
8892if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8893  apu_has_ldapssl_client_deinit="1"
8894fi
8895
8896        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8898$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8899if eval \${$as_ac_Lib+:} false; then :
8900  $as_echo_n "(cached) " >&6
8901else
8902  ac_check_lib_save_LIBS=$LIBS
8903LIBS="-l${ldaplib} ${extralib} $LIBS"
8904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8905/* end confdefs.h.  */
8906
8907/* Override any GCC internal prototype to avoid an error.
8908   Use char because int might match the return type of a GCC
8909   builtin and then its argument prototype would still apply.  */
8910#ifdef __cplusplus
8911extern "C"
8912#endif
8913char ldapssl_add_trusted_cert ();
8914int
8915main ()
8916{
8917return ldapssl_add_trusted_cert ();
8918  ;
8919  return 0;
8920}
8921_ACEOF
8922if ac_fn_c_try_link "$LINENO"; then :
8923  eval "$as_ac_Lib=yes"
8924else
8925  eval "$as_ac_Lib=no"
8926fi
8927rm -f core conftest.err conftest.$ac_objext \
8928    conftest$ac_exeext conftest.$ac_ext
8929LIBS=$ac_check_lib_save_LIBS
8930fi
8931eval ac_res=\$$as_ac_Lib
8932	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8933$as_echo "$ac_res" >&6; }
8934if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8935  apu_has_ldapssl_add_trusted_cert="1"
8936fi
8937
8938        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8940$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8941if eval \${$as_ac_Lib+:} false; then :
8942  $as_echo_n "(cached) " >&6
8943else
8944  ac_check_lib_save_LIBS=$LIBS
8945LIBS="-l${ldaplib} ${extralib} $LIBS"
8946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8947/* end confdefs.h.  */
8948
8949/* Override any GCC internal prototype to avoid an error.
8950   Use char because int might match the return type of a GCC
8951   builtin and then its argument prototype would still apply.  */
8952#ifdef __cplusplus
8953extern "C"
8954#endif
8955char ldap_start_tls_s ();
8956int
8957main ()
8958{
8959return ldap_start_tls_s ();
8960  ;
8961  return 0;
8962}
8963_ACEOF
8964if ac_fn_c_try_link "$LINENO"; then :
8965  eval "$as_ac_Lib=yes"
8966else
8967  eval "$as_ac_Lib=no"
8968fi
8969rm -f core conftest.err conftest.$ac_objext \
8970    conftest$ac_exeext conftest.$ac_ext
8971LIBS=$ac_check_lib_save_LIBS
8972fi
8973eval ac_res=\$$as_ac_Lib
8974	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8975$as_echo "$ac_res" >&6; }
8976if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8977  apu_has_ldap_start_tls_s="1"
8978fi
8979
8980        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8982$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8983if eval \${$as_ac_Lib+:} false; then :
8984  $as_echo_n "(cached) " >&6
8985else
8986  ac_check_lib_save_LIBS=$LIBS
8987LIBS="-l${ldaplib} ${extralib} $LIBS"
8988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8989/* end confdefs.h.  */
8990
8991/* Override any GCC internal prototype to avoid an error.
8992   Use char because int might match the return type of a GCC
8993   builtin and then its argument prototype would still apply.  */
8994#ifdef __cplusplus
8995extern "C"
8996#endif
8997char ldap_sslinit ();
8998int
8999main ()
9000{
9001return ldap_sslinit ();
9002  ;
9003  return 0;
9004}
9005_ACEOF
9006if ac_fn_c_try_link "$LINENO"; then :
9007  eval "$as_ac_Lib=yes"
9008else
9009  eval "$as_ac_Lib=no"
9010fi
9011rm -f core conftest.err conftest.$ac_objext \
9012    conftest$ac_exeext conftest.$ac_ext
9013LIBS=$ac_check_lib_save_LIBS
9014fi
9015eval ac_res=\$$as_ac_Lib
9016	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9017$as_echo "$ac_res" >&6; }
9018if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9019  apu_has_ldap_sslinit="1"
9020fi
9021
9022        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9024$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9025if eval \${$as_ac_Lib+:} false; then :
9026  $as_echo_n "(cached) " >&6
9027else
9028  ac_check_lib_save_LIBS=$LIBS
9029LIBS="-l${ldaplib} ${extralib} $LIBS"
9030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031/* end confdefs.h.  */
9032
9033/* Override any GCC internal prototype to avoid an error.
9034   Use char because int might match the return type of a GCC
9035   builtin and then its argument prototype would still apply.  */
9036#ifdef __cplusplus
9037extern "C"
9038#endif
9039char ldapssl_init ();
9040int
9041main ()
9042{
9043return ldapssl_init ();
9044  ;
9045  return 0;
9046}
9047_ACEOF
9048if ac_fn_c_try_link "$LINENO"; then :
9049  eval "$as_ac_Lib=yes"
9050else
9051  eval "$as_ac_Lib=no"
9052fi
9053rm -f core conftest.err conftest.$ac_objext \
9054    conftest$ac_exeext conftest.$ac_ext
9055LIBS=$ac_check_lib_save_LIBS
9056fi
9057eval ac_res=\$$as_ac_Lib
9058	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9059$as_echo "$ac_res" >&6; }
9060if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9061  apu_has_ldapssl_init="1"
9062fi
9063
9064        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9066$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9067if eval \${$as_ac_Lib+:} false; then :
9068  $as_echo_n "(cached) " >&6
9069else
9070  ac_check_lib_save_LIBS=$LIBS
9071LIBS="-l${ldaplib} ${extralib} $LIBS"
9072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9073/* end confdefs.h.  */
9074
9075/* Override any GCC internal prototype to avoid an error.
9076   Use char because int might match the return type of a GCC
9077   builtin and then its argument prototype would still apply.  */
9078#ifdef __cplusplus
9079extern "C"
9080#endif
9081char ldapssl_install_routines ();
9082int
9083main ()
9084{
9085return ldapssl_install_routines ();
9086  ;
9087  return 0;
9088}
9089_ACEOF
9090if ac_fn_c_try_link "$LINENO"; then :
9091  eval "$as_ac_Lib=yes"
9092else
9093  eval "$as_ac_Lib=no"
9094fi
9095rm -f core conftest.err conftest.$ac_objext \
9096    conftest$ac_exeext conftest.$ac_ext
9097LIBS=$ac_check_lib_save_LIBS
9098fi
9099eval ac_res=\$$as_ac_Lib
9100	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9101$as_echo "$ac_res" >&6; }
9102if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9103  apu_has_ldapssl_install_routines="1"
9104fi
9105
9106        apu_has_ldap="1";
9107
9108fi
9109
9110  fi
9111
9112
9113  if test ${apu_has_ldap} != "1"; then
9114    ldaplib="ldap"
9115    extralib="-llber -lresolv -lsocket -lnsl"
9116    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9117
9118    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9119
9120    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9121    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9122    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9124$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9125if eval \${$as_ac_Lib+:} false; then :
9126  $as_echo_n "(cached) " >&6
9127else
9128  ac_check_lib_save_LIBS=$LIBS
9129LIBS="-l${ldaplib} ${extralib} $LIBS"
9130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9131/* end confdefs.h.  */
9132
9133/* Override any GCC internal prototype to avoid an error.
9134   Use char because int might match the return type of a GCC
9135   builtin and then its argument prototype would still apply.  */
9136#ifdef __cplusplus
9137extern "C"
9138#endif
9139char ldap_init ();
9140int
9141main ()
9142{
9143return ldap_init ();
9144  ;
9145  return 0;
9146}
9147_ACEOF
9148if ac_fn_c_try_link "$LINENO"; then :
9149  eval "$as_ac_Lib=yes"
9150else
9151  eval "$as_ac_Lib=no"
9152fi
9153rm -f core conftest.err conftest.$ac_objext \
9154    conftest$ac_exeext conftest.$ac_ext
9155LIBS=$ac_check_lib_save_LIBS
9156fi
9157eval ac_res=\$$as_ac_Lib
9158	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9159$as_echo "$ac_res" >&6; }
9160if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9161
9162        LDADD_ldap_found="-l${ldaplib} ${extralib}"
9163        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9165$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9166if eval \${$as_ac_Lib+:} false; then :
9167  $as_echo_n "(cached) " >&6
9168else
9169  ac_check_lib_save_LIBS=$LIBS
9170LIBS="-l${ldaplib} ${extralib} $LIBS"
9171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9172/* end confdefs.h.  */
9173
9174/* Override any GCC internal prototype to avoid an error.
9175   Use char because int might match the return type of a GCC
9176   builtin and then its argument prototype would still apply.  */
9177#ifdef __cplusplus
9178extern "C"
9179#endif
9180char ldapssl_client_init ();
9181int
9182main ()
9183{
9184return ldapssl_client_init ();
9185  ;
9186  return 0;
9187}
9188_ACEOF
9189if ac_fn_c_try_link "$LINENO"; then :
9190  eval "$as_ac_Lib=yes"
9191else
9192  eval "$as_ac_Lib=no"
9193fi
9194rm -f core conftest.err conftest.$ac_objext \
9195    conftest$ac_exeext conftest.$ac_ext
9196LIBS=$ac_check_lib_save_LIBS
9197fi
9198eval ac_res=\$$as_ac_Lib
9199	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9200$as_echo "$ac_res" >&6; }
9201if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9202  apu_has_ldapssl_client_init="1"
9203fi
9204
9205        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9207$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9208if eval \${$as_ac_Lib+:} false; then :
9209  $as_echo_n "(cached) " >&6
9210else
9211  ac_check_lib_save_LIBS=$LIBS
9212LIBS="-l${ldaplib} ${extralib} $LIBS"
9213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214/* end confdefs.h.  */
9215
9216/* Override any GCC internal prototype to avoid an error.
9217   Use char because int might match the return type of a GCC
9218   builtin and then its argument prototype would still apply.  */
9219#ifdef __cplusplus
9220extern "C"
9221#endif
9222char ldapssl_client_deinit ();
9223int
9224main ()
9225{
9226return ldapssl_client_deinit ();
9227  ;
9228  return 0;
9229}
9230_ACEOF
9231if ac_fn_c_try_link "$LINENO"; then :
9232  eval "$as_ac_Lib=yes"
9233else
9234  eval "$as_ac_Lib=no"
9235fi
9236rm -f core conftest.err conftest.$ac_objext \
9237    conftest$ac_exeext conftest.$ac_ext
9238LIBS=$ac_check_lib_save_LIBS
9239fi
9240eval ac_res=\$$as_ac_Lib
9241	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9242$as_echo "$ac_res" >&6; }
9243if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9244  apu_has_ldapssl_client_deinit="1"
9245fi
9246
9247        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9249$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9250if eval \${$as_ac_Lib+:} false; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  ac_check_lib_save_LIBS=$LIBS
9254LIBS="-l${ldaplib} ${extralib} $LIBS"
9255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9256/* end confdefs.h.  */
9257
9258/* Override any GCC internal prototype to avoid an error.
9259   Use char because int might match the return type of a GCC
9260   builtin and then its argument prototype would still apply.  */
9261#ifdef __cplusplus
9262extern "C"
9263#endif
9264char ldapssl_add_trusted_cert ();
9265int
9266main ()
9267{
9268return ldapssl_add_trusted_cert ();
9269  ;
9270  return 0;
9271}
9272_ACEOF
9273if ac_fn_c_try_link "$LINENO"; then :
9274  eval "$as_ac_Lib=yes"
9275else
9276  eval "$as_ac_Lib=no"
9277fi
9278rm -f core conftest.err conftest.$ac_objext \
9279    conftest$ac_exeext conftest.$ac_ext
9280LIBS=$ac_check_lib_save_LIBS
9281fi
9282eval ac_res=\$$as_ac_Lib
9283	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9284$as_echo "$ac_res" >&6; }
9285if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9286  apu_has_ldapssl_add_trusted_cert="1"
9287fi
9288
9289        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9291$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9292if eval \${$as_ac_Lib+:} false; then :
9293  $as_echo_n "(cached) " >&6
9294else
9295  ac_check_lib_save_LIBS=$LIBS
9296LIBS="-l${ldaplib} ${extralib} $LIBS"
9297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9298/* end confdefs.h.  */
9299
9300/* Override any GCC internal prototype to avoid an error.
9301   Use char because int might match the return type of a GCC
9302   builtin and then its argument prototype would still apply.  */
9303#ifdef __cplusplus
9304extern "C"
9305#endif
9306char ldap_start_tls_s ();
9307int
9308main ()
9309{
9310return ldap_start_tls_s ();
9311  ;
9312  return 0;
9313}
9314_ACEOF
9315if ac_fn_c_try_link "$LINENO"; then :
9316  eval "$as_ac_Lib=yes"
9317else
9318  eval "$as_ac_Lib=no"
9319fi
9320rm -f core conftest.err conftest.$ac_objext \
9321    conftest$ac_exeext conftest.$ac_ext
9322LIBS=$ac_check_lib_save_LIBS
9323fi
9324eval ac_res=\$$as_ac_Lib
9325	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9326$as_echo "$ac_res" >&6; }
9327if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9328  apu_has_ldap_start_tls_s="1"
9329fi
9330
9331        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9333$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9334if eval \${$as_ac_Lib+:} false; then :
9335  $as_echo_n "(cached) " >&6
9336else
9337  ac_check_lib_save_LIBS=$LIBS
9338LIBS="-l${ldaplib} ${extralib} $LIBS"
9339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9340/* end confdefs.h.  */
9341
9342/* Override any GCC internal prototype to avoid an error.
9343   Use char because int might match the return type of a GCC
9344   builtin and then its argument prototype would still apply.  */
9345#ifdef __cplusplus
9346extern "C"
9347#endif
9348char ldap_sslinit ();
9349int
9350main ()
9351{
9352return ldap_sslinit ();
9353  ;
9354  return 0;
9355}
9356_ACEOF
9357if ac_fn_c_try_link "$LINENO"; then :
9358  eval "$as_ac_Lib=yes"
9359else
9360  eval "$as_ac_Lib=no"
9361fi
9362rm -f core conftest.err conftest.$ac_objext \
9363    conftest$ac_exeext conftest.$ac_ext
9364LIBS=$ac_check_lib_save_LIBS
9365fi
9366eval ac_res=\$$as_ac_Lib
9367	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9368$as_echo "$ac_res" >&6; }
9369if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9370  apu_has_ldap_sslinit="1"
9371fi
9372
9373        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9375$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9376if eval \${$as_ac_Lib+:} false; then :
9377  $as_echo_n "(cached) " >&6
9378else
9379  ac_check_lib_save_LIBS=$LIBS
9380LIBS="-l${ldaplib} ${extralib} $LIBS"
9381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9382/* end confdefs.h.  */
9383
9384/* Override any GCC internal prototype to avoid an error.
9385   Use char because int might match the return type of a GCC
9386   builtin and then its argument prototype would still apply.  */
9387#ifdef __cplusplus
9388extern "C"
9389#endif
9390char ldapssl_init ();
9391int
9392main ()
9393{
9394return ldapssl_init ();
9395  ;
9396  return 0;
9397}
9398_ACEOF
9399if ac_fn_c_try_link "$LINENO"; then :
9400  eval "$as_ac_Lib=yes"
9401else
9402  eval "$as_ac_Lib=no"
9403fi
9404rm -f core conftest.err conftest.$ac_objext \
9405    conftest$ac_exeext conftest.$ac_ext
9406LIBS=$ac_check_lib_save_LIBS
9407fi
9408eval ac_res=\$$as_ac_Lib
9409	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9410$as_echo "$ac_res" >&6; }
9411if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9412  apu_has_ldapssl_init="1"
9413fi
9414
9415        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9417$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9418if eval \${$as_ac_Lib+:} false; then :
9419  $as_echo_n "(cached) " >&6
9420else
9421  ac_check_lib_save_LIBS=$LIBS
9422LIBS="-l${ldaplib} ${extralib} $LIBS"
9423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9424/* end confdefs.h.  */
9425
9426/* Override any GCC internal prototype to avoid an error.
9427   Use char because int might match the return type of a GCC
9428   builtin and then its argument prototype would still apply.  */
9429#ifdef __cplusplus
9430extern "C"
9431#endif
9432char ldapssl_install_routines ();
9433int
9434main ()
9435{
9436return ldapssl_install_routines ();
9437  ;
9438  return 0;
9439}
9440_ACEOF
9441if ac_fn_c_try_link "$LINENO"; then :
9442  eval "$as_ac_Lib=yes"
9443else
9444  eval "$as_ac_Lib=no"
9445fi
9446rm -f core conftest.err conftest.$ac_objext \
9447    conftest$ac_exeext conftest.$ac_ext
9448LIBS=$ac_check_lib_save_LIBS
9449fi
9450eval ac_res=\$$as_ac_Lib
9451	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9452$as_echo "$ac_res" >&6; }
9453if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9454  apu_has_ldapssl_install_routines="1"
9455fi
9456
9457        apu_has_ldap="1";
9458
9459fi
9460
9461  fi
9462
9463
9464  if test ${apu_has_ldap} != "1"; then
9465    ldaplib="ldap"
9466    extralib="-ldl -lpthread"
9467    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9468
9469    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9470
9471    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9472    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9473    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9475$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9476if eval \${$as_ac_Lib+:} false; then :
9477  $as_echo_n "(cached) " >&6
9478else
9479  ac_check_lib_save_LIBS=$LIBS
9480LIBS="-l${ldaplib} ${extralib} $LIBS"
9481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9482/* end confdefs.h.  */
9483
9484/* Override any GCC internal prototype to avoid an error.
9485   Use char because int might match the return type of a GCC
9486   builtin and then its argument prototype would still apply.  */
9487#ifdef __cplusplus
9488extern "C"
9489#endif
9490char ldap_init ();
9491int
9492main ()
9493{
9494return ldap_init ();
9495  ;
9496  return 0;
9497}
9498_ACEOF
9499if ac_fn_c_try_link "$LINENO"; then :
9500  eval "$as_ac_Lib=yes"
9501else
9502  eval "$as_ac_Lib=no"
9503fi
9504rm -f core conftest.err conftest.$ac_objext \
9505    conftest$ac_exeext conftest.$ac_ext
9506LIBS=$ac_check_lib_save_LIBS
9507fi
9508eval ac_res=\$$as_ac_Lib
9509	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9510$as_echo "$ac_res" >&6; }
9511if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9512
9513        LDADD_ldap_found="-l${ldaplib} ${extralib}"
9514        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9516$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9517if eval \${$as_ac_Lib+:} false; then :
9518  $as_echo_n "(cached) " >&6
9519else
9520  ac_check_lib_save_LIBS=$LIBS
9521LIBS="-l${ldaplib} ${extralib} $LIBS"
9522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9523/* end confdefs.h.  */
9524
9525/* Override any GCC internal prototype to avoid an error.
9526   Use char because int might match the return type of a GCC
9527   builtin and then its argument prototype would still apply.  */
9528#ifdef __cplusplus
9529extern "C"
9530#endif
9531char ldapssl_client_init ();
9532int
9533main ()
9534{
9535return ldapssl_client_init ();
9536  ;
9537  return 0;
9538}
9539_ACEOF
9540if ac_fn_c_try_link "$LINENO"; then :
9541  eval "$as_ac_Lib=yes"
9542else
9543  eval "$as_ac_Lib=no"
9544fi
9545rm -f core conftest.err conftest.$ac_objext \
9546    conftest$ac_exeext conftest.$ac_ext
9547LIBS=$ac_check_lib_save_LIBS
9548fi
9549eval ac_res=\$$as_ac_Lib
9550	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9551$as_echo "$ac_res" >&6; }
9552if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9553  apu_has_ldapssl_client_init="1"
9554fi
9555
9556        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9558$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9559if eval \${$as_ac_Lib+:} false; then :
9560  $as_echo_n "(cached) " >&6
9561else
9562  ac_check_lib_save_LIBS=$LIBS
9563LIBS="-l${ldaplib} ${extralib} $LIBS"
9564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9565/* end confdefs.h.  */
9566
9567/* Override any GCC internal prototype to avoid an error.
9568   Use char because int might match the return type of a GCC
9569   builtin and then its argument prototype would still apply.  */
9570#ifdef __cplusplus
9571extern "C"
9572#endif
9573char ldapssl_client_deinit ();
9574int
9575main ()
9576{
9577return ldapssl_client_deinit ();
9578  ;
9579  return 0;
9580}
9581_ACEOF
9582if ac_fn_c_try_link "$LINENO"; then :
9583  eval "$as_ac_Lib=yes"
9584else
9585  eval "$as_ac_Lib=no"
9586fi
9587rm -f core conftest.err conftest.$ac_objext \
9588    conftest$ac_exeext conftest.$ac_ext
9589LIBS=$ac_check_lib_save_LIBS
9590fi
9591eval ac_res=\$$as_ac_Lib
9592	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9593$as_echo "$ac_res" >&6; }
9594if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9595  apu_has_ldapssl_client_deinit="1"
9596fi
9597
9598        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9600$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9601if eval \${$as_ac_Lib+:} false; then :
9602  $as_echo_n "(cached) " >&6
9603else
9604  ac_check_lib_save_LIBS=$LIBS
9605LIBS="-l${ldaplib} ${extralib} $LIBS"
9606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9607/* end confdefs.h.  */
9608
9609/* Override any GCC internal prototype to avoid an error.
9610   Use char because int might match the return type of a GCC
9611   builtin and then its argument prototype would still apply.  */
9612#ifdef __cplusplus
9613extern "C"
9614#endif
9615char ldapssl_add_trusted_cert ();
9616int
9617main ()
9618{
9619return ldapssl_add_trusted_cert ();
9620  ;
9621  return 0;
9622}
9623_ACEOF
9624if ac_fn_c_try_link "$LINENO"; then :
9625  eval "$as_ac_Lib=yes"
9626else
9627  eval "$as_ac_Lib=no"
9628fi
9629rm -f core conftest.err conftest.$ac_objext \
9630    conftest$ac_exeext conftest.$ac_ext
9631LIBS=$ac_check_lib_save_LIBS
9632fi
9633eval ac_res=\$$as_ac_Lib
9634	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9635$as_echo "$ac_res" >&6; }
9636if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9637  apu_has_ldapssl_add_trusted_cert="1"
9638fi
9639
9640        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9642$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9643if eval \${$as_ac_Lib+:} false; then :
9644  $as_echo_n "(cached) " >&6
9645else
9646  ac_check_lib_save_LIBS=$LIBS
9647LIBS="-l${ldaplib} ${extralib} $LIBS"
9648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9649/* end confdefs.h.  */
9650
9651/* Override any GCC internal prototype to avoid an error.
9652   Use char because int might match the return type of a GCC
9653   builtin and then its argument prototype would still apply.  */
9654#ifdef __cplusplus
9655extern "C"
9656#endif
9657char ldap_start_tls_s ();
9658int
9659main ()
9660{
9661return ldap_start_tls_s ();
9662  ;
9663  return 0;
9664}
9665_ACEOF
9666if ac_fn_c_try_link "$LINENO"; then :
9667  eval "$as_ac_Lib=yes"
9668else
9669  eval "$as_ac_Lib=no"
9670fi
9671rm -f core conftest.err conftest.$ac_objext \
9672    conftest$ac_exeext conftest.$ac_ext
9673LIBS=$ac_check_lib_save_LIBS
9674fi
9675eval ac_res=\$$as_ac_Lib
9676	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9677$as_echo "$ac_res" >&6; }
9678if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9679  apu_has_ldap_start_tls_s="1"
9680fi
9681
9682        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9684$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9685if eval \${$as_ac_Lib+:} false; then :
9686  $as_echo_n "(cached) " >&6
9687else
9688  ac_check_lib_save_LIBS=$LIBS
9689LIBS="-l${ldaplib} ${extralib} $LIBS"
9690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9691/* end confdefs.h.  */
9692
9693/* Override any GCC internal prototype to avoid an error.
9694   Use char because int might match the return type of a GCC
9695   builtin and then its argument prototype would still apply.  */
9696#ifdef __cplusplus
9697extern "C"
9698#endif
9699char ldap_sslinit ();
9700int
9701main ()
9702{
9703return ldap_sslinit ();
9704  ;
9705  return 0;
9706}
9707_ACEOF
9708if ac_fn_c_try_link "$LINENO"; then :
9709  eval "$as_ac_Lib=yes"
9710else
9711  eval "$as_ac_Lib=no"
9712fi
9713rm -f core conftest.err conftest.$ac_objext \
9714    conftest$ac_exeext conftest.$ac_ext
9715LIBS=$ac_check_lib_save_LIBS
9716fi
9717eval ac_res=\$$as_ac_Lib
9718	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9719$as_echo "$ac_res" >&6; }
9720if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9721  apu_has_ldap_sslinit="1"
9722fi
9723
9724        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9726$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9727if eval \${$as_ac_Lib+:} false; then :
9728  $as_echo_n "(cached) " >&6
9729else
9730  ac_check_lib_save_LIBS=$LIBS
9731LIBS="-l${ldaplib} ${extralib} $LIBS"
9732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9733/* end confdefs.h.  */
9734
9735/* Override any GCC internal prototype to avoid an error.
9736   Use char because int might match the return type of a GCC
9737   builtin and then its argument prototype would still apply.  */
9738#ifdef __cplusplus
9739extern "C"
9740#endif
9741char ldapssl_init ();
9742int
9743main ()
9744{
9745return ldapssl_init ();
9746  ;
9747  return 0;
9748}
9749_ACEOF
9750if ac_fn_c_try_link "$LINENO"; then :
9751  eval "$as_ac_Lib=yes"
9752else
9753  eval "$as_ac_Lib=no"
9754fi
9755rm -f core conftest.err conftest.$ac_objext \
9756    conftest$ac_exeext conftest.$ac_ext
9757LIBS=$ac_check_lib_save_LIBS
9758fi
9759eval ac_res=\$$as_ac_Lib
9760	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9761$as_echo "$ac_res" >&6; }
9762if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9763  apu_has_ldapssl_init="1"
9764fi
9765
9766        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9768$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9769if eval \${$as_ac_Lib+:} false; then :
9770  $as_echo_n "(cached) " >&6
9771else
9772  ac_check_lib_save_LIBS=$LIBS
9773LIBS="-l${ldaplib} ${extralib} $LIBS"
9774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775/* end confdefs.h.  */
9776
9777/* Override any GCC internal prototype to avoid an error.
9778   Use char because int might match the return type of a GCC
9779   builtin and then its argument prototype would still apply.  */
9780#ifdef __cplusplus
9781extern "C"
9782#endif
9783char ldapssl_install_routines ();
9784int
9785main ()
9786{
9787return ldapssl_install_routines ();
9788  ;
9789  return 0;
9790}
9791_ACEOF
9792if ac_fn_c_try_link "$LINENO"; then :
9793  eval "$as_ac_Lib=yes"
9794else
9795  eval "$as_ac_Lib=no"
9796fi
9797rm -f core conftest.err conftest.$ac_objext \
9798    conftest$ac_exeext conftest.$ac_ext
9799LIBS=$ac_check_lib_save_LIBS
9800fi
9801eval ac_res=\$$as_ac_Lib
9802	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9803$as_echo "$ac_res" >&6; }
9804if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9805  apu_has_ldapssl_install_routines="1"
9806fi
9807
9808        apu_has_ldap="1";
9809
9810fi
9811
9812  fi
9813
9814      else
9815
9816  if test ${apu_has_ldap} != "1"; then
9817    ldaplib=$LIBLDAP
9818    extralib=
9819    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9820
9821    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9822
9823    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9824    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9825    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9827$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9828if eval \${$as_ac_Lib+:} false; then :
9829  $as_echo_n "(cached) " >&6
9830else
9831  ac_check_lib_save_LIBS=$LIBS
9832LIBS="-l${ldaplib} ${extralib} $LIBS"
9833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9834/* end confdefs.h.  */
9835
9836/* Override any GCC internal prototype to avoid an error.
9837   Use char because int might match the return type of a GCC
9838   builtin and then its argument prototype would still apply.  */
9839#ifdef __cplusplus
9840extern "C"
9841#endif
9842char ldap_init ();
9843int
9844main ()
9845{
9846return ldap_init ();
9847  ;
9848  return 0;
9849}
9850_ACEOF
9851if ac_fn_c_try_link "$LINENO"; then :
9852  eval "$as_ac_Lib=yes"
9853else
9854  eval "$as_ac_Lib=no"
9855fi
9856rm -f core conftest.err conftest.$ac_objext \
9857    conftest$ac_exeext conftest.$ac_ext
9858LIBS=$ac_check_lib_save_LIBS
9859fi
9860eval ac_res=\$$as_ac_Lib
9861	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9862$as_echo "$ac_res" >&6; }
9863if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9864
9865        LDADD_ldap_found="-l${ldaplib} ${extralib}"
9866        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9868$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9869if eval \${$as_ac_Lib+:} false; then :
9870  $as_echo_n "(cached) " >&6
9871else
9872  ac_check_lib_save_LIBS=$LIBS
9873LIBS="-l${ldaplib} ${extralib} $LIBS"
9874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9875/* end confdefs.h.  */
9876
9877/* Override any GCC internal prototype to avoid an error.
9878   Use char because int might match the return type of a GCC
9879   builtin and then its argument prototype would still apply.  */
9880#ifdef __cplusplus
9881extern "C"
9882#endif
9883char ldapssl_client_init ();
9884int
9885main ()
9886{
9887return ldapssl_client_init ();
9888  ;
9889  return 0;
9890}
9891_ACEOF
9892if ac_fn_c_try_link "$LINENO"; then :
9893  eval "$as_ac_Lib=yes"
9894else
9895  eval "$as_ac_Lib=no"
9896fi
9897rm -f core conftest.err conftest.$ac_objext \
9898    conftest$ac_exeext conftest.$ac_ext
9899LIBS=$ac_check_lib_save_LIBS
9900fi
9901eval ac_res=\$$as_ac_Lib
9902	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9903$as_echo "$ac_res" >&6; }
9904if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9905  apu_has_ldapssl_client_init="1"
9906fi
9907
9908        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9910$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9911if eval \${$as_ac_Lib+:} false; then :
9912  $as_echo_n "(cached) " >&6
9913else
9914  ac_check_lib_save_LIBS=$LIBS
9915LIBS="-l${ldaplib} ${extralib} $LIBS"
9916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9917/* end confdefs.h.  */
9918
9919/* Override any GCC internal prototype to avoid an error.
9920   Use char because int might match the return type of a GCC
9921   builtin and then its argument prototype would still apply.  */
9922#ifdef __cplusplus
9923extern "C"
9924#endif
9925char ldapssl_client_deinit ();
9926int
9927main ()
9928{
9929return ldapssl_client_deinit ();
9930  ;
9931  return 0;
9932}
9933_ACEOF
9934if ac_fn_c_try_link "$LINENO"; then :
9935  eval "$as_ac_Lib=yes"
9936else
9937  eval "$as_ac_Lib=no"
9938fi
9939rm -f core conftest.err conftest.$ac_objext \
9940    conftest$ac_exeext conftest.$ac_ext
9941LIBS=$ac_check_lib_save_LIBS
9942fi
9943eval ac_res=\$$as_ac_Lib
9944	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9945$as_echo "$ac_res" >&6; }
9946if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9947  apu_has_ldapssl_client_deinit="1"
9948fi
9949
9950        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9952$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9953if eval \${$as_ac_Lib+:} false; then :
9954  $as_echo_n "(cached) " >&6
9955else
9956  ac_check_lib_save_LIBS=$LIBS
9957LIBS="-l${ldaplib} ${extralib} $LIBS"
9958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9959/* end confdefs.h.  */
9960
9961/* Override any GCC internal prototype to avoid an error.
9962   Use char because int might match the return type of a GCC
9963   builtin and then its argument prototype would still apply.  */
9964#ifdef __cplusplus
9965extern "C"
9966#endif
9967char ldapssl_add_trusted_cert ();
9968int
9969main ()
9970{
9971return ldapssl_add_trusted_cert ();
9972  ;
9973  return 0;
9974}
9975_ACEOF
9976if ac_fn_c_try_link "$LINENO"; then :
9977  eval "$as_ac_Lib=yes"
9978else
9979  eval "$as_ac_Lib=no"
9980fi
9981rm -f core conftest.err conftest.$ac_objext \
9982    conftest$ac_exeext conftest.$ac_ext
9983LIBS=$ac_check_lib_save_LIBS
9984fi
9985eval ac_res=\$$as_ac_Lib
9986	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9987$as_echo "$ac_res" >&6; }
9988if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9989  apu_has_ldapssl_add_trusted_cert="1"
9990fi
9991
9992        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9994$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9995if eval \${$as_ac_Lib+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  ac_check_lib_save_LIBS=$LIBS
9999LIBS="-l${ldaplib} ${extralib} $LIBS"
10000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10001/* end confdefs.h.  */
10002
10003/* Override any GCC internal prototype to avoid an error.
10004   Use char because int might match the return type of a GCC
10005   builtin and then its argument prototype would still apply.  */
10006#ifdef __cplusplus
10007extern "C"
10008#endif
10009char ldap_start_tls_s ();
10010int
10011main ()
10012{
10013return ldap_start_tls_s ();
10014  ;
10015  return 0;
10016}
10017_ACEOF
10018if ac_fn_c_try_link "$LINENO"; then :
10019  eval "$as_ac_Lib=yes"
10020else
10021  eval "$as_ac_Lib=no"
10022fi
10023rm -f core conftest.err conftest.$ac_objext \
10024    conftest$ac_exeext conftest.$ac_ext
10025LIBS=$ac_check_lib_save_LIBS
10026fi
10027eval ac_res=\$$as_ac_Lib
10028	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10029$as_echo "$ac_res" >&6; }
10030if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10031  apu_has_ldap_start_tls_s="1"
10032fi
10033
10034        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10036$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10037if eval \${$as_ac_Lib+:} false; then :
10038  $as_echo_n "(cached) " >&6
10039else
10040  ac_check_lib_save_LIBS=$LIBS
10041LIBS="-l${ldaplib} ${extralib} $LIBS"
10042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10043/* end confdefs.h.  */
10044
10045/* Override any GCC internal prototype to avoid an error.
10046   Use char because int might match the return type of a GCC
10047   builtin and then its argument prototype would still apply.  */
10048#ifdef __cplusplus
10049extern "C"
10050#endif
10051char ldap_sslinit ();
10052int
10053main ()
10054{
10055return ldap_sslinit ();
10056  ;
10057  return 0;
10058}
10059_ACEOF
10060if ac_fn_c_try_link "$LINENO"; then :
10061  eval "$as_ac_Lib=yes"
10062else
10063  eval "$as_ac_Lib=no"
10064fi
10065rm -f core conftest.err conftest.$ac_objext \
10066    conftest$ac_exeext conftest.$ac_ext
10067LIBS=$ac_check_lib_save_LIBS
10068fi
10069eval ac_res=\$$as_ac_Lib
10070	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10071$as_echo "$ac_res" >&6; }
10072if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10073  apu_has_ldap_sslinit="1"
10074fi
10075
10076        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10078$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10079if eval \${$as_ac_Lib+:} false; then :
10080  $as_echo_n "(cached) " >&6
10081else
10082  ac_check_lib_save_LIBS=$LIBS
10083LIBS="-l${ldaplib} ${extralib} $LIBS"
10084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10085/* end confdefs.h.  */
10086
10087/* Override any GCC internal prototype to avoid an error.
10088   Use char because int might match the return type of a GCC
10089   builtin and then its argument prototype would still apply.  */
10090#ifdef __cplusplus
10091extern "C"
10092#endif
10093char ldapssl_init ();
10094int
10095main ()
10096{
10097return ldapssl_init ();
10098  ;
10099  return 0;
10100}
10101_ACEOF
10102if ac_fn_c_try_link "$LINENO"; then :
10103  eval "$as_ac_Lib=yes"
10104else
10105  eval "$as_ac_Lib=no"
10106fi
10107rm -f core conftest.err conftest.$ac_objext \
10108    conftest$ac_exeext conftest.$ac_ext
10109LIBS=$ac_check_lib_save_LIBS
10110fi
10111eval ac_res=\$$as_ac_Lib
10112	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10113$as_echo "$ac_res" >&6; }
10114if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10115  apu_has_ldapssl_init="1"
10116fi
10117
10118        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10120$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10121if eval \${$as_ac_Lib+:} false; then :
10122  $as_echo_n "(cached) " >&6
10123else
10124  ac_check_lib_save_LIBS=$LIBS
10125LIBS="-l${ldaplib} ${extralib} $LIBS"
10126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10127/* end confdefs.h.  */
10128
10129/* Override any GCC internal prototype to avoid an error.
10130   Use char because int might match the return type of a GCC
10131   builtin and then its argument prototype would still apply.  */
10132#ifdef __cplusplus
10133extern "C"
10134#endif
10135char ldapssl_install_routines ();
10136int
10137main ()
10138{
10139return ldapssl_install_routines ();
10140  ;
10141  return 0;
10142}
10143_ACEOF
10144if ac_fn_c_try_link "$LINENO"; then :
10145  eval "$as_ac_Lib=yes"
10146else
10147  eval "$as_ac_Lib=no"
10148fi
10149rm -f core conftest.err conftest.$ac_objext \
10150    conftest$ac_exeext conftest.$ac_ext
10151LIBS=$ac_check_lib_save_LIBS
10152fi
10153eval ac_res=\$$as_ac_Lib
10154	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10155$as_echo "$ac_res" >&6; }
10156if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10157  apu_has_ldapssl_install_routines="1"
10158fi
10159
10160        apu_has_ldap="1";
10161
10162fi
10163
10164  fi
10165
10166
10167  if test ${apu_has_ldap} != "1"; then
10168    ldaplib=$LIBLDAP
10169    extralib="-lresolv"
10170    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10171
10172    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10173
10174    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10175    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10176    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10178$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10179if eval \${$as_ac_Lib+:} false; then :
10180  $as_echo_n "(cached) " >&6
10181else
10182  ac_check_lib_save_LIBS=$LIBS
10183LIBS="-l${ldaplib} ${extralib} $LIBS"
10184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10185/* end confdefs.h.  */
10186
10187/* Override any GCC internal prototype to avoid an error.
10188   Use char because int might match the return type of a GCC
10189   builtin and then its argument prototype would still apply.  */
10190#ifdef __cplusplus
10191extern "C"
10192#endif
10193char ldap_init ();
10194int
10195main ()
10196{
10197return ldap_init ();
10198  ;
10199  return 0;
10200}
10201_ACEOF
10202if ac_fn_c_try_link "$LINENO"; then :
10203  eval "$as_ac_Lib=yes"
10204else
10205  eval "$as_ac_Lib=no"
10206fi
10207rm -f core conftest.err conftest.$ac_objext \
10208    conftest$ac_exeext conftest.$ac_ext
10209LIBS=$ac_check_lib_save_LIBS
10210fi
10211eval ac_res=\$$as_ac_Lib
10212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10213$as_echo "$ac_res" >&6; }
10214if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10215
10216        LDADD_ldap_found="-l${ldaplib} ${extralib}"
10217        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10219$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10220if eval \${$as_ac_Lib+:} false; then :
10221  $as_echo_n "(cached) " >&6
10222else
10223  ac_check_lib_save_LIBS=$LIBS
10224LIBS="-l${ldaplib} ${extralib} $LIBS"
10225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10226/* end confdefs.h.  */
10227
10228/* Override any GCC internal prototype to avoid an error.
10229   Use char because int might match the return type of a GCC
10230   builtin and then its argument prototype would still apply.  */
10231#ifdef __cplusplus
10232extern "C"
10233#endif
10234char ldapssl_client_init ();
10235int
10236main ()
10237{
10238return ldapssl_client_init ();
10239  ;
10240  return 0;
10241}
10242_ACEOF
10243if ac_fn_c_try_link "$LINENO"; then :
10244  eval "$as_ac_Lib=yes"
10245else
10246  eval "$as_ac_Lib=no"
10247fi
10248rm -f core conftest.err conftest.$ac_objext \
10249    conftest$ac_exeext conftest.$ac_ext
10250LIBS=$ac_check_lib_save_LIBS
10251fi
10252eval ac_res=\$$as_ac_Lib
10253	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10254$as_echo "$ac_res" >&6; }
10255if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10256  apu_has_ldapssl_client_init="1"
10257fi
10258
10259        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10261$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10262if eval \${$as_ac_Lib+:} false; then :
10263  $as_echo_n "(cached) " >&6
10264else
10265  ac_check_lib_save_LIBS=$LIBS
10266LIBS="-l${ldaplib} ${extralib} $LIBS"
10267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10268/* end confdefs.h.  */
10269
10270/* Override any GCC internal prototype to avoid an error.
10271   Use char because int might match the return type of a GCC
10272   builtin and then its argument prototype would still apply.  */
10273#ifdef __cplusplus
10274extern "C"
10275#endif
10276char ldapssl_client_deinit ();
10277int
10278main ()
10279{
10280return ldapssl_client_deinit ();
10281  ;
10282  return 0;
10283}
10284_ACEOF
10285if ac_fn_c_try_link "$LINENO"; then :
10286  eval "$as_ac_Lib=yes"
10287else
10288  eval "$as_ac_Lib=no"
10289fi
10290rm -f core conftest.err conftest.$ac_objext \
10291    conftest$ac_exeext conftest.$ac_ext
10292LIBS=$ac_check_lib_save_LIBS
10293fi
10294eval ac_res=\$$as_ac_Lib
10295	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10296$as_echo "$ac_res" >&6; }
10297if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10298  apu_has_ldapssl_client_deinit="1"
10299fi
10300
10301        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10303$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10304if eval \${$as_ac_Lib+:} false; then :
10305  $as_echo_n "(cached) " >&6
10306else
10307  ac_check_lib_save_LIBS=$LIBS
10308LIBS="-l${ldaplib} ${extralib} $LIBS"
10309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10310/* end confdefs.h.  */
10311
10312/* Override any GCC internal prototype to avoid an error.
10313   Use char because int might match the return type of a GCC
10314   builtin and then its argument prototype would still apply.  */
10315#ifdef __cplusplus
10316extern "C"
10317#endif
10318char ldapssl_add_trusted_cert ();
10319int
10320main ()
10321{
10322return ldapssl_add_trusted_cert ();
10323  ;
10324  return 0;
10325}
10326_ACEOF
10327if ac_fn_c_try_link "$LINENO"; then :
10328  eval "$as_ac_Lib=yes"
10329else
10330  eval "$as_ac_Lib=no"
10331fi
10332rm -f core conftest.err conftest.$ac_objext \
10333    conftest$ac_exeext conftest.$ac_ext
10334LIBS=$ac_check_lib_save_LIBS
10335fi
10336eval ac_res=\$$as_ac_Lib
10337	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10338$as_echo "$ac_res" >&6; }
10339if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10340  apu_has_ldapssl_add_trusted_cert="1"
10341fi
10342
10343        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10345$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10346if eval \${$as_ac_Lib+:} false; then :
10347  $as_echo_n "(cached) " >&6
10348else
10349  ac_check_lib_save_LIBS=$LIBS
10350LIBS="-l${ldaplib} ${extralib} $LIBS"
10351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10352/* end confdefs.h.  */
10353
10354/* Override any GCC internal prototype to avoid an error.
10355   Use char because int might match the return type of a GCC
10356   builtin and then its argument prototype would still apply.  */
10357#ifdef __cplusplus
10358extern "C"
10359#endif
10360char ldap_start_tls_s ();
10361int
10362main ()
10363{
10364return ldap_start_tls_s ();
10365  ;
10366  return 0;
10367}
10368_ACEOF
10369if ac_fn_c_try_link "$LINENO"; then :
10370  eval "$as_ac_Lib=yes"
10371else
10372  eval "$as_ac_Lib=no"
10373fi
10374rm -f core conftest.err conftest.$ac_objext \
10375    conftest$ac_exeext conftest.$ac_ext
10376LIBS=$ac_check_lib_save_LIBS
10377fi
10378eval ac_res=\$$as_ac_Lib
10379	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10380$as_echo "$ac_res" >&6; }
10381if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10382  apu_has_ldap_start_tls_s="1"
10383fi
10384
10385        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10387$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10388if eval \${$as_ac_Lib+:} false; then :
10389  $as_echo_n "(cached) " >&6
10390else
10391  ac_check_lib_save_LIBS=$LIBS
10392LIBS="-l${ldaplib} ${extralib} $LIBS"
10393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10394/* end confdefs.h.  */
10395
10396/* Override any GCC internal prototype to avoid an error.
10397   Use char because int might match the return type of a GCC
10398   builtin and then its argument prototype would still apply.  */
10399#ifdef __cplusplus
10400extern "C"
10401#endif
10402char ldap_sslinit ();
10403int
10404main ()
10405{
10406return ldap_sslinit ();
10407  ;
10408  return 0;
10409}
10410_ACEOF
10411if ac_fn_c_try_link "$LINENO"; then :
10412  eval "$as_ac_Lib=yes"
10413else
10414  eval "$as_ac_Lib=no"
10415fi
10416rm -f core conftest.err conftest.$ac_objext \
10417    conftest$ac_exeext conftest.$ac_ext
10418LIBS=$ac_check_lib_save_LIBS
10419fi
10420eval ac_res=\$$as_ac_Lib
10421	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10422$as_echo "$ac_res" >&6; }
10423if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10424  apu_has_ldap_sslinit="1"
10425fi
10426
10427        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10429$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10430if eval \${$as_ac_Lib+:} false; then :
10431  $as_echo_n "(cached) " >&6
10432else
10433  ac_check_lib_save_LIBS=$LIBS
10434LIBS="-l${ldaplib} ${extralib} $LIBS"
10435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10436/* end confdefs.h.  */
10437
10438/* Override any GCC internal prototype to avoid an error.
10439   Use char because int might match the return type of a GCC
10440   builtin and then its argument prototype would still apply.  */
10441#ifdef __cplusplus
10442extern "C"
10443#endif
10444char ldapssl_init ();
10445int
10446main ()
10447{
10448return ldapssl_init ();
10449  ;
10450  return 0;
10451}
10452_ACEOF
10453if ac_fn_c_try_link "$LINENO"; then :
10454  eval "$as_ac_Lib=yes"
10455else
10456  eval "$as_ac_Lib=no"
10457fi
10458rm -f core conftest.err conftest.$ac_objext \
10459    conftest$ac_exeext conftest.$ac_ext
10460LIBS=$ac_check_lib_save_LIBS
10461fi
10462eval ac_res=\$$as_ac_Lib
10463	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10464$as_echo "$ac_res" >&6; }
10465if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10466  apu_has_ldapssl_init="1"
10467fi
10468
10469        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10471$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10472if eval \${$as_ac_Lib+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  ac_check_lib_save_LIBS=$LIBS
10476LIBS="-l${ldaplib} ${extralib} $LIBS"
10477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10478/* end confdefs.h.  */
10479
10480/* Override any GCC internal prototype to avoid an error.
10481   Use char because int might match the return type of a GCC
10482   builtin and then its argument prototype would still apply.  */
10483#ifdef __cplusplus
10484extern "C"
10485#endif
10486char ldapssl_install_routines ();
10487int
10488main ()
10489{
10490return ldapssl_install_routines ();
10491  ;
10492  return 0;
10493}
10494_ACEOF
10495if ac_fn_c_try_link "$LINENO"; then :
10496  eval "$as_ac_Lib=yes"
10497else
10498  eval "$as_ac_Lib=no"
10499fi
10500rm -f core conftest.err conftest.$ac_objext \
10501    conftest$ac_exeext conftest.$ac_ext
10502LIBS=$ac_check_lib_save_LIBS
10503fi
10504eval ac_res=\$$as_ac_Lib
10505	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10506$as_echo "$ac_res" >&6; }
10507if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10508  apu_has_ldapssl_install_routines="1"
10509fi
10510
10511        apu_has_ldap="1";
10512
10513fi
10514
10515  fi
10516
10517
10518  if test ${apu_has_ldap} != "1"; then
10519    ldaplib=$LIBLDAP
10520    extralib="-lresolv -lsocket -lnsl"
10521    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10522
10523    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10524
10525    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10526    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10527    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10529$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10530if eval \${$as_ac_Lib+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  ac_check_lib_save_LIBS=$LIBS
10534LIBS="-l${ldaplib} ${extralib} $LIBS"
10535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10536/* end confdefs.h.  */
10537
10538/* Override any GCC internal prototype to avoid an error.
10539   Use char because int might match the return type of a GCC
10540   builtin and then its argument prototype would still apply.  */
10541#ifdef __cplusplus
10542extern "C"
10543#endif
10544char ldap_init ();
10545int
10546main ()
10547{
10548return ldap_init ();
10549  ;
10550  return 0;
10551}
10552_ACEOF
10553if ac_fn_c_try_link "$LINENO"; then :
10554  eval "$as_ac_Lib=yes"
10555else
10556  eval "$as_ac_Lib=no"
10557fi
10558rm -f core conftest.err conftest.$ac_objext \
10559    conftest$ac_exeext conftest.$ac_ext
10560LIBS=$ac_check_lib_save_LIBS
10561fi
10562eval ac_res=\$$as_ac_Lib
10563	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10564$as_echo "$ac_res" >&6; }
10565if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10566
10567        LDADD_ldap_found="-l${ldaplib} ${extralib}"
10568        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10570$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10571if eval \${$as_ac_Lib+:} false; then :
10572  $as_echo_n "(cached) " >&6
10573else
10574  ac_check_lib_save_LIBS=$LIBS
10575LIBS="-l${ldaplib} ${extralib} $LIBS"
10576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10577/* end confdefs.h.  */
10578
10579/* Override any GCC internal prototype to avoid an error.
10580   Use char because int might match the return type of a GCC
10581   builtin and then its argument prototype would still apply.  */
10582#ifdef __cplusplus
10583extern "C"
10584#endif
10585char ldapssl_client_init ();
10586int
10587main ()
10588{
10589return ldapssl_client_init ();
10590  ;
10591  return 0;
10592}
10593_ACEOF
10594if ac_fn_c_try_link "$LINENO"; then :
10595  eval "$as_ac_Lib=yes"
10596else
10597  eval "$as_ac_Lib=no"
10598fi
10599rm -f core conftest.err conftest.$ac_objext \
10600    conftest$ac_exeext conftest.$ac_ext
10601LIBS=$ac_check_lib_save_LIBS
10602fi
10603eval ac_res=\$$as_ac_Lib
10604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10605$as_echo "$ac_res" >&6; }
10606if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10607  apu_has_ldapssl_client_init="1"
10608fi
10609
10610        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10612$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10613if eval \${$as_ac_Lib+:} false; then :
10614  $as_echo_n "(cached) " >&6
10615else
10616  ac_check_lib_save_LIBS=$LIBS
10617LIBS="-l${ldaplib} ${extralib} $LIBS"
10618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10619/* end confdefs.h.  */
10620
10621/* Override any GCC internal prototype to avoid an error.
10622   Use char because int might match the return type of a GCC
10623   builtin and then its argument prototype would still apply.  */
10624#ifdef __cplusplus
10625extern "C"
10626#endif
10627char ldapssl_client_deinit ();
10628int
10629main ()
10630{
10631return ldapssl_client_deinit ();
10632  ;
10633  return 0;
10634}
10635_ACEOF
10636if ac_fn_c_try_link "$LINENO"; then :
10637  eval "$as_ac_Lib=yes"
10638else
10639  eval "$as_ac_Lib=no"
10640fi
10641rm -f core conftest.err conftest.$ac_objext \
10642    conftest$ac_exeext conftest.$ac_ext
10643LIBS=$ac_check_lib_save_LIBS
10644fi
10645eval ac_res=\$$as_ac_Lib
10646	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10647$as_echo "$ac_res" >&6; }
10648if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10649  apu_has_ldapssl_client_deinit="1"
10650fi
10651
10652        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10654$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10655if eval \${$as_ac_Lib+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  ac_check_lib_save_LIBS=$LIBS
10659LIBS="-l${ldaplib} ${extralib} $LIBS"
10660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10661/* end confdefs.h.  */
10662
10663/* Override any GCC internal prototype to avoid an error.
10664   Use char because int might match the return type of a GCC
10665   builtin and then its argument prototype would still apply.  */
10666#ifdef __cplusplus
10667extern "C"
10668#endif
10669char ldapssl_add_trusted_cert ();
10670int
10671main ()
10672{
10673return ldapssl_add_trusted_cert ();
10674  ;
10675  return 0;
10676}
10677_ACEOF
10678if ac_fn_c_try_link "$LINENO"; then :
10679  eval "$as_ac_Lib=yes"
10680else
10681  eval "$as_ac_Lib=no"
10682fi
10683rm -f core conftest.err conftest.$ac_objext \
10684    conftest$ac_exeext conftest.$ac_ext
10685LIBS=$ac_check_lib_save_LIBS
10686fi
10687eval ac_res=\$$as_ac_Lib
10688	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10689$as_echo "$ac_res" >&6; }
10690if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10691  apu_has_ldapssl_add_trusted_cert="1"
10692fi
10693
10694        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10696$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10697if eval \${$as_ac_Lib+:} false; then :
10698  $as_echo_n "(cached) " >&6
10699else
10700  ac_check_lib_save_LIBS=$LIBS
10701LIBS="-l${ldaplib} ${extralib} $LIBS"
10702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10703/* end confdefs.h.  */
10704
10705/* Override any GCC internal prototype to avoid an error.
10706   Use char because int might match the return type of a GCC
10707   builtin and then its argument prototype would still apply.  */
10708#ifdef __cplusplus
10709extern "C"
10710#endif
10711char ldap_start_tls_s ();
10712int
10713main ()
10714{
10715return ldap_start_tls_s ();
10716  ;
10717  return 0;
10718}
10719_ACEOF
10720if ac_fn_c_try_link "$LINENO"; then :
10721  eval "$as_ac_Lib=yes"
10722else
10723  eval "$as_ac_Lib=no"
10724fi
10725rm -f core conftest.err conftest.$ac_objext \
10726    conftest$ac_exeext conftest.$ac_ext
10727LIBS=$ac_check_lib_save_LIBS
10728fi
10729eval ac_res=\$$as_ac_Lib
10730	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10731$as_echo "$ac_res" >&6; }
10732if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10733  apu_has_ldap_start_tls_s="1"
10734fi
10735
10736        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10738$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10739if eval \${$as_ac_Lib+:} false; then :
10740  $as_echo_n "(cached) " >&6
10741else
10742  ac_check_lib_save_LIBS=$LIBS
10743LIBS="-l${ldaplib} ${extralib} $LIBS"
10744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10745/* end confdefs.h.  */
10746
10747/* Override any GCC internal prototype to avoid an error.
10748   Use char because int might match the return type of a GCC
10749   builtin and then its argument prototype would still apply.  */
10750#ifdef __cplusplus
10751extern "C"
10752#endif
10753char ldap_sslinit ();
10754int
10755main ()
10756{
10757return ldap_sslinit ();
10758  ;
10759  return 0;
10760}
10761_ACEOF
10762if ac_fn_c_try_link "$LINENO"; then :
10763  eval "$as_ac_Lib=yes"
10764else
10765  eval "$as_ac_Lib=no"
10766fi
10767rm -f core conftest.err conftest.$ac_objext \
10768    conftest$ac_exeext conftest.$ac_ext
10769LIBS=$ac_check_lib_save_LIBS
10770fi
10771eval ac_res=\$$as_ac_Lib
10772	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10773$as_echo "$ac_res" >&6; }
10774if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10775  apu_has_ldap_sslinit="1"
10776fi
10777
10778        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10780$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10781if eval \${$as_ac_Lib+:} false; then :
10782  $as_echo_n "(cached) " >&6
10783else
10784  ac_check_lib_save_LIBS=$LIBS
10785LIBS="-l${ldaplib} ${extralib} $LIBS"
10786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10787/* end confdefs.h.  */
10788
10789/* Override any GCC internal prototype to avoid an error.
10790   Use char because int might match the return type of a GCC
10791   builtin and then its argument prototype would still apply.  */
10792#ifdef __cplusplus
10793extern "C"
10794#endif
10795char ldapssl_init ();
10796int
10797main ()
10798{
10799return ldapssl_init ();
10800  ;
10801  return 0;
10802}
10803_ACEOF
10804if ac_fn_c_try_link "$LINENO"; then :
10805  eval "$as_ac_Lib=yes"
10806else
10807  eval "$as_ac_Lib=no"
10808fi
10809rm -f core conftest.err conftest.$ac_objext \
10810    conftest$ac_exeext conftest.$ac_ext
10811LIBS=$ac_check_lib_save_LIBS
10812fi
10813eval ac_res=\$$as_ac_Lib
10814	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10815$as_echo "$ac_res" >&6; }
10816if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10817  apu_has_ldapssl_init="1"
10818fi
10819
10820        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10822$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10823if eval \${$as_ac_Lib+:} false; then :
10824  $as_echo_n "(cached) " >&6
10825else
10826  ac_check_lib_save_LIBS=$LIBS
10827LIBS="-l${ldaplib} ${extralib} $LIBS"
10828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10829/* end confdefs.h.  */
10830
10831/* Override any GCC internal prototype to avoid an error.
10832   Use char because int might match the return type of a GCC
10833   builtin and then its argument prototype would still apply.  */
10834#ifdef __cplusplus
10835extern "C"
10836#endif
10837char ldapssl_install_routines ();
10838int
10839main ()
10840{
10841return ldapssl_install_routines ();
10842  ;
10843  return 0;
10844}
10845_ACEOF
10846if ac_fn_c_try_link "$LINENO"; then :
10847  eval "$as_ac_Lib=yes"
10848else
10849  eval "$as_ac_Lib=no"
10850fi
10851rm -f core conftest.err conftest.$ac_objext \
10852    conftest$ac_exeext conftest.$ac_ext
10853LIBS=$ac_check_lib_save_LIBS
10854fi
10855eval ac_res=\$$as_ac_Lib
10856	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10857$as_echo "$ac_res" >&6; }
10858if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10859  apu_has_ldapssl_install_routines="1"
10860fi
10861
10862        apu_has_ldap="1";
10863
10864fi
10865
10866  fi
10867
10868
10869  if test ${apu_has_ldap} != "1"; then
10870    ldaplib=$LIBLDAP
10871    extralib="-ldl -lpthread"
10872    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10873
10874    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10875
10876    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10877    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10878    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10880$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10881if eval \${$as_ac_Lib+:} false; then :
10882  $as_echo_n "(cached) " >&6
10883else
10884  ac_check_lib_save_LIBS=$LIBS
10885LIBS="-l${ldaplib} ${extralib} $LIBS"
10886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887/* end confdefs.h.  */
10888
10889/* Override any GCC internal prototype to avoid an error.
10890   Use char because int might match the return type of a GCC
10891   builtin and then its argument prototype would still apply.  */
10892#ifdef __cplusplus
10893extern "C"
10894#endif
10895char ldap_init ();
10896int
10897main ()
10898{
10899return ldap_init ();
10900  ;
10901  return 0;
10902}
10903_ACEOF
10904if ac_fn_c_try_link "$LINENO"; then :
10905  eval "$as_ac_Lib=yes"
10906else
10907  eval "$as_ac_Lib=no"
10908fi
10909rm -f core conftest.err conftest.$ac_objext \
10910    conftest$ac_exeext conftest.$ac_ext
10911LIBS=$ac_check_lib_save_LIBS
10912fi
10913eval ac_res=\$$as_ac_Lib
10914	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10915$as_echo "$ac_res" >&6; }
10916if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10917
10918        LDADD_ldap_found="-l${ldaplib} ${extralib}"
10919        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10921$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10922if eval \${$as_ac_Lib+:} false; then :
10923  $as_echo_n "(cached) " >&6
10924else
10925  ac_check_lib_save_LIBS=$LIBS
10926LIBS="-l${ldaplib} ${extralib} $LIBS"
10927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10928/* end confdefs.h.  */
10929
10930/* Override any GCC internal prototype to avoid an error.
10931   Use char because int might match the return type of a GCC
10932   builtin and then its argument prototype would still apply.  */
10933#ifdef __cplusplus
10934extern "C"
10935#endif
10936char ldapssl_client_init ();
10937int
10938main ()
10939{
10940return ldapssl_client_init ();
10941  ;
10942  return 0;
10943}
10944_ACEOF
10945if ac_fn_c_try_link "$LINENO"; then :
10946  eval "$as_ac_Lib=yes"
10947else
10948  eval "$as_ac_Lib=no"
10949fi
10950rm -f core conftest.err conftest.$ac_objext \
10951    conftest$ac_exeext conftest.$ac_ext
10952LIBS=$ac_check_lib_save_LIBS
10953fi
10954eval ac_res=\$$as_ac_Lib
10955	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10956$as_echo "$ac_res" >&6; }
10957if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10958  apu_has_ldapssl_client_init="1"
10959fi
10960
10961        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10963$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10964if eval \${$as_ac_Lib+:} false; then :
10965  $as_echo_n "(cached) " >&6
10966else
10967  ac_check_lib_save_LIBS=$LIBS
10968LIBS="-l${ldaplib} ${extralib} $LIBS"
10969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10970/* end confdefs.h.  */
10971
10972/* Override any GCC internal prototype to avoid an error.
10973   Use char because int might match the return type of a GCC
10974   builtin and then its argument prototype would still apply.  */
10975#ifdef __cplusplus
10976extern "C"
10977#endif
10978char ldapssl_client_deinit ();
10979int
10980main ()
10981{
10982return ldapssl_client_deinit ();
10983  ;
10984  return 0;
10985}
10986_ACEOF
10987if ac_fn_c_try_link "$LINENO"; then :
10988  eval "$as_ac_Lib=yes"
10989else
10990  eval "$as_ac_Lib=no"
10991fi
10992rm -f core conftest.err conftest.$ac_objext \
10993    conftest$ac_exeext conftest.$ac_ext
10994LIBS=$ac_check_lib_save_LIBS
10995fi
10996eval ac_res=\$$as_ac_Lib
10997	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10998$as_echo "$ac_res" >&6; }
10999if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11000  apu_has_ldapssl_client_deinit="1"
11001fi
11002
11003        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
11005$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
11006if eval \${$as_ac_Lib+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  ac_check_lib_save_LIBS=$LIBS
11010LIBS="-l${ldaplib} ${extralib} $LIBS"
11011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012/* end confdefs.h.  */
11013
11014/* Override any GCC internal prototype to avoid an error.
11015   Use char because int might match the return type of a GCC
11016   builtin and then its argument prototype would still apply.  */
11017#ifdef __cplusplus
11018extern "C"
11019#endif
11020char ldapssl_add_trusted_cert ();
11021int
11022main ()
11023{
11024return ldapssl_add_trusted_cert ();
11025  ;
11026  return 0;
11027}
11028_ACEOF
11029if ac_fn_c_try_link "$LINENO"; then :
11030  eval "$as_ac_Lib=yes"
11031else
11032  eval "$as_ac_Lib=no"
11033fi
11034rm -f core conftest.err conftest.$ac_objext \
11035    conftest$ac_exeext conftest.$ac_ext
11036LIBS=$ac_check_lib_save_LIBS
11037fi
11038eval ac_res=\$$as_ac_Lib
11039	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11040$as_echo "$ac_res" >&6; }
11041if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11042  apu_has_ldapssl_add_trusted_cert="1"
11043fi
11044
11045        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
11047$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
11048if eval \${$as_ac_Lib+:} false; then :
11049  $as_echo_n "(cached) " >&6
11050else
11051  ac_check_lib_save_LIBS=$LIBS
11052LIBS="-l${ldaplib} ${extralib} $LIBS"
11053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11054/* end confdefs.h.  */
11055
11056/* Override any GCC internal prototype to avoid an error.
11057   Use char because int might match the return type of a GCC
11058   builtin and then its argument prototype would still apply.  */
11059#ifdef __cplusplus
11060extern "C"
11061#endif
11062char ldap_start_tls_s ();
11063int
11064main ()
11065{
11066return ldap_start_tls_s ();
11067  ;
11068  return 0;
11069}
11070_ACEOF
11071if ac_fn_c_try_link "$LINENO"; then :
11072  eval "$as_ac_Lib=yes"
11073else
11074  eval "$as_ac_Lib=no"
11075fi
11076rm -f core conftest.err conftest.$ac_objext \
11077    conftest$ac_exeext conftest.$ac_ext
11078LIBS=$ac_check_lib_save_LIBS
11079fi
11080eval ac_res=\$$as_ac_Lib
11081	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11082$as_echo "$ac_res" >&6; }
11083if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11084  apu_has_ldap_start_tls_s="1"
11085fi
11086
11087        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
11088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
11089$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
11090if eval \${$as_ac_Lib+:} false; then :
11091  $as_echo_n "(cached) " >&6
11092else
11093  ac_check_lib_save_LIBS=$LIBS
11094LIBS="-l${ldaplib} ${extralib} $LIBS"
11095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11096/* end confdefs.h.  */
11097
11098/* Override any GCC internal prototype to avoid an error.
11099   Use char because int might match the return type of a GCC
11100   builtin and then its argument prototype would still apply.  */
11101#ifdef __cplusplus
11102extern "C"
11103#endif
11104char ldap_sslinit ();
11105int
11106main ()
11107{
11108return ldap_sslinit ();
11109  ;
11110  return 0;
11111}
11112_ACEOF
11113if ac_fn_c_try_link "$LINENO"; then :
11114  eval "$as_ac_Lib=yes"
11115else
11116  eval "$as_ac_Lib=no"
11117fi
11118rm -f core conftest.err conftest.$ac_objext \
11119    conftest$ac_exeext conftest.$ac_ext
11120LIBS=$ac_check_lib_save_LIBS
11121fi
11122eval ac_res=\$$as_ac_Lib
11123	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11124$as_echo "$ac_res" >&6; }
11125if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11126  apu_has_ldap_sslinit="1"
11127fi
11128
11129        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
11130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
11131$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
11132if eval \${$as_ac_Lib+:} false; then :
11133  $as_echo_n "(cached) " >&6
11134else
11135  ac_check_lib_save_LIBS=$LIBS
11136LIBS="-l${ldaplib} ${extralib} $LIBS"
11137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11138/* end confdefs.h.  */
11139
11140/* Override any GCC internal prototype to avoid an error.
11141   Use char because int might match the return type of a GCC
11142   builtin and then its argument prototype would still apply.  */
11143#ifdef __cplusplus
11144extern "C"
11145#endif
11146char ldapssl_init ();
11147int
11148main ()
11149{
11150return ldapssl_init ();
11151  ;
11152  return 0;
11153}
11154_ACEOF
11155if ac_fn_c_try_link "$LINENO"; then :
11156  eval "$as_ac_Lib=yes"
11157else
11158  eval "$as_ac_Lib=no"
11159fi
11160rm -f core conftest.err conftest.$ac_objext \
11161    conftest$ac_exeext conftest.$ac_ext
11162LIBS=$ac_check_lib_save_LIBS
11163fi
11164eval ac_res=\$$as_ac_Lib
11165	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11166$as_echo "$ac_res" >&6; }
11167if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11168  apu_has_ldapssl_init="1"
11169fi
11170
11171        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
11173$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
11174if eval \${$as_ac_Lib+:} false; then :
11175  $as_echo_n "(cached) " >&6
11176else
11177  ac_check_lib_save_LIBS=$LIBS
11178LIBS="-l${ldaplib} ${extralib} $LIBS"
11179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11180/* end confdefs.h.  */
11181
11182/* Override any GCC internal prototype to avoid an error.
11183   Use char because int might match the return type of a GCC
11184   builtin and then its argument prototype would still apply.  */
11185#ifdef __cplusplus
11186extern "C"
11187#endif
11188char ldapssl_install_routines ();
11189int
11190main ()
11191{
11192return ldapssl_install_routines ();
11193  ;
11194  return 0;
11195}
11196_ACEOF
11197if ac_fn_c_try_link "$LINENO"; then :
11198  eval "$as_ac_Lib=yes"
11199else
11200  eval "$as_ac_Lib=no"
11201fi
11202rm -f core conftest.err conftest.$ac_objext \
11203    conftest$ac_exeext conftest.$ac_ext
11204LIBS=$ac_check_lib_save_LIBS
11205fi
11206eval ac_res=\$$as_ac_Lib
11207	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11208$as_echo "$ac_res" >&6; }
11209if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11210  apu_has_ldapssl_install_routines="1"
11211fi
11212
11213        apu_has_ldap="1";
11214
11215fi
11216
11217  fi
11218
11219      fi
11220
11221      test ${apu_has_ldap} != "1" && as_fn_error $? "could not find an LDAP library" "$LINENO" 5
11222      test ${apu_has_ldap} == "1" &&
11223  if test "x$LDADD_ldap" = "x"; then
11224    test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"$LDADD_ldap_found\""
11225    LDADD_ldap="$LDADD_ldap_found"
11226  else
11227    apr_addto_bugger="$LDADD_ldap_found"
11228    for i in $apr_addto_bugger; do
11229      apr_addto_duplicate="0"
11230      for j in $LDADD_ldap; do
11231        if test "x$i" = "x$j"; then
11232          apr_addto_duplicate="1"
11233          break
11234        fi
11235      done
11236      if test $apr_addto_duplicate = "0"; then
11237        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_ldap"
11238        LDADD_ldap="$LDADD_ldap $i"
11239      fi
11240    done
11241  fi
11242
11243      as_ac_Lib=`$as_echo "ac_cv_lib_$apu_liblber_name''_ber_init" | $as_tr_sh`
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_init in -l$apu_liblber_name" >&5
11245$as_echo_n "checking for ber_init in -l$apu_liblber_name... " >&6; }
11246if eval \${$as_ac_Lib+:} false; then :
11247  $as_echo_n "(cached) " >&6
11248else
11249  ac_check_lib_save_LIBS=$LIBS
11250LIBS="-l$apu_liblber_name  $LIBS"
11251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252/* end confdefs.h.  */
11253
11254/* Override any GCC internal prototype to avoid an error.
11255   Use char because int might match the return type of a GCC
11256   builtin and then its argument prototype would still apply.  */
11257#ifdef __cplusplus
11258extern "C"
11259#endif
11260char ber_init ();
11261int
11262main ()
11263{
11264return ber_init ();
11265  ;
11266  return 0;
11267}
11268_ACEOF
11269if ac_fn_c_try_link "$LINENO"; then :
11270  eval "$as_ac_Lib=yes"
11271else
11272  eval "$as_ac_Lib=no"
11273fi
11274rm -f core conftest.err conftest.$ac_objext \
11275    conftest$ac_exeext conftest.$ac_ext
11276LIBS=$ac_check_lib_save_LIBS
11277fi
11278eval ac_res=\$$as_ac_Lib
11279	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11280$as_echo "$ac_res" >&6; }
11281if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11282
11283  if test "x$LDADD_ldap" = "x"; then
11284    test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"-l${apu_liblber_name}\""
11285    LDADD_ldap="-l${apu_liblber_name}"
11286  else
11287    apr_addto_bugger="-l${apu_liblber_name}"
11288    for i in $apr_addto_bugger; do
11289      apr_addto_duplicate="0"
11290      for j in $LDADD_ldap; do
11291        if test "x$i" = "x$j"; then
11292          apr_addto_duplicate="1"
11293          break
11294        fi
11295      done
11296      if test $apr_addto_duplicate = "0"; then
11297        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_ldap"
11298        LDADD_ldap="$LDADD_ldap $i"
11299      fi
11300    done
11301  fi
11302
11303fi
11304
11305
11306      for ac_header in lber.h
11307do :
11308  ac_fn_c_check_header_mongrel "$LINENO" "lber.h" "ac_cv_header_lber_h" "$ac_includes_default"
11309if test "x$ac_cv_header_lber_h" = xyes; then :
11310  cat >>confdefs.h <<_ACEOF
11311#define HAVE_LBER_H 1
11312_ACEOF
11313 lber_h="#include <lber.h>"
11314fi
11315
11316done
11317
11318
11319      # Solaris has a problem in <ldap.h> which prevents it from
11320      # being included by itself.  Check for <ldap.h> manually,
11321      # including lber.h first.
11322      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
11323$as_echo_n "checking for ldap.h... " >&6; }
11324if ${apr_cv_hdr_ldap_h+:} false; then :
11325  $as_echo_n "(cached) " >&6
11326else
11327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328/* end confdefs.h.  */
11329#ifdef HAVE_LBER_H
11330      #include <lber.h>
11331      #endif
11332      #include <ldap.h>
11333
11334_ACEOF
11335if ac_fn_c_try_cpp "$LINENO"; then :
11336  apr_cv_hdr_ldap_h=yes
11337else
11338  apr_cv_hdr_ldap_h=no
11339fi
11340rm -f conftest.err conftest.i conftest.$ac_ext
11341fi
11342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_hdr_ldap_h" >&5
11343$as_echo "$apr_cv_hdr_ldap_h" >&6; }
11344      if test "$apr_cv_hdr_ldap_h" = "yes"; then
11345        ldap_h="#include <ldap.h>"
11346
11347$as_echo "#define HAVE_LDAP_H 1" >>confdefs.h
11348
11349      fi
11350
11351      for ac_header in ldap_ssl.h
11352do :
11353  ac_fn_c_check_header_mongrel "$LINENO" "ldap_ssl.h" "ac_cv_header_ldap_ssl_h" "$ac_includes_default"
11354if test "x$ac_cv_header_ldap_ssl_h" = xyes; then :
11355  cat >>confdefs.h <<_ACEOF
11356#define HAVE_LDAP_SSL_H 1
11357_ACEOF
11358 ldap_ssl_h="#include <ldap_ssl.h>"
11359fi
11360
11361done
11362
11363
11364      if test "$apr_cv_hdr_ldap_h" = "yes"; then
11365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP toolkit" >&5
11366$as_echo_n "checking for LDAP toolkit... " >&6; }
11367if ${apr_cv_ldap_toolkit+:} false; then :
11368  $as_echo_n "(cached) " >&6
11369else
11370
11371          if test "x$apr_cv_ldap_toolkit" = "x"; then
11372            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373/* end confdefs.h.  */
11374$lber_h
11375                         $ldap_h
11376                         LDAP_VENDOR_NAME
11377_ACEOF
11378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11379  $EGREP "OpenLDAP" >/dev/null 2>&1; then :
11380  apu_has_ldap_openldap="1"
11381                                             apr_cv_ldap_toolkit="OpenLDAP"
11382fi
11383rm -f conftest*
11384
11385          fi
11386          if test "x$apr_cv_ldap_toolkit" = "x"; then
11387            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11388/* end confdefs.h.  */
11389$lber_h
11390                         $ldap_h
11391                         LDAP_VENDOR_NAME
11392_ACEOF
11393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11394  $EGREP "Sun Microsystems Inc." >/dev/null 2>&1; then :
11395  apu_has_ldap_solaris="1"
11396                                             apr_cv_ldap_toolkit="Solaris"
11397fi
11398rm -f conftest*
11399
11400          fi
11401          if test "x$apr_cv_ldap_toolkit" = "x"; then
11402            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403/* end confdefs.h.  */
11404$lber_h
11405                         $ldap_h
11406                         LDAP_VENDOR_NAME
11407_ACEOF
11408if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11409  $EGREP "Novell" >/dev/null 2>&1; then :
11410  apu_has_ldap_novell="1"
11411                                             apr_cv_ldap_toolkit="Novell"
11412fi
11413rm -f conftest*
11414
11415          fi
11416          if test "x$apr_cv_ldap_toolkit" = "x"; then
11417            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418/* end confdefs.h.  */
11419$lber_h
11420                         $ldap_h
11421                         LDAP_VENDOR_NAME
11422_ACEOF
11423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11424  $EGREP "Microsoft Corporation." >/dev/null 2>&1; then :
11425  apu_has_ldap_microsoft="1"
11426                                             apr_cv_ldap_toolkit="Microsoft"
11427fi
11428rm -f conftest*
11429
11430          fi
11431          if test "x$apr_cv_ldap_toolkit" = "x"; then
11432            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11433/* end confdefs.h.  */
11434$lber_h
11435                         $ldap_h
11436                         LDAP_VENDOR_NAME
11437_ACEOF
11438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11439  $EGREP "Netscape Communications Corp." >/dev/null 2>&1; then :
11440  apu_has_ldap_netscape="1"
11441                                             apr_cv_ldap_toolkit="Netscape"
11442fi
11443rm -f conftest*
11444
11445          fi
11446          if test "x$apr_cv_ldap_toolkit" = "x"; then
11447            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11448/* end confdefs.h.  */
11449$lber_h
11450                         $ldap_h
11451                         LDAP_VENDOR_NAME
11452_ACEOF
11453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11454  $EGREP "mozilla.org" >/dev/null 2>&1; then :
11455  apu_has_ldap_mozilla="1"
11456                                             apr_cv_ldap_toolkit="Mozilla"
11457fi
11458rm -f conftest*
11459
11460          fi
11461          if test "x$apr_cv_ldap_toolkit" = "x"; then
11462            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h.  */
11464$lber_h
11465                         $ldap_h
11466                         LDAP_VENDOR_NAME
11467_ACEOF
11468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11469  $EGREP "International Business Machines" >/dev/null 2>&1; then :
11470  apu_has_ldap_tivoli="1"
11471                                             apr_cv_ldap_toolkit="Tivoli"
11472fi
11473rm -f conftest*
11474
11475          fi
11476          if test "x$apr_cv_ldap_toolkit" = "x"; then
11477            case "$host" in
11478            *-ibm-os390)
11479              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11480/* end confdefs.h.  */
11481$lber_h
11482                                   $ldap_h
11483_ACEOF
11484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11485  $EGREP "IBM" >/dev/null 2>&1; then :
11486  apu_has_ldap_zos="1"
11487                                              apr_cv_ldap_toolkit="z/OS"
11488fi
11489rm -f conftest*
11490
11491              ;;
11492            esac
11493          fi
11494          if test "x$apr_cv_ldap_toolkit" = "x"; then
11495            apu_has_ldap_other="1"
11496            apr_cv_ldap_toolkit="unknown"
11497          fi
11498
11499fi
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_ldap_toolkit" >&5
11501$as_echo "$apr_cv_ldap_toolkit" >&6; }
11502      fi
11503
11504      CPPFLAGS=$save_cppflags
11505      LDFLAGS=$save_ldflags
11506      LIBS=$save_libs
11507    fi
11508
11509fi
11510
11511
11512if test "$apu_has_ldap_openldap" = "1"; then
11513    save_cppflags="$CPPFLAGS"
11514    save_ldflags="$LDFLAGS"
11515    save_libs="$LIBS"
11516
11517    CPPFLAGS="$CPPFLAGS $APRUTIL_INCLUDES"
11518    LDFLAGS="$LDFLAGS $APRUTIL_LDFLAGS"
11519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking style of ldap_set_rebind_proc routine" >&5
11520$as_echo_n "checking style of ldap_set_rebind_proc routine... " >&6; }
11521if ${ac_cv_ldap_set_rebind_proc_style+:} false; then :
11522  $as_echo_n "(cached) " >&6
11523else
11524  apr_save_CFLAGS=$CFLAGS
11525 CFLAGS="$CFLAGS $CFLAGS_WARN"
11526 if test "$ac_cv_c_compiler_gnu" = "yes"; then
11527   CFLAGS="$CFLAGS -Werror"
11528 fi
11529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11530/* end confdefs.h.  */
11531#include "confdefs.h"
11532
11533
11534    #ifdef HAVE_LBER_H
11535    #include <lber.h>
11536    #endif
11537    #ifdef HAVE_LDAP_H
11538    #include <ldap.h>
11539    #endif
11540
11541   int main(int argc, const char *const *argv) {
11542
11543    ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
11544
11545      return 0; }
11546
11547_ACEOF
11548if ac_fn_c_try_compile "$LINENO"; then :
11549  ac_cv_ldap_set_rebind_proc_style=three
11550else
11551  ac_cv_ldap_set_rebind_proc_style=two
11552fi
11553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11554 CFLAGS=$apr_save_CFLAGS
11555
11556fi
11557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ldap_set_rebind_proc_style" >&5
11558$as_echo "$ac_cv_ldap_set_rebind_proc_style" >&6; }
11559
11560    if test "$ac_cv_ldap_set_rebind_proc_style" = "three"; then
11561
11562$as_echo "#define LDAP_SET_REBIND_PROC_THREE 1" >>confdefs.h
11563
11564    fi
11565
11566    CPPFLAGS="$save_cppflags"
11567    LDFLAGS="$save_ldflags"
11568    LIBS="$save_libs"
11569fi
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595  apu_use_sdbm=0
11596  apu_use_ndbm=0
11597  apu_use_gdbm=0
11598  apu_use_db=0
11599    apu_have_sdbm=1
11600  apu_have_gdbm=0
11601  apu_have_ndbm=0
11602  apu_have_db=0
11603
11604  apu_db_header=db.h                # default so apu_select_dbm.h is syntactically correct
11605  apu_db_version=0
11606
11607  # Maximum supported version announced in help string.
11608  # Although we search for all versions up to 5.9,
11609  # we should only include existing versions in our
11610  # help string.
11611  db_max_version=53
11612  db_min_version=41
11613  dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4"
11614  db_version="$db_min_version"
11615  while [ $db_version -le $db_max_version ]
11616  do
11617    dbm_list="$dbm_list, db$db_version"
11618    db_version=`expr $db_version + 1`
11619  done
11620
11621
11622# Check whether --with-dbm was given.
11623if test "${with_dbm+set}" = set; then :
11624  withval=$with_dbm;
11625    if test "$withval" = "yes"; then
11626      as_fn_error $? "--with-dbm needs to specify a DBM type to use.
11627        One of: $dbm_list" "$LINENO" 5
11628    fi
11629    requested="$withval"
11630
11631else
11632
11633    requested=default
11634
11635fi
11636
11637
11638
11639# Check whether --with-gdbm was given.
11640if test "${with_gdbm+set}" = set; then :
11641  withval=$with_gdbm;
11642    apu_have_gdbm=0
11643    if test "$withval" = "yes"; then
11644      ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
11645if test "x$ac_cv_header_gdbm_h" = xyes; then :
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
11647$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11648if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
11649  $as_echo_n "(cached) " >&6
11650else
11651  ac_check_lib_save_LIBS=$LIBS
11652LIBS="-lgdbm  $LIBS"
11653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11654/* end confdefs.h.  */
11655
11656/* Override any GCC internal prototype to avoid an error.
11657   Use char because int might match the return type of a GCC
11658   builtin and then its argument prototype would still apply.  */
11659#ifdef __cplusplus
11660extern "C"
11661#endif
11662char gdbm_open ();
11663int
11664main ()
11665{
11666return gdbm_open ();
11667  ;
11668  return 0;
11669}
11670_ACEOF
11671if ac_fn_c_try_link "$LINENO"; then :
11672  ac_cv_lib_gdbm_gdbm_open=yes
11673else
11674  ac_cv_lib_gdbm_gdbm_open=no
11675fi
11676rm -f core conftest.err conftest.$ac_objext \
11677    conftest$ac_exeext conftest.$ac_ext
11678LIBS=$ac_check_lib_save_LIBS
11679fi
11680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11681$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11682if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
11683  apu_have_gdbm=1
11684fi
11685
11686fi
11687
11688
11689    elif test "$withval" = "no"; then
11690      apu_have_gdbm=0
11691    else
11692      saved_cppflags="$CPPFLAGS"
11693      saved_ldflags="$LDFLAGS"
11694      CPPFLAGS="$CPPFLAGS -I$withval/include"
11695      LDFLAGS="$LDFLAGS -L$withval/lib "
11696
11697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for gdbm in $withval" >&5
11698$as_echo_n "checking checking for gdbm in $withval... " >&6; }
11699      ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
11700if test "x$ac_cv_header_gdbm_h" = xyes; then :
11701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
11702$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11703if ${ac_cv_lib_gdbm_gdbm_open+:} false; then :
11704  $as_echo_n "(cached) " >&6
11705else
11706  ac_check_lib_save_LIBS=$LIBS
11707LIBS="-lgdbm  $LIBS"
11708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11709/* end confdefs.h.  */
11710
11711/* Override any GCC internal prototype to avoid an error.
11712   Use char because int might match the return type of a GCC
11713   builtin and then its argument prototype would still apply.  */
11714#ifdef __cplusplus
11715extern "C"
11716#endif
11717char gdbm_open ();
11718int
11719main ()
11720{
11721return gdbm_open ();
11722  ;
11723  return 0;
11724}
11725_ACEOF
11726if ac_fn_c_try_link "$LINENO"; then :
11727  ac_cv_lib_gdbm_gdbm_open=yes
11728else
11729  ac_cv_lib_gdbm_gdbm_open=no
11730fi
11731rm -f core conftest.err conftest.$ac_objext \
11732    conftest$ac_exeext conftest.$ac_ext
11733LIBS=$ac_check_lib_save_LIBS
11734fi
11735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11736$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11737if test "x$ac_cv_lib_gdbm_gdbm_open" = xyes; then :
11738  apu_have_gdbm=1
11739fi
11740
11741fi
11742
11743
11744      if test "$apu_have_gdbm" != "0"; then
11745
11746  if test "x$APRUTIL_LDFLAGS" = "x"; then
11747    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
11748    APRUTIL_LDFLAGS="-L$withval/lib"
11749  else
11750    apr_addto_bugger="-L$withval/lib"
11751    for i in $apr_addto_bugger; do
11752      apr_addto_duplicate="0"
11753      for j in $APRUTIL_LDFLAGS; do
11754        if test "x$i" = "x$j"; then
11755          apr_addto_duplicate="1"
11756          break
11757        fi
11758      done
11759      if test $apr_addto_duplicate = "0"; then
11760        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
11761        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
11762      fi
11763    done
11764  fi
11765
11766
11767  if test "x$APRUTIL_INCLUDES" = "x"; then
11768    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
11769    APRUTIL_INCLUDES="-I$withval/include"
11770  else
11771    apr_addto_bugger="-I$withval/include"
11772    for i in $apr_addto_bugger; do
11773      apr_addto_duplicate="0"
11774      for j in $APRUTIL_INCLUDES; do
11775        if test "x$i" = "x$j"; then
11776          apr_addto_duplicate="1"
11777          break
11778        fi
11779      done
11780      if test $apr_addto_duplicate = "0"; then
11781        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
11782        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
11783      fi
11784    done
11785  fi
11786
11787      fi
11788      CPPFLAGS="$saved_cppflags"
11789      LDFLAGS="$saved_ldflags"
11790    fi
11791
11792fi
11793
11794
11795
11796# Check whether --with-ndbm was given.
11797if test "${with_ndbm+set}" = set; then :
11798  withval=$with_ndbm;
11799    apu_have_ndbm=0
11800    if test "$withval" = "yes"; then
11801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm in the usual places" >&5
11802$as_echo_n "checking checking for ndbm in the usual places... " >&6; }
11803      apu_want_ndbm=1
11804      NDBM_INC=""
11805      NDBM_LDFLAGS=""
11806    elif test "$withval" = "no"; then
11807      apu_want_ndbm=0
11808    else
11809      apu_want_ndbm=1
11810      case "$withval" in
11811        *":"*)
11812          NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
11813          NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
11814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS " >&5
11815$as_echo_n "checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS ... " >&6; }
11816        ;;
11817        *)
11818          NDBM_INC="-I$withval/include"
11819          NDBM_LDFLAGS="-L$withval/lib"
11820          { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm includes in $withval" >&5
11821$as_echo_n "checking checking for ndbm includes in $withval... " >&6; }
11822        ;;
11823      esac
11824    fi
11825
11826    save_cppflags="$CPPFLAGS"
11827    save_ldflags="$LDFLAGS"
11828    CPPFLAGS="$CPPFLAGS $NDBM_INC"
11829    LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
11830        if test "$apu_want_ndbm" != "0"; then
11831      ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default"
11832if test "x$ac_cv_header_ndbm_h" = xyes; then :
11833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lc" >&5
11834$as_echo_n "checking for dbm_open in -lc... " >&6; }
11835if ${ac_cv_lib_c_dbm_open+:} false; then :
11836  $as_echo_n "(cached) " >&6
11837else
11838  ac_check_lib_save_LIBS=$LIBS
11839LIBS="-lc  $LIBS"
11840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841/* end confdefs.h.  */
11842
11843/* Override any GCC internal prototype to avoid an error.
11844   Use char because int might match the return type of a GCC
11845   builtin and then its argument prototype would still apply.  */
11846#ifdef __cplusplus
11847extern "C"
11848#endif
11849char dbm_open ();
11850int
11851main ()
11852{
11853return dbm_open ();
11854  ;
11855  return 0;
11856}
11857_ACEOF
11858if ac_fn_c_try_link "$LINENO"; then :
11859  ac_cv_lib_c_dbm_open=yes
11860else
11861  ac_cv_lib_c_dbm_open=no
11862fi
11863rm -f core conftest.err conftest.$ac_objext \
11864    conftest$ac_exeext conftest.$ac_ext
11865LIBS=$ac_check_lib_save_LIBS
11866fi
11867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_dbm_open" >&5
11868$as_echo "$ac_cv_lib_c_dbm_open" >&6; }
11869if test "x$ac_cv_lib_c_dbm_open" = xyes; then :
11870  apu_have_ndbm=1;apu_ndbm_lib=c
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldbm" >&5
11873$as_echo_n "checking for dbm_open in -ldbm... " >&6; }
11874if ${ac_cv_lib_dbm_dbm_open+:} false; then :
11875  $as_echo_n "(cached) " >&6
11876else
11877  ac_check_lib_save_LIBS=$LIBS
11878LIBS="-ldbm  $LIBS"
11879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880/* end confdefs.h.  */
11881
11882/* Override any GCC internal prototype to avoid an error.
11883   Use char because int might match the return type of a GCC
11884   builtin and then its argument prototype would still apply.  */
11885#ifdef __cplusplus
11886extern "C"
11887#endif
11888char dbm_open ();
11889int
11890main ()
11891{
11892return dbm_open ();
11893  ;
11894  return 0;
11895}
11896_ACEOF
11897if ac_fn_c_try_link "$LINENO"; then :
11898  ac_cv_lib_dbm_dbm_open=yes
11899else
11900  ac_cv_lib_dbm_dbm_open=no
11901fi
11902rm -f core conftest.err conftest.$ac_objext \
11903    conftest$ac_exeext conftest.$ac_ext
11904LIBS=$ac_check_lib_save_LIBS
11905fi
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dbm_dbm_open" >&5
11907$as_echo "$ac_cv_lib_dbm_dbm_open" >&6; }
11908if test "x$ac_cv_lib_dbm_dbm_open" = xyes; then :
11909  apu_have_ndbm=1;apu_ndbm_lib=dbm
11910else
11911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldb" >&5
11912$as_echo_n "checking for dbm_open in -ldb... " >&6; }
11913if ${ac_cv_lib_db_dbm_open+:} false; then :
11914  $as_echo_n "(cached) " >&6
11915else
11916  ac_check_lib_save_LIBS=$LIBS
11917LIBS="-ldb  $LIBS"
11918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919/* end confdefs.h.  */
11920
11921/* Override any GCC internal prototype to avoid an error.
11922   Use char because int might match the return type of a GCC
11923   builtin and then its argument prototype would still apply.  */
11924#ifdef __cplusplus
11925extern "C"
11926#endif
11927char dbm_open ();
11928int
11929main ()
11930{
11931return dbm_open ();
11932  ;
11933  return 0;
11934}
11935_ACEOF
11936if ac_fn_c_try_link "$LINENO"; then :
11937  ac_cv_lib_db_dbm_open=yes
11938else
11939  ac_cv_lib_db_dbm_open=no
11940fi
11941rm -f core conftest.err conftest.$ac_objext \
11942    conftest$ac_exeext conftest.$ac_ext
11943LIBS=$ac_check_lib_save_LIBS
11944fi
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db_dbm_open" >&5
11946$as_echo "$ac_cv_lib_db_dbm_open" >&6; }
11947if test "x$ac_cv_lib_db_dbm_open" = xyes; then :
11948  apu_have_ndbm=1;apu_ndbm_lib=db
11949else
11950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __db_ndbm_open in -ldb" >&5
11951$as_echo_n "checking for __db_ndbm_open in -ldb... " >&6; }
11952if ${ac_cv_lib_db___db_ndbm_open+:} false; then :
11953  $as_echo_n "(cached) " >&6
11954else
11955  ac_check_lib_save_LIBS=$LIBS
11956LIBS="-ldb  $LIBS"
11957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11958/* end confdefs.h.  */
11959
11960/* Override any GCC internal prototype to avoid an error.
11961   Use char because int might match the return type of a GCC
11962   builtin and then its argument prototype would still apply.  */
11963#ifdef __cplusplus
11964extern "C"
11965#endif
11966char __db_ndbm_open ();
11967int
11968main ()
11969{
11970return __db_ndbm_open ();
11971  ;
11972  return 0;
11973}
11974_ACEOF
11975if ac_fn_c_try_link "$LINENO"; then :
11976  ac_cv_lib_db___db_ndbm_open=yes
11977else
11978  ac_cv_lib_db___db_ndbm_open=no
11979fi
11980rm -f core conftest.err conftest.$ac_objext \
11981    conftest$ac_exeext conftest.$ac_ext
11982LIBS=$ac_check_lib_save_LIBS
11983fi
11984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db___db_ndbm_open" >&5
11985$as_echo "$ac_cv_lib_db___db_ndbm_open" >&6; }
11986if test "x$ac_cv_lib_db___db_ndbm_open" = xyes; then :
11987  apu_have_ndbm=1;apu_ndbm_lib=db
11988fi
11989
11990
11991fi
11992
11993
11994fi
11995
11996
11997fi
11998
11999
12000fi
12001
12002
12003      if test "$apu_have_ndbm" != "0";  then
12004        if test "$withval" != "yes"; then
12005
12006  if test "x$APRUTIL_INCLUDES" = "x"; then
12007    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"$NDBM_INC\""
12008    APRUTIL_INCLUDES="$NDBM_INC"
12009  else
12010    apr_addto_bugger="$NDBM_INC"
12011    for i in $apr_addto_bugger; do
12012      apr_addto_duplicate="0"
12013      for j in $APRUTIL_INCLUDES; do
12014        if test "x$i" = "x$j"; then
12015          apr_addto_duplicate="1"
12016          break
12017        fi
12018      done
12019      if test $apr_addto_duplicate = "0"; then
12020        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12021        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12022      fi
12023    done
12024  fi
12025
12026
12027  if test "x$APRUTIL_LDFLAGS" = "x"; then
12028    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"$NDBM_LDFLAGS\""
12029    APRUTIL_LDFLAGS="$NDBM_LDFLAGS"
12030  else
12031    apr_addto_bugger="$NDBM_LDFLAGS"
12032    for i in $apr_addto_bugger; do
12033      apr_addto_duplicate="0"
12034      for j in $APRUTIL_LDFLAGS; do
12035        if test "x$i" = "x$j"; then
12036          apr_addto_duplicate="1"
12037          break
12038        fi
12039      done
12040      if test $apr_addto_duplicate = "0"; then
12041        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12042        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12043      fi
12044    done
12045  fi
12046
12047        fi
12048      elif test "$withval" != "yes"; then
12049        as_fn_error $? "NDBM not found in the specified directory" "$LINENO" 5
12050      fi
12051    fi
12052    CPPFLAGS="$save_cppflags"
12053    LDFLAGS="$save_ldflags"
12054
12055else
12056
12057        apu_have_ndbm=0
12058
12059fi
12060
12061
12062
12063  if test -n "$apu_db_xtra_libs"; then
12064    saveddbxtralibs="$LIBS"
12065    LIBS="$apu_db_xtra_libs $LIBS"
12066  fi
12067
12068
12069# Check whether --with-berkeley-db was given.
12070if test "${with_berkeley_db+set}" = set; then :
12071  withval=$with_berkeley_db;
12072    if test "$withval" = "yes"; then
12073      apu_want_db=1
12074      user_places=""
12075    elif test "$withval" = "no"; then
12076      apu_want_db=0
12077    else
12078      apu_want_db=1
12079      user_places="$withval"
12080    fi
12081
12082    if test "$apu_want_db" != "0"; then
12083
12084  requested=$requested
12085  check_places=$user_places
12086
12087  case "$requested" in
12088  db)
12089
12090  all_places="$check_places"
12091
12092  # Start version search at version 5.9
12093  db_version=59
12094  while [ $db_version -ge 40 ]
12095  do
12096    db_major=`echo $db_version | sed -e 's/.$//'`
12097    db_minor=`echo $db_version | sed -e 's/.//'`
12098
12099  places="$all_places"
12100  db_major="$db_major"
12101  db_minor="$db_minor"
12102  if test -z "$places"; then
12103    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
12104  fi
12105
12106  bdb_version="${db_major}"
12107  if test ""${db_minor}"" != "-1"; then
12108    bdb_version="$bdb_version."${db_minor}""
12109    if test ""-1"" != "-1"; then
12110      bdb_version="$bdb_version."-1""
12111    fi
12112  fi
12113  bdb_places="$places"
12114  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
12115  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"
12116
12117
12118  apu_have_db=0
12119
12120  # Save the original values of the flags we tweak.
12121  apu_check_lib_save_libs="$LIBS"
12122  apu_check_lib_save_ldflags="$LDFLAGS"
12123  apu_check_lib_save_cppflags="$CPPFLAGS"
12124
12125  # The variable `found' is the prefix under which we've found
12126  # Berkeley DB, or `not' if we haven't found it anywhere yet.
12127  found=not
12128  for bdb_place in $bdb_places; do
12129
12130    LDFLAGS="$apu_check_lib_save_ldflags"
12131    CPPFLAGS="$apu_check_lib_save_cppflags"
12132    case "$bdb_place" in
12133      "std" )
12134        description="the standard places"
12135      ;;
12136      *":"* )
12137        header="`echo $bdb_place | sed -e 's/:.*$//'`"
12138        lib="`echo $bdb_place | sed -e 's/^.*://'`"
12139        CPPFLAGS="$CPPFLAGS -I$header"
12140        LDFLAGS="$LDFLAGS -L$lib"
12141        description="$header and $lib"
12142      ;;
12143      * )
12144        if test -d $bdb_place; then
12145          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12146          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12147        else
12148          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12149$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12151$as_echo "directory not found" >&6; }
12152          continue
12153        fi
12154        description="$bdb_place"
12155      ;;
12156    esac
12157
12158    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12159    # trick to display a message instead.
12160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12161$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12163$as_echo "" >&6; }
12164
12165    for bdb_libname in $bdb_default_search_lib_names; do
12166      for bdb_header in $bdb_default_search_headers; do
12167        # Clear the header cache variable for each location
12168
12169        cache_id="`echo ac_cv_header_${bdb_header} \
12170                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12171
12172        unset $cache_id
12173        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12174ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12175if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12176
12177          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
12178            # We generate a separate cache variable for each prefix and libname
12179            # we search under.  That way, we avoid caching information that
12180            # changes if the user runs `configure' with a different set of
12181            # switches.
12182
12183            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12184                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12185
12186
12187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12188$as_echo_n "checking for -l$bdb_libname... " >&6; }
12189                                    if eval \${$cache_id+:} false; then :
12190  $as_echo_n "(cached) " >&6
12191else
12192
12193
12194    apu_try_berkeley_db_save_libs="$LIBS"
12195
12196    apu_check_berkeley_db_major="${db_major}"
12197    apu_check_berkeley_db_minor="${db_minor}"
12198    apu_check_berkeley_db_patch="-1"
12199    apu_try_berkeley_db_header=$bdb_header
12200    apu_try_berkeley_db_libname=$bdb_libname
12201
12202    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12203    if test "$cross_compiling" = yes; then :
12204  apu_try_berkeley_db=yes
12205
12206else
12207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208/* end confdefs.h.  */
12209
12210#include <stdlib.h>
12211#include <stdio.h>
12212#include <$apu_try_berkeley_db_header>
12213main ()
12214{
12215  int major, minor, patch;
12216
12217  db_version(&major, &minor, &patch);
12218
12219  /* Sanity check: ensure that db.h constants actually match the db library */
12220  if (major != DB_VERSION_MAJOR
12221      || minor != DB_VERSION_MINOR
12222      || patch != DB_VERSION_PATCH)
12223    exit (1);
12224
12225  /* Run-time check:  ensure the library claims to be the correct version. */
12226
12227  if ($apu_check_berkeley_db_major != -1) {
12228    if (major < $apu_check_berkeley_db_major)
12229      exit (1);
12230    if (major > $apu_check_berkeley_db_major)
12231      exit (0);
12232  }
12233
12234  if ($apu_check_berkeley_db_minor != -1) {
12235    if (minor < $apu_check_berkeley_db_minor)
12236      exit (1);
12237    if (minor > $apu_check_berkeley_db_minor)
12238      exit (0);
12239  }
12240
12241  if ($apu_check_berkeley_db_patch == -1
12242      || patch >= $apu_check_berkeley_db_patch)
12243    exit (0);
12244  else
12245    exit (1);
12246}
12247
12248_ACEOF
12249if ac_fn_c_try_run "$LINENO"; then :
12250  apu_try_berkeley_db=yes
12251else
12252  apu_try_berkeley_db=no
12253fi
12254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12255  conftest.$ac_objext conftest.beam conftest.$ac_ext
12256fi
12257
12258
12259    LIBS="$apu_try_berkeley_db_save_libs"
12260
12261
12262                eval "$cache_id=$apu_try_berkeley_db"
12263
12264fi
12265
12266            result="`eval echo '$'$cache_id`"
12267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
12268$as_echo "$result" >&6; }
12269          elif test ""${db_major}"" = "1"; then
12270            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
12271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
12272$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
12273if eval \${$as_ac_Lib+:} false; then :
12274  $as_echo_n "(cached) " >&6
12275else
12276  ac_check_lib_save_LIBS=$LIBS
12277LIBS="-l$bdb_libname  $LIBS"
12278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12279/* end confdefs.h.  */
12280
12281/* Override any GCC internal prototype to avoid an error.
12282   Use char because int might match the return type of a GCC
12283   builtin and then its argument prototype would still apply.  */
12284#ifdef __cplusplus
12285extern "C"
12286#endif
12287char dbopen ();
12288int
12289main ()
12290{
12291return dbopen ();
12292  ;
12293  return 0;
12294}
12295_ACEOF
12296if ac_fn_c_try_link "$LINENO"; then :
12297  eval "$as_ac_Lib=yes"
12298else
12299  eval "$as_ac_Lib=no"
12300fi
12301rm -f core conftest.err conftest.$ac_objext \
12302    conftest$ac_exeext conftest.$ac_ext
12303LIBS=$ac_check_lib_save_LIBS
12304fi
12305eval ac_res=\$$as_ac_Lib
12306	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12307$as_echo "$ac_res" >&6; }
12308if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12309  result=yes
12310else
12311  result=no
12312
12313fi
12314
12315          elif test ""${db_major}"" = "2"; then
12316            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
12318$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
12319if eval \${$as_ac_Lib+:} false; then :
12320  $as_echo_n "(cached) " >&6
12321else
12322  ac_check_lib_save_LIBS=$LIBS
12323LIBS="-l$bdb_libname  $LIBS"
12324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12325/* end confdefs.h.  */
12326
12327/* Override any GCC internal prototype to avoid an error.
12328   Use char because int might match the return type of a GCC
12329   builtin and then its argument prototype would still apply.  */
12330#ifdef __cplusplus
12331extern "C"
12332#endif
12333char db_open ();
12334int
12335main ()
12336{
12337return db_open ();
12338  ;
12339  return 0;
12340}
12341_ACEOF
12342if ac_fn_c_try_link "$LINENO"; then :
12343  eval "$as_ac_Lib=yes"
12344else
12345  eval "$as_ac_Lib=no"
12346fi
12347rm -f core conftest.err conftest.$ac_objext \
12348    conftest$ac_exeext conftest.$ac_ext
12349LIBS=$ac_check_lib_save_LIBS
12350fi
12351eval ac_res=\$$as_ac_Lib
12352	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12353$as_echo "$ac_res" >&6; }
12354if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12355  result=yes
12356else
12357  result=no
12358
12359fi
12360
12361          fi
12362
12363else
12364  result="no"
12365fi
12366
12367
12368
12369        # If we found it, no need to search any more.
12370        if test "$result" = "yes"; then
12371          found="$bdb_place"
12372          break
12373        fi
12374      done
12375      test "$found" != "not" && break
12376    done
12377    test "$found" != "not" && break
12378  done
12379
12380  # Restore the original values of the flags we tweak.
12381  LDFLAGS="$apu_check_lib_save_ldflags"
12382  CPPFLAGS="$apu_check_lib_save_cppflags"
12383
12384  case "$found" in
12385  "not")
12386    apu_have_db=0
12387    ;;
12388  "std")
12389    apu_db_header=$bdb_header
12390    apu_db_lib=$bdb_libname
12391    apu_have_db=1
12392    ;;
12393  *":"*)
12394    header="`echo $found | sed -e 's/:.*$//'`"
12395    lib="`echo $found | sed -e 's/^.*://'`"
12396
12397
12398  if test "x$APRUTIL_INCLUDES" = "x"; then
12399    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
12400    APRUTIL_INCLUDES="-I$header"
12401  else
12402    apr_addto_bugger="-I$header"
12403    for i in $apr_addto_bugger; do
12404      apr_addto_duplicate="0"
12405      for j in $APRUTIL_INCLUDES; do
12406        if test "x$i" = "x$j"; then
12407          apr_addto_duplicate="1"
12408          break
12409        fi
12410      done
12411      if test $apr_addto_duplicate = "0"; then
12412        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12413        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12414      fi
12415    done
12416  fi
12417
12418
12419  if test "x$APRUTIL_LDFLAGS" = "x"; then
12420    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
12421    APRUTIL_LDFLAGS="-L$lib"
12422  else
12423    apr_addto_bugger="-L$lib"
12424    for i in $apr_addto_bugger; do
12425      apr_addto_duplicate="0"
12426      for j in $APRUTIL_LDFLAGS; do
12427        if test "x$i" = "x$j"; then
12428          apr_addto_duplicate="1"
12429          break
12430        fi
12431      done
12432      if test $apr_addto_duplicate = "0"; then
12433        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12434        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12435      fi
12436    done
12437  fi
12438
12439    apu_db_header=$bdb_header
12440    apu_db_lib=$bdb_libname
12441    apu_have_db=1
12442    ;;
12443  *)
12444
12445  if test "x$APRUTIL_INCLUDES" = "x"; then
12446    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
12447    APRUTIL_INCLUDES="-I$found/include"
12448  else
12449    apr_addto_bugger="-I$found/include"
12450    for i in $apr_addto_bugger; do
12451      apr_addto_duplicate="0"
12452      for j in $APRUTIL_INCLUDES; do
12453        if test "x$i" = "x$j"; then
12454          apr_addto_duplicate="1"
12455          break
12456        fi
12457      done
12458      if test $apr_addto_duplicate = "0"; then
12459        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12460        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12461      fi
12462    done
12463  fi
12464
12465
12466  if test "x$APRUTIL_LDFLAGS" = "x"; then
12467    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
12468    APRUTIL_LDFLAGS="-L$found/lib"
12469  else
12470    apr_addto_bugger="-L$found/lib"
12471    for i in $apr_addto_bugger; do
12472      apr_addto_duplicate="0"
12473      for j in $APRUTIL_LDFLAGS; do
12474        if test "x$i" = "x$j"; then
12475          apr_addto_duplicate="1"
12476          break
12477        fi
12478      done
12479      if test $apr_addto_duplicate = "0"; then
12480        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12481        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12482      fi
12483    done
12484  fi
12485
12486    apu_db_header=$bdb_header
12487    apu_db_lib=$bdb_libname
12488    apu_have_db=1
12489    ;;
12490  esac
12491
12492  if test "$apu_have_db" = "1"; then
12493    apu_db_version=${db_major}
12494  fi
12495
12496    if test "$apu_have_db" = "1"; then
12497      break
12498    fi
12499    db_version=`expr $db_version - 1`
12500  done
12501  if test "$apu_have_db" = "0"; then
12502
12503  places="$all_places"
12504  if test -z "$places"; then
12505    places="std"
12506  fi
12507
12508  bdb_version=3
12509  if test "-1" != "-1"; then
12510    bdb_version="$bdb_version.-1"
12511    if test "-1" != "-1"; then
12512      bdb_version="$bdb_version.-1"
12513    fi
12514  fi
12515  bdb_places="$places"
12516  bdb_default_search_headers="db3/db.h db.h"
12517  bdb_default_search_lib_names="db3 db"
12518
12519
12520  apu_have_db=0
12521
12522  # Save the original values of the flags we tweak.
12523  apu_check_lib_save_libs="$LIBS"
12524  apu_check_lib_save_ldflags="$LDFLAGS"
12525  apu_check_lib_save_cppflags="$CPPFLAGS"
12526
12527  # The variable `found' is the prefix under which we've found
12528  # Berkeley DB, or `not' if we haven't found it anywhere yet.
12529  found=not
12530  for bdb_place in $bdb_places; do
12531
12532    LDFLAGS="$apu_check_lib_save_ldflags"
12533    CPPFLAGS="$apu_check_lib_save_cppflags"
12534    case "$bdb_place" in
12535      "std" )
12536        description="the standard places"
12537      ;;
12538      *":"* )
12539        header="`echo $bdb_place | sed -e 's/:.*$//'`"
12540        lib="`echo $bdb_place | sed -e 's/^.*://'`"
12541        CPPFLAGS="$CPPFLAGS -I$header"
12542        LDFLAGS="$LDFLAGS -L$lib"
12543        description="$header and $lib"
12544      ;;
12545      * )
12546        if test -d $bdb_place; then
12547          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12548          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12549        else
12550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12551$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12553$as_echo "directory not found" >&6; }
12554          continue
12555        fi
12556        description="$bdb_place"
12557      ;;
12558    esac
12559
12560    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12561    # trick to display a message instead.
12562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12563$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12565$as_echo "" >&6; }
12566
12567    for bdb_libname in $bdb_default_search_lib_names; do
12568      for bdb_header in $bdb_default_search_headers; do
12569        # Clear the header cache variable for each location
12570
12571        cache_id="`echo ac_cv_header_${bdb_header} \
12572                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12573
12574        unset $cache_id
12575        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12576ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12577if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12578
12579          if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
12580            # We generate a separate cache variable for each prefix and libname
12581            # we search under.  That way, we avoid caching information that
12582            # changes if the user runs `configure' with a different set of
12583            # switches.
12584
12585            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12586                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12587
12588
12589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12590$as_echo_n "checking for -l$bdb_libname... " >&6; }
12591                                    if eval \${$cache_id+:} false; then :
12592  $as_echo_n "(cached) " >&6
12593else
12594
12595
12596    apu_try_berkeley_db_save_libs="$LIBS"
12597
12598    apu_check_berkeley_db_major=3
12599    apu_check_berkeley_db_minor=-1
12600    apu_check_berkeley_db_patch=-1
12601    apu_try_berkeley_db_header=$bdb_header
12602    apu_try_berkeley_db_libname=$bdb_libname
12603
12604    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12605    if test "$cross_compiling" = yes; then :
12606  apu_try_berkeley_db=yes
12607
12608else
12609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610/* end confdefs.h.  */
12611
12612#include <stdlib.h>
12613#include <stdio.h>
12614#include <$apu_try_berkeley_db_header>
12615main ()
12616{
12617  int major, minor, patch;
12618
12619  db_version(&major, &minor, &patch);
12620
12621  /* Sanity check: ensure that db.h constants actually match the db library */
12622  if (major != DB_VERSION_MAJOR
12623      || minor != DB_VERSION_MINOR
12624      || patch != DB_VERSION_PATCH)
12625    exit (1);
12626
12627  /* Run-time check:  ensure the library claims to be the correct version. */
12628
12629  if ($apu_check_berkeley_db_major != -1) {
12630    if (major < $apu_check_berkeley_db_major)
12631      exit (1);
12632    if (major > $apu_check_berkeley_db_major)
12633      exit (0);
12634  }
12635
12636  if ($apu_check_berkeley_db_minor != -1) {
12637    if (minor < $apu_check_berkeley_db_minor)
12638      exit (1);
12639    if (minor > $apu_check_berkeley_db_minor)
12640      exit (0);
12641  }
12642
12643  if ($apu_check_berkeley_db_patch == -1
12644      || patch >= $apu_check_berkeley_db_patch)
12645    exit (0);
12646  else
12647    exit (1);
12648}
12649
12650_ACEOF
12651if ac_fn_c_try_run "$LINENO"; then :
12652  apu_try_berkeley_db=yes
12653else
12654  apu_try_berkeley_db=no
12655fi
12656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12657  conftest.$ac_objext conftest.beam conftest.$ac_ext
12658fi
12659
12660
12661    LIBS="$apu_try_berkeley_db_save_libs"
12662
12663
12664                eval "$cache_id=$apu_try_berkeley_db"
12665
12666fi
12667
12668            result="`eval echo '$'$cache_id`"
12669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
12670$as_echo "$result" >&6; }
12671          elif test "3" = "1"; then
12672            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
12673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
12674$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
12675if eval \${$as_ac_Lib+:} false; then :
12676  $as_echo_n "(cached) " >&6
12677else
12678  ac_check_lib_save_LIBS=$LIBS
12679LIBS="-l$bdb_libname  $LIBS"
12680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12681/* end confdefs.h.  */
12682
12683/* Override any GCC internal prototype to avoid an error.
12684   Use char because int might match the return type of a GCC
12685   builtin and then its argument prototype would still apply.  */
12686#ifdef __cplusplus
12687extern "C"
12688#endif
12689char dbopen ();
12690int
12691main ()
12692{
12693return dbopen ();
12694  ;
12695  return 0;
12696}
12697_ACEOF
12698if ac_fn_c_try_link "$LINENO"; then :
12699  eval "$as_ac_Lib=yes"
12700else
12701  eval "$as_ac_Lib=no"
12702fi
12703rm -f core conftest.err conftest.$ac_objext \
12704    conftest$ac_exeext conftest.$ac_ext
12705LIBS=$ac_check_lib_save_LIBS
12706fi
12707eval ac_res=\$$as_ac_Lib
12708	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12709$as_echo "$ac_res" >&6; }
12710if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12711  result=yes
12712else
12713  result=no
12714
12715fi
12716
12717          elif test "3" = "2"; then
12718            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
12720$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
12721if eval \${$as_ac_Lib+:} false; then :
12722  $as_echo_n "(cached) " >&6
12723else
12724  ac_check_lib_save_LIBS=$LIBS
12725LIBS="-l$bdb_libname  $LIBS"
12726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727/* end confdefs.h.  */
12728
12729/* Override any GCC internal prototype to avoid an error.
12730   Use char because int might match the return type of a GCC
12731   builtin and then its argument prototype would still apply.  */
12732#ifdef __cplusplus
12733extern "C"
12734#endif
12735char db_open ();
12736int
12737main ()
12738{
12739return db_open ();
12740  ;
12741  return 0;
12742}
12743_ACEOF
12744if ac_fn_c_try_link "$LINENO"; then :
12745  eval "$as_ac_Lib=yes"
12746else
12747  eval "$as_ac_Lib=no"
12748fi
12749rm -f core conftest.err conftest.$ac_objext \
12750    conftest$ac_exeext conftest.$ac_ext
12751LIBS=$ac_check_lib_save_LIBS
12752fi
12753eval ac_res=\$$as_ac_Lib
12754	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12755$as_echo "$ac_res" >&6; }
12756if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12757  result=yes
12758else
12759  result=no
12760
12761fi
12762
12763          fi
12764
12765else
12766  result="no"
12767fi
12768
12769
12770
12771        # If we found it, no need to search any more.
12772        if test "$result" = "yes"; then
12773          found="$bdb_place"
12774          break
12775        fi
12776      done
12777      test "$found" != "not" && break
12778    done
12779    test "$found" != "not" && break
12780  done
12781
12782  # Restore the original values of the flags we tweak.
12783  LDFLAGS="$apu_check_lib_save_ldflags"
12784  CPPFLAGS="$apu_check_lib_save_cppflags"
12785
12786  case "$found" in
12787  "not")
12788    apu_have_db=0
12789    ;;
12790  "std")
12791    apu_db_header=$bdb_header
12792    apu_db_lib=$bdb_libname
12793    apu_have_db=1
12794    ;;
12795  *":"*)
12796    header="`echo $found | sed -e 's/:.*$//'`"
12797    lib="`echo $found | sed -e 's/^.*://'`"
12798
12799
12800  if test "x$APRUTIL_INCLUDES" = "x"; then
12801    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
12802    APRUTIL_INCLUDES="-I$header"
12803  else
12804    apr_addto_bugger="-I$header"
12805    for i in $apr_addto_bugger; do
12806      apr_addto_duplicate="0"
12807      for j in $APRUTIL_INCLUDES; do
12808        if test "x$i" = "x$j"; then
12809          apr_addto_duplicate="1"
12810          break
12811        fi
12812      done
12813      if test $apr_addto_duplicate = "0"; then
12814        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12815        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12816      fi
12817    done
12818  fi
12819
12820
12821  if test "x$APRUTIL_LDFLAGS" = "x"; then
12822    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
12823    APRUTIL_LDFLAGS="-L$lib"
12824  else
12825    apr_addto_bugger="-L$lib"
12826    for i in $apr_addto_bugger; do
12827      apr_addto_duplicate="0"
12828      for j in $APRUTIL_LDFLAGS; do
12829        if test "x$i" = "x$j"; then
12830          apr_addto_duplicate="1"
12831          break
12832        fi
12833      done
12834      if test $apr_addto_duplicate = "0"; then
12835        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12836        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12837      fi
12838    done
12839  fi
12840
12841    apu_db_header=$bdb_header
12842    apu_db_lib=$bdb_libname
12843    apu_have_db=1
12844    ;;
12845  *)
12846
12847  if test "x$APRUTIL_INCLUDES" = "x"; then
12848    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
12849    APRUTIL_INCLUDES="-I$found/include"
12850  else
12851    apr_addto_bugger="-I$found/include"
12852    for i in $apr_addto_bugger; do
12853      apr_addto_duplicate="0"
12854      for j in $APRUTIL_INCLUDES; do
12855        if test "x$i" = "x$j"; then
12856          apr_addto_duplicate="1"
12857          break
12858        fi
12859      done
12860      if test $apr_addto_duplicate = "0"; then
12861        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12862        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12863      fi
12864    done
12865  fi
12866
12867
12868  if test "x$APRUTIL_LDFLAGS" = "x"; then
12869    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
12870    APRUTIL_LDFLAGS="-L$found/lib"
12871  else
12872    apr_addto_bugger="-L$found/lib"
12873    for i in $apr_addto_bugger; do
12874      apr_addto_duplicate="0"
12875      for j in $APRUTIL_LDFLAGS; do
12876        if test "x$i" = "x$j"; then
12877          apr_addto_duplicate="1"
12878          break
12879        fi
12880      done
12881      if test $apr_addto_duplicate = "0"; then
12882        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12883        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12884      fi
12885    done
12886  fi
12887
12888    apu_db_header=$bdb_header
12889    apu_db_lib=$bdb_libname
12890    apu_have_db=1
12891    ;;
12892  esac
12893
12894  if test "$apu_have_db" = "1"; then
12895    apu_db_version=3
12896  fi
12897
12898  fi
12899  if test "$apu_have_db" = "0"; then
12900
12901  places="$all_places"
12902  if test -z "$places"; then
12903    places="std"
12904  fi
12905
12906  bdb_version=2
12907  if test "-1" != "-1"; then
12908    bdb_version="$bdb_version.-1"
12909    if test "-1" != "-1"; then
12910      bdb_version="$bdb_version.-1"
12911    fi
12912  fi
12913  bdb_places="$places"
12914  bdb_default_search_headers="db2/db.h db.h"
12915  bdb_default_search_lib_names="db2 db"
12916
12917
12918  apu_have_db=0
12919
12920  # Save the original values of the flags we tweak.
12921  apu_check_lib_save_libs="$LIBS"
12922  apu_check_lib_save_ldflags="$LDFLAGS"
12923  apu_check_lib_save_cppflags="$CPPFLAGS"
12924
12925  # The variable `found' is the prefix under which we've found
12926  # Berkeley DB, or `not' if we haven't found it anywhere yet.
12927  found=not
12928  for bdb_place in $bdb_places; do
12929
12930    LDFLAGS="$apu_check_lib_save_ldflags"
12931    CPPFLAGS="$apu_check_lib_save_cppflags"
12932    case "$bdb_place" in
12933      "std" )
12934        description="the standard places"
12935      ;;
12936      *":"* )
12937        header="`echo $bdb_place | sed -e 's/:.*$//'`"
12938        lib="`echo $bdb_place | sed -e 's/^.*://'`"
12939        CPPFLAGS="$CPPFLAGS -I$header"
12940        LDFLAGS="$LDFLAGS -L$lib"
12941        description="$header and $lib"
12942      ;;
12943      * )
12944        if test -d $bdb_place; then
12945          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12946          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12947        else
12948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12949$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12951$as_echo "directory not found" >&6; }
12952          continue
12953        fi
12954        description="$bdb_place"
12955      ;;
12956    esac
12957
12958    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12959    # trick to display a message instead.
12960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12961$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12963$as_echo "" >&6; }
12964
12965    for bdb_libname in $bdb_default_search_lib_names; do
12966      for bdb_header in $bdb_default_search_headers; do
12967        # Clear the header cache variable for each location
12968
12969        cache_id="`echo ac_cv_header_${bdb_header} \
12970                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12971
12972        unset $cache_id
12973        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12974ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12975if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12976
12977          if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
12978            # We generate a separate cache variable for each prefix and libname
12979            # we search under.  That way, we avoid caching information that
12980            # changes if the user runs `configure' with a different set of
12981            # switches.
12982
12983            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12984                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12985
12986
12987            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12988$as_echo_n "checking for -l$bdb_libname... " >&6; }
12989                                    if eval \${$cache_id+:} false; then :
12990  $as_echo_n "(cached) " >&6
12991else
12992
12993
12994    apu_try_berkeley_db_save_libs="$LIBS"
12995
12996    apu_check_berkeley_db_major=2
12997    apu_check_berkeley_db_minor=-1
12998    apu_check_berkeley_db_patch=-1
12999    apu_try_berkeley_db_header=$bdb_header
13000    apu_try_berkeley_db_libname=$bdb_libname
13001
13002    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13003    if test "$cross_compiling" = yes; then :
13004  apu_try_berkeley_db=yes
13005
13006else
13007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13008/* end confdefs.h.  */
13009
13010#include <stdlib.h>
13011#include <stdio.h>
13012#include <$apu_try_berkeley_db_header>
13013main ()
13014{
13015  int major, minor, patch;
13016
13017  db_version(&major, &minor, &patch);
13018
13019  /* Sanity check: ensure that db.h constants actually match the db library */
13020  if (major != DB_VERSION_MAJOR
13021      || minor != DB_VERSION_MINOR
13022      || patch != DB_VERSION_PATCH)
13023    exit (1);
13024
13025  /* Run-time check:  ensure the library claims to be the correct version. */
13026
13027  if ($apu_check_berkeley_db_major != -1) {
13028    if (major < $apu_check_berkeley_db_major)
13029      exit (1);
13030    if (major > $apu_check_berkeley_db_major)
13031      exit (0);
13032  }
13033
13034  if ($apu_check_berkeley_db_minor != -1) {
13035    if (minor < $apu_check_berkeley_db_minor)
13036      exit (1);
13037    if (minor > $apu_check_berkeley_db_minor)
13038      exit (0);
13039  }
13040
13041  if ($apu_check_berkeley_db_patch == -1
13042      || patch >= $apu_check_berkeley_db_patch)
13043    exit (0);
13044  else
13045    exit (1);
13046}
13047
13048_ACEOF
13049if ac_fn_c_try_run "$LINENO"; then :
13050  apu_try_berkeley_db=yes
13051else
13052  apu_try_berkeley_db=no
13053fi
13054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13055  conftest.$ac_objext conftest.beam conftest.$ac_ext
13056fi
13057
13058
13059    LIBS="$apu_try_berkeley_db_save_libs"
13060
13061
13062                eval "$cache_id=$apu_try_berkeley_db"
13063
13064fi
13065
13066            result="`eval echo '$'$cache_id`"
13067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13068$as_echo "$result" >&6; }
13069          elif test "2" = "1"; then
13070            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13072$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13073if eval \${$as_ac_Lib+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  ac_check_lib_save_LIBS=$LIBS
13077LIBS="-l$bdb_libname  $LIBS"
13078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13079/* end confdefs.h.  */
13080
13081/* Override any GCC internal prototype to avoid an error.
13082   Use char because int might match the return type of a GCC
13083   builtin and then its argument prototype would still apply.  */
13084#ifdef __cplusplus
13085extern "C"
13086#endif
13087char dbopen ();
13088int
13089main ()
13090{
13091return dbopen ();
13092  ;
13093  return 0;
13094}
13095_ACEOF
13096if ac_fn_c_try_link "$LINENO"; then :
13097  eval "$as_ac_Lib=yes"
13098else
13099  eval "$as_ac_Lib=no"
13100fi
13101rm -f core conftest.err conftest.$ac_objext \
13102    conftest$ac_exeext conftest.$ac_ext
13103LIBS=$ac_check_lib_save_LIBS
13104fi
13105eval ac_res=\$$as_ac_Lib
13106	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13107$as_echo "$ac_res" >&6; }
13108if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13109  result=yes
13110else
13111  result=no
13112
13113fi
13114
13115          elif test "2" = "2"; then
13116            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13118$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13119if eval \${$as_ac_Lib+:} false; then :
13120  $as_echo_n "(cached) " >&6
13121else
13122  ac_check_lib_save_LIBS=$LIBS
13123LIBS="-l$bdb_libname  $LIBS"
13124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125/* end confdefs.h.  */
13126
13127/* Override any GCC internal prototype to avoid an error.
13128   Use char because int might match the return type of a GCC
13129   builtin and then its argument prototype would still apply.  */
13130#ifdef __cplusplus
13131extern "C"
13132#endif
13133char db_open ();
13134int
13135main ()
13136{
13137return db_open ();
13138  ;
13139  return 0;
13140}
13141_ACEOF
13142if ac_fn_c_try_link "$LINENO"; then :
13143  eval "$as_ac_Lib=yes"
13144else
13145  eval "$as_ac_Lib=no"
13146fi
13147rm -f core conftest.err conftest.$ac_objext \
13148    conftest$ac_exeext conftest.$ac_ext
13149LIBS=$ac_check_lib_save_LIBS
13150fi
13151eval ac_res=\$$as_ac_Lib
13152	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13153$as_echo "$ac_res" >&6; }
13154if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13155  result=yes
13156else
13157  result=no
13158
13159fi
13160
13161          fi
13162
13163else
13164  result="no"
13165fi
13166
13167
13168
13169        # If we found it, no need to search any more.
13170        if test "$result" = "yes"; then
13171          found="$bdb_place"
13172          break
13173        fi
13174      done
13175      test "$found" != "not" && break
13176    done
13177    test "$found" != "not" && break
13178  done
13179
13180  # Restore the original values of the flags we tweak.
13181  LDFLAGS="$apu_check_lib_save_ldflags"
13182  CPPFLAGS="$apu_check_lib_save_cppflags"
13183
13184  case "$found" in
13185  "not")
13186    apu_have_db=0
13187    ;;
13188  "std")
13189    apu_db_header=$bdb_header
13190    apu_db_lib=$bdb_libname
13191    apu_have_db=1
13192    ;;
13193  *":"*)
13194    header="`echo $found | sed -e 's/:.*$//'`"
13195    lib="`echo $found | sed -e 's/^.*://'`"
13196
13197
13198  if test "x$APRUTIL_INCLUDES" = "x"; then
13199    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13200    APRUTIL_INCLUDES="-I$header"
13201  else
13202    apr_addto_bugger="-I$header"
13203    for i in $apr_addto_bugger; do
13204      apr_addto_duplicate="0"
13205      for j in $APRUTIL_INCLUDES; do
13206        if test "x$i" = "x$j"; then
13207          apr_addto_duplicate="1"
13208          break
13209        fi
13210      done
13211      if test $apr_addto_duplicate = "0"; then
13212        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13213        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13214      fi
13215    done
13216  fi
13217
13218
13219  if test "x$APRUTIL_LDFLAGS" = "x"; then
13220    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13221    APRUTIL_LDFLAGS="-L$lib"
13222  else
13223    apr_addto_bugger="-L$lib"
13224    for i in $apr_addto_bugger; do
13225      apr_addto_duplicate="0"
13226      for j in $APRUTIL_LDFLAGS; do
13227        if test "x$i" = "x$j"; then
13228          apr_addto_duplicate="1"
13229          break
13230        fi
13231      done
13232      if test $apr_addto_duplicate = "0"; then
13233        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13234        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13235      fi
13236    done
13237  fi
13238
13239    apu_db_header=$bdb_header
13240    apu_db_lib=$bdb_libname
13241    apu_have_db=1
13242    ;;
13243  *)
13244
13245  if test "x$APRUTIL_INCLUDES" = "x"; then
13246    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13247    APRUTIL_INCLUDES="-I$found/include"
13248  else
13249    apr_addto_bugger="-I$found/include"
13250    for i in $apr_addto_bugger; do
13251      apr_addto_duplicate="0"
13252      for j in $APRUTIL_INCLUDES; do
13253        if test "x$i" = "x$j"; then
13254          apr_addto_duplicate="1"
13255          break
13256        fi
13257      done
13258      if test $apr_addto_duplicate = "0"; then
13259        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13260        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13261      fi
13262    done
13263  fi
13264
13265
13266  if test "x$APRUTIL_LDFLAGS" = "x"; then
13267    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13268    APRUTIL_LDFLAGS="-L$found/lib"
13269  else
13270    apr_addto_bugger="-L$found/lib"
13271    for i in $apr_addto_bugger; do
13272      apr_addto_duplicate="0"
13273      for j in $APRUTIL_LDFLAGS; do
13274        if test "x$i" = "x$j"; then
13275          apr_addto_duplicate="1"
13276          break
13277        fi
13278      done
13279      if test $apr_addto_duplicate = "0"; then
13280        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13281        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13282      fi
13283    done
13284  fi
13285
13286    apu_db_header=$bdb_header
13287    apu_db_lib=$bdb_libname
13288    apu_have_db=1
13289    ;;
13290  esac
13291
13292  if test "$apu_have_db" = "1"; then
13293    apu_db_version=2
13294  fi
13295
13296  fi
13297  if test "$apu_have_db" = "0"; then
13298
13299  places="$all_places"
13300  if test -z "$places"; then
13301    places="std"
13302  fi
13303
13304  bdb_version=1
13305  if test "0" != "-1"; then
13306    bdb_version="$bdb_version.0"
13307    if test "0" != "-1"; then
13308      bdb_version="$bdb_version.0"
13309    fi
13310  fi
13311  bdb_places="$places"
13312  bdb_default_search_headers="db1/db.h db.h"
13313  bdb_default_search_lib_names="db1"
13314
13315
13316  apu_have_db=0
13317
13318  # Save the original values of the flags we tweak.
13319  apu_check_lib_save_libs="$LIBS"
13320  apu_check_lib_save_ldflags="$LDFLAGS"
13321  apu_check_lib_save_cppflags="$CPPFLAGS"
13322
13323  # The variable `found' is the prefix under which we've found
13324  # Berkeley DB, or `not' if we haven't found it anywhere yet.
13325  found=not
13326  for bdb_place in $bdb_places; do
13327
13328    LDFLAGS="$apu_check_lib_save_ldflags"
13329    CPPFLAGS="$apu_check_lib_save_cppflags"
13330    case "$bdb_place" in
13331      "std" )
13332        description="the standard places"
13333      ;;
13334      *":"* )
13335        header="`echo $bdb_place | sed -e 's/:.*$//'`"
13336        lib="`echo $bdb_place | sed -e 's/^.*://'`"
13337        CPPFLAGS="$CPPFLAGS -I$header"
13338        LDFLAGS="$LDFLAGS -L$lib"
13339        description="$header and $lib"
13340      ;;
13341      * )
13342        if test -d $bdb_place; then
13343          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13344          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13345        else
13346          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13347$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13349$as_echo "directory not found" >&6; }
13350          continue
13351        fi
13352        description="$bdb_place"
13353      ;;
13354    esac
13355
13356    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13357    # trick to display a message instead.
13358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13359$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13361$as_echo "" >&6; }
13362
13363    for bdb_libname in $bdb_default_search_lib_names; do
13364      for bdb_header in $bdb_default_search_headers; do
13365        # Clear the header cache variable for each location
13366
13367        cache_id="`echo ac_cv_header_${bdb_header} \
13368                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13369
13370        unset $cache_id
13371        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13372ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13373if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13374
13375          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
13376            # We generate a separate cache variable for each prefix and libname
13377            # we search under.  That way, we avoid caching information that
13378            # changes if the user runs `configure' with a different set of
13379            # switches.
13380
13381            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13382                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13383
13384
13385            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13386$as_echo_n "checking for -l$bdb_libname... " >&6; }
13387                                    if eval \${$cache_id+:} false; then :
13388  $as_echo_n "(cached) " >&6
13389else
13390
13391
13392    apu_try_berkeley_db_save_libs="$LIBS"
13393
13394    apu_check_berkeley_db_major=1
13395    apu_check_berkeley_db_minor=0
13396    apu_check_berkeley_db_patch=0
13397    apu_try_berkeley_db_header=$bdb_header
13398    apu_try_berkeley_db_libname=$bdb_libname
13399
13400    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13401    if test "$cross_compiling" = yes; then :
13402  apu_try_berkeley_db=yes
13403
13404else
13405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406/* end confdefs.h.  */
13407
13408#include <stdlib.h>
13409#include <stdio.h>
13410#include <$apu_try_berkeley_db_header>
13411main ()
13412{
13413  int major, minor, patch;
13414
13415  db_version(&major, &minor, &patch);
13416
13417  /* Sanity check: ensure that db.h constants actually match the db library */
13418  if (major != DB_VERSION_MAJOR
13419      || minor != DB_VERSION_MINOR
13420      || patch != DB_VERSION_PATCH)
13421    exit (1);
13422
13423  /* Run-time check:  ensure the library claims to be the correct version. */
13424
13425  if ($apu_check_berkeley_db_major != -1) {
13426    if (major < $apu_check_berkeley_db_major)
13427      exit (1);
13428    if (major > $apu_check_berkeley_db_major)
13429      exit (0);
13430  }
13431
13432  if ($apu_check_berkeley_db_minor != -1) {
13433    if (minor < $apu_check_berkeley_db_minor)
13434      exit (1);
13435    if (minor > $apu_check_berkeley_db_minor)
13436      exit (0);
13437  }
13438
13439  if ($apu_check_berkeley_db_patch == -1
13440      || patch >= $apu_check_berkeley_db_patch)
13441    exit (0);
13442  else
13443    exit (1);
13444}
13445
13446_ACEOF
13447if ac_fn_c_try_run "$LINENO"; then :
13448  apu_try_berkeley_db=yes
13449else
13450  apu_try_berkeley_db=no
13451fi
13452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13453  conftest.$ac_objext conftest.beam conftest.$ac_ext
13454fi
13455
13456
13457    LIBS="$apu_try_berkeley_db_save_libs"
13458
13459
13460                eval "$cache_id=$apu_try_berkeley_db"
13461
13462fi
13463
13464            result="`eval echo '$'$cache_id`"
13465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13466$as_echo "$result" >&6; }
13467          elif test "1" = "1"; then
13468            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13470$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13471if eval \${$as_ac_Lib+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  ac_check_lib_save_LIBS=$LIBS
13475LIBS="-l$bdb_libname  $LIBS"
13476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13477/* end confdefs.h.  */
13478
13479/* Override any GCC internal prototype to avoid an error.
13480   Use char because int might match the return type of a GCC
13481   builtin and then its argument prototype would still apply.  */
13482#ifdef __cplusplus
13483extern "C"
13484#endif
13485char dbopen ();
13486int
13487main ()
13488{
13489return dbopen ();
13490  ;
13491  return 0;
13492}
13493_ACEOF
13494if ac_fn_c_try_link "$LINENO"; then :
13495  eval "$as_ac_Lib=yes"
13496else
13497  eval "$as_ac_Lib=no"
13498fi
13499rm -f core conftest.err conftest.$ac_objext \
13500    conftest$ac_exeext conftest.$ac_ext
13501LIBS=$ac_check_lib_save_LIBS
13502fi
13503eval ac_res=\$$as_ac_Lib
13504	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13505$as_echo "$ac_res" >&6; }
13506if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13507  result=yes
13508else
13509  result=no
13510
13511fi
13512
13513          elif test "1" = "2"; then
13514            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13516$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13517if eval \${$as_ac_Lib+:} false; then :
13518  $as_echo_n "(cached) " >&6
13519else
13520  ac_check_lib_save_LIBS=$LIBS
13521LIBS="-l$bdb_libname  $LIBS"
13522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13523/* end confdefs.h.  */
13524
13525/* Override any GCC internal prototype to avoid an error.
13526   Use char because int might match the return type of a GCC
13527   builtin and then its argument prototype would still apply.  */
13528#ifdef __cplusplus
13529extern "C"
13530#endif
13531char db_open ();
13532int
13533main ()
13534{
13535return db_open ();
13536  ;
13537  return 0;
13538}
13539_ACEOF
13540if ac_fn_c_try_link "$LINENO"; then :
13541  eval "$as_ac_Lib=yes"
13542else
13543  eval "$as_ac_Lib=no"
13544fi
13545rm -f core conftest.err conftest.$ac_objext \
13546    conftest$ac_exeext conftest.$ac_ext
13547LIBS=$ac_check_lib_save_LIBS
13548fi
13549eval ac_res=\$$as_ac_Lib
13550	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13551$as_echo "$ac_res" >&6; }
13552if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13553  result=yes
13554else
13555  result=no
13556
13557fi
13558
13559          fi
13560
13561else
13562  result="no"
13563fi
13564
13565
13566
13567        # If we found it, no need to search any more.
13568        if test "$result" = "yes"; then
13569          found="$bdb_place"
13570          break
13571        fi
13572      done
13573      test "$found" != "not" && break
13574    done
13575    test "$found" != "not" && break
13576  done
13577
13578  # Restore the original values of the flags we tweak.
13579  LDFLAGS="$apu_check_lib_save_ldflags"
13580  CPPFLAGS="$apu_check_lib_save_cppflags"
13581
13582  case "$found" in
13583  "not")
13584    apu_have_db=0
13585    ;;
13586  "std")
13587    apu_db_header=$bdb_header
13588    apu_db_lib=$bdb_libname
13589    apu_have_db=1
13590    ;;
13591  *":"*)
13592    header="`echo $found | sed -e 's/:.*$//'`"
13593    lib="`echo $found | sed -e 's/^.*://'`"
13594
13595
13596  if test "x$APRUTIL_INCLUDES" = "x"; then
13597    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13598    APRUTIL_INCLUDES="-I$header"
13599  else
13600    apr_addto_bugger="-I$header"
13601    for i in $apr_addto_bugger; do
13602      apr_addto_duplicate="0"
13603      for j in $APRUTIL_INCLUDES; do
13604        if test "x$i" = "x$j"; then
13605          apr_addto_duplicate="1"
13606          break
13607        fi
13608      done
13609      if test $apr_addto_duplicate = "0"; then
13610        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13611        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13612      fi
13613    done
13614  fi
13615
13616
13617  if test "x$APRUTIL_LDFLAGS" = "x"; then
13618    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13619    APRUTIL_LDFLAGS="-L$lib"
13620  else
13621    apr_addto_bugger="-L$lib"
13622    for i in $apr_addto_bugger; do
13623      apr_addto_duplicate="0"
13624      for j in $APRUTIL_LDFLAGS; do
13625        if test "x$i" = "x$j"; then
13626          apr_addto_duplicate="1"
13627          break
13628        fi
13629      done
13630      if test $apr_addto_duplicate = "0"; then
13631        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13632        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13633      fi
13634    done
13635  fi
13636
13637    apu_db_header=$bdb_header
13638    apu_db_lib=$bdb_libname
13639    apu_have_db=1
13640    ;;
13641  *)
13642
13643  if test "x$APRUTIL_INCLUDES" = "x"; then
13644    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13645    APRUTIL_INCLUDES="-I$found/include"
13646  else
13647    apr_addto_bugger="-I$found/include"
13648    for i in $apr_addto_bugger; do
13649      apr_addto_duplicate="0"
13650      for j in $APRUTIL_INCLUDES; do
13651        if test "x$i" = "x$j"; then
13652          apr_addto_duplicate="1"
13653          break
13654        fi
13655      done
13656      if test $apr_addto_duplicate = "0"; then
13657        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13658        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13659      fi
13660    done
13661  fi
13662
13663
13664  if test "x$APRUTIL_LDFLAGS" = "x"; then
13665    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13666    APRUTIL_LDFLAGS="-L$found/lib"
13667  else
13668    apr_addto_bugger="-L$found/lib"
13669    for i in $apr_addto_bugger; do
13670      apr_addto_duplicate="0"
13671      for j in $APRUTIL_LDFLAGS; do
13672        if test "x$i" = "x$j"; then
13673          apr_addto_duplicate="1"
13674          break
13675        fi
13676      done
13677      if test $apr_addto_duplicate = "0"; then
13678        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13679        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13680      fi
13681    done
13682  fi
13683
13684    apu_db_header=$bdb_header
13685    apu_db_lib=$bdb_libname
13686    apu_have_db=1
13687    ;;
13688  esac
13689
13690  if test "$apu_have_db" = "1"; then
13691    apu_db_version=1
13692  fi
13693
13694  fi
13695  if test "$apu_have_db" = "0"; then
13696
13697  places="$all_places"
13698  if test -z "$places"; then
13699    places="std"
13700  fi
13701
13702  bdb_version=1
13703  if test "-1" != "-1"; then
13704    bdb_version="$bdb_version.-1"
13705    if test "-1" != "-1"; then
13706      bdb_version="$bdb_version.-1"
13707    fi
13708  fi
13709  bdb_places="$places"
13710  bdb_default_search_headers="db_185.h"
13711  bdb_default_search_lib_names="db"
13712
13713
13714  apu_have_db=0
13715
13716  # Save the original values of the flags we tweak.
13717  apu_check_lib_save_libs="$LIBS"
13718  apu_check_lib_save_ldflags="$LDFLAGS"
13719  apu_check_lib_save_cppflags="$CPPFLAGS"
13720
13721  # The variable `found' is the prefix under which we've found
13722  # Berkeley DB, or `not' if we haven't found it anywhere yet.
13723  found=not
13724  for bdb_place in $bdb_places; do
13725
13726    LDFLAGS="$apu_check_lib_save_ldflags"
13727    CPPFLAGS="$apu_check_lib_save_cppflags"
13728    case "$bdb_place" in
13729      "std" )
13730        description="the standard places"
13731      ;;
13732      *":"* )
13733        header="`echo $bdb_place | sed -e 's/:.*$//'`"
13734        lib="`echo $bdb_place | sed -e 's/^.*://'`"
13735        CPPFLAGS="$CPPFLAGS -I$header"
13736        LDFLAGS="$LDFLAGS -L$lib"
13737        description="$header and $lib"
13738      ;;
13739      * )
13740        if test -d $bdb_place; then
13741          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13742          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13743        else
13744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13745$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13747$as_echo "directory not found" >&6; }
13748          continue
13749        fi
13750        description="$bdb_place"
13751      ;;
13752    esac
13753
13754    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13755    # trick to display a message instead.
13756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13757$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13759$as_echo "" >&6; }
13760
13761    for bdb_libname in $bdb_default_search_lib_names; do
13762      for bdb_header in $bdb_default_search_headers; do
13763        # Clear the header cache variable for each location
13764
13765        cache_id="`echo ac_cv_header_${bdb_header} \
13766                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13767
13768        unset $cache_id
13769        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13770ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13771if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13772
13773          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
13774            # We generate a separate cache variable for each prefix and libname
13775            # we search under.  That way, we avoid caching information that
13776            # changes if the user runs `configure' with a different set of
13777            # switches.
13778
13779            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13780                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13781
13782
13783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13784$as_echo_n "checking for -l$bdb_libname... " >&6; }
13785                                    if eval \${$cache_id+:} false; then :
13786  $as_echo_n "(cached) " >&6
13787else
13788
13789
13790    apu_try_berkeley_db_save_libs="$LIBS"
13791
13792    apu_check_berkeley_db_major=1
13793    apu_check_berkeley_db_minor=-1
13794    apu_check_berkeley_db_patch=-1
13795    apu_try_berkeley_db_header=$bdb_header
13796    apu_try_berkeley_db_libname=$bdb_libname
13797
13798    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13799    if test "$cross_compiling" = yes; then :
13800  apu_try_berkeley_db=yes
13801
13802else
13803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804/* end confdefs.h.  */
13805
13806#include <stdlib.h>
13807#include <stdio.h>
13808#include <$apu_try_berkeley_db_header>
13809main ()
13810{
13811  int major, minor, patch;
13812
13813  db_version(&major, &minor, &patch);
13814
13815  /* Sanity check: ensure that db.h constants actually match the db library */
13816  if (major != DB_VERSION_MAJOR
13817      || minor != DB_VERSION_MINOR
13818      || patch != DB_VERSION_PATCH)
13819    exit (1);
13820
13821  /* Run-time check:  ensure the library claims to be the correct version. */
13822
13823  if ($apu_check_berkeley_db_major != -1) {
13824    if (major < $apu_check_berkeley_db_major)
13825      exit (1);
13826    if (major > $apu_check_berkeley_db_major)
13827      exit (0);
13828  }
13829
13830  if ($apu_check_berkeley_db_minor != -1) {
13831    if (minor < $apu_check_berkeley_db_minor)
13832      exit (1);
13833    if (minor > $apu_check_berkeley_db_minor)
13834      exit (0);
13835  }
13836
13837  if ($apu_check_berkeley_db_patch == -1
13838      || patch >= $apu_check_berkeley_db_patch)
13839    exit (0);
13840  else
13841    exit (1);
13842}
13843
13844_ACEOF
13845if ac_fn_c_try_run "$LINENO"; then :
13846  apu_try_berkeley_db=yes
13847else
13848  apu_try_berkeley_db=no
13849fi
13850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13851  conftest.$ac_objext conftest.beam conftest.$ac_ext
13852fi
13853
13854
13855    LIBS="$apu_try_berkeley_db_save_libs"
13856
13857
13858                eval "$cache_id=$apu_try_berkeley_db"
13859
13860fi
13861
13862            result="`eval echo '$'$cache_id`"
13863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13864$as_echo "$result" >&6; }
13865          elif test "1" = "1"; then
13866            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13868$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13869if eval \${$as_ac_Lib+:} false; then :
13870  $as_echo_n "(cached) " >&6
13871else
13872  ac_check_lib_save_LIBS=$LIBS
13873LIBS="-l$bdb_libname  $LIBS"
13874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h.  */
13876
13877/* Override any GCC internal prototype to avoid an error.
13878   Use char because int might match the return type of a GCC
13879   builtin and then its argument prototype would still apply.  */
13880#ifdef __cplusplus
13881extern "C"
13882#endif
13883char dbopen ();
13884int
13885main ()
13886{
13887return dbopen ();
13888  ;
13889  return 0;
13890}
13891_ACEOF
13892if ac_fn_c_try_link "$LINENO"; then :
13893  eval "$as_ac_Lib=yes"
13894else
13895  eval "$as_ac_Lib=no"
13896fi
13897rm -f core conftest.err conftest.$ac_objext \
13898    conftest$ac_exeext conftest.$ac_ext
13899LIBS=$ac_check_lib_save_LIBS
13900fi
13901eval ac_res=\$$as_ac_Lib
13902	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13903$as_echo "$ac_res" >&6; }
13904if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13905  result=yes
13906else
13907  result=no
13908
13909fi
13910
13911          elif test "1" = "2"; then
13912            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13914$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13915if eval \${$as_ac_Lib+:} false; then :
13916  $as_echo_n "(cached) " >&6
13917else
13918  ac_check_lib_save_LIBS=$LIBS
13919LIBS="-l$bdb_libname  $LIBS"
13920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921/* end confdefs.h.  */
13922
13923/* Override any GCC internal prototype to avoid an error.
13924   Use char because int might match the return type of a GCC
13925   builtin and then its argument prototype would still apply.  */
13926#ifdef __cplusplus
13927extern "C"
13928#endif
13929char db_open ();
13930int
13931main ()
13932{
13933return db_open ();
13934  ;
13935  return 0;
13936}
13937_ACEOF
13938if ac_fn_c_try_link "$LINENO"; then :
13939  eval "$as_ac_Lib=yes"
13940else
13941  eval "$as_ac_Lib=no"
13942fi
13943rm -f core conftest.err conftest.$ac_objext \
13944    conftest$ac_exeext conftest.$ac_ext
13945LIBS=$ac_check_lib_save_LIBS
13946fi
13947eval ac_res=\$$as_ac_Lib
13948	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13949$as_echo "$ac_res" >&6; }
13950if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13951  result=yes
13952else
13953  result=no
13954
13955fi
13956
13957          fi
13958
13959else
13960  result="no"
13961fi
13962
13963
13964
13965        # If we found it, no need to search any more.
13966        if test "$result" = "yes"; then
13967          found="$bdb_place"
13968          break
13969        fi
13970      done
13971      test "$found" != "not" && break
13972    done
13973    test "$found" != "not" && break
13974  done
13975
13976  # Restore the original values of the flags we tweak.
13977  LDFLAGS="$apu_check_lib_save_ldflags"
13978  CPPFLAGS="$apu_check_lib_save_cppflags"
13979
13980  case "$found" in
13981  "not")
13982    apu_have_db=0
13983    ;;
13984  "std")
13985    apu_db_header=$bdb_header
13986    apu_db_lib=$bdb_libname
13987    apu_have_db=1
13988    ;;
13989  *":"*)
13990    header="`echo $found | sed -e 's/:.*$//'`"
13991    lib="`echo $found | sed -e 's/^.*://'`"
13992
13993
13994  if test "x$APRUTIL_INCLUDES" = "x"; then
13995    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13996    APRUTIL_INCLUDES="-I$header"
13997  else
13998    apr_addto_bugger="-I$header"
13999    for i in $apr_addto_bugger; do
14000      apr_addto_duplicate="0"
14001      for j in $APRUTIL_INCLUDES; do
14002        if test "x$i" = "x$j"; then
14003          apr_addto_duplicate="1"
14004          break
14005        fi
14006      done
14007      if test $apr_addto_duplicate = "0"; then
14008        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14009        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14010      fi
14011    done
14012  fi
14013
14014
14015  if test "x$APRUTIL_LDFLAGS" = "x"; then
14016    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14017    APRUTIL_LDFLAGS="-L$lib"
14018  else
14019    apr_addto_bugger="-L$lib"
14020    for i in $apr_addto_bugger; do
14021      apr_addto_duplicate="0"
14022      for j in $APRUTIL_LDFLAGS; do
14023        if test "x$i" = "x$j"; then
14024          apr_addto_duplicate="1"
14025          break
14026        fi
14027      done
14028      if test $apr_addto_duplicate = "0"; then
14029        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14030        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14031      fi
14032    done
14033  fi
14034
14035    apu_db_header=$bdb_header
14036    apu_db_lib=$bdb_libname
14037    apu_have_db=1
14038    ;;
14039  *)
14040
14041  if test "x$APRUTIL_INCLUDES" = "x"; then
14042    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14043    APRUTIL_INCLUDES="-I$found/include"
14044  else
14045    apr_addto_bugger="-I$found/include"
14046    for i in $apr_addto_bugger; do
14047      apr_addto_duplicate="0"
14048      for j in $APRUTIL_INCLUDES; do
14049        if test "x$i" = "x$j"; then
14050          apr_addto_duplicate="1"
14051          break
14052        fi
14053      done
14054      if test $apr_addto_duplicate = "0"; then
14055        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14056        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14057      fi
14058    done
14059  fi
14060
14061
14062  if test "x$APRUTIL_LDFLAGS" = "x"; then
14063    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14064    APRUTIL_LDFLAGS="-L$found/lib"
14065  else
14066    apr_addto_bugger="-L$found/lib"
14067    for i in $apr_addto_bugger; do
14068      apr_addto_duplicate="0"
14069      for j in $APRUTIL_LDFLAGS; do
14070        if test "x$i" = "x$j"; then
14071          apr_addto_duplicate="1"
14072          break
14073        fi
14074      done
14075      if test $apr_addto_duplicate = "0"; then
14076        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14077        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14078      fi
14079    done
14080  fi
14081
14082    apu_db_header=$bdb_header
14083    apu_db_lib=$bdb_libname
14084    apu_have_db=1
14085    ;;
14086  esac
14087
14088  if test "$apu_have_db" = "1"; then
14089    apu_db_version=185
14090  fi
14091
14092  fi
14093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB" >&5
14094$as_echo_n "checking for Berkeley DB... " >&6; }
14095  if test "$apu_have_db" = "1"; then
14096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found db$apu_db_version" >&5
14097$as_echo "found db$apu_db_version" >&6; }
14098  else
14099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14100$as_echo "not found" >&6; }
14101  fi
14102
14103    if test "$apu_have_db" = "0"; then
14104      as_fn_error but not found "Berkeley db requested" "$LINENO" 5
14105    fi
14106    ;;
14107  db1)
14108
14109  places="$check_places"
14110  if test -z "$places"; then
14111    places="std"
14112  fi
14113
14114  bdb_version=1
14115  if test "0" != "-1"; then
14116    bdb_version="$bdb_version.0"
14117    if test "0" != "-1"; then
14118      bdb_version="$bdb_version.0"
14119    fi
14120  fi
14121  bdb_places="$places"
14122  bdb_default_search_headers="db1/db.h db.h"
14123  bdb_default_search_lib_names="db1"
14124
14125
14126  apu_have_db=0
14127
14128  # Save the original values of the flags we tweak.
14129  apu_check_lib_save_libs="$LIBS"
14130  apu_check_lib_save_ldflags="$LDFLAGS"
14131  apu_check_lib_save_cppflags="$CPPFLAGS"
14132
14133  # The variable `found' is the prefix under which we've found
14134  # Berkeley DB, or `not' if we haven't found it anywhere yet.
14135  found=not
14136  for bdb_place in $bdb_places; do
14137
14138    LDFLAGS="$apu_check_lib_save_ldflags"
14139    CPPFLAGS="$apu_check_lib_save_cppflags"
14140    case "$bdb_place" in
14141      "std" )
14142        description="the standard places"
14143      ;;
14144      *":"* )
14145        header="`echo $bdb_place | sed -e 's/:.*$//'`"
14146        lib="`echo $bdb_place | sed -e 's/^.*://'`"
14147        CPPFLAGS="$CPPFLAGS -I$header"
14148        LDFLAGS="$LDFLAGS -L$lib"
14149        description="$header and $lib"
14150      ;;
14151      * )
14152        if test -d $bdb_place; then
14153          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14154          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14155        else
14156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14157$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14159$as_echo "directory not found" >&6; }
14160          continue
14161        fi
14162        description="$bdb_place"
14163      ;;
14164    esac
14165
14166    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14167    # trick to display a message instead.
14168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14169$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14171$as_echo "" >&6; }
14172
14173    for bdb_libname in $bdb_default_search_lib_names; do
14174      for bdb_header in $bdb_default_search_headers; do
14175        # Clear the header cache variable for each location
14176
14177        cache_id="`echo ac_cv_header_${bdb_header} \
14178                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14179
14180        unset $cache_id
14181        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14182ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14183if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14184
14185          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
14186            # We generate a separate cache variable for each prefix and libname
14187            # we search under.  That way, we avoid caching information that
14188            # changes if the user runs `configure' with a different set of
14189            # switches.
14190
14191            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14192                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14193
14194
14195            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14196$as_echo_n "checking for -l$bdb_libname... " >&6; }
14197                                    if eval \${$cache_id+:} false; then :
14198  $as_echo_n "(cached) " >&6
14199else
14200
14201
14202    apu_try_berkeley_db_save_libs="$LIBS"
14203
14204    apu_check_berkeley_db_major=1
14205    apu_check_berkeley_db_minor=0
14206    apu_check_berkeley_db_patch=0
14207    apu_try_berkeley_db_header=$bdb_header
14208    apu_try_berkeley_db_libname=$bdb_libname
14209
14210    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14211    if test "$cross_compiling" = yes; then :
14212  apu_try_berkeley_db=yes
14213
14214else
14215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h.  */
14217
14218#include <stdlib.h>
14219#include <stdio.h>
14220#include <$apu_try_berkeley_db_header>
14221main ()
14222{
14223  int major, minor, patch;
14224
14225  db_version(&major, &minor, &patch);
14226
14227  /* Sanity check: ensure that db.h constants actually match the db library */
14228  if (major != DB_VERSION_MAJOR
14229      || minor != DB_VERSION_MINOR
14230      || patch != DB_VERSION_PATCH)
14231    exit (1);
14232
14233  /* Run-time check:  ensure the library claims to be the correct version. */
14234
14235  if ($apu_check_berkeley_db_major != -1) {
14236    if (major < $apu_check_berkeley_db_major)
14237      exit (1);
14238    if (major > $apu_check_berkeley_db_major)
14239      exit (0);
14240  }
14241
14242  if ($apu_check_berkeley_db_minor != -1) {
14243    if (minor < $apu_check_berkeley_db_minor)
14244      exit (1);
14245    if (minor > $apu_check_berkeley_db_minor)
14246      exit (0);
14247  }
14248
14249  if ($apu_check_berkeley_db_patch == -1
14250      || patch >= $apu_check_berkeley_db_patch)
14251    exit (0);
14252  else
14253    exit (1);
14254}
14255
14256_ACEOF
14257if ac_fn_c_try_run "$LINENO"; then :
14258  apu_try_berkeley_db=yes
14259else
14260  apu_try_berkeley_db=no
14261fi
14262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14263  conftest.$ac_objext conftest.beam conftest.$ac_ext
14264fi
14265
14266
14267    LIBS="$apu_try_berkeley_db_save_libs"
14268
14269
14270                eval "$cache_id=$apu_try_berkeley_db"
14271
14272fi
14273
14274            result="`eval echo '$'$cache_id`"
14275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14276$as_echo "$result" >&6; }
14277          elif test "1" = "1"; then
14278            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14280$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14281if eval \${$as_ac_Lib+:} false; then :
14282  $as_echo_n "(cached) " >&6
14283else
14284  ac_check_lib_save_LIBS=$LIBS
14285LIBS="-l$bdb_libname  $LIBS"
14286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287/* end confdefs.h.  */
14288
14289/* Override any GCC internal prototype to avoid an error.
14290   Use char because int might match the return type of a GCC
14291   builtin and then its argument prototype would still apply.  */
14292#ifdef __cplusplus
14293extern "C"
14294#endif
14295char dbopen ();
14296int
14297main ()
14298{
14299return dbopen ();
14300  ;
14301  return 0;
14302}
14303_ACEOF
14304if ac_fn_c_try_link "$LINENO"; then :
14305  eval "$as_ac_Lib=yes"
14306else
14307  eval "$as_ac_Lib=no"
14308fi
14309rm -f core conftest.err conftest.$ac_objext \
14310    conftest$ac_exeext conftest.$ac_ext
14311LIBS=$ac_check_lib_save_LIBS
14312fi
14313eval ac_res=\$$as_ac_Lib
14314	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14315$as_echo "$ac_res" >&6; }
14316if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14317  result=yes
14318else
14319  result=no
14320
14321fi
14322
14323          elif test "1" = "2"; then
14324            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14326$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14327if eval \${$as_ac_Lib+:} false; then :
14328  $as_echo_n "(cached) " >&6
14329else
14330  ac_check_lib_save_LIBS=$LIBS
14331LIBS="-l$bdb_libname  $LIBS"
14332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14333/* end confdefs.h.  */
14334
14335/* Override any GCC internal prototype to avoid an error.
14336   Use char because int might match the return type of a GCC
14337   builtin and then its argument prototype would still apply.  */
14338#ifdef __cplusplus
14339extern "C"
14340#endif
14341char db_open ();
14342int
14343main ()
14344{
14345return db_open ();
14346  ;
14347  return 0;
14348}
14349_ACEOF
14350if ac_fn_c_try_link "$LINENO"; then :
14351  eval "$as_ac_Lib=yes"
14352else
14353  eval "$as_ac_Lib=no"
14354fi
14355rm -f core conftest.err conftest.$ac_objext \
14356    conftest$ac_exeext conftest.$ac_ext
14357LIBS=$ac_check_lib_save_LIBS
14358fi
14359eval ac_res=\$$as_ac_Lib
14360	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14361$as_echo "$ac_res" >&6; }
14362if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14363  result=yes
14364else
14365  result=no
14366
14367fi
14368
14369          fi
14370
14371else
14372  result="no"
14373fi
14374
14375
14376
14377        # If we found it, no need to search any more.
14378        if test "$result" = "yes"; then
14379          found="$bdb_place"
14380          break
14381        fi
14382      done
14383      test "$found" != "not" && break
14384    done
14385    test "$found" != "not" && break
14386  done
14387
14388  # Restore the original values of the flags we tweak.
14389  LDFLAGS="$apu_check_lib_save_ldflags"
14390  CPPFLAGS="$apu_check_lib_save_cppflags"
14391
14392  case "$found" in
14393  "not")
14394    apu_have_db=0
14395    ;;
14396  "std")
14397    apu_db_header=$bdb_header
14398    apu_db_lib=$bdb_libname
14399    apu_have_db=1
14400    ;;
14401  *":"*)
14402    header="`echo $found | sed -e 's/:.*$//'`"
14403    lib="`echo $found | sed -e 's/^.*://'`"
14404
14405
14406  if test "x$APRUTIL_INCLUDES" = "x"; then
14407    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
14408    APRUTIL_INCLUDES="-I$header"
14409  else
14410    apr_addto_bugger="-I$header"
14411    for i in $apr_addto_bugger; do
14412      apr_addto_duplicate="0"
14413      for j in $APRUTIL_INCLUDES; do
14414        if test "x$i" = "x$j"; then
14415          apr_addto_duplicate="1"
14416          break
14417        fi
14418      done
14419      if test $apr_addto_duplicate = "0"; then
14420        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14421        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14422      fi
14423    done
14424  fi
14425
14426
14427  if test "x$APRUTIL_LDFLAGS" = "x"; then
14428    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14429    APRUTIL_LDFLAGS="-L$lib"
14430  else
14431    apr_addto_bugger="-L$lib"
14432    for i in $apr_addto_bugger; do
14433      apr_addto_duplicate="0"
14434      for j in $APRUTIL_LDFLAGS; do
14435        if test "x$i" = "x$j"; then
14436          apr_addto_duplicate="1"
14437          break
14438        fi
14439      done
14440      if test $apr_addto_duplicate = "0"; then
14441        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14442        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14443      fi
14444    done
14445  fi
14446
14447    apu_db_header=$bdb_header
14448    apu_db_lib=$bdb_libname
14449    apu_have_db=1
14450    ;;
14451  *)
14452
14453  if test "x$APRUTIL_INCLUDES" = "x"; then
14454    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14455    APRUTIL_INCLUDES="-I$found/include"
14456  else
14457    apr_addto_bugger="-I$found/include"
14458    for i in $apr_addto_bugger; do
14459      apr_addto_duplicate="0"
14460      for j in $APRUTIL_INCLUDES; do
14461        if test "x$i" = "x$j"; then
14462          apr_addto_duplicate="1"
14463          break
14464        fi
14465      done
14466      if test $apr_addto_duplicate = "0"; then
14467        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14468        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14469      fi
14470    done
14471  fi
14472
14473
14474  if test "x$APRUTIL_LDFLAGS" = "x"; then
14475    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14476    APRUTIL_LDFLAGS="-L$found/lib"
14477  else
14478    apr_addto_bugger="-L$found/lib"
14479    for i in $apr_addto_bugger; do
14480      apr_addto_duplicate="0"
14481      for j in $APRUTIL_LDFLAGS; do
14482        if test "x$i" = "x$j"; then
14483          apr_addto_duplicate="1"
14484          break
14485        fi
14486      done
14487      if test $apr_addto_duplicate = "0"; then
14488        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14489        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14490      fi
14491    done
14492  fi
14493
14494    apu_db_header=$bdb_header
14495    apu_db_lib=$bdb_libname
14496    apu_have_db=1
14497    ;;
14498  esac
14499
14500  if test "$apu_have_db" = "1"; then
14501    apu_db_version=1
14502  fi
14503
14504    if test "$apu_db_version" != "1"; then
14505      as_fn_error $? "Berkeley db1 not found" "$LINENO" 5
14506    fi
14507    ;;
14508  db185)
14509
14510  places="$check_places"
14511  if test -z "$places"; then
14512    places="std"
14513  fi
14514
14515  bdb_version=1
14516  if test "-1" != "-1"; then
14517    bdb_version="$bdb_version.-1"
14518    if test "-1" != "-1"; then
14519      bdb_version="$bdb_version.-1"
14520    fi
14521  fi
14522  bdb_places="$places"
14523  bdb_default_search_headers="db_185.h"
14524  bdb_default_search_lib_names="db"
14525
14526
14527  apu_have_db=0
14528
14529  # Save the original values of the flags we tweak.
14530  apu_check_lib_save_libs="$LIBS"
14531  apu_check_lib_save_ldflags="$LDFLAGS"
14532  apu_check_lib_save_cppflags="$CPPFLAGS"
14533
14534  # The variable `found' is the prefix under which we've found
14535  # Berkeley DB, or `not' if we haven't found it anywhere yet.
14536  found=not
14537  for bdb_place in $bdb_places; do
14538
14539    LDFLAGS="$apu_check_lib_save_ldflags"
14540    CPPFLAGS="$apu_check_lib_save_cppflags"
14541    case "$bdb_place" in
14542      "std" )
14543        description="the standard places"
14544      ;;
14545      *":"* )
14546        header="`echo $bdb_place | sed -e 's/:.*$//'`"
14547        lib="`echo $bdb_place | sed -e 's/^.*://'`"
14548        CPPFLAGS="$CPPFLAGS -I$header"
14549        LDFLAGS="$LDFLAGS -L$lib"
14550        description="$header and $lib"
14551      ;;
14552      * )
14553        if test -d $bdb_place; then
14554          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14555          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14556        else
14557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14558$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14560$as_echo "directory not found" >&6; }
14561          continue
14562        fi
14563        description="$bdb_place"
14564      ;;
14565    esac
14566
14567    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14568    # trick to display a message instead.
14569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14570$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14572$as_echo "" >&6; }
14573
14574    for bdb_libname in $bdb_default_search_lib_names; do
14575      for bdb_header in $bdb_default_search_headers; do
14576        # Clear the header cache variable for each location
14577
14578        cache_id="`echo ac_cv_header_${bdb_header} \
14579                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14580
14581        unset $cache_id
14582        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14583ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14584if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14585
14586          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
14587            # We generate a separate cache variable for each prefix and libname
14588            # we search under.  That way, we avoid caching information that
14589            # changes if the user runs `configure' with a different set of
14590            # switches.
14591
14592            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14593                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14594
14595
14596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14597$as_echo_n "checking for -l$bdb_libname... " >&6; }
14598                                    if eval \${$cache_id+:} false; then :
14599  $as_echo_n "(cached) " >&6
14600else
14601
14602
14603    apu_try_berkeley_db_save_libs="$LIBS"
14604
14605    apu_check_berkeley_db_major=1
14606    apu_check_berkeley_db_minor=-1
14607    apu_check_berkeley_db_patch=-1
14608    apu_try_berkeley_db_header=$bdb_header
14609    apu_try_berkeley_db_libname=$bdb_libname
14610
14611    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14612    if test "$cross_compiling" = yes; then :
14613  apu_try_berkeley_db=yes
14614
14615else
14616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617/* end confdefs.h.  */
14618
14619#include <stdlib.h>
14620#include <stdio.h>
14621#include <$apu_try_berkeley_db_header>
14622main ()
14623{
14624  int major, minor, patch;
14625
14626  db_version(&major, &minor, &patch);
14627
14628  /* Sanity check: ensure that db.h constants actually match the db library */
14629  if (major != DB_VERSION_MAJOR
14630      || minor != DB_VERSION_MINOR
14631      || patch != DB_VERSION_PATCH)
14632    exit (1);
14633
14634  /* Run-time check:  ensure the library claims to be the correct version. */
14635
14636  if ($apu_check_berkeley_db_major != -1) {
14637    if (major < $apu_check_berkeley_db_major)
14638      exit (1);
14639    if (major > $apu_check_berkeley_db_major)
14640      exit (0);
14641  }
14642
14643  if ($apu_check_berkeley_db_minor != -1) {
14644    if (minor < $apu_check_berkeley_db_minor)
14645      exit (1);
14646    if (minor > $apu_check_berkeley_db_minor)
14647      exit (0);
14648  }
14649
14650  if ($apu_check_berkeley_db_patch == -1
14651      || patch >= $apu_check_berkeley_db_patch)
14652    exit (0);
14653  else
14654    exit (1);
14655}
14656
14657_ACEOF
14658if ac_fn_c_try_run "$LINENO"; then :
14659  apu_try_berkeley_db=yes
14660else
14661  apu_try_berkeley_db=no
14662fi
14663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14664  conftest.$ac_objext conftest.beam conftest.$ac_ext
14665fi
14666
14667
14668    LIBS="$apu_try_berkeley_db_save_libs"
14669
14670
14671                eval "$cache_id=$apu_try_berkeley_db"
14672
14673fi
14674
14675            result="`eval echo '$'$cache_id`"
14676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14677$as_echo "$result" >&6; }
14678          elif test "1" = "1"; then
14679            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14681$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14682if eval \${$as_ac_Lib+:} false; then :
14683  $as_echo_n "(cached) " >&6
14684else
14685  ac_check_lib_save_LIBS=$LIBS
14686LIBS="-l$bdb_libname  $LIBS"
14687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14688/* end confdefs.h.  */
14689
14690/* Override any GCC internal prototype to avoid an error.
14691   Use char because int might match the return type of a GCC
14692   builtin and then its argument prototype would still apply.  */
14693#ifdef __cplusplus
14694extern "C"
14695#endif
14696char dbopen ();
14697int
14698main ()
14699{
14700return dbopen ();
14701  ;
14702  return 0;
14703}
14704_ACEOF
14705if ac_fn_c_try_link "$LINENO"; then :
14706  eval "$as_ac_Lib=yes"
14707else
14708  eval "$as_ac_Lib=no"
14709fi
14710rm -f core conftest.err conftest.$ac_objext \
14711    conftest$ac_exeext conftest.$ac_ext
14712LIBS=$ac_check_lib_save_LIBS
14713fi
14714eval ac_res=\$$as_ac_Lib
14715	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14716$as_echo "$ac_res" >&6; }
14717if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14718  result=yes
14719else
14720  result=no
14721
14722fi
14723
14724          elif test "1" = "2"; then
14725            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14727$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14728if eval \${$as_ac_Lib+:} false; then :
14729  $as_echo_n "(cached) " >&6
14730else
14731  ac_check_lib_save_LIBS=$LIBS
14732LIBS="-l$bdb_libname  $LIBS"
14733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14734/* end confdefs.h.  */
14735
14736/* Override any GCC internal prototype to avoid an error.
14737   Use char because int might match the return type of a GCC
14738   builtin and then its argument prototype would still apply.  */
14739#ifdef __cplusplus
14740extern "C"
14741#endif
14742char db_open ();
14743int
14744main ()
14745{
14746return db_open ();
14747  ;
14748  return 0;
14749}
14750_ACEOF
14751if ac_fn_c_try_link "$LINENO"; then :
14752  eval "$as_ac_Lib=yes"
14753else
14754  eval "$as_ac_Lib=no"
14755fi
14756rm -f core conftest.err conftest.$ac_objext \
14757    conftest$ac_exeext conftest.$ac_ext
14758LIBS=$ac_check_lib_save_LIBS
14759fi
14760eval ac_res=\$$as_ac_Lib
14761	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14762$as_echo "$ac_res" >&6; }
14763if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14764  result=yes
14765else
14766  result=no
14767
14768fi
14769
14770          fi
14771
14772else
14773  result="no"
14774fi
14775
14776
14777
14778        # If we found it, no need to search any more.
14779        if test "$result" = "yes"; then
14780          found="$bdb_place"
14781          break
14782        fi
14783      done
14784      test "$found" != "not" && break
14785    done
14786    test "$found" != "not" && break
14787  done
14788
14789  # Restore the original values of the flags we tweak.
14790  LDFLAGS="$apu_check_lib_save_ldflags"
14791  CPPFLAGS="$apu_check_lib_save_cppflags"
14792
14793  case "$found" in
14794  "not")
14795    apu_have_db=0
14796    ;;
14797  "std")
14798    apu_db_header=$bdb_header
14799    apu_db_lib=$bdb_libname
14800    apu_have_db=1
14801    ;;
14802  *":"*)
14803    header="`echo $found | sed -e 's/:.*$//'`"
14804    lib="`echo $found | sed -e 's/^.*://'`"
14805
14806
14807  if test "x$APRUTIL_INCLUDES" = "x"; then
14808    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
14809    APRUTIL_INCLUDES="-I$header"
14810  else
14811    apr_addto_bugger="-I$header"
14812    for i in $apr_addto_bugger; do
14813      apr_addto_duplicate="0"
14814      for j in $APRUTIL_INCLUDES; do
14815        if test "x$i" = "x$j"; then
14816          apr_addto_duplicate="1"
14817          break
14818        fi
14819      done
14820      if test $apr_addto_duplicate = "0"; then
14821        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14822        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14823      fi
14824    done
14825  fi
14826
14827
14828  if test "x$APRUTIL_LDFLAGS" = "x"; then
14829    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14830    APRUTIL_LDFLAGS="-L$lib"
14831  else
14832    apr_addto_bugger="-L$lib"
14833    for i in $apr_addto_bugger; do
14834      apr_addto_duplicate="0"
14835      for j in $APRUTIL_LDFLAGS; do
14836        if test "x$i" = "x$j"; then
14837          apr_addto_duplicate="1"
14838          break
14839        fi
14840      done
14841      if test $apr_addto_duplicate = "0"; then
14842        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14843        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14844      fi
14845    done
14846  fi
14847
14848    apu_db_header=$bdb_header
14849    apu_db_lib=$bdb_libname
14850    apu_have_db=1
14851    ;;
14852  *)
14853
14854  if test "x$APRUTIL_INCLUDES" = "x"; then
14855    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14856    APRUTIL_INCLUDES="-I$found/include"
14857  else
14858    apr_addto_bugger="-I$found/include"
14859    for i in $apr_addto_bugger; do
14860      apr_addto_duplicate="0"
14861      for j in $APRUTIL_INCLUDES; do
14862        if test "x$i" = "x$j"; then
14863          apr_addto_duplicate="1"
14864          break
14865        fi
14866      done
14867      if test $apr_addto_duplicate = "0"; then
14868        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14869        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14870      fi
14871    done
14872  fi
14873
14874
14875  if test "x$APRUTIL_LDFLAGS" = "x"; then
14876    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14877    APRUTIL_LDFLAGS="-L$found/lib"
14878  else
14879    apr_addto_bugger="-L$found/lib"
14880    for i in $apr_addto_bugger; do
14881      apr_addto_duplicate="0"
14882      for j in $APRUTIL_LDFLAGS; do
14883        if test "x$i" = "x$j"; then
14884          apr_addto_duplicate="1"
14885          break
14886        fi
14887      done
14888      if test $apr_addto_duplicate = "0"; then
14889        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14890        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14891      fi
14892    done
14893  fi
14894
14895    apu_db_header=$bdb_header
14896    apu_db_lib=$bdb_libname
14897    apu_have_db=1
14898    ;;
14899  esac
14900
14901  if test "$apu_have_db" = "1"; then
14902    apu_db_version=185
14903  fi
14904
14905    if test "$apu_db_version" != "185"; then
14906      as_fn_error $? "Berkeley db185 not found" "$LINENO" 5
14907    fi
14908    ;;
14909  db2)
14910
14911  places="$check_places"
14912  if test -z "$places"; then
14913    places="std"
14914  fi
14915
14916  bdb_version=2
14917  if test "-1" != "-1"; then
14918    bdb_version="$bdb_version.-1"
14919    if test "-1" != "-1"; then
14920      bdb_version="$bdb_version.-1"
14921    fi
14922  fi
14923  bdb_places="$places"
14924  bdb_default_search_headers="db2/db.h db.h"
14925  bdb_default_search_lib_names="db2 db"
14926
14927
14928  apu_have_db=0
14929
14930  # Save the original values of the flags we tweak.
14931  apu_check_lib_save_libs="$LIBS"
14932  apu_check_lib_save_ldflags="$LDFLAGS"
14933  apu_check_lib_save_cppflags="$CPPFLAGS"
14934
14935  # The variable `found' is the prefix under which we've found
14936  # Berkeley DB, or `not' if we haven't found it anywhere yet.
14937  found=not
14938  for bdb_place in $bdb_places; do
14939
14940    LDFLAGS="$apu_check_lib_save_ldflags"
14941    CPPFLAGS="$apu_check_lib_save_cppflags"
14942    case "$bdb_place" in
14943      "std" )
14944        description="the standard places"
14945      ;;
14946      *":"* )
14947        header="`echo $bdb_place | sed -e 's/:.*$//'`"
14948        lib="`echo $bdb_place | sed -e 's/^.*://'`"
14949        CPPFLAGS="$CPPFLAGS -I$header"
14950        LDFLAGS="$LDFLAGS -L$lib"
14951        description="$header and $lib"
14952      ;;
14953      * )
14954        if test -d $bdb_place; then
14955          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14956          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14957        else
14958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14959$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14961$as_echo "directory not found" >&6; }
14962          continue
14963        fi
14964        description="$bdb_place"
14965      ;;
14966    esac
14967
14968    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14969    # trick to display a message instead.
14970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14971$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14973$as_echo "" >&6; }
14974
14975    for bdb_libname in $bdb_default_search_lib_names; do
14976      for bdb_header in $bdb_default_search_headers; do
14977        # Clear the header cache variable for each location
14978
14979        cache_id="`echo ac_cv_header_${bdb_header} \
14980                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14981
14982        unset $cache_id
14983        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14984ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14985if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14986
14987          if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
14988            # We generate a separate cache variable for each prefix and libname
14989            # we search under.  That way, we avoid caching information that
14990            # changes if the user runs `configure' with a different set of
14991            # switches.
14992
14993            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14994                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14995
14996
14997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14998$as_echo_n "checking for -l$bdb_libname... " >&6; }
14999                                    if eval \${$cache_id+:} false; then :
15000  $as_echo_n "(cached) " >&6
15001else
15002
15003
15004    apu_try_berkeley_db_save_libs="$LIBS"
15005
15006    apu_check_berkeley_db_major=2
15007    apu_check_berkeley_db_minor=-1
15008    apu_check_berkeley_db_patch=-1
15009    apu_try_berkeley_db_header=$bdb_header
15010    apu_try_berkeley_db_libname=$bdb_libname
15011
15012    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15013    if test "$cross_compiling" = yes; then :
15014  apu_try_berkeley_db=yes
15015
15016else
15017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018/* end confdefs.h.  */
15019
15020#include <stdlib.h>
15021#include <stdio.h>
15022#include <$apu_try_berkeley_db_header>
15023main ()
15024{
15025  int major, minor, patch;
15026
15027  db_version(&major, &minor, &patch);
15028
15029  /* Sanity check: ensure that db.h constants actually match the db library */
15030  if (major != DB_VERSION_MAJOR
15031      || minor != DB_VERSION_MINOR
15032      || patch != DB_VERSION_PATCH)
15033    exit (1);
15034
15035  /* Run-time check:  ensure the library claims to be the correct version. */
15036
15037  if ($apu_check_berkeley_db_major != -1) {
15038    if (major < $apu_check_berkeley_db_major)
15039      exit (1);
15040    if (major > $apu_check_berkeley_db_major)
15041      exit (0);
15042  }
15043
15044  if ($apu_check_berkeley_db_minor != -1) {
15045    if (minor < $apu_check_berkeley_db_minor)
15046      exit (1);
15047    if (minor > $apu_check_berkeley_db_minor)
15048      exit (0);
15049  }
15050
15051  if ($apu_check_berkeley_db_patch == -1
15052      || patch >= $apu_check_berkeley_db_patch)
15053    exit (0);
15054  else
15055    exit (1);
15056}
15057
15058_ACEOF
15059if ac_fn_c_try_run "$LINENO"; then :
15060  apu_try_berkeley_db=yes
15061else
15062  apu_try_berkeley_db=no
15063fi
15064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15065  conftest.$ac_objext conftest.beam conftest.$ac_ext
15066fi
15067
15068
15069    LIBS="$apu_try_berkeley_db_save_libs"
15070
15071
15072                eval "$cache_id=$apu_try_berkeley_db"
15073
15074fi
15075
15076            result="`eval echo '$'$cache_id`"
15077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15078$as_echo "$result" >&6; }
15079          elif test "2" = "1"; then
15080            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15082$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15083if eval \${$as_ac_Lib+:} false; then :
15084  $as_echo_n "(cached) " >&6
15085else
15086  ac_check_lib_save_LIBS=$LIBS
15087LIBS="-l$bdb_libname  $LIBS"
15088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15089/* end confdefs.h.  */
15090
15091/* Override any GCC internal prototype to avoid an error.
15092   Use char because int might match the return type of a GCC
15093   builtin and then its argument prototype would still apply.  */
15094#ifdef __cplusplus
15095extern "C"
15096#endif
15097char dbopen ();
15098int
15099main ()
15100{
15101return dbopen ();
15102  ;
15103  return 0;
15104}
15105_ACEOF
15106if ac_fn_c_try_link "$LINENO"; then :
15107  eval "$as_ac_Lib=yes"
15108else
15109  eval "$as_ac_Lib=no"
15110fi
15111rm -f core conftest.err conftest.$ac_objext \
15112    conftest$ac_exeext conftest.$ac_ext
15113LIBS=$ac_check_lib_save_LIBS
15114fi
15115eval ac_res=\$$as_ac_Lib
15116	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15117$as_echo "$ac_res" >&6; }
15118if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15119  result=yes
15120else
15121  result=no
15122
15123fi
15124
15125          elif test "2" = "2"; then
15126            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15128$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15129if eval \${$as_ac_Lib+:} false; then :
15130  $as_echo_n "(cached) " >&6
15131else
15132  ac_check_lib_save_LIBS=$LIBS
15133LIBS="-l$bdb_libname  $LIBS"
15134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15135/* end confdefs.h.  */
15136
15137/* Override any GCC internal prototype to avoid an error.
15138   Use char because int might match the return type of a GCC
15139   builtin and then its argument prototype would still apply.  */
15140#ifdef __cplusplus
15141extern "C"
15142#endif
15143char db_open ();
15144int
15145main ()
15146{
15147return db_open ();
15148  ;
15149  return 0;
15150}
15151_ACEOF
15152if ac_fn_c_try_link "$LINENO"; then :
15153  eval "$as_ac_Lib=yes"
15154else
15155  eval "$as_ac_Lib=no"
15156fi
15157rm -f core conftest.err conftest.$ac_objext \
15158    conftest$ac_exeext conftest.$ac_ext
15159LIBS=$ac_check_lib_save_LIBS
15160fi
15161eval ac_res=\$$as_ac_Lib
15162	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15163$as_echo "$ac_res" >&6; }
15164if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15165  result=yes
15166else
15167  result=no
15168
15169fi
15170
15171          fi
15172
15173else
15174  result="no"
15175fi
15176
15177
15178
15179        # If we found it, no need to search any more.
15180        if test "$result" = "yes"; then
15181          found="$bdb_place"
15182          break
15183        fi
15184      done
15185      test "$found" != "not" && break
15186    done
15187    test "$found" != "not" && break
15188  done
15189
15190  # Restore the original values of the flags we tweak.
15191  LDFLAGS="$apu_check_lib_save_ldflags"
15192  CPPFLAGS="$apu_check_lib_save_cppflags"
15193
15194  case "$found" in
15195  "not")
15196    apu_have_db=0
15197    ;;
15198  "std")
15199    apu_db_header=$bdb_header
15200    apu_db_lib=$bdb_libname
15201    apu_have_db=1
15202    ;;
15203  *":"*)
15204    header="`echo $found | sed -e 's/:.*$//'`"
15205    lib="`echo $found | sed -e 's/^.*://'`"
15206
15207
15208  if test "x$APRUTIL_INCLUDES" = "x"; then
15209    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15210    APRUTIL_INCLUDES="-I$header"
15211  else
15212    apr_addto_bugger="-I$header"
15213    for i in $apr_addto_bugger; do
15214      apr_addto_duplicate="0"
15215      for j in $APRUTIL_INCLUDES; do
15216        if test "x$i" = "x$j"; then
15217          apr_addto_duplicate="1"
15218          break
15219        fi
15220      done
15221      if test $apr_addto_duplicate = "0"; then
15222        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15223        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15224      fi
15225    done
15226  fi
15227
15228
15229  if test "x$APRUTIL_LDFLAGS" = "x"; then
15230    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15231    APRUTIL_LDFLAGS="-L$lib"
15232  else
15233    apr_addto_bugger="-L$lib"
15234    for i in $apr_addto_bugger; do
15235      apr_addto_duplicate="0"
15236      for j in $APRUTIL_LDFLAGS; do
15237        if test "x$i" = "x$j"; then
15238          apr_addto_duplicate="1"
15239          break
15240        fi
15241      done
15242      if test $apr_addto_duplicate = "0"; then
15243        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15244        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15245      fi
15246    done
15247  fi
15248
15249    apu_db_header=$bdb_header
15250    apu_db_lib=$bdb_libname
15251    apu_have_db=1
15252    ;;
15253  *)
15254
15255  if test "x$APRUTIL_INCLUDES" = "x"; then
15256    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15257    APRUTIL_INCLUDES="-I$found/include"
15258  else
15259    apr_addto_bugger="-I$found/include"
15260    for i in $apr_addto_bugger; do
15261      apr_addto_duplicate="0"
15262      for j in $APRUTIL_INCLUDES; do
15263        if test "x$i" = "x$j"; then
15264          apr_addto_duplicate="1"
15265          break
15266        fi
15267      done
15268      if test $apr_addto_duplicate = "0"; then
15269        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15270        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15271      fi
15272    done
15273  fi
15274
15275
15276  if test "x$APRUTIL_LDFLAGS" = "x"; then
15277    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15278    APRUTIL_LDFLAGS="-L$found/lib"
15279  else
15280    apr_addto_bugger="-L$found/lib"
15281    for i in $apr_addto_bugger; do
15282      apr_addto_duplicate="0"
15283      for j in $APRUTIL_LDFLAGS; do
15284        if test "x$i" = "x$j"; then
15285          apr_addto_duplicate="1"
15286          break
15287        fi
15288      done
15289      if test $apr_addto_duplicate = "0"; then
15290        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15291        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15292      fi
15293    done
15294  fi
15295
15296    apu_db_header=$bdb_header
15297    apu_db_lib=$bdb_libname
15298    apu_have_db=1
15299    ;;
15300  esac
15301
15302  if test "$apu_have_db" = "1"; then
15303    apu_db_version=2
15304  fi
15305
15306    if test "$apu_db_version" != "2"; then
15307      as_fn_error $? "Berkeley db2 not found" "$LINENO" 5
15308    fi
15309    ;;
15310  db3)
15311
15312  places="$check_places"
15313  if test -z "$places"; then
15314    places="std"
15315  fi
15316
15317  bdb_version=3
15318  if test "-1" != "-1"; then
15319    bdb_version="$bdb_version.-1"
15320    if test "-1" != "-1"; then
15321      bdb_version="$bdb_version.-1"
15322    fi
15323  fi
15324  bdb_places="$places"
15325  bdb_default_search_headers="db3/db.h db.h"
15326  bdb_default_search_lib_names="db3 db"
15327
15328
15329  apu_have_db=0
15330
15331  # Save the original values of the flags we tweak.
15332  apu_check_lib_save_libs="$LIBS"
15333  apu_check_lib_save_ldflags="$LDFLAGS"
15334  apu_check_lib_save_cppflags="$CPPFLAGS"
15335
15336  # The variable `found' is the prefix under which we've found
15337  # Berkeley DB, or `not' if we haven't found it anywhere yet.
15338  found=not
15339  for bdb_place in $bdb_places; do
15340
15341    LDFLAGS="$apu_check_lib_save_ldflags"
15342    CPPFLAGS="$apu_check_lib_save_cppflags"
15343    case "$bdb_place" in
15344      "std" )
15345        description="the standard places"
15346      ;;
15347      *":"* )
15348        header="`echo $bdb_place | sed -e 's/:.*$//'`"
15349        lib="`echo $bdb_place | sed -e 's/^.*://'`"
15350        CPPFLAGS="$CPPFLAGS -I$header"
15351        LDFLAGS="$LDFLAGS -L$lib"
15352        description="$header and $lib"
15353      ;;
15354      * )
15355        if test -d $bdb_place; then
15356          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15357          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15358        else
15359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15360$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15362$as_echo "directory not found" >&6; }
15363          continue
15364        fi
15365        description="$bdb_place"
15366      ;;
15367    esac
15368
15369    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15370    # trick to display a message instead.
15371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15372$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15374$as_echo "" >&6; }
15375
15376    for bdb_libname in $bdb_default_search_lib_names; do
15377      for bdb_header in $bdb_default_search_headers; do
15378        # Clear the header cache variable for each location
15379
15380        cache_id="`echo ac_cv_header_${bdb_header} \
15381                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15382
15383        unset $cache_id
15384        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15385ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15386if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15387
15388          if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
15389            # We generate a separate cache variable for each prefix and libname
15390            # we search under.  That way, we avoid caching information that
15391            # changes if the user runs `configure' with a different set of
15392            # switches.
15393
15394            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15395                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15396
15397
15398            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
15399$as_echo_n "checking for -l$bdb_libname... " >&6; }
15400                                    if eval \${$cache_id+:} false; then :
15401  $as_echo_n "(cached) " >&6
15402else
15403
15404
15405    apu_try_berkeley_db_save_libs="$LIBS"
15406
15407    apu_check_berkeley_db_major=3
15408    apu_check_berkeley_db_minor=-1
15409    apu_check_berkeley_db_patch=-1
15410    apu_try_berkeley_db_header=$bdb_header
15411    apu_try_berkeley_db_libname=$bdb_libname
15412
15413    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15414    if test "$cross_compiling" = yes; then :
15415  apu_try_berkeley_db=yes
15416
15417else
15418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419/* end confdefs.h.  */
15420
15421#include <stdlib.h>
15422#include <stdio.h>
15423#include <$apu_try_berkeley_db_header>
15424main ()
15425{
15426  int major, minor, patch;
15427
15428  db_version(&major, &minor, &patch);
15429
15430  /* Sanity check: ensure that db.h constants actually match the db library */
15431  if (major != DB_VERSION_MAJOR
15432      || minor != DB_VERSION_MINOR
15433      || patch != DB_VERSION_PATCH)
15434    exit (1);
15435
15436  /* Run-time check:  ensure the library claims to be the correct version. */
15437
15438  if ($apu_check_berkeley_db_major != -1) {
15439    if (major < $apu_check_berkeley_db_major)
15440      exit (1);
15441    if (major > $apu_check_berkeley_db_major)
15442      exit (0);
15443  }
15444
15445  if ($apu_check_berkeley_db_minor != -1) {
15446    if (minor < $apu_check_berkeley_db_minor)
15447      exit (1);
15448    if (minor > $apu_check_berkeley_db_minor)
15449      exit (0);
15450  }
15451
15452  if ($apu_check_berkeley_db_patch == -1
15453      || patch >= $apu_check_berkeley_db_patch)
15454    exit (0);
15455  else
15456    exit (1);
15457}
15458
15459_ACEOF
15460if ac_fn_c_try_run "$LINENO"; then :
15461  apu_try_berkeley_db=yes
15462else
15463  apu_try_berkeley_db=no
15464fi
15465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15466  conftest.$ac_objext conftest.beam conftest.$ac_ext
15467fi
15468
15469
15470    LIBS="$apu_try_berkeley_db_save_libs"
15471
15472
15473                eval "$cache_id=$apu_try_berkeley_db"
15474
15475fi
15476
15477            result="`eval echo '$'$cache_id`"
15478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15479$as_echo "$result" >&6; }
15480          elif test "3" = "1"; then
15481            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15483$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15484if eval \${$as_ac_Lib+:} false; then :
15485  $as_echo_n "(cached) " >&6
15486else
15487  ac_check_lib_save_LIBS=$LIBS
15488LIBS="-l$bdb_libname  $LIBS"
15489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15490/* end confdefs.h.  */
15491
15492/* Override any GCC internal prototype to avoid an error.
15493   Use char because int might match the return type of a GCC
15494   builtin and then its argument prototype would still apply.  */
15495#ifdef __cplusplus
15496extern "C"
15497#endif
15498char dbopen ();
15499int
15500main ()
15501{
15502return dbopen ();
15503  ;
15504  return 0;
15505}
15506_ACEOF
15507if ac_fn_c_try_link "$LINENO"; then :
15508  eval "$as_ac_Lib=yes"
15509else
15510  eval "$as_ac_Lib=no"
15511fi
15512rm -f core conftest.err conftest.$ac_objext \
15513    conftest$ac_exeext conftest.$ac_ext
15514LIBS=$ac_check_lib_save_LIBS
15515fi
15516eval ac_res=\$$as_ac_Lib
15517	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15518$as_echo "$ac_res" >&6; }
15519if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15520  result=yes
15521else
15522  result=no
15523
15524fi
15525
15526          elif test "3" = "2"; then
15527            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15529$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15530if eval \${$as_ac_Lib+:} false; then :
15531  $as_echo_n "(cached) " >&6
15532else
15533  ac_check_lib_save_LIBS=$LIBS
15534LIBS="-l$bdb_libname  $LIBS"
15535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15536/* end confdefs.h.  */
15537
15538/* Override any GCC internal prototype to avoid an error.
15539   Use char because int might match the return type of a GCC
15540   builtin and then its argument prototype would still apply.  */
15541#ifdef __cplusplus
15542extern "C"
15543#endif
15544char db_open ();
15545int
15546main ()
15547{
15548return db_open ();
15549  ;
15550  return 0;
15551}
15552_ACEOF
15553if ac_fn_c_try_link "$LINENO"; then :
15554  eval "$as_ac_Lib=yes"
15555else
15556  eval "$as_ac_Lib=no"
15557fi
15558rm -f core conftest.err conftest.$ac_objext \
15559    conftest$ac_exeext conftest.$ac_ext
15560LIBS=$ac_check_lib_save_LIBS
15561fi
15562eval ac_res=\$$as_ac_Lib
15563	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15564$as_echo "$ac_res" >&6; }
15565if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15566  result=yes
15567else
15568  result=no
15569
15570fi
15571
15572          fi
15573
15574else
15575  result="no"
15576fi
15577
15578
15579
15580        # If we found it, no need to search any more.
15581        if test "$result" = "yes"; then
15582          found="$bdb_place"
15583          break
15584        fi
15585      done
15586      test "$found" != "not" && break
15587    done
15588    test "$found" != "not" && break
15589  done
15590
15591  # Restore the original values of the flags we tweak.
15592  LDFLAGS="$apu_check_lib_save_ldflags"
15593  CPPFLAGS="$apu_check_lib_save_cppflags"
15594
15595  case "$found" in
15596  "not")
15597    apu_have_db=0
15598    ;;
15599  "std")
15600    apu_db_header=$bdb_header
15601    apu_db_lib=$bdb_libname
15602    apu_have_db=1
15603    ;;
15604  *":"*)
15605    header="`echo $found | sed -e 's/:.*$//'`"
15606    lib="`echo $found | sed -e 's/^.*://'`"
15607
15608
15609  if test "x$APRUTIL_INCLUDES" = "x"; then
15610    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15611    APRUTIL_INCLUDES="-I$header"
15612  else
15613    apr_addto_bugger="-I$header"
15614    for i in $apr_addto_bugger; do
15615      apr_addto_duplicate="0"
15616      for j in $APRUTIL_INCLUDES; do
15617        if test "x$i" = "x$j"; then
15618          apr_addto_duplicate="1"
15619          break
15620        fi
15621      done
15622      if test $apr_addto_duplicate = "0"; then
15623        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15624        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15625      fi
15626    done
15627  fi
15628
15629
15630  if test "x$APRUTIL_LDFLAGS" = "x"; then
15631    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15632    APRUTIL_LDFLAGS="-L$lib"
15633  else
15634    apr_addto_bugger="-L$lib"
15635    for i in $apr_addto_bugger; do
15636      apr_addto_duplicate="0"
15637      for j in $APRUTIL_LDFLAGS; do
15638        if test "x$i" = "x$j"; then
15639          apr_addto_duplicate="1"
15640          break
15641        fi
15642      done
15643      if test $apr_addto_duplicate = "0"; then
15644        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15645        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15646      fi
15647    done
15648  fi
15649
15650    apu_db_header=$bdb_header
15651    apu_db_lib=$bdb_libname
15652    apu_have_db=1
15653    ;;
15654  *)
15655
15656  if test "x$APRUTIL_INCLUDES" = "x"; then
15657    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15658    APRUTIL_INCLUDES="-I$found/include"
15659  else
15660    apr_addto_bugger="-I$found/include"
15661    for i in $apr_addto_bugger; do
15662      apr_addto_duplicate="0"
15663      for j in $APRUTIL_INCLUDES; do
15664        if test "x$i" = "x$j"; then
15665          apr_addto_duplicate="1"
15666          break
15667        fi
15668      done
15669      if test $apr_addto_duplicate = "0"; then
15670        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15671        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15672      fi
15673    done
15674  fi
15675
15676
15677  if test "x$APRUTIL_LDFLAGS" = "x"; then
15678    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15679    APRUTIL_LDFLAGS="-L$found/lib"
15680  else
15681    apr_addto_bugger="-L$found/lib"
15682    for i in $apr_addto_bugger; do
15683      apr_addto_duplicate="0"
15684      for j in $APRUTIL_LDFLAGS; do
15685        if test "x$i" = "x$j"; then
15686          apr_addto_duplicate="1"
15687          break
15688        fi
15689      done
15690      if test $apr_addto_duplicate = "0"; then
15691        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15692        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15693      fi
15694    done
15695  fi
15696
15697    apu_db_header=$bdb_header
15698    apu_db_lib=$bdb_libname
15699    apu_have_db=1
15700    ;;
15701  esac
15702
15703  if test "$apu_have_db" = "1"; then
15704    apu_db_version=3
15705  fi
15706
15707    if test "$apu_db_version" != "3"; then
15708      as_fn_error $? "Berkeley db3 not found" "$LINENO" 5
15709    fi
15710    ;;
15711  db[45][0-9])
15712    db_major=`echo "$requested" | sed -e 's/db//' -e 's/.$//'`
15713    db_minor=`echo "$requested" | sed -e 's/db//' -e 's/.//'`
15714
15715  places="$check_places"
15716  db_major="$db_major"
15717  db_minor="$db_minor"
15718  if test -z "$places"; then
15719    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
15720  fi
15721
15722  bdb_version="${db_major}"
15723  if test ""${db_minor}"" != "-1"; then
15724    bdb_version="$bdb_version."${db_minor}""
15725    if test ""-1"" != "-1"; then
15726      bdb_version="$bdb_version."-1""
15727    fi
15728  fi
15729  bdb_places="$places"
15730  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
15731  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"
15732
15733
15734  apu_have_db=0
15735
15736  # Save the original values of the flags we tweak.
15737  apu_check_lib_save_libs="$LIBS"
15738  apu_check_lib_save_ldflags="$LDFLAGS"
15739  apu_check_lib_save_cppflags="$CPPFLAGS"
15740
15741  # The variable `found' is the prefix under which we've found
15742  # Berkeley DB, or `not' if we haven't found it anywhere yet.
15743  found=not
15744  for bdb_place in $bdb_places; do
15745
15746    LDFLAGS="$apu_check_lib_save_ldflags"
15747    CPPFLAGS="$apu_check_lib_save_cppflags"
15748    case "$bdb_place" in
15749      "std" )
15750        description="the standard places"
15751      ;;
15752      *":"* )
15753        header="`echo $bdb_place | sed -e 's/:.*$//'`"
15754        lib="`echo $bdb_place | sed -e 's/^.*://'`"
15755        CPPFLAGS="$CPPFLAGS -I$header"
15756        LDFLAGS="$LDFLAGS -L$lib"
15757        description="$header and $lib"
15758      ;;
15759      * )
15760        if test -d $bdb_place; then
15761          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15762          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15763        else
15764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15765$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15767$as_echo "directory not found" >&6; }
15768          continue
15769        fi
15770        description="$bdb_place"
15771      ;;
15772    esac
15773
15774    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15775    # trick to display a message instead.
15776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15777$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15779$as_echo "" >&6; }
15780
15781    for bdb_libname in $bdb_default_search_lib_names; do
15782      for bdb_header in $bdb_default_search_headers; do
15783        # Clear the header cache variable for each location
15784
15785        cache_id="`echo ac_cv_header_${bdb_header} \
15786                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15787
15788        unset $cache_id
15789        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15790ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15791if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15792
15793          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
15794            # We generate a separate cache variable for each prefix and libname
15795            # we search under.  That way, we avoid caching information that
15796            # changes if the user runs `configure' with a different set of
15797            # switches.
15798
15799            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15800                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15801
15802
15803            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
15804$as_echo_n "checking for -l$bdb_libname... " >&6; }
15805                                    if eval \${$cache_id+:} false; then :
15806  $as_echo_n "(cached) " >&6
15807else
15808
15809
15810    apu_try_berkeley_db_save_libs="$LIBS"
15811
15812    apu_check_berkeley_db_major="${db_major}"
15813    apu_check_berkeley_db_minor="${db_minor}"
15814    apu_check_berkeley_db_patch="-1"
15815    apu_try_berkeley_db_header=$bdb_header
15816    apu_try_berkeley_db_libname=$bdb_libname
15817
15818    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15819    if test "$cross_compiling" = yes; then :
15820  apu_try_berkeley_db=yes
15821
15822else
15823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15824/* end confdefs.h.  */
15825
15826#include <stdlib.h>
15827#include <stdio.h>
15828#include <$apu_try_berkeley_db_header>
15829main ()
15830{
15831  int major, minor, patch;
15832
15833  db_version(&major, &minor, &patch);
15834
15835  /* Sanity check: ensure that db.h constants actually match the db library */
15836  if (major != DB_VERSION_MAJOR
15837      || minor != DB_VERSION_MINOR
15838      || patch != DB_VERSION_PATCH)
15839    exit (1);
15840
15841  /* Run-time check:  ensure the library claims to be the correct version. */
15842
15843  if ($apu_check_berkeley_db_major != -1) {
15844    if (major < $apu_check_berkeley_db_major)
15845      exit (1);
15846    if (major > $apu_check_berkeley_db_major)
15847      exit (0);
15848  }
15849
15850  if ($apu_check_berkeley_db_minor != -1) {
15851    if (minor < $apu_check_berkeley_db_minor)
15852      exit (1);
15853    if (minor > $apu_check_berkeley_db_minor)
15854      exit (0);
15855  }
15856
15857  if ($apu_check_berkeley_db_patch == -1
15858      || patch >= $apu_check_berkeley_db_patch)
15859    exit (0);
15860  else
15861    exit (1);
15862}
15863
15864_ACEOF
15865if ac_fn_c_try_run "$LINENO"; then :
15866  apu_try_berkeley_db=yes
15867else
15868  apu_try_berkeley_db=no
15869fi
15870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15871  conftest.$ac_objext conftest.beam conftest.$ac_ext
15872fi
15873
15874
15875    LIBS="$apu_try_berkeley_db_save_libs"
15876
15877
15878                eval "$cache_id=$apu_try_berkeley_db"
15879
15880fi
15881
15882            result="`eval echo '$'$cache_id`"
15883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15884$as_echo "$result" >&6; }
15885          elif test ""${db_major}"" = "1"; then
15886            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15888$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15889if eval \${$as_ac_Lib+:} false; then :
15890  $as_echo_n "(cached) " >&6
15891else
15892  ac_check_lib_save_LIBS=$LIBS
15893LIBS="-l$bdb_libname  $LIBS"
15894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15895/* end confdefs.h.  */
15896
15897/* Override any GCC internal prototype to avoid an error.
15898   Use char because int might match the return type of a GCC
15899   builtin and then its argument prototype would still apply.  */
15900#ifdef __cplusplus
15901extern "C"
15902#endif
15903char dbopen ();
15904int
15905main ()
15906{
15907return dbopen ();
15908  ;
15909  return 0;
15910}
15911_ACEOF
15912if ac_fn_c_try_link "$LINENO"; then :
15913  eval "$as_ac_Lib=yes"
15914else
15915  eval "$as_ac_Lib=no"
15916fi
15917rm -f core conftest.err conftest.$ac_objext \
15918    conftest$ac_exeext conftest.$ac_ext
15919LIBS=$ac_check_lib_save_LIBS
15920fi
15921eval ac_res=\$$as_ac_Lib
15922	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15923$as_echo "$ac_res" >&6; }
15924if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15925  result=yes
15926else
15927  result=no
15928
15929fi
15930
15931          elif test ""${db_major}"" = "2"; then
15932            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15934$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15935if eval \${$as_ac_Lib+:} false; then :
15936  $as_echo_n "(cached) " >&6
15937else
15938  ac_check_lib_save_LIBS=$LIBS
15939LIBS="-l$bdb_libname  $LIBS"
15940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941/* end confdefs.h.  */
15942
15943/* Override any GCC internal prototype to avoid an error.
15944   Use char because int might match the return type of a GCC
15945   builtin and then its argument prototype would still apply.  */
15946#ifdef __cplusplus
15947extern "C"
15948#endif
15949char db_open ();
15950int
15951main ()
15952{
15953return db_open ();
15954  ;
15955  return 0;
15956}
15957_ACEOF
15958if ac_fn_c_try_link "$LINENO"; then :
15959  eval "$as_ac_Lib=yes"
15960else
15961  eval "$as_ac_Lib=no"
15962fi
15963rm -f core conftest.err conftest.$ac_objext \
15964    conftest$ac_exeext conftest.$ac_ext
15965LIBS=$ac_check_lib_save_LIBS
15966fi
15967eval ac_res=\$$as_ac_Lib
15968	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15969$as_echo "$ac_res" >&6; }
15970if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15971  result=yes
15972else
15973  result=no
15974
15975fi
15976
15977          fi
15978
15979else
15980  result="no"
15981fi
15982
15983
15984
15985        # If we found it, no need to search any more.
15986        if test "$result" = "yes"; then
15987          found="$bdb_place"
15988          break
15989        fi
15990      done
15991      test "$found" != "not" && break
15992    done
15993    test "$found" != "not" && break
15994  done
15995
15996  # Restore the original values of the flags we tweak.
15997  LDFLAGS="$apu_check_lib_save_ldflags"
15998  CPPFLAGS="$apu_check_lib_save_cppflags"
15999
16000  case "$found" in
16001  "not")
16002    apu_have_db=0
16003    ;;
16004  "std")
16005    apu_db_header=$bdb_header
16006    apu_db_lib=$bdb_libname
16007    apu_have_db=1
16008    ;;
16009  *":"*)
16010    header="`echo $found | sed -e 's/:.*$//'`"
16011    lib="`echo $found | sed -e 's/^.*://'`"
16012
16013
16014  if test "x$APRUTIL_INCLUDES" = "x"; then
16015    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16016    APRUTIL_INCLUDES="-I$header"
16017  else
16018    apr_addto_bugger="-I$header"
16019    for i in $apr_addto_bugger; do
16020      apr_addto_duplicate="0"
16021      for j in $APRUTIL_INCLUDES; do
16022        if test "x$i" = "x$j"; then
16023          apr_addto_duplicate="1"
16024          break
16025        fi
16026      done
16027      if test $apr_addto_duplicate = "0"; then
16028        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16029        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16030      fi
16031    done
16032  fi
16033
16034
16035  if test "x$APRUTIL_LDFLAGS" = "x"; then
16036    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16037    APRUTIL_LDFLAGS="-L$lib"
16038  else
16039    apr_addto_bugger="-L$lib"
16040    for i in $apr_addto_bugger; do
16041      apr_addto_duplicate="0"
16042      for j in $APRUTIL_LDFLAGS; do
16043        if test "x$i" = "x$j"; then
16044          apr_addto_duplicate="1"
16045          break
16046        fi
16047      done
16048      if test $apr_addto_duplicate = "0"; then
16049        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16050        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16051      fi
16052    done
16053  fi
16054
16055    apu_db_header=$bdb_header
16056    apu_db_lib=$bdb_libname
16057    apu_have_db=1
16058    ;;
16059  *)
16060
16061  if test "x$APRUTIL_INCLUDES" = "x"; then
16062    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16063    APRUTIL_INCLUDES="-I$found/include"
16064  else
16065    apr_addto_bugger="-I$found/include"
16066    for i in $apr_addto_bugger; do
16067      apr_addto_duplicate="0"
16068      for j in $APRUTIL_INCLUDES; do
16069        if test "x$i" = "x$j"; then
16070          apr_addto_duplicate="1"
16071          break
16072        fi
16073      done
16074      if test $apr_addto_duplicate = "0"; then
16075        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16076        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16077      fi
16078    done
16079  fi
16080
16081
16082  if test "x$APRUTIL_LDFLAGS" = "x"; then
16083    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16084    APRUTIL_LDFLAGS="-L$found/lib"
16085  else
16086    apr_addto_bugger="-L$found/lib"
16087    for i in $apr_addto_bugger; do
16088      apr_addto_duplicate="0"
16089      for j in $APRUTIL_LDFLAGS; do
16090        if test "x$i" = "x$j"; then
16091          apr_addto_duplicate="1"
16092          break
16093        fi
16094      done
16095      if test $apr_addto_duplicate = "0"; then
16096        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16097        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16098      fi
16099    done
16100  fi
16101
16102    apu_db_header=$bdb_header
16103    apu_db_lib=$bdb_libname
16104    apu_have_db=1
16105    ;;
16106  esac
16107
16108  if test "$apu_have_db" = "1"; then
16109    apu_db_version=${db_major}
16110  fi
16111
16112    if test "$apu_db_version" != "$db_major"; then
16113      as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5
16114    fi
16115    ;;
16116  db[45])
16117    db_major=`echo "$requested" | sed -e 's/db//'`
16118    # Start version search at version x.9
16119    db_minor=9
16120    while [ $db_minor -ge 0 ]
16121    do
16122
16123  places="$check_places"
16124  db_major="$db_major"
16125  db_minor="$db_minor"
16126  if test -z "$places"; then
16127    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
16128  fi
16129
16130  bdb_version="${db_major}"
16131  if test ""${db_minor}"" != "-1"; then
16132    bdb_version="$bdb_version."${db_minor}""
16133    if test ""-1"" != "-1"; then
16134      bdb_version="$bdb_version."-1""
16135    fi
16136  fi
16137  bdb_places="$places"
16138  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
16139  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"
16140
16141
16142  apu_have_db=0
16143
16144  # Save the original values of the flags we tweak.
16145  apu_check_lib_save_libs="$LIBS"
16146  apu_check_lib_save_ldflags="$LDFLAGS"
16147  apu_check_lib_save_cppflags="$CPPFLAGS"
16148
16149  # The variable `found' is the prefix under which we've found
16150  # Berkeley DB, or `not' if we haven't found it anywhere yet.
16151  found=not
16152  for bdb_place in $bdb_places; do
16153
16154    LDFLAGS="$apu_check_lib_save_ldflags"
16155    CPPFLAGS="$apu_check_lib_save_cppflags"
16156    case "$bdb_place" in
16157      "std" )
16158        description="the standard places"
16159      ;;
16160      *":"* )
16161        header="`echo $bdb_place | sed -e 's/:.*$//'`"
16162        lib="`echo $bdb_place | sed -e 's/^.*://'`"
16163        CPPFLAGS="$CPPFLAGS -I$header"
16164        LDFLAGS="$LDFLAGS -L$lib"
16165        description="$header and $lib"
16166      ;;
16167      * )
16168        if test -d $bdb_place; then
16169          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16170          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16171        else
16172          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16173$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16175$as_echo "directory not found" >&6; }
16176          continue
16177        fi
16178        description="$bdb_place"
16179      ;;
16180    esac
16181
16182    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16183    # trick to display a message instead.
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16185$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16187$as_echo "" >&6; }
16188
16189    for bdb_libname in $bdb_default_search_lib_names; do
16190      for bdb_header in $bdb_default_search_headers; do
16191        # Clear the header cache variable for each location
16192
16193        cache_id="`echo ac_cv_header_${bdb_header} \
16194                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16195
16196        unset $cache_id
16197        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16198ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16199if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16200
16201          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
16202            # We generate a separate cache variable for each prefix and libname
16203            # we search under.  That way, we avoid caching information that
16204            # changes if the user runs `configure' with a different set of
16205            # switches.
16206
16207            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16208                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16209
16210
16211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16212$as_echo_n "checking for -l$bdb_libname... " >&6; }
16213                                    if eval \${$cache_id+:} false; then :
16214  $as_echo_n "(cached) " >&6
16215else
16216
16217
16218    apu_try_berkeley_db_save_libs="$LIBS"
16219
16220    apu_check_berkeley_db_major="${db_major}"
16221    apu_check_berkeley_db_minor="${db_minor}"
16222    apu_check_berkeley_db_patch="-1"
16223    apu_try_berkeley_db_header=$bdb_header
16224    apu_try_berkeley_db_libname=$bdb_libname
16225
16226    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16227    if test "$cross_compiling" = yes; then :
16228  apu_try_berkeley_db=yes
16229
16230else
16231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232/* end confdefs.h.  */
16233
16234#include <stdlib.h>
16235#include <stdio.h>
16236#include <$apu_try_berkeley_db_header>
16237main ()
16238{
16239  int major, minor, patch;
16240
16241  db_version(&major, &minor, &patch);
16242
16243  /* Sanity check: ensure that db.h constants actually match the db library */
16244  if (major != DB_VERSION_MAJOR
16245      || minor != DB_VERSION_MINOR
16246      || patch != DB_VERSION_PATCH)
16247    exit (1);
16248
16249  /* Run-time check:  ensure the library claims to be the correct version. */
16250
16251  if ($apu_check_berkeley_db_major != -1) {
16252    if (major < $apu_check_berkeley_db_major)
16253      exit (1);
16254    if (major > $apu_check_berkeley_db_major)
16255      exit (0);
16256  }
16257
16258  if ($apu_check_berkeley_db_minor != -1) {
16259    if (minor < $apu_check_berkeley_db_minor)
16260      exit (1);
16261    if (minor > $apu_check_berkeley_db_minor)
16262      exit (0);
16263  }
16264
16265  if ($apu_check_berkeley_db_patch == -1
16266      || patch >= $apu_check_berkeley_db_patch)
16267    exit (0);
16268  else
16269    exit (1);
16270}
16271
16272_ACEOF
16273if ac_fn_c_try_run "$LINENO"; then :
16274  apu_try_berkeley_db=yes
16275else
16276  apu_try_berkeley_db=no
16277fi
16278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16279  conftest.$ac_objext conftest.beam conftest.$ac_ext
16280fi
16281
16282
16283    LIBS="$apu_try_berkeley_db_save_libs"
16284
16285
16286                eval "$cache_id=$apu_try_berkeley_db"
16287
16288fi
16289
16290            result="`eval echo '$'$cache_id`"
16291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16292$as_echo "$result" >&6; }
16293          elif test ""${db_major}"" = "1"; then
16294            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16296$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16297if eval \${$as_ac_Lib+:} false; then :
16298  $as_echo_n "(cached) " >&6
16299else
16300  ac_check_lib_save_LIBS=$LIBS
16301LIBS="-l$bdb_libname  $LIBS"
16302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303/* end confdefs.h.  */
16304
16305/* Override any GCC internal prototype to avoid an error.
16306   Use char because int might match the return type of a GCC
16307   builtin and then its argument prototype would still apply.  */
16308#ifdef __cplusplus
16309extern "C"
16310#endif
16311char dbopen ();
16312int
16313main ()
16314{
16315return dbopen ();
16316  ;
16317  return 0;
16318}
16319_ACEOF
16320if ac_fn_c_try_link "$LINENO"; then :
16321  eval "$as_ac_Lib=yes"
16322else
16323  eval "$as_ac_Lib=no"
16324fi
16325rm -f core conftest.err conftest.$ac_objext \
16326    conftest$ac_exeext conftest.$ac_ext
16327LIBS=$ac_check_lib_save_LIBS
16328fi
16329eval ac_res=\$$as_ac_Lib
16330	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16331$as_echo "$ac_res" >&6; }
16332if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16333  result=yes
16334else
16335  result=no
16336
16337fi
16338
16339          elif test ""${db_major}"" = "2"; then
16340            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16342$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16343if eval \${$as_ac_Lib+:} false; then :
16344  $as_echo_n "(cached) " >&6
16345else
16346  ac_check_lib_save_LIBS=$LIBS
16347LIBS="-l$bdb_libname  $LIBS"
16348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349/* end confdefs.h.  */
16350
16351/* Override any GCC internal prototype to avoid an error.
16352   Use char because int might match the return type of a GCC
16353   builtin and then its argument prototype would still apply.  */
16354#ifdef __cplusplus
16355extern "C"
16356#endif
16357char db_open ();
16358int
16359main ()
16360{
16361return db_open ();
16362  ;
16363  return 0;
16364}
16365_ACEOF
16366if ac_fn_c_try_link "$LINENO"; then :
16367  eval "$as_ac_Lib=yes"
16368else
16369  eval "$as_ac_Lib=no"
16370fi
16371rm -f core conftest.err conftest.$ac_objext \
16372    conftest$ac_exeext conftest.$ac_ext
16373LIBS=$ac_check_lib_save_LIBS
16374fi
16375eval ac_res=\$$as_ac_Lib
16376	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16377$as_echo "$ac_res" >&6; }
16378if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16379  result=yes
16380else
16381  result=no
16382
16383fi
16384
16385          fi
16386
16387else
16388  result="no"
16389fi
16390
16391
16392
16393        # If we found it, no need to search any more.
16394        if test "$result" = "yes"; then
16395          found="$bdb_place"
16396          break
16397        fi
16398      done
16399      test "$found" != "not" && break
16400    done
16401    test "$found" != "not" && break
16402  done
16403
16404  # Restore the original values of the flags we tweak.
16405  LDFLAGS="$apu_check_lib_save_ldflags"
16406  CPPFLAGS="$apu_check_lib_save_cppflags"
16407
16408  case "$found" in
16409  "not")
16410    apu_have_db=0
16411    ;;
16412  "std")
16413    apu_db_header=$bdb_header
16414    apu_db_lib=$bdb_libname
16415    apu_have_db=1
16416    ;;
16417  *":"*)
16418    header="`echo $found | sed -e 's/:.*$//'`"
16419    lib="`echo $found | sed -e 's/^.*://'`"
16420
16421
16422  if test "x$APRUTIL_INCLUDES" = "x"; then
16423    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16424    APRUTIL_INCLUDES="-I$header"
16425  else
16426    apr_addto_bugger="-I$header"
16427    for i in $apr_addto_bugger; do
16428      apr_addto_duplicate="0"
16429      for j in $APRUTIL_INCLUDES; do
16430        if test "x$i" = "x$j"; then
16431          apr_addto_duplicate="1"
16432          break
16433        fi
16434      done
16435      if test $apr_addto_duplicate = "0"; then
16436        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16437        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16438      fi
16439    done
16440  fi
16441
16442
16443  if test "x$APRUTIL_LDFLAGS" = "x"; then
16444    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16445    APRUTIL_LDFLAGS="-L$lib"
16446  else
16447    apr_addto_bugger="-L$lib"
16448    for i in $apr_addto_bugger; do
16449      apr_addto_duplicate="0"
16450      for j in $APRUTIL_LDFLAGS; do
16451        if test "x$i" = "x$j"; then
16452          apr_addto_duplicate="1"
16453          break
16454        fi
16455      done
16456      if test $apr_addto_duplicate = "0"; then
16457        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16458        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16459      fi
16460    done
16461  fi
16462
16463    apu_db_header=$bdb_header
16464    apu_db_lib=$bdb_libname
16465    apu_have_db=1
16466    ;;
16467  *)
16468
16469  if test "x$APRUTIL_INCLUDES" = "x"; then
16470    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16471    APRUTIL_INCLUDES="-I$found/include"
16472  else
16473    apr_addto_bugger="-I$found/include"
16474    for i in $apr_addto_bugger; do
16475      apr_addto_duplicate="0"
16476      for j in $APRUTIL_INCLUDES; do
16477        if test "x$i" = "x$j"; then
16478          apr_addto_duplicate="1"
16479          break
16480        fi
16481      done
16482      if test $apr_addto_duplicate = "0"; then
16483        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16484        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16485      fi
16486    done
16487  fi
16488
16489
16490  if test "x$APRUTIL_LDFLAGS" = "x"; then
16491    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16492    APRUTIL_LDFLAGS="-L$found/lib"
16493  else
16494    apr_addto_bugger="-L$found/lib"
16495    for i in $apr_addto_bugger; do
16496      apr_addto_duplicate="0"
16497      for j in $APRUTIL_LDFLAGS; do
16498        if test "x$i" = "x$j"; then
16499          apr_addto_duplicate="1"
16500          break
16501        fi
16502      done
16503      if test $apr_addto_duplicate = "0"; then
16504        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16505        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16506      fi
16507    done
16508  fi
16509
16510    apu_db_header=$bdb_header
16511    apu_db_lib=$bdb_libname
16512    apu_have_db=1
16513    ;;
16514  esac
16515
16516  if test "$apu_have_db" = "1"; then
16517    apu_db_version=${db_major}
16518  fi
16519
16520      if test "$apu_have_db" = "1"; then
16521        break
16522      fi
16523      db_minor=`expr $db_minor - 1`
16524    done
16525    if test "$apu_db_version" != "$db_major"; then
16526      as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5
16527    fi
16528    ;;
16529  default)
16530
16531  all_places="$check_places"
16532
16533  # Start version search at version 5.9
16534  db_version=59
16535  while [ $db_version -ge 40 ]
16536  do
16537    db_major=`echo $db_version | sed -e 's/.$//'`
16538    db_minor=`echo $db_version | sed -e 's/.//'`
16539
16540  places="$all_places"
16541  db_major="$db_major"
16542  db_minor="$db_minor"
16543  if test -z "$places"; then
16544    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
16545  fi
16546
16547  bdb_version="${db_major}"
16548  if test ""${db_minor}"" != "-1"; then
16549    bdb_version="$bdb_version."${db_minor}""
16550    if test ""-1"" != "-1"; then
16551      bdb_version="$bdb_version."-1""
16552    fi
16553  fi
16554  bdb_places="$places"
16555  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
16556  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"
16557
16558
16559  apu_have_db=0
16560
16561  # Save the original values of the flags we tweak.
16562  apu_check_lib_save_libs="$LIBS"
16563  apu_check_lib_save_ldflags="$LDFLAGS"
16564  apu_check_lib_save_cppflags="$CPPFLAGS"
16565
16566  # The variable `found' is the prefix under which we've found
16567  # Berkeley DB, or `not' if we haven't found it anywhere yet.
16568  found=not
16569  for bdb_place in $bdb_places; do
16570
16571    LDFLAGS="$apu_check_lib_save_ldflags"
16572    CPPFLAGS="$apu_check_lib_save_cppflags"
16573    case "$bdb_place" in
16574      "std" )
16575        description="the standard places"
16576      ;;
16577      *":"* )
16578        header="`echo $bdb_place | sed -e 's/:.*$//'`"
16579        lib="`echo $bdb_place | sed -e 's/^.*://'`"
16580        CPPFLAGS="$CPPFLAGS -I$header"
16581        LDFLAGS="$LDFLAGS -L$lib"
16582        description="$header and $lib"
16583      ;;
16584      * )
16585        if test -d $bdb_place; then
16586          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16587          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16588        else
16589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16590$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16592$as_echo "directory not found" >&6; }
16593          continue
16594        fi
16595        description="$bdb_place"
16596      ;;
16597    esac
16598
16599    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16600    # trick to display a message instead.
16601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16602$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16604$as_echo "" >&6; }
16605
16606    for bdb_libname in $bdb_default_search_lib_names; do
16607      for bdb_header in $bdb_default_search_headers; do
16608        # Clear the header cache variable for each location
16609
16610        cache_id="`echo ac_cv_header_${bdb_header} \
16611                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16612
16613        unset $cache_id
16614        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16615ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16616if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16617
16618          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
16619            # We generate a separate cache variable for each prefix and libname
16620            # we search under.  That way, we avoid caching information that
16621            # changes if the user runs `configure' with a different set of
16622            # switches.
16623
16624            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16625                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16626
16627
16628            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16629$as_echo_n "checking for -l$bdb_libname... " >&6; }
16630                                    if eval \${$cache_id+:} false; then :
16631  $as_echo_n "(cached) " >&6
16632else
16633
16634
16635    apu_try_berkeley_db_save_libs="$LIBS"
16636
16637    apu_check_berkeley_db_major="${db_major}"
16638    apu_check_berkeley_db_minor="${db_minor}"
16639    apu_check_berkeley_db_patch="-1"
16640    apu_try_berkeley_db_header=$bdb_header
16641    apu_try_berkeley_db_libname=$bdb_libname
16642
16643    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16644    if test "$cross_compiling" = yes; then :
16645  apu_try_berkeley_db=yes
16646
16647else
16648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16649/* end confdefs.h.  */
16650
16651#include <stdlib.h>
16652#include <stdio.h>
16653#include <$apu_try_berkeley_db_header>
16654main ()
16655{
16656  int major, minor, patch;
16657
16658  db_version(&major, &minor, &patch);
16659
16660  /* Sanity check: ensure that db.h constants actually match the db library */
16661  if (major != DB_VERSION_MAJOR
16662      || minor != DB_VERSION_MINOR
16663      || patch != DB_VERSION_PATCH)
16664    exit (1);
16665
16666  /* Run-time check:  ensure the library claims to be the correct version. */
16667
16668  if ($apu_check_berkeley_db_major != -1) {
16669    if (major < $apu_check_berkeley_db_major)
16670      exit (1);
16671    if (major > $apu_check_berkeley_db_major)
16672      exit (0);
16673  }
16674
16675  if ($apu_check_berkeley_db_minor != -1) {
16676    if (minor < $apu_check_berkeley_db_minor)
16677      exit (1);
16678    if (minor > $apu_check_berkeley_db_minor)
16679      exit (0);
16680  }
16681
16682  if ($apu_check_berkeley_db_patch == -1
16683      || patch >= $apu_check_berkeley_db_patch)
16684    exit (0);
16685  else
16686    exit (1);
16687}
16688
16689_ACEOF
16690if ac_fn_c_try_run "$LINENO"; then :
16691  apu_try_berkeley_db=yes
16692else
16693  apu_try_berkeley_db=no
16694fi
16695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16696  conftest.$ac_objext conftest.beam conftest.$ac_ext
16697fi
16698
16699
16700    LIBS="$apu_try_berkeley_db_save_libs"
16701
16702
16703                eval "$cache_id=$apu_try_berkeley_db"
16704
16705fi
16706
16707            result="`eval echo '$'$cache_id`"
16708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16709$as_echo "$result" >&6; }
16710          elif test ""${db_major}"" = "1"; then
16711            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16713$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16714if eval \${$as_ac_Lib+:} false; then :
16715  $as_echo_n "(cached) " >&6
16716else
16717  ac_check_lib_save_LIBS=$LIBS
16718LIBS="-l$bdb_libname  $LIBS"
16719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16720/* end confdefs.h.  */
16721
16722/* Override any GCC internal prototype to avoid an error.
16723   Use char because int might match the return type of a GCC
16724   builtin and then its argument prototype would still apply.  */
16725#ifdef __cplusplus
16726extern "C"
16727#endif
16728char dbopen ();
16729int
16730main ()
16731{
16732return dbopen ();
16733  ;
16734  return 0;
16735}
16736_ACEOF
16737if ac_fn_c_try_link "$LINENO"; then :
16738  eval "$as_ac_Lib=yes"
16739else
16740  eval "$as_ac_Lib=no"
16741fi
16742rm -f core conftest.err conftest.$ac_objext \
16743    conftest$ac_exeext conftest.$ac_ext
16744LIBS=$ac_check_lib_save_LIBS
16745fi
16746eval ac_res=\$$as_ac_Lib
16747	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16748$as_echo "$ac_res" >&6; }
16749if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16750  result=yes
16751else
16752  result=no
16753
16754fi
16755
16756          elif test ""${db_major}"" = "2"; then
16757            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16759$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16760if eval \${$as_ac_Lib+:} false; then :
16761  $as_echo_n "(cached) " >&6
16762else
16763  ac_check_lib_save_LIBS=$LIBS
16764LIBS="-l$bdb_libname  $LIBS"
16765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16766/* end confdefs.h.  */
16767
16768/* Override any GCC internal prototype to avoid an error.
16769   Use char because int might match the return type of a GCC
16770   builtin and then its argument prototype would still apply.  */
16771#ifdef __cplusplus
16772extern "C"
16773#endif
16774char db_open ();
16775int
16776main ()
16777{
16778return db_open ();
16779  ;
16780  return 0;
16781}
16782_ACEOF
16783if ac_fn_c_try_link "$LINENO"; then :
16784  eval "$as_ac_Lib=yes"
16785else
16786  eval "$as_ac_Lib=no"
16787fi
16788rm -f core conftest.err conftest.$ac_objext \
16789    conftest$ac_exeext conftest.$ac_ext
16790LIBS=$ac_check_lib_save_LIBS
16791fi
16792eval ac_res=\$$as_ac_Lib
16793	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16794$as_echo "$ac_res" >&6; }
16795if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16796  result=yes
16797else
16798  result=no
16799
16800fi
16801
16802          fi
16803
16804else
16805  result="no"
16806fi
16807
16808
16809
16810        # If we found it, no need to search any more.
16811        if test "$result" = "yes"; then
16812          found="$bdb_place"
16813          break
16814        fi
16815      done
16816      test "$found" != "not" && break
16817    done
16818    test "$found" != "not" && break
16819  done
16820
16821  # Restore the original values of the flags we tweak.
16822  LDFLAGS="$apu_check_lib_save_ldflags"
16823  CPPFLAGS="$apu_check_lib_save_cppflags"
16824
16825  case "$found" in
16826  "not")
16827    apu_have_db=0
16828    ;;
16829  "std")
16830    apu_db_header=$bdb_header
16831    apu_db_lib=$bdb_libname
16832    apu_have_db=1
16833    ;;
16834  *":"*)
16835    header="`echo $found | sed -e 's/:.*$//'`"
16836    lib="`echo $found | sed -e 's/^.*://'`"
16837
16838
16839  if test "x$APRUTIL_INCLUDES" = "x"; then
16840    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16841    APRUTIL_INCLUDES="-I$header"
16842  else
16843    apr_addto_bugger="-I$header"
16844    for i in $apr_addto_bugger; do
16845      apr_addto_duplicate="0"
16846      for j in $APRUTIL_INCLUDES; do
16847        if test "x$i" = "x$j"; then
16848          apr_addto_duplicate="1"
16849          break
16850        fi
16851      done
16852      if test $apr_addto_duplicate = "0"; then
16853        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16854        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16855      fi
16856    done
16857  fi
16858
16859
16860  if test "x$APRUTIL_LDFLAGS" = "x"; then
16861    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16862    APRUTIL_LDFLAGS="-L$lib"
16863  else
16864    apr_addto_bugger="-L$lib"
16865    for i in $apr_addto_bugger; do
16866      apr_addto_duplicate="0"
16867      for j in $APRUTIL_LDFLAGS; do
16868        if test "x$i" = "x$j"; then
16869          apr_addto_duplicate="1"
16870          break
16871        fi
16872      done
16873      if test $apr_addto_duplicate = "0"; then
16874        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16875        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16876      fi
16877    done
16878  fi
16879
16880    apu_db_header=$bdb_header
16881    apu_db_lib=$bdb_libname
16882    apu_have_db=1
16883    ;;
16884  *)
16885
16886  if test "x$APRUTIL_INCLUDES" = "x"; then
16887    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16888    APRUTIL_INCLUDES="-I$found/include"
16889  else
16890    apr_addto_bugger="-I$found/include"
16891    for i in $apr_addto_bugger; do
16892      apr_addto_duplicate="0"
16893      for j in $APRUTIL_INCLUDES; do
16894        if test "x$i" = "x$j"; then
16895          apr_addto_duplicate="1"
16896          break
16897        fi
16898      done
16899      if test $apr_addto_duplicate = "0"; then
16900        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16901        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16902      fi
16903    done
16904  fi
16905
16906
16907  if test "x$APRUTIL_LDFLAGS" = "x"; then
16908    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16909    APRUTIL_LDFLAGS="-L$found/lib"
16910  else
16911    apr_addto_bugger="-L$found/lib"
16912    for i in $apr_addto_bugger; do
16913      apr_addto_duplicate="0"
16914      for j in $APRUTIL_LDFLAGS; do
16915        if test "x$i" = "x$j"; then
16916          apr_addto_duplicate="1"
16917          break
16918        fi
16919      done
16920      if test $apr_addto_duplicate = "0"; then
16921        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16922        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16923      fi
16924    done
16925  fi
16926
16927    apu_db_header=$bdb_header
16928    apu_db_lib=$bdb_libname
16929    apu_have_db=1
16930    ;;
16931  esac
16932
16933  if test "$apu_have_db" = "1"; then
16934    apu_db_version=${db_major}
16935  fi
16936
16937    if test "$apu_have_db" = "1"; then
16938      break
16939    fi
16940    db_version=`expr $db_version - 1`
16941  done
16942  if test "$apu_have_db" = "0"; then
16943
16944  places="$all_places"
16945  if test -z "$places"; then
16946    places="std"
16947  fi
16948
16949  bdb_version=3
16950  if test "-1" != "-1"; then
16951    bdb_version="$bdb_version.-1"
16952    if test "-1" != "-1"; then
16953      bdb_version="$bdb_version.-1"
16954    fi
16955  fi
16956  bdb_places="$places"
16957  bdb_default_search_headers="db3/db.h db.h"
16958  bdb_default_search_lib_names="db3 db"
16959
16960
16961  apu_have_db=0
16962
16963  # Save the original values of the flags we tweak.
16964  apu_check_lib_save_libs="$LIBS"
16965  apu_check_lib_save_ldflags="$LDFLAGS"
16966  apu_check_lib_save_cppflags="$CPPFLAGS"
16967
16968  # The variable `found' is the prefix under which we've found
16969  # Berkeley DB, or `not' if we haven't found it anywhere yet.
16970  found=not
16971  for bdb_place in $bdb_places; do
16972
16973    LDFLAGS="$apu_check_lib_save_ldflags"
16974    CPPFLAGS="$apu_check_lib_save_cppflags"
16975    case "$bdb_place" in
16976      "std" )
16977        description="the standard places"
16978      ;;
16979      *":"* )
16980        header="`echo $bdb_place | sed -e 's/:.*$//'`"
16981        lib="`echo $bdb_place | sed -e 's/^.*://'`"
16982        CPPFLAGS="$CPPFLAGS -I$header"
16983        LDFLAGS="$LDFLAGS -L$lib"
16984        description="$header and $lib"
16985      ;;
16986      * )
16987        if test -d $bdb_place; then
16988          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16989          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16990        else
16991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16992$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16994$as_echo "directory not found" >&6; }
16995          continue
16996        fi
16997        description="$bdb_place"
16998      ;;
16999    esac
17000
17001    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17002    # trick to display a message instead.
17003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17004$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17006$as_echo "" >&6; }
17007
17008    for bdb_libname in $bdb_default_search_lib_names; do
17009      for bdb_header in $bdb_default_search_headers; do
17010        # Clear the header cache variable for each location
17011
17012        cache_id="`echo ac_cv_header_${bdb_header} \
17013                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17014
17015        unset $cache_id
17016        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17017ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17018if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17019
17020          if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
17021            # We generate a separate cache variable for each prefix and libname
17022            # we search under.  That way, we avoid caching information that
17023            # changes if the user runs `configure' with a different set of
17024            # switches.
17025
17026            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17027                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17028
17029
17030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17031$as_echo_n "checking for -l$bdb_libname... " >&6; }
17032                                    if eval \${$cache_id+:} false; then :
17033  $as_echo_n "(cached) " >&6
17034else
17035
17036
17037    apu_try_berkeley_db_save_libs="$LIBS"
17038
17039    apu_check_berkeley_db_major=3
17040    apu_check_berkeley_db_minor=-1
17041    apu_check_berkeley_db_patch=-1
17042    apu_try_berkeley_db_header=$bdb_header
17043    apu_try_berkeley_db_libname=$bdb_libname
17044
17045    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17046    if test "$cross_compiling" = yes; then :
17047  apu_try_berkeley_db=yes
17048
17049else
17050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17051/* end confdefs.h.  */
17052
17053#include <stdlib.h>
17054#include <stdio.h>
17055#include <$apu_try_berkeley_db_header>
17056main ()
17057{
17058  int major, minor, patch;
17059
17060  db_version(&major, &minor, &patch);
17061
17062  /* Sanity check: ensure that db.h constants actually match the db library */
17063  if (major != DB_VERSION_MAJOR
17064      || minor != DB_VERSION_MINOR
17065      || patch != DB_VERSION_PATCH)
17066    exit (1);
17067
17068  /* Run-time check:  ensure the library claims to be the correct version. */
17069
17070  if ($apu_check_berkeley_db_major != -1) {
17071    if (major < $apu_check_berkeley_db_major)
17072      exit (1);
17073    if (major > $apu_check_berkeley_db_major)
17074      exit (0);
17075  }
17076
17077  if ($apu_check_berkeley_db_minor != -1) {
17078    if (minor < $apu_check_berkeley_db_minor)
17079      exit (1);
17080    if (minor > $apu_check_berkeley_db_minor)
17081      exit (0);
17082  }
17083
17084  if ($apu_check_berkeley_db_patch == -1
17085      || patch >= $apu_check_berkeley_db_patch)
17086    exit (0);
17087  else
17088    exit (1);
17089}
17090
17091_ACEOF
17092if ac_fn_c_try_run "$LINENO"; then :
17093  apu_try_berkeley_db=yes
17094else
17095  apu_try_berkeley_db=no
17096fi
17097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17098  conftest.$ac_objext conftest.beam conftest.$ac_ext
17099fi
17100
17101
17102    LIBS="$apu_try_berkeley_db_save_libs"
17103
17104
17105                eval "$cache_id=$apu_try_berkeley_db"
17106
17107fi
17108
17109            result="`eval echo '$'$cache_id`"
17110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17111$as_echo "$result" >&6; }
17112          elif test "3" = "1"; then
17113            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17115$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17116if eval \${$as_ac_Lib+:} false; then :
17117  $as_echo_n "(cached) " >&6
17118else
17119  ac_check_lib_save_LIBS=$LIBS
17120LIBS="-l$bdb_libname  $LIBS"
17121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17122/* end confdefs.h.  */
17123
17124/* Override any GCC internal prototype to avoid an error.
17125   Use char because int might match the return type of a GCC
17126   builtin and then its argument prototype would still apply.  */
17127#ifdef __cplusplus
17128extern "C"
17129#endif
17130char dbopen ();
17131int
17132main ()
17133{
17134return dbopen ();
17135  ;
17136  return 0;
17137}
17138_ACEOF
17139if ac_fn_c_try_link "$LINENO"; then :
17140  eval "$as_ac_Lib=yes"
17141else
17142  eval "$as_ac_Lib=no"
17143fi
17144rm -f core conftest.err conftest.$ac_objext \
17145    conftest$ac_exeext conftest.$ac_ext
17146LIBS=$ac_check_lib_save_LIBS
17147fi
17148eval ac_res=\$$as_ac_Lib
17149	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17150$as_echo "$ac_res" >&6; }
17151if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17152  result=yes
17153else
17154  result=no
17155
17156fi
17157
17158          elif test "3" = "2"; then
17159            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17161$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17162if eval \${$as_ac_Lib+:} false; then :
17163  $as_echo_n "(cached) " >&6
17164else
17165  ac_check_lib_save_LIBS=$LIBS
17166LIBS="-l$bdb_libname  $LIBS"
17167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17168/* end confdefs.h.  */
17169
17170/* Override any GCC internal prototype to avoid an error.
17171   Use char because int might match the return type of a GCC
17172   builtin and then its argument prototype would still apply.  */
17173#ifdef __cplusplus
17174extern "C"
17175#endif
17176char db_open ();
17177int
17178main ()
17179{
17180return db_open ();
17181  ;
17182  return 0;
17183}
17184_ACEOF
17185if ac_fn_c_try_link "$LINENO"; then :
17186  eval "$as_ac_Lib=yes"
17187else
17188  eval "$as_ac_Lib=no"
17189fi
17190rm -f core conftest.err conftest.$ac_objext \
17191    conftest$ac_exeext conftest.$ac_ext
17192LIBS=$ac_check_lib_save_LIBS
17193fi
17194eval ac_res=\$$as_ac_Lib
17195	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17196$as_echo "$ac_res" >&6; }
17197if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17198  result=yes
17199else
17200  result=no
17201
17202fi
17203
17204          fi
17205
17206else
17207  result="no"
17208fi
17209
17210
17211
17212        # If we found it, no need to search any more.
17213        if test "$result" = "yes"; then
17214          found="$bdb_place"
17215          break
17216        fi
17217      done
17218      test "$found" != "not" && break
17219    done
17220    test "$found" != "not" && break
17221  done
17222
17223  # Restore the original values of the flags we tweak.
17224  LDFLAGS="$apu_check_lib_save_ldflags"
17225  CPPFLAGS="$apu_check_lib_save_cppflags"
17226
17227  case "$found" in
17228  "not")
17229    apu_have_db=0
17230    ;;
17231  "std")
17232    apu_db_header=$bdb_header
17233    apu_db_lib=$bdb_libname
17234    apu_have_db=1
17235    ;;
17236  *":"*)
17237    header="`echo $found | sed -e 's/:.*$//'`"
17238    lib="`echo $found | sed -e 's/^.*://'`"
17239
17240
17241  if test "x$APRUTIL_INCLUDES" = "x"; then
17242    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17243    APRUTIL_INCLUDES="-I$header"
17244  else
17245    apr_addto_bugger="-I$header"
17246    for i in $apr_addto_bugger; do
17247      apr_addto_duplicate="0"
17248      for j in $APRUTIL_INCLUDES; do
17249        if test "x$i" = "x$j"; then
17250          apr_addto_duplicate="1"
17251          break
17252        fi
17253      done
17254      if test $apr_addto_duplicate = "0"; then
17255        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17256        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17257      fi
17258    done
17259  fi
17260
17261
17262  if test "x$APRUTIL_LDFLAGS" = "x"; then
17263    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17264    APRUTIL_LDFLAGS="-L$lib"
17265  else
17266    apr_addto_bugger="-L$lib"
17267    for i in $apr_addto_bugger; do
17268      apr_addto_duplicate="0"
17269      for j in $APRUTIL_LDFLAGS; do
17270        if test "x$i" = "x$j"; then
17271          apr_addto_duplicate="1"
17272          break
17273        fi
17274      done
17275      if test $apr_addto_duplicate = "0"; then
17276        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17277        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17278      fi
17279    done
17280  fi
17281
17282    apu_db_header=$bdb_header
17283    apu_db_lib=$bdb_libname
17284    apu_have_db=1
17285    ;;
17286  *)
17287
17288  if test "x$APRUTIL_INCLUDES" = "x"; then
17289    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17290    APRUTIL_INCLUDES="-I$found/include"
17291  else
17292    apr_addto_bugger="-I$found/include"
17293    for i in $apr_addto_bugger; do
17294      apr_addto_duplicate="0"
17295      for j in $APRUTIL_INCLUDES; do
17296        if test "x$i" = "x$j"; then
17297          apr_addto_duplicate="1"
17298          break
17299        fi
17300      done
17301      if test $apr_addto_duplicate = "0"; then
17302        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17303        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17304      fi
17305    done
17306  fi
17307
17308
17309  if test "x$APRUTIL_LDFLAGS" = "x"; then
17310    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17311    APRUTIL_LDFLAGS="-L$found/lib"
17312  else
17313    apr_addto_bugger="-L$found/lib"
17314    for i in $apr_addto_bugger; do
17315      apr_addto_duplicate="0"
17316      for j in $APRUTIL_LDFLAGS; do
17317        if test "x$i" = "x$j"; then
17318          apr_addto_duplicate="1"
17319          break
17320        fi
17321      done
17322      if test $apr_addto_duplicate = "0"; then
17323        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17324        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17325      fi
17326    done
17327  fi
17328
17329    apu_db_header=$bdb_header
17330    apu_db_lib=$bdb_libname
17331    apu_have_db=1
17332    ;;
17333  esac
17334
17335  if test "$apu_have_db" = "1"; then
17336    apu_db_version=3
17337  fi
17338
17339  fi
17340  if test "$apu_have_db" = "0"; then
17341
17342  places="$all_places"
17343  if test -z "$places"; then
17344    places="std"
17345  fi
17346
17347  bdb_version=2
17348  if test "-1" != "-1"; then
17349    bdb_version="$bdb_version.-1"
17350    if test "-1" != "-1"; then
17351      bdb_version="$bdb_version.-1"
17352    fi
17353  fi
17354  bdb_places="$places"
17355  bdb_default_search_headers="db2/db.h db.h"
17356  bdb_default_search_lib_names="db2 db"
17357
17358
17359  apu_have_db=0
17360
17361  # Save the original values of the flags we tweak.
17362  apu_check_lib_save_libs="$LIBS"
17363  apu_check_lib_save_ldflags="$LDFLAGS"
17364  apu_check_lib_save_cppflags="$CPPFLAGS"
17365
17366  # The variable `found' is the prefix under which we've found
17367  # Berkeley DB, or `not' if we haven't found it anywhere yet.
17368  found=not
17369  for bdb_place in $bdb_places; do
17370
17371    LDFLAGS="$apu_check_lib_save_ldflags"
17372    CPPFLAGS="$apu_check_lib_save_cppflags"
17373    case "$bdb_place" in
17374      "std" )
17375        description="the standard places"
17376      ;;
17377      *":"* )
17378        header="`echo $bdb_place | sed -e 's/:.*$//'`"
17379        lib="`echo $bdb_place | sed -e 's/^.*://'`"
17380        CPPFLAGS="$CPPFLAGS -I$header"
17381        LDFLAGS="$LDFLAGS -L$lib"
17382        description="$header and $lib"
17383      ;;
17384      * )
17385        if test -d $bdb_place; then
17386          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17387          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17388        else
17389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17390$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17391          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17392$as_echo "directory not found" >&6; }
17393          continue
17394        fi
17395        description="$bdb_place"
17396      ;;
17397    esac
17398
17399    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17400    # trick to display a message instead.
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17402$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17404$as_echo "" >&6; }
17405
17406    for bdb_libname in $bdb_default_search_lib_names; do
17407      for bdb_header in $bdb_default_search_headers; do
17408        # Clear the header cache variable for each location
17409
17410        cache_id="`echo ac_cv_header_${bdb_header} \
17411                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17412
17413        unset $cache_id
17414        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17415ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17416if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17417
17418          if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
17419            # We generate a separate cache variable for each prefix and libname
17420            # we search under.  That way, we avoid caching information that
17421            # changes if the user runs `configure' with a different set of
17422            # switches.
17423
17424            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17425                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17426
17427
17428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17429$as_echo_n "checking for -l$bdb_libname... " >&6; }
17430                                    if eval \${$cache_id+:} false; then :
17431  $as_echo_n "(cached) " >&6
17432else
17433
17434
17435    apu_try_berkeley_db_save_libs="$LIBS"
17436
17437    apu_check_berkeley_db_major=2
17438    apu_check_berkeley_db_minor=-1
17439    apu_check_berkeley_db_patch=-1
17440    apu_try_berkeley_db_header=$bdb_header
17441    apu_try_berkeley_db_libname=$bdb_libname
17442
17443    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17444    if test "$cross_compiling" = yes; then :
17445  apu_try_berkeley_db=yes
17446
17447else
17448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17449/* end confdefs.h.  */
17450
17451#include <stdlib.h>
17452#include <stdio.h>
17453#include <$apu_try_berkeley_db_header>
17454main ()
17455{
17456  int major, minor, patch;
17457
17458  db_version(&major, &minor, &patch);
17459
17460  /* Sanity check: ensure that db.h constants actually match the db library */
17461  if (major != DB_VERSION_MAJOR
17462      || minor != DB_VERSION_MINOR
17463      || patch != DB_VERSION_PATCH)
17464    exit (1);
17465
17466  /* Run-time check:  ensure the library claims to be the correct version. */
17467
17468  if ($apu_check_berkeley_db_major != -1) {
17469    if (major < $apu_check_berkeley_db_major)
17470      exit (1);
17471    if (major > $apu_check_berkeley_db_major)
17472      exit (0);
17473  }
17474
17475  if ($apu_check_berkeley_db_minor != -1) {
17476    if (minor < $apu_check_berkeley_db_minor)
17477      exit (1);
17478    if (minor > $apu_check_berkeley_db_minor)
17479      exit (0);
17480  }
17481
17482  if ($apu_check_berkeley_db_patch == -1
17483      || patch >= $apu_check_berkeley_db_patch)
17484    exit (0);
17485  else
17486    exit (1);
17487}
17488
17489_ACEOF
17490if ac_fn_c_try_run "$LINENO"; then :
17491  apu_try_berkeley_db=yes
17492else
17493  apu_try_berkeley_db=no
17494fi
17495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17496  conftest.$ac_objext conftest.beam conftest.$ac_ext
17497fi
17498
17499
17500    LIBS="$apu_try_berkeley_db_save_libs"
17501
17502
17503                eval "$cache_id=$apu_try_berkeley_db"
17504
17505fi
17506
17507            result="`eval echo '$'$cache_id`"
17508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17509$as_echo "$result" >&6; }
17510          elif test "2" = "1"; then
17511            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17513$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17514if eval \${$as_ac_Lib+:} false; then :
17515  $as_echo_n "(cached) " >&6
17516else
17517  ac_check_lib_save_LIBS=$LIBS
17518LIBS="-l$bdb_libname  $LIBS"
17519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17520/* end confdefs.h.  */
17521
17522/* Override any GCC internal prototype to avoid an error.
17523   Use char because int might match the return type of a GCC
17524   builtin and then its argument prototype would still apply.  */
17525#ifdef __cplusplus
17526extern "C"
17527#endif
17528char dbopen ();
17529int
17530main ()
17531{
17532return dbopen ();
17533  ;
17534  return 0;
17535}
17536_ACEOF
17537if ac_fn_c_try_link "$LINENO"; then :
17538  eval "$as_ac_Lib=yes"
17539else
17540  eval "$as_ac_Lib=no"
17541fi
17542rm -f core conftest.err conftest.$ac_objext \
17543    conftest$ac_exeext conftest.$ac_ext
17544LIBS=$ac_check_lib_save_LIBS
17545fi
17546eval ac_res=\$$as_ac_Lib
17547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17548$as_echo "$ac_res" >&6; }
17549if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17550  result=yes
17551else
17552  result=no
17553
17554fi
17555
17556          elif test "2" = "2"; then
17557            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17559$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17560if eval \${$as_ac_Lib+:} false; then :
17561  $as_echo_n "(cached) " >&6
17562else
17563  ac_check_lib_save_LIBS=$LIBS
17564LIBS="-l$bdb_libname  $LIBS"
17565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17566/* end confdefs.h.  */
17567
17568/* Override any GCC internal prototype to avoid an error.
17569   Use char because int might match the return type of a GCC
17570   builtin and then its argument prototype would still apply.  */
17571#ifdef __cplusplus
17572extern "C"
17573#endif
17574char db_open ();
17575int
17576main ()
17577{
17578return db_open ();
17579  ;
17580  return 0;
17581}
17582_ACEOF
17583if ac_fn_c_try_link "$LINENO"; then :
17584  eval "$as_ac_Lib=yes"
17585else
17586  eval "$as_ac_Lib=no"
17587fi
17588rm -f core conftest.err conftest.$ac_objext \
17589    conftest$ac_exeext conftest.$ac_ext
17590LIBS=$ac_check_lib_save_LIBS
17591fi
17592eval ac_res=\$$as_ac_Lib
17593	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17594$as_echo "$ac_res" >&6; }
17595if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17596  result=yes
17597else
17598  result=no
17599
17600fi
17601
17602          fi
17603
17604else
17605  result="no"
17606fi
17607
17608
17609
17610        # If we found it, no need to search any more.
17611        if test "$result" = "yes"; then
17612          found="$bdb_place"
17613          break
17614        fi
17615      done
17616      test "$found" != "not" && break
17617    done
17618    test "$found" != "not" && break
17619  done
17620
17621  # Restore the original values of the flags we tweak.
17622  LDFLAGS="$apu_check_lib_save_ldflags"
17623  CPPFLAGS="$apu_check_lib_save_cppflags"
17624
17625  case "$found" in
17626  "not")
17627    apu_have_db=0
17628    ;;
17629  "std")
17630    apu_db_header=$bdb_header
17631    apu_db_lib=$bdb_libname
17632    apu_have_db=1
17633    ;;
17634  *":"*)
17635    header="`echo $found | sed -e 's/:.*$//'`"
17636    lib="`echo $found | sed -e 's/^.*://'`"
17637
17638
17639  if test "x$APRUTIL_INCLUDES" = "x"; then
17640    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17641    APRUTIL_INCLUDES="-I$header"
17642  else
17643    apr_addto_bugger="-I$header"
17644    for i in $apr_addto_bugger; do
17645      apr_addto_duplicate="0"
17646      for j in $APRUTIL_INCLUDES; do
17647        if test "x$i" = "x$j"; then
17648          apr_addto_duplicate="1"
17649          break
17650        fi
17651      done
17652      if test $apr_addto_duplicate = "0"; then
17653        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17654        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17655      fi
17656    done
17657  fi
17658
17659
17660  if test "x$APRUTIL_LDFLAGS" = "x"; then
17661    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17662    APRUTIL_LDFLAGS="-L$lib"
17663  else
17664    apr_addto_bugger="-L$lib"
17665    for i in $apr_addto_bugger; do
17666      apr_addto_duplicate="0"
17667      for j in $APRUTIL_LDFLAGS; do
17668        if test "x$i" = "x$j"; then
17669          apr_addto_duplicate="1"
17670          break
17671        fi
17672      done
17673      if test $apr_addto_duplicate = "0"; then
17674        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17675        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17676      fi
17677    done
17678  fi
17679
17680    apu_db_header=$bdb_header
17681    apu_db_lib=$bdb_libname
17682    apu_have_db=1
17683    ;;
17684  *)
17685
17686  if test "x$APRUTIL_INCLUDES" = "x"; then
17687    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17688    APRUTIL_INCLUDES="-I$found/include"
17689  else
17690    apr_addto_bugger="-I$found/include"
17691    for i in $apr_addto_bugger; do
17692      apr_addto_duplicate="0"
17693      for j in $APRUTIL_INCLUDES; do
17694        if test "x$i" = "x$j"; then
17695          apr_addto_duplicate="1"
17696          break
17697        fi
17698      done
17699      if test $apr_addto_duplicate = "0"; then
17700        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17701        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17702      fi
17703    done
17704  fi
17705
17706
17707  if test "x$APRUTIL_LDFLAGS" = "x"; then
17708    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17709    APRUTIL_LDFLAGS="-L$found/lib"
17710  else
17711    apr_addto_bugger="-L$found/lib"
17712    for i in $apr_addto_bugger; do
17713      apr_addto_duplicate="0"
17714      for j in $APRUTIL_LDFLAGS; do
17715        if test "x$i" = "x$j"; then
17716          apr_addto_duplicate="1"
17717          break
17718        fi
17719      done
17720      if test $apr_addto_duplicate = "0"; then
17721        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17722        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17723      fi
17724    done
17725  fi
17726
17727    apu_db_header=$bdb_header
17728    apu_db_lib=$bdb_libname
17729    apu_have_db=1
17730    ;;
17731  esac
17732
17733  if test "$apu_have_db" = "1"; then
17734    apu_db_version=2
17735  fi
17736
17737  fi
17738  if test "$apu_have_db" = "0"; then
17739
17740  places="$all_places"
17741  if test -z "$places"; then
17742    places="std"
17743  fi
17744
17745  bdb_version=1
17746  if test "0" != "-1"; then
17747    bdb_version="$bdb_version.0"
17748    if test "0" != "-1"; then
17749      bdb_version="$bdb_version.0"
17750    fi
17751  fi
17752  bdb_places="$places"
17753  bdb_default_search_headers="db1/db.h db.h"
17754  bdb_default_search_lib_names="db1"
17755
17756
17757  apu_have_db=0
17758
17759  # Save the original values of the flags we tweak.
17760  apu_check_lib_save_libs="$LIBS"
17761  apu_check_lib_save_ldflags="$LDFLAGS"
17762  apu_check_lib_save_cppflags="$CPPFLAGS"
17763
17764  # The variable `found' is the prefix under which we've found
17765  # Berkeley DB, or `not' if we haven't found it anywhere yet.
17766  found=not
17767  for bdb_place in $bdb_places; do
17768
17769    LDFLAGS="$apu_check_lib_save_ldflags"
17770    CPPFLAGS="$apu_check_lib_save_cppflags"
17771    case "$bdb_place" in
17772      "std" )
17773        description="the standard places"
17774      ;;
17775      *":"* )
17776        header="`echo $bdb_place | sed -e 's/:.*$//'`"
17777        lib="`echo $bdb_place | sed -e 's/^.*://'`"
17778        CPPFLAGS="$CPPFLAGS -I$header"
17779        LDFLAGS="$LDFLAGS -L$lib"
17780        description="$header and $lib"
17781      ;;
17782      * )
17783        if test -d $bdb_place; then
17784          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17785          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17786        else
17787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17788$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17790$as_echo "directory not found" >&6; }
17791          continue
17792        fi
17793        description="$bdb_place"
17794      ;;
17795    esac
17796
17797    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17798    # trick to display a message instead.
17799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17800$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17802$as_echo "" >&6; }
17803
17804    for bdb_libname in $bdb_default_search_lib_names; do
17805      for bdb_header in $bdb_default_search_headers; do
17806        # Clear the header cache variable for each location
17807
17808        cache_id="`echo ac_cv_header_${bdb_header} \
17809                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17810
17811        unset $cache_id
17812        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17813ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17814if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17815
17816          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
17817            # We generate a separate cache variable for each prefix and libname
17818            # we search under.  That way, we avoid caching information that
17819            # changes if the user runs `configure' with a different set of
17820            # switches.
17821
17822            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17823                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17824
17825
17826            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17827$as_echo_n "checking for -l$bdb_libname... " >&6; }
17828                                    if eval \${$cache_id+:} false; then :
17829  $as_echo_n "(cached) " >&6
17830else
17831
17832
17833    apu_try_berkeley_db_save_libs="$LIBS"
17834
17835    apu_check_berkeley_db_major=1
17836    apu_check_berkeley_db_minor=0
17837    apu_check_berkeley_db_patch=0
17838    apu_try_berkeley_db_header=$bdb_header
17839    apu_try_berkeley_db_libname=$bdb_libname
17840
17841    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17842    if test "$cross_compiling" = yes; then :
17843  apu_try_berkeley_db=yes
17844
17845else
17846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17847/* end confdefs.h.  */
17848
17849#include <stdlib.h>
17850#include <stdio.h>
17851#include <$apu_try_berkeley_db_header>
17852main ()
17853{
17854  int major, minor, patch;
17855
17856  db_version(&major, &minor, &patch);
17857
17858  /* Sanity check: ensure that db.h constants actually match the db library */
17859  if (major != DB_VERSION_MAJOR
17860      || minor != DB_VERSION_MINOR
17861      || patch != DB_VERSION_PATCH)
17862    exit (1);
17863
17864  /* Run-time check:  ensure the library claims to be the correct version. */
17865
17866  if ($apu_check_berkeley_db_major != -1) {
17867    if (major < $apu_check_berkeley_db_major)
17868      exit (1);
17869    if (major > $apu_check_berkeley_db_major)
17870      exit (0);
17871  }
17872
17873  if ($apu_check_berkeley_db_minor != -1) {
17874    if (minor < $apu_check_berkeley_db_minor)
17875      exit (1);
17876    if (minor > $apu_check_berkeley_db_minor)
17877      exit (0);
17878  }
17879
17880  if ($apu_check_berkeley_db_patch == -1
17881      || patch >= $apu_check_berkeley_db_patch)
17882    exit (0);
17883  else
17884    exit (1);
17885}
17886
17887_ACEOF
17888if ac_fn_c_try_run "$LINENO"; then :
17889  apu_try_berkeley_db=yes
17890else
17891  apu_try_berkeley_db=no
17892fi
17893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17894  conftest.$ac_objext conftest.beam conftest.$ac_ext
17895fi
17896
17897
17898    LIBS="$apu_try_berkeley_db_save_libs"
17899
17900
17901                eval "$cache_id=$apu_try_berkeley_db"
17902
17903fi
17904
17905            result="`eval echo '$'$cache_id`"
17906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17907$as_echo "$result" >&6; }
17908          elif test "1" = "1"; then
17909            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17911$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17912if eval \${$as_ac_Lib+:} false; then :
17913  $as_echo_n "(cached) " >&6
17914else
17915  ac_check_lib_save_LIBS=$LIBS
17916LIBS="-l$bdb_libname  $LIBS"
17917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17918/* end confdefs.h.  */
17919
17920/* Override any GCC internal prototype to avoid an error.
17921   Use char because int might match the return type of a GCC
17922   builtin and then its argument prototype would still apply.  */
17923#ifdef __cplusplus
17924extern "C"
17925#endif
17926char dbopen ();
17927int
17928main ()
17929{
17930return dbopen ();
17931  ;
17932  return 0;
17933}
17934_ACEOF
17935if ac_fn_c_try_link "$LINENO"; then :
17936  eval "$as_ac_Lib=yes"
17937else
17938  eval "$as_ac_Lib=no"
17939fi
17940rm -f core conftest.err conftest.$ac_objext \
17941    conftest$ac_exeext conftest.$ac_ext
17942LIBS=$ac_check_lib_save_LIBS
17943fi
17944eval ac_res=\$$as_ac_Lib
17945	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17946$as_echo "$ac_res" >&6; }
17947if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17948  result=yes
17949else
17950  result=no
17951
17952fi
17953
17954          elif test "1" = "2"; then
17955            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17957$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17958if eval \${$as_ac_Lib+:} false; then :
17959  $as_echo_n "(cached) " >&6
17960else
17961  ac_check_lib_save_LIBS=$LIBS
17962LIBS="-l$bdb_libname  $LIBS"
17963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17964/* end confdefs.h.  */
17965
17966/* Override any GCC internal prototype to avoid an error.
17967   Use char because int might match the return type of a GCC
17968   builtin and then its argument prototype would still apply.  */
17969#ifdef __cplusplus
17970extern "C"
17971#endif
17972char db_open ();
17973int
17974main ()
17975{
17976return db_open ();
17977  ;
17978  return 0;
17979}
17980_ACEOF
17981if ac_fn_c_try_link "$LINENO"; then :
17982  eval "$as_ac_Lib=yes"
17983else
17984  eval "$as_ac_Lib=no"
17985fi
17986rm -f core conftest.err conftest.$ac_objext \
17987    conftest$ac_exeext conftest.$ac_ext
17988LIBS=$ac_check_lib_save_LIBS
17989fi
17990eval ac_res=\$$as_ac_Lib
17991	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17992$as_echo "$ac_res" >&6; }
17993if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17994  result=yes
17995else
17996  result=no
17997
17998fi
17999
18000          fi
18001
18002else
18003  result="no"
18004fi
18005
18006
18007
18008        # If we found it, no need to search any more.
18009        if test "$result" = "yes"; then
18010          found="$bdb_place"
18011          break
18012        fi
18013      done
18014      test "$found" != "not" && break
18015    done
18016    test "$found" != "not" && break
18017  done
18018
18019  # Restore the original values of the flags we tweak.
18020  LDFLAGS="$apu_check_lib_save_ldflags"
18021  CPPFLAGS="$apu_check_lib_save_cppflags"
18022
18023  case "$found" in
18024  "not")
18025    apu_have_db=0
18026    ;;
18027  "std")
18028    apu_db_header=$bdb_header
18029    apu_db_lib=$bdb_libname
18030    apu_have_db=1
18031    ;;
18032  *":"*)
18033    header="`echo $found | sed -e 's/:.*$//'`"
18034    lib="`echo $found | sed -e 's/^.*://'`"
18035
18036
18037  if test "x$APRUTIL_INCLUDES" = "x"; then
18038    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
18039    APRUTIL_INCLUDES="-I$header"
18040  else
18041    apr_addto_bugger="-I$header"
18042    for i in $apr_addto_bugger; do
18043      apr_addto_duplicate="0"
18044      for j in $APRUTIL_INCLUDES; do
18045        if test "x$i" = "x$j"; then
18046          apr_addto_duplicate="1"
18047          break
18048        fi
18049      done
18050      if test $apr_addto_duplicate = "0"; then
18051        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18052        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18053      fi
18054    done
18055  fi
18056
18057
18058  if test "x$APRUTIL_LDFLAGS" = "x"; then
18059    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
18060    APRUTIL_LDFLAGS="-L$lib"
18061  else
18062    apr_addto_bugger="-L$lib"
18063    for i in $apr_addto_bugger; do
18064      apr_addto_duplicate="0"
18065      for j in $APRUTIL_LDFLAGS; do
18066        if test "x$i" = "x$j"; then
18067          apr_addto_duplicate="1"
18068          break
18069        fi
18070      done
18071      if test $apr_addto_duplicate = "0"; then
18072        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18073        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18074      fi
18075    done
18076  fi
18077
18078    apu_db_header=$bdb_header
18079    apu_db_lib=$bdb_libname
18080    apu_have_db=1
18081    ;;
18082  *)
18083
18084  if test "x$APRUTIL_INCLUDES" = "x"; then
18085    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
18086    APRUTIL_INCLUDES="-I$found/include"
18087  else
18088    apr_addto_bugger="-I$found/include"
18089    for i in $apr_addto_bugger; do
18090      apr_addto_duplicate="0"
18091      for j in $APRUTIL_INCLUDES; do
18092        if test "x$i" = "x$j"; then
18093          apr_addto_duplicate="1"
18094          break
18095        fi
18096      done
18097      if test $apr_addto_duplicate = "0"; then
18098        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18099        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18100      fi
18101    done
18102  fi
18103
18104
18105  if test "x$APRUTIL_LDFLAGS" = "x"; then
18106    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
18107    APRUTIL_LDFLAGS="-L$found/lib"
18108  else
18109    apr_addto_bugger="-L$found/lib"
18110    for i in $apr_addto_bugger; do
18111      apr_addto_duplicate="0"
18112      for j in $APRUTIL_LDFLAGS; do
18113        if test "x$i" = "x$j"; then
18114          apr_addto_duplicate="1"
18115          break
18116        fi
18117      done
18118      if test $apr_addto_duplicate = "0"; then
18119        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18120        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18121      fi
18122    done
18123  fi
18124
18125    apu_db_header=$bdb_header
18126    apu_db_lib=$bdb_libname
18127    apu_have_db=1
18128    ;;
18129  esac
18130
18131  if test "$apu_have_db" = "1"; then
18132    apu_db_version=1
18133  fi
18134
18135  fi
18136  if test "$apu_have_db" = "0"; then
18137
18138  places="$all_places"
18139  if test -z "$places"; then
18140    places="std"
18141  fi
18142
18143  bdb_version=1
18144  if test "-1" != "-1"; then
18145    bdb_version="$bdb_version.-1"
18146    if test "-1" != "-1"; then
18147      bdb_version="$bdb_version.-1"
18148    fi
18149  fi
18150  bdb_places="$places"
18151  bdb_default_search_headers="db_185.h"
18152  bdb_default_search_lib_names="db"
18153
18154
18155  apu_have_db=0
18156
18157  # Save the original values of the flags we tweak.
18158  apu_check_lib_save_libs="$LIBS"
18159  apu_check_lib_save_ldflags="$LDFLAGS"
18160  apu_check_lib_save_cppflags="$CPPFLAGS"
18161
18162  # The variable `found' is the prefix under which we've found
18163  # Berkeley DB, or `not' if we haven't found it anywhere yet.
18164  found=not
18165  for bdb_place in $bdb_places; do
18166
18167    LDFLAGS="$apu_check_lib_save_ldflags"
18168    CPPFLAGS="$apu_check_lib_save_cppflags"
18169    case "$bdb_place" in
18170      "std" )
18171        description="the standard places"
18172      ;;
18173      *":"* )
18174        header="`echo $bdb_place | sed -e 's/:.*$//'`"
18175        lib="`echo $bdb_place | sed -e 's/^.*://'`"
18176        CPPFLAGS="$CPPFLAGS -I$header"
18177        LDFLAGS="$LDFLAGS -L$lib"
18178        description="$header and $lib"
18179      ;;
18180      * )
18181        if test -d $bdb_place; then
18182          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
18183          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
18184        else
18185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
18186$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
18187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
18188$as_echo "directory not found" >&6; }
18189          continue
18190        fi
18191        description="$bdb_place"
18192      ;;
18193    esac
18194
18195    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
18196    # trick to display a message instead.
18197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
18198$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
18199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
18200$as_echo "" >&6; }
18201
18202    for bdb_libname in $bdb_default_search_lib_names; do
18203      for bdb_header in $bdb_default_search_headers; do
18204        # Clear the header cache variable for each location
18205
18206        cache_id="`echo ac_cv_header_${bdb_header} \
18207                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18208
18209        unset $cache_id
18210        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
18211ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
18212if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18213
18214          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
18215            # We generate a separate cache variable for each prefix and libname
18216            # we search under.  That way, we avoid caching information that
18217            # changes if the user runs `configure' with a different set of
18218            # switches.
18219
18220            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
18221                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18222
18223
18224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
18225$as_echo_n "checking for -l$bdb_libname... " >&6; }
18226                                    if eval \${$cache_id+:} false; then :
18227  $as_echo_n "(cached) " >&6
18228else
18229
18230
18231    apu_try_berkeley_db_save_libs="$LIBS"
18232
18233    apu_check_berkeley_db_major=1
18234    apu_check_berkeley_db_minor=-1
18235    apu_check_berkeley_db_patch=-1
18236    apu_try_berkeley_db_header=$bdb_header
18237    apu_try_berkeley_db_libname=$bdb_libname
18238
18239    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
18240    if test "$cross_compiling" = yes; then :
18241  apu_try_berkeley_db=yes
18242
18243else
18244  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18245/* end confdefs.h.  */
18246
18247#include <stdlib.h>
18248#include <stdio.h>
18249#include <$apu_try_berkeley_db_header>
18250main ()
18251{
18252  int major, minor, patch;
18253
18254  db_version(&major, &minor, &patch);
18255
18256  /* Sanity check: ensure that db.h constants actually match the db library */
18257  if (major != DB_VERSION_MAJOR
18258      || minor != DB_VERSION_MINOR
18259      || patch != DB_VERSION_PATCH)
18260    exit (1);
18261
18262  /* Run-time check:  ensure the library claims to be the correct version. */
18263
18264  if ($apu_check_berkeley_db_major != -1) {
18265    if (major < $apu_check_berkeley_db_major)
18266      exit (1);
18267    if (major > $apu_check_berkeley_db_major)
18268      exit (0);
18269  }
18270
18271  if ($apu_check_berkeley_db_minor != -1) {
18272    if (minor < $apu_check_berkeley_db_minor)
18273      exit (1);
18274    if (minor > $apu_check_berkeley_db_minor)
18275      exit (0);
18276  }
18277
18278  if ($apu_check_berkeley_db_patch == -1
18279      || patch >= $apu_check_berkeley_db_patch)
18280    exit (0);
18281  else
18282    exit (1);
18283}
18284
18285_ACEOF
18286if ac_fn_c_try_run "$LINENO"; then :
18287  apu_try_berkeley_db=yes
18288else
18289  apu_try_berkeley_db=no
18290fi
18291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18292  conftest.$ac_objext conftest.beam conftest.$ac_ext
18293fi
18294
18295
18296    LIBS="$apu_try_berkeley_db_save_libs"
18297
18298
18299                eval "$cache_id=$apu_try_berkeley_db"
18300
18301fi
18302
18303            result="`eval echo '$'$cache_id`"
18304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
18305$as_echo "$result" >&6; }
18306          elif test "1" = "1"; then
18307            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
18309$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
18310if eval \${$as_ac_Lib+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313  ac_check_lib_save_LIBS=$LIBS
18314LIBS="-l$bdb_libname  $LIBS"
18315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18316/* end confdefs.h.  */
18317
18318/* Override any GCC internal prototype to avoid an error.
18319   Use char because int might match the return type of a GCC
18320   builtin and then its argument prototype would still apply.  */
18321#ifdef __cplusplus
18322extern "C"
18323#endif
18324char dbopen ();
18325int
18326main ()
18327{
18328return dbopen ();
18329  ;
18330  return 0;
18331}
18332_ACEOF
18333if ac_fn_c_try_link "$LINENO"; then :
18334  eval "$as_ac_Lib=yes"
18335else
18336  eval "$as_ac_Lib=no"
18337fi
18338rm -f core conftest.err conftest.$ac_objext \
18339    conftest$ac_exeext conftest.$ac_ext
18340LIBS=$ac_check_lib_save_LIBS
18341fi
18342eval ac_res=\$$as_ac_Lib
18343	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18344$as_echo "$ac_res" >&6; }
18345if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18346  result=yes
18347else
18348  result=no
18349
18350fi
18351
18352          elif test "1" = "2"; then
18353            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
18354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
18355$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
18356if eval \${$as_ac_Lib+:} false; then :
18357  $as_echo_n "(cached) " >&6
18358else
18359  ac_check_lib_save_LIBS=$LIBS
18360LIBS="-l$bdb_libname  $LIBS"
18361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18362/* end confdefs.h.  */
18363
18364/* Override any GCC internal prototype to avoid an error.
18365   Use char because int might match the return type of a GCC
18366   builtin and then its argument prototype would still apply.  */
18367#ifdef __cplusplus
18368extern "C"
18369#endif
18370char db_open ();
18371int
18372main ()
18373{
18374return db_open ();
18375  ;
18376  return 0;
18377}
18378_ACEOF
18379if ac_fn_c_try_link "$LINENO"; then :
18380  eval "$as_ac_Lib=yes"
18381else
18382  eval "$as_ac_Lib=no"
18383fi
18384rm -f core conftest.err conftest.$ac_objext \
18385    conftest$ac_exeext conftest.$ac_ext
18386LIBS=$ac_check_lib_save_LIBS
18387fi
18388eval ac_res=\$$as_ac_Lib
18389	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18390$as_echo "$ac_res" >&6; }
18391if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18392  result=yes
18393else
18394  result=no
18395
18396fi
18397
18398          fi
18399
18400else
18401  result="no"
18402fi
18403
18404
18405
18406        # If we found it, no need to search any more.
18407        if test "$result" = "yes"; then
18408          found="$bdb_place"
18409          break
18410        fi
18411      done
18412      test "$found" != "not" && break
18413    done
18414    test "$found" != "not" && break
18415  done
18416
18417  # Restore the original values of the flags we tweak.
18418  LDFLAGS="$apu_check_lib_save_ldflags"
18419  CPPFLAGS="$apu_check_lib_save_cppflags"
18420
18421  case "$found" in
18422  "not")
18423    apu_have_db=0
18424    ;;
18425  "std")
18426    apu_db_header=$bdb_header
18427    apu_db_lib=$bdb_libname
18428    apu_have_db=1
18429    ;;
18430  *":"*)
18431    header="`echo $found | sed -e 's/:.*$//'`"
18432    lib="`echo $found | sed -e 's/^.*://'`"
18433
18434
18435  if test "x$APRUTIL_INCLUDES" = "x"; then
18436    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
18437    APRUTIL_INCLUDES="-I$header"
18438  else
18439    apr_addto_bugger="-I$header"
18440    for i in $apr_addto_bugger; do
18441      apr_addto_duplicate="0"
18442      for j in $APRUTIL_INCLUDES; do
18443        if test "x$i" = "x$j"; then
18444          apr_addto_duplicate="1"
18445          break
18446        fi
18447      done
18448      if test $apr_addto_duplicate = "0"; then
18449        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18450        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18451      fi
18452    done
18453  fi
18454
18455
18456  if test "x$APRUTIL_LDFLAGS" = "x"; then
18457    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
18458    APRUTIL_LDFLAGS="-L$lib"
18459  else
18460    apr_addto_bugger="-L$lib"
18461    for i in $apr_addto_bugger; do
18462      apr_addto_duplicate="0"
18463      for j in $APRUTIL_LDFLAGS; do
18464        if test "x$i" = "x$j"; then
18465          apr_addto_duplicate="1"
18466          break
18467        fi
18468      done
18469      if test $apr_addto_duplicate = "0"; then
18470        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18471        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18472      fi
18473    done
18474  fi
18475
18476    apu_db_header=$bdb_header
18477    apu_db_lib=$bdb_libname
18478    apu_have_db=1
18479    ;;
18480  *)
18481
18482  if test "x$APRUTIL_INCLUDES" = "x"; then
18483    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
18484    APRUTIL_INCLUDES="-I$found/include"
18485  else
18486    apr_addto_bugger="-I$found/include"
18487    for i in $apr_addto_bugger; do
18488      apr_addto_duplicate="0"
18489      for j in $APRUTIL_INCLUDES; do
18490        if test "x$i" = "x$j"; then
18491          apr_addto_duplicate="1"
18492          break
18493        fi
18494      done
18495      if test $apr_addto_duplicate = "0"; then
18496        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18497        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18498      fi
18499    done
18500  fi
18501
18502
18503  if test "x$APRUTIL_LDFLAGS" = "x"; then
18504    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
18505    APRUTIL_LDFLAGS="-L$found/lib"
18506  else
18507    apr_addto_bugger="-L$found/lib"
18508    for i in $apr_addto_bugger; do
18509      apr_addto_duplicate="0"
18510      for j in $APRUTIL_LDFLAGS; do
18511        if test "x$i" = "x$j"; then
18512          apr_addto_duplicate="1"
18513          break
18514        fi
18515      done
18516      if test $apr_addto_duplicate = "0"; then
18517        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18518        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18519      fi
18520    done
18521  fi
18522
18523    apu_db_header=$bdb_header
18524    apu_db_lib=$bdb_libname
18525    apu_have_db=1
18526    ;;
18527  esac
18528
18529  if test "$apu_have_db" = "1"; then
18530    apu_db_version=185
18531  fi
18532
18533  fi
18534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB" >&5
18535$as_echo_n "checking for Berkeley DB... " >&6; }
18536  if test "$apu_have_db" = "1"; then
18537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found db$apu_db_version" >&5
18538$as_echo "found db$apu_db_version" >&6; }
18539  else
18540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18541$as_echo "not found" >&6; }
18542  fi
18543
18544    ;;
18545  esac
18546
18547      if test "$apu_have_db" = "0"; then
18548        as_fn_error $? "Berkeley DB not found." "$LINENO" 5
18549      fi
18550    fi
18551
18552fi
18553
18554
18555  if test -n "$apu_db_xtra_libs"; then
18556    LIBS="$saveddbxtralibs"
18557  fi
18558
18559  case "$requested" in
18560    sdbm | gdbm | ndbm | db)
18561      eval "apu_use_$requested=1"
18562      apu_default_dbm=$requested
18563      ;;
18564    db185 | db[12345])
18565      apu_use_db=1
18566      apu_default_dbm=$requested
18567      ;;
18568    db[45][0-9])
18569      apu_use_db=1
18570      apu_default_dbm=`echo $requested | sed -e 's/.$//'`
18571      ;;
18572    default)
18573            apu_default_dbm="sdbm (default)"
18574      apu_use_sdbm=1
18575      ;;
18576    *)
18577      as_fn_error $? "--with-dbm=$requested is an unknown DBM type.
18578        Use one of: $dbm_list" "$LINENO" 5
18579      ;;
18580  esac
18581
18582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default DBM" >&5
18583$as_echo_n "checking for default DBM... " >&6; }
18584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_default_dbm" >&5
18585$as_echo "$apu_default_dbm" >&6; }
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599  if test "$apu_have_db" = "1"; then
18600
18601  if test "x$LDADD_dbm_db" = "x"; then
18602    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_db to \"-l$apu_db_lib\""
18603    LDADD_dbm_db="-l$apu_db_lib"
18604  else
18605    apr_addto_bugger="-l$apu_db_lib"
18606    for i in $apr_addto_bugger; do
18607      apr_addto_duplicate="0"
18608      for j in $LDADD_dbm_db; do
18609        if test "x$i" = "x$j"; then
18610          apr_addto_duplicate="1"
18611          break
18612        fi
18613      done
18614      if test $apr_addto_duplicate = "0"; then
18615        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_db"
18616        LDADD_dbm_db="$LDADD_dbm_db $i"
18617      fi
18618    done
18619  fi
18620
18621    if test -n "apu_db_xtra_libs"; then
18622
18623  if test "x$LDADD_dbm_db" = "x"; then
18624    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_db to \"$apu_db_xtra_libs\""
18625    LDADD_dbm_db="$apu_db_xtra_libs"
18626  else
18627    apr_addto_bugger="$apu_db_xtra_libs"
18628    for i in $apr_addto_bugger; do
18629      apr_addto_duplicate="0"
18630      for j in $LDADD_dbm_db; do
18631        if test "x$i" = "x$j"; then
18632          apr_addto_duplicate="1"
18633          break
18634        fi
18635      done
18636      if test $apr_addto_duplicate = "0"; then
18637        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_db"
18638        LDADD_dbm_db="$LDADD_dbm_db $i"
18639      fi
18640    done
18641  fi
18642
18643    fi
18644  fi
18645
18646      if test "$apu_have_gdbm" = "1"; then
18647
18648  if test "x$LDADD_dbm_gdbm" = "x"; then
18649    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_gdbm to \"-lgdbm\""
18650    LDADD_dbm_gdbm="-lgdbm"
18651  else
18652    apr_addto_bugger="-lgdbm"
18653    for i in $apr_addto_bugger; do
18654      apr_addto_duplicate="0"
18655      for j in $LDADD_dbm_gdbm; do
18656        if test "x$i" = "x$j"; then
18657          apr_addto_duplicate="1"
18658          break
18659        fi
18660      done
18661      if test $apr_addto_duplicate = "0"; then
18662        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_gdbm"
18663        LDADD_dbm_gdbm="$LDADD_dbm_gdbm $i"
18664      fi
18665    done
18666  fi
18667
18668  fi
18669
18670  if test "$apu_have_ndbm" = "1"; then
18671
18672  if test "x$LDADD_dbm_ndbm" = "x"; then
18673    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_ndbm to \"-l$apu_ndbm_lib\""
18674    LDADD_dbm_ndbm="-l$apu_ndbm_lib"
18675  else
18676    apr_addto_bugger="-l$apu_ndbm_lib"
18677    for i in $apr_addto_bugger; do
18678      apr_addto_duplicate="0"
18679      for j in $LDADD_dbm_ndbm; do
18680        if test "x$i" = "x$j"; then
18681          apr_addto_duplicate="1"
18682          break
18683        fi
18684      done
18685      if test $apr_addto_duplicate = "0"; then
18686        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_ndbm"
18687        LDADD_dbm_ndbm="$LDADD_dbm_ndbm $i"
18688      fi
18689    done
18690  fi
18691
18692  fi
18693
18694
18695
18696
18697
18698
18699  apu_have_pgsql=0
18700
18701  old_libs="$LIBS"
18702  old_cppflags="$CPPFLAGS"
18703  old_ldflags="$LDFLAGS"
18704
18705
18706# Check whether --with-pgsql was given.
18707if test "${with_pgsql+set}" = set; then :
18708  withval=$with_pgsql;
18709    if test "$withval" = "yes"; then
18710      # Extract the first word of "pg_config", so it can be a program name with args.
18711set dummy pg_config; ac_word=$2
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18713$as_echo_n "checking for $ac_word... " >&6; }
18714if ${ac_cv_path_PGSQL_CONFIG+:} false; then :
18715  $as_echo_n "(cached) " >&6
18716else
18717  case $PGSQL_CONFIG in
18718  [\\/]* | ?:[\\/]*)
18719  ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
18720  ;;
18721  *)
18722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18723for as_dir in $PATH
18724do
18725  IFS=$as_save_IFS
18726  test -z "$as_dir" && as_dir=.
18727    for ac_exec_ext in '' $ac_executable_extensions; do
18728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18729    ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18731    break 2
18732  fi
18733done
18734  done
18735IFS=$as_save_IFS
18736
18737  ;;
18738esac
18739fi
18740PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
18741if test -n "$PGSQL_CONFIG"; then
18742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
18743$as_echo "$PGSQL_CONFIG" >&6; }
18744else
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18746$as_echo "no" >&6; }
18747fi
18748
18749
18750      if test "x$PGSQL_CONFIG" != 'x'; then
18751        pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
18752        pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
18753
18754
18755  if test "x$CPPFLAGS" = "x"; then
18756    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
18757    CPPFLAGS="$pgsql_CPPFLAGS"
18758  else
18759    apr_addto_bugger="$pgsql_CPPFLAGS"
18760    for i in $apr_addto_bugger; do
18761      apr_addto_duplicate="0"
18762      for j in $CPPFLAGS; do
18763        if test "x$i" = "x$j"; then
18764          apr_addto_duplicate="1"
18765          break
18766        fi
18767      done
18768      if test $apr_addto_duplicate = "0"; then
18769        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
18770        CPPFLAGS="$CPPFLAGS $i"
18771      fi
18772    done
18773  fi
18774
18775
18776  if test "x$LDFLAGS" = "x"; then
18777    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
18778    LDFLAGS="$pgsql_LDFLAGS"
18779  else
18780    apr_addto_bugger="$pgsql_LDFLAGS"
18781    for i in $apr_addto_bugger; do
18782      apr_addto_duplicate="0"
18783      for j in $LDFLAGS; do
18784        if test "x$i" = "x$j"; then
18785          apr_addto_duplicate="1"
18786          break
18787        fi
18788      done
18789      if test $apr_addto_duplicate = "0"; then
18790        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
18791        LDFLAGS="$LDFLAGS $i"
18792      fi
18793    done
18794  fi
18795
18796      fi
18797
18798      for ac_header in libpq-fe.h
18799do :
18800  ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
18801if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
18802  cat >>confdefs.h <<_ACEOF
18803#define HAVE_LIBPQ_FE_H 1
18804_ACEOF
18805
18806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18807$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18808if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
18809  $as_echo_n "(cached) " >&6
18810else
18811  ac_check_lib_save_LIBS=$LIBS
18812LIBS="-lpq  $LIBS"
18813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18814/* end confdefs.h.  */
18815
18816/* Override any GCC internal prototype to avoid an error.
18817   Use char because int might match the return type of a GCC
18818   builtin and then its argument prototype would still apply.  */
18819#ifdef __cplusplus
18820extern "C"
18821#endif
18822char PQsendQueryPrepared ();
18823int
18824main ()
18825{
18826return PQsendQueryPrepared ();
18827  ;
18828  return 0;
18829}
18830_ACEOF
18831if ac_fn_c_try_link "$LINENO"; then :
18832  ac_cv_lib_pq_PQsendQueryPrepared=yes
18833else
18834  ac_cv_lib_pq_PQsendQueryPrepared=no
18835fi
18836rm -f core conftest.err conftest.$ac_objext \
18837    conftest$ac_exeext conftest.$ac_ext
18838LIBS=$ac_check_lib_save_LIBS
18839fi
18840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18841$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18842if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
18843  apu_have_pgsql=1
18844else
18845
18846        if test "x$PGSQL_CONFIG" != 'x'; then
18847          unset ac_cv_lib_pq_PQsendQueryPrepared
18848          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
18849
18850  if test "x$LIBS" = "x"; then
18851    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
18852    LIBS="$pgsql_LIBS"
18853  else
18854    apr_addto_bugger="$pgsql_LIBS"
18855    for i in $apr_addto_bugger; do
18856      apr_addto_duplicate="0"
18857      for j in $LIBS; do
18858        if test "x$i" = "x$j"; then
18859          apr_addto_duplicate="1"
18860          break
18861        fi
18862      done
18863      if test $apr_addto_duplicate = "0"; then
18864        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
18865        LIBS="$LIBS $i"
18866      fi
18867    done
18868  fi
18869
18870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18871$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18872if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
18873  $as_echo_n "(cached) " >&6
18874else
18875  ac_check_lib_save_LIBS=$LIBS
18876LIBS="-lpq  $LIBS"
18877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18878/* end confdefs.h.  */
18879
18880/* Override any GCC internal prototype to avoid an error.
18881   Use char because int might match the return type of a GCC
18882   builtin and then its argument prototype would still apply.  */
18883#ifdef __cplusplus
18884extern "C"
18885#endif
18886char PQsendQueryPrepared ();
18887int
18888main ()
18889{
18890return PQsendQueryPrepared ();
18891  ;
18892  return 0;
18893}
18894_ACEOF
18895if ac_fn_c_try_link "$LINENO"; then :
18896  ac_cv_lib_pq_PQsendQueryPrepared=yes
18897else
18898  ac_cv_lib_pq_PQsendQueryPrepared=no
18899fi
18900rm -f core conftest.err conftest.$ac_objext \
18901    conftest$ac_exeext conftest.$ac_ext
18902LIBS=$ac_check_lib_save_LIBS
18903fi
18904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18905$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18906if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
18907  apu_have_pgsql=1
18908fi
18909
18910        fi
18911
18912fi
18913
18914
18915fi
18916
18917done
18918
18919      if test "$apu_have_pgsql" = "0"; then
18920        for ac_header in postgresql/libpq-fe.h
18921do :
18922  ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
18923if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then :
18924  cat >>confdefs.h <<_ACEOF
18925#define HAVE_POSTGRESQL_LIBPQ_FE_H 1
18926_ACEOF
18927
18928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18929$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18930if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
18931  $as_echo_n "(cached) " >&6
18932else
18933  ac_check_lib_save_LIBS=$LIBS
18934LIBS="-lpq  $LIBS"
18935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18936/* end confdefs.h.  */
18937
18938/* Override any GCC internal prototype to avoid an error.
18939   Use char because int might match the return type of a GCC
18940   builtin and then its argument prototype would still apply.  */
18941#ifdef __cplusplus
18942extern "C"
18943#endif
18944char PQsendQueryPrepared ();
18945int
18946main ()
18947{
18948return PQsendQueryPrepared ();
18949  ;
18950  return 0;
18951}
18952_ACEOF
18953if ac_fn_c_try_link "$LINENO"; then :
18954  ac_cv_lib_pq_PQsendQueryPrepared=yes
18955else
18956  ac_cv_lib_pq_PQsendQueryPrepared=no
18957fi
18958rm -f core conftest.err conftest.$ac_objext \
18959    conftest$ac_exeext conftest.$ac_ext
18960LIBS=$ac_check_lib_save_LIBS
18961fi
18962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18963$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18964if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
18965  apu_have_pgsql=1
18966else
18967
18968          if test "x$PGSQL_CONFIG" != 'x'; then
18969            unset ac_cv_lib_pq_PQsendQueryPrepared
18970            pgsql_LIBS="`$PGSQL_CONFIG --libs`"
18971
18972  if test "x$LIBS" = "x"; then
18973    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
18974    LIBS="$pgsql_LIBS"
18975  else
18976    apr_addto_bugger="$pgsql_LIBS"
18977    for i in $apr_addto_bugger; do
18978      apr_addto_duplicate="0"
18979      for j in $LIBS; do
18980        if test "x$i" = "x$j"; then
18981          apr_addto_duplicate="1"
18982          break
18983        fi
18984      done
18985      if test $apr_addto_duplicate = "0"; then
18986        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
18987        LIBS="$LIBS $i"
18988      fi
18989    done
18990  fi
18991
18992            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18993$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18994if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
18995  $as_echo_n "(cached) " >&6
18996else
18997  ac_check_lib_save_LIBS=$LIBS
18998LIBS="-lpq  $LIBS"
18999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19000/* end confdefs.h.  */
19001
19002/* Override any GCC internal prototype to avoid an error.
19003   Use char because int might match the return type of a GCC
19004   builtin and then its argument prototype would still apply.  */
19005#ifdef __cplusplus
19006extern "C"
19007#endif
19008char PQsendQueryPrepared ();
19009int
19010main ()
19011{
19012return PQsendQueryPrepared ();
19013  ;
19014  return 0;
19015}
19016_ACEOF
19017if ac_fn_c_try_link "$LINENO"; then :
19018  ac_cv_lib_pq_PQsendQueryPrepared=yes
19019else
19020  ac_cv_lib_pq_PQsendQueryPrepared=no
19021fi
19022rm -f core conftest.err conftest.$ac_objext \
19023    conftest$ac_exeext conftest.$ac_ext
19024LIBS=$ac_check_lib_save_LIBS
19025fi
19026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19027$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19028if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19029  apu_have_pgsql=1
19030fi
19031
19032          fi
19033
19034fi
19035
19036
19037fi
19038
19039done
19040
19041      fi
19042      if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
19043
19044  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19045    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19046    APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19047  else
19048    apr_addto_bugger="$pgsql_CPPFLAGS"
19049    for i in $apr_addto_bugger; do
19050      apr_addto_duplicate="0"
19051      for j in $APRUTIL_PRIV_INCLUDES; do
19052        if test "x$i" = "x$j"; then
19053          apr_addto_duplicate="1"
19054          break
19055        fi
19056      done
19057      if test $apr_addto_duplicate = "0"; then
19058        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19059        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19060      fi
19061    done
19062  fi
19063
19064      fi
19065    elif test "$withval" = "no"; then
19066      :
19067    else
19068      # Extract the first word of "pg_config", so it can be a program name with args.
19069set dummy pg_config; ac_word=$2
19070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19071$as_echo_n "checking for $ac_word... " >&6; }
19072if ${ac_cv_path_PGSQL_CONFIG+:} false; then :
19073  $as_echo_n "(cached) " >&6
19074else
19075  case $PGSQL_CONFIG in
19076  [\\/]* | ?:[\\/]*)
19077  ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
19078  ;;
19079  *)
19080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19081for as_dir in $withval/bin
19082do
19083  IFS=$as_save_IFS
19084  test -z "$as_dir" && as_dir=.
19085    for ac_exec_ext in '' $ac_executable_extensions; do
19086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19087    ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19089    break 2
19090  fi
19091done
19092  done
19093IFS=$as_save_IFS
19094
19095  ;;
19096esac
19097fi
19098PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
19099if test -n "$PGSQL_CONFIG"; then
19100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
19101$as_echo "$PGSQL_CONFIG" >&6; }
19102else
19103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19104$as_echo "no" >&6; }
19105fi
19106
19107
19108      if test "x$PGSQL_CONFIG" != 'x'; then
19109        pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
19110        pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
19111      else
19112        pgsql_CPPFLAGS="-I$withval/include"
19113        pgsql_LDFLAGS="-L$withval/lib "
19114      fi
19115
19116
19117  if test "x$CPPFLAGS" = "x"; then
19118    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
19119    CPPFLAGS="$pgsql_CPPFLAGS"
19120  else
19121    apr_addto_bugger="$pgsql_CPPFLAGS"
19122    for i in $apr_addto_bugger; do
19123      apr_addto_duplicate="0"
19124      for j in $CPPFLAGS; do
19125        if test "x$i" = "x$j"; then
19126          apr_addto_duplicate="1"
19127          break
19128        fi
19129      done
19130      if test $apr_addto_duplicate = "0"; then
19131        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19132        CPPFLAGS="$CPPFLAGS $i"
19133      fi
19134    done
19135  fi
19136
19137
19138  if test "x$LDFLAGS" = "x"; then
19139    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
19140    LDFLAGS="$pgsql_LDFLAGS"
19141  else
19142    apr_addto_bugger="$pgsql_LDFLAGS"
19143    for i in $apr_addto_bugger; do
19144      apr_addto_duplicate="0"
19145      for j in $LDFLAGS; do
19146        if test "x$i" = "x$j"; then
19147          apr_addto_duplicate="1"
19148          break
19149        fi
19150      done
19151      if test $apr_addto_duplicate = "0"; then
19152        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
19153        LDFLAGS="$LDFLAGS $i"
19154      fi
19155    done
19156  fi
19157
19158
19159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgsql in $withval" >&5
19160$as_echo "$as_me: checking for pgsql in $withval" >&6;}
19161      for ac_header in libpq-fe.h
19162do :
19163  ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19164if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
19165  cat >>confdefs.h <<_ACEOF
19166#define HAVE_LIBPQ_FE_H 1
19167_ACEOF
19168
19169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19170$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19171if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19172  $as_echo_n "(cached) " >&6
19173else
19174  ac_check_lib_save_LIBS=$LIBS
19175LIBS="-lpq  $LIBS"
19176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19177/* end confdefs.h.  */
19178
19179/* Override any GCC internal prototype to avoid an error.
19180   Use char because int might match the return type of a GCC
19181   builtin and then its argument prototype would still apply.  */
19182#ifdef __cplusplus
19183extern "C"
19184#endif
19185char PQsendQueryPrepared ();
19186int
19187main ()
19188{
19189return PQsendQueryPrepared ();
19190  ;
19191  return 0;
19192}
19193_ACEOF
19194if ac_fn_c_try_link "$LINENO"; then :
19195  ac_cv_lib_pq_PQsendQueryPrepared=yes
19196else
19197  ac_cv_lib_pq_PQsendQueryPrepared=no
19198fi
19199rm -f core conftest.err conftest.$ac_objext \
19200    conftest$ac_exeext conftest.$ac_ext
19201LIBS=$ac_check_lib_save_LIBS
19202fi
19203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19204$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19205if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19206  apu_have_pgsql=1
19207else
19208
19209        if test "x$PGSQL_CONFIG" != 'x'; then
19210          unset ac_cv_lib_pq_PQsendQueryPrepared
19211          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19212
19213  if test "x$LIBS" = "x"; then
19214    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19215    LIBS="$pgsql_LIBS"
19216  else
19217    apr_addto_bugger="$pgsql_LIBS"
19218    for i in $apr_addto_bugger; do
19219      apr_addto_duplicate="0"
19220      for j in $LIBS; do
19221        if test "x$i" = "x$j"; then
19222          apr_addto_duplicate="1"
19223          break
19224        fi
19225      done
19226      if test $apr_addto_duplicate = "0"; then
19227        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19228        LIBS="$LIBS $i"
19229      fi
19230    done
19231  fi
19232
19233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19234$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19235if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19236  $as_echo_n "(cached) " >&6
19237else
19238  ac_check_lib_save_LIBS=$LIBS
19239LIBS="-lpq  $LIBS"
19240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19241/* end confdefs.h.  */
19242
19243/* Override any GCC internal prototype to avoid an error.
19244   Use char because int might match the return type of a GCC
19245   builtin and then its argument prototype would still apply.  */
19246#ifdef __cplusplus
19247extern "C"
19248#endif
19249char PQsendQueryPrepared ();
19250int
19251main ()
19252{
19253return PQsendQueryPrepared ();
19254  ;
19255  return 0;
19256}
19257_ACEOF
19258if ac_fn_c_try_link "$LINENO"; then :
19259  ac_cv_lib_pq_PQsendQueryPrepared=yes
19260else
19261  ac_cv_lib_pq_PQsendQueryPrepared=no
19262fi
19263rm -f core conftest.err conftest.$ac_objext \
19264    conftest$ac_exeext conftest.$ac_ext
19265LIBS=$ac_check_lib_save_LIBS
19266fi
19267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19268$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19269if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19270  apu_have_pgsql=1
19271fi
19272
19273        fi
19274
19275fi
19276
19277
19278fi
19279
19280done
19281
19282      if test "$apu_have_pgsql" != "1"; then
19283        for ac_header in postgresql/libpq-fe.h
19284do :
19285  ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19286if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then :
19287  cat >>confdefs.h <<_ACEOF
19288#define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19289_ACEOF
19290
19291          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19292$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19293if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19294  $as_echo_n "(cached) " >&6
19295else
19296  ac_check_lib_save_LIBS=$LIBS
19297LIBS="-lpq  $LIBS"
19298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19299/* end confdefs.h.  */
19300
19301/* Override any GCC internal prototype to avoid an error.
19302   Use char because int might match the return type of a GCC
19303   builtin and then its argument prototype would still apply.  */
19304#ifdef __cplusplus
19305extern "C"
19306#endif
19307char PQsendQueryPrepared ();
19308int
19309main ()
19310{
19311return PQsendQueryPrepared ();
19312  ;
19313  return 0;
19314}
19315_ACEOF
19316if ac_fn_c_try_link "$LINENO"; then :
19317  ac_cv_lib_pq_PQsendQueryPrepared=yes
19318else
19319  ac_cv_lib_pq_PQsendQueryPrepared=no
19320fi
19321rm -f core conftest.err conftest.$ac_objext \
19322    conftest$ac_exeext conftest.$ac_ext
19323LIBS=$ac_check_lib_save_LIBS
19324fi
19325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19326$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19327if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19328  apu_have_pgsql=1
19329else
19330
19331          if test "x$PGSQL_CONFIG" != 'x'; then
19332            unset ac_cv_lib_pq_PQsendQueryPrepared
19333            pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19334
19335  if test "x$LIBS" = "x"; then
19336    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19337    LIBS="$pgsql_LIBS"
19338  else
19339    apr_addto_bugger="$pgsql_LIBS"
19340    for i in $apr_addto_bugger; do
19341      apr_addto_duplicate="0"
19342      for j in $LIBS; do
19343        if test "x$i" = "x$j"; then
19344          apr_addto_duplicate="1"
19345          break
19346        fi
19347      done
19348      if test $apr_addto_duplicate = "0"; then
19349        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19350        LIBS="$LIBS $i"
19351      fi
19352    done
19353  fi
19354
19355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19356$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19357if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19358  $as_echo_n "(cached) " >&6
19359else
19360  ac_check_lib_save_LIBS=$LIBS
19361LIBS="-lpq  $LIBS"
19362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19363/* end confdefs.h.  */
19364
19365/* Override any GCC internal prototype to avoid an error.
19366   Use char because int might match the return type of a GCC
19367   builtin and then its argument prototype would still apply.  */
19368#ifdef __cplusplus
19369extern "C"
19370#endif
19371char PQsendQueryPrepared ();
19372int
19373main ()
19374{
19375return PQsendQueryPrepared ();
19376  ;
19377  return 0;
19378}
19379_ACEOF
19380if ac_fn_c_try_link "$LINENO"; then :
19381  ac_cv_lib_pq_PQsendQueryPrepared=yes
19382else
19383  ac_cv_lib_pq_PQsendQueryPrepared=no
19384fi
19385rm -f core conftest.err conftest.$ac_objext \
19386    conftest$ac_exeext conftest.$ac_ext
19387LIBS=$ac_check_lib_save_LIBS
19388fi
19389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19390$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19391if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19392  apu_have_pgsql=1
19393fi
19394
19395          fi
19396
19397fi
19398
19399
19400fi
19401
19402done
19403
19404      fi
19405      if test "$apu_have_pgsql" != "0"; then
19406
19407  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19408    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19409    APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19410  else
19411    apr_addto_bugger="$pgsql_CPPFLAGS"
19412    for i in $apr_addto_bugger; do
19413      apr_addto_duplicate="0"
19414      for j in $APRUTIL_PRIV_INCLUDES; do
19415        if test "x$i" = "x$j"; then
19416          apr_addto_duplicate="1"
19417          break
19418        fi
19419      done
19420      if test $apr_addto_duplicate = "0"; then
19421        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19422        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19423      fi
19424    done
19425  fi
19426
19427      fi
19428    fi
19429
19430else
19431
19432    # Extract the first word of "pg_config", so it can be a program name with args.
19433set dummy pg_config; ac_word=$2
19434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19435$as_echo_n "checking for $ac_word... " >&6; }
19436if ${ac_cv_path_PGSQL_CONFIG+:} false; then :
19437  $as_echo_n "(cached) " >&6
19438else
19439  case $PGSQL_CONFIG in
19440  [\\/]* | ?:[\\/]*)
19441  ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
19442  ;;
19443  *)
19444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19445for as_dir in $PATH
19446do
19447  IFS=$as_save_IFS
19448  test -z "$as_dir" && as_dir=.
19449    for ac_exec_ext in '' $ac_executable_extensions; do
19450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19451    ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19453    break 2
19454  fi
19455done
19456  done
19457IFS=$as_save_IFS
19458
19459  ;;
19460esac
19461fi
19462PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
19463if test -n "$PGSQL_CONFIG"; then
19464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
19465$as_echo "$PGSQL_CONFIG" >&6; }
19466else
19467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468$as_echo "no" >&6; }
19469fi
19470
19471
19472    if test "x$PGSQL_CONFIG" != 'x'; then
19473      pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
19474      pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
19475
19476
19477  if test "x$CPPFLAGS" = "x"; then
19478    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
19479    CPPFLAGS="$pgsql_CPPFLAGS"
19480  else
19481    apr_addto_bugger="$pgsql_CPPFLAGS"
19482    for i in $apr_addto_bugger; do
19483      apr_addto_duplicate="0"
19484      for j in $CPPFLAGS; do
19485        if test "x$i" = "x$j"; then
19486          apr_addto_duplicate="1"
19487          break
19488        fi
19489      done
19490      if test $apr_addto_duplicate = "0"; then
19491        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19492        CPPFLAGS="$CPPFLAGS $i"
19493      fi
19494    done
19495  fi
19496
19497
19498  if test "x$LDFLAGS" = "x"; then
19499    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
19500    LDFLAGS="$pgsql_LDFLAGS"
19501  else
19502    apr_addto_bugger="$pgsql_LDFLAGS"
19503    for i in $apr_addto_bugger; do
19504      apr_addto_duplicate="0"
19505      for j in $LDFLAGS; do
19506        if test "x$i" = "x$j"; then
19507          apr_addto_duplicate="1"
19508          break
19509        fi
19510      done
19511      if test $apr_addto_duplicate = "0"; then
19512        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
19513        LDFLAGS="$LDFLAGS $i"
19514      fi
19515    done
19516  fi
19517
19518    fi
19519
19520    for ac_header in libpq-fe.h
19521do :
19522  ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19523if test "x$ac_cv_header_libpq_fe_h" = xyes; then :
19524  cat >>confdefs.h <<_ACEOF
19525#define HAVE_LIBPQ_FE_H 1
19526_ACEOF
19527
19528      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19529$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19530if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19531  $as_echo_n "(cached) " >&6
19532else
19533  ac_check_lib_save_LIBS=$LIBS
19534LIBS="-lpq  $LIBS"
19535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19536/* end confdefs.h.  */
19537
19538/* Override any GCC internal prototype to avoid an error.
19539   Use char because int might match the return type of a GCC
19540   builtin and then its argument prototype would still apply.  */
19541#ifdef __cplusplus
19542extern "C"
19543#endif
19544char PQsendQueryPrepared ();
19545int
19546main ()
19547{
19548return PQsendQueryPrepared ();
19549  ;
19550  return 0;
19551}
19552_ACEOF
19553if ac_fn_c_try_link "$LINENO"; then :
19554  ac_cv_lib_pq_PQsendQueryPrepared=yes
19555else
19556  ac_cv_lib_pq_PQsendQueryPrepared=no
19557fi
19558rm -f core conftest.err conftest.$ac_objext \
19559    conftest$ac_exeext conftest.$ac_ext
19560LIBS=$ac_check_lib_save_LIBS
19561fi
19562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19563$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19564if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19565  apu_have_pgsql=1
19566else
19567
19568      if test "x$PGSQL_CONFIG" != 'x'; then
19569        unset ac_cv_lib_pq_PQsendQueryPrepared
19570        pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19571
19572  if test "x$LIBS" = "x"; then
19573    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19574    LIBS="$pgsql_LIBS"
19575  else
19576    apr_addto_bugger="$pgsql_LIBS"
19577    for i in $apr_addto_bugger; do
19578      apr_addto_duplicate="0"
19579      for j in $LIBS; do
19580        if test "x$i" = "x$j"; then
19581          apr_addto_duplicate="1"
19582          break
19583        fi
19584      done
19585      if test $apr_addto_duplicate = "0"; then
19586        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19587        LIBS="$LIBS $i"
19588      fi
19589    done
19590  fi
19591
19592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19593$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19594if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19595  $as_echo_n "(cached) " >&6
19596else
19597  ac_check_lib_save_LIBS=$LIBS
19598LIBS="-lpq  $LIBS"
19599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19600/* end confdefs.h.  */
19601
19602/* Override any GCC internal prototype to avoid an error.
19603   Use char because int might match the return type of a GCC
19604   builtin and then its argument prototype would still apply.  */
19605#ifdef __cplusplus
19606extern "C"
19607#endif
19608char PQsendQueryPrepared ();
19609int
19610main ()
19611{
19612return PQsendQueryPrepared ();
19613  ;
19614  return 0;
19615}
19616_ACEOF
19617if ac_fn_c_try_link "$LINENO"; then :
19618  ac_cv_lib_pq_PQsendQueryPrepared=yes
19619else
19620  ac_cv_lib_pq_PQsendQueryPrepared=no
19621fi
19622rm -f core conftest.err conftest.$ac_objext \
19623    conftest$ac_exeext conftest.$ac_ext
19624LIBS=$ac_check_lib_save_LIBS
19625fi
19626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19627$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19628if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19629  apu_have_pgsql=1
19630fi
19631
19632      fi
19633
19634fi
19635
19636
19637fi
19638
19639done
19640
19641    if test "$apu_have_pgsql" = "0"; then
19642      for ac_header in postgresql/libpq-fe.h
19643do :
19644  ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19645if test "x$ac_cv_header_postgresql_libpq_fe_h" = xyes; then :
19646  cat >>confdefs.h <<_ACEOF
19647#define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19648_ACEOF
19649
19650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19651$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19652if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19653  $as_echo_n "(cached) " >&6
19654else
19655  ac_check_lib_save_LIBS=$LIBS
19656LIBS="-lpq  $LIBS"
19657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19658/* end confdefs.h.  */
19659
19660/* Override any GCC internal prototype to avoid an error.
19661   Use char because int might match the return type of a GCC
19662   builtin and then its argument prototype would still apply.  */
19663#ifdef __cplusplus
19664extern "C"
19665#endif
19666char PQsendQueryPrepared ();
19667int
19668main ()
19669{
19670return PQsendQueryPrepared ();
19671  ;
19672  return 0;
19673}
19674_ACEOF
19675if ac_fn_c_try_link "$LINENO"; then :
19676  ac_cv_lib_pq_PQsendQueryPrepared=yes
19677else
19678  ac_cv_lib_pq_PQsendQueryPrepared=no
19679fi
19680rm -f core conftest.err conftest.$ac_objext \
19681    conftest$ac_exeext conftest.$ac_ext
19682LIBS=$ac_check_lib_save_LIBS
19683fi
19684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19685$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19686if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19687  apu_have_pgsql=1
19688else
19689
19690        if test "x$PGSQL_CONFIG" != 'x'; then
19691          unset ac_cv_lib_pq_PQsendQueryPrepared
19692          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19693
19694  if test "x$LIBS" = "x"; then
19695    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19696    LIBS="$pgsql_LIBS"
19697  else
19698    apr_addto_bugger="$pgsql_LIBS"
19699    for i in $apr_addto_bugger; do
19700      apr_addto_duplicate="0"
19701      for j in $LIBS; do
19702        if test "x$i" = "x$j"; then
19703          apr_addto_duplicate="1"
19704          break
19705        fi
19706      done
19707      if test $apr_addto_duplicate = "0"; then
19708        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19709        LIBS="$LIBS $i"
19710      fi
19711    done
19712  fi
19713
19714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19715$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19716if ${ac_cv_lib_pq_PQsendQueryPrepared+:} false; then :
19717  $as_echo_n "(cached) " >&6
19718else
19719  ac_check_lib_save_LIBS=$LIBS
19720LIBS="-lpq  $LIBS"
19721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19722/* end confdefs.h.  */
19723
19724/* Override any GCC internal prototype to avoid an error.
19725   Use char because int might match the return type of a GCC
19726   builtin and then its argument prototype would still apply.  */
19727#ifdef __cplusplus
19728extern "C"
19729#endif
19730char PQsendQueryPrepared ();
19731int
19732main ()
19733{
19734return PQsendQueryPrepared ();
19735  ;
19736  return 0;
19737}
19738_ACEOF
19739if ac_fn_c_try_link "$LINENO"; then :
19740  ac_cv_lib_pq_PQsendQueryPrepared=yes
19741else
19742  ac_cv_lib_pq_PQsendQueryPrepared=no
19743fi
19744rm -f core conftest.err conftest.$ac_objext \
19745    conftest$ac_exeext conftest.$ac_ext
19746LIBS=$ac_check_lib_save_LIBS
19747fi
19748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19749$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19750if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = xyes; then :
19751  apu_have_pgsql=1
19752fi
19753
19754        fi
19755
19756fi
19757
19758
19759fi
19760
19761done
19762
19763    fi
19764    if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
19765
19766  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19767    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19768    APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19769  else
19770    apr_addto_bugger="$pgsql_CPPFLAGS"
19771    for i in $apr_addto_bugger; do
19772      apr_addto_duplicate="0"
19773      for j in $APRUTIL_PRIV_INCLUDES; do
19774        if test "x$i" = "x$j"; then
19775          apr_addto_duplicate="1"
19776          break
19777        fi
19778      done
19779      if test $apr_addto_duplicate = "0"; then
19780        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19781        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19782      fi
19783    done
19784  fi
19785
19786    fi
19787
19788fi
19789
19790
19791      if test "$apu_have_pgsql" = "1"; then
19792
19793  if test "x$LDADD_dbd_pgsql" = "x"; then
19794    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_pgsql to \"$pgsql_LDFLAGS -lpq $pgsql_LIBS\""
19795    LDADD_dbd_pgsql="$pgsql_LDFLAGS -lpq $pgsql_LIBS"
19796  else
19797    apr_addto_bugger="$pgsql_LDFLAGS -lpq $pgsql_LIBS"
19798    for i in $apr_addto_bugger; do
19799      apr_addto_duplicate="0"
19800      for j in $LDADD_dbd_pgsql; do
19801        if test "x$i" = "x$j"; then
19802          apr_addto_duplicate="1"
19803          break
19804        fi
19805      done
19806      if test $apr_addto_duplicate = "0"; then
19807        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_pgsql"
19808        LDADD_dbd_pgsql="$LDADD_dbd_pgsql $i"
19809      fi
19810    done
19811  fi
19812
19813  fi
19814
19815
19816  LIBS="$old_libs"
19817  CPPFLAGS="$old_cppflags"
19818  LDFLAGS="$old_ldflags"
19819
19820
19821  apu_have_mysql=0
19822
19823  old_libs="$LIBS"
19824  old_cppflags="$CPPFLAGS"
19825  old_ldflags="$LDFLAGS"
19826
19827
19828# Check whether --with-mysql was given.
19829if test "${with_mysql+set}" = set; then :
19830  withval=$with_mysql;
19831    if test "$withval" = "yes"; then
19832      # Extract the first word of "mysql_config", so it can be a program name with args.
19833set dummy mysql_config; ac_word=$2
19834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19835$as_echo_n "checking for $ac_word... " >&6; }
19836if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
19837  $as_echo_n "(cached) " >&6
19838else
19839  case $MYSQL_CONFIG in
19840  [\\/]* | ?:[\\/]*)
19841  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
19842  ;;
19843  *)
19844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19845for as_dir in $PATH
19846do
19847  IFS=$as_save_IFS
19848  test -z "$as_dir" && as_dir=.
19849    for ac_exec_ext in '' $ac_executable_extensions; do
19850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19851    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19853    break 2
19854  fi
19855done
19856  done
19857IFS=$as_save_IFS
19858
19859  ;;
19860esac
19861fi
19862MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
19863if test -n "$MYSQL_CONFIG"; then
19864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
19865$as_echo "$MYSQL_CONFIG" >&6; }
19866else
19867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19868$as_echo "no" >&6; }
19869fi
19870
19871
19872      if test "x$MYSQL_CONFIG" != 'x'; then
19873        mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
19874        mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`"
19875        mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
19876
19877
19878  if test "x$CPPFLAGS" = "x"; then
19879    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$mysql_CPPFLAGS\""
19880    CPPFLAGS="$mysql_CPPFLAGS"
19881  else
19882    apr_addto_bugger="$mysql_CPPFLAGS"
19883    for i in $apr_addto_bugger; do
19884      apr_addto_duplicate="0"
19885      for j in $CPPFLAGS; do
19886        if test "x$i" = "x$j"; then
19887          apr_addto_duplicate="1"
19888          break
19889        fi
19890      done
19891      if test $apr_addto_duplicate = "0"; then
19892        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19893        CPPFLAGS="$CPPFLAGS $i"
19894      fi
19895    done
19896  fi
19897
19898
19899  if test "x$LIBS" = "x"; then
19900    test "x$silent" != "xyes" && echo "  setting LIBS to \"$mysql_LIBS\""
19901    LIBS="$mysql_LIBS"
19902  else
19903    apr_addto_bugger="$mysql_LIBS"
19904    for i in $apr_addto_bugger; do
19905      apr_addto_duplicate="0"
19906      for j in $LIBS; do
19907        if test "x$i" = "x$j"; then
19908          apr_addto_duplicate="1"
19909          break
19910        fi
19911      done
19912      if test $apr_addto_duplicate = "0"; then
19913        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19914        LIBS="$LIBS $i"
19915      fi
19916    done
19917  fi
19918
19919      fi
19920
19921      for ac_header in mysql.h my_global.h my_sys.h
19922do :
19923  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19924ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <my_global.h>
19925"
19926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19927  cat >>confdefs.h <<_ACEOF
19928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19929_ACEOF
19930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
19931$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
19932if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then :
19933  $as_echo_n "(cached) " >&6
19934else
19935  ac_check_lib_save_LIBS=$LIBS
19936LIBS="-lmysqlclient_r  $LIBS"
19937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19938/* end confdefs.h.  */
19939
19940/* Override any GCC internal prototype to avoid an error.
19941   Use char because int might match the return type of a GCC
19942   builtin and then its argument prototype would still apply.  */
19943#ifdef __cplusplus
19944extern "C"
19945#endif
19946char mysql_init ();
19947int
19948main ()
19949{
19950return mysql_init ();
19951  ;
19952  return 0;
19953}
19954_ACEOF
19955if ac_fn_c_try_link "$LINENO"; then :
19956  ac_cv_lib_mysqlclient_r_mysql_init=yes
19957else
19958  ac_cv_lib_mysqlclient_r_mysql_init=no
19959fi
19960rm -f core conftest.err conftest.$ac_objext \
19961    conftest$ac_exeext conftest.$ac_ext
19962LIBS=$ac_check_lib_save_LIBS
19963fi
19964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
19965$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
19966if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then :
19967  apu_have_mysql=1
19968fi
19969
19970else
19971  apu_have_mysql=0; break
19972fi
19973
19974done
19975
19976      if test "$apu_have_mysql" = "0"; then
19977        for ac_header in mysql/mysql.h mysql/my_global.h mysql/my_sys.h
19978do :
19979  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19980ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <mysql/my_global.h>
19981"
19982if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19983  cat >>confdefs.h <<_ACEOF
19984#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19985_ACEOF
19986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
19987$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
19988if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then :
19989  $as_echo_n "(cached) " >&6
19990else
19991  ac_check_lib_save_LIBS=$LIBS
19992LIBS="-lmysqlclient_r  $LIBS"
19993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19994/* end confdefs.h.  */
19995
19996/* Override any GCC internal prototype to avoid an error.
19997   Use char because int might match the return type of a GCC
19998   builtin and then its argument prototype would still apply.  */
19999#ifdef __cplusplus
20000extern "C"
20001#endif
20002char mysql_init ();
20003int
20004main ()
20005{
20006return mysql_init ();
20007  ;
20008  return 0;
20009}
20010_ACEOF
20011if ac_fn_c_try_link "$LINENO"; then :
20012  ac_cv_lib_mysqlclient_r_mysql_init=yes
20013else
20014  ac_cv_lib_mysqlclient_r_mysql_init=no
20015fi
20016rm -f core conftest.err conftest.$ac_objext \
20017    conftest$ac_exeext conftest.$ac_ext
20018LIBS=$ac_check_lib_save_LIBS
20019fi
20020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
20021$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
20022if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then :
20023  apu_have_mysql=1
20024fi
20025
20026else
20027  apu_have_mysql=0; break
20028fi
20029
20030done
20031
20032      fi
20033      if test "$apu_have_mysql" != "0" && test "x$MYSQL_CONFIG" != 'x'; then
20034
20035  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20036    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$mysql_CPPFLAGS\""
20037    APRUTIL_PRIV_INCLUDES="$mysql_CPPFLAGS"
20038  else
20039    apr_addto_bugger="$mysql_CPPFLAGS"
20040    for i in $apr_addto_bugger; do
20041      apr_addto_duplicate="0"
20042      for j in $APRUTIL_PRIV_INCLUDES; do
20043        if test "x$i" = "x$j"; then
20044          apr_addto_duplicate="1"
20045          break
20046        fi
20047      done
20048      if test $apr_addto_duplicate = "0"; then
20049        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20050        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20051      fi
20052    done
20053  fi
20054
20055      fi
20056    elif test "$withval" = "no"; then
20057      :
20058    else
20059      # Extract the first word of "mysql_config", so it can be a program name with args.
20060set dummy mysql_config; ac_word=$2
20061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20062$as_echo_n "checking for $ac_word... " >&6; }
20063if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
20064  $as_echo_n "(cached) " >&6
20065else
20066  case $MYSQL_CONFIG in
20067  [\\/]* | ?:[\\/]*)
20068  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
20069  ;;
20070  *)
20071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20072for as_dir in $withval/bin
20073do
20074  IFS=$as_save_IFS
20075  test -z "$as_dir" && as_dir=.
20076    for ac_exec_ext in '' $ac_executable_extensions; do
20077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20078    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20080    break 2
20081  fi
20082done
20083  done
20084IFS=$as_save_IFS
20085
20086  ;;
20087esac
20088fi
20089MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
20090if test -n "$MYSQL_CONFIG"; then
20091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
20092$as_echo "$MYSQL_CONFIG" >&6; }
20093else
20094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20095$as_echo "no" >&6; }
20096fi
20097
20098
20099      if test "x$MYSQL_CONFIG" != 'x'; then
20100        mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
20101        mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`"
20102        mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
20103      else
20104        mysql_CPPFLAGS="-I$withval/include"
20105        mysql_LDFLAGS="-L$withval/lib "
20106      fi
20107
20108
20109  if test "x$CPPFLAGS" = "x"; then
20110    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$mysql_CPPFLAGS\""
20111    CPPFLAGS="$mysql_CPPFLAGS"
20112  else
20113    apr_addto_bugger="$mysql_CPPFLAGS"
20114    for i in $apr_addto_bugger; do
20115      apr_addto_duplicate="0"
20116      for j in $CPPFLAGS; do
20117        if test "x$i" = "x$j"; then
20118          apr_addto_duplicate="1"
20119          break
20120        fi
20121      done
20122      if test $apr_addto_duplicate = "0"; then
20123        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20124        CPPFLAGS="$CPPFLAGS $i"
20125      fi
20126    done
20127  fi
20128
20129
20130  if test "x$LDFLAGS" = "x"; then
20131    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$mysql_LDFLAGS\""
20132    LDFLAGS="$mysql_LDFLAGS"
20133  else
20134    apr_addto_bugger="$mysql_LDFLAGS"
20135    for i in $apr_addto_bugger; do
20136      apr_addto_duplicate="0"
20137      for j in $LDFLAGS; do
20138        if test "x$i" = "x$j"; then
20139          apr_addto_duplicate="1"
20140          break
20141        fi
20142      done
20143      if test $apr_addto_duplicate = "0"; then
20144        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20145        LDFLAGS="$LDFLAGS $i"
20146      fi
20147    done
20148  fi
20149
20150
20151  if test "x$LIBS" = "x"; then
20152    test "x$silent" != "xyes" && echo "  setting LIBS to \"$mysql_LIBS\""
20153    LIBS="$mysql_LIBS"
20154  else
20155    apr_addto_bugger="$mysql_LIBS"
20156    for i in $apr_addto_bugger; do
20157      apr_addto_duplicate="0"
20158      for j in $LIBS; do
20159        if test "x$i" = "x$j"; then
20160          apr_addto_duplicate="1"
20161          break
20162        fi
20163      done
20164      if test $apr_addto_duplicate = "0"; then
20165        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
20166        LIBS="$LIBS $i"
20167      fi
20168    done
20169  fi
20170
20171
20172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql in $withval" >&5
20173$as_echo "$as_me: checking for mysql in $withval" >&6;}
20174      for ac_header in mysql.h my_global.h my_sys.h
20175do :
20176  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20177ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <my_global.h>
20178"
20179if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20180  cat >>confdefs.h <<_ACEOF
20181#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20182_ACEOF
20183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
20184$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
20185if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then :
20186  $as_echo_n "(cached) " >&6
20187else
20188  ac_check_lib_save_LIBS=$LIBS
20189LIBS="-lmysqlclient_r  $LIBS"
20190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20191/* end confdefs.h.  */
20192
20193/* Override any GCC internal prototype to avoid an error.
20194   Use char because int might match the return type of a GCC
20195   builtin and then its argument prototype would still apply.  */
20196#ifdef __cplusplus
20197extern "C"
20198#endif
20199char mysql_init ();
20200int
20201main ()
20202{
20203return mysql_init ();
20204  ;
20205  return 0;
20206}
20207_ACEOF
20208if ac_fn_c_try_link "$LINENO"; then :
20209  ac_cv_lib_mysqlclient_r_mysql_init=yes
20210else
20211  ac_cv_lib_mysqlclient_r_mysql_init=no
20212fi
20213rm -f core conftest.err conftest.$ac_objext \
20214    conftest$ac_exeext conftest.$ac_ext
20215LIBS=$ac_check_lib_save_LIBS
20216fi
20217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
20218$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
20219if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then :
20220  apu_have_mysql=1
20221fi
20222
20223else
20224  apu_have_mysql=0; break
20225fi
20226
20227done
20228
20229
20230      if test "$apu_have_mysql" != "1"; then
20231        for ac_header in mysql/mysql.h mysql/my_global.h mysql/my_sys.h
20232do :
20233  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20234ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <mysql/my_global.h>
20235"
20236if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20237  cat >>confdefs.h <<_ACEOF
20238#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20239_ACEOF
20240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
20241$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
20242if ${ac_cv_lib_mysqlclient_r_mysql_init+:} false; then :
20243  $as_echo_n "(cached) " >&6
20244else
20245  ac_check_lib_save_LIBS=$LIBS
20246LIBS="-lmysqlclient_r  $LIBS"
20247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20248/* end confdefs.h.  */
20249
20250/* Override any GCC internal prototype to avoid an error.
20251   Use char because int might match the return type of a GCC
20252   builtin and then its argument prototype would still apply.  */
20253#ifdef __cplusplus
20254extern "C"
20255#endif
20256char mysql_init ();
20257int
20258main ()
20259{
20260return mysql_init ();
20261  ;
20262  return 0;
20263}
20264_ACEOF
20265if ac_fn_c_try_link "$LINENO"; then :
20266  ac_cv_lib_mysqlclient_r_mysql_init=yes
20267else
20268  ac_cv_lib_mysqlclient_r_mysql_init=no
20269fi
20270rm -f core conftest.err conftest.$ac_objext \
20271    conftest$ac_exeext conftest.$ac_ext
20272LIBS=$ac_check_lib_save_LIBS
20273fi
20274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
20275$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
20276if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = xyes; then :
20277  apu_have_mysql=1
20278fi
20279
20280else
20281  apu_have_mysql=0; break
20282fi
20283
20284done
20285
20286      fi
20287      if test "$apu_have_mysql" != "0"; then
20288
20289  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20290    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$mysql_CPPFLAGS\""
20291    APRUTIL_PRIV_INCLUDES="$mysql_CPPFLAGS"
20292  else
20293    apr_addto_bugger="$mysql_CPPFLAGS"
20294    for i in $apr_addto_bugger; do
20295      apr_addto_duplicate="0"
20296      for j in $APRUTIL_PRIV_INCLUDES; do
20297        if test "x$i" = "x$j"; then
20298          apr_addto_duplicate="1"
20299          break
20300        fi
20301      done
20302      if test $apr_addto_duplicate = "0"; then
20303        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20304        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20305      fi
20306    done
20307  fi
20308
20309      fi
20310    fi
20311
20312fi
20313
20314
20315
20316
20317      if test "$apu_have_mysql" = "1"; then
20318
20319  if test "x$LDADD_dbd_mysql" = "x"; then
20320    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_mysql to \"$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS\""
20321    LDADD_dbd_mysql="$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS"
20322  else
20323    apr_addto_bugger="$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS"
20324    for i in $apr_addto_bugger; do
20325      apr_addto_duplicate="0"
20326      for j in $LDADD_dbd_mysql; do
20327        if test "x$i" = "x$j"; then
20328          apr_addto_duplicate="1"
20329          break
20330        fi
20331      done
20332      if test $apr_addto_duplicate = "0"; then
20333        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_mysql"
20334        LDADD_dbd_mysql="$LDADD_dbd_mysql $i"
20335      fi
20336    done
20337  fi
20338
20339  fi
20340
20341
20342  LIBS="$old_libs"
20343  CPPFLAGS="$old_cppflags"
20344  LDFLAGS="$old_ldflags"
20345
20346
20347  apu_have_sqlite3=0
20348
20349  old_libs="$LIBS"
20350  old_cppflags="$CPPFLAGS"
20351  old_ldflags="$LDFLAGS"
20352
20353
20354# Check whether --with-sqlite3 was given.
20355if test "${with_sqlite3+set}" = set; then :
20356  withval=$with_sqlite3;
20357    if test "$withval" = "yes"; then
20358      for ac_header in sqlite3.h
20359do :
20360  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20361if test "x$ac_cv_header_sqlite3_h" = xyes; then :
20362  cat >>confdefs.h <<_ACEOF
20363#define HAVE_SQLITE3_H 1
20364_ACEOF
20365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20366$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20367if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
20368  $as_echo_n "(cached) " >&6
20369else
20370  ac_check_lib_save_LIBS=$LIBS
20371LIBS="-lsqlite3  $LIBS"
20372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20373/* end confdefs.h.  */
20374
20375/* Override any GCC internal prototype to avoid an error.
20376   Use char because int might match the return type of a GCC
20377   builtin and then its argument prototype would still apply.  */
20378#ifdef __cplusplus
20379extern "C"
20380#endif
20381char sqlite3_open ();
20382int
20383main ()
20384{
20385return sqlite3_open ();
20386  ;
20387  return 0;
20388}
20389_ACEOF
20390if ac_fn_c_try_link "$LINENO"; then :
20391  ac_cv_lib_sqlite3_sqlite3_open=yes
20392else
20393  ac_cv_lib_sqlite3_sqlite3_open=no
20394fi
20395rm -f core conftest.err conftest.$ac_objext \
20396    conftest$ac_exeext conftest.$ac_ext
20397LIBS=$ac_check_lib_save_LIBS
20398fi
20399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20400$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20401if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
20402  apu_have_sqlite3=1
20403fi
20404
20405fi
20406
20407done
20408
20409    elif test "$withval" = "no"; then
20410      :
20411    else
20412      sqlite3_CPPFLAGS="-I$withval/include"
20413      sqlite3_LDFLAGS="-L$withval/lib "
20414
20415
20416  if test "x$CPPFLAGS" = "x"; then
20417    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sqlite3_CPPFLAGS\""
20418    CPPFLAGS="$sqlite3_CPPFLAGS"
20419  else
20420    apr_addto_bugger="$sqlite3_CPPFLAGS"
20421    for i in $apr_addto_bugger; do
20422      apr_addto_duplicate="0"
20423      for j in $CPPFLAGS; do
20424        if test "x$i" = "x$j"; then
20425          apr_addto_duplicate="1"
20426          break
20427        fi
20428      done
20429      if test $apr_addto_duplicate = "0"; then
20430        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20431        CPPFLAGS="$CPPFLAGS $i"
20432      fi
20433    done
20434  fi
20435
20436
20437  if test "x$LDFLAGS" = "x"; then
20438    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sqlite3_LDFLAGS\""
20439    LDFLAGS="$sqlite3_LDFLAGS"
20440  else
20441    apr_addto_bugger="$sqlite3_LDFLAGS"
20442    for i in $apr_addto_bugger; do
20443      apr_addto_duplicate="0"
20444      for j in $LDFLAGS; do
20445        if test "x$i" = "x$j"; then
20446          apr_addto_duplicate="1"
20447          break
20448        fi
20449      done
20450      if test $apr_addto_duplicate = "0"; then
20451        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20452        LDFLAGS="$LDFLAGS $i"
20453      fi
20454    done
20455  fi
20456
20457
20458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3 in $withval" >&5
20459$as_echo "$as_me: checking for sqlite3 in $withval" >&6;}
20460      for ac_header in sqlite3.h
20461do :
20462  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20463if test "x$ac_cv_header_sqlite3_h" = xyes; then :
20464  cat >>confdefs.h <<_ACEOF
20465#define HAVE_SQLITE3_H 1
20466_ACEOF
20467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20468$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20469if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
20470  $as_echo_n "(cached) " >&6
20471else
20472  ac_check_lib_save_LIBS=$LIBS
20473LIBS="-lsqlite3  $LIBS"
20474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20475/* end confdefs.h.  */
20476
20477/* Override any GCC internal prototype to avoid an error.
20478   Use char because int might match the return type of a GCC
20479   builtin and then its argument prototype would still apply.  */
20480#ifdef __cplusplus
20481extern "C"
20482#endif
20483char sqlite3_open ();
20484int
20485main ()
20486{
20487return sqlite3_open ();
20488  ;
20489  return 0;
20490}
20491_ACEOF
20492if ac_fn_c_try_link "$LINENO"; then :
20493  ac_cv_lib_sqlite3_sqlite3_open=yes
20494else
20495  ac_cv_lib_sqlite3_sqlite3_open=no
20496fi
20497rm -f core conftest.err conftest.$ac_objext \
20498    conftest$ac_exeext conftest.$ac_ext
20499LIBS=$ac_check_lib_save_LIBS
20500fi
20501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20502$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20503if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
20504  apu_have_sqlite3=1
20505fi
20506
20507fi
20508
20509done
20510
20511      if test "$apu_have_sqlite3" != "0"; then
20512
20513  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20514    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
20515    APRUTIL_PRIV_INCLUDES="-I$withval/include"
20516  else
20517    apr_addto_bugger="-I$withval/include"
20518    for i in $apr_addto_bugger; do
20519      apr_addto_duplicate="0"
20520      for j in $APRUTIL_PRIV_INCLUDES; do
20521        if test "x$i" = "x$j"; then
20522          apr_addto_duplicate="1"
20523          break
20524        fi
20525      done
20526      if test $apr_addto_duplicate = "0"; then
20527        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20528        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20529      fi
20530    done
20531  fi
20532
20533      fi
20534    fi
20535
20536else
20537
20538    for ac_header in sqlite3.h
20539do :
20540  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20541if test "x$ac_cv_header_sqlite3_h" = xyes; then :
20542  cat >>confdefs.h <<_ACEOF
20543#define HAVE_SQLITE3_H 1
20544_ACEOF
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20546$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20547if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
20548  $as_echo_n "(cached) " >&6
20549else
20550  ac_check_lib_save_LIBS=$LIBS
20551LIBS="-lsqlite3  $LIBS"
20552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20553/* end confdefs.h.  */
20554
20555/* Override any GCC internal prototype to avoid an error.
20556   Use char because int might match the return type of a GCC
20557   builtin and then its argument prototype would still apply.  */
20558#ifdef __cplusplus
20559extern "C"
20560#endif
20561char sqlite3_open ();
20562int
20563main ()
20564{
20565return sqlite3_open ();
20566  ;
20567  return 0;
20568}
20569_ACEOF
20570if ac_fn_c_try_link "$LINENO"; then :
20571  ac_cv_lib_sqlite3_sqlite3_open=yes
20572else
20573  ac_cv_lib_sqlite3_sqlite3_open=no
20574fi
20575rm -f core conftest.err conftest.$ac_objext \
20576    conftest$ac_exeext conftest.$ac_ext
20577LIBS=$ac_check_lib_save_LIBS
20578fi
20579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20580$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20581if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
20582  apu_have_sqlite3=1
20583fi
20584
20585fi
20586
20587done
20588
20589
20590fi
20591
20592
20593
20594
20595      if test "$apu_have_sqlite3" = "1"; then
20596
20597  if test "x$LDADD_dbd_sqlite3" = "x"; then
20598    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_sqlite3 to \"$sqlite3_LDFLAGS -lsqlite3\""
20599    LDADD_dbd_sqlite3="$sqlite3_LDFLAGS -lsqlite3"
20600  else
20601    apr_addto_bugger="$sqlite3_LDFLAGS -lsqlite3"
20602    for i in $apr_addto_bugger; do
20603      apr_addto_duplicate="0"
20604      for j in $LDADD_dbd_sqlite3; do
20605        if test "x$i" = "x$j"; then
20606          apr_addto_duplicate="1"
20607          break
20608        fi
20609      done
20610      if test $apr_addto_duplicate = "0"; then
20611        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_sqlite3"
20612        LDADD_dbd_sqlite3="$LDADD_dbd_sqlite3 $i"
20613      fi
20614    done
20615  fi
20616
20617  fi
20618
20619
20620  LIBS="$old_libs"
20621  CPPFLAGS="$old_cppflags"
20622  LDFLAGS="$old_ldflags"
20623
20624
20625  apu_have_sqlite2=0
20626
20627  old_libs="$LIBS"
20628  old_cppflags="$CPPFLAGS"
20629  old_ldflags="$LDFLAGS"
20630
20631
20632# Check whether --with-sqlite2 was given.
20633if test "${with_sqlite2+set}" = set; then :
20634  withval=$with_sqlite2;
20635    if test "$withval" = "yes"; then
20636      for ac_header in sqlite.h
20637do :
20638  ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20639if test "x$ac_cv_header_sqlite_h" = xyes; then :
20640  cat >>confdefs.h <<_ACEOF
20641#define HAVE_SQLITE_H 1
20642_ACEOF
20643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20644$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20645if ${ac_cv_lib_sqlite_sqlite_open+:} false; then :
20646  $as_echo_n "(cached) " >&6
20647else
20648  ac_check_lib_save_LIBS=$LIBS
20649LIBS="-lsqlite  $LIBS"
20650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20651/* end confdefs.h.  */
20652
20653/* Override any GCC internal prototype to avoid an error.
20654   Use char because int might match the return type of a GCC
20655   builtin and then its argument prototype would still apply.  */
20656#ifdef __cplusplus
20657extern "C"
20658#endif
20659char sqlite_open ();
20660int
20661main ()
20662{
20663return sqlite_open ();
20664  ;
20665  return 0;
20666}
20667_ACEOF
20668if ac_fn_c_try_link "$LINENO"; then :
20669  ac_cv_lib_sqlite_sqlite_open=yes
20670else
20671  ac_cv_lib_sqlite_sqlite_open=no
20672fi
20673rm -f core conftest.err conftest.$ac_objext \
20674    conftest$ac_exeext conftest.$ac_ext
20675LIBS=$ac_check_lib_save_LIBS
20676fi
20677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20678$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20679if test "x$ac_cv_lib_sqlite_sqlite_open" = xyes; then :
20680  apu_have_sqlite2=1
20681fi
20682
20683fi
20684
20685done
20686
20687    elif test "$withval" = "no"; then
20688      :
20689    else
20690      sqlite2_CPPFLAGS="-I$withval/include"
20691      sqlite2_LDFLAGS="-L$withval/lib "
20692
20693
20694  if test "x$CPPFLAGS" = "x"; then
20695    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sqlite2_CPPFLAGS\""
20696    CPPFLAGS="$sqlite2_CPPFLAGS"
20697  else
20698    apr_addto_bugger="$sqlite2_CPPFLAGS"
20699    for i in $apr_addto_bugger; do
20700      apr_addto_duplicate="0"
20701      for j in $CPPFLAGS; do
20702        if test "x$i" = "x$j"; then
20703          apr_addto_duplicate="1"
20704          break
20705        fi
20706      done
20707      if test $apr_addto_duplicate = "0"; then
20708        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20709        CPPFLAGS="$CPPFLAGS $i"
20710      fi
20711    done
20712  fi
20713
20714
20715  if test "x$LDFLAGS" = "x"; then
20716    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sqlite2_LDFLAGS\""
20717    LDFLAGS="$sqlite2_LDFLAGS"
20718  else
20719    apr_addto_bugger="$sqlite2_LDFLAGS"
20720    for i in $apr_addto_bugger; do
20721      apr_addto_duplicate="0"
20722      for j in $LDFLAGS; do
20723        if test "x$i" = "x$j"; then
20724          apr_addto_duplicate="1"
20725          break
20726        fi
20727      done
20728      if test $apr_addto_duplicate = "0"; then
20729        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20730        LDFLAGS="$LDFLAGS $i"
20731      fi
20732    done
20733  fi
20734
20735
20736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite2 in $withval" >&5
20737$as_echo "$as_me: checking for sqlite2 in $withval" >&6;}
20738      for ac_header in sqlite.h
20739do :
20740  ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20741if test "x$ac_cv_header_sqlite_h" = xyes; then :
20742  cat >>confdefs.h <<_ACEOF
20743#define HAVE_SQLITE_H 1
20744_ACEOF
20745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20746$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20747if ${ac_cv_lib_sqlite_sqlite_open+:} false; then :
20748  $as_echo_n "(cached) " >&6
20749else
20750  ac_check_lib_save_LIBS=$LIBS
20751LIBS="-lsqlite  $LIBS"
20752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20753/* end confdefs.h.  */
20754
20755/* Override any GCC internal prototype to avoid an error.
20756   Use char because int might match the return type of a GCC
20757   builtin and then its argument prototype would still apply.  */
20758#ifdef __cplusplus
20759extern "C"
20760#endif
20761char sqlite_open ();
20762int
20763main ()
20764{
20765return sqlite_open ();
20766  ;
20767  return 0;
20768}
20769_ACEOF
20770if ac_fn_c_try_link "$LINENO"; then :
20771  ac_cv_lib_sqlite_sqlite_open=yes
20772else
20773  ac_cv_lib_sqlite_sqlite_open=no
20774fi
20775rm -f core conftest.err conftest.$ac_objext \
20776    conftest$ac_exeext conftest.$ac_ext
20777LIBS=$ac_check_lib_save_LIBS
20778fi
20779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20780$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20781if test "x$ac_cv_lib_sqlite_sqlite_open" = xyes; then :
20782  apu_have_sqlite2=1
20783fi
20784
20785fi
20786
20787done
20788
20789      if test "$apu_have_sqlite2" != "0"; then
20790
20791  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20792    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
20793    APRUTIL_PRIV_INCLUDES="-I$withval/include"
20794  else
20795    apr_addto_bugger="-I$withval/include"
20796    for i in $apr_addto_bugger; do
20797      apr_addto_duplicate="0"
20798      for j in $APRUTIL_PRIV_INCLUDES; do
20799        if test "x$i" = "x$j"; then
20800          apr_addto_duplicate="1"
20801          break
20802        fi
20803      done
20804      if test $apr_addto_duplicate = "0"; then
20805        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20806        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20807      fi
20808    done
20809  fi
20810
20811      fi
20812    fi
20813
20814else
20815
20816    for ac_header in sqlite.h
20817do :
20818  ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20819if test "x$ac_cv_header_sqlite_h" = xyes; then :
20820  cat >>confdefs.h <<_ACEOF
20821#define HAVE_SQLITE_H 1
20822_ACEOF
20823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20824$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20825if ${ac_cv_lib_sqlite_sqlite_open+:} false; then :
20826  $as_echo_n "(cached) " >&6
20827else
20828  ac_check_lib_save_LIBS=$LIBS
20829LIBS="-lsqlite  $LIBS"
20830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20831/* end confdefs.h.  */
20832
20833/* Override any GCC internal prototype to avoid an error.
20834   Use char because int might match the return type of a GCC
20835   builtin and then its argument prototype would still apply.  */
20836#ifdef __cplusplus
20837extern "C"
20838#endif
20839char sqlite_open ();
20840int
20841main ()
20842{
20843return sqlite_open ();
20844  ;
20845  return 0;
20846}
20847_ACEOF
20848if ac_fn_c_try_link "$LINENO"; then :
20849  ac_cv_lib_sqlite_sqlite_open=yes
20850else
20851  ac_cv_lib_sqlite_sqlite_open=no
20852fi
20853rm -f core conftest.err conftest.$ac_objext \
20854    conftest$ac_exeext conftest.$ac_ext
20855LIBS=$ac_check_lib_save_LIBS
20856fi
20857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20858$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20859if test "x$ac_cv_lib_sqlite_sqlite_open" = xyes; then :
20860  apu_have_sqlite2=1
20861fi
20862
20863fi
20864
20865done
20866
20867
20868fi
20869
20870
20871
20872
20873      if test "$apu_have_sqlite2" = "1"; then
20874
20875  if test "x$LDADD_dbd_sqlite2" = "x"; then
20876    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_sqlite2 to \"$sqlite2_LDFLAGS -lsqlite\""
20877    LDADD_dbd_sqlite2="$sqlite2_LDFLAGS -lsqlite"
20878  else
20879    apr_addto_bugger="$sqlite2_LDFLAGS -lsqlite"
20880    for i in $apr_addto_bugger; do
20881      apr_addto_duplicate="0"
20882      for j in $LDADD_dbd_sqlite2; do
20883        if test "x$i" = "x$j"; then
20884          apr_addto_duplicate="1"
20885          break
20886        fi
20887      done
20888      if test $apr_addto_duplicate = "0"; then
20889        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_sqlite2"
20890        LDADD_dbd_sqlite2="$LDADD_dbd_sqlite2 $i"
20891      fi
20892    done
20893  fi
20894
20895  fi
20896
20897
20898  LIBS="$old_libs"
20899  CPPFLAGS="$old_cppflags"
20900  LDFLAGS="$old_ldflags"
20901
20902
20903  apu_have_oracle=0
20904
20905  old_libs="$LIBS"
20906  old_cppflags="$CPPFLAGS"
20907  old_ldflags="$LDFLAGS"
20908
20909
20910# Check whether --with-oracle-include was given.
20911if test "${with_oracle_include+set}" = set; then :
20912  withval=$with_oracle_include;
20913fi
20914
20915
20916# Check whether --with-oracle was given.
20917if test "${with_oracle+set}" = set; then :
20918  withval=$with_oracle;
20919    if test "$withval" = "yes"; then
20920      if test -n "$with_oracle_include"; then
20921        oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
20922
20923  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20924    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$with_oracle_include\""
20925    APRUTIL_PRIV_INCLUDES="-I$with_oracle_include"
20926  else
20927    apr_addto_bugger="-I$with_oracle_include"
20928    for i in $apr_addto_bugger; do
20929      apr_addto_duplicate="0"
20930      for j in $APRUTIL_PRIV_INCLUDES; do
20931        if test "x$i" = "x$j"; then
20932          apr_addto_duplicate="1"
20933          break
20934        fi
20935      done
20936      if test $apr_addto_duplicate = "0"; then
20937        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20938        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20939      fi
20940    done
20941  fi
20942
20943      fi
20944
20945
20946  if test "x$CPPFLAGS" = "x"; then
20947    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$oracle_CPPFLAGS\""
20948    CPPFLAGS="$oracle_CPPFLAGS"
20949  else
20950    apr_addto_bugger="$oracle_CPPFLAGS"
20951    for i in $apr_addto_bugger; do
20952      apr_addto_duplicate="0"
20953      for j in $CPPFLAGS; do
20954        if test "x$i" = "x$j"; then
20955          apr_addto_duplicate="1"
20956          break
20957        fi
20958      done
20959      if test $apr_addto_duplicate = "0"; then
20960        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20961        CPPFLAGS="$CPPFLAGS $i"
20962      fi
20963    done
20964  fi
20965
20966
20967      for ac_header in oci.h
20968do :
20969  ac_fn_c_check_header_mongrel "$LINENO" "oci.h" "ac_cv_header_oci_h" "$ac_includes_default"
20970if test "x$ac_cv_header_oci_h" = xyes; then :
20971  cat >>confdefs.h <<_ACEOF
20972#define HAVE_OCI_H 1
20973_ACEOF
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
20975$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
20976if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
20977  $as_echo_n "(cached) " >&6
20978else
20979  ac_check_lib_save_LIBS=$LIBS
20980LIBS="-lclntsh  $LIBS"
20981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20982/* end confdefs.h.  */
20983
20984/* Override any GCC internal prototype to avoid an error.
20985   Use char because int might match the return type of a GCC
20986   builtin and then its argument prototype would still apply.  */
20987#ifdef __cplusplus
20988extern "C"
20989#endif
20990char OCIEnvCreate ();
20991int
20992main ()
20993{
20994return OCIEnvCreate ();
20995  ;
20996  return 0;
20997}
20998_ACEOF
20999if ac_fn_c_try_link "$LINENO"; then :
21000  ac_cv_lib_clntsh_OCIEnvCreate=yes
21001else
21002  ac_cv_lib_clntsh_OCIEnvCreate=no
21003fi
21004rm -f core conftest.err conftest.$ac_objext \
21005    conftest$ac_exeext conftest.$ac_ext
21006LIBS=$ac_check_lib_save_LIBS
21007fi
21008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21009$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21010if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21011  apu_have_oracle=1
21012else
21013
21014        unset ac_cv_lib_clntsh_OCIEnvCreate
21015        oracle_LIBS="-lnnz11"
21016
21017  if test "x$LIBS" = "x"; then
21018    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21019    LIBS="$oracle_LIBS"
21020  else
21021    apr_addto_bugger="$oracle_LIBS"
21022    for i in $apr_addto_bugger; do
21023      apr_addto_duplicate="0"
21024      for j in $LIBS; do
21025        if test "x$i" = "x$j"; then
21026          apr_addto_duplicate="1"
21027          break
21028        fi
21029      done
21030      if test $apr_addto_duplicate = "0"; then
21031        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21032        LIBS="$LIBS $i"
21033      fi
21034    done
21035  fi
21036
21037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21038$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21039if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21040  $as_echo_n "(cached) " >&6
21041else
21042  ac_check_lib_save_LIBS=$LIBS
21043LIBS="-lclntsh  $LIBS"
21044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21045/* end confdefs.h.  */
21046
21047/* Override any GCC internal prototype to avoid an error.
21048   Use char because int might match the return type of a GCC
21049   builtin and then its argument prototype would still apply.  */
21050#ifdef __cplusplus
21051extern "C"
21052#endif
21053char OCIEnvCreate ();
21054int
21055main ()
21056{
21057return OCIEnvCreate ();
21058  ;
21059  return 0;
21060}
21061_ACEOF
21062if ac_fn_c_try_link "$LINENO"; then :
21063  ac_cv_lib_clntsh_OCIEnvCreate=yes
21064else
21065  ac_cv_lib_clntsh_OCIEnvCreate=no
21066fi
21067rm -f core conftest.err conftest.$ac_objext \
21068    conftest$ac_exeext conftest.$ac_ext
21069LIBS=$ac_check_lib_save_LIBS
21070fi
21071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21072$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21073if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21074  apu_have_oracle=1
21075else
21076
21077          unset ac_cv_lib_clntsh_OCIEnvCreate
21078
21079  if test "x$LIBS" = "x$oracle_LIBS"; then
21080    test "x$silent" != "xyes" && echo "  nulling LIBS"
21081    LIBS=""
21082  else
21083    apr_new_bugger=""
21084    apr_removed=0
21085    for i in $LIBS; do
21086      if test "x$i" != "x$oracle_LIBS"; then
21087        apr_new_bugger="$apr_new_bugger $i"
21088      else
21089        apr_removed=1
21090      fi
21091    done
21092    if test $apr_removed = "1"; then
21093      test "x$silent" != "xyes" && echo "  removed \"$oracle_LIBS\" from LIBS"
21094      LIBS=$apr_new_bugger
21095    fi
21096  fi
21097
21098          oracle_LIBS="-lnnz10"
21099
21100  if test "x$LIBS" = "x"; then
21101    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21102    LIBS="$oracle_LIBS"
21103  else
21104    apr_addto_bugger="$oracle_LIBS"
21105    for i in $apr_addto_bugger; do
21106      apr_addto_duplicate="0"
21107      for j in $LIBS; do
21108        if test "x$i" = "x$j"; then
21109          apr_addto_duplicate="1"
21110          break
21111        fi
21112      done
21113      if test $apr_addto_duplicate = "0"; then
21114        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21115        LIBS="$LIBS $i"
21116      fi
21117    done
21118  fi
21119
21120          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21121$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21122if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21123  $as_echo_n "(cached) " >&6
21124else
21125  ac_check_lib_save_LIBS=$LIBS
21126LIBS="-lclntsh  $LIBS"
21127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21128/* end confdefs.h.  */
21129
21130/* Override any GCC internal prototype to avoid an error.
21131   Use char because int might match the return type of a GCC
21132   builtin and then its argument prototype would still apply.  */
21133#ifdef __cplusplus
21134extern "C"
21135#endif
21136char OCIEnvCreate ();
21137int
21138main ()
21139{
21140return OCIEnvCreate ();
21141  ;
21142  return 0;
21143}
21144_ACEOF
21145if ac_fn_c_try_link "$LINENO"; then :
21146  ac_cv_lib_clntsh_OCIEnvCreate=yes
21147else
21148  ac_cv_lib_clntsh_OCIEnvCreate=no
21149fi
21150rm -f core conftest.err conftest.$ac_objext \
21151    conftest$ac_exeext conftest.$ac_ext
21152LIBS=$ac_check_lib_save_LIBS
21153fi
21154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21155$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21156if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21157  apu_have_oracle=1
21158fi
21159
21160
21161fi
21162
21163
21164fi
21165
21166fi
21167
21168done
21169
21170    elif test "$withval" = "no"; then
21171      :
21172    else
21173      if test -n "$with_oracle_include"; then
21174        oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
21175
21176  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21177    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$with_oracle_include\""
21178    APRUTIL_PRIV_INCLUDES="-I$with_oracle_include"
21179  else
21180    apr_addto_bugger="-I$with_oracle_include"
21181    for i in $apr_addto_bugger; do
21182      apr_addto_duplicate="0"
21183      for j in $APRUTIL_PRIV_INCLUDES; do
21184        if test "x$i" = "x$j"; then
21185          apr_addto_duplicate="1"
21186          break
21187        fi
21188      done
21189      if test $apr_addto_duplicate = "0"; then
21190        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21191        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21192      fi
21193    done
21194  fi
21195
21196      else
21197        oracle_CPPFLAGS="-I$withval/rdbms/demo -I$withval/rdbms/public"
21198      fi
21199      oracle_LDFLAGS="-L$withval/lib "
21200
21201
21202  if test "x$CPPFLAGS" = "x"; then
21203    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$oracle_CPPFLAGS\""
21204    CPPFLAGS="$oracle_CPPFLAGS"
21205  else
21206    apr_addto_bugger="$oracle_CPPFLAGS"
21207    for i in $apr_addto_bugger; do
21208      apr_addto_duplicate="0"
21209      for j in $CPPFLAGS; do
21210        if test "x$i" = "x$j"; then
21211          apr_addto_duplicate="1"
21212          break
21213        fi
21214      done
21215      if test $apr_addto_duplicate = "0"; then
21216        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21217        CPPFLAGS="$CPPFLAGS $i"
21218      fi
21219    done
21220  fi
21221
21222
21223  if test "x$LDFLAGS" = "x"; then
21224    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$oracle_LDFLAGS\""
21225    LDFLAGS="$oracle_LDFLAGS"
21226  else
21227    apr_addto_bugger="$oracle_LDFLAGS"
21228    for i in $apr_addto_bugger; do
21229      apr_addto_duplicate="0"
21230      for j in $LDFLAGS; do
21231        if test "x$i" = "x$j"; then
21232          apr_addto_duplicate="1"
21233          break
21234        fi
21235      done
21236      if test $apr_addto_duplicate = "0"; then
21237        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
21238        LDFLAGS="$LDFLAGS $i"
21239      fi
21240    done
21241  fi
21242
21243
21244      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for oracle in $withval" >&5
21245$as_echo "$as_me: checking for oracle in $withval" >&6;}
21246      for ac_header in oci.h
21247do :
21248  ac_fn_c_check_header_mongrel "$LINENO" "oci.h" "ac_cv_header_oci_h" "$ac_includes_default"
21249if test "x$ac_cv_header_oci_h" = xyes; then :
21250  cat >>confdefs.h <<_ACEOF
21251#define HAVE_OCI_H 1
21252_ACEOF
21253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21254$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21255if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21256  $as_echo_n "(cached) " >&6
21257else
21258  ac_check_lib_save_LIBS=$LIBS
21259LIBS="-lclntsh  $LIBS"
21260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21261/* end confdefs.h.  */
21262
21263/* Override any GCC internal prototype to avoid an error.
21264   Use char because int might match the return type of a GCC
21265   builtin and then its argument prototype would still apply.  */
21266#ifdef __cplusplus
21267extern "C"
21268#endif
21269char OCIEnvCreate ();
21270int
21271main ()
21272{
21273return OCIEnvCreate ();
21274  ;
21275  return 0;
21276}
21277_ACEOF
21278if ac_fn_c_try_link "$LINENO"; then :
21279  ac_cv_lib_clntsh_OCIEnvCreate=yes
21280else
21281  ac_cv_lib_clntsh_OCIEnvCreate=no
21282fi
21283rm -f core conftest.err conftest.$ac_objext \
21284    conftest$ac_exeext conftest.$ac_ext
21285LIBS=$ac_check_lib_save_LIBS
21286fi
21287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21288$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21289if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21290  apu_have_oracle=1
21291else
21292
21293        unset ac_cv_lib_clntsh_OCIEnvCreate
21294        oracle_LIBS="-lnnz11"
21295
21296  if test "x$LIBS" = "x"; then
21297    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21298    LIBS="$oracle_LIBS"
21299  else
21300    apr_addto_bugger="$oracle_LIBS"
21301    for i in $apr_addto_bugger; do
21302      apr_addto_duplicate="0"
21303      for j in $LIBS; do
21304        if test "x$i" = "x$j"; then
21305          apr_addto_duplicate="1"
21306          break
21307        fi
21308      done
21309      if test $apr_addto_duplicate = "0"; then
21310        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21311        LIBS="$LIBS $i"
21312      fi
21313    done
21314  fi
21315
21316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21317$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21318if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21319  $as_echo_n "(cached) " >&6
21320else
21321  ac_check_lib_save_LIBS=$LIBS
21322LIBS="-lclntsh  $LIBS"
21323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21324/* end confdefs.h.  */
21325
21326/* Override any GCC internal prototype to avoid an error.
21327   Use char because int might match the return type of a GCC
21328   builtin and then its argument prototype would still apply.  */
21329#ifdef __cplusplus
21330extern "C"
21331#endif
21332char OCIEnvCreate ();
21333int
21334main ()
21335{
21336return OCIEnvCreate ();
21337  ;
21338  return 0;
21339}
21340_ACEOF
21341if ac_fn_c_try_link "$LINENO"; then :
21342  ac_cv_lib_clntsh_OCIEnvCreate=yes
21343else
21344  ac_cv_lib_clntsh_OCIEnvCreate=no
21345fi
21346rm -f core conftest.err conftest.$ac_objext \
21347    conftest$ac_exeext conftest.$ac_ext
21348LIBS=$ac_check_lib_save_LIBS
21349fi
21350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21351$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21352if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21353  apu_have_oracle=1
21354else
21355
21356          unset ac_cv_lib_clntsh_OCIEnvCreate
21357
21358  if test "x$LIBS" = "x$oracle_LIBS"; then
21359    test "x$silent" != "xyes" && echo "  nulling LIBS"
21360    LIBS=""
21361  else
21362    apr_new_bugger=""
21363    apr_removed=0
21364    for i in $LIBS; do
21365      if test "x$i" != "x$oracle_LIBS"; then
21366        apr_new_bugger="$apr_new_bugger $i"
21367      else
21368        apr_removed=1
21369      fi
21370    done
21371    if test $apr_removed = "1"; then
21372      test "x$silent" != "xyes" && echo "  removed \"$oracle_LIBS\" from LIBS"
21373      LIBS=$apr_new_bugger
21374    fi
21375  fi
21376
21377          oracle_LIBS="-lnnz10"
21378
21379  if test "x$LIBS" = "x"; then
21380    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21381    LIBS="$oracle_LIBS"
21382  else
21383    apr_addto_bugger="$oracle_LIBS"
21384    for i in $apr_addto_bugger; do
21385      apr_addto_duplicate="0"
21386      for j in $LIBS; do
21387        if test "x$i" = "x$j"; then
21388          apr_addto_duplicate="1"
21389          break
21390        fi
21391      done
21392      if test $apr_addto_duplicate = "0"; then
21393        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21394        LIBS="$LIBS $i"
21395      fi
21396    done
21397  fi
21398
21399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21400$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21401if ${ac_cv_lib_clntsh_OCIEnvCreate+:} false; then :
21402  $as_echo_n "(cached) " >&6
21403else
21404  ac_check_lib_save_LIBS=$LIBS
21405LIBS="-lclntsh  $LIBS"
21406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21407/* end confdefs.h.  */
21408
21409/* Override any GCC internal prototype to avoid an error.
21410   Use char because int might match the return type of a GCC
21411   builtin and then its argument prototype would still apply.  */
21412#ifdef __cplusplus
21413extern "C"
21414#endif
21415char OCIEnvCreate ();
21416int
21417main ()
21418{
21419return OCIEnvCreate ();
21420  ;
21421  return 0;
21422}
21423_ACEOF
21424if ac_fn_c_try_link "$LINENO"; then :
21425  ac_cv_lib_clntsh_OCIEnvCreate=yes
21426else
21427  ac_cv_lib_clntsh_OCIEnvCreate=no
21428fi
21429rm -f core conftest.err conftest.$ac_objext \
21430    conftest$ac_exeext conftest.$ac_ext
21431LIBS=$ac_check_lib_save_LIBS
21432fi
21433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21434$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21435if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = xyes; then :
21436  apu_have_oracle=1
21437fi
21438
21439
21440fi
21441
21442
21443fi
21444
21445fi
21446
21447done
21448
21449      if test "$apu_have_oracle" != "0"; then
21450        oracle_LDFLAGS="$oracle_LDFLAGS -R$withval/lib"
21451        if test -z "$with_oracle_include"; then
21452
21453  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21454    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/rdbms/demo\""
21455    APRUTIL_PRIV_INCLUDES="-I$withval/rdbms/demo"
21456  else
21457    apr_addto_bugger="-I$withval/rdbms/demo"
21458    for i in $apr_addto_bugger; do
21459      apr_addto_duplicate="0"
21460      for j in $APRUTIL_PRIV_INCLUDES; do
21461        if test "x$i" = "x$j"; then
21462          apr_addto_duplicate="1"
21463          break
21464        fi
21465      done
21466      if test $apr_addto_duplicate = "0"; then
21467        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21468        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21469      fi
21470    done
21471  fi
21472
21473
21474  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21475    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/rdbms/public\""
21476    APRUTIL_PRIV_INCLUDES="-I$withval/rdbms/public"
21477  else
21478    apr_addto_bugger="-I$withval/rdbms/public"
21479    for i in $apr_addto_bugger; do
21480      apr_addto_duplicate="0"
21481      for j in $APRUTIL_PRIV_INCLUDES; do
21482        if test "x$i" = "x$j"; then
21483          apr_addto_duplicate="1"
21484          break
21485        fi
21486      done
21487      if test $apr_addto_duplicate = "0"; then
21488        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21489        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21490      fi
21491    done
21492  fi
21493
21494        fi
21495      fi
21496    fi
21497
21498fi
21499
21500
21501
21502
21503      if test "$apu_have_oracle" = "1"; then
21504
21505  if test "x$LDADD_dbd_oracle" = "x"; then
21506    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_oracle to \"$oracle_LDFLAGS -lclntsh $oracle_LIBS\""
21507    LDADD_dbd_oracle="$oracle_LDFLAGS -lclntsh $oracle_LIBS"
21508  else
21509    apr_addto_bugger="$oracle_LDFLAGS -lclntsh $oracle_LIBS"
21510    for i in $apr_addto_bugger; do
21511      apr_addto_duplicate="0"
21512      for j in $LDADD_dbd_oracle; do
21513        if test "x$i" = "x$j"; then
21514          apr_addto_duplicate="1"
21515          break
21516        fi
21517      done
21518      if test $apr_addto_duplicate = "0"; then
21519        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_oracle"
21520        LDADD_dbd_oracle="$LDADD_dbd_oracle $i"
21521      fi
21522    done
21523  fi
21524
21525  fi
21526
21527
21528  LIBS="$old_libs"
21529  CPPFLAGS="$old_cppflags"
21530  LDFLAGS="$old_ldflags"
21531
21532
21533  apu_have_freetds=0
21534
21535  old_libs="$LIBS"
21536  old_cppflags="$CPPFLAGS"
21537  old_ldflags="$LDFLAGS"
21538
21539
21540# Check whether --with-freetds was given.
21541if test "${with_freetds+set}" = set; then :
21542  withval=$with_freetds;
21543    if test "$withval" = "yes"; then
21544      for ac_header in sybdb.h
21545do :
21546  ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
21547if test "x$ac_cv_header_sybdb_h" = xyes; then :
21548  cat >>confdefs.h <<_ACEOF
21549#define HAVE_SYBDB_H 1
21550_ACEOF
21551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21552$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21553if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then :
21554  $as_echo_n "(cached) " >&6
21555else
21556  ac_check_lib_save_LIBS=$LIBS
21557LIBS="-lsybdb  $LIBS"
21558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21559/* end confdefs.h.  */
21560
21561/* Override any GCC internal prototype to avoid an error.
21562   Use char because int might match the return type of a GCC
21563   builtin and then its argument prototype would still apply.  */
21564#ifdef __cplusplus
21565extern "C"
21566#endif
21567char tdsdbopen ();
21568int
21569main ()
21570{
21571return tdsdbopen ();
21572  ;
21573  return 0;
21574}
21575_ACEOF
21576if ac_fn_c_try_link "$LINENO"; then :
21577  ac_cv_lib_sybdb_tdsdbopen=yes
21578else
21579  ac_cv_lib_sybdb_tdsdbopen=no
21580fi
21581rm -f core conftest.err conftest.$ac_objext \
21582    conftest$ac_exeext conftest.$ac_ext
21583LIBS=$ac_check_lib_save_LIBS
21584fi
21585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21586$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21587if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then :
21588  apu_have_freetds=1
21589fi
21590
21591fi
21592
21593done
21594
21595      if test "$apu_have_freetds" = "0"; then
21596        for ac_header in freetds/sybdb.h
21597do :
21598  ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default"
21599if test "x$ac_cv_header_freetds_sybdb_h" = xyes; then :
21600  cat >>confdefs.h <<_ACEOF
21601#define HAVE_FREETDS_SYBDB_H 1
21602_ACEOF
21603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21604$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21605if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then :
21606  $as_echo_n "(cached) " >&6
21607else
21608  ac_check_lib_save_LIBS=$LIBS
21609LIBS="-lsybdb  $LIBS"
21610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21611/* end confdefs.h.  */
21612
21613/* Override any GCC internal prototype to avoid an error.
21614   Use char because int might match the return type of a GCC
21615   builtin and then its argument prototype would still apply.  */
21616#ifdef __cplusplus
21617extern "C"
21618#endif
21619char tdsdbopen ();
21620int
21621main ()
21622{
21623return tdsdbopen ();
21624  ;
21625  return 0;
21626}
21627_ACEOF
21628if ac_fn_c_try_link "$LINENO"; then :
21629  ac_cv_lib_sybdb_tdsdbopen=yes
21630else
21631  ac_cv_lib_sybdb_tdsdbopen=no
21632fi
21633rm -f core conftest.err conftest.$ac_objext \
21634    conftest$ac_exeext conftest.$ac_ext
21635LIBS=$ac_check_lib_save_LIBS
21636fi
21637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21638$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21639if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then :
21640  apu_have_freetds=1
21641fi
21642
21643fi
21644
21645done
21646
21647      fi
21648    elif test "$withval" = "no"; then
21649      :
21650    else
21651      sybdb_CPPFLAGS="-I$withval/include"
21652      sybdb_LDFLAGS="-L$withval/lib "
21653
21654
21655  if test "x$CPPFLAGS" = "x"; then
21656    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sybdb_CPPFLAGS\""
21657    CPPFLAGS="$sybdb_CPPFLAGS"
21658  else
21659    apr_addto_bugger="$sybdb_CPPFLAGS"
21660    for i in $apr_addto_bugger; do
21661      apr_addto_duplicate="0"
21662      for j in $CPPFLAGS; do
21663        if test "x$i" = "x$j"; then
21664          apr_addto_duplicate="1"
21665          break
21666        fi
21667      done
21668      if test $apr_addto_duplicate = "0"; then
21669        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21670        CPPFLAGS="$CPPFLAGS $i"
21671      fi
21672    done
21673  fi
21674
21675
21676  if test "x$LDFLAGS" = "x"; then
21677    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sybdb_LDFLAGS\""
21678    LDFLAGS="$sybdb_LDFLAGS"
21679  else
21680    apr_addto_bugger="$sybdb_LDFLAGS"
21681    for i in $apr_addto_bugger; do
21682      apr_addto_duplicate="0"
21683      for j in $LDFLAGS; do
21684        if test "x$i" = "x$j"; then
21685          apr_addto_duplicate="1"
21686          break
21687        fi
21688      done
21689      if test $apr_addto_duplicate = "0"; then
21690        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
21691        LDFLAGS="$LDFLAGS $i"
21692      fi
21693    done
21694  fi
21695
21696
21697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetds in $withval" >&5
21698$as_echo "$as_me: checking for freetds in $withval" >&6;}
21699      for ac_header in sybdb.h
21700do :
21701  ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
21702if test "x$ac_cv_header_sybdb_h" = xyes; then :
21703  cat >>confdefs.h <<_ACEOF
21704#define HAVE_SYBDB_H 1
21705_ACEOF
21706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21707$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21708if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then :
21709  $as_echo_n "(cached) " >&6
21710else
21711  ac_check_lib_save_LIBS=$LIBS
21712LIBS="-lsybdb  $LIBS"
21713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21714/* end confdefs.h.  */
21715
21716/* Override any GCC internal prototype to avoid an error.
21717   Use char because int might match the return type of a GCC
21718   builtin and then its argument prototype would still apply.  */
21719#ifdef __cplusplus
21720extern "C"
21721#endif
21722char tdsdbopen ();
21723int
21724main ()
21725{
21726return tdsdbopen ();
21727  ;
21728  return 0;
21729}
21730_ACEOF
21731if ac_fn_c_try_link "$LINENO"; then :
21732  ac_cv_lib_sybdb_tdsdbopen=yes
21733else
21734  ac_cv_lib_sybdb_tdsdbopen=no
21735fi
21736rm -f core conftest.err conftest.$ac_objext \
21737    conftest$ac_exeext conftest.$ac_ext
21738LIBS=$ac_check_lib_save_LIBS
21739fi
21740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21741$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21742if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then :
21743  apu_have_freetds=1
21744fi
21745
21746fi
21747
21748done
21749
21750      if test "$apu_have_freetds" = "0"; then
21751        for ac_header in freetds/sybdb.h
21752do :
21753  ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default"
21754if test "x$ac_cv_header_freetds_sybdb_h" = xyes; then :
21755  cat >>confdefs.h <<_ACEOF
21756#define HAVE_FREETDS_SYBDB_H 1
21757_ACEOF
21758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21759$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21760if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then :
21761  $as_echo_n "(cached) " >&6
21762else
21763  ac_check_lib_save_LIBS=$LIBS
21764LIBS="-lsybdb  $LIBS"
21765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21766/* end confdefs.h.  */
21767
21768/* Override any GCC internal prototype to avoid an error.
21769   Use char because int might match the return type of a GCC
21770   builtin and then its argument prototype would still apply.  */
21771#ifdef __cplusplus
21772extern "C"
21773#endif
21774char tdsdbopen ();
21775int
21776main ()
21777{
21778return tdsdbopen ();
21779  ;
21780  return 0;
21781}
21782_ACEOF
21783if ac_fn_c_try_link "$LINENO"; then :
21784  ac_cv_lib_sybdb_tdsdbopen=yes
21785else
21786  ac_cv_lib_sybdb_tdsdbopen=no
21787fi
21788rm -f core conftest.err conftest.$ac_objext \
21789    conftest$ac_exeext conftest.$ac_ext
21790LIBS=$ac_check_lib_save_LIBS
21791fi
21792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21793$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21794if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then :
21795  apu_have_freetds=1
21796fi
21797
21798fi
21799
21800done
21801
21802      fi
21803      if test "$apu_have_freetds" != "0"; then
21804
21805  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21806    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
21807    APRUTIL_PRIV_INCLUDES="-I$withval/include"
21808  else
21809    apr_addto_bugger="-I$withval/include"
21810    for i in $apr_addto_bugger; do
21811      apr_addto_duplicate="0"
21812      for j in $APRUTIL_PRIV_INCLUDES; do
21813        if test "x$i" = "x$j"; then
21814          apr_addto_duplicate="1"
21815          break
21816        fi
21817      done
21818      if test $apr_addto_duplicate = "0"; then
21819        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21820        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21821      fi
21822    done
21823  fi
21824
21825      fi
21826    fi
21827
21828else
21829
21830    for ac_header in sybdb.h
21831do :
21832  ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
21833if test "x$ac_cv_header_sybdb_h" = xyes; then :
21834  cat >>confdefs.h <<_ACEOF
21835#define HAVE_SYBDB_H 1
21836_ACEOF
21837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21838$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21839if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then :
21840  $as_echo_n "(cached) " >&6
21841else
21842  ac_check_lib_save_LIBS=$LIBS
21843LIBS="-lsybdb  $LIBS"
21844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21845/* end confdefs.h.  */
21846
21847/* Override any GCC internal prototype to avoid an error.
21848   Use char because int might match the return type of a GCC
21849   builtin and then its argument prototype would still apply.  */
21850#ifdef __cplusplus
21851extern "C"
21852#endif
21853char tdsdbopen ();
21854int
21855main ()
21856{
21857return tdsdbopen ();
21858  ;
21859  return 0;
21860}
21861_ACEOF
21862if ac_fn_c_try_link "$LINENO"; then :
21863  ac_cv_lib_sybdb_tdsdbopen=yes
21864else
21865  ac_cv_lib_sybdb_tdsdbopen=no
21866fi
21867rm -f core conftest.err conftest.$ac_objext \
21868    conftest$ac_exeext conftest.$ac_ext
21869LIBS=$ac_check_lib_save_LIBS
21870fi
21871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21872$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21873if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then :
21874  apu_have_freetds=1
21875fi
21876
21877fi
21878
21879done
21880
21881    if test "$apu_have_freetds" = "0"; then
21882      for ac_header in freetds/sybdb.h
21883do :
21884  ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default"
21885if test "x$ac_cv_header_freetds_sybdb_h" = xyes; then :
21886  cat >>confdefs.h <<_ACEOF
21887#define HAVE_FREETDS_SYBDB_H 1
21888_ACEOF
21889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21890$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21891if ${ac_cv_lib_sybdb_tdsdbopen+:} false; then :
21892  $as_echo_n "(cached) " >&6
21893else
21894  ac_check_lib_save_LIBS=$LIBS
21895LIBS="-lsybdb  $LIBS"
21896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21897/* end confdefs.h.  */
21898
21899/* Override any GCC internal prototype to avoid an error.
21900   Use char because int might match the return type of a GCC
21901   builtin and then its argument prototype would still apply.  */
21902#ifdef __cplusplus
21903extern "C"
21904#endif
21905char tdsdbopen ();
21906int
21907main ()
21908{
21909return tdsdbopen ();
21910  ;
21911  return 0;
21912}
21913_ACEOF
21914if ac_fn_c_try_link "$LINENO"; then :
21915  ac_cv_lib_sybdb_tdsdbopen=yes
21916else
21917  ac_cv_lib_sybdb_tdsdbopen=no
21918fi
21919rm -f core conftest.err conftest.$ac_objext \
21920    conftest$ac_exeext conftest.$ac_ext
21921LIBS=$ac_check_lib_save_LIBS
21922fi
21923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21924$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21925if test "x$ac_cv_lib_sybdb_tdsdbopen" = xyes; then :
21926  apu_have_freetds=1
21927fi
21928
21929fi
21930
21931done
21932
21933    fi
21934
21935fi
21936
21937
21938
21939
21940      if test "$apu_have_freetds" = "1"; then
21941
21942  if test "x$LDADD_dbd_freetds" = "x"; then
21943    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_freetds to \"$sybdb_LDFLAGS -lsybdb\""
21944    LDADD_dbd_freetds="$sybdb_LDFLAGS -lsybdb"
21945  else
21946    apr_addto_bugger="$sybdb_LDFLAGS -lsybdb"
21947    for i in $apr_addto_bugger; do
21948      apr_addto_duplicate="0"
21949      for j in $LDADD_dbd_freetds; do
21950        if test "x$i" = "x$j"; then
21951          apr_addto_duplicate="1"
21952          break
21953        fi
21954      done
21955      if test $apr_addto_duplicate = "0"; then
21956        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_freetds"
21957        LDADD_dbd_freetds="$LDADD_dbd_freetds $i"
21958      fi
21959    done
21960  fi
21961
21962              fi
21963
21964
21965  LIBS="$old_libs"
21966  CPPFLAGS="$old_cppflags"
21967  LDFLAGS="$old_ldflags"
21968
21969
21970  apu_have_odbc=0
21971
21972  old_libs="$LIBS"
21973  old_cppflags="$CPPFLAGS"
21974  old_ldflags="$LDFLAGS"
21975
21976
21977# Check whether --with-odbc was given.
21978if test "${with_odbc+set}" = set; then :
21979  withval=$with_odbc;
21980    if test "$withval" = "yes"; then
21981      # Extract the first word of "odbc_config", so it can be a program name with args.
21982set dummy odbc_config; ac_word=$2
21983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21984$as_echo_n "checking for $ac_word... " >&6; }
21985if ${ac_cv_path_ODBC_CONFIG+:} false; then :
21986  $as_echo_n "(cached) " >&6
21987else
21988  case $ODBC_CONFIG in
21989  [\\/]* | ?:[\\/]*)
21990  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
21991  ;;
21992  *)
21993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21994for as_dir in $PATH
21995do
21996  IFS=$as_save_IFS
21997  test -z "$as_dir" && as_dir=.
21998    for ac_exec_ext in '' $ac_executable_extensions; do
21999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22000    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22002    break 2
22003  fi
22004done
22005  done
22006IFS=$as_save_IFS
22007
22008  ;;
22009esac
22010fi
22011ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22012if test -n "$ODBC_CONFIG"; then
22013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22014$as_echo "$ODBC_CONFIG" >&6; }
22015else
22016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22017$as_echo "no" >&6; }
22018fi
22019
22020
22021      if test "x$ODBC_CONFIG" != 'x'; then
22022        odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22023        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22024        odbc_LIBS="`$ODBC_CONFIG --libs`"
22025
22026
22027  if test "x$CPPFLAGS" = "x"; then
22028    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22029    CPPFLAGS="$odbc_CPPFLAGS"
22030  else
22031    apr_addto_bugger="$odbc_CPPFLAGS"
22032    for i in $apr_addto_bugger; do
22033      apr_addto_duplicate="0"
22034      for j in $CPPFLAGS; do
22035        if test "x$i" = "x$j"; then
22036          apr_addto_duplicate="1"
22037          break
22038        fi
22039      done
22040      if test $apr_addto_duplicate = "0"; then
22041        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22042        CPPFLAGS="$CPPFLAGS $i"
22043      fi
22044    done
22045  fi
22046
22047
22048  if test "x$LDFLAGS" = "x"; then
22049    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22050    LDFLAGS="$odbc_LDFLAGS"
22051  else
22052    apr_addto_bugger="$odbc_LDFLAGS"
22053    for i in $apr_addto_bugger; do
22054      apr_addto_duplicate="0"
22055      for j in $LDFLAGS; do
22056        if test "x$i" = "x$j"; then
22057          apr_addto_duplicate="1"
22058          break
22059        fi
22060      done
22061      if test $apr_addto_duplicate = "0"; then
22062        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22063        LDFLAGS="$LDFLAGS $i"
22064      fi
22065    done
22066  fi
22067
22068
22069  if test "x$LIBS" = "x"; then
22070    test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22071    LIBS="$odbc_LIBS"
22072  else
22073    apr_addto_bugger="$odbc_LIBS"
22074    for i in $apr_addto_bugger; do
22075      apr_addto_duplicate="0"
22076      for j in $LIBS; do
22077        if test "x$i" = "x$j"; then
22078          apr_addto_duplicate="1"
22079          break
22080        fi
22081      done
22082      if test $apr_addto_duplicate = "0"; then
22083        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22084        LIBS="$LIBS $i"
22085      fi
22086    done
22087  fi
22088
22089      fi
22090
22091      for ac_header in sql.h
22092do :
22093  ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22094if test "x$ac_cv_header_sql_h" = xyes; then :
22095  cat >>confdefs.h <<_ACEOF
22096#define HAVE_SQL_H 1
22097_ACEOF
22098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22099$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22100if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22101  $as_echo_n "(cached) " >&6
22102else
22103  ac_check_lib_save_LIBS=$LIBS
22104LIBS="-lodbc  $LIBS"
22105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22106/* end confdefs.h.  */
22107
22108/* Override any GCC internal prototype to avoid an error.
22109   Use char because int might match the return type of a GCC
22110   builtin and then its argument prototype would still apply.  */
22111#ifdef __cplusplus
22112extern "C"
22113#endif
22114char SQLAllocHandle ();
22115int
22116main ()
22117{
22118return SQLAllocHandle ();
22119  ;
22120  return 0;
22121}
22122_ACEOF
22123if ac_fn_c_try_link "$LINENO"; then :
22124  ac_cv_lib_odbc_SQLAllocHandle=yes
22125else
22126  ac_cv_lib_odbc_SQLAllocHandle=no
22127fi
22128rm -f core conftest.err conftest.$ac_objext \
22129    conftest$ac_exeext conftest.$ac_ext
22130LIBS=$ac_check_lib_save_LIBS
22131fi
22132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22133$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22134if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22135  apu_have_odbc=1
22136fi
22137
22138fi
22139
22140done
22141
22142      if test "$apu_have_odbc" = "0"; then
22143        for ac_header in odbc/sql.h
22144do :
22145  ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22146if test "x$ac_cv_header_odbc_sql_h" = xyes; then :
22147  cat >>confdefs.h <<_ACEOF
22148#define HAVE_ODBC_SQL_H 1
22149_ACEOF
22150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22151$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22152if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22153  $as_echo_n "(cached) " >&6
22154else
22155  ac_check_lib_save_LIBS=$LIBS
22156LIBS="-lodbc  $LIBS"
22157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22158/* end confdefs.h.  */
22159
22160/* Override any GCC internal prototype to avoid an error.
22161   Use char because int might match the return type of a GCC
22162   builtin and then its argument prototype would still apply.  */
22163#ifdef __cplusplus
22164extern "C"
22165#endif
22166char SQLAllocHandle ();
22167int
22168main ()
22169{
22170return SQLAllocHandle ();
22171  ;
22172  return 0;
22173}
22174_ACEOF
22175if ac_fn_c_try_link "$LINENO"; then :
22176  ac_cv_lib_odbc_SQLAllocHandle=yes
22177else
22178  ac_cv_lib_odbc_SQLAllocHandle=no
22179fi
22180rm -f core conftest.err conftest.$ac_objext \
22181    conftest$ac_exeext conftest.$ac_ext
22182LIBS=$ac_check_lib_save_LIBS
22183fi
22184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22185$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22186if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22187  apu_have_odbc=1
22188fi
22189
22190fi
22191
22192done
22193
22194      fi
22195      if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22196
22197  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22198    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22199    APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22200  else
22201    apr_addto_bugger="$odbc_CPPFLAGS"
22202    for i in $apr_addto_bugger; do
22203      apr_addto_duplicate="0"
22204      for j in $APRUTIL_PRIV_INCLUDES; do
22205        if test "x$i" = "x$j"; then
22206          apr_addto_duplicate="1"
22207          break
22208        fi
22209      done
22210      if test $apr_addto_duplicate = "0"; then
22211        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22212        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22213      fi
22214    done
22215  fi
22216
22217      fi
22218    elif test "$withval" = "no"; then
22219      :
22220    else
22221      # Extract the first word of "odbc_config", so it can be a program name with args.
22222set dummy odbc_config; ac_word=$2
22223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22224$as_echo_n "checking for $ac_word... " >&6; }
22225if ${ac_cv_path_ODBC_CONFIG+:} false; then :
22226  $as_echo_n "(cached) " >&6
22227else
22228  case $ODBC_CONFIG in
22229  [\\/]* | ?:[\\/]*)
22230  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
22231  ;;
22232  *)
22233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22234for as_dir in $withval/bin
22235do
22236  IFS=$as_save_IFS
22237  test -z "$as_dir" && as_dir=.
22238    for ac_exec_ext in '' $ac_executable_extensions; do
22239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22240    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22242    break 2
22243  fi
22244done
22245  done
22246IFS=$as_save_IFS
22247
22248  ;;
22249esac
22250fi
22251ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22252if test -n "$ODBC_CONFIG"; then
22253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22254$as_echo "$ODBC_CONFIG" >&6; }
22255else
22256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22257$as_echo "no" >&6; }
22258fi
22259
22260
22261      if test "x$ODBC_CONFIG" != 'x'; then
22262        odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22263        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22264        odbc_LIBS="`$ODBC_CONFIG --libs`"
22265      else
22266        if test -f "$withval" && test -x "$withval"; then
22267          odbc_CPPFLAGS="-I`$withval --include-prefix`"
22268          odbc_LDFLAGS="-L`$withval --lib-prefix`"
22269          odbc_LIBS="`$withval --libs`"
22270        else
22271          odbc_CPPFLAGS="-I$withval/include"
22272          odbc_LDFLAGS="-L$withval/lib "
22273        fi
22274      fi
22275
22276
22277  if test "x$CPPFLAGS" = "x"; then
22278    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22279    CPPFLAGS="$odbc_CPPFLAGS"
22280  else
22281    apr_addto_bugger="$odbc_CPPFLAGS"
22282    for i in $apr_addto_bugger; do
22283      apr_addto_duplicate="0"
22284      for j in $CPPFLAGS; do
22285        if test "x$i" = "x$j"; then
22286          apr_addto_duplicate="1"
22287          break
22288        fi
22289      done
22290      if test $apr_addto_duplicate = "0"; then
22291        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22292        CPPFLAGS="$CPPFLAGS $i"
22293      fi
22294    done
22295  fi
22296
22297
22298  if test "x$LDFLAGS" = "x"; then
22299    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22300    LDFLAGS="$odbc_LDFLAGS"
22301  else
22302    apr_addto_bugger="$odbc_LDFLAGS"
22303    for i in $apr_addto_bugger; do
22304      apr_addto_duplicate="0"
22305      for j in $LDFLAGS; do
22306        if test "x$i" = "x$j"; then
22307          apr_addto_duplicate="1"
22308          break
22309        fi
22310      done
22311      if test $apr_addto_duplicate = "0"; then
22312        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22313        LDFLAGS="$LDFLAGS $i"
22314      fi
22315    done
22316  fi
22317
22318
22319  if test "x$LIBS" = "x"; then
22320    test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22321    LIBS="$odbc_LIBS"
22322  else
22323    apr_addto_bugger="$odbc_LIBS"
22324    for i in $apr_addto_bugger; do
22325      apr_addto_duplicate="0"
22326      for j in $LIBS; do
22327        if test "x$i" = "x$j"; then
22328          apr_addto_duplicate="1"
22329          break
22330        fi
22331      done
22332      if test $apr_addto_duplicate = "0"; then
22333        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22334        LIBS="$LIBS $i"
22335      fi
22336    done
22337  fi
22338
22339
22340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for odbc in $withval" >&5
22341$as_echo "$as_me: checking for odbc in $withval" >&6;}
22342      for ac_header in sql.h
22343do :
22344  ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22345if test "x$ac_cv_header_sql_h" = xyes; then :
22346  cat >>confdefs.h <<_ACEOF
22347#define HAVE_SQL_H 1
22348_ACEOF
22349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22350$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22351if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22352  $as_echo_n "(cached) " >&6
22353else
22354  ac_check_lib_save_LIBS=$LIBS
22355LIBS="-lodbc  $LIBS"
22356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22357/* end confdefs.h.  */
22358
22359/* Override any GCC internal prototype to avoid an error.
22360   Use char because int might match the return type of a GCC
22361   builtin and then its argument prototype would still apply.  */
22362#ifdef __cplusplus
22363extern "C"
22364#endif
22365char SQLAllocHandle ();
22366int
22367main ()
22368{
22369return SQLAllocHandle ();
22370  ;
22371  return 0;
22372}
22373_ACEOF
22374if ac_fn_c_try_link "$LINENO"; then :
22375  ac_cv_lib_odbc_SQLAllocHandle=yes
22376else
22377  ac_cv_lib_odbc_SQLAllocHandle=no
22378fi
22379rm -f core conftest.err conftest.$ac_objext \
22380    conftest$ac_exeext conftest.$ac_ext
22381LIBS=$ac_check_lib_save_LIBS
22382fi
22383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22384$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22385if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22386  apu_have_odbc=1
22387fi
22388
22389fi
22390
22391done
22392
22393      if test "$apu_have_odbc" = "0"; then
22394        for ac_header in odbc/sql.h
22395do :
22396  ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22397if test "x$ac_cv_header_odbc_sql_h" = xyes; then :
22398  cat >>confdefs.h <<_ACEOF
22399#define HAVE_ODBC_SQL_H 1
22400_ACEOF
22401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22402$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22403if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22404  $as_echo_n "(cached) " >&6
22405else
22406  ac_check_lib_save_LIBS=$LIBS
22407LIBS="-lodbc  $LIBS"
22408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22409/* end confdefs.h.  */
22410
22411/* Override any GCC internal prototype to avoid an error.
22412   Use char because int might match the return type of a GCC
22413   builtin and then its argument prototype would still apply.  */
22414#ifdef __cplusplus
22415extern "C"
22416#endif
22417char SQLAllocHandle ();
22418int
22419main ()
22420{
22421return SQLAllocHandle ();
22422  ;
22423  return 0;
22424}
22425_ACEOF
22426if ac_fn_c_try_link "$LINENO"; then :
22427  ac_cv_lib_odbc_SQLAllocHandle=yes
22428else
22429  ac_cv_lib_odbc_SQLAllocHandle=no
22430fi
22431rm -f core conftest.err conftest.$ac_objext \
22432    conftest$ac_exeext conftest.$ac_ext
22433LIBS=$ac_check_lib_save_LIBS
22434fi
22435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22436$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22437if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22438  apu_have_odbc=1
22439fi
22440
22441fi
22442
22443done
22444
22445      fi
22446      if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22447
22448  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22449    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22450    APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22451  else
22452    apr_addto_bugger="$odbc_CPPFLAGS"
22453    for i in $apr_addto_bugger; do
22454      apr_addto_duplicate="0"
22455      for j in $APRUTIL_PRIV_INCLUDES; do
22456        if test "x$i" = "x$j"; then
22457          apr_addto_duplicate="1"
22458          break
22459        fi
22460      done
22461      if test $apr_addto_duplicate = "0"; then
22462        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22463        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22464      fi
22465    done
22466  fi
22467
22468      fi
22469    fi
22470
22471else
22472
22473    # Extract the first word of "odbc_config", so it can be a program name with args.
22474set dummy odbc_config; ac_word=$2
22475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22476$as_echo_n "checking for $ac_word... " >&6; }
22477if ${ac_cv_path_ODBC_CONFIG+:} false; then :
22478  $as_echo_n "(cached) " >&6
22479else
22480  case $ODBC_CONFIG in
22481  [\\/]* | ?:[\\/]*)
22482  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
22483  ;;
22484  *)
22485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486for as_dir in $PATH
22487do
22488  IFS=$as_save_IFS
22489  test -z "$as_dir" && as_dir=.
22490    for ac_exec_ext in '' $ac_executable_extensions; do
22491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22492    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22494    break 2
22495  fi
22496done
22497  done
22498IFS=$as_save_IFS
22499
22500  ;;
22501esac
22502fi
22503ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22504if test -n "$ODBC_CONFIG"; then
22505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22506$as_echo "$ODBC_CONFIG" >&6; }
22507else
22508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22509$as_echo "no" >&6; }
22510fi
22511
22512
22513    if test "x$ODBC_CONFIG" != 'x'; then
22514      odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22515      odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22516      odbc_LIBS="`$ODBC_CONFIG --libs`"
22517
22518
22519  if test "x$CPPFLAGS" = "x"; then
22520    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22521    CPPFLAGS="$odbc_CPPFLAGS"
22522  else
22523    apr_addto_bugger="$odbc_CPPFLAGS"
22524    for i in $apr_addto_bugger; do
22525      apr_addto_duplicate="0"
22526      for j in $CPPFLAGS; do
22527        if test "x$i" = "x$j"; then
22528          apr_addto_duplicate="1"
22529          break
22530        fi
22531      done
22532      if test $apr_addto_duplicate = "0"; then
22533        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22534        CPPFLAGS="$CPPFLAGS $i"
22535      fi
22536    done
22537  fi
22538
22539
22540  if test "x$LDFLAGS" = "x"; then
22541    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22542    LDFLAGS="$odbc_LDFLAGS"
22543  else
22544    apr_addto_bugger="$odbc_LDFLAGS"
22545    for i in $apr_addto_bugger; do
22546      apr_addto_duplicate="0"
22547      for j in $LDFLAGS; do
22548        if test "x$i" = "x$j"; then
22549          apr_addto_duplicate="1"
22550          break
22551        fi
22552      done
22553      if test $apr_addto_duplicate = "0"; then
22554        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22555        LDFLAGS="$LDFLAGS $i"
22556      fi
22557    done
22558  fi
22559
22560
22561  if test "x$LIBS" = "x"; then
22562    test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22563    LIBS="$odbc_LIBS"
22564  else
22565    apr_addto_bugger="$odbc_LIBS"
22566    for i in $apr_addto_bugger; do
22567      apr_addto_duplicate="0"
22568      for j in $LIBS; do
22569        if test "x$i" = "x$j"; then
22570          apr_addto_duplicate="1"
22571          break
22572        fi
22573      done
22574      if test $apr_addto_duplicate = "0"; then
22575        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22576        LIBS="$LIBS $i"
22577      fi
22578    done
22579  fi
22580
22581    fi
22582
22583    for ac_header in sql.h
22584do :
22585  ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22586if test "x$ac_cv_header_sql_h" = xyes; then :
22587  cat >>confdefs.h <<_ACEOF
22588#define HAVE_SQL_H 1
22589_ACEOF
22590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22591$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22592if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  ac_check_lib_save_LIBS=$LIBS
22596LIBS="-lodbc  $LIBS"
22597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22598/* end confdefs.h.  */
22599
22600/* Override any GCC internal prototype to avoid an error.
22601   Use char because int might match the return type of a GCC
22602   builtin and then its argument prototype would still apply.  */
22603#ifdef __cplusplus
22604extern "C"
22605#endif
22606char SQLAllocHandle ();
22607int
22608main ()
22609{
22610return SQLAllocHandle ();
22611  ;
22612  return 0;
22613}
22614_ACEOF
22615if ac_fn_c_try_link "$LINENO"; then :
22616  ac_cv_lib_odbc_SQLAllocHandle=yes
22617else
22618  ac_cv_lib_odbc_SQLAllocHandle=no
22619fi
22620rm -f core conftest.err conftest.$ac_objext \
22621    conftest$ac_exeext conftest.$ac_ext
22622LIBS=$ac_check_lib_save_LIBS
22623fi
22624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22625$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22626if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22627  apu_have_odbc=1
22628fi
22629
22630fi
22631
22632done
22633
22634    if test "$apu_have_odbc" = "0"; then
22635      for ac_header in odbc/sql.h
22636do :
22637  ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22638if test "x$ac_cv_header_odbc_sql_h" = xyes; then :
22639  cat >>confdefs.h <<_ACEOF
22640#define HAVE_ODBC_SQL_H 1
22641_ACEOF
22642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22643$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22644if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
22645  $as_echo_n "(cached) " >&6
22646else
22647  ac_check_lib_save_LIBS=$LIBS
22648LIBS="-lodbc  $LIBS"
22649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22650/* end confdefs.h.  */
22651
22652/* Override any GCC internal prototype to avoid an error.
22653   Use char because int might match the return type of a GCC
22654   builtin and then its argument prototype would still apply.  */
22655#ifdef __cplusplus
22656extern "C"
22657#endif
22658char SQLAllocHandle ();
22659int
22660main ()
22661{
22662return SQLAllocHandle ();
22663  ;
22664  return 0;
22665}
22666_ACEOF
22667if ac_fn_c_try_link "$LINENO"; then :
22668  ac_cv_lib_odbc_SQLAllocHandle=yes
22669else
22670  ac_cv_lib_odbc_SQLAllocHandle=no
22671fi
22672rm -f core conftest.err conftest.$ac_objext \
22673    conftest$ac_exeext conftest.$ac_ext
22674LIBS=$ac_check_lib_save_LIBS
22675fi
22676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22677$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22678if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
22679  apu_have_odbc=1
22680fi
22681
22682fi
22683
22684done
22685
22686    fi
22687    if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22688
22689  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22690    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22691    APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22692  else
22693    apr_addto_bugger="$odbc_CPPFLAGS"
22694    for i in $apr_addto_bugger; do
22695      apr_addto_duplicate="0"
22696      for j in $APRUTIL_PRIV_INCLUDES; do
22697        if test "x$i" = "x$j"; then
22698          apr_addto_duplicate="1"
22699          break
22700        fi
22701      done
22702      if test $apr_addto_duplicate = "0"; then
22703        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22704        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22705      fi
22706    done
22707  fi
22708
22709    fi
22710
22711fi
22712
22713
22714      if test "$apu_have_odbc" = "1"; then
22715
22716  if test "x$LDADD_dbd_odbc" = "x"; then
22717    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_odbc to \"$odbc_LDFLAGS -lodbc $odbc_LIBS\""
22718    LDADD_dbd_odbc="$odbc_LDFLAGS -lodbc $odbc_LIBS"
22719  else
22720    apr_addto_bugger="$odbc_LDFLAGS -lodbc $odbc_LIBS"
22721    for i in $apr_addto_bugger; do
22722      apr_addto_duplicate="0"
22723      for j in $LDADD_dbd_odbc; do
22724        if test "x$i" = "x$j"; then
22725          apr_addto_duplicate="1"
22726          break
22727        fi
22728      done
22729      if test $apr_addto_duplicate = "0"; then
22730        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_odbc"
22731        LDADD_dbd_odbc="$LDADD_dbd_odbc $i"
22732      fi
22733    done
22734  fi
22735
22736  fi
22737
22738
22739  LIBS="$old_libs"
22740  CPPFLAGS="$old_cppflags"
22741  LDFLAGS="$old_ldflags"
22742
22743  apu_dbd_tests=""
22744  test $apu_have_oracle = 1 &&  apu_dbd_tests="$apu_dbd_tests oracle"
22745  test $apu_have_pgsql = 1 &&   apu_dbd_tests="$apu_dbd_tests pgsql"
22746  test $apu_have_mysql = 1 &&   apu_dbd_tests="$apu_dbd_tests mysql"
22747  test $apu_have_sqlite2 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite2"
22748  test $apu_have_sqlite3 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite3"
22749  test $apu_have_freetds = 1 && apu_dbd_tests="$apu_dbd_tests freetds"
22750  test $apu_have_odbc = 1 &&    apu_dbd_tests="$apu_dbd_tests odbc"
22751
22752
22753
22754
22755save_cppflags="$CPPFLAGS"
22756save_ldflags="$LDFLAGS"
22757
22758apu_has_expat=0
22759
22760# Default: will use either external or bundled expat.
22761apu_try_external_expat=1
22762apu_try_builtin_expat=1
22763
22764
22765# Check whether --with-expat was given.
22766if test "${with_expat+set}" = set; then :
22767  withval=$with_expat;
22768  if test "$withval" = "yes"; then
22769    as_fn_error $? "a directory must be specified for --with-expat" "$LINENO" 5
22770  elif test "$withval" = "no"; then
22771    as_fn_error $? "Expat cannot be disabled (at this time)" "$LINENO" 5
22772  elif test "$withval" = "builtin"; then
22773    apu_try_external_expat=0
22774  else
22775    # Add given path to standard search paths if appropriate:
22776    if test "$withval" != "/usr"; then
22777
22778  if test "x$LDFLAGS" = "x"; then
22779    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$withval/lib\""
22780    LDFLAGS="-L$withval/lib"
22781  else
22782    apr_addto_bugger="-L$withval/lib"
22783    for i in $apr_addto_bugger; do
22784      apr_addto_duplicate="0"
22785      for j in $LDFLAGS; do
22786        if test "x$i" = "x$j"; then
22787          apr_addto_duplicate="1"
22788          break
22789        fi
22790      done
22791      if test $apr_addto_duplicate = "0"; then
22792        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22793        LDFLAGS="$LDFLAGS $i"
22794      fi
22795    done
22796  fi
22797
22798
22799  if test "x$CPPFLAGS" = "x"; then
22800    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$withval/include\""
22801    CPPFLAGS="-I$withval/include"
22802  else
22803    apr_addto_bugger="-I$withval/include"
22804    for i in $apr_addto_bugger; do
22805      apr_addto_duplicate="0"
22806      for j in $CPPFLAGS; do
22807        if test "x$i" = "x$j"; then
22808          apr_addto_duplicate="1"
22809          break
22810        fi
22811      done
22812      if test $apr_addto_duplicate = "0"; then
22813        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22814        CPPFLAGS="$CPPFLAGS $i"
22815      fi
22816    done
22817  fi
22818
22819
22820  if test "x$APRUTIL_INCLUDES" = "x"; then
22821    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
22822    APRUTIL_INCLUDES="-I$withval/include"
22823  else
22824    apr_addto_bugger="-I$withval/include"
22825    for i in $apr_addto_bugger; do
22826      apr_addto_duplicate="0"
22827      for j in $APRUTIL_INCLUDES; do
22828        if test "x$i" = "x$j"; then
22829          apr_addto_duplicate="1"
22830          break
22831        fi
22832      done
22833      if test $apr_addto_duplicate = "0"; then
22834        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
22835        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
22836      fi
22837    done
22838  fi
22839
22840
22841  if test "x$APRUTIL_LDFLAGS" = "x"; then
22842    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
22843    APRUTIL_LDFLAGS="-L$withval/lib"
22844  else
22845    apr_addto_bugger="-L$withval/lib"
22846    for i in $apr_addto_bugger; do
22847      apr_addto_duplicate="0"
22848      for j in $APRUTIL_LDFLAGS; do
22849        if test "x$i" = "x$j"; then
22850          apr_addto_duplicate="1"
22851          break
22852        fi
22853      done
22854      if test $apr_addto_duplicate = "0"; then
22855        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
22856        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
22857      fi
22858    done
22859  fi
22860
22861    fi
22862    # ...and refuse to fall back on the builtin expat.
22863    apu_try_builtin_expat=0
22864  fi
22865
22866fi
22867
22868
22869if test $apu_try_external_expat = 1; then
22870
22871
22872
22873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.95.x" >&5
22874$as_echo_n "checking Expat 1.95.x... " >&6; }
22875if ${apu_cv_expat_system+:} false; then :
22876  $as_echo_n "(cached) " >&6
22877else
22878
22879  apu_expat_LIBS=$LIBS
22880  LIBS="$LIBS -lexpat"
22881  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22882/* end confdefs.h.  */
22883#include <stdlib.h>
22884#include <expat.h>
22885int
22886main ()
22887{
22888XML_ParserCreate(NULL);
22889  ;
22890  return 0;
22891}
22892_ACEOF
22893if ac_fn_c_try_link "$LINENO"; then :
22894  apu_cv_expat_system=yes
22895else
22896  apu_cv_expat_system=no
22897fi
22898rm -f core conftest.err conftest.$ac_objext \
22899    conftest$ac_exeext conftest.$ac_ext
22900  LIBS=$apu_expat_LIBS
22901
22902fi
22903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_system" >&5
22904$as_echo "$apu_cv_expat_system" >&6; }
22905
22906if test $apu_cv_expat_system = yes; then
22907
22908$as_echo "#define HAVE_EXPAT_H 1" >>confdefs.h
22909
22910   apu_expat_libs="-lexpat"
22911   apu_has_expat=1
22912
22913else
22914   apu_has_expat=0
22915
22916fi
22917
22918
22919  if test $apu_has_expat = 0; then
22920
22921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking old Debian-packaged expat" >&5
22922$as_echo_n "checking old Debian-packaged expat... " >&6; }
22923if ${apu_cv_expat_debian+:} false; then :
22924  $as_echo_n "(cached) " >&6
22925else
22926
22927  apu_expat_LIBS=$LIBS
22928  LIBS="$LIBS -lxmlparse -lxmltok"
22929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22930/* end confdefs.h.  */
22931#include <stdlib.h>
22932#include <xmltok/xmlparse.h>
22933int
22934main ()
22935{
22936XML_ParserCreate(NULL);
22937  ;
22938  return 0;
22939}
22940_ACEOF
22941if ac_fn_c_try_link "$LINENO"; then :
22942  apu_cv_expat_debian=yes
22943else
22944  apu_cv_expat_debian=no
22945fi
22946rm -f core conftest.err conftest.$ac_objext \
22947    conftest$ac_exeext conftest.$ac_ext
22948  LIBS=$apu_expat_LIBS
22949
22950fi
22951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_debian" >&5
22952$as_echo "$apu_cv_expat_debian" >&6; }
22953
22954if test $apu_cv_expat_debian = yes; then
22955
22956$as_echo "#define HAVE_XMLTOK_XMLPARSE_H 1" >>confdefs.h
22957
22958   apu_expat_libs="-lxmlparse -lxmltok"
22959   apu_has_expat=1
22960
22961else
22962   apu_has_expat=0
22963
22964fi
22965
22966  fi
22967
22968  if test $apu_has_expat = 0; then
22969
22970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking old FreeBSD-packaged expat" >&5
22971$as_echo_n "checking old FreeBSD-packaged expat... " >&6; }
22972if ${apu_cv_expat_freebsd+:} false; then :
22973  $as_echo_n "(cached) " >&6
22974else
22975
22976  apu_expat_LIBS=$LIBS
22977  LIBS="$LIBS -lexpat"
22978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22979/* end confdefs.h.  */
22980#include <stdlib.h>
22981#include <xml/xmlparse.h>
22982int
22983main ()
22984{
22985XML_ParserCreate(NULL);
22986  ;
22987  return 0;
22988}
22989_ACEOF
22990if ac_fn_c_try_link "$LINENO"; then :
22991  apu_cv_expat_freebsd=yes
22992else
22993  apu_cv_expat_freebsd=no
22994fi
22995rm -f core conftest.err conftest.$ac_objext \
22996    conftest$ac_exeext conftest.$ac_ext
22997  LIBS=$apu_expat_LIBS
22998
22999fi
23000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_freebsd" >&5
23001$as_echo "$apu_cv_expat_freebsd" >&6; }
23002
23003if test $apu_cv_expat_freebsd = yes; then
23004
23005$as_echo "#define HAVE_XML_XMLPARSE_H 1" >>confdefs.h
23006
23007   apu_expat_libs="-lexpat"
23008   apu_has_expat=1
23009
23010else
23011   apu_has_expat=0
23012
23013fi
23014
23015  fi
23016
23017  if test $apu_has_expat = 0; then
23018
23019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.0/1.1" >&5
23020$as_echo_n "checking Expat 1.0/1.1... " >&6; }
23021if ${apu_cv_expat_1011+:} false; then :
23022  $as_echo_n "(cached) " >&6
23023else
23024
23025  apu_expat_LIBS=$LIBS
23026  LIBS="$LIBS -lexpat"
23027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23028/* end confdefs.h.  */
23029#include <stdlib.h>
23030#include <xmlparse/xmlparse.h>
23031int
23032main ()
23033{
23034XML_ParserCreate(NULL);
23035  ;
23036  return 0;
23037}
23038_ACEOF
23039if ac_fn_c_try_link "$LINENO"; then :
23040  apu_cv_expat_1011=yes
23041else
23042  apu_cv_expat_1011=no
23043fi
23044rm -f core conftest.err conftest.$ac_objext \
23045    conftest$ac_exeext conftest.$ac_ext
23046  LIBS=$apu_expat_LIBS
23047
23048fi
23049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_1011" >&5
23050$as_echo "$apu_cv_expat_1011" >&6; }
23051
23052if test $apu_cv_expat_1011 = yes; then
23053
23054$as_echo "#define HAVE_XMLPARSE_XMLPARSE_H 1" >>confdefs.h
23055
23056   apu_expat_libs="-lexpat"
23057   apu_has_expat=1
23058
23059else
23060   apu_has_expat=0
23061
23062fi
23063
23064  fi
23065
23066  if test $apu_has_expat = 0; then
23067
23068  if test "x$LDFLAGS" = "x"; then
23069    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L/usr/local/lib\""
23070    LDFLAGS="-L/usr/local/lib"
23071  else
23072    apr_addto_bugger="-L/usr/local/lib"
23073    for i in $apr_addto_bugger; do
23074      apr_addto_duplicate="0"
23075      for j in $LDFLAGS; do
23076        if test "x$i" = "x$j"; then
23077          apr_addto_duplicate="1"
23078          break
23079        fi
23080      done
23081      if test $apr_addto_duplicate = "0"; then
23082        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
23083        LDFLAGS="$LDFLAGS $i"
23084      fi
23085    done
23086  fi
23087
23088
23089  if test "x$CPPFLAGS" = "x"; then
23090    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I/usr/local/include\""
23091    CPPFLAGS="-I/usr/local/include"
23092  else
23093    apr_addto_bugger="-I/usr/local/include"
23094    for i in $apr_addto_bugger; do
23095      apr_addto_duplicate="0"
23096      for j in $CPPFLAGS; do
23097        if test "x$i" = "x$j"; then
23098          apr_addto_duplicate="1"
23099          break
23100        fi
23101      done
23102      if test $apr_addto_duplicate = "0"; then
23103        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
23104        CPPFLAGS="$CPPFLAGS $i"
23105      fi
23106    done
23107  fi
23108
23109
23110
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.95.x in /usr/local" >&5
23112$as_echo_n "checking Expat 1.95.x in /usr/local... " >&6; }
23113if ${apu_cv_expat_usrlocal+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116
23117  apu_expat_LIBS=$LIBS
23118  LIBS="$LIBS -lexpat"
23119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23120/* end confdefs.h.  */
23121#include <stdlib.h>
23122#include <expat.h>
23123int
23124main ()
23125{
23126XML_ParserCreate(NULL);
23127  ;
23128  return 0;
23129}
23130_ACEOF
23131if ac_fn_c_try_link "$LINENO"; then :
23132  apu_cv_expat_usrlocal=yes
23133else
23134  apu_cv_expat_usrlocal=no
23135fi
23136rm -f core conftest.err conftest.$ac_objext \
23137    conftest$ac_exeext conftest.$ac_ext
23138  LIBS=$apu_expat_LIBS
23139
23140fi
23141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_usrlocal" >&5
23142$as_echo "$apu_cv_expat_usrlocal" >&6; }
23143
23144if test $apu_cv_expat_usrlocal = yes; then
23145
23146$as_echo "#define HAVE_EXPAT_H 1" >>confdefs.h
23147
23148   apu_expat_libs="-lexpat"
23149   apu_has_expat=1
23150
23151  if test "x$APRUTIL_INCLUDES" = "x"; then
23152    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I/usr/local/include\""
23153    APRUTIL_INCLUDES="-I/usr/local/include"
23154  else
23155    apr_addto_bugger="-I/usr/local/include"
23156    for i in $apr_addto_bugger; do
23157      apr_addto_duplicate="0"
23158      for j in $APRUTIL_INCLUDES; do
23159        if test "x$i" = "x$j"; then
23160          apr_addto_duplicate="1"
23161          break
23162        fi
23163      done
23164      if test $apr_addto_duplicate = "0"; then
23165        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23166        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23167      fi
23168    done
23169  fi
23170
23171
23172  if test "x$APRUTIL_LDFLAGS" = "x"; then
23173    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L/usr/local/lib\""
23174    APRUTIL_LDFLAGS="-L/usr/local/lib"
23175  else
23176    apr_addto_bugger="-L/usr/local/lib"
23177    for i in $apr_addto_bugger; do
23178      apr_addto_duplicate="0"
23179      for j in $APRUTIL_LDFLAGS; do
23180        if test "x$i" = "x$j"; then
23181          apr_addto_duplicate="1"
23182          break
23183        fi
23184      done
23185      if test $apr_addto_duplicate = "0"; then
23186        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
23187        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23188      fi
23189    done
23190  fi
23191
23192else
23193   apu_has_expat=0
23194
23195
23196  if test "x$LDFLAGS" = "x-L/usr/local/lib"; then
23197    test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
23198    LDFLAGS=""
23199  else
23200    apr_new_bugger=""
23201    apr_removed=0
23202    for i in $LDFLAGS; do
23203      if test "x$i" != "x-L/usr/local/lib"; then
23204        apr_new_bugger="$apr_new_bugger $i"
23205      else
23206        apr_removed=1
23207      fi
23208    done
23209    if test $apr_removed = "1"; then
23210      test "x$silent" != "xyes" && echo "  removed \"-L/usr/local/lib\" from LDFLAGS"
23211      LDFLAGS=$apr_new_bugger
23212    fi
23213  fi
23214
23215
23216  if test "x$CPPFLAGS" = "x-I/usr/local/include"; then
23217    test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
23218    CPPFLAGS=""
23219  else
23220    apr_new_bugger=""
23221    apr_removed=0
23222    for i in $CPPFLAGS; do
23223      if test "x$i" != "x-I/usr/local/include"; then
23224        apr_new_bugger="$apr_new_bugger $i"
23225      else
23226        apr_removed=1
23227      fi
23228    done
23229    if test $apr_removed = "1"; then
23230      test "x$silent" != "xyes" && echo "  removed \"-I/usr/local/include\" from CPPFLAGS"
23231      CPPFLAGS=$apr_new_bugger
23232    fi
23233  fi
23234
23235
23236fi
23237
23238  fi
23239
23240fi
23241
23242if test "${apu_has_expat}${apu_try_builtin_expat}" = "01"; then
23243      bundled_subdir="xml/expat"
23244
23245  # save our work to this point; this allows the sub-package to use it
23246  cat >confcache <<\_ACEOF
23247# This file is a shell script that caches the results of configure
23248# tests run on this system so they can be shared between configure
23249# scripts and configure runs, see configure's option --config-cache.
23250# It is not useful on other systems.  If it contains results you don't
23251# want to keep, you may remove or edit it.
23252#
23253# config.status only pays attention to the cache file if you give it
23254# the --recheck option to rerun configure.
23255#
23256# `ac_cv_env_foo' variables (set or unset) will be overridden when
23257# loading this file, other *unset* `ac_cv_foo' will be assigned the
23258# following values.
23259
23260_ACEOF
23261
23262# The following way of writing the cache mishandles newlines in values,
23263# but we know of no workaround that is simple, portable, and efficient.
23264# So, we kill variables containing newlines.
23265# Ultrix sh set writes to stderr and can't be redirected directly,
23266# and sets the high bit in the cache file unless we assign to the vars.
23267(
23268  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23269    eval ac_val=\$$ac_var
23270    case $ac_val in #(
23271    *${as_nl}*)
23272      case $ac_var in #(
23273      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
23274$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
23275      esac
23276      case $ac_var in #(
23277      _ | IFS | as_nl) ;; #(
23278      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
23279      *) { eval $ac_var=; unset $ac_var;} ;;
23280      esac ;;
23281    esac
23282  done
23283
23284  (set) 2>&1 |
23285    case $as_nl`(ac_space=' '; set) 2>&1` in #(
23286    *${as_nl}ac_space=\ *)
23287      # `set' does not quote correctly, so add quotes: double-quote
23288      # substitution turns \\\\ into \\, and sed turns \\ into \.
23289      sed -n \
23290	"s/'/'\\\\''/g;
23291	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23292      ;; #(
23293    *)
23294      # `set' quotes correctly as required by POSIX, so do not add quotes.
23295      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
23296      ;;
23297    esac |
23298    sort
23299) |
23300  sed '
23301     /^ac_cv_env_/b end
23302     t clear
23303     :clear
23304     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23305     t end
23306     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23307     :end' >>confcache
23308if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23309  if test -w "$cache_file"; then
23310    if test "x$cache_file" != "x/dev/null"; then
23311      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
23312$as_echo "$as_me: updating cache $cache_file" >&6;}
23313      if test ! -f "$cache_file" || test -h "$cache_file"; then
23314	cat confcache >"$cache_file"
23315      else
23316        case $cache_file in #(
23317        */* | ?:*)
23318	  mv -f confcache "$cache_file"$$ &&
23319	  mv -f "$cache_file"$$ "$cache_file" ;; #(
23320        *)
23321	  mv -f confcache "$cache_file" ;;
23322	esac
23323      fi
23324    fi
23325  else
23326    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
23327$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
23328  fi
23329fi
23330rm -f confcache
23331
23332  echo "configuring package in $bundled_subdir now"
23333  ac_popdir=`pwd`
23334  apr_config_subdirs="$bundled_subdir"
23335  test -d $bundled_subdir || $mkdir_p $bundled_subdir
23336  ac_abs_srcdir=`(cd $srcdir/$bundled_subdir && pwd)`
23337  cd $bundled_subdir
23338
23339      # A "../" for each directory in /$config_subdirs.
23340      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
23341
23342  # Make the cache file pathname absolute for the subdirs
23343  # required to correctly handle subdirs that might actually
23344  # be symlinks
23345  case "$cache_file" in
23346  /*) # already absolute
23347    ac_sub_cache_file=$cache_file ;;
23348  *)  # Was relative path.
23349    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
23350  esac
23351
23352  apr_configure_args=$ac_configure_args
23353
23354    test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
23355
23356    apr_configure_args="--disable-option-checking $apr_configure_args"
23357
23358              if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir
23359  then :
23360    echo "$bundled_subdir configured properly"
23361  else
23362    echo "configure failed for $bundled_subdir"
23363    exit 1
23364  fi
23365
23366  cd $ac_popdir
23367
23368  # grab any updates from the sub-package
23369  if test -r "$cache_file"; then
23370  # Some versions of bash will fail to source /dev/null (special files
23371  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
23372  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
23373    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
23374$as_echo "$as_me: loading cache $cache_file" >&6;}
23375    case $cache_file in
23376      [\\/]* | ?:[\\/]* ) . "$cache_file";;
23377      *)                      . "./$cache_file";;
23378    esac
23379  fi
23380else
23381  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
23382$as_echo "$as_me: creating cache $cache_file" >&6;}
23383  >$cache_file
23384fi
23385
23386
23387
23388  if test "x$APRUTIL_INCLUDES" = "x"; then
23389    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$abs_srcdir/$bundled_subdir/lib\""
23390    APRUTIL_INCLUDES="-I$abs_srcdir/$bundled_subdir/lib"
23391  else
23392    apr_addto_bugger="-I$abs_srcdir/$bundled_subdir/lib"
23393    for i in $apr_addto_bugger; do
23394      apr_addto_duplicate="0"
23395      for j in $APRUTIL_INCLUDES; do
23396        if test "x$i" = "x$j"; then
23397          apr_addto_duplicate="1"
23398          break
23399        fi
23400      done
23401      if test $apr_addto_duplicate = "0"; then
23402        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23403        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23404      fi
23405    done
23406  fi
23407
23408
23409  if test "x$LDFLAGS" = "x"; then
23410    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$top_builddir/$bundled_subdir/lib\""
23411    LDFLAGS="-L$top_builddir/$bundled_subdir/lib"
23412  else
23413    apr_addto_bugger="-L$top_builddir/$bundled_subdir/lib"
23414    for i in $apr_addto_bugger; do
23415      apr_addto_duplicate="0"
23416      for j in $LDFLAGS; do
23417        if test "x$i" = "x$j"; then
23418          apr_addto_duplicate="1"
23419          break
23420        fi
23421      done
23422      if test $apr_addto_duplicate = "0"; then
23423        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
23424        LDFLAGS="$LDFLAGS $i"
23425      fi
23426    done
23427  fi
23428
23429  apu_expat_libs="$top_builddir/$bundled_subdir/libexpat.la"
23430fi
23431
23432
23433  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
23434    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$apu_expat_libs\""
23435    APRUTIL_EXPORT_LIBS="$apu_expat_libs"
23436  else
23437    apr_addto_bugger="$apu_expat_libs"
23438    for i in $apr_addto_bugger; do
23439      apr_addto_duplicate="0"
23440      for j in $APRUTIL_EXPORT_LIBS; do
23441        if test "x$i" = "x$j"; then
23442          apr_addto_duplicate="1"
23443          break
23444        fi
23445      done
23446      if test $apr_addto_duplicate = "0"; then
23447        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
23448        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
23449      fi
23450    done
23451  fi
23452
23453
23454  if test "x$APRUTIL_LIBS" = "x"; then
23455    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_expat_libs\""
23456    APRUTIL_LIBS="$apu_expat_libs"
23457  else
23458    apr_addto_bugger="$apu_expat_libs"
23459    for i in $apr_addto_bugger; do
23460      apr_addto_duplicate="0"
23461      for j in $APRUTIL_LIBS; do
23462        if test "x$i" = "x$j"; then
23463          apr_addto_duplicate="1"
23464          break
23465        fi
23466      done
23467      if test $apr_addto_duplicate = "0"; then
23468        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23469        APRUTIL_LIBS="$APRUTIL_LIBS $i"
23470      fi
23471    done
23472  fi
23473
23474
23475APR_XML_DIR=$bundled_subdir
23476
23477
23478CPPFLAGS=$save_cppflags
23479LDFLAGS=$save_ldflags
23480
23481
23482
23483apu_iconv_dir="unknown"
23484have_apr_iconv="0"
23485want_iconv="1"
23486
23487# Check whether --with-iconv was given.
23488if test "${with_iconv+set}" = set; then :
23489  withval=$with_iconv;  apu_iconv_dir="$withval"
23490    if test "$apu_iconv_dir" = "no"; then
23491      have_apr_iconv="0"
23492      have_iconv="0"
23493      want_iconv="0"
23494    elif test "$apu_iconv_dir" != "yes"; then
23495      if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
23496        have_apr_iconv="1"
23497        have_iconv="0"
23498
23499  if test "x$APRUTIL_INCLUDES" = "x"; then
23500    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include/apr-1\""
23501    APRUTIL_INCLUDES="-I$apu_iconv_dir/include/apr-1"
23502  else
23503    apr_addto_bugger="-I$apu_iconv_dir/include/apr-1"
23504    for i in $apr_addto_bugger; do
23505      apr_addto_duplicate="0"
23506      for j in $APRUTIL_INCLUDES; do
23507        if test "x$i" = "x$j"; then
23508          apr_addto_duplicate="1"
23509          break
23510        fi
23511      done
23512      if test $apr_addto_duplicate = "0"; then
23513        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23514        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23515      fi
23516    done
23517  fi
23518
23519
23520  if test "x$APRUTIL_LIBS" = "x"; then
23521    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_iconv_dir/lib/libapriconv-1.la\""
23522    APRUTIL_LIBS="$apu_iconv_dir/lib/libapriconv-1.la"
23523  else
23524    apr_addto_bugger="$apu_iconv_dir/lib/libapriconv-1.la"
23525    for i in $apr_addto_bugger; do
23526      apr_addto_duplicate="0"
23527      for j in $APRUTIL_LIBS; do
23528        if test "x$i" = "x$j"; then
23529          apr_addto_duplicate="1"
23530          break
23531        fi
23532      done
23533      if test $apr_addto_duplicate = "0"; then
23534        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23535        APRUTIL_LIBS="$APRUTIL_LIBS $i"
23536      fi
23537    done
23538  fi
23539
23540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using apr-iconv" >&5
23541$as_echo "using apr-iconv" >&6; }
23542      elif test -f "$apu_iconv_dir/include/iconv.h"; then
23543        have_apr_iconv="0"
23544        have_iconv="1"
23545
23546  if test "x$CPPFLAGS" = "x"; then
23547    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$apu_iconv_dir/include\""
23548    CPPFLAGS="-I$apu_iconv_dir/include"
23549  else
23550    apr_addto_bugger="-I$apu_iconv_dir/include"
23551    for i in $apr_addto_bugger; do
23552      apr_addto_duplicate="0"
23553      for j in $CPPFLAGS; do
23554        if test "x$i" = "x$j"; then
23555          apr_addto_duplicate="1"
23556          break
23557        fi
23558      done
23559      if test $apr_addto_duplicate = "0"; then
23560        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
23561        CPPFLAGS="$CPPFLAGS $i"
23562      fi
23563    done
23564  fi
23565
23566
23567  if test "x$LDFLAGS" = "x"; then
23568    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$apu_iconv_dir/lib\""
23569    LDFLAGS="-L$apu_iconv_dir/lib"
23570  else
23571    apr_addto_bugger="-L$apu_iconv_dir/lib"
23572    for i in $apr_addto_bugger; do
23573      apr_addto_duplicate="0"
23574      for j in $LDFLAGS; do
23575        if test "x$i" = "x$j"; then
23576          apr_addto_duplicate="1"
23577          break
23578        fi
23579      done
23580      if test $apr_addto_duplicate = "0"; then
23581        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
23582        LDFLAGS="$LDFLAGS $i"
23583      fi
23584    done
23585  fi
23586
23587      fi
23588    fi
23589
23590fi
23591
23592
23593if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
23594  ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
23595if test "x$ac_cv_header_iconv_h" = xyes; then :
23596
23597
23598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23599/* end confdefs.h.  */
23600
23601#include <stdlib.h>
23602#include <iconv.h>
23603
23604int
23605main ()
23606{
23607
23608  iconv_t cd = iconv_open("", "");
23609  iconv(cd, NULL, NULL, NULL, NULL);
23610
23611  ;
23612  return 0;
23613}
23614_ACEOF
23615if ac_fn_c_try_link "$LINENO"; then :
23616   have_iconv="1"
23617else
23618
23619
23620
23621  if test "x$LIBS" = "x"; then
23622    test "x$silent" != "xyes" && echo "  setting LIBS to \"-liconv\""
23623    LIBS="-liconv"
23624  else
23625    apr_addto_bugger="-liconv"
23626    for i in $apr_addto_bugger; do
23627      apr_addto_duplicate="0"
23628      for j in $LIBS; do
23629        if test "x$i" = "x$j"; then
23630          apr_addto_duplicate="1"
23631          break
23632        fi
23633      done
23634      if test $apr_addto_duplicate = "0"; then
23635        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
23636        LIBS="$LIBS $i"
23637      fi
23638    done
23639  fi
23640
23641
23642
23643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23644/* end confdefs.h.  */
23645
23646#include <stdlib.h>
23647#include <iconv.h>
23648
23649int
23650main ()
23651{
23652
23653  iconv_t cd = iconv_open("", "");
23654  iconv(cd, NULL, NULL, NULL, NULL);
23655
23656  ;
23657  return 0;
23658}
23659_ACEOF
23660if ac_fn_c_try_link "$LINENO"; then :
23661
23662
23663  if test "x$APRUTIL_LIBS" = "x"; then
23664    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-liconv\""
23665    APRUTIL_LIBS="-liconv"
23666  else
23667    apr_addto_bugger="-liconv"
23668    for i in $apr_addto_bugger; do
23669      apr_addto_duplicate="0"
23670      for j in $APRUTIL_LIBS; do
23671        if test "x$i" = "x$j"; then
23672          apr_addto_duplicate="1"
23673          break
23674        fi
23675      done
23676      if test $apr_addto_duplicate = "0"; then
23677        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23678        APRUTIL_LIBS="$APRUTIL_LIBS $i"
23679      fi
23680    done
23681  fi
23682
23683
23684  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
23685    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-liconv\""
23686    APRUTIL_EXPORT_LIBS="-liconv"
23687  else
23688    apr_addto_bugger="-liconv"
23689    for i in $apr_addto_bugger; do
23690      apr_addto_duplicate="0"
23691      for j in $APRUTIL_EXPORT_LIBS; do
23692        if test "x$i" = "x$j"; then
23693          apr_addto_duplicate="1"
23694          break
23695        fi
23696      done
23697      if test $apr_addto_duplicate = "0"; then
23698        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
23699        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
23700      fi
23701    done
23702  fi
23703
23704      have_iconv="1"
23705else
23706   have_iconv="0"
23707fi
23708rm -f core conftest.err conftest.$ac_objext \
23709    conftest$ac_exeext conftest.$ac_ext
23710
23711
23712
23713  if test "x$LIBS" = "x-liconv"; then
23714    test "x$silent" != "xyes" && echo "  nulling LIBS"
23715    LIBS=""
23716  else
23717    apr_new_bugger=""
23718    apr_removed=0
23719    for i in $LIBS; do
23720      if test "x$i" != "x-liconv"; then
23721        apr_new_bugger="$apr_new_bugger $i"
23722      else
23723        apr_removed=1
23724      fi
23725    done
23726    if test $apr_removed = "1"; then
23727      test "x$silent" != "xyes" && echo "  removed \"-liconv\" from LIBS"
23728      LIBS=$apr_new_bugger
23729    fi
23730  fi
23731
23732
23733
23734fi
23735rm -f core conftest.err conftest.$ac_objext \
23736    conftest$ac_exeext conftest.$ac_ext
23737
23738
23739else
23740   have_iconv="0"
23741fi
23742
23743
23744fi
23745
23746if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
23747  if test "$have_iconv" != "1"; then
23748    if test "$have_apr_iconv" != "1"; then
23749      as_fn_error $? "iconv support requested, but not found" "$LINENO" 5
23750    fi
23751  fi
23752
23753  if test "x$CPPFLAGS" = "x-I$apu_iconv_dir/include"; then
23754    test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
23755    CPPFLAGS=""
23756  else
23757    apr_new_bugger=""
23758    apr_removed=0
23759    for i in $CPPFLAGS; do
23760      if test "x$i" != "x-I$apu_iconv_dir/include"; then
23761        apr_new_bugger="$apr_new_bugger $i"
23762      else
23763        apr_removed=1
23764      fi
23765    done
23766    if test $apr_removed = "1"; then
23767      test "x$silent" != "xyes" && echo "  removed \"-I$apu_iconv_dir/include\" from CPPFLAGS"
23768      CPPFLAGS=$apr_new_bugger
23769    fi
23770  fi
23771
23772
23773  if test "x$LDFLAGS" = "x-L$apu_iconv_dir/lib"; then
23774    test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
23775    LDFLAGS=""
23776  else
23777    apr_new_bugger=""
23778    apr_removed=0
23779    for i in $LDFLAGS; do
23780      if test "x$i" != "x-L$apu_iconv_dir/lib"; then
23781        apr_new_bugger="$apr_new_bugger $i"
23782      else
23783        apr_removed=1
23784      fi
23785    done
23786    if test $apr_removed = "1"; then
23787      test "x$silent" != "xyes" && echo "  removed \"-L$apu_iconv_dir/lib\" from LDFLAGS"
23788      LDFLAGS=$apr_new_bugger
23789    fi
23790  fi
23791
23792
23793  if test "x$APRUTIL_INCLUDES" = "x"; then
23794    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include\""
23795    APRUTIL_INCLUDES="-I$apu_iconv_dir/include"
23796  else
23797    apr_addto_bugger="-I$apu_iconv_dir/include"
23798    for i in $apr_addto_bugger; do
23799      apr_addto_duplicate="0"
23800      for j in $APRUTIL_INCLUDES; do
23801        if test "x$i" = "x$j"; then
23802          apr_addto_duplicate="1"
23803          break
23804        fi
23805      done
23806      if test $apr_addto_duplicate = "0"; then
23807        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23808        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23809      fi
23810    done
23811  fi
23812
23813
23814  if test "x$APRUTIL_LDFLAGS" = "x"; then
23815    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$apu_iconv_dir/lib\""
23816    APRUTIL_LDFLAGS="-L$apu_iconv_dir/lib"
23817  else
23818    apr_addto_bugger="-L$apu_iconv_dir/lib"
23819    for i in $apr_addto_bugger; do
23820      apr_addto_duplicate="0"
23821      for j in $APRUTIL_LDFLAGS; do
23822        if test "x$i" = "x$j"; then
23823          apr_addto_duplicate="1"
23824          break
23825        fi
23826      done
23827      if test $apr_addto_duplicate = "0"; then
23828        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
23829        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23830      fi
23831    done
23832  fi
23833
23834fi
23835
23836if test "$have_iconv" = "1"; then
23837
23838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
23839$as_echo_n "checking for type of inbuf parameter to iconv... " >&6; }
23840if test "x$apu_iconv_inbuf_const" = "x"; then
23841    apr_save_CFLAGS=$CFLAGS
23842 CFLAGS="$CFLAGS $CFLAGS_WARN"
23843 if test "$ac_cv_c_compiler_gnu" = "yes"; then
23844   CFLAGS="$CFLAGS -Werror"
23845 fi
23846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23847/* end confdefs.h.  */
23848#include "confdefs.h"
23849
23850
23851    #include <stddef.h>
23852    #include <iconv.h>
23853
23854   int main(int argc, const char *const *argv) {
23855
23856    iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
23857
23858      return 0; }
23859
23860_ACEOF
23861if ac_fn_c_try_compile "$LINENO"; then :
23862  apu_iconv_inbuf_const="0"
23863else
23864  apu_iconv_inbuf_const="1"
23865fi
23866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23867 CFLAGS=$apr_save_CFLAGS
23868
23869fi
23870if test "$apu_iconv_inbuf_const" = "1"; then
23871
23872$as_echo "#define APU_ICONV_INBUF_CONST 1" >>confdefs.h
23873
23874    msg="const char **"
23875else
23876    msg="char **"
23877fi
23878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
23879$as_echo "$msg" >&6; }
23880
23881fi
23882
23883
23884for ac_header in iconv.h langinfo.h
23885do :
23886  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23887ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23888if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23889  cat >>confdefs.h <<_ACEOF
23890#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23891_ACEOF
23892
23893fi
23894
23895done
23896
23897for aprt_i in iconv.h langinfo.h
23898do
23899    ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
23900    aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
23901    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23902       eval "$aprt_2=1"
23903    else
23904       eval "$aprt_2=0"
23905    fi
23906done
23907
23908
23909for ac_func in nl_langinfo
23910do :
23911  ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
23912if test "x$ac_cv_func_nl_langinfo" = xyes; then :
23913  cat >>confdefs.h <<_ACEOF
23914#define HAVE_NL_LANGINFO 1
23915_ACEOF
23916
23917fi
23918done
23919
23920for aprt_j in nl_langinfo
23921do
23922    aprt_3="have_$aprt_j"
23923    if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
23924       eval "$aprt_3=1"
23925    else
23926       eval "$aprt_3=0"
23927    fi
23928done
23929
23930
23931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESET in langinfo.h" >&5
23932$as_echo_n "checking for CODESET in langinfo.h... " >&6; }
23933if ${ac_cv_define_CODESET+:} false; then :
23934  $as_echo_n "(cached) " >&6
23935else
23936
23937    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23938/* end confdefs.h.  */
23939
23940#include <langinfo.h>
23941#ifdef CODESET
23942YES_IS_DEFINED
23943#endif
23944
23945_ACEOF
23946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23947  $EGREP "YES_IS_DEFINED" >/dev/null 2>&1; then :
23948  ac_cv_define_CODESET=yes
23949else
23950  ac_cv_define_CODESET=no
23951fi
23952rm -f conftest*
23953
23954
23955fi
23956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_define_CODESET" >&5
23957$as_echo "$ac_cv_define_CODESET" >&6; }
23958  if test "$ac_cv_define_CODESET" = "yes"; then
23959
23960$as_echo "#define HAVE_CODESET 1" >>confdefs.h
23961
23962  fi
23963
23964
23965
23966
23967
23968
23969
23970
23971  # Check whether --enable-util-dso was given.
23972if test "${enable_util_dso+set}" = set; then :
23973  enableval=$enable_util_dso;
23974fi
23975
23976
23977  if test "$enable_util_dso" = "no"; then
23978     apu_dso_build="0"
23979  else
23980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether APR has DSO support" >&5
23981$as_echo_n "checking whether APR has DSO support... " >&6; }
23982if ${apu_cv_aprdso+:} false; then :
23983  $as_echo_n "(cached) " >&6
23984else
23985  apu_save_CPPFLAGS=$CPPFLAGS
23986        CPPFLAGS="$CPPFLAGS $APR_INCLUDES"
23987        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23988/* end confdefs.h.  */
23989#include "apr.h"
23990#if APR_HAS_DSO
23991yes
23992#endif
23993
23994_ACEOF
23995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23996  $EGREP "yes" >/dev/null 2>&1; then :
23997  apu_cv_aprdso=yes
23998else
23999  apu_cv_aprdso=no
24000fi
24001rm -f conftest*
24002
24003        CPPFLAGS=$apu_save_CPPFLAGS
24004fi
24005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_aprdso" >&5
24006$as_echo "$apu_cv_aprdso" >&6; }
24007
24008     if test $apu_cv_aprdso = yes; then
24009        apu_dso_build=1
24010     else
24011        apu_dso_build=0
24012     fi
24013  fi
24014
24015  if test "$apu_dso_build" = "0"; then
24016
24017     # Statically link the drivers:
24018     objs=
24019     test $apu_have_openssl = 1 && objs="$objs crypto/apr_crypto_openssl.lo"
24020     test $apu_have_nss = 1 && objs="$objs crypto/apr_crypto_nss.lo"
24021     test $apu_have_oracle = 1 && objs="$objs dbd/apr_dbd_oracle.lo"
24022     test $apu_have_pgsql = 1 && objs="$objs dbd/apr_dbd_pgsql.lo"
24023     test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo"
24024     test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo"
24025     test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
24026     test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
24027     test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
24028     test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
24029     test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
24030     test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
24031     test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
24032     test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
24033     test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
24034     EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
24035
24036     # Use libtool *.la for mysql if available
24037     if test $apu_have_mysql = 1; then
24038       for flag in $LDADD_dbd_mysql
24039       do
24040         dir=`echo $flag | grep "^-L" | sed s:-L::`
24041         if test "x$dir" != 'x'; then
24042           if test -f "$dir/libmysqlclient_r.la"; then
24043             LDADD_dbd_mysql=$dir/libmysqlclient_r.la
24044             break
24045           fi
24046         fi
24047       done
24048     fi
24049
24050     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
24051     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
24052     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
24053     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
24054     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
24055     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
24056     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
24057     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
24058
24059  else
24060
24061     # Build the drivers as loadable modules:
24062     dsos=
24063     test $apu_have_openssl = 1 && dsos="$dsos crypto/apr_crypto_openssl.la"
24064     test $apu_have_nss = 1 && dsos="$dsos crypto/apr_crypto_nss.la"
24065     test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
24066     test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
24067     test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
24068     test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
24069     test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
24070     test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
24071     test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
24072     test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
24073     test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
24074     test $apu_have_ndbm = 1 && dsos="$dsos dbm/apr_dbm_ndbm.la"
24075     test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
24076
24077     if test -n "$dsos"; then
24078        APU_MODULES="$APU_MODULES $dsos"
24079     fi
24080
24081  fi
24082
24083
24084cat >>confdefs.h <<_ACEOF
24085#define APU_DSO_BUILD $apu_dso_build
24086_ACEOF
24087
24088
24089
24090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
24091$as_echo_n "checking for library containing crypt... " >&6; }
24092if ${ac_cv_search_crypt+:} false; then :
24093  $as_echo_n "(cached) " >&6
24094else
24095  ac_func_search_save_LIBS=$LIBS
24096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24097/* end confdefs.h.  */
24098
24099/* Override any GCC internal prototype to avoid an error.
24100   Use char because int might match the return type of a GCC
24101   builtin and then its argument prototype would still apply.  */
24102#ifdef __cplusplus
24103extern "C"
24104#endif
24105char crypt ();
24106int
24107main ()
24108{
24109return crypt ();
24110  ;
24111  return 0;
24112}
24113_ACEOF
24114for ac_lib in '' crypt ufc; do
24115  if test -z "$ac_lib"; then
24116    ac_res="none required"
24117  else
24118    ac_res=-l$ac_lib
24119    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24120  fi
24121  if ac_fn_c_try_link "$LINENO"; then :
24122  ac_cv_search_crypt=$ac_res
24123fi
24124rm -f core conftest.err conftest.$ac_objext \
24125    conftest$ac_exeext
24126  if ${ac_cv_search_crypt+:} false; then :
24127  break
24128fi
24129done
24130if ${ac_cv_search_crypt+:} false; then :
24131
24132else
24133  ac_cv_search_crypt=no
24134fi
24135rm conftest.$ac_ext
24136LIBS=$ac_func_search_save_LIBS
24137fi
24138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
24139$as_echo "$ac_cv_search_crypt" >&6; }
24140ac_res=$ac_cv_search_crypt
24141if test "$ac_res" != no; then :
24142  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24143
24144fi
24145
24146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if system crypt() function is threadsafe" >&5
24147$as_echo_n "checking if system crypt() function is threadsafe... " >&6; }
24148if test "x$apu_crypt_threadsafe" = "x1"; then
24149
24150$as_echo "#define APU_CRYPT_THREADSAFE 1" >>confdefs.h
24151
24152  msg="yes"
24153else
24154  msg="no"
24155fi
24156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
24157$as_echo "$msg" >&6; }
24158
24159for ac_func in crypt_r
24160do :
24161  ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
24162if test "x$ac_cv_func_crypt_r" = xyes; then :
24163  cat >>confdefs.h <<_ACEOF
24164#define HAVE_CRYPT_R 1
24165_ACEOF
24166  crypt_r="1"
24167else
24168   crypt_r="0"
24169fi
24170done
24171
24172if test "$crypt_r" = "1"; then
24173
24174
24175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of crypt_r" >&5
24176$as_echo_n "checking style of crypt_r... " >&6; }
24177if ${apr_cv_crypt_r_style+:} false; then :
24178  $as_echo_n "(cached) " >&6
24179else
24180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24181/* end confdefs.h.  */
24182#include <crypt.h>
24183int
24184main ()
24185{
24186CRYPTD buffer;
24187  crypt_r("passwd", "hash", &buffer);
24188  ;
24189  return 0;
24190}
24191_ACEOF
24192if ac_fn_c_try_compile "$LINENO"; then :
24193  apr_cv_crypt_r_style=cryptd
24194else
24195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24196/* end confdefs.h.  */
24197#include <crypt.h>
24198int
24199main ()
24200{
24201struct crypt_data buffer;
24202   crypt_r("passwd", "hash", &buffer);
24203  ;
24204  return 0;
24205}
24206_ACEOF
24207if ac_fn_c_try_compile "$LINENO"; then :
24208  apr_cv_crypt_r_style=struct_crypt_data
24209else
24210  apr_cv_crypt_r_style=none
24211fi
24212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24213fi
24214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24215fi
24216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_crypt_r_style" >&5
24217$as_echo "$apr_cv_crypt_r_style" >&6; }
24218
24219if test "$apr_cv_crypt_r_style" = "cryptd"; then
24220
24221$as_echo "#define CRYPT_R_CRYPTD 1" >>confdefs.h
24222
24223elif test "$apr_cv_crypt_r_style" = "struct_crypt_data"; then
24224
24225$as_echo "#define CRYPT_R_STRUCT_CRYPT_DATA 1" >>confdefs.h
24226
24227fi
24228
24229fi
24230
24231so_ext=$APR_SO_EXT
24232lib_target=$APR_LIB_TARGET
24233
24234
24235
24236APRUTIL_LIBNAME="aprutil${libsuffix}"
24237
24238
24239# Set up destination directory for DSOs.
24240APU_DSO_LIBDIR="\${libdir}/apr-util-${APRUTIL_MAJOR_VERSION}"
24241# Set APU_HAVE_MODULES appropriately for the Makefile
24242if test -n "$APU_MODULES"; then
24243   APU_HAVE_MODULES=yes
24244else
24245   APU_HAVE_MODULES=no
24246fi
24247# Define expanded libdir for apu_config.h
24248
24249ap_last=
24250ap_cur="$APU_DSO_LIBDIR"
24251while test "x${ap_cur}" != "x${ap_last}";
24252do
24253  ap_last="${ap_cur}"
24254  ap_cur=`eval "echo ${ap_cur}"`
24255done
24256abs_dso_libdir="${ap_cur}"
24257
24258
24259cat >>confdefs.h <<_ACEOF
24260#define APU_DSO_LIBDIR "$abs_dso_libdir"
24261_ACEOF
24262
24263
24264
24265
24266
24267
24268
24269  if test "x$APRUTIL_LIBS" = "x"; then
24270    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$APR_LIBS\""
24271    APRUTIL_LIBS="$APR_LIBS"
24272  else
24273    apr_addto_bugger="$APR_LIBS"
24274    for i in $apr_addto_bugger; do
24275      apr_addto_duplicate="0"
24276      for j in $APRUTIL_LIBS; do
24277        if test "x$i" = "x$j"; then
24278          apr_addto_duplicate="1"
24279          break
24280        fi
24281      done
24282      if test $apr_addto_duplicate = "0"; then
24283        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
24284        APRUTIL_LIBS="$APRUTIL_LIBS $i"
24285      fi
24286    done
24287  fi
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297if test ! -d ./build; then
24298   $mkdir_p build
24299fi
24300case $host in
24301    *-mingw*)
24302        sed -e 's/-DAPR_DECLARE_EXPORT/-DAPU_DECLARE_EXPORT/' \
24303            -e 's/-DAPR_DECLARE_STATIC/-DAPU_DECLARE_STATIC -DAPR_DECLARE_STATIC/' \
24304            < $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
24305        ;;
24306    *)
24307        cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
24308        ;;
24309esac
24310
24311case "$host_alias" in
24312*bsdi* | BSD/OS)
24313    # Check whether they've installed GNU make
24314    if make --version > /dev/null 2>&1; then
24315        INCLUDE_RULES="include $abs_builddir/build/rules.mk"
24316        INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
24317    else
24318        INCLUDE_RULES=".include \"$abs_builddir/build/rules.mk\""
24319        INCLUDE_OUTPUTS=".include \"$abs_srcdir/build-outputs.mk\""
24320    fi
24321    ;;
24322*)
24323    INCLUDE_RULES="include $abs_builddir/build/rules.mk"
24324    INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
24325    ;;
24326esac
24327
24328
24329
24330for d in include include/private; do
24331    test -d $top_builddir/$d || mkdir $top_builddir/$d
24332done
24333
24334ac_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"
24335
24336
24337ac_config_commands="$ac_config_commands default"
24338
24339
24340if test -d $srcdir/test; then
24341    ac_config_files="$ac_config_files test/Makefile"
24342
24343fi
24344
24345cat >confcache <<\_ACEOF
24346# This file is a shell script that caches the results of configure
24347# tests run on this system so they can be shared between configure
24348# scripts and configure runs, see configure's option --config-cache.
24349# It is not useful on other systems.  If it contains results you don't
24350# want to keep, you may remove or edit it.
24351#
24352# config.status only pays attention to the cache file if you give it
24353# the --recheck option to rerun configure.
24354#
24355# `ac_cv_env_foo' variables (set or unset) will be overridden when
24356# loading this file, other *unset* `ac_cv_foo' will be assigned the
24357# following values.
24358
24359_ACEOF
24360
24361# The following way of writing the cache mishandles newlines in values,
24362# but we know of no workaround that is simple, portable, and efficient.
24363# So, we kill variables containing newlines.
24364# Ultrix sh set writes to stderr and can't be redirected directly,
24365# and sets the high bit in the cache file unless we assign to the vars.
24366(
24367  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24368    eval ac_val=\$$ac_var
24369    case $ac_val in #(
24370    *${as_nl}*)
24371      case $ac_var in #(
24372      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24373$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24374      esac
24375      case $ac_var in #(
24376      _ | IFS | as_nl) ;; #(
24377      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24378      *) { eval $ac_var=; unset $ac_var;} ;;
24379      esac ;;
24380    esac
24381  done
24382
24383  (set) 2>&1 |
24384    case $as_nl`(ac_space=' '; set) 2>&1` in #(
24385    *${as_nl}ac_space=\ *)
24386      # `set' does not quote correctly, so add quotes: double-quote
24387      # substitution turns \\\\ into \\, and sed turns \\ into \.
24388      sed -n \
24389	"s/'/'\\\\''/g;
24390	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24391      ;; #(
24392    *)
24393      # `set' quotes correctly as required by POSIX, so do not add quotes.
24394      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24395      ;;
24396    esac |
24397    sort
24398) |
24399  sed '
24400     /^ac_cv_env_/b end
24401     t clear
24402     :clear
24403     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24404     t end
24405     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24406     :end' >>confcache
24407if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24408  if test -w "$cache_file"; then
24409    if test "x$cache_file" != "x/dev/null"; then
24410      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24411$as_echo "$as_me: updating cache $cache_file" >&6;}
24412      if test ! -f "$cache_file" || test -h "$cache_file"; then
24413	cat confcache >"$cache_file"
24414      else
24415        case $cache_file in #(
24416        */* | ?:*)
24417	  mv -f confcache "$cache_file"$$ &&
24418	  mv -f "$cache_file"$$ "$cache_file" ;; #(
24419        *)
24420	  mv -f confcache "$cache_file" ;;
24421	esac
24422      fi
24423    fi
24424  else
24425    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24426$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24427  fi
24428fi
24429rm -f confcache
24430
24431test "x$prefix" = xNONE && prefix=$ac_default_prefix
24432# Let make expand exec_prefix.
24433test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24434
24435DEFS=-DHAVE_CONFIG_H
24436
24437ac_libobjs=
24438ac_ltlibobjs=
24439U=
24440for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24441  # 1. Remove the extension, and $U if already installed.
24442  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24443  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24444  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24445  #    will be set to the directory where LIBOBJS objects are built.
24446  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24447  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24448done
24449LIBOBJS=$ac_libobjs
24450
24451LTLIBOBJS=$ac_ltlibobjs
24452
24453
24454
24455: "${CONFIG_STATUS=./config.status}"
24456ac_write_fail=0
24457ac_clean_files_save=$ac_clean_files
24458ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24459{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24460$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24461as_write_fail=0
24462cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24463#! $SHELL
24464# Generated by $as_me.
24465# Run this file to recreate the current configuration.
24466# Compiler output produced by configure, useful for debugging
24467# configure, is in config.log if it exists.
24468
24469debug=false
24470ac_cs_recheck=false
24471ac_cs_silent=false
24472
24473SHELL=\${CONFIG_SHELL-$SHELL}
24474export SHELL
24475_ASEOF
24476cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24477## -------------------- ##
24478## M4sh Initialization. ##
24479## -------------------- ##
24480
24481# Be more Bourne compatible
24482DUALCASE=1; export DUALCASE # for MKS sh
24483if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24484  emulate sh
24485  NULLCMD=:
24486  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24487  # is contrary to our usage.  Disable this feature.
24488  alias -g '${1+"$@"}'='"$@"'
24489  setopt NO_GLOB_SUBST
24490else
24491  case `(set -o) 2>/dev/null` in #(
24492  *posix*) :
24493    set -o posix ;; #(
24494  *) :
24495     ;;
24496esac
24497fi
24498
24499
24500as_nl='
24501'
24502export as_nl
24503# Printing a long string crashes Solaris 7 /usr/bin/printf.
24504as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24505as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24506as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24507# Prefer a ksh shell builtin over an external printf program on Solaris,
24508# but without wasting forks for bash or zsh.
24509if test -z "$BASH_VERSION$ZSH_VERSION" \
24510    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24511  as_echo='print -r --'
24512  as_echo_n='print -rn --'
24513elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24514  as_echo='printf %s\n'
24515  as_echo_n='printf %s'
24516else
24517  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24518    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24519    as_echo_n='/usr/ucb/echo -n'
24520  else
24521    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24522    as_echo_n_body='eval
24523      arg=$1;
24524      case $arg in #(
24525      *"$as_nl"*)
24526	expr "X$arg" : "X\\(.*\\)$as_nl";
24527	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24528      esac;
24529      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24530    '
24531    export as_echo_n_body
24532    as_echo_n='sh -c $as_echo_n_body as_echo'
24533  fi
24534  export as_echo_body
24535  as_echo='sh -c $as_echo_body as_echo'
24536fi
24537
24538# The user is always right.
24539if test "${PATH_SEPARATOR+set}" != set; then
24540  PATH_SEPARATOR=:
24541  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24542    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24543      PATH_SEPARATOR=';'
24544  }
24545fi
24546
24547
24548# IFS
24549# We need space, tab and new line, in precisely that order.  Quoting is
24550# there to prevent editors from complaining about space-tab.
24551# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24552# splitting by setting IFS to empty value.)
24553IFS=" ""	$as_nl"
24554
24555# Find who we are.  Look in the path if we contain no directory separator.
24556as_myself=
24557case $0 in #((
24558  *[\\/]* ) as_myself=$0 ;;
24559  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24560for as_dir in $PATH
24561do
24562  IFS=$as_save_IFS
24563  test -z "$as_dir" && as_dir=.
24564    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24565  done
24566IFS=$as_save_IFS
24567
24568     ;;
24569esac
24570# We did not find ourselves, most probably we were run as `sh COMMAND'
24571# in which case we are not to be found in the path.
24572if test "x$as_myself" = x; then
24573  as_myself=$0
24574fi
24575if test ! -f "$as_myself"; then
24576  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24577  exit 1
24578fi
24579
24580# Unset variables that we do not need and which cause bugs (e.g. in
24581# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24582# suppresses any "Segmentation fault" message there.  '((' could
24583# trigger a bug in pdksh 5.2.14.
24584for as_var in BASH_ENV ENV MAIL MAILPATH
24585do eval test x\${$as_var+set} = xset \
24586  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24587done
24588PS1='$ '
24589PS2='> '
24590PS4='+ '
24591
24592# NLS nuisances.
24593LC_ALL=C
24594export LC_ALL
24595LANGUAGE=C
24596export LANGUAGE
24597
24598# CDPATH.
24599(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24600
24601
24602# as_fn_error STATUS ERROR [LINENO LOG_FD]
24603# ----------------------------------------
24604# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24605# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24606# script with STATUS, using 1 if that was 0.
24607as_fn_error ()
24608{
24609  as_status=$1; test $as_status -eq 0 && as_status=1
24610  if test "$4"; then
24611    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24612    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
24613  fi
24614  $as_echo "$as_me: error: $2" >&2
24615  as_fn_exit $as_status
24616} # as_fn_error
24617
24618
24619# as_fn_set_status STATUS
24620# -----------------------
24621# Set $? to STATUS, without forking.
24622as_fn_set_status ()
24623{
24624  return $1
24625} # as_fn_set_status
24626
24627# as_fn_exit STATUS
24628# -----------------
24629# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24630as_fn_exit ()
24631{
24632  set +e
24633  as_fn_set_status $1
24634  exit $1
24635} # as_fn_exit
24636
24637# as_fn_unset VAR
24638# ---------------
24639# Portably unset VAR.
24640as_fn_unset ()
24641{
24642  { eval $1=; unset $1;}
24643}
24644as_unset=as_fn_unset
24645# as_fn_append VAR VALUE
24646# ----------------------
24647# Append the text in VALUE to the end of the definition contained in VAR. Take
24648# advantage of any shell optimizations that allow amortized linear growth over
24649# repeated appends, instead of the typical quadratic growth present in naive
24650# implementations.
24651if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24652  eval 'as_fn_append ()
24653  {
24654    eval $1+=\$2
24655  }'
24656else
24657  as_fn_append ()
24658  {
24659    eval $1=\$$1\$2
24660  }
24661fi # as_fn_append
24662
24663# as_fn_arith ARG...
24664# ------------------
24665# Perform arithmetic evaluation on the ARGs, and store the result in the
24666# global $as_val. Take advantage of shells that can avoid forks. The arguments
24667# must be portable across $(()) and expr.
24668if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24669  eval 'as_fn_arith ()
24670  {
24671    as_val=$(( $* ))
24672  }'
24673else
24674  as_fn_arith ()
24675  {
24676    as_val=`expr "$@" || test $? -eq 1`
24677  }
24678fi # as_fn_arith
24679
24680
24681if expr a : '\(a\)' >/dev/null 2>&1 &&
24682   test "X`expr 00001 : '.*\(...\)'`" = X001; then
24683  as_expr=expr
24684else
24685  as_expr=false
24686fi
24687
24688if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24689  as_basename=basename
24690else
24691  as_basename=false
24692fi
24693
24694if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24695  as_dirname=dirname
24696else
24697  as_dirname=false
24698fi
24699
24700as_me=`$as_basename -- "$0" ||
24701$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24702	 X"$0" : 'X\(//\)$' \| \
24703	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24704$as_echo X/"$0" |
24705    sed '/^.*\/\([^/][^/]*\)\/*$/{
24706	    s//\1/
24707	    q
24708	  }
24709	  /^X\/\(\/\/\)$/{
24710	    s//\1/
24711	    q
24712	  }
24713	  /^X\/\(\/\).*/{
24714	    s//\1/
24715	    q
24716	  }
24717	  s/.*/./; q'`
24718
24719# Avoid depending upon Character Ranges.
24720as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24721as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24722as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24723as_cr_digits='0123456789'
24724as_cr_alnum=$as_cr_Letters$as_cr_digits
24725
24726ECHO_C= ECHO_N= ECHO_T=
24727case `echo -n x` in #(((((
24728-n*)
24729  case `echo 'xy\c'` in
24730  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
24731  xy)  ECHO_C='\c';;
24732  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
24733       ECHO_T='	';;
24734  esac;;
24735*)
24736  ECHO_N='-n';;
24737esac
24738
24739rm -f conf$$ conf$$.exe conf$$.file
24740if test -d conf$$.dir; then
24741  rm -f conf$$.dir/conf$$.file
24742else
24743  rm -f conf$$.dir
24744  mkdir conf$$.dir 2>/dev/null
24745fi
24746if (echo >conf$$.file) 2>/dev/null; then
24747  if ln -s conf$$.file conf$$ 2>/dev/null; then
24748    as_ln_s='ln -s'
24749    # ... but there are two gotchas:
24750    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24751    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24752    # In both cases, we have to default to `cp -pR'.
24753    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24754      as_ln_s='cp -pR'
24755  elif ln conf$$.file conf$$ 2>/dev/null; then
24756    as_ln_s=ln
24757  else
24758    as_ln_s='cp -pR'
24759  fi
24760else
24761  as_ln_s='cp -pR'
24762fi
24763rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24764rmdir conf$$.dir 2>/dev/null
24765
24766
24767# as_fn_mkdir_p
24768# -------------
24769# Create "$as_dir" as a directory, including parents if necessary.
24770as_fn_mkdir_p ()
24771{
24772
24773  case $as_dir in #(
24774  -*) as_dir=./$as_dir;;
24775  esac
24776  test -d "$as_dir" || eval $as_mkdir_p || {
24777    as_dirs=
24778    while :; do
24779      case $as_dir in #(
24780      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24781      *) as_qdir=$as_dir;;
24782      esac
24783      as_dirs="'$as_qdir' $as_dirs"
24784      as_dir=`$as_dirname -- "$as_dir" ||
24785$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24786	 X"$as_dir" : 'X\(//\)[^/]' \| \
24787	 X"$as_dir" : 'X\(//\)$' \| \
24788	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24789$as_echo X"$as_dir" |
24790    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24791	    s//\1/
24792	    q
24793	  }
24794	  /^X\(\/\/\)[^/].*/{
24795	    s//\1/
24796	    q
24797	  }
24798	  /^X\(\/\/\)$/{
24799	    s//\1/
24800	    q
24801	  }
24802	  /^X\(\/\).*/{
24803	    s//\1/
24804	    q
24805	  }
24806	  s/.*/./; q'`
24807      test -d "$as_dir" && break
24808    done
24809    test -z "$as_dirs" || eval "mkdir $as_dirs"
24810  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
24811
24812
24813} # as_fn_mkdir_p
24814if mkdir -p . 2>/dev/null; then
24815  as_mkdir_p='mkdir -p "$as_dir"'
24816else
24817  test -d ./-p && rmdir ./-p
24818  as_mkdir_p=false
24819fi
24820
24821
24822# as_fn_executable_p FILE
24823# -----------------------
24824# Test if FILE is an executable regular file.
24825as_fn_executable_p ()
24826{
24827  test -f "$1" && test -x "$1"
24828} # as_fn_executable_p
24829as_test_x='test -x'
24830as_executable_p=as_fn_executable_p
24831
24832# Sed expression to map a string onto a valid CPP name.
24833as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24834
24835# Sed expression to map a string onto a valid variable name.
24836as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24837
24838
24839exec 6>&1
24840## ----------------------------------- ##
24841## Main body of $CONFIG_STATUS script. ##
24842## ----------------------------------- ##
24843_ASEOF
24844test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24845
24846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24847# Save the log message, to keep $0 and so on meaningful, and to
24848# report actual input values of CONFIG_FILES etc. instead of their
24849# values after options handling.
24850ac_log="
24851This file was extended by $as_me, which was
24852generated by GNU Autoconf 2.69.  Invocation command line was
24853
24854  CONFIG_FILES    = $CONFIG_FILES
24855  CONFIG_HEADERS  = $CONFIG_HEADERS
24856  CONFIG_LINKS    = $CONFIG_LINKS
24857  CONFIG_COMMANDS = $CONFIG_COMMANDS
24858  $ $0 $@
24859
24860on `(hostname || uname -n) 2>/dev/null | sed 1q`
24861"
24862
24863_ACEOF
24864
24865case $ac_config_files in *"
24866"*) set x $ac_config_files; shift; ac_config_files=$*;;
24867esac
24868
24869case $ac_config_headers in *"
24870"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24871esac
24872
24873
24874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24875# Files that config.status was made for.
24876config_files="$ac_config_files"
24877config_headers="$ac_config_headers"
24878config_commands="$ac_config_commands"
24879
24880_ACEOF
24881
24882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24883ac_cs_usage="\
24884\`$as_me' instantiates files and other configuration actions
24885from templates according to the current configuration.  Unless the files
24886and actions are specified as TAGs, all are instantiated by default.
24887
24888Usage: $0 [OPTION]... [TAG]...
24889
24890  -h, --help       print this help, then exit
24891  -V, --version    print version number and configuration settings, then exit
24892      --config     print configuration, then exit
24893  -q, --quiet, --silent
24894                   do not print progress messages
24895  -d, --debug      don't remove temporary files
24896      --recheck    update $as_me by reconfiguring in the same conditions
24897      --file=FILE[:TEMPLATE]
24898                   instantiate the configuration file FILE
24899      --header=FILE[:TEMPLATE]
24900                   instantiate the configuration header FILE
24901
24902Configuration files:
24903$config_files
24904
24905Configuration headers:
24906$config_headers
24907
24908Configuration commands:
24909$config_commands
24910
24911Report bugs to the package provider."
24912
24913_ACEOF
24914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24915ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
24916ac_cs_version="\\
24917config.status
24918configured by $0, generated by GNU Autoconf 2.69,
24919  with options \\"\$ac_cs_config\\"
24920
24921Copyright (C) 2012 Free Software Foundation, Inc.
24922This config.status script is free software; the Free Software Foundation
24923gives unlimited permission to copy, distribute and modify it."
24924
24925ac_pwd='$ac_pwd'
24926srcdir='$srcdir'
24927INSTALL='$INSTALL'
24928test -n "\$AWK" || AWK=awk
24929_ACEOF
24930
24931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24932# The default lists apply if the user does not specify any file.
24933ac_need_defaults=:
24934while test $# != 0
24935do
24936  case $1 in
24937  --*=?*)
24938    ac_option=`expr "X$1" : 'X\([^=]*\)='`
24939    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24940    ac_shift=:
24941    ;;
24942  --*=)
24943    ac_option=`expr "X$1" : 'X\([^=]*\)='`
24944    ac_optarg=
24945    ac_shift=:
24946    ;;
24947  *)
24948    ac_option=$1
24949    ac_optarg=$2
24950    ac_shift=shift
24951    ;;
24952  esac
24953
24954  case $ac_option in
24955  # Handling of the options.
24956  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24957    ac_cs_recheck=: ;;
24958  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24959    $as_echo "$ac_cs_version"; exit ;;
24960  --config | --confi | --conf | --con | --co | --c )
24961    $as_echo "$ac_cs_config"; exit ;;
24962  --debug | --debu | --deb | --de | --d | -d )
24963    debug=: ;;
24964  --file | --fil | --fi | --f )
24965    $ac_shift
24966    case $ac_optarg in
24967    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24968    '') as_fn_error $? "missing file argument" ;;
24969    esac
24970    as_fn_append CONFIG_FILES " '$ac_optarg'"
24971    ac_need_defaults=false;;
24972  --header | --heade | --head | --hea )
24973    $ac_shift
24974    case $ac_optarg in
24975    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24976    esac
24977    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24978    ac_need_defaults=false;;
24979  --he | --h)
24980    # Conflict between --help and --header
24981    as_fn_error $? "ambiguous option: \`$1'
24982Try \`$0 --help' for more information.";;
24983  --help | --hel | -h )
24984    $as_echo "$ac_cs_usage"; exit ;;
24985  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24986  | -silent | --silent | --silen | --sile | --sil | --si | --s)
24987    ac_cs_silent=: ;;
24988
24989  # This is an error.
24990  -*) as_fn_error $? "unrecognized option: \`$1'
24991Try \`$0 --help' for more information." ;;
24992
24993  *) as_fn_append ac_config_targets " $1"
24994     ac_need_defaults=false ;;
24995
24996  esac
24997  shift
24998done
24999
25000ac_configure_extra_args=
25001
25002if $ac_cs_silent; then
25003  exec 6>/dev/null
25004  ac_configure_extra_args="$ac_configure_extra_args --silent"
25005fi
25006
25007_ACEOF
25008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25009if \$ac_cs_recheck; then
25010  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25011  shift
25012  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25013  CONFIG_SHELL='$SHELL'
25014  export CONFIG_SHELL
25015  exec "\$@"
25016fi
25017
25018_ACEOF
25019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25020exec 5>>config.log
25021{
25022  echo
25023  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25024## Running $as_me. ##
25025_ASBOX
25026  $as_echo "$ac_log"
25027} >&5
25028
25029_ACEOF
25030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25031#
25032# INIT-COMMANDS
25033#
25034
25035APRUTIL_MAJOR_VERSION=$APRUTIL_MAJOR_VERSION
25036
25037
25038_ACEOF
25039
25040cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25041
25042# Handling of arguments.
25043for ac_config_target in $ac_config_targets
25044do
25045  case $ac_config_target in
25046    "include/private/apu_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/private/apu_config.h" ;;
25047    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25048    "export_vars.sh") CONFIG_FILES="$CONFIG_FILES export_vars.sh" ;;
25049    "build/pkg/pkginfo") CONFIG_FILES="$CONFIG_FILES build/pkg/pkginfo" ;;
25050    "apr-util.pc") CONFIG_FILES="$CONFIG_FILES apr-util.pc" ;;
25051    "apu-$APRUTIL_MAJOR_VERSION-config") CONFIG_FILES="$CONFIG_FILES apu-$APRUTIL_MAJOR_VERSION-config:apu-config.in" ;;
25052    "include/private/apu_select_dbm.h") CONFIG_FILES="$CONFIG_FILES include/private/apu_select_dbm.h" ;;
25053    "include/apr_ldap.h") CONFIG_FILES="$CONFIG_FILES include/apr_ldap.h" ;;
25054    "include/apu.h") CONFIG_FILES="$CONFIG_FILES include/apu.h" ;;
25055    "include/apu_want.h") CONFIG_FILES="$CONFIG_FILES include/apu_want.h" ;;
25056    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25057    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
25058
25059  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25060  esac
25061done
25062
25063
25064# If the user did not use the arguments to specify the items to instantiate,
25065# then the envvar interface is used.  Set only those that are not.
25066# We use the long form for the default assignment because of an extremely
25067# bizarre bug on SunOS 4.1.3.
25068if $ac_need_defaults; then
25069  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25070  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25071  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25072fi
25073
25074# Have a temporary directory for convenience.  Make it in the build tree
25075# simply because there is no reason against having it here, and in addition,
25076# creating and moving files from /tmp can sometimes cause problems.
25077# Hook for its removal unless debugging.
25078# Note that there is a small window in which the directory will not be cleaned:
25079# after its creation but before its name has been assigned to `$tmp'.
25080$debug ||
25081{
25082  tmp= ac_tmp=
25083  trap 'exit_status=$?
25084  : "${ac_tmp:=$tmp}"
25085  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
25086' 0
25087  trap 'as_fn_exit 1' 1 2 13 15
25088}
25089# Create a (secure) tmp directory for tmp files.
25090
25091{
25092  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25093  test -d "$tmp"
25094}  ||
25095{
25096  tmp=./conf$$-$RANDOM
25097  (umask 077 && mkdir "$tmp")
25098} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
25099ac_tmp=$tmp
25100
25101# Set up the scripts for CONFIG_FILES section.
25102# No need to generate them if there are no CONFIG_FILES.
25103# This happens for instance with `./config.status config.h'.
25104if test -n "$CONFIG_FILES"; then
25105
25106
25107ac_cr=`echo X | tr X '\015'`
25108# On cygwin, bash can eat \r inside `` if the user requested igncr.
25109# But we know of no other shell where ac_cr would be empty at this
25110# point, so we can use a bashism as a fallback.
25111if test "x$ac_cr" = x; then
25112  eval ac_cr=\$\'\\r\'
25113fi
25114ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25115if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25116  ac_cs_awk_cr='\\r'
25117else
25118  ac_cs_awk_cr=$ac_cr
25119fi
25120
25121echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
25122_ACEOF
25123
25124
25125{
25126  echo "cat >conf$$subs.awk <<_ACEOF" &&
25127  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25128  echo "_ACEOF"
25129} >conf$$subs.sh ||
25130  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25131ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
25132ac_delim='%!_!# '
25133for ac_last_try in false false false false false :; do
25134  . ./conf$$subs.sh ||
25135    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25136
25137  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25138  if test $ac_delim_n = $ac_delim_num; then
25139    break
25140  elif $ac_last_try; then
25141    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25142  else
25143    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25144  fi
25145done
25146rm -f conf$$subs.sh
25147
25148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25149cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
25150_ACEOF
25151sed -n '
25152h
25153s/^/S["/; s/!.*/"]=/
25154p
25155g
25156s/^[^!]*!//
25157:repl
25158t repl
25159s/'"$ac_delim"'$//
25160t delim
25161:nl
25162h
25163s/\(.\{148\}\)..*/\1/
25164t more1
25165s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25166p
25167n
25168b repl
25169:more1
25170s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25171p
25172g
25173s/.\{148\}//
25174t nl
25175:delim
25176h
25177s/\(.\{148\}\)..*/\1/
25178t more2
25179s/["\\]/\\&/g; s/^/"/; s/$/"/
25180p
25181b
25182:more2
25183s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25184p
25185g
25186s/.\{148\}//
25187t delim
25188' <conf$$subs.awk | sed '
25189/^[^""]/{
25190  N
25191  s/\n//
25192}
25193' >>$CONFIG_STATUS || ac_write_fail=1
25194rm -f conf$$subs.awk
25195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25196_ACAWK
25197cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
25198  for (key in S) S_is_set[key] = 1
25199  FS = ""
25200
25201}
25202{
25203  line = $ 0
25204  nfields = split(line, field, "@")
25205  substed = 0
25206  len = length(field[1])
25207  for (i = 2; i < nfields; i++) {
25208    key = field[i]
25209    keylen = length(key)
25210    if (S_is_set[key]) {
25211      value = S[key]
25212      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25213      len += length(value) + length(field[++i])
25214      substed = 1
25215    } else
25216      len += 1 + keylen
25217  }
25218
25219  print line
25220}
25221
25222_ACAWK
25223_ACEOF
25224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25225if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25226  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25227else
25228  cat
25229fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
25230  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
25231_ACEOF
25232
25233# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25234# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
25235# trailing colons and then remove the whole line if VPATH becomes empty
25236# (actually we leave an empty line to preserve line numbers).
25237if test "x$srcdir" = x.; then
25238  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
25239h
25240s///
25241s/^/:/
25242s/[	 ]*$/:/
25243s/:\$(srcdir):/:/g
25244s/:\${srcdir}:/:/g
25245s/:@srcdir@:/:/g
25246s/^:*//
25247s/:*$//
25248x
25249s/\(=[	 ]*\).*/\1/
25250G
25251s/\n//
25252s/^[^=]*=[	 ]*$//
25253}'
25254fi
25255
25256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25257fi # test -n "$CONFIG_FILES"
25258
25259# Set up the scripts for CONFIG_HEADERS section.
25260# No need to generate them if there are no CONFIG_HEADERS.
25261# This happens for instance with `./config.status Makefile'.
25262if test -n "$CONFIG_HEADERS"; then
25263cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
25264BEGIN {
25265_ACEOF
25266
25267# Transform confdefs.h into an awk script `defines.awk', embedded as
25268# here-document in config.status, that substitutes the proper values into
25269# config.h.in to produce config.h.
25270
25271# Create a delimiter string that does not exist in confdefs.h, to ease
25272# handling of long lines.
25273ac_delim='%!_!# '
25274for ac_last_try in false false :; do
25275  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
25276  if test -z "$ac_tt"; then
25277    break
25278  elif $ac_last_try; then
25279    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
25280  else
25281    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25282  fi
25283done
25284
25285# For the awk script, D is an array of macro values keyed by name,
25286# likewise P contains macro parameters if any.  Preserve backslash
25287# newline sequences.
25288
25289ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25290sed -n '
25291s/.\{148\}/&'"$ac_delim"'/g
25292t rset
25293:rset
25294s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
25295t def
25296d
25297:def
25298s/\\$//
25299t bsnl
25300s/["\\]/\\&/g
25301s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25302D["\1"]=" \3"/p
25303s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
25304d
25305:bsnl
25306s/["\\]/\\&/g
25307s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25308D["\1"]=" \3\\\\\\n"\\/p
25309t cont
25310s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25311t cont
25312d
25313:cont
25314n
25315s/.\{148\}/&'"$ac_delim"'/g
25316t clear
25317:clear
25318s/\\$//
25319t bsnlc
25320s/["\\]/\\&/g; s/^/"/; s/$/"/p
25321d
25322:bsnlc
25323s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25324b cont
25325' <confdefs.h | sed '
25326s/'"$ac_delim"'/"\\\
25327"/g' >>$CONFIG_STATUS || ac_write_fail=1
25328
25329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25330  for (key in D) D_is_set[key] = 1
25331  FS = ""
25332}
25333/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25334  line = \$ 0
25335  split(line, arg, " ")
25336  if (arg[1] == "#") {
25337    defundef = arg[2]
25338    mac1 = arg[3]
25339  } else {
25340    defundef = substr(arg[1], 2)
25341    mac1 = arg[2]
25342  }
25343  split(mac1, mac2, "(") #)
25344  macro = mac2[1]
25345  prefix = substr(line, 1, index(line, defundef) - 1)
25346  if (D_is_set[macro]) {
25347    # Preserve the white space surrounding the "#".
25348    print prefix "define", macro P[macro] D[macro]
25349    next
25350  } else {
25351    # Replace #undef with comments.  This is necessary, for example,
25352    # in the case of _POSIX_SOURCE, which is predefined and required
25353    # on some systems where configure will not decide to define it.
25354    if (defundef == "undef") {
25355      print "/*", prefix defundef, macro, "*/"
25356      next
25357    }
25358  }
25359}
25360{ print }
25361_ACAWK
25362_ACEOF
25363cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25364  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25365fi # test -n "$CONFIG_HEADERS"
25366
25367
25368eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25369shift
25370for ac_tag
25371do
25372  case $ac_tag in
25373  :[FHLC]) ac_mode=$ac_tag; continue;;
25374  esac
25375  case $ac_mode$ac_tag in
25376  :[FHL]*:*);;
25377  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25378  :[FH]-) ac_tag=-:-;;
25379  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25380  esac
25381  ac_save_IFS=$IFS
25382  IFS=:
25383  set x $ac_tag
25384  IFS=$ac_save_IFS
25385  shift
25386  ac_file=$1
25387  shift
25388
25389  case $ac_mode in
25390  :L) ac_source=$1;;
25391  :[FH])
25392    ac_file_inputs=
25393    for ac_f
25394    do
25395      case $ac_f in
25396      -) ac_f="$ac_tmp/stdin";;
25397      *) # Look for the file first in the build tree, then in the source tree
25398	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
25399	 # because $ac_f cannot contain `:'.
25400	 test -f "$ac_f" ||
25401	   case $ac_f in
25402	   [\\/$]*) false;;
25403	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25404	   esac ||
25405	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25406      esac
25407      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25408      as_fn_append ac_file_inputs " '$ac_f'"
25409    done
25410
25411    # Let's still pretend it is `configure' which instantiates (i.e., don't
25412    # use $as_me), people would be surprised to read:
25413    #    /* config.h.  Generated by config.status.  */
25414    configure_input='Generated from '`
25415	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25416	`' by configure.'
25417    if test x"$ac_file" != x-; then
25418      configure_input="$ac_file.  $configure_input"
25419      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25420$as_echo "$as_me: creating $ac_file" >&6;}
25421    fi
25422    # Neutralize special characters interpreted by sed in replacement strings.
25423    case $configure_input in #(
25424    *\&* | *\|* | *\\* )
25425       ac_sed_conf_input=`$as_echo "$configure_input" |
25426       sed 's/[\\\\&|]/\\\\&/g'`;; #(
25427    *) ac_sed_conf_input=$configure_input;;
25428    esac
25429
25430    case $ac_tag in
25431    *:-:* | *:-) cat >"$ac_tmp/stdin" \
25432      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
25433    esac
25434    ;;
25435  esac
25436
25437  ac_dir=`$as_dirname -- "$ac_file" ||
25438$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25439	 X"$ac_file" : 'X\(//\)[^/]' \| \
25440	 X"$ac_file" : 'X\(//\)$' \| \
25441	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25442$as_echo X"$ac_file" |
25443    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25444	    s//\1/
25445	    q
25446	  }
25447	  /^X\(\/\/\)[^/].*/{
25448	    s//\1/
25449	    q
25450	  }
25451	  /^X\(\/\/\)$/{
25452	    s//\1/
25453	    q
25454	  }
25455	  /^X\(\/\).*/{
25456	    s//\1/
25457	    q
25458	  }
25459	  s/.*/./; q'`
25460  as_dir="$ac_dir"; as_fn_mkdir_p
25461  ac_builddir=.
25462
25463case "$ac_dir" in
25464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25465*)
25466  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25467  # A ".." for each directory in $ac_dir_suffix.
25468  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25469  case $ac_top_builddir_sub in
25470  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25471  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25472  esac ;;
25473esac
25474ac_abs_top_builddir=$ac_pwd
25475ac_abs_builddir=$ac_pwd$ac_dir_suffix
25476# for backward compatibility:
25477ac_top_builddir=$ac_top_build_prefix
25478
25479case $srcdir in
25480  .)  # We are building in place.
25481    ac_srcdir=.
25482    ac_top_srcdir=$ac_top_builddir_sub
25483    ac_abs_top_srcdir=$ac_pwd ;;
25484  [\\/]* | ?:[\\/]* )  # Absolute name.
25485    ac_srcdir=$srcdir$ac_dir_suffix;
25486    ac_top_srcdir=$srcdir
25487    ac_abs_top_srcdir=$srcdir ;;
25488  *) # Relative name.
25489    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25490    ac_top_srcdir=$ac_top_build_prefix$srcdir
25491    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25492esac
25493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25494
25495
25496  case $ac_mode in
25497  :F)
25498  #
25499  # CONFIG_FILE
25500  #
25501
25502  case $INSTALL in
25503  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25504  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25505  esac
25506_ACEOF
25507
25508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25509# If the template does not know about datarootdir, expand it.
25510# FIXME: This hack should be removed a few years after 2.60.
25511ac_datarootdir_hack=; ac_datarootdir_seen=
25512ac_sed_dataroot='
25513/datarootdir/ {
25514  p
25515  q
25516}
25517/@datadir@/p
25518/@docdir@/p
25519/@infodir@/p
25520/@localedir@/p
25521/@mandir@/p'
25522case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25523*datarootdir*) ac_datarootdir_seen=yes;;
25524*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25525  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25526$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25527_ACEOF
25528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25529  ac_datarootdir_hack='
25530  s&@datadir@&$datadir&g
25531  s&@docdir@&$docdir&g
25532  s&@infodir@&$infodir&g
25533  s&@localedir@&$localedir&g
25534  s&@mandir@&$mandir&g
25535  s&\\\${datarootdir}&$datarootdir&g' ;;
25536esac
25537_ACEOF
25538
25539# Neutralize VPATH when `$srcdir' = `.'.
25540# Shell code in configure.ac might set extrasub.
25541# FIXME: do we really want to maintain this feature?
25542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25543ac_sed_extra="$ac_vpsub
25544$extrasub
25545_ACEOF
25546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25547:t
25548/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25549s|@configure_input@|$ac_sed_conf_input|;t t
25550s&@top_builddir@&$ac_top_builddir_sub&;t t
25551s&@top_build_prefix@&$ac_top_build_prefix&;t t
25552s&@srcdir@&$ac_srcdir&;t t
25553s&@abs_srcdir@&$ac_abs_srcdir&;t t
25554s&@top_srcdir@&$ac_top_srcdir&;t t
25555s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25556s&@builddir@&$ac_builddir&;t t
25557s&@abs_builddir@&$ac_abs_builddir&;t t
25558s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25559s&@INSTALL@&$ac_INSTALL&;t t
25560$ac_datarootdir_hack
25561"
25562eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
25563  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25564
25565test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25566  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
25567  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
25568      "$ac_tmp/out"`; test -z "$ac_out"; } &&
25569  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25570which seems to be undefined.  Please make sure it is defined" >&5
25571$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25572which seems to be undefined.  Please make sure it is defined" >&2;}
25573
25574  rm -f "$ac_tmp/stdin"
25575  case $ac_file in
25576  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
25577  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
25578  esac \
25579  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25580 ;;
25581  :H)
25582  #
25583  # CONFIG_HEADER
25584  #
25585  if test x"$ac_file" != x-; then
25586    {
25587      $as_echo "/* $configure_input  */" \
25588      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
25589    } >"$ac_tmp/config.h" \
25590      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25591    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
25592      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25593$as_echo "$as_me: $ac_file is unchanged" >&6;}
25594    else
25595      rm -f "$ac_file"
25596      mv "$ac_tmp/config.h" "$ac_file" \
25597	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
25598    fi
25599  else
25600    $as_echo "/* $configure_input  */" \
25601      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
25602      || as_fn_error $? "could not create -" "$LINENO" 5
25603  fi
25604 ;;
25605
25606  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25607$as_echo "$as_me: executing $ac_file commands" >&6;}
25608 ;;
25609  esac
25610
25611
25612  case $ac_file$ac_mode in
25613    "default":C)
25614chmod +x apu-$APRUTIL_MAJOR_VERSION-config
25615 ;;
25616
25617  esac
25618done # for ac_tag
25619
25620
25621as_fn_exit 0
25622_ACEOF
25623ac_clean_files=$ac_clean_files_save
25624
25625test $ac_write_fail = 0 ||
25626  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
25627
25628
25629# configure is writing to config.log, and then calls config.status.
25630# config.status does its own redirection, appending to config.log.
25631# Unfortunately, on DOS this fails, as config.log is still kept open
25632# by configure, so config.status won't be able to write to it; its
25633# output is simply discarded.  So we exec the FD to /dev/null,
25634# effectively closing config.log, so it can be properly (re)opened and
25635# appended to by config.status.  When coming back to configure, we
25636# need to make the FD available again.
25637if test "$no_create" != yes; then
25638  ac_cs_success=:
25639  ac_config_status_args=
25640  test "$silent" = yes &&
25641    ac_config_status_args="$ac_config_status_args --quiet"
25642  exec 5>/dev/null
25643  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25644  exec 5>>config.log
25645  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25646  # would make configure fail if this is the last instruction.
25647  $ac_cs_success || as_fn_exit 1
25648fi
25649if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25650  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25651$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25652fi
25653
25654