1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67.
4#
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8# Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92case $0 in #((
93  *[\\/]* ) as_myself=$0 ;;
94  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97  IFS=$as_save_IFS
98  test -z "$as_dir" && as_dir=.
99    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100  done
101IFS=$as_save_IFS
102
103     ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108  as_myself=$0
109fi
110if test ! -f "$as_myself"; then
111  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112  exit 1
113fi
114
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there.  '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122done
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
132
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138  emulate sh
139  NULLCMD=:
140  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141  # is contrary to our usage.  Disable this feature.
142  alias -g '\${1+\"\$@\"}'='\"\$@\"'
143  setopt NO_GLOB_SUBST
144else
145  case \`(set -o) 2>/dev/null\` in #(
146  *posix*) :
147    set -o posix ;; #(
148  *) :
149     ;;
150esac
151fi
152"
153  as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167  exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175  if (eval "$as_required") 2>/dev/null; then :
176  as_have_required=yes
177else
178  as_have_required=no
179fi
180  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187  IFS=$as_save_IFS
188  test -z "$as_dir" && as_dir=.
189  as_found=:
190  case $as_dir in #(
191	 /*)
192	   for as_base in sh bash ksh sh5; do
193	     # Try only shells that exist, to save several forks.
194	     as_shell=$as_dir/$as_base
195	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197  CONFIG_SHELL=$as_shell as_have_required=yes
198		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  break 2
200fi
201fi
202	   done;;
203       esac
204  as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208  CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213      if test "x$CONFIG_SHELL" != x; then :
214  # We cannot yet assume a decent shell, so we have to provide a
215	# neutralization value for shells without unset; and this also
216	# works around shells that cannot unset nonexistent variables.
217	BASH_ENV=/dev/null
218	ENV=/dev/null
219	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220	export CONFIG_SHELL
221	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222fi
223
224    if test x$as_have_required = xno; then :
225  $as_echo "$0: This script requires a shell more modern than all"
226  $as_echo "$0: the shells that I found on your system."
227  if test x${ZSH_VERSION+set} = xset ; then
228    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230  else
231    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235  fi
236  exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254  { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263  return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271  set +e
272  as_fn_set_status $1
273  exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282  case $as_dir in #(
283  -*) as_dir=./$as_dir;;
284  esac
285  test -d "$as_dir" || eval $as_mkdir_p || {
286    as_dirs=
287    while :; do
288      case $as_dir in #(
289      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290      *) as_qdir=$as_dir;;
291      esac
292      as_dirs="'$as_qdir' $as_dirs"
293      as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295	 X"$as_dir" : 'X\(//\)[^/]' \| \
296	 X"$as_dir" : 'X\(//\)$' \| \
297	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300	    s//\1/
301	    q
302	  }
303	  /^X\(\/\/\)[^/].*/{
304	    s//\1/
305	    q
306	  }
307	  /^X\(\/\/\)$/{
308	    s//\1/
309	    q
310	  }
311	  /^X\(\/\).*/{
312	    s//\1/
313	    q
314	  }
315	  s/.*/./; q'`
316      test -d "$as_dir" && break
317    done
318    test -z "$as_dirs" || eval "mkdir $as_dirs"
319  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330  eval 'as_fn_append ()
331  {
332    eval $1+=\$2
333  }'
334else
335  as_fn_append ()
336  {
337    eval $1=\$$1\$2
338  }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347  eval 'as_fn_arith ()
348  {
349    as_val=$(( $* ))
350  }'
351else
352  as_fn_arith ()
353  {
354    as_val=`expr "$@" || test $? -eq 1`
355  }
356fi # as_fn_arith
357
358
359# as_fn_error STATUS ERROR [LINENO LOG_FD]
360# ----------------------------------------
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363# script with STATUS, using 1 if that was 0.
364as_fn_error ()
365{
366  as_status=$1; test $as_status -eq 0 && as_status=1
367  if test "$4"; then
368    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
370  fi
371  $as_echo "$as_me: error: $2" >&2
372  as_fn_exit $as_status
373} # as_fn_error
374
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376   test "X`expr 00001 : '.*\(...\)'`" = X001; then
377  as_expr=expr
378else
379  as_expr=false
380fi
381
382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383  as_basename=basename
384else
385  as_basename=false
386fi
387
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389  as_dirname=dirname
390else
391  as_dirname=false
392fi
393
394as_me=`$as_basename -- "$0" ||
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396	 X"$0" : 'X\(//\)$' \| \
397	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
398$as_echo X/"$0" |
399    sed '/^.*\/\([^/][^/]*\)\/*$/{
400	    s//\1/
401	    q
402	  }
403	  /^X\/\(\/\/\)$/{
404	    s//\1/
405	    q
406	  }
407	  /^X\/\(\/\).*/{
408	    s//\1/
409	    q
410	  }
411	  s/.*/./; q'`
412
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
419
420
421  as_lineno_1=$LINENO as_lineno_1a=$LINENO
422  as_lineno_2=$LINENO as_lineno_2a=$LINENO
423  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
426  sed -n '
427    p
428    /[$]LINENO/=
429  ' <$as_myself |
430    sed '
431      s/[$]LINENO.*/&-/
432      t lineno
433      b
434      :lineno
435      N
436      :loop
437      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438      t loop
439      s/-\n.*//
440    ' >$as_me.lineno &&
441  chmod +x "$as_me.lineno" ||
442    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
443
444  # Don't try to exec as it changes $[0], causing all sort of problems
445  # (the dirname of $[0] is not the place where we might find the
446  # original and so on.  Autoconf is especially sensitive to this).
447  . "./$as_me.lineno"
448  # Exit status is that of the last command.
449  exit
450}
451
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455  case `echo 'xy\c'` in
456  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
457  xy)  ECHO_C='\c';;
458  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
459       ECHO_T='	';;
460  esac;;
461*)
462  ECHO_N='-n';;
463esac
464
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467  rm -f conf$$.dir/conf$$.file
468else
469  rm -f conf$$.dir
470  mkdir conf$$.dir 2>/dev/null
471fi
472if (echo >conf$$.file) 2>/dev/null; then
473  if ln -s conf$$.file conf$$ 2>/dev/null; then
474    as_ln_s='ln -s'
475    # ... but there are two gotchas:
476    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478    # In both cases, we have to default to `cp -p'.
479    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480      as_ln_s='cp -p'
481  elif ln conf$$.file conf$$ 2>/dev/null; then
482    as_ln_s=ln
483  else
484    as_ln_s='cp -p'
485  fi
486else
487  as_ln_s='cp -p'
488fi
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
491
492if mkdir -p . 2>/dev/null; then
493  as_mkdir_p='mkdir -p "$as_dir"'
494else
495  test -d ./-p && rmdir ./-p
496  as_mkdir_p=false
497fi
498
499if test -x / >/dev/null 2>&1; then
500  as_test_x='test -x'
501else
502  if ls -dL / >/dev/null 2>&1; then
503    as_ls_L_option=L
504  else
505    as_ls_L_option=
506  fi
507  as_test_x='
508    eval sh -c '\''
509      if test -d "$1"; then
510	test -d "$1/.";
511      else
512	case $1 in #(
513	-*)set "./$1";;
514	esac;
515	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516	???[sx]*):;;*)false;;esac;fi
517    '\'' sh
518  '
519fi
520as_executable_p=$as_test_x
521
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
531
532# Name of the host.
533# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537#
538# Initializations.
539#
540ac_default_prefix=/usr/local
541ac_clean_files=
542ac_config_libobj_dir=.
543LIBOBJS=
544cross_compiling=no
545subdirs=
546MFLAGS=
547MAKEFLAGS=
548
549# Identity of this package.
550PACKAGE_NAME=
551PACKAGE_TARNAME=
552PACKAGE_VERSION=
553PACKAGE_STRING=
554PACKAGE_BUGREPORT=
555PACKAGE_URL=
556
557ac_unique_file="export_vars.sh.in"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
561#ifdef HAVE_SYS_TYPES_H
562# include <sys/types.h>
563#endif
564#ifdef HAVE_SYS_STAT_H
565# include <sys/stat.h>
566#endif
567#ifdef STDC_HEADERS
568# include <stdlib.h>
569# include <stddef.h>
570#else
571# ifdef HAVE_STDLIB_H
572#  include <stdlib.h>
573# endif
574#endif
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577#  include <memory.h>
578# endif
579# include <string.h>
580#endif
581#ifdef HAVE_STRINGS_H
582# include <strings.h>
583#endif
584#ifdef HAVE_INTTYPES_H
585# include <inttypes.h>
586#endif
587#ifdef HAVE_STDINT_H
588# include <stdint.h>
589#endif
590#ifdef HAVE_UNISTD_H
591# include <unistd.h>
592#endif"
593
594ac_subst_vars='LTLIBOBJS
595LIBOBJS
596INCLUDE_OUTPUTS
597INCLUDE_RULES
598APRUTIL_LIBS
599APRUTIL_LDFLAGS
600APRUTIL_INCLUDES
601APRUTIL_PRIV_INCLUDES
602APRUTIL_EXPORT_LIBS
603EXTRA_OBJECTS
604APU_MODULES
605APU_DSO_LIBDIR
606APU_HAVE_MODULES
607APRUTIL_LIBNAME
608lib_target
609so_ext
610have_apr_iconv
611have_iconv
612APR_XML_DIR
613apu_dbd_tests
614LDADD_dbd_odbc
615apu_have_odbc
616ODBC_CONFIG
617LDADD_dbd_freetds
618apu_have_freetds
619LDADD_dbd_oracle
620apu_have_oracle
621LDADD_dbd_sqlite2
622apu_have_sqlite2
623LDADD_dbd_sqlite3
624apu_have_sqlite3
625LDADD_dbd_mysql
626apu_have_mysql
627MYSQL_CONFIG
628LDADD_dbd_pgsql
629apu_have_pgsql
630PGSQL_CONFIG
631LDADD_dbm_ndbm
632LDADD_dbm_gdbm
633LDADD_dbm_db
634apu_db_version
635apu_db_header
636apu_have_db
637apu_have_ndbm
638apu_have_gdbm
639apu_have_sdbm
640apu_use_db
641apu_use_ndbm
642apu_use_gdbm
643apu_use_sdbm
644LDADD_ldap
645apu_has_ldap_other
646apu_has_ldap_zos
647apu_has_ldap_tivoli
648apu_has_ldap_mozilla
649apu_has_ldap_netscape
650apu_has_ldap_microsoft
651apu_has_ldap_novell
652apu_has_ldap_solaris
653apu_has_ldap_openldap
654apu_has_ldap
655apu_has_ldapssl_install_routines
656apu_has_ldap_sslinit
657apu_has_ldapssl_init
658apu_has_ldap_start_tls_s
659apu_has_ldapssl_add_trusted_cert
660apu_has_ldapssl_client_deinit
661apu_has_ldapssl_client_init
662ldap_ssl_h
663lber_h
664ldap_h
665LDADD_crypto_nss
666apu_have_nss
667PKG_CONFIG
668apu_have_crypto
669LDADD_crypto_openssl
670apu_have_openssl
671EGREP
672GREP
673CPP
674APR_ICONV_DIR
675apr_shlibpath_var
676APR_BUILD_DIR
677APR_LIBS
678APR_INCLUDES
679OBJEXT
680EXEEXT
681ac_ct_CC
682CPPFLAGS
683LDFLAGS
684CFLAGS
685CC
686APU_LTVERSION
687APRUTIL_MAJOR_VERSION
688APRUTIL_DOTTED_VERSION
689abs_builddir
690abs_srcdir
691top_builddir
692LT_NO_INSTALL
693INSTALL_DATA
694INSTALL_SCRIPT
695INSTALL_PROGRAM
696target_os
697target_vendor
698target_cpu
699target
700host_os
701host_vendor
702host_cpu
703host
704build_os
705build_vendor
706build_cpu
707build
708APU_CONFIG_LOCATION
709target_alias
710host_alias
711build_alias
712LIBS
713ECHO_T
714ECHO_N
715ECHO_C
716DEFS
717mandir
718localedir
719libdir
720psdir
721pdfdir
722dvidir
723htmldir
724infodir
725docdir
726oldincludedir
727includedir
728localstatedir
729sharedstatedir
730sysconfdir
731datadir
732datarootdir
733libexecdir
734sbindir
735bindir
736program_transform_name
737prefix
738exec_prefix
739PACKAGE_URL
740PACKAGE_BUGREPORT
741PACKAGE_STRING
742PACKAGE_VERSION
743PACKAGE_TARNAME
744PACKAGE_NAME
745PATH_SEPARATOR
746SHELL'
747ac_subst_files=''
748ac_user_opts='
749enable_option_checking
750enable_layout
751with_apr
752with_apr_iconv
753with_crypto
754with_openssl
755with_nss
756with_lber
757with_ldap_include
758with_ldap_lib
759with_ldap
760with_dbm
761with_gdbm
762with_ndbm
763with_berkeley_db
764with_pgsql
765with_mysql
766with_sqlite3
767with_sqlite2
768with_oracle_include
769with_oracle
770with_freetds
771with_odbc
772with_expat
773with_iconv
774enable_util_dso
775'
776      ac_precious_vars='build_alias
777host_alias
778target_alias
779CC
780CFLAGS
781LDFLAGS
782LIBS
783CPPFLAGS
784CPP'
785
786
787# Initialize some variables set by options.
788ac_init_help=
789ac_init_version=false
790ac_unrecognized_opts=
791ac_unrecognized_sep=
792# The variables have the same names as the options, with
793# dashes changed to underlines.
794cache_file=/dev/null
795exec_prefix=NONE
796no_create=
797no_recursion=
798prefix=NONE
799program_prefix=NONE
800program_suffix=NONE
801program_transform_name=s,x,x,
802silent=
803site=
804srcdir=
805verbose=
806x_includes=NONE
807x_libraries=NONE
808
809# Installation directory options.
810# These are left unexpanded so users can "make install exec_prefix=/foo"
811# and all the variables that are supposed to be based on exec_prefix
812# by default will actually change.
813# Use braces instead of parens because sh, perl, etc. also accept them.
814# (The list follows the same order as the GNU Coding Standards.)
815bindir='${exec_prefix}/bin'
816sbindir='${exec_prefix}/sbin'
817libexecdir='${exec_prefix}/libexec'
818datarootdir='${prefix}/share'
819datadir='${datarootdir}'
820sysconfdir='${prefix}/etc'
821sharedstatedir='${prefix}/com'
822localstatedir='${prefix}/var'
823includedir='${prefix}/include'
824oldincludedir='/usr/include'
825docdir='${datarootdir}/doc/${PACKAGE}'
826infodir='${datarootdir}/info'
827htmldir='${docdir}'
828dvidir='${docdir}'
829pdfdir='${docdir}'
830psdir='${docdir}'
831libdir='${exec_prefix}/lib'
832localedir='${datarootdir}/locale'
833mandir='${datarootdir}/man'
834
835ac_prev=
836ac_dashdash=
837for ac_option
838do
839  # If the previous option needs an argument, assign it.
840  if test -n "$ac_prev"; then
841    eval $ac_prev=\$ac_option
842    ac_prev=
843    continue
844  fi
845
846  case $ac_option in
847  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
848  *=)   ac_optarg= ;;
849  *)    ac_optarg=yes ;;
850  esac
851
852  # Accept the important Cygnus configure options, so we can diagnose typos.
853
854  case $ac_dashdash$ac_option in
855  --)
856    ac_dashdash=yes ;;
857
858  -bindir | --bindir | --bindi | --bind | --bin | --bi)
859    ac_prev=bindir ;;
860  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
861    bindir=$ac_optarg ;;
862
863  -build | --build | --buil | --bui | --bu)
864    ac_prev=build_alias ;;
865  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
866    build_alias=$ac_optarg ;;
867
868  -cache-file | --cache-file | --cache-fil | --cache-fi \
869  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
870    ac_prev=cache_file ;;
871  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
872  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
873    cache_file=$ac_optarg ;;
874
875  --config-cache | -C)
876    cache_file=config.cache ;;
877
878  -datadir | --datadir | --datadi | --datad)
879    ac_prev=datadir ;;
880  -datadir=* | --datadir=* | --datadi=* | --datad=*)
881    datadir=$ac_optarg ;;
882
883  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
884  | --dataroo | --dataro | --datar)
885    ac_prev=datarootdir ;;
886  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
887  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
888    datarootdir=$ac_optarg ;;
889
890  -disable-* | --disable-*)
891    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
892    # Reject names that are not valid shell variable names.
893    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
894      as_fn_error $? "invalid feature name: $ac_useropt"
895    ac_useropt_orig=$ac_useropt
896    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
897    case $ac_user_opts in
898      *"
899"enable_$ac_useropt"
900"*) ;;
901      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
902	 ac_unrecognized_sep=', ';;
903    esac
904    eval enable_$ac_useropt=no ;;
905
906  -docdir | --docdir | --docdi | --doc | --do)
907    ac_prev=docdir ;;
908  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909    docdir=$ac_optarg ;;
910
911  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912    ac_prev=dvidir ;;
913  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914    dvidir=$ac_optarg ;;
915
916  -enable-* | --enable-*)
917    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
918    # Reject names that are not valid shell variable names.
919    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
920      as_fn_error $? "invalid feature name: $ac_useropt"
921    ac_useropt_orig=$ac_useropt
922    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923    case $ac_user_opts in
924      *"
925"enable_$ac_useropt"
926"*) ;;
927      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
928	 ac_unrecognized_sep=', ';;
929    esac
930    eval enable_$ac_useropt=\$ac_optarg ;;
931
932  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
933  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
934  | --exec | --exe | --ex)
935    ac_prev=exec_prefix ;;
936  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
937  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
938  | --exec=* | --exe=* | --ex=*)
939    exec_prefix=$ac_optarg ;;
940
941  -gas | --gas | --ga | --g)
942    # Obsolete; use --with-gas.
943    with_gas=yes ;;
944
945  -help | --help | --hel | --he | -h)
946    ac_init_help=long ;;
947  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
948    ac_init_help=recursive ;;
949  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
950    ac_init_help=short ;;
951
952  -host | --host | --hos | --ho)
953    ac_prev=host_alias ;;
954  -host=* | --host=* | --hos=* | --ho=*)
955    host_alias=$ac_optarg ;;
956
957  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
958    ac_prev=htmldir ;;
959  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
960  | --ht=*)
961    htmldir=$ac_optarg ;;
962
963  -includedir | --includedir | --includedi | --included | --include \
964  | --includ | --inclu | --incl | --inc)
965    ac_prev=includedir ;;
966  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
967  | --includ=* | --inclu=* | --incl=* | --inc=*)
968    includedir=$ac_optarg ;;
969
970  -infodir | --infodir | --infodi | --infod | --info | --inf)
971    ac_prev=infodir ;;
972  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
973    infodir=$ac_optarg ;;
974
975  -libdir | --libdir | --libdi | --libd)
976    ac_prev=libdir ;;
977  -libdir=* | --libdir=* | --libdi=* | --libd=*)
978    libdir=$ac_optarg ;;
979
980  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
981  | --libexe | --libex | --libe)
982    ac_prev=libexecdir ;;
983  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
984  | --libexe=* | --libex=* | --libe=*)
985    libexecdir=$ac_optarg ;;
986
987  -localedir | --localedir | --localedi | --localed | --locale)
988    ac_prev=localedir ;;
989  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
990    localedir=$ac_optarg ;;
991
992  -localstatedir | --localstatedir | --localstatedi | --localstated \
993  | --localstate | --localstat | --localsta | --localst | --locals)
994    ac_prev=localstatedir ;;
995  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
996  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
997    localstatedir=$ac_optarg ;;
998
999  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1000    ac_prev=mandir ;;
1001  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1002    mandir=$ac_optarg ;;
1003
1004  -nfp | --nfp | --nf)
1005    # Obsolete; use --without-fp.
1006    with_fp=no ;;
1007
1008  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1009  | --no-cr | --no-c | -n)
1010    no_create=yes ;;
1011
1012  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1013  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1014    no_recursion=yes ;;
1015
1016  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1017  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1018  | --oldin | --oldi | --old | --ol | --o)
1019    ac_prev=oldincludedir ;;
1020  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1021  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1022  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1023    oldincludedir=$ac_optarg ;;
1024
1025  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1026    ac_prev=prefix ;;
1027  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1028    prefix=$ac_optarg ;;
1029
1030  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1031  | --program-pre | --program-pr | --program-p)
1032    ac_prev=program_prefix ;;
1033  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1034  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1035    program_prefix=$ac_optarg ;;
1036
1037  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1038  | --program-suf | --program-su | --program-s)
1039    ac_prev=program_suffix ;;
1040  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1041  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1042    program_suffix=$ac_optarg ;;
1043
1044  -program-transform-name | --program-transform-name \
1045  | --program-transform-nam | --program-transform-na \
1046  | --program-transform-n | --program-transform- \
1047  | --program-transform | --program-transfor \
1048  | --program-transfo | --program-transf \
1049  | --program-trans | --program-tran \
1050  | --progr-tra | --program-tr | --program-t)
1051    ac_prev=program_transform_name ;;
1052  -program-transform-name=* | --program-transform-name=* \
1053  | --program-transform-nam=* | --program-transform-na=* \
1054  | --program-transform-n=* | --program-transform-=* \
1055  | --program-transform=* | --program-transfor=* \
1056  | --program-transfo=* | --program-transf=* \
1057  | --program-trans=* | --program-tran=* \
1058  | --progr-tra=* | --program-tr=* | --program-t=*)
1059    program_transform_name=$ac_optarg ;;
1060
1061  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1062    ac_prev=pdfdir ;;
1063  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1064    pdfdir=$ac_optarg ;;
1065
1066  -psdir | --psdir | --psdi | --psd | --ps)
1067    ac_prev=psdir ;;
1068  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1069    psdir=$ac_optarg ;;
1070
1071  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072  | -silent | --silent | --silen | --sile | --sil)
1073    silent=yes ;;
1074
1075  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1076    ac_prev=sbindir ;;
1077  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1078  | --sbi=* | --sb=*)
1079    sbindir=$ac_optarg ;;
1080
1081  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1082  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1083  | --sharedst | --shareds | --shared | --share | --shar \
1084  | --sha | --sh)
1085    ac_prev=sharedstatedir ;;
1086  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1087  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1088  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1089  | --sha=* | --sh=*)
1090    sharedstatedir=$ac_optarg ;;
1091
1092  -site | --site | --sit)
1093    ac_prev=site ;;
1094  -site=* | --site=* | --sit=*)
1095    site=$ac_optarg ;;
1096
1097  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1098    ac_prev=srcdir ;;
1099  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1100    srcdir=$ac_optarg ;;
1101
1102  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1103  | --syscon | --sysco | --sysc | --sys | --sy)
1104    ac_prev=sysconfdir ;;
1105  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1106  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1107    sysconfdir=$ac_optarg ;;
1108
1109  -target | --target | --targe | --targ | --tar | --ta | --t)
1110    ac_prev=target_alias ;;
1111  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1112    target_alias=$ac_optarg ;;
1113
1114  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1115    verbose=yes ;;
1116
1117  -version | --version | --versio | --versi | --vers | -V)
1118    ac_init_version=: ;;
1119
1120  -with-* | --with-*)
1121    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1122    # Reject names that are not valid shell variable names.
1123    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1124      as_fn_error $? "invalid package name: $ac_useropt"
1125    ac_useropt_orig=$ac_useropt
1126    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127    case $ac_user_opts in
1128      *"
1129"with_$ac_useropt"
1130"*) ;;
1131      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1132	 ac_unrecognized_sep=', ';;
1133    esac
1134    eval with_$ac_useropt=\$ac_optarg ;;
1135
1136  -without-* | --without-*)
1137    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1138    # Reject names that are not valid shell variable names.
1139    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1140      as_fn_error $? "invalid package name: $ac_useropt"
1141    ac_useropt_orig=$ac_useropt
1142    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143    case $ac_user_opts in
1144      *"
1145"with_$ac_useropt"
1146"*) ;;
1147      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1148	 ac_unrecognized_sep=', ';;
1149    esac
1150    eval with_$ac_useropt=no ;;
1151
1152  --x)
1153    # Obsolete; use --with-x.
1154    with_x=yes ;;
1155
1156  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1157  | --x-incl | --x-inc | --x-in | --x-i)
1158    ac_prev=x_includes ;;
1159  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1160  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1161    x_includes=$ac_optarg ;;
1162
1163  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1164  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1165    ac_prev=x_libraries ;;
1166  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1167  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1168    x_libraries=$ac_optarg ;;
1169
1170  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1171Try \`$0 --help' for more information"
1172    ;;
1173
1174  *=*)
1175    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1176    # Reject names that are not valid shell variable names.
1177    case $ac_envvar in #(
1178      '' | [0-9]* | *[!_$as_cr_alnum]* )
1179      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1180    esac
1181    eval $ac_envvar=\$ac_optarg
1182    export $ac_envvar ;;
1183
1184  *)
1185    # FIXME: should be removed in autoconf 3.0.
1186    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1187    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1188      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1189    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1190    ;;
1191
1192  esac
1193done
1194
1195if test -n "$ac_prev"; then
1196  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1197  as_fn_error $? "missing argument to $ac_option"
1198fi
1199
1200if test -n "$ac_unrecognized_opts"; then
1201  case $enable_option_checking in
1202    no) ;;
1203    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1204    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1205  esac
1206fi
1207
1208# Check all directory arguments for consistency.
1209for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1210		datadir sysconfdir sharedstatedir localstatedir includedir \
1211		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1212		libdir localedir mandir
1213do
1214  eval ac_val=\$$ac_var
1215  # Remove trailing slashes.
1216  case $ac_val in
1217    */ )
1218      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1219      eval $ac_var=\$ac_val;;
1220  esac
1221  # Be sure to have absolute directory names.
1222  case $ac_val in
1223    [\\/$]* | ?:[\\/]* )  continue;;
1224    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1225  esac
1226  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1227done
1228
1229# There might be people who depend on the old broken behavior: `$host'
1230# used to hold the argument of --host etc.
1231# FIXME: To remove some day.
1232build=$build_alias
1233host=$host_alias
1234target=$target_alias
1235
1236# FIXME: To remove some day.
1237if test "x$host_alias" != x; then
1238  if test "x$build_alias" = x; then
1239    cross_compiling=maybe
1240    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1241    If a cross compiler is detected then cross compile mode will be used" >&2
1242  elif test "x$build_alias" != "x$host_alias"; then
1243    cross_compiling=yes
1244  fi
1245fi
1246
1247ac_tool_prefix=
1248test -n "$host_alias" && ac_tool_prefix=$host_alias-
1249
1250test "$silent" = yes && exec 6>/dev/null
1251
1252
1253ac_pwd=`pwd` && test -n "$ac_pwd" &&
1254ac_ls_di=`ls -di .` &&
1255ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1256  as_fn_error $? "working directory cannot be determined"
1257test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1258  as_fn_error $? "pwd does not report name of working directory"
1259
1260
1261# Find the source files, if location was not specified.
1262if test -z "$srcdir"; then
1263  ac_srcdir_defaulted=yes
1264  # Try the directory containing this script, then the parent directory.
1265  ac_confdir=`$as_dirname -- "$as_myself" ||
1266$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1267	 X"$as_myself" : 'X\(//\)[^/]' \| \
1268	 X"$as_myself" : 'X\(//\)$' \| \
1269	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1270$as_echo X"$as_myself" |
1271    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1272	    s//\1/
1273	    q
1274	  }
1275	  /^X\(\/\/\)[^/].*/{
1276	    s//\1/
1277	    q
1278	  }
1279	  /^X\(\/\/\)$/{
1280	    s//\1/
1281	    q
1282	  }
1283	  /^X\(\/\).*/{
1284	    s//\1/
1285	    q
1286	  }
1287	  s/.*/./; q'`
1288  srcdir=$ac_confdir
1289  if test ! -r "$srcdir/$ac_unique_file"; then
1290    srcdir=..
1291  fi
1292else
1293  ac_srcdir_defaulted=no
1294fi
1295if test ! -r "$srcdir/$ac_unique_file"; then
1296  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1297  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1298fi
1299ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1300ac_abs_confdir=`(
1301	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1302	pwd)`
1303# When building in place, set srcdir=.
1304if test "$ac_abs_confdir" = "$ac_pwd"; then
1305  srcdir=.
1306fi
1307# Remove unnecessary trailing slashes from srcdir.
1308# Double slashes in file names in object file debugging info
1309# mess up M-x gdb in Emacs.
1310case $srcdir in
1311*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1312esac
1313for ac_var in $ac_precious_vars; do
1314  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1315  eval ac_env_${ac_var}_value=\$${ac_var}
1316  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1317  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1318done
1319
1320#
1321# Report the --help message.
1322#
1323if test "$ac_init_help" = "long"; then
1324  # Omit some internal or obsolete options to make the list less imposing.
1325  # This message is too long to be a string in the A/UX 3.1 sh.
1326  cat <<_ACEOF
1327\`configure' configures this package to adapt to many kinds of systems.
1328
1329Usage: $0 [OPTION]... [VAR=VALUE]...
1330
1331To assign environment variables (e.g., CC, CFLAGS...), specify them as
1332VAR=VALUE.  See below for descriptions of some of the useful variables.
1333
1334Defaults for the options are specified in brackets.
1335
1336Configuration:
1337  -h, --help              display this help and exit
1338      --help=short        display options specific to this package
1339      --help=recursive    display the short help of all the included packages
1340  -V, --version           display version information and exit
1341  -q, --quiet, --silent   do not print \`checking ...' messages
1342      --cache-file=FILE   cache test results in FILE [disabled]
1343  -C, --config-cache      alias for \`--cache-file=config.cache'
1344  -n, --no-create         do not create output files
1345      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1346
1347Installation directories:
1348  --prefix=PREFIX         install architecture-independent files in PREFIX
1349                          [$ac_default_prefix]
1350  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1351                          [PREFIX]
1352
1353By default, \`make install' will install all the files in
1354\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1355an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1356for instance \`--prefix=\$HOME'.
1357
1358For better control, use the options below.
1359
1360Fine tuning of the installation directories:
1361  --bindir=DIR            user executables [EPREFIX/bin]
1362  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1363  --libexecdir=DIR        program executables [EPREFIX/libexec]
1364  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1365  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1366  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1367  --libdir=DIR            object code libraries [EPREFIX/lib]
1368  --includedir=DIR        C header files [PREFIX/include]
1369  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1370  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1371  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1372  --infodir=DIR           info documentation [DATAROOTDIR/info]
1373  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1374  --mandir=DIR            man documentation [DATAROOTDIR/man]
1375  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1376  --htmldir=DIR           html documentation [DOCDIR]
1377  --dvidir=DIR            dvi documentation [DOCDIR]
1378  --pdfdir=DIR            pdf documentation [DOCDIR]
1379  --psdir=DIR             ps documentation [DOCDIR]
1380_ACEOF
1381
1382  cat <<\_ACEOF
1383
1384System types:
1385  --build=BUILD     configure for building on BUILD [guessed]
1386  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1387  --target=TARGET   configure for building compilers for TARGET [HOST]
1388_ACEOF
1389fi
1390
1391if test -n "$ac_init_help"; then
1392
1393  cat <<\_ACEOF
1394
1395Optional Features:
1396  --disable-option-checking  ignore unrecognized --enable/--with options
1397  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1398  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1399  --enable-layout=LAYOUT
1400  --disable-util-dso      disable DSO build of modular components (crypto,
1401                          dbd, dbm, ldap)
1402
1403Optional Packages:
1404  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1405  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1406  --with-apr=PATH         prefix for installed APR or the full path to
1407                             apr-config
1408  --with-apr-iconv=DIR    relative path to apr-iconv source
1409  --with-crypto           enable crypto support
1410  --with-openssl=DIR      specify location of OpenSSL
1411  --with-nss=DIR          specify location of NSS
1412  --with-lber=library     lber library to use
1413  --with-ldap-include=path  path to ldap include files with trailing slash
1414  --with-ldap-lib=path    path to ldap lib file
1415  --with-ldap=library     ldap library to use
1416  --with-dbm=DBM          choose the DBM type to use.
1417                          DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X}
1418                          for some X=0,...,9
1419  --with-gdbm=DIR         enable GDBM support
1420  --with-ndbm=PATH        Find the NDBM header and library in `PATH/include'
1421                          and `PATH/lib'. If PATH is of the form `HEADER:LIB',
1422                          then search for header files in HEADER, and the
1423                          library in LIB. If you omit the `=PATH' part
1424                          completely, the configure script will search for
1425                          NDBM in a number of standard places.
1426  --with-berkeley-db=PATH Find the Berkeley DB header and library in
1427                          `PATH/include' and `PATH/lib'. If PATH is of the
1428                          form `HEADER:LIB', then search for header files in
1429                          HEADER, and the library in LIB. If you omit the
1430                          `=PATH' part completely, the configure script will
1431                          search for Berkeley DB in a number of standard
1432                          places.
1433  --with-pgsql=DIR        specify PostgreSQL location
1434  --with-mysql=DIR        enable MySQL DBD driver
1435  --with-sqlite3=DIR      enable sqlite3 DBD driver
1436  --with-sqlite2=DIR      enable sqlite2 DBD driver
1437  --with-oracle-include=DIR
1438                          path to Oracle include files
1439  --with-oracle=DIR       enable Oracle DBD driver; giving ORACLE_HOME as DIR
1440  --with-freetds=DIR      specify FreeTDS location
1441  --with-odbc=DIR         specify ODBC location
1442  --with-expat=DIR        specify Expat location, or 'builtin'
1443  --with-iconv=DIR        path to iconv installation
1444
1445Some influential environment variables:
1446  CC          C compiler command
1447  CFLAGS      C compiler flags
1448  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1449              nonstandard directory <lib dir>
1450  LIBS        libraries to pass to the linker, e.g. -l<library>
1451  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1452              you have headers in a nonstandard directory <include dir>
1453  CPP         C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
1458Report bugs to the package provider.
1459_ACEOF
1460ac_status=$?
1461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464  # If there are subdirs, report their specific --help.
1465  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1466    test -d "$ac_dir" ||
1467      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468      continue
1469    ac_builddir=.
1470
1471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
1474  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1475  # A ".." for each directory in $ac_dir_suffix.
1476  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1477  case $ac_top_builddir_sub in
1478  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480  esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
1486
1487case $srcdir in
1488  .)  # We are building in place.
1489    ac_srcdir=.
1490    ac_top_srcdir=$ac_top_builddir_sub
1491    ac_abs_top_srcdir=$ac_pwd ;;
1492  [\\/]* | ?:[\\/]* )  # Absolute name.
1493    ac_srcdir=$srcdir$ac_dir_suffix;
1494    ac_top_srcdir=$srcdir
1495    ac_abs_top_srcdir=$srcdir ;;
1496  *) # Relative name.
1497    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498    ac_top_srcdir=$ac_top_build_prefix$srcdir
1499    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1500esac
1501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1502
1503    cd "$ac_dir" || { ac_status=$?; continue; }
1504    # Check for guested configure.
1505    if test -f "$ac_srcdir/configure.gnu"; then
1506      echo &&
1507      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508    elif test -f "$ac_srcdir/configure"; then
1509      echo &&
1510      $SHELL "$ac_srcdir/configure" --help=recursive
1511    else
1512      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1513    fi || ac_status=$?
1514    cd "$ac_pwd" || { ac_status=$?; break; }
1515  done
1516fi
1517
1518test -n "$ac_init_help" && exit $ac_status
1519if $ac_init_version; then
1520  cat <<\_ACEOF
1521configure
1522generated by GNU Autoconf 2.67
1523
1524Copyright (C) 2010 Free Software Foundation, Inc.
1525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
1528  exit
1529fi
1530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541  rm -f conftest.$ac_objext
1542  if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545  *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549  (eval "$ac_compile") 2>conftest.err
1550  ac_status=$?
1551  if test -s conftest.err; then
1552    grep -v '^ *+' conftest.err >conftest.er1
1553    cat conftest.er1 >&5
1554    mv -f conftest.er1 conftest.err
1555  fi
1556  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557  test $ac_status = 0; } && {
1558	 test -z "$ac_c_werror_flag" ||
1559	 test ! -s conftest.err
1560       } && test -s conftest.$ac_objext; then :
1561  ac_retval=0
1562else
1563  $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566	ac_retval=1
1567fi
1568  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1569  as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
1573# ac_fn_c_try_link LINENO
1574# -----------------------
1575# Try to link conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_link ()
1577{
1578  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579  rm -f conftest.$ac_objext conftest$ac_exeext
1580  if { { ac_try="$ac_link"
1581case "(($ac_try" in
1582  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583  *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587  (eval "$ac_link") 2>conftest.err
1588  ac_status=$?
1589  if test -s conftest.err; then
1590    grep -v '^ *+' conftest.err >conftest.er1
1591    cat conftest.er1 >&5
1592    mv -f conftest.er1 conftest.err
1593  fi
1594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1595  test $ac_status = 0; } && {
1596	 test -z "$ac_c_werror_flag" ||
1597	 test ! -s conftest.err
1598       } && test -s conftest$ac_exeext && {
1599	 test "$cross_compiling" = yes ||
1600	 $as_test_x conftest$ac_exeext
1601       }; then :
1602  ac_retval=0
1603else
1604  $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607	ac_retval=1
1608fi
1609  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1610  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1611  # interfere with the next link command; also delete a directory that is
1612  # left behind by Apple's compiler.  We do this before executing the actions.
1613  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1614  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1615  as_fn_set_status $ac_retval
1616
1617} # ac_fn_c_try_link
1618
1619# ac_fn_c_try_cpp LINENO
1620# ----------------------
1621# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1622ac_fn_c_try_cpp ()
1623{
1624  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625  if { { ac_try="$ac_cpp conftest.$ac_ext"
1626case "(($ac_try" in
1627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628  *) ac_try_echo=$ac_try;;
1629esac
1630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631$as_echo "$ac_try_echo"; } >&5
1632  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1633  ac_status=$?
1634  if test -s conftest.err; then
1635    grep -v '^ *+' conftest.err >conftest.er1
1636    cat conftest.er1 >&5
1637    mv -f conftest.er1 conftest.err
1638  fi
1639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1640  test $ac_status = 0; } > conftest.i && {
1641	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1642	 test ! -s conftest.err
1643       }; then :
1644  ac_retval=0
1645else
1646  $as_echo "$as_me: failed program was:" >&5
1647sed 's/^/| /' conftest.$ac_ext >&5
1648
1649    ac_retval=1
1650fi
1651  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1652  as_fn_set_status $ac_retval
1653
1654} # ac_fn_c_try_cpp
1655
1656# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1657# -------------------------------------------------------
1658# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1659# the include files in INCLUDES and setting the cache variable VAR
1660# accordingly.
1661ac_fn_c_check_header_mongrel ()
1662{
1663  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664  if eval "test \"\${$3+set}\"" = set; then :
1665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1666$as_echo_n "checking for $2... " >&6; }
1667if eval "test \"\${$3+set}\"" = set; then :
1668  $as_echo_n "(cached) " >&6
1669fi
1670eval ac_res=\$$3
1671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1672$as_echo "$ac_res" >&6; }
1673else
1674  # Is the header compilable?
1675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1676$as_echo_n "checking $2 usability... " >&6; }
1677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1678/* end confdefs.h.  */
1679$4
1680#include <$2>
1681_ACEOF
1682if ac_fn_c_try_compile "$LINENO"; then :
1683  ac_header_compiler=yes
1684else
1685  ac_header_compiler=no
1686fi
1687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1689$as_echo "$ac_header_compiler" >&6; }
1690
1691# Is the header present?
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1693$as_echo_n "checking $2 presence... " >&6; }
1694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1695/* end confdefs.h.  */
1696#include <$2>
1697_ACEOF
1698if ac_fn_c_try_cpp "$LINENO"; then :
1699  ac_header_preproc=yes
1700else
1701  ac_header_preproc=no
1702fi
1703rm -f conftest.err conftest.i conftest.$ac_ext
1704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1705$as_echo "$ac_header_preproc" >&6; }
1706
1707# So?  What about this header?
1708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1709  yes:no: )
1710    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1711$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1712    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1713$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1714    ;;
1715  no:yes:* )
1716    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1717$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1719$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1720    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1721$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1722    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1723$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1724    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1725$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1726    ;;
1727esac
1728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
1730if eval "test \"\${$3+set}\"" = set; then :
1731  $as_echo_n "(cached) " >&6
1732else
1733  eval "$3=\$ac_header_compiler"
1734fi
1735eval ac_res=\$$3
1736	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1737$as_echo "$ac_res" >&6; }
1738fi
1739  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1740
1741} # ac_fn_c_check_header_mongrel
1742
1743# ac_fn_c_try_run LINENO
1744# ----------------------
1745# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1746# that executables *can* be run.
1747ac_fn_c_try_run ()
1748{
1749  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750  if { { ac_try="$ac_link"
1751case "(($ac_try" in
1752  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1753  *) ac_try_echo=$ac_try;;
1754esac
1755eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1756$as_echo "$ac_try_echo"; } >&5
1757  (eval "$ac_link") 2>&5
1758  ac_status=$?
1759  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1760  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1761  { { case "(($ac_try" in
1762  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763  *) ac_try_echo=$ac_try;;
1764esac
1765eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1766$as_echo "$ac_try_echo"; } >&5
1767  (eval "$ac_try") 2>&5
1768  ac_status=$?
1769  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770  test $ac_status = 0; }; }; then :
1771  ac_retval=0
1772else
1773  $as_echo "$as_me: program exited with status $ac_status" >&5
1774       $as_echo "$as_me: failed program was:" >&5
1775sed 's/^/| /' conftest.$ac_ext >&5
1776
1777       ac_retval=$ac_status
1778fi
1779  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1780  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1781  as_fn_set_status $ac_retval
1782
1783} # ac_fn_c_try_run
1784
1785# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1786# -------------------------------------------------------
1787# Tests whether HEADER exists and can be compiled using the include files in
1788# INCLUDES, setting the cache variable VAR accordingly.
1789ac_fn_c_check_header_compile ()
1790{
1791  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1793$as_echo_n "checking for $2... " >&6; }
1794if eval "test \"\${$3+set}\"" = set; then :
1795  $as_echo_n "(cached) " >&6
1796else
1797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h.  */
1799$4
1800#include <$2>
1801_ACEOF
1802if ac_fn_c_try_compile "$LINENO"; then :
1803  eval "$3=yes"
1804else
1805  eval "$3=no"
1806fi
1807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1808fi
1809eval ac_res=\$$3
1810	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1811$as_echo "$ac_res" >&6; }
1812  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1813
1814} # ac_fn_c_check_header_compile
1815
1816# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1817# ---------------------------------------------
1818# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1819# accordingly.
1820ac_fn_c_check_decl ()
1821{
1822  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1823  as_decl_name=`echo $2|sed 's/ *(.*//'`
1824  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1826$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1827if eval "test \"\${$3+set}\"" = set; then :
1828  $as_echo_n "(cached) " >&6
1829else
1830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h.  */
1832$4
1833int
1834main ()
1835{
1836#ifndef $as_decl_name
1837#ifdef __cplusplus
1838  (void) $as_decl_use;
1839#else
1840  (void) $as_decl_name;
1841#endif
1842#endif
1843
1844  ;
1845  return 0;
1846}
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849  eval "$3=yes"
1850else
1851  eval "$3=no"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855eval ac_res=\$$3
1856	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857$as_echo "$ac_res" >&6; }
1858  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1859
1860} # ac_fn_c_check_decl
1861
1862# ac_fn_c_check_func LINENO FUNC VAR
1863# ----------------------------------
1864# Tests whether FUNC exists, setting the cache variable VAR accordingly
1865ac_fn_c_check_func ()
1866{
1867  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1869$as_echo_n "checking for $2... " >&6; }
1870if eval "test \"\${$3+set}\"" = set; then :
1871  $as_echo_n "(cached) " >&6
1872else
1873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h.  */
1875/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1876   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1877#define $2 innocuous_$2
1878
1879/* System header to define __stub macros and hopefully few prototypes,
1880    which can conflict with char $2 (); below.
1881    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1882    <limits.h> exists even on freestanding compilers.  */
1883
1884#ifdef __STDC__
1885# include <limits.h>
1886#else
1887# include <assert.h>
1888#endif
1889
1890#undef $2
1891
1892/* Override any GCC internal prototype to avoid an error.
1893   Use char because int might match the return type of a GCC
1894   builtin and then its argument prototype would still apply.  */
1895#ifdef __cplusplus
1896extern "C"
1897#endif
1898char $2 ();
1899/* The GNU C library defines this for functions which it implements
1900    to always fail with ENOSYS.  Some functions are actually named
1901    something starting with __ and the normal name is an alias.  */
1902#if defined __stub_$2 || defined __stub___$2
1903choke me
1904#endif
1905
1906int
1907main ()
1908{
1909return $2 ();
1910  ;
1911  return 0;
1912}
1913_ACEOF
1914if ac_fn_c_try_link "$LINENO"; then :
1915  eval "$3=yes"
1916else
1917  eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext \
1920    conftest$ac_exeext conftest.$ac_ext
1921fi
1922eval ac_res=\$$3
1923	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
1925  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1926
1927} # ac_fn_c_check_func
1928cat >config.log <<_ACEOF
1929This file contains any messages produced by compilers while
1930running configure, to aid debugging if configure makes a mistake.
1931
1932It was created by $as_me, which was
1933generated by GNU Autoconf 2.67.  Invocation command line was
1934
1935  $ $0 $@
1936
1937_ACEOF
1938exec 5>>config.log
1939{
1940cat <<_ASUNAME
1941## --------- ##
1942## Platform. ##
1943## --------- ##
1944
1945hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1946uname -m = `(uname -m) 2>/dev/null || echo unknown`
1947uname -r = `(uname -r) 2>/dev/null || echo unknown`
1948uname -s = `(uname -s) 2>/dev/null || echo unknown`
1949uname -v = `(uname -v) 2>/dev/null || echo unknown`
1950
1951/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1952/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1953
1954/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1955/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1956/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1957/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1958/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1959/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1960/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1961
1962_ASUNAME
1963
1964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1965for as_dir in $PATH
1966do
1967  IFS=$as_save_IFS
1968  test -z "$as_dir" && as_dir=.
1969    $as_echo "PATH: $as_dir"
1970  done
1971IFS=$as_save_IFS
1972
1973} >&5
1974
1975cat >&5 <<_ACEOF
1976
1977
1978## ----------- ##
1979## Core tests. ##
1980## ----------- ##
1981
1982_ACEOF
1983
1984
1985# Keep a trace of the command line.
1986# Strip out --no-create and --no-recursion so they do not pile up.
1987# Strip out --silent because we don't want to record it for future runs.
1988# Also quote any args containing shell meta-characters.
1989# Make two passes to allow for proper duplicate-argument suppression.
1990ac_configure_args=
1991ac_configure_args0=
1992ac_configure_args1=
1993ac_must_keep_next=false
1994for ac_pass in 1 2
1995do
1996  for ac_arg
1997  do
1998    case $ac_arg in
1999    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2000    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2001    | -silent | --silent | --silen | --sile | --sil)
2002      continue ;;
2003    *\'*)
2004      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2005    esac
2006    case $ac_pass in
2007    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2008    2)
2009      as_fn_append ac_configure_args1 " '$ac_arg'"
2010      if test $ac_must_keep_next = true; then
2011	ac_must_keep_next=false # Got value, back to normal.
2012      else
2013	case $ac_arg in
2014	  *=* | --config-cache | -C | -disable-* | --disable-* \
2015	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2016	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2017	  | -with-* | --with-* | -without-* | --without-* | --x)
2018	    case "$ac_configure_args0 " in
2019	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2020	    esac
2021	    ;;
2022	  -* ) ac_must_keep_next=true ;;
2023	esac
2024      fi
2025      as_fn_append ac_configure_args " '$ac_arg'"
2026      ;;
2027    esac
2028  done
2029done
2030{ ac_configure_args0=; unset ac_configure_args0;}
2031{ ac_configure_args1=; unset ac_configure_args1;}
2032
2033# When interrupted or exit'd, cleanup temporary files, and complete
2034# config.log.  We remove comments because anyway the quotes in there
2035# would cause problems or look ugly.
2036# WARNING: Use '\'' to represent an apostrophe within the trap.
2037# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2038trap 'exit_status=$?
2039  # Save into config.log some information that might help in debugging.
2040  {
2041    echo
2042
2043    $as_echo "## ---------------- ##
2044## Cache variables. ##
2045## ---------------- ##"
2046    echo
2047    # The following way of writing the cache mishandles newlines in values,
2048(
2049  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2050    eval ac_val=\$$ac_var
2051    case $ac_val in #(
2052    *${as_nl}*)
2053      case $ac_var in #(
2054      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2055$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2056      esac
2057      case $ac_var in #(
2058      _ | IFS | as_nl) ;; #(
2059      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2060      *) { eval $ac_var=; unset $ac_var;} ;;
2061      esac ;;
2062    esac
2063  done
2064  (set) 2>&1 |
2065    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2066    *${as_nl}ac_space=\ *)
2067      sed -n \
2068	"s/'\''/'\''\\\\'\'''\''/g;
2069	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2070      ;; #(
2071    *)
2072      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2073      ;;
2074    esac |
2075    sort
2076)
2077    echo
2078
2079    $as_echo "## ----------------- ##
2080## Output variables. ##
2081## ----------------- ##"
2082    echo
2083    for ac_var in $ac_subst_vars
2084    do
2085      eval ac_val=\$$ac_var
2086      case $ac_val in
2087      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2088      esac
2089      $as_echo "$ac_var='\''$ac_val'\''"
2090    done | sort
2091    echo
2092
2093    if test -n "$ac_subst_files"; then
2094      $as_echo "## ------------------- ##
2095## File substitutions. ##
2096## ------------------- ##"
2097      echo
2098      for ac_var in $ac_subst_files
2099      do
2100	eval ac_val=\$$ac_var
2101	case $ac_val in
2102	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2103	esac
2104	$as_echo "$ac_var='\''$ac_val'\''"
2105      done | sort
2106      echo
2107    fi
2108
2109    if test -s confdefs.h; then
2110      $as_echo "## ----------- ##
2111## confdefs.h. ##
2112## ----------- ##"
2113      echo
2114      cat confdefs.h
2115      echo
2116    fi
2117    test "$ac_signal" != 0 &&
2118      $as_echo "$as_me: caught signal $ac_signal"
2119    $as_echo "$as_me: exit $exit_status"
2120  } >&5
2121  rm -f core *.core core.conftest.* &&
2122    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2123    exit $exit_status
2124' 0
2125for ac_signal in 1 2 13 15; do
2126  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2127done
2128ac_signal=0
2129
2130# confdefs.h avoids OS command line length limits that DEFS can exceed.
2131rm -f -r conftest* confdefs.h
2132
2133$as_echo "/* confdefs.h */" > confdefs.h
2134
2135# Predefined preprocessor variables.
2136
2137cat >>confdefs.h <<_ACEOF
2138#define PACKAGE_NAME "$PACKAGE_NAME"
2139_ACEOF
2140
2141cat >>confdefs.h <<_ACEOF
2142#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2143_ACEOF
2144
2145cat >>confdefs.h <<_ACEOF
2146#define PACKAGE_VERSION "$PACKAGE_VERSION"
2147_ACEOF
2148
2149cat >>confdefs.h <<_ACEOF
2150#define PACKAGE_STRING "$PACKAGE_STRING"
2151_ACEOF
2152
2153cat >>confdefs.h <<_ACEOF
2154#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2155_ACEOF
2156
2157cat >>confdefs.h <<_ACEOF
2158#define PACKAGE_URL "$PACKAGE_URL"
2159_ACEOF
2160
2161
2162# Let the site file select an alternate cache file if it wants to.
2163# Prefer an explicitly selected file to automatically selected ones.
2164ac_site_file1=NONE
2165ac_site_file2=NONE
2166if test -n "$CONFIG_SITE"; then
2167  # We do not want a PATH search for config.site.
2168  case $CONFIG_SITE in #((
2169    -*)  ac_site_file1=./$CONFIG_SITE;;
2170    */*) ac_site_file1=$CONFIG_SITE;;
2171    *)   ac_site_file1=./$CONFIG_SITE;;
2172  esac
2173elif test "x$prefix" != xNONE; then
2174  ac_site_file1=$prefix/share/config.site
2175  ac_site_file2=$prefix/etc/config.site
2176else
2177  ac_site_file1=$ac_default_prefix/share/config.site
2178  ac_site_file2=$ac_default_prefix/etc/config.site
2179fi
2180for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2181do
2182  test "x$ac_site_file" = xNONE && continue
2183  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2184    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2185$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2186    sed 's/^/| /' "$ac_site_file" >&5
2187    . "$ac_site_file" \
2188      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2190as_fn_error $? "failed to load site script $ac_site_file
2191See \`config.log' for more details" "$LINENO" 5; }
2192  fi
2193done
2194
2195if test -r "$cache_file"; then
2196  # Some versions of bash will fail to source /dev/null (special files
2197  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2198  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2199    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2200$as_echo "$as_me: loading cache $cache_file" >&6;}
2201    case $cache_file in
2202      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2203      *)                      . "./$cache_file";;
2204    esac
2205  fi
2206else
2207  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2208$as_echo "$as_me: creating cache $cache_file" >&6;}
2209  >$cache_file
2210fi
2211
2212# Check that the precious variables saved in the cache have kept the same
2213# value.
2214ac_cache_corrupted=false
2215for ac_var in $ac_precious_vars; do
2216  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2217  eval ac_new_set=\$ac_env_${ac_var}_set
2218  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2219  eval ac_new_val=\$ac_env_${ac_var}_value
2220  case $ac_old_set,$ac_new_set in
2221    set,)
2222      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2223$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2224      ac_cache_corrupted=: ;;
2225    ,set)
2226      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2227$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2228      ac_cache_corrupted=: ;;
2229    ,);;
2230    *)
2231      if test "x$ac_old_val" != "x$ac_new_val"; then
2232	# differences in whitespace do not lead to failure.
2233	ac_old_val_w=`echo x $ac_old_val`
2234	ac_new_val_w=`echo x $ac_new_val`
2235	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2236	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2237$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2238	  ac_cache_corrupted=:
2239	else
2240	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2241$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2242	  eval $ac_var=\$ac_old_val
2243	fi
2244	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2245$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2246	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2247$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2248      fi;;
2249  esac
2250  # Pass precious variables to config.status.
2251  if test "$ac_new_set" = set; then
2252    case $ac_new_val in
2253    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2254    *) ac_arg=$ac_var=$ac_new_val ;;
2255    esac
2256    case " $ac_configure_args " in
2257      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2258      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2259    esac
2260  fi
2261done
2262if $ac_cache_corrupted; then
2263  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2265  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2266$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2267  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2268fi
2269## -------------------- ##
2270## Main body of script. ##
2271## -------------------- ##
2272
2273ac_ext=c
2274ac_cpp='$CPP $CPPFLAGS'
2275ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2276ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2277ac_compiler_gnu=$ac_cv_c_compiler_gnu
2278
2279
2280
2281ac_config_headers="$ac_config_headers include/private/apu_config.h"
2282
2283ac_aux_dir=
2284for ac_dir in build "$srcdir"/build; do
2285  if test -f "$ac_dir/install-sh"; then
2286    ac_aux_dir=$ac_dir
2287    ac_install_sh="$ac_aux_dir/install-sh -c"
2288    break
2289  elif test -f "$ac_dir/install.sh"; then
2290    ac_aux_dir=$ac_dir
2291    ac_install_sh="$ac_aux_dir/install.sh -c"
2292    break
2293  elif test -f "$ac_dir/shtool"; then
2294    ac_aux_dir=$ac_dir
2295    ac_install_sh="$ac_aux_dir/shtool install -c"
2296    break
2297  fi
2298done
2299if test -z "$ac_aux_dir"; then
2300  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2301fi
2302
2303# These three variables are undocumented and unsupported,
2304# and are intended to be withdrawn in a future Autoconf release.
2305# They can cause serious problems if a builder's source tree is in a directory
2306# whose full name contains unusual characters.
2307ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2308ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2309ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487  rm -f config.nice
2488  cat >config.nice<<EOF
2489#! /bin/sh
2490#
2491# Created by configure
2492
2493EOF
2494  if test -n "$CC"; then
2495    echo "CC=\"$CC\"; export CC" >> config.nice
2496  fi
2497  if test -n "$CFLAGS"; then
2498    echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> config.nice
2499  fi
2500  if test -n "$CPPFLAGS"; then
2501    echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> config.nice
2502  fi
2503  if test -n "$LDFLAGS"; then
2504    echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> config.nice
2505  fi
2506  if test -n "$LTFLAGS"; then
2507    echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> config.nice
2508  fi
2509  if test -n "$LIBS"; then
2510    echo "LIBS=\"$LIBS\"; export LIBS" >> config.nice
2511  fi
2512  if test -n "$INCLUDES"; then
2513    echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> config.nice
2514  fi
2515  if test -n "$NOTEST_CFLAGS"; then
2516    echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> config.nice
2517  fi
2518  if test -n "$NOTEST_CPPFLAGS"; then
2519    echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> config.nice
2520  fi
2521  if test -n "$NOTEST_LDFLAGS"; then
2522    echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> config.nice
2523  fi
2524  if test -n "$NOTEST_LIBS"; then
2525    echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> config.nice
2526  fi
2527
2528  # Retrieve command-line arguments.
2529  eval "set x $0 $ac_configure_args"
2530  shift
2531
2532  for arg
2533  do
2534
2535ap_last=
2536ap_cur="$arg"
2537while test "x${ap_cur}" != "x${ap_last}";
2538do
2539  ap_last="${ap_cur}"
2540  ap_cur=`eval "echo ${ap_cur}"`
2541done
2542arg="${ap_cur}"
2543
2544    echo "\"$arg\" \\" >> config.nice
2545  done
2546  echo '"$@"' >> config.nice
2547  chmod +x config.nice
2548
2549
2550
2551abs_srcdir=`(cd $srcdir && pwd)`
2552abs_builddir=`pwd`
2553
2554if test "$abs_builddir" != "$abs_srcdir"; then
2555  USE_VPATH=1
2556  APU_CONFIG_LOCATION=build
2557else
2558  APU_CONFIG_LOCATION=source
2559fi
2560
2561
2562
2563# Make sure we can run config.sub.
2564$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2565  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2566
2567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2568$as_echo_n "checking build system type... " >&6; }
2569if test "${ac_cv_build+set}" = set; then :
2570  $as_echo_n "(cached) " >&6
2571else
2572  ac_build_alias=$build_alias
2573test "x$ac_build_alias" = x &&
2574  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2575test "x$ac_build_alias" = x &&
2576  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2577ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2578  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2579
2580fi
2581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2582$as_echo "$ac_cv_build" >&6; }
2583case $ac_cv_build in
2584*-*-*) ;;
2585*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2586esac
2587build=$ac_cv_build
2588ac_save_IFS=$IFS; IFS='-'
2589set x $ac_cv_build
2590shift
2591build_cpu=$1
2592build_vendor=$2
2593shift; shift
2594# Remember, the first character of IFS is used to create $*,
2595# except with old shells:
2596build_os=$*
2597IFS=$ac_save_IFS
2598case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2599
2600
2601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2602$as_echo_n "checking host system type... " >&6; }
2603if test "${ac_cv_host+set}" = set; then :
2604  $as_echo_n "(cached) " >&6
2605else
2606  if test "x$host_alias" = x; then
2607  ac_cv_host=$ac_cv_build
2608else
2609  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2610    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2611fi
2612
2613fi
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2615$as_echo "$ac_cv_host" >&6; }
2616case $ac_cv_host in
2617*-*-*) ;;
2618*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2619esac
2620host=$ac_cv_host
2621ac_save_IFS=$IFS; IFS='-'
2622set x $ac_cv_host
2623shift
2624host_cpu=$1
2625host_vendor=$2
2626shift; shift
2627# Remember, the first character of IFS is used to create $*,
2628# except with old shells:
2629host_os=$*
2630IFS=$ac_save_IFS
2631case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2632
2633
2634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2635$as_echo_n "checking target system type... " >&6; }
2636if test "${ac_cv_target+set}" = set; then :
2637  $as_echo_n "(cached) " >&6
2638else
2639  if test "x$target_alias" = x; then
2640  ac_cv_target=$ac_cv_host
2641else
2642  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2643    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2644fi
2645
2646fi
2647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2648$as_echo "$ac_cv_target" >&6; }
2649case $ac_cv_target in
2650*-*-*) ;;
2651*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2652esac
2653target=$ac_cv_target
2654ac_save_IFS=$IFS; IFS='-'
2655set x $ac_cv_target
2656shift
2657target_cpu=$1
2658target_vendor=$2
2659shift; shift
2660# Remember, the first character of IFS is used to create $*,
2661# except with old shells:
2662target_os=$*
2663IFS=$ac_save_IFS
2664case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2665
2666
2667# The aliases save the names the user supplied, while $host etc.
2668# will get canonicalized.
2669test -n "$target_alias" &&
2670  test "$program_prefix$program_suffix$program_transform_name" = \
2671    NONENONEs,x,x, &&
2672  program_prefix=${target_alias}-
2673
2674
2675# Find a good install program.  We prefer a C program (faster),
2676# so one script is as good as another.  But avoid the broken or
2677# incompatible versions:
2678# SysV /etc/install, /usr/sbin/install
2679# SunOS /usr/etc/install
2680# IRIX /sbin/install
2681# AIX /bin/install
2682# AmigaOS /C/install, which installs bootblocks on floppy discs
2683# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2684# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2685# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2686# OS/2's system install, which has a completely different semantic
2687# ./install, which can be erroneously created by make from ./install.sh.
2688# Reject install programs that cannot install multiple files.
2689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2690$as_echo_n "checking for a BSD-compatible install... " >&6; }
2691if test -z "$INSTALL"; then
2692if test "${ac_cv_path_install+set}" = set; then :
2693  $as_echo_n "(cached) " >&6
2694else
2695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2696for as_dir in $PATH
2697do
2698  IFS=$as_save_IFS
2699  test -z "$as_dir" && as_dir=.
2700    # Account for people who put trailing slashes in PATH elements.
2701case $as_dir/ in #((
2702  ./ | .// | /[cC]/* | \
2703  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2704  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2705  /usr/ucb/* ) ;;
2706  *)
2707    # OSF1 and SCO ODT 3.0 have their own names for install.
2708    # Don't use installbsd from OSF since it installs stuff as root
2709    # by default.
2710    for ac_prog in ginstall scoinst install; do
2711      for ac_exec_ext in '' $ac_executable_extensions; do
2712	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2713	  if test $ac_prog = install &&
2714	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2715	    # AIX install.  It has an incompatible calling convention.
2716	    :
2717	  elif test $ac_prog = install &&
2718	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2719	    # program-specific install script used by HP pwplus--don't use.
2720	    :
2721	  else
2722	    rm -rf conftest.one conftest.two conftest.dir
2723	    echo one > conftest.one
2724	    echo two > conftest.two
2725	    mkdir conftest.dir
2726	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2727	      test -s conftest.one && test -s conftest.two &&
2728	      test -s conftest.dir/conftest.one &&
2729	      test -s conftest.dir/conftest.two
2730	    then
2731	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2732	      break 3
2733	    fi
2734	  fi
2735	fi
2736      done
2737    done
2738    ;;
2739esac
2740
2741  done
2742IFS=$as_save_IFS
2743
2744rm -rf conftest.one conftest.two conftest.dir
2745
2746fi
2747  if test "${ac_cv_path_install+set}" = set; then
2748    INSTALL=$ac_cv_path_install
2749  else
2750    # As a last resort, use the slow shell script.  Don't cache a
2751    # value for INSTALL within a source directory, because that will
2752    # break other packages using the cache if that directory is
2753    # removed, or if the value is a relative name.
2754    INSTALL=$ac_install_sh
2755  fi
2756fi
2757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2758$as_echo "$INSTALL" >&6; }
2759
2760# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2761# It thinks the first close brace ends the variable substitution.
2762test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2763
2764test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2765
2766test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2767
2768
2769# Use -no-install or -no-fast-install to link the test
2770# programs on all platforms but Darwin, where it would cause
2771# the programs to be linked against installed versions of
2772# libapr instead of those just built.
2773case $host in
2774    *-apple-darwin*)
2775        LT_NO_INSTALL=""
2776        ;;
2777    *-mingw*)
2778        LT_NO_INSTALL="-no-fast-install"
2779        ;;
2780    *)
2781        LT_NO_INSTALL="-no-install"
2782        ;;
2783esac
2784
2785
2786top_builddir="$abs_builddir"
2787
2788
2789
2790
2791
2792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkdir -p" >&5
2793$as_echo_n "checking for working mkdir -p... " >&6; }
2794if test "${ac_cv_mkdir_p+set}" = set; then :
2795  $as_echo_n "(cached) " >&6
2796else
2797
2798    test -d conftestdir && rm -rf conftestdir
2799    mkdir -p conftestdir/somedir >/dev/null 2>&1
2800    if test -d conftestdir/somedir; then
2801      ac_cv_mkdir_p=yes
2802    else
2803      ac_cv_mkdir_p=no
2804    fi
2805    rm -rf conftestdir
2806
2807fi
2808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_p" >&5
2809$as_echo "$ac_cv_mkdir_p" >&6; }
2810  if test "$ac_cv_mkdir_p" = "yes"; then
2811      mkdir_p="mkdir -p"
2812  else
2813      mkdir_p="$abs_srcdir/build/mkdir.sh"
2814  fi
2815
2816
2817get_version="$abs_srcdir/build/get-version.sh"
2818version_hdr="$abs_srcdir/include/apu_version.h"
2819APRUTIL_MAJOR_VERSION="`$get_version major $version_hdr APU`"
2820APRUTIL_DOTTED_VERSION="`$get_version all $version_hdr APU`"
2821
2822APU_LTVERSION="-version-info `$get_version libtool $version_hdr APU`"
2823
2824
2825
2826
2827
2828echo "APR-util Version: ${APRUTIL_DOTTED_VERSION}"
2829
2830
2831# Check whether --enable-layout was given.
2832if test "${enable_layout+set}" = set; then :
2833  enableval=$enable_layout;
2834  LAYOUT=$enableval
2835
2836fi
2837
2838
2839if test -z "$LAYOUT"; then
2840  LAYOUT="apr-util"
2841fi
2842
2843  if test ! -f $srcdir/config.layout; then
2844    echo "** Error: Layout file $srcdir/config.layout not found"
2845    echo "** Error: Cannot use undefined layout '$LAYOUT'"
2846    exit 1
2847  fi
2848  # Catch layout names including a slash which will otherwise
2849  # confuse the heck out of the sed script.
2850  case $LAYOUT in
2851  */*)
2852    echo "** Error: $LAYOUT is not a valid layout name"
2853    exit 1 ;;
2854  esac
2855  pldconf=./config.pld
2856
2857  sed -e "1s/[ 	]*<[lL]ayout[ 	]*$LAYOUT[ 	]*>[ 	]*//;1t" \
2858      -e "1,/[ 	]*<[lL]ayout[ 	]*$LAYOUT[ 	]*>[ 	]*/d" \
2859      -e '/[ 	]*<\/Layout>[ 	]*/,$d' \
2860      -e "s/^[ 	]*//g" \
2861      -e "s/:[ 	]*/=\'/g" \
2862      -e "s/[ 	]*$/'/g" \
2863      $srcdir/config.layout > $pldconf
2864  layout_name=$LAYOUT
2865  if test ! -s $pldconf; then
2866    echo "** Error: unable to find layout $layout_name"
2867    exit 1
2868  fi
2869  . $pldconf
2870  rm $pldconf
2871  for var in prefix exec_prefix bindir sbindir libexecdir mandir \
2872             sysconfdir datadir includedir localstatedir runtimedir \
2873             logfiledir libdir installbuilddir libsuffix ; do
2874    eval "val=\"\$$var\""
2875    case $val in
2876      *+)
2877        val=`echo $val | sed -e 's;\+$;;'`
2878        eval "$var=\"\$val\""
2879        autosuffix=yes
2880        ;;
2881      *)
2882        autosuffix=no
2883        ;;
2884    esac
2885    val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
2886    val=`echo $val | sed -e 's:[\$]\([a-z_]*\):$\1:g'`
2887    if test "$autosuffix" = "yes"; then
2888      if echo $val | grep apache >/dev/null; then
2889        addtarget=no
2890      else
2891        addtarget=yes
2892      fi
2893      if test "$addtarget" = "yes"; then
2894        val="$val/apache2"
2895      fi
2896    fi
2897    eval "$var='$val'"
2898  done
2899
2900
2901
2902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chosen layout" >&5
2903$as_echo_n "checking for chosen layout... " >&6; }
2904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $layout_name" >&5
2905$as_echo "$layout_name" >&6; }
2906
2907
2908ac_prev=
2909# Retrieve the command-line arguments.  The eval is needed because
2910# the arguments are quoted to preserve accuracy.
2911eval "set x $ac_configure_args"
2912shift
2913for ac_option
2914do
2915  # If the previous option needs an argument, assign it.
2916  if test -n "$ac_prev"; then
2917    eval "$ac_prev=\$ac_option"
2918    ac_prev=
2919    continue
2920  fi
2921
2922  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
2923
2924  case $ac_option in
2925
2926  -bindir | --bindir | --bindi | --bind | --bin | --bi)
2927    ac_prev=bindir ;;
2928  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2929    bindir="$ac_optarg" ;;
2930
2931  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
2932    ac_prev=datadir ;;
2933  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
2934  | --da=*)
2935    datadir="$ac_optarg" ;;
2936
2937  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2938  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2939  | --exec | --exe | --ex)
2940    ac_prev=exec_prefix ;;
2941  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2942  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2943  | --exec=* | --exe=* | --ex=*)
2944    exec_prefix="$ac_optarg" ;;
2945
2946  -includedir | --includedir | --includedi | --included | --include \
2947  | --includ | --inclu | --incl | --inc)
2948    ac_prev=includedir ;;
2949  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2950  | --includ=* | --inclu=* | --incl=* | --inc=*)
2951    includedir="$ac_optarg" ;;
2952
2953  -infodir | --infodir | --infodi | --infod | --info | --inf)
2954    ac_prev=infodir ;;
2955  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2956    infodir="$ac_optarg" ;;
2957
2958  -libdir | --libdir | --libdi | --libd)
2959    ac_prev=libdir ;;
2960  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2961    libdir="$ac_optarg" ;;
2962
2963  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2964  | --libexe | --libex | --libe)
2965    ac_prev=libexecdir ;;
2966  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2967  | --libexe=* | --libex=* | --libe=*)
2968    libexecdir="$ac_optarg" ;;
2969
2970  -localstatedir | --localstatedir | --localstatedi | --localstated \
2971  | --localstate | --localstat | --localsta | --localst \
2972  | --locals | --local | --loca | --loc | --lo)
2973    ac_prev=localstatedir ;;
2974  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2975  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
2976  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
2977    localstatedir="$ac_optarg" ;;
2978
2979  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2980    ac_prev=mandir ;;
2981  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2982    mandir="$ac_optarg" ;;
2983
2984  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2985    ac_prev=prefix ;;
2986  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2987    prefix="$ac_optarg" ;;
2988
2989  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2990    ac_prev=sbindir ;;
2991  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2992  | --sbi=* | --sb=*)
2993    sbindir="$ac_optarg" ;;
2994
2995  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2996  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2997  | --sharedst | --shareds | --shared | --share | --shar \
2998  | --sha | --sh)
2999    ac_prev=sharedstatedir ;;
3000  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
3001  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
3002  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
3003  | --sha=* | --sh=*)
3004    sharedstatedir="$ac_optarg" ;;
3005
3006  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
3007  | --syscon | --sysco | --sysc | --sys | --sy)
3008    ac_prev=sysconfdir ;;
3009  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
3010  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
3011    sysconfdir="$ac_optarg" ;;
3012
3013  esac
3014done
3015
3016# Be sure to have absolute paths.
3017for ac_var in exec_prefix prefix
3018do
3019  eval ac_val=$`echo $ac_var`
3020  case $ac_val in
3021    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
3022    *)  as_fn_error $? "expected an absolute path for --$ac_var: $ac_val" "$LINENO" 5;;
3023  esac
3024done
3025
3026
3027
3028ac_ext=c
3029ac_cpp='$CPP $CPPFLAGS'
3030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3032ac_compiler_gnu=$ac_cv_c_compiler_gnu
3033if test -n "$ac_tool_prefix"; then
3034  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3035set dummy ${ac_tool_prefix}gcc; ac_word=$2
3036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3037$as_echo_n "checking for $ac_word... " >&6; }
3038if test "${ac_cv_prog_CC+set}" = set; then :
3039  $as_echo_n "(cached) " >&6
3040else
3041  if test -n "$CC"; then
3042  ac_cv_prog_CC="$CC" # Let the user override the test.
3043else
3044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3045for as_dir in $PATH
3046do
3047  IFS=$as_save_IFS
3048  test -z "$as_dir" && as_dir=.
3049    for ac_exec_ext in '' $ac_executable_extensions; do
3050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3051    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3053    break 2
3054  fi
3055done
3056  done
3057IFS=$as_save_IFS
3058
3059fi
3060fi
3061CC=$ac_cv_prog_CC
3062if test -n "$CC"; then
3063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3064$as_echo "$CC" >&6; }
3065else
3066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3067$as_echo "no" >&6; }
3068fi
3069
3070
3071fi
3072if test -z "$ac_cv_prog_CC"; then
3073  ac_ct_CC=$CC
3074  # Extract the first word of "gcc", so it can be a program name with args.
3075set dummy gcc; ac_word=$2
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077$as_echo_n "checking for $ac_word... " >&6; }
3078if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3079  $as_echo_n "(cached) " >&6
3080else
3081  if test -n "$ac_ct_CC"; then
3082  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083else
3084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085for as_dir in $PATH
3086do
3087  IFS=$as_save_IFS
3088  test -z "$as_dir" && as_dir=.
3089    for ac_exec_ext in '' $ac_executable_extensions; do
3090  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3091    ac_cv_prog_ac_ct_CC="gcc"
3092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3093    break 2
3094  fi
3095done
3096  done
3097IFS=$as_save_IFS
3098
3099fi
3100fi
3101ac_ct_CC=$ac_cv_prog_ac_ct_CC
3102if test -n "$ac_ct_CC"; then
3103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3104$as_echo "$ac_ct_CC" >&6; }
3105else
3106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
3108fi
3109
3110  if test "x$ac_ct_CC" = x; then
3111    CC=""
3112  else
3113    case $cross_compiling:$ac_tool_warned in
3114yes:)
3115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3117ac_tool_warned=yes ;;
3118esac
3119    CC=$ac_ct_CC
3120  fi
3121else
3122  CC="$ac_cv_prog_CC"
3123fi
3124
3125if test -z "$CC"; then
3126          if test -n "$ac_tool_prefix"; then
3127    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3128set dummy ${ac_tool_prefix}cc; ac_word=$2
3129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3130$as_echo_n "checking for $ac_word... " >&6; }
3131if test "${ac_cv_prog_CC+set}" = set; then :
3132  $as_echo_n "(cached) " >&6
3133else
3134  if test -n "$CC"; then
3135  ac_cv_prog_CC="$CC" # Let the user override the test.
3136else
3137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3138for as_dir in $PATH
3139do
3140  IFS=$as_save_IFS
3141  test -z "$as_dir" && as_dir=.
3142    for ac_exec_ext in '' $ac_executable_extensions; do
3143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3144    ac_cv_prog_CC="${ac_tool_prefix}cc"
3145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3146    break 2
3147  fi
3148done
3149  done
3150IFS=$as_save_IFS
3151
3152fi
3153fi
3154CC=$ac_cv_prog_CC
3155if test -n "$CC"; then
3156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3157$as_echo "$CC" >&6; }
3158else
3159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3160$as_echo "no" >&6; }
3161fi
3162
3163
3164  fi
3165fi
3166if test -z "$CC"; then
3167  # Extract the first word of "cc", so it can be a program name with args.
3168set dummy cc; ac_word=$2
3169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3170$as_echo_n "checking for $ac_word... " >&6; }
3171if test "${ac_cv_prog_CC+set}" = set; then :
3172  $as_echo_n "(cached) " >&6
3173else
3174  if test -n "$CC"; then
3175  ac_cv_prog_CC="$CC" # Let the user override the test.
3176else
3177  ac_prog_rejected=no
3178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3179for as_dir in $PATH
3180do
3181  IFS=$as_save_IFS
3182  test -z "$as_dir" && as_dir=.
3183    for ac_exec_ext in '' $ac_executable_extensions; do
3184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3185    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3186       ac_prog_rejected=yes
3187       continue
3188     fi
3189    ac_cv_prog_CC="cc"
3190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3191    break 2
3192  fi
3193done
3194  done
3195IFS=$as_save_IFS
3196
3197if test $ac_prog_rejected = yes; then
3198  # We found a bogon in the path, so make sure we never use it.
3199  set dummy $ac_cv_prog_CC
3200  shift
3201  if test $# != 0; then
3202    # We chose a different compiler from the bogus one.
3203    # However, it has the same basename, so the bogon will be chosen
3204    # first if we set CC to just the basename; use the full file name.
3205    shift
3206    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3207  fi
3208fi
3209fi
3210fi
3211CC=$ac_cv_prog_CC
3212if test -n "$CC"; then
3213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3214$as_echo "$CC" >&6; }
3215else
3216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3217$as_echo "no" >&6; }
3218fi
3219
3220
3221fi
3222if test -z "$CC"; then
3223  if test -n "$ac_tool_prefix"; then
3224  for ac_prog in cl.exe
3225  do
3226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3229$as_echo_n "checking for $ac_word... " >&6; }
3230if test "${ac_cv_prog_CC+set}" = set; then :
3231  $as_echo_n "(cached) " >&6
3232else
3233  if test -n "$CC"; then
3234  ac_cv_prog_CC="$CC" # Let the user override the test.
3235else
3236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3237for as_dir in $PATH
3238do
3239  IFS=$as_save_IFS
3240  test -z "$as_dir" && as_dir=.
3241    for ac_exec_ext in '' $ac_executable_extensions; do
3242  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3243    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3245    break 2
3246  fi
3247done
3248  done
3249IFS=$as_save_IFS
3250
3251fi
3252fi
3253CC=$ac_cv_prog_CC
3254if test -n "$CC"; then
3255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3256$as_echo "$CC" >&6; }
3257else
3258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3259$as_echo "no" >&6; }
3260fi
3261
3262
3263    test -n "$CC" && break
3264  done
3265fi
3266if test -z "$CC"; then
3267  ac_ct_CC=$CC
3268  for ac_prog in cl.exe
3269do
3270  # Extract the first word of "$ac_prog", so it can be a program name with args.
3271set dummy $ac_prog; ac_word=$2
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273$as_echo_n "checking for $ac_word... " >&6; }
3274if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3275  $as_echo_n "(cached) " >&6
3276else
3277  if test -n "$ac_ct_CC"; then
3278  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3279else
3280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283  IFS=$as_save_IFS
3284  test -z "$as_dir" && as_dir=.
3285    for ac_exec_ext in '' $ac_executable_extensions; do
3286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3287    ac_cv_prog_ac_ct_CC="$ac_prog"
3288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3289    break 2
3290  fi
3291done
3292  done
3293IFS=$as_save_IFS
3294
3295fi
3296fi
3297ac_ct_CC=$ac_cv_prog_ac_ct_CC
3298if test -n "$ac_ct_CC"; then
3299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3300$as_echo "$ac_ct_CC" >&6; }
3301else
3302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
3304fi
3305
3306
3307  test -n "$ac_ct_CC" && break
3308done
3309
3310  if test "x$ac_ct_CC" = x; then
3311    CC=""
3312  else
3313    case $cross_compiling:$ac_tool_warned in
3314yes:)
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3317ac_tool_warned=yes ;;
3318esac
3319    CC=$ac_ct_CC
3320  fi
3321fi
3322
3323fi
3324
3325
3326test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328as_fn_error $? "no acceptable C compiler found in \$PATH
3329See \`config.log' for more details" "$LINENO" 5; }
3330
3331# Provide some information about the compiler.
3332$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3333set X $ac_compile
3334ac_compiler=$2
3335for ac_option in --version -v -V -qversion; do
3336  { { ac_try="$ac_compiler $ac_option >&5"
3337case "(($ac_try" in
3338  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3339  *) ac_try_echo=$ac_try;;
3340esac
3341eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3342$as_echo "$ac_try_echo"; } >&5
3343  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3344  ac_status=$?
3345  if test -s conftest.err; then
3346    sed '10a\
3347... rest of stderr output deleted ...
3348         10q' conftest.err >conftest.er1
3349    cat conftest.er1 >&5
3350  fi
3351  rm -f conftest.er1 conftest.err
3352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3353  test $ac_status = 0; }
3354done
3355
3356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3357/* end confdefs.h.  */
3358
3359int
3360main ()
3361{
3362
3363  ;
3364  return 0;
3365}
3366_ACEOF
3367ac_clean_files_save=$ac_clean_files
3368ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3369# Try to create an executable without -o first, disregard a.out.
3370# It will help us diagnose broken compilers, and finding out an intuition
3371# of exeext.
3372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3373$as_echo_n "checking whether the C compiler works... " >&6; }
3374ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3375
3376# The possible output files:
3377ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3378
3379ac_rmfiles=
3380for ac_file in $ac_files
3381do
3382  case $ac_file in
3383    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3384    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3385  esac
3386done
3387rm -f $ac_rmfiles
3388
3389if { { ac_try="$ac_link_default"
3390case "(($ac_try" in
3391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392  *) ac_try_echo=$ac_try;;
3393esac
3394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3395$as_echo "$ac_try_echo"; } >&5
3396  (eval "$ac_link_default") 2>&5
3397  ac_status=$?
3398  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3399  test $ac_status = 0; }; then :
3400  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3401# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3402# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3403# so that the user can short-circuit this test for compilers unknown to
3404# Autoconf.
3405for ac_file in $ac_files ''
3406do
3407  test -f "$ac_file" || continue
3408  case $ac_file in
3409    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3410	;;
3411    [ab].out )
3412	# We found the default executable, but exeext='' is most
3413	# certainly right.
3414	break;;
3415    *.* )
3416	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3417	then :; else
3418	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3419	fi
3420	# We set ac_cv_exeext here because the later test for it is not
3421	# safe: cross compilers may not add the suffix if given an `-o'
3422	# argument, so we may need to know it at that point already.
3423	# Even if this section looks crufty: it has the advantage of
3424	# actually working.
3425	break;;
3426    * )
3427	break;;
3428  esac
3429done
3430test "$ac_cv_exeext" = no && ac_cv_exeext=
3431
3432else
3433  ac_file=''
3434fi
3435if test -z "$ac_file"; then :
3436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3437$as_echo "no" >&6; }
3438$as_echo "$as_me: failed program was:" >&5
3439sed 's/^/| /' conftest.$ac_ext >&5
3440
3441{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3442$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3443as_fn_error 77 "C compiler cannot create executables
3444See \`config.log' for more details" "$LINENO" 5; }
3445else
3446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3447$as_echo "yes" >&6; }
3448fi
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3450$as_echo_n "checking for C compiler default output file name... " >&6; }
3451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3452$as_echo "$ac_file" >&6; }
3453ac_exeext=$ac_cv_exeext
3454
3455rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3456ac_clean_files=$ac_clean_files_save
3457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3458$as_echo_n "checking for suffix of executables... " >&6; }
3459if { { ac_try="$ac_link"
3460case "(($ac_try" in
3461  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3462  *) ac_try_echo=$ac_try;;
3463esac
3464eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3465$as_echo "$ac_try_echo"; } >&5
3466  (eval "$ac_link") 2>&5
3467  ac_status=$?
3468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3469  test $ac_status = 0; }; then :
3470  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3471# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3472# work properly (i.e., refer to `conftest.exe'), while it won't with
3473# `rm'.
3474for ac_file in conftest.exe conftest conftest.*; do
3475  test -f "$ac_file" || continue
3476  case $ac_file in
3477    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3478    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3479	  break;;
3480    * ) break;;
3481  esac
3482done
3483else
3484  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3486as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3487See \`config.log' for more details" "$LINENO" 5; }
3488fi
3489rm -f conftest conftest$ac_cv_exeext
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3491$as_echo "$ac_cv_exeext" >&6; }
3492
3493rm -f conftest.$ac_ext
3494EXEEXT=$ac_cv_exeext
3495ac_exeext=$EXEEXT
3496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3497/* end confdefs.h.  */
3498#include <stdio.h>
3499int
3500main ()
3501{
3502FILE *f = fopen ("conftest.out", "w");
3503 return ferror (f) || fclose (f) != 0;
3504
3505  ;
3506  return 0;
3507}
3508_ACEOF
3509ac_clean_files="$ac_clean_files conftest.out"
3510# Check that the compiler produces executables we can run.  If not, either
3511# the compiler is broken, or we cross compile.
3512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3513$as_echo_n "checking whether we are cross compiling... " >&6; }
3514if test "$cross_compiling" != yes; then
3515  { { ac_try="$ac_link"
3516case "(($ac_try" in
3517  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3518  *) ac_try_echo=$ac_try;;
3519esac
3520eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3521$as_echo "$ac_try_echo"; } >&5
3522  (eval "$ac_link") 2>&5
3523  ac_status=$?
3524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3525  test $ac_status = 0; }
3526  if { ac_try='./conftest$ac_cv_exeext'
3527  { { case "(($ac_try" in
3528  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529  *) ac_try_echo=$ac_try;;
3530esac
3531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3532$as_echo "$ac_try_echo"; } >&5
3533  (eval "$ac_try") 2>&5
3534  ac_status=$?
3535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3536  test $ac_status = 0; }; }; then
3537    cross_compiling=no
3538  else
3539    if test "$cross_compiling" = maybe; then
3540	cross_compiling=yes
3541    else
3542	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3544as_fn_error $? "cannot run C compiled programs.
3545If you meant to cross compile, use \`--host'.
3546See \`config.log' for more details" "$LINENO" 5; }
3547    fi
3548  fi
3549fi
3550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3551$as_echo "$cross_compiling" >&6; }
3552
3553rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3554ac_clean_files=$ac_clean_files_save
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3556$as_echo_n "checking for suffix of object files... " >&6; }
3557if test "${ac_cv_objext+set}" = set; then :
3558  $as_echo_n "(cached) " >&6
3559else
3560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3561/* end confdefs.h.  */
3562
3563int
3564main ()
3565{
3566
3567  ;
3568  return 0;
3569}
3570_ACEOF
3571rm -f conftest.o conftest.obj
3572if { { ac_try="$ac_compile"
3573case "(($ac_try" in
3574  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575  *) ac_try_echo=$ac_try;;
3576esac
3577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3578$as_echo "$ac_try_echo"; } >&5
3579  (eval "$ac_compile") 2>&5
3580  ac_status=$?
3581  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3582  test $ac_status = 0; }; then :
3583  for ac_file in conftest.o conftest.obj conftest.*; do
3584  test -f "$ac_file" || continue;
3585  case $ac_file in
3586    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3587    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3588       break;;
3589  esac
3590done
3591else
3592  $as_echo "$as_me: failed program was:" >&5
3593sed 's/^/| /' conftest.$ac_ext >&5
3594
3595{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3597as_fn_error $? "cannot compute suffix of object files: cannot compile
3598See \`config.log' for more details" "$LINENO" 5; }
3599fi
3600rm -f conftest.$ac_cv_objext conftest.$ac_ext
3601fi
3602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3603$as_echo "$ac_cv_objext" >&6; }
3604OBJEXT=$ac_cv_objext
3605ac_objext=$OBJEXT
3606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3607$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3608if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3609  $as_echo_n "(cached) " >&6
3610else
3611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3612/* end confdefs.h.  */
3613
3614int
3615main ()
3616{
3617#ifndef __GNUC__
3618       choke me
3619#endif
3620
3621  ;
3622  return 0;
3623}
3624_ACEOF
3625if ac_fn_c_try_compile "$LINENO"; then :
3626  ac_compiler_gnu=yes
3627else
3628  ac_compiler_gnu=no
3629fi
3630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3631ac_cv_c_compiler_gnu=$ac_compiler_gnu
3632
3633fi
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3635$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3636if test $ac_compiler_gnu = yes; then
3637  GCC=yes
3638else
3639  GCC=
3640fi
3641ac_test_CFLAGS=${CFLAGS+set}
3642ac_save_CFLAGS=$CFLAGS
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3644$as_echo_n "checking whether $CC accepts -g... " >&6; }
3645if test "${ac_cv_prog_cc_g+set}" = set; then :
3646  $as_echo_n "(cached) " >&6
3647else
3648  ac_save_c_werror_flag=$ac_c_werror_flag
3649   ac_c_werror_flag=yes
3650   ac_cv_prog_cc_g=no
3651   CFLAGS="-g"
3652   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3653/* end confdefs.h.  */
3654
3655int
3656main ()
3657{
3658
3659  ;
3660  return 0;
3661}
3662_ACEOF
3663if ac_fn_c_try_compile "$LINENO"; then :
3664  ac_cv_prog_cc_g=yes
3665else
3666  CFLAGS=""
3667      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3668/* end confdefs.h.  */
3669
3670int
3671main ()
3672{
3673
3674  ;
3675  return 0;
3676}
3677_ACEOF
3678if ac_fn_c_try_compile "$LINENO"; then :
3679
3680else
3681  ac_c_werror_flag=$ac_save_c_werror_flag
3682	 CFLAGS="-g"
3683	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3684/* end confdefs.h.  */
3685
3686int
3687main ()
3688{
3689
3690  ;
3691  return 0;
3692}
3693_ACEOF
3694if ac_fn_c_try_compile "$LINENO"; then :
3695  ac_cv_prog_cc_g=yes
3696fi
3697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3698fi
3699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3700fi
3701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3702   ac_c_werror_flag=$ac_save_c_werror_flag
3703fi
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3705$as_echo "$ac_cv_prog_cc_g" >&6; }
3706if test "$ac_test_CFLAGS" = set; then
3707  CFLAGS=$ac_save_CFLAGS
3708elif test $ac_cv_prog_cc_g = yes; then
3709  if test "$GCC" = yes; then
3710    CFLAGS="-g -O2"
3711  else
3712    CFLAGS="-g"
3713  fi
3714else
3715  if test "$GCC" = yes; then
3716    CFLAGS="-O2"
3717  else
3718    CFLAGS=
3719  fi
3720fi
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3722$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3723if test "${ac_cv_prog_cc_c89+set}" = set; then :
3724  $as_echo_n "(cached) " >&6
3725else
3726  ac_cv_prog_cc_c89=no
3727ac_save_CC=$CC
3728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3729/* end confdefs.h.  */
3730#include <stdarg.h>
3731#include <stdio.h>
3732#include <sys/types.h>
3733#include <sys/stat.h>
3734/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3735struct buf { int x; };
3736FILE * (*rcsopen) (struct buf *, struct stat *, int);
3737static char *e (p, i)
3738     char **p;
3739     int i;
3740{
3741  return p[i];
3742}
3743static char *f (char * (*g) (char **, int), char **p, ...)
3744{
3745  char *s;
3746  va_list v;
3747  va_start (v,p);
3748  s = g (p, va_arg (v,int));
3749  va_end (v);
3750  return s;
3751}
3752
3753/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3754   function prototypes and stuff, but not '\xHH' hex character constants.
3755   These don't provoke an error unfortunately, instead are silently treated
3756   as 'x'.  The following induces an error, until -std is added to get
3757   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3758   array size at least.  It's necessary to write '\x00'==0 to get something
3759   that's true only with -std.  */
3760int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3761
3762/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3763   inside strings and character constants.  */
3764#define FOO(x) 'x'
3765int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3766
3767int test (int i, double x);
3768struct s1 {int (*f) (int a);};
3769struct s2 {int (*f) (double a);};
3770int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3771int argc;
3772char **argv;
3773int
3774main ()
3775{
3776return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3777  ;
3778  return 0;
3779}
3780_ACEOF
3781for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3782	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3783do
3784  CC="$ac_save_CC $ac_arg"
3785  if ac_fn_c_try_compile "$LINENO"; then :
3786  ac_cv_prog_cc_c89=$ac_arg
3787fi
3788rm -f core conftest.err conftest.$ac_objext
3789  test "x$ac_cv_prog_cc_c89" != "xno" && break
3790done
3791rm -f conftest.$ac_ext
3792CC=$ac_save_CC
3793
3794fi
3795# AC_CACHE_VAL
3796case "x$ac_cv_prog_cc_c89" in
3797  x)
3798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3799$as_echo "none needed" >&6; } ;;
3800  xno)
3801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3802$as_echo "unsupported" >&6; } ;;
3803  *)
3804    CC="$CC $ac_cv_prog_cc_c89"
3805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3806$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3807esac
3808if test "x$ac_cv_prog_cc_c89" != xno; then :
3809
3810fi
3811
3812ac_ext=c
3813ac_cpp='$CPP $CPPFLAGS'
3814ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3815ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3816ac_compiler_gnu=$ac_cv_c_compiler_gnu
3817
3818
3819
3820if test "x$apu_preload_done" != "xyes" ; then
3821    apu_preload_done="yes"
3822
3823    echo "Applying apr-util hints file rules for $host"
3824
3825    case "$host" in
3826    *-dec-osf*)
3827
3828  if test -z "$apu_crypt_threadsafe"; then
3829    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3830    apu_crypt_threadsafe="1"
3831  fi
3832
3833        ;;
3834    *-hp-hpux11.*)
3835
3836  if test -z "$apu_crypt_threadsafe"; then
3837    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3838    apu_crypt_threadsafe="1"
3839  fi
3840
3841        ;;
3842    *-ibm-aix4*|*-ibm-aix5.1*)
3843
3844  if test -z "$apu_iconv_inbuf_const"; then
3845    test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
3846    apu_iconv_inbuf_const="1"
3847  fi
3848
3849        ;;
3850    *-ibm-os390)
3851
3852  if test -z "$apu_crypt_threadsafe"; then
3853    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3854    apu_crypt_threadsafe="1"
3855  fi
3856
3857        ;;
3858    *-solaris2*)
3859
3860  if test -z "$apu_iconv_inbuf_const"; then
3861    test "x$silent" != "xyes" && echo "  setting apu_iconv_inbuf_const to \"1\""
3862    apu_iconv_inbuf_const="1"
3863  fi
3864
3865
3866  if test -z "$apu_crypt_threadsafe"; then
3867    test "x$silent" != "xyes" && echo "  setting apu_crypt_threadsafe to \"1\""
3868    apu_crypt_threadsafe="1"
3869  fi
3870
3871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
3872$as_echo_n "checking for library containing fdatasync... " >&6; }
3873if test "${ac_cv_search_fdatasync+set}" = set; then :
3874  $as_echo_n "(cached) " >&6
3875else
3876  ac_func_search_save_LIBS=$LIBS
3877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3878/* end confdefs.h.  */
3879
3880/* Override any GCC internal prototype to avoid an error.
3881   Use char because int might match the return type of a GCC
3882   builtin and then its argument prototype would still apply.  */
3883#ifdef __cplusplus
3884extern "C"
3885#endif
3886char fdatasync ();
3887int
3888main ()
3889{
3890return fdatasync ();
3891  ;
3892  return 0;
3893}
3894_ACEOF
3895for ac_lib in '' rt posix4; do
3896  if test -z "$ac_lib"; then
3897    ac_res="none required"
3898  else
3899    ac_res=-l$ac_lib
3900    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3901  fi
3902  if ac_fn_c_try_link "$LINENO"; then :
3903  ac_cv_search_fdatasync=$ac_res
3904fi
3905rm -f core conftest.err conftest.$ac_objext \
3906    conftest$ac_exeext
3907  if test "${ac_cv_search_fdatasync+set}" = set; then :
3908  break
3909fi
3910done
3911if test "${ac_cv_search_fdatasync+set}" = set; then :
3912
3913else
3914  ac_cv_search_fdatasync=no
3915fi
3916rm conftest.$ac_ext
3917LIBS=$ac_func_search_save_LIBS
3918fi
3919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
3920$as_echo "$ac_cv_search_fdatasync" >&6; }
3921ac_res=$ac_cv_search_fdatasync
3922if test "$ac_res" != no; then :
3923  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3924
3925fi
3926
3927        ;;
3928    *-sco3.2v5*)
3929
3930  if test -z "$apu_db_xtra_libs"; then
3931    test "x$silent" != "xyes" && echo "  setting apu_db_xtra_libs to \"-lsocket\""
3932    apu_db_xtra_libs="-lsocket"
3933  fi
3934
3935	;;
3936    esac
3937
3938fi
3939
3940
3941
3942APRUTIL_INCLUDES=""
3943APRUTIL_PRIV_INCLUDES="-I$top_builddir/include -I$top_builddir/include/private"
3944if test -n "$USE_VPATH"; then
3945    APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES -I$abs_srcdir/include/private -I$abs_srcdir/include"
3946fi
3947
3948
3949
3950
3951  apr_found="no"
3952
3953  if test "$target_os" = "os2-emx"; then
3954    # Scripts don't pass test -x on OS/2
3955    TEST_X="test -f"
3956  else
3957    TEST_X="test -x"
3958  fi
3959
3960  acceptable_majors="1"
3961
3962  apr_temp_acceptable_apr_config=""
3963  for apr_temp_major in $acceptable_majors
3964  do
3965    case $apr_temp_major in
3966      0)
3967      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
3968      ;;
3969      *)
3970      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
3971      ;;
3972    esac
3973  done
3974
3975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR" >&5
3976$as_echo_n "checking for APR... " >&6; }
3977
3978# Check whether --with-apr was given.
3979if test "${with_apr+set}" = set; then :
3980  withval=$with_apr;
3981    if test "$withval" = "no" || test "$withval" = "yes"; then
3982      as_fn_error $? "--with-apr requires a directory or file to be provided" "$LINENO" 5
3983    fi
3984
3985    for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
3986    do
3987      for lookdir in "$withval/bin" "$withval"
3988      do
3989        if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
3990          apr_config="$lookdir/$apr_temp_apr_config_file"
3991
3992          apr_found="yes"
3993          break 2
3994        fi
3995      done
3996    done
3997
3998    if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
3999      apr_config="$withval"
4000      apr_found="yes"
4001    fi
4002
4003            if test "$apr_found" != "yes"; then
4004      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
4005    fi
4006
4007else
4008
4009        if test -n "" && test "" = "1"; then
4010      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
4011      do
4012        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
4013          apr_config="$apr_temp_apr_config_file"
4014
4015          apr_found="yes"
4016          break
4017        else
4018                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
4019            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
4020              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
4021
4022              apr_found="yes"
4023              break 2
4024            fi
4025          done
4026        fi
4027      done
4028    fi
4029        if test "$apr_found" = "no" && test -d ""; then
4030      apr_temp_abs_srcdir="`cd \"\" && pwd`"
4031      apr_found="reconfig"
4032      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
4033      case $apr_bundled_major in
4034        "")
4035          as_fn_error $? "failed to find major version of bundled APR" "$LINENO" 5
4036        ;;
4037        0)
4038          apr_temp_apr_config_file="apr-config"
4039        ;;
4040        *)
4041          apr_temp_apr_config_file="apr-$apr_bundled_major-config"
4042        ;;
4043      esac
4044      if test -n ""; then
4045        apr_config="/$apr_temp_apr_config_file"
4046      else
4047        apr_config="/$apr_temp_apr_config_file"
4048      fi
4049    fi
4050
4051fi
4052
4053
4054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5
4055$as_echo "$apr_found" >&6; }
4056
4057  if test "$apr_found" = "no"; then
4058    as_fn_error $? "APR could not be located. Please use the --with-apr option." "$LINENO" 5
4059  fi
4060
4061  APR_BUILD_DIR="`$apr_config --installbuilddir`"
4062
4063      APR_BUILD_DIR="`cd $APR_BUILD_DIR && pwd`"
4064
4065  APR_INCLUDES="`$apr_config --includes`"
4066  APR_LIBS="`$apr_config --link-libtool --libs`"
4067  APR_SO_EXT="`$apr_config --apr-so-ext`"
4068  APR_LIB_TARGET="`$apr_config --apr-lib-target`"
4069
4070
4071
4072
4073
4074
4075
4076  if test -z "$CC"; then
4077    test "x$silent" != "xyes" && echo "  setting CC to \"`$apr_config --cc`\""
4078    CC="`$apr_config --cc`"
4079  fi
4080
4081
4082  if test -z "$CPP"; then
4083    test "x$silent" != "xyes" && echo "  setting CPP to \"`$apr_config --cpp`\""
4084    CPP="`$apr_config --cpp`"
4085  fi
4086
4087
4088  if test "x$CFLAGS" = "x"; then
4089    test "x$silent" != "xyes" && echo "  setting CFLAGS to \"`$apr_config --cflags`\""
4090    CFLAGS="`$apr_config --cflags`"
4091  else
4092    apr_addto_bugger="`$apr_config --cflags`"
4093    for i in $apr_addto_bugger; do
4094      apr_addto_duplicate="0"
4095      for j in $CFLAGS; do
4096        if test "x$i" = "x$j"; then
4097          apr_addto_duplicate="1"
4098          break
4099        fi
4100      done
4101      if test $apr_addto_duplicate = "0"; then
4102        test "x$silent" != "xyes" && echo "  adding \"$i\" to CFLAGS"
4103        CFLAGS="$CFLAGS $i"
4104      fi
4105    done
4106  fi
4107
4108
4109  if test "x$CPPFLAGS" = "x"; then
4110    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"`$apr_config --cppflags`\""
4111    CPPFLAGS="`$apr_config --cppflags`"
4112  else
4113    apr_addto_bugger="`$apr_config --cppflags`"
4114    for i in $apr_addto_bugger; do
4115      apr_addto_duplicate="0"
4116      for j in $CPPFLAGS; do
4117        if test "x$i" = "x$j"; then
4118          apr_addto_duplicate="1"
4119          break
4120        fi
4121      done
4122      if test $apr_addto_duplicate = "0"; then
4123        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
4124        CPPFLAGS="$CPPFLAGS $i"
4125      fi
4126    done
4127  fi
4128
4129apr_shlibpath_var=`$apr_config --shlib-path-var`
4130
4131
4132
4133# Check whether --with-apr-iconv was given.
4134if test "${with_apr_iconv+set}" = set; then :
4135  withval=$with_apr_iconv;  apu_apriconv_dir="$withval"
4136    if test "$apu_apriconv_dir" != "no"; then
4137      if test -d "$apu_apriconv_dir"; then
4138
4139  # save our work to this point; this allows the sub-package to use it
4140  cat >confcache <<\_ACEOF
4141# This file is a shell script that caches the results of configure
4142# tests run on this system so they can be shared between configure
4143# scripts and configure runs, see configure's option --config-cache.
4144# It is not useful on other systems.  If it contains results you don't
4145# want to keep, you may remove or edit it.
4146#
4147# config.status only pays attention to the cache file if you give it
4148# the --recheck option to rerun configure.
4149#
4150# `ac_cv_env_foo' variables (set or unset) will be overridden when
4151# loading this file, other *unset* `ac_cv_foo' will be assigned the
4152# following values.
4153
4154_ACEOF
4155
4156# The following way of writing the cache mishandles newlines in values,
4157# but we know of no workaround that is simple, portable, and efficient.
4158# So, we kill variables containing newlines.
4159# Ultrix sh set writes to stderr and can't be redirected directly,
4160# and sets the high bit in the cache file unless we assign to the vars.
4161(
4162  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4163    eval ac_val=\$$ac_var
4164    case $ac_val in #(
4165    *${as_nl}*)
4166      case $ac_var in #(
4167      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
4168$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4169      esac
4170      case $ac_var in #(
4171      _ | IFS | as_nl) ;; #(
4172      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4173      *) { eval $ac_var=; unset $ac_var;} ;;
4174      esac ;;
4175    esac
4176  done
4177
4178  (set) 2>&1 |
4179    case $as_nl`(ac_space=' '; set) 2>&1` in #(
4180    *${as_nl}ac_space=\ *)
4181      # `set' does not quote correctly, so add quotes: double-quote
4182      # substitution turns \\\\ into \\, and sed turns \\ into \.
4183      sed -n \
4184	"s/'/'\\\\''/g;
4185	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4186      ;; #(
4187    *)
4188      # `set' quotes correctly as required by POSIX, so do not add quotes.
4189      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4190      ;;
4191    esac |
4192    sort
4193) |
4194  sed '
4195     /^ac_cv_env_/b end
4196     t clear
4197     :clear
4198     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4199     t end
4200     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4201     :end' >>confcache
4202if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
4203  if test -w "$cache_file"; then
4204    test "x$cache_file" != "x/dev/null" &&
4205      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
4206$as_echo "$as_me: updating cache $cache_file" >&6;}
4207    cat confcache >$cache_file
4208  else
4209    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
4210$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
4211  fi
4212fi
4213rm -f confcache
4214
4215  echo "configuring package in "$apu_apriconv_dir" now"
4216  ac_popdir=`pwd`
4217  apr_config_subdirs=""$apu_apriconv_dir""
4218  test -d "$apu_apriconv_dir" || $mkdir_p "$apu_apriconv_dir"
4219  ac_abs_srcdir=`(cd $srcdir/"$apu_apriconv_dir" && pwd)`
4220  cd "$apu_apriconv_dir"
4221
4222      # A "../" for each directory in /$config_subdirs.
4223      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
4224
4225  # Make the cache file pathname absolute for the subdirs
4226  # required to correctly handle subdirs that might actually
4227  # be symlinks
4228  case "$cache_file" in
4229  /*) # already absolute
4230    ac_sub_cache_file=$cache_file ;;
4231  *)  # Was relative path.
4232    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
4233  esac
4234
4235
4236  apr_configure_args=
4237  apr_sep=
4238  for apr_configure_arg in $ac_configure_args
4239  do
4240    case "$apr_configure_arg" in
4241      --enable-layout=*|\'--enable-layout=*)
4242        continue ;;
4243    esac
4244    apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
4245    apr_sep=" "
4246  done
4247
4248
4249    test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
4250
4251    apr_configure_args="--disable-option-checking $apr_configure_args"
4252
4253              if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $apache_apr_flags \
4254                             --prefix=$prefix \
4255                             --exec-prefix=$exec_prefix \
4256                             --libdir=$libdir \
4257                             --includedir=$includedir \
4258                             --bindir=$bindir \
4259                             --datadir=$datadir \
4260                             --with-installbuilddir=$installbuilddir
4261  then :
4262    echo ""$apu_apriconv_dir" configured properly"
4263  else
4264    echo "configure failed for "$apu_apriconv_dir""
4265    exit 1
4266  fi
4267
4268  cd $ac_popdir
4269
4270  # grab any updates from the sub-package
4271  if test -r "$cache_file"; then
4272  # Some versions of bash will fail to source /dev/null (special files
4273  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
4274  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
4275    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
4276$as_echo "$as_me: loading cache $cache_file" >&6;}
4277    case $cache_file in
4278      [\\/]* | ?:[\\/]* ) . "$cache_file";;
4279      *)                      . "./$cache_file";;
4280    esac
4281  fi
4282else
4283  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
4284$as_echo "$as_me: creating cache $cache_file" >&6;}
4285  >$cache_file
4286fi
4287
4288
4289        APRUTIL_EXPORT_LIBS="$abs_srcdir/$apu_apriconv_dir/lib/libapriconv.la \
4290                             $APRUTIL_EXPORT_LIBS"
4291        APRUTIL_INCLUDES="-I$abs_srcdir/$apu_apriconv_dir/include \
4292                          $APRUTIL_INCLUDES"
4293        APR_ICONV_DIR="$apu_apriconv_dir"
4294      else
4295       APR_ICONV_DIR=""
4296      fi
4297    else
4298      APR_ICONV_DIR=""
4299    fi
4300
4301fi
4302
4303
4304
4305ac_ext=c
4306ac_cpp='$CPP $CPPFLAGS'
4307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309ac_compiler_gnu=$ac_cv_c_compiler_gnu
4310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4311$as_echo_n "checking how to run the C preprocessor... " >&6; }
4312# On Suns, sometimes $CPP names a directory.
4313if test -n "$CPP" && test -d "$CPP"; then
4314  CPP=
4315fi
4316if test -z "$CPP"; then
4317  if test "${ac_cv_prog_CPP+set}" = set; then :
4318  $as_echo_n "(cached) " >&6
4319else
4320      # Double quotes because CPP needs to be expanded
4321    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4322    do
4323      ac_preproc_ok=false
4324for ac_c_preproc_warn_flag in '' yes
4325do
4326  # Use a header file that comes with gcc, so configuring glibc
4327  # with a fresh cross-compiler works.
4328  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4329  # <limits.h> exists even on freestanding compilers.
4330  # On the NeXT, cc -E runs the code through the compiler's parser,
4331  # not just through cpp. "Syntax error" is here to catch this case.
4332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333/* end confdefs.h.  */
4334#ifdef __STDC__
4335# include <limits.h>
4336#else
4337# include <assert.h>
4338#endif
4339		     Syntax error
4340_ACEOF
4341if ac_fn_c_try_cpp "$LINENO"; then :
4342
4343else
4344  # Broken: fails on valid input.
4345continue
4346fi
4347rm -f conftest.err conftest.i conftest.$ac_ext
4348
4349  # OK, works on sane cases.  Now check whether nonexistent headers
4350  # can be detected and how.
4351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352/* end confdefs.h.  */
4353#include <ac_nonexistent.h>
4354_ACEOF
4355if ac_fn_c_try_cpp "$LINENO"; then :
4356  # Broken: success on invalid input.
4357continue
4358else
4359  # Passes both tests.
4360ac_preproc_ok=:
4361break
4362fi
4363rm -f conftest.err conftest.i conftest.$ac_ext
4364
4365done
4366# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4367rm -f conftest.i conftest.err conftest.$ac_ext
4368if $ac_preproc_ok; then :
4369  break
4370fi
4371
4372    done
4373    ac_cv_prog_CPP=$CPP
4374
4375fi
4376  CPP=$ac_cv_prog_CPP
4377else
4378  ac_cv_prog_CPP=$CPP
4379fi
4380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4381$as_echo "$CPP" >&6; }
4382ac_preproc_ok=false
4383for ac_c_preproc_warn_flag in '' yes
4384do
4385  # Use a header file that comes with gcc, so configuring glibc
4386  # with a fresh cross-compiler works.
4387  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4388  # <limits.h> exists even on freestanding compilers.
4389  # On the NeXT, cc -E runs the code through the compiler's parser,
4390  # not just through cpp. "Syntax error" is here to catch this case.
4391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392/* end confdefs.h.  */
4393#ifdef __STDC__
4394# include <limits.h>
4395#else
4396# include <assert.h>
4397#endif
4398		     Syntax error
4399_ACEOF
4400if ac_fn_c_try_cpp "$LINENO"; then :
4401
4402else
4403  # Broken: fails on valid input.
4404continue
4405fi
4406rm -f conftest.err conftest.i conftest.$ac_ext
4407
4408  # OK, works on sane cases.  Now check whether nonexistent headers
4409  # can be detected and how.
4410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411/* end confdefs.h.  */
4412#include <ac_nonexistent.h>
4413_ACEOF
4414if ac_fn_c_try_cpp "$LINENO"; then :
4415  # Broken: success on invalid input.
4416continue
4417else
4418  # Passes both tests.
4419ac_preproc_ok=:
4420break
4421fi
4422rm -f conftest.err conftest.i conftest.$ac_ext
4423
4424done
4425# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4426rm -f conftest.i conftest.err conftest.$ac_ext
4427if $ac_preproc_ok; then :
4428
4429else
4430  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4432as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4433See \`config.log' for more details" "$LINENO" 5; }
4434fi
4435
4436ac_ext=c
4437ac_cpp='$CPP $CPPFLAGS'
4438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440ac_compiler_gnu=$ac_cv_c_compiler_gnu
4441
4442
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4444$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4445if test "${ac_cv_path_GREP+set}" = set; then :
4446  $as_echo_n "(cached) " >&6
4447else
4448  if test -z "$GREP"; then
4449  ac_path_GREP_found=false
4450  # Loop through the user's path and test for each of PROGNAME-LIST
4451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4453do
4454  IFS=$as_save_IFS
4455  test -z "$as_dir" && as_dir=.
4456    for ac_prog in grep ggrep; do
4457    for ac_exec_ext in '' $ac_executable_extensions; do
4458      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4459      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4460# Check for GNU ac_path_GREP and select it if it is found.
4461  # Check for GNU $ac_path_GREP
4462case `"$ac_path_GREP" --version 2>&1` in
4463*GNU*)
4464  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4465*)
4466  ac_count=0
4467  $as_echo_n 0123456789 >"conftest.in"
4468  while :
4469  do
4470    cat "conftest.in" "conftest.in" >"conftest.tmp"
4471    mv "conftest.tmp" "conftest.in"
4472    cp "conftest.in" "conftest.nl"
4473    $as_echo 'GREP' >> "conftest.nl"
4474    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4475    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4476    as_fn_arith $ac_count + 1 && ac_count=$as_val
4477    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4478      # Best one so far, save it but keep looking for a better one
4479      ac_cv_path_GREP="$ac_path_GREP"
4480      ac_path_GREP_max=$ac_count
4481    fi
4482    # 10*(2^10) chars as input seems more than enough
4483    test $ac_count -gt 10 && break
4484  done
4485  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4486esac
4487
4488      $ac_path_GREP_found && break 3
4489    done
4490  done
4491  done
4492IFS=$as_save_IFS
4493  if test -z "$ac_cv_path_GREP"; then
4494    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4495  fi
4496else
4497  ac_cv_path_GREP=$GREP
4498fi
4499
4500fi
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4502$as_echo "$ac_cv_path_GREP" >&6; }
4503 GREP="$ac_cv_path_GREP"
4504
4505
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4507$as_echo_n "checking for egrep... " >&6; }
4508if test "${ac_cv_path_EGREP+set}" = set; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4512   then ac_cv_path_EGREP="$GREP -E"
4513   else
4514     if test -z "$EGREP"; then
4515  ac_path_EGREP_found=false
4516  # Loop through the user's path and test for each of PROGNAME-LIST
4517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4519do
4520  IFS=$as_save_IFS
4521  test -z "$as_dir" && as_dir=.
4522    for ac_prog in egrep; do
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4525      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4526# Check for GNU ac_path_EGREP and select it if it is found.
4527  # Check for GNU $ac_path_EGREP
4528case `"$ac_path_EGREP" --version 2>&1` in
4529*GNU*)
4530  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4531*)
4532  ac_count=0
4533  $as_echo_n 0123456789 >"conftest.in"
4534  while :
4535  do
4536    cat "conftest.in" "conftest.in" >"conftest.tmp"
4537    mv "conftest.tmp" "conftest.in"
4538    cp "conftest.in" "conftest.nl"
4539    $as_echo 'EGREP' >> "conftest.nl"
4540    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4541    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4542    as_fn_arith $ac_count + 1 && ac_count=$as_val
4543    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4544      # Best one so far, save it but keep looking for a better one
4545      ac_cv_path_EGREP="$ac_path_EGREP"
4546      ac_path_EGREP_max=$ac_count
4547    fi
4548    # 10*(2^10) chars as input seems more than enough
4549    test $ac_count -gt 10 && break
4550  done
4551  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4552esac
4553
4554      $ac_path_EGREP_found && break 3
4555    done
4556  done
4557  done
4558IFS=$as_save_IFS
4559  if test -z "$ac_cv_path_EGREP"; then
4560    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4561  fi
4562else
4563  ac_cv_path_EGREP=$EGREP
4564fi
4565
4566   fi
4567fi
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4569$as_echo "$ac_cv_path_EGREP" >&6; }
4570 EGREP="$ac_cv_path_EGREP"
4571
4572
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4574$as_echo_n "checking for ANSI C header files... " >&6; }
4575if test "${ac_cv_header_stdc+set}" = set; then :
4576  $as_echo_n "(cached) " >&6
4577else
4578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579/* end confdefs.h.  */
4580#include <stdlib.h>
4581#include <stdarg.h>
4582#include <string.h>
4583#include <float.h>
4584
4585int
4586main ()
4587{
4588
4589  ;
4590  return 0;
4591}
4592_ACEOF
4593if ac_fn_c_try_compile "$LINENO"; then :
4594  ac_cv_header_stdc=yes
4595else
4596  ac_cv_header_stdc=no
4597fi
4598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4599
4600if test $ac_cv_header_stdc = yes; then
4601  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4603/* end confdefs.h.  */
4604#include <string.h>
4605
4606_ACEOF
4607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4608  $EGREP "memchr" >/dev/null 2>&1; then :
4609
4610else
4611  ac_cv_header_stdc=no
4612fi
4613rm -f conftest*
4614
4615fi
4616
4617if test $ac_cv_header_stdc = yes; then
4618  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4620/* end confdefs.h.  */
4621#include <stdlib.h>
4622
4623_ACEOF
4624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4625  $EGREP "free" >/dev/null 2>&1; then :
4626
4627else
4628  ac_cv_header_stdc=no
4629fi
4630rm -f conftest*
4631
4632fi
4633
4634if test $ac_cv_header_stdc = yes; then
4635  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4636  if test "$cross_compiling" = yes; then :
4637  :
4638else
4639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4640/* end confdefs.h.  */
4641#include <ctype.h>
4642#include <stdlib.h>
4643#if ((' ' & 0x0FF) == 0x020)
4644# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4645# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4646#else
4647# define ISLOWER(c) \
4648		   (('a' <= (c) && (c) <= 'i') \
4649		     || ('j' <= (c) && (c) <= 'r') \
4650		     || ('s' <= (c) && (c) <= 'z'))
4651# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4652#endif
4653
4654#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4655int
4656main ()
4657{
4658  int i;
4659  for (i = 0; i < 256; i++)
4660    if (XOR (islower (i), ISLOWER (i))
4661	|| toupper (i) != TOUPPER (i))
4662      return 2;
4663  return 0;
4664}
4665_ACEOF
4666if ac_fn_c_try_run "$LINENO"; then :
4667
4668else
4669  ac_cv_header_stdc=no
4670fi
4671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4672  conftest.$ac_objext conftest.beam conftest.$ac_ext
4673fi
4674
4675fi
4676fi
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4678$as_echo "$ac_cv_header_stdc" >&6; }
4679if test $ac_cv_header_stdc = yes; then
4680
4681$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4682
4683fi
4684
4685# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4686for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4687		  inttypes.h stdint.h unistd.h
4688do :
4689  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4690ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4691"
4692if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4693  cat >>confdefs.h <<_ACEOF
4694#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4695_ACEOF
4696
4697fi
4698
4699done
4700
4701
4702
4703  apu_have_crypto=0
4704  apu_have_openssl=0
4705  apu_have_nss=0
4706
4707  old_libs="$LIBS"
4708  old_cppflags="$CPPFLAGS"
4709  old_ldflags="$LDFLAGS"
4710
4711
4712# Check whether --with-crypto was given.
4713if test "${with_crypto+set}" = set; then :
4714  withval=$with_crypto;
4715    cryptolibs="openssl nss"
4716
4717    if test "$withval" = "yes"; then
4718
4719      crypto_library_enabled=0
4720      for cryptolib in $cryptolibs; do
4721        eval v=\$with_$cryptolib
4722        if test "$v" != "" -a "$v" != "no"; then
4723          crypto_library_enabled=1
4724        fi
4725      done
4726
4727      if test "$crypto_library_enabled" = "0"; then
4728        for cryptolib in $cryptolibs; do
4729          eval v=\$with_$cryptolib
4730          if test "$v" != "no"; then
4731            eval with_$cryptolib=yes
4732            crypto_library_enabled=1
4733          fi
4734        done
4735	if test "$crypto_library_enabled" = "1"; then
4736          { $as_echo "$as_me:${as_lineno-$LINENO}: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&5
4737$as_echo "$as_me: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&6;}
4738        else
4739          as_fn_error $? "Crypto was requested but all possible crypto libraries were disabled." "$LINENO" 5
4740	fi
4741      fi
4742
4743
4744  openssl_have_headers=0
4745  openssl_have_libs=0
4746
4747  old_libs="$LIBS"
4748  old_cppflags="$CPPFLAGS"
4749  old_ldflags="$LDFLAGS"
4750
4751
4752# Check whether --with-openssl was given.
4753if test "${with_openssl+set}" = set; then :
4754  withval=$with_openssl;
4755    if test "$withval" = "yes"; then
4756      for ac_header in openssl/x509.h
4757do :
4758  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
4759if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
4760  cat >>confdefs.h <<_ACEOF
4761#define HAVE_OPENSSL_X509_H 1
4762_ACEOF
4763 openssl_have_headers=1
4764fi
4765
4766done
4767
4768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
4769$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
4770if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
4771  $as_echo_n "(cached) " >&6
4772else
4773  ac_check_lib_save_LIBS=$LIBS
4774LIBS="-lcrypto  $LIBS"
4775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776/* end confdefs.h.  */
4777
4778/* Override any GCC internal prototype to avoid an error.
4779   Use char because int might match the return type of a GCC
4780   builtin and then its argument prototype would still apply.  */
4781#ifdef __cplusplus
4782extern "C"
4783#endif
4784char BN_init ();
4785int
4786main ()
4787{
4788return BN_init ();
4789  ;
4790  return 0;
4791}
4792_ACEOF
4793if ac_fn_c_try_link "$LINENO"; then :
4794  ac_cv_lib_crypto_BN_init=yes
4795else
4796  ac_cv_lib_crypto_BN_init=no
4797fi
4798rm -f core conftest.err conftest.$ac_objext \
4799    conftest$ac_exeext conftest.$ac_ext
4800LIBS=$ac_check_lib_save_LIBS
4801fi
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
4803$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
4804if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
4806$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
4807if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
4808  $as_echo_n "(cached) " >&6
4809else
4810  ac_check_lib_save_LIBS=$LIBS
4811LIBS="-lssl -lcrypto $LIBS"
4812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813/* end confdefs.h.  */
4814
4815/* Override any GCC internal prototype to avoid an error.
4816   Use char because int might match the return type of a GCC
4817   builtin and then its argument prototype would still apply.  */
4818#ifdef __cplusplus
4819extern "C"
4820#endif
4821char SSL_accept ();
4822int
4823main ()
4824{
4825return SSL_accept ();
4826  ;
4827  return 0;
4828}
4829_ACEOF
4830if ac_fn_c_try_link "$LINENO"; then :
4831  ac_cv_lib_ssl_SSL_accept=yes
4832else
4833  ac_cv_lib_ssl_SSL_accept=no
4834fi
4835rm -f core conftest.err conftest.$ac_objext \
4836    conftest$ac_exeext conftest.$ac_ext
4837LIBS=$ac_check_lib_save_LIBS
4838fi
4839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
4840$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
4841if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
4842  openssl_have_libs=1
4843fi
4844
4845fi
4846
4847      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
4848        apu_have_openssl=1
4849      fi
4850    elif test "$withval" = "no"; then
4851      apu_have_openssl=0
4852    else
4853
4854      openssl_CPPFLAGS="-I$withval/include"
4855      openssl_LDFLAGS="-L$withval/lib "
4856
4857
4858  if test "x$CPPFLAGS" = "x"; then
4859    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$openssl_CPPFLAGS\""
4860    CPPFLAGS="$openssl_CPPFLAGS"
4861  else
4862    apr_addto_bugger="$openssl_CPPFLAGS"
4863    for i in $apr_addto_bugger; do
4864      apr_addto_duplicate="0"
4865      for j in $CPPFLAGS; do
4866        if test "x$i" = "x$j"; then
4867          apr_addto_duplicate="1"
4868          break
4869        fi
4870      done
4871      if test $apr_addto_duplicate = "0"; then
4872        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
4873        CPPFLAGS="$CPPFLAGS $i"
4874      fi
4875    done
4876  fi
4877
4878
4879  if test "x$LDFLAGS" = "x"; then
4880    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$openssl_LDFLAGS\""
4881    LDFLAGS="$openssl_LDFLAGS"
4882  else
4883    apr_addto_bugger="$openssl_LDFLAGS"
4884    for i in $apr_addto_bugger; do
4885      apr_addto_duplicate="0"
4886      for j in $LDFLAGS; do
4887        if test "x$i" = "x$j"; then
4888          apr_addto_duplicate="1"
4889          break
4890        fi
4891      done
4892      if test $apr_addto_duplicate = "0"; then
4893        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
4894        LDFLAGS="$LDFLAGS $i"
4895      fi
4896    done
4897  fi
4898
4899
4900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in $withval" >&5
4901$as_echo "$as_me: checking for openssl in $withval" >&6;}
4902      for ac_header in openssl/x509.h
4903do :
4904  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
4905if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
4906  cat >>confdefs.h <<_ACEOF
4907#define HAVE_OPENSSL_X509_H 1
4908_ACEOF
4909 openssl_have_headers=1
4910fi
4911
4912done
4913
4914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
4915$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
4916if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
4917  $as_echo_n "(cached) " >&6
4918else
4919  ac_check_lib_save_LIBS=$LIBS
4920LIBS="-lcrypto  $LIBS"
4921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4922/* end confdefs.h.  */
4923
4924/* Override any GCC internal prototype to avoid an error.
4925   Use char because int might match the return type of a GCC
4926   builtin and then its argument prototype would still apply.  */
4927#ifdef __cplusplus
4928extern "C"
4929#endif
4930char BN_init ();
4931int
4932main ()
4933{
4934return BN_init ();
4935  ;
4936  return 0;
4937}
4938_ACEOF
4939if ac_fn_c_try_link "$LINENO"; then :
4940  ac_cv_lib_crypto_BN_init=yes
4941else
4942  ac_cv_lib_crypto_BN_init=no
4943fi
4944rm -f core conftest.err conftest.$ac_objext \
4945    conftest$ac_exeext conftest.$ac_ext
4946LIBS=$ac_check_lib_save_LIBS
4947fi
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
4949$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
4950if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
4951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
4952$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
4953if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
4954  $as_echo_n "(cached) " >&6
4955else
4956  ac_check_lib_save_LIBS=$LIBS
4957LIBS="-lssl -lcrypto $LIBS"
4958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4959/* end confdefs.h.  */
4960
4961/* Override any GCC internal prototype to avoid an error.
4962   Use char because int might match the return type of a GCC
4963   builtin and then its argument prototype would still apply.  */
4964#ifdef __cplusplus
4965extern "C"
4966#endif
4967char SSL_accept ();
4968int
4969main ()
4970{
4971return SSL_accept ();
4972  ;
4973  return 0;
4974}
4975_ACEOF
4976if ac_fn_c_try_link "$LINENO"; then :
4977  ac_cv_lib_ssl_SSL_accept=yes
4978else
4979  ac_cv_lib_ssl_SSL_accept=no
4980fi
4981rm -f core conftest.err conftest.$ac_objext \
4982    conftest$ac_exeext conftest.$ac_ext
4983LIBS=$ac_check_lib_save_LIBS
4984fi
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
4986$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
4987if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
4988  openssl_have_libs=1
4989fi
4990
4991fi
4992
4993      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
4994        apu_have_openssl=1
4995
4996  if test "x$APRUTIL_LDFLAGS" = "x"; then
4997    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
4998    APRUTIL_LDFLAGS="-L$withval/lib"
4999  else
5000    apr_addto_bugger="-L$withval/lib"
5001    for i in $apr_addto_bugger; do
5002      apr_addto_duplicate="0"
5003      for j in $APRUTIL_LDFLAGS; do
5004        if test "x$i" = "x$j"; then
5005          apr_addto_duplicate="1"
5006          break
5007        fi
5008      done
5009      if test $apr_addto_duplicate = "0"; then
5010        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5011        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5012      fi
5013    done
5014  fi
5015
5016
5017  if test "x$APRUTIL_INCLUDES" = "x"; then
5018    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
5019    APRUTIL_INCLUDES="-I$withval/include"
5020  else
5021    apr_addto_bugger="-I$withval/include"
5022    for i in $apr_addto_bugger; do
5023      apr_addto_duplicate="0"
5024      for j in $APRUTIL_INCLUDES; do
5025        if test "x$i" = "x$j"; then
5026          apr_addto_duplicate="1"
5027          break
5028        fi
5029      done
5030      if test $apr_addto_duplicate = "0"; then
5031        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5032        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5033      fi
5034    done
5035  fi
5036
5037      fi
5038
5039      if test "$apu_have_openssl" != "1"; then
5040        for ac_header in openssl/x509.h
5041do :
5042  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
5043if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
5044  cat >>confdefs.h <<_ACEOF
5045#define HAVE_OPENSSL_X509_H 1
5046_ACEOF
5047 openssl_have_headers=1
5048fi
5049
5050done
5051
5052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
5053$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
5054if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
5055  $as_echo_n "(cached) " >&6
5056else
5057  ac_check_lib_save_LIBS=$LIBS
5058LIBS="-lcrypto  $LIBS"
5059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5060/* end confdefs.h.  */
5061
5062/* Override any GCC internal prototype to avoid an error.
5063   Use char because int might match the return type of a GCC
5064   builtin and then its argument prototype would still apply.  */
5065#ifdef __cplusplus
5066extern "C"
5067#endif
5068char BN_init ();
5069int
5070main ()
5071{
5072return BN_init ();
5073  ;
5074  return 0;
5075}
5076_ACEOF
5077if ac_fn_c_try_link "$LINENO"; then :
5078  ac_cv_lib_crypto_BN_init=yes
5079else
5080  ac_cv_lib_crypto_BN_init=no
5081fi
5082rm -f core conftest.err conftest.$ac_objext \
5083    conftest$ac_exeext conftest.$ac_ext
5084LIBS=$ac_check_lib_save_LIBS
5085fi
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
5087$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
5088if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
5089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
5090$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
5091if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
5092  $as_echo_n "(cached) " >&6
5093else
5094  ac_check_lib_save_LIBS=$LIBS
5095LIBS="-lssl -lcrypto $LIBS"
5096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5097/* end confdefs.h.  */
5098
5099/* Override any GCC internal prototype to avoid an error.
5100   Use char because int might match the return type of a GCC
5101   builtin and then its argument prototype would still apply.  */
5102#ifdef __cplusplus
5103extern "C"
5104#endif
5105char SSL_accept ();
5106int
5107main ()
5108{
5109return SSL_accept ();
5110  ;
5111  return 0;
5112}
5113_ACEOF
5114if ac_fn_c_try_link "$LINENO"; then :
5115  ac_cv_lib_ssl_SSL_accept=yes
5116else
5117  ac_cv_lib_ssl_SSL_accept=no
5118fi
5119rm -f core conftest.err conftest.$ac_objext \
5120    conftest$ac_exeext conftest.$ac_ext
5121LIBS=$ac_check_lib_save_LIBS
5122fi
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
5124$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
5125if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
5126  openssl_have_libs=1
5127fi
5128
5129fi
5130
5131        if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
5132          apu_have_openssl=1
5133
5134  if test "x$APRUTIL_LDFLAGS" = "x"; then
5135    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
5136    APRUTIL_LDFLAGS="-L$withval/lib"
5137  else
5138    apr_addto_bugger="-L$withval/lib"
5139    for i in $apr_addto_bugger; do
5140      apr_addto_duplicate="0"
5141      for j in $APRUTIL_LDFLAGS; do
5142        if test "x$i" = "x$j"; then
5143          apr_addto_duplicate="1"
5144          break
5145        fi
5146      done
5147      if test $apr_addto_duplicate = "0"; then
5148        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5149        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5150      fi
5151    done
5152  fi
5153
5154
5155  if test "x$APRUTIL_INCLUDES" = "x"; then
5156    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
5157    APRUTIL_INCLUDES="-I$withval/include"
5158  else
5159    apr_addto_bugger="-I$withval/include"
5160    for i in $apr_addto_bugger; do
5161      apr_addto_duplicate="0"
5162      for j in $APRUTIL_INCLUDES; do
5163        if test "x$i" = "x$j"; then
5164          apr_addto_duplicate="1"
5165          break
5166        fi
5167      done
5168      if test $apr_addto_duplicate = "0"; then
5169        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5170        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5171      fi
5172    done
5173  fi
5174
5175        fi
5176      fi
5177
5178      ac_fn_c_check_decl "$LINENO" "EVP_PKEY_CTX_new" "ac_cv_have_decl_EVP_PKEY_CTX_new" "#include <openssl/evp.h>
5179"
5180if test "x$ac_cv_have_decl_EVP_PKEY_CTX_new" = x""yes; then :
5181  ac_have_decl=1
5182else
5183  ac_have_decl=0
5184fi
5185
5186cat >>confdefs.h <<_ACEOF
5187#define HAVE_DECL_EVP_PKEY_CTX_NEW $ac_have_decl
5188_ACEOF
5189
5190
5191    fi
5192
5193else
5194
5195    apu_have_openssl=0
5196
5197fi
5198
5199
5200
5201
5202      if test "$apu_have_openssl" = "1"; then
5203
5204  if test "x$LDADD_crypto_openssl" = "x"; then
5205    test "x$silent" != "xyes" && echo "  setting LDADD_crypto_openssl to \"$openssl_LDFLAGS -lssl -lcrypto\""
5206    LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto"
5207  else
5208    apr_addto_bugger="$openssl_LDFLAGS -lssl -lcrypto"
5209    for i in $apr_addto_bugger; do
5210      apr_addto_duplicate="0"
5211      for j in $LDADD_crypto_openssl; do
5212        if test "x$i" = "x$j"; then
5213          apr_addto_duplicate="1"
5214          break
5215        fi
5216      done
5217      if test $apr_addto_duplicate = "0"; then
5218        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_crypto_openssl"
5219        LDADD_crypto_openssl="$LDADD_crypto_openssl $i"
5220      fi
5221    done
5222  fi
5223
5224    apu_have_crypto=1
5225
5226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5
5227$as_echo_n "checking for const input buffers in OpenSSL... " >&6; }
5228    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5229/* end confdefs.h.  */
5230#include <openssl/rsa.h>
5231int
5232main ()
5233{
5234 const unsigned char * buf;
5235          unsigned char * outbuf;
5236          RSA rsa;
5237
5238                RSA_private_decrypt(1,
5239                                                        buf,
5240                                                        outbuf,
5241                                                        &rsa,
5242                                                        RSA_PKCS1_PADDING);
5243
5244
5245  ;
5246  return 0;
5247}
5248_ACEOF
5249if ac_fn_c_try_compile "$LINENO"; then :
5250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5251$as_echo "yes" >&6; }
5252
5253$as_echo "#define CRYPTO_OPENSSL_CONST_BUFFERS 1" >>confdefs.h
5254
5255else
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5257$as_echo "no" >&6; }
5258fi
5259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5260
5261  fi
5262
5263
5264
5265  LIBS="$old_libs"
5266  CPPFLAGS="$old_cppflags"
5267  LDFLAGS="$old_ldflags"
5268
5269
5270  nss_have_libs=0
5271
5272  old_libs="$LIBS"
5273  old_cppflags="$CPPFLAGS"
5274  old_ldflags="$LDFLAGS"
5275
5276
5277# Check whether --with-nss was given.
5278if test "${with_nss+set}" = set; then :
5279  withval=$with_nss;
5280    if test "$withval" = "yes"; then
5281      if test -n "$ac_tool_prefix"; then
5282  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5283set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5285$as_echo_n "checking for $ac_word... " >&6; }
5286if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5287  $as_echo_n "(cached) " >&6
5288else
5289  case $PKG_CONFIG in
5290  [\\/]* | ?:[\\/]*)
5291  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5292  ;;
5293  *)
5294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297  IFS=$as_save_IFS
5298  test -z "$as_dir" && as_dir=.
5299    for ac_exec_ext in '' $ac_executable_extensions; do
5300  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5301    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5303    break 2
5304  fi
5305done
5306  done
5307IFS=$as_save_IFS
5308
5309  ;;
5310esac
5311fi
5312PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5313if test -n "$PKG_CONFIG"; then
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5315$as_echo "$PKG_CONFIG" >&6; }
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320
5321
5322fi
5323if test -z "$ac_cv_path_PKG_CONFIG"; then
5324  ac_pt_PKG_CONFIG=$PKG_CONFIG
5325  # Extract the first word of "pkg-config", so it can be a program name with args.
5326set dummy pkg-config; ac_word=$2
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5328$as_echo_n "checking for $ac_word... " >&6; }
5329if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
5330  $as_echo_n "(cached) " >&6
5331else
5332  case $ac_pt_PKG_CONFIG in
5333  [\\/]* | ?:[\\/]*)
5334  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5335  ;;
5336  *)
5337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5338for as_dir in $PATH
5339do
5340  IFS=$as_save_IFS
5341  test -z "$as_dir" && as_dir=.
5342    for ac_exec_ext in '' $ac_executable_extensions; do
5343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5344    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5346    break 2
5347  fi
5348done
5349  done
5350IFS=$as_save_IFS
5351
5352  ;;
5353esac
5354fi
5355ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5356if test -n "$ac_pt_PKG_CONFIG"; then
5357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5358$as_echo "$ac_pt_PKG_CONFIG" >&6; }
5359else
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361$as_echo "no" >&6; }
5362fi
5363
5364  if test "x$ac_pt_PKG_CONFIG" = x; then
5365    PKG_CONFIG=""
5366  else
5367    case $cross_compiling:$ac_tool_warned in
5368yes:)
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5371ac_tool_warned=yes ;;
5372esac
5373    PKG_CONFIG=$ac_pt_PKG_CONFIG
5374  fi
5375else
5376  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5377fi
5378
5379      if test -n "$PKG_CONFIG"; then
5380        nss_CPPFLAGS=`$PKG_CONFIG --cflags-only-I nss`
5381        nss_LDFLAGS=`$PKG_CONFIG --libs nss`
5382
5383  if test "x$CPPFLAGS" = "x"; then
5384    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
5385    CPPFLAGS="$nss_CPPFLAGS"
5386  else
5387    apr_addto_bugger="$nss_CPPFLAGS"
5388    for i in $apr_addto_bugger; do
5389      apr_addto_duplicate="0"
5390      for j in $CPPFLAGS; do
5391        if test "x$i" = "x$j"; then
5392          apr_addto_duplicate="1"
5393          break
5394        fi
5395      done
5396      if test $apr_addto_duplicate = "0"; then
5397        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5398        CPPFLAGS="$CPPFLAGS $i"
5399      fi
5400    done
5401  fi
5402
5403
5404  if test "x$LDFLAGS" = "x"; then
5405    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
5406    LDFLAGS="$nss_LDFLAGS"
5407  else
5408    apr_addto_bugger="$nss_LDFLAGS"
5409    for i in $apr_addto_bugger; do
5410      apr_addto_duplicate="0"
5411      for j in $LDFLAGS; do
5412        if test "x$i" = "x$j"; then
5413          apr_addto_duplicate="1"
5414          break
5415        fi
5416      done
5417      if test $apr_addto_duplicate = "0"; then
5418        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5419        LDFLAGS="$LDFLAGS $i"
5420      fi
5421    done
5422  fi
5423
5424      fi
5425      nss_have_prerrorh=0
5426      nss_have_nssh=0
5427      nss_have_pk11pubh=0
5428      for ac_header in prerror.h
5429do :
5430  ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default"
5431if test "x$ac_cv_header_prerror_h" = x""yes; then :
5432  cat >>confdefs.h <<_ACEOF
5433#define HAVE_PRERROR_H 1
5434_ACEOF
5435 nss_have_prerrorh=1
5436fi
5437
5438done
5439
5440      for ac_header in nss/nss.h nss.h
5441do :
5442  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5443ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5444if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5445  cat >>confdefs.h <<_ACEOF
5446#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5447_ACEOF
5448 nss_have_nssh=1
5449fi
5450
5451done
5452
5453      for ac_header in nss/pk11pub.h pk11pub.h
5454do :
5455  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5456ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5457if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5458  cat >>confdefs.h <<_ACEOF
5459#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5460_ACEOF
5461 nss_have_pk11pubh=1
5462fi
5463
5464done
5465
5466      nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
5467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
5468$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
5469if test "${ac_cv_lib_nspr4_PR_Initialize+set}" = set; then :
5470  $as_echo_n "(cached) " >&6
5471else
5472  ac_check_lib_save_LIBS=$LIBS
5473LIBS="-lnspr4  $LIBS"
5474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h.  */
5476
5477/* Override any GCC internal prototype to avoid an error.
5478   Use char because int might match the return type of a GCC
5479   builtin and then its argument prototype would still apply.  */
5480#ifdef __cplusplus
5481extern "C"
5482#endif
5483char PR_Initialize ();
5484int
5485main ()
5486{
5487return PR_Initialize ();
5488  ;
5489  return 0;
5490}
5491_ACEOF
5492if ac_fn_c_try_link "$LINENO"; then :
5493  ac_cv_lib_nspr4_PR_Initialize=yes
5494else
5495  ac_cv_lib_nspr4_PR_Initialize=no
5496fi
5497rm -f core conftest.err conftest.$ac_objext \
5498    conftest$ac_exeext conftest.$ac_ext
5499LIBS=$ac_check_lib_save_LIBS
5500fi
5501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
5502$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
5503if test "x$ac_cv_lib_nspr4_PR_Initialize" = x""yes; then :
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
5505$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
5506if test "${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+set}" = set; then :
5507  $as_echo_n "(cached) " >&6
5508else
5509  ac_check_lib_save_LIBS=$LIBS
5510LIBS="-lnss3 -lnspr4 $LIBS"
5511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5512/* end confdefs.h.  */
5513
5514/* Override any GCC internal prototype to avoid an error.
5515   Use char because int might match the return type of a GCC
5516   builtin and then its argument prototype would still apply.  */
5517#ifdef __cplusplus
5518extern "C"
5519#endif
5520char PK11_CreatePBEV2AlgorithmID ();
5521int
5522main ()
5523{
5524return PK11_CreatePBEV2AlgorithmID ();
5525  ;
5526  return 0;
5527}
5528_ACEOF
5529if ac_fn_c_try_link "$LINENO"; then :
5530  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
5531else
5532  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
5533fi
5534rm -f core conftest.err conftest.$ac_objext \
5535    conftest$ac_exeext conftest.$ac_ext
5536LIBS=$ac_check_lib_save_LIBS
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
5539$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
5540if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = x""yes; then :
5541  nss_have_libs=1
5542fi
5543
5544fi
5545
5546      if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
5547        apu_have_nss=1
5548      fi
5549    elif test "$withval" = "no"; then
5550      apu_have_nss=0
5551    elif test "x$withval" != "x"; then
5552
5553      nss_CPPFLAGS="-I$withval/include/nss -I$withval/include/nss3 -I$withval/include/nspr -I$withval/include/nspr4 -I$withval/include -I$withval/../public"
5554      nss_LDFLAGS="-L$withval/lib "
5555
5556
5557  if test "x$CPPFLAGS" = "x"; then
5558    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
5559    CPPFLAGS="$nss_CPPFLAGS"
5560  else
5561    apr_addto_bugger="$nss_CPPFLAGS"
5562    for i in $apr_addto_bugger; do
5563      apr_addto_duplicate="0"
5564      for j in $CPPFLAGS; do
5565        if test "x$i" = "x$j"; then
5566          apr_addto_duplicate="1"
5567          break
5568        fi
5569      done
5570      if test $apr_addto_duplicate = "0"; then
5571        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
5572        CPPFLAGS="$CPPFLAGS $i"
5573      fi
5574    done
5575  fi
5576
5577
5578  if test "x$LDFLAGS" = "x"; then
5579    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
5580    LDFLAGS="$nss_LDFLAGS"
5581  else
5582    apr_addto_bugger="$nss_LDFLAGS"
5583    for i in $apr_addto_bugger; do
5584      apr_addto_duplicate="0"
5585      for j in $LDFLAGS; do
5586        if test "x$i" = "x$j"; then
5587          apr_addto_duplicate="1"
5588          break
5589        fi
5590      done
5591      if test $apr_addto_duplicate = "0"; then
5592        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
5593        LDFLAGS="$LDFLAGS $i"
5594      fi
5595    done
5596  fi
5597
5598
5599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5
5600$as_echo "$as_me: checking for nss in $withval" >&6;}
5601      nss_have_prerrorh=0
5602      nss_have_nssh=0
5603      nss_have_pk11pubh=0
5604      for ac_header in prerror.h
5605do :
5606  ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default"
5607if test "x$ac_cv_header_prerror_h" = x""yes; then :
5608  cat >>confdefs.h <<_ACEOF
5609#define HAVE_PRERROR_H 1
5610_ACEOF
5611 nss_have_prerrorh=1
5612fi
5613
5614done
5615
5616      for ac_header in nss/nss.h nss.h
5617do :
5618  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5619ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5620if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5621  cat >>confdefs.h <<_ACEOF
5622#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5623_ACEOF
5624 nss_have_nssh=1
5625fi
5626
5627done
5628
5629      for ac_header in nss/pk11pub.h pk11pub.h
5630do :
5631  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5632ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5633if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5634  cat >>confdefs.h <<_ACEOF
5635#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5636_ACEOF
5637 nss_have_pk11pubh=1
5638fi
5639
5640done
5641
5642      nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
5643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
5644$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
5645if test "${ac_cv_lib_nspr4_PR_Initialize+set}" = set; then :
5646  $as_echo_n "(cached) " >&6
5647else
5648  ac_check_lib_save_LIBS=$LIBS
5649LIBS="-lnspr4  $LIBS"
5650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5651/* end confdefs.h.  */
5652
5653/* Override any GCC internal prototype to avoid an error.
5654   Use char because int might match the return type of a GCC
5655   builtin and then its argument prototype would still apply.  */
5656#ifdef __cplusplus
5657extern "C"
5658#endif
5659char PR_Initialize ();
5660int
5661main ()
5662{
5663return PR_Initialize ();
5664  ;
5665  return 0;
5666}
5667_ACEOF
5668if ac_fn_c_try_link "$LINENO"; then :
5669  ac_cv_lib_nspr4_PR_Initialize=yes
5670else
5671  ac_cv_lib_nspr4_PR_Initialize=no
5672fi
5673rm -f core conftest.err conftest.$ac_objext \
5674    conftest$ac_exeext conftest.$ac_ext
5675LIBS=$ac_check_lib_save_LIBS
5676fi
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
5678$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
5679if test "x$ac_cv_lib_nspr4_PR_Initialize" = x""yes; then :
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
5681$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
5682if test "${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+set}" = set; then :
5683  $as_echo_n "(cached) " >&6
5684else
5685  ac_check_lib_save_LIBS=$LIBS
5686LIBS="-lnss3 -lnspr4 $LIBS"
5687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5688/* end confdefs.h.  */
5689
5690/* Override any GCC internal prototype to avoid an error.
5691   Use char because int might match the return type of a GCC
5692   builtin and then its argument prototype would still apply.  */
5693#ifdef __cplusplus
5694extern "C"
5695#endif
5696char PK11_CreatePBEV2AlgorithmID ();
5697int
5698main ()
5699{
5700return PK11_CreatePBEV2AlgorithmID ();
5701  ;
5702  return 0;
5703}
5704_ACEOF
5705if ac_fn_c_try_link "$LINENO"; then :
5706  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
5707else
5708  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
5709fi
5710rm -f core conftest.err conftest.$ac_objext \
5711    conftest$ac_exeext conftest.$ac_ext
5712LIBS=$ac_check_lib_save_LIBS
5713fi
5714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
5715$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
5716if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = x""yes; then :
5717  nss_have_libs=1
5718fi
5719
5720fi
5721
5722      if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
5723        apu_have_nss=1
5724      fi
5725
5726    fi
5727    if test "$apu_have_nss" != "0"; then
5728
5729  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
5730    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$nss_CPPFLAGS\""
5731    APRUTIL_PRIV_INCLUDES="$nss_CPPFLAGS"
5732  else
5733    apr_addto_bugger="$nss_CPPFLAGS"
5734    for i in $apr_addto_bugger; do
5735      apr_addto_duplicate="0"
5736      for j in $APRUTIL_PRIV_INCLUDES; do
5737        if test "x$i" = "x$j"; then
5738          apr_addto_duplicate="1"
5739          break
5740        fi
5741      done
5742      if test $apr_addto_duplicate = "0"; then
5743        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
5744        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
5745      fi
5746    done
5747  fi
5748
5749    fi
5750
5751else
5752
5753    apu_have_nss=0
5754
5755fi
5756
5757
5758
5759
5760      if test "$apu_have_nss" = "1"; then
5761
5762  if test "x$LDADD_crypto_nss" = "x"; then
5763    test "x$silent" != "xyes" && echo "  setting LDADD_crypto_nss to \"$nss_LDFLAGS -lnspr4 -lnss3\""
5764    LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3"
5765  else
5766    apr_addto_bugger="$nss_LDFLAGS -lnspr4 -lnss3"
5767    for i in $apr_addto_bugger; do
5768      apr_addto_duplicate="0"
5769      for j in $LDADD_crypto_nss; do
5770        if test "x$i" = "x$j"; then
5771          apr_addto_duplicate="1"
5772          break
5773        fi
5774      done
5775      if test $apr_addto_duplicate = "0"; then
5776        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_crypto_nss"
5777        LDADD_crypto_nss="$LDADD_crypto_nss $i"
5778      fi
5779    done
5780  fi
5781
5782    apu_have_crypto=1
5783  fi
5784
5785
5786
5787  LIBS="$old_libs"
5788  CPPFLAGS="$old_cppflags"
5789  LDFLAGS="$old_ldflags"
5790
5791            if test "$apu_have_crypto" = "0"; then
5792        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
5793      fi
5794    fi
5795
5796else
5797
5798      apu_have_crypto=0
5799
5800fi
5801
5802
5803
5804
5805
5806
5807
5808echo $ac_n "${nl}checking for ldap support..."
5809
5810apu_has_ldap="0";
5811apu_has_ldapssl_client_init="0"
5812apu_has_ldapssl_client_deinit="0"
5813apu_has_ldapssl_add_trusted_cert="0"
5814apu_has_ldap_start_tls_s="0"
5815apu_has_ldapssl_init="0"
5816apu_has_ldap_sslinit="0"
5817apu_has_ldapssl_install_routines="0"
5818apu_has_ldap_openldap="0"
5819apu_has_ldap_solaris="0"
5820apu_has_ldap_novell="0"
5821apu_has_ldap_microsoft="0"
5822apu_has_ldap_netscape="0"
5823apu_has_ldap_mozilla="0"
5824apu_has_ldap_tivoli="0"
5825apu_has_ldap_zos="0"
5826apu_has_ldap_other="0"
5827LDADD_ldap_found=""
5828
5829
5830# Check whether --with-lber was given.
5831if test "${with_lber+set}" = set; then :
5832  withval=$with_lber;
5833    if test "$withval" = "yes"; then
5834      apu_liblber_name="lber"
5835    else
5836      apu_liblber_name="$withval"
5837    fi
5838
5839else
5840
5841    apu_liblber_name="lber"
5842
5843fi
5844
5845
5846
5847# Check whether --with-ldap-include was given.
5848if test "${with_ldap_include+set}" = set; then :
5849  withval=$with_ldap_include;
5850fi
5851
5852
5853# Check whether --with-ldap-lib was given.
5854if test "${with_ldap_lib+set}" = set; then :
5855  withval=$with_ldap_lib;
5856fi
5857
5858
5859# Check whether --with-ldap was given.
5860if test "${with_ldap+set}" = set; then :
5861  withval=$with_ldap;
5862    if test "$with_ldap" != "no"; then
5863      save_cppflags="$CPPFLAGS"
5864      save_ldflags="$LDFLAGS"
5865      save_libs="$LIBS"
5866      if test -n "$with_ldap_include"; then
5867        CPPFLAGS="$CPPFLAGS -I$with_ldap_include"
5868
5869  if test "x$APRUTIL_INCLUDES" = "x"; then
5870    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$with_ldap_include\""
5871    APRUTIL_INCLUDES="-I$with_ldap_include"
5872  else
5873    apr_addto_bugger="-I$with_ldap_include"
5874    for i in $apr_addto_bugger; do
5875      apr_addto_duplicate="0"
5876      for j in $APRUTIL_INCLUDES; do
5877        if test "x$i" = "x$j"; then
5878          apr_addto_duplicate="1"
5879          break
5880        fi
5881      done
5882      if test $apr_addto_duplicate = "0"; then
5883        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
5884        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
5885      fi
5886    done
5887  fi
5888
5889      fi
5890      if test -n "$with_ldap_lib"; then
5891        LDFLAGS="$LDFLAGS -L$with_ldap_lib"
5892
5893  if test "x$APRUTIL_LDFLAGS" = "x"; then
5894    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$with_ldap_lib\""
5895    APRUTIL_LDFLAGS="-L$with_ldap_lib"
5896  else
5897    apr_addto_bugger="-L$with_ldap_lib"
5898    for i in $apr_addto_bugger; do
5899      apr_addto_duplicate="0"
5900      for j in $APRUTIL_LDFLAGS; do
5901        if test "x$i" = "x$j"; then
5902          apr_addto_duplicate="1"
5903          break
5904        fi
5905      done
5906      if test $apr_addto_duplicate = "0"; then
5907        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
5908        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
5909      fi
5910    done
5911  fi
5912
5913      fi
5914
5915      LIBLDAP="$withval"
5916      if test "$LIBLDAP" = "yes"; then
5917
5918  if test ${apu_has_ldap} != "1"; then
5919    ldaplib="ldap50"
5920    extralib="-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50"
5921    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
5922
5923    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
5924
5925    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
5926    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
5927    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
5929$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
5930if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
5931  $as_echo_n "(cached) " >&6
5932else
5933  ac_check_lib_save_LIBS=$LIBS
5934LIBS="-l${ldaplib} ${extralib} $LIBS"
5935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5936/* end confdefs.h.  */
5937
5938/* Override any GCC internal prototype to avoid an error.
5939   Use char because int might match the return type of a GCC
5940   builtin and then its argument prototype would still apply.  */
5941#ifdef __cplusplus
5942extern "C"
5943#endif
5944char ldap_init ();
5945int
5946main ()
5947{
5948return ldap_init ();
5949  ;
5950  return 0;
5951}
5952_ACEOF
5953if ac_fn_c_try_link "$LINENO"; then :
5954  eval "$as_ac_Lib=yes"
5955else
5956  eval "$as_ac_Lib=no"
5957fi
5958rm -f core conftest.err conftest.$ac_objext \
5959    conftest$ac_exeext conftest.$ac_ext
5960LIBS=$ac_check_lib_save_LIBS
5961fi
5962eval ac_res=\$$as_ac_Lib
5963	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5964$as_echo "$ac_res" >&6; }
5965if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
5966
5967        LDADD_ldap_found="-l${ldaplib} ${extralib}"
5968        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
5970$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
5971if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  ac_check_lib_save_LIBS=$LIBS
5975LIBS="-l${ldaplib} ${extralib} $LIBS"
5976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5977/* end confdefs.h.  */
5978
5979/* Override any GCC internal prototype to avoid an error.
5980   Use char because int might match the return type of a GCC
5981   builtin and then its argument prototype would still apply.  */
5982#ifdef __cplusplus
5983extern "C"
5984#endif
5985char ldapssl_client_init ();
5986int
5987main ()
5988{
5989return ldapssl_client_init ();
5990  ;
5991  return 0;
5992}
5993_ACEOF
5994if ac_fn_c_try_link "$LINENO"; then :
5995  eval "$as_ac_Lib=yes"
5996else
5997  eval "$as_ac_Lib=no"
5998fi
5999rm -f core conftest.err conftest.$ac_objext \
6000    conftest$ac_exeext conftest.$ac_ext
6001LIBS=$ac_check_lib_save_LIBS
6002fi
6003eval ac_res=\$$as_ac_Lib
6004	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6005$as_echo "$ac_res" >&6; }
6006if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6007  apu_has_ldapssl_client_init="1"
6008fi
6009
6010        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6012$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6013if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6014  $as_echo_n "(cached) " >&6
6015else
6016  ac_check_lib_save_LIBS=$LIBS
6017LIBS="-l${ldaplib} ${extralib} $LIBS"
6018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019/* end confdefs.h.  */
6020
6021/* Override any GCC internal prototype to avoid an error.
6022   Use char because int might match the return type of a GCC
6023   builtin and then its argument prototype would still apply.  */
6024#ifdef __cplusplus
6025extern "C"
6026#endif
6027char ldapssl_client_deinit ();
6028int
6029main ()
6030{
6031return ldapssl_client_deinit ();
6032  ;
6033  return 0;
6034}
6035_ACEOF
6036if ac_fn_c_try_link "$LINENO"; then :
6037  eval "$as_ac_Lib=yes"
6038else
6039  eval "$as_ac_Lib=no"
6040fi
6041rm -f core conftest.err conftest.$ac_objext \
6042    conftest$ac_exeext conftest.$ac_ext
6043LIBS=$ac_check_lib_save_LIBS
6044fi
6045eval ac_res=\$$as_ac_Lib
6046	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6047$as_echo "$ac_res" >&6; }
6048if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6049  apu_has_ldapssl_client_deinit="1"
6050fi
6051
6052        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6054$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6055if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6056  $as_echo_n "(cached) " >&6
6057else
6058  ac_check_lib_save_LIBS=$LIBS
6059LIBS="-l${ldaplib} ${extralib} $LIBS"
6060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6061/* end confdefs.h.  */
6062
6063/* Override any GCC internal prototype to avoid an error.
6064   Use char because int might match the return type of a GCC
6065   builtin and then its argument prototype would still apply.  */
6066#ifdef __cplusplus
6067extern "C"
6068#endif
6069char ldapssl_add_trusted_cert ();
6070int
6071main ()
6072{
6073return ldapssl_add_trusted_cert ();
6074  ;
6075  return 0;
6076}
6077_ACEOF
6078if ac_fn_c_try_link "$LINENO"; then :
6079  eval "$as_ac_Lib=yes"
6080else
6081  eval "$as_ac_Lib=no"
6082fi
6083rm -f core conftest.err conftest.$ac_objext \
6084    conftest$ac_exeext conftest.$ac_ext
6085LIBS=$ac_check_lib_save_LIBS
6086fi
6087eval ac_res=\$$as_ac_Lib
6088	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6089$as_echo "$ac_res" >&6; }
6090if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6091  apu_has_ldapssl_add_trusted_cert="1"
6092fi
6093
6094        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6096$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6097if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6098  $as_echo_n "(cached) " >&6
6099else
6100  ac_check_lib_save_LIBS=$LIBS
6101LIBS="-l${ldaplib} ${extralib} $LIBS"
6102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6103/* end confdefs.h.  */
6104
6105/* Override any GCC internal prototype to avoid an error.
6106   Use char because int might match the return type of a GCC
6107   builtin and then its argument prototype would still apply.  */
6108#ifdef __cplusplus
6109extern "C"
6110#endif
6111char ldap_start_tls_s ();
6112int
6113main ()
6114{
6115return ldap_start_tls_s ();
6116  ;
6117  return 0;
6118}
6119_ACEOF
6120if ac_fn_c_try_link "$LINENO"; then :
6121  eval "$as_ac_Lib=yes"
6122else
6123  eval "$as_ac_Lib=no"
6124fi
6125rm -f core conftest.err conftest.$ac_objext \
6126    conftest$ac_exeext conftest.$ac_ext
6127LIBS=$ac_check_lib_save_LIBS
6128fi
6129eval ac_res=\$$as_ac_Lib
6130	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6131$as_echo "$ac_res" >&6; }
6132if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6133  apu_has_ldap_start_tls_s="1"
6134fi
6135
6136        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6138$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6139if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6140  $as_echo_n "(cached) " >&6
6141else
6142  ac_check_lib_save_LIBS=$LIBS
6143LIBS="-l${ldaplib} ${extralib} $LIBS"
6144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6145/* end confdefs.h.  */
6146
6147/* Override any GCC internal prototype to avoid an error.
6148   Use char because int might match the return type of a GCC
6149   builtin and then its argument prototype would still apply.  */
6150#ifdef __cplusplus
6151extern "C"
6152#endif
6153char ldap_sslinit ();
6154int
6155main ()
6156{
6157return ldap_sslinit ();
6158  ;
6159  return 0;
6160}
6161_ACEOF
6162if ac_fn_c_try_link "$LINENO"; then :
6163  eval "$as_ac_Lib=yes"
6164else
6165  eval "$as_ac_Lib=no"
6166fi
6167rm -f core conftest.err conftest.$ac_objext \
6168    conftest$ac_exeext conftest.$ac_ext
6169LIBS=$ac_check_lib_save_LIBS
6170fi
6171eval ac_res=\$$as_ac_Lib
6172	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6173$as_echo "$ac_res" >&6; }
6174if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6175  apu_has_ldap_sslinit="1"
6176fi
6177
6178        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6180$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6181if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  ac_check_lib_save_LIBS=$LIBS
6185LIBS="-l${ldaplib} ${extralib} $LIBS"
6186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6187/* end confdefs.h.  */
6188
6189/* Override any GCC internal prototype to avoid an error.
6190   Use char because int might match the return type of a GCC
6191   builtin and then its argument prototype would still apply.  */
6192#ifdef __cplusplus
6193extern "C"
6194#endif
6195char ldapssl_init ();
6196int
6197main ()
6198{
6199return ldapssl_init ();
6200  ;
6201  return 0;
6202}
6203_ACEOF
6204if ac_fn_c_try_link "$LINENO"; then :
6205  eval "$as_ac_Lib=yes"
6206else
6207  eval "$as_ac_Lib=no"
6208fi
6209rm -f core conftest.err conftest.$ac_objext \
6210    conftest$ac_exeext conftest.$ac_ext
6211LIBS=$ac_check_lib_save_LIBS
6212fi
6213eval ac_res=\$$as_ac_Lib
6214	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6215$as_echo "$ac_res" >&6; }
6216if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6217  apu_has_ldapssl_init="1"
6218fi
6219
6220        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6222$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6223if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6224  $as_echo_n "(cached) " >&6
6225else
6226  ac_check_lib_save_LIBS=$LIBS
6227LIBS="-l${ldaplib} ${extralib} $LIBS"
6228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6229/* end confdefs.h.  */
6230
6231/* Override any GCC internal prototype to avoid an error.
6232   Use char because int might match the return type of a GCC
6233   builtin and then its argument prototype would still apply.  */
6234#ifdef __cplusplus
6235extern "C"
6236#endif
6237char ldapssl_install_routines ();
6238int
6239main ()
6240{
6241return ldapssl_install_routines ();
6242  ;
6243  return 0;
6244}
6245_ACEOF
6246if ac_fn_c_try_link "$LINENO"; then :
6247  eval "$as_ac_Lib=yes"
6248else
6249  eval "$as_ac_Lib=no"
6250fi
6251rm -f core conftest.err conftest.$ac_objext \
6252    conftest$ac_exeext conftest.$ac_ext
6253LIBS=$ac_check_lib_save_LIBS
6254fi
6255eval ac_res=\$$as_ac_Lib
6256	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6257$as_echo "$ac_res" >&6; }
6258if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6259  apu_has_ldapssl_install_routines="1"
6260fi
6261
6262        apu_has_ldap="1";
6263
6264fi
6265
6266  fi
6267
6268
6269  if test ${apu_has_ldap} != "1"; then
6270    ldaplib="ldapssl41"
6271    extralib="-lnspr3 -lplc3 -lplds3"
6272    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6273
6274    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6275
6276    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6277    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6278    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6280$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6281if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284  ac_check_lib_save_LIBS=$LIBS
6285LIBS="-l${ldaplib} ${extralib} $LIBS"
6286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287/* end confdefs.h.  */
6288
6289/* Override any GCC internal prototype to avoid an error.
6290   Use char because int might match the return type of a GCC
6291   builtin and then its argument prototype would still apply.  */
6292#ifdef __cplusplus
6293extern "C"
6294#endif
6295char ldap_init ();
6296int
6297main ()
6298{
6299return ldap_init ();
6300  ;
6301  return 0;
6302}
6303_ACEOF
6304if ac_fn_c_try_link "$LINENO"; then :
6305  eval "$as_ac_Lib=yes"
6306else
6307  eval "$as_ac_Lib=no"
6308fi
6309rm -f core conftest.err conftest.$ac_objext \
6310    conftest$ac_exeext conftest.$ac_ext
6311LIBS=$ac_check_lib_save_LIBS
6312fi
6313eval ac_res=\$$as_ac_Lib
6314	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6315$as_echo "$ac_res" >&6; }
6316if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6317
6318        LDADD_ldap_found="-l${ldaplib} ${extralib}"
6319        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6321$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6322if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6323  $as_echo_n "(cached) " >&6
6324else
6325  ac_check_lib_save_LIBS=$LIBS
6326LIBS="-l${ldaplib} ${extralib} $LIBS"
6327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6328/* end confdefs.h.  */
6329
6330/* Override any GCC internal prototype to avoid an error.
6331   Use char because int might match the return type of a GCC
6332   builtin and then its argument prototype would still apply.  */
6333#ifdef __cplusplus
6334extern "C"
6335#endif
6336char ldapssl_client_init ();
6337int
6338main ()
6339{
6340return ldapssl_client_init ();
6341  ;
6342  return 0;
6343}
6344_ACEOF
6345if ac_fn_c_try_link "$LINENO"; then :
6346  eval "$as_ac_Lib=yes"
6347else
6348  eval "$as_ac_Lib=no"
6349fi
6350rm -f core conftest.err conftest.$ac_objext \
6351    conftest$ac_exeext conftest.$ac_ext
6352LIBS=$ac_check_lib_save_LIBS
6353fi
6354eval ac_res=\$$as_ac_Lib
6355	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6356$as_echo "$ac_res" >&6; }
6357if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6358  apu_has_ldapssl_client_init="1"
6359fi
6360
6361        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6363$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6364if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6365  $as_echo_n "(cached) " >&6
6366else
6367  ac_check_lib_save_LIBS=$LIBS
6368LIBS="-l${ldaplib} ${extralib} $LIBS"
6369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6370/* end confdefs.h.  */
6371
6372/* Override any GCC internal prototype to avoid an error.
6373   Use char because int might match the return type of a GCC
6374   builtin and then its argument prototype would still apply.  */
6375#ifdef __cplusplus
6376extern "C"
6377#endif
6378char ldapssl_client_deinit ();
6379int
6380main ()
6381{
6382return ldapssl_client_deinit ();
6383  ;
6384  return 0;
6385}
6386_ACEOF
6387if ac_fn_c_try_link "$LINENO"; then :
6388  eval "$as_ac_Lib=yes"
6389else
6390  eval "$as_ac_Lib=no"
6391fi
6392rm -f core conftest.err conftest.$ac_objext \
6393    conftest$ac_exeext conftest.$ac_ext
6394LIBS=$ac_check_lib_save_LIBS
6395fi
6396eval ac_res=\$$as_ac_Lib
6397	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6398$as_echo "$ac_res" >&6; }
6399if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6400  apu_has_ldapssl_client_deinit="1"
6401fi
6402
6403        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6405$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6406if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  ac_check_lib_save_LIBS=$LIBS
6410LIBS="-l${ldaplib} ${extralib} $LIBS"
6411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6412/* end confdefs.h.  */
6413
6414/* Override any GCC internal prototype to avoid an error.
6415   Use char because int might match the return type of a GCC
6416   builtin and then its argument prototype would still apply.  */
6417#ifdef __cplusplus
6418extern "C"
6419#endif
6420char ldapssl_add_trusted_cert ();
6421int
6422main ()
6423{
6424return ldapssl_add_trusted_cert ();
6425  ;
6426  return 0;
6427}
6428_ACEOF
6429if ac_fn_c_try_link "$LINENO"; then :
6430  eval "$as_ac_Lib=yes"
6431else
6432  eval "$as_ac_Lib=no"
6433fi
6434rm -f core conftest.err conftest.$ac_objext \
6435    conftest$ac_exeext conftest.$ac_ext
6436LIBS=$ac_check_lib_save_LIBS
6437fi
6438eval ac_res=\$$as_ac_Lib
6439	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6440$as_echo "$ac_res" >&6; }
6441if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6442  apu_has_ldapssl_add_trusted_cert="1"
6443fi
6444
6445        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6447$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6448if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6449  $as_echo_n "(cached) " >&6
6450else
6451  ac_check_lib_save_LIBS=$LIBS
6452LIBS="-l${ldaplib} ${extralib} $LIBS"
6453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454/* end confdefs.h.  */
6455
6456/* Override any GCC internal prototype to avoid an error.
6457   Use char because int might match the return type of a GCC
6458   builtin and then its argument prototype would still apply.  */
6459#ifdef __cplusplus
6460extern "C"
6461#endif
6462char ldap_start_tls_s ();
6463int
6464main ()
6465{
6466return ldap_start_tls_s ();
6467  ;
6468  return 0;
6469}
6470_ACEOF
6471if ac_fn_c_try_link "$LINENO"; then :
6472  eval "$as_ac_Lib=yes"
6473else
6474  eval "$as_ac_Lib=no"
6475fi
6476rm -f core conftest.err conftest.$ac_objext \
6477    conftest$ac_exeext conftest.$ac_ext
6478LIBS=$ac_check_lib_save_LIBS
6479fi
6480eval ac_res=\$$as_ac_Lib
6481	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6482$as_echo "$ac_res" >&6; }
6483if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6484  apu_has_ldap_start_tls_s="1"
6485fi
6486
6487        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6489$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6490if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6491  $as_echo_n "(cached) " >&6
6492else
6493  ac_check_lib_save_LIBS=$LIBS
6494LIBS="-l${ldaplib} ${extralib} $LIBS"
6495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496/* end confdefs.h.  */
6497
6498/* Override any GCC internal prototype to avoid an error.
6499   Use char because int might match the return type of a GCC
6500   builtin and then its argument prototype would still apply.  */
6501#ifdef __cplusplus
6502extern "C"
6503#endif
6504char ldap_sslinit ();
6505int
6506main ()
6507{
6508return ldap_sslinit ();
6509  ;
6510  return 0;
6511}
6512_ACEOF
6513if ac_fn_c_try_link "$LINENO"; then :
6514  eval "$as_ac_Lib=yes"
6515else
6516  eval "$as_ac_Lib=no"
6517fi
6518rm -f core conftest.err conftest.$ac_objext \
6519    conftest$ac_exeext conftest.$ac_ext
6520LIBS=$ac_check_lib_save_LIBS
6521fi
6522eval ac_res=\$$as_ac_Lib
6523	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6524$as_echo "$ac_res" >&6; }
6525if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6526  apu_has_ldap_sslinit="1"
6527fi
6528
6529        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6531$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6532if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6533  $as_echo_n "(cached) " >&6
6534else
6535  ac_check_lib_save_LIBS=$LIBS
6536LIBS="-l${ldaplib} ${extralib} $LIBS"
6537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6538/* end confdefs.h.  */
6539
6540/* Override any GCC internal prototype to avoid an error.
6541   Use char because int might match the return type of a GCC
6542   builtin and then its argument prototype would still apply.  */
6543#ifdef __cplusplus
6544extern "C"
6545#endif
6546char ldapssl_init ();
6547int
6548main ()
6549{
6550return ldapssl_init ();
6551  ;
6552  return 0;
6553}
6554_ACEOF
6555if ac_fn_c_try_link "$LINENO"; then :
6556  eval "$as_ac_Lib=yes"
6557else
6558  eval "$as_ac_Lib=no"
6559fi
6560rm -f core conftest.err conftest.$ac_objext \
6561    conftest$ac_exeext conftest.$ac_ext
6562LIBS=$ac_check_lib_save_LIBS
6563fi
6564eval ac_res=\$$as_ac_Lib
6565	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6566$as_echo "$ac_res" >&6; }
6567if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6568  apu_has_ldapssl_init="1"
6569fi
6570
6571        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6573$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6574if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6575  $as_echo_n "(cached) " >&6
6576else
6577  ac_check_lib_save_LIBS=$LIBS
6578LIBS="-l${ldaplib} ${extralib} $LIBS"
6579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6580/* end confdefs.h.  */
6581
6582/* Override any GCC internal prototype to avoid an error.
6583   Use char because int might match the return type of a GCC
6584   builtin and then its argument prototype would still apply.  */
6585#ifdef __cplusplus
6586extern "C"
6587#endif
6588char ldapssl_install_routines ();
6589int
6590main ()
6591{
6592return ldapssl_install_routines ();
6593  ;
6594  return 0;
6595}
6596_ACEOF
6597if ac_fn_c_try_link "$LINENO"; then :
6598  eval "$as_ac_Lib=yes"
6599else
6600  eval "$as_ac_Lib=no"
6601fi
6602rm -f core conftest.err conftest.$ac_objext \
6603    conftest$ac_exeext conftest.$ac_ext
6604LIBS=$ac_check_lib_save_LIBS
6605fi
6606eval ac_res=\$$as_ac_Lib
6607	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6608$as_echo "$ac_res" >&6; }
6609if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6610  apu_has_ldapssl_install_routines="1"
6611fi
6612
6613        apu_has_ldap="1";
6614
6615fi
6616
6617  fi
6618
6619
6620  if test ${apu_has_ldap} != "1"; then
6621    ldaplib="ldapssl40"
6622    extralib=
6623    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6624
6625    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6626
6627    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6628    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6629    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6631$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6632if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6633  $as_echo_n "(cached) " >&6
6634else
6635  ac_check_lib_save_LIBS=$LIBS
6636LIBS="-l${ldaplib} ${extralib} $LIBS"
6637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638/* end confdefs.h.  */
6639
6640/* Override any GCC internal prototype to avoid an error.
6641   Use char because int might match the return type of a GCC
6642   builtin and then its argument prototype would still apply.  */
6643#ifdef __cplusplus
6644extern "C"
6645#endif
6646char ldap_init ();
6647int
6648main ()
6649{
6650return ldap_init ();
6651  ;
6652  return 0;
6653}
6654_ACEOF
6655if ac_fn_c_try_link "$LINENO"; then :
6656  eval "$as_ac_Lib=yes"
6657else
6658  eval "$as_ac_Lib=no"
6659fi
6660rm -f core conftest.err conftest.$ac_objext \
6661    conftest$ac_exeext conftest.$ac_ext
6662LIBS=$ac_check_lib_save_LIBS
6663fi
6664eval ac_res=\$$as_ac_Lib
6665	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6666$as_echo "$ac_res" >&6; }
6667if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6668
6669        LDADD_ldap_found="-l${ldaplib} ${extralib}"
6670        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
6672$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
6673if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6674  $as_echo_n "(cached) " >&6
6675else
6676  ac_check_lib_save_LIBS=$LIBS
6677LIBS="-l${ldaplib} ${extralib} $LIBS"
6678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6679/* end confdefs.h.  */
6680
6681/* Override any GCC internal prototype to avoid an error.
6682   Use char because int might match the return type of a GCC
6683   builtin and then its argument prototype would still apply.  */
6684#ifdef __cplusplus
6685extern "C"
6686#endif
6687char ldapssl_client_init ();
6688int
6689main ()
6690{
6691return ldapssl_client_init ();
6692  ;
6693  return 0;
6694}
6695_ACEOF
6696if ac_fn_c_try_link "$LINENO"; then :
6697  eval "$as_ac_Lib=yes"
6698else
6699  eval "$as_ac_Lib=no"
6700fi
6701rm -f core conftest.err conftest.$ac_objext \
6702    conftest$ac_exeext conftest.$ac_ext
6703LIBS=$ac_check_lib_save_LIBS
6704fi
6705eval ac_res=\$$as_ac_Lib
6706	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6707$as_echo "$ac_res" >&6; }
6708if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6709  apu_has_ldapssl_client_init="1"
6710fi
6711
6712        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
6714$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
6715if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6716  $as_echo_n "(cached) " >&6
6717else
6718  ac_check_lib_save_LIBS=$LIBS
6719LIBS="-l${ldaplib} ${extralib} $LIBS"
6720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6721/* end confdefs.h.  */
6722
6723/* Override any GCC internal prototype to avoid an error.
6724   Use char because int might match the return type of a GCC
6725   builtin and then its argument prototype would still apply.  */
6726#ifdef __cplusplus
6727extern "C"
6728#endif
6729char ldapssl_client_deinit ();
6730int
6731main ()
6732{
6733return ldapssl_client_deinit ();
6734  ;
6735  return 0;
6736}
6737_ACEOF
6738if ac_fn_c_try_link "$LINENO"; then :
6739  eval "$as_ac_Lib=yes"
6740else
6741  eval "$as_ac_Lib=no"
6742fi
6743rm -f core conftest.err conftest.$ac_objext \
6744    conftest$ac_exeext conftest.$ac_ext
6745LIBS=$ac_check_lib_save_LIBS
6746fi
6747eval ac_res=\$$as_ac_Lib
6748	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6749$as_echo "$ac_res" >&6; }
6750if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6751  apu_has_ldapssl_client_deinit="1"
6752fi
6753
6754        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
6755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
6756$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
6757if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6758  $as_echo_n "(cached) " >&6
6759else
6760  ac_check_lib_save_LIBS=$LIBS
6761LIBS="-l${ldaplib} ${extralib} $LIBS"
6762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6763/* end confdefs.h.  */
6764
6765/* Override any GCC internal prototype to avoid an error.
6766   Use char because int might match the return type of a GCC
6767   builtin and then its argument prototype would still apply.  */
6768#ifdef __cplusplus
6769extern "C"
6770#endif
6771char ldapssl_add_trusted_cert ();
6772int
6773main ()
6774{
6775return ldapssl_add_trusted_cert ();
6776  ;
6777  return 0;
6778}
6779_ACEOF
6780if ac_fn_c_try_link "$LINENO"; then :
6781  eval "$as_ac_Lib=yes"
6782else
6783  eval "$as_ac_Lib=no"
6784fi
6785rm -f core conftest.err conftest.$ac_objext \
6786    conftest$ac_exeext conftest.$ac_ext
6787LIBS=$ac_check_lib_save_LIBS
6788fi
6789eval ac_res=\$$as_ac_Lib
6790	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6791$as_echo "$ac_res" >&6; }
6792if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6793  apu_has_ldapssl_add_trusted_cert="1"
6794fi
6795
6796        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
6798$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
6799if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6800  $as_echo_n "(cached) " >&6
6801else
6802  ac_check_lib_save_LIBS=$LIBS
6803LIBS="-l${ldaplib} ${extralib} $LIBS"
6804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805/* end confdefs.h.  */
6806
6807/* Override any GCC internal prototype to avoid an error.
6808   Use char because int might match the return type of a GCC
6809   builtin and then its argument prototype would still apply.  */
6810#ifdef __cplusplus
6811extern "C"
6812#endif
6813char ldap_start_tls_s ();
6814int
6815main ()
6816{
6817return ldap_start_tls_s ();
6818  ;
6819  return 0;
6820}
6821_ACEOF
6822if ac_fn_c_try_link "$LINENO"; then :
6823  eval "$as_ac_Lib=yes"
6824else
6825  eval "$as_ac_Lib=no"
6826fi
6827rm -f core conftest.err conftest.$ac_objext \
6828    conftest$ac_exeext conftest.$ac_ext
6829LIBS=$ac_check_lib_save_LIBS
6830fi
6831eval ac_res=\$$as_ac_Lib
6832	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6833$as_echo "$ac_res" >&6; }
6834if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6835  apu_has_ldap_start_tls_s="1"
6836fi
6837
6838        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
6839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
6840$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
6841if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6842  $as_echo_n "(cached) " >&6
6843else
6844  ac_check_lib_save_LIBS=$LIBS
6845LIBS="-l${ldaplib} ${extralib} $LIBS"
6846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6847/* end confdefs.h.  */
6848
6849/* Override any GCC internal prototype to avoid an error.
6850   Use char because int might match the return type of a GCC
6851   builtin and then its argument prototype would still apply.  */
6852#ifdef __cplusplus
6853extern "C"
6854#endif
6855char ldap_sslinit ();
6856int
6857main ()
6858{
6859return ldap_sslinit ();
6860  ;
6861  return 0;
6862}
6863_ACEOF
6864if ac_fn_c_try_link "$LINENO"; then :
6865  eval "$as_ac_Lib=yes"
6866else
6867  eval "$as_ac_Lib=no"
6868fi
6869rm -f core conftest.err conftest.$ac_objext \
6870    conftest$ac_exeext conftest.$ac_ext
6871LIBS=$ac_check_lib_save_LIBS
6872fi
6873eval ac_res=\$$as_ac_Lib
6874	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6875$as_echo "$ac_res" >&6; }
6876if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6877  apu_has_ldap_sslinit="1"
6878fi
6879
6880        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
6881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
6882$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
6883if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6884  $as_echo_n "(cached) " >&6
6885else
6886  ac_check_lib_save_LIBS=$LIBS
6887LIBS="-l${ldaplib} ${extralib} $LIBS"
6888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6889/* end confdefs.h.  */
6890
6891/* Override any GCC internal prototype to avoid an error.
6892   Use char because int might match the return type of a GCC
6893   builtin and then its argument prototype would still apply.  */
6894#ifdef __cplusplus
6895extern "C"
6896#endif
6897char ldapssl_init ();
6898int
6899main ()
6900{
6901return ldapssl_init ();
6902  ;
6903  return 0;
6904}
6905_ACEOF
6906if ac_fn_c_try_link "$LINENO"; then :
6907  eval "$as_ac_Lib=yes"
6908else
6909  eval "$as_ac_Lib=no"
6910fi
6911rm -f core conftest.err conftest.$ac_objext \
6912    conftest$ac_exeext conftest.$ac_ext
6913LIBS=$ac_check_lib_save_LIBS
6914fi
6915eval ac_res=\$$as_ac_Lib
6916	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6917$as_echo "$ac_res" >&6; }
6918if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6919  apu_has_ldapssl_init="1"
6920fi
6921
6922        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
6923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
6924$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
6925if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6926  $as_echo_n "(cached) " >&6
6927else
6928  ac_check_lib_save_LIBS=$LIBS
6929LIBS="-l${ldaplib} ${extralib} $LIBS"
6930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6931/* end confdefs.h.  */
6932
6933/* Override any GCC internal prototype to avoid an error.
6934   Use char because int might match the return type of a GCC
6935   builtin and then its argument prototype would still apply.  */
6936#ifdef __cplusplus
6937extern "C"
6938#endif
6939char ldapssl_install_routines ();
6940int
6941main ()
6942{
6943return ldapssl_install_routines ();
6944  ;
6945  return 0;
6946}
6947_ACEOF
6948if ac_fn_c_try_link "$LINENO"; then :
6949  eval "$as_ac_Lib=yes"
6950else
6951  eval "$as_ac_Lib=no"
6952fi
6953rm -f core conftest.err conftest.$ac_objext \
6954    conftest$ac_exeext conftest.$ac_ext
6955LIBS=$ac_check_lib_save_LIBS
6956fi
6957eval ac_res=\$$as_ac_Lib
6958	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6959$as_echo "$ac_res" >&6; }
6960if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
6961  apu_has_ldapssl_install_routines="1"
6962fi
6963
6964        apu_has_ldap="1";
6965
6966fi
6967
6968  fi
6969
6970
6971  if test ${apu_has_ldap} != "1"; then
6972    ldaplib="ldapssl30"
6973    extralib=
6974    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
6975
6976    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
6977
6978    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
6979    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
6980    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
6982$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
6983if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
6984  $as_echo_n "(cached) " >&6
6985else
6986  ac_check_lib_save_LIBS=$LIBS
6987LIBS="-l${ldaplib} ${extralib} $LIBS"
6988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6989/* end confdefs.h.  */
6990
6991/* Override any GCC internal prototype to avoid an error.
6992   Use char because int might match the return type of a GCC
6993   builtin and then its argument prototype would still apply.  */
6994#ifdef __cplusplus
6995extern "C"
6996#endif
6997char ldap_init ();
6998int
6999main ()
7000{
7001return ldap_init ();
7002  ;
7003  return 0;
7004}
7005_ACEOF
7006if ac_fn_c_try_link "$LINENO"; then :
7007  eval "$as_ac_Lib=yes"
7008else
7009  eval "$as_ac_Lib=no"
7010fi
7011rm -f core conftest.err conftest.$ac_objext \
7012    conftest$ac_exeext conftest.$ac_ext
7013LIBS=$ac_check_lib_save_LIBS
7014fi
7015eval ac_res=\$$as_ac_Lib
7016	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7017$as_echo "$ac_res" >&6; }
7018if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7019
7020        LDADD_ldap_found="-l${ldaplib} ${extralib}"
7021        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7023$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7024if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7025  $as_echo_n "(cached) " >&6
7026else
7027  ac_check_lib_save_LIBS=$LIBS
7028LIBS="-l${ldaplib} ${extralib} $LIBS"
7029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030/* end confdefs.h.  */
7031
7032/* Override any GCC internal prototype to avoid an error.
7033   Use char because int might match the return type of a GCC
7034   builtin and then its argument prototype would still apply.  */
7035#ifdef __cplusplus
7036extern "C"
7037#endif
7038char ldapssl_client_init ();
7039int
7040main ()
7041{
7042return ldapssl_client_init ();
7043  ;
7044  return 0;
7045}
7046_ACEOF
7047if ac_fn_c_try_link "$LINENO"; then :
7048  eval "$as_ac_Lib=yes"
7049else
7050  eval "$as_ac_Lib=no"
7051fi
7052rm -f core conftest.err conftest.$ac_objext \
7053    conftest$ac_exeext conftest.$ac_ext
7054LIBS=$ac_check_lib_save_LIBS
7055fi
7056eval ac_res=\$$as_ac_Lib
7057	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7058$as_echo "$ac_res" >&6; }
7059if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7060  apu_has_ldapssl_client_init="1"
7061fi
7062
7063        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7065$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7066if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7067  $as_echo_n "(cached) " >&6
7068else
7069  ac_check_lib_save_LIBS=$LIBS
7070LIBS="-l${ldaplib} ${extralib} $LIBS"
7071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7072/* end confdefs.h.  */
7073
7074/* Override any GCC internal prototype to avoid an error.
7075   Use char because int might match the return type of a GCC
7076   builtin and then its argument prototype would still apply.  */
7077#ifdef __cplusplus
7078extern "C"
7079#endif
7080char ldapssl_client_deinit ();
7081int
7082main ()
7083{
7084return ldapssl_client_deinit ();
7085  ;
7086  return 0;
7087}
7088_ACEOF
7089if ac_fn_c_try_link "$LINENO"; then :
7090  eval "$as_ac_Lib=yes"
7091else
7092  eval "$as_ac_Lib=no"
7093fi
7094rm -f core conftest.err conftest.$ac_objext \
7095    conftest$ac_exeext conftest.$ac_ext
7096LIBS=$ac_check_lib_save_LIBS
7097fi
7098eval ac_res=\$$as_ac_Lib
7099	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7100$as_echo "$ac_res" >&6; }
7101if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7102  apu_has_ldapssl_client_deinit="1"
7103fi
7104
7105        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7107$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7108if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7109  $as_echo_n "(cached) " >&6
7110else
7111  ac_check_lib_save_LIBS=$LIBS
7112LIBS="-l${ldaplib} ${extralib} $LIBS"
7113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7114/* end confdefs.h.  */
7115
7116/* Override any GCC internal prototype to avoid an error.
7117   Use char because int might match the return type of a GCC
7118   builtin and then its argument prototype would still apply.  */
7119#ifdef __cplusplus
7120extern "C"
7121#endif
7122char ldapssl_add_trusted_cert ();
7123int
7124main ()
7125{
7126return ldapssl_add_trusted_cert ();
7127  ;
7128  return 0;
7129}
7130_ACEOF
7131if ac_fn_c_try_link "$LINENO"; then :
7132  eval "$as_ac_Lib=yes"
7133else
7134  eval "$as_ac_Lib=no"
7135fi
7136rm -f core conftest.err conftest.$ac_objext \
7137    conftest$ac_exeext conftest.$ac_ext
7138LIBS=$ac_check_lib_save_LIBS
7139fi
7140eval ac_res=\$$as_ac_Lib
7141	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7142$as_echo "$ac_res" >&6; }
7143if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7144  apu_has_ldapssl_add_trusted_cert="1"
7145fi
7146
7147        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7149$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7150if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7151  $as_echo_n "(cached) " >&6
7152else
7153  ac_check_lib_save_LIBS=$LIBS
7154LIBS="-l${ldaplib} ${extralib} $LIBS"
7155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7156/* end confdefs.h.  */
7157
7158/* Override any GCC internal prototype to avoid an error.
7159   Use char because int might match the return type of a GCC
7160   builtin and then its argument prototype would still apply.  */
7161#ifdef __cplusplus
7162extern "C"
7163#endif
7164char ldap_start_tls_s ();
7165int
7166main ()
7167{
7168return ldap_start_tls_s ();
7169  ;
7170  return 0;
7171}
7172_ACEOF
7173if ac_fn_c_try_link "$LINENO"; then :
7174  eval "$as_ac_Lib=yes"
7175else
7176  eval "$as_ac_Lib=no"
7177fi
7178rm -f core conftest.err conftest.$ac_objext \
7179    conftest$ac_exeext conftest.$ac_ext
7180LIBS=$ac_check_lib_save_LIBS
7181fi
7182eval ac_res=\$$as_ac_Lib
7183	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7184$as_echo "$ac_res" >&6; }
7185if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7186  apu_has_ldap_start_tls_s="1"
7187fi
7188
7189        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7191$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7192if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7193  $as_echo_n "(cached) " >&6
7194else
7195  ac_check_lib_save_LIBS=$LIBS
7196LIBS="-l${ldaplib} ${extralib} $LIBS"
7197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198/* end confdefs.h.  */
7199
7200/* Override any GCC internal prototype to avoid an error.
7201   Use char because int might match the return type of a GCC
7202   builtin and then its argument prototype would still apply.  */
7203#ifdef __cplusplus
7204extern "C"
7205#endif
7206char ldap_sslinit ();
7207int
7208main ()
7209{
7210return ldap_sslinit ();
7211  ;
7212  return 0;
7213}
7214_ACEOF
7215if ac_fn_c_try_link "$LINENO"; then :
7216  eval "$as_ac_Lib=yes"
7217else
7218  eval "$as_ac_Lib=no"
7219fi
7220rm -f core conftest.err conftest.$ac_objext \
7221    conftest$ac_exeext conftest.$ac_ext
7222LIBS=$ac_check_lib_save_LIBS
7223fi
7224eval ac_res=\$$as_ac_Lib
7225	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7226$as_echo "$ac_res" >&6; }
7227if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7228  apu_has_ldap_sslinit="1"
7229fi
7230
7231        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7233$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7234if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7235  $as_echo_n "(cached) " >&6
7236else
7237  ac_check_lib_save_LIBS=$LIBS
7238LIBS="-l${ldaplib} ${extralib} $LIBS"
7239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7240/* end confdefs.h.  */
7241
7242/* Override any GCC internal prototype to avoid an error.
7243   Use char because int might match the return type of a GCC
7244   builtin and then its argument prototype would still apply.  */
7245#ifdef __cplusplus
7246extern "C"
7247#endif
7248char ldapssl_init ();
7249int
7250main ()
7251{
7252return ldapssl_init ();
7253  ;
7254  return 0;
7255}
7256_ACEOF
7257if ac_fn_c_try_link "$LINENO"; then :
7258  eval "$as_ac_Lib=yes"
7259else
7260  eval "$as_ac_Lib=no"
7261fi
7262rm -f core conftest.err conftest.$ac_objext \
7263    conftest$ac_exeext conftest.$ac_ext
7264LIBS=$ac_check_lib_save_LIBS
7265fi
7266eval ac_res=\$$as_ac_Lib
7267	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7268$as_echo "$ac_res" >&6; }
7269if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7270  apu_has_ldapssl_init="1"
7271fi
7272
7273        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7275$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7276if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7277  $as_echo_n "(cached) " >&6
7278else
7279  ac_check_lib_save_LIBS=$LIBS
7280LIBS="-l${ldaplib} ${extralib} $LIBS"
7281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7282/* end confdefs.h.  */
7283
7284/* Override any GCC internal prototype to avoid an error.
7285   Use char because int might match the return type of a GCC
7286   builtin and then its argument prototype would still apply.  */
7287#ifdef __cplusplus
7288extern "C"
7289#endif
7290char ldapssl_install_routines ();
7291int
7292main ()
7293{
7294return ldapssl_install_routines ();
7295  ;
7296  return 0;
7297}
7298_ACEOF
7299if ac_fn_c_try_link "$LINENO"; then :
7300  eval "$as_ac_Lib=yes"
7301else
7302  eval "$as_ac_Lib=no"
7303fi
7304rm -f core conftest.err conftest.$ac_objext \
7305    conftest$ac_exeext conftest.$ac_ext
7306LIBS=$ac_check_lib_save_LIBS
7307fi
7308eval ac_res=\$$as_ac_Lib
7309	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7310$as_echo "$ac_res" >&6; }
7311if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7312  apu_has_ldapssl_install_routines="1"
7313fi
7314
7315        apu_has_ldap="1";
7316
7317fi
7318
7319  fi
7320
7321
7322  if test ${apu_has_ldap} != "1"; then
7323    ldaplib="ldapssl20"
7324    extralib=
7325    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7326
7327    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7328
7329    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7330    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7331    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7333$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7334if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  ac_check_lib_save_LIBS=$LIBS
7338LIBS="-l${ldaplib} ${extralib} $LIBS"
7339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7340/* end confdefs.h.  */
7341
7342/* Override any GCC internal prototype to avoid an error.
7343   Use char because int might match the return type of a GCC
7344   builtin and then its argument prototype would still apply.  */
7345#ifdef __cplusplus
7346extern "C"
7347#endif
7348char ldap_init ();
7349int
7350main ()
7351{
7352return ldap_init ();
7353  ;
7354  return 0;
7355}
7356_ACEOF
7357if ac_fn_c_try_link "$LINENO"; then :
7358  eval "$as_ac_Lib=yes"
7359else
7360  eval "$as_ac_Lib=no"
7361fi
7362rm -f core conftest.err conftest.$ac_objext \
7363    conftest$ac_exeext conftest.$ac_ext
7364LIBS=$ac_check_lib_save_LIBS
7365fi
7366eval ac_res=\$$as_ac_Lib
7367	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7368$as_echo "$ac_res" >&6; }
7369if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7370
7371        LDADD_ldap_found="-l${ldaplib} ${extralib}"
7372        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7374$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7375if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7376  $as_echo_n "(cached) " >&6
7377else
7378  ac_check_lib_save_LIBS=$LIBS
7379LIBS="-l${ldaplib} ${extralib} $LIBS"
7380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7381/* end confdefs.h.  */
7382
7383/* Override any GCC internal prototype to avoid an error.
7384   Use char because int might match the return type of a GCC
7385   builtin and then its argument prototype would still apply.  */
7386#ifdef __cplusplus
7387extern "C"
7388#endif
7389char ldapssl_client_init ();
7390int
7391main ()
7392{
7393return ldapssl_client_init ();
7394  ;
7395  return 0;
7396}
7397_ACEOF
7398if ac_fn_c_try_link "$LINENO"; then :
7399  eval "$as_ac_Lib=yes"
7400else
7401  eval "$as_ac_Lib=no"
7402fi
7403rm -f core conftest.err conftest.$ac_objext \
7404    conftest$ac_exeext conftest.$ac_ext
7405LIBS=$ac_check_lib_save_LIBS
7406fi
7407eval ac_res=\$$as_ac_Lib
7408	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7409$as_echo "$ac_res" >&6; }
7410if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7411  apu_has_ldapssl_client_init="1"
7412fi
7413
7414        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7416$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7417if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7418  $as_echo_n "(cached) " >&6
7419else
7420  ac_check_lib_save_LIBS=$LIBS
7421LIBS="-l${ldaplib} ${extralib} $LIBS"
7422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7423/* end confdefs.h.  */
7424
7425/* Override any GCC internal prototype to avoid an error.
7426   Use char because int might match the return type of a GCC
7427   builtin and then its argument prototype would still apply.  */
7428#ifdef __cplusplus
7429extern "C"
7430#endif
7431char ldapssl_client_deinit ();
7432int
7433main ()
7434{
7435return ldapssl_client_deinit ();
7436  ;
7437  return 0;
7438}
7439_ACEOF
7440if ac_fn_c_try_link "$LINENO"; then :
7441  eval "$as_ac_Lib=yes"
7442else
7443  eval "$as_ac_Lib=no"
7444fi
7445rm -f core conftest.err conftest.$ac_objext \
7446    conftest$ac_exeext conftest.$ac_ext
7447LIBS=$ac_check_lib_save_LIBS
7448fi
7449eval ac_res=\$$as_ac_Lib
7450	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7451$as_echo "$ac_res" >&6; }
7452if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7453  apu_has_ldapssl_client_deinit="1"
7454fi
7455
7456        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7458$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7459if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  ac_check_lib_save_LIBS=$LIBS
7463LIBS="-l${ldaplib} ${extralib} $LIBS"
7464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7465/* end confdefs.h.  */
7466
7467/* Override any GCC internal prototype to avoid an error.
7468   Use char because int might match the return type of a GCC
7469   builtin and then its argument prototype would still apply.  */
7470#ifdef __cplusplus
7471extern "C"
7472#endif
7473char ldapssl_add_trusted_cert ();
7474int
7475main ()
7476{
7477return ldapssl_add_trusted_cert ();
7478  ;
7479  return 0;
7480}
7481_ACEOF
7482if ac_fn_c_try_link "$LINENO"; then :
7483  eval "$as_ac_Lib=yes"
7484else
7485  eval "$as_ac_Lib=no"
7486fi
7487rm -f core conftest.err conftest.$ac_objext \
7488    conftest$ac_exeext conftest.$ac_ext
7489LIBS=$ac_check_lib_save_LIBS
7490fi
7491eval ac_res=\$$as_ac_Lib
7492	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7493$as_echo "$ac_res" >&6; }
7494if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7495  apu_has_ldapssl_add_trusted_cert="1"
7496fi
7497
7498        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7500$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7501if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7502  $as_echo_n "(cached) " >&6
7503else
7504  ac_check_lib_save_LIBS=$LIBS
7505LIBS="-l${ldaplib} ${extralib} $LIBS"
7506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7507/* end confdefs.h.  */
7508
7509/* Override any GCC internal prototype to avoid an error.
7510   Use char because int might match the return type of a GCC
7511   builtin and then its argument prototype would still apply.  */
7512#ifdef __cplusplus
7513extern "C"
7514#endif
7515char ldap_start_tls_s ();
7516int
7517main ()
7518{
7519return ldap_start_tls_s ();
7520  ;
7521  return 0;
7522}
7523_ACEOF
7524if ac_fn_c_try_link "$LINENO"; then :
7525  eval "$as_ac_Lib=yes"
7526else
7527  eval "$as_ac_Lib=no"
7528fi
7529rm -f core conftest.err conftest.$ac_objext \
7530    conftest$ac_exeext conftest.$ac_ext
7531LIBS=$ac_check_lib_save_LIBS
7532fi
7533eval ac_res=\$$as_ac_Lib
7534	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7535$as_echo "$ac_res" >&6; }
7536if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7537  apu_has_ldap_start_tls_s="1"
7538fi
7539
7540        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7542$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7543if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7544  $as_echo_n "(cached) " >&6
7545else
7546  ac_check_lib_save_LIBS=$LIBS
7547LIBS="-l${ldaplib} ${extralib} $LIBS"
7548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7549/* end confdefs.h.  */
7550
7551/* Override any GCC internal prototype to avoid an error.
7552   Use char because int might match the return type of a GCC
7553   builtin and then its argument prototype would still apply.  */
7554#ifdef __cplusplus
7555extern "C"
7556#endif
7557char ldap_sslinit ();
7558int
7559main ()
7560{
7561return ldap_sslinit ();
7562  ;
7563  return 0;
7564}
7565_ACEOF
7566if ac_fn_c_try_link "$LINENO"; then :
7567  eval "$as_ac_Lib=yes"
7568else
7569  eval "$as_ac_Lib=no"
7570fi
7571rm -f core conftest.err conftest.$ac_objext \
7572    conftest$ac_exeext conftest.$ac_ext
7573LIBS=$ac_check_lib_save_LIBS
7574fi
7575eval ac_res=\$$as_ac_Lib
7576	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7577$as_echo "$ac_res" >&6; }
7578if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7579  apu_has_ldap_sslinit="1"
7580fi
7581
7582        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7584$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7585if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7586  $as_echo_n "(cached) " >&6
7587else
7588  ac_check_lib_save_LIBS=$LIBS
7589LIBS="-l${ldaplib} ${extralib} $LIBS"
7590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7591/* end confdefs.h.  */
7592
7593/* Override any GCC internal prototype to avoid an error.
7594   Use char because int might match the return type of a GCC
7595   builtin and then its argument prototype would still apply.  */
7596#ifdef __cplusplus
7597extern "C"
7598#endif
7599char ldapssl_init ();
7600int
7601main ()
7602{
7603return ldapssl_init ();
7604  ;
7605  return 0;
7606}
7607_ACEOF
7608if ac_fn_c_try_link "$LINENO"; then :
7609  eval "$as_ac_Lib=yes"
7610else
7611  eval "$as_ac_Lib=no"
7612fi
7613rm -f core conftest.err conftest.$ac_objext \
7614    conftest$ac_exeext conftest.$ac_ext
7615LIBS=$ac_check_lib_save_LIBS
7616fi
7617eval ac_res=\$$as_ac_Lib
7618	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7619$as_echo "$ac_res" >&6; }
7620if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7621  apu_has_ldapssl_init="1"
7622fi
7623
7624        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7626$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7627if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7628  $as_echo_n "(cached) " >&6
7629else
7630  ac_check_lib_save_LIBS=$LIBS
7631LIBS="-l${ldaplib} ${extralib} $LIBS"
7632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7633/* end confdefs.h.  */
7634
7635/* Override any GCC internal prototype to avoid an error.
7636   Use char because int might match the return type of a GCC
7637   builtin and then its argument prototype would still apply.  */
7638#ifdef __cplusplus
7639extern "C"
7640#endif
7641char ldapssl_install_routines ();
7642int
7643main ()
7644{
7645return ldapssl_install_routines ();
7646  ;
7647  return 0;
7648}
7649_ACEOF
7650if ac_fn_c_try_link "$LINENO"; then :
7651  eval "$as_ac_Lib=yes"
7652else
7653  eval "$as_ac_Lib=no"
7654fi
7655rm -f core conftest.err conftest.$ac_objext \
7656    conftest$ac_exeext conftest.$ac_ext
7657LIBS=$ac_check_lib_save_LIBS
7658fi
7659eval ac_res=\$$as_ac_Lib
7660	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7661$as_echo "$ac_res" >&6; }
7662if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7663  apu_has_ldapssl_install_routines="1"
7664fi
7665
7666        apu_has_ldap="1";
7667
7668fi
7669
7670  fi
7671
7672
7673  if test ${apu_has_ldap} != "1"; then
7674    ldaplib="ldapsdk"
7675    extralib="-lldapx -lldapssl -lldapgss -lgssapi_krb5"
7676    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
7677
7678    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
7679
7680    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
7681    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
7682    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
7683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
7684$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
7685if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7686  $as_echo_n "(cached) " >&6
7687else
7688  ac_check_lib_save_LIBS=$LIBS
7689LIBS="-l${ldaplib} ${extralib} $LIBS"
7690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7691/* end confdefs.h.  */
7692
7693/* Override any GCC internal prototype to avoid an error.
7694   Use char because int might match the return type of a GCC
7695   builtin and then its argument prototype would still apply.  */
7696#ifdef __cplusplus
7697extern "C"
7698#endif
7699char ldap_init ();
7700int
7701main ()
7702{
7703return ldap_init ();
7704  ;
7705  return 0;
7706}
7707_ACEOF
7708if ac_fn_c_try_link "$LINENO"; then :
7709  eval "$as_ac_Lib=yes"
7710else
7711  eval "$as_ac_Lib=no"
7712fi
7713rm -f core conftest.err conftest.$ac_objext \
7714    conftest$ac_exeext conftest.$ac_ext
7715LIBS=$ac_check_lib_save_LIBS
7716fi
7717eval ac_res=\$$as_ac_Lib
7718	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7719$as_echo "$ac_res" >&6; }
7720if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7721
7722        LDADD_ldap_found="-l${ldaplib} ${extralib}"
7723        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
7724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
7725$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
7726if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7727  $as_echo_n "(cached) " >&6
7728else
7729  ac_check_lib_save_LIBS=$LIBS
7730LIBS="-l${ldaplib} ${extralib} $LIBS"
7731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7732/* end confdefs.h.  */
7733
7734/* Override any GCC internal prototype to avoid an error.
7735   Use char because int might match the return type of a GCC
7736   builtin and then its argument prototype would still apply.  */
7737#ifdef __cplusplus
7738extern "C"
7739#endif
7740char ldapssl_client_init ();
7741int
7742main ()
7743{
7744return ldapssl_client_init ();
7745  ;
7746  return 0;
7747}
7748_ACEOF
7749if ac_fn_c_try_link "$LINENO"; then :
7750  eval "$as_ac_Lib=yes"
7751else
7752  eval "$as_ac_Lib=no"
7753fi
7754rm -f core conftest.err conftest.$ac_objext \
7755    conftest$ac_exeext conftest.$ac_ext
7756LIBS=$ac_check_lib_save_LIBS
7757fi
7758eval ac_res=\$$as_ac_Lib
7759	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7760$as_echo "$ac_res" >&6; }
7761if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7762  apu_has_ldapssl_client_init="1"
7763fi
7764
7765        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
7767$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
7768if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7769  $as_echo_n "(cached) " >&6
7770else
7771  ac_check_lib_save_LIBS=$LIBS
7772LIBS="-l${ldaplib} ${extralib} $LIBS"
7773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774/* end confdefs.h.  */
7775
7776/* Override any GCC internal prototype to avoid an error.
7777   Use char because int might match the return type of a GCC
7778   builtin and then its argument prototype would still apply.  */
7779#ifdef __cplusplus
7780extern "C"
7781#endif
7782char ldapssl_client_deinit ();
7783int
7784main ()
7785{
7786return ldapssl_client_deinit ();
7787  ;
7788  return 0;
7789}
7790_ACEOF
7791if ac_fn_c_try_link "$LINENO"; then :
7792  eval "$as_ac_Lib=yes"
7793else
7794  eval "$as_ac_Lib=no"
7795fi
7796rm -f core conftest.err conftest.$ac_objext \
7797    conftest$ac_exeext conftest.$ac_ext
7798LIBS=$ac_check_lib_save_LIBS
7799fi
7800eval ac_res=\$$as_ac_Lib
7801	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7802$as_echo "$ac_res" >&6; }
7803if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7804  apu_has_ldapssl_client_deinit="1"
7805fi
7806
7807        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
7808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
7809$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
7810if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7811  $as_echo_n "(cached) " >&6
7812else
7813  ac_check_lib_save_LIBS=$LIBS
7814LIBS="-l${ldaplib} ${extralib} $LIBS"
7815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7816/* end confdefs.h.  */
7817
7818/* Override any GCC internal prototype to avoid an error.
7819   Use char because int might match the return type of a GCC
7820   builtin and then its argument prototype would still apply.  */
7821#ifdef __cplusplus
7822extern "C"
7823#endif
7824char ldapssl_add_trusted_cert ();
7825int
7826main ()
7827{
7828return ldapssl_add_trusted_cert ();
7829  ;
7830  return 0;
7831}
7832_ACEOF
7833if ac_fn_c_try_link "$LINENO"; then :
7834  eval "$as_ac_Lib=yes"
7835else
7836  eval "$as_ac_Lib=no"
7837fi
7838rm -f core conftest.err conftest.$ac_objext \
7839    conftest$ac_exeext conftest.$ac_ext
7840LIBS=$ac_check_lib_save_LIBS
7841fi
7842eval ac_res=\$$as_ac_Lib
7843	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7844$as_echo "$ac_res" >&6; }
7845if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7846  apu_has_ldapssl_add_trusted_cert="1"
7847fi
7848
7849        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
7850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
7851$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
7852if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7853  $as_echo_n "(cached) " >&6
7854else
7855  ac_check_lib_save_LIBS=$LIBS
7856LIBS="-l${ldaplib} ${extralib} $LIBS"
7857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7858/* end confdefs.h.  */
7859
7860/* Override any GCC internal prototype to avoid an error.
7861   Use char because int might match the return type of a GCC
7862   builtin and then its argument prototype would still apply.  */
7863#ifdef __cplusplus
7864extern "C"
7865#endif
7866char ldap_start_tls_s ();
7867int
7868main ()
7869{
7870return ldap_start_tls_s ();
7871  ;
7872  return 0;
7873}
7874_ACEOF
7875if ac_fn_c_try_link "$LINENO"; then :
7876  eval "$as_ac_Lib=yes"
7877else
7878  eval "$as_ac_Lib=no"
7879fi
7880rm -f core conftest.err conftest.$ac_objext \
7881    conftest$ac_exeext conftest.$ac_ext
7882LIBS=$ac_check_lib_save_LIBS
7883fi
7884eval ac_res=\$$as_ac_Lib
7885	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7886$as_echo "$ac_res" >&6; }
7887if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7888  apu_has_ldap_start_tls_s="1"
7889fi
7890
7891        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
7892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
7893$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
7894if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7895  $as_echo_n "(cached) " >&6
7896else
7897  ac_check_lib_save_LIBS=$LIBS
7898LIBS="-l${ldaplib} ${extralib} $LIBS"
7899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7900/* end confdefs.h.  */
7901
7902/* Override any GCC internal prototype to avoid an error.
7903   Use char because int might match the return type of a GCC
7904   builtin and then its argument prototype would still apply.  */
7905#ifdef __cplusplus
7906extern "C"
7907#endif
7908char ldap_sslinit ();
7909int
7910main ()
7911{
7912return ldap_sslinit ();
7913  ;
7914  return 0;
7915}
7916_ACEOF
7917if ac_fn_c_try_link "$LINENO"; then :
7918  eval "$as_ac_Lib=yes"
7919else
7920  eval "$as_ac_Lib=no"
7921fi
7922rm -f core conftest.err conftest.$ac_objext \
7923    conftest$ac_exeext conftest.$ac_ext
7924LIBS=$ac_check_lib_save_LIBS
7925fi
7926eval ac_res=\$$as_ac_Lib
7927	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7928$as_echo "$ac_res" >&6; }
7929if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7930  apu_has_ldap_sslinit="1"
7931fi
7932
7933        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
7935$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
7936if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  ac_check_lib_save_LIBS=$LIBS
7940LIBS="-l${ldaplib} ${extralib} $LIBS"
7941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7942/* end confdefs.h.  */
7943
7944/* Override any GCC internal prototype to avoid an error.
7945   Use char because int might match the return type of a GCC
7946   builtin and then its argument prototype would still apply.  */
7947#ifdef __cplusplus
7948extern "C"
7949#endif
7950char ldapssl_init ();
7951int
7952main ()
7953{
7954return ldapssl_init ();
7955  ;
7956  return 0;
7957}
7958_ACEOF
7959if ac_fn_c_try_link "$LINENO"; then :
7960  eval "$as_ac_Lib=yes"
7961else
7962  eval "$as_ac_Lib=no"
7963fi
7964rm -f core conftest.err conftest.$ac_objext \
7965    conftest$ac_exeext conftest.$ac_ext
7966LIBS=$ac_check_lib_save_LIBS
7967fi
7968eval ac_res=\$$as_ac_Lib
7969	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7970$as_echo "$ac_res" >&6; }
7971if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
7972  apu_has_ldapssl_init="1"
7973fi
7974
7975        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
7977$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
7978if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
7979  $as_echo_n "(cached) " >&6
7980else
7981  ac_check_lib_save_LIBS=$LIBS
7982LIBS="-l${ldaplib} ${extralib} $LIBS"
7983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7984/* end confdefs.h.  */
7985
7986/* Override any GCC internal prototype to avoid an error.
7987   Use char because int might match the return type of a GCC
7988   builtin and then its argument prototype would still apply.  */
7989#ifdef __cplusplus
7990extern "C"
7991#endif
7992char ldapssl_install_routines ();
7993int
7994main ()
7995{
7996return ldapssl_install_routines ();
7997  ;
7998  return 0;
7999}
8000_ACEOF
8001if ac_fn_c_try_link "$LINENO"; then :
8002  eval "$as_ac_Lib=yes"
8003else
8004  eval "$as_ac_Lib=no"
8005fi
8006rm -f core conftest.err conftest.$ac_objext \
8007    conftest$ac_exeext conftest.$ac_ext
8008LIBS=$ac_check_lib_save_LIBS
8009fi
8010eval ac_res=\$$as_ac_Lib
8011	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8012$as_echo "$ac_res" >&6; }
8013if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8014  apu_has_ldapssl_install_routines="1"
8015fi
8016
8017        apu_has_ldap="1";
8018
8019fi
8020
8021  fi
8022
8023
8024  if test ${apu_has_ldap} != "1"; then
8025    ldaplib="ldapsdk"
8026    extralib="-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket"
8027    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8028
8029    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8030
8031    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8032    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8033    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8035$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8036if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8037  $as_echo_n "(cached) " >&6
8038else
8039  ac_check_lib_save_LIBS=$LIBS
8040LIBS="-l${ldaplib} ${extralib} $LIBS"
8041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8042/* end confdefs.h.  */
8043
8044/* Override any GCC internal prototype to avoid an error.
8045   Use char because int might match the return type of a GCC
8046   builtin and then its argument prototype would still apply.  */
8047#ifdef __cplusplus
8048extern "C"
8049#endif
8050char ldap_init ();
8051int
8052main ()
8053{
8054return ldap_init ();
8055  ;
8056  return 0;
8057}
8058_ACEOF
8059if ac_fn_c_try_link "$LINENO"; then :
8060  eval "$as_ac_Lib=yes"
8061else
8062  eval "$as_ac_Lib=no"
8063fi
8064rm -f core conftest.err conftest.$ac_objext \
8065    conftest$ac_exeext conftest.$ac_ext
8066LIBS=$ac_check_lib_save_LIBS
8067fi
8068eval ac_res=\$$as_ac_Lib
8069	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8070$as_echo "$ac_res" >&6; }
8071if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8072
8073        LDADD_ldap_found="-l${ldaplib} ${extralib}"
8074        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8076$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8077if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8078  $as_echo_n "(cached) " >&6
8079else
8080  ac_check_lib_save_LIBS=$LIBS
8081LIBS="-l${ldaplib} ${extralib} $LIBS"
8082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8083/* end confdefs.h.  */
8084
8085/* Override any GCC internal prototype to avoid an error.
8086   Use char because int might match the return type of a GCC
8087   builtin and then its argument prototype would still apply.  */
8088#ifdef __cplusplus
8089extern "C"
8090#endif
8091char ldapssl_client_init ();
8092int
8093main ()
8094{
8095return ldapssl_client_init ();
8096  ;
8097  return 0;
8098}
8099_ACEOF
8100if ac_fn_c_try_link "$LINENO"; then :
8101  eval "$as_ac_Lib=yes"
8102else
8103  eval "$as_ac_Lib=no"
8104fi
8105rm -f core conftest.err conftest.$ac_objext \
8106    conftest$ac_exeext conftest.$ac_ext
8107LIBS=$ac_check_lib_save_LIBS
8108fi
8109eval ac_res=\$$as_ac_Lib
8110	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8111$as_echo "$ac_res" >&6; }
8112if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8113  apu_has_ldapssl_client_init="1"
8114fi
8115
8116        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8118$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8119if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8120  $as_echo_n "(cached) " >&6
8121else
8122  ac_check_lib_save_LIBS=$LIBS
8123LIBS="-l${ldaplib} ${extralib} $LIBS"
8124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8125/* end confdefs.h.  */
8126
8127/* Override any GCC internal prototype to avoid an error.
8128   Use char because int might match the return type of a GCC
8129   builtin and then its argument prototype would still apply.  */
8130#ifdef __cplusplus
8131extern "C"
8132#endif
8133char ldapssl_client_deinit ();
8134int
8135main ()
8136{
8137return ldapssl_client_deinit ();
8138  ;
8139  return 0;
8140}
8141_ACEOF
8142if ac_fn_c_try_link "$LINENO"; then :
8143  eval "$as_ac_Lib=yes"
8144else
8145  eval "$as_ac_Lib=no"
8146fi
8147rm -f core conftest.err conftest.$ac_objext \
8148    conftest$ac_exeext conftest.$ac_ext
8149LIBS=$ac_check_lib_save_LIBS
8150fi
8151eval ac_res=\$$as_ac_Lib
8152	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8153$as_echo "$ac_res" >&6; }
8154if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8155  apu_has_ldapssl_client_deinit="1"
8156fi
8157
8158        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8160$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8161if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8162  $as_echo_n "(cached) " >&6
8163else
8164  ac_check_lib_save_LIBS=$LIBS
8165LIBS="-l${ldaplib} ${extralib} $LIBS"
8166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8167/* end confdefs.h.  */
8168
8169/* Override any GCC internal prototype to avoid an error.
8170   Use char because int might match the return type of a GCC
8171   builtin and then its argument prototype would still apply.  */
8172#ifdef __cplusplus
8173extern "C"
8174#endif
8175char ldapssl_add_trusted_cert ();
8176int
8177main ()
8178{
8179return ldapssl_add_trusted_cert ();
8180  ;
8181  return 0;
8182}
8183_ACEOF
8184if ac_fn_c_try_link "$LINENO"; then :
8185  eval "$as_ac_Lib=yes"
8186else
8187  eval "$as_ac_Lib=no"
8188fi
8189rm -f core conftest.err conftest.$ac_objext \
8190    conftest$ac_exeext conftest.$ac_ext
8191LIBS=$ac_check_lib_save_LIBS
8192fi
8193eval ac_res=\$$as_ac_Lib
8194	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8195$as_echo "$ac_res" >&6; }
8196if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8197  apu_has_ldapssl_add_trusted_cert="1"
8198fi
8199
8200        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8202$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8203if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8204  $as_echo_n "(cached) " >&6
8205else
8206  ac_check_lib_save_LIBS=$LIBS
8207LIBS="-l${ldaplib} ${extralib} $LIBS"
8208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8209/* end confdefs.h.  */
8210
8211/* Override any GCC internal prototype to avoid an error.
8212   Use char because int might match the return type of a GCC
8213   builtin and then its argument prototype would still apply.  */
8214#ifdef __cplusplus
8215extern "C"
8216#endif
8217char ldap_start_tls_s ();
8218int
8219main ()
8220{
8221return ldap_start_tls_s ();
8222  ;
8223  return 0;
8224}
8225_ACEOF
8226if ac_fn_c_try_link "$LINENO"; then :
8227  eval "$as_ac_Lib=yes"
8228else
8229  eval "$as_ac_Lib=no"
8230fi
8231rm -f core conftest.err conftest.$ac_objext \
8232    conftest$ac_exeext conftest.$ac_ext
8233LIBS=$ac_check_lib_save_LIBS
8234fi
8235eval ac_res=\$$as_ac_Lib
8236	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8237$as_echo "$ac_res" >&6; }
8238if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8239  apu_has_ldap_start_tls_s="1"
8240fi
8241
8242        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8244$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8245if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8246  $as_echo_n "(cached) " >&6
8247else
8248  ac_check_lib_save_LIBS=$LIBS
8249LIBS="-l${ldaplib} ${extralib} $LIBS"
8250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8251/* end confdefs.h.  */
8252
8253/* Override any GCC internal prototype to avoid an error.
8254   Use char because int might match the return type of a GCC
8255   builtin and then its argument prototype would still apply.  */
8256#ifdef __cplusplus
8257extern "C"
8258#endif
8259char ldap_sslinit ();
8260int
8261main ()
8262{
8263return ldap_sslinit ();
8264  ;
8265  return 0;
8266}
8267_ACEOF
8268if ac_fn_c_try_link "$LINENO"; then :
8269  eval "$as_ac_Lib=yes"
8270else
8271  eval "$as_ac_Lib=no"
8272fi
8273rm -f core conftest.err conftest.$ac_objext \
8274    conftest$ac_exeext conftest.$ac_ext
8275LIBS=$ac_check_lib_save_LIBS
8276fi
8277eval ac_res=\$$as_ac_Lib
8278	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8279$as_echo "$ac_res" >&6; }
8280if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8281  apu_has_ldap_sslinit="1"
8282fi
8283
8284        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8286$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8287if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  ac_check_lib_save_LIBS=$LIBS
8291LIBS="-l${ldaplib} ${extralib} $LIBS"
8292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8293/* end confdefs.h.  */
8294
8295/* Override any GCC internal prototype to avoid an error.
8296   Use char because int might match the return type of a GCC
8297   builtin and then its argument prototype would still apply.  */
8298#ifdef __cplusplus
8299extern "C"
8300#endif
8301char ldapssl_init ();
8302int
8303main ()
8304{
8305return ldapssl_init ();
8306  ;
8307  return 0;
8308}
8309_ACEOF
8310if ac_fn_c_try_link "$LINENO"; then :
8311  eval "$as_ac_Lib=yes"
8312else
8313  eval "$as_ac_Lib=no"
8314fi
8315rm -f core conftest.err conftest.$ac_objext \
8316    conftest$ac_exeext conftest.$ac_ext
8317LIBS=$ac_check_lib_save_LIBS
8318fi
8319eval ac_res=\$$as_ac_Lib
8320	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8321$as_echo "$ac_res" >&6; }
8322if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8323  apu_has_ldapssl_init="1"
8324fi
8325
8326        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8328$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8329if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8330  $as_echo_n "(cached) " >&6
8331else
8332  ac_check_lib_save_LIBS=$LIBS
8333LIBS="-l${ldaplib} ${extralib} $LIBS"
8334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8335/* end confdefs.h.  */
8336
8337/* Override any GCC internal prototype to avoid an error.
8338   Use char because int might match the return type of a GCC
8339   builtin and then its argument prototype would still apply.  */
8340#ifdef __cplusplus
8341extern "C"
8342#endif
8343char ldapssl_install_routines ();
8344int
8345main ()
8346{
8347return ldapssl_install_routines ();
8348  ;
8349  return 0;
8350}
8351_ACEOF
8352if ac_fn_c_try_link "$LINENO"; then :
8353  eval "$as_ac_Lib=yes"
8354else
8355  eval "$as_ac_Lib=no"
8356fi
8357rm -f core conftest.err conftest.$ac_objext \
8358    conftest$ac_exeext conftest.$ac_ext
8359LIBS=$ac_check_lib_save_LIBS
8360fi
8361eval ac_res=\$$as_ac_Lib
8362	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8363$as_echo "$ac_res" >&6; }
8364if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8365  apu_has_ldapssl_install_routines="1"
8366fi
8367
8368        apu_has_ldap="1";
8369
8370fi
8371
8372  fi
8373
8374
8375  if test ${apu_has_ldap} != "1"; then
8376    ldaplib="ldap"
8377    extralib="-llber"
8378    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8379
8380    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8381
8382    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8383    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8384    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8386$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8387if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8388  $as_echo_n "(cached) " >&6
8389else
8390  ac_check_lib_save_LIBS=$LIBS
8391LIBS="-l${ldaplib} ${extralib} $LIBS"
8392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8393/* end confdefs.h.  */
8394
8395/* Override any GCC internal prototype to avoid an error.
8396   Use char because int might match the return type of a GCC
8397   builtin and then its argument prototype would still apply.  */
8398#ifdef __cplusplus
8399extern "C"
8400#endif
8401char ldap_init ();
8402int
8403main ()
8404{
8405return ldap_init ();
8406  ;
8407  return 0;
8408}
8409_ACEOF
8410if ac_fn_c_try_link "$LINENO"; then :
8411  eval "$as_ac_Lib=yes"
8412else
8413  eval "$as_ac_Lib=no"
8414fi
8415rm -f core conftest.err conftest.$ac_objext \
8416    conftest$ac_exeext conftest.$ac_ext
8417LIBS=$ac_check_lib_save_LIBS
8418fi
8419eval ac_res=\$$as_ac_Lib
8420	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8421$as_echo "$ac_res" >&6; }
8422if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8423
8424        LDADD_ldap_found="-l${ldaplib} ${extralib}"
8425        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8427$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8428if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8429  $as_echo_n "(cached) " >&6
8430else
8431  ac_check_lib_save_LIBS=$LIBS
8432LIBS="-l${ldaplib} ${extralib} $LIBS"
8433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8434/* end confdefs.h.  */
8435
8436/* Override any GCC internal prototype to avoid an error.
8437   Use char because int might match the return type of a GCC
8438   builtin and then its argument prototype would still apply.  */
8439#ifdef __cplusplus
8440extern "C"
8441#endif
8442char ldapssl_client_init ();
8443int
8444main ()
8445{
8446return ldapssl_client_init ();
8447  ;
8448  return 0;
8449}
8450_ACEOF
8451if ac_fn_c_try_link "$LINENO"; then :
8452  eval "$as_ac_Lib=yes"
8453else
8454  eval "$as_ac_Lib=no"
8455fi
8456rm -f core conftest.err conftest.$ac_objext \
8457    conftest$ac_exeext conftest.$ac_ext
8458LIBS=$ac_check_lib_save_LIBS
8459fi
8460eval ac_res=\$$as_ac_Lib
8461	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8462$as_echo "$ac_res" >&6; }
8463if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8464  apu_has_ldapssl_client_init="1"
8465fi
8466
8467        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8469$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8470if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8471  $as_echo_n "(cached) " >&6
8472else
8473  ac_check_lib_save_LIBS=$LIBS
8474LIBS="-l${ldaplib} ${extralib} $LIBS"
8475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8476/* end confdefs.h.  */
8477
8478/* Override any GCC internal prototype to avoid an error.
8479   Use char because int might match the return type of a GCC
8480   builtin and then its argument prototype would still apply.  */
8481#ifdef __cplusplus
8482extern "C"
8483#endif
8484char ldapssl_client_deinit ();
8485int
8486main ()
8487{
8488return ldapssl_client_deinit ();
8489  ;
8490  return 0;
8491}
8492_ACEOF
8493if ac_fn_c_try_link "$LINENO"; then :
8494  eval "$as_ac_Lib=yes"
8495else
8496  eval "$as_ac_Lib=no"
8497fi
8498rm -f core conftest.err conftest.$ac_objext \
8499    conftest$ac_exeext conftest.$ac_ext
8500LIBS=$ac_check_lib_save_LIBS
8501fi
8502eval ac_res=\$$as_ac_Lib
8503	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8504$as_echo "$ac_res" >&6; }
8505if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8506  apu_has_ldapssl_client_deinit="1"
8507fi
8508
8509        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8511$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8512if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8513  $as_echo_n "(cached) " >&6
8514else
8515  ac_check_lib_save_LIBS=$LIBS
8516LIBS="-l${ldaplib} ${extralib} $LIBS"
8517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8518/* end confdefs.h.  */
8519
8520/* Override any GCC internal prototype to avoid an error.
8521   Use char because int might match the return type of a GCC
8522   builtin and then its argument prototype would still apply.  */
8523#ifdef __cplusplus
8524extern "C"
8525#endif
8526char ldapssl_add_trusted_cert ();
8527int
8528main ()
8529{
8530return ldapssl_add_trusted_cert ();
8531  ;
8532  return 0;
8533}
8534_ACEOF
8535if ac_fn_c_try_link "$LINENO"; then :
8536  eval "$as_ac_Lib=yes"
8537else
8538  eval "$as_ac_Lib=no"
8539fi
8540rm -f core conftest.err conftest.$ac_objext \
8541    conftest$ac_exeext conftest.$ac_ext
8542LIBS=$ac_check_lib_save_LIBS
8543fi
8544eval ac_res=\$$as_ac_Lib
8545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8546$as_echo "$ac_res" >&6; }
8547if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8548  apu_has_ldapssl_add_trusted_cert="1"
8549fi
8550
8551        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8553$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8554if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  ac_check_lib_save_LIBS=$LIBS
8558LIBS="-l${ldaplib} ${extralib} $LIBS"
8559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8560/* end confdefs.h.  */
8561
8562/* Override any GCC internal prototype to avoid an error.
8563   Use char because int might match the return type of a GCC
8564   builtin and then its argument prototype would still apply.  */
8565#ifdef __cplusplus
8566extern "C"
8567#endif
8568char ldap_start_tls_s ();
8569int
8570main ()
8571{
8572return ldap_start_tls_s ();
8573  ;
8574  return 0;
8575}
8576_ACEOF
8577if ac_fn_c_try_link "$LINENO"; then :
8578  eval "$as_ac_Lib=yes"
8579else
8580  eval "$as_ac_Lib=no"
8581fi
8582rm -f core conftest.err conftest.$ac_objext \
8583    conftest$ac_exeext conftest.$ac_ext
8584LIBS=$ac_check_lib_save_LIBS
8585fi
8586eval ac_res=\$$as_ac_Lib
8587	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8588$as_echo "$ac_res" >&6; }
8589if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8590  apu_has_ldap_start_tls_s="1"
8591fi
8592
8593        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8595$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8596if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8597  $as_echo_n "(cached) " >&6
8598else
8599  ac_check_lib_save_LIBS=$LIBS
8600LIBS="-l${ldaplib} ${extralib} $LIBS"
8601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8602/* end confdefs.h.  */
8603
8604/* Override any GCC internal prototype to avoid an error.
8605   Use char because int might match the return type of a GCC
8606   builtin and then its argument prototype would still apply.  */
8607#ifdef __cplusplus
8608extern "C"
8609#endif
8610char ldap_sslinit ();
8611int
8612main ()
8613{
8614return ldap_sslinit ();
8615  ;
8616  return 0;
8617}
8618_ACEOF
8619if ac_fn_c_try_link "$LINENO"; then :
8620  eval "$as_ac_Lib=yes"
8621else
8622  eval "$as_ac_Lib=no"
8623fi
8624rm -f core conftest.err conftest.$ac_objext \
8625    conftest$ac_exeext conftest.$ac_ext
8626LIBS=$ac_check_lib_save_LIBS
8627fi
8628eval ac_res=\$$as_ac_Lib
8629	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8630$as_echo "$ac_res" >&6; }
8631if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8632  apu_has_ldap_sslinit="1"
8633fi
8634
8635        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8637$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8638if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8639  $as_echo_n "(cached) " >&6
8640else
8641  ac_check_lib_save_LIBS=$LIBS
8642LIBS="-l${ldaplib} ${extralib} $LIBS"
8643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8644/* end confdefs.h.  */
8645
8646/* Override any GCC internal prototype to avoid an error.
8647   Use char because int might match the return type of a GCC
8648   builtin and then its argument prototype would still apply.  */
8649#ifdef __cplusplus
8650extern "C"
8651#endif
8652char ldapssl_init ();
8653int
8654main ()
8655{
8656return ldapssl_init ();
8657  ;
8658  return 0;
8659}
8660_ACEOF
8661if ac_fn_c_try_link "$LINENO"; then :
8662  eval "$as_ac_Lib=yes"
8663else
8664  eval "$as_ac_Lib=no"
8665fi
8666rm -f core conftest.err conftest.$ac_objext \
8667    conftest$ac_exeext conftest.$ac_ext
8668LIBS=$ac_check_lib_save_LIBS
8669fi
8670eval ac_res=\$$as_ac_Lib
8671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8672$as_echo "$ac_res" >&6; }
8673if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8674  apu_has_ldapssl_init="1"
8675fi
8676
8677        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
8679$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
8680if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8681  $as_echo_n "(cached) " >&6
8682else
8683  ac_check_lib_save_LIBS=$LIBS
8684LIBS="-l${ldaplib} ${extralib} $LIBS"
8685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8686/* end confdefs.h.  */
8687
8688/* Override any GCC internal prototype to avoid an error.
8689   Use char because int might match the return type of a GCC
8690   builtin and then its argument prototype would still apply.  */
8691#ifdef __cplusplus
8692extern "C"
8693#endif
8694char ldapssl_install_routines ();
8695int
8696main ()
8697{
8698return ldapssl_install_routines ();
8699  ;
8700  return 0;
8701}
8702_ACEOF
8703if ac_fn_c_try_link "$LINENO"; then :
8704  eval "$as_ac_Lib=yes"
8705else
8706  eval "$as_ac_Lib=no"
8707fi
8708rm -f core conftest.err conftest.$ac_objext \
8709    conftest$ac_exeext conftest.$ac_ext
8710LIBS=$ac_check_lib_save_LIBS
8711fi
8712eval ac_res=\$$as_ac_Lib
8713	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8714$as_echo "$ac_res" >&6; }
8715if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8716  apu_has_ldapssl_install_routines="1"
8717fi
8718
8719        apu_has_ldap="1";
8720
8721fi
8722
8723  fi
8724
8725
8726  if test ${apu_has_ldap} != "1"; then
8727    ldaplib="ldap"
8728    extralib="-llber -lresolv"
8729    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
8730
8731    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
8732
8733    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
8734    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
8735    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
8737$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
8738if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8739  $as_echo_n "(cached) " >&6
8740else
8741  ac_check_lib_save_LIBS=$LIBS
8742LIBS="-l${ldaplib} ${extralib} $LIBS"
8743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744/* end confdefs.h.  */
8745
8746/* Override any GCC internal prototype to avoid an error.
8747   Use char because int might match the return type of a GCC
8748   builtin and then its argument prototype would still apply.  */
8749#ifdef __cplusplus
8750extern "C"
8751#endif
8752char ldap_init ();
8753int
8754main ()
8755{
8756return ldap_init ();
8757  ;
8758  return 0;
8759}
8760_ACEOF
8761if ac_fn_c_try_link "$LINENO"; then :
8762  eval "$as_ac_Lib=yes"
8763else
8764  eval "$as_ac_Lib=no"
8765fi
8766rm -f core conftest.err conftest.$ac_objext \
8767    conftest$ac_exeext conftest.$ac_ext
8768LIBS=$ac_check_lib_save_LIBS
8769fi
8770eval ac_res=\$$as_ac_Lib
8771	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8772$as_echo "$ac_res" >&6; }
8773if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8774
8775        LDADD_ldap_found="-l${ldaplib} ${extralib}"
8776        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
8777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
8778$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
8779if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8780  $as_echo_n "(cached) " >&6
8781else
8782  ac_check_lib_save_LIBS=$LIBS
8783LIBS="-l${ldaplib} ${extralib} $LIBS"
8784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8785/* end confdefs.h.  */
8786
8787/* Override any GCC internal prototype to avoid an error.
8788   Use char because int might match the return type of a GCC
8789   builtin and then its argument prototype would still apply.  */
8790#ifdef __cplusplus
8791extern "C"
8792#endif
8793char ldapssl_client_init ();
8794int
8795main ()
8796{
8797return ldapssl_client_init ();
8798  ;
8799  return 0;
8800}
8801_ACEOF
8802if ac_fn_c_try_link "$LINENO"; then :
8803  eval "$as_ac_Lib=yes"
8804else
8805  eval "$as_ac_Lib=no"
8806fi
8807rm -f core conftest.err conftest.$ac_objext \
8808    conftest$ac_exeext conftest.$ac_ext
8809LIBS=$ac_check_lib_save_LIBS
8810fi
8811eval ac_res=\$$as_ac_Lib
8812	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8813$as_echo "$ac_res" >&6; }
8814if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8815  apu_has_ldapssl_client_init="1"
8816fi
8817
8818        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
8819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
8820$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
8821if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8822  $as_echo_n "(cached) " >&6
8823else
8824  ac_check_lib_save_LIBS=$LIBS
8825LIBS="-l${ldaplib} ${extralib} $LIBS"
8826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8827/* end confdefs.h.  */
8828
8829/* Override any GCC internal prototype to avoid an error.
8830   Use char because int might match the return type of a GCC
8831   builtin and then its argument prototype would still apply.  */
8832#ifdef __cplusplus
8833extern "C"
8834#endif
8835char ldapssl_client_deinit ();
8836int
8837main ()
8838{
8839return ldapssl_client_deinit ();
8840  ;
8841  return 0;
8842}
8843_ACEOF
8844if ac_fn_c_try_link "$LINENO"; then :
8845  eval "$as_ac_Lib=yes"
8846else
8847  eval "$as_ac_Lib=no"
8848fi
8849rm -f core conftest.err conftest.$ac_objext \
8850    conftest$ac_exeext conftest.$ac_ext
8851LIBS=$ac_check_lib_save_LIBS
8852fi
8853eval ac_res=\$$as_ac_Lib
8854	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8855$as_echo "$ac_res" >&6; }
8856if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8857  apu_has_ldapssl_client_deinit="1"
8858fi
8859
8860        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
8862$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
8863if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8864  $as_echo_n "(cached) " >&6
8865else
8866  ac_check_lib_save_LIBS=$LIBS
8867LIBS="-l${ldaplib} ${extralib} $LIBS"
8868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8869/* end confdefs.h.  */
8870
8871/* Override any GCC internal prototype to avoid an error.
8872   Use char because int might match the return type of a GCC
8873   builtin and then its argument prototype would still apply.  */
8874#ifdef __cplusplus
8875extern "C"
8876#endif
8877char ldapssl_add_trusted_cert ();
8878int
8879main ()
8880{
8881return ldapssl_add_trusted_cert ();
8882  ;
8883  return 0;
8884}
8885_ACEOF
8886if ac_fn_c_try_link "$LINENO"; then :
8887  eval "$as_ac_Lib=yes"
8888else
8889  eval "$as_ac_Lib=no"
8890fi
8891rm -f core conftest.err conftest.$ac_objext \
8892    conftest$ac_exeext conftest.$ac_ext
8893LIBS=$ac_check_lib_save_LIBS
8894fi
8895eval ac_res=\$$as_ac_Lib
8896	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8897$as_echo "$ac_res" >&6; }
8898if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8899  apu_has_ldapssl_add_trusted_cert="1"
8900fi
8901
8902        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
8903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
8904$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
8905if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8906  $as_echo_n "(cached) " >&6
8907else
8908  ac_check_lib_save_LIBS=$LIBS
8909LIBS="-l${ldaplib} ${extralib} $LIBS"
8910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8911/* end confdefs.h.  */
8912
8913/* Override any GCC internal prototype to avoid an error.
8914   Use char because int might match the return type of a GCC
8915   builtin and then its argument prototype would still apply.  */
8916#ifdef __cplusplus
8917extern "C"
8918#endif
8919char ldap_start_tls_s ();
8920int
8921main ()
8922{
8923return ldap_start_tls_s ();
8924  ;
8925  return 0;
8926}
8927_ACEOF
8928if ac_fn_c_try_link "$LINENO"; then :
8929  eval "$as_ac_Lib=yes"
8930else
8931  eval "$as_ac_Lib=no"
8932fi
8933rm -f core conftest.err conftest.$ac_objext \
8934    conftest$ac_exeext conftest.$ac_ext
8935LIBS=$ac_check_lib_save_LIBS
8936fi
8937eval ac_res=\$$as_ac_Lib
8938	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8939$as_echo "$ac_res" >&6; }
8940if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8941  apu_has_ldap_start_tls_s="1"
8942fi
8943
8944        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
8946$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
8947if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8948  $as_echo_n "(cached) " >&6
8949else
8950  ac_check_lib_save_LIBS=$LIBS
8951LIBS="-l${ldaplib} ${extralib} $LIBS"
8952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8953/* end confdefs.h.  */
8954
8955/* Override any GCC internal prototype to avoid an error.
8956   Use char because int might match the return type of a GCC
8957   builtin and then its argument prototype would still apply.  */
8958#ifdef __cplusplus
8959extern "C"
8960#endif
8961char ldap_sslinit ();
8962int
8963main ()
8964{
8965return ldap_sslinit ();
8966  ;
8967  return 0;
8968}
8969_ACEOF
8970if ac_fn_c_try_link "$LINENO"; then :
8971  eval "$as_ac_Lib=yes"
8972else
8973  eval "$as_ac_Lib=no"
8974fi
8975rm -f core conftest.err conftest.$ac_objext \
8976    conftest$ac_exeext conftest.$ac_ext
8977LIBS=$ac_check_lib_save_LIBS
8978fi
8979eval ac_res=\$$as_ac_Lib
8980	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8981$as_echo "$ac_res" >&6; }
8982if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8983  apu_has_ldap_sslinit="1"
8984fi
8985
8986        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
8987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
8988$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
8989if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
8990  $as_echo_n "(cached) " >&6
8991else
8992  ac_check_lib_save_LIBS=$LIBS
8993LIBS="-l${ldaplib} ${extralib} $LIBS"
8994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8995/* end confdefs.h.  */
8996
8997/* Override any GCC internal prototype to avoid an error.
8998   Use char because int might match the return type of a GCC
8999   builtin and then its argument prototype would still apply.  */
9000#ifdef __cplusplus
9001extern "C"
9002#endif
9003char ldapssl_init ();
9004int
9005main ()
9006{
9007return ldapssl_init ();
9008  ;
9009  return 0;
9010}
9011_ACEOF
9012if ac_fn_c_try_link "$LINENO"; then :
9013  eval "$as_ac_Lib=yes"
9014else
9015  eval "$as_ac_Lib=no"
9016fi
9017rm -f core conftest.err conftest.$ac_objext \
9018    conftest$ac_exeext conftest.$ac_ext
9019LIBS=$ac_check_lib_save_LIBS
9020fi
9021eval ac_res=\$$as_ac_Lib
9022	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9023$as_echo "$ac_res" >&6; }
9024if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9025  apu_has_ldapssl_init="1"
9026fi
9027
9028        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9030$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9031if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9032  $as_echo_n "(cached) " >&6
9033else
9034  ac_check_lib_save_LIBS=$LIBS
9035LIBS="-l${ldaplib} ${extralib} $LIBS"
9036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9037/* end confdefs.h.  */
9038
9039/* Override any GCC internal prototype to avoid an error.
9040   Use char because int might match the return type of a GCC
9041   builtin and then its argument prototype would still apply.  */
9042#ifdef __cplusplus
9043extern "C"
9044#endif
9045char ldapssl_install_routines ();
9046int
9047main ()
9048{
9049return ldapssl_install_routines ();
9050  ;
9051  return 0;
9052}
9053_ACEOF
9054if ac_fn_c_try_link "$LINENO"; then :
9055  eval "$as_ac_Lib=yes"
9056else
9057  eval "$as_ac_Lib=no"
9058fi
9059rm -f core conftest.err conftest.$ac_objext \
9060    conftest$ac_exeext conftest.$ac_ext
9061LIBS=$ac_check_lib_save_LIBS
9062fi
9063eval ac_res=\$$as_ac_Lib
9064	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9065$as_echo "$ac_res" >&6; }
9066if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9067  apu_has_ldapssl_install_routines="1"
9068fi
9069
9070        apu_has_ldap="1";
9071
9072fi
9073
9074  fi
9075
9076
9077  if test ${apu_has_ldap} != "1"; then
9078    ldaplib="ldap"
9079    extralib="-llber -lresolv -lsocket -lnsl"
9080    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9081
9082    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9083
9084    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9085    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9086    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9088$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9089if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9090  $as_echo_n "(cached) " >&6
9091else
9092  ac_check_lib_save_LIBS=$LIBS
9093LIBS="-l${ldaplib} ${extralib} $LIBS"
9094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9095/* end confdefs.h.  */
9096
9097/* Override any GCC internal prototype to avoid an error.
9098   Use char because int might match the return type of a GCC
9099   builtin and then its argument prototype would still apply.  */
9100#ifdef __cplusplus
9101extern "C"
9102#endif
9103char ldap_init ();
9104int
9105main ()
9106{
9107return ldap_init ();
9108  ;
9109  return 0;
9110}
9111_ACEOF
9112if ac_fn_c_try_link "$LINENO"; then :
9113  eval "$as_ac_Lib=yes"
9114else
9115  eval "$as_ac_Lib=no"
9116fi
9117rm -f core conftest.err conftest.$ac_objext \
9118    conftest$ac_exeext conftest.$ac_ext
9119LIBS=$ac_check_lib_save_LIBS
9120fi
9121eval ac_res=\$$as_ac_Lib
9122	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9123$as_echo "$ac_res" >&6; }
9124if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9125
9126        LDADD_ldap_found="-l${ldaplib} ${extralib}"
9127        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9129$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9130if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9131  $as_echo_n "(cached) " >&6
9132else
9133  ac_check_lib_save_LIBS=$LIBS
9134LIBS="-l${ldaplib} ${extralib} $LIBS"
9135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9136/* end confdefs.h.  */
9137
9138/* Override any GCC internal prototype to avoid an error.
9139   Use char because int might match the return type of a GCC
9140   builtin and then its argument prototype would still apply.  */
9141#ifdef __cplusplus
9142extern "C"
9143#endif
9144char ldapssl_client_init ();
9145int
9146main ()
9147{
9148return ldapssl_client_init ();
9149  ;
9150  return 0;
9151}
9152_ACEOF
9153if ac_fn_c_try_link "$LINENO"; then :
9154  eval "$as_ac_Lib=yes"
9155else
9156  eval "$as_ac_Lib=no"
9157fi
9158rm -f core conftest.err conftest.$ac_objext \
9159    conftest$ac_exeext conftest.$ac_ext
9160LIBS=$ac_check_lib_save_LIBS
9161fi
9162eval ac_res=\$$as_ac_Lib
9163	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9164$as_echo "$ac_res" >&6; }
9165if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9166  apu_has_ldapssl_client_init="1"
9167fi
9168
9169        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9171$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9172if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9173  $as_echo_n "(cached) " >&6
9174else
9175  ac_check_lib_save_LIBS=$LIBS
9176LIBS="-l${ldaplib} ${extralib} $LIBS"
9177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9178/* end confdefs.h.  */
9179
9180/* Override any GCC internal prototype to avoid an error.
9181   Use char because int might match the return type of a GCC
9182   builtin and then its argument prototype would still apply.  */
9183#ifdef __cplusplus
9184extern "C"
9185#endif
9186char ldapssl_client_deinit ();
9187int
9188main ()
9189{
9190return ldapssl_client_deinit ();
9191  ;
9192  return 0;
9193}
9194_ACEOF
9195if ac_fn_c_try_link "$LINENO"; then :
9196  eval "$as_ac_Lib=yes"
9197else
9198  eval "$as_ac_Lib=no"
9199fi
9200rm -f core conftest.err conftest.$ac_objext \
9201    conftest$ac_exeext conftest.$ac_ext
9202LIBS=$ac_check_lib_save_LIBS
9203fi
9204eval ac_res=\$$as_ac_Lib
9205	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9206$as_echo "$ac_res" >&6; }
9207if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9208  apu_has_ldapssl_client_deinit="1"
9209fi
9210
9211        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9213$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9214if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9215  $as_echo_n "(cached) " >&6
9216else
9217  ac_check_lib_save_LIBS=$LIBS
9218LIBS="-l${ldaplib} ${extralib} $LIBS"
9219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220/* end confdefs.h.  */
9221
9222/* Override any GCC internal prototype to avoid an error.
9223   Use char because int might match the return type of a GCC
9224   builtin and then its argument prototype would still apply.  */
9225#ifdef __cplusplus
9226extern "C"
9227#endif
9228char ldapssl_add_trusted_cert ();
9229int
9230main ()
9231{
9232return ldapssl_add_trusted_cert ();
9233  ;
9234  return 0;
9235}
9236_ACEOF
9237if ac_fn_c_try_link "$LINENO"; then :
9238  eval "$as_ac_Lib=yes"
9239else
9240  eval "$as_ac_Lib=no"
9241fi
9242rm -f core conftest.err conftest.$ac_objext \
9243    conftest$ac_exeext conftest.$ac_ext
9244LIBS=$ac_check_lib_save_LIBS
9245fi
9246eval ac_res=\$$as_ac_Lib
9247	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9248$as_echo "$ac_res" >&6; }
9249if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9250  apu_has_ldapssl_add_trusted_cert="1"
9251fi
9252
9253        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9255$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9256if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  ac_check_lib_save_LIBS=$LIBS
9260LIBS="-l${ldaplib} ${extralib} $LIBS"
9261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9262/* end confdefs.h.  */
9263
9264/* Override any GCC internal prototype to avoid an error.
9265   Use char because int might match the return type of a GCC
9266   builtin and then its argument prototype would still apply.  */
9267#ifdef __cplusplus
9268extern "C"
9269#endif
9270char ldap_start_tls_s ();
9271int
9272main ()
9273{
9274return ldap_start_tls_s ();
9275  ;
9276  return 0;
9277}
9278_ACEOF
9279if ac_fn_c_try_link "$LINENO"; then :
9280  eval "$as_ac_Lib=yes"
9281else
9282  eval "$as_ac_Lib=no"
9283fi
9284rm -f core conftest.err conftest.$ac_objext \
9285    conftest$ac_exeext conftest.$ac_ext
9286LIBS=$ac_check_lib_save_LIBS
9287fi
9288eval ac_res=\$$as_ac_Lib
9289	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9290$as_echo "$ac_res" >&6; }
9291if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9292  apu_has_ldap_start_tls_s="1"
9293fi
9294
9295        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9297$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9298if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9299  $as_echo_n "(cached) " >&6
9300else
9301  ac_check_lib_save_LIBS=$LIBS
9302LIBS="-l${ldaplib} ${extralib} $LIBS"
9303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9304/* end confdefs.h.  */
9305
9306/* Override any GCC internal prototype to avoid an error.
9307   Use char because int might match the return type of a GCC
9308   builtin and then its argument prototype would still apply.  */
9309#ifdef __cplusplus
9310extern "C"
9311#endif
9312char ldap_sslinit ();
9313int
9314main ()
9315{
9316return ldap_sslinit ();
9317  ;
9318  return 0;
9319}
9320_ACEOF
9321if ac_fn_c_try_link "$LINENO"; then :
9322  eval "$as_ac_Lib=yes"
9323else
9324  eval "$as_ac_Lib=no"
9325fi
9326rm -f core conftest.err conftest.$ac_objext \
9327    conftest$ac_exeext conftest.$ac_ext
9328LIBS=$ac_check_lib_save_LIBS
9329fi
9330eval ac_res=\$$as_ac_Lib
9331	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9332$as_echo "$ac_res" >&6; }
9333if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9334  apu_has_ldap_sslinit="1"
9335fi
9336
9337        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9339$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9340if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9341  $as_echo_n "(cached) " >&6
9342else
9343  ac_check_lib_save_LIBS=$LIBS
9344LIBS="-l${ldaplib} ${extralib} $LIBS"
9345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9346/* end confdefs.h.  */
9347
9348/* Override any GCC internal prototype to avoid an error.
9349   Use char because int might match the return type of a GCC
9350   builtin and then its argument prototype would still apply.  */
9351#ifdef __cplusplus
9352extern "C"
9353#endif
9354char ldapssl_init ();
9355int
9356main ()
9357{
9358return ldapssl_init ();
9359  ;
9360  return 0;
9361}
9362_ACEOF
9363if ac_fn_c_try_link "$LINENO"; then :
9364  eval "$as_ac_Lib=yes"
9365else
9366  eval "$as_ac_Lib=no"
9367fi
9368rm -f core conftest.err conftest.$ac_objext \
9369    conftest$ac_exeext conftest.$ac_ext
9370LIBS=$ac_check_lib_save_LIBS
9371fi
9372eval ac_res=\$$as_ac_Lib
9373	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9374$as_echo "$ac_res" >&6; }
9375if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9376  apu_has_ldapssl_init="1"
9377fi
9378
9379        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9381$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9382if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9383  $as_echo_n "(cached) " >&6
9384else
9385  ac_check_lib_save_LIBS=$LIBS
9386LIBS="-l${ldaplib} ${extralib} $LIBS"
9387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9388/* end confdefs.h.  */
9389
9390/* Override any GCC internal prototype to avoid an error.
9391   Use char because int might match the return type of a GCC
9392   builtin and then its argument prototype would still apply.  */
9393#ifdef __cplusplus
9394extern "C"
9395#endif
9396char ldapssl_install_routines ();
9397int
9398main ()
9399{
9400return ldapssl_install_routines ();
9401  ;
9402  return 0;
9403}
9404_ACEOF
9405if ac_fn_c_try_link "$LINENO"; then :
9406  eval "$as_ac_Lib=yes"
9407else
9408  eval "$as_ac_Lib=no"
9409fi
9410rm -f core conftest.err conftest.$ac_objext \
9411    conftest$ac_exeext conftest.$ac_ext
9412LIBS=$ac_check_lib_save_LIBS
9413fi
9414eval ac_res=\$$as_ac_Lib
9415	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9416$as_echo "$ac_res" >&6; }
9417if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9418  apu_has_ldapssl_install_routines="1"
9419fi
9420
9421        apu_has_ldap="1";
9422
9423fi
9424
9425  fi
9426
9427
9428  if test ${apu_has_ldap} != "1"; then
9429    ldaplib="ldap"
9430    extralib="-ldl -lpthread"
9431    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9432
9433    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9434
9435    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9436    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9437    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9439$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9440if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9441  $as_echo_n "(cached) " >&6
9442else
9443  ac_check_lib_save_LIBS=$LIBS
9444LIBS="-l${ldaplib} ${extralib} $LIBS"
9445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9446/* end confdefs.h.  */
9447
9448/* Override any GCC internal prototype to avoid an error.
9449   Use char because int might match the return type of a GCC
9450   builtin and then its argument prototype would still apply.  */
9451#ifdef __cplusplus
9452extern "C"
9453#endif
9454char ldap_init ();
9455int
9456main ()
9457{
9458return ldap_init ();
9459  ;
9460  return 0;
9461}
9462_ACEOF
9463if ac_fn_c_try_link "$LINENO"; then :
9464  eval "$as_ac_Lib=yes"
9465else
9466  eval "$as_ac_Lib=no"
9467fi
9468rm -f core conftest.err conftest.$ac_objext \
9469    conftest$ac_exeext conftest.$ac_ext
9470LIBS=$ac_check_lib_save_LIBS
9471fi
9472eval ac_res=\$$as_ac_Lib
9473	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9474$as_echo "$ac_res" >&6; }
9475if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9476
9477        LDADD_ldap_found="-l${ldaplib} ${extralib}"
9478        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9480$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9481if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9482  $as_echo_n "(cached) " >&6
9483else
9484  ac_check_lib_save_LIBS=$LIBS
9485LIBS="-l${ldaplib} ${extralib} $LIBS"
9486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9487/* end confdefs.h.  */
9488
9489/* Override any GCC internal prototype to avoid an error.
9490   Use char because int might match the return type of a GCC
9491   builtin and then its argument prototype would still apply.  */
9492#ifdef __cplusplus
9493extern "C"
9494#endif
9495char ldapssl_client_init ();
9496int
9497main ()
9498{
9499return ldapssl_client_init ();
9500  ;
9501  return 0;
9502}
9503_ACEOF
9504if ac_fn_c_try_link "$LINENO"; then :
9505  eval "$as_ac_Lib=yes"
9506else
9507  eval "$as_ac_Lib=no"
9508fi
9509rm -f core conftest.err conftest.$ac_objext \
9510    conftest$ac_exeext conftest.$ac_ext
9511LIBS=$ac_check_lib_save_LIBS
9512fi
9513eval ac_res=\$$as_ac_Lib
9514	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9515$as_echo "$ac_res" >&6; }
9516if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9517  apu_has_ldapssl_client_init="1"
9518fi
9519
9520        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9522$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9523if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9524  $as_echo_n "(cached) " >&6
9525else
9526  ac_check_lib_save_LIBS=$LIBS
9527LIBS="-l${ldaplib} ${extralib} $LIBS"
9528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529/* end confdefs.h.  */
9530
9531/* Override any GCC internal prototype to avoid an error.
9532   Use char because int might match the return type of a GCC
9533   builtin and then its argument prototype would still apply.  */
9534#ifdef __cplusplus
9535extern "C"
9536#endif
9537char ldapssl_client_deinit ();
9538int
9539main ()
9540{
9541return ldapssl_client_deinit ();
9542  ;
9543  return 0;
9544}
9545_ACEOF
9546if ac_fn_c_try_link "$LINENO"; then :
9547  eval "$as_ac_Lib=yes"
9548else
9549  eval "$as_ac_Lib=no"
9550fi
9551rm -f core conftest.err conftest.$ac_objext \
9552    conftest$ac_exeext conftest.$ac_ext
9553LIBS=$ac_check_lib_save_LIBS
9554fi
9555eval ac_res=\$$as_ac_Lib
9556	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9557$as_echo "$ac_res" >&6; }
9558if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9559  apu_has_ldapssl_client_deinit="1"
9560fi
9561
9562        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9564$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9565if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  ac_check_lib_save_LIBS=$LIBS
9569LIBS="-l${ldaplib} ${extralib} $LIBS"
9570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9571/* end confdefs.h.  */
9572
9573/* Override any GCC internal prototype to avoid an error.
9574   Use char because int might match the return type of a GCC
9575   builtin and then its argument prototype would still apply.  */
9576#ifdef __cplusplus
9577extern "C"
9578#endif
9579char ldapssl_add_trusted_cert ();
9580int
9581main ()
9582{
9583return ldapssl_add_trusted_cert ();
9584  ;
9585  return 0;
9586}
9587_ACEOF
9588if ac_fn_c_try_link "$LINENO"; then :
9589  eval "$as_ac_Lib=yes"
9590else
9591  eval "$as_ac_Lib=no"
9592fi
9593rm -f core conftest.err conftest.$ac_objext \
9594    conftest$ac_exeext conftest.$ac_ext
9595LIBS=$ac_check_lib_save_LIBS
9596fi
9597eval ac_res=\$$as_ac_Lib
9598	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9599$as_echo "$ac_res" >&6; }
9600if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9601  apu_has_ldapssl_add_trusted_cert="1"
9602fi
9603
9604        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9606$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9607if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9608  $as_echo_n "(cached) " >&6
9609else
9610  ac_check_lib_save_LIBS=$LIBS
9611LIBS="-l${ldaplib} ${extralib} $LIBS"
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9613/* end confdefs.h.  */
9614
9615/* Override any GCC internal prototype to avoid an error.
9616   Use char because int might match the return type of a GCC
9617   builtin and then its argument prototype would still apply.  */
9618#ifdef __cplusplus
9619extern "C"
9620#endif
9621char ldap_start_tls_s ();
9622int
9623main ()
9624{
9625return ldap_start_tls_s ();
9626  ;
9627  return 0;
9628}
9629_ACEOF
9630if ac_fn_c_try_link "$LINENO"; then :
9631  eval "$as_ac_Lib=yes"
9632else
9633  eval "$as_ac_Lib=no"
9634fi
9635rm -f core conftest.err conftest.$ac_objext \
9636    conftest$ac_exeext conftest.$ac_ext
9637LIBS=$ac_check_lib_save_LIBS
9638fi
9639eval ac_res=\$$as_ac_Lib
9640	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9641$as_echo "$ac_res" >&6; }
9642if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9643  apu_has_ldap_start_tls_s="1"
9644fi
9645
9646        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
9648$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
9649if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9650  $as_echo_n "(cached) " >&6
9651else
9652  ac_check_lib_save_LIBS=$LIBS
9653LIBS="-l${ldaplib} ${extralib} $LIBS"
9654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9655/* end confdefs.h.  */
9656
9657/* Override any GCC internal prototype to avoid an error.
9658   Use char because int might match the return type of a GCC
9659   builtin and then its argument prototype would still apply.  */
9660#ifdef __cplusplus
9661extern "C"
9662#endif
9663char ldap_sslinit ();
9664int
9665main ()
9666{
9667return ldap_sslinit ();
9668  ;
9669  return 0;
9670}
9671_ACEOF
9672if ac_fn_c_try_link "$LINENO"; then :
9673  eval "$as_ac_Lib=yes"
9674else
9675  eval "$as_ac_Lib=no"
9676fi
9677rm -f core conftest.err conftest.$ac_objext \
9678    conftest$ac_exeext conftest.$ac_ext
9679LIBS=$ac_check_lib_save_LIBS
9680fi
9681eval ac_res=\$$as_ac_Lib
9682	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9683$as_echo "$ac_res" >&6; }
9684if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9685  apu_has_ldap_sslinit="1"
9686fi
9687
9688        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
9689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
9690$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
9691if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9692  $as_echo_n "(cached) " >&6
9693else
9694  ac_check_lib_save_LIBS=$LIBS
9695LIBS="-l${ldaplib} ${extralib} $LIBS"
9696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9697/* end confdefs.h.  */
9698
9699/* Override any GCC internal prototype to avoid an error.
9700   Use char because int might match the return type of a GCC
9701   builtin and then its argument prototype would still apply.  */
9702#ifdef __cplusplus
9703extern "C"
9704#endif
9705char ldapssl_init ();
9706int
9707main ()
9708{
9709return ldapssl_init ();
9710  ;
9711  return 0;
9712}
9713_ACEOF
9714if ac_fn_c_try_link "$LINENO"; then :
9715  eval "$as_ac_Lib=yes"
9716else
9717  eval "$as_ac_Lib=no"
9718fi
9719rm -f core conftest.err conftest.$ac_objext \
9720    conftest$ac_exeext conftest.$ac_ext
9721LIBS=$ac_check_lib_save_LIBS
9722fi
9723eval ac_res=\$$as_ac_Lib
9724	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9725$as_echo "$ac_res" >&6; }
9726if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9727  apu_has_ldapssl_init="1"
9728fi
9729
9730        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
9732$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
9733if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9734  $as_echo_n "(cached) " >&6
9735else
9736  ac_check_lib_save_LIBS=$LIBS
9737LIBS="-l${ldaplib} ${extralib} $LIBS"
9738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9739/* end confdefs.h.  */
9740
9741/* Override any GCC internal prototype to avoid an error.
9742   Use char because int might match the return type of a GCC
9743   builtin and then its argument prototype would still apply.  */
9744#ifdef __cplusplus
9745extern "C"
9746#endif
9747char ldapssl_install_routines ();
9748int
9749main ()
9750{
9751return ldapssl_install_routines ();
9752  ;
9753  return 0;
9754}
9755_ACEOF
9756if ac_fn_c_try_link "$LINENO"; then :
9757  eval "$as_ac_Lib=yes"
9758else
9759  eval "$as_ac_Lib=no"
9760fi
9761rm -f core conftest.err conftest.$ac_objext \
9762    conftest$ac_exeext conftest.$ac_ext
9763LIBS=$ac_check_lib_save_LIBS
9764fi
9765eval ac_res=\$$as_ac_Lib
9766	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9767$as_echo "$ac_res" >&6; }
9768if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9769  apu_has_ldapssl_install_routines="1"
9770fi
9771
9772        apu_has_ldap="1";
9773
9774fi
9775
9776  fi
9777
9778      else
9779
9780  if test ${apu_has_ldap} != "1"; then
9781    ldaplib=$LIBLDAP
9782    extralib=
9783    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
9784
9785    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
9786
9787    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
9788    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
9789    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
9791$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
9792if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9793  $as_echo_n "(cached) " >&6
9794else
9795  ac_check_lib_save_LIBS=$LIBS
9796LIBS="-l${ldaplib} ${extralib} $LIBS"
9797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9798/* end confdefs.h.  */
9799
9800/* Override any GCC internal prototype to avoid an error.
9801   Use char because int might match the return type of a GCC
9802   builtin and then its argument prototype would still apply.  */
9803#ifdef __cplusplus
9804extern "C"
9805#endif
9806char ldap_init ();
9807int
9808main ()
9809{
9810return ldap_init ();
9811  ;
9812  return 0;
9813}
9814_ACEOF
9815if ac_fn_c_try_link "$LINENO"; then :
9816  eval "$as_ac_Lib=yes"
9817else
9818  eval "$as_ac_Lib=no"
9819fi
9820rm -f core conftest.err conftest.$ac_objext \
9821    conftest$ac_exeext conftest.$ac_ext
9822LIBS=$ac_check_lib_save_LIBS
9823fi
9824eval ac_res=\$$as_ac_Lib
9825	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9826$as_echo "$ac_res" >&6; }
9827if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9828
9829        LDADD_ldap_found="-l${ldaplib} ${extralib}"
9830        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
9832$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
9833if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9834  $as_echo_n "(cached) " >&6
9835else
9836  ac_check_lib_save_LIBS=$LIBS
9837LIBS="-l${ldaplib} ${extralib} $LIBS"
9838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9839/* end confdefs.h.  */
9840
9841/* Override any GCC internal prototype to avoid an error.
9842   Use char because int might match the return type of a GCC
9843   builtin and then its argument prototype would still apply.  */
9844#ifdef __cplusplus
9845extern "C"
9846#endif
9847char ldapssl_client_init ();
9848int
9849main ()
9850{
9851return ldapssl_client_init ();
9852  ;
9853  return 0;
9854}
9855_ACEOF
9856if ac_fn_c_try_link "$LINENO"; then :
9857  eval "$as_ac_Lib=yes"
9858else
9859  eval "$as_ac_Lib=no"
9860fi
9861rm -f core conftest.err conftest.$ac_objext \
9862    conftest$ac_exeext conftest.$ac_ext
9863LIBS=$ac_check_lib_save_LIBS
9864fi
9865eval ac_res=\$$as_ac_Lib
9866	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9867$as_echo "$ac_res" >&6; }
9868if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9869  apu_has_ldapssl_client_init="1"
9870fi
9871
9872        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
9873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
9874$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
9875if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9876  $as_echo_n "(cached) " >&6
9877else
9878  ac_check_lib_save_LIBS=$LIBS
9879LIBS="-l${ldaplib} ${extralib} $LIBS"
9880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9881/* end confdefs.h.  */
9882
9883/* Override any GCC internal prototype to avoid an error.
9884   Use char because int might match the return type of a GCC
9885   builtin and then its argument prototype would still apply.  */
9886#ifdef __cplusplus
9887extern "C"
9888#endif
9889char ldapssl_client_deinit ();
9890int
9891main ()
9892{
9893return ldapssl_client_deinit ();
9894  ;
9895  return 0;
9896}
9897_ACEOF
9898if ac_fn_c_try_link "$LINENO"; then :
9899  eval "$as_ac_Lib=yes"
9900else
9901  eval "$as_ac_Lib=no"
9902fi
9903rm -f core conftest.err conftest.$ac_objext \
9904    conftest$ac_exeext conftest.$ac_ext
9905LIBS=$ac_check_lib_save_LIBS
9906fi
9907eval ac_res=\$$as_ac_Lib
9908	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9909$as_echo "$ac_res" >&6; }
9910if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9911  apu_has_ldapssl_client_deinit="1"
9912fi
9913
9914        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
9916$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
9917if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9918  $as_echo_n "(cached) " >&6
9919else
9920  ac_check_lib_save_LIBS=$LIBS
9921LIBS="-l${ldaplib} ${extralib} $LIBS"
9922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9923/* end confdefs.h.  */
9924
9925/* Override any GCC internal prototype to avoid an error.
9926   Use char because int might match the return type of a GCC
9927   builtin and then its argument prototype would still apply.  */
9928#ifdef __cplusplus
9929extern "C"
9930#endif
9931char ldapssl_add_trusted_cert ();
9932int
9933main ()
9934{
9935return ldapssl_add_trusted_cert ();
9936  ;
9937  return 0;
9938}
9939_ACEOF
9940if ac_fn_c_try_link "$LINENO"; then :
9941  eval "$as_ac_Lib=yes"
9942else
9943  eval "$as_ac_Lib=no"
9944fi
9945rm -f core conftest.err conftest.$ac_objext \
9946    conftest$ac_exeext conftest.$ac_ext
9947LIBS=$ac_check_lib_save_LIBS
9948fi
9949eval ac_res=\$$as_ac_Lib
9950	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9951$as_echo "$ac_res" >&6; }
9952if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9953  apu_has_ldapssl_add_trusted_cert="1"
9954fi
9955
9956        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
9957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
9958$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
9959if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
9960  $as_echo_n "(cached) " >&6
9961else
9962  ac_check_lib_save_LIBS=$LIBS
9963LIBS="-l${ldaplib} ${extralib} $LIBS"
9964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9965/* end confdefs.h.  */
9966
9967/* Override any GCC internal prototype to avoid an error.
9968   Use char because int might match the return type of a GCC
9969   builtin and then its argument prototype would still apply.  */
9970#ifdef __cplusplus
9971extern "C"
9972#endif
9973char ldap_start_tls_s ();
9974int
9975main ()
9976{
9977return ldap_start_tls_s ();
9978  ;
9979  return 0;
9980}
9981_ACEOF
9982if ac_fn_c_try_link "$LINENO"; then :
9983  eval "$as_ac_Lib=yes"
9984else
9985  eval "$as_ac_Lib=no"
9986fi
9987rm -f core conftest.err conftest.$ac_objext \
9988    conftest$ac_exeext conftest.$ac_ext
9989LIBS=$ac_check_lib_save_LIBS
9990fi
9991eval ac_res=\$$as_ac_Lib
9992	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9993$as_echo "$ac_res" >&6; }
9994if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9995  apu_has_ldap_start_tls_s="1"
9996fi
9997
9998        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10000$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10001if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10002  $as_echo_n "(cached) " >&6
10003else
10004  ac_check_lib_save_LIBS=$LIBS
10005LIBS="-l${ldaplib} ${extralib} $LIBS"
10006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10007/* end confdefs.h.  */
10008
10009/* Override any GCC internal prototype to avoid an error.
10010   Use char because int might match the return type of a GCC
10011   builtin and then its argument prototype would still apply.  */
10012#ifdef __cplusplus
10013extern "C"
10014#endif
10015char ldap_sslinit ();
10016int
10017main ()
10018{
10019return ldap_sslinit ();
10020  ;
10021  return 0;
10022}
10023_ACEOF
10024if ac_fn_c_try_link "$LINENO"; then :
10025  eval "$as_ac_Lib=yes"
10026else
10027  eval "$as_ac_Lib=no"
10028fi
10029rm -f core conftest.err conftest.$ac_objext \
10030    conftest$ac_exeext conftest.$ac_ext
10031LIBS=$ac_check_lib_save_LIBS
10032fi
10033eval ac_res=\$$as_ac_Lib
10034	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10035$as_echo "$ac_res" >&6; }
10036if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10037  apu_has_ldap_sslinit="1"
10038fi
10039
10040        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10042$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10043if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  ac_check_lib_save_LIBS=$LIBS
10047LIBS="-l${ldaplib} ${extralib} $LIBS"
10048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10049/* end confdefs.h.  */
10050
10051/* Override any GCC internal prototype to avoid an error.
10052   Use char because int might match the return type of a GCC
10053   builtin and then its argument prototype would still apply.  */
10054#ifdef __cplusplus
10055extern "C"
10056#endif
10057char ldapssl_init ();
10058int
10059main ()
10060{
10061return ldapssl_init ();
10062  ;
10063  return 0;
10064}
10065_ACEOF
10066if ac_fn_c_try_link "$LINENO"; then :
10067  eval "$as_ac_Lib=yes"
10068else
10069  eval "$as_ac_Lib=no"
10070fi
10071rm -f core conftest.err conftest.$ac_objext \
10072    conftest$ac_exeext conftest.$ac_ext
10073LIBS=$ac_check_lib_save_LIBS
10074fi
10075eval ac_res=\$$as_ac_Lib
10076	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10077$as_echo "$ac_res" >&6; }
10078if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10079  apu_has_ldapssl_init="1"
10080fi
10081
10082        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10084$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10085if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  ac_check_lib_save_LIBS=$LIBS
10089LIBS="-l${ldaplib} ${extralib} $LIBS"
10090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091/* end confdefs.h.  */
10092
10093/* Override any GCC internal prototype to avoid an error.
10094   Use char because int might match the return type of a GCC
10095   builtin and then its argument prototype would still apply.  */
10096#ifdef __cplusplus
10097extern "C"
10098#endif
10099char ldapssl_install_routines ();
10100int
10101main ()
10102{
10103return ldapssl_install_routines ();
10104  ;
10105  return 0;
10106}
10107_ACEOF
10108if ac_fn_c_try_link "$LINENO"; then :
10109  eval "$as_ac_Lib=yes"
10110else
10111  eval "$as_ac_Lib=no"
10112fi
10113rm -f core conftest.err conftest.$ac_objext \
10114    conftest$ac_exeext conftest.$ac_ext
10115LIBS=$ac_check_lib_save_LIBS
10116fi
10117eval ac_res=\$$as_ac_Lib
10118	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10119$as_echo "$ac_res" >&6; }
10120if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10121  apu_has_ldapssl_install_routines="1"
10122fi
10123
10124        apu_has_ldap="1";
10125
10126fi
10127
10128  fi
10129
10130
10131  if test ${apu_has_ldap} != "1"; then
10132    ldaplib=$LIBLDAP
10133    extralib="-lresolv"
10134    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10135
10136    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10137
10138    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10139    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10140    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10142$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10143if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10144  $as_echo_n "(cached) " >&6
10145else
10146  ac_check_lib_save_LIBS=$LIBS
10147LIBS="-l${ldaplib} ${extralib} $LIBS"
10148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10149/* end confdefs.h.  */
10150
10151/* Override any GCC internal prototype to avoid an error.
10152   Use char because int might match the return type of a GCC
10153   builtin and then its argument prototype would still apply.  */
10154#ifdef __cplusplus
10155extern "C"
10156#endif
10157char ldap_init ();
10158int
10159main ()
10160{
10161return ldap_init ();
10162  ;
10163  return 0;
10164}
10165_ACEOF
10166if ac_fn_c_try_link "$LINENO"; then :
10167  eval "$as_ac_Lib=yes"
10168else
10169  eval "$as_ac_Lib=no"
10170fi
10171rm -f core conftest.err conftest.$ac_objext \
10172    conftest$ac_exeext conftest.$ac_ext
10173LIBS=$ac_check_lib_save_LIBS
10174fi
10175eval ac_res=\$$as_ac_Lib
10176	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10177$as_echo "$ac_res" >&6; }
10178if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10179
10180        LDADD_ldap_found="-l${ldaplib} ${extralib}"
10181        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10183$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10184if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  ac_check_lib_save_LIBS=$LIBS
10188LIBS="-l${ldaplib} ${extralib} $LIBS"
10189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190/* end confdefs.h.  */
10191
10192/* Override any GCC internal prototype to avoid an error.
10193   Use char because int might match the return type of a GCC
10194   builtin and then its argument prototype would still apply.  */
10195#ifdef __cplusplus
10196extern "C"
10197#endif
10198char ldapssl_client_init ();
10199int
10200main ()
10201{
10202return ldapssl_client_init ();
10203  ;
10204  return 0;
10205}
10206_ACEOF
10207if ac_fn_c_try_link "$LINENO"; then :
10208  eval "$as_ac_Lib=yes"
10209else
10210  eval "$as_ac_Lib=no"
10211fi
10212rm -f core conftest.err conftest.$ac_objext \
10213    conftest$ac_exeext conftest.$ac_ext
10214LIBS=$ac_check_lib_save_LIBS
10215fi
10216eval ac_res=\$$as_ac_Lib
10217	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10218$as_echo "$ac_res" >&6; }
10219if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10220  apu_has_ldapssl_client_init="1"
10221fi
10222
10223        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10225$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10226if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10227  $as_echo_n "(cached) " >&6
10228else
10229  ac_check_lib_save_LIBS=$LIBS
10230LIBS="-l${ldaplib} ${extralib} $LIBS"
10231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10232/* end confdefs.h.  */
10233
10234/* Override any GCC internal prototype to avoid an error.
10235   Use char because int might match the return type of a GCC
10236   builtin and then its argument prototype would still apply.  */
10237#ifdef __cplusplus
10238extern "C"
10239#endif
10240char ldapssl_client_deinit ();
10241int
10242main ()
10243{
10244return ldapssl_client_deinit ();
10245  ;
10246  return 0;
10247}
10248_ACEOF
10249if ac_fn_c_try_link "$LINENO"; then :
10250  eval "$as_ac_Lib=yes"
10251else
10252  eval "$as_ac_Lib=no"
10253fi
10254rm -f core conftest.err conftest.$ac_objext \
10255    conftest$ac_exeext conftest.$ac_ext
10256LIBS=$ac_check_lib_save_LIBS
10257fi
10258eval ac_res=\$$as_ac_Lib
10259	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10260$as_echo "$ac_res" >&6; }
10261if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10262  apu_has_ldapssl_client_deinit="1"
10263fi
10264
10265        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10267$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10268if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10269  $as_echo_n "(cached) " >&6
10270else
10271  ac_check_lib_save_LIBS=$LIBS
10272LIBS="-l${ldaplib} ${extralib} $LIBS"
10273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10274/* end confdefs.h.  */
10275
10276/* Override any GCC internal prototype to avoid an error.
10277   Use char because int might match the return type of a GCC
10278   builtin and then its argument prototype would still apply.  */
10279#ifdef __cplusplus
10280extern "C"
10281#endif
10282char ldapssl_add_trusted_cert ();
10283int
10284main ()
10285{
10286return ldapssl_add_trusted_cert ();
10287  ;
10288  return 0;
10289}
10290_ACEOF
10291if ac_fn_c_try_link "$LINENO"; then :
10292  eval "$as_ac_Lib=yes"
10293else
10294  eval "$as_ac_Lib=no"
10295fi
10296rm -f core conftest.err conftest.$ac_objext \
10297    conftest$ac_exeext conftest.$ac_ext
10298LIBS=$ac_check_lib_save_LIBS
10299fi
10300eval ac_res=\$$as_ac_Lib
10301	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10302$as_echo "$ac_res" >&6; }
10303if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10304  apu_has_ldapssl_add_trusted_cert="1"
10305fi
10306
10307        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10309$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10310if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10311  $as_echo_n "(cached) " >&6
10312else
10313  ac_check_lib_save_LIBS=$LIBS
10314LIBS="-l${ldaplib} ${extralib} $LIBS"
10315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10316/* end confdefs.h.  */
10317
10318/* Override any GCC internal prototype to avoid an error.
10319   Use char because int might match the return type of a GCC
10320   builtin and then its argument prototype would still apply.  */
10321#ifdef __cplusplus
10322extern "C"
10323#endif
10324char ldap_start_tls_s ();
10325int
10326main ()
10327{
10328return ldap_start_tls_s ();
10329  ;
10330  return 0;
10331}
10332_ACEOF
10333if ac_fn_c_try_link "$LINENO"; then :
10334  eval "$as_ac_Lib=yes"
10335else
10336  eval "$as_ac_Lib=no"
10337fi
10338rm -f core conftest.err conftest.$ac_objext \
10339    conftest$ac_exeext conftest.$ac_ext
10340LIBS=$ac_check_lib_save_LIBS
10341fi
10342eval ac_res=\$$as_ac_Lib
10343	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10344$as_echo "$ac_res" >&6; }
10345if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10346  apu_has_ldap_start_tls_s="1"
10347fi
10348
10349        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10351$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10352if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10353  $as_echo_n "(cached) " >&6
10354else
10355  ac_check_lib_save_LIBS=$LIBS
10356LIBS="-l${ldaplib} ${extralib} $LIBS"
10357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10358/* end confdefs.h.  */
10359
10360/* Override any GCC internal prototype to avoid an error.
10361   Use char because int might match the return type of a GCC
10362   builtin and then its argument prototype would still apply.  */
10363#ifdef __cplusplus
10364extern "C"
10365#endif
10366char ldap_sslinit ();
10367int
10368main ()
10369{
10370return ldap_sslinit ();
10371  ;
10372  return 0;
10373}
10374_ACEOF
10375if ac_fn_c_try_link "$LINENO"; then :
10376  eval "$as_ac_Lib=yes"
10377else
10378  eval "$as_ac_Lib=no"
10379fi
10380rm -f core conftest.err conftest.$ac_objext \
10381    conftest$ac_exeext conftest.$ac_ext
10382LIBS=$ac_check_lib_save_LIBS
10383fi
10384eval ac_res=\$$as_ac_Lib
10385	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10386$as_echo "$ac_res" >&6; }
10387if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10388  apu_has_ldap_sslinit="1"
10389fi
10390
10391        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10393$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10394if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  ac_check_lib_save_LIBS=$LIBS
10398LIBS="-l${ldaplib} ${extralib} $LIBS"
10399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10400/* end confdefs.h.  */
10401
10402/* Override any GCC internal prototype to avoid an error.
10403   Use char because int might match the return type of a GCC
10404   builtin and then its argument prototype would still apply.  */
10405#ifdef __cplusplus
10406extern "C"
10407#endif
10408char ldapssl_init ();
10409int
10410main ()
10411{
10412return ldapssl_init ();
10413  ;
10414  return 0;
10415}
10416_ACEOF
10417if ac_fn_c_try_link "$LINENO"; then :
10418  eval "$as_ac_Lib=yes"
10419else
10420  eval "$as_ac_Lib=no"
10421fi
10422rm -f core conftest.err conftest.$ac_objext \
10423    conftest$ac_exeext conftest.$ac_ext
10424LIBS=$ac_check_lib_save_LIBS
10425fi
10426eval ac_res=\$$as_ac_Lib
10427	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10428$as_echo "$ac_res" >&6; }
10429if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10430  apu_has_ldapssl_init="1"
10431fi
10432
10433        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10435$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10436if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10437  $as_echo_n "(cached) " >&6
10438else
10439  ac_check_lib_save_LIBS=$LIBS
10440LIBS="-l${ldaplib} ${extralib} $LIBS"
10441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10442/* end confdefs.h.  */
10443
10444/* Override any GCC internal prototype to avoid an error.
10445   Use char because int might match the return type of a GCC
10446   builtin and then its argument prototype would still apply.  */
10447#ifdef __cplusplus
10448extern "C"
10449#endif
10450char ldapssl_install_routines ();
10451int
10452main ()
10453{
10454return ldapssl_install_routines ();
10455  ;
10456  return 0;
10457}
10458_ACEOF
10459if ac_fn_c_try_link "$LINENO"; then :
10460  eval "$as_ac_Lib=yes"
10461else
10462  eval "$as_ac_Lib=no"
10463fi
10464rm -f core conftest.err conftest.$ac_objext \
10465    conftest$ac_exeext conftest.$ac_ext
10466LIBS=$ac_check_lib_save_LIBS
10467fi
10468eval ac_res=\$$as_ac_Lib
10469	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10470$as_echo "$ac_res" >&6; }
10471if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10472  apu_has_ldapssl_install_routines="1"
10473fi
10474
10475        apu_has_ldap="1";
10476
10477fi
10478
10479  fi
10480
10481
10482  if test ${apu_has_ldap} != "1"; then
10483    ldaplib=$LIBLDAP
10484    extralib="-lresolv -lsocket -lnsl"
10485    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10486
10487    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10488
10489    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10490    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10491    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10493$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10494if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10495  $as_echo_n "(cached) " >&6
10496else
10497  ac_check_lib_save_LIBS=$LIBS
10498LIBS="-l${ldaplib} ${extralib} $LIBS"
10499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500/* end confdefs.h.  */
10501
10502/* Override any GCC internal prototype to avoid an error.
10503   Use char because int might match the return type of a GCC
10504   builtin and then its argument prototype would still apply.  */
10505#ifdef __cplusplus
10506extern "C"
10507#endif
10508char ldap_init ();
10509int
10510main ()
10511{
10512return ldap_init ();
10513  ;
10514  return 0;
10515}
10516_ACEOF
10517if ac_fn_c_try_link "$LINENO"; then :
10518  eval "$as_ac_Lib=yes"
10519else
10520  eval "$as_ac_Lib=no"
10521fi
10522rm -f core conftest.err conftest.$ac_objext \
10523    conftest$ac_exeext conftest.$ac_ext
10524LIBS=$ac_check_lib_save_LIBS
10525fi
10526eval ac_res=\$$as_ac_Lib
10527	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10528$as_echo "$ac_res" >&6; }
10529if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10530
10531        LDADD_ldap_found="-l${ldaplib} ${extralib}"
10532        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10534$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10535if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10536  $as_echo_n "(cached) " >&6
10537else
10538  ac_check_lib_save_LIBS=$LIBS
10539LIBS="-l${ldaplib} ${extralib} $LIBS"
10540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10541/* end confdefs.h.  */
10542
10543/* Override any GCC internal prototype to avoid an error.
10544   Use char because int might match the return type of a GCC
10545   builtin and then its argument prototype would still apply.  */
10546#ifdef __cplusplus
10547extern "C"
10548#endif
10549char ldapssl_client_init ();
10550int
10551main ()
10552{
10553return ldapssl_client_init ();
10554  ;
10555  return 0;
10556}
10557_ACEOF
10558if ac_fn_c_try_link "$LINENO"; then :
10559  eval "$as_ac_Lib=yes"
10560else
10561  eval "$as_ac_Lib=no"
10562fi
10563rm -f core conftest.err conftest.$ac_objext \
10564    conftest$ac_exeext conftest.$ac_ext
10565LIBS=$ac_check_lib_save_LIBS
10566fi
10567eval ac_res=\$$as_ac_Lib
10568	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10569$as_echo "$ac_res" >&6; }
10570if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10571  apu_has_ldapssl_client_init="1"
10572fi
10573
10574        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10576$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10577if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10578  $as_echo_n "(cached) " >&6
10579else
10580  ac_check_lib_save_LIBS=$LIBS
10581LIBS="-l${ldaplib} ${extralib} $LIBS"
10582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583/* end confdefs.h.  */
10584
10585/* Override any GCC internal prototype to avoid an error.
10586   Use char because int might match the return type of a GCC
10587   builtin and then its argument prototype would still apply.  */
10588#ifdef __cplusplus
10589extern "C"
10590#endif
10591char ldapssl_client_deinit ();
10592int
10593main ()
10594{
10595return ldapssl_client_deinit ();
10596  ;
10597  return 0;
10598}
10599_ACEOF
10600if ac_fn_c_try_link "$LINENO"; then :
10601  eval "$as_ac_Lib=yes"
10602else
10603  eval "$as_ac_Lib=no"
10604fi
10605rm -f core conftest.err conftest.$ac_objext \
10606    conftest$ac_exeext conftest.$ac_ext
10607LIBS=$ac_check_lib_save_LIBS
10608fi
10609eval ac_res=\$$as_ac_Lib
10610	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10611$as_echo "$ac_res" >&6; }
10612if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10613  apu_has_ldapssl_client_deinit="1"
10614fi
10615
10616        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10618$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10619if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10620  $as_echo_n "(cached) " >&6
10621else
10622  ac_check_lib_save_LIBS=$LIBS
10623LIBS="-l${ldaplib} ${extralib} $LIBS"
10624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625/* end confdefs.h.  */
10626
10627/* Override any GCC internal prototype to avoid an error.
10628   Use char because int might match the return type of a GCC
10629   builtin and then its argument prototype would still apply.  */
10630#ifdef __cplusplus
10631extern "C"
10632#endif
10633char ldapssl_add_trusted_cert ();
10634int
10635main ()
10636{
10637return ldapssl_add_trusted_cert ();
10638  ;
10639  return 0;
10640}
10641_ACEOF
10642if ac_fn_c_try_link "$LINENO"; then :
10643  eval "$as_ac_Lib=yes"
10644else
10645  eval "$as_ac_Lib=no"
10646fi
10647rm -f core conftest.err conftest.$ac_objext \
10648    conftest$ac_exeext conftest.$ac_ext
10649LIBS=$ac_check_lib_save_LIBS
10650fi
10651eval ac_res=\$$as_ac_Lib
10652	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10653$as_echo "$ac_res" >&6; }
10654if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10655  apu_has_ldapssl_add_trusted_cert="1"
10656fi
10657
10658        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
10660$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
10661if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10662  $as_echo_n "(cached) " >&6
10663else
10664  ac_check_lib_save_LIBS=$LIBS
10665LIBS="-l${ldaplib} ${extralib} $LIBS"
10666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10667/* end confdefs.h.  */
10668
10669/* Override any GCC internal prototype to avoid an error.
10670   Use char because int might match the return type of a GCC
10671   builtin and then its argument prototype would still apply.  */
10672#ifdef __cplusplus
10673extern "C"
10674#endif
10675char ldap_start_tls_s ();
10676int
10677main ()
10678{
10679return ldap_start_tls_s ();
10680  ;
10681  return 0;
10682}
10683_ACEOF
10684if ac_fn_c_try_link "$LINENO"; then :
10685  eval "$as_ac_Lib=yes"
10686else
10687  eval "$as_ac_Lib=no"
10688fi
10689rm -f core conftest.err conftest.$ac_objext \
10690    conftest$ac_exeext conftest.$ac_ext
10691LIBS=$ac_check_lib_save_LIBS
10692fi
10693eval ac_res=\$$as_ac_Lib
10694	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10695$as_echo "$ac_res" >&6; }
10696if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10697  apu_has_ldap_start_tls_s="1"
10698fi
10699
10700        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
10701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
10702$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
10703if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10704  $as_echo_n "(cached) " >&6
10705else
10706  ac_check_lib_save_LIBS=$LIBS
10707LIBS="-l${ldaplib} ${extralib} $LIBS"
10708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709/* end confdefs.h.  */
10710
10711/* Override any GCC internal prototype to avoid an error.
10712   Use char because int might match the return type of a GCC
10713   builtin and then its argument prototype would still apply.  */
10714#ifdef __cplusplus
10715extern "C"
10716#endif
10717char ldap_sslinit ();
10718int
10719main ()
10720{
10721return ldap_sslinit ();
10722  ;
10723  return 0;
10724}
10725_ACEOF
10726if ac_fn_c_try_link "$LINENO"; then :
10727  eval "$as_ac_Lib=yes"
10728else
10729  eval "$as_ac_Lib=no"
10730fi
10731rm -f core conftest.err conftest.$ac_objext \
10732    conftest$ac_exeext conftest.$ac_ext
10733LIBS=$ac_check_lib_save_LIBS
10734fi
10735eval ac_res=\$$as_ac_Lib
10736	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10737$as_echo "$ac_res" >&6; }
10738if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10739  apu_has_ldap_sslinit="1"
10740fi
10741
10742        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
10743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
10744$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
10745if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10746  $as_echo_n "(cached) " >&6
10747else
10748  ac_check_lib_save_LIBS=$LIBS
10749LIBS="-l${ldaplib} ${extralib} $LIBS"
10750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10751/* end confdefs.h.  */
10752
10753/* Override any GCC internal prototype to avoid an error.
10754   Use char because int might match the return type of a GCC
10755   builtin and then its argument prototype would still apply.  */
10756#ifdef __cplusplus
10757extern "C"
10758#endif
10759char ldapssl_init ();
10760int
10761main ()
10762{
10763return ldapssl_init ();
10764  ;
10765  return 0;
10766}
10767_ACEOF
10768if ac_fn_c_try_link "$LINENO"; then :
10769  eval "$as_ac_Lib=yes"
10770else
10771  eval "$as_ac_Lib=no"
10772fi
10773rm -f core conftest.err conftest.$ac_objext \
10774    conftest$ac_exeext conftest.$ac_ext
10775LIBS=$ac_check_lib_save_LIBS
10776fi
10777eval ac_res=\$$as_ac_Lib
10778	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10779$as_echo "$ac_res" >&6; }
10780if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10781  apu_has_ldapssl_init="1"
10782fi
10783
10784        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
10785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
10786$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
10787if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10788  $as_echo_n "(cached) " >&6
10789else
10790  ac_check_lib_save_LIBS=$LIBS
10791LIBS="-l${ldaplib} ${extralib} $LIBS"
10792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10793/* end confdefs.h.  */
10794
10795/* Override any GCC internal prototype to avoid an error.
10796   Use char because int might match the return type of a GCC
10797   builtin and then its argument prototype would still apply.  */
10798#ifdef __cplusplus
10799extern "C"
10800#endif
10801char ldapssl_install_routines ();
10802int
10803main ()
10804{
10805return ldapssl_install_routines ();
10806  ;
10807  return 0;
10808}
10809_ACEOF
10810if ac_fn_c_try_link "$LINENO"; then :
10811  eval "$as_ac_Lib=yes"
10812else
10813  eval "$as_ac_Lib=no"
10814fi
10815rm -f core conftest.err conftest.$ac_objext \
10816    conftest$ac_exeext conftest.$ac_ext
10817LIBS=$ac_check_lib_save_LIBS
10818fi
10819eval ac_res=\$$as_ac_Lib
10820	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10821$as_echo "$ac_res" >&6; }
10822if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10823  apu_has_ldapssl_install_routines="1"
10824fi
10825
10826        apu_has_ldap="1";
10827
10828fi
10829
10830  fi
10831
10832
10833  if test ${apu_has_ldap} != "1"; then
10834    ldaplib=$LIBLDAP
10835    extralib="-ldl -lpthread"
10836    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
10837
10838    ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
10839
10840    unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
10841    unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
10842    as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_init" | $as_tr_sh`
10843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l${ldaplib}" >&5
10844$as_echo_n "checking for ldap_init in -l${ldaplib}... " >&6; }
10845if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10846  $as_echo_n "(cached) " >&6
10847else
10848  ac_check_lib_save_LIBS=$LIBS
10849LIBS="-l${ldaplib} ${extralib} $LIBS"
10850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10851/* end confdefs.h.  */
10852
10853/* Override any GCC internal prototype to avoid an error.
10854   Use char because int might match the return type of a GCC
10855   builtin and then its argument prototype would still apply.  */
10856#ifdef __cplusplus
10857extern "C"
10858#endif
10859char ldap_init ();
10860int
10861main ()
10862{
10863return ldap_init ();
10864  ;
10865  return 0;
10866}
10867_ACEOF
10868if ac_fn_c_try_link "$LINENO"; then :
10869  eval "$as_ac_Lib=yes"
10870else
10871  eval "$as_ac_Lib=no"
10872fi
10873rm -f core conftest.err conftest.$ac_objext \
10874    conftest$ac_exeext conftest.$ac_ext
10875LIBS=$ac_check_lib_save_LIBS
10876fi
10877eval ac_res=\$$as_ac_Lib
10878	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10879$as_echo "$ac_res" >&6; }
10880if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10881
10882        LDADD_ldap_found="-l${ldaplib} ${extralib}"
10883        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_init" | $as_tr_sh`
10884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_init in -l${ldaplib}" >&5
10885$as_echo_n "checking for ldapssl_client_init in -l${ldaplib}... " >&6; }
10886if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10887  $as_echo_n "(cached) " >&6
10888else
10889  ac_check_lib_save_LIBS=$LIBS
10890LIBS="-l${ldaplib} ${extralib} $LIBS"
10891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10892/* end confdefs.h.  */
10893
10894/* Override any GCC internal prototype to avoid an error.
10895   Use char because int might match the return type of a GCC
10896   builtin and then its argument prototype would still apply.  */
10897#ifdef __cplusplus
10898extern "C"
10899#endif
10900char ldapssl_client_init ();
10901int
10902main ()
10903{
10904return ldapssl_client_init ();
10905  ;
10906  return 0;
10907}
10908_ACEOF
10909if ac_fn_c_try_link "$LINENO"; then :
10910  eval "$as_ac_Lib=yes"
10911else
10912  eval "$as_ac_Lib=no"
10913fi
10914rm -f core conftest.err conftest.$ac_objext \
10915    conftest$ac_exeext conftest.$ac_ext
10916LIBS=$ac_check_lib_save_LIBS
10917fi
10918eval ac_res=\$$as_ac_Lib
10919	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10920$as_echo "$ac_res" >&6; }
10921if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10922  apu_has_ldapssl_client_init="1"
10923fi
10924
10925        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_client_deinit" | $as_tr_sh`
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_client_deinit in -l${ldaplib}" >&5
10927$as_echo_n "checking for ldapssl_client_deinit in -l${ldaplib}... " >&6; }
10928if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10929  $as_echo_n "(cached) " >&6
10930else
10931  ac_check_lib_save_LIBS=$LIBS
10932LIBS="-l${ldaplib} ${extralib} $LIBS"
10933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934/* end confdefs.h.  */
10935
10936/* Override any GCC internal prototype to avoid an error.
10937   Use char because int might match the return type of a GCC
10938   builtin and then its argument prototype would still apply.  */
10939#ifdef __cplusplus
10940extern "C"
10941#endif
10942char ldapssl_client_deinit ();
10943int
10944main ()
10945{
10946return ldapssl_client_deinit ();
10947  ;
10948  return 0;
10949}
10950_ACEOF
10951if ac_fn_c_try_link "$LINENO"; then :
10952  eval "$as_ac_Lib=yes"
10953else
10954  eval "$as_ac_Lib=no"
10955fi
10956rm -f core conftest.err conftest.$ac_objext \
10957    conftest$ac_exeext conftest.$ac_ext
10958LIBS=$ac_check_lib_save_LIBS
10959fi
10960eval ac_res=\$$as_ac_Lib
10961	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10962$as_echo "$ac_res" >&6; }
10963if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10964  apu_has_ldapssl_client_deinit="1"
10965fi
10966
10967        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_add_trusted_cert" | $as_tr_sh`
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_add_trusted_cert in -l${ldaplib}" >&5
10969$as_echo_n "checking for ldapssl_add_trusted_cert in -l${ldaplib}... " >&6; }
10970if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
10971  $as_echo_n "(cached) " >&6
10972else
10973  ac_check_lib_save_LIBS=$LIBS
10974LIBS="-l${ldaplib} ${extralib} $LIBS"
10975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976/* end confdefs.h.  */
10977
10978/* Override any GCC internal prototype to avoid an error.
10979   Use char because int might match the return type of a GCC
10980   builtin and then its argument prototype would still apply.  */
10981#ifdef __cplusplus
10982extern "C"
10983#endif
10984char ldapssl_add_trusted_cert ();
10985int
10986main ()
10987{
10988return ldapssl_add_trusted_cert ();
10989  ;
10990  return 0;
10991}
10992_ACEOF
10993if ac_fn_c_try_link "$LINENO"; then :
10994  eval "$as_ac_Lib=yes"
10995else
10996  eval "$as_ac_Lib=no"
10997fi
10998rm -f core conftest.err conftest.$ac_objext \
10999    conftest$ac_exeext conftest.$ac_ext
11000LIBS=$ac_check_lib_save_LIBS
11001fi
11002eval ac_res=\$$as_ac_Lib
11003	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11004$as_echo "$ac_res" >&6; }
11005if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11006  apu_has_ldapssl_add_trusted_cert="1"
11007fi
11008
11009        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_start_tls_s" | $as_tr_sh`
11010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_start_tls_s in -l${ldaplib}" >&5
11011$as_echo_n "checking for ldap_start_tls_s in -l${ldaplib}... " >&6; }
11012if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
11013  $as_echo_n "(cached) " >&6
11014else
11015  ac_check_lib_save_LIBS=$LIBS
11016LIBS="-l${ldaplib} ${extralib} $LIBS"
11017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11018/* end confdefs.h.  */
11019
11020/* Override any GCC internal prototype to avoid an error.
11021   Use char because int might match the return type of a GCC
11022   builtin and then its argument prototype would still apply.  */
11023#ifdef __cplusplus
11024extern "C"
11025#endif
11026char ldap_start_tls_s ();
11027int
11028main ()
11029{
11030return ldap_start_tls_s ();
11031  ;
11032  return 0;
11033}
11034_ACEOF
11035if ac_fn_c_try_link "$LINENO"; then :
11036  eval "$as_ac_Lib=yes"
11037else
11038  eval "$as_ac_Lib=no"
11039fi
11040rm -f core conftest.err conftest.$ac_objext \
11041    conftest$ac_exeext conftest.$ac_ext
11042LIBS=$ac_check_lib_save_LIBS
11043fi
11044eval ac_res=\$$as_ac_Lib
11045	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11046$as_echo "$ac_res" >&6; }
11047if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11048  apu_has_ldap_start_tls_s="1"
11049fi
11050
11051        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldap_sslinit" | $as_tr_sh`
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_sslinit in -l${ldaplib}" >&5
11053$as_echo_n "checking for ldap_sslinit in -l${ldaplib}... " >&6; }
11054if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
11055  $as_echo_n "(cached) " >&6
11056else
11057  ac_check_lib_save_LIBS=$LIBS
11058LIBS="-l${ldaplib} ${extralib} $LIBS"
11059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11060/* end confdefs.h.  */
11061
11062/* Override any GCC internal prototype to avoid an error.
11063   Use char because int might match the return type of a GCC
11064   builtin and then its argument prototype would still apply.  */
11065#ifdef __cplusplus
11066extern "C"
11067#endif
11068char ldap_sslinit ();
11069int
11070main ()
11071{
11072return ldap_sslinit ();
11073  ;
11074  return 0;
11075}
11076_ACEOF
11077if ac_fn_c_try_link "$LINENO"; then :
11078  eval "$as_ac_Lib=yes"
11079else
11080  eval "$as_ac_Lib=no"
11081fi
11082rm -f core conftest.err conftest.$ac_objext \
11083    conftest$ac_exeext conftest.$ac_ext
11084LIBS=$ac_check_lib_save_LIBS
11085fi
11086eval ac_res=\$$as_ac_Lib
11087	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11088$as_echo "$ac_res" >&6; }
11089if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11090  apu_has_ldap_sslinit="1"
11091fi
11092
11093        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_init" | $as_tr_sh`
11094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_init in -l${ldaplib}" >&5
11095$as_echo_n "checking for ldapssl_init in -l${ldaplib}... " >&6; }
11096if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
11097  $as_echo_n "(cached) " >&6
11098else
11099  ac_check_lib_save_LIBS=$LIBS
11100LIBS="-l${ldaplib} ${extralib} $LIBS"
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11102/* end confdefs.h.  */
11103
11104/* Override any GCC internal prototype to avoid an error.
11105   Use char because int might match the return type of a GCC
11106   builtin and then its argument prototype would still apply.  */
11107#ifdef __cplusplus
11108extern "C"
11109#endif
11110char ldapssl_init ();
11111int
11112main ()
11113{
11114return ldapssl_init ();
11115  ;
11116  return 0;
11117}
11118_ACEOF
11119if ac_fn_c_try_link "$LINENO"; then :
11120  eval "$as_ac_Lib=yes"
11121else
11122  eval "$as_ac_Lib=no"
11123fi
11124rm -f core conftest.err conftest.$ac_objext \
11125    conftest$ac_exeext conftest.$ac_ext
11126LIBS=$ac_check_lib_save_LIBS
11127fi
11128eval ac_res=\$$as_ac_Lib
11129	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11130$as_echo "$ac_res" >&6; }
11131if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11132  apu_has_ldapssl_init="1"
11133fi
11134
11135        as_ac_Lib=`$as_echo "ac_cv_lib_${ldaplib}''_ldapssl_install_routines" | $as_tr_sh`
11136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl_install_routines in -l${ldaplib}" >&5
11137$as_echo_n "checking for ldapssl_install_routines in -l${ldaplib}... " >&6; }
11138if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
11139  $as_echo_n "(cached) " >&6
11140else
11141  ac_check_lib_save_LIBS=$LIBS
11142LIBS="-l${ldaplib} ${extralib} $LIBS"
11143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11144/* end confdefs.h.  */
11145
11146/* Override any GCC internal prototype to avoid an error.
11147   Use char because int might match the return type of a GCC
11148   builtin and then its argument prototype would still apply.  */
11149#ifdef __cplusplus
11150extern "C"
11151#endif
11152char ldapssl_install_routines ();
11153int
11154main ()
11155{
11156return ldapssl_install_routines ();
11157  ;
11158  return 0;
11159}
11160_ACEOF
11161if ac_fn_c_try_link "$LINENO"; then :
11162  eval "$as_ac_Lib=yes"
11163else
11164  eval "$as_ac_Lib=no"
11165fi
11166rm -f core conftest.err conftest.$ac_objext \
11167    conftest$ac_exeext conftest.$ac_ext
11168LIBS=$ac_check_lib_save_LIBS
11169fi
11170eval ac_res=\$$as_ac_Lib
11171	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11172$as_echo "$ac_res" >&6; }
11173if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11174  apu_has_ldapssl_install_routines="1"
11175fi
11176
11177        apu_has_ldap="1";
11178
11179fi
11180
11181  fi
11182
11183      fi
11184
11185      test ${apu_has_ldap} != "1" && as_fn_error $? "could not find an LDAP library" "$LINENO" 5
11186      test ${apu_has_ldap} == "1" &&
11187  if test "x$LDADD_ldap" = "x"; then
11188    test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"$LDADD_ldap_found\""
11189    LDADD_ldap="$LDADD_ldap_found"
11190  else
11191    apr_addto_bugger="$LDADD_ldap_found"
11192    for i in $apr_addto_bugger; do
11193      apr_addto_duplicate="0"
11194      for j in $LDADD_ldap; do
11195        if test "x$i" = "x$j"; then
11196          apr_addto_duplicate="1"
11197          break
11198        fi
11199      done
11200      if test $apr_addto_duplicate = "0"; then
11201        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_ldap"
11202        LDADD_ldap="$LDADD_ldap $i"
11203      fi
11204    done
11205  fi
11206
11207      as_ac_Lib=`$as_echo "ac_cv_lib_$apu_liblber_name''_ber_init" | $as_tr_sh`
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_init in -l$apu_liblber_name" >&5
11209$as_echo_n "checking for ber_init in -l$apu_liblber_name... " >&6; }
11210if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  ac_check_lib_save_LIBS=$LIBS
11214LIBS="-l$apu_liblber_name  $LIBS"
11215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11216/* end confdefs.h.  */
11217
11218/* Override any GCC internal prototype to avoid an error.
11219   Use char because int might match the return type of a GCC
11220   builtin and then its argument prototype would still apply.  */
11221#ifdef __cplusplus
11222extern "C"
11223#endif
11224char ber_init ();
11225int
11226main ()
11227{
11228return ber_init ();
11229  ;
11230  return 0;
11231}
11232_ACEOF
11233if ac_fn_c_try_link "$LINENO"; then :
11234  eval "$as_ac_Lib=yes"
11235else
11236  eval "$as_ac_Lib=no"
11237fi
11238rm -f core conftest.err conftest.$ac_objext \
11239    conftest$ac_exeext conftest.$ac_ext
11240LIBS=$ac_check_lib_save_LIBS
11241fi
11242eval ac_res=\$$as_ac_Lib
11243	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11244$as_echo "$ac_res" >&6; }
11245if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11246
11247  if test "x$LDADD_ldap" = "x"; then
11248    test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"-l${apu_liblber_name}\""
11249    LDADD_ldap="-l${apu_liblber_name}"
11250  else
11251    apr_addto_bugger="-l${apu_liblber_name}"
11252    for i in $apr_addto_bugger; do
11253      apr_addto_duplicate="0"
11254      for j in $LDADD_ldap; do
11255        if test "x$i" = "x$j"; then
11256          apr_addto_duplicate="1"
11257          break
11258        fi
11259      done
11260      if test $apr_addto_duplicate = "0"; then
11261        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_ldap"
11262        LDADD_ldap="$LDADD_ldap $i"
11263      fi
11264    done
11265  fi
11266
11267fi
11268
11269
11270      for ac_header in lber.h
11271do :
11272  ac_fn_c_check_header_mongrel "$LINENO" "lber.h" "ac_cv_header_lber_h" "$ac_includes_default"
11273if test "x$ac_cv_header_lber_h" = x""yes; then :
11274  cat >>confdefs.h <<_ACEOF
11275#define HAVE_LBER_H 1
11276_ACEOF
11277 lber_h="#include <lber.h>"
11278fi
11279
11280done
11281
11282
11283      # Solaris has a problem in <ldap.h> which prevents it from
11284      # being included by itself.  Check for <ldap.h> manually,
11285      # including lber.h first.
11286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
11287$as_echo_n "checking for ldap.h... " >&6; }
11288if test "${apr_cv_hdr_ldap_h+set}" = set; then :
11289  $as_echo_n "(cached) " >&6
11290else
11291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11292/* end confdefs.h.  */
11293#ifdef HAVE_LBER_H
11294      #include <lber.h>
11295      #endif
11296      #include <ldap.h>
11297
11298_ACEOF
11299if ac_fn_c_try_cpp "$LINENO"; then :
11300  apr_cv_hdr_ldap_h=yes
11301else
11302  apr_cv_hdr_ldap_h=no
11303fi
11304rm -f conftest.err conftest.i conftest.$ac_ext
11305fi
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_hdr_ldap_h" >&5
11307$as_echo "$apr_cv_hdr_ldap_h" >&6; }
11308      if test "$apr_cv_hdr_ldap_h" = "yes"; then
11309        ldap_h="#include <ldap.h>"
11310
11311$as_echo "#define HAVE_LDAP_H 1" >>confdefs.h
11312
11313      fi
11314
11315      for ac_header in ldap_ssl.h
11316do :
11317  ac_fn_c_check_header_mongrel "$LINENO" "ldap_ssl.h" "ac_cv_header_ldap_ssl_h" "$ac_includes_default"
11318if test "x$ac_cv_header_ldap_ssl_h" = x""yes; then :
11319  cat >>confdefs.h <<_ACEOF
11320#define HAVE_LDAP_SSL_H 1
11321_ACEOF
11322 ldap_ssl_h="#include <ldap_ssl.h>"
11323fi
11324
11325done
11326
11327
11328      if test "$apr_cv_hdr_ldap_h" = "yes"; then
11329        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP toolkit" >&5
11330$as_echo_n "checking for LDAP toolkit... " >&6; }
11331if test "${apr_cv_ldap_toolkit+set}" = set; then :
11332  $as_echo_n "(cached) " >&6
11333else
11334
11335          if test "x$apr_cv_ldap_toolkit" = "x"; then
11336            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337/* end confdefs.h.  */
11338$lber_h
11339                         $ldap_h
11340                         LDAP_VENDOR_NAME
11341_ACEOF
11342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11343  $EGREP "OpenLDAP" >/dev/null 2>&1; then :
11344  apu_has_ldap_openldap="1"
11345                                             apr_cv_ldap_toolkit="OpenLDAP"
11346fi
11347rm -f conftest*
11348
11349          fi
11350          if test "x$apr_cv_ldap_toolkit" = "x"; then
11351            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11352/* end confdefs.h.  */
11353$lber_h
11354                         $ldap_h
11355                         LDAP_VENDOR_NAME
11356_ACEOF
11357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11358  $EGREP "Sun Microsystems Inc." >/dev/null 2>&1; then :
11359  apu_has_ldap_solaris="1"
11360                                             apr_cv_ldap_toolkit="Solaris"
11361fi
11362rm -f conftest*
11363
11364          fi
11365          if test "x$apr_cv_ldap_toolkit" = "x"; then
11366            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367/* end confdefs.h.  */
11368$lber_h
11369                         $ldap_h
11370                         LDAP_VENDOR_NAME
11371_ACEOF
11372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11373  $EGREP "Novell" >/dev/null 2>&1; then :
11374  apu_has_ldap_novell="1"
11375                                             apr_cv_ldap_toolkit="Novell"
11376fi
11377rm -f conftest*
11378
11379          fi
11380          if test "x$apr_cv_ldap_toolkit" = "x"; then
11381            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11382/* end confdefs.h.  */
11383$lber_h
11384                         $ldap_h
11385                         LDAP_VENDOR_NAME
11386_ACEOF
11387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11388  $EGREP "Microsoft Corporation." >/dev/null 2>&1; then :
11389  apu_has_ldap_microsoft="1"
11390                                             apr_cv_ldap_toolkit="Microsoft"
11391fi
11392rm -f conftest*
11393
11394          fi
11395          if test "x$apr_cv_ldap_toolkit" = "x"; then
11396            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397/* end confdefs.h.  */
11398$lber_h
11399                         $ldap_h
11400                         LDAP_VENDOR_NAME
11401_ACEOF
11402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11403  $EGREP "Netscape Communications Corp." >/dev/null 2>&1; then :
11404  apu_has_ldap_netscape="1"
11405                                             apr_cv_ldap_toolkit="Netscape"
11406fi
11407rm -f conftest*
11408
11409          fi
11410          if test "x$apr_cv_ldap_toolkit" = "x"; then
11411            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412/* end confdefs.h.  */
11413$lber_h
11414                         $ldap_h
11415                         LDAP_VENDOR_NAME
11416_ACEOF
11417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11418  $EGREP "mozilla.org" >/dev/null 2>&1; then :
11419  apu_has_ldap_mozilla="1"
11420                                             apr_cv_ldap_toolkit="Mozilla"
11421fi
11422rm -f conftest*
11423
11424          fi
11425          if test "x$apr_cv_ldap_toolkit" = "x"; then
11426            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11427/* end confdefs.h.  */
11428$lber_h
11429                         $ldap_h
11430                         LDAP_VENDOR_NAME
11431_ACEOF
11432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11433  $EGREP "International Business Machines" >/dev/null 2>&1; then :
11434  apu_has_ldap_tivoli="1"
11435                                             apr_cv_ldap_toolkit="Tivoli"
11436fi
11437rm -f conftest*
11438
11439          fi
11440          if test "x$apr_cv_ldap_toolkit" = "x"; then
11441            case "$host" in
11442            *-ibm-os390)
11443              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11444/* end confdefs.h.  */
11445$lber_h
11446                                   $ldap_h
11447_ACEOF
11448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11449  $EGREP "IBM" >/dev/null 2>&1; then :
11450  apu_has_ldap_zos="1"
11451                                              apr_cv_ldap_toolkit="z/OS"
11452fi
11453rm -f conftest*
11454
11455              ;;
11456            esac
11457          fi
11458          if test "x$apr_cv_ldap_toolkit" = "x"; then
11459            apu_has_ldap_other="1"
11460            apr_cv_ldap_toolkit="unknown"
11461          fi
11462
11463fi
11464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_ldap_toolkit" >&5
11465$as_echo "$apr_cv_ldap_toolkit" >&6; }
11466      fi
11467
11468      CPPFLAGS=$save_cppflags
11469      LDFLAGS=$save_ldflags
11470      LIBS=$save_libs
11471    fi
11472
11473fi
11474
11475
11476if test "$apu_has_ldap_openldap" = "1"; then
11477    save_cppflags="$CPPFLAGS"
11478    save_ldflags="$LDFLAGS"
11479    save_libs="$LIBS"
11480
11481    CPPFLAGS="$CPPFLAGS $APRUTIL_INCLUDES"
11482    LDFLAGS="$LDFLAGS $APRUTIL_LDFLAGS"
11483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking style of ldap_set_rebind_proc routine" >&5
11484$as_echo_n "checking style of ldap_set_rebind_proc routine... " >&6; }
11485if test "${ac_cv_ldap_set_rebind_proc_style+set}" = set; then :
11486  $as_echo_n "(cached) " >&6
11487else
11488  apr_save_CFLAGS=$CFLAGS
11489 CFLAGS="$CFLAGS $CFLAGS_WARN"
11490 if test "$ac_cv_c_compiler_gnu" = "yes"; then
11491   CFLAGS="$CFLAGS -Werror"
11492 fi
11493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11494/* end confdefs.h.  */
11495#include "confdefs.h"
11496
11497
11498    #ifdef HAVE_LBER_H
11499    #include <lber.h>
11500    #endif
11501    #ifdef HAVE_LDAP_H
11502    #include <ldap.h>
11503    #endif
11504
11505   int main(int argc, const char *const *argv) {
11506
11507    ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
11508
11509      return 0; }
11510
11511_ACEOF
11512if ac_fn_c_try_compile "$LINENO"; then :
11513  ac_cv_ldap_set_rebind_proc_style=three
11514else
11515  ac_cv_ldap_set_rebind_proc_style=two
11516fi
11517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11518 CFLAGS=$apr_save_CFLAGS
11519
11520fi
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ldap_set_rebind_proc_style" >&5
11522$as_echo "$ac_cv_ldap_set_rebind_proc_style" >&6; }
11523
11524    if test "$ac_cv_ldap_set_rebind_proc_style" = "three"; then
11525
11526$as_echo "#define LDAP_SET_REBIND_PROC_THREE 1" >>confdefs.h
11527
11528    fi
11529
11530    CPPFLAGS="$save_cppflags"
11531    LDFLAGS="$save_ldflags"
11532    LIBS="$save_libs"
11533fi
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559  apu_use_sdbm=0
11560  apu_use_ndbm=0
11561  apu_use_gdbm=0
11562  apu_use_db=0
11563    apu_have_sdbm=1
11564  apu_have_gdbm=0
11565  apu_have_ndbm=0
11566  apu_have_db=0
11567
11568  apu_db_header=db.h                # default so apu_select_dbm.h is syntactically correct
11569  apu_db_version=0
11570
11571  # Maximum supported version announced in help string.
11572  # Although we search for all versions up to 5.9,
11573  # we should only include existing versions in our
11574  # help string.
11575  db_max_version=53
11576  db_min_version=41
11577  dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4"
11578  db_version="$db_min_version"
11579  while [ $db_version -le $db_max_version ]
11580  do
11581    dbm_list="$dbm_list, db$db_version"
11582    db_version=`expr $db_version + 1`
11583  done
11584
11585
11586# Check whether --with-dbm was given.
11587if test "${with_dbm+set}" = set; then :
11588  withval=$with_dbm;
11589    if test "$withval" = "yes"; then
11590      as_fn_error $? "--with-dbm needs to specify a DBM type to use.
11591        One of: $dbm_list" "$LINENO" 5
11592    fi
11593    requested="$withval"
11594
11595else
11596
11597    requested=default
11598
11599fi
11600
11601
11602
11603# Check whether --with-gdbm was given.
11604if test "${with_gdbm+set}" = set; then :
11605  withval=$with_gdbm;
11606    apu_have_gdbm=0
11607    if test "$withval" = "yes"; then
11608      ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
11609if test "x$ac_cv_header_gdbm_h" = x""yes; then :
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
11611$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11612if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then :
11613  $as_echo_n "(cached) " >&6
11614else
11615  ac_check_lib_save_LIBS=$LIBS
11616LIBS="-lgdbm  $LIBS"
11617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11618/* end confdefs.h.  */
11619
11620/* Override any GCC internal prototype to avoid an error.
11621   Use char because int might match the return type of a GCC
11622   builtin and then its argument prototype would still apply.  */
11623#ifdef __cplusplus
11624extern "C"
11625#endif
11626char gdbm_open ();
11627int
11628main ()
11629{
11630return gdbm_open ();
11631  ;
11632  return 0;
11633}
11634_ACEOF
11635if ac_fn_c_try_link "$LINENO"; then :
11636  ac_cv_lib_gdbm_gdbm_open=yes
11637else
11638  ac_cv_lib_gdbm_gdbm_open=no
11639fi
11640rm -f core conftest.err conftest.$ac_objext \
11641    conftest$ac_exeext conftest.$ac_ext
11642LIBS=$ac_check_lib_save_LIBS
11643fi
11644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11645$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11646if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then :
11647  apu_have_gdbm=1
11648fi
11649
11650fi
11651
11652
11653    elif test "$withval" = "no"; then
11654      apu_have_gdbm=0
11655    else
11656      saved_cppflags="$CPPFLAGS"
11657      saved_ldflags="$LDFLAGS"
11658      CPPFLAGS="$CPPFLAGS -I$withval/include"
11659      LDFLAGS="$LDFLAGS -L$withval/lib "
11660
11661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for gdbm in $withval" >&5
11662$as_echo_n "checking checking for gdbm in $withval... " >&6; }
11663      ac_fn_c_check_header_mongrel "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
11664if test "x$ac_cv_header_gdbm_h" = x""yes; then :
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdbm_open in -lgdbm" >&5
11666$as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11667if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then :
11668  $as_echo_n "(cached) " >&6
11669else
11670  ac_check_lib_save_LIBS=$LIBS
11671LIBS="-lgdbm  $LIBS"
11672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11673/* end confdefs.h.  */
11674
11675/* Override any GCC internal prototype to avoid an error.
11676   Use char because int might match the return type of a GCC
11677   builtin and then its argument prototype would still apply.  */
11678#ifdef __cplusplus
11679extern "C"
11680#endif
11681char gdbm_open ();
11682int
11683main ()
11684{
11685return gdbm_open ();
11686  ;
11687  return 0;
11688}
11689_ACEOF
11690if ac_fn_c_try_link "$LINENO"; then :
11691  ac_cv_lib_gdbm_gdbm_open=yes
11692else
11693  ac_cv_lib_gdbm_gdbm_open=no
11694fi
11695rm -f core conftest.err conftest.$ac_objext \
11696    conftest$ac_exeext conftest.$ac_ext
11697LIBS=$ac_check_lib_save_LIBS
11698fi
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11700$as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11701if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then :
11702  apu_have_gdbm=1
11703fi
11704
11705fi
11706
11707
11708      if test "$apu_have_gdbm" != "0"; then
11709
11710  if test "x$APRUTIL_LDFLAGS" = "x"; then
11711    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
11712    APRUTIL_LDFLAGS="-L$withval/lib"
11713  else
11714    apr_addto_bugger="-L$withval/lib"
11715    for i in $apr_addto_bugger; do
11716      apr_addto_duplicate="0"
11717      for j in $APRUTIL_LDFLAGS; do
11718        if test "x$i" = "x$j"; then
11719          apr_addto_duplicate="1"
11720          break
11721        fi
11722      done
11723      if test $apr_addto_duplicate = "0"; then
11724        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
11725        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
11726      fi
11727    done
11728  fi
11729
11730
11731  if test "x$APRUTIL_INCLUDES" = "x"; then
11732    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
11733    APRUTIL_INCLUDES="-I$withval/include"
11734  else
11735    apr_addto_bugger="-I$withval/include"
11736    for i in $apr_addto_bugger; do
11737      apr_addto_duplicate="0"
11738      for j in $APRUTIL_INCLUDES; do
11739        if test "x$i" = "x$j"; then
11740          apr_addto_duplicate="1"
11741          break
11742        fi
11743      done
11744      if test $apr_addto_duplicate = "0"; then
11745        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
11746        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
11747      fi
11748    done
11749  fi
11750
11751      fi
11752      CPPFLAGS="$saved_cppflags"
11753      LDFLAGS="$saved_ldflags"
11754    fi
11755
11756fi
11757
11758
11759
11760# Check whether --with-ndbm was given.
11761if test "${with_ndbm+set}" = set; then :
11762  withval=$with_ndbm;
11763    apu_have_ndbm=0
11764    if test "$withval" = "yes"; then
11765      { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm in the usual places" >&5
11766$as_echo_n "checking checking for ndbm in the usual places... " >&6; }
11767      apu_want_ndbm=1
11768      NDBM_INC=""
11769      NDBM_LDFLAGS=""
11770    elif test "$withval" = "no"; then
11771      apu_want_ndbm=0
11772    else
11773      apu_want_ndbm=1
11774      case "$withval" in
11775        *":"*)
11776          NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
11777          NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
11778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS " >&5
11779$as_echo_n "checking checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS ... " >&6; }
11780        ;;
11781        *)
11782          NDBM_INC="-I$withval/include"
11783          NDBM_LDFLAGS="-L$withval/lib"
11784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for ndbm includes in $withval" >&5
11785$as_echo_n "checking checking for ndbm includes in $withval... " >&6; }
11786        ;;
11787      esac
11788    fi
11789
11790    save_cppflags="$CPPFLAGS"
11791    save_ldflags="$LDFLAGS"
11792    CPPFLAGS="$CPPFLAGS $NDBM_INC"
11793    LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
11794        if test "$apu_want_ndbm" != "0"; then
11795      ac_fn_c_check_header_mongrel "$LINENO" "ndbm.h" "ac_cv_header_ndbm_h" "$ac_includes_default"
11796if test "x$ac_cv_header_ndbm_h" = x""yes; then :
11797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lc" >&5
11798$as_echo_n "checking for dbm_open in -lc... " >&6; }
11799if test "${ac_cv_lib_c_dbm_open+set}" = set; then :
11800  $as_echo_n "(cached) " >&6
11801else
11802  ac_check_lib_save_LIBS=$LIBS
11803LIBS="-lc  $LIBS"
11804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11805/* end confdefs.h.  */
11806
11807/* Override any GCC internal prototype to avoid an error.
11808   Use char because int might match the return type of a GCC
11809   builtin and then its argument prototype would still apply.  */
11810#ifdef __cplusplus
11811extern "C"
11812#endif
11813char dbm_open ();
11814int
11815main ()
11816{
11817return dbm_open ();
11818  ;
11819  return 0;
11820}
11821_ACEOF
11822if ac_fn_c_try_link "$LINENO"; then :
11823  ac_cv_lib_c_dbm_open=yes
11824else
11825  ac_cv_lib_c_dbm_open=no
11826fi
11827rm -f core conftest.err conftest.$ac_objext \
11828    conftest$ac_exeext conftest.$ac_ext
11829LIBS=$ac_check_lib_save_LIBS
11830fi
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_dbm_open" >&5
11832$as_echo "$ac_cv_lib_c_dbm_open" >&6; }
11833if test "x$ac_cv_lib_c_dbm_open" = x""yes; then :
11834  apu_have_ndbm=1;apu_ndbm_lib=c
11835else
11836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldbm" >&5
11837$as_echo_n "checking for dbm_open in -ldbm... " >&6; }
11838if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then :
11839  $as_echo_n "(cached) " >&6
11840else
11841  ac_check_lib_save_LIBS=$LIBS
11842LIBS="-ldbm  $LIBS"
11843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11844/* end confdefs.h.  */
11845
11846/* Override any GCC internal prototype to avoid an error.
11847   Use char because int might match the return type of a GCC
11848   builtin and then its argument prototype would still apply.  */
11849#ifdef __cplusplus
11850extern "C"
11851#endif
11852char dbm_open ();
11853int
11854main ()
11855{
11856return dbm_open ();
11857  ;
11858  return 0;
11859}
11860_ACEOF
11861if ac_fn_c_try_link "$LINENO"; then :
11862  ac_cv_lib_dbm_dbm_open=yes
11863else
11864  ac_cv_lib_dbm_dbm_open=no
11865fi
11866rm -f core conftest.err conftest.$ac_objext \
11867    conftest$ac_exeext conftest.$ac_ext
11868LIBS=$ac_check_lib_save_LIBS
11869fi
11870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dbm_dbm_open" >&5
11871$as_echo "$ac_cv_lib_dbm_dbm_open" >&6; }
11872if test "x$ac_cv_lib_dbm_dbm_open" = x""yes; then :
11873  apu_have_ndbm=1;apu_ndbm_lib=dbm
11874else
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldb" >&5
11876$as_echo_n "checking for dbm_open in -ldb... " >&6; }
11877if test "${ac_cv_lib_db_dbm_open+set}" = set; then :
11878  $as_echo_n "(cached) " >&6
11879else
11880  ac_check_lib_save_LIBS=$LIBS
11881LIBS="-ldb  $LIBS"
11882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11883/* end confdefs.h.  */
11884
11885/* Override any GCC internal prototype to avoid an error.
11886   Use char because int might match the return type of a GCC
11887   builtin and then its argument prototype would still apply.  */
11888#ifdef __cplusplus
11889extern "C"
11890#endif
11891char dbm_open ();
11892int
11893main ()
11894{
11895return dbm_open ();
11896  ;
11897  return 0;
11898}
11899_ACEOF
11900if ac_fn_c_try_link "$LINENO"; then :
11901  ac_cv_lib_db_dbm_open=yes
11902else
11903  ac_cv_lib_db_dbm_open=no
11904fi
11905rm -f core conftest.err conftest.$ac_objext \
11906    conftest$ac_exeext conftest.$ac_ext
11907LIBS=$ac_check_lib_save_LIBS
11908fi
11909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db_dbm_open" >&5
11910$as_echo "$ac_cv_lib_db_dbm_open" >&6; }
11911if test "x$ac_cv_lib_db_dbm_open" = x""yes; then :
11912  apu_have_ndbm=1;apu_ndbm_lib=db
11913else
11914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __db_ndbm_open in -ldb" >&5
11915$as_echo_n "checking for __db_ndbm_open in -ldb... " >&6; }
11916if test "${ac_cv_lib_db___db_ndbm_open+set}" = set; then :
11917  $as_echo_n "(cached) " >&6
11918else
11919  ac_check_lib_save_LIBS=$LIBS
11920LIBS="-ldb  $LIBS"
11921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922/* end confdefs.h.  */
11923
11924/* Override any GCC internal prototype to avoid an error.
11925   Use char because int might match the return type of a GCC
11926   builtin and then its argument prototype would still apply.  */
11927#ifdef __cplusplus
11928extern "C"
11929#endif
11930char __db_ndbm_open ();
11931int
11932main ()
11933{
11934return __db_ndbm_open ();
11935  ;
11936  return 0;
11937}
11938_ACEOF
11939if ac_fn_c_try_link "$LINENO"; then :
11940  ac_cv_lib_db___db_ndbm_open=yes
11941else
11942  ac_cv_lib_db___db_ndbm_open=no
11943fi
11944rm -f core conftest.err conftest.$ac_objext \
11945    conftest$ac_exeext conftest.$ac_ext
11946LIBS=$ac_check_lib_save_LIBS
11947fi
11948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db___db_ndbm_open" >&5
11949$as_echo "$ac_cv_lib_db___db_ndbm_open" >&6; }
11950if test "x$ac_cv_lib_db___db_ndbm_open" = x""yes; then :
11951  apu_have_ndbm=1;apu_ndbm_lib=db
11952fi
11953
11954
11955fi
11956
11957
11958fi
11959
11960
11961fi
11962
11963
11964fi
11965
11966
11967      if test "$apu_have_ndbm" != "0";  then
11968        if test "$withval" != "yes"; then
11969
11970  if test "x$APRUTIL_INCLUDES" = "x"; then
11971    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"$NDBM_INC\""
11972    APRUTIL_INCLUDES="$NDBM_INC"
11973  else
11974    apr_addto_bugger="$NDBM_INC"
11975    for i in $apr_addto_bugger; do
11976      apr_addto_duplicate="0"
11977      for j in $APRUTIL_INCLUDES; do
11978        if test "x$i" = "x$j"; then
11979          apr_addto_duplicate="1"
11980          break
11981        fi
11982      done
11983      if test $apr_addto_duplicate = "0"; then
11984        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
11985        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
11986      fi
11987    done
11988  fi
11989
11990
11991  if test "x$APRUTIL_LDFLAGS" = "x"; then
11992    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"$NDBM_LDFLAGS\""
11993    APRUTIL_LDFLAGS="$NDBM_LDFLAGS"
11994  else
11995    apr_addto_bugger="$NDBM_LDFLAGS"
11996    for i in $apr_addto_bugger; do
11997      apr_addto_duplicate="0"
11998      for j in $APRUTIL_LDFLAGS; do
11999        if test "x$i" = "x$j"; then
12000          apr_addto_duplicate="1"
12001          break
12002        fi
12003      done
12004      if test $apr_addto_duplicate = "0"; then
12005        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12006        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12007      fi
12008    done
12009  fi
12010
12011        fi
12012      elif test "$withval" != "yes"; then
12013        as_fn_error $? "NDBM not found in the specified directory" "$LINENO" 5
12014      fi
12015    fi
12016    CPPFLAGS="$save_cppflags"
12017    LDFLAGS="$save_ldflags"
12018
12019else
12020
12021        apu_have_ndbm=0
12022
12023fi
12024
12025
12026
12027  if test -n "$apu_db_xtra_libs"; then
12028    saveddbxtralibs="$LIBS"
12029    LIBS="$apu_db_xtra_libs $LIBS"
12030  fi
12031
12032
12033# Check whether --with-berkeley-db was given.
12034if test "${with_berkeley_db+set}" = set; then :
12035  withval=$with_berkeley_db;
12036    if test "$withval" = "yes"; then
12037      apu_want_db=1
12038      user_places=""
12039    elif test "$withval" = "no"; then
12040      apu_want_db=0
12041    else
12042      apu_want_db=1
12043      user_places="$withval"
12044    fi
12045
12046    if test "$apu_want_db" != "0"; then
12047
12048  requested=$requested
12049  check_places=$user_places
12050
12051  case "$requested" in
12052  db)
12053
12054  all_places="$check_places"
12055
12056  # Start version search at version 5.9
12057  db_version=59
12058  while [ $db_version -ge 40 ]
12059  do
12060    db_major=`echo $db_version | sed -e 's/.$//'`
12061    db_minor=`echo $db_version | sed -e 's/.//'`
12062
12063  places="$all_places"
12064  db_major="$db_major"
12065  db_minor="$db_minor"
12066  if test -z "$places"; then
12067    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
12068  fi
12069
12070  bdb_version="${db_major}"
12071  if test ""${db_minor}"" != "-1"; then
12072    bdb_version="$bdb_version."${db_minor}""
12073    if test ""-1"" != "-1"; then
12074      bdb_version="$bdb_version."-1""
12075    fi
12076  fi
12077  bdb_places="$places"
12078  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
12079  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"
12080
12081
12082  apu_have_db=0
12083
12084  # Save the original values of the flags we tweak.
12085  apu_check_lib_save_libs="$LIBS"
12086  apu_check_lib_save_ldflags="$LDFLAGS"
12087  apu_check_lib_save_cppflags="$CPPFLAGS"
12088
12089  # The variable `found' is the prefix under which we've found
12090  # Berkeley DB, or `not' if we haven't found it anywhere yet.
12091  found=not
12092  for bdb_place in $bdb_places; do
12093
12094    LDFLAGS="$apu_check_lib_save_ldflags"
12095    CPPFLAGS="$apu_check_lib_save_cppflags"
12096    case "$bdb_place" in
12097      "std" )
12098        description="the standard places"
12099      ;;
12100      *":"* )
12101        header="`echo $bdb_place | sed -e 's/:.*$//'`"
12102        lib="`echo $bdb_place | sed -e 's/^.*://'`"
12103        CPPFLAGS="$CPPFLAGS -I$header"
12104        LDFLAGS="$LDFLAGS -L$lib"
12105        description="$header and $lib"
12106      ;;
12107      * )
12108        if test -d $bdb_place; then
12109          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12110          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12111        else
12112          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12113$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12115$as_echo "directory not found" >&6; }
12116          continue
12117        fi
12118        description="$bdb_place"
12119      ;;
12120    esac
12121
12122    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12123    # trick to display a message instead.
12124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12125$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12127$as_echo "" >&6; }
12128
12129    for bdb_libname in $bdb_default_search_lib_names; do
12130      for bdb_header in $bdb_default_search_headers; do
12131        # Clear the header cache variable for each location
12132
12133        cache_id="`echo ac_cv_header_${bdb_header} \
12134                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12135
12136        unset $cache_id
12137        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12138ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12139if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12140
12141          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
12142            # We generate a separate cache variable for each prefix and libname
12143            # we search under.  That way, we avoid caching information that
12144            # changes if the user runs `configure' with a different set of
12145            # switches.
12146
12147            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12148                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12149
12150
12151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12152$as_echo_n "checking for -l$bdb_libname... " >&6; }
12153                                    if eval "test \"\${$cache_id+set}\"" = set; then :
12154  $as_echo_n "(cached) " >&6
12155else
12156
12157
12158    apu_try_berkeley_db_save_libs="$LIBS"
12159
12160    apu_check_berkeley_db_major="${db_major}"
12161    apu_check_berkeley_db_minor="${db_minor}"
12162    apu_check_berkeley_db_patch="-1"
12163    apu_try_berkeley_db_header=$bdb_header
12164    apu_try_berkeley_db_libname=$bdb_libname
12165
12166    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12167    if test "$cross_compiling" = yes; then :
12168  apu_try_berkeley_db=yes
12169
12170else
12171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172/* end confdefs.h.  */
12173
12174#include <stdlib.h>
12175#include <stdio.h>
12176#include <$apu_try_berkeley_db_header>
12177main ()
12178{
12179  int major, minor, patch;
12180
12181  db_version(&major, &minor, &patch);
12182
12183  /* Sanity check: ensure that db.h constants actually match the db library */
12184  if (major != DB_VERSION_MAJOR
12185      || minor != DB_VERSION_MINOR
12186      || patch != DB_VERSION_PATCH)
12187    exit (1);
12188
12189  /* Run-time check:  ensure the library claims to be the correct version. */
12190
12191  if ($apu_check_berkeley_db_major != -1) {
12192    if (major < $apu_check_berkeley_db_major)
12193      exit (1);
12194    if (major > $apu_check_berkeley_db_major)
12195      exit (0);
12196  }
12197
12198  if ($apu_check_berkeley_db_minor != -1) {
12199    if (minor < $apu_check_berkeley_db_minor)
12200      exit (1);
12201    if (minor > $apu_check_berkeley_db_minor)
12202      exit (0);
12203  }
12204
12205  if ($apu_check_berkeley_db_patch == -1
12206      || patch >= $apu_check_berkeley_db_patch)
12207    exit (0);
12208  else
12209    exit (1);
12210}
12211
12212_ACEOF
12213if ac_fn_c_try_run "$LINENO"; then :
12214  apu_try_berkeley_db=yes
12215else
12216  apu_try_berkeley_db=no
12217fi
12218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12219  conftest.$ac_objext conftest.beam conftest.$ac_ext
12220fi
12221
12222
12223    LIBS="$apu_try_berkeley_db_save_libs"
12224
12225
12226                eval "$cache_id=$apu_try_berkeley_db"
12227
12228fi
12229
12230            result="`eval echo '$'$cache_id`"
12231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
12232$as_echo "$result" >&6; }
12233          elif test ""${db_major}"" = "1"; then
12234            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
12235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
12236$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
12237if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
12238  $as_echo_n "(cached) " >&6
12239else
12240  ac_check_lib_save_LIBS=$LIBS
12241LIBS="-l$bdb_libname  $LIBS"
12242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243/* end confdefs.h.  */
12244
12245/* Override any GCC internal prototype to avoid an error.
12246   Use char because int might match the return type of a GCC
12247   builtin and then its argument prototype would still apply.  */
12248#ifdef __cplusplus
12249extern "C"
12250#endif
12251char dbopen ();
12252int
12253main ()
12254{
12255return dbopen ();
12256  ;
12257  return 0;
12258}
12259_ACEOF
12260if ac_fn_c_try_link "$LINENO"; then :
12261  eval "$as_ac_Lib=yes"
12262else
12263  eval "$as_ac_Lib=no"
12264fi
12265rm -f core conftest.err conftest.$ac_objext \
12266    conftest$ac_exeext conftest.$ac_ext
12267LIBS=$ac_check_lib_save_LIBS
12268fi
12269eval ac_res=\$$as_ac_Lib
12270	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12271$as_echo "$ac_res" >&6; }
12272if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12273  result=yes
12274else
12275  result=no
12276
12277fi
12278
12279          elif test ""${db_major}"" = "2"; then
12280            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
12281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
12282$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
12283if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
12284  $as_echo_n "(cached) " >&6
12285else
12286  ac_check_lib_save_LIBS=$LIBS
12287LIBS="-l$bdb_libname  $LIBS"
12288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289/* end confdefs.h.  */
12290
12291/* Override any GCC internal prototype to avoid an error.
12292   Use char because int might match the return type of a GCC
12293   builtin and then its argument prototype would still apply.  */
12294#ifdef __cplusplus
12295extern "C"
12296#endif
12297char db_open ();
12298int
12299main ()
12300{
12301return db_open ();
12302  ;
12303  return 0;
12304}
12305_ACEOF
12306if ac_fn_c_try_link "$LINENO"; then :
12307  eval "$as_ac_Lib=yes"
12308else
12309  eval "$as_ac_Lib=no"
12310fi
12311rm -f core conftest.err conftest.$ac_objext \
12312    conftest$ac_exeext conftest.$ac_ext
12313LIBS=$ac_check_lib_save_LIBS
12314fi
12315eval ac_res=\$$as_ac_Lib
12316	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12317$as_echo "$ac_res" >&6; }
12318if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12319  result=yes
12320else
12321  result=no
12322
12323fi
12324
12325          fi
12326
12327else
12328  result="no"
12329fi
12330
12331
12332
12333        # If we found it, no need to search any more.
12334        if test "$result" = "yes"; then
12335          found="$bdb_place"
12336          break
12337        fi
12338      done
12339      test "$found" != "not" && break
12340    done
12341    test "$found" != "not" && break
12342  done
12343
12344  # Restore the original values of the flags we tweak.
12345  LDFLAGS="$apu_check_lib_save_ldflags"
12346  CPPFLAGS="$apu_check_lib_save_cppflags"
12347
12348  case "$found" in
12349  "not")
12350    apu_have_db=0
12351    ;;
12352  "std")
12353    apu_db_header=$bdb_header
12354    apu_db_lib=$bdb_libname
12355    apu_have_db=1
12356    ;;
12357  *":"*)
12358    header="`echo $found | sed -e 's/:.*$//'`"
12359    lib="`echo $found | sed -e 's/^.*://'`"
12360
12361
12362  if test "x$APRUTIL_INCLUDES" = "x"; then
12363    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
12364    APRUTIL_INCLUDES="-I$header"
12365  else
12366    apr_addto_bugger="-I$header"
12367    for i in $apr_addto_bugger; do
12368      apr_addto_duplicate="0"
12369      for j in $APRUTIL_INCLUDES; do
12370        if test "x$i" = "x$j"; then
12371          apr_addto_duplicate="1"
12372          break
12373        fi
12374      done
12375      if test $apr_addto_duplicate = "0"; then
12376        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12377        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12378      fi
12379    done
12380  fi
12381
12382
12383  if test "x$APRUTIL_LDFLAGS" = "x"; then
12384    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
12385    APRUTIL_LDFLAGS="-L$lib"
12386  else
12387    apr_addto_bugger="-L$lib"
12388    for i in $apr_addto_bugger; do
12389      apr_addto_duplicate="0"
12390      for j in $APRUTIL_LDFLAGS; do
12391        if test "x$i" = "x$j"; then
12392          apr_addto_duplicate="1"
12393          break
12394        fi
12395      done
12396      if test $apr_addto_duplicate = "0"; then
12397        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12398        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12399      fi
12400    done
12401  fi
12402
12403    apu_db_header=$bdb_header
12404    apu_db_lib=$bdb_libname
12405    apu_have_db=1
12406    ;;
12407  *)
12408
12409  if test "x$APRUTIL_INCLUDES" = "x"; then
12410    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
12411    APRUTIL_INCLUDES="-I$found/include"
12412  else
12413    apr_addto_bugger="-I$found/include"
12414    for i in $apr_addto_bugger; do
12415      apr_addto_duplicate="0"
12416      for j in $APRUTIL_INCLUDES; do
12417        if test "x$i" = "x$j"; then
12418          apr_addto_duplicate="1"
12419          break
12420        fi
12421      done
12422      if test $apr_addto_duplicate = "0"; then
12423        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12424        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12425      fi
12426    done
12427  fi
12428
12429
12430  if test "x$APRUTIL_LDFLAGS" = "x"; then
12431    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
12432    APRUTIL_LDFLAGS="-L$found/lib"
12433  else
12434    apr_addto_bugger="-L$found/lib"
12435    for i in $apr_addto_bugger; do
12436      apr_addto_duplicate="0"
12437      for j in $APRUTIL_LDFLAGS; do
12438        if test "x$i" = "x$j"; then
12439          apr_addto_duplicate="1"
12440          break
12441        fi
12442      done
12443      if test $apr_addto_duplicate = "0"; then
12444        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12445        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12446      fi
12447    done
12448  fi
12449
12450    apu_db_header=$bdb_header
12451    apu_db_lib=$bdb_libname
12452    apu_have_db=1
12453    ;;
12454  esac
12455
12456  if test "$apu_have_db" = "1"; then
12457    apu_db_version=${db_major}
12458  fi
12459
12460    if test "$apu_have_db" = "1"; then
12461      break
12462    fi
12463    db_version=`expr $db_version - 1`
12464  done
12465  if test "$apu_have_db" = "0"; then
12466
12467  places="$all_places"
12468  if test -z "$places"; then
12469    places="std"
12470  fi
12471
12472  bdb_version=3
12473  if test "-1" != "-1"; then
12474    bdb_version="$bdb_version.-1"
12475    if test "-1" != "-1"; then
12476      bdb_version="$bdb_version.-1"
12477    fi
12478  fi
12479  bdb_places="$places"
12480  bdb_default_search_headers="db3/db.h db.h"
12481  bdb_default_search_lib_names="db3 db"
12482
12483
12484  apu_have_db=0
12485
12486  # Save the original values of the flags we tweak.
12487  apu_check_lib_save_libs="$LIBS"
12488  apu_check_lib_save_ldflags="$LDFLAGS"
12489  apu_check_lib_save_cppflags="$CPPFLAGS"
12490
12491  # The variable `found' is the prefix under which we've found
12492  # Berkeley DB, or `not' if we haven't found it anywhere yet.
12493  found=not
12494  for bdb_place in $bdb_places; do
12495
12496    LDFLAGS="$apu_check_lib_save_ldflags"
12497    CPPFLAGS="$apu_check_lib_save_cppflags"
12498    case "$bdb_place" in
12499      "std" )
12500        description="the standard places"
12501      ;;
12502      *":"* )
12503        header="`echo $bdb_place | sed -e 's/:.*$//'`"
12504        lib="`echo $bdb_place | sed -e 's/^.*://'`"
12505        CPPFLAGS="$CPPFLAGS -I$header"
12506        LDFLAGS="$LDFLAGS -L$lib"
12507        description="$header and $lib"
12508      ;;
12509      * )
12510        if test -d $bdb_place; then
12511          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12512          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12513        else
12514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12515$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12517$as_echo "directory not found" >&6; }
12518          continue
12519        fi
12520        description="$bdb_place"
12521      ;;
12522    esac
12523
12524    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12525    # trick to display a message instead.
12526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12527$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12529$as_echo "" >&6; }
12530
12531    for bdb_libname in $bdb_default_search_lib_names; do
12532      for bdb_header in $bdb_default_search_headers; do
12533        # Clear the header cache variable for each location
12534
12535        cache_id="`echo ac_cv_header_${bdb_header} \
12536                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12537
12538        unset $cache_id
12539        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12540ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12541if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12542
12543          if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
12544            # We generate a separate cache variable for each prefix and libname
12545            # we search under.  That way, we avoid caching information that
12546            # changes if the user runs `configure' with a different set of
12547            # switches.
12548
12549            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12550                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12551
12552
12553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12554$as_echo_n "checking for -l$bdb_libname... " >&6; }
12555                                    if eval "test \"\${$cache_id+set}\"" = set; then :
12556  $as_echo_n "(cached) " >&6
12557else
12558
12559
12560    apu_try_berkeley_db_save_libs="$LIBS"
12561
12562    apu_check_berkeley_db_major=3
12563    apu_check_berkeley_db_minor=-1
12564    apu_check_berkeley_db_patch=-1
12565    apu_try_berkeley_db_header=$bdb_header
12566    apu_try_berkeley_db_libname=$bdb_libname
12567
12568    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12569    if test "$cross_compiling" = yes; then :
12570  apu_try_berkeley_db=yes
12571
12572else
12573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574/* end confdefs.h.  */
12575
12576#include <stdlib.h>
12577#include <stdio.h>
12578#include <$apu_try_berkeley_db_header>
12579main ()
12580{
12581  int major, minor, patch;
12582
12583  db_version(&major, &minor, &patch);
12584
12585  /* Sanity check: ensure that db.h constants actually match the db library */
12586  if (major != DB_VERSION_MAJOR
12587      || minor != DB_VERSION_MINOR
12588      || patch != DB_VERSION_PATCH)
12589    exit (1);
12590
12591  /* Run-time check:  ensure the library claims to be the correct version. */
12592
12593  if ($apu_check_berkeley_db_major != -1) {
12594    if (major < $apu_check_berkeley_db_major)
12595      exit (1);
12596    if (major > $apu_check_berkeley_db_major)
12597      exit (0);
12598  }
12599
12600  if ($apu_check_berkeley_db_minor != -1) {
12601    if (minor < $apu_check_berkeley_db_minor)
12602      exit (1);
12603    if (minor > $apu_check_berkeley_db_minor)
12604      exit (0);
12605  }
12606
12607  if ($apu_check_berkeley_db_patch == -1
12608      || patch >= $apu_check_berkeley_db_patch)
12609    exit (0);
12610  else
12611    exit (1);
12612}
12613
12614_ACEOF
12615if ac_fn_c_try_run "$LINENO"; then :
12616  apu_try_berkeley_db=yes
12617else
12618  apu_try_berkeley_db=no
12619fi
12620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12621  conftest.$ac_objext conftest.beam conftest.$ac_ext
12622fi
12623
12624
12625    LIBS="$apu_try_berkeley_db_save_libs"
12626
12627
12628                eval "$cache_id=$apu_try_berkeley_db"
12629
12630fi
12631
12632            result="`eval echo '$'$cache_id`"
12633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
12634$as_echo "$result" >&6; }
12635          elif test "3" = "1"; then
12636            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
12638$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
12639if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
12640  $as_echo_n "(cached) " >&6
12641else
12642  ac_check_lib_save_LIBS=$LIBS
12643LIBS="-l$bdb_libname  $LIBS"
12644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12645/* end confdefs.h.  */
12646
12647/* Override any GCC internal prototype to avoid an error.
12648   Use char because int might match the return type of a GCC
12649   builtin and then its argument prototype would still apply.  */
12650#ifdef __cplusplus
12651extern "C"
12652#endif
12653char dbopen ();
12654int
12655main ()
12656{
12657return dbopen ();
12658  ;
12659  return 0;
12660}
12661_ACEOF
12662if ac_fn_c_try_link "$LINENO"; then :
12663  eval "$as_ac_Lib=yes"
12664else
12665  eval "$as_ac_Lib=no"
12666fi
12667rm -f core conftest.err conftest.$ac_objext \
12668    conftest$ac_exeext conftest.$ac_ext
12669LIBS=$ac_check_lib_save_LIBS
12670fi
12671eval ac_res=\$$as_ac_Lib
12672	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12673$as_echo "$ac_res" >&6; }
12674if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12675  result=yes
12676else
12677  result=no
12678
12679fi
12680
12681          elif test "3" = "2"; then
12682            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
12684$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
12685if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
12686  $as_echo_n "(cached) " >&6
12687else
12688  ac_check_lib_save_LIBS=$LIBS
12689LIBS="-l$bdb_libname  $LIBS"
12690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12691/* end confdefs.h.  */
12692
12693/* Override any GCC internal prototype to avoid an error.
12694   Use char because int might match the return type of a GCC
12695   builtin and then its argument prototype would still apply.  */
12696#ifdef __cplusplus
12697extern "C"
12698#endif
12699char db_open ();
12700int
12701main ()
12702{
12703return db_open ();
12704  ;
12705  return 0;
12706}
12707_ACEOF
12708if ac_fn_c_try_link "$LINENO"; then :
12709  eval "$as_ac_Lib=yes"
12710else
12711  eval "$as_ac_Lib=no"
12712fi
12713rm -f core conftest.err conftest.$ac_objext \
12714    conftest$ac_exeext conftest.$ac_ext
12715LIBS=$ac_check_lib_save_LIBS
12716fi
12717eval ac_res=\$$as_ac_Lib
12718	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12719$as_echo "$ac_res" >&6; }
12720if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12721  result=yes
12722else
12723  result=no
12724
12725fi
12726
12727          fi
12728
12729else
12730  result="no"
12731fi
12732
12733
12734
12735        # If we found it, no need to search any more.
12736        if test "$result" = "yes"; then
12737          found="$bdb_place"
12738          break
12739        fi
12740      done
12741      test "$found" != "not" && break
12742    done
12743    test "$found" != "not" && break
12744  done
12745
12746  # Restore the original values of the flags we tweak.
12747  LDFLAGS="$apu_check_lib_save_ldflags"
12748  CPPFLAGS="$apu_check_lib_save_cppflags"
12749
12750  case "$found" in
12751  "not")
12752    apu_have_db=0
12753    ;;
12754  "std")
12755    apu_db_header=$bdb_header
12756    apu_db_lib=$bdb_libname
12757    apu_have_db=1
12758    ;;
12759  *":"*)
12760    header="`echo $found | sed -e 's/:.*$//'`"
12761    lib="`echo $found | sed -e 's/^.*://'`"
12762
12763
12764  if test "x$APRUTIL_INCLUDES" = "x"; then
12765    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
12766    APRUTIL_INCLUDES="-I$header"
12767  else
12768    apr_addto_bugger="-I$header"
12769    for i in $apr_addto_bugger; do
12770      apr_addto_duplicate="0"
12771      for j in $APRUTIL_INCLUDES; do
12772        if test "x$i" = "x$j"; then
12773          apr_addto_duplicate="1"
12774          break
12775        fi
12776      done
12777      if test $apr_addto_duplicate = "0"; then
12778        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12779        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12780      fi
12781    done
12782  fi
12783
12784
12785  if test "x$APRUTIL_LDFLAGS" = "x"; then
12786    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
12787    APRUTIL_LDFLAGS="-L$lib"
12788  else
12789    apr_addto_bugger="-L$lib"
12790    for i in $apr_addto_bugger; do
12791      apr_addto_duplicate="0"
12792      for j in $APRUTIL_LDFLAGS; do
12793        if test "x$i" = "x$j"; then
12794          apr_addto_duplicate="1"
12795          break
12796        fi
12797      done
12798      if test $apr_addto_duplicate = "0"; then
12799        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12800        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12801      fi
12802    done
12803  fi
12804
12805    apu_db_header=$bdb_header
12806    apu_db_lib=$bdb_libname
12807    apu_have_db=1
12808    ;;
12809  *)
12810
12811  if test "x$APRUTIL_INCLUDES" = "x"; then
12812    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
12813    APRUTIL_INCLUDES="-I$found/include"
12814  else
12815    apr_addto_bugger="-I$found/include"
12816    for i in $apr_addto_bugger; do
12817      apr_addto_duplicate="0"
12818      for j in $APRUTIL_INCLUDES; do
12819        if test "x$i" = "x$j"; then
12820          apr_addto_duplicate="1"
12821          break
12822        fi
12823      done
12824      if test $apr_addto_duplicate = "0"; then
12825        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
12826        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
12827      fi
12828    done
12829  fi
12830
12831
12832  if test "x$APRUTIL_LDFLAGS" = "x"; then
12833    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
12834    APRUTIL_LDFLAGS="-L$found/lib"
12835  else
12836    apr_addto_bugger="-L$found/lib"
12837    for i in $apr_addto_bugger; do
12838      apr_addto_duplicate="0"
12839      for j in $APRUTIL_LDFLAGS; do
12840        if test "x$i" = "x$j"; then
12841          apr_addto_duplicate="1"
12842          break
12843        fi
12844      done
12845      if test $apr_addto_duplicate = "0"; then
12846        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
12847        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
12848      fi
12849    done
12850  fi
12851
12852    apu_db_header=$bdb_header
12853    apu_db_lib=$bdb_libname
12854    apu_have_db=1
12855    ;;
12856  esac
12857
12858  if test "$apu_have_db" = "1"; then
12859    apu_db_version=3
12860  fi
12861
12862  fi
12863  if test "$apu_have_db" = "0"; then
12864
12865  places="$all_places"
12866  if test -z "$places"; then
12867    places="std"
12868  fi
12869
12870  bdb_version=2
12871  if test "-1" != "-1"; then
12872    bdb_version="$bdb_version.-1"
12873    if test "-1" != "-1"; then
12874      bdb_version="$bdb_version.-1"
12875    fi
12876  fi
12877  bdb_places="$places"
12878  bdb_default_search_headers="db2/db.h db.h"
12879  bdb_default_search_lib_names="db2 db"
12880
12881
12882  apu_have_db=0
12883
12884  # Save the original values of the flags we tweak.
12885  apu_check_lib_save_libs="$LIBS"
12886  apu_check_lib_save_ldflags="$LDFLAGS"
12887  apu_check_lib_save_cppflags="$CPPFLAGS"
12888
12889  # The variable `found' is the prefix under which we've found
12890  # Berkeley DB, or `not' if we haven't found it anywhere yet.
12891  found=not
12892  for bdb_place in $bdb_places; do
12893
12894    LDFLAGS="$apu_check_lib_save_ldflags"
12895    CPPFLAGS="$apu_check_lib_save_cppflags"
12896    case "$bdb_place" in
12897      "std" )
12898        description="the standard places"
12899      ;;
12900      *":"* )
12901        header="`echo $bdb_place | sed -e 's/:.*$//'`"
12902        lib="`echo $bdb_place | sed -e 's/^.*://'`"
12903        CPPFLAGS="$CPPFLAGS -I$header"
12904        LDFLAGS="$LDFLAGS -L$lib"
12905        description="$header and $lib"
12906      ;;
12907      * )
12908        if test -d $bdb_place; then
12909          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
12910          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
12911        else
12912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
12913$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
12914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
12915$as_echo "directory not found" >&6; }
12916          continue
12917        fi
12918        description="$bdb_place"
12919      ;;
12920    esac
12921
12922    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
12923    # trick to display a message instead.
12924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
12925$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
12926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12927$as_echo "" >&6; }
12928
12929    for bdb_libname in $bdb_default_search_lib_names; do
12930      for bdb_header in $bdb_default_search_headers; do
12931        # Clear the header cache variable for each location
12932
12933        cache_id="`echo ac_cv_header_${bdb_header} \
12934                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12935
12936        unset $cache_id
12937        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
12938ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
12939if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12940
12941          if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
12942            # We generate a separate cache variable for each prefix and libname
12943            # we search under.  That way, we avoid caching information that
12944            # changes if the user runs `configure' with a different set of
12945            # switches.
12946
12947            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
12948                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
12949
12950
12951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
12952$as_echo_n "checking for -l$bdb_libname... " >&6; }
12953                                    if eval "test \"\${$cache_id+set}\"" = set; then :
12954  $as_echo_n "(cached) " >&6
12955else
12956
12957
12958    apu_try_berkeley_db_save_libs="$LIBS"
12959
12960    apu_check_berkeley_db_major=2
12961    apu_check_berkeley_db_minor=-1
12962    apu_check_berkeley_db_patch=-1
12963    apu_try_berkeley_db_header=$bdb_header
12964    apu_try_berkeley_db_libname=$bdb_libname
12965
12966    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
12967    if test "$cross_compiling" = yes; then :
12968  apu_try_berkeley_db=yes
12969
12970else
12971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972/* end confdefs.h.  */
12973
12974#include <stdlib.h>
12975#include <stdio.h>
12976#include <$apu_try_berkeley_db_header>
12977main ()
12978{
12979  int major, minor, patch;
12980
12981  db_version(&major, &minor, &patch);
12982
12983  /* Sanity check: ensure that db.h constants actually match the db library */
12984  if (major != DB_VERSION_MAJOR
12985      || minor != DB_VERSION_MINOR
12986      || patch != DB_VERSION_PATCH)
12987    exit (1);
12988
12989  /* Run-time check:  ensure the library claims to be the correct version. */
12990
12991  if ($apu_check_berkeley_db_major != -1) {
12992    if (major < $apu_check_berkeley_db_major)
12993      exit (1);
12994    if (major > $apu_check_berkeley_db_major)
12995      exit (0);
12996  }
12997
12998  if ($apu_check_berkeley_db_minor != -1) {
12999    if (minor < $apu_check_berkeley_db_minor)
13000      exit (1);
13001    if (minor > $apu_check_berkeley_db_minor)
13002      exit (0);
13003  }
13004
13005  if ($apu_check_berkeley_db_patch == -1
13006      || patch >= $apu_check_berkeley_db_patch)
13007    exit (0);
13008  else
13009    exit (1);
13010}
13011
13012_ACEOF
13013if ac_fn_c_try_run "$LINENO"; then :
13014  apu_try_berkeley_db=yes
13015else
13016  apu_try_berkeley_db=no
13017fi
13018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13019  conftest.$ac_objext conftest.beam conftest.$ac_ext
13020fi
13021
13022
13023    LIBS="$apu_try_berkeley_db_save_libs"
13024
13025
13026                eval "$cache_id=$apu_try_berkeley_db"
13027
13028fi
13029
13030            result="`eval echo '$'$cache_id`"
13031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13032$as_echo "$result" >&6; }
13033          elif test "2" = "1"; then
13034            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13036$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13037if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
13038  $as_echo_n "(cached) " >&6
13039else
13040  ac_check_lib_save_LIBS=$LIBS
13041LIBS="-l$bdb_libname  $LIBS"
13042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13043/* end confdefs.h.  */
13044
13045/* Override any GCC internal prototype to avoid an error.
13046   Use char because int might match the return type of a GCC
13047   builtin and then its argument prototype would still apply.  */
13048#ifdef __cplusplus
13049extern "C"
13050#endif
13051char dbopen ();
13052int
13053main ()
13054{
13055return dbopen ();
13056  ;
13057  return 0;
13058}
13059_ACEOF
13060if ac_fn_c_try_link "$LINENO"; then :
13061  eval "$as_ac_Lib=yes"
13062else
13063  eval "$as_ac_Lib=no"
13064fi
13065rm -f core conftest.err conftest.$ac_objext \
13066    conftest$ac_exeext conftest.$ac_ext
13067LIBS=$ac_check_lib_save_LIBS
13068fi
13069eval ac_res=\$$as_ac_Lib
13070	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13071$as_echo "$ac_res" >&6; }
13072if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13073  result=yes
13074else
13075  result=no
13076
13077fi
13078
13079          elif test "2" = "2"; then
13080            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13082$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13083if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
13084  $as_echo_n "(cached) " >&6
13085else
13086  ac_check_lib_save_LIBS=$LIBS
13087LIBS="-l$bdb_libname  $LIBS"
13088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13089/* end confdefs.h.  */
13090
13091/* Override any GCC internal prototype to avoid an error.
13092   Use char because int might match the return type of a GCC
13093   builtin and then its argument prototype would still apply.  */
13094#ifdef __cplusplus
13095extern "C"
13096#endif
13097char db_open ();
13098int
13099main ()
13100{
13101return db_open ();
13102  ;
13103  return 0;
13104}
13105_ACEOF
13106if ac_fn_c_try_link "$LINENO"; then :
13107  eval "$as_ac_Lib=yes"
13108else
13109  eval "$as_ac_Lib=no"
13110fi
13111rm -f core conftest.err conftest.$ac_objext \
13112    conftest$ac_exeext conftest.$ac_ext
13113LIBS=$ac_check_lib_save_LIBS
13114fi
13115eval ac_res=\$$as_ac_Lib
13116	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13117$as_echo "$ac_res" >&6; }
13118if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13119  result=yes
13120else
13121  result=no
13122
13123fi
13124
13125          fi
13126
13127else
13128  result="no"
13129fi
13130
13131
13132
13133        # If we found it, no need to search any more.
13134        if test "$result" = "yes"; then
13135          found="$bdb_place"
13136          break
13137        fi
13138      done
13139      test "$found" != "not" && break
13140    done
13141    test "$found" != "not" && break
13142  done
13143
13144  # Restore the original values of the flags we tweak.
13145  LDFLAGS="$apu_check_lib_save_ldflags"
13146  CPPFLAGS="$apu_check_lib_save_cppflags"
13147
13148  case "$found" in
13149  "not")
13150    apu_have_db=0
13151    ;;
13152  "std")
13153    apu_db_header=$bdb_header
13154    apu_db_lib=$bdb_libname
13155    apu_have_db=1
13156    ;;
13157  *":"*)
13158    header="`echo $found | sed -e 's/:.*$//'`"
13159    lib="`echo $found | sed -e 's/^.*://'`"
13160
13161
13162  if test "x$APRUTIL_INCLUDES" = "x"; then
13163    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13164    APRUTIL_INCLUDES="-I$header"
13165  else
13166    apr_addto_bugger="-I$header"
13167    for i in $apr_addto_bugger; do
13168      apr_addto_duplicate="0"
13169      for j in $APRUTIL_INCLUDES; do
13170        if test "x$i" = "x$j"; then
13171          apr_addto_duplicate="1"
13172          break
13173        fi
13174      done
13175      if test $apr_addto_duplicate = "0"; then
13176        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13177        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13178      fi
13179    done
13180  fi
13181
13182
13183  if test "x$APRUTIL_LDFLAGS" = "x"; then
13184    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13185    APRUTIL_LDFLAGS="-L$lib"
13186  else
13187    apr_addto_bugger="-L$lib"
13188    for i in $apr_addto_bugger; do
13189      apr_addto_duplicate="0"
13190      for j in $APRUTIL_LDFLAGS; do
13191        if test "x$i" = "x$j"; then
13192          apr_addto_duplicate="1"
13193          break
13194        fi
13195      done
13196      if test $apr_addto_duplicate = "0"; then
13197        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13198        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13199      fi
13200    done
13201  fi
13202
13203    apu_db_header=$bdb_header
13204    apu_db_lib=$bdb_libname
13205    apu_have_db=1
13206    ;;
13207  *)
13208
13209  if test "x$APRUTIL_INCLUDES" = "x"; then
13210    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13211    APRUTIL_INCLUDES="-I$found/include"
13212  else
13213    apr_addto_bugger="-I$found/include"
13214    for i in $apr_addto_bugger; do
13215      apr_addto_duplicate="0"
13216      for j in $APRUTIL_INCLUDES; do
13217        if test "x$i" = "x$j"; then
13218          apr_addto_duplicate="1"
13219          break
13220        fi
13221      done
13222      if test $apr_addto_duplicate = "0"; then
13223        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13224        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13225      fi
13226    done
13227  fi
13228
13229
13230  if test "x$APRUTIL_LDFLAGS" = "x"; then
13231    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13232    APRUTIL_LDFLAGS="-L$found/lib"
13233  else
13234    apr_addto_bugger="-L$found/lib"
13235    for i in $apr_addto_bugger; do
13236      apr_addto_duplicate="0"
13237      for j in $APRUTIL_LDFLAGS; do
13238        if test "x$i" = "x$j"; then
13239          apr_addto_duplicate="1"
13240          break
13241        fi
13242      done
13243      if test $apr_addto_duplicate = "0"; then
13244        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13245        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13246      fi
13247    done
13248  fi
13249
13250    apu_db_header=$bdb_header
13251    apu_db_lib=$bdb_libname
13252    apu_have_db=1
13253    ;;
13254  esac
13255
13256  if test "$apu_have_db" = "1"; then
13257    apu_db_version=2
13258  fi
13259
13260  fi
13261  if test "$apu_have_db" = "0"; then
13262
13263  places="$all_places"
13264  if test -z "$places"; then
13265    places="std"
13266  fi
13267
13268  bdb_version=1
13269  if test "0" != "-1"; then
13270    bdb_version="$bdb_version.0"
13271    if test "0" != "-1"; then
13272      bdb_version="$bdb_version.0"
13273    fi
13274  fi
13275  bdb_places="$places"
13276  bdb_default_search_headers="db1/db.h db.h"
13277  bdb_default_search_lib_names="db1"
13278
13279
13280  apu_have_db=0
13281
13282  # Save the original values of the flags we tweak.
13283  apu_check_lib_save_libs="$LIBS"
13284  apu_check_lib_save_ldflags="$LDFLAGS"
13285  apu_check_lib_save_cppflags="$CPPFLAGS"
13286
13287  # The variable `found' is the prefix under which we've found
13288  # Berkeley DB, or `not' if we haven't found it anywhere yet.
13289  found=not
13290  for bdb_place in $bdb_places; do
13291
13292    LDFLAGS="$apu_check_lib_save_ldflags"
13293    CPPFLAGS="$apu_check_lib_save_cppflags"
13294    case "$bdb_place" in
13295      "std" )
13296        description="the standard places"
13297      ;;
13298      *":"* )
13299        header="`echo $bdb_place | sed -e 's/:.*$//'`"
13300        lib="`echo $bdb_place | sed -e 's/^.*://'`"
13301        CPPFLAGS="$CPPFLAGS -I$header"
13302        LDFLAGS="$LDFLAGS -L$lib"
13303        description="$header and $lib"
13304      ;;
13305      * )
13306        if test -d $bdb_place; then
13307          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13308          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13309        else
13310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13311$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13313$as_echo "directory not found" >&6; }
13314          continue
13315        fi
13316        description="$bdb_place"
13317      ;;
13318    esac
13319
13320    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13321    # trick to display a message instead.
13322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13323$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13325$as_echo "" >&6; }
13326
13327    for bdb_libname in $bdb_default_search_lib_names; do
13328      for bdb_header in $bdb_default_search_headers; do
13329        # Clear the header cache variable for each location
13330
13331        cache_id="`echo ac_cv_header_${bdb_header} \
13332                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13333
13334        unset $cache_id
13335        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13336ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13337if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13338
13339          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
13340            # We generate a separate cache variable for each prefix and libname
13341            # we search under.  That way, we avoid caching information that
13342            # changes if the user runs `configure' with a different set of
13343            # switches.
13344
13345            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13346                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13347
13348
13349            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13350$as_echo_n "checking for -l$bdb_libname... " >&6; }
13351                                    if eval "test \"\${$cache_id+set}\"" = set; then :
13352  $as_echo_n "(cached) " >&6
13353else
13354
13355
13356    apu_try_berkeley_db_save_libs="$LIBS"
13357
13358    apu_check_berkeley_db_major=1
13359    apu_check_berkeley_db_minor=0
13360    apu_check_berkeley_db_patch=0
13361    apu_try_berkeley_db_header=$bdb_header
13362    apu_try_berkeley_db_libname=$bdb_libname
13363
13364    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13365    if test "$cross_compiling" = yes; then :
13366  apu_try_berkeley_db=yes
13367
13368else
13369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370/* end confdefs.h.  */
13371
13372#include <stdlib.h>
13373#include <stdio.h>
13374#include <$apu_try_berkeley_db_header>
13375main ()
13376{
13377  int major, minor, patch;
13378
13379  db_version(&major, &minor, &patch);
13380
13381  /* Sanity check: ensure that db.h constants actually match the db library */
13382  if (major != DB_VERSION_MAJOR
13383      || minor != DB_VERSION_MINOR
13384      || patch != DB_VERSION_PATCH)
13385    exit (1);
13386
13387  /* Run-time check:  ensure the library claims to be the correct version. */
13388
13389  if ($apu_check_berkeley_db_major != -1) {
13390    if (major < $apu_check_berkeley_db_major)
13391      exit (1);
13392    if (major > $apu_check_berkeley_db_major)
13393      exit (0);
13394  }
13395
13396  if ($apu_check_berkeley_db_minor != -1) {
13397    if (minor < $apu_check_berkeley_db_minor)
13398      exit (1);
13399    if (minor > $apu_check_berkeley_db_minor)
13400      exit (0);
13401  }
13402
13403  if ($apu_check_berkeley_db_patch == -1
13404      || patch >= $apu_check_berkeley_db_patch)
13405    exit (0);
13406  else
13407    exit (1);
13408}
13409
13410_ACEOF
13411if ac_fn_c_try_run "$LINENO"; then :
13412  apu_try_berkeley_db=yes
13413else
13414  apu_try_berkeley_db=no
13415fi
13416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13417  conftest.$ac_objext conftest.beam conftest.$ac_ext
13418fi
13419
13420
13421    LIBS="$apu_try_berkeley_db_save_libs"
13422
13423
13424                eval "$cache_id=$apu_try_berkeley_db"
13425
13426fi
13427
13428            result="`eval echo '$'$cache_id`"
13429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13430$as_echo "$result" >&6; }
13431          elif test "1" = "1"; then
13432            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13434$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13435if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
13436  $as_echo_n "(cached) " >&6
13437else
13438  ac_check_lib_save_LIBS=$LIBS
13439LIBS="-l$bdb_libname  $LIBS"
13440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13441/* end confdefs.h.  */
13442
13443/* Override any GCC internal prototype to avoid an error.
13444   Use char because int might match the return type of a GCC
13445   builtin and then its argument prototype would still apply.  */
13446#ifdef __cplusplus
13447extern "C"
13448#endif
13449char dbopen ();
13450int
13451main ()
13452{
13453return dbopen ();
13454  ;
13455  return 0;
13456}
13457_ACEOF
13458if ac_fn_c_try_link "$LINENO"; then :
13459  eval "$as_ac_Lib=yes"
13460else
13461  eval "$as_ac_Lib=no"
13462fi
13463rm -f core conftest.err conftest.$ac_objext \
13464    conftest$ac_exeext conftest.$ac_ext
13465LIBS=$ac_check_lib_save_LIBS
13466fi
13467eval ac_res=\$$as_ac_Lib
13468	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13469$as_echo "$ac_res" >&6; }
13470if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13471  result=yes
13472else
13473  result=no
13474
13475fi
13476
13477          elif test "1" = "2"; then
13478            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13480$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13481if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
13482  $as_echo_n "(cached) " >&6
13483else
13484  ac_check_lib_save_LIBS=$LIBS
13485LIBS="-l$bdb_libname  $LIBS"
13486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487/* end confdefs.h.  */
13488
13489/* Override any GCC internal prototype to avoid an error.
13490   Use char because int might match the return type of a GCC
13491   builtin and then its argument prototype would still apply.  */
13492#ifdef __cplusplus
13493extern "C"
13494#endif
13495char db_open ();
13496int
13497main ()
13498{
13499return db_open ();
13500  ;
13501  return 0;
13502}
13503_ACEOF
13504if ac_fn_c_try_link "$LINENO"; then :
13505  eval "$as_ac_Lib=yes"
13506else
13507  eval "$as_ac_Lib=no"
13508fi
13509rm -f core conftest.err conftest.$ac_objext \
13510    conftest$ac_exeext conftest.$ac_ext
13511LIBS=$ac_check_lib_save_LIBS
13512fi
13513eval ac_res=\$$as_ac_Lib
13514	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13515$as_echo "$ac_res" >&6; }
13516if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13517  result=yes
13518else
13519  result=no
13520
13521fi
13522
13523          fi
13524
13525else
13526  result="no"
13527fi
13528
13529
13530
13531        # If we found it, no need to search any more.
13532        if test "$result" = "yes"; then
13533          found="$bdb_place"
13534          break
13535        fi
13536      done
13537      test "$found" != "not" && break
13538    done
13539    test "$found" != "not" && break
13540  done
13541
13542  # Restore the original values of the flags we tweak.
13543  LDFLAGS="$apu_check_lib_save_ldflags"
13544  CPPFLAGS="$apu_check_lib_save_cppflags"
13545
13546  case "$found" in
13547  "not")
13548    apu_have_db=0
13549    ;;
13550  "std")
13551    apu_db_header=$bdb_header
13552    apu_db_lib=$bdb_libname
13553    apu_have_db=1
13554    ;;
13555  *":"*)
13556    header="`echo $found | sed -e 's/:.*$//'`"
13557    lib="`echo $found | sed -e 's/^.*://'`"
13558
13559
13560  if test "x$APRUTIL_INCLUDES" = "x"; then
13561    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13562    APRUTIL_INCLUDES="-I$header"
13563  else
13564    apr_addto_bugger="-I$header"
13565    for i in $apr_addto_bugger; do
13566      apr_addto_duplicate="0"
13567      for j in $APRUTIL_INCLUDES; do
13568        if test "x$i" = "x$j"; then
13569          apr_addto_duplicate="1"
13570          break
13571        fi
13572      done
13573      if test $apr_addto_duplicate = "0"; then
13574        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13575        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13576      fi
13577    done
13578  fi
13579
13580
13581  if test "x$APRUTIL_LDFLAGS" = "x"; then
13582    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13583    APRUTIL_LDFLAGS="-L$lib"
13584  else
13585    apr_addto_bugger="-L$lib"
13586    for i in $apr_addto_bugger; do
13587      apr_addto_duplicate="0"
13588      for j in $APRUTIL_LDFLAGS; do
13589        if test "x$i" = "x$j"; then
13590          apr_addto_duplicate="1"
13591          break
13592        fi
13593      done
13594      if test $apr_addto_duplicate = "0"; then
13595        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13596        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13597      fi
13598    done
13599  fi
13600
13601    apu_db_header=$bdb_header
13602    apu_db_lib=$bdb_libname
13603    apu_have_db=1
13604    ;;
13605  *)
13606
13607  if test "x$APRUTIL_INCLUDES" = "x"; then
13608    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
13609    APRUTIL_INCLUDES="-I$found/include"
13610  else
13611    apr_addto_bugger="-I$found/include"
13612    for i in $apr_addto_bugger; do
13613      apr_addto_duplicate="0"
13614      for j in $APRUTIL_INCLUDES; do
13615        if test "x$i" = "x$j"; then
13616          apr_addto_duplicate="1"
13617          break
13618        fi
13619      done
13620      if test $apr_addto_duplicate = "0"; then
13621        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13622        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13623      fi
13624    done
13625  fi
13626
13627
13628  if test "x$APRUTIL_LDFLAGS" = "x"; then
13629    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
13630    APRUTIL_LDFLAGS="-L$found/lib"
13631  else
13632    apr_addto_bugger="-L$found/lib"
13633    for i in $apr_addto_bugger; do
13634      apr_addto_duplicate="0"
13635      for j in $APRUTIL_LDFLAGS; do
13636        if test "x$i" = "x$j"; then
13637          apr_addto_duplicate="1"
13638          break
13639        fi
13640      done
13641      if test $apr_addto_duplicate = "0"; then
13642        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13643        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13644      fi
13645    done
13646  fi
13647
13648    apu_db_header=$bdb_header
13649    apu_db_lib=$bdb_libname
13650    apu_have_db=1
13651    ;;
13652  esac
13653
13654  if test "$apu_have_db" = "1"; then
13655    apu_db_version=1
13656  fi
13657
13658  fi
13659  if test "$apu_have_db" = "0"; then
13660
13661  places="$all_places"
13662  if test -z "$places"; then
13663    places="std"
13664  fi
13665
13666  bdb_version=1
13667  if test "-1" != "-1"; then
13668    bdb_version="$bdb_version.-1"
13669    if test "-1" != "-1"; then
13670      bdb_version="$bdb_version.-1"
13671    fi
13672  fi
13673  bdb_places="$places"
13674  bdb_default_search_headers="db_185.h"
13675  bdb_default_search_lib_names="db"
13676
13677
13678  apu_have_db=0
13679
13680  # Save the original values of the flags we tweak.
13681  apu_check_lib_save_libs="$LIBS"
13682  apu_check_lib_save_ldflags="$LDFLAGS"
13683  apu_check_lib_save_cppflags="$CPPFLAGS"
13684
13685  # The variable `found' is the prefix under which we've found
13686  # Berkeley DB, or `not' if we haven't found it anywhere yet.
13687  found=not
13688  for bdb_place in $bdb_places; do
13689
13690    LDFLAGS="$apu_check_lib_save_ldflags"
13691    CPPFLAGS="$apu_check_lib_save_cppflags"
13692    case "$bdb_place" in
13693      "std" )
13694        description="the standard places"
13695      ;;
13696      *":"* )
13697        header="`echo $bdb_place | sed -e 's/:.*$//'`"
13698        lib="`echo $bdb_place | sed -e 's/^.*://'`"
13699        CPPFLAGS="$CPPFLAGS -I$header"
13700        LDFLAGS="$LDFLAGS -L$lib"
13701        description="$header and $lib"
13702      ;;
13703      * )
13704        if test -d $bdb_place; then
13705          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
13706          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
13707        else
13708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
13709$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
13710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
13711$as_echo "directory not found" >&6; }
13712          continue
13713        fi
13714        description="$bdb_place"
13715      ;;
13716    esac
13717
13718    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
13719    # trick to display a message instead.
13720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
13721$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
13722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
13723$as_echo "" >&6; }
13724
13725    for bdb_libname in $bdb_default_search_lib_names; do
13726      for bdb_header in $bdb_default_search_headers; do
13727        # Clear the header cache variable for each location
13728
13729        cache_id="`echo ac_cv_header_${bdb_header} \
13730                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13731
13732        unset $cache_id
13733        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
13734ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
13735if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13736
13737          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
13738            # We generate a separate cache variable for each prefix and libname
13739            # we search under.  That way, we avoid caching information that
13740            # changes if the user runs `configure' with a different set of
13741            # switches.
13742
13743            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
13744                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
13745
13746
13747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
13748$as_echo_n "checking for -l$bdb_libname... " >&6; }
13749                                    if eval "test \"\${$cache_id+set}\"" = set; then :
13750  $as_echo_n "(cached) " >&6
13751else
13752
13753
13754    apu_try_berkeley_db_save_libs="$LIBS"
13755
13756    apu_check_berkeley_db_major=1
13757    apu_check_berkeley_db_minor=-1
13758    apu_check_berkeley_db_patch=-1
13759    apu_try_berkeley_db_header=$bdb_header
13760    apu_try_berkeley_db_libname=$bdb_libname
13761
13762    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
13763    if test "$cross_compiling" = yes; then :
13764  apu_try_berkeley_db=yes
13765
13766else
13767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13768/* end confdefs.h.  */
13769
13770#include <stdlib.h>
13771#include <stdio.h>
13772#include <$apu_try_berkeley_db_header>
13773main ()
13774{
13775  int major, minor, patch;
13776
13777  db_version(&major, &minor, &patch);
13778
13779  /* Sanity check: ensure that db.h constants actually match the db library */
13780  if (major != DB_VERSION_MAJOR
13781      || minor != DB_VERSION_MINOR
13782      || patch != DB_VERSION_PATCH)
13783    exit (1);
13784
13785  /* Run-time check:  ensure the library claims to be the correct version. */
13786
13787  if ($apu_check_berkeley_db_major != -1) {
13788    if (major < $apu_check_berkeley_db_major)
13789      exit (1);
13790    if (major > $apu_check_berkeley_db_major)
13791      exit (0);
13792  }
13793
13794  if ($apu_check_berkeley_db_minor != -1) {
13795    if (minor < $apu_check_berkeley_db_minor)
13796      exit (1);
13797    if (minor > $apu_check_berkeley_db_minor)
13798      exit (0);
13799  }
13800
13801  if ($apu_check_berkeley_db_patch == -1
13802      || patch >= $apu_check_berkeley_db_patch)
13803    exit (0);
13804  else
13805    exit (1);
13806}
13807
13808_ACEOF
13809if ac_fn_c_try_run "$LINENO"; then :
13810  apu_try_berkeley_db=yes
13811else
13812  apu_try_berkeley_db=no
13813fi
13814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13815  conftest.$ac_objext conftest.beam conftest.$ac_ext
13816fi
13817
13818
13819    LIBS="$apu_try_berkeley_db_save_libs"
13820
13821
13822                eval "$cache_id=$apu_try_berkeley_db"
13823
13824fi
13825
13826            result="`eval echo '$'$cache_id`"
13827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
13828$as_echo "$result" >&6; }
13829          elif test "1" = "1"; then
13830            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
13831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
13832$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
13833if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
13834  $as_echo_n "(cached) " >&6
13835else
13836  ac_check_lib_save_LIBS=$LIBS
13837LIBS="-l$bdb_libname  $LIBS"
13838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839/* end confdefs.h.  */
13840
13841/* Override any GCC internal prototype to avoid an error.
13842   Use char because int might match the return type of a GCC
13843   builtin and then its argument prototype would still apply.  */
13844#ifdef __cplusplus
13845extern "C"
13846#endif
13847char dbopen ();
13848int
13849main ()
13850{
13851return dbopen ();
13852  ;
13853  return 0;
13854}
13855_ACEOF
13856if ac_fn_c_try_link "$LINENO"; then :
13857  eval "$as_ac_Lib=yes"
13858else
13859  eval "$as_ac_Lib=no"
13860fi
13861rm -f core conftest.err conftest.$ac_objext \
13862    conftest$ac_exeext conftest.$ac_ext
13863LIBS=$ac_check_lib_save_LIBS
13864fi
13865eval ac_res=\$$as_ac_Lib
13866	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13867$as_echo "$ac_res" >&6; }
13868if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13869  result=yes
13870else
13871  result=no
13872
13873fi
13874
13875          elif test "1" = "2"; then
13876            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
13877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
13878$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
13879if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
13880  $as_echo_n "(cached) " >&6
13881else
13882  ac_check_lib_save_LIBS=$LIBS
13883LIBS="-l$bdb_libname  $LIBS"
13884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13885/* end confdefs.h.  */
13886
13887/* Override any GCC internal prototype to avoid an error.
13888   Use char because int might match the return type of a GCC
13889   builtin and then its argument prototype would still apply.  */
13890#ifdef __cplusplus
13891extern "C"
13892#endif
13893char db_open ();
13894int
13895main ()
13896{
13897return db_open ();
13898  ;
13899  return 0;
13900}
13901_ACEOF
13902if ac_fn_c_try_link "$LINENO"; then :
13903  eval "$as_ac_Lib=yes"
13904else
13905  eval "$as_ac_Lib=no"
13906fi
13907rm -f core conftest.err conftest.$ac_objext \
13908    conftest$ac_exeext conftest.$ac_ext
13909LIBS=$ac_check_lib_save_LIBS
13910fi
13911eval ac_res=\$$as_ac_Lib
13912	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13913$as_echo "$ac_res" >&6; }
13914if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13915  result=yes
13916else
13917  result=no
13918
13919fi
13920
13921          fi
13922
13923else
13924  result="no"
13925fi
13926
13927
13928
13929        # If we found it, no need to search any more.
13930        if test "$result" = "yes"; then
13931          found="$bdb_place"
13932          break
13933        fi
13934      done
13935      test "$found" != "not" && break
13936    done
13937    test "$found" != "not" && break
13938  done
13939
13940  # Restore the original values of the flags we tweak.
13941  LDFLAGS="$apu_check_lib_save_ldflags"
13942  CPPFLAGS="$apu_check_lib_save_cppflags"
13943
13944  case "$found" in
13945  "not")
13946    apu_have_db=0
13947    ;;
13948  "std")
13949    apu_db_header=$bdb_header
13950    apu_db_lib=$bdb_libname
13951    apu_have_db=1
13952    ;;
13953  *":"*)
13954    header="`echo $found | sed -e 's/:.*$//'`"
13955    lib="`echo $found | sed -e 's/^.*://'`"
13956
13957
13958  if test "x$APRUTIL_INCLUDES" = "x"; then
13959    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
13960    APRUTIL_INCLUDES="-I$header"
13961  else
13962    apr_addto_bugger="-I$header"
13963    for i in $apr_addto_bugger; do
13964      apr_addto_duplicate="0"
13965      for j in $APRUTIL_INCLUDES; do
13966        if test "x$i" = "x$j"; then
13967          apr_addto_duplicate="1"
13968          break
13969        fi
13970      done
13971      if test $apr_addto_duplicate = "0"; then
13972        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
13973        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
13974      fi
13975    done
13976  fi
13977
13978
13979  if test "x$APRUTIL_LDFLAGS" = "x"; then
13980    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
13981    APRUTIL_LDFLAGS="-L$lib"
13982  else
13983    apr_addto_bugger="-L$lib"
13984    for i in $apr_addto_bugger; do
13985      apr_addto_duplicate="0"
13986      for j in $APRUTIL_LDFLAGS; do
13987        if test "x$i" = "x$j"; then
13988          apr_addto_duplicate="1"
13989          break
13990        fi
13991      done
13992      if test $apr_addto_duplicate = "0"; then
13993        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
13994        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
13995      fi
13996    done
13997  fi
13998
13999    apu_db_header=$bdb_header
14000    apu_db_lib=$bdb_libname
14001    apu_have_db=1
14002    ;;
14003  *)
14004
14005  if test "x$APRUTIL_INCLUDES" = "x"; then
14006    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14007    APRUTIL_INCLUDES="-I$found/include"
14008  else
14009    apr_addto_bugger="-I$found/include"
14010    for i in $apr_addto_bugger; do
14011      apr_addto_duplicate="0"
14012      for j in $APRUTIL_INCLUDES; do
14013        if test "x$i" = "x$j"; then
14014          apr_addto_duplicate="1"
14015          break
14016        fi
14017      done
14018      if test $apr_addto_duplicate = "0"; then
14019        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14020        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14021      fi
14022    done
14023  fi
14024
14025
14026  if test "x$APRUTIL_LDFLAGS" = "x"; then
14027    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14028    APRUTIL_LDFLAGS="-L$found/lib"
14029  else
14030    apr_addto_bugger="-L$found/lib"
14031    for i in $apr_addto_bugger; do
14032      apr_addto_duplicate="0"
14033      for j in $APRUTIL_LDFLAGS; do
14034        if test "x$i" = "x$j"; then
14035          apr_addto_duplicate="1"
14036          break
14037        fi
14038      done
14039      if test $apr_addto_duplicate = "0"; then
14040        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14041        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14042      fi
14043    done
14044  fi
14045
14046    apu_db_header=$bdb_header
14047    apu_db_lib=$bdb_libname
14048    apu_have_db=1
14049    ;;
14050  esac
14051
14052  if test "$apu_have_db" = "1"; then
14053    apu_db_version=185
14054  fi
14055
14056  fi
14057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB" >&5
14058$as_echo_n "checking for Berkeley DB... " >&6; }
14059  if test "$apu_have_db" = "1"; then
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found db$apu_db_version" >&5
14061$as_echo "found db$apu_db_version" >&6; }
14062  else
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14064$as_echo "not found" >&6; }
14065  fi
14066
14067    if test "$apu_have_db" = "0"; then
14068      as_fn_error but not found "Berkeley db requested" "$LINENO" 5
14069    fi
14070    ;;
14071  db1)
14072
14073  places="$check_places"
14074  if test -z "$places"; then
14075    places="std"
14076  fi
14077
14078  bdb_version=1
14079  if test "0" != "-1"; then
14080    bdb_version="$bdb_version.0"
14081    if test "0" != "-1"; then
14082      bdb_version="$bdb_version.0"
14083    fi
14084  fi
14085  bdb_places="$places"
14086  bdb_default_search_headers="db1/db.h db.h"
14087  bdb_default_search_lib_names="db1"
14088
14089
14090  apu_have_db=0
14091
14092  # Save the original values of the flags we tweak.
14093  apu_check_lib_save_libs="$LIBS"
14094  apu_check_lib_save_ldflags="$LDFLAGS"
14095  apu_check_lib_save_cppflags="$CPPFLAGS"
14096
14097  # The variable `found' is the prefix under which we've found
14098  # Berkeley DB, or `not' if we haven't found it anywhere yet.
14099  found=not
14100  for bdb_place in $bdb_places; do
14101
14102    LDFLAGS="$apu_check_lib_save_ldflags"
14103    CPPFLAGS="$apu_check_lib_save_cppflags"
14104    case "$bdb_place" in
14105      "std" )
14106        description="the standard places"
14107      ;;
14108      *":"* )
14109        header="`echo $bdb_place | sed -e 's/:.*$//'`"
14110        lib="`echo $bdb_place | sed -e 's/^.*://'`"
14111        CPPFLAGS="$CPPFLAGS -I$header"
14112        LDFLAGS="$LDFLAGS -L$lib"
14113        description="$header and $lib"
14114      ;;
14115      * )
14116        if test -d $bdb_place; then
14117          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14118          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14119        else
14120          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14121$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14123$as_echo "directory not found" >&6; }
14124          continue
14125        fi
14126        description="$bdb_place"
14127      ;;
14128    esac
14129
14130    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14131    # trick to display a message instead.
14132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14133$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14135$as_echo "" >&6; }
14136
14137    for bdb_libname in $bdb_default_search_lib_names; do
14138      for bdb_header in $bdb_default_search_headers; do
14139        # Clear the header cache variable for each location
14140
14141        cache_id="`echo ac_cv_header_${bdb_header} \
14142                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14143
14144        unset $cache_id
14145        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14146ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14147if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14148
14149          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
14150            # We generate a separate cache variable for each prefix and libname
14151            # we search under.  That way, we avoid caching information that
14152            # changes if the user runs `configure' with a different set of
14153            # switches.
14154
14155            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14156                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14157
14158
14159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14160$as_echo_n "checking for -l$bdb_libname... " >&6; }
14161                                    if eval "test \"\${$cache_id+set}\"" = set; then :
14162  $as_echo_n "(cached) " >&6
14163else
14164
14165
14166    apu_try_berkeley_db_save_libs="$LIBS"
14167
14168    apu_check_berkeley_db_major=1
14169    apu_check_berkeley_db_minor=0
14170    apu_check_berkeley_db_patch=0
14171    apu_try_berkeley_db_header=$bdb_header
14172    apu_try_berkeley_db_libname=$bdb_libname
14173
14174    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14175    if test "$cross_compiling" = yes; then :
14176  apu_try_berkeley_db=yes
14177
14178else
14179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14180/* end confdefs.h.  */
14181
14182#include <stdlib.h>
14183#include <stdio.h>
14184#include <$apu_try_berkeley_db_header>
14185main ()
14186{
14187  int major, minor, patch;
14188
14189  db_version(&major, &minor, &patch);
14190
14191  /* Sanity check: ensure that db.h constants actually match the db library */
14192  if (major != DB_VERSION_MAJOR
14193      || minor != DB_VERSION_MINOR
14194      || patch != DB_VERSION_PATCH)
14195    exit (1);
14196
14197  /* Run-time check:  ensure the library claims to be the correct version. */
14198
14199  if ($apu_check_berkeley_db_major != -1) {
14200    if (major < $apu_check_berkeley_db_major)
14201      exit (1);
14202    if (major > $apu_check_berkeley_db_major)
14203      exit (0);
14204  }
14205
14206  if ($apu_check_berkeley_db_minor != -1) {
14207    if (minor < $apu_check_berkeley_db_minor)
14208      exit (1);
14209    if (minor > $apu_check_berkeley_db_minor)
14210      exit (0);
14211  }
14212
14213  if ($apu_check_berkeley_db_patch == -1
14214      || patch >= $apu_check_berkeley_db_patch)
14215    exit (0);
14216  else
14217    exit (1);
14218}
14219
14220_ACEOF
14221if ac_fn_c_try_run "$LINENO"; then :
14222  apu_try_berkeley_db=yes
14223else
14224  apu_try_berkeley_db=no
14225fi
14226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14227  conftest.$ac_objext conftest.beam conftest.$ac_ext
14228fi
14229
14230
14231    LIBS="$apu_try_berkeley_db_save_libs"
14232
14233
14234                eval "$cache_id=$apu_try_berkeley_db"
14235
14236fi
14237
14238            result="`eval echo '$'$cache_id`"
14239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14240$as_echo "$result" >&6; }
14241          elif test "1" = "1"; then
14242            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14244$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14245if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
14246  $as_echo_n "(cached) " >&6
14247else
14248  ac_check_lib_save_LIBS=$LIBS
14249LIBS="-l$bdb_libname  $LIBS"
14250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14251/* end confdefs.h.  */
14252
14253/* Override any GCC internal prototype to avoid an error.
14254   Use char because int might match the return type of a GCC
14255   builtin and then its argument prototype would still apply.  */
14256#ifdef __cplusplus
14257extern "C"
14258#endif
14259char dbopen ();
14260int
14261main ()
14262{
14263return dbopen ();
14264  ;
14265  return 0;
14266}
14267_ACEOF
14268if ac_fn_c_try_link "$LINENO"; then :
14269  eval "$as_ac_Lib=yes"
14270else
14271  eval "$as_ac_Lib=no"
14272fi
14273rm -f core conftest.err conftest.$ac_objext \
14274    conftest$ac_exeext conftest.$ac_ext
14275LIBS=$ac_check_lib_save_LIBS
14276fi
14277eval ac_res=\$$as_ac_Lib
14278	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14279$as_echo "$ac_res" >&6; }
14280if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14281  result=yes
14282else
14283  result=no
14284
14285fi
14286
14287          elif test "1" = "2"; then
14288            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14290$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14291if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
14292  $as_echo_n "(cached) " >&6
14293else
14294  ac_check_lib_save_LIBS=$LIBS
14295LIBS="-l$bdb_libname  $LIBS"
14296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14297/* end confdefs.h.  */
14298
14299/* Override any GCC internal prototype to avoid an error.
14300   Use char because int might match the return type of a GCC
14301   builtin and then its argument prototype would still apply.  */
14302#ifdef __cplusplus
14303extern "C"
14304#endif
14305char db_open ();
14306int
14307main ()
14308{
14309return db_open ();
14310  ;
14311  return 0;
14312}
14313_ACEOF
14314if ac_fn_c_try_link "$LINENO"; then :
14315  eval "$as_ac_Lib=yes"
14316else
14317  eval "$as_ac_Lib=no"
14318fi
14319rm -f core conftest.err conftest.$ac_objext \
14320    conftest$ac_exeext conftest.$ac_ext
14321LIBS=$ac_check_lib_save_LIBS
14322fi
14323eval ac_res=\$$as_ac_Lib
14324	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14325$as_echo "$ac_res" >&6; }
14326if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14327  result=yes
14328else
14329  result=no
14330
14331fi
14332
14333          fi
14334
14335else
14336  result="no"
14337fi
14338
14339
14340
14341        # If we found it, no need to search any more.
14342        if test "$result" = "yes"; then
14343          found="$bdb_place"
14344          break
14345        fi
14346      done
14347      test "$found" != "not" && break
14348    done
14349    test "$found" != "not" && break
14350  done
14351
14352  # Restore the original values of the flags we tweak.
14353  LDFLAGS="$apu_check_lib_save_ldflags"
14354  CPPFLAGS="$apu_check_lib_save_cppflags"
14355
14356  case "$found" in
14357  "not")
14358    apu_have_db=0
14359    ;;
14360  "std")
14361    apu_db_header=$bdb_header
14362    apu_db_lib=$bdb_libname
14363    apu_have_db=1
14364    ;;
14365  *":"*)
14366    header="`echo $found | sed -e 's/:.*$//'`"
14367    lib="`echo $found | sed -e 's/^.*://'`"
14368
14369
14370  if test "x$APRUTIL_INCLUDES" = "x"; then
14371    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
14372    APRUTIL_INCLUDES="-I$header"
14373  else
14374    apr_addto_bugger="-I$header"
14375    for i in $apr_addto_bugger; do
14376      apr_addto_duplicate="0"
14377      for j in $APRUTIL_INCLUDES; do
14378        if test "x$i" = "x$j"; then
14379          apr_addto_duplicate="1"
14380          break
14381        fi
14382      done
14383      if test $apr_addto_duplicate = "0"; then
14384        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14385        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14386      fi
14387    done
14388  fi
14389
14390
14391  if test "x$APRUTIL_LDFLAGS" = "x"; then
14392    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14393    APRUTIL_LDFLAGS="-L$lib"
14394  else
14395    apr_addto_bugger="-L$lib"
14396    for i in $apr_addto_bugger; do
14397      apr_addto_duplicate="0"
14398      for j in $APRUTIL_LDFLAGS; do
14399        if test "x$i" = "x$j"; then
14400          apr_addto_duplicate="1"
14401          break
14402        fi
14403      done
14404      if test $apr_addto_duplicate = "0"; then
14405        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14406        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14407      fi
14408    done
14409  fi
14410
14411    apu_db_header=$bdb_header
14412    apu_db_lib=$bdb_libname
14413    apu_have_db=1
14414    ;;
14415  *)
14416
14417  if test "x$APRUTIL_INCLUDES" = "x"; then
14418    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14419    APRUTIL_INCLUDES="-I$found/include"
14420  else
14421    apr_addto_bugger="-I$found/include"
14422    for i in $apr_addto_bugger; do
14423      apr_addto_duplicate="0"
14424      for j in $APRUTIL_INCLUDES; do
14425        if test "x$i" = "x$j"; then
14426          apr_addto_duplicate="1"
14427          break
14428        fi
14429      done
14430      if test $apr_addto_duplicate = "0"; then
14431        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14432        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14433      fi
14434    done
14435  fi
14436
14437
14438  if test "x$APRUTIL_LDFLAGS" = "x"; then
14439    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14440    APRUTIL_LDFLAGS="-L$found/lib"
14441  else
14442    apr_addto_bugger="-L$found/lib"
14443    for i in $apr_addto_bugger; do
14444      apr_addto_duplicate="0"
14445      for j in $APRUTIL_LDFLAGS; do
14446        if test "x$i" = "x$j"; then
14447          apr_addto_duplicate="1"
14448          break
14449        fi
14450      done
14451      if test $apr_addto_duplicate = "0"; then
14452        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14453        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14454      fi
14455    done
14456  fi
14457
14458    apu_db_header=$bdb_header
14459    apu_db_lib=$bdb_libname
14460    apu_have_db=1
14461    ;;
14462  esac
14463
14464  if test "$apu_have_db" = "1"; then
14465    apu_db_version=1
14466  fi
14467
14468    if test "$apu_db_version" != "1"; then
14469      as_fn_error $? "Berkeley db1 not found" "$LINENO" 5
14470    fi
14471    ;;
14472  db185)
14473
14474  places="$check_places"
14475  if test -z "$places"; then
14476    places="std"
14477  fi
14478
14479  bdb_version=1
14480  if test "-1" != "-1"; then
14481    bdb_version="$bdb_version.-1"
14482    if test "-1" != "-1"; then
14483      bdb_version="$bdb_version.-1"
14484    fi
14485  fi
14486  bdb_places="$places"
14487  bdb_default_search_headers="db_185.h"
14488  bdb_default_search_lib_names="db"
14489
14490
14491  apu_have_db=0
14492
14493  # Save the original values of the flags we tweak.
14494  apu_check_lib_save_libs="$LIBS"
14495  apu_check_lib_save_ldflags="$LDFLAGS"
14496  apu_check_lib_save_cppflags="$CPPFLAGS"
14497
14498  # The variable `found' is the prefix under which we've found
14499  # Berkeley DB, or `not' if we haven't found it anywhere yet.
14500  found=not
14501  for bdb_place in $bdb_places; do
14502
14503    LDFLAGS="$apu_check_lib_save_ldflags"
14504    CPPFLAGS="$apu_check_lib_save_cppflags"
14505    case "$bdb_place" in
14506      "std" )
14507        description="the standard places"
14508      ;;
14509      *":"* )
14510        header="`echo $bdb_place | sed -e 's/:.*$//'`"
14511        lib="`echo $bdb_place | sed -e 's/^.*://'`"
14512        CPPFLAGS="$CPPFLAGS -I$header"
14513        LDFLAGS="$LDFLAGS -L$lib"
14514        description="$header and $lib"
14515      ;;
14516      * )
14517        if test -d $bdb_place; then
14518          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14519          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14520        else
14521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14522$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14524$as_echo "directory not found" >&6; }
14525          continue
14526        fi
14527        description="$bdb_place"
14528      ;;
14529    esac
14530
14531    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14532    # trick to display a message instead.
14533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14534$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14536$as_echo "" >&6; }
14537
14538    for bdb_libname in $bdb_default_search_lib_names; do
14539      for bdb_header in $bdb_default_search_headers; do
14540        # Clear the header cache variable for each location
14541
14542        cache_id="`echo ac_cv_header_${bdb_header} \
14543                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14544
14545        unset $cache_id
14546        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14547ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14548if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14549
14550          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
14551            # We generate a separate cache variable for each prefix and libname
14552            # we search under.  That way, we avoid caching information that
14553            # changes if the user runs `configure' with a different set of
14554            # switches.
14555
14556            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14557                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14558
14559
14560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14561$as_echo_n "checking for -l$bdb_libname... " >&6; }
14562                                    if eval "test \"\${$cache_id+set}\"" = set; then :
14563  $as_echo_n "(cached) " >&6
14564else
14565
14566
14567    apu_try_berkeley_db_save_libs="$LIBS"
14568
14569    apu_check_berkeley_db_major=1
14570    apu_check_berkeley_db_minor=-1
14571    apu_check_berkeley_db_patch=-1
14572    apu_try_berkeley_db_header=$bdb_header
14573    apu_try_berkeley_db_libname=$bdb_libname
14574
14575    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14576    if test "$cross_compiling" = yes; then :
14577  apu_try_berkeley_db=yes
14578
14579else
14580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14581/* end confdefs.h.  */
14582
14583#include <stdlib.h>
14584#include <stdio.h>
14585#include <$apu_try_berkeley_db_header>
14586main ()
14587{
14588  int major, minor, patch;
14589
14590  db_version(&major, &minor, &patch);
14591
14592  /* Sanity check: ensure that db.h constants actually match the db library */
14593  if (major != DB_VERSION_MAJOR
14594      || minor != DB_VERSION_MINOR
14595      || patch != DB_VERSION_PATCH)
14596    exit (1);
14597
14598  /* Run-time check:  ensure the library claims to be the correct version. */
14599
14600  if ($apu_check_berkeley_db_major != -1) {
14601    if (major < $apu_check_berkeley_db_major)
14602      exit (1);
14603    if (major > $apu_check_berkeley_db_major)
14604      exit (0);
14605  }
14606
14607  if ($apu_check_berkeley_db_minor != -1) {
14608    if (minor < $apu_check_berkeley_db_minor)
14609      exit (1);
14610    if (minor > $apu_check_berkeley_db_minor)
14611      exit (0);
14612  }
14613
14614  if ($apu_check_berkeley_db_patch == -1
14615      || patch >= $apu_check_berkeley_db_patch)
14616    exit (0);
14617  else
14618    exit (1);
14619}
14620
14621_ACEOF
14622if ac_fn_c_try_run "$LINENO"; then :
14623  apu_try_berkeley_db=yes
14624else
14625  apu_try_berkeley_db=no
14626fi
14627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14628  conftest.$ac_objext conftest.beam conftest.$ac_ext
14629fi
14630
14631
14632    LIBS="$apu_try_berkeley_db_save_libs"
14633
14634
14635                eval "$cache_id=$apu_try_berkeley_db"
14636
14637fi
14638
14639            result="`eval echo '$'$cache_id`"
14640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
14641$as_echo "$result" >&6; }
14642          elif test "1" = "1"; then
14643            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
14644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
14645$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
14646if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
14647  $as_echo_n "(cached) " >&6
14648else
14649  ac_check_lib_save_LIBS=$LIBS
14650LIBS="-l$bdb_libname  $LIBS"
14651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652/* end confdefs.h.  */
14653
14654/* Override any GCC internal prototype to avoid an error.
14655   Use char because int might match the return type of a GCC
14656   builtin and then its argument prototype would still apply.  */
14657#ifdef __cplusplus
14658extern "C"
14659#endif
14660char dbopen ();
14661int
14662main ()
14663{
14664return dbopen ();
14665  ;
14666  return 0;
14667}
14668_ACEOF
14669if ac_fn_c_try_link "$LINENO"; then :
14670  eval "$as_ac_Lib=yes"
14671else
14672  eval "$as_ac_Lib=no"
14673fi
14674rm -f core conftest.err conftest.$ac_objext \
14675    conftest$ac_exeext conftest.$ac_ext
14676LIBS=$ac_check_lib_save_LIBS
14677fi
14678eval ac_res=\$$as_ac_Lib
14679	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14680$as_echo "$ac_res" >&6; }
14681if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14682  result=yes
14683else
14684  result=no
14685
14686fi
14687
14688          elif test "1" = "2"; then
14689            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
14690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
14691$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
14692if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
14693  $as_echo_n "(cached) " >&6
14694else
14695  ac_check_lib_save_LIBS=$LIBS
14696LIBS="-l$bdb_libname  $LIBS"
14697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14698/* end confdefs.h.  */
14699
14700/* Override any GCC internal prototype to avoid an error.
14701   Use char because int might match the return type of a GCC
14702   builtin and then its argument prototype would still apply.  */
14703#ifdef __cplusplus
14704extern "C"
14705#endif
14706char db_open ();
14707int
14708main ()
14709{
14710return db_open ();
14711  ;
14712  return 0;
14713}
14714_ACEOF
14715if ac_fn_c_try_link "$LINENO"; then :
14716  eval "$as_ac_Lib=yes"
14717else
14718  eval "$as_ac_Lib=no"
14719fi
14720rm -f core conftest.err conftest.$ac_objext \
14721    conftest$ac_exeext conftest.$ac_ext
14722LIBS=$ac_check_lib_save_LIBS
14723fi
14724eval ac_res=\$$as_ac_Lib
14725	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14726$as_echo "$ac_res" >&6; }
14727if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
14728  result=yes
14729else
14730  result=no
14731
14732fi
14733
14734          fi
14735
14736else
14737  result="no"
14738fi
14739
14740
14741
14742        # If we found it, no need to search any more.
14743        if test "$result" = "yes"; then
14744          found="$bdb_place"
14745          break
14746        fi
14747      done
14748      test "$found" != "not" && break
14749    done
14750    test "$found" != "not" && break
14751  done
14752
14753  # Restore the original values of the flags we tweak.
14754  LDFLAGS="$apu_check_lib_save_ldflags"
14755  CPPFLAGS="$apu_check_lib_save_cppflags"
14756
14757  case "$found" in
14758  "not")
14759    apu_have_db=0
14760    ;;
14761  "std")
14762    apu_db_header=$bdb_header
14763    apu_db_lib=$bdb_libname
14764    apu_have_db=1
14765    ;;
14766  *":"*)
14767    header="`echo $found | sed -e 's/:.*$//'`"
14768    lib="`echo $found | sed -e 's/^.*://'`"
14769
14770
14771  if test "x$APRUTIL_INCLUDES" = "x"; then
14772    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
14773    APRUTIL_INCLUDES="-I$header"
14774  else
14775    apr_addto_bugger="-I$header"
14776    for i in $apr_addto_bugger; do
14777      apr_addto_duplicate="0"
14778      for j in $APRUTIL_INCLUDES; do
14779        if test "x$i" = "x$j"; then
14780          apr_addto_duplicate="1"
14781          break
14782        fi
14783      done
14784      if test $apr_addto_duplicate = "0"; then
14785        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14786        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14787      fi
14788    done
14789  fi
14790
14791
14792  if test "x$APRUTIL_LDFLAGS" = "x"; then
14793    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
14794    APRUTIL_LDFLAGS="-L$lib"
14795  else
14796    apr_addto_bugger="-L$lib"
14797    for i in $apr_addto_bugger; do
14798      apr_addto_duplicate="0"
14799      for j in $APRUTIL_LDFLAGS; do
14800        if test "x$i" = "x$j"; then
14801          apr_addto_duplicate="1"
14802          break
14803        fi
14804      done
14805      if test $apr_addto_duplicate = "0"; then
14806        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14807        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14808      fi
14809    done
14810  fi
14811
14812    apu_db_header=$bdb_header
14813    apu_db_lib=$bdb_libname
14814    apu_have_db=1
14815    ;;
14816  *)
14817
14818  if test "x$APRUTIL_INCLUDES" = "x"; then
14819    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
14820    APRUTIL_INCLUDES="-I$found/include"
14821  else
14822    apr_addto_bugger="-I$found/include"
14823    for i in $apr_addto_bugger; do
14824      apr_addto_duplicate="0"
14825      for j in $APRUTIL_INCLUDES; do
14826        if test "x$i" = "x$j"; then
14827          apr_addto_duplicate="1"
14828          break
14829        fi
14830      done
14831      if test $apr_addto_duplicate = "0"; then
14832        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
14833        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
14834      fi
14835    done
14836  fi
14837
14838
14839  if test "x$APRUTIL_LDFLAGS" = "x"; then
14840    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
14841    APRUTIL_LDFLAGS="-L$found/lib"
14842  else
14843    apr_addto_bugger="-L$found/lib"
14844    for i in $apr_addto_bugger; do
14845      apr_addto_duplicate="0"
14846      for j in $APRUTIL_LDFLAGS; do
14847        if test "x$i" = "x$j"; then
14848          apr_addto_duplicate="1"
14849          break
14850        fi
14851      done
14852      if test $apr_addto_duplicate = "0"; then
14853        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
14854        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
14855      fi
14856    done
14857  fi
14858
14859    apu_db_header=$bdb_header
14860    apu_db_lib=$bdb_libname
14861    apu_have_db=1
14862    ;;
14863  esac
14864
14865  if test "$apu_have_db" = "1"; then
14866    apu_db_version=185
14867  fi
14868
14869    if test "$apu_db_version" != "185"; then
14870      as_fn_error $? "Berkeley db185 not found" "$LINENO" 5
14871    fi
14872    ;;
14873  db2)
14874
14875  places="$check_places"
14876  if test -z "$places"; then
14877    places="std"
14878  fi
14879
14880  bdb_version=2
14881  if test "-1" != "-1"; then
14882    bdb_version="$bdb_version.-1"
14883    if test "-1" != "-1"; then
14884      bdb_version="$bdb_version.-1"
14885    fi
14886  fi
14887  bdb_places="$places"
14888  bdb_default_search_headers="db2/db.h db.h"
14889  bdb_default_search_lib_names="db2 db"
14890
14891
14892  apu_have_db=0
14893
14894  # Save the original values of the flags we tweak.
14895  apu_check_lib_save_libs="$LIBS"
14896  apu_check_lib_save_ldflags="$LDFLAGS"
14897  apu_check_lib_save_cppflags="$CPPFLAGS"
14898
14899  # The variable `found' is the prefix under which we've found
14900  # Berkeley DB, or `not' if we haven't found it anywhere yet.
14901  found=not
14902  for bdb_place in $bdb_places; do
14903
14904    LDFLAGS="$apu_check_lib_save_ldflags"
14905    CPPFLAGS="$apu_check_lib_save_cppflags"
14906    case "$bdb_place" in
14907      "std" )
14908        description="the standard places"
14909      ;;
14910      *":"* )
14911        header="`echo $bdb_place | sed -e 's/:.*$//'`"
14912        lib="`echo $bdb_place | sed -e 's/^.*://'`"
14913        CPPFLAGS="$CPPFLAGS -I$header"
14914        LDFLAGS="$LDFLAGS -L$lib"
14915        description="$header and $lib"
14916      ;;
14917      * )
14918        if test -d $bdb_place; then
14919          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
14920          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
14921        else
14922          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
14923$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
14924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
14925$as_echo "directory not found" >&6; }
14926          continue
14927        fi
14928        description="$bdb_place"
14929      ;;
14930    esac
14931
14932    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
14933    # trick to display a message instead.
14934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
14935$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
14936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
14937$as_echo "" >&6; }
14938
14939    for bdb_libname in $bdb_default_search_lib_names; do
14940      for bdb_header in $bdb_default_search_headers; do
14941        # Clear the header cache variable for each location
14942
14943        cache_id="`echo ac_cv_header_${bdb_header} \
14944                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14945
14946        unset $cache_id
14947        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
14948ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
14949if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14950
14951          if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
14952            # We generate a separate cache variable for each prefix and libname
14953            # we search under.  That way, we avoid caching information that
14954            # changes if the user runs `configure' with a different set of
14955            # switches.
14956
14957            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
14958                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
14959
14960
14961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
14962$as_echo_n "checking for -l$bdb_libname... " >&6; }
14963                                    if eval "test \"\${$cache_id+set}\"" = set; then :
14964  $as_echo_n "(cached) " >&6
14965else
14966
14967
14968    apu_try_berkeley_db_save_libs="$LIBS"
14969
14970    apu_check_berkeley_db_major=2
14971    apu_check_berkeley_db_minor=-1
14972    apu_check_berkeley_db_patch=-1
14973    apu_try_berkeley_db_header=$bdb_header
14974    apu_try_berkeley_db_libname=$bdb_libname
14975
14976    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
14977    if test "$cross_compiling" = yes; then :
14978  apu_try_berkeley_db=yes
14979
14980else
14981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982/* end confdefs.h.  */
14983
14984#include <stdlib.h>
14985#include <stdio.h>
14986#include <$apu_try_berkeley_db_header>
14987main ()
14988{
14989  int major, minor, patch;
14990
14991  db_version(&major, &minor, &patch);
14992
14993  /* Sanity check: ensure that db.h constants actually match the db library */
14994  if (major != DB_VERSION_MAJOR
14995      || minor != DB_VERSION_MINOR
14996      || patch != DB_VERSION_PATCH)
14997    exit (1);
14998
14999  /* Run-time check:  ensure the library claims to be the correct version. */
15000
15001  if ($apu_check_berkeley_db_major != -1) {
15002    if (major < $apu_check_berkeley_db_major)
15003      exit (1);
15004    if (major > $apu_check_berkeley_db_major)
15005      exit (0);
15006  }
15007
15008  if ($apu_check_berkeley_db_minor != -1) {
15009    if (minor < $apu_check_berkeley_db_minor)
15010      exit (1);
15011    if (minor > $apu_check_berkeley_db_minor)
15012      exit (0);
15013  }
15014
15015  if ($apu_check_berkeley_db_patch == -1
15016      || patch >= $apu_check_berkeley_db_patch)
15017    exit (0);
15018  else
15019    exit (1);
15020}
15021
15022_ACEOF
15023if ac_fn_c_try_run "$LINENO"; then :
15024  apu_try_berkeley_db=yes
15025else
15026  apu_try_berkeley_db=no
15027fi
15028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15029  conftest.$ac_objext conftest.beam conftest.$ac_ext
15030fi
15031
15032
15033    LIBS="$apu_try_berkeley_db_save_libs"
15034
15035
15036                eval "$cache_id=$apu_try_berkeley_db"
15037
15038fi
15039
15040            result="`eval echo '$'$cache_id`"
15041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15042$as_echo "$result" >&6; }
15043          elif test "2" = "1"; then
15044            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15046$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15047if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
15048  $as_echo_n "(cached) " >&6
15049else
15050  ac_check_lib_save_LIBS=$LIBS
15051LIBS="-l$bdb_libname  $LIBS"
15052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053/* end confdefs.h.  */
15054
15055/* Override any GCC internal prototype to avoid an error.
15056   Use char because int might match the return type of a GCC
15057   builtin and then its argument prototype would still apply.  */
15058#ifdef __cplusplus
15059extern "C"
15060#endif
15061char dbopen ();
15062int
15063main ()
15064{
15065return dbopen ();
15066  ;
15067  return 0;
15068}
15069_ACEOF
15070if ac_fn_c_try_link "$LINENO"; then :
15071  eval "$as_ac_Lib=yes"
15072else
15073  eval "$as_ac_Lib=no"
15074fi
15075rm -f core conftest.err conftest.$ac_objext \
15076    conftest$ac_exeext conftest.$ac_ext
15077LIBS=$ac_check_lib_save_LIBS
15078fi
15079eval ac_res=\$$as_ac_Lib
15080	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15081$as_echo "$ac_res" >&6; }
15082if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15083  result=yes
15084else
15085  result=no
15086
15087fi
15088
15089          elif test "2" = "2"; then
15090            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15092$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15093if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
15094  $as_echo_n "(cached) " >&6
15095else
15096  ac_check_lib_save_LIBS=$LIBS
15097LIBS="-l$bdb_libname  $LIBS"
15098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15099/* end confdefs.h.  */
15100
15101/* Override any GCC internal prototype to avoid an error.
15102   Use char because int might match the return type of a GCC
15103   builtin and then its argument prototype would still apply.  */
15104#ifdef __cplusplus
15105extern "C"
15106#endif
15107char db_open ();
15108int
15109main ()
15110{
15111return db_open ();
15112  ;
15113  return 0;
15114}
15115_ACEOF
15116if ac_fn_c_try_link "$LINENO"; then :
15117  eval "$as_ac_Lib=yes"
15118else
15119  eval "$as_ac_Lib=no"
15120fi
15121rm -f core conftest.err conftest.$ac_objext \
15122    conftest$ac_exeext conftest.$ac_ext
15123LIBS=$ac_check_lib_save_LIBS
15124fi
15125eval ac_res=\$$as_ac_Lib
15126	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15127$as_echo "$ac_res" >&6; }
15128if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15129  result=yes
15130else
15131  result=no
15132
15133fi
15134
15135          fi
15136
15137else
15138  result="no"
15139fi
15140
15141
15142
15143        # If we found it, no need to search any more.
15144        if test "$result" = "yes"; then
15145          found="$bdb_place"
15146          break
15147        fi
15148      done
15149      test "$found" != "not" && break
15150    done
15151    test "$found" != "not" && break
15152  done
15153
15154  # Restore the original values of the flags we tweak.
15155  LDFLAGS="$apu_check_lib_save_ldflags"
15156  CPPFLAGS="$apu_check_lib_save_cppflags"
15157
15158  case "$found" in
15159  "not")
15160    apu_have_db=0
15161    ;;
15162  "std")
15163    apu_db_header=$bdb_header
15164    apu_db_lib=$bdb_libname
15165    apu_have_db=1
15166    ;;
15167  *":"*)
15168    header="`echo $found | sed -e 's/:.*$//'`"
15169    lib="`echo $found | sed -e 's/^.*://'`"
15170
15171
15172  if test "x$APRUTIL_INCLUDES" = "x"; then
15173    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15174    APRUTIL_INCLUDES="-I$header"
15175  else
15176    apr_addto_bugger="-I$header"
15177    for i in $apr_addto_bugger; do
15178      apr_addto_duplicate="0"
15179      for j in $APRUTIL_INCLUDES; do
15180        if test "x$i" = "x$j"; then
15181          apr_addto_duplicate="1"
15182          break
15183        fi
15184      done
15185      if test $apr_addto_duplicate = "0"; then
15186        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15187        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15188      fi
15189    done
15190  fi
15191
15192
15193  if test "x$APRUTIL_LDFLAGS" = "x"; then
15194    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15195    APRUTIL_LDFLAGS="-L$lib"
15196  else
15197    apr_addto_bugger="-L$lib"
15198    for i in $apr_addto_bugger; do
15199      apr_addto_duplicate="0"
15200      for j in $APRUTIL_LDFLAGS; do
15201        if test "x$i" = "x$j"; then
15202          apr_addto_duplicate="1"
15203          break
15204        fi
15205      done
15206      if test $apr_addto_duplicate = "0"; then
15207        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15208        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15209      fi
15210    done
15211  fi
15212
15213    apu_db_header=$bdb_header
15214    apu_db_lib=$bdb_libname
15215    apu_have_db=1
15216    ;;
15217  *)
15218
15219  if test "x$APRUTIL_INCLUDES" = "x"; then
15220    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15221    APRUTIL_INCLUDES="-I$found/include"
15222  else
15223    apr_addto_bugger="-I$found/include"
15224    for i in $apr_addto_bugger; do
15225      apr_addto_duplicate="0"
15226      for j in $APRUTIL_INCLUDES; do
15227        if test "x$i" = "x$j"; then
15228          apr_addto_duplicate="1"
15229          break
15230        fi
15231      done
15232      if test $apr_addto_duplicate = "0"; then
15233        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15234        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15235      fi
15236    done
15237  fi
15238
15239
15240  if test "x$APRUTIL_LDFLAGS" = "x"; then
15241    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15242    APRUTIL_LDFLAGS="-L$found/lib"
15243  else
15244    apr_addto_bugger="-L$found/lib"
15245    for i in $apr_addto_bugger; do
15246      apr_addto_duplicate="0"
15247      for j in $APRUTIL_LDFLAGS; do
15248        if test "x$i" = "x$j"; then
15249          apr_addto_duplicate="1"
15250          break
15251        fi
15252      done
15253      if test $apr_addto_duplicate = "0"; then
15254        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15255        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15256      fi
15257    done
15258  fi
15259
15260    apu_db_header=$bdb_header
15261    apu_db_lib=$bdb_libname
15262    apu_have_db=1
15263    ;;
15264  esac
15265
15266  if test "$apu_have_db" = "1"; then
15267    apu_db_version=2
15268  fi
15269
15270    if test "$apu_db_version" != "2"; then
15271      as_fn_error $? "Berkeley db2 not found" "$LINENO" 5
15272    fi
15273    ;;
15274  db3)
15275
15276  places="$check_places"
15277  if test -z "$places"; then
15278    places="std"
15279  fi
15280
15281  bdb_version=3
15282  if test "-1" != "-1"; then
15283    bdb_version="$bdb_version.-1"
15284    if test "-1" != "-1"; then
15285      bdb_version="$bdb_version.-1"
15286    fi
15287  fi
15288  bdb_places="$places"
15289  bdb_default_search_headers="db3/db.h db.h"
15290  bdb_default_search_lib_names="db3 db"
15291
15292
15293  apu_have_db=0
15294
15295  # Save the original values of the flags we tweak.
15296  apu_check_lib_save_libs="$LIBS"
15297  apu_check_lib_save_ldflags="$LDFLAGS"
15298  apu_check_lib_save_cppflags="$CPPFLAGS"
15299
15300  # The variable `found' is the prefix under which we've found
15301  # Berkeley DB, or `not' if we haven't found it anywhere yet.
15302  found=not
15303  for bdb_place in $bdb_places; do
15304
15305    LDFLAGS="$apu_check_lib_save_ldflags"
15306    CPPFLAGS="$apu_check_lib_save_cppflags"
15307    case "$bdb_place" in
15308      "std" )
15309        description="the standard places"
15310      ;;
15311      *":"* )
15312        header="`echo $bdb_place | sed -e 's/:.*$//'`"
15313        lib="`echo $bdb_place | sed -e 's/^.*://'`"
15314        CPPFLAGS="$CPPFLAGS -I$header"
15315        LDFLAGS="$LDFLAGS -L$lib"
15316        description="$header and $lib"
15317      ;;
15318      * )
15319        if test -d $bdb_place; then
15320          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15321          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15322        else
15323          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15324$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15326$as_echo "directory not found" >&6; }
15327          continue
15328        fi
15329        description="$bdb_place"
15330      ;;
15331    esac
15332
15333    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15334    # trick to display a message instead.
15335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15336$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15338$as_echo "" >&6; }
15339
15340    for bdb_libname in $bdb_default_search_lib_names; do
15341      for bdb_header in $bdb_default_search_headers; do
15342        # Clear the header cache variable for each location
15343
15344        cache_id="`echo ac_cv_header_${bdb_header} \
15345                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15346
15347        unset $cache_id
15348        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15349ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15350if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15351
15352          if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
15353            # We generate a separate cache variable for each prefix and libname
15354            # we search under.  That way, we avoid caching information that
15355            # changes if the user runs `configure' with a different set of
15356            # switches.
15357
15358            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15359                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15360
15361
15362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
15363$as_echo_n "checking for -l$bdb_libname... " >&6; }
15364                                    if eval "test \"\${$cache_id+set}\"" = set; then :
15365  $as_echo_n "(cached) " >&6
15366else
15367
15368
15369    apu_try_berkeley_db_save_libs="$LIBS"
15370
15371    apu_check_berkeley_db_major=3
15372    apu_check_berkeley_db_minor=-1
15373    apu_check_berkeley_db_patch=-1
15374    apu_try_berkeley_db_header=$bdb_header
15375    apu_try_berkeley_db_libname=$bdb_libname
15376
15377    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15378    if test "$cross_compiling" = yes; then :
15379  apu_try_berkeley_db=yes
15380
15381else
15382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15383/* end confdefs.h.  */
15384
15385#include <stdlib.h>
15386#include <stdio.h>
15387#include <$apu_try_berkeley_db_header>
15388main ()
15389{
15390  int major, minor, patch;
15391
15392  db_version(&major, &minor, &patch);
15393
15394  /* Sanity check: ensure that db.h constants actually match the db library */
15395  if (major != DB_VERSION_MAJOR
15396      || minor != DB_VERSION_MINOR
15397      || patch != DB_VERSION_PATCH)
15398    exit (1);
15399
15400  /* Run-time check:  ensure the library claims to be the correct version. */
15401
15402  if ($apu_check_berkeley_db_major != -1) {
15403    if (major < $apu_check_berkeley_db_major)
15404      exit (1);
15405    if (major > $apu_check_berkeley_db_major)
15406      exit (0);
15407  }
15408
15409  if ($apu_check_berkeley_db_minor != -1) {
15410    if (minor < $apu_check_berkeley_db_minor)
15411      exit (1);
15412    if (minor > $apu_check_berkeley_db_minor)
15413      exit (0);
15414  }
15415
15416  if ($apu_check_berkeley_db_patch == -1
15417      || patch >= $apu_check_berkeley_db_patch)
15418    exit (0);
15419  else
15420    exit (1);
15421}
15422
15423_ACEOF
15424if ac_fn_c_try_run "$LINENO"; then :
15425  apu_try_berkeley_db=yes
15426else
15427  apu_try_berkeley_db=no
15428fi
15429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15430  conftest.$ac_objext conftest.beam conftest.$ac_ext
15431fi
15432
15433
15434    LIBS="$apu_try_berkeley_db_save_libs"
15435
15436
15437                eval "$cache_id=$apu_try_berkeley_db"
15438
15439fi
15440
15441            result="`eval echo '$'$cache_id`"
15442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15443$as_echo "$result" >&6; }
15444          elif test "3" = "1"; then
15445            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15447$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15448if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
15449  $as_echo_n "(cached) " >&6
15450else
15451  ac_check_lib_save_LIBS=$LIBS
15452LIBS="-l$bdb_libname  $LIBS"
15453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454/* end confdefs.h.  */
15455
15456/* Override any GCC internal prototype to avoid an error.
15457   Use char because int might match the return type of a GCC
15458   builtin and then its argument prototype would still apply.  */
15459#ifdef __cplusplus
15460extern "C"
15461#endif
15462char dbopen ();
15463int
15464main ()
15465{
15466return dbopen ();
15467  ;
15468  return 0;
15469}
15470_ACEOF
15471if ac_fn_c_try_link "$LINENO"; then :
15472  eval "$as_ac_Lib=yes"
15473else
15474  eval "$as_ac_Lib=no"
15475fi
15476rm -f core conftest.err conftest.$ac_objext \
15477    conftest$ac_exeext conftest.$ac_ext
15478LIBS=$ac_check_lib_save_LIBS
15479fi
15480eval ac_res=\$$as_ac_Lib
15481	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15482$as_echo "$ac_res" >&6; }
15483if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15484  result=yes
15485else
15486  result=no
15487
15488fi
15489
15490          elif test "3" = "2"; then
15491            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15493$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15494if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
15495  $as_echo_n "(cached) " >&6
15496else
15497  ac_check_lib_save_LIBS=$LIBS
15498LIBS="-l$bdb_libname  $LIBS"
15499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h.  */
15501
15502/* Override any GCC internal prototype to avoid an error.
15503   Use char because int might match the return type of a GCC
15504   builtin and then its argument prototype would still apply.  */
15505#ifdef __cplusplus
15506extern "C"
15507#endif
15508char db_open ();
15509int
15510main ()
15511{
15512return db_open ();
15513  ;
15514  return 0;
15515}
15516_ACEOF
15517if ac_fn_c_try_link "$LINENO"; then :
15518  eval "$as_ac_Lib=yes"
15519else
15520  eval "$as_ac_Lib=no"
15521fi
15522rm -f core conftest.err conftest.$ac_objext \
15523    conftest$ac_exeext conftest.$ac_ext
15524LIBS=$ac_check_lib_save_LIBS
15525fi
15526eval ac_res=\$$as_ac_Lib
15527	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15528$as_echo "$ac_res" >&6; }
15529if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15530  result=yes
15531else
15532  result=no
15533
15534fi
15535
15536          fi
15537
15538else
15539  result="no"
15540fi
15541
15542
15543
15544        # If we found it, no need to search any more.
15545        if test "$result" = "yes"; then
15546          found="$bdb_place"
15547          break
15548        fi
15549      done
15550      test "$found" != "not" && break
15551    done
15552    test "$found" != "not" && break
15553  done
15554
15555  # Restore the original values of the flags we tweak.
15556  LDFLAGS="$apu_check_lib_save_ldflags"
15557  CPPFLAGS="$apu_check_lib_save_cppflags"
15558
15559  case "$found" in
15560  "not")
15561    apu_have_db=0
15562    ;;
15563  "std")
15564    apu_db_header=$bdb_header
15565    apu_db_lib=$bdb_libname
15566    apu_have_db=1
15567    ;;
15568  *":"*)
15569    header="`echo $found | sed -e 's/:.*$//'`"
15570    lib="`echo $found | sed -e 's/^.*://'`"
15571
15572
15573  if test "x$APRUTIL_INCLUDES" = "x"; then
15574    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15575    APRUTIL_INCLUDES="-I$header"
15576  else
15577    apr_addto_bugger="-I$header"
15578    for i in $apr_addto_bugger; do
15579      apr_addto_duplicate="0"
15580      for j in $APRUTIL_INCLUDES; do
15581        if test "x$i" = "x$j"; then
15582          apr_addto_duplicate="1"
15583          break
15584        fi
15585      done
15586      if test $apr_addto_duplicate = "0"; then
15587        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15588        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15589      fi
15590    done
15591  fi
15592
15593
15594  if test "x$APRUTIL_LDFLAGS" = "x"; then
15595    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
15596    APRUTIL_LDFLAGS="-L$lib"
15597  else
15598    apr_addto_bugger="-L$lib"
15599    for i in $apr_addto_bugger; do
15600      apr_addto_duplicate="0"
15601      for j in $APRUTIL_LDFLAGS; do
15602        if test "x$i" = "x$j"; then
15603          apr_addto_duplicate="1"
15604          break
15605        fi
15606      done
15607      if test $apr_addto_duplicate = "0"; then
15608        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15609        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15610      fi
15611    done
15612  fi
15613
15614    apu_db_header=$bdb_header
15615    apu_db_lib=$bdb_libname
15616    apu_have_db=1
15617    ;;
15618  *)
15619
15620  if test "x$APRUTIL_INCLUDES" = "x"; then
15621    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
15622    APRUTIL_INCLUDES="-I$found/include"
15623  else
15624    apr_addto_bugger="-I$found/include"
15625    for i in $apr_addto_bugger; do
15626      apr_addto_duplicate="0"
15627      for j in $APRUTIL_INCLUDES; do
15628        if test "x$i" = "x$j"; then
15629          apr_addto_duplicate="1"
15630          break
15631        fi
15632      done
15633      if test $apr_addto_duplicate = "0"; then
15634        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15635        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15636      fi
15637    done
15638  fi
15639
15640
15641  if test "x$APRUTIL_LDFLAGS" = "x"; then
15642    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
15643    APRUTIL_LDFLAGS="-L$found/lib"
15644  else
15645    apr_addto_bugger="-L$found/lib"
15646    for i in $apr_addto_bugger; do
15647      apr_addto_duplicate="0"
15648      for j in $APRUTIL_LDFLAGS; do
15649        if test "x$i" = "x$j"; then
15650          apr_addto_duplicate="1"
15651          break
15652        fi
15653      done
15654      if test $apr_addto_duplicate = "0"; then
15655        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
15656        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
15657      fi
15658    done
15659  fi
15660
15661    apu_db_header=$bdb_header
15662    apu_db_lib=$bdb_libname
15663    apu_have_db=1
15664    ;;
15665  esac
15666
15667  if test "$apu_have_db" = "1"; then
15668    apu_db_version=3
15669  fi
15670
15671    if test "$apu_db_version" != "3"; then
15672      as_fn_error $? "Berkeley db3 not found" "$LINENO" 5
15673    fi
15674    ;;
15675  db[45][0-9])
15676    db_major=`echo "$requested" | sed -e 's/db//' -e 's/.$//'`
15677    db_minor=`echo "$requested" | sed -e 's/db//' -e 's/.//'`
15678
15679  places="$check_places"
15680  db_major="$db_major"
15681  db_minor="$db_minor"
15682  if test -z "$places"; then
15683    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
15684  fi
15685
15686  bdb_version="${db_major}"
15687  if test ""${db_minor}"" != "-1"; then
15688    bdb_version="$bdb_version."${db_minor}""
15689    if test ""-1"" != "-1"; then
15690      bdb_version="$bdb_version."-1""
15691    fi
15692  fi
15693  bdb_places="$places"
15694  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
15695  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"
15696
15697
15698  apu_have_db=0
15699
15700  # Save the original values of the flags we tweak.
15701  apu_check_lib_save_libs="$LIBS"
15702  apu_check_lib_save_ldflags="$LDFLAGS"
15703  apu_check_lib_save_cppflags="$CPPFLAGS"
15704
15705  # The variable `found' is the prefix under which we've found
15706  # Berkeley DB, or `not' if we haven't found it anywhere yet.
15707  found=not
15708  for bdb_place in $bdb_places; do
15709
15710    LDFLAGS="$apu_check_lib_save_ldflags"
15711    CPPFLAGS="$apu_check_lib_save_cppflags"
15712    case "$bdb_place" in
15713      "std" )
15714        description="the standard places"
15715      ;;
15716      *":"* )
15717        header="`echo $bdb_place | sed -e 's/:.*$//'`"
15718        lib="`echo $bdb_place | sed -e 's/^.*://'`"
15719        CPPFLAGS="$CPPFLAGS -I$header"
15720        LDFLAGS="$LDFLAGS -L$lib"
15721        description="$header and $lib"
15722      ;;
15723      * )
15724        if test -d $bdb_place; then
15725          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
15726          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
15727        else
15728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
15729$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
15730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
15731$as_echo "directory not found" >&6; }
15732          continue
15733        fi
15734        description="$bdb_place"
15735      ;;
15736    esac
15737
15738    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
15739    # trick to display a message instead.
15740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
15741$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
15742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
15743$as_echo "" >&6; }
15744
15745    for bdb_libname in $bdb_default_search_lib_names; do
15746      for bdb_header in $bdb_default_search_headers; do
15747        # Clear the header cache variable for each location
15748
15749        cache_id="`echo ac_cv_header_${bdb_header} \
15750                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15751
15752        unset $cache_id
15753        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
15754ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
15755if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15756
15757          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
15758            # We generate a separate cache variable for each prefix and libname
15759            # we search under.  That way, we avoid caching information that
15760            # changes if the user runs `configure' with a different set of
15761            # switches.
15762
15763            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
15764                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
15765
15766
15767            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
15768$as_echo_n "checking for -l$bdb_libname... " >&6; }
15769                                    if eval "test \"\${$cache_id+set}\"" = set; then :
15770  $as_echo_n "(cached) " >&6
15771else
15772
15773
15774    apu_try_berkeley_db_save_libs="$LIBS"
15775
15776    apu_check_berkeley_db_major="${db_major}"
15777    apu_check_berkeley_db_minor="${db_minor}"
15778    apu_check_berkeley_db_patch="-1"
15779    apu_try_berkeley_db_header=$bdb_header
15780    apu_try_berkeley_db_libname=$bdb_libname
15781
15782    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
15783    if test "$cross_compiling" = yes; then :
15784  apu_try_berkeley_db=yes
15785
15786else
15787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15788/* end confdefs.h.  */
15789
15790#include <stdlib.h>
15791#include <stdio.h>
15792#include <$apu_try_berkeley_db_header>
15793main ()
15794{
15795  int major, minor, patch;
15796
15797  db_version(&major, &minor, &patch);
15798
15799  /* Sanity check: ensure that db.h constants actually match the db library */
15800  if (major != DB_VERSION_MAJOR
15801      || minor != DB_VERSION_MINOR
15802      || patch != DB_VERSION_PATCH)
15803    exit (1);
15804
15805  /* Run-time check:  ensure the library claims to be the correct version. */
15806
15807  if ($apu_check_berkeley_db_major != -1) {
15808    if (major < $apu_check_berkeley_db_major)
15809      exit (1);
15810    if (major > $apu_check_berkeley_db_major)
15811      exit (0);
15812  }
15813
15814  if ($apu_check_berkeley_db_minor != -1) {
15815    if (minor < $apu_check_berkeley_db_minor)
15816      exit (1);
15817    if (minor > $apu_check_berkeley_db_minor)
15818      exit (0);
15819  }
15820
15821  if ($apu_check_berkeley_db_patch == -1
15822      || patch >= $apu_check_berkeley_db_patch)
15823    exit (0);
15824  else
15825    exit (1);
15826}
15827
15828_ACEOF
15829if ac_fn_c_try_run "$LINENO"; then :
15830  apu_try_berkeley_db=yes
15831else
15832  apu_try_berkeley_db=no
15833fi
15834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15835  conftest.$ac_objext conftest.beam conftest.$ac_ext
15836fi
15837
15838
15839    LIBS="$apu_try_berkeley_db_save_libs"
15840
15841
15842                eval "$cache_id=$apu_try_berkeley_db"
15843
15844fi
15845
15846            result="`eval echo '$'$cache_id`"
15847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
15848$as_echo "$result" >&6; }
15849          elif test ""${db_major}"" = "1"; then
15850            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
15851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
15852$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
15853if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
15854  $as_echo_n "(cached) " >&6
15855else
15856  ac_check_lib_save_LIBS=$LIBS
15857LIBS="-l$bdb_libname  $LIBS"
15858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15859/* end confdefs.h.  */
15860
15861/* Override any GCC internal prototype to avoid an error.
15862   Use char because int might match the return type of a GCC
15863   builtin and then its argument prototype would still apply.  */
15864#ifdef __cplusplus
15865extern "C"
15866#endif
15867char dbopen ();
15868int
15869main ()
15870{
15871return dbopen ();
15872  ;
15873  return 0;
15874}
15875_ACEOF
15876if ac_fn_c_try_link "$LINENO"; then :
15877  eval "$as_ac_Lib=yes"
15878else
15879  eval "$as_ac_Lib=no"
15880fi
15881rm -f core conftest.err conftest.$ac_objext \
15882    conftest$ac_exeext conftest.$ac_ext
15883LIBS=$ac_check_lib_save_LIBS
15884fi
15885eval ac_res=\$$as_ac_Lib
15886	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15887$as_echo "$ac_res" >&6; }
15888if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15889  result=yes
15890else
15891  result=no
15892
15893fi
15894
15895          elif test ""${db_major}"" = "2"; then
15896            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
15897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
15898$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
15899if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
15900  $as_echo_n "(cached) " >&6
15901else
15902  ac_check_lib_save_LIBS=$LIBS
15903LIBS="-l$bdb_libname  $LIBS"
15904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15905/* end confdefs.h.  */
15906
15907/* Override any GCC internal prototype to avoid an error.
15908   Use char because int might match the return type of a GCC
15909   builtin and then its argument prototype would still apply.  */
15910#ifdef __cplusplus
15911extern "C"
15912#endif
15913char db_open ();
15914int
15915main ()
15916{
15917return db_open ();
15918  ;
15919  return 0;
15920}
15921_ACEOF
15922if ac_fn_c_try_link "$LINENO"; then :
15923  eval "$as_ac_Lib=yes"
15924else
15925  eval "$as_ac_Lib=no"
15926fi
15927rm -f core conftest.err conftest.$ac_objext \
15928    conftest$ac_exeext conftest.$ac_ext
15929LIBS=$ac_check_lib_save_LIBS
15930fi
15931eval ac_res=\$$as_ac_Lib
15932	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15933$as_echo "$ac_res" >&6; }
15934if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
15935  result=yes
15936else
15937  result=no
15938
15939fi
15940
15941          fi
15942
15943else
15944  result="no"
15945fi
15946
15947
15948
15949        # If we found it, no need to search any more.
15950        if test "$result" = "yes"; then
15951          found="$bdb_place"
15952          break
15953        fi
15954      done
15955      test "$found" != "not" && break
15956    done
15957    test "$found" != "not" && break
15958  done
15959
15960  # Restore the original values of the flags we tweak.
15961  LDFLAGS="$apu_check_lib_save_ldflags"
15962  CPPFLAGS="$apu_check_lib_save_cppflags"
15963
15964  case "$found" in
15965  "not")
15966    apu_have_db=0
15967    ;;
15968  "std")
15969    apu_db_header=$bdb_header
15970    apu_db_lib=$bdb_libname
15971    apu_have_db=1
15972    ;;
15973  *":"*)
15974    header="`echo $found | sed -e 's/:.*$//'`"
15975    lib="`echo $found | sed -e 's/^.*://'`"
15976
15977
15978  if test "x$APRUTIL_INCLUDES" = "x"; then
15979    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
15980    APRUTIL_INCLUDES="-I$header"
15981  else
15982    apr_addto_bugger="-I$header"
15983    for i in $apr_addto_bugger; do
15984      apr_addto_duplicate="0"
15985      for j in $APRUTIL_INCLUDES; do
15986        if test "x$i" = "x$j"; then
15987          apr_addto_duplicate="1"
15988          break
15989        fi
15990      done
15991      if test $apr_addto_duplicate = "0"; then
15992        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
15993        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
15994      fi
15995    done
15996  fi
15997
15998
15999  if test "x$APRUTIL_LDFLAGS" = "x"; then
16000    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16001    APRUTIL_LDFLAGS="-L$lib"
16002  else
16003    apr_addto_bugger="-L$lib"
16004    for i in $apr_addto_bugger; do
16005      apr_addto_duplicate="0"
16006      for j in $APRUTIL_LDFLAGS; do
16007        if test "x$i" = "x$j"; then
16008          apr_addto_duplicate="1"
16009          break
16010        fi
16011      done
16012      if test $apr_addto_duplicate = "0"; then
16013        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16014        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16015      fi
16016    done
16017  fi
16018
16019    apu_db_header=$bdb_header
16020    apu_db_lib=$bdb_libname
16021    apu_have_db=1
16022    ;;
16023  *)
16024
16025  if test "x$APRUTIL_INCLUDES" = "x"; then
16026    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16027    APRUTIL_INCLUDES="-I$found/include"
16028  else
16029    apr_addto_bugger="-I$found/include"
16030    for i in $apr_addto_bugger; do
16031      apr_addto_duplicate="0"
16032      for j in $APRUTIL_INCLUDES; do
16033        if test "x$i" = "x$j"; then
16034          apr_addto_duplicate="1"
16035          break
16036        fi
16037      done
16038      if test $apr_addto_duplicate = "0"; then
16039        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16040        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16041      fi
16042    done
16043  fi
16044
16045
16046  if test "x$APRUTIL_LDFLAGS" = "x"; then
16047    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16048    APRUTIL_LDFLAGS="-L$found/lib"
16049  else
16050    apr_addto_bugger="-L$found/lib"
16051    for i in $apr_addto_bugger; do
16052      apr_addto_duplicate="0"
16053      for j in $APRUTIL_LDFLAGS; do
16054        if test "x$i" = "x$j"; then
16055          apr_addto_duplicate="1"
16056          break
16057        fi
16058      done
16059      if test $apr_addto_duplicate = "0"; then
16060        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16061        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16062      fi
16063    done
16064  fi
16065
16066    apu_db_header=$bdb_header
16067    apu_db_lib=$bdb_libname
16068    apu_have_db=1
16069    ;;
16070  esac
16071
16072  if test "$apu_have_db" = "1"; then
16073    apu_db_version=${db_major}
16074  fi
16075
16076    if test "$apu_db_version" != "$db_major"; then
16077      as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5
16078    fi
16079    ;;
16080  db[45])
16081    db_major=`echo "$requested" | sed -e 's/db//'`
16082    # Start version search at version x.9
16083    db_minor=9
16084    while [ $db_minor -ge 0 ]
16085    do
16086
16087  places="$check_places"
16088  db_major="$db_major"
16089  db_minor="$db_minor"
16090  if test -z "$places"; then
16091    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
16092  fi
16093
16094  bdb_version="${db_major}"
16095  if test ""${db_minor}"" != "-1"; then
16096    bdb_version="$bdb_version."${db_minor}""
16097    if test ""-1"" != "-1"; then
16098      bdb_version="$bdb_version."-1""
16099    fi
16100  fi
16101  bdb_places="$places"
16102  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
16103  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"
16104
16105
16106  apu_have_db=0
16107
16108  # Save the original values of the flags we tweak.
16109  apu_check_lib_save_libs="$LIBS"
16110  apu_check_lib_save_ldflags="$LDFLAGS"
16111  apu_check_lib_save_cppflags="$CPPFLAGS"
16112
16113  # The variable `found' is the prefix under which we've found
16114  # Berkeley DB, or `not' if we haven't found it anywhere yet.
16115  found=not
16116  for bdb_place in $bdb_places; do
16117
16118    LDFLAGS="$apu_check_lib_save_ldflags"
16119    CPPFLAGS="$apu_check_lib_save_cppflags"
16120    case "$bdb_place" in
16121      "std" )
16122        description="the standard places"
16123      ;;
16124      *":"* )
16125        header="`echo $bdb_place | sed -e 's/:.*$//'`"
16126        lib="`echo $bdb_place | sed -e 's/^.*://'`"
16127        CPPFLAGS="$CPPFLAGS -I$header"
16128        LDFLAGS="$LDFLAGS -L$lib"
16129        description="$header and $lib"
16130      ;;
16131      * )
16132        if test -d $bdb_place; then
16133          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16134          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16135        else
16136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16137$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16139$as_echo "directory not found" >&6; }
16140          continue
16141        fi
16142        description="$bdb_place"
16143      ;;
16144    esac
16145
16146    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16147    # trick to display a message instead.
16148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16149$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16151$as_echo "" >&6; }
16152
16153    for bdb_libname in $bdb_default_search_lib_names; do
16154      for bdb_header in $bdb_default_search_headers; do
16155        # Clear the header cache variable for each location
16156
16157        cache_id="`echo ac_cv_header_${bdb_header} \
16158                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16159
16160        unset $cache_id
16161        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16162ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16163if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16164
16165          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
16166            # We generate a separate cache variable for each prefix and libname
16167            # we search under.  That way, we avoid caching information that
16168            # changes if the user runs `configure' with a different set of
16169            # switches.
16170
16171            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16172                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16173
16174
16175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16176$as_echo_n "checking for -l$bdb_libname... " >&6; }
16177                                    if eval "test \"\${$cache_id+set}\"" = set; then :
16178  $as_echo_n "(cached) " >&6
16179else
16180
16181
16182    apu_try_berkeley_db_save_libs="$LIBS"
16183
16184    apu_check_berkeley_db_major="${db_major}"
16185    apu_check_berkeley_db_minor="${db_minor}"
16186    apu_check_berkeley_db_patch="-1"
16187    apu_try_berkeley_db_header=$bdb_header
16188    apu_try_berkeley_db_libname=$bdb_libname
16189
16190    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16191    if test "$cross_compiling" = yes; then :
16192  apu_try_berkeley_db=yes
16193
16194else
16195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196/* end confdefs.h.  */
16197
16198#include <stdlib.h>
16199#include <stdio.h>
16200#include <$apu_try_berkeley_db_header>
16201main ()
16202{
16203  int major, minor, patch;
16204
16205  db_version(&major, &minor, &patch);
16206
16207  /* Sanity check: ensure that db.h constants actually match the db library */
16208  if (major != DB_VERSION_MAJOR
16209      || minor != DB_VERSION_MINOR
16210      || patch != DB_VERSION_PATCH)
16211    exit (1);
16212
16213  /* Run-time check:  ensure the library claims to be the correct version. */
16214
16215  if ($apu_check_berkeley_db_major != -1) {
16216    if (major < $apu_check_berkeley_db_major)
16217      exit (1);
16218    if (major > $apu_check_berkeley_db_major)
16219      exit (0);
16220  }
16221
16222  if ($apu_check_berkeley_db_minor != -1) {
16223    if (minor < $apu_check_berkeley_db_minor)
16224      exit (1);
16225    if (minor > $apu_check_berkeley_db_minor)
16226      exit (0);
16227  }
16228
16229  if ($apu_check_berkeley_db_patch == -1
16230      || patch >= $apu_check_berkeley_db_patch)
16231    exit (0);
16232  else
16233    exit (1);
16234}
16235
16236_ACEOF
16237if ac_fn_c_try_run "$LINENO"; then :
16238  apu_try_berkeley_db=yes
16239else
16240  apu_try_berkeley_db=no
16241fi
16242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16243  conftest.$ac_objext conftest.beam conftest.$ac_ext
16244fi
16245
16246
16247    LIBS="$apu_try_berkeley_db_save_libs"
16248
16249
16250                eval "$cache_id=$apu_try_berkeley_db"
16251
16252fi
16253
16254            result="`eval echo '$'$cache_id`"
16255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16256$as_echo "$result" >&6; }
16257          elif test ""${db_major}"" = "1"; then
16258            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16260$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16261if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
16262  $as_echo_n "(cached) " >&6
16263else
16264  ac_check_lib_save_LIBS=$LIBS
16265LIBS="-l$bdb_libname  $LIBS"
16266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h.  */
16268
16269/* Override any GCC internal prototype to avoid an error.
16270   Use char because int might match the return type of a GCC
16271   builtin and then its argument prototype would still apply.  */
16272#ifdef __cplusplus
16273extern "C"
16274#endif
16275char dbopen ();
16276int
16277main ()
16278{
16279return dbopen ();
16280  ;
16281  return 0;
16282}
16283_ACEOF
16284if ac_fn_c_try_link "$LINENO"; then :
16285  eval "$as_ac_Lib=yes"
16286else
16287  eval "$as_ac_Lib=no"
16288fi
16289rm -f core conftest.err conftest.$ac_objext \
16290    conftest$ac_exeext conftest.$ac_ext
16291LIBS=$ac_check_lib_save_LIBS
16292fi
16293eval ac_res=\$$as_ac_Lib
16294	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16295$as_echo "$ac_res" >&6; }
16296if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16297  result=yes
16298else
16299  result=no
16300
16301fi
16302
16303          elif test ""${db_major}"" = "2"; then
16304            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16306$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16307if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
16308  $as_echo_n "(cached) " >&6
16309else
16310  ac_check_lib_save_LIBS=$LIBS
16311LIBS="-l$bdb_libname  $LIBS"
16312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16313/* end confdefs.h.  */
16314
16315/* Override any GCC internal prototype to avoid an error.
16316   Use char because int might match the return type of a GCC
16317   builtin and then its argument prototype would still apply.  */
16318#ifdef __cplusplus
16319extern "C"
16320#endif
16321char db_open ();
16322int
16323main ()
16324{
16325return db_open ();
16326  ;
16327  return 0;
16328}
16329_ACEOF
16330if ac_fn_c_try_link "$LINENO"; then :
16331  eval "$as_ac_Lib=yes"
16332else
16333  eval "$as_ac_Lib=no"
16334fi
16335rm -f core conftest.err conftest.$ac_objext \
16336    conftest$ac_exeext conftest.$ac_ext
16337LIBS=$ac_check_lib_save_LIBS
16338fi
16339eval ac_res=\$$as_ac_Lib
16340	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16341$as_echo "$ac_res" >&6; }
16342if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16343  result=yes
16344else
16345  result=no
16346
16347fi
16348
16349          fi
16350
16351else
16352  result="no"
16353fi
16354
16355
16356
16357        # If we found it, no need to search any more.
16358        if test "$result" = "yes"; then
16359          found="$bdb_place"
16360          break
16361        fi
16362      done
16363      test "$found" != "not" && break
16364    done
16365    test "$found" != "not" && break
16366  done
16367
16368  # Restore the original values of the flags we tweak.
16369  LDFLAGS="$apu_check_lib_save_ldflags"
16370  CPPFLAGS="$apu_check_lib_save_cppflags"
16371
16372  case "$found" in
16373  "not")
16374    apu_have_db=0
16375    ;;
16376  "std")
16377    apu_db_header=$bdb_header
16378    apu_db_lib=$bdb_libname
16379    apu_have_db=1
16380    ;;
16381  *":"*)
16382    header="`echo $found | sed -e 's/:.*$//'`"
16383    lib="`echo $found | sed -e 's/^.*://'`"
16384
16385
16386  if test "x$APRUTIL_INCLUDES" = "x"; then
16387    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16388    APRUTIL_INCLUDES="-I$header"
16389  else
16390    apr_addto_bugger="-I$header"
16391    for i in $apr_addto_bugger; do
16392      apr_addto_duplicate="0"
16393      for j in $APRUTIL_INCLUDES; do
16394        if test "x$i" = "x$j"; then
16395          apr_addto_duplicate="1"
16396          break
16397        fi
16398      done
16399      if test $apr_addto_duplicate = "0"; then
16400        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16401        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16402      fi
16403    done
16404  fi
16405
16406
16407  if test "x$APRUTIL_LDFLAGS" = "x"; then
16408    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16409    APRUTIL_LDFLAGS="-L$lib"
16410  else
16411    apr_addto_bugger="-L$lib"
16412    for i in $apr_addto_bugger; do
16413      apr_addto_duplicate="0"
16414      for j in $APRUTIL_LDFLAGS; do
16415        if test "x$i" = "x$j"; then
16416          apr_addto_duplicate="1"
16417          break
16418        fi
16419      done
16420      if test $apr_addto_duplicate = "0"; then
16421        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16422        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16423      fi
16424    done
16425  fi
16426
16427    apu_db_header=$bdb_header
16428    apu_db_lib=$bdb_libname
16429    apu_have_db=1
16430    ;;
16431  *)
16432
16433  if test "x$APRUTIL_INCLUDES" = "x"; then
16434    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16435    APRUTIL_INCLUDES="-I$found/include"
16436  else
16437    apr_addto_bugger="-I$found/include"
16438    for i in $apr_addto_bugger; do
16439      apr_addto_duplicate="0"
16440      for j in $APRUTIL_INCLUDES; do
16441        if test "x$i" = "x$j"; then
16442          apr_addto_duplicate="1"
16443          break
16444        fi
16445      done
16446      if test $apr_addto_duplicate = "0"; then
16447        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16448        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16449      fi
16450    done
16451  fi
16452
16453
16454  if test "x$APRUTIL_LDFLAGS" = "x"; then
16455    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16456    APRUTIL_LDFLAGS="-L$found/lib"
16457  else
16458    apr_addto_bugger="-L$found/lib"
16459    for i in $apr_addto_bugger; do
16460      apr_addto_duplicate="0"
16461      for j in $APRUTIL_LDFLAGS; do
16462        if test "x$i" = "x$j"; then
16463          apr_addto_duplicate="1"
16464          break
16465        fi
16466      done
16467      if test $apr_addto_duplicate = "0"; then
16468        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16469        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16470      fi
16471    done
16472  fi
16473
16474    apu_db_header=$bdb_header
16475    apu_db_lib=$bdb_libname
16476    apu_have_db=1
16477    ;;
16478  esac
16479
16480  if test "$apu_have_db" = "1"; then
16481    apu_db_version=${db_major}
16482  fi
16483
16484      if test "$apu_have_db" = "1"; then
16485        break
16486      fi
16487      db_minor=`expr $db_minor - 1`
16488    done
16489    if test "$apu_db_version" != "$db_major"; then
16490      as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5
16491    fi
16492    ;;
16493  default)
16494
16495  all_places="$check_places"
16496
16497  # Start version search at version 5.9
16498  db_version=59
16499  while [ $db_version -ge 40 ]
16500  do
16501    db_major=`echo $db_version | sed -e 's/.$//'`
16502    db_minor=`echo $db_version | sed -e 's/.//'`
16503
16504  places="$all_places"
16505  db_major="$db_major"
16506  db_minor="$db_minor"
16507  if test -z "$places"; then
16508    places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
16509  fi
16510
16511  bdb_version="${db_major}"
16512  if test ""${db_minor}"" != "-1"; then
16513    bdb_version="$bdb_version."${db_minor}""
16514    if test ""-1"" != "-1"; then
16515      bdb_version="$bdb_version."-1""
16516    fi
16517  fi
16518  bdb_places="$places"
16519  bdb_default_search_headers="db${db_major}${db_minor}/db.h db${db_major}/db.h db.h"
16520  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"
16521
16522
16523  apu_have_db=0
16524
16525  # Save the original values of the flags we tweak.
16526  apu_check_lib_save_libs="$LIBS"
16527  apu_check_lib_save_ldflags="$LDFLAGS"
16528  apu_check_lib_save_cppflags="$CPPFLAGS"
16529
16530  # The variable `found' is the prefix under which we've found
16531  # Berkeley DB, or `not' if we haven't found it anywhere yet.
16532  found=not
16533  for bdb_place in $bdb_places; do
16534
16535    LDFLAGS="$apu_check_lib_save_ldflags"
16536    CPPFLAGS="$apu_check_lib_save_cppflags"
16537    case "$bdb_place" in
16538      "std" )
16539        description="the standard places"
16540      ;;
16541      *":"* )
16542        header="`echo $bdb_place | sed -e 's/:.*$//'`"
16543        lib="`echo $bdb_place | sed -e 's/^.*://'`"
16544        CPPFLAGS="$CPPFLAGS -I$header"
16545        LDFLAGS="$LDFLAGS -L$lib"
16546        description="$header and $lib"
16547      ;;
16548      * )
16549        if test -d $bdb_place; then
16550          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16551          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16552        else
16553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16554$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16555          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16556$as_echo "directory not found" >&6; }
16557          continue
16558        fi
16559        description="$bdb_place"
16560      ;;
16561    esac
16562
16563    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16564    # trick to display a message instead.
16565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16566$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16568$as_echo "" >&6; }
16569
16570    for bdb_libname in $bdb_default_search_lib_names; do
16571      for bdb_header in $bdb_default_search_headers; do
16572        # Clear the header cache variable for each location
16573
16574        cache_id="`echo ac_cv_header_${bdb_header} \
16575                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16576
16577        unset $cache_id
16578        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16579ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16581
16582          if test ""${db_major}"" = "3" -o ""${db_major}"" = "4" -o ""${db_major}"" = "5"; then
16583            # We generate a separate cache variable for each prefix and libname
16584            # we search under.  That way, we avoid caching information that
16585            # changes if the user runs `configure' with a different set of
16586            # switches.
16587
16588            cache_id="`echo apu_cv_check_berkeley_db_"${db_major}"_"${db_minor}"_"-1"_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16589                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16590
16591
16592            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16593$as_echo_n "checking for -l$bdb_libname... " >&6; }
16594                                    if eval "test \"\${$cache_id+set}\"" = set; then :
16595  $as_echo_n "(cached) " >&6
16596else
16597
16598
16599    apu_try_berkeley_db_save_libs="$LIBS"
16600
16601    apu_check_berkeley_db_major="${db_major}"
16602    apu_check_berkeley_db_minor="${db_minor}"
16603    apu_check_berkeley_db_patch="-1"
16604    apu_try_berkeley_db_header=$bdb_header
16605    apu_try_berkeley_db_libname=$bdb_libname
16606
16607    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
16608    if test "$cross_compiling" = yes; then :
16609  apu_try_berkeley_db=yes
16610
16611else
16612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16613/* end confdefs.h.  */
16614
16615#include <stdlib.h>
16616#include <stdio.h>
16617#include <$apu_try_berkeley_db_header>
16618main ()
16619{
16620  int major, minor, patch;
16621
16622  db_version(&major, &minor, &patch);
16623
16624  /* Sanity check: ensure that db.h constants actually match the db library */
16625  if (major != DB_VERSION_MAJOR
16626      || minor != DB_VERSION_MINOR
16627      || patch != DB_VERSION_PATCH)
16628    exit (1);
16629
16630  /* Run-time check:  ensure the library claims to be the correct version. */
16631
16632  if ($apu_check_berkeley_db_major != -1) {
16633    if (major < $apu_check_berkeley_db_major)
16634      exit (1);
16635    if (major > $apu_check_berkeley_db_major)
16636      exit (0);
16637  }
16638
16639  if ($apu_check_berkeley_db_minor != -1) {
16640    if (minor < $apu_check_berkeley_db_minor)
16641      exit (1);
16642    if (minor > $apu_check_berkeley_db_minor)
16643      exit (0);
16644  }
16645
16646  if ($apu_check_berkeley_db_patch == -1
16647      || patch >= $apu_check_berkeley_db_patch)
16648    exit (0);
16649  else
16650    exit (1);
16651}
16652
16653_ACEOF
16654if ac_fn_c_try_run "$LINENO"; then :
16655  apu_try_berkeley_db=yes
16656else
16657  apu_try_berkeley_db=no
16658fi
16659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16660  conftest.$ac_objext conftest.beam conftest.$ac_ext
16661fi
16662
16663
16664    LIBS="$apu_try_berkeley_db_save_libs"
16665
16666
16667                eval "$cache_id=$apu_try_berkeley_db"
16668
16669fi
16670
16671            result="`eval echo '$'$cache_id`"
16672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
16673$as_echo "$result" >&6; }
16674          elif test ""${db_major}"" = "1"; then
16675            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
16676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
16677$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
16678if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
16679  $as_echo_n "(cached) " >&6
16680else
16681  ac_check_lib_save_LIBS=$LIBS
16682LIBS="-l$bdb_libname  $LIBS"
16683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16684/* end confdefs.h.  */
16685
16686/* Override any GCC internal prototype to avoid an error.
16687   Use char because int might match the return type of a GCC
16688   builtin and then its argument prototype would still apply.  */
16689#ifdef __cplusplus
16690extern "C"
16691#endif
16692char dbopen ();
16693int
16694main ()
16695{
16696return dbopen ();
16697  ;
16698  return 0;
16699}
16700_ACEOF
16701if ac_fn_c_try_link "$LINENO"; then :
16702  eval "$as_ac_Lib=yes"
16703else
16704  eval "$as_ac_Lib=no"
16705fi
16706rm -f core conftest.err conftest.$ac_objext \
16707    conftest$ac_exeext conftest.$ac_ext
16708LIBS=$ac_check_lib_save_LIBS
16709fi
16710eval ac_res=\$$as_ac_Lib
16711	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16712$as_echo "$ac_res" >&6; }
16713if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16714  result=yes
16715else
16716  result=no
16717
16718fi
16719
16720          elif test ""${db_major}"" = "2"; then
16721            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
16722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
16723$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
16724if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
16725  $as_echo_n "(cached) " >&6
16726else
16727  ac_check_lib_save_LIBS=$LIBS
16728LIBS="-l$bdb_libname  $LIBS"
16729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16730/* end confdefs.h.  */
16731
16732/* Override any GCC internal prototype to avoid an error.
16733   Use char because int might match the return type of a GCC
16734   builtin and then its argument prototype would still apply.  */
16735#ifdef __cplusplus
16736extern "C"
16737#endif
16738char db_open ();
16739int
16740main ()
16741{
16742return db_open ();
16743  ;
16744  return 0;
16745}
16746_ACEOF
16747if ac_fn_c_try_link "$LINENO"; then :
16748  eval "$as_ac_Lib=yes"
16749else
16750  eval "$as_ac_Lib=no"
16751fi
16752rm -f core conftest.err conftest.$ac_objext \
16753    conftest$ac_exeext conftest.$ac_ext
16754LIBS=$ac_check_lib_save_LIBS
16755fi
16756eval ac_res=\$$as_ac_Lib
16757	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16758$as_echo "$ac_res" >&6; }
16759if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
16760  result=yes
16761else
16762  result=no
16763
16764fi
16765
16766          fi
16767
16768else
16769  result="no"
16770fi
16771
16772
16773
16774        # If we found it, no need to search any more.
16775        if test "$result" = "yes"; then
16776          found="$bdb_place"
16777          break
16778        fi
16779      done
16780      test "$found" != "not" && break
16781    done
16782    test "$found" != "not" && break
16783  done
16784
16785  # Restore the original values of the flags we tweak.
16786  LDFLAGS="$apu_check_lib_save_ldflags"
16787  CPPFLAGS="$apu_check_lib_save_cppflags"
16788
16789  case "$found" in
16790  "not")
16791    apu_have_db=0
16792    ;;
16793  "std")
16794    apu_db_header=$bdb_header
16795    apu_db_lib=$bdb_libname
16796    apu_have_db=1
16797    ;;
16798  *":"*)
16799    header="`echo $found | sed -e 's/:.*$//'`"
16800    lib="`echo $found | sed -e 's/^.*://'`"
16801
16802
16803  if test "x$APRUTIL_INCLUDES" = "x"; then
16804    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
16805    APRUTIL_INCLUDES="-I$header"
16806  else
16807    apr_addto_bugger="-I$header"
16808    for i in $apr_addto_bugger; do
16809      apr_addto_duplicate="0"
16810      for j in $APRUTIL_INCLUDES; do
16811        if test "x$i" = "x$j"; then
16812          apr_addto_duplicate="1"
16813          break
16814        fi
16815      done
16816      if test $apr_addto_duplicate = "0"; then
16817        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16818        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16819      fi
16820    done
16821  fi
16822
16823
16824  if test "x$APRUTIL_LDFLAGS" = "x"; then
16825    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
16826    APRUTIL_LDFLAGS="-L$lib"
16827  else
16828    apr_addto_bugger="-L$lib"
16829    for i in $apr_addto_bugger; do
16830      apr_addto_duplicate="0"
16831      for j in $APRUTIL_LDFLAGS; do
16832        if test "x$i" = "x$j"; then
16833          apr_addto_duplicate="1"
16834          break
16835        fi
16836      done
16837      if test $apr_addto_duplicate = "0"; then
16838        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16839        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16840      fi
16841    done
16842  fi
16843
16844    apu_db_header=$bdb_header
16845    apu_db_lib=$bdb_libname
16846    apu_have_db=1
16847    ;;
16848  *)
16849
16850  if test "x$APRUTIL_INCLUDES" = "x"; then
16851    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
16852    APRUTIL_INCLUDES="-I$found/include"
16853  else
16854    apr_addto_bugger="-I$found/include"
16855    for i in $apr_addto_bugger; do
16856      apr_addto_duplicate="0"
16857      for j in $APRUTIL_INCLUDES; do
16858        if test "x$i" = "x$j"; then
16859          apr_addto_duplicate="1"
16860          break
16861        fi
16862      done
16863      if test $apr_addto_duplicate = "0"; then
16864        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
16865        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
16866      fi
16867    done
16868  fi
16869
16870
16871  if test "x$APRUTIL_LDFLAGS" = "x"; then
16872    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
16873    APRUTIL_LDFLAGS="-L$found/lib"
16874  else
16875    apr_addto_bugger="-L$found/lib"
16876    for i in $apr_addto_bugger; do
16877      apr_addto_duplicate="0"
16878      for j in $APRUTIL_LDFLAGS; do
16879        if test "x$i" = "x$j"; then
16880          apr_addto_duplicate="1"
16881          break
16882        fi
16883      done
16884      if test $apr_addto_duplicate = "0"; then
16885        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
16886        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
16887      fi
16888    done
16889  fi
16890
16891    apu_db_header=$bdb_header
16892    apu_db_lib=$bdb_libname
16893    apu_have_db=1
16894    ;;
16895  esac
16896
16897  if test "$apu_have_db" = "1"; then
16898    apu_db_version=${db_major}
16899  fi
16900
16901    if test "$apu_have_db" = "1"; then
16902      break
16903    fi
16904    db_version=`expr $db_version - 1`
16905  done
16906  if test "$apu_have_db" = "0"; then
16907
16908  places="$all_places"
16909  if test -z "$places"; then
16910    places="std"
16911  fi
16912
16913  bdb_version=3
16914  if test "-1" != "-1"; then
16915    bdb_version="$bdb_version.-1"
16916    if test "-1" != "-1"; then
16917      bdb_version="$bdb_version.-1"
16918    fi
16919  fi
16920  bdb_places="$places"
16921  bdb_default_search_headers="db3/db.h db.h"
16922  bdb_default_search_lib_names="db3 db"
16923
16924
16925  apu_have_db=0
16926
16927  # Save the original values of the flags we tweak.
16928  apu_check_lib_save_libs="$LIBS"
16929  apu_check_lib_save_ldflags="$LDFLAGS"
16930  apu_check_lib_save_cppflags="$CPPFLAGS"
16931
16932  # The variable `found' is the prefix under which we've found
16933  # Berkeley DB, or `not' if we haven't found it anywhere yet.
16934  found=not
16935  for bdb_place in $bdb_places; do
16936
16937    LDFLAGS="$apu_check_lib_save_ldflags"
16938    CPPFLAGS="$apu_check_lib_save_cppflags"
16939    case "$bdb_place" in
16940      "std" )
16941        description="the standard places"
16942      ;;
16943      *":"* )
16944        header="`echo $bdb_place | sed -e 's/:.*$//'`"
16945        lib="`echo $bdb_place | sed -e 's/^.*://'`"
16946        CPPFLAGS="$CPPFLAGS -I$header"
16947        LDFLAGS="$LDFLAGS -L$lib"
16948        description="$header and $lib"
16949      ;;
16950      * )
16951        if test -d $bdb_place; then
16952          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
16953          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
16954        else
16955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
16956$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
16957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
16958$as_echo "directory not found" >&6; }
16959          continue
16960        fi
16961        description="$bdb_place"
16962      ;;
16963    esac
16964
16965    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
16966    # trick to display a message instead.
16967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
16968$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
16969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
16970$as_echo "" >&6; }
16971
16972    for bdb_libname in $bdb_default_search_lib_names; do
16973      for bdb_header in $bdb_default_search_headers; do
16974        # Clear the header cache variable for each location
16975
16976        cache_id="`echo ac_cv_header_${bdb_header} \
16977                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16978
16979        unset $cache_id
16980        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
16981ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
16982if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16983
16984          if test "3" = "3" -o "3" = "4" -o "3" = "5"; then
16985            # We generate a separate cache variable for each prefix and libname
16986            # we search under.  That way, we avoid caching information that
16987            # changes if the user runs `configure' with a different set of
16988            # switches.
16989
16990            cache_id="`echo apu_cv_check_berkeley_db_3_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
16991                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
16992
16993
16994            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
16995$as_echo_n "checking for -l$bdb_libname... " >&6; }
16996                                    if eval "test \"\${$cache_id+set}\"" = set; then :
16997  $as_echo_n "(cached) " >&6
16998else
16999
17000
17001    apu_try_berkeley_db_save_libs="$LIBS"
17002
17003    apu_check_berkeley_db_major=3
17004    apu_check_berkeley_db_minor=-1
17005    apu_check_berkeley_db_patch=-1
17006    apu_try_berkeley_db_header=$bdb_header
17007    apu_try_berkeley_db_libname=$bdb_libname
17008
17009    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17010    if test "$cross_compiling" = yes; then :
17011  apu_try_berkeley_db=yes
17012
17013else
17014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17015/* end confdefs.h.  */
17016
17017#include <stdlib.h>
17018#include <stdio.h>
17019#include <$apu_try_berkeley_db_header>
17020main ()
17021{
17022  int major, minor, patch;
17023
17024  db_version(&major, &minor, &patch);
17025
17026  /* Sanity check: ensure that db.h constants actually match the db library */
17027  if (major != DB_VERSION_MAJOR
17028      || minor != DB_VERSION_MINOR
17029      || patch != DB_VERSION_PATCH)
17030    exit (1);
17031
17032  /* Run-time check:  ensure the library claims to be the correct version. */
17033
17034  if ($apu_check_berkeley_db_major != -1) {
17035    if (major < $apu_check_berkeley_db_major)
17036      exit (1);
17037    if (major > $apu_check_berkeley_db_major)
17038      exit (0);
17039  }
17040
17041  if ($apu_check_berkeley_db_minor != -1) {
17042    if (minor < $apu_check_berkeley_db_minor)
17043      exit (1);
17044    if (minor > $apu_check_berkeley_db_minor)
17045      exit (0);
17046  }
17047
17048  if ($apu_check_berkeley_db_patch == -1
17049      || patch >= $apu_check_berkeley_db_patch)
17050    exit (0);
17051  else
17052    exit (1);
17053}
17054
17055_ACEOF
17056if ac_fn_c_try_run "$LINENO"; then :
17057  apu_try_berkeley_db=yes
17058else
17059  apu_try_berkeley_db=no
17060fi
17061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17062  conftest.$ac_objext conftest.beam conftest.$ac_ext
17063fi
17064
17065
17066    LIBS="$apu_try_berkeley_db_save_libs"
17067
17068
17069                eval "$cache_id=$apu_try_berkeley_db"
17070
17071fi
17072
17073            result="`eval echo '$'$cache_id`"
17074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17075$as_echo "$result" >&6; }
17076          elif test "3" = "1"; then
17077            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17079$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17080if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
17081  $as_echo_n "(cached) " >&6
17082else
17083  ac_check_lib_save_LIBS=$LIBS
17084LIBS="-l$bdb_libname  $LIBS"
17085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17086/* end confdefs.h.  */
17087
17088/* Override any GCC internal prototype to avoid an error.
17089   Use char because int might match the return type of a GCC
17090   builtin and then its argument prototype would still apply.  */
17091#ifdef __cplusplus
17092extern "C"
17093#endif
17094char dbopen ();
17095int
17096main ()
17097{
17098return dbopen ();
17099  ;
17100  return 0;
17101}
17102_ACEOF
17103if ac_fn_c_try_link "$LINENO"; then :
17104  eval "$as_ac_Lib=yes"
17105else
17106  eval "$as_ac_Lib=no"
17107fi
17108rm -f core conftest.err conftest.$ac_objext \
17109    conftest$ac_exeext conftest.$ac_ext
17110LIBS=$ac_check_lib_save_LIBS
17111fi
17112eval ac_res=\$$as_ac_Lib
17113	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17114$as_echo "$ac_res" >&6; }
17115if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17116  result=yes
17117else
17118  result=no
17119
17120fi
17121
17122          elif test "3" = "2"; then
17123            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17125$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17126if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
17127  $as_echo_n "(cached) " >&6
17128else
17129  ac_check_lib_save_LIBS=$LIBS
17130LIBS="-l$bdb_libname  $LIBS"
17131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17132/* end confdefs.h.  */
17133
17134/* Override any GCC internal prototype to avoid an error.
17135   Use char because int might match the return type of a GCC
17136   builtin and then its argument prototype would still apply.  */
17137#ifdef __cplusplus
17138extern "C"
17139#endif
17140char db_open ();
17141int
17142main ()
17143{
17144return db_open ();
17145  ;
17146  return 0;
17147}
17148_ACEOF
17149if ac_fn_c_try_link "$LINENO"; then :
17150  eval "$as_ac_Lib=yes"
17151else
17152  eval "$as_ac_Lib=no"
17153fi
17154rm -f core conftest.err conftest.$ac_objext \
17155    conftest$ac_exeext conftest.$ac_ext
17156LIBS=$ac_check_lib_save_LIBS
17157fi
17158eval ac_res=\$$as_ac_Lib
17159	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17160$as_echo "$ac_res" >&6; }
17161if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17162  result=yes
17163else
17164  result=no
17165
17166fi
17167
17168          fi
17169
17170else
17171  result="no"
17172fi
17173
17174
17175
17176        # If we found it, no need to search any more.
17177        if test "$result" = "yes"; then
17178          found="$bdb_place"
17179          break
17180        fi
17181      done
17182      test "$found" != "not" && break
17183    done
17184    test "$found" != "not" && break
17185  done
17186
17187  # Restore the original values of the flags we tweak.
17188  LDFLAGS="$apu_check_lib_save_ldflags"
17189  CPPFLAGS="$apu_check_lib_save_cppflags"
17190
17191  case "$found" in
17192  "not")
17193    apu_have_db=0
17194    ;;
17195  "std")
17196    apu_db_header=$bdb_header
17197    apu_db_lib=$bdb_libname
17198    apu_have_db=1
17199    ;;
17200  *":"*)
17201    header="`echo $found | sed -e 's/:.*$//'`"
17202    lib="`echo $found | sed -e 's/^.*://'`"
17203
17204
17205  if test "x$APRUTIL_INCLUDES" = "x"; then
17206    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17207    APRUTIL_INCLUDES="-I$header"
17208  else
17209    apr_addto_bugger="-I$header"
17210    for i in $apr_addto_bugger; do
17211      apr_addto_duplicate="0"
17212      for j in $APRUTIL_INCLUDES; do
17213        if test "x$i" = "x$j"; then
17214          apr_addto_duplicate="1"
17215          break
17216        fi
17217      done
17218      if test $apr_addto_duplicate = "0"; then
17219        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17220        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17221      fi
17222    done
17223  fi
17224
17225
17226  if test "x$APRUTIL_LDFLAGS" = "x"; then
17227    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17228    APRUTIL_LDFLAGS="-L$lib"
17229  else
17230    apr_addto_bugger="-L$lib"
17231    for i in $apr_addto_bugger; do
17232      apr_addto_duplicate="0"
17233      for j in $APRUTIL_LDFLAGS; do
17234        if test "x$i" = "x$j"; then
17235          apr_addto_duplicate="1"
17236          break
17237        fi
17238      done
17239      if test $apr_addto_duplicate = "0"; then
17240        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17241        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17242      fi
17243    done
17244  fi
17245
17246    apu_db_header=$bdb_header
17247    apu_db_lib=$bdb_libname
17248    apu_have_db=1
17249    ;;
17250  *)
17251
17252  if test "x$APRUTIL_INCLUDES" = "x"; then
17253    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17254    APRUTIL_INCLUDES="-I$found/include"
17255  else
17256    apr_addto_bugger="-I$found/include"
17257    for i in $apr_addto_bugger; do
17258      apr_addto_duplicate="0"
17259      for j in $APRUTIL_INCLUDES; do
17260        if test "x$i" = "x$j"; then
17261          apr_addto_duplicate="1"
17262          break
17263        fi
17264      done
17265      if test $apr_addto_duplicate = "0"; then
17266        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17267        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17268      fi
17269    done
17270  fi
17271
17272
17273  if test "x$APRUTIL_LDFLAGS" = "x"; then
17274    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17275    APRUTIL_LDFLAGS="-L$found/lib"
17276  else
17277    apr_addto_bugger="-L$found/lib"
17278    for i in $apr_addto_bugger; do
17279      apr_addto_duplicate="0"
17280      for j in $APRUTIL_LDFLAGS; do
17281        if test "x$i" = "x$j"; then
17282          apr_addto_duplicate="1"
17283          break
17284        fi
17285      done
17286      if test $apr_addto_duplicate = "0"; then
17287        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17288        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17289      fi
17290    done
17291  fi
17292
17293    apu_db_header=$bdb_header
17294    apu_db_lib=$bdb_libname
17295    apu_have_db=1
17296    ;;
17297  esac
17298
17299  if test "$apu_have_db" = "1"; then
17300    apu_db_version=3
17301  fi
17302
17303  fi
17304  if test "$apu_have_db" = "0"; then
17305
17306  places="$all_places"
17307  if test -z "$places"; then
17308    places="std"
17309  fi
17310
17311  bdb_version=2
17312  if test "-1" != "-1"; then
17313    bdb_version="$bdb_version.-1"
17314    if test "-1" != "-1"; then
17315      bdb_version="$bdb_version.-1"
17316    fi
17317  fi
17318  bdb_places="$places"
17319  bdb_default_search_headers="db2/db.h db.h"
17320  bdb_default_search_lib_names="db2 db"
17321
17322
17323  apu_have_db=0
17324
17325  # Save the original values of the flags we tweak.
17326  apu_check_lib_save_libs="$LIBS"
17327  apu_check_lib_save_ldflags="$LDFLAGS"
17328  apu_check_lib_save_cppflags="$CPPFLAGS"
17329
17330  # The variable `found' is the prefix under which we've found
17331  # Berkeley DB, or `not' if we haven't found it anywhere yet.
17332  found=not
17333  for bdb_place in $bdb_places; do
17334
17335    LDFLAGS="$apu_check_lib_save_ldflags"
17336    CPPFLAGS="$apu_check_lib_save_cppflags"
17337    case "$bdb_place" in
17338      "std" )
17339        description="the standard places"
17340      ;;
17341      *":"* )
17342        header="`echo $bdb_place | sed -e 's/:.*$//'`"
17343        lib="`echo $bdb_place | sed -e 's/^.*://'`"
17344        CPPFLAGS="$CPPFLAGS -I$header"
17345        LDFLAGS="$LDFLAGS -L$lib"
17346        description="$header and $lib"
17347      ;;
17348      * )
17349        if test -d $bdb_place; then
17350          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17351          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17352        else
17353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17354$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17356$as_echo "directory not found" >&6; }
17357          continue
17358        fi
17359        description="$bdb_place"
17360      ;;
17361    esac
17362
17363    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17364    # trick to display a message instead.
17365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17366$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17368$as_echo "" >&6; }
17369
17370    for bdb_libname in $bdb_default_search_lib_names; do
17371      for bdb_header in $bdb_default_search_headers; do
17372        # Clear the header cache variable for each location
17373
17374        cache_id="`echo ac_cv_header_${bdb_header} \
17375                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17376
17377        unset $cache_id
17378        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17379ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17380if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17381
17382          if test "2" = "3" -o "2" = "4" -o "2" = "5"; then
17383            # We generate a separate cache variable for each prefix and libname
17384            # we search under.  That way, we avoid caching information that
17385            # changes if the user runs `configure' with a different set of
17386            # switches.
17387
17388            cache_id="`echo apu_cv_check_berkeley_db_2_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17389                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17390
17391
17392            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17393$as_echo_n "checking for -l$bdb_libname... " >&6; }
17394                                    if eval "test \"\${$cache_id+set}\"" = set; then :
17395  $as_echo_n "(cached) " >&6
17396else
17397
17398
17399    apu_try_berkeley_db_save_libs="$LIBS"
17400
17401    apu_check_berkeley_db_major=2
17402    apu_check_berkeley_db_minor=-1
17403    apu_check_berkeley_db_patch=-1
17404    apu_try_berkeley_db_header=$bdb_header
17405    apu_try_berkeley_db_libname=$bdb_libname
17406
17407    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17408    if test "$cross_compiling" = yes; then :
17409  apu_try_berkeley_db=yes
17410
17411else
17412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17413/* end confdefs.h.  */
17414
17415#include <stdlib.h>
17416#include <stdio.h>
17417#include <$apu_try_berkeley_db_header>
17418main ()
17419{
17420  int major, minor, patch;
17421
17422  db_version(&major, &minor, &patch);
17423
17424  /* Sanity check: ensure that db.h constants actually match the db library */
17425  if (major != DB_VERSION_MAJOR
17426      || minor != DB_VERSION_MINOR
17427      || patch != DB_VERSION_PATCH)
17428    exit (1);
17429
17430  /* Run-time check:  ensure the library claims to be the correct version. */
17431
17432  if ($apu_check_berkeley_db_major != -1) {
17433    if (major < $apu_check_berkeley_db_major)
17434      exit (1);
17435    if (major > $apu_check_berkeley_db_major)
17436      exit (0);
17437  }
17438
17439  if ($apu_check_berkeley_db_minor != -1) {
17440    if (minor < $apu_check_berkeley_db_minor)
17441      exit (1);
17442    if (minor > $apu_check_berkeley_db_minor)
17443      exit (0);
17444  }
17445
17446  if ($apu_check_berkeley_db_patch == -1
17447      || patch >= $apu_check_berkeley_db_patch)
17448    exit (0);
17449  else
17450    exit (1);
17451}
17452
17453_ACEOF
17454if ac_fn_c_try_run "$LINENO"; then :
17455  apu_try_berkeley_db=yes
17456else
17457  apu_try_berkeley_db=no
17458fi
17459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17460  conftest.$ac_objext conftest.beam conftest.$ac_ext
17461fi
17462
17463
17464    LIBS="$apu_try_berkeley_db_save_libs"
17465
17466
17467                eval "$cache_id=$apu_try_berkeley_db"
17468
17469fi
17470
17471            result="`eval echo '$'$cache_id`"
17472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17473$as_echo "$result" >&6; }
17474          elif test "2" = "1"; then
17475            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17477$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17478if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
17479  $as_echo_n "(cached) " >&6
17480else
17481  ac_check_lib_save_LIBS=$LIBS
17482LIBS="-l$bdb_libname  $LIBS"
17483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17484/* end confdefs.h.  */
17485
17486/* Override any GCC internal prototype to avoid an error.
17487   Use char because int might match the return type of a GCC
17488   builtin and then its argument prototype would still apply.  */
17489#ifdef __cplusplus
17490extern "C"
17491#endif
17492char dbopen ();
17493int
17494main ()
17495{
17496return dbopen ();
17497  ;
17498  return 0;
17499}
17500_ACEOF
17501if ac_fn_c_try_link "$LINENO"; then :
17502  eval "$as_ac_Lib=yes"
17503else
17504  eval "$as_ac_Lib=no"
17505fi
17506rm -f core conftest.err conftest.$ac_objext \
17507    conftest$ac_exeext conftest.$ac_ext
17508LIBS=$ac_check_lib_save_LIBS
17509fi
17510eval ac_res=\$$as_ac_Lib
17511	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17512$as_echo "$ac_res" >&6; }
17513if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17514  result=yes
17515else
17516  result=no
17517
17518fi
17519
17520          elif test "2" = "2"; then
17521            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17523$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17524if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
17525  $as_echo_n "(cached) " >&6
17526else
17527  ac_check_lib_save_LIBS=$LIBS
17528LIBS="-l$bdb_libname  $LIBS"
17529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17530/* end confdefs.h.  */
17531
17532/* Override any GCC internal prototype to avoid an error.
17533   Use char because int might match the return type of a GCC
17534   builtin and then its argument prototype would still apply.  */
17535#ifdef __cplusplus
17536extern "C"
17537#endif
17538char db_open ();
17539int
17540main ()
17541{
17542return db_open ();
17543  ;
17544  return 0;
17545}
17546_ACEOF
17547if ac_fn_c_try_link "$LINENO"; then :
17548  eval "$as_ac_Lib=yes"
17549else
17550  eval "$as_ac_Lib=no"
17551fi
17552rm -f core conftest.err conftest.$ac_objext \
17553    conftest$ac_exeext conftest.$ac_ext
17554LIBS=$ac_check_lib_save_LIBS
17555fi
17556eval ac_res=\$$as_ac_Lib
17557	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17558$as_echo "$ac_res" >&6; }
17559if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17560  result=yes
17561else
17562  result=no
17563
17564fi
17565
17566          fi
17567
17568else
17569  result="no"
17570fi
17571
17572
17573
17574        # If we found it, no need to search any more.
17575        if test "$result" = "yes"; then
17576          found="$bdb_place"
17577          break
17578        fi
17579      done
17580      test "$found" != "not" && break
17581    done
17582    test "$found" != "not" && break
17583  done
17584
17585  # Restore the original values of the flags we tweak.
17586  LDFLAGS="$apu_check_lib_save_ldflags"
17587  CPPFLAGS="$apu_check_lib_save_cppflags"
17588
17589  case "$found" in
17590  "not")
17591    apu_have_db=0
17592    ;;
17593  "std")
17594    apu_db_header=$bdb_header
17595    apu_db_lib=$bdb_libname
17596    apu_have_db=1
17597    ;;
17598  *":"*)
17599    header="`echo $found | sed -e 's/:.*$//'`"
17600    lib="`echo $found | sed -e 's/^.*://'`"
17601
17602
17603  if test "x$APRUTIL_INCLUDES" = "x"; then
17604    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
17605    APRUTIL_INCLUDES="-I$header"
17606  else
17607    apr_addto_bugger="-I$header"
17608    for i in $apr_addto_bugger; do
17609      apr_addto_duplicate="0"
17610      for j in $APRUTIL_INCLUDES; do
17611        if test "x$i" = "x$j"; then
17612          apr_addto_duplicate="1"
17613          break
17614        fi
17615      done
17616      if test $apr_addto_duplicate = "0"; then
17617        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17618        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17619      fi
17620    done
17621  fi
17622
17623
17624  if test "x$APRUTIL_LDFLAGS" = "x"; then
17625    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
17626    APRUTIL_LDFLAGS="-L$lib"
17627  else
17628    apr_addto_bugger="-L$lib"
17629    for i in $apr_addto_bugger; do
17630      apr_addto_duplicate="0"
17631      for j in $APRUTIL_LDFLAGS; do
17632        if test "x$i" = "x$j"; then
17633          apr_addto_duplicate="1"
17634          break
17635        fi
17636      done
17637      if test $apr_addto_duplicate = "0"; then
17638        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17639        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17640      fi
17641    done
17642  fi
17643
17644    apu_db_header=$bdb_header
17645    apu_db_lib=$bdb_libname
17646    apu_have_db=1
17647    ;;
17648  *)
17649
17650  if test "x$APRUTIL_INCLUDES" = "x"; then
17651    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
17652    APRUTIL_INCLUDES="-I$found/include"
17653  else
17654    apr_addto_bugger="-I$found/include"
17655    for i in $apr_addto_bugger; do
17656      apr_addto_duplicate="0"
17657      for j in $APRUTIL_INCLUDES; do
17658        if test "x$i" = "x$j"; then
17659          apr_addto_duplicate="1"
17660          break
17661        fi
17662      done
17663      if test $apr_addto_duplicate = "0"; then
17664        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
17665        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
17666      fi
17667    done
17668  fi
17669
17670
17671  if test "x$APRUTIL_LDFLAGS" = "x"; then
17672    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
17673    APRUTIL_LDFLAGS="-L$found/lib"
17674  else
17675    apr_addto_bugger="-L$found/lib"
17676    for i in $apr_addto_bugger; do
17677      apr_addto_duplicate="0"
17678      for j in $APRUTIL_LDFLAGS; do
17679        if test "x$i" = "x$j"; then
17680          apr_addto_duplicate="1"
17681          break
17682        fi
17683      done
17684      if test $apr_addto_duplicate = "0"; then
17685        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
17686        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
17687      fi
17688    done
17689  fi
17690
17691    apu_db_header=$bdb_header
17692    apu_db_lib=$bdb_libname
17693    apu_have_db=1
17694    ;;
17695  esac
17696
17697  if test "$apu_have_db" = "1"; then
17698    apu_db_version=2
17699  fi
17700
17701  fi
17702  if test "$apu_have_db" = "0"; then
17703
17704  places="$all_places"
17705  if test -z "$places"; then
17706    places="std"
17707  fi
17708
17709  bdb_version=1
17710  if test "0" != "-1"; then
17711    bdb_version="$bdb_version.0"
17712    if test "0" != "-1"; then
17713      bdb_version="$bdb_version.0"
17714    fi
17715  fi
17716  bdb_places="$places"
17717  bdb_default_search_headers="db1/db.h db.h"
17718  bdb_default_search_lib_names="db1"
17719
17720
17721  apu_have_db=0
17722
17723  # Save the original values of the flags we tweak.
17724  apu_check_lib_save_libs="$LIBS"
17725  apu_check_lib_save_ldflags="$LDFLAGS"
17726  apu_check_lib_save_cppflags="$CPPFLAGS"
17727
17728  # The variable `found' is the prefix under which we've found
17729  # Berkeley DB, or `not' if we haven't found it anywhere yet.
17730  found=not
17731  for bdb_place in $bdb_places; do
17732
17733    LDFLAGS="$apu_check_lib_save_ldflags"
17734    CPPFLAGS="$apu_check_lib_save_cppflags"
17735    case "$bdb_place" in
17736      "std" )
17737        description="the standard places"
17738      ;;
17739      *":"* )
17740        header="`echo $bdb_place | sed -e 's/:.*$//'`"
17741        lib="`echo $bdb_place | sed -e 's/^.*://'`"
17742        CPPFLAGS="$CPPFLAGS -I$header"
17743        LDFLAGS="$LDFLAGS -L$lib"
17744        description="$header and $lib"
17745      ;;
17746      * )
17747        if test -d $bdb_place; then
17748          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
17749          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
17750        else
17751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
17752$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
17753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
17754$as_echo "directory not found" >&6; }
17755          continue
17756        fi
17757        description="$bdb_place"
17758      ;;
17759    esac
17760
17761    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
17762    # trick to display a message instead.
17763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
17764$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
17765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
17766$as_echo "" >&6; }
17767
17768    for bdb_libname in $bdb_default_search_lib_names; do
17769      for bdb_header in $bdb_default_search_headers; do
17770        # Clear the header cache variable for each location
17771
17772        cache_id="`echo ac_cv_header_${bdb_header} \
17773                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17774
17775        unset $cache_id
17776        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
17777ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
17778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17779
17780          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
17781            # We generate a separate cache variable for each prefix and libname
17782            # we search under.  That way, we avoid caching information that
17783            # changes if the user runs `configure' with a different set of
17784            # switches.
17785
17786            cache_id="`echo apu_cv_check_berkeley_db_1_0_0_${bdb_header}_${bdb_libname}_in_${bdb_place} \
17787                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
17788
17789
17790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
17791$as_echo_n "checking for -l$bdb_libname... " >&6; }
17792                                    if eval "test \"\${$cache_id+set}\"" = set; then :
17793  $as_echo_n "(cached) " >&6
17794else
17795
17796
17797    apu_try_berkeley_db_save_libs="$LIBS"
17798
17799    apu_check_berkeley_db_major=1
17800    apu_check_berkeley_db_minor=0
17801    apu_check_berkeley_db_patch=0
17802    apu_try_berkeley_db_header=$bdb_header
17803    apu_try_berkeley_db_libname=$bdb_libname
17804
17805    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
17806    if test "$cross_compiling" = yes; then :
17807  apu_try_berkeley_db=yes
17808
17809else
17810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17811/* end confdefs.h.  */
17812
17813#include <stdlib.h>
17814#include <stdio.h>
17815#include <$apu_try_berkeley_db_header>
17816main ()
17817{
17818  int major, minor, patch;
17819
17820  db_version(&major, &minor, &patch);
17821
17822  /* Sanity check: ensure that db.h constants actually match the db library */
17823  if (major != DB_VERSION_MAJOR
17824      || minor != DB_VERSION_MINOR
17825      || patch != DB_VERSION_PATCH)
17826    exit (1);
17827
17828  /* Run-time check:  ensure the library claims to be the correct version. */
17829
17830  if ($apu_check_berkeley_db_major != -1) {
17831    if (major < $apu_check_berkeley_db_major)
17832      exit (1);
17833    if (major > $apu_check_berkeley_db_major)
17834      exit (0);
17835  }
17836
17837  if ($apu_check_berkeley_db_minor != -1) {
17838    if (minor < $apu_check_berkeley_db_minor)
17839      exit (1);
17840    if (minor > $apu_check_berkeley_db_minor)
17841      exit (0);
17842  }
17843
17844  if ($apu_check_berkeley_db_patch == -1
17845      || patch >= $apu_check_berkeley_db_patch)
17846    exit (0);
17847  else
17848    exit (1);
17849}
17850
17851_ACEOF
17852if ac_fn_c_try_run "$LINENO"; then :
17853  apu_try_berkeley_db=yes
17854else
17855  apu_try_berkeley_db=no
17856fi
17857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17858  conftest.$ac_objext conftest.beam conftest.$ac_ext
17859fi
17860
17861
17862    LIBS="$apu_try_berkeley_db_save_libs"
17863
17864
17865                eval "$cache_id=$apu_try_berkeley_db"
17866
17867fi
17868
17869            result="`eval echo '$'$cache_id`"
17870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
17871$as_echo "$result" >&6; }
17872          elif test "1" = "1"; then
17873            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
17874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
17875$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
17876if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
17877  $as_echo_n "(cached) " >&6
17878else
17879  ac_check_lib_save_LIBS=$LIBS
17880LIBS="-l$bdb_libname  $LIBS"
17881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17882/* end confdefs.h.  */
17883
17884/* Override any GCC internal prototype to avoid an error.
17885   Use char because int might match the return type of a GCC
17886   builtin and then its argument prototype would still apply.  */
17887#ifdef __cplusplus
17888extern "C"
17889#endif
17890char dbopen ();
17891int
17892main ()
17893{
17894return dbopen ();
17895  ;
17896  return 0;
17897}
17898_ACEOF
17899if ac_fn_c_try_link "$LINENO"; then :
17900  eval "$as_ac_Lib=yes"
17901else
17902  eval "$as_ac_Lib=no"
17903fi
17904rm -f core conftest.err conftest.$ac_objext \
17905    conftest$ac_exeext conftest.$ac_ext
17906LIBS=$ac_check_lib_save_LIBS
17907fi
17908eval ac_res=\$$as_ac_Lib
17909	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17910$as_echo "$ac_res" >&6; }
17911if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17912  result=yes
17913else
17914  result=no
17915
17916fi
17917
17918          elif test "1" = "2"; then
17919            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
17920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
17921$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
17922if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
17923  $as_echo_n "(cached) " >&6
17924else
17925  ac_check_lib_save_LIBS=$LIBS
17926LIBS="-l$bdb_libname  $LIBS"
17927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17928/* end confdefs.h.  */
17929
17930/* Override any GCC internal prototype to avoid an error.
17931   Use char because int might match the return type of a GCC
17932   builtin and then its argument prototype would still apply.  */
17933#ifdef __cplusplus
17934extern "C"
17935#endif
17936char db_open ();
17937int
17938main ()
17939{
17940return db_open ();
17941  ;
17942  return 0;
17943}
17944_ACEOF
17945if ac_fn_c_try_link "$LINENO"; then :
17946  eval "$as_ac_Lib=yes"
17947else
17948  eval "$as_ac_Lib=no"
17949fi
17950rm -f core conftest.err conftest.$ac_objext \
17951    conftest$ac_exeext conftest.$ac_ext
17952LIBS=$ac_check_lib_save_LIBS
17953fi
17954eval ac_res=\$$as_ac_Lib
17955	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17956$as_echo "$ac_res" >&6; }
17957if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
17958  result=yes
17959else
17960  result=no
17961
17962fi
17963
17964          fi
17965
17966else
17967  result="no"
17968fi
17969
17970
17971
17972        # If we found it, no need to search any more.
17973        if test "$result" = "yes"; then
17974          found="$bdb_place"
17975          break
17976        fi
17977      done
17978      test "$found" != "not" && break
17979    done
17980    test "$found" != "not" && break
17981  done
17982
17983  # Restore the original values of the flags we tweak.
17984  LDFLAGS="$apu_check_lib_save_ldflags"
17985  CPPFLAGS="$apu_check_lib_save_cppflags"
17986
17987  case "$found" in
17988  "not")
17989    apu_have_db=0
17990    ;;
17991  "std")
17992    apu_db_header=$bdb_header
17993    apu_db_lib=$bdb_libname
17994    apu_have_db=1
17995    ;;
17996  *":"*)
17997    header="`echo $found | sed -e 's/:.*$//'`"
17998    lib="`echo $found | sed -e 's/^.*://'`"
17999
18000
18001  if test "x$APRUTIL_INCLUDES" = "x"; then
18002    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
18003    APRUTIL_INCLUDES="-I$header"
18004  else
18005    apr_addto_bugger="-I$header"
18006    for i in $apr_addto_bugger; do
18007      apr_addto_duplicate="0"
18008      for j in $APRUTIL_INCLUDES; do
18009        if test "x$i" = "x$j"; then
18010          apr_addto_duplicate="1"
18011          break
18012        fi
18013      done
18014      if test $apr_addto_duplicate = "0"; then
18015        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18016        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18017      fi
18018    done
18019  fi
18020
18021
18022  if test "x$APRUTIL_LDFLAGS" = "x"; then
18023    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
18024    APRUTIL_LDFLAGS="-L$lib"
18025  else
18026    apr_addto_bugger="-L$lib"
18027    for i in $apr_addto_bugger; do
18028      apr_addto_duplicate="0"
18029      for j in $APRUTIL_LDFLAGS; do
18030        if test "x$i" = "x$j"; then
18031          apr_addto_duplicate="1"
18032          break
18033        fi
18034      done
18035      if test $apr_addto_duplicate = "0"; then
18036        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18037        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18038      fi
18039    done
18040  fi
18041
18042    apu_db_header=$bdb_header
18043    apu_db_lib=$bdb_libname
18044    apu_have_db=1
18045    ;;
18046  *)
18047
18048  if test "x$APRUTIL_INCLUDES" = "x"; then
18049    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
18050    APRUTIL_INCLUDES="-I$found/include"
18051  else
18052    apr_addto_bugger="-I$found/include"
18053    for i in $apr_addto_bugger; do
18054      apr_addto_duplicate="0"
18055      for j in $APRUTIL_INCLUDES; do
18056        if test "x$i" = "x$j"; then
18057          apr_addto_duplicate="1"
18058          break
18059        fi
18060      done
18061      if test $apr_addto_duplicate = "0"; then
18062        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18063        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18064      fi
18065    done
18066  fi
18067
18068
18069  if test "x$APRUTIL_LDFLAGS" = "x"; then
18070    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
18071    APRUTIL_LDFLAGS="-L$found/lib"
18072  else
18073    apr_addto_bugger="-L$found/lib"
18074    for i in $apr_addto_bugger; do
18075      apr_addto_duplicate="0"
18076      for j in $APRUTIL_LDFLAGS; do
18077        if test "x$i" = "x$j"; then
18078          apr_addto_duplicate="1"
18079          break
18080        fi
18081      done
18082      if test $apr_addto_duplicate = "0"; then
18083        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18084        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18085      fi
18086    done
18087  fi
18088
18089    apu_db_header=$bdb_header
18090    apu_db_lib=$bdb_libname
18091    apu_have_db=1
18092    ;;
18093  esac
18094
18095  if test "$apu_have_db" = "1"; then
18096    apu_db_version=1
18097  fi
18098
18099  fi
18100  if test "$apu_have_db" = "0"; then
18101
18102  places="$all_places"
18103  if test -z "$places"; then
18104    places="std"
18105  fi
18106
18107  bdb_version=1
18108  if test "-1" != "-1"; then
18109    bdb_version="$bdb_version.-1"
18110    if test "-1" != "-1"; then
18111      bdb_version="$bdb_version.-1"
18112    fi
18113  fi
18114  bdb_places="$places"
18115  bdb_default_search_headers="db_185.h"
18116  bdb_default_search_lib_names="db"
18117
18118
18119  apu_have_db=0
18120
18121  # Save the original values of the flags we tweak.
18122  apu_check_lib_save_libs="$LIBS"
18123  apu_check_lib_save_ldflags="$LDFLAGS"
18124  apu_check_lib_save_cppflags="$CPPFLAGS"
18125
18126  # The variable `found' is the prefix under which we've found
18127  # Berkeley DB, or `not' if we haven't found it anywhere yet.
18128  found=not
18129  for bdb_place in $bdb_places; do
18130
18131    LDFLAGS="$apu_check_lib_save_ldflags"
18132    CPPFLAGS="$apu_check_lib_save_cppflags"
18133    case "$bdb_place" in
18134      "std" )
18135        description="the standard places"
18136      ;;
18137      *":"* )
18138        header="`echo $bdb_place | sed -e 's/:.*$//'`"
18139        lib="`echo $bdb_place | sed -e 's/^.*://'`"
18140        CPPFLAGS="$CPPFLAGS -I$header"
18141        LDFLAGS="$LDFLAGS -L$lib"
18142        description="$header and $lib"
18143      ;;
18144      * )
18145        if test -d $bdb_place; then
18146          LDFLAGS="$LDFLAGS -L$bdb_place/lib"
18147          CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
18148        else
18149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $bdb_place" >&5
18150$as_echo_n "checking for Berkeley DB $bdb_version in $bdb_place... " >&6; }
18151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: directory not found" >&5
18152$as_echo "directory not found" >&6; }
18153          continue
18154        fi
18155        description="$bdb_place"
18156      ;;
18157    esac
18158
18159    # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
18160    # trick to display a message instead.
18161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB $bdb_version in $description" >&5
18162$as_echo_n "checking for Berkeley DB $bdb_version in $description... " >&6; }
18163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
18164$as_echo "" >&6; }
18165
18166    for bdb_libname in $bdb_default_search_lib_names; do
18167      for bdb_header in $bdb_default_search_headers; do
18168        # Clear the header cache variable for each location
18169
18170        cache_id="`echo ac_cv_header_${bdb_header} \
18171                 | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18172
18173        unset $cache_id
18174        as_ac_Header=`$as_echo "ac_cv_header_$bdb_header" | $as_tr_sh`
18175ac_fn_c_check_header_mongrel "$LINENO" "$bdb_header" "$as_ac_Header" "$ac_includes_default"
18176if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18177
18178          if test "1" = "3" -o "1" = "4" -o "1" = "5"; then
18179            # We generate a separate cache variable for each prefix and libname
18180            # we search under.  That way, we avoid caching information that
18181            # changes if the user runs `configure' with a different set of
18182            # switches.
18183
18184            cache_id="`echo apu_cv_check_berkeley_db_1_-1_-1_${bdb_header}_${bdb_libname}_in_${bdb_place} \
18185                     | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
18186
18187
18188            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -l$bdb_libname" >&5
18189$as_echo_n "checking for -l$bdb_libname... " >&6; }
18190                                    if eval "test \"\${$cache_id+set}\"" = set; then :
18191  $as_echo_n "(cached) " >&6
18192else
18193
18194
18195    apu_try_berkeley_db_save_libs="$LIBS"
18196
18197    apu_check_berkeley_db_major=1
18198    apu_check_berkeley_db_minor=-1
18199    apu_check_berkeley_db_patch=-1
18200    apu_try_berkeley_db_header=$bdb_header
18201    apu_try_berkeley_db_libname=$bdb_libname
18202
18203    LIBS="$LIBS -l$apu_try_berkeley_db_libname"
18204    if test "$cross_compiling" = yes; then :
18205  apu_try_berkeley_db=yes
18206
18207else
18208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18209/* end confdefs.h.  */
18210
18211#include <stdlib.h>
18212#include <stdio.h>
18213#include <$apu_try_berkeley_db_header>
18214main ()
18215{
18216  int major, minor, patch;
18217
18218  db_version(&major, &minor, &patch);
18219
18220  /* Sanity check: ensure that db.h constants actually match the db library */
18221  if (major != DB_VERSION_MAJOR
18222      || minor != DB_VERSION_MINOR
18223      || patch != DB_VERSION_PATCH)
18224    exit (1);
18225
18226  /* Run-time check:  ensure the library claims to be the correct version. */
18227
18228  if ($apu_check_berkeley_db_major != -1) {
18229    if (major < $apu_check_berkeley_db_major)
18230      exit (1);
18231    if (major > $apu_check_berkeley_db_major)
18232      exit (0);
18233  }
18234
18235  if ($apu_check_berkeley_db_minor != -1) {
18236    if (minor < $apu_check_berkeley_db_minor)
18237      exit (1);
18238    if (minor > $apu_check_berkeley_db_minor)
18239      exit (0);
18240  }
18241
18242  if ($apu_check_berkeley_db_patch == -1
18243      || patch >= $apu_check_berkeley_db_patch)
18244    exit (0);
18245  else
18246    exit (1);
18247}
18248
18249_ACEOF
18250if ac_fn_c_try_run "$LINENO"; then :
18251  apu_try_berkeley_db=yes
18252else
18253  apu_try_berkeley_db=no
18254fi
18255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18256  conftest.$ac_objext conftest.beam conftest.$ac_ext
18257fi
18258
18259
18260    LIBS="$apu_try_berkeley_db_save_libs"
18261
18262
18263                eval "$cache_id=$apu_try_berkeley_db"
18264
18265fi
18266
18267            result="`eval echo '$'$cache_id`"
18268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
18269$as_echo "$result" >&6; }
18270          elif test "1" = "1"; then
18271            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_dbopen" | $as_tr_sh`
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen in -l$bdb_libname" >&5
18273$as_echo_n "checking for dbopen in -l$bdb_libname... " >&6; }
18274if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  ac_check_lib_save_LIBS=$LIBS
18278LIBS="-l$bdb_libname  $LIBS"
18279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18280/* end confdefs.h.  */
18281
18282/* Override any GCC internal prototype to avoid an error.
18283   Use char because int might match the return type of a GCC
18284   builtin and then its argument prototype would still apply.  */
18285#ifdef __cplusplus
18286extern "C"
18287#endif
18288char dbopen ();
18289int
18290main ()
18291{
18292return dbopen ();
18293  ;
18294  return 0;
18295}
18296_ACEOF
18297if ac_fn_c_try_link "$LINENO"; then :
18298  eval "$as_ac_Lib=yes"
18299else
18300  eval "$as_ac_Lib=no"
18301fi
18302rm -f core conftest.err conftest.$ac_objext \
18303    conftest$ac_exeext conftest.$ac_ext
18304LIBS=$ac_check_lib_save_LIBS
18305fi
18306eval ac_res=\$$as_ac_Lib
18307	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18308$as_echo "$ac_res" >&6; }
18309if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18310  result=yes
18311else
18312  result=no
18313
18314fi
18315
18316          elif test "1" = "2"; then
18317            as_ac_Lib=`$as_echo "ac_cv_lib_$bdb_libname''_db_open" | $as_tr_sh`
18318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_open in -l$bdb_libname" >&5
18319$as_echo_n "checking for db_open in -l$bdb_libname... " >&6; }
18320if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
18321  $as_echo_n "(cached) " >&6
18322else
18323  ac_check_lib_save_LIBS=$LIBS
18324LIBS="-l$bdb_libname  $LIBS"
18325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326/* end confdefs.h.  */
18327
18328/* Override any GCC internal prototype to avoid an error.
18329   Use char because int might match the return type of a GCC
18330   builtin and then its argument prototype would still apply.  */
18331#ifdef __cplusplus
18332extern "C"
18333#endif
18334char db_open ();
18335int
18336main ()
18337{
18338return db_open ();
18339  ;
18340  return 0;
18341}
18342_ACEOF
18343if ac_fn_c_try_link "$LINENO"; then :
18344  eval "$as_ac_Lib=yes"
18345else
18346  eval "$as_ac_Lib=no"
18347fi
18348rm -f core conftest.err conftest.$ac_objext \
18349    conftest$ac_exeext conftest.$ac_ext
18350LIBS=$ac_check_lib_save_LIBS
18351fi
18352eval ac_res=\$$as_ac_Lib
18353	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18354$as_echo "$ac_res" >&6; }
18355if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18356  result=yes
18357else
18358  result=no
18359
18360fi
18361
18362          fi
18363
18364else
18365  result="no"
18366fi
18367
18368
18369
18370        # If we found it, no need to search any more.
18371        if test "$result" = "yes"; then
18372          found="$bdb_place"
18373          break
18374        fi
18375      done
18376      test "$found" != "not" && break
18377    done
18378    test "$found" != "not" && break
18379  done
18380
18381  # Restore the original values of the flags we tweak.
18382  LDFLAGS="$apu_check_lib_save_ldflags"
18383  CPPFLAGS="$apu_check_lib_save_cppflags"
18384
18385  case "$found" in
18386  "not")
18387    apu_have_db=0
18388    ;;
18389  "std")
18390    apu_db_header=$bdb_header
18391    apu_db_lib=$bdb_libname
18392    apu_have_db=1
18393    ;;
18394  *":"*)
18395    header="`echo $found | sed -e 's/:.*$//'`"
18396    lib="`echo $found | sed -e 's/^.*://'`"
18397
18398
18399  if test "x$APRUTIL_INCLUDES" = "x"; then
18400    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$header\""
18401    APRUTIL_INCLUDES="-I$header"
18402  else
18403    apr_addto_bugger="-I$header"
18404    for i in $apr_addto_bugger; do
18405      apr_addto_duplicate="0"
18406      for j in $APRUTIL_INCLUDES; do
18407        if test "x$i" = "x$j"; then
18408          apr_addto_duplicate="1"
18409          break
18410        fi
18411      done
18412      if test $apr_addto_duplicate = "0"; then
18413        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18414        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18415      fi
18416    done
18417  fi
18418
18419
18420  if test "x$APRUTIL_LDFLAGS" = "x"; then
18421    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$lib\""
18422    APRUTIL_LDFLAGS="-L$lib"
18423  else
18424    apr_addto_bugger="-L$lib"
18425    for i in $apr_addto_bugger; do
18426      apr_addto_duplicate="0"
18427      for j in $APRUTIL_LDFLAGS; do
18428        if test "x$i" = "x$j"; then
18429          apr_addto_duplicate="1"
18430          break
18431        fi
18432      done
18433      if test $apr_addto_duplicate = "0"; then
18434        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18435        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18436      fi
18437    done
18438  fi
18439
18440    apu_db_header=$bdb_header
18441    apu_db_lib=$bdb_libname
18442    apu_have_db=1
18443    ;;
18444  *)
18445
18446  if test "x$APRUTIL_INCLUDES" = "x"; then
18447    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$found/include\""
18448    APRUTIL_INCLUDES="-I$found/include"
18449  else
18450    apr_addto_bugger="-I$found/include"
18451    for i in $apr_addto_bugger; do
18452      apr_addto_duplicate="0"
18453      for j in $APRUTIL_INCLUDES; do
18454        if test "x$i" = "x$j"; then
18455          apr_addto_duplicate="1"
18456          break
18457        fi
18458      done
18459      if test $apr_addto_duplicate = "0"; then
18460        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
18461        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
18462      fi
18463    done
18464  fi
18465
18466
18467  if test "x$APRUTIL_LDFLAGS" = "x"; then
18468    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$found/lib\""
18469    APRUTIL_LDFLAGS="-L$found/lib"
18470  else
18471    apr_addto_bugger="-L$found/lib"
18472    for i in $apr_addto_bugger; do
18473      apr_addto_duplicate="0"
18474      for j in $APRUTIL_LDFLAGS; do
18475        if test "x$i" = "x$j"; then
18476          apr_addto_duplicate="1"
18477          break
18478        fi
18479      done
18480      if test $apr_addto_duplicate = "0"; then
18481        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
18482        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
18483      fi
18484    done
18485  fi
18486
18487    apu_db_header=$bdb_header
18488    apu_db_lib=$bdb_libname
18489    apu_have_db=1
18490    ;;
18491  esac
18492
18493  if test "$apu_have_db" = "1"; then
18494    apu_db_version=185
18495  fi
18496
18497  fi
18498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB" >&5
18499$as_echo_n "checking for Berkeley DB... " >&6; }
18500  if test "$apu_have_db" = "1"; then
18501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found db$apu_db_version" >&5
18502$as_echo "found db$apu_db_version" >&6; }
18503  else
18504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18505$as_echo "not found" >&6; }
18506  fi
18507
18508    ;;
18509  esac
18510
18511      if test "$apu_have_db" = "0"; then
18512        as_fn_error $? "Berkeley DB not found." "$LINENO" 5
18513      fi
18514    fi
18515
18516fi
18517
18518
18519  if test -n "$apu_db_xtra_libs"; then
18520    LIBS="$saveddbxtralibs"
18521  fi
18522
18523  case "$requested" in
18524    sdbm | gdbm | ndbm | db)
18525      eval "apu_use_$requested=1"
18526      apu_default_dbm=$requested
18527      ;;
18528    db185 | db[12345])
18529      apu_use_db=1
18530      apu_default_dbm=$requested
18531      ;;
18532    db[45][0-9])
18533      apu_use_db=1
18534      apu_default_dbm=`echo $requested | sed -e 's/.$//'`
18535      ;;
18536    default)
18537            apu_default_dbm="sdbm (default)"
18538      apu_use_sdbm=1
18539      ;;
18540    *)
18541      as_fn_error $? "--with-dbm=$requested is an unknown DBM type.
18542        Use one of: $dbm_list" "$LINENO" 5
18543      ;;
18544  esac
18545
18546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default DBM" >&5
18547$as_echo_n "checking for default DBM... " >&6; }
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_default_dbm" >&5
18549$as_echo "$apu_default_dbm" >&6; }
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563  if test "$apu_have_db" = "1"; then
18564
18565  if test "x$LDADD_dbm_db" = "x"; then
18566    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_db to \"-l$apu_db_lib\""
18567    LDADD_dbm_db="-l$apu_db_lib"
18568  else
18569    apr_addto_bugger="-l$apu_db_lib"
18570    for i in $apr_addto_bugger; do
18571      apr_addto_duplicate="0"
18572      for j in $LDADD_dbm_db; do
18573        if test "x$i" = "x$j"; then
18574          apr_addto_duplicate="1"
18575          break
18576        fi
18577      done
18578      if test $apr_addto_duplicate = "0"; then
18579        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_db"
18580        LDADD_dbm_db="$LDADD_dbm_db $i"
18581      fi
18582    done
18583  fi
18584
18585    if test -n "apu_db_xtra_libs"; then
18586
18587  if test "x$LDADD_dbm_db" = "x"; then
18588    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_db to \"$apu_db_xtra_libs\""
18589    LDADD_dbm_db="$apu_db_xtra_libs"
18590  else
18591    apr_addto_bugger="$apu_db_xtra_libs"
18592    for i in $apr_addto_bugger; do
18593      apr_addto_duplicate="0"
18594      for j in $LDADD_dbm_db; do
18595        if test "x$i" = "x$j"; then
18596          apr_addto_duplicate="1"
18597          break
18598        fi
18599      done
18600      if test $apr_addto_duplicate = "0"; then
18601        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_db"
18602        LDADD_dbm_db="$LDADD_dbm_db $i"
18603      fi
18604    done
18605  fi
18606
18607    fi
18608  fi
18609
18610      if test "$apu_have_gdbm" = "1"; then
18611
18612  if test "x$LDADD_dbm_gdbm" = "x"; then
18613    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_gdbm to \"-lgdbm\""
18614    LDADD_dbm_gdbm="-lgdbm"
18615  else
18616    apr_addto_bugger="-lgdbm"
18617    for i in $apr_addto_bugger; do
18618      apr_addto_duplicate="0"
18619      for j in $LDADD_dbm_gdbm; do
18620        if test "x$i" = "x$j"; then
18621          apr_addto_duplicate="1"
18622          break
18623        fi
18624      done
18625      if test $apr_addto_duplicate = "0"; then
18626        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_gdbm"
18627        LDADD_dbm_gdbm="$LDADD_dbm_gdbm $i"
18628      fi
18629    done
18630  fi
18631
18632  fi
18633
18634  if test "$apu_have_ndbm" = "1"; then
18635
18636  if test "x$LDADD_dbm_ndbm" = "x"; then
18637    test "x$silent" != "xyes" && echo "  setting LDADD_dbm_ndbm to \"-l$apu_ndbm_lib\""
18638    LDADD_dbm_ndbm="-l$apu_ndbm_lib"
18639  else
18640    apr_addto_bugger="-l$apu_ndbm_lib"
18641    for i in $apr_addto_bugger; do
18642      apr_addto_duplicate="0"
18643      for j in $LDADD_dbm_ndbm; do
18644        if test "x$i" = "x$j"; then
18645          apr_addto_duplicate="1"
18646          break
18647        fi
18648      done
18649      if test $apr_addto_duplicate = "0"; then
18650        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbm_ndbm"
18651        LDADD_dbm_ndbm="$LDADD_dbm_ndbm $i"
18652      fi
18653    done
18654  fi
18655
18656  fi
18657
18658
18659
18660
18661
18662
18663  apu_have_pgsql=0
18664
18665  old_libs="$LIBS"
18666  old_cppflags="$CPPFLAGS"
18667  old_ldflags="$LDFLAGS"
18668
18669
18670# Check whether --with-pgsql was given.
18671if test "${with_pgsql+set}" = set; then :
18672  withval=$with_pgsql;
18673    if test "$withval" = "yes"; then
18674      # Extract the first word of "pg_config", so it can be a program name with args.
18675set dummy pg_config; ac_word=$2
18676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18677$as_echo_n "checking for $ac_word... " >&6; }
18678if test "${ac_cv_path_PGSQL_CONFIG+set}" = set; then :
18679  $as_echo_n "(cached) " >&6
18680else
18681  case $PGSQL_CONFIG in
18682  [\\/]* | ?:[\\/]*)
18683  ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
18684  ;;
18685  *)
18686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18687for as_dir in $PATH
18688do
18689  IFS=$as_save_IFS
18690  test -z "$as_dir" && as_dir=.
18691    for ac_exec_ext in '' $ac_executable_extensions; do
18692  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18693    ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18695    break 2
18696  fi
18697done
18698  done
18699IFS=$as_save_IFS
18700
18701  ;;
18702esac
18703fi
18704PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
18705if test -n "$PGSQL_CONFIG"; then
18706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
18707$as_echo "$PGSQL_CONFIG" >&6; }
18708else
18709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18710$as_echo "no" >&6; }
18711fi
18712
18713
18714      if test "x$PGSQL_CONFIG" != 'x'; then
18715        pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
18716        pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
18717
18718
18719  if test "x$CPPFLAGS" = "x"; then
18720    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
18721    CPPFLAGS="$pgsql_CPPFLAGS"
18722  else
18723    apr_addto_bugger="$pgsql_CPPFLAGS"
18724    for i in $apr_addto_bugger; do
18725      apr_addto_duplicate="0"
18726      for j in $CPPFLAGS; do
18727        if test "x$i" = "x$j"; then
18728          apr_addto_duplicate="1"
18729          break
18730        fi
18731      done
18732      if test $apr_addto_duplicate = "0"; then
18733        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
18734        CPPFLAGS="$CPPFLAGS $i"
18735      fi
18736    done
18737  fi
18738
18739
18740  if test "x$LDFLAGS" = "x"; then
18741    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
18742    LDFLAGS="$pgsql_LDFLAGS"
18743  else
18744    apr_addto_bugger="$pgsql_LDFLAGS"
18745    for i in $apr_addto_bugger; do
18746      apr_addto_duplicate="0"
18747      for j in $LDFLAGS; do
18748        if test "x$i" = "x$j"; then
18749          apr_addto_duplicate="1"
18750          break
18751        fi
18752      done
18753      if test $apr_addto_duplicate = "0"; then
18754        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
18755        LDFLAGS="$LDFLAGS $i"
18756      fi
18757    done
18758  fi
18759
18760      fi
18761
18762      for ac_header in libpq-fe.h
18763do :
18764  ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
18765if test "x$ac_cv_header_libpq_fe_h" = x""yes; then :
18766  cat >>confdefs.h <<_ACEOF
18767#define HAVE_LIBPQ_FE_H 1
18768_ACEOF
18769
18770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18771$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18772if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
18773  $as_echo_n "(cached) " >&6
18774else
18775  ac_check_lib_save_LIBS=$LIBS
18776LIBS="-lpq  $LIBS"
18777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18778/* end confdefs.h.  */
18779
18780/* Override any GCC internal prototype to avoid an error.
18781   Use char because int might match the return type of a GCC
18782   builtin and then its argument prototype would still apply.  */
18783#ifdef __cplusplus
18784extern "C"
18785#endif
18786char PQsendQueryPrepared ();
18787int
18788main ()
18789{
18790return PQsendQueryPrepared ();
18791  ;
18792  return 0;
18793}
18794_ACEOF
18795if ac_fn_c_try_link "$LINENO"; then :
18796  ac_cv_lib_pq_PQsendQueryPrepared=yes
18797else
18798  ac_cv_lib_pq_PQsendQueryPrepared=no
18799fi
18800rm -f core conftest.err conftest.$ac_objext \
18801    conftest$ac_exeext conftest.$ac_ext
18802LIBS=$ac_check_lib_save_LIBS
18803fi
18804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18805$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18806if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
18807  apu_have_pgsql=1
18808else
18809
18810        if test "x$PGSQL_CONFIG" != 'x'; then
18811          unset ac_cv_lib_pq_PQsendQueryPrepared
18812          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
18813
18814  if test "x$LIBS" = "x"; then
18815    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
18816    LIBS="$pgsql_LIBS"
18817  else
18818    apr_addto_bugger="$pgsql_LIBS"
18819    for i in $apr_addto_bugger; do
18820      apr_addto_duplicate="0"
18821      for j in $LIBS; do
18822        if test "x$i" = "x$j"; then
18823          apr_addto_duplicate="1"
18824          break
18825        fi
18826      done
18827      if test $apr_addto_duplicate = "0"; then
18828        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
18829        LIBS="$LIBS $i"
18830      fi
18831    done
18832  fi
18833
18834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18835$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18836if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
18837  $as_echo_n "(cached) " >&6
18838else
18839  ac_check_lib_save_LIBS=$LIBS
18840LIBS="-lpq  $LIBS"
18841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18842/* end confdefs.h.  */
18843
18844/* Override any GCC internal prototype to avoid an error.
18845   Use char because int might match the return type of a GCC
18846   builtin and then its argument prototype would still apply.  */
18847#ifdef __cplusplus
18848extern "C"
18849#endif
18850char PQsendQueryPrepared ();
18851int
18852main ()
18853{
18854return PQsendQueryPrepared ();
18855  ;
18856  return 0;
18857}
18858_ACEOF
18859if ac_fn_c_try_link "$LINENO"; then :
18860  ac_cv_lib_pq_PQsendQueryPrepared=yes
18861else
18862  ac_cv_lib_pq_PQsendQueryPrepared=no
18863fi
18864rm -f core conftest.err conftest.$ac_objext \
18865    conftest$ac_exeext conftest.$ac_ext
18866LIBS=$ac_check_lib_save_LIBS
18867fi
18868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18869$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18870if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
18871  apu_have_pgsql=1
18872fi
18873
18874        fi
18875
18876fi
18877
18878
18879fi
18880
18881done
18882
18883      if test "$apu_have_pgsql" = "0"; then
18884        for ac_header in postgresql/libpq-fe.h
18885do :
18886  ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
18887if test "x$ac_cv_header_postgresql_libpq_fe_h" = x""yes; then :
18888  cat >>confdefs.h <<_ACEOF
18889#define HAVE_POSTGRESQL_LIBPQ_FE_H 1
18890_ACEOF
18891
18892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18893$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18894if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
18895  $as_echo_n "(cached) " >&6
18896else
18897  ac_check_lib_save_LIBS=$LIBS
18898LIBS="-lpq  $LIBS"
18899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18900/* end confdefs.h.  */
18901
18902/* Override any GCC internal prototype to avoid an error.
18903   Use char because int might match the return type of a GCC
18904   builtin and then its argument prototype would still apply.  */
18905#ifdef __cplusplus
18906extern "C"
18907#endif
18908char PQsendQueryPrepared ();
18909int
18910main ()
18911{
18912return PQsendQueryPrepared ();
18913  ;
18914  return 0;
18915}
18916_ACEOF
18917if ac_fn_c_try_link "$LINENO"; then :
18918  ac_cv_lib_pq_PQsendQueryPrepared=yes
18919else
18920  ac_cv_lib_pq_PQsendQueryPrepared=no
18921fi
18922rm -f core conftest.err conftest.$ac_objext \
18923    conftest$ac_exeext conftest.$ac_ext
18924LIBS=$ac_check_lib_save_LIBS
18925fi
18926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18927$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18928if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
18929  apu_have_pgsql=1
18930else
18931
18932          if test "x$PGSQL_CONFIG" != 'x'; then
18933            unset ac_cv_lib_pq_PQsendQueryPrepared
18934            pgsql_LIBS="`$PGSQL_CONFIG --libs`"
18935
18936  if test "x$LIBS" = "x"; then
18937    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
18938    LIBS="$pgsql_LIBS"
18939  else
18940    apr_addto_bugger="$pgsql_LIBS"
18941    for i in $apr_addto_bugger; do
18942      apr_addto_duplicate="0"
18943      for j in $LIBS; do
18944        if test "x$i" = "x$j"; then
18945          apr_addto_duplicate="1"
18946          break
18947        fi
18948      done
18949      if test $apr_addto_duplicate = "0"; then
18950        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
18951        LIBS="$LIBS $i"
18952      fi
18953    done
18954  fi
18955
18956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
18957$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
18958if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
18959  $as_echo_n "(cached) " >&6
18960else
18961  ac_check_lib_save_LIBS=$LIBS
18962LIBS="-lpq  $LIBS"
18963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18964/* end confdefs.h.  */
18965
18966/* Override any GCC internal prototype to avoid an error.
18967   Use char because int might match the return type of a GCC
18968   builtin and then its argument prototype would still apply.  */
18969#ifdef __cplusplus
18970extern "C"
18971#endif
18972char PQsendQueryPrepared ();
18973int
18974main ()
18975{
18976return PQsendQueryPrepared ();
18977  ;
18978  return 0;
18979}
18980_ACEOF
18981if ac_fn_c_try_link "$LINENO"; then :
18982  ac_cv_lib_pq_PQsendQueryPrepared=yes
18983else
18984  ac_cv_lib_pq_PQsendQueryPrepared=no
18985fi
18986rm -f core conftest.err conftest.$ac_objext \
18987    conftest$ac_exeext conftest.$ac_ext
18988LIBS=$ac_check_lib_save_LIBS
18989fi
18990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
18991$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
18992if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
18993  apu_have_pgsql=1
18994fi
18995
18996          fi
18997
18998fi
18999
19000
19001fi
19002
19003done
19004
19005      fi
19006      if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
19007
19008  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19009    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19010    APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19011  else
19012    apr_addto_bugger="$pgsql_CPPFLAGS"
19013    for i in $apr_addto_bugger; do
19014      apr_addto_duplicate="0"
19015      for j in $APRUTIL_PRIV_INCLUDES; do
19016        if test "x$i" = "x$j"; then
19017          apr_addto_duplicate="1"
19018          break
19019        fi
19020      done
19021      if test $apr_addto_duplicate = "0"; then
19022        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19023        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19024      fi
19025    done
19026  fi
19027
19028      fi
19029    elif test "$withval" = "no"; then
19030      :
19031    else
19032      # Extract the first word of "pg_config", so it can be a program name with args.
19033set dummy pg_config; ac_word=$2
19034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19035$as_echo_n "checking for $ac_word... " >&6; }
19036if test "${ac_cv_path_PGSQL_CONFIG+set}" = set; then :
19037  $as_echo_n "(cached) " >&6
19038else
19039  case $PGSQL_CONFIG in
19040  [\\/]* | ?:[\\/]*)
19041  ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
19042  ;;
19043  *)
19044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045for as_dir in $withval/bin
19046do
19047  IFS=$as_save_IFS
19048  test -z "$as_dir" && as_dir=.
19049    for ac_exec_ext in '' $ac_executable_extensions; do
19050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19051    ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053    break 2
19054  fi
19055done
19056  done
19057IFS=$as_save_IFS
19058
19059  ;;
19060esac
19061fi
19062PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
19063if test -n "$PGSQL_CONFIG"; then
19064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
19065$as_echo "$PGSQL_CONFIG" >&6; }
19066else
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19068$as_echo "no" >&6; }
19069fi
19070
19071
19072      if test "x$PGSQL_CONFIG" != 'x'; then
19073        pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
19074        pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
19075      else
19076        pgsql_CPPFLAGS="-I$withval/include"
19077        pgsql_LDFLAGS="-L$withval/lib "
19078      fi
19079
19080
19081  if test "x$CPPFLAGS" = "x"; then
19082    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
19083    CPPFLAGS="$pgsql_CPPFLAGS"
19084  else
19085    apr_addto_bugger="$pgsql_CPPFLAGS"
19086    for i in $apr_addto_bugger; do
19087      apr_addto_duplicate="0"
19088      for j in $CPPFLAGS; do
19089        if test "x$i" = "x$j"; then
19090          apr_addto_duplicate="1"
19091          break
19092        fi
19093      done
19094      if test $apr_addto_duplicate = "0"; then
19095        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19096        CPPFLAGS="$CPPFLAGS $i"
19097      fi
19098    done
19099  fi
19100
19101
19102  if test "x$LDFLAGS" = "x"; then
19103    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
19104    LDFLAGS="$pgsql_LDFLAGS"
19105  else
19106    apr_addto_bugger="$pgsql_LDFLAGS"
19107    for i in $apr_addto_bugger; do
19108      apr_addto_duplicate="0"
19109      for j in $LDFLAGS; do
19110        if test "x$i" = "x$j"; then
19111          apr_addto_duplicate="1"
19112          break
19113        fi
19114      done
19115      if test $apr_addto_duplicate = "0"; then
19116        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
19117        LDFLAGS="$LDFLAGS $i"
19118      fi
19119    done
19120  fi
19121
19122
19123      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgsql in $withval" >&5
19124$as_echo "$as_me: checking for pgsql in $withval" >&6;}
19125      for ac_header in libpq-fe.h
19126do :
19127  ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19128if test "x$ac_cv_header_libpq_fe_h" = x""yes; then :
19129  cat >>confdefs.h <<_ACEOF
19130#define HAVE_LIBPQ_FE_H 1
19131_ACEOF
19132
19133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19134$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19135if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19136  $as_echo_n "(cached) " >&6
19137else
19138  ac_check_lib_save_LIBS=$LIBS
19139LIBS="-lpq  $LIBS"
19140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19141/* end confdefs.h.  */
19142
19143/* Override any GCC internal prototype to avoid an error.
19144   Use char because int might match the return type of a GCC
19145   builtin and then its argument prototype would still apply.  */
19146#ifdef __cplusplus
19147extern "C"
19148#endif
19149char PQsendQueryPrepared ();
19150int
19151main ()
19152{
19153return PQsendQueryPrepared ();
19154  ;
19155  return 0;
19156}
19157_ACEOF
19158if ac_fn_c_try_link "$LINENO"; then :
19159  ac_cv_lib_pq_PQsendQueryPrepared=yes
19160else
19161  ac_cv_lib_pq_PQsendQueryPrepared=no
19162fi
19163rm -f core conftest.err conftest.$ac_objext \
19164    conftest$ac_exeext conftest.$ac_ext
19165LIBS=$ac_check_lib_save_LIBS
19166fi
19167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19168$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19169if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19170  apu_have_pgsql=1
19171else
19172
19173        if test "x$PGSQL_CONFIG" != 'x'; then
19174          unset ac_cv_lib_pq_PQsendQueryPrepared
19175          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19176
19177  if test "x$LIBS" = "x"; then
19178    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19179    LIBS="$pgsql_LIBS"
19180  else
19181    apr_addto_bugger="$pgsql_LIBS"
19182    for i in $apr_addto_bugger; do
19183      apr_addto_duplicate="0"
19184      for j in $LIBS; do
19185        if test "x$i" = "x$j"; then
19186          apr_addto_duplicate="1"
19187          break
19188        fi
19189      done
19190      if test $apr_addto_duplicate = "0"; then
19191        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19192        LIBS="$LIBS $i"
19193      fi
19194    done
19195  fi
19196
19197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19198$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19199if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19200  $as_echo_n "(cached) " >&6
19201else
19202  ac_check_lib_save_LIBS=$LIBS
19203LIBS="-lpq  $LIBS"
19204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19205/* end confdefs.h.  */
19206
19207/* Override any GCC internal prototype to avoid an error.
19208   Use char because int might match the return type of a GCC
19209   builtin and then its argument prototype would still apply.  */
19210#ifdef __cplusplus
19211extern "C"
19212#endif
19213char PQsendQueryPrepared ();
19214int
19215main ()
19216{
19217return PQsendQueryPrepared ();
19218  ;
19219  return 0;
19220}
19221_ACEOF
19222if ac_fn_c_try_link "$LINENO"; then :
19223  ac_cv_lib_pq_PQsendQueryPrepared=yes
19224else
19225  ac_cv_lib_pq_PQsendQueryPrepared=no
19226fi
19227rm -f core conftest.err conftest.$ac_objext \
19228    conftest$ac_exeext conftest.$ac_ext
19229LIBS=$ac_check_lib_save_LIBS
19230fi
19231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19232$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19233if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19234  apu_have_pgsql=1
19235fi
19236
19237        fi
19238
19239fi
19240
19241
19242fi
19243
19244done
19245
19246      if test "$apu_have_pgsql" != "1"; then
19247        for ac_header in postgresql/libpq-fe.h
19248do :
19249  ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19250if test "x$ac_cv_header_postgresql_libpq_fe_h" = x""yes; then :
19251  cat >>confdefs.h <<_ACEOF
19252#define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19253_ACEOF
19254
19255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19256$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19257if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19258  $as_echo_n "(cached) " >&6
19259else
19260  ac_check_lib_save_LIBS=$LIBS
19261LIBS="-lpq  $LIBS"
19262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19263/* end confdefs.h.  */
19264
19265/* Override any GCC internal prototype to avoid an error.
19266   Use char because int might match the return type of a GCC
19267   builtin and then its argument prototype would still apply.  */
19268#ifdef __cplusplus
19269extern "C"
19270#endif
19271char PQsendQueryPrepared ();
19272int
19273main ()
19274{
19275return PQsendQueryPrepared ();
19276  ;
19277  return 0;
19278}
19279_ACEOF
19280if ac_fn_c_try_link "$LINENO"; then :
19281  ac_cv_lib_pq_PQsendQueryPrepared=yes
19282else
19283  ac_cv_lib_pq_PQsendQueryPrepared=no
19284fi
19285rm -f core conftest.err conftest.$ac_objext \
19286    conftest$ac_exeext conftest.$ac_ext
19287LIBS=$ac_check_lib_save_LIBS
19288fi
19289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19290$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19291if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19292  apu_have_pgsql=1
19293else
19294
19295          if test "x$PGSQL_CONFIG" != 'x'; then
19296            unset ac_cv_lib_pq_PQsendQueryPrepared
19297            pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19298
19299  if test "x$LIBS" = "x"; then
19300    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19301    LIBS="$pgsql_LIBS"
19302  else
19303    apr_addto_bugger="$pgsql_LIBS"
19304    for i in $apr_addto_bugger; do
19305      apr_addto_duplicate="0"
19306      for j in $LIBS; do
19307        if test "x$i" = "x$j"; then
19308          apr_addto_duplicate="1"
19309          break
19310        fi
19311      done
19312      if test $apr_addto_duplicate = "0"; then
19313        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19314        LIBS="$LIBS $i"
19315      fi
19316    done
19317  fi
19318
19319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19320$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19321if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19322  $as_echo_n "(cached) " >&6
19323else
19324  ac_check_lib_save_LIBS=$LIBS
19325LIBS="-lpq  $LIBS"
19326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19327/* end confdefs.h.  */
19328
19329/* Override any GCC internal prototype to avoid an error.
19330   Use char because int might match the return type of a GCC
19331   builtin and then its argument prototype would still apply.  */
19332#ifdef __cplusplus
19333extern "C"
19334#endif
19335char PQsendQueryPrepared ();
19336int
19337main ()
19338{
19339return PQsendQueryPrepared ();
19340  ;
19341  return 0;
19342}
19343_ACEOF
19344if ac_fn_c_try_link "$LINENO"; then :
19345  ac_cv_lib_pq_PQsendQueryPrepared=yes
19346else
19347  ac_cv_lib_pq_PQsendQueryPrepared=no
19348fi
19349rm -f core conftest.err conftest.$ac_objext \
19350    conftest$ac_exeext conftest.$ac_ext
19351LIBS=$ac_check_lib_save_LIBS
19352fi
19353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19354$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19355if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19356  apu_have_pgsql=1
19357fi
19358
19359          fi
19360
19361fi
19362
19363
19364fi
19365
19366done
19367
19368      fi
19369      if test "$apu_have_pgsql" != "0"; then
19370
19371  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19372    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19373    APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19374  else
19375    apr_addto_bugger="$pgsql_CPPFLAGS"
19376    for i in $apr_addto_bugger; do
19377      apr_addto_duplicate="0"
19378      for j in $APRUTIL_PRIV_INCLUDES; do
19379        if test "x$i" = "x$j"; then
19380          apr_addto_duplicate="1"
19381          break
19382        fi
19383      done
19384      if test $apr_addto_duplicate = "0"; then
19385        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19386        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19387      fi
19388    done
19389  fi
19390
19391      fi
19392    fi
19393
19394else
19395
19396    # Extract the first word of "pg_config", so it can be a program name with args.
19397set dummy pg_config; ac_word=$2
19398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19399$as_echo_n "checking for $ac_word... " >&6; }
19400if test "${ac_cv_path_PGSQL_CONFIG+set}" = set; then :
19401  $as_echo_n "(cached) " >&6
19402else
19403  case $PGSQL_CONFIG in
19404  [\\/]* | ?:[\\/]*)
19405  ac_cv_path_PGSQL_CONFIG="$PGSQL_CONFIG" # Let the user override the test with a path.
19406  ;;
19407  *)
19408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19409for as_dir in $PATH
19410do
19411  IFS=$as_save_IFS
19412  test -z "$as_dir" && as_dir=.
19413    for ac_exec_ext in '' $ac_executable_extensions; do
19414  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19415    ac_cv_path_PGSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19417    break 2
19418  fi
19419done
19420  done
19421IFS=$as_save_IFS
19422
19423  ;;
19424esac
19425fi
19426PGSQL_CONFIG=$ac_cv_path_PGSQL_CONFIG
19427if test -n "$PGSQL_CONFIG"; then
19428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGSQL_CONFIG" >&5
19429$as_echo "$PGSQL_CONFIG" >&6; }
19430else
19431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19432$as_echo "no" >&6; }
19433fi
19434
19435
19436    if test "x$PGSQL_CONFIG" != 'x'; then
19437      pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
19438      pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
19439
19440
19441  if test "x$CPPFLAGS" = "x"; then
19442    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pgsql_CPPFLAGS\""
19443    CPPFLAGS="$pgsql_CPPFLAGS"
19444  else
19445    apr_addto_bugger="$pgsql_CPPFLAGS"
19446    for i in $apr_addto_bugger; do
19447      apr_addto_duplicate="0"
19448      for j in $CPPFLAGS; do
19449        if test "x$i" = "x$j"; then
19450          apr_addto_duplicate="1"
19451          break
19452        fi
19453      done
19454      if test $apr_addto_duplicate = "0"; then
19455        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19456        CPPFLAGS="$CPPFLAGS $i"
19457      fi
19458    done
19459  fi
19460
19461
19462  if test "x$LDFLAGS" = "x"; then
19463    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pgsql_LDFLAGS\""
19464    LDFLAGS="$pgsql_LDFLAGS"
19465  else
19466    apr_addto_bugger="$pgsql_LDFLAGS"
19467    for i in $apr_addto_bugger; do
19468      apr_addto_duplicate="0"
19469      for j in $LDFLAGS; do
19470        if test "x$i" = "x$j"; then
19471          apr_addto_duplicate="1"
19472          break
19473        fi
19474      done
19475      if test $apr_addto_duplicate = "0"; then
19476        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
19477        LDFLAGS="$LDFLAGS $i"
19478      fi
19479    done
19480  fi
19481
19482    fi
19483
19484    for ac_header in libpq-fe.h
19485do :
19486  ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
19487if test "x$ac_cv_header_libpq_fe_h" = x""yes; then :
19488  cat >>confdefs.h <<_ACEOF
19489#define HAVE_LIBPQ_FE_H 1
19490_ACEOF
19491
19492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19493$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19494if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19495  $as_echo_n "(cached) " >&6
19496else
19497  ac_check_lib_save_LIBS=$LIBS
19498LIBS="-lpq  $LIBS"
19499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19500/* end confdefs.h.  */
19501
19502/* Override any GCC internal prototype to avoid an error.
19503   Use char because int might match the return type of a GCC
19504   builtin and then its argument prototype would still apply.  */
19505#ifdef __cplusplus
19506extern "C"
19507#endif
19508char PQsendQueryPrepared ();
19509int
19510main ()
19511{
19512return PQsendQueryPrepared ();
19513  ;
19514  return 0;
19515}
19516_ACEOF
19517if ac_fn_c_try_link "$LINENO"; then :
19518  ac_cv_lib_pq_PQsendQueryPrepared=yes
19519else
19520  ac_cv_lib_pq_PQsendQueryPrepared=no
19521fi
19522rm -f core conftest.err conftest.$ac_objext \
19523    conftest$ac_exeext conftest.$ac_ext
19524LIBS=$ac_check_lib_save_LIBS
19525fi
19526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19527$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19528if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19529  apu_have_pgsql=1
19530else
19531
19532      if test "x$PGSQL_CONFIG" != 'x'; then
19533        unset ac_cv_lib_pq_PQsendQueryPrepared
19534        pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19535
19536  if test "x$LIBS" = "x"; then
19537    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19538    LIBS="$pgsql_LIBS"
19539  else
19540    apr_addto_bugger="$pgsql_LIBS"
19541    for i in $apr_addto_bugger; do
19542      apr_addto_duplicate="0"
19543      for j in $LIBS; do
19544        if test "x$i" = "x$j"; then
19545          apr_addto_duplicate="1"
19546          break
19547        fi
19548      done
19549      if test $apr_addto_duplicate = "0"; then
19550        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19551        LIBS="$LIBS $i"
19552      fi
19553    done
19554  fi
19555
19556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19557$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19558if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19559  $as_echo_n "(cached) " >&6
19560else
19561  ac_check_lib_save_LIBS=$LIBS
19562LIBS="-lpq  $LIBS"
19563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19564/* end confdefs.h.  */
19565
19566/* Override any GCC internal prototype to avoid an error.
19567   Use char because int might match the return type of a GCC
19568   builtin and then its argument prototype would still apply.  */
19569#ifdef __cplusplus
19570extern "C"
19571#endif
19572char PQsendQueryPrepared ();
19573int
19574main ()
19575{
19576return PQsendQueryPrepared ();
19577  ;
19578  return 0;
19579}
19580_ACEOF
19581if ac_fn_c_try_link "$LINENO"; then :
19582  ac_cv_lib_pq_PQsendQueryPrepared=yes
19583else
19584  ac_cv_lib_pq_PQsendQueryPrepared=no
19585fi
19586rm -f core conftest.err conftest.$ac_objext \
19587    conftest$ac_exeext conftest.$ac_ext
19588LIBS=$ac_check_lib_save_LIBS
19589fi
19590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19591$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19592if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19593  apu_have_pgsql=1
19594fi
19595
19596      fi
19597
19598fi
19599
19600
19601fi
19602
19603done
19604
19605    if test "$apu_have_pgsql" = "0"; then
19606      for ac_header in postgresql/libpq-fe.h
19607do :
19608  ac_fn_c_check_header_mongrel "$LINENO" "postgresql/libpq-fe.h" "ac_cv_header_postgresql_libpq_fe_h" "$ac_includes_default"
19609if test "x$ac_cv_header_postgresql_libpq_fe_h" = x""yes; then :
19610  cat >>confdefs.h <<_ACEOF
19611#define HAVE_POSTGRESQL_LIBPQ_FE_H 1
19612_ACEOF
19613
19614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19615$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19616if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19617  $as_echo_n "(cached) " >&6
19618else
19619  ac_check_lib_save_LIBS=$LIBS
19620LIBS="-lpq  $LIBS"
19621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19622/* end confdefs.h.  */
19623
19624/* Override any GCC internal prototype to avoid an error.
19625   Use char because int might match the return type of a GCC
19626   builtin and then its argument prototype would still apply.  */
19627#ifdef __cplusplus
19628extern "C"
19629#endif
19630char PQsendQueryPrepared ();
19631int
19632main ()
19633{
19634return PQsendQueryPrepared ();
19635  ;
19636  return 0;
19637}
19638_ACEOF
19639if ac_fn_c_try_link "$LINENO"; then :
19640  ac_cv_lib_pq_PQsendQueryPrepared=yes
19641else
19642  ac_cv_lib_pq_PQsendQueryPrepared=no
19643fi
19644rm -f core conftest.err conftest.$ac_objext \
19645    conftest$ac_exeext conftest.$ac_ext
19646LIBS=$ac_check_lib_save_LIBS
19647fi
19648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19649$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19650if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19651  apu_have_pgsql=1
19652else
19653
19654        if test "x$PGSQL_CONFIG" != 'x'; then
19655          unset ac_cv_lib_pq_PQsendQueryPrepared
19656          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
19657
19658  if test "x$LIBS" = "x"; then
19659    test "x$silent" != "xyes" && echo "  setting LIBS to \"$pgsql_LIBS\""
19660    LIBS="$pgsql_LIBS"
19661  else
19662    apr_addto_bugger="$pgsql_LIBS"
19663    for i in $apr_addto_bugger; do
19664      apr_addto_duplicate="0"
19665      for j in $LIBS; do
19666        if test "x$i" = "x$j"; then
19667          apr_addto_duplicate="1"
19668          break
19669        fi
19670      done
19671      if test $apr_addto_duplicate = "0"; then
19672        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19673        LIBS="$LIBS $i"
19674      fi
19675    done
19676  fi
19677
19678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQsendQueryPrepared in -lpq" >&5
19679$as_echo_n "checking for PQsendQueryPrepared in -lpq... " >&6; }
19680if test "${ac_cv_lib_pq_PQsendQueryPrepared+set}" = set; then :
19681  $as_echo_n "(cached) " >&6
19682else
19683  ac_check_lib_save_LIBS=$LIBS
19684LIBS="-lpq  $LIBS"
19685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19686/* end confdefs.h.  */
19687
19688/* Override any GCC internal prototype to avoid an error.
19689   Use char because int might match the return type of a GCC
19690   builtin and then its argument prototype would still apply.  */
19691#ifdef __cplusplus
19692extern "C"
19693#endif
19694char PQsendQueryPrepared ();
19695int
19696main ()
19697{
19698return PQsendQueryPrepared ();
19699  ;
19700  return 0;
19701}
19702_ACEOF
19703if ac_fn_c_try_link "$LINENO"; then :
19704  ac_cv_lib_pq_PQsendQueryPrepared=yes
19705else
19706  ac_cv_lib_pq_PQsendQueryPrepared=no
19707fi
19708rm -f core conftest.err conftest.$ac_objext \
19709    conftest$ac_exeext conftest.$ac_ext
19710LIBS=$ac_check_lib_save_LIBS
19711fi
19712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQsendQueryPrepared" >&5
19713$as_echo "$ac_cv_lib_pq_PQsendQueryPrepared" >&6; }
19714if test "x$ac_cv_lib_pq_PQsendQueryPrepared" = x""yes; then :
19715  apu_have_pgsql=1
19716fi
19717
19718        fi
19719
19720fi
19721
19722
19723fi
19724
19725done
19726
19727    fi
19728    if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
19729
19730  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
19731    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$pgsql_CPPFLAGS\""
19732    APRUTIL_PRIV_INCLUDES="$pgsql_CPPFLAGS"
19733  else
19734    apr_addto_bugger="$pgsql_CPPFLAGS"
19735    for i in $apr_addto_bugger; do
19736      apr_addto_duplicate="0"
19737      for j in $APRUTIL_PRIV_INCLUDES; do
19738        if test "x$i" = "x$j"; then
19739          apr_addto_duplicate="1"
19740          break
19741        fi
19742      done
19743      if test $apr_addto_duplicate = "0"; then
19744        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
19745        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
19746      fi
19747    done
19748  fi
19749
19750    fi
19751
19752fi
19753
19754
19755      if test "$apu_have_pgsql" = "1"; then
19756
19757  if test "x$LDADD_dbd_pgsql" = "x"; then
19758    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_pgsql to \"$pgsql_LDFLAGS -lpq $pgsql_LIBS\""
19759    LDADD_dbd_pgsql="$pgsql_LDFLAGS -lpq $pgsql_LIBS"
19760  else
19761    apr_addto_bugger="$pgsql_LDFLAGS -lpq $pgsql_LIBS"
19762    for i in $apr_addto_bugger; do
19763      apr_addto_duplicate="0"
19764      for j in $LDADD_dbd_pgsql; do
19765        if test "x$i" = "x$j"; then
19766          apr_addto_duplicate="1"
19767          break
19768        fi
19769      done
19770      if test $apr_addto_duplicate = "0"; then
19771        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_pgsql"
19772        LDADD_dbd_pgsql="$LDADD_dbd_pgsql $i"
19773      fi
19774    done
19775  fi
19776
19777  fi
19778
19779
19780  LIBS="$old_libs"
19781  CPPFLAGS="$old_cppflags"
19782  LDFLAGS="$old_ldflags"
19783
19784
19785  apu_have_mysql=0
19786
19787  old_libs="$LIBS"
19788  old_cppflags="$CPPFLAGS"
19789  old_ldflags="$LDFLAGS"
19790
19791
19792# Check whether --with-mysql was given.
19793if test "${with_mysql+set}" = set; then :
19794  withval=$with_mysql;
19795    if test "$withval" = "yes"; then
19796      # Extract the first word of "mysql_config", so it can be a program name with args.
19797set dummy mysql_config; ac_word=$2
19798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19799$as_echo_n "checking for $ac_word... " >&6; }
19800if test "${ac_cv_path_MYSQL_CONFIG+set}" = set; then :
19801  $as_echo_n "(cached) " >&6
19802else
19803  case $MYSQL_CONFIG in
19804  [\\/]* | ?:[\\/]*)
19805  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
19806  ;;
19807  *)
19808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19809for as_dir in $PATH
19810do
19811  IFS=$as_save_IFS
19812  test -z "$as_dir" && as_dir=.
19813    for ac_exec_ext in '' $ac_executable_extensions; do
19814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19815    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19817    break 2
19818  fi
19819done
19820  done
19821IFS=$as_save_IFS
19822
19823  ;;
19824esac
19825fi
19826MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
19827if test -n "$MYSQL_CONFIG"; then
19828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
19829$as_echo "$MYSQL_CONFIG" >&6; }
19830else
19831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19832$as_echo "no" >&6; }
19833fi
19834
19835
19836      if test "x$MYSQL_CONFIG" != 'x'; then
19837        mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
19838        mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`"
19839        mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
19840
19841
19842  if test "x$CPPFLAGS" = "x"; then
19843    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$mysql_CPPFLAGS\""
19844    CPPFLAGS="$mysql_CPPFLAGS"
19845  else
19846    apr_addto_bugger="$mysql_CPPFLAGS"
19847    for i in $apr_addto_bugger; do
19848      apr_addto_duplicate="0"
19849      for j in $CPPFLAGS; do
19850        if test "x$i" = "x$j"; then
19851          apr_addto_duplicate="1"
19852          break
19853        fi
19854      done
19855      if test $apr_addto_duplicate = "0"; then
19856        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
19857        CPPFLAGS="$CPPFLAGS $i"
19858      fi
19859    done
19860  fi
19861
19862
19863  if test "x$LIBS" = "x"; then
19864    test "x$silent" != "xyes" && echo "  setting LIBS to \"$mysql_LIBS\""
19865    LIBS="$mysql_LIBS"
19866  else
19867    apr_addto_bugger="$mysql_LIBS"
19868    for i in $apr_addto_bugger; do
19869      apr_addto_duplicate="0"
19870      for j in $LIBS; do
19871        if test "x$i" = "x$j"; then
19872          apr_addto_duplicate="1"
19873          break
19874        fi
19875      done
19876      if test $apr_addto_duplicate = "0"; then
19877        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
19878        LIBS="$LIBS $i"
19879      fi
19880    done
19881  fi
19882
19883      fi
19884
19885      for ac_header in mysql.h my_global.h my_sys.h
19886do :
19887  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19888ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <my_global.h>
19889"
19890if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19891  cat >>confdefs.h <<_ACEOF
19892#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19893_ACEOF
19894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
19895$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
19896if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then :
19897  $as_echo_n "(cached) " >&6
19898else
19899  ac_check_lib_save_LIBS=$LIBS
19900LIBS="-lmysqlclient_r  $LIBS"
19901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19902/* end confdefs.h.  */
19903
19904/* Override any GCC internal prototype to avoid an error.
19905   Use char because int might match the return type of a GCC
19906   builtin and then its argument prototype would still apply.  */
19907#ifdef __cplusplus
19908extern "C"
19909#endif
19910char mysql_init ();
19911int
19912main ()
19913{
19914return mysql_init ();
19915  ;
19916  return 0;
19917}
19918_ACEOF
19919if ac_fn_c_try_link "$LINENO"; then :
19920  ac_cv_lib_mysqlclient_r_mysql_init=yes
19921else
19922  ac_cv_lib_mysqlclient_r_mysql_init=no
19923fi
19924rm -f core conftest.err conftest.$ac_objext \
19925    conftest$ac_exeext conftest.$ac_ext
19926LIBS=$ac_check_lib_save_LIBS
19927fi
19928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
19929$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
19930if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = x""yes; then :
19931  apu_have_mysql=1
19932fi
19933
19934else
19935  apu_have_mysql=0; break
19936fi
19937
19938done
19939
19940      if test "$apu_have_mysql" = "0"; then
19941        for ac_header in mysql/mysql.h mysql/my_global.h mysql/my_sys.h
19942do :
19943  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19944ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <mysql/my_global.h>
19945"
19946if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19947  cat >>confdefs.h <<_ACEOF
19948#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19949_ACEOF
19950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
19951$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
19952if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then :
19953  $as_echo_n "(cached) " >&6
19954else
19955  ac_check_lib_save_LIBS=$LIBS
19956LIBS="-lmysqlclient_r  $LIBS"
19957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19958/* end confdefs.h.  */
19959
19960/* Override any GCC internal prototype to avoid an error.
19961   Use char because int might match the return type of a GCC
19962   builtin and then its argument prototype would still apply.  */
19963#ifdef __cplusplus
19964extern "C"
19965#endif
19966char mysql_init ();
19967int
19968main ()
19969{
19970return mysql_init ();
19971  ;
19972  return 0;
19973}
19974_ACEOF
19975if ac_fn_c_try_link "$LINENO"; then :
19976  ac_cv_lib_mysqlclient_r_mysql_init=yes
19977else
19978  ac_cv_lib_mysqlclient_r_mysql_init=no
19979fi
19980rm -f core conftest.err conftest.$ac_objext \
19981    conftest$ac_exeext conftest.$ac_ext
19982LIBS=$ac_check_lib_save_LIBS
19983fi
19984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
19985$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
19986if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = x""yes; then :
19987  apu_have_mysql=1
19988fi
19989
19990else
19991  apu_have_mysql=0; break
19992fi
19993
19994done
19995
19996      fi
19997      if test "$apu_have_mysql" != "0" && test "x$MYSQL_CONFIG" != 'x'; then
19998
19999  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20000    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$mysql_CPPFLAGS\""
20001    APRUTIL_PRIV_INCLUDES="$mysql_CPPFLAGS"
20002  else
20003    apr_addto_bugger="$mysql_CPPFLAGS"
20004    for i in $apr_addto_bugger; do
20005      apr_addto_duplicate="0"
20006      for j in $APRUTIL_PRIV_INCLUDES; do
20007        if test "x$i" = "x$j"; then
20008          apr_addto_duplicate="1"
20009          break
20010        fi
20011      done
20012      if test $apr_addto_duplicate = "0"; then
20013        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20014        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20015      fi
20016    done
20017  fi
20018
20019      fi
20020    elif test "$withval" = "no"; then
20021      :
20022    else
20023      # Extract the first word of "mysql_config", so it can be a program name with args.
20024set dummy mysql_config; ac_word=$2
20025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20026$as_echo_n "checking for $ac_word... " >&6; }
20027if test "${ac_cv_path_MYSQL_CONFIG+set}" = set; then :
20028  $as_echo_n "(cached) " >&6
20029else
20030  case $MYSQL_CONFIG in
20031  [\\/]* | ?:[\\/]*)
20032  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
20033  ;;
20034  *)
20035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20036for as_dir in $withval/bin
20037do
20038  IFS=$as_save_IFS
20039  test -z "$as_dir" && as_dir=.
20040    for ac_exec_ext in '' $ac_executable_extensions; do
20041  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20042    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20044    break 2
20045  fi
20046done
20047  done
20048IFS=$as_save_IFS
20049
20050  ;;
20051esac
20052fi
20053MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
20054if test -n "$MYSQL_CONFIG"; then
20055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
20056$as_echo "$MYSQL_CONFIG" >&6; }
20057else
20058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20059$as_echo "no" >&6; }
20060fi
20061
20062
20063      if test "x$MYSQL_CONFIG" != 'x'; then
20064        mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
20065        mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`"
20066        mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
20067      else
20068        mysql_CPPFLAGS="-I$withval/include"
20069        mysql_LDFLAGS="-L$withval/lib "
20070      fi
20071
20072
20073  if test "x$CPPFLAGS" = "x"; then
20074    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$mysql_CPPFLAGS\""
20075    CPPFLAGS="$mysql_CPPFLAGS"
20076  else
20077    apr_addto_bugger="$mysql_CPPFLAGS"
20078    for i in $apr_addto_bugger; do
20079      apr_addto_duplicate="0"
20080      for j in $CPPFLAGS; do
20081        if test "x$i" = "x$j"; then
20082          apr_addto_duplicate="1"
20083          break
20084        fi
20085      done
20086      if test $apr_addto_duplicate = "0"; then
20087        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20088        CPPFLAGS="$CPPFLAGS $i"
20089      fi
20090    done
20091  fi
20092
20093
20094  if test "x$LDFLAGS" = "x"; then
20095    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$mysql_LDFLAGS\""
20096    LDFLAGS="$mysql_LDFLAGS"
20097  else
20098    apr_addto_bugger="$mysql_LDFLAGS"
20099    for i in $apr_addto_bugger; do
20100      apr_addto_duplicate="0"
20101      for j in $LDFLAGS; do
20102        if test "x$i" = "x$j"; then
20103          apr_addto_duplicate="1"
20104          break
20105        fi
20106      done
20107      if test $apr_addto_duplicate = "0"; then
20108        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20109        LDFLAGS="$LDFLAGS $i"
20110      fi
20111    done
20112  fi
20113
20114
20115  if test "x$LIBS" = "x"; then
20116    test "x$silent" != "xyes" && echo "  setting LIBS to \"$mysql_LIBS\""
20117    LIBS="$mysql_LIBS"
20118  else
20119    apr_addto_bugger="$mysql_LIBS"
20120    for i in $apr_addto_bugger; do
20121      apr_addto_duplicate="0"
20122      for j in $LIBS; do
20123        if test "x$i" = "x$j"; then
20124          apr_addto_duplicate="1"
20125          break
20126        fi
20127      done
20128      if test $apr_addto_duplicate = "0"; then
20129        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
20130        LIBS="$LIBS $i"
20131      fi
20132    done
20133  fi
20134
20135
20136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql in $withval" >&5
20137$as_echo "$as_me: checking for mysql in $withval" >&6;}
20138      for ac_header in mysql.h my_global.h my_sys.h
20139do :
20140  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20141ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <my_global.h>
20142"
20143if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20144  cat >>confdefs.h <<_ACEOF
20145#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20146_ACEOF
20147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
20148$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
20149if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then :
20150  $as_echo_n "(cached) " >&6
20151else
20152  ac_check_lib_save_LIBS=$LIBS
20153LIBS="-lmysqlclient_r  $LIBS"
20154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20155/* end confdefs.h.  */
20156
20157/* Override any GCC internal prototype to avoid an error.
20158   Use char because int might match the return type of a GCC
20159   builtin and then its argument prototype would still apply.  */
20160#ifdef __cplusplus
20161extern "C"
20162#endif
20163char mysql_init ();
20164int
20165main ()
20166{
20167return mysql_init ();
20168  ;
20169  return 0;
20170}
20171_ACEOF
20172if ac_fn_c_try_link "$LINENO"; then :
20173  ac_cv_lib_mysqlclient_r_mysql_init=yes
20174else
20175  ac_cv_lib_mysqlclient_r_mysql_init=no
20176fi
20177rm -f core conftest.err conftest.$ac_objext \
20178    conftest$ac_exeext conftest.$ac_ext
20179LIBS=$ac_check_lib_save_LIBS
20180fi
20181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
20182$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
20183if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = x""yes; then :
20184  apu_have_mysql=1
20185fi
20186
20187else
20188  apu_have_mysql=0; break
20189fi
20190
20191done
20192
20193
20194      if test "$apu_have_mysql" != "1"; then
20195        for ac_header in mysql/mysql.h mysql/my_global.h mysql/my_sys.h
20196do :
20197  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20198ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <mysql/my_global.h>
20199"
20200if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20201  cat >>confdefs.h <<_ACEOF
20202#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20203_ACEOF
20204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -lmysqlclient_r" >&5
20205$as_echo_n "checking for mysql_init in -lmysqlclient_r... " >&6; }
20206if test "${ac_cv_lib_mysqlclient_r_mysql_init+set}" = set; then :
20207  $as_echo_n "(cached) " >&6
20208else
20209  ac_check_lib_save_LIBS=$LIBS
20210LIBS="-lmysqlclient_r  $LIBS"
20211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20212/* end confdefs.h.  */
20213
20214/* Override any GCC internal prototype to avoid an error.
20215   Use char because int might match the return type of a GCC
20216   builtin and then its argument prototype would still apply.  */
20217#ifdef __cplusplus
20218extern "C"
20219#endif
20220char mysql_init ();
20221int
20222main ()
20223{
20224return mysql_init ();
20225  ;
20226  return 0;
20227}
20228_ACEOF
20229if ac_fn_c_try_link "$LINENO"; then :
20230  ac_cv_lib_mysqlclient_r_mysql_init=yes
20231else
20232  ac_cv_lib_mysqlclient_r_mysql_init=no
20233fi
20234rm -f core conftest.err conftest.$ac_objext \
20235    conftest$ac_exeext conftest.$ac_ext
20236LIBS=$ac_check_lib_save_LIBS
20237fi
20238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_init" >&5
20239$as_echo "$ac_cv_lib_mysqlclient_r_mysql_init" >&6; }
20240if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = x""yes; then :
20241  apu_have_mysql=1
20242fi
20243
20244else
20245  apu_have_mysql=0; break
20246fi
20247
20248done
20249
20250      fi
20251      if test "$apu_have_mysql" != "0"; then
20252
20253  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20254    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$mysql_CPPFLAGS\""
20255    APRUTIL_PRIV_INCLUDES="$mysql_CPPFLAGS"
20256  else
20257    apr_addto_bugger="$mysql_CPPFLAGS"
20258    for i in $apr_addto_bugger; do
20259      apr_addto_duplicate="0"
20260      for j in $APRUTIL_PRIV_INCLUDES; do
20261        if test "x$i" = "x$j"; then
20262          apr_addto_duplicate="1"
20263          break
20264        fi
20265      done
20266      if test $apr_addto_duplicate = "0"; then
20267        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20268        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20269      fi
20270    done
20271  fi
20272
20273      fi
20274    fi
20275
20276fi
20277
20278
20279
20280
20281      if test "$apu_have_mysql" = "1"; then
20282
20283  if test "x$LDADD_dbd_mysql" = "x"; then
20284    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_mysql to \"$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS\""
20285    LDADD_dbd_mysql="$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS"
20286  else
20287    apr_addto_bugger="$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS"
20288    for i in $apr_addto_bugger; do
20289      apr_addto_duplicate="0"
20290      for j in $LDADD_dbd_mysql; do
20291        if test "x$i" = "x$j"; then
20292          apr_addto_duplicate="1"
20293          break
20294        fi
20295      done
20296      if test $apr_addto_duplicate = "0"; then
20297        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_mysql"
20298        LDADD_dbd_mysql="$LDADD_dbd_mysql $i"
20299      fi
20300    done
20301  fi
20302
20303  fi
20304
20305
20306  LIBS="$old_libs"
20307  CPPFLAGS="$old_cppflags"
20308  LDFLAGS="$old_ldflags"
20309
20310
20311  apu_have_sqlite3=0
20312
20313  old_libs="$LIBS"
20314  old_cppflags="$CPPFLAGS"
20315  old_ldflags="$LDFLAGS"
20316
20317
20318# Check whether --with-sqlite3 was given.
20319if test "${with_sqlite3+set}" = set; then :
20320  withval=$with_sqlite3;
20321    if test "$withval" = "yes"; then
20322      for ac_header in sqlite3.h
20323do :
20324  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20325if test "x$ac_cv_header_sqlite3_h" = x""yes; then :
20326  cat >>confdefs.h <<_ACEOF
20327#define HAVE_SQLITE3_H 1
20328_ACEOF
20329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20330$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20331if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
20332  $as_echo_n "(cached) " >&6
20333else
20334  ac_check_lib_save_LIBS=$LIBS
20335LIBS="-lsqlite3  $LIBS"
20336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20337/* end confdefs.h.  */
20338
20339/* Override any GCC internal prototype to avoid an error.
20340   Use char because int might match the return type of a GCC
20341   builtin and then its argument prototype would still apply.  */
20342#ifdef __cplusplus
20343extern "C"
20344#endif
20345char sqlite3_open ();
20346int
20347main ()
20348{
20349return sqlite3_open ();
20350  ;
20351  return 0;
20352}
20353_ACEOF
20354if ac_fn_c_try_link "$LINENO"; then :
20355  ac_cv_lib_sqlite3_sqlite3_open=yes
20356else
20357  ac_cv_lib_sqlite3_sqlite3_open=no
20358fi
20359rm -f core conftest.err conftest.$ac_objext \
20360    conftest$ac_exeext conftest.$ac_ext
20361LIBS=$ac_check_lib_save_LIBS
20362fi
20363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20364$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20365if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
20366  apu_have_sqlite3=1
20367fi
20368
20369fi
20370
20371done
20372
20373    elif test "$withval" = "no"; then
20374      :
20375    else
20376      sqlite3_CPPFLAGS="-I$withval/include"
20377      sqlite3_LDFLAGS="-L$withval/lib "
20378
20379
20380  if test "x$CPPFLAGS" = "x"; then
20381    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sqlite3_CPPFLAGS\""
20382    CPPFLAGS="$sqlite3_CPPFLAGS"
20383  else
20384    apr_addto_bugger="$sqlite3_CPPFLAGS"
20385    for i in $apr_addto_bugger; do
20386      apr_addto_duplicate="0"
20387      for j in $CPPFLAGS; do
20388        if test "x$i" = "x$j"; then
20389          apr_addto_duplicate="1"
20390          break
20391        fi
20392      done
20393      if test $apr_addto_duplicate = "0"; then
20394        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20395        CPPFLAGS="$CPPFLAGS $i"
20396      fi
20397    done
20398  fi
20399
20400
20401  if test "x$LDFLAGS" = "x"; then
20402    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sqlite3_LDFLAGS\""
20403    LDFLAGS="$sqlite3_LDFLAGS"
20404  else
20405    apr_addto_bugger="$sqlite3_LDFLAGS"
20406    for i in $apr_addto_bugger; do
20407      apr_addto_duplicate="0"
20408      for j in $LDFLAGS; do
20409        if test "x$i" = "x$j"; then
20410          apr_addto_duplicate="1"
20411          break
20412        fi
20413      done
20414      if test $apr_addto_duplicate = "0"; then
20415        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20416        LDFLAGS="$LDFLAGS $i"
20417      fi
20418    done
20419  fi
20420
20421
20422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3 in $withval" >&5
20423$as_echo "$as_me: checking for sqlite3 in $withval" >&6;}
20424      for ac_header in sqlite3.h
20425do :
20426  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20427if test "x$ac_cv_header_sqlite3_h" = x""yes; then :
20428  cat >>confdefs.h <<_ACEOF
20429#define HAVE_SQLITE3_H 1
20430_ACEOF
20431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20432$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20433if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
20434  $as_echo_n "(cached) " >&6
20435else
20436  ac_check_lib_save_LIBS=$LIBS
20437LIBS="-lsqlite3  $LIBS"
20438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20439/* end confdefs.h.  */
20440
20441/* Override any GCC internal prototype to avoid an error.
20442   Use char because int might match the return type of a GCC
20443   builtin and then its argument prototype would still apply.  */
20444#ifdef __cplusplus
20445extern "C"
20446#endif
20447char sqlite3_open ();
20448int
20449main ()
20450{
20451return sqlite3_open ();
20452  ;
20453  return 0;
20454}
20455_ACEOF
20456if ac_fn_c_try_link "$LINENO"; then :
20457  ac_cv_lib_sqlite3_sqlite3_open=yes
20458else
20459  ac_cv_lib_sqlite3_sqlite3_open=no
20460fi
20461rm -f core conftest.err conftest.$ac_objext \
20462    conftest$ac_exeext conftest.$ac_ext
20463LIBS=$ac_check_lib_save_LIBS
20464fi
20465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20466$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20467if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
20468  apu_have_sqlite3=1
20469fi
20470
20471fi
20472
20473done
20474
20475      if test "$apu_have_sqlite3" != "0"; then
20476
20477  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20478    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
20479    APRUTIL_PRIV_INCLUDES="-I$withval/include"
20480  else
20481    apr_addto_bugger="-I$withval/include"
20482    for i in $apr_addto_bugger; do
20483      apr_addto_duplicate="0"
20484      for j in $APRUTIL_PRIV_INCLUDES; do
20485        if test "x$i" = "x$j"; then
20486          apr_addto_duplicate="1"
20487          break
20488        fi
20489      done
20490      if test $apr_addto_duplicate = "0"; then
20491        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20492        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20493      fi
20494    done
20495  fi
20496
20497      fi
20498    fi
20499
20500else
20501
20502    for ac_header in sqlite3.h
20503do :
20504  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
20505if test "x$ac_cv_header_sqlite3_h" = x""yes; then :
20506  cat >>confdefs.h <<_ACEOF
20507#define HAVE_SQLITE3_H 1
20508_ACEOF
20509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
20510$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
20511if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
20512  $as_echo_n "(cached) " >&6
20513else
20514  ac_check_lib_save_LIBS=$LIBS
20515LIBS="-lsqlite3  $LIBS"
20516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20517/* end confdefs.h.  */
20518
20519/* Override any GCC internal prototype to avoid an error.
20520   Use char because int might match the return type of a GCC
20521   builtin and then its argument prototype would still apply.  */
20522#ifdef __cplusplus
20523extern "C"
20524#endif
20525char sqlite3_open ();
20526int
20527main ()
20528{
20529return sqlite3_open ();
20530  ;
20531  return 0;
20532}
20533_ACEOF
20534if ac_fn_c_try_link "$LINENO"; then :
20535  ac_cv_lib_sqlite3_sqlite3_open=yes
20536else
20537  ac_cv_lib_sqlite3_sqlite3_open=no
20538fi
20539rm -f core conftest.err conftest.$ac_objext \
20540    conftest$ac_exeext conftest.$ac_ext
20541LIBS=$ac_check_lib_save_LIBS
20542fi
20543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
20544$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
20545if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
20546  apu_have_sqlite3=1
20547fi
20548
20549fi
20550
20551done
20552
20553
20554fi
20555
20556
20557
20558
20559      if test "$apu_have_sqlite3" = "1"; then
20560
20561  if test "x$LDADD_dbd_sqlite3" = "x"; then
20562    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_sqlite3 to \"$sqlite3_LDFLAGS -lsqlite3\""
20563    LDADD_dbd_sqlite3="$sqlite3_LDFLAGS -lsqlite3"
20564  else
20565    apr_addto_bugger="$sqlite3_LDFLAGS -lsqlite3"
20566    for i in $apr_addto_bugger; do
20567      apr_addto_duplicate="0"
20568      for j in $LDADD_dbd_sqlite3; do
20569        if test "x$i" = "x$j"; then
20570          apr_addto_duplicate="1"
20571          break
20572        fi
20573      done
20574      if test $apr_addto_duplicate = "0"; then
20575        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_sqlite3"
20576        LDADD_dbd_sqlite3="$LDADD_dbd_sqlite3 $i"
20577      fi
20578    done
20579  fi
20580
20581  fi
20582
20583
20584  LIBS="$old_libs"
20585  CPPFLAGS="$old_cppflags"
20586  LDFLAGS="$old_ldflags"
20587
20588
20589  apu_have_sqlite2=0
20590
20591  old_libs="$LIBS"
20592  old_cppflags="$CPPFLAGS"
20593  old_ldflags="$LDFLAGS"
20594
20595
20596# Check whether --with-sqlite2 was given.
20597if test "${with_sqlite2+set}" = set; then :
20598  withval=$with_sqlite2;
20599    if test "$withval" = "yes"; then
20600      for ac_header in sqlite.h
20601do :
20602  ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20603if test "x$ac_cv_header_sqlite_h" = x""yes; then :
20604  cat >>confdefs.h <<_ACEOF
20605#define HAVE_SQLITE_H 1
20606_ACEOF
20607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20608$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20609if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then :
20610  $as_echo_n "(cached) " >&6
20611else
20612  ac_check_lib_save_LIBS=$LIBS
20613LIBS="-lsqlite  $LIBS"
20614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20615/* end confdefs.h.  */
20616
20617/* Override any GCC internal prototype to avoid an error.
20618   Use char because int might match the return type of a GCC
20619   builtin and then its argument prototype would still apply.  */
20620#ifdef __cplusplus
20621extern "C"
20622#endif
20623char sqlite_open ();
20624int
20625main ()
20626{
20627return sqlite_open ();
20628  ;
20629  return 0;
20630}
20631_ACEOF
20632if ac_fn_c_try_link "$LINENO"; then :
20633  ac_cv_lib_sqlite_sqlite_open=yes
20634else
20635  ac_cv_lib_sqlite_sqlite_open=no
20636fi
20637rm -f core conftest.err conftest.$ac_objext \
20638    conftest$ac_exeext conftest.$ac_ext
20639LIBS=$ac_check_lib_save_LIBS
20640fi
20641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20642$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20643if test "x$ac_cv_lib_sqlite_sqlite_open" = x""yes; then :
20644  apu_have_sqlite2=1
20645fi
20646
20647fi
20648
20649done
20650
20651    elif test "$withval" = "no"; then
20652      :
20653    else
20654      sqlite2_CPPFLAGS="-I$withval/include"
20655      sqlite2_LDFLAGS="-L$withval/lib "
20656
20657
20658  if test "x$CPPFLAGS" = "x"; then
20659    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sqlite2_CPPFLAGS\""
20660    CPPFLAGS="$sqlite2_CPPFLAGS"
20661  else
20662    apr_addto_bugger="$sqlite2_CPPFLAGS"
20663    for i in $apr_addto_bugger; do
20664      apr_addto_duplicate="0"
20665      for j in $CPPFLAGS; do
20666        if test "x$i" = "x$j"; then
20667          apr_addto_duplicate="1"
20668          break
20669        fi
20670      done
20671      if test $apr_addto_duplicate = "0"; then
20672        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20673        CPPFLAGS="$CPPFLAGS $i"
20674      fi
20675    done
20676  fi
20677
20678
20679  if test "x$LDFLAGS" = "x"; then
20680    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sqlite2_LDFLAGS\""
20681    LDFLAGS="$sqlite2_LDFLAGS"
20682  else
20683    apr_addto_bugger="$sqlite2_LDFLAGS"
20684    for i in $apr_addto_bugger; do
20685      apr_addto_duplicate="0"
20686      for j in $LDFLAGS; do
20687        if test "x$i" = "x$j"; then
20688          apr_addto_duplicate="1"
20689          break
20690        fi
20691      done
20692      if test $apr_addto_duplicate = "0"; then
20693        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
20694        LDFLAGS="$LDFLAGS $i"
20695      fi
20696    done
20697  fi
20698
20699
20700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite2 in $withval" >&5
20701$as_echo "$as_me: checking for sqlite2 in $withval" >&6;}
20702      for ac_header in sqlite.h
20703do :
20704  ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20705if test "x$ac_cv_header_sqlite_h" = x""yes; then :
20706  cat >>confdefs.h <<_ACEOF
20707#define HAVE_SQLITE_H 1
20708_ACEOF
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20710$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20711if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then :
20712  $as_echo_n "(cached) " >&6
20713else
20714  ac_check_lib_save_LIBS=$LIBS
20715LIBS="-lsqlite  $LIBS"
20716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20717/* end confdefs.h.  */
20718
20719/* Override any GCC internal prototype to avoid an error.
20720   Use char because int might match the return type of a GCC
20721   builtin and then its argument prototype would still apply.  */
20722#ifdef __cplusplus
20723extern "C"
20724#endif
20725char sqlite_open ();
20726int
20727main ()
20728{
20729return sqlite_open ();
20730  ;
20731  return 0;
20732}
20733_ACEOF
20734if ac_fn_c_try_link "$LINENO"; then :
20735  ac_cv_lib_sqlite_sqlite_open=yes
20736else
20737  ac_cv_lib_sqlite_sqlite_open=no
20738fi
20739rm -f core conftest.err conftest.$ac_objext \
20740    conftest$ac_exeext conftest.$ac_ext
20741LIBS=$ac_check_lib_save_LIBS
20742fi
20743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20744$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20745if test "x$ac_cv_lib_sqlite_sqlite_open" = x""yes; then :
20746  apu_have_sqlite2=1
20747fi
20748
20749fi
20750
20751done
20752
20753      if test "$apu_have_sqlite2" != "0"; then
20754
20755  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20756    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
20757    APRUTIL_PRIV_INCLUDES="-I$withval/include"
20758  else
20759    apr_addto_bugger="-I$withval/include"
20760    for i in $apr_addto_bugger; do
20761      apr_addto_duplicate="0"
20762      for j in $APRUTIL_PRIV_INCLUDES; do
20763        if test "x$i" = "x$j"; then
20764          apr_addto_duplicate="1"
20765          break
20766        fi
20767      done
20768      if test $apr_addto_duplicate = "0"; then
20769        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20770        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20771      fi
20772    done
20773  fi
20774
20775      fi
20776    fi
20777
20778else
20779
20780    for ac_header in sqlite.h
20781do :
20782  ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default"
20783if test "x$ac_cv_header_sqlite_h" = x""yes; then :
20784  cat >>confdefs.h <<_ACEOF
20785#define HAVE_SQLITE_H 1
20786_ACEOF
20787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite_open in -lsqlite" >&5
20788$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
20789if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then :
20790  $as_echo_n "(cached) " >&6
20791else
20792  ac_check_lib_save_LIBS=$LIBS
20793LIBS="-lsqlite  $LIBS"
20794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795/* end confdefs.h.  */
20796
20797/* Override any GCC internal prototype to avoid an error.
20798   Use char because int might match the return type of a GCC
20799   builtin and then its argument prototype would still apply.  */
20800#ifdef __cplusplus
20801extern "C"
20802#endif
20803char sqlite_open ();
20804int
20805main ()
20806{
20807return sqlite_open ();
20808  ;
20809  return 0;
20810}
20811_ACEOF
20812if ac_fn_c_try_link "$LINENO"; then :
20813  ac_cv_lib_sqlite_sqlite_open=yes
20814else
20815  ac_cv_lib_sqlite_sqlite_open=no
20816fi
20817rm -f core conftest.err conftest.$ac_objext \
20818    conftest$ac_exeext conftest.$ac_ext
20819LIBS=$ac_check_lib_save_LIBS
20820fi
20821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite_open" >&5
20822$as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
20823if test "x$ac_cv_lib_sqlite_sqlite_open" = x""yes; then :
20824  apu_have_sqlite2=1
20825fi
20826
20827fi
20828
20829done
20830
20831
20832fi
20833
20834
20835
20836
20837      if test "$apu_have_sqlite2" = "1"; then
20838
20839  if test "x$LDADD_dbd_sqlite2" = "x"; then
20840    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_sqlite2 to \"$sqlite2_LDFLAGS -lsqlite\""
20841    LDADD_dbd_sqlite2="$sqlite2_LDFLAGS -lsqlite"
20842  else
20843    apr_addto_bugger="$sqlite2_LDFLAGS -lsqlite"
20844    for i in $apr_addto_bugger; do
20845      apr_addto_duplicate="0"
20846      for j in $LDADD_dbd_sqlite2; do
20847        if test "x$i" = "x$j"; then
20848          apr_addto_duplicate="1"
20849          break
20850        fi
20851      done
20852      if test $apr_addto_duplicate = "0"; then
20853        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_sqlite2"
20854        LDADD_dbd_sqlite2="$LDADD_dbd_sqlite2 $i"
20855      fi
20856    done
20857  fi
20858
20859  fi
20860
20861
20862  LIBS="$old_libs"
20863  CPPFLAGS="$old_cppflags"
20864  LDFLAGS="$old_ldflags"
20865
20866
20867  apu_have_oracle=0
20868
20869  old_libs="$LIBS"
20870  old_cppflags="$CPPFLAGS"
20871  old_ldflags="$LDFLAGS"
20872
20873
20874# Check whether --with-oracle-include was given.
20875if test "${with_oracle_include+set}" = set; then :
20876  withval=$with_oracle_include;
20877fi
20878
20879
20880# Check whether --with-oracle was given.
20881if test "${with_oracle+set}" = set; then :
20882  withval=$with_oracle;
20883    if test "$withval" = "yes"; then
20884      if test -n "$with_oracle_include"; then
20885        oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
20886
20887  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
20888    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$with_oracle_include\""
20889    APRUTIL_PRIV_INCLUDES="-I$with_oracle_include"
20890  else
20891    apr_addto_bugger="-I$with_oracle_include"
20892    for i in $apr_addto_bugger; do
20893      apr_addto_duplicate="0"
20894      for j in $APRUTIL_PRIV_INCLUDES; do
20895        if test "x$i" = "x$j"; then
20896          apr_addto_duplicate="1"
20897          break
20898        fi
20899      done
20900      if test $apr_addto_duplicate = "0"; then
20901        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
20902        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
20903      fi
20904    done
20905  fi
20906
20907      fi
20908
20909
20910  if test "x$CPPFLAGS" = "x"; then
20911    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$oracle_CPPFLAGS\""
20912    CPPFLAGS="$oracle_CPPFLAGS"
20913  else
20914    apr_addto_bugger="$oracle_CPPFLAGS"
20915    for i in $apr_addto_bugger; do
20916      apr_addto_duplicate="0"
20917      for j in $CPPFLAGS; do
20918        if test "x$i" = "x$j"; then
20919          apr_addto_duplicate="1"
20920          break
20921        fi
20922      done
20923      if test $apr_addto_duplicate = "0"; then
20924        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
20925        CPPFLAGS="$CPPFLAGS $i"
20926      fi
20927    done
20928  fi
20929
20930
20931      for ac_header in oci.h
20932do :
20933  ac_fn_c_check_header_mongrel "$LINENO" "oci.h" "ac_cv_header_oci_h" "$ac_includes_default"
20934if test "x$ac_cv_header_oci_h" = x""yes; then :
20935  cat >>confdefs.h <<_ACEOF
20936#define HAVE_OCI_H 1
20937_ACEOF
20938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
20939$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
20940if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
20941  $as_echo_n "(cached) " >&6
20942else
20943  ac_check_lib_save_LIBS=$LIBS
20944LIBS="-lclntsh  $LIBS"
20945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20946/* end confdefs.h.  */
20947
20948/* Override any GCC internal prototype to avoid an error.
20949   Use char because int might match the return type of a GCC
20950   builtin and then its argument prototype would still apply.  */
20951#ifdef __cplusplus
20952extern "C"
20953#endif
20954char OCIEnvCreate ();
20955int
20956main ()
20957{
20958return OCIEnvCreate ();
20959  ;
20960  return 0;
20961}
20962_ACEOF
20963if ac_fn_c_try_link "$LINENO"; then :
20964  ac_cv_lib_clntsh_OCIEnvCreate=yes
20965else
20966  ac_cv_lib_clntsh_OCIEnvCreate=no
20967fi
20968rm -f core conftest.err conftest.$ac_objext \
20969    conftest$ac_exeext conftest.$ac_ext
20970LIBS=$ac_check_lib_save_LIBS
20971fi
20972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
20973$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
20974if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
20975  apu_have_oracle=1
20976else
20977
20978        unset ac_cv_lib_clntsh_OCIEnvCreate
20979        oracle_LIBS="-lnnz11"
20980
20981  if test "x$LIBS" = "x"; then
20982    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
20983    LIBS="$oracle_LIBS"
20984  else
20985    apr_addto_bugger="$oracle_LIBS"
20986    for i in $apr_addto_bugger; do
20987      apr_addto_duplicate="0"
20988      for j in $LIBS; do
20989        if test "x$i" = "x$j"; then
20990          apr_addto_duplicate="1"
20991          break
20992        fi
20993      done
20994      if test $apr_addto_duplicate = "0"; then
20995        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
20996        LIBS="$LIBS $i"
20997      fi
20998    done
20999  fi
21000
21001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21002$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21003if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
21004  $as_echo_n "(cached) " >&6
21005else
21006  ac_check_lib_save_LIBS=$LIBS
21007LIBS="-lclntsh  $LIBS"
21008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21009/* end confdefs.h.  */
21010
21011/* Override any GCC internal prototype to avoid an error.
21012   Use char because int might match the return type of a GCC
21013   builtin and then its argument prototype would still apply.  */
21014#ifdef __cplusplus
21015extern "C"
21016#endif
21017char OCIEnvCreate ();
21018int
21019main ()
21020{
21021return OCIEnvCreate ();
21022  ;
21023  return 0;
21024}
21025_ACEOF
21026if ac_fn_c_try_link "$LINENO"; then :
21027  ac_cv_lib_clntsh_OCIEnvCreate=yes
21028else
21029  ac_cv_lib_clntsh_OCIEnvCreate=no
21030fi
21031rm -f core conftest.err conftest.$ac_objext \
21032    conftest$ac_exeext conftest.$ac_ext
21033LIBS=$ac_check_lib_save_LIBS
21034fi
21035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21036$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21037if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
21038  apu_have_oracle=1
21039else
21040
21041          unset ac_cv_lib_clntsh_OCIEnvCreate
21042
21043  if test "x$LIBS" = "x$oracle_LIBS"; then
21044    test "x$silent" != "xyes" && echo "  nulling LIBS"
21045    LIBS=""
21046  else
21047    apr_new_bugger=""
21048    apr_removed=0
21049    for i in $LIBS; do
21050      if test "x$i" != "x$oracle_LIBS"; then
21051        apr_new_bugger="$apr_new_bugger $i"
21052      else
21053        apr_removed=1
21054      fi
21055    done
21056    if test $apr_removed = "1"; then
21057      test "x$silent" != "xyes" && echo "  removed \"$oracle_LIBS\" from LIBS"
21058      LIBS=$apr_new_bugger
21059    fi
21060  fi
21061
21062          oracle_LIBS="-lnnz10"
21063
21064  if test "x$LIBS" = "x"; then
21065    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21066    LIBS="$oracle_LIBS"
21067  else
21068    apr_addto_bugger="$oracle_LIBS"
21069    for i in $apr_addto_bugger; do
21070      apr_addto_duplicate="0"
21071      for j in $LIBS; do
21072        if test "x$i" = "x$j"; then
21073          apr_addto_duplicate="1"
21074          break
21075        fi
21076      done
21077      if test $apr_addto_duplicate = "0"; then
21078        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21079        LIBS="$LIBS $i"
21080      fi
21081    done
21082  fi
21083
21084          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21085$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21086if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
21087  $as_echo_n "(cached) " >&6
21088else
21089  ac_check_lib_save_LIBS=$LIBS
21090LIBS="-lclntsh  $LIBS"
21091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21092/* end confdefs.h.  */
21093
21094/* Override any GCC internal prototype to avoid an error.
21095   Use char because int might match the return type of a GCC
21096   builtin and then its argument prototype would still apply.  */
21097#ifdef __cplusplus
21098extern "C"
21099#endif
21100char OCIEnvCreate ();
21101int
21102main ()
21103{
21104return OCIEnvCreate ();
21105  ;
21106  return 0;
21107}
21108_ACEOF
21109if ac_fn_c_try_link "$LINENO"; then :
21110  ac_cv_lib_clntsh_OCIEnvCreate=yes
21111else
21112  ac_cv_lib_clntsh_OCIEnvCreate=no
21113fi
21114rm -f core conftest.err conftest.$ac_objext \
21115    conftest$ac_exeext conftest.$ac_ext
21116LIBS=$ac_check_lib_save_LIBS
21117fi
21118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21119$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21120if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
21121  apu_have_oracle=1
21122fi
21123
21124
21125fi
21126
21127
21128fi
21129
21130fi
21131
21132done
21133
21134    elif test "$withval" = "no"; then
21135      :
21136    else
21137      if test -n "$with_oracle_include"; then
21138        oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
21139
21140  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21141    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$with_oracle_include\""
21142    APRUTIL_PRIV_INCLUDES="-I$with_oracle_include"
21143  else
21144    apr_addto_bugger="-I$with_oracle_include"
21145    for i in $apr_addto_bugger; do
21146      apr_addto_duplicate="0"
21147      for j in $APRUTIL_PRIV_INCLUDES; do
21148        if test "x$i" = "x$j"; then
21149          apr_addto_duplicate="1"
21150          break
21151        fi
21152      done
21153      if test $apr_addto_duplicate = "0"; then
21154        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21155        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21156      fi
21157    done
21158  fi
21159
21160      else
21161        oracle_CPPFLAGS="-I$withval/rdbms/demo -I$withval/rdbms/public"
21162      fi
21163      oracle_LDFLAGS="-L$withval/lib "
21164
21165
21166  if test "x$CPPFLAGS" = "x"; then
21167    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$oracle_CPPFLAGS\""
21168    CPPFLAGS="$oracle_CPPFLAGS"
21169  else
21170    apr_addto_bugger="$oracle_CPPFLAGS"
21171    for i in $apr_addto_bugger; do
21172      apr_addto_duplicate="0"
21173      for j in $CPPFLAGS; do
21174        if test "x$i" = "x$j"; then
21175          apr_addto_duplicate="1"
21176          break
21177        fi
21178      done
21179      if test $apr_addto_duplicate = "0"; then
21180        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21181        CPPFLAGS="$CPPFLAGS $i"
21182      fi
21183    done
21184  fi
21185
21186
21187  if test "x$LDFLAGS" = "x"; then
21188    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$oracle_LDFLAGS\""
21189    LDFLAGS="$oracle_LDFLAGS"
21190  else
21191    apr_addto_bugger="$oracle_LDFLAGS"
21192    for i in $apr_addto_bugger; do
21193      apr_addto_duplicate="0"
21194      for j in $LDFLAGS; do
21195        if test "x$i" = "x$j"; then
21196          apr_addto_duplicate="1"
21197          break
21198        fi
21199      done
21200      if test $apr_addto_duplicate = "0"; then
21201        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
21202        LDFLAGS="$LDFLAGS $i"
21203      fi
21204    done
21205  fi
21206
21207
21208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for oracle in $withval" >&5
21209$as_echo "$as_me: checking for oracle in $withval" >&6;}
21210      for ac_header in oci.h
21211do :
21212  ac_fn_c_check_header_mongrel "$LINENO" "oci.h" "ac_cv_header_oci_h" "$ac_includes_default"
21213if test "x$ac_cv_header_oci_h" = x""yes; then :
21214  cat >>confdefs.h <<_ACEOF
21215#define HAVE_OCI_H 1
21216_ACEOF
21217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21218$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21219if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
21220  $as_echo_n "(cached) " >&6
21221else
21222  ac_check_lib_save_LIBS=$LIBS
21223LIBS="-lclntsh  $LIBS"
21224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21225/* end confdefs.h.  */
21226
21227/* Override any GCC internal prototype to avoid an error.
21228   Use char because int might match the return type of a GCC
21229   builtin and then its argument prototype would still apply.  */
21230#ifdef __cplusplus
21231extern "C"
21232#endif
21233char OCIEnvCreate ();
21234int
21235main ()
21236{
21237return OCIEnvCreate ();
21238  ;
21239  return 0;
21240}
21241_ACEOF
21242if ac_fn_c_try_link "$LINENO"; then :
21243  ac_cv_lib_clntsh_OCIEnvCreate=yes
21244else
21245  ac_cv_lib_clntsh_OCIEnvCreate=no
21246fi
21247rm -f core conftest.err conftest.$ac_objext \
21248    conftest$ac_exeext conftest.$ac_ext
21249LIBS=$ac_check_lib_save_LIBS
21250fi
21251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21252$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21253if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
21254  apu_have_oracle=1
21255else
21256
21257        unset ac_cv_lib_clntsh_OCIEnvCreate
21258        oracle_LIBS="-lnnz11"
21259
21260  if test "x$LIBS" = "x"; then
21261    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21262    LIBS="$oracle_LIBS"
21263  else
21264    apr_addto_bugger="$oracle_LIBS"
21265    for i in $apr_addto_bugger; do
21266      apr_addto_duplicate="0"
21267      for j in $LIBS; do
21268        if test "x$i" = "x$j"; then
21269          apr_addto_duplicate="1"
21270          break
21271        fi
21272      done
21273      if test $apr_addto_duplicate = "0"; then
21274        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21275        LIBS="$LIBS $i"
21276      fi
21277    done
21278  fi
21279
21280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21281$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21282if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
21283  $as_echo_n "(cached) " >&6
21284else
21285  ac_check_lib_save_LIBS=$LIBS
21286LIBS="-lclntsh  $LIBS"
21287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21288/* end confdefs.h.  */
21289
21290/* Override any GCC internal prototype to avoid an error.
21291   Use char because int might match the return type of a GCC
21292   builtin and then its argument prototype would still apply.  */
21293#ifdef __cplusplus
21294extern "C"
21295#endif
21296char OCIEnvCreate ();
21297int
21298main ()
21299{
21300return OCIEnvCreate ();
21301  ;
21302  return 0;
21303}
21304_ACEOF
21305if ac_fn_c_try_link "$LINENO"; then :
21306  ac_cv_lib_clntsh_OCIEnvCreate=yes
21307else
21308  ac_cv_lib_clntsh_OCIEnvCreate=no
21309fi
21310rm -f core conftest.err conftest.$ac_objext \
21311    conftest$ac_exeext conftest.$ac_ext
21312LIBS=$ac_check_lib_save_LIBS
21313fi
21314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21315$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21316if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
21317  apu_have_oracle=1
21318else
21319
21320          unset ac_cv_lib_clntsh_OCIEnvCreate
21321
21322  if test "x$LIBS" = "x$oracle_LIBS"; then
21323    test "x$silent" != "xyes" && echo "  nulling LIBS"
21324    LIBS=""
21325  else
21326    apr_new_bugger=""
21327    apr_removed=0
21328    for i in $LIBS; do
21329      if test "x$i" != "x$oracle_LIBS"; then
21330        apr_new_bugger="$apr_new_bugger $i"
21331      else
21332        apr_removed=1
21333      fi
21334    done
21335    if test $apr_removed = "1"; then
21336      test "x$silent" != "xyes" && echo "  removed \"$oracle_LIBS\" from LIBS"
21337      LIBS=$apr_new_bugger
21338    fi
21339  fi
21340
21341          oracle_LIBS="-lnnz10"
21342
21343  if test "x$LIBS" = "x"; then
21344    test "x$silent" != "xyes" && echo "  setting LIBS to \"$oracle_LIBS\""
21345    LIBS="$oracle_LIBS"
21346  else
21347    apr_addto_bugger="$oracle_LIBS"
21348    for i in $apr_addto_bugger; do
21349      apr_addto_duplicate="0"
21350      for j in $LIBS; do
21351        if test "x$i" = "x$j"; then
21352          apr_addto_duplicate="1"
21353          break
21354        fi
21355      done
21356      if test $apr_addto_duplicate = "0"; then
21357        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
21358        LIBS="$LIBS $i"
21359      fi
21360    done
21361  fi
21362
21363          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCIEnvCreate in -lclntsh" >&5
21364$as_echo_n "checking for OCIEnvCreate in -lclntsh... " >&6; }
21365if test "${ac_cv_lib_clntsh_OCIEnvCreate+set}" = set; then :
21366  $as_echo_n "(cached) " >&6
21367else
21368  ac_check_lib_save_LIBS=$LIBS
21369LIBS="-lclntsh  $LIBS"
21370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21371/* end confdefs.h.  */
21372
21373/* Override any GCC internal prototype to avoid an error.
21374   Use char because int might match the return type of a GCC
21375   builtin and then its argument prototype would still apply.  */
21376#ifdef __cplusplus
21377extern "C"
21378#endif
21379char OCIEnvCreate ();
21380int
21381main ()
21382{
21383return OCIEnvCreate ();
21384  ;
21385  return 0;
21386}
21387_ACEOF
21388if ac_fn_c_try_link "$LINENO"; then :
21389  ac_cv_lib_clntsh_OCIEnvCreate=yes
21390else
21391  ac_cv_lib_clntsh_OCIEnvCreate=no
21392fi
21393rm -f core conftest.err conftest.$ac_objext \
21394    conftest$ac_exeext conftest.$ac_ext
21395LIBS=$ac_check_lib_save_LIBS
21396fi
21397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clntsh_OCIEnvCreate" >&5
21398$as_echo "$ac_cv_lib_clntsh_OCIEnvCreate" >&6; }
21399if test "x$ac_cv_lib_clntsh_OCIEnvCreate" = x""yes; then :
21400  apu_have_oracle=1
21401fi
21402
21403
21404fi
21405
21406
21407fi
21408
21409fi
21410
21411done
21412
21413      if test "$apu_have_oracle" != "0"; then
21414        oracle_LDFLAGS="$oracle_LDFLAGS -R$withval/lib"
21415        if test -z "$with_oracle_include"; then
21416
21417  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21418    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/rdbms/demo\""
21419    APRUTIL_PRIV_INCLUDES="-I$withval/rdbms/demo"
21420  else
21421    apr_addto_bugger="-I$withval/rdbms/demo"
21422    for i in $apr_addto_bugger; do
21423      apr_addto_duplicate="0"
21424      for j in $APRUTIL_PRIV_INCLUDES; do
21425        if test "x$i" = "x$j"; then
21426          apr_addto_duplicate="1"
21427          break
21428        fi
21429      done
21430      if test $apr_addto_duplicate = "0"; then
21431        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21432        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21433      fi
21434    done
21435  fi
21436
21437
21438  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21439    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/rdbms/public\""
21440    APRUTIL_PRIV_INCLUDES="-I$withval/rdbms/public"
21441  else
21442    apr_addto_bugger="-I$withval/rdbms/public"
21443    for i in $apr_addto_bugger; do
21444      apr_addto_duplicate="0"
21445      for j in $APRUTIL_PRIV_INCLUDES; do
21446        if test "x$i" = "x$j"; then
21447          apr_addto_duplicate="1"
21448          break
21449        fi
21450      done
21451      if test $apr_addto_duplicate = "0"; then
21452        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21453        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21454      fi
21455    done
21456  fi
21457
21458        fi
21459      fi
21460    fi
21461
21462fi
21463
21464
21465
21466
21467      if test "$apu_have_oracle" = "1"; then
21468
21469  if test "x$LDADD_dbd_oracle" = "x"; then
21470    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_oracle to \"$oracle_LDFLAGS -lclntsh $oracle_LIBS\""
21471    LDADD_dbd_oracle="$oracle_LDFLAGS -lclntsh $oracle_LIBS"
21472  else
21473    apr_addto_bugger="$oracle_LDFLAGS -lclntsh $oracle_LIBS"
21474    for i in $apr_addto_bugger; do
21475      apr_addto_duplicate="0"
21476      for j in $LDADD_dbd_oracle; do
21477        if test "x$i" = "x$j"; then
21478          apr_addto_duplicate="1"
21479          break
21480        fi
21481      done
21482      if test $apr_addto_duplicate = "0"; then
21483        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_oracle"
21484        LDADD_dbd_oracle="$LDADD_dbd_oracle $i"
21485      fi
21486    done
21487  fi
21488
21489  fi
21490
21491
21492  LIBS="$old_libs"
21493  CPPFLAGS="$old_cppflags"
21494  LDFLAGS="$old_ldflags"
21495
21496
21497  apu_have_freetds=0
21498
21499  old_libs="$LIBS"
21500  old_cppflags="$CPPFLAGS"
21501  old_ldflags="$LDFLAGS"
21502
21503
21504# Check whether --with-freetds was given.
21505if test "${with_freetds+set}" = set; then :
21506  withval=$with_freetds;
21507    if test "$withval" = "yes"; then
21508      for ac_header in sybdb.h
21509do :
21510  ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
21511if test "x$ac_cv_header_sybdb_h" = x""yes; then :
21512  cat >>confdefs.h <<_ACEOF
21513#define HAVE_SYBDB_H 1
21514_ACEOF
21515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21516$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21517if test "${ac_cv_lib_sybdb_tdsdbopen+set}" = set; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  ac_check_lib_save_LIBS=$LIBS
21521LIBS="-lsybdb  $LIBS"
21522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21523/* end confdefs.h.  */
21524
21525/* Override any GCC internal prototype to avoid an error.
21526   Use char because int might match the return type of a GCC
21527   builtin and then its argument prototype would still apply.  */
21528#ifdef __cplusplus
21529extern "C"
21530#endif
21531char tdsdbopen ();
21532int
21533main ()
21534{
21535return tdsdbopen ();
21536  ;
21537  return 0;
21538}
21539_ACEOF
21540if ac_fn_c_try_link "$LINENO"; then :
21541  ac_cv_lib_sybdb_tdsdbopen=yes
21542else
21543  ac_cv_lib_sybdb_tdsdbopen=no
21544fi
21545rm -f core conftest.err conftest.$ac_objext \
21546    conftest$ac_exeext conftest.$ac_ext
21547LIBS=$ac_check_lib_save_LIBS
21548fi
21549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21550$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21551if test "x$ac_cv_lib_sybdb_tdsdbopen" = x""yes; then :
21552  apu_have_freetds=1
21553fi
21554
21555fi
21556
21557done
21558
21559      if test "$apu_have_freetds" = "0"; then
21560        for ac_header in freetds/sybdb.h
21561do :
21562  ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default"
21563if test "x$ac_cv_header_freetds_sybdb_h" = x""yes; then :
21564  cat >>confdefs.h <<_ACEOF
21565#define HAVE_FREETDS_SYBDB_H 1
21566_ACEOF
21567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21568$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21569if test "${ac_cv_lib_sybdb_tdsdbopen+set}" = set; then :
21570  $as_echo_n "(cached) " >&6
21571else
21572  ac_check_lib_save_LIBS=$LIBS
21573LIBS="-lsybdb  $LIBS"
21574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21575/* end confdefs.h.  */
21576
21577/* Override any GCC internal prototype to avoid an error.
21578   Use char because int might match the return type of a GCC
21579   builtin and then its argument prototype would still apply.  */
21580#ifdef __cplusplus
21581extern "C"
21582#endif
21583char tdsdbopen ();
21584int
21585main ()
21586{
21587return tdsdbopen ();
21588  ;
21589  return 0;
21590}
21591_ACEOF
21592if ac_fn_c_try_link "$LINENO"; then :
21593  ac_cv_lib_sybdb_tdsdbopen=yes
21594else
21595  ac_cv_lib_sybdb_tdsdbopen=no
21596fi
21597rm -f core conftest.err conftest.$ac_objext \
21598    conftest$ac_exeext conftest.$ac_ext
21599LIBS=$ac_check_lib_save_LIBS
21600fi
21601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21602$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21603if test "x$ac_cv_lib_sybdb_tdsdbopen" = x""yes; then :
21604  apu_have_freetds=1
21605fi
21606
21607fi
21608
21609done
21610
21611      fi
21612    elif test "$withval" = "no"; then
21613      :
21614    else
21615      sybdb_CPPFLAGS="-I$withval/include"
21616      sybdb_LDFLAGS="-L$withval/lib "
21617
21618
21619  if test "x$CPPFLAGS" = "x"; then
21620    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$sybdb_CPPFLAGS\""
21621    CPPFLAGS="$sybdb_CPPFLAGS"
21622  else
21623    apr_addto_bugger="$sybdb_CPPFLAGS"
21624    for i in $apr_addto_bugger; do
21625      apr_addto_duplicate="0"
21626      for j in $CPPFLAGS; do
21627        if test "x$i" = "x$j"; then
21628          apr_addto_duplicate="1"
21629          break
21630        fi
21631      done
21632      if test $apr_addto_duplicate = "0"; then
21633        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
21634        CPPFLAGS="$CPPFLAGS $i"
21635      fi
21636    done
21637  fi
21638
21639
21640  if test "x$LDFLAGS" = "x"; then
21641    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$sybdb_LDFLAGS\""
21642    LDFLAGS="$sybdb_LDFLAGS"
21643  else
21644    apr_addto_bugger="$sybdb_LDFLAGS"
21645    for i in $apr_addto_bugger; do
21646      apr_addto_duplicate="0"
21647      for j in $LDFLAGS; do
21648        if test "x$i" = "x$j"; then
21649          apr_addto_duplicate="1"
21650          break
21651        fi
21652      done
21653      if test $apr_addto_duplicate = "0"; then
21654        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
21655        LDFLAGS="$LDFLAGS $i"
21656      fi
21657    done
21658  fi
21659
21660
21661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetds in $withval" >&5
21662$as_echo "$as_me: checking for freetds in $withval" >&6;}
21663      for ac_header in sybdb.h
21664do :
21665  ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
21666if test "x$ac_cv_header_sybdb_h" = x""yes; then :
21667  cat >>confdefs.h <<_ACEOF
21668#define HAVE_SYBDB_H 1
21669_ACEOF
21670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21671$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21672if test "${ac_cv_lib_sybdb_tdsdbopen+set}" = set; then :
21673  $as_echo_n "(cached) " >&6
21674else
21675  ac_check_lib_save_LIBS=$LIBS
21676LIBS="-lsybdb  $LIBS"
21677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21678/* end confdefs.h.  */
21679
21680/* Override any GCC internal prototype to avoid an error.
21681   Use char because int might match the return type of a GCC
21682   builtin and then its argument prototype would still apply.  */
21683#ifdef __cplusplus
21684extern "C"
21685#endif
21686char tdsdbopen ();
21687int
21688main ()
21689{
21690return tdsdbopen ();
21691  ;
21692  return 0;
21693}
21694_ACEOF
21695if ac_fn_c_try_link "$LINENO"; then :
21696  ac_cv_lib_sybdb_tdsdbopen=yes
21697else
21698  ac_cv_lib_sybdb_tdsdbopen=no
21699fi
21700rm -f core conftest.err conftest.$ac_objext \
21701    conftest$ac_exeext conftest.$ac_ext
21702LIBS=$ac_check_lib_save_LIBS
21703fi
21704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21705$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21706if test "x$ac_cv_lib_sybdb_tdsdbopen" = x""yes; then :
21707  apu_have_freetds=1
21708fi
21709
21710fi
21711
21712done
21713
21714      if test "$apu_have_freetds" = "0"; then
21715        for ac_header in freetds/sybdb.h
21716do :
21717  ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default"
21718if test "x$ac_cv_header_freetds_sybdb_h" = x""yes; then :
21719  cat >>confdefs.h <<_ACEOF
21720#define HAVE_FREETDS_SYBDB_H 1
21721_ACEOF
21722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21723$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21724if test "${ac_cv_lib_sybdb_tdsdbopen+set}" = set; then :
21725  $as_echo_n "(cached) " >&6
21726else
21727  ac_check_lib_save_LIBS=$LIBS
21728LIBS="-lsybdb  $LIBS"
21729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21730/* end confdefs.h.  */
21731
21732/* Override any GCC internal prototype to avoid an error.
21733   Use char because int might match the return type of a GCC
21734   builtin and then its argument prototype would still apply.  */
21735#ifdef __cplusplus
21736extern "C"
21737#endif
21738char tdsdbopen ();
21739int
21740main ()
21741{
21742return tdsdbopen ();
21743  ;
21744  return 0;
21745}
21746_ACEOF
21747if ac_fn_c_try_link "$LINENO"; then :
21748  ac_cv_lib_sybdb_tdsdbopen=yes
21749else
21750  ac_cv_lib_sybdb_tdsdbopen=no
21751fi
21752rm -f core conftest.err conftest.$ac_objext \
21753    conftest$ac_exeext conftest.$ac_ext
21754LIBS=$ac_check_lib_save_LIBS
21755fi
21756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21757$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21758if test "x$ac_cv_lib_sybdb_tdsdbopen" = x""yes; then :
21759  apu_have_freetds=1
21760fi
21761
21762fi
21763
21764done
21765
21766      fi
21767      if test "$apu_have_freetds" != "0"; then
21768
21769  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
21770    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"-I$withval/include\""
21771    APRUTIL_PRIV_INCLUDES="-I$withval/include"
21772  else
21773    apr_addto_bugger="-I$withval/include"
21774    for i in $apr_addto_bugger; do
21775      apr_addto_duplicate="0"
21776      for j in $APRUTIL_PRIV_INCLUDES; do
21777        if test "x$i" = "x$j"; then
21778          apr_addto_duplicate="1"
21779          break
21780        fi
21781      done
21782      if test $apr_addto_duplicate = "0"; then
21783        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
21784        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
21785      fi
21786    done
21787  fi
21788
21789      fi
21790    fi
21791
21792else
21793
21794    for ac_header in sybdb.h
21795do :
21796  ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default"
21797if test "x$ac_cv_header_sybdb_h" = x""yes; then :
21798  cat >>confdefs.h <<_ACEOF
21799#define HAVE_SYBDB_H 1
21800_ACEOF
21801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21802$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21803if test "${ac_cv_lib_sybdb_tdsdbopen+set}" = set; then :
21804  $as_echo_n "(cached) " >&6
21805else
21806  ac_check_lib_save_LIBS=$LIBS
21807LIBS="-lsybdb  $LIBS"
21808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21809/* end confdefs.h.  */
21810
21811/* Override any GCC internal prototype to avoid an error.
21812   Use char because int might match the return type of a GCC
21813   builtin and then its argument prototype would still apply.  */
21814#ifdef __cplusplus
21815extern "C"
21816#endif
21817char tdsdbopen ();
21818int
21819main ()
21820{
21821return tdsdbopen ();
21822  ;
21823  return 0;
21824}
21825_ACEOF
21826if ac_fn_c_try_link "$LINENO"; then :
21827  ac_cv_lib_sybdb_tdsdbopen=yes
21828else
21829  ac_cv_lib_sybdb_tdsdbopen=no
21830fi
21831rm -f core conftest.err conftest.$ac_objext \
21832    conftest$ac_exeext conftest.$ac_ext
21833LIBS=$ac_check_lib_save_LIBS
21834fi
21835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21836$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21837if test "x$ac_cv_lib_sybdb_tdsdbopen" = x""yes; then :
21838  apu_have_freetds=1
21839fi
21840
21841fi
21842
21843done
21844
21845    if test "$apu_have_freetds" = "0"; then
21846      for ac_header in freetds/sybdb.h
21847do :
21848  ac_fn_c_check_header_mongrel "$LINENO" "freetds/sybdb.h" "ac_cv_header_freetds_sybdb_h" "$ac_includes_default"
21849if test "x$ac_cv_header_freetds_sybdb_h" = x""yes; then :
21850  cat >>confdefs.h <<_ACEOF
21851#define HAVE_FREETDS_SYBDB_H 1
21852_ACEOF
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tdsdbopen in -lsybdb" >&5
21854$as_echo_n "checking for tdsdbopen in -lsybdb... " >&6; }
21855if test "${ac_cv_lib_sybdb_tdsdbopen+set}" = set; then :
21856  $as_echo_n "(cached) " >&6
21857else
21858  ac_check_lib_save_LIBS=$LIBS
21859LIBS="-lsybdb  $LIBS"
21860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21861/* end confdefs.h.  */
21862
21863/* Override any GCC internal prototype to avoid an error.
21864   Use char because int might match the return type of a GCC
21865   builtin and then its argument prototype would still apply.  */
21866#ifdef __cplusplus
21867extern "C"
21868#endif
21869char tdsdbopen ();
21870int
21871main ()
21872{
21873return tdsdbopen ();
21874  ;
21875  return 0;
21876}
21877_ACEOF
21878if ac_fn_c_try_link "$LINENO"; then :
21879  ac_cv_lib_sybdb_tdsdbopen=yes
21880else
21881  ac_cv_lib_sybdb_tdsdbopen=no
21882fi
21883rm -f core conftest.err conftest.$ac_objext \
21884    conftest$ac_exeext conftest.$ac_ext
21885LIBS=$ac_check_lib_save_LIBS
21886fi
21887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sybdb_tdsdbopen" >&5
21888$as_echo "$ac_cv_lib_sybdb_tdsdbopen" >&6; }
21889if test "x$ac_cv_lib_sybdb_tdsdbopen" = x""yes; then :
21890  apu_have_freetds=1
21891fi
21892
21893fi
21894
21895done
21896
21897    fi
21898
21899fi
21900
21901
21902
21903
21904      if test "$apu_have_freetds" = "1"; then
21905
21906  if test "x$LDADD_dbd_freetds" = "x"; then
21907    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_freetds to \"$sybdb_LDFLAGS -lsybdb\""
21908    LDADD_dbd_freetds="$sybdb_LDFLAGS -lsybdb"
21909  else
21910    apr_addto_bugger="$sybdb_LDFLAGS -lsybdb"
21911    for i in $apr_addto_bugger; do
21912      apr_addto_duplicate="0"
21913      for j in $LDADD_dbd_freetds; do
21914        if test "x$i" = "x$j"; then
21915          apr_addto_duplicate="1"
21916          break
21917        fi
21918      done
21919      if test $apr_addto_duplicate = "0"; then
21920        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_freetds"
21921        LDADD_dbd_freetds="$LDADD_dbd_freetds $i"
21922      fi
21923    done
21924  fi
21925
21926              fi
21927
21928
21929  LIBS="$old_libs"
21930  CPPFLAGS="$old_cppflags"
21931  LDFLAGS="$old_ldflags"
21932
21933
21934  apu_have_odbc=0
21935
21936  old_libs="$LIBS"
21937  old_cppflags="$CPPFLAGS"
21938  old_ldflags="$LDFLAGS"
21939
21940
21941# Check whether --with-odbc was given.
21942if test "${with_odbc+set}" = set; then :
21943  withval=$with_odbc;
21944    if test "$withval" = "yes"; then
21945      # Extract the first word of "odbc_config", so it can be a program name with args.
21946set dummy odbc_config; ac_word=$2
21947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21948$as_echo_n "checking for $ac_word... " >&6; }
21949if test "${ac_cv_path_ODBC_CONFIG+set}" = set; then :
21950  $as_echo_n "(cached) " >&6
21951else
21952  case $ODBC_CONFIG in
21953  [\\/]* | ?:[\\/]*)
21954  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
21955  ;;
21956  *)
21957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21958for as_dir in $PATH
21959do
21960  IFS=$as_save_IFS
21961  test -z "$as_dir" && as_dir=.
21962    for ac_exec_ext in '' $ac_executable_extensions; do
21963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21964    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21966    break 2
21967  fi
21968done
21969  done
21970IFS=$as_save_IFS
21971
21972  ;;
21973esac
21974fi
21975ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
21976if test -n "$ODBC_CONFIG"; then
21977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
21978$as_echo "$ODBC_CONFIG" >&6; }
21979else
21980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21981$as_echo "no" >&6; }
21982fi
21983
21984
21985      if test "x$ODBC_CONFIG" != 'x'; then
21986        odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
21987        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
21988        odbc_LIBS="`$ODBC_CONFIG --libs`"
21989
21990
21991  if test "x$CPPFLAGS" = "x"; then
21992    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
21993    CPPFLAGS="$odbc_CPPFLAGS"
21994  else
21995    apr_addto_bugger="$odbc_CPPFLAGS"
21996    for i in $apr_addto_bugger; do
21997      apr_addto_duplicate="0"
21998      for j in $CPPFLAGS; do
21999        if test "x$i" = "x$j"; then
22000          apr_addto_duplicate="1"
22001          break
22002        fi
22003      done
22004      if test $apr_addto_duplicate = "0"; then
22005        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22006        CPPFLAGS="$CPPFLAGS $i"
22007      fi
22008    done
22009  fi
22010
22011
22012  if test "x$LDFLAGS" = "x"; then
22013    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22014    LDFLAGS="$odbc_LDFLAGS"
22015  else
22016    apr_addto_bugger="$odbc_LDFLAGS"
22017    for i in $apr_addto_bugger; do
22018      apr_addto_duplicate="0"
22019      for j in $LDFLAGS; do
22020        if test "x$i" = "x$j"; then
22021          apr_addto_duplicate="1"
22022          break
22023        fi
22024      done
22025      if test $apr_addto_duplicate = "0"; then
22026        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22027        LDFLAGS="$LDFLAGS $i"
22028      fi
22029    done
22030  fi
22031
22032
22033  if test "x$LIBS" = "x"; then
22034    test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22035    LIBS="$odbc_LIBS"
22036  else
22037    apr_addto_bugger="$odbc_LIBS"
22038    for i in $apr_addto_bugger; do
22039      apr_addto_duplicate="0"
22040      for j in $LIBS; do
22041        if test "x$i" = "x$j"; then
22042          apr_addto_duplicate="1"
22043          break
22044        fi
22045      done
22046      if test $apr_addto_duplicate = "0"; then
22047        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22048        LIBS="$LIBS $i"
22049      fi
22050    done
22051  fi
22052
22053      fi
22054
22055      for ac_header in sql.h
22056do :
22057  ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22058if test "x$ac_cv_header_sql_h" = x""yes; then :
22059  cat >>confdefs.h <<_ACEOF
22060#define HAVE_SQL_H 1
22061_ACEOF
22062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22063$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22064if test "${ac_cv_lib_odbc_SQLAllocHandle+set}" = set; then :
22065  $as_echo_n "(cached) " >&6
22066else
22067  ac_check_lib_save_LIBS=$LIBS
22068LIBS="-lodbc  $LIBS"
22069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070/* end confdefs.h.  */
22071
22072/* Override any GCC internal prototype to avoid an error.
22073   Use char because int might match the return type of a GCC
22074   builtin and then its argument prototype would still apply.  */
22075#ifdef __cplusplus
22076extern "C"
22077#endif
22078char SQLAllocHandle ();
22079int
22080main ()
22081{
22082return SQLAllocHandle ();
22083  ;
22084  return 0;
22085}
22086_ACEOF
22087if ac_fn_c_try_link "$LINENO"; then :
22088  ac_cv_lib_odbc_SQLAllocHandle=yes
22089else
22090  ac_cv_lib_odbc_SQLAllocHandle=no
22091fi
22092rm -f core conftest.err conftest.$ac_objext \
22093    conftest$ac_exeext conftest.$ac_ext
22094LIBS=$ac_check_lib_save_LIBS
22095fi
22096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22097$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22098if test "x$ac_cv_lib_odbc_SQLAllocHandle" = x""yes; then :
22099  apu_have_odbc=1
22100fi
22101
22102fi
22103
22104done
22105
22106      if test "$apu_have_odbc" = "0"; then
22107        for ac_header in odbc/sql.h
22108do :
22109  ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22110if test "x$ac_cv_header_odbc_sql_h" = x""yes; then :
22111  cat >>confdefs.h <<_ACEOF
22112#define HAVE_ODBC_SQL_H 1
22113_ACEOF
22114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22115$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22116if test "${ac_cv_lib_odbc_SQLAllocHandle+set}" = set; then :
22117  $as_echo_n "(cached) " >&6
22118else
22119  ac_check_lib_save_LIBS=$LIBS
22120LIBS="-lodbc  $LIBS"
22121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22122/* end confdefs.h.  */
22123
22124/* Override any GCC internal prototype to avoid an error.
22125   Use char because int might match the return type of a GCC
22126   builtin and then its argument prototype would still apply.  */
22127#ifdef __cplusplus
22128extern "C"
22129#endif
22130char SQLAllocHandle ();
22131int
22132main ()
22133{
22134return SQLAllocHandle ();
22135  ;
22136  return 0;
22137}
22138_ACEOF
22139if ac_fn_c_try_link "$LINENO"; then :
22140  ac_cv_lib_odbc_SQLAllocHandle=yes
22141else
22142  ac_cv_lib_odbc_SQLAllocHandle=no
22143fi
22144rm -f core conftest.err conftest.$ac_objext \
22145    conftest$ac_exeext conftest.$ac_ext
22146LIBS=$ac_check_lib_save_LIBS
22147fi
22148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22149$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22150if test "x$ac_cv_lib_odbc_SQLAllocHandle" = x""yes; then :
22151  apu_have_odbc=1
22152fi
22153
22154fi
22155
22156done
22157
22158      fi
22159      if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22160
22161  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22162    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22163    APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22164  else
22165    apr_addto_bugger="$odbc_CPPFLAGS"
22166    for i in $apr_addto_bugger; do
22167      apr_addto_duplicate="0"
22168      for j in $APRUTIL_PRIV_INCLUDES; do
22169        if test "x$i" = "x$j"; then
22170          apr_addto_duplicate="1"
22171          break
22172        fi
22173      done
22174      if test $apr_addto_duplicate = "0"; then
22175        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22176        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22177      fi
22178    done
22179  fi
22180
22181      fi
22182    elif test "$withval" = "no"; then
22183      :
22184    else
22185      # Extract the first word of "odbc_config", so it can be a program name with args.
22186set dummy odbc_config; ac_word=$2
22187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22188$as_echo_n "checking for $ac_word... " >&6; }
22189if test "${ac_cv_path_ODBC_CONFIG+set}" = set; then :
22190  $as_echo_n "(cached) " >&6
22191else
22192  case $ODBC_CONFIG in
22193  [\\/]* | ?:[\\/]*)
22194  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
22195  ;;
22196  *)
22197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22198for as_dir in $withval/bin
22199do
22200  IFS=$as_save_IFS
22201  test -z "$as_dir" && as_dir=.
22202    for ac_exec_ext in '' $ac_executable_extensions; do
22203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22204    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22206    break 2
22207  fi
22208done
22209  done
22210IFS=$as_save_IFS
22211
22212  ;;
22213esac
22214fi
22215ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22216if test -n "$ODBC_CONFIG"; then
22217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22218$as_echo "$ODBC_CONFIG" >&6; }
22219else
22220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22221$as_echo "no" >&6; }
22222fi
22223
22224
22225      if test "x$ODBC_CONFIG" != 'x'; then
22226        odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22227        odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22228        odbc_LIBS="`$ODBC_CONFIG --libs`"
22229      else
22230        if test -f "$withval" && test -x "$withval"; then
22231          odbc_CPPFLAGS="-I`$withval --include-prefix`"
22232          odbc_LDFLAGS="-L`$withval --lib-prefix`"
22233          odbc_LIBS="`$withval --libs`"
22234        else
22235          odbc_CPPFLAGS="-I$withval/include"
22236          odbc_LDFLAGS="-L$withval/lib "
22237        fi
22238      fi
22239
22240
22241  if test "x$CPPFLAGS" = "x"; then
22242    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22243    CPPFLAGS="$odbc_CPPFLAGS"
22244  else
22245    apr_addto_bugger="$odbc_CPPFLAGS"
22246    for i in $apr_addto_bugger; do
22247      apr_addto_duplicate="0"
22248      for j in $CPPFLAGS; do
22249        if test "x$i" = "x$j"; then
22250          apr_addto_duplicate="1"
22251          break
22252        fi
22253      done
22254      if test $apr_addto_duplicate = "0"; then
22255        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22256        CPPFLAGS="$CPPFLAGS $i"
22257      fi
22258    done
22259  fi
22260
22261
22262  if test "x$LDFLAGS" = "x"; then
22263    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22264    LDFLAGS="$odbc_LDFLAGS"
22265  else
22266    apr_addto_bugger="$odbc_LDFLAGS"
22267    for i in $apr_addto_bugger; do
22268      apr_addto_duplicate="0"
22269      for j in $LDFLAGS; do
22270        if test "x$i" = "x$j"; then
22271          apr_addto_duplicate="1"
22272          break
22273        fi
22274      done
22275      if test $apr_addto_duplicate = "0"; then
22276        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22277        LDFLAGS="$LDFLAGS $i"
22278      fi
22279    done
22280  fi
22281
22282
22283  if test "x$LIBS" = "x"; then
22284    test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22285    LIBS="$odbc_LIBS"
22286  else
22287    apr_addto_bugger="$odbc_LIBS"
22288    for i in $apr_addto_bugger; do
22289      apr_addto_duplicate="0"
22290      for j in $LIBS; do
22291        if test "x$i" = "x$j"; then
22292          apr_addto_duplicate="1"
22293          break
22294        fi
22295      done
22296      if test $apr_addto_duplicate = "0"; then
22297        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22298        LIBS="$LIBS $i"
22299      fi
22300    done
22301  fi
22302
22303
22304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for odbc in $withval" >&5
22305$as_echo "$as_me: checking for odbc in $withval" >&6;}
22306      for ac_header in sql.h
22307do :
22308  ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22309if test "x$ac_cv_header_sql_h" = x""yes; then :
22310  cat >>confdefs.h <<_ACEOF
22311#define HAVE_SQL_H 1
22312_ACEOF
22313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22314$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22315if test "${ac_cv_lib_odbc_SQLAllocHandle+set}" = set; then :
22316  $as_echo_n "(cached) " >&6
22317else
22318  ac_check_lib_save_LIBS=$LIBS
22319LIBS="-lodbc  $LIBS"
22320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22321/* end confdefs.h.  */
22322
22323/* Override any GCC internal prototype to avoid an error.
22324   Use char because int might match the return type of a GCC
22325   builtin and then its argument prototype would still apply.  */
22326#ifdef __cplusplus
22327extern "C"
22328#endif
22329char SQLAllocHandle ();
22330int
22331main ()
22332{
22333return SQLAllocHandle ();
22334  ;
22335  return 0;
22336}
22337_ACEOF
22338if ac_fn_c_try_link "$LINENO"; then :
22339  ac_cv_lib_odbc_SQLAllocHandle=yes
22340else
22341  ac_cv_lib_odbc_SQLAllocHandle=no
22342fi
22343rm -f core conftest.err conftest.$ac_objext \
22344    conftest$ac_exeext conftest.$ac_ext
22345LIBS=$ac_check_lib_save_LIBS
22346fi
22347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22348$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22349if test "x$ac_cv_lib_odbc_SQLAllocHandle" = x""yes; then :
22350  apu_have_odbc=1
22351fi
22352
22353fi
22354
22355done
22356
22357      if test "$apu_have_odbc" = "0"; then
22358        for ac_header in odbc/sql.h
22359do :
22360  ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22361if test "x$ac_cv_header_odbc_sql_h" = x""yes; then :
22362  cat >>confdefs.h <<_ACEOF
22363#define HAVE_ODBC_SQL_H 1
22364_ACEOF
22365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22366$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22367if test "${ac_cv_lib_odbc_SQLAllocHandle+set}" = set; then :
22368  $as_echo_n "(cached) " >&6
22369else
22370  ac_check_lib_save_LIBS=$LIBS
22371LIBS="-lodbc  $LIBS"
22372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22373/* end confdefs.h.  */
22374
22375/* Override any GCC internal prototype to avoid an error.
22376   Use char because int might match the return type of a GCC
22377   builtin and then its argument prototype would still apply.  */
22378#ifdef __cplusplus
22379extern "C"
22380#endif
22381char SQLAllocHandle ();
22382int
22383main ()
22384{
22385return SQLAllocHandle ();
22386  ;
22387  return 0;
22388}
22389_ACEOF
22390if ac_fn_c_try_link "$LINENO"; then :
22391  ac_cv_lib_odbc_SQLAllocHandle=yes
22392else
22393  ac_cv_lib_odbc_SQLAllocHandle=no
22394fi
22395rm -f core conftest.err conftest.$ac_objext \
22396    conftest$ac_exeext conftest.$ac_ext
22397LIBS=$ac_check_lib_save_LIBS
22398fi
22399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22400$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22401if test "x$ac_cv_lib_odbc_SQLAllocHandle" = x""yes; then :
22402  apu_have_odbc=1
22403fi
22404
22405fi
22406
22407done
22408
22409      fi
22410      if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22411
22412  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22413    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22414    APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22415  else
22416    apr_addto_bugger="$odbc_CPPFLAGS"
22417    for i in $apr_addto_bugger; do
22418      apr_addto_duplicate="0"
22419      for j in $APRUTIL_PRIV_INCLUDES; do
22420        if test "x$i" = "x$j"; then
22421          apr_addto_duplicate="1"
22422          break
22423        fi
22424      done
22425      if test $apr_addto_duplicate = "0"; then
22426        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22427        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22428      fi
22429    done
22430  fi
22431
22432      fi
22433    fi
22434
22435else
22436
22437    # Extract the first word of "odbc_config", so it can be a program name with args.
22438set dummy odbc_config; ac_word=$2
22439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22440$as_echo_n "checking for $ac_word... " >&6; }
22441if test "${ac_cv_path_ODBC_CONFIG+set}" = set; then :
22442  $as_echo_n "(cached) " >&6
22443else
22444  case $ODBC_CONFIG in
22445  [\\/]* | ?:[\\/]*)
22446  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
22447  ;;
22448  *)
22449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22450for as_dir in $PATH
22451do
22452  IFS=$as_save_IFS
22453  test -z "$as_dir" && as_dir=.
22454    for ac_exec_ext in '' $ac_executable_extensions; do
22455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22456    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22458    break 2
22459  fi
22460done
22461  done
22462IFS=$as_save_IFS
22463
22464  ;;
22465esac
22466fi
22467ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
22468if test -n "$ODBC_CONFIG"; then
22469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
22470$as_echo "$ODBC_CONFIG" >&6; }
22471else
22472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22473$as_echo "no" >&6; }
22474fi
22475
22476
22477    if test "x$ODBC_CONFIG" != 'x'; then
22478      odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
22479      odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
22480      odbc_LIBS="`$ODBC_CONFIG --libs`"
22481
22482
22483  if test "x$CPPFLAGS" = "x"; then
22484    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$odbc_CPPFLAGS\""
22485    CPPFLAGS="$odbc_CPPFLAGS"
22486  else
22487    apr_addto_bugger="$odbc_CPPFLAGS"
22488    for i in $apr_addto_bugger; do
22489      apr_addto_duplicate="0"
22490      for j in $CPPFLAGS; do
22491        if test "x$i" = "x$j"; then
22492          apr_addto_duplicate="1"
22493          break
22494        fi
22495      done
22496      if test $apr_addto_duplicate = "0"; then
22497        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22498        CPPFLAGS="$CPPFLAGS $i"
22499      fi
22500    done
22501  fi
22502
22503
22504  if test "x$LDFLAGS" = "x"; then
22505    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$odbc_LDFLAGS\""
22506    LDFLAGS="$odbc_LDFLAGS"
22507  else
22508    apr_addto_bugger="$odbc_LDFLAGS"
22509    for i in $apr_addto_bugger; do
22510      apr_addto_duplicate="0"
22511      for j in $LDFLAGS; do
22512        if test "x$i" = "x$j"; then
22513          apr_addto_duplicate="1"
22514          break
22515        fi
22516      done
22517      if test $apr_addto_duplicate = "0"; then
22518        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22519        LDFLAGS="$LDFLAGS $i"
22520      fi
22521    done
22522  fi
22523
22524
22525  if test "x$LIBS" = "x"; then
22526    test "x$silent" != "xyes" && echo "  setting LIBS to \"$odbc_LIBS\""
22527    LIBS="$odbc_LIBS"
22528  else
22529    apr_addto_bugger="$odbc_LIBS"
22530    for i in $apr_addto_bugger; do
22531      apr_addto_duplicate="0"
22532      for j in $LIBS; do
22533        if test "x$i" = "x$j"; then
22534          apr_addto_duplicate="1"
22535          break
22536        fi
22537      done
22538      if test $apr_addto_duplicate = "0"; then
22539        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
22540        LIBS="$LIBS $i"
22541      fi
22542    done
22543  fi
22544
22545    fi
22546
22547    for ac_header in sql.h
22548do :
22549  ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default"
22550if test "x$ac_cv_header_sql_h" = x""yes; then :
22551  cat >>confdefs.h <<_ACEOF
22552#define HAVE_SQL_H 1
22553_ACEOF
22554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22555$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22556if test "${ac_cv_lib_odbc_SQLAllocHandle+set}" = set; then :
22557  $as_echo_n "(cached) " >&6
22558else
22559  ac_check_lib_save_LIBS=$LIBS
22560LIBS="-lodbc  $LIBS"
22561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22562/* end confdefs.h.  */
22563
22564/* Override any GCC internal prototype to avoid an error.
22565   Use char because int might match the return type of a GCC
22566   builtin and then its argument prototype would still apply.  */
22567#ifdef __cplusplus
22568extern "C"
22569#endif
22570char SQLAllocHandle ();
22571int
22572main ()
22573{
22574return SQLAllocHandle ();
22575  ;
22576  return 0;
22577}
22578_ACEOF
22579if ac_fn_c_try_link "$LINENO"; then :
22580  ac_cv_lib_odbc_SQLAllocHandle=yes
22581else
22582  ac_cv_lib_odbc_SQLAllocHandle=no
22583fi
22584rm -f core conftest.err conftest.$ac_objext \
22585    conftest$ac_exeext conftest.$ac_ext
22586LIBS=$ac_check_lib_save_LIBS
22587fi
22588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22589$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22590if test "x$ac_cv_lib_odbc_SQLAllocHandle" = x""yes; then :
22591  apu_have_odbc=1
22592fi
22593
22594fi
22595
22596done
22597
22598    if test "$apu_have_odbc" = "0"; then
22599      for ac_header in odbc/sql.h
22600do :
22601  ac_fn_c_check_header_mongrel "$LINENO" "odbc/sql.h" "ac_cv_header_odbc_sql_h" "$ac_includes_default"
22602if test "x$ac_cv_header_odbc_sql_h" = x""yes; then :
22603  cat >>confdefs.h <<_ACEOF
22604#define HAVE_ODBC_SQL_H 1
22605_ACEOF
22606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
22607$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
22608if test "${ac_cv_lib_odbc_SQLAllocHandle+set}" = set; then :
22609  $as_echo_n "(cached) " >&6
22610else
22611  ac_check_lib_save_LIBS=$LIBS
22612LIBS="-lodbc  $LIBS"
22613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22614/* end confdefs.h.  */
22615
22616/* Override any GCC internal prototype to avoid an error.
22617   Use char because int might match the return type of a GCC
22618   builtin and then its argument prototype would still apply.  */
22619#ifdef __cplusplus
22620extern "C"
22621#endif
22622char SQLAllocHandle ();
22623int
22624main ()
22625{
22626return SQLAllocHandle ();
22627  ;
22628  return 0;
22629}
22630_ACEOF
22631if ac_fn_c_try_link "$LINENO"; then :
22632  ac_cv_lib_odbc_SQLAllocHandle=yes
22633else
22634  ac_cv_lib_odbc_SQLAllocHandle=no
22635fi
22636rm -f core conftest.err conftest.$ac_objext \
22637    conftest$ac_exeext conftest.$ac_ext
22638LIBS=$ac_check_lib_save_LIBS
22639fi
22640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
22641$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
22642if test "x$ac_cv_lib_odbc_SQLAllocHandle" = x""yes; then :
22643  apu_have_odbc=1
22644fi
22645
22646fi
22647
22648done
22649
22650    fi
22651    if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
22652
22653  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
22654    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$odbc_CPPFLAGS\""
22655    APRUTIL_PRIV_INCLUDES="$odbc_CPPFLAGS"
22656  else
22657    apr_addto_bugger="$odbc_CPPFLAGS"
22658    for i in $apr_addto_bugger; do
22659      apr_addto_duplicate="0"
22660      for j in $APRUTIL_PRIV_INCLUDES; do
22661        if test "x$i" = "x$j"; then
22662          apr_addto_duplicate="1"
22663          break
22664        fi
22665      done
22666      if test $apr_addto_duplicate = "0"; then
22667        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
22668        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
22669      fi
22670    done
22671  fi
22672
22673    fi
22674
22675fi
22676
22677
22678      if test "$apu_have_odbc" = "1"; then
22679
22680  if test "x$LDADD_dbd_odbc" = "x"; then
22681    test "x$silent" != "xyes" && echo "  setting LDADD_dbd_odbc to \"$odbc_LDFLAGS -lodbc $odbc_LIBS\""
22682    LDADD_dbd_odbc="$odbc_LDFLAGS -lodbc $odbc_LIBS"
22683  else
22684    apr_addto_bugger="$odbc_LDFLAGS -lodbc $odbc_LIBS"
22685    for i in $apr_addto_bugger; do
22686      apr_addto_duplicate="0"
22687      for j in $LDADD_dbd_odbc; do
22688        if test "x$i" = "x$j"; then
22689          apr_addto_duplicate="1"
22690          break
22691        fi
22692      done
22693      if test $apr_addto_duplicate = "0"; then
22694        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDADD_dbd_odbc"
22695        LDADD_dbd_odbc="$LDADD_dbd_odbc $i"
22696      fi
22697    done
22698  fi
22699
22700  fi
22701
22702
22703  LIBS="$old_libs"
22704  CPPFLAGS="$old_cppflags"
22705  LDFLAGS="$old_ldflags"
22706
22707  apu_dbd_tests=""
22708  test $apu_have_oracle = 1 &&  apu_dbd_tests="$apu_dbd_tests oracle"
22709  test $apu_have_pgsql = 1 &&   apu_dbd_tests="$apu_dbd_tests pgsql"
22710  test $apu_have_mysql = 1 &&   apu_dbd_tests="$apu_dbd_tests mysql"
22711  test $apu_have_sqlite2 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite2"
22712  test $apu_have_sqlite3 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite3"
22713  test $apu_have_freetds = 1 && apu_dbd_tests="$apu_dbd_tests freetds"
22714  test $apu_have_odbc = 1 &&    apu_dbd_tests="$apu_dbd_tests odbc"
22715
22716
22717
22718
22719save_cppflags="$CPPFLAGS"
22720save_ldflags="$LDFLAGS"
22721
22722apu_has_expat=0
22723
22724# Default: will use either external or bundled expat.
22725apu_try_external_expat=1
22726apu_try_builtin_expat=1
22727
22728
22729# Check whether --with-expat was given.
22730if test "${with_expat+set}" = set; then :
22731  withval=$with_expat;
22732  if test "$withval" = "yes"; then
22733    as_fn_error $? "a directory must be specified for --with-expat" "$LINENO" 5
22734  elif test "$withval" = "no"; then
22735    as_fn_error $? "Expat cannot be disabled (at this time)" "$LINENO" 5
22736  elif test "$withval" = "builtin"; then
22737    apu_try_external_expat=0
22738  else
22739    # Add given path to standard search paths if appropriate:
22740    if test "$withval" != "/usr"; then
22741
22742  if test "x$LDFLAGS" = "x"; then
22743    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$withval/lib\""
22744    LDFLAGS="-L$withval/lib"
22745  else
22746    apr_addto_bugger="-L$withval/lib"
22747    for i in $apr_addto_bugger; do
22748      apr_addto_duplicate="0"
22749      for j in $LDFLAGS; do
22750        if test "x$i" = "x$j"; then
22751          apr_addto_duplicate="1"
22752          break
22753        fi
22754      done
22755      if test $apr_addto_duplicate = "0"; then
22756        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
22757        LDFLAGS="$LDFLAGS $i"
22758      fi
22759    done
22760  fi
22761
22762
22763  if test "x$CPPFLAGS" = "x"; then
22764    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$withval/include\""
22765    CPPFLAGS="-I$withval/include"
22766  else
22767    apr_addto_bugger="-I$withval/include"
22768    for i in $apr_addto_bugger; do
22769      apr_addto_duplicate="0"
22770      for j in $CPPFLAGS; do
22771        if test "x$i" = "x$j"; then
22772          apr_addto_duplicate="1"
22773          break
22774        fi
22775      done
22776      if test $apr_addto_duplicate = "0"; then
22777        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
22778        CPPFLAGS="$CPPFLAGS $i"
22779      fi
22780    done
22781  fi
22782
22783
22784  if test "x$APRUTIL_INCLUDES" = "x"; then
22785    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
22786    APRUTIL_INCLUDES="-I$withval/include"
22787  else
22788    apr_addto_bugger="-I$withval/include"
22789    for i in $apr_addto_bugger; do
22790      apr_addto_duplicate="0"
22791      for j in $APRUTIL_INCLUDES; do
22792        if test "x$i" = "x$j"; then
22793          apr_addto_duplicate="1"
22794          break
22795        fi
22796      done
22797      if test $apr_addto_duplicate = "0"; then
22798        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
22799        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
22800      fi
22801    done
22802  fi
22803
22804
22805  if test "x$APRUTIL_LDFLAGS" = "x"; then
22806    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
22807    APRUTIL_LDFLAGS="-L$withval/lib"
22808  else
22809    apr_addto_bugger="-L$withval/lib"
22810    for i in $apr_addto_bugger; do
22811      apr_addto_duplicate="0"
22812      for j in $APRUTIL_LDFLAGS; do
22813        if test "x$i" = "x$j"; then
22814          apr_addto_duplicate="1"
22815          break
22816        fi
22817      done
22818      if test $apr_addto_duplicate = "0"; then
22819        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
22820        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
22821      fi
22822    done
22823  fi
22824
22825    fi
22826    # ...and refuse to fall back on the builtin expat.
22827    apu_try_builtin_expat=0
22828  fi
22829
22830fi
22831
22832
22833if test $apu_try_external_expat = 1; then
22834
22835
22836
22837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.95.x" >&5
22838$as_echo_n "checking Expat 1.95.x... " >&6; }
22839if test "${apu_cv_expat_system+set}" = set; then :
22840  $as_echo_n "(cached) " >&6
22841else
22842
22843  apu_expat_LIBS=$LIBS
22844  LIBS="$LIBS -lexpat"
22845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22846/* end confdefs.h.  */
22847#include <stdlib.h>
22848#include <expat.h>
22849int
22850main ()
22851{
22852XML_ParserCreate(NULL);
22853  ;
22854  return 0;
22855}
22856_ACEOF
22857if ac_fn_c_try_link "$LINENO"; then :
22858  apu_cv_expat_system=yes
22859else
22860  apu_cv_expat_system=no
22861fi
22862rm -f core conftest.err conftest.$ac_objext \
22863    conftest$ac_exeext conftest.$ac_ext
22864  LIBS=$apu_expat_LIBS
22865
22866fi
22867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_system" >&5
22868$as_echo "$apu_cv_expat_system" >&6; }
22869
22870if test $apu_cv_expat_system = yes; then
22871
22872$as_echo "#define HAVE_EXPAT_H 1" >>confdefs.h
22873
22874   apu_expat_libs="-lexpat"
22875   apu_has_expat=1
22876
22877else
22878   apu_has_expat=0
22879
22880fi
22881
22882
22883  if test $apu_has_expat = 0; then
22884
22885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking old Debian-packaged expat" >&5
22886$as_echo_n "checking old Debian-packaged expat... " >&6; }
22887if test "${apu_cv_expat_debian+set}" = set; then :
22888  $as_echo_n "(cached) " >&6
22889else
22890
22891  apu_expat_LIBS=$LIBS
22892  LIBS="$LIBS -lxmlparse -lxmltok"
22893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22894/* end confdefs.h.  */
22895#include <stdlib.h>
22896#include <xmltok/xmlparse.h>
22897int
22898main ()
22899{
22900XML_ParserCreate(NULL);
22901  ;
22902  return 0;
22903}
22904_ACEOF
22905if ac_fn_c_try_link "$LINENO"; then :
22906  apu_cv_expat_debian=yes
22907else
22908  apu_cv_expat_debian=no
22909fi
22910rm -f core conftest.err conftest.$ac_objext \
22911    conftest$ac_exeext conftest.$ac_ext
22912  LIBS=$apu_expat_LIBS
22913
22914fi
22915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_debian" >&5
22916$as_echo "$apu_cv_expat_debian" >&6; }
22917
22918if test $apu_cv_expat_debian = yes; then
22919
22920$as_echo "#define HAVE_XMLTOK_XMLPARSE_H 1" >>confdefs.h
22921
22922   apu_expat_libs="-lxmlparse -lxmltok"
22923   apu_has_expat=1
22924
22925else
22926   apu_has_expat=0
22927
22928fi
22929
22930  fi
22931
22932  if test $apu_has_expat = 0; then
22933
22934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking old FreeBSD-packaged expat" >&5
22935$as_echo_n "checking old FreeBSD-packaged expat... " >&6; }
22936if test "${apu_cv_expat_freebsd+set}" = set; then :
22937  $as_echo_n "(cached) " >&6
22938else
22939
22940  apu_expat_LIBS=$LIBS
22941  LIBS="$LIBS -lexpat"
22942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22943/* end confdefs.h.  */
22944#include <stdlib.h>
22945#include <xml/xmlparse.h>
22946int
22947main ()
22948{
22949XML_ParserCreate(NULL);
22950  ;
22951  return 0;
22952}
22953_ACEOF
22954if ac_fn_c_try_link "$LINENO"; then :
22955  apu_cv_expat_freebsd=yes
22956else
22957  apu_cv_expat_freebsd=no
22958fi
22959rm -f core conftest.err conftest.$ac_objext \
22960    conftest$ac_exeext conftest.$ac_ext
22961  LIBS=$apu_expat_LIBS
22962
22963fi
22964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_freebsd" >&5
22965$as_echo "$apu_cv_expat_freebsd" >&6; }
22966
22967if test $apu_cv_expat_freebsd = yes; then
22968
22969$as_echo "#define HAVE_XML_XMLPARSE_H 1" >>confdefs.h
22970
22971   apu_expat_libs="-lexpat"
22972   apu_has_expat=1
22973
22974else
22975   apu_has_expat=0
22976
22977fi
22978
22979  fi
22980
22981  if test $apu_has_expat = 0; then
22982
22983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.0/1.1" >&5
22984$as_echo_n "checking Expat 1.0/1.1... " >&6; }
22985if test "${apu_cv_expat_1011+set}" = set; then :
22986  $as_echo_n "(cached) " >&6
22987else
22988
22989  apu_expat_LIBS=$LIBS
22990  LIBS="$LIBS -lexpat"
22991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22992/* end confdefs.h.  */
22993#include <stdlib.h>
22994#include <xmlparse/xmlparse.h>
22995int
22996main ()
22997{
22998XML_ParserCreate(NULL);
22999  ;
23000  return 0;
23001}
23002_ACEOF
23003if ac_fn_c_try_link "$LINENO"; then :
23004  apu_cv_expat_1011=yes
23005else
23006  apu_cv_expat_1011=no
23007fi
23008rm -f core conftest.err conftest.$ac_objext \
23009    conftest$ac_exeext conftest.$ac_ext
23010  LIBS=$apu_expat_LIBS
23011
23012fi
23013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_1011" >&5
23014$as_echo "$apu_cv_expat_1011" >&6; }
23015
23016if test $apu_cv_expat_1011 = yes; then
23017
23018$as_echo "#define HAVE_XMLPARSE_XMLPARSE_H 1" >>confdefs.h
23019
23020   apu_expat_libs="-lexpat"
23021   apu_has_expat=1
23022
23023else
23024   apu_has_expat=0
23025
23026fi
23027
23028  fi
23029
23030  if test $apu_has_expat = 0; then
23031
23032  if test "x$LDFLAGS" = "x"; then
23033    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L/usr/local/lib\""
23034    LDFLAGS="-L/usr/local/lib"
23035  else
23036    apr_addto_bugger="-L/usr/local/lib"
23037    for i in $apr_addto_bugger; do
23038      apr_addto_duplicate="0"
23039      for j in $LDFLAGS; do
23040        if test "x$i" = "x$j"; then
23041          apr_addto_duplicate="1"
23042          break
23043        fi
23044      done
23045      if test $apr_addto_duplicate = "0"; then
23046        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
23047        LDFLAGS="$LDFLAGS $i"
23048      fi
23049    done
23050  fi
23051
23052
23053  if test "x$CPPFLAGS" = "x"; then
23054    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I/usr/local/include\""
23055    CPPFLAGS="-I/usr/local/include"
23056  else
23057    apr_addto_bugger="-I/usr/local/include"
23058    for i in $apr_addto_bugger; do
23059      apr_addto_duplicate="0"
23060      for j in $CPPFLAGS; do
23061        if test "x$i" = "x$j"; then
23062          apr_addto_duplicate="1"
23063          break
23064        fi
23065      done
23066      if test $apr_addto_duplicate = "0"; then
23067        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
23068        CPPFLAGS="$CPPFLAGS $i"
23069      fi
23070    done
23071  fi
23072
23073
23074
23075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Expat 1.95.x in /usr/local" >&5
23076$as_echo_n "checking Expat 1.95.x in /usr/local... " >&6; }
23077if test "${apu_cv_expat_usrlocal+set}" = set; then :
23078  $as_echo_n "(cached) " >&6
23079else
23080
23081  apu_expat_LIBS=$LIBS
23082  LIBS="$LIBS -lexpat"
23083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23084/* end confdefs.h.  */
23085#include <stdlib.h>
23086#include <expat.h>
23087int
23088main ()
23089{
23090XML_ParserCreate(NULL);
23091  ;
23092  return 0;
23093}
23094_ACEOF
23095if ac_fn_c_try_link "$LINENO"; then :
23096  apu_cv_expat_usrlocal=yes
23097else
23098  apu_cv_expat_usrlocal=no
23099fi
23100rm -f core conftest.err conftest.$ac_objext \
23101    conftest$ac_exeext conftest.$ac_ext
23102  LIBS=$apu_expat_LIBS
23103
23104fi
23105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_expat_usrlocal" >&5
23106$as_echo "$apu_cv_expat_usrlocal" >&6; }
23107
23108if test $apu_cv_expat_usrlocal = yes; then
23109
23110$as_echo "#define HAVE_EXPAT_H 1" >>confdefs.h
23111
23112   apu_expat_libs="-lexpat"
23113   apu_has_expat=1
23114
23115  if test "x$APRUTIL_INCLUDES" = "x"; then
23116    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I/usr/local/include\""
23117    APRUTIL_INCLUDES="-I/usr/local/include"
23118  else
23119    apr_addto_bugger="-I/usr/local/include"
23120    for i in $apr_addto_bugger; do
23121      apr_addto_duplicate="0"
23122      for j in $APRUTIL_INCLUDES; do
23123        if test "x$i" = "x$j"; then
23124          apr_addto_duplicate="1"
23125          break
23126        fi
23127      done
23128      if test $apr_addto_duplicate = "0"; then
23129        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23130        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23131      fi
23132    done
23133  fi
23134
23135
23136  if test "x$APRUTIL_LDFLAGS" = "x"; then
23137    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L/usr/local/lib\""
23138    APRUTIL_LDFLAGS="-L/usr/local/lib"
23139  else
23140    apr_addto_bugger="-L/usr/local/lib"
23141    for i in $apr_addto_bugger; do
23142      apr_addto_duplicate="0"
23143      for j in $APRUTIL_LDFLAGS; do
23144        if test "x$i" = "x$j"; then
23145          apr_addto_duplicate="1"
23146          break
23147        fi
23148      done
23149      if test $apr_addto_duplicate = "0"; then
23150        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
23151        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23152      fi
23153    done
23154  fi
23155
23156else
23157   apu_has_expat=0
23158
23159
23160  if test "x$LDFLAGS" = "x-L/usr/local/lib"; then
23161    test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
23162    LDFLAGS=""
23163  else
23164    apr_new_bugger=""
23165    apr_removed=0
23166    for i in $LDFLAGS; do
23167      if test "x$i" != "x-L/usr/local/lib"; then
23168        apr_new_bugger="$apr_new_bugger $i"
23169      else
23170        apr_removed=1
23171      fi
23172    done
23173    if test $apr_removed = "1"; then
23174      test "x$silent" != "xyes" && echo "  removed \"-L/usr/local/lib\" from LDFLAGS"
23175      LDFLAGS=$apr_new_bugger
23176    fi
23177  fi
23178
23179
23180  if test "x$CPPFLAGS" = "x-I/usr/local/include"; then
23181    test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
23182    CPPFLAGS=""
23183  else
23184    apr_new_bugger=""
23185    apr_removed=0
23186    for i in $CPPFLAGS; do
23187      if test "x$i" != "x-I/usr/local/include"; then
23188        apr_new_bugger="$apr_new_bugger $i"
23189      else
23190        apr_removed=1
23191      fi
23192    done
23193    if test $apr_removed = "1"; then
23194      test "x$silent" != "xyes" && echo "  removed \"-I/usr/local/include\" from CPPFLAGS"
23195      CPPFLAGS=$apr_new_bugger
23196    fi
23197  fi
23198
23199
23200fi
23201
23202  fi
23203
23204fi
23205
23206if test "${apu_has_expat}${apu_try_builtin_expat}" = "01"; then
23207      bundled_subdir="xml/expat"
23208
23209  # save our work to this point; this allows the sub-package to use it
23210  cat >confcache <<\_ACEOF
23211# This file is a shell script that caches the results of configure
23212# tests run on this system so they can be shared between configure
23213# scripts and configure runs, see configure's option --config-cache.
23214# It is not useful on other systems.  If it contains results you don't
23215# want to keep, you may remove or edit it.
23216#
23217# config.status only pays attention to the cache file if you give it
23218# the --recheck option to rerun configure.
23219#
23220# `ac_cv_env_foo' variables (set or unset) will be overridden when
23221# loading this file, other *unset* `ac_cv_foo' will be assigned the
23222# following values.
23223
23224_ACEOF
23225
23226# The following way of writing the cache mishandles newlines in values,
23227# but we know of no workaround that is simple, portable, and efficient.
23228# So, we kill variables containing newlines.
23229# Ultrix sh set writes to stderr and can't be redirected directly,
23230# and sets the high bit in the cache file unless we assign to the vars.
23231(
23232  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23233    eval ac_val=\$$ac_var
23234    case $ac_val in #(
23235    *${as_nl}*)
23236      case $ac_var in #(
23237      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
23238$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
23239      esac
23240      case $ac_var in #(
23241      _ | IFS | as_nl) ;; #(
23242      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
23243      *) { eval $ac_var=; unset $ac_var;} ;;
23244      esac ;;
23245    esac
23246  done
23247
23248  (set) 2>&1 |
23249    case $as_nl`(ac_space=' '; set) 2>&1` in #(
23250    *${as_nl}ac_space=\ *)
23251      # `set' does not quote correctly, so add quotes: double-quote
23252      # substitution turns \\\\ into \\, and sed turns \\ into \.
23253      sed -n \
23254	"s/'/'\\\\''/g;
23255	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23256      ;; #(
23257    *)
23258      # `set' quotes correctly as required by POSIX, so do not add quotes.
23259      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
23260      ;;
23261    esac |
23262    sort
23263) |
23264  sed '
23265     /^ac_cv_env_/b end
23266     t clear
23267     :clear
23268     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23269     t end
23270     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23271     :end' >>confcache
23272if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23273  if test -w "$cache_file"; then
23274    test "x$cache_file" != "x/dev/null" &&
23275      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
23276$as_echo "$as_me: updating cache $cache_file" >&6;}
23277    cat confcache >$cache_file
23278  else
23279    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
23280$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
23281  fi
23282fi
23283rm -f confcache
23284
23285  echo "configuring package in $bundled_subdir now"
23286  ac_popdir=`pwd`
23287  apr_config_subdirs="$bundled_subdir"
23288  test -d $bundled_subdir || $mkdir_p $bundled_subdir
23289  ac_abs_srcdir=`(cd $srcdir/$bundled_subdir && pwd)`
23290  cd $bundled_subdir
23291
23292      # A "../" for each directory in /$config_subdirs.
23293      ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
23294
23295  # Make the cache file pathname absolute for the subdirs
23296  # required to correctly handle subdirs that might actually
23297  # be symlinks
23298  case "$cache_file" in
23299  /*) # already absolute
23300    ac_sub_cache_file=$cache_file ;;
23301  *)  # Was relative path.
23302    ac_sub_cache_file="$ac_popdir/$cache_file" ;;
23303  esac
23304
23305  apr_configure_args=$ac_configure_args
23306
23307    test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
23308
23309    apr_configure_args="--disable-option-checking $apr_configure_args"
23310
23311              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
23312  then :
23313    echo "$bundled_subdir configured properly"
23314  else
23315    echo "configure failed for $bundled_subdir"
23316    exit 1
23317  fi
23318
23319  cd $ac_popdir
23320
23321  # grab any updates from the sub-package
23322  if test -r "$cache_file"; then
23323  # Some versions of bash will fail to source /dev/null (special files
23324  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
23325  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
23326    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
23327$as_echo "$as_me: loading cache $cache_file" >&6;}
23328    case $cache_file in
23329      [\\/]* | ?:[\\/]* ) . "$cache_file";;
23330      *)                      . "./$cache_file";;
23331    esac
23332  fi
23333else
23334  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
23335$as_echo "$as_me: creating cache $cache_file" >&6;}
23336  >$cache_file
23337fi
23338
23339
23340
23341  if test "x$APRUTIL_INCLUDES" = "x"; then
23342    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$abs_srcdir/$bundled_subdir/lib\""
23343    APRUTIL_INCLUDES="-I$abs_srcdir/$bundled_subdir/lib"
23344  else
23345    apr_addto_bugger="-I$abs_srcdir/$bundled_subdir/lib"
23346    for i in $apr_addto_bugger; do
23347      apr_addto_duplicate="0"
23348      for j in $APRUTIL_INCLUDES; do
23349        if test "x$i" = "x$j"; then
23350          apr_addto_duplicate="1"
23351          break
23352        fi
23353      done
23354      if test $apr_addto_duplicate = "0"; then
23355        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23356        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23357      fi
23358    done
23359  fi
23360
23361
23362  if test "x$LDFLAGS" = "x"; then
23363    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$top_builddir/$bundled_subdir/lib\""
23364    LDFLAGS="-L$top_builddir/$bundled_subdir/lib"
23365  else
23366    apr_addto_bugger="-L$top_builddir/$bundled_subdir/lib"
23367    for i in $apr_addto_bugger; do
23368      apr_addto_duplicate="0"
23369      for j in $LDFLAGS; do
23370        if test "x$i" = "x$j"; then
23371          apr_addto_duplicate="1"
23372          break
23373        fi
23374      done
23375      if test $apr_addto_duplicate = "0"; then
23376        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
23377        LDFLAGS="$LDFLAGS $i"
23378      fi
23379    done
23380  fi
23381
23382  apu_expat_libs="$top_builddir/$bundled_subdir/libexpat.la"
23383fi
23384
23385
23386  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
23387    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"$apu_expat_libs\""
23388    APRUTIL_EXPORT_LIBS="$apu_expat_libs"
23389  else
23390    apr_addto_bugger="$apu_expat_libs"
23391    for i in $apr_addto_bugger; do
23392      apr_addto_duplicate="0"
23393      for j in $APRUTIL_EXPORT_LIBS; do
23394        if test "x$i" = "x$j"; then
23395          apr_addto_duplicate="1"
23396          break
23397        fi
23398      done
23399      if test $apr_addto_duplicate = "0"; then
23400        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
23401        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
23402      fi
23403    done
23404  fi
23405
23406
23407  if test "x$APRUTIL_LIBS" = "x"; then
23408    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_expat_libs\""
23409    APRUTIL_LIBS="$apu_expat_libs"
23410  else
23411    apr_addto_bugger="$apu_expat_libs"
23412    for i in $apr_addto_bugger; do
23413      apr_addto_duplicate="0"
23414      for j in $APRUTIL_LIBS; do
23415        if test "x$i" = "x$j"; then
23416          apr_addto_duplicate="1"
23417          break
23418        fi
23419      done
23420      if test $apr_addto_duplicate = "0"; then
23421        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23422        APRUTIL_LIBS="$APRUTIL_LIBS $i"
23423      fi
23424    done
23425  fi
23426
23427
23428APR_XML_DIR=$bundled_subdir
23429
23430
23431CPPFLAGS=$save_cppflags
23432LDFLAGS=$save_ldflags
23433
23434
23435
23436apu_iconv_dir="unknown"
23437have_apr_iconv="0"
23438want_iconv="1"
23439
23440# Check whether --with-iconv was given.
23441if test "${with_iconv+set}" = set; then :
23442  withval=$with_iconv;  apu_iconv_dir="$withval"
23443    if test "$apu_iconv_dir" = "no"; then
23444      have_apr_iconv="0"
23445      have_iconv="0"
23446      want_iconv="0"
23447    elif test "$apu_iconv_dir" != "yes"; then
23448      if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
23449        have_apr_iconv="1"
23450        have_iconv="0"
23451
23452  if test "x$APRUTIL_INCLUDES" = "x"; then
23453    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include/apr-1\""
23454    APRUTIL_INCLUDES="-I$apu_iconv_dir/include/apr-1"
23455  else
23456    apr_addto_bugger="-I$apu_iconv_dir/include/apr-1"
23457    for i in $apr_addto_bugger; do
23458      apr_addto_duplicate="0"
23459      for j in $APRUTIL_INCLUDES; do
23460        if test "x$i" = "x$j"; then
23461          apr_addto_duplicate="1"
23462          break
23463        fi
23464      done
23465      if test $apr_addto_duplicate = "0"; then
23466        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23467        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23468      fi
23469    done
23470  fi
23471
23472
23473  if test "x$APRUTIL_LIBS" = "x"; then
23474    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$apu_iconv_dir/lib/libapriconv-1.la\""
23475    APRUTIL_LIBS="$apu_iconv_dir/lib/libapriconv-1.la"
23476  else
23477    apr_addto_bugger="$apu_iconv_dir/lib/libapriconv-1.la"
23478    for i in $apr_addto_bugger; do
23479      apr_addto_duplicate="0"
23480      for j in $APRUTIL_LIBS; do
23481        if test "x$i" = "x$j"; then
23482          apr_addto_duplicate="1"
23483          break
23484        fi
23485      done
23486      if test $apr_addto_duplicate = "0"; then
23487        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23488        APRUTIL_LIBS="$APRUTIL_LIBS $i"
23489      fi
23490    done
23491  fi
23492
23493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using apr-iconv" >&5
23494$as_echo "using apr-iconv" >&6; }
23495      elif test -f "$apu_iconv_dir/include/iconv.h"; then
23496        have_apr_iconv="0"
23497        have_iconv="1"
23498
23499  if test "x$CPPFLAGS" = "x"; then
23500    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$apu_iconv_dir/include\""
23501    CPPFLAGS="-I$apu_iconv_dir/include"
23502  else
23503    apr_addto_bugger="-I$apu_iconv_dir/include"
23504    for i in $apr_addto_bugger; do
23505      apr_addto_duplicate="0"
23506      for j in $CPPFLAGS; 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 CPPFLAGS"
23514        CPPFLAGS="$CPPFLAGS $i"
23515      fi
23516    done
23517  fi
23518
23519
23520  if test "x$LDFLAGS" = "x"; then
23521    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$apu_iconv_dir/lib\""
23522    LDFLAGS="-L$apu_iconv_dir/lib"
23523  else
23524    apr_addto_bugger="-L$apu_iconv_dir/lib"
23525    for i in $apr_addto_bugger; do
23526      apr_addto_duplicate="0"
23527      for j in $LDFLAGS; 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 LDFLAGS"
23535        LDFLAGS="$LDFLAGS $i"
23536      fi
23537    done
23538  fi
23539
23540      fi
23541    fi
23542
23543fi
23544
23545
23546if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
23547  ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
23548if test "x$ac_cv_header_iconv_h" = x""yes; then :
23549
23550
23551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23552/* end confdefs.h.  */
23553
23554#include <stdlib.h>
23555#include <iconv.h>
23556
23557int
23558main ()
23559{
23560
23561  iconv_t cd = iconv_open("", "");
23562  iconv(cd, NULL, NULL, NULL, NULL);
23563
23564  ;
23565  return 0;
23566}
23567_ACEOF
23568if ac_fn_c_try_link "$LINENO"; then :
23569   have_iconv="1"
23570else
23571
23572
23573
23574  if test "x$LIBS" = "x"; then
23575    test "x$silent" != "xyes" && echo "  setting LIBS to \"-liconv\""
23576    LIBS="-liconv"
23577  else
23578    apr_addto_bugger="-liconv"
23579    for i in $apr_addto_bugger; do
23580      apr_addto_duplicate="0"
23581      for j in $LIBS; do
23582        if test "x$i" = "x$j"; then
23583          apr_addto_duplicate="1"
23584          break
23585        fi
23586      done
23587      if test $apr_addto_duplicate = "0"; then
23588        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
23589        LIBS="$LIBS $i"
23590      fi
23591    done
23592  fi
23593
23594
23595
23596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23597/* end confdefs.h.  */
23598
23599#include <stdlib.h>
23600#include <iconv.h>
23601
23602int
23603main ()
23604{
23605
23606  iconv_t cd = iconv_open("", "");
23607  iconv(cd, NULL, NULL, NULL, NULL);
23608
23609  ;
23610  return 0;
23611}
23612_ACEOF
23613if ac_fn_c_try_link "$LINENO"; then :
23614
23615
23616  if test "x$APRUTIL_LIBS" = "x"; then
23617    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"-liconv\""
23618    APRUTIL_LIBS="-liconv"
23619  else
23620    apr_addto_bugger="-liconv"
23621    for i in $apr_addto_bugger; do
23622      apr_addto_duplicate="0"
23623      for j in $APRUTIL_LIBS; do
23624        if test "x$i" = "x$j"; then
23625          apr_addto_duplicate="1"
23626          break
23627        fi
23628      done
23629      if test $apr_addto_duplicate = "0"; then
23630        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
23631        APRUTIL_LIBS="$APRUTIL_LIBS $i"
23632      fi
23633    done
23634  fi
23635
23636
23637  if test "x$APRUTIL_EXPORT_LIBS" = "x"; then
23638    test "x$silent" != "xyes" && echo "  setting APRUTIL_EXPORT_LIBS to \"-liconv\""
23639    APRUTIL_EXPORT_LIBS="-liconv"
23640  else
23641    apr_addto_bugger="-liconv"
23642    for i in $apr_addto_bugger; do
23643      apr_addto_duplicate="0"
23644      for j in $APRUTIL_EXPORT_LIBS; do
23645        if test "x$i" = "x$j"; then
23646          apr_addto_duplicate="1"
23647          break
23648        fi
23649      done
23650      if test $apr_addto_duplicate = "0"; then
23651        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_EXPORT_LIBS"
23652        APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $i"
23653      fi
23654    done
23655  fi
23656
23657      have_iconv="1"
23658else
23659   have_iconv="0"
23660fi
23661rm -f core conftest.err conftest.$ac_objext \
23662    conftest$ac_exeext conftest.$ac_ext
23663
23664
23665
23666  if test "x$LIBS" = "x-liconv"; then
23667    test "x$silent" != "xyes" && echo "  nulling LIBS"
23668    LIBS=""
23669  else
23670    apr_new_bugger=""
23671    apr_removed=0
23672    for i in $LIBS; do
23673      if test "x$i" != "x-liconv"; then
23674        apr_new_bugger="$apr_new_bugger $i"
23675      else
23676        apr_removed=1
23677      fi
23678    done
23679    if test $apr_removed = "1"; then
23680      test "x$silent" != "xyes" && echo "  removed \"-liconv\" from LIBS"
23681      LIBS=$apr_new_bugger
23682    fi
23683  fi
23684
23685
23686
23687fi
23688rm -f core conftest.err conftest.$ac_objext \
23689    conftest$ac_exeext conftest.$ac_ext
23690
23691
23692else
23693   have_iconv="0"
23694fi
23695
23696
23697fi
23698
23699if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
23700  if test "$have_iconv" != "1"; then
23701    if test "$have_apr_iconv" != "1"; then
23702      as_fn_error $? "iconv support requested, but not found" "$LINENO" 5
23703    fi
23704  fi
23705
23706  if test "x$CPPFLAGS" = "x-I$apu_iconv_dir/include"; then
23707    test "x$silent" != "xyes" && echo "  nulling CPPFLAGS"
23708    CPPFLAGS=""
23709  else
23710    apr_new_bugger=""
23711    apr_removed=0
23712    for i in $CPPFLAGS; do
23713      if test "x$i" != "x-I$apu_iconv_dir/include"; then
23714        apr_new_bugger="$apr_new_bugger $i"
23715      else
23716        apr_removed=1
23717      fi
23718    done
23719    if test $apr_removed = "1"; then
23720      test "x$silent" != "xyes" && echo "  removed \"-I$apu_iconv_dir/include\" from CPPFLAGS"
23721      CPPFLAGS=$apr_new_bugger
23722    fi
23723  fi
23724
23725
23726  if test "x$LDFLAGS" = "x-L$apu_iconv_dir/lib"; then
23727    test "x$silent" != "xyes" && echo "  nulling LDFLAGS"
23728    LDFLAGS=""
23729  else
23730    apr_new_bugger=""
23731    apr_removed=0
23732    for i in $LDFLAGS; do
23733      if test "x$i" != "x-L$apu_iconv_dir/lib"; then
23734        apr_new_bugger="$apr_new_bugger $i"
23735      else
23736        apr_removed=1
23737      fi
23738    done
23739    if test $apr_removed = "1"; then
23740      test "x$silent" != "xyes" && echo "  removed \"-L$apu_iconv_dir/lib\" from LDFLAGS"
23741      LDFLAGS=$apr_new_bugger
23742    fi
23743  fi
23744
23745
23746  if test "x$APRUTIL_INCLUDES" = "x"; then
23747    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$apu_iconv_dir/include\""
23748    APRUTIL_INCLUDES="-I$apu_iconv_dir/include"
23749  else
23750    apr_addto_bugger="-I$apu_iconv_dir/include"
23751    for i in $apr_addto_bugger; do
23752      apr_addto_duplicate="0"
23753      for j in $APRUTIL_INCLUDES; do
23754        if test "x$i" = "x$j"; then
23755          apr_addto_duplicate="1"
23756          break
23757        fi
23758      done
23759      if test $apr_addto_duplicate = "0"; then
23760        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
23761        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
23762      fi
23763    done
23764  fi
23765
23766
23767  if test "x$APRUTIL_LDFLAGS" = "x"; then
23768    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$apu_iconv_dir/lib\""
23769    APRUTIL_LDFLAGS="-L$apu_iconv_dir/lib"
23770  else
23771    apr_addto_bugger="-L$apu_iconv_dir/lib"
23772    for i in $apr_addto_bugger; do
23773      apr_addto_duplicate="0"
23774      for j in $APRUTIL_LDFLAGS; do
23775        if test "x$i" = "x$j"; then
23776          apr_addto_duplicate="1"
23777          break
23778        fi
23779      done
23780      if test $apr_addto_duplicate = "0"; then
23781        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
23782        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
23783      fi
23784    done
23785  fi
23786
23787fi
23788
23789if test "$have_iconv" = "1"; then
23790
23791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of inbuf parameter to iconv" >&5
23792$as_echo_n "checking for type of inbuf parameter to iconv... " >&6; }
23793if test "x$apu_iconv_inbuf_const" = "x"; then
23794    apr_save_CFLAGS=$CFLAGS
23795 CFLAGS="$CFLAGS $CFLAGS_WARN"
23796 if test "$ac_cv_c_compiler_gnu" = "yes"; then
23797   CFLAGS="$CFLAGS -Werror"
23798 fi
23799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23800/* end confdefs.h.  */
23801#include "confdefs.h"
23802
23803
23804    #include <stddef.h>
23805    #include <iconv.h>
23806
23807   int main(int argc, const char *const *argv) {
23808
23809    iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
23810
23811      return 0; }
23812
23813_ACEOF
23814if ac_fn_c_try_compile "$LINENO"; then :
23815  apu_iconv_inbuf_const="0"
23816else
23817  apu_iconv_inbuf_const="1"
23818fi
23819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23820 CFLAGS=$apr_save_CFLAGS
23821
23822fi
23823if test "$apu_iconv_inbuf_const" = "1"; then
23824
23825$as_echo "#define APU_ICONV_INBUF_CONST 1" >>confdefs.h
23826
23827    msg="const char **"
23828else
23829    msg="char **"
23830fi
23831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
23832$as_echo "$msg" >&6; }
23833
23834fi
23835
23836
23837for ac_header in iconv.h langinfo.h
23838do :
23839  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23840ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23841if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23842  cat >>confdefs.h <<_ACEOF
23843#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23844_ACEOF
23845
23846fi
23847
23848done
23849
23850for aprt_i in iconv.h langinfo.h
23851do
23852    ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
23853    aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
23854    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23855       eval "$aprt_2=1"
23856    else
23857       eval "$aprt_2=0"
23858    fi
23859done
23860
23861
23862for ac_func in nl_langinfo
23863do :
23864  ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
23865if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
23866  cat >>confdefs.h <<_ACEOF
23867#define HAVE_NL_LANGINFO 1
23868_ACEOF
23869
23870fi
23871done
23872
23873for aprt_j in nl_langinfo
23874do
23875    aprt_3="have_$aprt_j"
23876    if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
23877       eval "$aprt_3=1"
23878    else
23879       eval "$aprt_3=0"
23880    fi
23881done
23882
23883
23884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESET in langinfo.h" >&5
23885$as_echo_n "checking for CODESET in langinfo.h... " >&6; }
23886if test "${ac_cv_define_CODESET+set}" = set; then :
23887  $as_echo_n "(cached) " >&6
23888else
23889
23890    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23891/* end confdefs.h.  */
23892
23893#include <langinfo.h>
23894#ifdef CODESET
23895YES_IS_DEFINED
23896#endif
23897
23898_ACEOF
23899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23900  $EGREP "YES_IS_DEFINED" >/dev/null 2>&1; then :
23901  ac_cv_define_CODESET=yes
23902else
23903  ac_cv_define_CODESET=no
23904fi
23905rm -f conftest*
23906
23907
23908fi
23909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_define_CODESET" >&5
23910$as_echo "$ac_cv_define_CODESET" >&6; }
23911  if test "$ac_cv_define_CODESET" = "yes"; then
23912
23913$as_echo "#define HAVE_CODESET 1" >>confdefs.h
23914
23915  fi
23916
23917
23918
23919
23920
23921
23922
23923
23924  # Check whether --enable-util-dso was given.
23925if test "${enable_util_dso+set}" = set; then :
23926  enableval=$enable_util_dso;
23927fi
23928
23929
23930  if test "$enable_util_dso" = "no"; then
23931     apu_dso_build="0"
23932  else
23933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether APR has DSO support" >&5
23934$as_echo_n "checking whether APR has DSO support... " >&6; }
23935if test "${apu_cv_aprdso+set}" = set; then :
23936  $as_echo_n "(cached) " >&6
23937else
23938  apu_save_CPPFLAGS=$CPPFLAGS
23939        CPPFLAGS="$CPPFLAGS $APR_INCLUDES"
23940        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23941/* end confdefs.h.  */
23942#include "apr.h"
23943#if APR_HAS_DSO
23944yes
23945#endif
23946
23947_ACEOF
23948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23949  $EGREP "yes" >/dev/null 2>&1; then :
23950  apu_cv_aprdso=yes
23951else
23952  apu_cv_aprdso=no
23953fi
23954rm -f conftest*
23955
23956        CPPFLAGS=$apu_save_CPPFLAGS
23957fi
23958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_cv_aprdso" >&5
23959$as_echo "$apu_cv_aprdso" >&6; }
23960
23961     if test $apu_cv_aprdso = yes; then
23962        apu_dso_build=1
23963     else
23964        apu_dso_build=0
23965     fi
23966  fi
23967
23968  if test "$apu_dso_build" = "0"; then
23969
23970     # Statically link the drivers:
23971     objs=
23972     test $apu_have_openssl = 1 && objs="$objs crypto/apr_crypto_openssl.lo"
23973     test $apu_have_nss = 1 && objs="$objs crypto/apr_crypto_nss.lo"
23974     test $apu_have_oracle = 1 && objs="$objs dbd/apr_dbd_oracle.lo"
23975     test $apu_have_pgsql = 1 && objs="$objs dbd/apr_dbd_pgsql.lo"
23976     test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo"
23977     test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo"
23978     test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
23979     test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
23980     test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
23981     test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
23982     test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
23983     test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
23984     test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
23985     test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
23986     test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
23987     EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
23988
23989     # Use libtool *.la for mysql if available
23990     if test $apu_have_mysql = 1; then
23991       for flag in $LDADD_dbd_mysql
23992       do
23993         dir=`echo $flag | grep "^-L" | sed s:-L::`
23994         if test "x$dir" != 'x'; then
23995           if test -f "$dir/libmysqlclient_r.la"; then
23996             LDADD_dbd_mysql=$dir/libmysqlclient_r.la
23997             break
23998           fi
23999         fi
24000       done
24001     fi
24002
24003     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
24004     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"
24005     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
24006     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
24007     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
24008     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"
24009     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
24010     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
24011
24012  else
24013
24014     # Build the drivers as loadable modules:
24015     dsos=
24016     test $apu_have_openssl = 1 && dsos="$dsos crypto/apr_crypto_openssl.la"
24017     test $apu_have_nss = 1 && dsos="$dsos crypto/apr_crypto_nss.la"
24018     test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
24019     test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
24020     test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
24021     test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
24022     test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
24023     test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
24024     test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
24025     test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
24026     test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
24027     test $apu_have_ndbm = 1 && dsos="$dsos dbm/apr_dbm_ndbm.la"
24028     test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
24029
24030     if test -n "$dsos"; then
24031        APU_MODULES="$APU_MODULES $dsos"
24032     fi
24033
24034  fi
24035
24036
24037cat >>confdefs.h <<_ACEOF
24038#define APU_DSO_BUILD $apu_dso_build
24039_ACEOF
24040
24041
24042
24043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
24044$as_echo_n "checking for library containing crypt... " >&6; }
24045if test "${ac_cv_search_crypt+set}" = set; then :
24046  $as_echo_n "(cached) " >&6
24047else
24048  ac_func_search_save_LIBS=$LIBS
24049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24050/* end confdefs.h.  */
24051
24052/* Override any GCC internal prototype to avoid an error.
24053   Use char because int might match the return type of a GCC
24054   builtin and then its argument prototype would still apply.  */
24055#ifdef __cplusplus
24056extern "C"
24057#endif
24058char crypt ();
24059int
24060main ()
24061{
24062return crypt ();
24063  ;
24064  return 0;
24065}
24066_ACEOF
24067for ac_lib in '' crypt ufc; do
24068  if test -z "$ac_lib"; then
24069    ac_res="none required"
24070  else
24071    ac_res=-l$ac_lib
24072    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24073  fi
24074  if ac_fn_c_try_link "$LINENO"; then :
24075  ac_cv_search_crypt=$ac_res
24076fi
24077rm -f core conftest.err conftest.$ac_objext \
24078    conftest$ac_exeext
24079  if test "${ac_cv_search_crypt+set}" = set; then :
24080  break
24081fi
24082done
24083if test "${ac_cv_search_crypt+set}" = set; then :
24084
24085else
24086  ac_cv_search_crypt=no
24087fi
24088rm conftest.$ac_ext
24089LIBS=$ac_func_search_save_LIBS
24090fi
24091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
24092$as_echo "$ac_cv_search_crypt" >&6; }
24093ac_res=$ac_cv_search_crypt
24094if test "$ac_res" != no; then :
24095  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24096
24097fi
24098
24099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if system crypt() function is threadsafe" >&5
24100$as_echo_n "checking if system crypt() function is threadsafe... " >&6; }
24101if test "x$apu_crypt_threadsafe" = "x1"; then
24102
24103$as_echo "#define APU_CRYPT_THREADSAFE 1" >>confdefs.h
24104
24105  msg="yes"
24106else
24107  msg="no"
24108fi
24109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
24110$as_echo "$msg" >&6; }
24111
24112for ac_func in crypt_r
24113do :
24114  ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
24115if test "x$ac_cv_func_crypt_r" = x""yes; then :
24116  cat >>confdefs.h <<_ACEOF
24117#define HAVE_CRYPT_R 1
24118_ACEOF
24119  crypt_r="1"
24120else
24121   crypt_r="0"
24122fi
24123done
24124
24125if test "$crypt_r" = "1"; then
24126
24127
24128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of crypt_r" >&5
24129$as_echo_n "checking style of crypt_r... " >&6; }
24130if test "${apr_cv_crypt_r_style+set}" = set; then :
24131  $as_echo_n "(cached) " >&6
24132else
24133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24134/* end confdefs.h.  */
24135#include <crypt.h>
24136int
24137main ()
24138{
24139CRYPTD buffer;
24140  crypt_r("passwd", "hash", &buffer);
24141  ;
24142  return 0;
24143}
24144_ACEOF
24145if ac_fn_c_try_compile "$LINENO"; then :
24146  apr_cv_crypt_r_style=cryptd
24147else
24148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24149/* end confdefs.h.  */
24150#include <crypt.h>
24151int
24152main ()
24153{
24154struct crypt_data buffer;
24155   crypt_r("passwd", "hash", &buffer);
24156  ;
24157  return 0;
24158}
24159_ACEOF
24160if ac_fn_c_try_compile "$LINENO"; then :
24161  apr_cv_crypt_r_style=struct_crypt_data
24162else
24163  apr_cv_crypt_r_style=none
24164fi
24165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24166fi
24167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24168fi
24169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_cv_crypt_r_style" >&5
24170$as_echo "$apr_cv_crypt_r_style" >&6; }
24171
24172if test "$apr_cv_crypt_r_style" = "cryptd"; then
24173
24174$as_echo "#define CRYPT_R_CRYPTD 1" >>confdefs.h
24175
24176elif test "$apr_cv_crypt_r_style" = "struct_crypt_data"; then
24177
24178$as_echo "#define CRYPT_R_STRUCT_CRYPT_DATA 1" >>confdefs.h
24179
24180fi
24181
24182fi
24183
24184so_ext=$APR_SO_EXT
24185lib_target=$APR_LIB_TARGET
24186
24187
24188
24189APRUTIL_LIBNAME="aprutil${libsuffix}"
24190
24191
24192# Set up destination directory for DSOs.
24193APU_DSO_LIBDIR="\${libdir}/apr-util-${APRUTIL_MAJOR_VERSION}"
24194# Set APU_HAVE_MODULES appropriately for the Makefile
24195if test -n "$APU_MODULES"; then
24196   APU_HAVE_MODULES=yes
24197else
24198   APU_HAVE_MODULES=no
24199fi
24200# Define expanded libdir for apu_config.h
24201
24202ap_last=
24203ap_cur="$APU_DSO_LIBDIR"
24204while test "x${ap_cur}" != "x${ap_last}";
24205do
24206  ap_last="${ap_cur}"
24207  ap_cur=`eval "echo ${ap_cur}"`
24208done
24209abs_dso_libdir="${ap_cur}"
24210
24211
24212cat >>confdefs.h <<_ACEOF
24213#define APU_DSO_LIBDIR "$abs_dso_libdir"
24214_ACEOF
24215
24216
24217
24218
24219
24220
24221
24222  if test "x$APRUTIL_LIBS" = "x"; then
24223    test "x$silent" != "xyes" && echo "  setting APRUTIL_LIBS to \"$APR_LIBS\""
24224    APRUTIL_LIBS="$APR_LIBS"
24225  else
24226    apr_addto_bugger="$APR_LIBS"
24227    for i in $apr_addto_bugger; do
24228      apr_addto_duplicate="0"
24229      for j in $APRUTIL_LIBS; do
24230        if test "x$i" = "x$j"; then
24231          apr_addto_duplicate="1"
24232          break
24233        fi
24234      done
24235      if test $apr_addto_duplicate = "0"; then
24236        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LIBS"
24237        APRUTIL_LIBS="$APRUTIL_LIBS $i"
24238      fi
24239    done
24240  fi
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250if test ! -d ./build; then
24251   $mkdir_p build
24252fi
24253case $host in
24254    *-mingw*)
24255        sed -e 's/-DAPR_DECLARE_EXPORT/-DAPU_DECLARE_EXPORT/' \
24256            -e 's/-DAPR_DECLARE_STATIC/-DAPU_DECLARE_STATIC -DAPR_DECLARE_STATIC/' \
24257            < $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
24258        ;;
24259    *)
24260        cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
24261        ;;
24262esac
24263
24264case "$host_alias" in
24265*bsdi* | BSD/OS)
24266    # Check whether they've installed GNU make
24267    if make --version > /dev/null 2>&1; then
24268        INCLUDE_RULES="include $abs_builddir/build/rules.mk"
24269        INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
24270    else
24271        INCLUDE_RULES=".include \"$abs_builddir/build/rules.mk\""
24272        INCLUDE_OUTPUTS=".include \"$abs_srcdir/build-outputs.mk\""
24273    fi
24274    ;;
24275*)
24276    INCLUDE_RULES="include $abs_builddir/build/rules.mk"
24277    INCLUDE_OUTPUTS="include $abs_srcdir/build-outputs.mk"
24278    ;;
24279esac
24280
24281
24282
24283for d in include include/private; do
24284    test -d $top_builddir/$d || mkdir $top_builddir/$d
24285done
24286
24287ac_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"
24288
24289
24290ac_config_commands="$ac_config_commands default"
24291
24292
24293if test -d $srcdir/test; then
24294    ac_config_files="$ac_config_files test/Makefile"
24295
24296fi
24297
24298cat >confcache <<\_ACEOF
24299# This file is a shell script that caches the results of configure
24300# tests run on this system so they can be shared between configure
24301# scripts and configure runs, see configure's option --config-cache.
24302# It is not useful on other systems.  If it contains results you don't
24303# want to keep, you may remove or edit it.
24304#
24305# config.status only pays attention to the cache file if you give it
24306# the --recheck option to rerun configure.
24307#
24308# `ac_cv_env_foo' variables (set or unset) will be overridden when
24309# loading this file, other *unset* `ac_cv_foo' will be assigned the
24310# following values.
24311
24312_ACEOF
24313
24314# The following way of writing the cache mishandles newlines in values,
24315# but we know of no workaround that is simple, portable, and efficient.
24316# So, we kill variables containing newlines.
24317# Ultrix sh set writes to stderr and can't be redirected directly,
24318# and sets the high bit in the cache file unless we assign to the vars.
24319(
24320  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24321    eval ac_val=\$$ac_var
24322    case $ac_val in #(
24323    *${as_nl}*)
24324      case $ac_var in #(
24325      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24326$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24327      esac
24328      case $ac_var in #(
24329      _ | IFS | as_nl) ;; #(
24330      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24331      *) { eval $ac_var=; unset $ac_var;} ;;
24332      esac ;;
24333    esac
24334  done
24335
24336  (set) 2>&1 |
24337    case $as_nl`(ac_space=' '; set) 2>&1` in #(
24338    *${as_nl}ac_space=\ *)
24339      # `set' does not quote correctly, so add quotes: double-quote
24340      # substitution turns \\\\ into \\, and sed turns \\ into \.
24341      sed -n \
24342	"s/'/'\\\\''/g;
24343	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24344      ;; #(
24345    *)
24346      # `set' quotes correctly as required by POSIX, so do not add quotes.
24347      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24348      ;;
24349    esac |
24350    sort
24351) |
24352  sed '
24353     /^ac_cv_env_/b end
24354     t clear
24355     :clear
24356     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24357     t end
24358     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24359     :end' >>confcache
24360if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24361  if test -w "$cache_file"; then
24362    test "x$cache_file" != "x/dev/null" &&
24363      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24364$as_echo "$as_me: updating cache $cache_file" >&6;}
24365    cat confcache >$cache_file
24366  else
24367    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24368$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24369  fi
24370fi
24371rm -f confcache
24372
24373test "x$prefix" = xNONE && prefix=$ac_default_prefix
24374# Let make expand exec_prefix.
24375test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24376
24377DEFS=-DHAVE_CONFIG_H
24378
24379ac_libobjs=
24380ac_ltlibobjs=
24381U=
24382for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24383  # 1. Remove the extension, and $U if already installed.
24384  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24385  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24386  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24387  #    will be set to the directory where LIBOBJS objects are built.
24388  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24389  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24390done
24391LIBOBJS=$ac_libobjs
24392
24393LTLIBOBJS=$ac_ltlibobjs
24394
24395
24396
24397: ${CONFIG_STATUS=./config.status}
24398ac_write_fail=0
24399ac_clean_files_save=$ac_clean_files
24400ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24401{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24402$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24403as_write_fail=0
24404cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24405#! $SHELL
24406# Generated by $as_me.
24407# Run this file to recreate the current configuration.
24408# Compiler output produced by configure, useful for debugging
24409# configure, is in config.log if it exists.
24410
24411debug=false
24412ac_cs_recheck=false
24413ac_cs_silent=false
24414
24415SHELL=\${CONFIG_SHELL-$SHELL}
24416export SHELL
24417_ASEOF
24418cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24419## -------------------- ##
24420## M4sh Initialization. ##
24421## -------------------- ##
24422
24423# Be more Bourne compatible
24424DUALCASE=1; export DUALCASE # for MKS sh
24425if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24426  emulate sh
24427  NULLCMD=:
24428  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24429  # is contrary to our usage.  Disable this feature.
24430  alias -g '${1+"$@"}'='"$@"'
24431  setopt NO_GLOB_SUBST
24432else
24433  case `(set -o) 2>/dev/null` in #(
24434  *posix*) :
24435    set -o posix ;; #(
24436  *) :
24437     ;;
24438esac
24439fi
24440
24441
24442as_nl='
24443'
24444export as_nl
24445# Printing a long string crashes Solaris 7 /usr/bin/printf.
24446as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24447as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24448as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24449# Prefer a ksh shell builtin over an external printf program on Solaris,
24450# but without wasting forks for bash or zsh.
24451if test -z "$BASH_VERSION$ZSH_VERSION" \
24452    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24453  as_echo='print -r --'
24454  as_echo_n='print -rn --'
24455elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24456  as_echo='printf %s\n'
24457  as_echo_n='printf %s'
24458else
24459  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24460    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24461    as_echo_n='/usr/ucb/echo -n'
24462  else
24463    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24464    as_echo_n_body='eval
24465      arg=$1;
24466      case $arg in #(
24467      *"$as_nl"*)
24468	expr "X$arg" : "X\\(.*\\)$as_nl";
24469	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24470      esac;
24471      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24472    '
24473    export as_echo_n_body
24474    as_echo_n='sh -c $as_echo_n_body as_echo'
24475  fi
24476  export as_echo_body
24477  as_echo='sh -c $as_echo_body as_echo'
24478fi
24479
24480# The user is always right.
24481if test "${PATH_SEPARATOR+set}" != set; then
24482  PATH_SEPARATOR=:
24483  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24484    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24485      PATH_SEPARATOR=';'
24486  }
24487fi
24488
24489
24490# IFS
24491# We need space, tab and new line, in precisely that order.  Quoting is
24492# there to prevent editors from complaining about space-tab.
24493# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24494# splitting by setting IFS to empty value.)
24495IFS=" ""	$as_nl"
24496
24497# Find who we are.  Look in the path if we contain no directory separator.
24498case $0 in #((
24499  *[\\/]* ) as_myself=$0 ;;
24500  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24501for as_dir in $PATH
24502do
24503  IFS=$as_save_IFS
24504  test -z "$as_dir" && as_dir=.
24505    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24506  done
24507IFS=$as_save_IFS
24508
24509     ;;
24510esac
24511# We did not find ourselves, most probably we were run as `sh COMMAND'
24512# in which case we are not to be found in the path.
24513if test "x$as_myself" = x; then
24514  as_myself=$0
24515fi
24516if test ! -f "$as_myself"; then
24517  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24518  exit 1
24519fi
24520
24521# Unset variables that we do not need and which cause bugs (e.g. in
24522# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24523# suppresses any "Segmentation fault" message there.  '((' could
24524# trigger a bug in pdksh 5.2.14.
24525for as_var in BASH_ENV ENV MAIL MAILPATH
24526do eval test x\${$as_var+set} = xset \
24527  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24528done
24529PS1='$ '
24530PS2='> '
24531PS4='+ '
24532
24533# NLS nuisances.
24534LC_ALL=C
24535export LC_ALL
24536LANGUAGE=C
24537export LANGUAGE
24538
24539# CDPATH.
24540(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24541
24542
24543# as_fn_error STATUS ERROR [LINENO LOG_FD]
24544# ----------------------------------------
24545# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24546# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24547# script with STATUS, using 1 if that was 0.
24548as_fn_error ()
24549{
24550  as_status=$1; test $as_status -eq 0 && as_status=1
24551  if test "$4"; then
24552    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24553    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
24554  fi
24555  $as_echo "$as_me: error: $2" >&2
24556  as_fn_exit $as_status
24557} # as_fn_error
24558
24559
24560# as_fn_set_status STATUS
24561# -----------------------
24562# Set $? to STATUS, without forking.
24563as_fn_set_status ()
24564{
24565  return $1
24566} # as_fn_set_status
24567
24568# as_fn_exit STATUS
24569# -----------------
24570# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24571as_fn_exit ()
24572{
24573  set +e
24574  as_fn_set_status $1
24575  exit $1
24576} # as_fn_exit
24577
24578# as_fn_unset VAR
24579# ---------------
24580# Portably unset VAR.
24581as_fn_unset ()
24582{
24583  { eval $1=; unset $1;}
24584}
24585as_unset=as_fn_unset
24586# as_fn_append VAR VALUE
24587# ----------------------
24588# Append the text in VALUE to the end of the definition contained in VAR. Take
24589# advantage of any shell optimizations that allow amortized linear growth over
24590# repeated appends, instead of the typical quadratic growth present in naive
24591# implementations.
24592if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24593  eval 'as_fn_append ()
24594  {
24595    eval $1+=\$2
24596  }'
24597else
24598  as_fn_append ()
24599  {
24600    eval $1=\$$1\$2
24601  }
24602fi # as_fn_append
24603
24604# as_fn_arith ARG...
24605# ------------------
24606# Perform arithmetic evaluation on the ARGs, and store the result in the
24607# global $as_val. Take advantage of shells that can avoid forks. The arguments
24608# must be portable across $(()) and expr.
24609if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24610  eval 'as_fn_arith ()
24611  {
24612    as_val=$(( $* ))
24613  }'
24614else
24615  as_fn_arith ()
24616  {
24617    as_val=`expr "$@" || test $? -eq 1`
24618  }
24619fi # as_fn_arith
24620
24621
24622if expr a : '\(a\)' >/dev/null 2>&1 &&
24623   test "X`expr 00001 : '.*\(...\)'`" = X001; then
24624  as_expr=expr
24625else
24626  as_expr=false
24627fi
24628
24629if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24630  as_basename=basename
24631else
24632  as_basename=false
24633fi
24634
24635if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24636  as_dirname=dirname
24637else
24638  as_dirname=false
24639fi
24640
24641as_me=`$as_basename -- "$0" ||
24642$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24643	 X"$0" : 'X\(//\)$' \| \
24644	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24645$as_echo X/"$0" |
24646    sed '/^.*\/\([^/][^/]*\)\/*$/{
24647	    s//\1/
24648	    q
24649	  }
24650	  /^X\/\(\/\/\)$/{
24651	    s//\1/
24652	    q
24653	  }
24654	  /^X\/\(\/\).*/{
24655	    s//\1/
24656	    q
24657	  }
24658	  s/.*/./; q'`
24659
24660# Avoid depending upon Character Ranges.
24661as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24662as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24663as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24664as_cr_digits='0123456789'
24665as_cr_alnum=$as_cr_Letters$as_cr_digits
24666
24667ECHO_C= ECHO_N= ECHO_T=
24668case `echo -n x` in #(((((
24669-n*)
24670  case `echo 'xy\c'` in
24671  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
24672  xy)  ECHO_C='\c';;
24673  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
24674       ECHO_T='	';;
24675  esac;;
24676*)
24677  ECHO_N='-n';;
24678esac
24679
24680rm -f conf$$ conf$$.exe conf$$.file
24681if test -d conf$$.dir; then
24682  rm -f conf$$.dir/conf$$.file
24683else
24684  rm -f conf$$.dir
24685  mkdir conf$$.dir 2>/dev/null
24686fi
24687if (echo >conf$$.file) 2>/dev/null; then
24688  if ln -s conf$$.file conf$$ 2>/dev/null; then
24689    as_ln_s='ln -s'
24690    # ... but there are two gotchas:
24691    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24692    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24693    # In both cases, we have to default to `cp -p'.
24694    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24695      as_ln_s='cp -p'
24696  elif ln conf$$.file conf$$ 2>/dev/null; then
24697    as_ln_s=ln
24698  else
24699    as_ln_s='cp -p'
24700  fi
24701else
24702  as_ln_s='cp -p'
24703fi
24704rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24705rmdir conf$$.dir 2>/dev/null
24706
24707
24708# as_fn_mkdir_p
24709# -------------
24710# Create "$as_dir" as a directory, including parents if necessary.
24711as_fn_mkdir_p ()
24712{
24713
24714  case $as_dir in #(
24715  -*) as_dir=./$as_dir;;
24716  esac
24717  test -d "$as_dir" || eval $as_mkdir_p || {
24718    as_dirs=
24719    while :; do
24720      case $as_dir in #(
24721      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24722      *) as_qdir=$as_dir;;
24723      esac
24724      as_dirs="'$as_qdir' $as_dirs"
24725      as_dir=`$as_dirname -- "$as_dir" ||
24726$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24727	 X"$as_dir" : 'X\(//\)[^/]' \| \
24728	 X"$as_dir" : 'X\(//\)$' \| \
24729	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24730$as_echo X"$as_dir" |
24731    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24732	    s//\1/
24733	    q
24734	  }
24735	  /^X\(\/\/\)[^/].*/{
24736	    s//\1/
24737	    q
24738	  }
24739	  /^X\(\/\/\)$/{
24740	    s//\1/
24741	    q
24742	  }
24743	  /^X\(\/\).*/{
24744	    s//\1/
24745	    q
24746	  }
24747	  s/.*/./; q'`
24748      test -d "$as_dir" && break
24749    done
24750    test -z "$as_dirs" || eval "mkdir $as_dirs"
24751  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
24752
24753
24754} # as_fn_mkdir_p
24755if mkdir -p . 2>/dev/null; then
24756  as_mkdir_p='mkdir -p "$as_dir"'
24757else
24758  test -d ./-p && rmdir ./-p
24759  as_mkdir_p=false
24760fi
24761
24762if test -x / >/dev/null 2>&1; then
24763  as_test_x='test -x'
24764else
24765  if ls -dL / >/dev/null 2>&1; then
24766    as_ls_L_option=L
24767  else
24768    as_ls_L_option=
24769  fi
24770  as_test_x='
24771    eval sh -c '\''
24772      if test -d "$1"; then
24773	test -d "$1/.";
24774      else
24775	case $1 in #(
24776	-*)set "./$1";;
24777	esac;
24778	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24779	???[sx]*):;;*)false;;esac;fi
24780    '\'' sh
24781  '
24782fi
24783as_executable_p=$as_test_x
24784
24785# Sed expression to map a string onto a valid CPP name.
24786as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24787
24788# Sed expression to map a string onto a valid variable name.
24789as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24790
24791
24792exec 6>&1
24793## ----------------------------------- ##
24794## Main body of $CONFIG_STATUS script. ##
24795## ----------------------------------- ##
24796_ASEOF
24797test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24798
24799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24800# Save the log message, to keep $0 and so on meaningful, and to
24801# report actual input values of CONFIG_FILES etc. instead of their
24802# values after options handling.
24803ac_log="
24804This file was extended by $as_me, which was
24805generated by GNU Autoconf 2.67.  Invocation command line was
24806
24807  CONFIG_FILES    = $CONFIG_FILES
24808  CONFIG_HEADERS  = $CONFIG_HEADERS
24809  CONFIG_LINKS    = $CONFIG_LINKS
24810  CONFIG_COMMANDS = $CONFIG_COMMANDS
24811  $ $0 $@
24812
24813on `(hostname || uname -n) 2>/dev/null | sed 1q`
24814"
24815
24816_ACEOF
24817
24818case $ac_config_files in *"
24819"*) set x $ac_config_files; shift; ac_config_files=$*;;
24820esac
24821
24822case $ac_config_headers in *"
24823"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24824esac
24825
24826
24827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24828# Files that config.status was made for.
24829config_files="$ac_config_files"
24830config_headers="$ac_config_headers"
24831config_commands="$ac_config_commands"
24832
24833_ACEOF
24834
24835cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24836ac_cs_usage="\
24837\`$as_me' instantiates files and other configuration actions
24838from templates according to the current configuration.  Unless the files
24839and actions are specified as TAGs, all are instantiated by default.
24840
24841Usage: $0 [OPTION]... [TAG]...
24842
24843  -h, --help       print this help, then exit
24844  -V, --version    print version number and configuration settings, then exit
24845      --config     print configuration, then exit
24846  -q, --quiet, --silent
24847                   do not print progress messages
24848  -d, --debug      don't remove temporary files
24849      --recheck    update $as_me by reconfiguring in the same conditions
24850      --file=FILE[:TEMPLATE]
24851                   instantiate the configuration file FILE
24852      --header=FILE[:TEMPLATE]
24853                   instantiate the configuration header FILE
24854
24855Configuration files:
24856$config_files
24857
24858Configuration headers:
24859$config_headers
24860
24861Configuration commands:
24862$config_commands
24863
24864Report bugs to the package provider."
24865
24866_ACEOF
24867cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24868ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
24869ac_cs_version="\\
24870config.status
24871configured by $0, generated by GNU Autoconf 2.67,
24872  with options \\"\$ac_cs_config\\"
24873
24874Copyright (C) 2010 Free Software Foundation, Inc.
24875This config.status script is free software; the Free Software Foundation
24876gives unlimited permission to copy, distribute and modify it."
24877
24878ac_pwd='$ac_pwd'
24879srcdir='$srcdir'
24880INSTALL='$INSTALL'
24881test -n "\$AWK" || AWK=awk
24882_ACEOF
24883
24884cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24885# The default lists apply if the user does not specify any file.
24886ac_need_defaults=:
24887while test $# != 0
24888do
24889  case $1 in
24890  --*=?*)
24891    ac_option=`expr "X$1" : 'X\([^=]*\)='`
24892    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24893    ac_shift=:
24894    ;;
24895  --*=)
24896    ac_option=`expr "X$1" : 'X\([^=]*\)='`
24897    ac_optarg=
24898    ac_shift=:
24899    ;;
24900  *)
24901    ac_option=$1
24902    ac_optarg=$2
24903    ac_shift=shift
24904    ;;
24905  esac
24906
24907  case $ac_option in
24908  # Handling of the options.
24909  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24910    ac_cs_recheck=: ;;
24911  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24912    $as_echo "$ac_cs_version"; exit ;;
24913  --config | --confi | --conf | --con | --co | --c )
24914    $as_echo "$ac_cs_config"; exit ;;
24915  --debug | --debu | --deb | --de | --d | -d )
24916    debug=: ;;
24917  --file | --fil | --fi | --f )
24918    $ac_shift
24919    case $ac_optarg in
24920    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24921    '') as_fn_error $? "missing file argument" ;;
24922    esac
24923    as_fn_append CONFIG_FILES " '$ac_optarg'"
24924    ac_need_defaults=false;;
24925  --header | --heade | --head | --hea )
24926    $ac_shift
24927    case $ac_optarg in
24928    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24929    esac
24930    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24931    ac_need_defaults=false;;
24932  --he | --h)
24933    # Conflict between --help and --header
24934    as_fn_error $? "ambiguous option: \`$1'
24935Try \`$0 --help' for more information.";;
24936  --help | --hel | -h )
24937    $as_echo "$ac_cs_usage"; exit ;;
24938  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24939  | -silent | --silent | --silen | --sile | --sil | --si | --s)
24940    ac_cs_silent=: ;;
24941
24942  # This is an error.
24943  -*) as_fn_error $? "unrecognized option: \`$1'
24944Try \`$0 --help' for more information." ;;
24945
24946  *) as_fn_append ac_config_targets " $1"
24947     ac_need_defaults=false ;;
24948
24949  esac
24950  shift
24951done
24952
24953ac_configure_extra_args=
24954
24955if $ac_cs_silent; then
24956  exec 6>/dev/null
24957  ac_configure_extra_args="$ac_configure_extra_args --silent"
24958fi
24959
24960_ACEOF
24961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24962if \$ac_cs_recheck; then
24963  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24964  shift
24965  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24966  CONFIG_SHELL='$SHELL'
24967  export CONFIG_SHELL
24968  exec "\$@"
24969fi
24970
24971_ACEOF
24972cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24973exec 5>>config.log
24974{
24975  echo
24976  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24977## Running $as_me. ##
24978_ASBOX
24979  $as_echo "$ac_log"
24980} >&5
24981
24982_ACEOF
24983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24984#
24985# INIT-COMMANDS
24986#
24987
24988APRUTIL_MAJOR_VERSION=$APRUTIL_MAJOR_VERSION
24989
24990
24991_ACEOF
24992
24993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24994
24995# Handling of arguments.
24996for ac_config_target in $ac_config_targets
24997do
24998  case $ac_config_target in
24999    "include/private/apu_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/private/apu_config.h" ;;
25000    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25001    "export_vars.sh") CONFIG_FILES="$CONFIG_FILES export_vars.sh" ;;
25002    "build/pkg/pkginfo") CONFIG_FILES="$CONFIG_FILES build/pkg/pkginfo" ;;
25003    "apr-util.pc") CONFIG_FILES="$CONFIG_FILES apr-util.pc" ;;
25004    "apu-$APRUTIL_MAJOR_VERSION-config") CONFIG_FILES="$CONFIG_FILES apu-$APRUTIL_MAJOR_VERSION-config:apu-config.in" ;;
25005    "include/private/apu_select_dbm.h") CONFIG_FILES="$CONFIG_FILES include/private/apu_select_dbm.h" ;;
25006    "include/apr_ldap.h") CONFIG_FILES="$CONFIG_FILES include/apr_ldap.h" ;;
25007    "include/apu.h") CONFIG_FILES="$CONFIG_FILES include/apu.h" ;;
25008    "include/apu_want.h") CONFIG_FILES="$CONFIG_FILES include/apu_want.h" ;;
25009    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25010    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
25011
25012  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25013  esac
25014done
25015
25016
25017# If the user did not use the arguments to specify the items to instantiate,
25018# then the envvar interface is used.  Set only those that are not.
25019# We use the long form for the default assignment because of an extremely
25020# bizarre bug on SunOS 4.1.3.
25021if $ac_need_defaults; then
25022  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25023  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25024  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25025fi
25026
25027# Have a temporary directory for convenience.  Make it in the build tree
25028# simply because there is no reason against having it here, and in addition,
25029# creating and moving files from /tmp can sometimes cause problems.
25030# Hook for its removal unless debugging.
25031# Note that there is a small window in which the directory will not be cleaned:
25032# after its creation but before its name has been assigned to `$tmp'.
25033$debug ||
25034{
25035  tmp=
25036  trap 'exit_status=$?
25037  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25038' 0
25039  trap 'as_fn_exit 1' 1 2 13 15
25040}
25041# Create a (secure) tmp directory for tmp files.
25042
25043{
25044  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25045  test -n "$tmp" && test -d "$tmp"
25046}  ||
25047{
25048  tmp=./conf$$-$RANDOM
25049  (umask 077 && mkdir "$tmp")
25050} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
25051
25052# Set up the scripts for CONFIG_FILES section.
25053# No need to generate them if there are no CONFIG_FILES.
25054# This happens for instance with `./config.status config.h'.
25055if test -n "$CONFIG_FILES"; then
25056
25057
25058ac_cr=`echo X | tr X '\015'`
25059# On cygwin, bash can eat \r inside `` if the user requested igncr.
25060# But we know of no other shell where ac_cr would be empty at this
25061# point, so we can use a bashism as a fallback.
25062if test "x$ac_cr" = x; then
25063  eval ac_cr=\$\'\\r\'
25064fi
25065ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25066if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25067  ac_cs_awk_cr='\\r'
25068else
25069  ac_cs_awk_cr=$ac_cr
25070fi
25071
25072echo 'BEGIN {' >"$tmp/subs1.awk" &&
25073_ACEOF
25074
25075
25076{
25077  echo "cat >conf$$subs.awk <<_ACEOF" &&
25078  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25079  echo "_ACEOF"
25080} >conf$$subs.sh ||
25081  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25082ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
25083ac_delim='%!_!# '
25084for ac_last_try in false false false false false :; do
25085  . ./conf$$subs.sh ||
25086    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25087
25088  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25089  if test $ac_delim_n = $ac_delim_num; then
25090    break
25091  elif $ac_last_try; then
25092    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25093  else
25094    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25095  fi
25096done
25097rm -f conf$$subs.sh
25098
25099cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25100cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25101_ACEOF
25102sed -n '
25103h
25104s/^/S["/; s/!.*/"]=/
25105p
25106g
25107s/^[^!]*!//
25108:repl
25109t repl
25110s/'"$ac_delim"'$//
25111t delim
25112:nl
25113h
25114s/\(.\{148\}\)..*/\1/
25115t more1
25116s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25117p
25118n
25119b repl
25120:more1
25121s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25122p
25123g
25124s/.\{148\}//
25125t nl
25126:delim
25127h
25128s/\(.\{148\}\)..*/\1/
25129t more2
25130s/["\\]/\\&/g; s/^/"/; s/$/"/
25131p
25132b
25133:more2
25134s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25135p
25136g
25137s/.\{148\}//
25138t delim
25139' <conf$$subs.awk | sed '
25140/^[^""]/{
25141  N
25142  s/\n//
25143}
25144' >>$CONFIG_STATUS || ac_write_fail=1
25145rm -f conf$$subs.awk
25146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25147_ACAWK
25148cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25149  for (key in S) S_is_set[key] = 1
25150  FS = ""
25151
25152}
25153{
25154  line = $ 0
25155  nfields = split(line, field, "@")
25156  substed = 0
25157  len = length(field[1])
25158  for (i = 2; i < nfields; i++) {
25159    key = field[i]
25160    keylen = length(key)
25161    if (S_is_set[key]) {
25162      value = S[key]
25163      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25164      len += length(value) + length(field[++i])
25165      substed = 1
25166    } else
25167      len += 1 + keylen
25168  }
25169
25170  print line
25171}
25172
25173_ACAWK
25174_ACEOF
25175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25176if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25177  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25178else
25179  cat
25180fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25181  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
25182_ACEOF
25183
25184# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25185# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
25186# trailing colons and then remove the whole line if VPATH becomes empty
25187# (actually we leave an empty line to preserve line numbers).
25188if test "x$srcdir" = x.; then
25189  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
25190h
25191s///
25192s/^/:/
25193s/[	 ]*$/:/
25194s/:\$(srcdir):/:/g
25195s/:\${srcdir}:/:/g
25196s/:@srcdir@:/:/g
25197s/^:*//
25198s/:*$//
25199x
25200s/\(=[	 ]*\).*/\1/
25201G
25202s/\n//
25203s/^[^=]*=[	 ]*$//
25204}'
25205fi
25206
25207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25208fi # test -n "$CONFIG_FILES"
25209
25210# Set up the scripts for CONFIG_HEADERS section.
25211# No need to generate them if there are no CONFIG_HEADERS.
25212# This happens for instance with `./config.status Makefile'.
25213if test -n "$CONFIG_HEADERS"; then
25214cat >"$tmp/defines.awk" <<\_ACAWK ||
25215BEGIN {
25216_ACEOF
25217
25218# Transform confdefs.h into an awk script `defines.awk', embedded as
25219# here-document in config.status, that substitutes the proper values into
25220# config.h.in to produce config.h.
25221
25222# Create a delimiter string that does not exist in confdefs.h, to ease
25223# handling of long lines.
25224ac_delim='%!_!# '
25225for ac_last_try in false false :; do
25226  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25227  if test -z "$ac_t"; then
25228    break
25229  elif $ac_last_try; then
25230    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
25231  else
25232    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25233  fi
25234done
25235
25236# For the awk script, D is an array of macro values keyed by name,
25237# likewise P contains macro parameters if any.  Preserve backslash
25238# newline sequences.
25239
25240ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25241sed -n '
25242s/.\{148\}/&'"$ac_delim"'/g
25243t rset
25244:rset
25245s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
25246t def
25247d
25248:def
25249s/\\$//
25250t bsnl
25251s/["\\]/\\&/g
25252s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25253D["\1"]=" \3"/p
25254s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
25255d
25256:bsnl
25257s/["\\]/\\&/g
25258s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25259D["\1"]=" \3\\\\\\n"\\/p
25260t cont
25261s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25262t cont
25263d
25264:cont
25265n
25266s/.\{148\}/&'"$ac_delim"'/g
25267t clear
25268:clear
25269s/\\$//
25270t bsnlc
25271s/["\\]/\\&/g; s/^/"/; s/$/"/p
25272d
25273:bsnlc
25274s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25275b cont
25276' <confdefs.h | sed '
25277s/'"$ac_delim"'/"\\\
25278"/g' >>$CONFIG_STATUS || ac_write_fail=1
25279
25280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25281  for (key in D) D_is_set[key] = 1
25282  FS = ""
25283}
25284/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25285  line = \$ 0
25286  split(line, arg, " ")
25287  if (arg[1] == "#") {
25288    defundef = arg[2]
25289    mac1 = arg[3]
25290  } else {
25291    defundef = substr(arg[1], 2)
25292    mac1 = arg[2]
25293  }
25294  split(mac1, mac2, "(") #)
25295  macro = mac2[1]
25296  prefix = substr(line, 1, index(line, defundef) - 1)
25297  if (D_is_set[macro]) {
25298    # Preserve the white space surrounding the "#".
25299    print prefix "define", macro P[macro] D[macro]
25300    next
25301  } else {
25302    # Replace #undef with comments.  This is necessary, for example,
25303    # in the case of _POSIX_SOURCE, which is predefined and required
25304    # on some systems where configure will not decide to define it.
25305    if (defundef == "undef") {
25306      print "/*", prefix defundef, macro, "*/"
25307      next
25308    }
25309  }
25310}
25311{ print }
25312_ACAWK
25313_ACEOF
25314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25315  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25316fi # test -n "$CONFIG_HEADERS"
25317
25318
25319eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25320shift
25321for ac_tag
25322do
25323  case $ac_tag in
25324  :[FHLC]) ac_mode=$ac_tag; continue;;
25325  esac
25326  case $ac_mode$ac_tag in
25327  :[FHL]*:*);;
25328  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25329  :[FH]-) ac_tag=-:-;;
25330  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25331  esac
25332  ac_save_IFS=$IFS
25333  IFS=:
25334  set x $ac_tag
25335  IFS=$ac_save_IFS
25336  shift
25337  ac_file=$1
25338  shift
25339
25340  case $ac_mode in
25341  :L) ac_source=$1;;
25342  :[FH])
25343    ac_file_inputs=
25344    for ac_f
25345    do
25346      case $ac_f in
25347      -) ac_f="$tmp/stdin";;
25348      *) # Look for the file first in the build tree, then in the source tree
25349	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
25350	 # because $ac_f cannot contain `:'.
25351	 test -f "$ac_f" ||
25352	   case $ac_f in
25353	   [\\/$]*) false;;
25354	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25355	   esac ||
25356	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25357      esac
25358      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25359      as_fn_append ac_file_inputs " '$ac_f'"
25360    done
25361
25362    # Let's still pretend it is `configure' which instantiates (i.e., don't
25363    # use $as_me), people would be surprised to read:
25364    #    /* config.h.  Generated by config.status.  */
25365    configure_input='Generated from '`
25366	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25367	`' by configure.'
25368    if test x"$ac_file" != x-; then
25369      configure_input="$ac_file.  $configure_input"
25370      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25371$as_echo "$as_me: creating $ac_file" >&6;}
25372    fi
25373    # Neutralize special characters interpreted by sed in replacement strings.
25374    case $configure_input in #(
25375    *\&* | *\|* | *\\* )
25376       ac_sed_conf_input=`$as_echo "$configure_input" |
25377       sed 's/[\\\\&|]/\\\\&/g'`;; #(
25378    *) ac_sed_conf_input=$configure_input;;
25379    esac
25380
25381    case $ac_tag in
25382    *:-:* | *:-) cat >"$tmp/stdin" \
25383      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
25384    esac
25385    ;;
25386  esac
25387
25388  ac_dir=`$as_dirname -- "$ac_file" ||
25389$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25390	 X"$ac_file" : 'X\(//\)[^/]' \| \
25391	 X"$ac_file" : 'X\(//\)$' \| \
25392	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25393$as_echo X"$ac_file" |
25394    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25395	    s//\1/
25396	    q
25397	  }
25398	  /^X\(\/\/\)[^/].*/{
25399	    s//\1/
25400	    q
25401	  }
25402	  /^X\(\/\/\)$/{
25403	    s//\1/
25404	    q
25405	  }
25406	  /^X\(\/\).*/{
25407	    s//\1/
25408	    q
25409	  }
25410	  s/.*/./; q'`
25411  as_dir="$ac_dir"; as_fn_mkdir_p
25412  ac_builddir=.
25413
25414case "$ac_dir" in
25415.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25416*)
25417  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25418  # A ".." for each directory in $ac_dir_suffix.
25419  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25420  case $ac_top_builddir_sub in
25421  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25422  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25423  esac ;;
25424esac
25425ac_abs_top_builddir=$ac_pwd
25426ac_abs_builddir=$ac_pwd$ac_dir_suffix
25427# for backward compatibility:
25428ac_top_builddir=$ac_top_build_prefix
25429
25430case $srcdir in
25431  .)  # We are building in place.
25432    ac_srcdir=.
25433    ac_top_srcdir=$ac_top_builddir_sub
25434    ac_abs_top_srcdir=$ac_pwd ;;
25435  [\\/]* | ?:[\\/]* )  # Absolute name.
25436    ac_srcdir=$srcdir$ac_dir_suffix;
25437    ac_top_srcdir=$srcdir
25438    ac_abs_top_srcdir=$srcdir ;;
25439  *) # Relative name.
25440    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25441    ac_top_srcdir=$ac_top_build_prefix$srcdir
25442    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25443esac
25444ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25445
25446
25447  case $ac_mode in
25448  :F)
25449  #
25450  # CONFIG_FILE
25451  #
25452
25453  case $INSTALL in
25454  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25455  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25456  esac
25457_ACEOF
25458
25459cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25460# If the template does not know about datarootdir, expand it.
25461# FIXME: This hack should be removed a few years after 2.60.
25462ac_datarootdir_hack=; ac_datarootdir_seen=
25463ac_sed_dataroot='
25464/datarootdir/ {
25465  p
25466  q
25467}
25468/@datadir@/p
25469/@docdir@/p
25470/@infodir@/p
25471/@localedir@/p
25472/@mandir@/p'
25473case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25474*datarootdir*) ac_datarootdir_seen=yes;;
25475*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25476  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25477$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25478_ACEOF
25479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25480  ac_datarootdir_hack='
25481  s&@datadir@&$datadir&g
25482  s&@docdir@&$docdir&g
25483  s&@infodir@&$infodir&g
25484  s&@localedir@&$localedir&g
25485  s&@mandir@&$mandir&g
25486  s&\\\${datarootdir}&$datarootdir&g' ;;
25487esac
25488_ACEOF
25489
25490# Neutralize VPATH when `$srcdir' = `.'.
25491# Shell code in configure.ac might set extrasub.
25492# FIXME: do we really want to maintain this feature?
25493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25494ac_sed_extra="$ac_vpsub
25495$extrasub
25496_ACEOF
25497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25498:t
25499/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25500s|@configure_input@|$ac_sed_conf_input|;t t
25501s&@top_builddir@&$ac_top_builddir_sub&;t t
25502s&@top_build_prefix@&$ac_top_build_prefix&;t t
25503s&@srcdir@&$ac_srcdir&;t t
25504s&@abs_srcdir@&$ac_abs_srcdir&;t t
25505s&@top_srcdir@&$ac_top_srcdir&;t t
25506s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25507s&@builddir@&$ac_builddir&;t t
25508s&@abs_builddir@&$ac_abs_builddir&;t t
25509s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25510s&@INSTALL@&$ac_INSTALL&;t t
25511$ac_datarootdir_hack
25512"
25513eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25514  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25515
25516test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25517  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25518  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25519  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25520which seems to be undefined.  Please make sure it is defined" >&5
25521$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25522which seems to be undefined.  Please make sure it is defined" >&2;}
25523
25524  rm -f "$tmp/stdin"
25525  case $ac_file in
25526  -) cat "$tmp/out" && rm -f "$tmp/out";;
25527  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25528  esac \
25529  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25530 ;;
25531  :H)
25532  #
25533  # CONFIG_HEADER
25534  #
25535  if test x"$ac_file" != x-; then
25536    {
25537      $as_echo "/* $configure_input  */" \
25538      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25539    } >"$tmp/config.h" \
25540      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25541    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
25542      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25543$as_echo "$as_me: $ac_file is unchanged" >&6;}
25544    else
25545      rm -f "$ac_file"
25546      mv "$tmp/config.h" "$ac_file" \
25547	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
25548    fi
25549  else
25550    $as_echo "/* $configure_input  */" \
25551      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25552      || as_fn_error $? "could not create -" "$LINENO" 5
25553  fi
25554 ;;
25555
25556  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25557$as_echo "$as_me: executing $ac_file commands" >&6;}
25558 ;;
25559  esac
25560
25561
25562  case $ac_file$ac_mode in
25563    "default":C)
25564chmod +x apu-$APRUTIL_MAJOR_VERSION-config
25565 ;;
25566
25567  esac
25568done # for ac_tag
25569
25570
25571as_fn_exit 0
25572_ACEOF
25573ac_clean_files=$ac_clean_files_save
25574
25575test $ac_write_fail = 0 ||
25576  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
25577
25578
25579# configure is writing to config.log, and then calls config.status.
25580# config.status does its own redirection, appending to config.log.
25581# Unfortunately, on DOS this fails, as config.log is still kept open
25582# by configure, so config.status won't be able to write to it; its
25583# output is simply discarded.  So we exec the FD to /dev/null,
25584# effectively closing config.log, so it can be properly (re)opened and
25585# appended to by config.status.  When coming back to configure, we
25586# need to make the FD available again.
25587if test "$no_create" != yes; then
25588  ac_cs_success=:
25589  ac_config_status_args=
25590  test "$silent" = yes &&
25591    ac_config_status_args="$ac_config_status_args --quiet"
25592  exec 5>/dev/null
25593  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25594  exec 5>>config.log
25595  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25596  # would make configure fail if this is the last instruction.
25597  $ac_cs_success || as_fn_exit 1
25598fi
25599if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25600  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25601$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25602fi
25603
25604